repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/arcmachine/get.go
sdk/go/azure/arcmachine/get.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package arcmachine import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Azure Arc machine. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/arcmachine" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := arcmachine.Get(ctx, &arcmachine.GetArgs{ // Name: "existing-hcmachine", // ResourceGroupName: "existing-rg", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.HybridCompute` - 2022-11-10 func Get(ctx *pulumi.Context, args *GetArgs, opts ...pulumi.InvokeOption) (*GetResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetResult err := ctx.Invoke("azure:arcmachine/get:get", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking get. type GetArgs struct { // The name of this Azure Arc machine. Name string `pulumi:"name"` // The name of the Resource Group where the Hybrid Compute exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by get. type GetResult struct { // Specifies the AD fully qualified display name. ActiveDirectoryFqdn string `pulumi:"activeDirectoryFqdn"` // The Azure Arc machine agent full version. AgentVersion string `pulumi:"agentVersion"` // A `agent` block as defined below. Agents []GetAgent `pulumi:"agents"` // Public Key that the client provides to be used during initial resource onboarding. ClientPublicKey string `pulumi:"clientPublicKey"` // A `cloudMetadata` block as defined below. CloudMetadatas []GetCloudMetadata `pulumi:"cloudMetadatas"` // A `detectedProperties` block as defined below. DetectedProperties map[string]string `pulumi:"detectedProperties"` // Specifies the Azure Arc machine display name. DisplayName string `pulumi:"displayName"` // Specifies the DNS fully qualified display name. DnsFqdn string `pulumi:"dnsFqdn"` // Specifies the Windows domain name. DomainName string `pulumi:"domainName"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // A `identity` block as defined below. Identities []GetIdentity `pulumi:"identities"` // The time of the last status change. LastStatusChangeTime string `pulumi:"lastStatusChangeTime"` // The Azure Region where the Azure Arc machine exists. Location string `pulumi:"location"` // A `locationData` block as defined below. LocationDatas []GetLocationData `pulumi:"locationDatas"` // Specifies the Azure Arc machine fully qualified display name. MachineFqdn string `pulumi:"machineFqdn"` // Specifies whether any MS SQL instance is discovered on the machine. MssqlDiscovered bool `pulumi:"mssqlDiscovered"` // A canonical name for the geographic or physical location. Name string `pulumi:"name"` // The Operating System running on the Azure Arc machine. OsName string `pulumi:"osName"` // A `osProfile` block as defined below. OsProfiles []GetOsProfile `pulumi:"osProfiles"` // Specifies the Operating System product SKU. OsSku string `pulumi:"osSku"` // The type of Operating System. Possible values are `windows` and `linux`. OsType string `pulumi:"osType"` // The version of Operating System running on the Azure Arc machine. OsVersion string `pulumi:"osVersion"` // The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. ParentClusterResourceId string `pulumi:"parentClusterResourceId"` // The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. PrivateLinkScopeResourceId string `pulumi:"privateLinkScopeResourceId"` ResourceGroupName string `pulumi:"resourceGroupName"` // A `serviceStatus` block as defined below. ServiceStatuses []GetServiceStatus `pulumi:"serviceStatuses"` // The current status of the service. Status string `pulumi:"status"` // A mapping of tags assigned to the Hybrid Compute. Tags map[string]string `pulumi:"tags"` // Specifies the Azure Arc machine unique ID. VmId string `pulumi:"vmId"` // Specifies the Arc Machine's unique SMBIOS ID. VmUuid string `pulumi:"vmUuid"` } func GetOutput(ctx *pulumi.Context, args GetOutputArgs, opts ...pulumi.InvokeOption) GetResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetResultOutput, error) { args := v.(GetArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:arcmachine/get:get", args, GetResultOutput{}, options).(GetResultOutput), nil }).(GetResultOutput) } // A collection of arguments for invoking get. type GetOutputArgs struct { // The name of this Azure Arc machine. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Hybrid Compute exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetArgs)(nil)).Elem() } // A collection of values returned by get. type GetResultOutput struct{ *pulumi.OutputState } func (GetResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetResult)(nil)).Elem() } func (o GetResultOutput) ToGetResultOutput() GetResultOutput { return o } func (o GetResultOutput) ToGetResultOutputWithContext(ctx context.Context) GetResultOutput { return o } // Specifies the AD fully qualified display name. func (o GetResultOutput) ActiveDirectoryFqdn() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.ActiveDirectoryFqdn }).(pulumi.StringOutput) } // The Azure Arc machine agent full version. func (o GetResultOutput) AgentVersion() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.AgentVersion }).(pulumi.StringOutput) } // A `agent` block as defined below. func (o GetResultOutput) Agents() GetAgentArrayOutput { return o.ApplyT(func(v GetResult) []GetAgent { return v.Agents }).(GetAgentArrayOutput) } // Public Key that the client provides to be used during initial resource onboarding. func (o GetResultOutput) ClientPublicKey() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.ClientPublicKey }).(pulumi.StringOutput) } // A `cloudMetadata` block as defined below. func (o GetResultOutput) CloudMetadatas() GetCloudMetadataArrayOutput { return o.ApplyT(func(v GetResult) []GetCloudMetadata { return v.CloudMetadatas }).(GetCloudMetadataArrayOutput) } // A `detectedProperties` block as defined below. func (o GetResultOutput) DetectedProperties() pulumi.StringMapOutput { return o.ApplyT(func(v GetResult) map[string]string { return v.DetectedProperties }).(pulumi.StringMapOutput) } // Specifies the Azure Arc machine display name. func (o GetResultOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.DisplayName }).(pulumi.StringOutput) } // Specifies the DNS fully qualified display name. func (o GetResultOutput) DnsFqdn() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.DnsFqdn }).(pulumi.StringOutput) } // Specifies the Windows domain name. func (o GetResultOutput) DomainName() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.DomainName }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.Id }).(pulumi.StringOutput) } // A `identity` block as defined below. func (o GetResultOutput) Identities() GetIdentityArrayOutput { return o.ApplyT(func(v GetResult) []GetIdentity { return v.Identities }).(GetIdentityArrayOutput) } // The time of the last status change. func (o GetResultOutput) LastStatusChangeTime() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.LastStatusChangeTime }).(pulumi.StringOutput) } // The Azure Region where the Azure Arc machine exists. func (o GetResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.Location }).(pulumi.StringOutput) } // A `locationData` block as defined below. func (o GetResultOutput) LocationDatas() GetLocationDataArrayOutput { return o.ApplyT(func(v GetResult) []GetLocationData { return v.LocationDatas }).(GetLocationDataArrayOutput) } // Specifies the Azure Arc machine fully qualified display name. func (o GetResultOutput) MachineFqdn() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.MachineFqdn }).(pulumi.StringOutput) } // Specifies whether any MS SQL instance is discovered on the machine. func (o GetResultOutput) MssqlDiscovered() pulumi.BoolOutput { return o.ApplyT(func(v GetResult) bool { return v.MssqlDiscovered }).(pulumi.BoolOutput) } // A canonical name for the geographic or physical location. func (o GetResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.Name }).(pulumi.StringOutput) } // The Operating System running on the Azure Arc machine. func (o GetResultOutput) OsName() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.OsName }).(pulumi.StringOutput) } // A `osProfile` block as defined below. func (o GetResultOutput) OsProfiles() GetOsProfileArrayOutput { return o.ApplyT(func(v GetResult) []GetOsProfile { return v.OsProfiles }).(GetOsProfileArrayOutput) } // Specifies the Operating System product SKU. func (o GetResultOutput) OsSku() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.OsSku }).(pulumi.StringOutput) } // The type of Operating System. Possible values are `windows` and `linux`. func (o GetResultOutput) OsType() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.OsType }).(pulumi.StringOutput) } // The version of Operating System running on the Azure Arc machine. func (o GetResultOutput) OsVersion() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.OsVersion }).(pulumi.StringOutput) } // The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. func (o GetResultOutput) ParentClusterResourceId() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.ParentClusterResourceId }).(pulumi.StringOutput) } // The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. func (o GetResultOutput) PrivateLinkScopeResourceId() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.PrivateLinkScopeResourceId }).(pulumi.StringOutput) } func (o GetResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `serviceStatus` block as defined below. func (o GetResultOutput) ServiceStatuses() GetServiceStatusArrayOutput { return o.ApplyT(func(v GetResult) []GetServiceStatus { return v.ServiceStatuses }).(GetServiceStatusArrayOutput) } // The current status of the service. func (o GetResultOutput) Status() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.Status }).(pulumi.StringOutput) } // A mapping of tags assigned to the Hybrid Compute. func (o GetResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // Specifies the Azure Arc machine unique ID. func (o GetResultOutput) VmId() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.VmId }).(pulumi.StringOutput) } // Specifies the Arc Machine's unique SMBIOS ID. func (o GetResultOutput) VmUuid() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.VmUuid }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/watchlist.go
sdk/go/azure/sentinel/watchlist.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Sentinel Watchlist. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewWatchlist(ctx, "example", &sentinel.WatchlistArgs{ // Name: pulumi.String("example-watchlist"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // DisplayName: pulumi.String("example-wl"), // ItemSearchKey: pulumi.String("Key"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.OperationalInsights` - 2022-11-01 // // ## Import // // Sentinel Watchlists can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/watchlist:Watchlist example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/watchlists/list1 // ``` type Watchlist struct { pulumi.CustomResourceState // The default duration in ISO8601 duration form of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. DefaultDuration pulumi.StringPtrOutput `pulumi:"defaultDuration"` // The description of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. Description pulumi.StringPtrOutput `pulumi:"description"` // The display name of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. DisplayName pulumi.StringOutput `pulumi:"displayName"` // The key used to optimize query performance when using Watchlist for joins with other data. Changing this forces a new Sentinel Watchlist to be created. ItemSearchKey pulumi.StringOutput `pulumi:"itemSearchKey"` // Specifies a list of labels related to this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. Labels pulumi.StringArrayOutput `pulumi:"labels"` // The ID of the Log Analytics Workspace where this Sentinel Watchlist resides in. Changing this forces a new Sentinel Watchlist to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. Name pulumi.StringOutput `pulumi:"name"` } // NewWatchlist registers a new resource with the given unique name, arguments, and options. func NewWatchlist(ctx *pulumi.Context, name string, args *WatchlistArgs, opts ...pulumi.ResourceOption) (*Watchlist, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } if args.ItemSearchKey == nil { return nil, errors.New("invalid value for required argument 'ItemSearchKey'") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Watchlist err := ctx.RegisterResource("azure:sentinel/watchlist:Watchlist", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWatchlist gets an existing Watchlist resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetWatchlist(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WatchlistState, opts ...pulumi.ResourceOption) (*Watchlist, error) { var resource Watchlist err := ctx.ReadResource("azure:sentinel/watchlist:Watchlist", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Watchlist resources. type watchlistState struct { // The default duration in ISO8601 duration form of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. DefaultDuration *string `pulumi:"defaultDuration"` // The description of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. Description *string `pulumi:"description"` // The display name of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. DisplayName *string `pulumi:"displayName"` // The key used to optimize query performance when using Watchlist for joins with other data. Changing this forces a new Sentinel Watchlist to be created. ItemSearchKey *string `pulumi:"itemSearchKey"` // Specifies a list of labels related to this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. Labels []string `pulumi:"labels"` // The ID of the Log Analytics Workspace where this Sentinel Watchlist resides in. Changing this forces a new Sentinel Watchlist to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. Name *string `pulumi:"name"` } type WatchlistState struct { // The default duration in ISO8601 duration form of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. DefaultDuration pulumi.StringPtrInput // The description of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. Description pulumi.StringPtrInput // The display name of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. DisplayName pulumi.StringPtrInput // The key used to optimize query performance when using Watchlist for joins with other data. Changing this forces a new Sentinel Watchlist to be created. ItemSearchKey pulumi.StringPtrInput // Specifies a list of labels related to this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. Labels pulumi.StringArrayInput // The ID of the Log Analytics Workspace where this Sentinel Watchlist resides in. Changing this forces a new Sentinel Watchlist to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. Name pulumi.StringPtrInput } func (WatchlistState) ElementType() reflect.Type { return reflect.TypeOf((*watchlistState)(nil)).Elem() } type watchlistArgs struct { // The default duration in ISO8601 duration form of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. DefaultDuration *string `pulumi:"defaultDuration"` // The description of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. Description *string `pulumi:"description"` // The display name of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. DisplayName string `pulumi:"displayName"` // The key used to optimize query performance when using Watchlist for joins with other data. Changing this forces a new Sentinel Watchlist to be created. ItemSearchKey string `pulumi:"itemSearchKey"` // Specifies a list of labels related to this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. Labels []string `pulumi:"labels"` // The ID of the Log Analytics Workspace where this Sentinel Watchlist resides in. Changing this forces a new Sentinel Watchlist to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. Name *string `pulumi:"name"` } // The set of arguments for constructing a Watchlist resource. type WatchlistArgs struct { // The default duration in ISO8601 duration form of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. DefaultDuration pulumi.StringPtrInput // The description of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. Description pulumi.StringPtrInput // The display name of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. DisplayName pulumi.StringInput // The key used to optimize query performance when using Watchlist for joins with other data. Changing this forces a new Sentinel Watchlist to be created. ItemSearchKey pulumi.StringInput // Specifies a list of labels related to this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. Labels pulumi.StringArrayInput // The ID of the Log Analytics Workspace where this Sentinel Watchlist resides in. Changing this forces a new Sentinel Watchlist to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. Name pulumi.StringPtrInput } func (WatchlistArgs) ElementType() reflect.Type { return reflect.TypeOf((*watchlistArgs)(nil)).Elem() } type WatchlistInput interface { pulumi.Input ToWatchlistOutput() WatchlistOutput ToWatchlistOutputWithContext(ctx context.Context) WatchlistOutput } func (*Watchlist) ElementType() reflect.Type { return reflect.TypeOf((**Watchlist)(nil)).Elem() } func (i *Watchlist) ToWatchlistOutput() WatchlistOutput { return i.ToWatchlistOutputWithContext(context.Background()) } func (i *Watchlist) ToWatchlistOutputWithContext(ctx context.Context) WatchlistOutput { return pulumi.ToOutputWithContext(ctx, i).(WatchlistOutput) } // WatchlistArrayInput is an input type that accepts WatchlistArray and WatchlistArrayOutput values. // You can construct a concrete instance of `WatchlistArrayInput` via: // // WatchlistArray{ WatchlistArgs{...} } type WatchlistArrayInput interface { pulumi.Input ToWatchlistArrayOutput() WatchlistArrayOutput ToWatchlistArrayOutputWithContext(context.Context) WatchlistArrayOutput } type WatchlistArray []WatchlistInput func (WatchlistArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Watchlist)(nil)).Elem() } func (i WatchlistArray) ToWatchlistArrayOutput() WatchlistArrayOutput { return i.ToWatchlistArrayOutputWithContext(context.Background()) } func (i WatchlistArray) ToWatchlistArrayOutputWithContext(ctx context.Context) WatchlistArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WatchlistArrayOutput) } // WatchlistMapInput is an input type that accepts WatchlistMap and WatchlistMapOutput values. // You can construct a concrete instance of `WatchlistMapInput` via: // // WatchlistMap{ "key": WatchlistArgs{...} } type WatchlistMapInput interface { pulumi.Input ToWatchlistMapOutput() WatchlistMapOutput ToWatchlistMapOutputWithContext(context.Context) WatchlistMapOutput } type WatchlistMap map[string]WatchlistInput func (WatchlistMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Watchlist)(nil)).Elem() } func (i WatchlistMap) ToWatchlistMapOutput() WatchlistMapOutput { return i.ToWatchlistMapOutputWithContext(context.Background()) } func (i WatchlistMap) ToWatchlistMapOutputWithContext(ctx context.Context) WatchlistMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WatchlistMapOutput) } type WatchlistOutput struct{ *pulumi.OutputState } func (WatchlistOutput) ElementType() reflect.Type { return reflect.TypeOf((**Watchlist)(nil)).Elem() } func (o WatchlistOutput) ToWatchlistOutput() WatchlistOutput { return o } func (o WatchlistOutput) ToWatchlistOutputWithContext(ctx context.Context) WatchlistOutput { return o } // The default duration in ISO8601 duration form of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. func (o WatchlistOutput) DefaultDuration() pulumi.StringPtrOutput { return o.ApplyT(func(v *Watchlist) pulumi.StringPtrOutput { return v.DefaultDuration }).(pulumi.StringPtrOutput) } // The description of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. func (o WatchlistOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *Watchlist) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The display name of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. func (o WatchlistOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *Watchlist) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // The key used to optimize query performance when using Watchlist for joins with other data. Changing this forces a new Sentinel Watchlist to be created. func (o WatchlistOutput) ItemSearchKey() pulumi.StringOutput { return o.ApplyT(func(v *Watchlist) pulumi.StringOutput { return v.ItemSearchKey }).(pulumi.StringOutput) } // Specifies a list of labels related to this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. func (o WatchlistOutput) Labels() pulumi.StringArrayOutput { return o.ApplyT(func(v *Watchlist) pulumi.StringArrayOutput { return v.Labels }).(pulumi.StringArrayOutput) } // The ID of the Log Analytics Workspace where this Sentinel Watchlist resides in. Changing this forces a new Sentinel Watchlist to be created. func (o WatchlistOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *Watchlist) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created. func (o WatchlistOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Watchlist) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } type WatchlistArrayOutput struct{ *pulumi.OutputState } func (WatchlistArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Watchlist)(nil)).Elem() } func (o WatchlistArrayOutput) ToWatchlistArrayOutput() WatchlistArrayOutput { return o } func (o WatchlistArrayOutput) ToWatchlistArrayOutputWithContext(ctx context.Context) WatchlistArrayOutput { return o } func (o WatchlistArrayOutput) Index(i pulumi.IntInput) WatchlistOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Watchlist { return vs[0].([]*Watchlist)[vs[1].(int)] }).(WatchlistOutput) } type WatchlistMapOutput struct{ *pulumi.OutputState } func (WatchlistMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Watchlist)(nil)).Elem() } func (o WatchlistMapOutput) ToWatchlistMapOutput() WatchlistMapOutput { return o } func (o WatchlistMapOutput) ToWatchlistMapOutputWithContext(ctx context.Context) WatchlistMapOutput { return o } func (o WatchlistMapOutput) MapIndex(k pulumi.StringInput) WatchlistOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Watchlist { return vs[0].(map[string]*Watchlist)[vs[1].(string)] }).(WatchlistOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*WatchlistInput)(nil)).Elem(), &Watchlist{}) pulumi.RegisterInputType(reflect.TypeOf((*WatchlistArrayInput)(nil)).Elem(), WatchlistArray{}) pulumi.RegisterInputType(reflect.TypeOf((*WatchlistMapInput)(nil)).Elem(), WatchlistMap{}) pulumi.RegisterOutputType(WatchlistOutput{}) pulumi.RegisterOutputType(WatchlistArrayOutput{}) pulumi.RegisterOutputType(WatchlistMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorThreatIntelligenceTaxii.go
sdk/go/azure/sentinel/dataConnectorThreatIntelligenceTaxii.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Threat Intelligence TAXII Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorThreatIntelligenceTaxii(ctx, "example", &sentinel.DataConnectorThreatIntelligenceTaxiiArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // DisplayName: pulumi.String("example"), // ApiRootUrl: pulumi.String("https://foo/taxii2/api2/"), // CollectionId: pulumi.String("someid"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.OperationalInsights` - 2022-10-01 // // ## Import // // Threat Intelligence TAXII Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorThreatIntelligenceTaxii:DataConnectorThreatIntelligenceTaxii example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorThreatIntelligenceTaxii struct { pulumi.CustomResourceState // The API root URI of the TAXII server. ApiRootUrl pulumi.StringOutput `pulumi:"apiRootUrl"` // The collection ID of the TAXII server. CollectionId pulumi.StringOutput `pulumi:"collectionId"` // The friendly name which should be used for this Threat Intelligence TAXII Data Connector. DisplayName pulumi.StringOutput `pulumi:"displayName"` // The ID of the Log Analytics Workspace that this Threat Intelligence TAXII Data Connector resides in. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The lookback date for the TAXII server in RFC3339. Defaults to `1970-01-01T00:00:00Z`. LookbackDate pulumi.StringPtrOutput `pulumi:"lookbackDate"` // The name which should be used for this Threat Intelligence TAXII Data Connector. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // The password for the TAXII server. Password pulumi.StringPtrOutput `pulumi:"password"` // The polling frequency for the TAXII server. Possible values are `OnceAMinute`, `OnceAnHour` and `OnceADay`. Defaults to `OnceAnHour`. PollingFrequency pulumi.StringPtrOutput `pulumi:"pollingFrequency"` // The ID of the tenant that this Threat Intelligence TAXII Data Connector connects to. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringOutput `pulumi:"tenantId"` // The user name for the TAXII server. UserName pulumi.StringPtrOutput `pulumi:"userName"` } // NewDataConnectorThreatIntelligenceTaxii registers a new resource with the given unique name, arguments, and options. func NewDataConnectorThreatIntelligenceTaxii(ctx *pulumi.Context, name string, args *DataConnectorThreatIntelligenceTaxiiArgs, opts ...pulumi.ResourceOption) (*DataConnectorThreatIntelligenceTaxii, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApiRootUrl == nil { return nil, errors.New("invalid value for required argument 'ApiRootUrl'") } if args.CollectionId == nil { return nil, errors.New("invalid value for required argument 'CollectionId'") } if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } if args.Password != nil { args.Password = pulumi.ToSecret(args.Password).(pulumi.StringPtrInput) } if args.UserName != nil { args.UserName = pulumi.ToSecret(args.UserName).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "password", "userName", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorThreatIntelligenceTaxii err := ctx.RegisterResource("azure:sentinel/dataConnectorThreatIntelligenceTaxii:DataConnectorThreatIntelligenceTaxii", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorThreatIntelligenceTaxii gets an existing DataConnectorThreatIntelligenceTaxii resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorThreatIntelligenceTaxii(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorThreatIntelligenceTaxiiState, opts ...pulumi.ResourceOption) (*DataConnectorThreatIntelligenceTaxii, error) { var resource DataConnectorThreatIntelligenceTaxii err := ctx.ReadResource("azure:sentinel/dataConnectorThreatIntelligenceTaxii:DataConnectorThreatIntelligenceTaxii", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorThreatIntelligenceTaxii resources. type dataConnectorThreatIntelligenceTaxiiState struct { // The API root URI of the TAXII server. ApiRootUrl *string `pulumi:"apiRootUrl"` // The collection ID of the TAXII server. CollectionId *string `pulumi:"collectionId"` // The friendly name which should be used for this Threat Intelligence TAXII Data Connector. DisplayName *string `pulumi:"displayName"` // The ID of the Log Analytics Workspace that this Threat Intelligence TAXII Data Connector resides in. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The lookback date for the TAXII server in RFC3339. Defaults to `1970-01-01T00:00:00Z`. LookbackDate *string `pulumi:"lookbackDate"` // The name which should be used for this Threat Intelligence TAXII Data Connector. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. Name *string `pulumi:"name"` // The password for the TAXII server. Password *string `pulumi:"password"` // The polling frequency for the TAXII server. Possible values are `OnceAMinute`, `OnceAnHour` and `OnceADay`. Defaults to `OnceAnHour`. PollingFrequency *string `pulumi:"pollingFrequency"` // The ID of the tenant that this Threat Intelligence TAXII Data Connector connects to. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` // The user name for the TAXII server. UserName *string `pulumi:"userName"` } type DataConnectorThreatIntelligenceTaxiiState struct { // The API root URI of the TAXII server. ApiRootUrl pulumi.StringPtrInput // The collection ID of the TAXII server. CollectionId pulumi.StringPtrInput // The friendly name which should be used for this Threat Intelligence TAXII Data Connector. DisplayName pulumi.StringPtrInput // The ID of the Log Analytics Workspace that this Threat Intelligence TAXII Data Connector resides in. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The lookback date for the TAXII server in RFC3339. Defaults to `1970-01-01T00:00:00Z`. LookbackDate pulumi.StringPtrInput // The name which should be used for this Threat Intelligence TAXII Data Connector. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. Name pulumi.StringPtrInput // The password for the TAXII server. Password pulumi.StringPtrInput // The polling frequency for the TAXII server. Possible values are `OnceAMinute`, `OnceAnHour` and `OnceADay`. Defaults to `OnceAnHour`. PollingFrequency pulumi.StringPtrInput // The ID of the tenant that this Threat Intelligence TAXII Data Connector connects to. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput // The user name for the TAXII server. UserName pulumi.StringPtrInput } func (DataConnectorThreatIntelligenceTaxiiState) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorThreatIntelligenceTaxiiState)(nil)).Elem() } type dataConnectorThreatIntelligenceTaxiiArgs struct { // The API root URI of the TAXII server. ApiRootUrl string `pulumi:"apiRootUrl"` // The collection ID of the TAXII server. CollectionId string `pulumi:"collectionId"` // The friendly name which should be used for this Threat Intelligence TAXII Data Connector. DisplayName string `pulumi:"displayName"` // The ID of the Log Analytics Workspace that this Threat Intelligence TAXII Data Connector resides in. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The lookback date for the TAXII server in RFC3339. Defaults to `1970-01-01T00:00:00Z`. LookbackDate *string `pulumi:"lookbackDate"` // The name which should be used for this Threat Intelligence TAXII Data Connector. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. Name *string `pulumi:"name"` // The password for the TAXII server. Password *string `pulumi:"password"` // The polling frequency for the TAXII server. Possible values are `OnceAMinute`, `OnceAnHour` and `OnceADay`. Defaults to `OnceAnHour`. PollingFrequency *string `pulumi:"pollingFrequency"` // The ID of the tenant that this Threat Intelligence TAXII Data Connector connects to. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` // The user name for the TAXII server. UserName *string `pulumi:"userName"` } // The set of arguments for constructing a DataConnectorThreatIntelligenceTaxii resource. type DataConnectorThreatIntelligenceTaxiiArgs struct { // The API root URI of the TAXII server. ApiRootUrl pulumi.StringInput // The collection ID of the TAXII server. CollectionId pulumi.StringInput // The friendly name which should be used for this Threat Intelligence TAXII Data Connector. DisplayName pulumi.StringInput // The ID of the Log Analytics Workspace that this Threat Intelligence TAXII Data Connector resides in. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The lookback date for the TAXII server in RFC3339. Defaults to `1970-01-01T00:00:00Z`. LookbackDate pulumi.StringPtrInput // The name which should be used for this Threat Intelligence TAXII Data Connector. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. Name pulumi.StringPtrInput // The password for the TAXII server. Password pulumi.StringPtrInput // The polling frequency for the TAXII server. Possible values are `OnceAMinute`, `OnceAnHour` and `OnceADay`. Defaults to `OnceAnHour`. PollingFrequency pulumi.StringPtrInput // The ID of the tenant that this Threat Intelligence TAXII Data Connector connects to. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput // The user name for the TAXII server. UserName pulumi.StringPtrInput } func (DataConnectorThreatIntelligenceTaxiiArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorThreatIntelligenceTaxiiArgs)(nil)).Elem() } type DataConnectorThreatIntelligenceTaxiiInput interface { pulumi.Input ToDataConnectorThreatIntelligenceTaxiiOutput() DataConnectorThreatIntelligenceTaxiiOutput ToDataConnectorThreatIntelligenceTaxiiOutputWithContext(ctx context.Context) DataConnectorThreatIntelligenceTaxiiOutput } func (*DataConnectorThreatIntelligenceTaxii) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorThreatIntelligenceTaxii)(nil)).Elem() } func (i *DataConnectorThreatIntelligenceTaxii) ToDataConnectorThreatIntelligenceTaxiiOutput() DataConnectorThreatIntelligenceTaxiiOutput { return i.ToDataConnectorThreatIntelligenceTaxiiOutputWithContext(context.Background()) } func (i *DataConnectorThreatIntelligenceTaxii) ToDataConnectorThreatIntelligenceTaxiiOutputWithContext(ctx context.Context) DataConnectorThreatIntelligenceTaxiiOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorThreatIntelligenceTaxiiOutput) } // DataConnectorThreatIntelligenceTaxiiArrayInput is an input type that accepts DataConnectorThreatIntelligenceTaxiiArray and DataConnectorThreatIntelligenceTaxiiArrayOutput values. // You can construct a concrete instance of `DataConnectorThreatIntelligenceTaxiiArrayInput` via: // // DataConnectorThreatIntelligenceTaxiiArray{ DataConnectorThreatIntelligenceTaxiiArgs{...} } type DataConnectorThreatIntelligenceTaxiiArrayInput interface { pulumi.Input ToDataConnectorThreatIntelligenceTaxiiArrayOutput() DataConnectorThreatIntelligenceTaxiiArrayOutput ToDataConnectorThreatIntelligenceTaxiiArrayOutputWithContext(context.Context) DataConnectorThreatIntelligenceTaxiiArrayOutput } type DataConnectorThreatIntelligenceTaxiiArray []DataConnectorThreatIntelligenceTaxiiInput func (DataConnectorThreatIntelligenceTaxiiArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorThreatIntelligenceTaxii)(nil)).Elem() } func (i DataConnectorThreatIntelligenceTaxiiArray) ToDataConnectorThreatIntelligenceTaxiiArrayOutput() DataConnectorThreatIntelligenceTaxiiArrayOutput { return i.ToDataConnectorThreatIntelligenceTaxiiArrayOutputWithContext(context.Background()) } func (i DataConnectorThreatIntelligenceTaxiiArray) ToDataConnectorThreatIntelligenceTaxiiArrayOutputWithContext(ctx context.Context) DataConnectorThreatIntelligenceTaxiiArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorThreatIntelligenceTaxiiArrayOutput) } // DataConnectorThreatIntelligenceTaxiiMapInput is an input type that accepts DataConnectorThreatIntelligenceTaxiiMap and DataConnectorThreatIntelligenceTaxiiMapOutput values. // You can construct a concrete instance of `DataConnectorThreatIntelligenceTaxiiMapInput` via: // // DataConnectorThreatIntelligenceTaxiiMap{ "key": DataConnectorThreatIntelligenceTaxiiArgs{...} } type DataConnectorThreatIntelligenceTaxiiMapInput interface { pulumi.Input ToDataConnectorThreatIntelligenceTaxiiMapOutput() DataConnectorThreatIntelligenceTaxiiMapOutput ToDataConnectorThreatIntelligenceTaxiiMapOutputWithContext(context.Context) DataConnectorThreatIntelligenceTaxiiMapOutput } type DataConnectorThreatIntelligenceTaxiiMap map[string]DataConnectorThreatIntelligenceTaxiiInput func (DataConnectorThreatIntelligenceTaxiiMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorThreatIntelligenceTaxii)(nil)).Elem() } func (i DataConnectorThreatIntelligenceTaxiiMap) ToDataConnectorThreatIntelligenceTaxiiMapOutput() DataConnectorThreatIntelligenceTaxiiMapOutput { return i.ToDataConnectorThreatIntelligenceTaxiiMapOutputWithContext(context.Background()) } func (i DataConnectorThreatIntelligenceTaxiiMap) ToDataConnectorThreatIntelligenceTaxiiMapOutputWithContext(ctx context.Context) DataConnectorThreatIntelligenceTaxiiMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorThreatIntelligenceTaxiiMapOutput) } type DataConnectorThreatIntelligenceTaxiiOutput struct{ *pulumi.OutputState } func (DataConnectorThreatIntelligenceTaxiiOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorThreatIntelligenceTaxii)(nil)).Elem() } func (o DataConnectorThreatIntelligenceTaxiiOutput) ToDataConnectorThreatIntelligenceTaxiiOutput() DataConnectorThreatIntelligenceTaxiiOutput { return o } func (o DataConnectorThreatIntelligenceTaxiiOutput) ToDataConnectorThreatIntelligenceTaxiiOutputWithContext(ctx context.Context) DataConnectorThreatIntelligenceTaxiiOutput { return o } // The API root URI of the TAXII server. func (o DataConnectorThreatIntelligenceTaxiiOutput) ApiRootUrl() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorThreatIntelligenceTaxii) pulumi.StringOutput { return v.ApiRootUrl }).(pulumi.StringOutput) } // The collection ID of the TAXII server. func (o DataConnectorThreatIntelligenceTaxiiOutput) CollectionId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorThreatIntelligenceTaxii) pulumi.StringOutput { return v.CollectionId }).(pulumi.StringOutput) } // The friendly name which should be used for this Threat Intelligence TAXII Data Connector. func (o DataConnectorThreatIntelligenceTaxiiOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorThreatIntelligenceTaxii) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // The ID of the Log Analytics Workspace that this Threat Intelligence TAXII Data Connector resides in. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. func (o DataConnectorThreatIntelligenceTaxiiOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorThreatIntelligenceTaxii) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The lookback date for the TAXII server in RFC3339. Defaults to `1970-01-01T00:00:00Z`. func (o DataConnectorThreatIntelligenceTaxiiOutput) LookbackDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *DataConnectorThreatIntelligenceTaxii) pulumi.StringPtrOutput { return v.LookbackDate }).(pulumi.StringPtrOutput) } // The name which should be used for this Threat Intelligence TAXII Data Connector. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. func (o DataConnectorThreatIntelligenceTaxiiOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorThreatIntelligenceTaxii) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The password for the TAXII server. func (o DataConnectorThreatIntelligenceTaxiiOutput) Password() pulumi.StringPtrOutput { return o.ApplyT(func(v *DataConnectorThreatIntelligenceTaxii) pulumi.StringPtrOutput { return v.Password }).(pulumi.StringPtrOutput) } // The polling frequency for the TAXII server. Possible values are `OnceAMinute`, `OnceAnHour` and `OnceADay`. Defaults to `OnceAnHour`. func (o DataConnectorThreatIntelligenceTaxiiOutput) PollingFrequency() pulumi.StringPtrOutput { return o.ApplyT(func(v *DataConnectorThreatIntelligenceTaxii) pulumi.StringPtrOutput { return v.PollingFrequency }).(pulumi.StringPtrOutput) } // The ID of the tenant that this Threat Intelligence TAXII Data Connector connects to. Changing this forces a new Threat Intelligence TAXII Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. func (o DataConnectorThreatIntelligenceTaxiiOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorThreatIntelligenceTaxii) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } // The user name for the TAXII server. func (o DataConnectorThreatIntelligenceTaxiiOutput) UserName() pulumi.StringPtrOutput { return o.ApplyT(func(v *DataConnectorThreatIntelligenceTaxii) pulumi.StringPtrOutput { return v.UserName }).(pulumi.StringPtrOutput) } type DataConnectorThreatIntelligenceTaxiiArrayOutput struct{ *pulumi.OutputState } func (DataConnectorThreatIntelligenceTaxiiArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorThreatIntelligenceTaxii)(nil)).Elem() } func (o DataConnectorThreatIntelligenceTaxiiArrayOutput) ToDataConnectorThreatIntelligenceTaxiiArrayOutput() DataConnectorThreatIntelligenceTaxiiArrayOutput { return o } func (o DataConnectorThreatIntelligenceTaxiiArrayOutput) ToDataConnectorThreatIntelligenceTaxiiArrayOutputWithContext(ctx context.Context) DataConnectorThreatIntelligenceTaxiiArrayOutput { return o } func (o DataConnectorThreatIntelligenceTaxiiArrayOutput) Index(i pulumi.IntInput) DataConnectorThreatIntelligenceTaxiiOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorThreatIntelligenceTaxii { return vs[0].([]*DataConnectorThreatIntelligenceTaxii)[vs[1].(int)] }).(DataConnectorThreatIntelligenceTaxiiOutput) } type DataConnectorThreatIntelligenceTaxiiMapOutput struct{ *pulumi.OutputState } func (DataConnectorThreatIntelligenceTaxiiMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorThreatIntelligenceTaxii)(nil)).Elem() } func (o DataConnectorThreatIntelligenceTaxiiMapOutput) ToDataConnectorThreatIntelligenceTaxiiMapOutput() DataConnectorThreatIntelligenceTaxiiMapOutput { return o } func (o DataConnectorThreatIntelligenceTaxiiMapOutput) ToDataConnectorThreatIntelligenceTaxiiMapOutputWithContext(ctx context.Context) DataConnectorThreatIntelligenceTaxiiMapOutput { return o } func (o DataConnectorThreatIntelligenceTaxiiMapOutput) MapIndex(k pulumi.StringInput) DataConnectorThreatIntelligenceTaxiiOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorThreatIntelligenceTaxii { return vs[0].(map[string]*DataConnectorThreatIntelligenceTaxii)[vs[1].(string)] }).(DataConnectorThreatIntelligenceTaxiiOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorThreatIntelligenceTaxiiInput)(nil)).Elem(), &DataConnectorThreatIntelligenceTaxii{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorThreatIntelligenceTaxiiArrayInput)(nil)).Elem(), DataConnectorThreatIntelligenceTaxiiArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorThreatIntelligenceTaxiiMapInput)(nil)).Elem(), DataConnectorThreatIntelligenceTaxiiMap{}) pulumi.RegisterOutputType(DataConnectorThreatIntelligenceTaxiiOutput{}) pulumi.RegisterOutputType(DataConnectorThreatIntelligenceTaxiiArrayOutput{}) pulumi.RegisterOutputType(DataConnectorThreatIntelligenceTaxiiMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/getAlertRule.go
sdk/go/azure/sentinel/getAlertRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Sentinel Alert Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := operationalinsights.LookupAnalyticsWorkspace(ctx, &operationalinsights.LookupAnalyticsWorkspaceArgs{ // Name: "example", // ResourceGroupName: "example-resources", // }, nil) // if err != nil { // return err // } // exampleGetAlertRule, err := sentinel.GetAlertRule(ctx, &sentinel.GetAlertRuleArgs{ // Name: "existing", // LogAnalyticsWorkspaceId: example.Id, // }, nil) // if err != nil { // return err // } // ctx.Export("id", exampleGetAlertRule.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.OperationalInsights` - 2023-12-01-preview func GetAlertRule(ctx *pulumi.Context, args *GetAlertRuleArgs, opts ...pulumi.InvokeOption) (*GetAlertRuleResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetAlertRuleResult err := ctx.Invoke("azure:sentinel/getAlertRule:getAlertRule", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getAlertRule. type GetAlertRuleArgs struct { // The ID of the Log Analytics Workspace this Sentinel Alert Rule belongs to. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel Alert Rule. Name string `pulumi:"name"` } // A collection of values returned by getAlertRule. type GetAlertRuleResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` Name string `pulumi:"name"` } func GetAlertRuleOutput(ctx *pulumi.Context, args GetAlertRuleOutputArgs, opts ...pulumi.InvokeOption) GetAlertRuleResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetAlertRuleResultOutput, error) { args := v.(GetAlertRuleArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:sentinel/getAlertRule:getAlertRule", args, GetAlertRuleResultOutput{}, options).(GetAlertRuleResultOutput), nil }).(GetAlertRuleResultOutput) } // A collection of arguments for invoking getAlertRule. type GetAlertRuleOutputArgs struct { // The ID of the Log Analytics Workspace this Sentinel Alert Rule belongs to. LogAnalyticsWorkspaceId pulumi.StringInput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel Alert Rule. Name pulumi.StringInput `pulumi:"name"` } func (GetAlertRuleOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetAlertRuleArgs)(nil)).Elem() } // A collection of values returned by getAlertRule. type GetAlertRuleResultOutput struct{ *pulumi.OutputState } func (GetAlertRuleResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetAlertRuleResult)(nil)).Elem() } func (o GetAlertRuleResultOutput) ToGetAlertRuleResultOutput() GetAlertRuleResultOutput { return o } func (o GetAlertRuleResultOutput) ToGetAlertRuleResultOutputWithContext(ctx context.Context) GetAlertRuleResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o GetAlertRuleResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetAlertRuleResultOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleResult) string { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } func (o GetAlertRuleResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleResult) string { return v.Name }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetAlertRuleResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/init.go
sdk/go/azure/sentinel/init.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "fmt" "github.com/blang/semver" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type module struct { version semver.Version } func (m *module) Version() semver.Version { return m.version } func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { case "azure:sentinel/alertRuleAnomalyBuiltIn:AlertRuleAnomalyBuiltIn": r = &AlertRuleAnomalyBuiltIn{} case "azure:sentinel/alertRuleAnomalyDuplicate:AlertRuleAnomalyDuplicate": r = &AlertRuleAnomalyDuplicate{} case "azure:sentinel/alertRuleFusion:AlertRuleFusion": r = &AlertRuleFusion{} case "azure:sentinel/alertRuleMachineLearningBehaviorAnalytics:AlertRuleMachineLearningBehaviorAnalytics": r = &AlertRuleMachineLearningBehaviorAnalytics{} case "azure:sentinel/alertRuleMsSecurityIncident:AlertRuleMsSecurityIncident": r = &AlertRuleMsSecurityIncident{} case "azure:sentinel/alertRuleNrt:AlertRuleNrt": r = &AlertRuleNrt{} case "azure:sentinel/alertRuleScheduled:AlertRuleScheduled": r = &AlertRuleScheduled{} case "azure:sentinel/alertRuleThreatIntelligence:AlertRuleThreatIntelligence": r = &AlertRuleThreatIntelligence{} case "azure:sentinel/authomationRule:AuthomationRule": r = &AuthomationRule{} case "azure:sentinel/automationRule:AutomationRule": r = &AutomationRule{} case "azure:sentinel/dataConnectorAwsCloudTrail:DataConnectorAwsCloudTrail": r = &DataConnectorAwsCloudTrail{} case "azure:sentinel/dataConnectorAwsS3:DataConnectorAwsS3": r = &DataConnectorAwsS3{} case "azure:sentinel/dataConnectorAzureActiveDirectory:DataConnectorAzureActiveDirectory": r = &DataConnectorAzureActiveDirectory{} case "azure:sentinel/dataConnectorAzureAdvancedThreadProtection:DataConnectorAzureAdvancedThreadProtection": r = &DataConnectorAzureAdvancedThreadProtection{} case "azure:sentinel/dataConnectorAzureSecurityCenter:DataConnectorAzureSecurityCenter": r = &DataConnectorAzureSecurityCenter{} case "azure:sentinel/dataConnectorDynamics365:DataConnectorDynamics365": r = &DataConnectorDynamics365{} case "azure:sentinel/dataConnectorIot:DataConnectorIot": r = &DataConnectorIot{} case "azure:sentinel/dataConnectorMicrosoftCloudAppSecurity:DataConnectorMicrosoftCloudAppSecurity": r = &DataConnectorMicrosoftCloudAppSecurity{} case "azure:sentinel/dataConnectorMicrosoftDefenderAdvancedThreatProtection:DataConnectorMicrosoftDefenderAdvancedThreatProtection": r = &DataConnectorMicrosoftDefenderAdvancedThreatProtection{} case "azure:sentinel/dataConnectorMicrosoftThreatIntelligence:DataConnectorMicrosoftThreatIntelligence": r = &DataConnectorMicrosoftThreatIntelligence{} case "azure:sentinel/dataConnectorMicrosoftThreatProtection:DataConnectorMicrosoftThreatProtection": r = &DataConnectorMicrosoftThreatProtection{} case "azure:sentinel/dataConnectorOffice365:DataConnectorOffice365": r = &DataConnectorOffice365{} case "azure:sentinel/dataConnectorOffice365Project:DataConnectorOffice365Project": r = &DataConnectorOffice365Project{} case "azure:sentinel/dataConnectorOfficeAtp:DataConnectorOfficeAtp": r = &DataConnectorOfficeAtp{} case "azure:sentinel/dataConnectorOfficeIrm:DataConnectorOfficeIrm": r = &DataConnectorOfficeIrm{} case "azure:sentinel/dataConnectorOfficePowerBi:DataConnectorOfficePowerBi": r = &DataConnectorOfficePowerBi{} case "azure:sentinel/dataConnectorThreatIntelligence:DataConnectorThreatIntelligence": r = &DataConnectorThreatIntelligence{} case "azure:sentinel/dataConnectorThreatIntelligenceTaxii:DataConnectorThreatIntelligenceTaxii": r = &DataConnectorThreatIntelligenceTaxii{} case "azure:sentinel/logAnalyticsWorkspaceOnboarding:LogAnalyticsWorkspaceOnboarding": r = &LogAnalyticsWorkspaceOnboarding{} case "azure:sentinel/metadata:Metadata": r = &Metadata{} case "azure:sentinel/threatIntelligenceIndicator:ThreatIntelligenceIndicator": r = &ThreatIntelligenceIndicator{} case "azure:sentinel/watchlist:Watchlist": r = &Watchlist{} case "azure:sentinel/watchlistItem:WatchlistItem": r = &WatchlistItem{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) return } func init() { version, err := internal.PkgVersion() if err != nil { version = semver.Version{Major: 1} } pulumi.RegisterResourceModule( "azure", "sentinel/alertRuleAnomalyBuiltIn", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/alertRuleAnomalyDuplicate", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/alertRuleFusion", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/alertRuleMachineLearningBehaviorAnalytics", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/alertRuleMsSecurityIncident", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/alertRuleNrt", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/alertRuleScheduled", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/alertRuleThreatIntelligence", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/authomationRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/automationRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorAwsCloudTrail", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorAwsS3", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorAzureActiveDirectory", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorAzureAdvancedThreadProtection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorAzureSecurityCenter", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorDynamics365", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorIot", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorMicrosoftCloudAppSecurity", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorMicrosoftDefenderAdvancedThreatProtection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorMicrosoftThreatIntelligence", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorMicrosoftThreatProtection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorOffice365", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorOffice365Project", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorOfficeAtp", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorOfficeIrm", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorOfficePowerBi", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorThreatIntelligence", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/dataConnectorThreatIntelligenceTaxii", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/logAnalyticsWorkspaceOnboarding", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/metadata", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/threatIntelligenceIndicator", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/watchlist", &module{version}, ) pulumi.RegisterResourceModule( "azure", "sentinel/watchlistItem", &module{version}, ) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/pulumiTypes.go
sdk/go/azure/sentinel/pulumiTypes.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) var _ = internal.GetEnvOrDefault type AlertRuleAnomalyBuiltInMultiSelectObservation struct { // The description of the threshold observation. Description *string `pulumi:"description"` // The Name of the built-in Anomaly Alert Rule. Name *string `pulumi:"name"` // A list of supported values of the single select observation. SupportedValues []string `pulumi:"supportedValues"` // A list of values of the single select observation. Values []string `pulumi:"values"` } // AlertRuleAnomalyBuiltInMultiSelectObservationInput is an input type that accepts AlertRuleAnomalyBuiltInMultiSelectObservationArgs and AlertRuleAnomalyBuiltInMultiSelectObservationOutput values. // You can construct a concrete instance of `AlertRuleAnomalyBuiltInMultiSelectObservationInput` via: // // AlertRuleAnomalyBuiltInMultiSelectObservationArgs{...} type AlertRuleAnomalyBuiltInMultiSelectObservationInput interface { pulumi.Input ToAlertRuleAnomalyBuiltInMultiSelectObservationOutput() AlertRuleAnomalyBuiltInMultiSelectObservationOutput ToAlertRuleAnomalyBuiltInMultiSelectObservationOutputWithContext(context.Context) AlertRuleAnomalyBuiltInMultiSelectObservationOutput } type AlertRuleAnomalyBuiltInMultiSelectObservationArgs struct { // The description of the threshold observation. Description pulumi.StringPtrInput `pulumi:"description"` // The Name of the built-in Anomaly Alert Rule. Name pulumi.StringPtrInput `pulumi:"name"` // A list of supported values of the single select observation. SupportedValues pulumi.StringArrayInput `pulumi:"supportedValues"` // A list of values of the single select observation. Values pulumi.StringArrayInput `pulumi:"values"` } func (AlertRuleAnomalyBuiltInMultiSelectObservationArgs) ElementType() reflect.Type { return reflect.TypeOf((*AlertRuleAnomalyBuiltInMultiSelectObservation)(nil)).Elem() } func (i AlertRuleAnomalyBuiltInMultiSelectObservationArgs) ToAlertRuleAnomalyBuiltInMultiSelectObservationOutput() AlertRuleAnomalyBuiltInMultiSelectObservationOutput { return i.ToAlertRuleAnomalyBuiltInMultiSelectObservationOutputWithContext(context.Background()) } func (i AlertRuleAnomalyBuiltInMultiSelectObservationArgs) ToAlertRuleAnomalyBuiltInMultiSelectObservationOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInMultiSelectObservationOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyBuiltInMultiSelectObservationOutput) } // AlertRuleAnomalyBuiltInMultiSelectObservationArrayInput is an input type that accepts AlertRuleAnomalyBuiltInMultiSelectObservationArray and AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput values. // You can construct a concrete instance of `AlertRuleAnomalyBuiltInMultiSelectObservationArrayInput` via: // // AlertRuleAnomalyBuiltInMultiSelectObservationArray{ AlertRuleAnomalyBuiltInMultiSelectObservationArgs{...} } type AlertRuleAnomalyBuiltInMultiSelectObservationArrayInput interface { pulumi.Input ToAlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput() AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput ToAlertRuleAnomalyBuiltInMultiSelectObservationArrayOutputWithContext(context.Context) AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput } type AlertRuleAnomalyBuiltInMultiSelectObservationArray []AlertRuleAnomalyBuiltInMultiSelectObservationInput func (AlertRuleAnomalyBuiltInMultiSelectObservationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]AlertRuleAnomalyBuiltInMultiSelectObservation)(nil)).Elem() } func (i AlertRuleAnomalyBuiltInMultiSelectObservationArray) ToAlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput() AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput { return i.ToAlertRuleAnomalyBuiltInMultiSelectObservationArrayOutputWithContext(context.Background()) } func (i AlertRuleAnomalyBuiltInMultiSelectObservationArray) ToAlertRuleAnomalyBuiltInMultiSelectObservationArrayOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput) } type AlertRuleAnomalyBuiltInMultiSelectObservationOutput struct{ *pulumi.OutputState } func (AlertRuleAnomalyBuiltInMultiSelectObservationOutput) ElementType() reflect.Type { return reflect.TypeOf((*AlertRuleAnomalyBuiltInMultiSelectObservation)(nil)).Elem() } func (o AlertRuleAnomalyBuiltInMultiSelectObservationOutput) ToAlertRuleAnomalyBuiltInMultiSelectObservationOutput() AlertRuleAnomalyBuiltInMultiSelectObservationOutput { return o } func (o AlertRuleAnomalyBuiltInMultiSelectObservationOutput) ToAlertRuleAnomalyBuiltInMultiSelectObservationOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInMultiSelectObservationOutput { return o } // The description of the threshold observation. func (o AlertRuleAnomalyBuiltInMultiSelectObservationOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInMultiSelectObservation) *string { return v.Description }).(pulumi.StringPtrOutput) } // The Name of the built-in Anomaly Alert Rule. func (o AlertRuleAnomalyBuiltInMultiSelectObservationOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInMultiSelectObservation) *string { return v.Name }).(pulumi.StringPtrOutput) } // A list of supported values of the single select observation. func (o AlertRuleAnomalyBuiltInMultiSelectObservationOutput) SupportedValues() pulumi.StringArrayOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInMultiSelectObservation) []string { return v.SupportedValues }).(pulumi.StringArrayOutput) } // A list of values of the single select observation. func (o AlertRuleAnomalyBuiltInMultiSelectObservationOutput) Values() pulumi.StringArrayOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInMultiSelectObservation) []string { return v.Values }).(pulumi.StringArrayOutput) } type AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput struct{ *pulumi.OutputState } func (AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]AlertRuleAnomalyBuiltInMultiSelectObservation)(nil)).Elem() } func (o AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput) ToAlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput() AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput { return o } func (o AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput) ToAlertRuleAnomalyBuiltInMultiSelectObservationArrayOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput { return o } func (o AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput) Index(i pulumi.IntInput) AlertRuleAnomalyBuiltInMultiSelectObservationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) AlertRuleAnomalyBuiltInMultiSelectObservation { return vs[0].([]AlertRuleAnomalyBuiltInMultiSelectObservation)[vs[1].(int)] }).(AlertRuleAnomalyBuiltInMultiSelectObservationOutput) } type AlertRuleAnomalyBuiltInPrioritizedExcludeObservation struct { // The description of the threshold observation. Description *string `pulumi:"description"` // The excluded value per `description`. Exclude *string `pulumi:"exclude"` // The Name of the built-in Anomaly Alert Rule. Name *string `pulumi:"name"` // The prioritized value per `description`. Prioritize *string `pulumi:"prioritize"` } // AlertRuleAnomalyBuiltInPrioritizedExcludeObservationInput is an input type that accepts AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArgs and AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput values. // You can construct a concrete instance of `AlertRuleAnomalyBuiltInPrioritizedExcludeObservationInput` via: // // AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArgs{...} type AlertRuleAnomalyBuiltInPrioritizedExcludeObservationInput interface { pulumi.Input ToAlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput() AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput ToAlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutputWithContext(context.Context) AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput } type AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArgs struct { // The description of the threshold observation. Description pulumi.StringPtrInput `pulumi:"description"` // The excluded value per `description`. Exclude pulumi.StringPtrInput `pulumi:"exclude"` // The Name of the built-in Anomaly Alert Rule. Name pulumi.StringPtrInput `pulumi:"name"` // The prioritized value per `description`. Prioritize pulumi.StringPtrInput `pulumi:"prioritize"` } func (AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArgs) ElementType() reflect.Type { return reflect.TypeOf((*AlertRuleAnomalyBuiltInPrioritizedExcludeObservation)(nil)).Elem() } func (i AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArgs) ToAlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput() AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput { return i.ToAlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutputWithContext(context.Background()) } func (i AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArgs) ToAlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput) } // AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayInput is an input type that accepts AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArray and AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput values. // You can construct a concrete instance of `AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayInput` via: // // AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArray{ AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArgs{...} } type AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayInput interface { pulumi.Input ToAlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput() AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput ToAlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutputWithContext(context.Context) AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput } type AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArray []AlertRuleAnomalyBuiltInPrioritizedExcludeObservationInput func (AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]AlertRuleAnomalyBuiltInPrioritizedExcludeObservation)(nil)).Elem() } func (i AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArray) ToAlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput() AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput { return i.ToAlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutputWithContext(context.Background()) } func (i AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArray) ToAlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput) } type AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput struct{ *pulumi.OutputState } func (AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput) ElementType() reflect.Type { return reflect.TypeOf((*AlertRuleAnomalyBuiltInPrioritizedExcludeObservation)(nil)).Elem() } func (o AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput) ToAlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput() AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput { return o } func (o AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput) ToAlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput { return o } // The description of the threshold observation. func (o AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInPrioritizedExcludeObservation) *string { return v.Description }).(pulumi.StringPtrOutput) } // The excluded value per `description`. func (o AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput) Exclude() pulumi.StringPtrOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInPrioritizedExcludeObservation) *string { return v.Exclude }).(pulumi.StringPtrOutput) } // The Name of the built-in Anomaly Alert Rule. func (o AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInPrioritizedExcludeObservation) *string { return v.Name }).(pulumi.StringPtrOutput) } // The prioritized value per `description`. func (o AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput) Prioritize() pulumi.StringPtrOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInPrioritizedExcludeObservation) *string { return v.Prioritize }).(pulumi.StringPtrOutput) } type AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput struct{ *pulumi.OutputState } func (AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]AlertRuleAnomalyBuiltInPrioritizedExcludeObservation)(nil)).Elem() } func (o AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput) ToAlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput() AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput { return o } func (o AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput) ToAlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput { return o } func (o AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput) Index(i pulumi.IntInput) AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) AlertRuleAnomalyBuiltInPrioritizedExcludeObservation { return vs[0].([]AlertRuleAnomalyBuiltInPrioritizedExcludeObservation)[vs[1].(int)] }).(AlertRuleAnomalyBuiltInPrioritizedExcludeObservationOutput) } type AlertRuleAnomalyBuiltInRequiredDataConnector struct { // The ID of the required Data Connector. ConnectorId *string `pulumi:"connectorId"` // A list of data types of the required Data Connector. DataTypes []string `pulumi:"dataTypes"` } // AlertRuleAnomalyBuiltInRequiredDataConnectorInput is an input type that accepts AlertRuleAnomalyBuiltInRequiredDataConnectorArgs and AlertRuleAnomalyBuiltInRequiredDataConnectorOutput values. // You can construct a concrete instance of `AlertRuleAnomalyBuiltInRequiredDataConnectorInput` via: // // AlertRuleAnomalyBuiltInRequiredDataConnectorArgs{...} type AlertRuleAnomalyBuiltInRequiredDataConnectorInput interface { pulumi.Input ToAlertRuleAnomalyBuiltInRequiredDataConnectorOutput() AlertRuleAnomalyBuiltInRequiredDataConnectorOutput ToAlertRuleAnomalyBuiltInRequiredDataConnectorOutputWithContext(context.Context) AlertRuleAnomalyBuiltInRequiredDataConnectorOutput } type AlertRuleAnomalyBuiltInRequiredDataConnectorArgs struct { // The ID of the required Data Connector. ConnectorId pulumi.StringPtrInput `pulumi:"connectorId"` // A list of data types of the required Data Connector. DataTypes pulumi.StringArrayInput `pulumi:"dataTypes"` } func (AlertRuleAnomalyBuiltInRequiredDataConnectorArgs) ElementType() reflect.Type { return reflect.TypeOf((*AlertRuleAnomalyBuiltInRequiredDataConnector)(nil)).Elem() } func (i AlertRuleAnomalyBuiltInRequiredDataConnectorArgs) ToAlertRuleAnomalyBuiltInRequiredDataConnectorOutput() AlertRuleAnomalyBuiltInRequiredDataConnectorOutput { return i.ToAlertRuleAnomalyBuiltInRequiredDataConnectorOutputWithContext(context.Background()) } func (i AlertRuleAnomalyBuiltInRequiredDataConnectorArgs) ToAlertRuleAnomalyBuiltInRequiredDataConnectorOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInRequiredDataConnectorOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyBuiltInRequiredDataConnectorOutput) } // AlertRuleAnomalyBuiltInRequiredDataConnectorArrayInput is an input type that accepts AlertRuleAnomalyBuiltInRequiredDataConnectorArray and AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput values. // You can construct a concrete instance of `AlertRuleAnomalyBuiltInRequiredDataConnectorArrayInput` via: // // AlertRuleAnomalyBuiltInRequiredDataConnectorArray{ AlertRuleAnomalyBuiltInRequiredDataConnectorArgs{...} } type AlertRuleAnomalyBuiltInRequiredDataConnectorArrayInput interface { pulumi.Input ToAlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput() AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput ToAlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutputWithContext(context.Context) AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput } type AlertRuleAnomalyBuiltInRequiredDataConnectorArray []AlertRuleAnomalyBuiltInRequiredDataConnectorInput func (AlertRuleAnomalyBuiltInRequiredDataConnectorArray) ElementType() reflect.Type { return reflect.TypeOf((*[]AlertRuleAnomalyBuiltInRequiredDataConnector)(nil)).Elem() } func (i AlertRuleAnomalyBuiltInRequiredDataConnectorArray) ToAlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput() AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput { return i.ToAlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutputWithContext(context.Background()) } func (i AlertRuleAnomalyBuiltInRequiredDataConnectorArray) ToAlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput) } type AlertRuleAnomalyBuiltInRequiredDataConnectorOutput struct{ *pulumi.OutputState } func (AlertRuleAnomalyBuiltInRequiredDataConnectorOutput) ElementType() reflect.Type { return reflect.TypeOf((*AlertRuleAnomalyBuiltInRequiredDataConnector)(nil)).Elem() } func (o AlertRuleAnomalyBuiltInRequiredDataConnectorOutput) ToAlertRuleAnomalyBuiltInRequiredDataConnectorOutput() AlertRuleAnomalyBuiltInRequiredDataConnectorOutput { return o } func (o AlertRuleAnomalyBuiltInRequiredDataConnectorOutput) ToAlertRuleAnomalyBuiltInRequiredDataConnectorOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInRequiredDataConnectorOutput { return o } // The ID of the required Data Connector. func (o AlertRuleAnomalyBuiltInRequiredDataConnectorOutput) ConnectorId() pulumi.StringPtrOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInRequiredDataConnector) *string { return v.ConnectorId }).(pulumi.StringPtrOutput) } // A list of data types of the required Data Connector. func (o AlertRuleAnomalyBuiltInRequiredDataConnectorOutput) DataTypes() pulumi.StringArrayOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInRequiredDataConnector) []string { return v.DataTypes }).(pulumi.StringArrayOutput) } type AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput struct{ *pulumi.OutputState } func (AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]AlertRuleAnomalyBuiltInRequiredDataConnector)(nil)).Elem() } func (o AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput) ToAlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput() AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput { return o } func (o AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput) ToAlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput { return o } func (o AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput) Index(i pulumi.IntInput) AlertRuleAnomalyBuiltInRequiredDataConnectorOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) AlertRuleAnomalyBuiltInRequiredDataConnector { return vs[0].([]AlertRuleAnomalyBuiltInRequiredDataConnector)[vs[1].(int)] }).(AlertRuleAnomalyBuiltInRequiredDataConnectorOutput) } type AlertRuleAnomalyBuiltInSingleSelectObservation struct { // The description of the threshold observation. Description *string `pulumi:"description"` // The Name of the built-in Anomaly Alert Rule. Name *string `pulumi:"name"` // A list of supported values of the single select observation. SupportedValues []string `pulumi:"supportedValues"` // The value of the threshold observation. Value *string `pulumi:"value"` } // AlertRuleAnomalyBuiltInSingleSelectObservationInput is an input type that accepts AlertRuleAnomalyBuiltInSingleSelectObservationArgs and AlertRuleAnomalyBuiltInSingleSelectObservationOutput values. // You can construct a concrete instance of `AlertRuleAnomalyBuiltInSingleSelectObservationInput` via: // // AlertRuleAnomalyBuiltInSingleSelectObservationArgs{...} type AlertRuleAnomalyBuiltInSingleSelectObservationInput interface { pulumi.Input ToAlertRuleAnomalyBuiltInSingleSelectObservationOutput() AlertRuleAnomalyBuiltInSingleSelectObservationOutput ToAlertRuleAnomalyBuiltInSingleSelectObservationOutputWithContext(context.Context) AlertRuleAnomalyBuiltInSingleSelectObservationOutput } type AlertRuleAnomalyBuiltInSingleSelectObservationArgs struct { // The description of the threshold observation. Description pulumi.StringPtrInput `pulumi:"description"` // The Name of the built-in Anomaly Alert Rule. Name pulumi.StringPtrInput `pulumi:"name"` // A list of supported values of the single select observation. SupportedValues pulumi.StringArrayInput `pulumi:"supportedValues"` // The value of the threshold observation. Value pulumi.StringPtrInput `pulumi:"value"` } func (AlertRuleAnomalyBuiltInSingleSelectObservationArgs) ElementType() reflect.Type { return reflect.TypeOf((*AlertRuleAnomalyBuiltInSingleSelectObservation)(nil)).Elem() } func (i AlertRuleAnomalyBuiltInSingleSelectObservationArgs) ToAlertRuleAnomalyBuiltInSingleSelectObservationOutput() AlertRuleAnomalyBuiltInSingleSelectObservationOutput { return i.ToAlertRuleAnomalyBuiltInSingleSelectObservationOutputWithContext(context.Background()) } func (i AlertRuleAnomalyBuiltInSingleSelectObservationArgs) ToAlertRuleAnomalyBuiltInSingleSelectObservationOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInSingleSelectObservationOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyBuiltInSingleSelectObservationOutput) } // AlertRuleAnomalyBuiltInSingleSelectObservationArrayInput is an input type that accepts AlertRuleAnomalyBuiltInSingleSelectObservationArray and AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput values. // You can construct a concrete instance of `AlertRuleAnomalyBuiltInSingleSelectObservationArrayInput` via: // // AlertRuleAnomalyBuiltInSingleSelectObservationArray{ AlertRuleAnomalyBuiltInSingleSelectObservationArgs{...} } type AlertRuleAnomalyBuiltInSingleSelectObservationArrayInput interface { pulumi.Input ToAlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput() AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput ToAlertRuleAnomalyBuiltInSingleSelectObservationArrayOutputWithContext(context.Context) AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput } type AlertRuleAnomalyBuiltInSingleSelectObservationArray []AlertRuleAnomalyBuiltInSingleSelectObservationInput func (AlertRuleAnomalyBuiltInSingleSelectObservationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]AlertRuleAnomalyBuiltInSingleSelectObservation)(nil)).Elem() } func (i AlertRuleAnomalyBuiltInSingleSelectObservationArray) ToAlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput() AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput { return i.ToAlertRuleAnomalyBuiltInSingleSelectObservationArrayOutputWithContext(context.Background()) } func (i AlertRuleAnomalyBuiltInSingleSelectObservationArray) ToAlertRuleAnomalyBuiltInSingleSelectObservationArrayOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput) } type AlertRuleAnomalyBuiltInSingleSelectObservationOutput struct{ *pulumi.OutputState } func (AlertRuleAnomalyBuiltInSingleSelectObservationOutput) ElementType() reflect.Type { return reflect.TypeOf((*AlertRuleAnomalyBuiltInSingleSelectObservation)(nil)).Elem() } func (o AlertRuleAnomalyBuiltInSingleSelectObservationOutput) ToAlertRuleAnomalyBuiltInSingleSelectObservationOutput() AlertRuleAnomalyBuiltInSingleSelectObservationOutput { return o } func (o AlertRuleAnomalyBuiltInSingleSelectObservationOutput) ToAlertRuleAnomalyBuiltInSingleSelectObservationOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInSingleSelectObservationOutput { return o } // The description of the threshold observation. func (o AlertRuleAnomalyBuiltInSingleSelectObservationOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInSingleSelectObservation) *string { return v.Description }).(pulumi.StringPtrOutput) } // The Name of the built-in Anomaly Alert Rule. func (o AlertRuleAnomalyBuiltInSingleSelectObservationOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInSingleSelectObservation) *string { return v.Name }).(pulumi.StringPtrOutput) } // A list of supported values of the single select observation. func (o AlertRuleAnomalyBuiltInSingleSelectObservationOutput) SupportedValues() pulumi.StringArrayOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInSingleSelectObservation) []string { return v.SupportedValues }).(pulumi.StringArrayOutput) } // The value of the threshold observation. func (o AlertRuleAnomalyBuiltInSingleSelectObservationOutput) Value() pulumi.StringPtrOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInSingleSelectObservation) *string { return v.Value }).(pulumi.StringPtrOutput) } type AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput struct{ *pulumi.OutputState } func (AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]AlertRuleAnomalyBuiltInSingleSelectObservation)(nil)).Elem() } func (o AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput) ToAlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput() AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput { return o } func (o AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput) ToAlertRuleAnomalyBuiltInSingleSelectObservationArrayOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput { return o } func (o AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput) Index(i pulumi.IntInput) AlertRuleAnomalyBuiltInSingleSelectObservationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) AlertRuleAnomalyBuiltInSingleSelectObservation { return vs[0].([]AlertRuleAnomalyBuiltInSingleSelectObservation)[vs[1].(int)] }).(AlertRuleAnomalyBuiltInSingleSelectObservationOutput) } type AlertRuleAnomalyBuiltInThresholdObservation struct { // The description of the threshold observation. Description *string `pulumi:"description"` // The max value of the threshold observation. Max *string `pulumi:"max"` // The min value of the threshold observation. Min *string `pulumi:"min"` // The Name of the built-in Anomaly Alert Rule. Name *string `pulumi:"name"` // The value of the threshold observation. Value *string `pulumi:"value"` } // AlertRuleAnomalyBuiltInThresholdObservationInput is an input type that accepts AlertRuleAnomalyBuiltInThresholdObservationArgs and AlertRuleAnomalyBuiltInThresholdObservationOutput values. // You can construct a concrete instance of `AlertRuleAnomalyBuiltInThresholdObservationInput` via: // // AlertRuleAnomalyBuiltInThresholdObservationArgs{...} type AlertRuleAnomalyBuiltInThresholdObservationInput interface { pulumi.Input ToAlertRuleAnomalyBuiltInThresholdObservationOutput() AlertRuleAnomalyBuiltInThresholdObservationOutput ToAlertRuleAnomalyBuiltInThresholdObservationOutputWithContext(context.Context) AlertRuleAnomalyBuiltInThresholdObservationOutput } type AlertRuleAnomalyBuiltInThresholdObservationArgs struct { // The description of the threshold observation. Description pulumi.StringPtrInput `pulumi:"description"` // The max value of the threshold observation. Max pulumi.StringPtrInput `pulumi:"max"` // The min value of the threshold observation. Min pulumi.StringPtrInput `pulumi:"min"` // The Name of the built-in Anomaly Alert Rule. Name pulumi.StringPtrInput `pulumi:"name"` // The value of the threshold observation. Value pulumi.StringPtrInput `pulumi:"value"` } func (AlertRuleAnomalyBuiltInThresholdObservationArgs) ElementType() reflect.Type { return reflect.TypeOf((*AlertRuleAnomalyBuiltInThresholdObservation)(nil)).Elem() } func (i AlertRuleAnomalyBuiltInThresholdObservationArgs) ToAlertRuleAnomalyBuiltInThresholdObservationOutput() AlertRuleAnomalyBuiltInThresholdObservationOutput { return i.ToAlertRuleAnomalyBuiltInThresholdObservationOutputWithContext(context.Background()) } func (i AlertRuleAnomalyBuiltInThresholdObservationArgs) ToAlertRuleAnomalyBuiltInThresholdObservationOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInThresholdObservationOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyBuiltInThresholdObservationOutput) } // AlertRuleAnomalyBuiltInThresholdObservationArrayInput is an input type that accepts AlertRuleAnomalyBuiltInThresholdObservationArray and AlertRuleAnomalyBuiltInThresholdObservationArrayOutput values. // You can construct a concrete instance of `AlertRuleAnomalyBuiltInThresholdObservationArrayInput` via: // // AlertRuleAnomalyBuiltInThresholdObservationArray{ AlertRuleAnomalyBuiltInThresholdObservationArgs{...} } type AlertRuleAnomalyBuiltInThresholdObservationArrayInput interface { pulumi.Input ToAlertRuleAnomalyBuiltInThresholdObservationArrayOutput() AlertRuleAnomalyBuiltInThresholdObservationArrayOutput ToAlertRuleAnomalyBuiltInThresholdObservationArrayOutputWithContext(context.Context) AlertRuleAnomalyBuiltInThresholdObservationArrayOutput } type AlertRuleAnomalyBuiltInThresholdObservationArray []AlertRuleAnomalyBuiltInThresholdObservationInput func (AlertRuleAnomalyBuiltInThresholdObservationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]AlertRuleAnomalyBuiltInThresholdObservation)(nil)).Elem() } func (i AlertRuleAnomalyBuiltInThresholdObservationArray) ToAlertRuleAnomalyBuiltInThresholdObservationArrayOutput() AlertRuleAnomalyBuiltInThresholdObservationArrayOutput { return i.ToAlertRuleAnomalyBuiltInThresholdObservationArrayOutputWithContext(context.Background()) } func (i AlertRuleAnomalyBuiltInThresholdObservationArray) ToAlertRuleAnomalyBuiltInThresholdObservationArrayOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInThresholdObservationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyBuiltInThresholdObservationArrayOutput) } type AlertRuleAnomalyBuiltInThresholdObservationOutput struct{ *pulumi.OutputState } func (AlertRuleAnomalyBuiltInThresholdObservationOutput) ElementType() reflect.Type { return reflect.TypeOf((*AlertRuleAnomalyBuiltInThresholdObservation)(nil)).Elem() } func (o AlertRuleAnomalyBuiltInThresholdObservationOutput) ToAlertRuleAnomalyBuiltInThresholdObservationOutput() AlertRuleAnomalyBuiltInThresholdObservationOutput { return o } func (o AlertRuleAnomalyBuiltInThresholdObservationOutput) ToAlertRuleAnomalyBuiltInThresholdObservationOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInThresholdObservationOutput { return o } // The description of the threshold observation. func (o AlertRuleAnomalyBuiltInThresholdObservationOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInThresholdObservation) *string { return v.Description }).(pulumi.StringPtrOutput) } // The max value of the threshold observation. func (o AlertRuleAnomalyBuiltInThresholdObservationOutput) Max() pulumi.StringPtrOutput { return o.ApplyT(func(v AlertRuleAnomalyBuiltInThresholdObservation) *string { return v.Max }).(pulumi.StringPtrOutput) } // The min value of the threshold observation.
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorOfficeIrm.go
sdk/go/azure/sentinel/dataConnectorOfficeIrm.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Office IRM Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorOfficeIrm(ctx, "example", &sentinel.DataConnectorOfficeIrmArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Office IRM Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorOfficeIrm:DataConnectorOfficeIrm example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorOfficeIrm struct { pulumi.CustomResourceState // The ID of the Log Analytics Workspace that this Office IRM Data Connector resides in. Changing this forces a new Office IRM Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Office IRM Data Connector. Changing this forces a new Office IRM Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the tenant that this Office IRM Data Connector connects to. Changing this forces a new Office IRM Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewDataConnectorOfficeIrm registers a new resource with the given unique name, arguments, and options. func NewDataConnectorOfficeIrm(ctx *pulumi.Context, name string, args *DataConnectorOfficeIrmArgs, opts ...pulumi.ResourceOption) (*DataConnectorOfficeIrm, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorOfficeIrm err := ctx.RegisterResource("azure:sentinel/dataConnectorOfficeIrm:DataConnectorOfficeIrm", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorOfficeIrm gets an existing DataConnectorOfficeIrm resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorOfficeIrm(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorOfficeIrmState, opts ...pulumi.ResourceOption) (*DataConnectorOfficeIrm, error) { var resource DataConnectorOfficeIrm err := ctx.ReadResource("azure:sentinel/dataConnectorOfficeIrm:DataConnectorOfficeIrm", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorOfficeIrm resources. type dataConnectorOfficeIrmState struct { // The ID of the Log Analytics Workspace that this Office IRM Data Connector resides in. Changing this forces a new Office IRM Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Office IRM Data Connector. Changing this forces a new Office IRM Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Office IRM Data Connector connects to. Changing this forces a new Office IRM Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } type DataConnectorOfficeIrmState struct { // The ID of the Log Analytics Workspace that this Office IRM Data Connector resides in. Changing this forces a new Office IRM Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Office IRM Data Connector. Changing this forces a new Office IRM Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Office IRM Data Connector connects to. Changing this forces a new Office IRM Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorOfficeIrmState) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorOfficeIrmState)(nil)).Elem() } type dataConnectorOfficeIrmArgs struct { // The ID of the Log Analytics Workspace that this Office IRM Data Connector resides in. Changing this forces a new Office IRM Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Office IRM Data Connector. Changing this forces a new Office IRM Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Office IRM Data Connector connects to. Changing this forces a new Office IRM Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } // The set of arguments for constructing a DataConnectorOfficeIrm resource. type DataConnectorOfficeIrmArgs struct { // The ID of the Log Analytics Workspace that this Office IRM Data Connector resides in. Changing this forces a new Office IRM Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Office IRM Data Connector. Changing this forces a new Office IRM Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Office IRM Data Connector connects to. Changing this forces a new Office IRM Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorOfficeIrmArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorOfficeIrmArgs)(nil)).Elem() } type DataConnectorOfficeIrmInput interface { pulumi.Input ToDataConnectorOfficeIrmOutput() DataConnectorOfficeIrmOutput ToDataConnectorOfficeIrmOutputWithContext(ctx context.Context) DataConnectorOfficeIrmOutput } func (*DataConnectorOfficeIrm) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorOfficeIrm)(nil)).Elem() } func (i *DataConnectorOfficeIrm) ToDataConnectorOfficeIrmOutput() DataConnectorOfficeIrmOutput { return i.ToDataConnectorOfficeIrmOutputWithContext(context.Background()) } func (i *DataConnectorOfficeIrm) ToDataConnectorOfficeIrmOutputWithContext(ctx context.Context) DataConnectorOfficeIrmOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorOfficeIrmOutput) } // DataConnectorOfficeIrmArrayInput is an input type that accepts DataConnectorOfficeIrmArray and DataConnectorOfficeIrmArrayOutput values. // You can construct a concrete instance of `DataConnectorOfficeIrmArrayInput` via: // // DataConnectorOfficeIrmArray{ DataConnectorOfficeIrmArgs{...} } type DataConnectorOfficeIrmArrayInput interface { pulumi.Input ToDataConnectorOfficeIrmArrayOutput() DataConnectorOfficeIrmArrayOutput ToDataConnectorOfficeIrmArrayOutputWithContext(context.Context) DataConnectorOfficeIrmArrayOutput } type DataConnectorOfficeIrmArray []DataConnectorOfficeIrmInput func (DataConnectorOfficeIrmArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorOfficeIrm)(nil)).Elem() } func (i DataConnectorOfficeIrmArray) ToDataConnectorOfficeIrmArrayOutput() DataConnectorOfficeIrmArrayOutput { return i.ToDataConnectorOfficeIrmArrayOutputWithContext(context.Background()) } func (i DataConnectorOfficeIrmArray) ToDataConnectorOfficeIrmArrayOutputWithContext(ctx context.Context) DataConnectorOfficeIrmArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorOfficeIrmArrayOutput) } // DataConnectorOfficeIrmMapInput is an input type that accepts DataConnectorOfficeIrmMap and DataConnectorOfficeIrmMapOutput values. // You can construct a concrete instance of `DataConnectorOfficeIrmMapInput` via: // // DataConnectorOfficeIrmMap{ "key": DataConnectorOfficeIrmArgs{...} } type DataConnectorOfficeIrmMapInput interface { pulumi.Input ToDataConnectorOfficeIrmMapOutput() DataConnectorOfficeIrmMapOutput ToDataConnectorOfficeIrmMapOutputWithContext(context.Context) DataConnectorOfficeIrmMapOutput } type DataConnectorOfficeIrmMap map[string]DataConnectorOfficeIrmInput func (DataConnectorOfficeIrmMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorOfficeIrm)(nil)).Elem() } func (i DataConnectorOfficeIrmMap) ToDataConnectorOfficeIrmMapOutput() DataConnectorOfficeIrmMapOutput { return i.ToDataConnectorOfficeIrmMapOutputWithContext(context.Background()) } func (i DataConnectorOfficeIrmMap) ToDataConnectorOfficeIrmMapOutputWithContext(ctx context.Context) DataConnectorOfficeIrmMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorOfficeIrmMapOutput) } type DataConnectorOfficeIrmOutput struct{ *pulumi.OutputState } func (DataConnectorOfficeIrmOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorOfficeIrm)(nil)).Elem() } func (o DataConnectorOfficeIrmOutput) ToDataConnectorOfficeIrmOutput() DataConnectorOfficeIrmOutput { return o } func (o DataConnectorOfficeIrmOutput) ToDataConnectorOfficeIrmOutputWithContext(ctx context.Context) DataConnectorOfficeIrmOutput { return o } // The ID of the Log Analytics Workspace that this Office IRM Data Connector resides in. Changing this forces a new Office IRM Data Connector to be created. func (o DataConnectorOfficeIrmOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorOfficeIrm) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Office IRM Data Connector. Changing this forces a new Office IRM Data Connector to be created. func (o DataConnectorOfficeIrmOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorOfficeIrm) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the tenant that this Office IRM Data Connector connects to. Changing this forces a new Office IRM Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. func (o DataConnectorOfficeIrmOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorOfficeIrm) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type DataConnectorOfficeIrmArrayOutput struct{ *pulumi.OutputState } func (DataConnectorOfficeIrmArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorOfficeIrm)(nil)).Elem() } func (o DataConnectorOfficeIrmArrayOutput) ToDataConnectorOfficeIrmArrayOutput() DataConnectorOfficeIrmArrayOutput { return o } func (o DataConnectorOfficeIrmArrayOutput) ToDataConnectorOfficeIrmArrayOutputWithContext(ctx context.Context) DataConnectorOfficeIrmArrayOutput { return o } func (o DataConnectorOfficeIrmArrayOutput) Index(i pulumi.IntInput) DataConnectorOfficeIrmOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorOfficeIrm { return vs[0].([]*DataConnectorOfficeIrm)[vs[1].(int)] }).(DataConnectorOfficeIrmOutput) } type DataConnectorOfficeIrmMapOutput struct{ *pulumi.OutputState } func (DataConnectorOfficeIrmMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorOfficeIrm)(nil)).Elem() } func (o DataConnectorOfficeIrmMapOutput) ToDataConnectorOfficeIrmMapOutput() DataConnectorOfficeIrmMapOutput { return o } func (o DataConnectorOfficeIrmMapOutput) ToDataConnectorOfficeIrmMapOutputWithContext(ctx context.Context) DataConnectorOfficeIrmMapOutput { return o } func (o DataConnectorOfficeIrmMapOutput) MapIndex(k pulumi.StringInput) DataConnectorOfficeIrmOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorOfficeIrm { return vs[0].(map[string]*DataConnectorOfficeIrm)[vs[1].(string)] }).(DataConnectorOfficeIrmOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorOfficeIrmInput)(nil)).Elem(), &DataConnectorOfficeIrm{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorOfficeIrmArrayInput)(nil)).Elem(), DataConnectorOfficeIrmArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorOfficeIrmMapInput)(nil)).Elem(), DataConnectorOfficeIrmMap{}) pulumi.RegisterOutputType(DataConnectorOfficeIrmOutput{}) pulumi.RegisterOutputType(DataConnectorOfficeIrmArrayOutput{}) pulumi.RegisterOutputType(DataConnectorOfficeIrmMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/automationRule.go
sdk/go/azure/sentinel/automationRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Sentinel Automation Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("west europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewAutomationRule(ctx, "example", &sentinel.AutomationRuleArgs{ // Name: pulumi.String("56094f72-ac3f-40e7-a0c0-47bd95f70336"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // DisplayName: pulumi.String("automation_rule1"), // Order: pulumi.Int(1), // ActionIncidents: sentinel.AutomationRuleActionIncidentArray{ // &sentinel.AutomationRuleActionIncidentArgs{ // Order: pulumi.Int(1), // Status: pulumi.String("Active"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.OperationalInsights` - 2024-09-01 // // ## Import // // Sentinel Automation Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/automationRule:AutomationRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/automationRules/rule1 // ``` type AutomationRule struct { pulumi.CustomResourceState // One or more `actionIncidentTask` blocks as defined below. ActionIncidentTasks AutomationRuleActionIncidentTaskArrayOutput `pulumi:"actionIncidentTasks"` // One or more `actionIncident` blocks as defined below. ActionIncidents AutomationRuleActionIncidentArrayOutput `pulumi:"actionIncidents"` // One or more `actionPlaybook` blocks as defined below. // // > **Note:** Either one `actionIncident` block or `actionPlaybook` block has to be specified. ActionPlaybooks AutomationRuleActionPlaybookArrayOutput `pulumi:"actionPlaybooks"` // A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic). ConditionJson pulumi.StringPtrOutput `pulumi:"conditionJson"` // The display name which should be used for this Sentinel Automation Rule. DisplayName pulumi.StringOutput `pulumi:"displayName"` // Whether this Sentinel Automation Rule is enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled. Expiration pulumi.StringPtrOutput `pulumi:"expiration"` // The ID of the Log Analytics Workspace where this Sentinel applies to. Changing this forces a new Sentinel Automation Rule to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The UUID which should be used for this Sentinel Automation Rule. Changing this forces a new Sentinel Automation Rule to be created. Name pulumi.StringOutput `pulumi:"name"` // The order of this Sentinel Automation Rule. Possible values varies between `1` and `1000`. Order pulumi.IntOutput `pulumi:"order"` // Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. TriggersOn pulumi.StringPtrOutput `pulumi:"triggersOn"` // Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. TriggersWhen pulumi.StringPtrOutput `pulumi:"triggersWhen"` } // NewAutomationRule registers a new resource with the given unique name, arguments, and options. func NewAutomationRule(ctx *pulumi.Context, name string, args *AutomationRuleArgs, opts ...pulumi.ResourceOption) (*AutomationRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } if args.Order == nil { return nil, errors.New("invalid value for required argument 'Order'") } aliases := pulumi.Aliases([]pulumi.Alias{ { Type: pulumi.String("azure:sentinel/authomationRule:AuthomationRule"), }, }) opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource AutomationRule err := ctx.RegisterResource("azure:sentinel/automationRule:AutomationRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAutomationRule gets an existing AutomationRule resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetAutomationRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AutomationRuleState, opts ...pulumi.ResourceOption) (*AutomationRule, error) { var resource AutomationRule err := ctx.ReadResource("azure:sentinel/automationRule:AutomationRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AutomationRule resources. type automationRuleState struct { // One or more `actionIncidentTask` blocks as defined below. ActionIncidentTasks []AutomationRuleActionIncidentTask `pulumi:"actionIncidentTasks"` // One or more `actionIncident` blocks as defined below. ActionIncidents []AutomationRuleActionIncident `pulumi:"actionIncidents"` // One or more `actionPlaybook` blocks as defined below. // // > **Note:** Either one `actionIncident` block or `actionPlaybook` block has to be specified. ActionPlaybooks []AutomationRuleActionPlaybook `pulumi:"actionPlaybooks"` // A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic). ConditionJson *string `pulumi:"conditionJson"` // The display name which should be used for this Sentinel Automation Rule. DisplayName *string `pulumi:"displayName"` // Whether this Sentinel Automation Rule is enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled. Expiration *string `pulumi:"expiration"` // The ID of the Log Analytics Workspace where this Sentinel applies to. Changing this forces a new Sentinel Automation Rule to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The UUID which should be used for this Sentinel Automation Rule. Changing this forces a new Sentinel Automation Rule to be created. Name *string `pulumi:"name"` // The order of this Sentinel Automation Rule. Possible values varies between `1` and `1000`. Order *int `pulumi:"order"` // Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. TriggersOn *string `pulumi:"triggersOn"` // Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. TriggersWhen *string `pulumi:"triggersWhen"` } type AutomationRuleState struct { // One or more `actionIncidentTask` blocks as defined below. ActionIncidentTasks AutomationRuleActionIncidentTaskArrayInput // One or more `actionIncident` blocks as defined below. ActionIncidents AutomationRuleActionIncidentArrayInput // One or more `actionPlaybook` blocks as defined below. // // > **Note:** Either one `actionIncident` block or `actionPlaybook` block has to be specified. ActionPlaybooks AutomationRuleActionPlaybookArrayInput // A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic). ConditionJson pulumi.StringPtrInput // The display name which should be used for this Sentinel Automation Rule. DisplayName pulumi.StringPtrInput // Whether this Sentinel Automation Rule is enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled. Expiration pulumi.StringPtrInput // The ID of the Log Analytics Workspace where this Sentinel applies to. Changing this forces a new Sentinel Automation Rule to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The UUID which should be used for this Sentinel Automation Rule. Changing this forces a new Sentinel Automation Rule to be created. Name pulumi.StringPtrInput // The order of this Sentinel Automation Rule. Possible values varies between `1` and `1000`. Order pulumi.IntPtrInput // Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. TriggersOn pulumi.StringPtrInput // Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. TriggersWhen pulumi.StringPtrInput } func (AutomationRuleState) ElementType() reflect.Type { return reflect.TypeOf((*automationRuleState)(nil)).Elem() } type automationRuleArgs struct { // One or more `actionIncidentTask` blocks as defined below. ActionIncidentTasks []AutomationRuleActionIncidentTask `pulumi:"actionIncidentTasks"` // One or more `actionIncident` blocks as defined below. ActionIncidents []AutomationRuleActionIncident `pulumi:"actionIncidents"` // One or more `actionPlaybook` blocks as defined below. // // > **Note:** Either one `actionIncident` block or `actionPlaybook` block has to be specified. ActionPlaybooks []AutomationRuleActionPlaybook `pulumi:"actionPlaybooks"` // A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic). ConditionJson *string `pulumi:"conditionJson"` // The display name which should be used for this Sentinel Automation Rule. DisplayName string `pulumi:"displayName"` // Whether this Sentinel Automation Rule is enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled. Expiration *string `pulumi:"expiration"` // The ID of the Log Analytics Workspace where this Sentinel applies to. Changing this forces a new Sentinel Automation Rule to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The UUID which should be used for this Sentinel Automation Rule. Changing this forces a new Sentinel Automation Rule to be created. Name *string `pulumi:"name"` // The order of this Sentinel Automation Rule. Possible values varies between `1` and `1000`. Order int `pulumi:"order"` // Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. TriggersOn *string `pulumi:"triggersOn"` // Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. TriggersWhen *string `pulumi:"triggersWhen"` } // The set of arguments for constructing a AutomationRule resource. type AutomationRuleArgs struct { // One or more `actionIncidentTask` blocks as defined below. ActionIncidentTasks AutomationRuleActionIncidentTaskArrayInput // One or more `actionIncident` blocks as defined below. ActionIncidents AutomationRuleActionIncidentArrayInput // One or more `actionPlaybook` blocks as defined below. // // > **Note:** Either one `actionIncident` block or `actionPlaybook` block has to be specified. ActionPlaybooks AutomationRuleActionPlaybookArrayInput // A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic). ConditionJson pulumi.StringPtrInput // The display name which should be used for this Sentinel Automation Rule. DisplayName pulumi.StringInput // Whether this Sentinel Automation Rule is enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled. Expiration pulumi.StringPtrInput // The ID of the Log Analytics Workspace where this Sentinel applies to. Changing this forces a new Sentinel Automation Rule to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The UUID which should be used for this Sentinel Automation Rule. Changing this forces a new Sentinel Automation Rule to be created. Name pulumi.StringPtrInput // The order of this Sentinel Automation Rule. Possible values varies between `1` and `1000`. Order pulumi.IntInput // Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. TriggersOn pulumi.StringPtrInput // Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. TriggersWhen pulumi.StringPtrInput } func (AutomationRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*automationRuleArgs)(nil)).Elem() } type AutomationRuleInput interface { pulumi.Input ToAutomationRuleOutput() AutomationRuleOutput ToAutomationRuleOutputWithContext(ctx context.Context) AutomationRuleOutput } func (*AutomationRule) ElementType() reflect.Type { return reflect.TypeOf((**AutomationRule)(nil)).Elem() } func (i *AutomationRule) ToAutomationRuleOutput() AutomationRuleOutput { return i.ToAutomationRuleOutputWithContext(context.Background()) } func (i *AutomationRule) ToAutomationRuleOutputWithContext(ctx context.Context) AutomationRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(AutomationRuleOutput) } // AutomationRuleArrayInput is an input type that accepts AutomationRuleArray and AutomationRuleArrayOutput values. // You can construct a concrete instance of `AutomationRuleArrayInput` via: // // AutomationRuleArray{ AutomationRuleArgs{...} } type AutomationRuleArrayInput interface { pulumi.Input ToAutomationRuleArrayOutput() AutomationRuleArrayOutput ToAutomationRuleArrayOutputWithContext(context.Context) AutomationRuleArrayOutput } type AutomationRuleArray []AutomationRuleInput func (AutomationRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AutomationRule)(nil)).Elem() } func (i AutomationRuleArray) ToAutomationRuleArrayOutput() AutomationRuleArrayOutput { return i.ToAutomationRuleArrayOutputWithContext(context.Background()) } func (i AutomationRuleArray) ToAutomationRuleArrayOutputWithContext(ctx context.Context) AutomationRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AutomationRuleArrayOutput) } // AutomationRuleMapInput is an input type that accepts AutomationRuleMap and AutomationRuleMapOutput values. // You can construct a concrete instance of `AutomationRuleMapInput` via: // // AutomationRuleMap{ "key": AutomationRuleArgs{...} } type AutomationRuleMapInput interface { pulumi.Input ToAutomationRuleMapOutput() AutomationRuleMapOutput ToAutomationRuleMapOutputWithContext(context.Context) AutomationRuleMapOutput } type AutomationRuleMap map[string]AutomationRuleInput func (AutomationRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AutomationRule)(nil)).Elem() } func (i AutomationRuleMap) ToAutomationRuleMapOutput() AutomationRuleMapOutput { return i.ToAutomationRuleMapOutputWithContext(context.Background()) } func (i AutomationRuleMap) ToAutomationRuleMapOutputWithContext(ctx context.Context) AutomationRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AutomationRuleMapOutput) } type AutomationRuleOutput struct{ *pulumi.OutputState } func (AutomationRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**AutomationRule)(nil)).Elem() } func (o AutomationRuleOutput) ToAutomationRuleOutput() AutomationRuleOutput { return o } func (o AutomationRuleOutput) ToAutomationRuleOutputWithContext(ctx context.Context) AutomationRuleOutput { return o } // One or more `actionIncidentTask` blocks as defined below. func (o AutomationRuleOutput) ActionIncidentTasks() AutomationRuleActionIncidentTaskArrayOutput { return o.ApplyT(func(v *AutomationRule) AutomationRuleActionIncidentTaskArrayOutput { return v.ActionIncidentTasks }).(AutomationRuleActionIncidentTaskArrayOutput) } // One or more `actionIncident` blocks as defined below. func (o AutomationRuleOutput) ActionIncidents() AutomationRuleActionIncidentArrayOutput { return o.ApplyT(func(v *AutomationRule) AutomationRuleActionIncidentArrayOutput { return v.ActionIncidents }).(AutomationRuleActionIncidentArrayOutput) } // One or more `actionPlaybook` blocks as defined below. // // > **Note:** Either one `actionIncident` block or `actionPlaybook` block has to be specified. func (o AutomationRuleOutput) ActionPlaybooks() AutomationRuleActionPlaybookArrayOutput { return o.ApplyT(func(v *AutomationRule) AutomationRuleActionPlaybookArrayOutput { return v.ActionPlaybooks }).(AutomationRuleActionPlaybookArrayOutput) } // A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic). func (o AutomationRuleOutput) ConditionJson() pulumi.StringPtrOutput { return o.ApplyT(func(v *AutomationRule) pulumi.StringPtrOutput { return v.ConditionJson }).(pulumi.StringPtrOutput) } // The display name which should be used for this Sentinel Automation Rule. func (o AutomationRuleOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *AutomationRule) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // Whether this Sentinel Automation Rule is enabled? Defaults to `true`. func (o AutomationRuleOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AutomationRule) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled. func (o AutomationRuleOutput) Expiration() pulumi.StringPtrOutput { return o.ApplyT(func(v *AutomationRule) pulumi.StringPtrOutput { return v.Expiration }).(pulumi.StringPtrOutput) } // The ID of the Log Analytics Workspace where this Sentinel applies to. Changing this forces a new Sentinel Automation Rule to be created. func (o AutomationRuleOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *AutomationRule) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The UUID which should be used for this Sentinel Automation Rule. Changing this forces a new Sentinel Automation Rule to be created. func (o AutomationRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AutomationRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The order of this Sentinel Automation Rule. Possible values varies between `1` and `1000`. func (o AutomationRuleOutput) Order() pulumi.IntOutput { return o.ApplyT(func(v *AutomationRule) pulumi.IntOutput { return v.Order }).(pulumi.IntOutput) } // Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. func (o AutomationRuleOutput) TriggersOn() pulumi.StringPtrOutput { return o.ApplyT(func(v *AutomationRule) pulumi.StringPtrOutput { return v.TriggersOn }).(pulumi.StringPtrOutput) } // Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. func (o AutomationRuleOutput) TriggersWhen() pulumi.StringPtrOutput { return o.ApplyT(func(v *AutomationRule) pulumi.StringPtrOutput { return v.TriggersWhen }).(pulumi.StringPtrOutput) } type AutomationRuleArrayOutput struct{ *pulumi.OutputState } func (AutomationRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AutomationRule)(nil)).Elem() } func (o AutomationRuleArrayOutput) ToAutomationRuleArrayOutput() AutomationRuleArrayOutput { return o } func (o AutomationRuleArrayOutput) ToAutomationRuleArrayOutputWithContext(ctx context.Context) AutomationRuleArrayOutput { return o } func (o AutomationRuleArrayOutput) Index(i pulumi.IntInput) AutomationRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AutomationRule { return vs[0].([]*AutomationRule)[vs[1].(int)] }).(AutomationRuleOutput) } type AutomationRuleMapOutput struct{ *pulumi.OutputState } func (AutomationRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AutomationRule)(nil)).Elem() } func (o AutomationRuleMapOutput) ToAutomationRuleMapOutput() AutomationRuleMapOutput { return o } func (o AutomationRuleMapOutput) ToAutomationRuleMapOutputWithContext(ctx context.Context) AutomationRuleMapOutput { return o } func (o AutomationRuleMapOutput) MapIndex(k pulumi.StringInput) AutomationRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AutomationRule { return vs[0].(map[string]*AutomationRule)[vs[1].(string)] }).(AutomationRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AutomationRuleInput)(nil)).Elem(), &AutomationRule{}) pulumi.RegisterInputType(reflect.TypeOf((*AutomationRuleArrayInput)(nil)).Elem(), AutomationRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AutomationRuleMapInput)(nil)).Elem(), AutomationRuleMap{}) pulumi.RegisterOutputType(AutomationRuleOutput{}) pulumi.RegisterOutputType(AutomationRuleArrayOutput{}) pulumi.RegisterOutputType(AutomationRuleMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/threatIntelligenceIndicator.go
sdk/go/azure/sentinel/threatIntelligenceIndicator.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Sentinel Threat Intelligence Indicator. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("east us"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-law"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // RetentionInDays: pulumi.Int(30), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewThreatIntelligenceIndicator(ctx, "example", &sentinel.ThreatIntelligenceIndicatorArgs{ // WorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // PatternType: pulumi.String("domain-name"), // Pattern: pulumi.String("http://example.com"), // Source: pulumi.String("Microsoft Sentinel"), // ValidateFromUtc: pulumi.String("2022-12-14T16:00:00Z"), // DisplayName: pulumi.String("example-indicator"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Sentinel Threat Intelligence Indicators can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/threatIntelligenceIndicator:ThreatIntelligenceIndicator example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/threatIntelligence/main/indicators/indicator1 // ``` type ThreatIntelligenceIndicator struct { pulumi.CustomResourceState // Confidence levels of the Threat Intelligence Indicator. Confidence pulumi.IntPtrOutput `pulumi:"confidence"` // The creator of the Threat Intelligence Indicator. CreatedBy pulumi.StringPtrOutput `pulumi:"createdBy"` // The date of this Threat Intelligence Indicator created. CreatedOn pulumi.StringOutput `pulumi:"createdOn"` // Whether the Threat Intelligence entity is defanged? Defanged pulumi.BoolOutput `pulumi:"defanged"` // The description of the Threat Intelligence Indicator. Description pulumi.StringPtrOutput `pulumi:"description"` // The display name of the Threat Intelligence Indicator. DisplayName pulumi.StringOutput `pulumi:"displayName"` // The extension config of the Threat Intelligence Indicator in JSON format. Extension pulumi.StringOutput `pulumi:"extension"` // The external ID of the Threat Intelligence Indicator. ExternalId pulumi.StringOutput `pulumi:"externalId"` // the External last updated time in UTC. ExternalLastUpdatedTimeUtc pulumi.StringOutput `pulumi:"externalLastUpdatedTimeUtc"` // One or more `externalReference` blocks as defined below. ExternalReferences ThreatIntelligenceIndicatorExternalReferenceArrayOutput `pulumi:"externalReferences"` // One or more `granularMarking` blocks as defined below. GranularMarkings ThreatIntelligenceIndicatorGranularMarkingArrayOutput `pulumi:"granularMarkings"` // The guid of this Sentinel Threat Intelligence Indicator. Guid pulumi.StringOutput `pulumi:"guid"` // A list of indicator types of this Threat Intelligence Indicator. IndicatorTypes pulumi.StringArrayOutput `pulumi:"indicatorTypes"` // One or more `killChainPhase` blocks as defined below. KillChainPhases ThreatIntelligenceIndicatorKillChainPhaseArrayOutput `pulumi:"killChainPhases"` // The language of the Threat Intelligence Indicator. Language pulumi.StringPtrOutput `pulumi:"language"` // The last updated time of the Threat Intelligence Indicator in UTC. LastUpdatedTimeUtc pulumi.StringOutput `pulumi:"lastUpdatedTimeUtc"` // Specifies a list of Threat Intelligence marking references. ObjectMarkingRefs pulumi.StringArrayOutput `pulumi:"objectMarkingRefs"` // A `parsedPattern` block as defined below. ParsedPatterns ThreatIntelligenceIndicatorParsedPatternArrayOutput `pulumi:"parsedPatterns"` // The pattern used by the Threat Intelligence Indicator. When `patternType` set to `file`, `pattern` must be specified with `<HashName>:<Value>` format, such as `MD5:78ecc5c05cd8b79af480df2f8fba0b9d`. Pattern pulumi.StringOutput `pulumi:"pattern"` // The type of pattern used by the Threat Intelligence Indicator. Possible values are `domain-name`, `file`, `ipv4-addr`, `ipv6-addr` and `url`. PatternType pulumi.StringOutput `pulumi:"patternType"` // The version of a Threat Intelligence entity. PatternVersion pulumi.StringPtrOutput `pulumi:"patternVersion"` // Whether the Threat Intelligence entity revoked. Revoked pulumi.BoolPtrOutput `pulumi:"revoked"` // Source of the Threat Intelligence Indicator. Changing this forces a new resource to be created. Source pulumi.StringOutput `pulumi:"source"` // Specifies a list of tags of the Threat Intelligence Indicator. Tags pulumi.StringArrayOutput `pulumi:"tags"` // Specifies a list of threat types of this Threat Intelligence Indicator. ThreatTypes pulumi.StringArrayOutput `pulumi:"threatTypes"` // The start of validate date in RFC3339. ValidateFromUtc pulumi.StringOutput `pulumi:"validateFromUtc"` // The end of validate date of the Threat Intelligence Indicator in RFC3339 format. ValidateUntilUtc pulumi.StringPtrOutput `pulumi:"validateUntilUtc"` // The ID of the Log Analytics Workspace. Changing this forces a new Sentinel Threat Intelligence Indicator to be created. WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"` } // NewThreatIntelligenceIndicator registers a new resource with the given unique name, arguments, and options. func NewThreatIntelligenceIndicator(ctx *pulumi.Context, name string, args *ThreatIntelligenceIndicatorArgs, opts ...pulumi.ResourceOption) (*ThreatIntelligenceIndicator, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } if args.Pattern == nil { return nil, errors.New("invalid value for required argument 'Pattern'") } if args.PatternType == nil { return nil, errors.New("invalid value for required argument 'PatternType'") } if args.Source == nil { return nil, errors.New("invalid value for required argument 'Source'") } if args.ValidateFromUtc == nil { return nil, errors.New("invalid value for required argument 'ValidateFromUtc'") } if args.WorkspaceId == nil { return nil, errors.New("invalid value for required argument 'WorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ThreatIntelligenceIndicator err := ctx.RegisterResource("azure:sentinel/threatIntelligenceIndicator:ThreatIntelligenceIndicator", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetThreatIntelligenceIndicator gets an existing ThreatIntelligenceIndicator resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetThreatIntelligenceIndicator(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ThreatIntelligenceIndicatorState, opts ...pulumi.ResourceOption) (*ThreatIntelligenceIndicator, error) { var resource ThreatIntelligenceIndicator err := ctx.ReadResource("azure:sentinel/threatIntelligenceIndicator:ThreatIntelligenceIndicator", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ThreatIntelligenceIndicator resources. type threatIntelligenceIndicatorState struct { // Confidence levels of the Threat Intelligence Indicator. Confidence *int `pulumi:"confidence"` // The creator of the Threat Intelligence Indicator. CreatedBy *string `pulumi:"createdBy"` // The date of this Threat Intelligence Indicator created. CreatedOn *string `pulumi:"createdOn"` // Whether the Threat Intelligence entity is defanged? Defanged *bool `pulumi:"defanged"` // The description of the Threat Intelligence Indicator. Description *string `pulumi:"description"` // The display name of the Threat Intelligence Indicator. DisplayName *string `pulumi:"displayName"` // The extension config of the Threat Intelligence Indicator in JSON format. Extension *string `pulumi:"extension"` // The external ID of the Threat Intelligence Indicator. ExternalId *string `pulumi:"externalId"` // the External last updated time in UTC. ExternalLastUpdatedTimeUtc *string `pulumi:"externalLastUpdatedTimeUtc"` // One or more `externalReference` blocks as defined below. ExternalReferences []ThreatIntelligenceIndicatorExternalReference `pulumi:"externalReferences"` // One or more `granularMarking` blocks as defined below. GranularMarkings []ThreatIntelligenceIndicatorGranularMarking `pulumi:"granularMarkings"` // The guid of this Sentinel Threat Intelligence Indicator. Guid *string `pulumi:"guid"` // A list of indicator types of this Threat Intelligence Indicator. IndicatorTypes []string `pulumi:"indicatorTypes"` // One or more `killChainPhase` blocks as defined below. KillChainPhases []ThreatIntelligenceIndicatorKillChainPhase `pulumi:"killChainPhases"` // The language of the Threat Intelligence Indicator. Language *string `pulumi:"language"` // The last updated time of the Threat Intelligence Indicator in UTC. LastUpdatedTimeUtc *string `pulumi:"lastUpdatedTimeUtc"` // Specifies a list of Threat Intelligence marking references. ObjectMarkingRefs []string `pulumi:"objectMarkingRefs"` // A `parsedPattern` block as defined below. ParsedPatterns []ThreatIntelligenceIndicatorParsedPattern `pulumi:"parsedPatterns"` // The pattern used by the Threat Intelligence Indicator. When `patternType` set to `file`, `pattern` must be specified with `<HashName>:<Value>` format, such as `MD5:78ecc5c05cd8b79af480df2f8fba0b9d`. Pattern *string `pulumi:"pattern"` // The type of pattern used by the Threat Intelligence Indicator. Possible values are `domain-name`, `file`, `ipv4-addr`, `ipv6-addr` and `url`. PatternType *string `pulumi:"patternType"` // The version of a Threat Intelligence entity. PatternVersion *string `pulumi:"patternVersion"` // Whether the Threat Intelligence entity revoked. Revoked *bool `pulumi:"revoked"` // Source of the Threat Intelligence Indicator. Changing this forces a new resource to be created. Source *string `pulumi:"source"` // Specifies a list of tags of the Threat Intelligence Indicator. Tags []string `pulumi:"tags"` // Specifies a list of threat types of this Threat Intelligence Indicator. ThreatTypes []string `pulumi:"threatTypes"` // The start of validate date in RFC3339. ValidateFromUtc *string `pulumi:"validateFromUtc"` // The end of validate date of the Threat Intelligence Indicator in RFC3339 format. ValidateUntilUtc *string `pulumi:"validateUntilUtc"` // The ID of the Log Analytics Workspace. Changing this forces a new Sentinel Threat Intelligence Indicator to be created. WorkspaceId *string `pulumi:"workspaceId"` } type ThreatIntelligenceIndicatorState struct { // Confidence levels of the Threat Intelligence Indicator. Confidence pulumi.IntPtrInput // The creator of the Threat Intelligence Indicator. CreatedBy pulumi.StringPtrInput // The date of this Threat Intelligence Indicator created. CreatedOn pulumi.StringPtrInput // Whether the Threat Intelligence entity is defanged? Defanged pulumi.BoolPtrInput // The description of the Threat Intelligence Indicator. Description pulumi.StringPtrInput // The display name of the Threat Intelligence Indicator. DisplayName pulumi.StringPtrInput // The extension config of the Threat Intelligence Indicator in JSON format. Extension pulumi.StringPtrInput // The external ID of the Threat Intelligence Indicator. ExternalId pulumi.StringPtrInput // the External last updated time in UTC. ExternalLastUpdatedTimeUtc pulumi.StringPtrInput // One or more `externalReference` blocks as defined below. ExternalReferences ThreatIntelligenceIndicatorExternalReferenceArrayInput // One or more `granularMarking` blocks as defined below. GranularMarkings ThreatIntelligenceIndicatorGranularMarkingArrayInput // The guid of this Sentinel Threat Intelligence Indicator. Guid pulumi.StringPtrInput // A list of indicator types of this Threat Intelligence Indicator. IndicatorTypes pulumi.StringArrayInput // One or more `killChainPhase` blocks as defined below. KillChainPhases ThreatIntelligenceIndicatorKillChainPhaseArrayInput // The language of the Threat Intelligence Indicator. Language pulumi.StringPtrInput // The last updated time of the Threat Intelligence Indicator in UTC. LastUpdatedTimeUtc pulumi.StringPtrInput // Specifies a list of Threat Intelligence marking references. ObjectMarkingRefs pulumi.StringArrayInput // A `parsedPattern` block as defined below. ParsedPatterns ThreatIntelligenceIndicatorParsedPatternArrayInput // The pattern used by the Threat Intelligence Indicator. When `patternType` set to `file`, `pattern` must be specified with `<HashName>:<Value>` format, such as `MD5:78ecc5c05cd8b79af480df2f8fba0b9d`. Pattern pulumi.StringPtrInput // The type of pattern used by the Threat Intelligence Indicator. Possible values are `domain-name`, `file`, `ipv4-addr`, `ipv6-addr` and `url`. PatternType pulumi.StringPtrInput // The version of a Threat Intelligence entity. PatternVersion pulumi.StringPtrInput // Whether the Threat Intelligence entity revoked. Revoked pulumi.BoolPtrInput // Source of the Threat Intelligence Indicator. Changing this forces a new resource to be created. Source pulumi.StringPtrInput // Specifies a list of tags of the Threat Intelligence Indicator. Tags pulumi.StringArrayInput // Specifies a list of threat types of this Threat Intelligence Indicator. ThreatTypes pulumi.StringArrayInput // The start of validate date in RFC3339. ValidateFromUtc pulumi.StringPtrInput // The end of validate date of the Threat Intelligence Indicator in RFC3339 format. ValidateUntilUtc pulumi.StringPtrInput // The ID of the Log Analytics Workspace. Changing this forces a new Sentinel Threat Intelligence Indicator to be created. WorkspaceId pulumi.StringPtrInput } func (ThreatIntelligenceIndicatorState) ElementType() reflect.Type { return reflect.TypeOf((*threatIntelligenceIndicatorState)(nil)).Elem() } type threatIntelligenceIndicatorArgs struct { // Confidence levels of the Threat Intelligence Indicator. Confidence *int `pulumi:"confidence"` // The creator of the Threat Intelligence Indicator. CreatedBy *string `pulumi:"createdBy"` // The description of the Threat Intelligence Indicator. Description *string `pulumi:"description"` // The display name of the Threat Intelligence Indicator. DisplayName string `pulumi:"displayName"` // The extension config of the Threat Intelligence Indicator in JSON format. Extension *string `pulumi:"extension"` // One or more `externalReference` blocks as defined below. ExternalReferences []ThreatIntelligenceIndicatorExternalReference `pulumi:"externalReferences"` // One or more `granularMarking` blocks as defined below. GranularMarkings []ThreatIntelligenceIndicatorGranularMarking `pulumi:"granularMarkings"` // One or more `killChainPhase` blocks as defined below. KillChainPhases []ThreatIntelligenceIndicatorKillChainPhase `pulumi:"killChainPhases"` // The language of the Threat Intelligence Indicator. Language *string `pulumi:"language"` // Specifies a list of Threat Intelligence marking references. ObjectMarkingRefs []string `pulumi:"objectMarkingRefs"` // The pattern used by the Threat Intelligence Indicator. When `patternType` set to `file`, `pattern` must be specified with `<HashName>:<Value>` format, such as `MD5:78ecc5c05cd8b79af480df2f8fba0b9d`. Pattern string `pulumi:"pattern"` // The type of pattern used by the Threat Intelligence Indicator. Possible values are `domain-name`, `file`, `ipv4-addr`, `ipv6-addr` and `url`. PatternType string `pulumi:"patternType"` // The version of a Threat Intelligence entity. PatternVersion *string `pulumi:"patternVersion"` // Whether the Threat Intelligence entity revoked. Revoked *bool `pulumi:"revoked"` // Source of the Threat Intelligence Indicator. Changing this forces a new resource to be created. Source string `pulumi:"source"` // Specifies a list of tags of the Threat Intelligence Indicator. Tags []string `pulumi:"tags"` // Specifies a list of threat types of this Threat Intelligence Indicator. ThreatTypes []string `pulumi:"threatTypes"` // The start of validate date in RFC3339. ValidateFromUtc string `pulumi:"validateFromUtc"` // The end of validate date of the Threat Intelligence Indicator in RFC3339 format. ValidateUntilUtc *string `pulumi:"validateUntilUtc"` // The ID of the Log Analytics Workspace. Changing this forces a new Sentinel Threat Intelligence Indicator to be created. WorkspaceId string `pulumi:"workspaceId"` } // The set of arguments for constructing a ThreatIntelligenceIndicator resource. type ThreatIntelligenceIndicatorArgs struct { // Confidence levels of the Threat Intelligence Indicator. Confidence pulumi.IntPtrInput // The creator of the Threat Intelligence Indicator. CreatedBy pulumi.StringPtrInput // The description of the Threat Intelligence Indicator. Description pulumi.StringPtrInput // The display name of the Threat Intelligence Indicator. DisplayName pulumi.StringInput // The extension config of the Threat Intelligence Indicator in JSON format. Extension pulumi.StringPtrInput // One or more `externalReference` blocks as defined below. ExternalReferences ThreatIntelligenceIndicatorExternalReferenceArrayInput // One or more `granularMarking` blocks as defined below. GranularMarkings ThreatIntelligenceIndicatorGranularMarkingArrayInput // One or more `killChainPhase` blocks as defined below. KillChainPhases ThreatIntelligenceIndicatorKillChainPhaseArrayInput // The language of the Threat Intelligence Indicator. Language pulumi.StringPtrInput // Specifies a list of Threat Intelligence marking references. ObjectMarkingRefs pulumi.StringArrayInput // The pattern used by the Threat Intelligence Indicator. When `patternType` set to `file`, `pattern` must be specified with `<HashName>:<Value>` format, such as `MD5:78ecc5c05cd8b79af480df2f8fba0b9d`. Pattern pulumi.StringInput // The type of pattern used by the Threat Intelligence Indicator. Possible values are `domain-name`, `file`, `ipv4-addr`, `ipv6-addr` and `url`. PatternType pulumi.StringInput // The version of a Threat Intelligence entity. PatternVersion pulumi.StringPtrInput // Whether the Threat Intelligence entity revoked. Revoked pulumi.BoolPtrInput // Source of the Threat Intelligence Indicator. Changing this forces a new resource to be created. Source pulumi.StringInput // Specifies a list of tags of the Threat Intelligence Indicator. Tags pulumi.StringArrayInput // Specifies a list of threat types of this Threat Intelligence Indicator. ThreatTypes pulumi.StringArrayInput // The start of validate date in RFC3339. ValidateFromUtc pulumi.StringInput // The end of validate date of the Threat Intelligence Indicator in RFC3339 format. ValidateUntilUtc pulumi.StringPtrInput // The ID of the Log Analytics Workspace. Changing this forces a new Sentinel Threat Intelligence Indicator to be created. WorkspaceId pulumi.StringInput } func (ThreatIntelligenceIndicatorArgs) ElementType() reflect.Type { return reflect.TypeOf((*threatIntelligenceIndicatorArgs)(nil)).Elem() } type ThreatIntelligenceIndicatorInput interface { pulumi.Input ToThreatIntelligenceIndicatorOutput() ThreatIntelligenceIndicatorOutput ToThreatIntelligenceIndicatorOutputWithContext(ctx context.Context) ThreatIntelligenceIndicatorOutput } func (*ThreatIntelligenceIndicator) ElementType() reflect.Type { return reflect.TypeOf((**ThreatIntelligenceIndicator)(nil)).Elem() } func (i *ThreatIntelligenceIndicator) ToThreatIntelligenceIndicatorOutput() ThreatIntelligenceIndicatorOutput { return i.ToThreatIntelligenceIndicatorOutputWithContext(context.Background()) } func (i *ThreatIntelligenceIndicator) ToThreatIntelligenceIndicatorOutputWithContext(ctx context.Context) ThreatIntelligenceIndicatorOutput { return pulumi.ToOutputWithContext(ctx, i).(ThreatIntelligenceIndicatorOutput) } // ThreatIntelligenceIndicatorArrayInput is an input type that accepts ThreatIntelligenceIndicatorArray and ThreatIntelligenceIndicatorArrayOutput values. // You can construct a concrete instance of `ThreatIntelligenceIndicatorArrayInput` via: // // ThreatIntelligenceIndicatorArray{ ThreatIntelligenceIndicatorArgs{...} } type ThreatIntelligenceIndicatorArrayInput interface { pulumi.Input ToThreatIntelligenceIndicatorArrayOutput() ThreatIntelligenceIndicatorArrayOutput ToThreatIntelligenceIndicatorArrayOutputWithContext(context.Context) ThreatIntelligenceIndicatorArrayOutput } type ThreatIntelligenceIndicatorArray []ThreatIntelligenceIndicatorInput func (ThreatIntelligenceIndicatorArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ThreatIntelligenceIndicator)(nil)).Elem() } func (i ThreatIntelligenceIndicatorArray) ToThreatIntelligenceIndicatorArrayOutput() ThreatIntelligenceIndicatorArrayOutput { return i.ToThreatIntelligenceIndicatorArrayOutputWithContext(context.Background()) } func (i ThreatIntelligenceIndicatorArray) ToThreatIntelligenceIndicatorArrayOutputWithContext(ctx context.Context) ThreatIntelligenceIndicatorArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ThreatIntelligenceIndicatorArrayOutput) } // ThreatIntelligenceIndicatorMapInput is an input type that accepts ThreatIntelligenceIndicatorMap and ThreatIntelligenceIndicatorMapOutput values. // You can construct a concrete instance of `ThreatIntelligenceIndicatorMapInput` via: // // ThreatIntelligenceIndicatorMap{ "key": ThreatIntelligenceIndicatorArgs{...} } type ThreatIntelligenceIndicatorMapInput interface { pulumi.Input ToThreatIntelligenceIndicatorMapOutput() ThreatIntelligenceIndicatorMapOutput ToThreatIntelligenceIndicatorMapOutputWithContext(context.Context) ThreatIntelligenceIndicatorMapOutput } type ThreatIntelligenceIndicatorMap map[string]ThreatIntelligenceIndicatorInput func (ThreatIntelligenceIndicatorMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ThreatIntelligenceIndicator)(nil)).Elem() } func (i ThreatIntelligenceIndicatorMap) ToThreatIntelligenceIndicatorMapOutput() ThreatIntelligenceIndicatorMapOutput { return i.ToThreatIntelligenceIndicatorMapOutputWithContext(context.Background()) } func (i ThreatIntelligenceIndicatorMap) ToThreatIntelligenceIndicatorMapOutputWithContext(ctx context.Context) ThreatIntelligenceIndicatorMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ThreatIntelligenceIndicatorMapOutput) } type ThreatIntelligenceIndicatorOutput struct{ *pulumi.OutputState } func (ThreatIntelligenceIndicatorOutput) ElementType() reflect.Type { return reflect.TypeOf((**ThreatIntelligenceIndicator)(nil)).Elem() } func (o ThreatIntelligenceIndicatorOutput) ToThreatIntelligenceIndicatorOutput() ThreatIntelligenceIndicatorOutput { return o } func (o ThreatIntelligenceIndicatorOutput) ToThreatIntelligenceIndicatorOutputWithContext(ctx context.Context) ThreatIntelligenceIndicatorOutput { return o } // Confidence levels of the Threat Intelligence Indicator. func (o ThreatIntelligenceIndicatorOutput) Confidence() pulumi.IntPtrOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.IntPtrOutput { return v.Confidence }).(pulumi.IntPtrOutput) } // The creator of the Threat Intelligence Indicator. func (o ThreatIntelligenceIndicatorOutput) CreatedBy() pulumi.StringPtrOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringPtrOutput { return v.CreatedBy }).(pulumi.StringPtrOutput) } // The date of this Threat Intelligence Indicator created. func (o ThreatIntelligenceIndicatorOutput) CreatedOn() pulumi.StringOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringOutput { return v.CreatedOn }).(pulumi.StringOutput) } // Whether the Threat Intelligence entity is defanged? func (o ThreatIntelligenceIndicatorOutput) Defanged() pulumi.BoolOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.BoolOutput { return v.Defanged }).(pulumi.BoolOutput) } // The description of the Threat Intelligence Indicator. func (o ThreatIntelligenceIndicatorOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The display name of the Threat Intelligence Indicator. func (o ThreatIntelligenceIndicatorOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // The extension config of the Threat Intelligence Indicator in JSON format. func (o ThreatIntelligenceIndicatorOutput) Extension() pulumi.StringOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringOutput { return v.Extension }).(pulumi.StringOutput) } // The external ID of the Threat Intelligence Indicator. func (o ThreatIntelligenceIndicatorOutput) ExternalId() pulumi.StringOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringOutput { return v.ExternalId }).(pulumi.StringOutput) } // the External last updated time in UTC. func (o ThreatIntelligenceIndicatorOutput) ExternalLastUpdatedTimeUtc() pulumi.StringOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringOutput { return v.ExternalLastUpdatedTimeUtc }).(pulumi.StringOutput) } // One or more `externalReference` blocks as defined below. func (o ThreatIntelligenceIndicatorOutput) ExternalReferences() ThreatIntelligenceIndicatorExternalReferenceArrayOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) ThreatIntelligenceIndicatorExternalReferenceArrayOutput { return v.ExternalReferences }).(ThreatIntelligenceIndicatorExternalReferenceArrayOutput) } // One or more `granularMarking` blocks as defined below. func (o ThreatIntelligenceIndicatorOutput) GranularMarkings() ThreatIntelligenceIndicatorGranularMarkingArrayOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) ThreatIntelligenceIndicatorGranularMarkingArrayOutput { return v.GranularMarkings }).(ThreatIntelligenceIndicatorGranularMarkingArrayOutput) } // The guid of this Sentinel Threat Intelligence Indicator. func (o ThreatIntelligenceIndicatorOutput) Guid() pulumi.StringOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringOutput { return v.Guid }).(pulumi.StringOutput) } // A list of indicator types of this Threat Intelligence Indicator. func (o ThreatIntelligenceIndicatorOutput) IndicatorTypes() pulumi.StringArrayOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringArrayOutput { return v.IndicatorTypes }).(pulumi.StringArrayOutput) } // One or more `killChainPhase` blocks as defined below. func (o ThreatIntelligenceIndicatorOutput) KillChainPhases() ThreatIntelligenceIndicatorKillChainPhaseArrayOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) ThreatIntelligenceIndicatorKillChainPhaseArrayOutput { return v.KillChainPhases }).(ThreatIntelligenceIndicatorKillChainPhaseArrayOutput) } // The language of the Threat Intelligence Indicator. func (o ThreatIntelligenceIndicatorOutput) Language() pulumi.StringPtrOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringPtrOutput { return v.Language }).(pulumi.StringPtrOutput) } // The last updated time of the Threat Intelligence Indicator in UTC. func (o ThreatIntelligenceIndicatorOutput) LastUpdatedTimeUtc() pulumi.StringOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringOutput { return v.LastUpdatedTimeUtc }).(pulumi.StringOutput) } // Specifies a list of Threat Intelligence marking references. func (o ThreatIntelligenceIndicatorOutput) ObjectMarkingRefs() pulumi.StringArrayOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringArrayOutput { return v.ObjectMarkingRefs }).(pulumi.StringArrayOutput) } // A `parsedPattern` block as defined below. func (o ThreatIntelligenceIndicatorOutput) ParsedPatterns() ThreatIntelligenceIndicatorParsedPatternArrayOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) ThreatIntelligenceIndicatorParsedPatternArrayOutput { return v.ParsedPatterns }).(ThreatIntelligenceIndicatorParsedPatternArrayOutput) } // The pattern used by the Threat Intelligence Indicator. When `patternType` set to `file`, `pattern` must be specified with `<HashName>:<Value>` format, such as `MD5:78ecc5c05cd8b79af480df2f8fba0b9d`. func (o ThreatIntelligenceIndicatorOutput) Pattern() pulumi.StringOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringOutput { return v.Pattern }).(pulumi.StringOutput) } // The type of pattern used by the Threat Intelligence Indicator. Possible values are `domain-name`, `file`, `ipv4-addr`, `ipv6-addr` and `url`. func (o ThreatIntelligenceIndicatorOutput) PatternType() pulumi.StringOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringOutput { return v.PatternType }).(pulumi.StringOutput) } // The version of a Threat Intelligence entity. func (o ThreatIntelligenceIndicatorOutput) PatternVersion() pulumi.StringPtrOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringPtrOutput { return v.PatternVersion }).(pulumi.StringPtrOutput) } // Whether the Threat Intelligence entity revoked. func (o ThreatIntelligenceIndicatorOutput) Revoked() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.BoolPtrOutput { return v.Revoked }).(pulumi.BoolPtrOutput) } // Source of the Threat Intelligence Indicator. Changing this forces a new resource to be created. func (o ThreatIntelligenceIndicatorOutput) Source() pulumi.StringOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringOutput { return v.Source }).(pulumi.StringOutput) } // Specifies a list of tags of the Threat Intelligence Indicator. func (o ThreatIntelligenceIndicatorOutput) Tags() pulumi.StringArrayOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringArrayOutput { return v.Tags }).(pulumi.StringArrayOutput) } // Specifies a list of threat types of this Threat Intelligence Indicator. func (o ThreatIntelligenceIndicatorOutput) ThreatTypes() pulumi.StringArrayOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringArrayOutput { return v.ThreatTypes }).(pulumi.StringArrayOutput) } // The start of validate date in RFC3339. func (o ThreatIntelligenceIndicatorOutput) ValidateFromUtc() pulumi.StringOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringOutput { return v.ValidateFromUtc }).(pulumi.StringOutput) } // The end of validate date of the Threat Intelligence Indicator in RFC3339 format. func (o ThreatIntelligenceIndicatorOutput) ValidateUntilUtc() pulumi.StringPtrOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringPtrOutput { return v.ValidateUntilUtc }).(pulumi.StringPtrOutput) } // The ID of the Log Analytics Workspace. Changing this forces a new Sentinel Threat Intelligence Indicator to be created. func (o ThreatIntelligenceIndicatorOutput) WorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *ThreatIntelligenceIndicator) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/alertRuleNrt.go
sdk/go/azure/sentinel/alertRuleNrt.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Sentinel NRT Alert Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("pergb2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewAlertRuleNrt(ctx, "example", &sentinel.AlertRuleNrtArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // DisplayName: pulumi.String("example"), // Severity: pulumi.String("High"), // Query: pulumi.String("AzureActivity |\n where OperationName == \\\"Create or Update Virtual Machine\\\" or OperationName ==\\\"Create Deployment\\\" |\n where ActivityStatus == \\\"Succeeded\\\" |\n make-series dcount(ResourceId) default=0 on EventSubmissionTimestamp in range(ago(7d), now(), 1d) by Caller\n"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.OperationalInsights` - 2023-12-01-preview // // ## Import // // Sentinel NRT Alert Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/alertRuleNrt:AlertRuleNrt example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/alertRules/rule1 // ``` type AlertRuleNrt struct { pulumi.CustomResourceState // An `alertDetailsOverride` block as defined below. AlertDetailsOverrides AlertRuleNrtAlertDetailsOverrideArrayOutput `pulumi:"alertDetailsOverrides"` // The GUID of the alert rule template which is used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringPtrOutput `pulumi:"alertRuleTemplateGuid"` // The version of the alert rule template which is used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. AlertRuleTemplateVersion pulumi.StringPtrOutput `pulumi:"alertRuleTemplateVersion"` // A map of string key-value pairs of columns to be attached to this Sentinel NRT Alert Rule. The key will appear as the field name in alerts and the value is the event parameter you wish to surface in the alerts. CustomDetails pulumi.StringMapOutput `pulumi:"customDetails"` // The description of this Sentinel NRT Alert Rule. Description pulumi.StringPtrOutput `pulumi:"description"` // The friendly name of this Sentinel NRT Alert Rule. DisplayName pulumi.StringOutput `pulumi:"displayName"` // Should the Sentinel NRT Alert Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // A list of `entityMapping` blocks as defined below. EntityMappings AlertRuleNrtEntityMappingArrayOutput `pulumi:"entityMappings"` // A `eventGrouping` block as defined below. EventGrouping AlertRuleNrtEventGroupingOutput `pulumi:"eventGrouping"` // A `incident` block as defined below. Incident AlertRuleNrtIncidentOutput `pulumi:"incident"` // The ID of the Log Analytics Workspace this Sentinel NRT Alert Rule belongs to. Changing this forces a new Sentinel NRT Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. Name pulumi.StringOutput `pulumi:"name"` // The query of this Sentinel NRT Alert Rule. Query pulumi.StringOutput `pulumi:"query"` // A list of `sentinelEntityMapping` blocks as defined below. // // > **Note:** `entityMapping` and `sentinelEntityMapping` together can't exceed 5. SentinelEntityMappings AlertRuleNrtSentinelEntityMappingArrayOutput `pulumi:"sentinelEntityMappings"` // The alert severity of this Sentinel NRT Alert Rule. Possible values are `High`, `Medium`, `Low` and `Informational`. Severity pulumi.StringOutput `pulumi:"severity"` // If `suppressionEnabled` is `true`, this is ISO 8601 timespan duration, which specifies the amount of time the query should stop running after alert is generated. Defaults to `PT5H`. SuppressionDuration pulumi.StringPtrOutput `pulumi:"suppressionDuration"` // Should the Sentinel NRT Alert Rulea stop running query after alert is generated? Defaults to `false`. SuppressionEnabled pulumi.BoolPtrOutput `pulumi:"suppressionEnabled"` // A list of categories of attacks by which to classify the rule. Possible values are `Collection`, `CommandAndControl`, `CredentialAccess`, `DefenseEvasion`, `Discovery`, `Execution`, `Exfiltration`, `Impact`, `ImpairProcessControl`, `InhibitResponseFunction`, `InitialAccess`, `LateralMovement`, `Persistence`, `PreAttack`, `PrivilegeEscalation`, `Reconnaissance` and `ResourceDevelopment`. Tactics pulumi.StringArrayOutput `pulumi:"tactics"` // A list of techniques of attacks by which to classify the rule. Techniques pulumi.StringArrayOutput `pulumi:"techniques"` } // NewAlertRuleNrt registers a new resource with the given unique name, arguments, and options. func NewAlertRuleNrt(ctx *pulumi.Context, name string, args *AlertRuleNrtArgs, opts ...pulumi.ResourceOption) (*AlertRuleNrt, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } if args.EventGrouping == nil { return nil, errors.New("invalid value for required argument 'EventGrouping'") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } if args.Query == nil { return nil, errors.New("invalid value for required argument 'Query'") } if args.Severity == nil { return nil, errors.New("invalid value for required argument 'Severity'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AlertRuleNrt err := ctx.RegisterResource("azure:sentinel/alertRuleNrt:AlertRuleNrt", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAlertRuleNrt gets an existing AlertRuleNrt resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetAlertRuleNrt(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AlertRuleNrtState, opts ...pulumi.ResourceOption) (*AlertRuleNrt, error) { var resource AlertRuleNrt err := ctx.ReadResource("azure:sentinel/alertRuleNrt:AlertRuleNrt", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AlertRuleNrt resources. type alertRuleNrtState struct { // An `alertDetailsOverride` block as defined below. AlertDetailsOverrides []AlertRuleNrtAlertDetailsOverride `pulumi:"alertDetailsOverrides"` // The GUID of the alert rule template which is used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. AlertRuleTemplateGuid *string `pulumi:"alertRuleTemplateGuid"` // The version of the alert rule template which is used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. AlertRuleTemplateVersion *string `pulumi:"alertRuleTemplateVersion"` // A map of string key-value pairs of columns to be attached to this Sentinel NRT Alert Rule. The key will appear as the field name in alerts and the value is the event parameter you wish to surface in the alerts. CustomDetails map[string]string `pulumi:"customDetails"` // The description of this Sentinel NRT Alert Rule. Description *string `pulumi:"description"` // The friendly name of this Sentinel NRT Alert Rule. DisplayName *string `pulumi:"displayName"` // Should the Sentinel NRT Alert Rule be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // A list of `entityMapping` blocks as defined below. EntityMappings []AlertRuleNrtEntityMapping `pulumi:"entityMappings"` // A `eventGrouping` block as defined below. EventGrouping *AlertRuleNrtEventGrouping `pulumi:"eventGrouping"` // A `incident` block as defined below. Incident *AlertRuleNrtIncident `pulumi:"incident"` // The ID of the Log Analytics Workspace this Sentinel NRT Alert Rule belongs to. Changing this forces a new Sentinel NRT Alert Rule to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. Name *string `pulumi:"name"` // The query of this Sentinel NRT Alert Rule. Query *string `pulumi:"query"` // A list of `sentinelEntityMapping` blocks as defined below. // // > **Note:** `entityMapping` and `sentinelEntityMapping` together can't exceed 5. SentinelEntityMappings []AlertRuleNrtSentinelEntityMapping `pulumi:"sentinelEntityMappings"` // The alert severity of this Sentinel NRT Alert Rule. Possible values are `High`, `Medium`, `Low` and `Informational`. Severity *string `pulumi:"severity"` // If `suppressionEnabled` is `true`, this is ISO 8601 timespan duration, which specifies the amount of time the query should stop running after alert is generated. Defaults to `PT5H`. SuppressionDuration *string `pulumi:"suppressionDuration"` // Should the Sentinel NRT Alert Rulea stop running query after alert is generated? Defaults to `false`. SuppressionEnabled *bool `pulumi:"suppressionEnabled"` // A list of categories of attacks by which to classify the rule. Possible values are `Collection`, `CommandAndControl`, `CredentialAccess`, `DefenseEvasion`, `Discovery`, `Execution`, `Exfiltration`, `Impact`, `ImpairProcessControl`, `InhibitResponseFunction`, `InitialAccess`, `LateralMovement`, `Persistence`, `PreAttack`, `PrivilegeEscalation`, `Reconnaissance` and `ResourceDevelopment`. Tactics []string `pulumi:"tactics"` // A list of techniques of attacks by which to classify the rule. Techniques []string `pulumi:"techniques"` } type AlertRuleNrtState struct { // An `alertDetailsOverride` block as defined below. AlertDetailsOverrides AlertRuleNrtAlertDetailsOverrideArrayInput // The GUID of the alert rule template which is used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringPtrInput // The version of the alert rule template which is used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. AlertRuleTemplateVersion pulumi.StringPtrInput // A map of string key-value pairs of columns to be attached to this Sentinel NRT Alert Rule. The key will appear as the field name in alerts and the value is the event parameter you wish to surface in the alerts. CustomDetails pulumi.StringMapInput // The description of this Sentinel NRT Alert Rule. Description pulumi.StringPtrInput // The friendly name of this Sentinel NRT Alert Rule. DisplayName pulumi.StringPtrInput // Should the Sentinel NRT Alert Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // A list of `entityMapping` blocks as defined below. EntityMappings AlertRuleNrtEntityMappingArrayInput // A `eventGrouping` block as defined below. EventGrouping AlertRuleNrtEventGroupingPtrInput // A `incident` block as defined below. Incident AlertRuleNrtIncidentPtrInput // The ID of the Log Analytics Workspace this Sentinel NRT Alert Rule belongs to. Changing this forces a new Sentinel NRT Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. Name pulumi.StringPtrInput // The query of this Sentinel NRT Alert Rule. Query pulumi.StringPtrInput // A list of `sentinelEntityMapping` blocks as defined below. // // > **Note:** `entityMapping` and `sentinelEntityMapping` together can't exceed 5. SentinelEntityMappings AlertRuleNrtSentinelEntityMappingArrayInput // The alert severity of this Sentinel NRT Alert Rule. Possible values are `High`, `Medium`, `Low` and `Informational`. Severity pulumi.StringPtrInput // If `suppressionEnabled` is `true`, this is ISO 8601 timespan duration, which specifies the amount of time the query should stop running after alert is generated. Defaults to `PT5H`. SuppressionDuration pulumi.StringPtrInput // Should the Sentinel NRT Alert Rulea stop running query after alert is generated? Defaults to `false`. SuppressionEnabled pulumi.BoolPtrInput // A list of categories of attacks by which to classify the rule. Possible values are `Collection`, `CommandAndControl`, `CredentialAccess`, `DefenseEvasion`, `Discovery`, `Execution`, `Exfiltration`, `Impact`, `ImpairProcessControl`, `InhibitResponseFunction`, `InitialAccess`, `LateralMovement`, `Persistence`, `PreAttack`, `PrivilegeEscalation`, `Reconnaissance` and `ResourceDevelopment`. Tactics pulumi.StringArrayInput // A list of techniques of attacks by which to classify the rule. Techniques pulumi.StringArrayInput } func (AlertRuleNrtState) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleNrtState)(nil)).Elem() } type alertRuleNrtArgs struct { // An `alertDetailsOverride` block as defined below. AlertDetailsOverrides []AlertRuleNrtAlertDetailsOverride `pulumi:"alertDetailsOverrides"` // The GUID of the alert rule template which is used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. AlertRuleTemplateGuid *string `pulumi:"alertRuleTemplateGuid"` // The version of the alert rule template which is used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. AlertRuleTemplateVersion *string `pulumi:"alertRuleTemplateVersion"` // A map of string key-value pairs of columns to be attached to this Sentinel NRT Alert Rule. The key will appear as the field name in alerts and the value is the event parameter you wish to surface in the alerts. CustomDetails map[string]string `pulumi:"customDetails"` // The description of this Sentinel NRT Alert Rule. Description *string `pulumi:"description"` // The friendly name of this Sentinel NRT Alert Rule. DisplayName string `pulumi:"displayName"` // Should the Sentinel NRT Alert Rule be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // A list of `entityMapping` blocks as defined below. EntityMappings []AlertRuleNrtEntityMapping `pulumi:"entityMappings"` // A `eventGrouping` block as defined below. EventGrouping AlertRuleNrtEventGrouping `pulumi:"eventGrouping"` // A `incident` block as defined below. Incident *AlertRuleNrtIncident `pulumi:"incident"` // The ID of the Log Analytics Workspace this Sentinel NRT Alert Rule belongs to. Changing this forces a new Sentinel NRT Alert Rule to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. Name *string `pulumi:"name"` // The query of this Sentinel NRT Alert Rule. Query string `pulumi:"query"` // A list of `sentinelEntityMapping` blocks as defined below. // // > **Note:** `entityMapping` and `sentinelEntityMapping` together can't exceed 5. SentinelEntityMappings []AlertRuleNrtSentinelEntityMapping `pulumi:"sentinelEntityMappings"` // The alert severity of this Sentinel NRT Alert Rule. Possible values are `High`, `Medium`, `Low` and `Informational`. Severity string `pulumi:"severity"` // If `suppressionEnabled` is `true`, this is ISO 8601 timespan duration, which specifies the amount of time the query should stop running after alert is generated. Defaults to `PT5H`. SuppressionDuration *string `pulumi:"suppressionDuration"` // Should the Sentinel NRT Alert Rulea stop running query after alert is generated? Defaults to `false`. SuppressionEnabled *bool `pulumi:"suppressionEnabled"` // A list of categories of attacks by which to classify the rule. Possible values are `Collection`, `CommandAndControl`, `CredentialAccess`, `DefenseEvasion`, `Discovery`, `Execution`, `Exfiltration`, `Impact`, `ImpairProcessControl`, `InhibitResponseFunction`, `InitialAccess`, `LateralMovement`, `Persistence`, `PreAttack`, `PrivilegeEscalation`, `Reconnaissance` and `ResourceDevelopment`. Tactics []string `pulumi:"tactics"` // A list of techniques of attacks by which to classify the rule. Techniques []string `pulumi:"techniques"` } // The set of arguments for constructing a AlertRuleNrt resource. type AlertRuleNrtArgs struct { // An `alertDetailsOverride` block as defined below. AlertDetailsOverrides AlertRuleNrtAlertDetailsOverrideArrayInput // The GUID of the alert rule template which is used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringPtrInput // The version of the alert rule template which is used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. AlertRuleTemplateVersion pulumi.StringPtrInput // A map of string key-value pairs of columns to be attached to this Sentinel NRT Alert Rule. The key will appear as the field name in alerts and the value is the event parameter you wish to surface in the alerts. CustomDetails pulumi.StringMapInput // The description of this Sentinel NRT Alert Rule. Description pulumi.StringPtrInput // The friendly name of this Sentinel NRT Alert Rule. DisplayName pulumi.StringInput // Should the Sentinel NRT Alert Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // A list of `entityMapping` blocks as defined below. EntityMappings AlertRuleNrtEntityMappingArrayInput // A `eventGrouping` block as defined below. EventGrouping AlertRuleNrtEventGroupingInput // A `incident` block as defined below. Incident AlertRuleNrtIncidentPtrInput // The ID of the Log Analytics Workspace this Sentinel NRT Alert Rule belongs to. Changing this forces a new Sentinel NRT Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. Name pulumi.StringPtrInput // The query of this Sentinel NRT Alert Rule. Query pulumi.StringInput // A list of `sentinelEntityMapping` blocks as defined below. // // > **Note:** `entityMapping` and `sentinelEntityMapping` together can't exceed 5. SentinelEntityMappings AlertRuleNrtSentinelEntityMappingArrayInput // The alert severity of this Sentinel NRT Alert Rule. Possible values are `High`, `Medium`, `Low` and `Informational`. Severity pulumi.StringInput // If `suppressionEnabled` is `true`, this is ISO 8601 timespan duration, which specifies the amount of time the query should stop running after alert is generated. Defaults to `PT5H`. SuppressionDuration pulumi.StringPtrInput // Should the Sentinel NRT Alert Rulea stop running query after alert is generated? Defaults to `false`. SuppressionEnabled pulumi.BoolPtrInput // A list of categories of attacks by which to classify the rule. Possible values are `Collection`, `CommandAndControl`, `CredentialAccess`, `DefenseEvasion`, `Discovery`, `Execution`, `Exfiltration`, `Impact`, `ImpairProcessControl`, `InhibitResponseFunction`, `InitialAccess`, `LateralMovement`, `Persistence`, `PreAttack`, `PrivilegeEscalation`, `Reconnaissance` and `ResourceDevelopment`. Tactics pulumi.StringArrayInput // A list of techniques of attacks by which to classify the rule. Techniques pulumi.StringArrayInput } func (AlertRuleNrtArgs) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleNrtArgs)(nil)).Elem() } type AlertRuleNrtInput interface { pulumi.Input ToAlertRuleNrtOutput() AlertRuleNrtOutput ToAlertRuleNrtOutputWithContext(ctx context.Context) AlertRuleNrtOutput } func (*AlertRuleNrt) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleNrt)(nil)).Elem() } func (i *AlertRuleNrt) ToAlertRuleNrtOutput() AlertRuleNrtOutput { return i.ToAlertRuleNrtOutputWithContext(context.Background()) } func (i *AlertRuleNrt) ToAlertRuleNrtOutputWithContext(ctx context.Context) AlertRuleNrtOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleNrtOutput) } // AlertRuleNrtArrayInput is an input type that accepts AlertRuleNrtArray and AlertRuleNrtArrayOutput values. // You can construct a concrete instance of `AlertRuleNrtArrayInput` via: // // AlertRuleNrtArray{ AlertRuleNrtArgs{...} } type AlertRuleNrtArrayInput interface { pulumi.Input ToAlertRuleNrtArrayOutput() AlertRuleNrtArrayOutput ToAlertRuleNrtArrayOutputWithContext(context.Context) AlertRuleNrtArrayOutput } type AlertRuleNrtArray []AlertRuleNrtInput func (AlertRuleNrtArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertRuleNrt)(nil)).Elem() } func (i AlertRuleNrtArray) ToAlertRuleNrtArrayOutput() AlertRuleNrtArrayOutput { return i.ToAlertRuleNrtArrayOutputWithContext(context.Background()) } func (i AlertRuleNrtArray) ToAlertRuleNrtArrayOutputWithContext(ctx context.Context) AlertRuleNrtArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleNrtArrayOutput) } // AlertRuleNrtMapInput is an input type that accepts AlertRuleNrtMap and AlertRuleNrtMapOutput values. // You can construct a concrete instance of `AlertRuleNrtMapInput` via: // // AlertRuleNrtMap{ "key": AlertRuleNrtArgs{...} } type AlertRuleNrtMapInput interface { pulumi.Input ToAlertRuleNrtMapOutput() AlertRuleNrtMapOutput ToAlertRuleNrtMapOutputWithContext(context.Context) AlertRuleNrtMapOutput } type AlertRuleNrtMap map[string]AlertRuleNrtInput func (AlertRuleNrtMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertRuleNrt)(nil)).Elem() } func (i AlertRuleNrtMap) ToAlertRuleNrtMapOutput() AlertRuleNrtMapOutput { return i.ToAlertRuleNrtMapOutputWithContext(context.Background()) } func (i AlertRuleNrtMap) ToAlertRuleNrtMapOutputWithContext(ctx context.Context) AlertRuleNrtMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleNrtMapOutput) } type AlertRuleNrtOutput struct{ *pulumi.OutputState } func (AlertRuleNrtOutput) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleNrt)(nil)).Elem() } func (o AlertRuleNrtOutput) ToAlertRuleNrtOutput() AlertRuleNrtOutput { return o } func (o AlertRuleNrtOutput) ToAlertRuleNrtOutputWithContext(ctx context.Context) AlertRuleNrtOutput { return o } // An `alertDetailsOverride` block as defined below. func (o AlertRuleNrtOutput) AlertDetailsOverrides() AlertRuleNrtAlertDetailsOverrideArrayOutput { return o.ApplyT(func(v *AlertRuleNrt) AlertRuleNrtAlertDetailsOverrideArrayOutput { return v.AlertDetailsOverrides }).(AlertRuleNrtAlertDetailsOverrideArrayOutput) } // The GUID of the alert rule template which is used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. func (o AlertRuleNrtOutput) AlertRuleTemplateGuid() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertRuleNrt) pulumi.StringPtrOutput { return v.AlertRuleTemplateGuid }).(pulumi.StringPtrOutput) } // The version of the alert rule template which is used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. func (o AlertRuleNrtOutput) AlertRuleTemplateVersion() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertRuleNrt) pulumi.StringPtrOutput { return v.AlertRuleTemplateVersion }).(pulumi.StringPtrOutput) } // A map of string key-value pairs of columns to be attached to this Sentinel NRT Alert Rule. The key will appear as the field name in alerts and the value is the event parameter you wish to surface in the alerts. func (o AlertRuleNrtOutput) CustomDetails() pulumi.StringMapOutput { return o.ApplyT(func(v *AlertRuleNrt) pulumi.StringMapOutput { return v.CustomDetails }).(pulumi.StringMapOutput) } // The description of this Sentinel NRT Alert Rule. func (o AlertRuleNrtOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertRuleNrt) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The friendly name of this Sentinel NRT Alert Rule. func (o AlertRuleNrtOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleNrt) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // Should the Sentinel NRT Alert Rule be enabled? Defaults to `true`. func (o AlertRuleNrtOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AlertRuleNrt) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // A list of `entityMapping` blocks as defined below. func (o AlertRuleNrtOutput) EntityMappings() AlertRuleNrtEntityMappingArrayOutput { return o.ApplyT(func(v *AlertRuleNrt) AlertRuleNrtEntityMappingArrayOutput { return v.EntityMappings }).(AlertRuleNrtEntityMappingArrayOutput) } // A `eventGrouping` block as defined below. func (o AlertRuleNrtOutput) EventGrouping() AlertRuleNrtEventGroupingOutput { return o.ApplyT(func(v *AlertRuleNrt) AlertRuleNrtEventGroupingOutput { return v.EventGrouping }).(AlertRuleNrtEventGroupingOutput) } // A `incident` block as defined below. func (o AlertRuleNrtOutput) Incident() AlertRuleNrtIncidentOutput { return o.ApplyT(func(v *AlertRuleNrt) AlertRuleNrtIncidentOutput { return v.Incident }).(AlertRuleNrtIncidentOutput) } // The ID of the Log Analytics Workspace this Sentinel NRT Alert Rule belongs to. Changing this forces a new Sentinel NRT Alert Rule to be created. func (o AlertRuleNrtOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleNrt) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Sentinel NRT Alert Rule. Changing this forces a new Sentinel NRT Alert Rule to be created. func (o AlertRuleNrtOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleNrt) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The query of this Sentinel NRT Alert Rule. func (o AlertRuleNrtOutput) Query() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleNrt) pulumi.StringOutput { return v.Query }).(pulumi.StringOutput) } // A list of `sentinelEntityMapping` blocks as defined below. // // > **Note:** `entityMapping` and `sentinelEntityMapping` together can't exceed 5. func (o AlertRuleNrtOutput) SentinelEntityMappings() AlertRuleNrtSentinelEntityMappingArrayOutput { return o.ApplyT(func(v *AlertRuleNrt) AlertRuleNrtSentinelEntityMappingArrayOutput { return v.SentinelEntityMappings }).(AlertRuleNrtSentinelEntityMappingArrayOutput) } // The alert severity of this Sentinel NRT Alert Rule. Possible values are `High`, `Medium`, `Low` and `Informational`. func (o AlertRuleNrtOutput) Severity() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleNrt) pulumi.StringOutput { return v.Severity }).(pulumi.StringOutput) } // If `suppressionEnabled` is `true`, this is ISO 8601 timespan duration, which specifies the amount of time the query should stop running after alert is generated. Defaults to `PT5H`. func (o AlertRuleNrtOutput) SuppressionDuration() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertRuleNrt) pulumi.StringPtrOutput { return v.SuppressionDuration }).(pulumi.StringPtrOutput) } // Should the Sentinel NRT Alert Rulea stop running query after alert is generated? Defaults to `false`. func (o AlertRuleNrtOutput) SuppressionEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AlertRuleNrt) pulumi.BoolPtrOutput { return v.SuppressionEnabled }).(pulumi.BoolPtrOutput) } // A list of categories of attacks by which to classify the rule. Possible values are `Collection`, `CommandAndControl`, `CredentialAccess`, `DefenseEvasion`, `Discovery`, `Execution`, `Exfiltration`, `Impact`, `ImpairProcessControl`, `InhibitResponseFunction`, `InitialAccess`, `LateralMovement`, `Persistence`, `PreAttack`, `PrivilegeEscalation`, `Reconnaissance` and `ResourceDevelopment`. func (o AlertRuleNrtOutput) Tactics() pulumi.StringArrayOutput { return o.ApplyT(func(v *AlertRuleNrt) pulumi.StringArrayOutput { return v.Tactics }).(pulumi.StringArrayOutput) } // A list of techniques of attacks by which to classify the rule. func (o AlertRuleNrtOutput) Techniques() pulumi.StringArrayOutput { return o.ApplyT(func(v *AlertRuleNrt) pulumi.StringArrayOutput { return v.Techniques }).(pulumi.StringArrayOutput) } type AlertRuleNrtArrayOutput struct{ *pulumi.OutputState } func (AlertRuleNrtArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertRuleNrt)(nil)).Elem() } func (o AlertRuleNrtArrayOutput) ToAlertRuleNrtArrayOutput() AlertRuleNrtArrayOutput { return o } func (o AlertRuleNrtArrayOutput) ToAlertRuleNrtArrayOutputWithContext(ctx context.Context) AlertRuleNrtArrayOutput { return o } func (o AlertRuleNrtArrayOutput) Index(i pulumi.IntInput) AlertRuleNrtOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AlertRuleNrt { return vs[0].([]*AlertRuleNrt)[vs[1].(int)] }).(AlertRuleNrtOutput) } type AlertRuleNrtMapOutput struct{ *pulumi.OutputState } func (AlertRuleNrtMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertRuleNrt)(nil)).Elem() } func (o AlertRuleNrtMapOutput) ToAlertRuleNrtMapOutput() AlertRuleNrtMapOutput { return o } func (o AlertRuleNrtMapOutput) ToAlertRuleNrtMapOutputWithContext(ctx context.Context) AlertRuleNrtMapOutput { return o } func (o AlertRuleNrtMapOutput) MapIndex(k pulumi.StringInput) AlertRuleNrtOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AlertRuleNrt { return vs[0].(map[string]*AlertRuleNrt)[vs[1].(string)] }).(AlertRuleNrtOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleNrtInput)(nil)).Elem(), &AlertRuleNrt{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleNrtArrayInput)(nil)).Elem(), AlertRuleNrtArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleNrtMapInput)(nil)).Elem(), AlertRuleNrtMap{}) pulumi.RegisterOutputType(AlertRuleNrtOutput{}) pulumi.RegisterOutputType(AlertRuleNrtArrayOutput{}) pulumi.RegisterOutputType(AlertRuleNrtMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/getAlertRuleAnomaly.go
sdk/go/azure/sentinel/getAlertRuleAnomaly.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Anomaly Alert Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-law"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // CustomerManagedKeyEnabled: pulumi.Bool(false), // }) // if err != nil { // return err // } // example := sentinel.GetAlertRuleAnomalyOutput(ctx, sentinel.GetAlertRuleAnomalyOutputArgs{ // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // DisplayName: pulumi.String("Potential data staging"), // }, nil) // ctx.Export("id", example.ApplyT(func(example sentinel.GetAlertRuleAnomalyResult) (*string, error) { // return &example.Id, nil // }).(pulumi.StringPtrOutput)) // return nil // }) // } // // ``` func GetAlertRuleAnomaly(ctx *pulumi.Context, args *GetAlertRuleAnomalyArgs, opts ...pulumi.InvokeOption) (*GetAlertRuleAnomalyResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetAlertRuleAnomalyResult err := ctx.Invoke("azure:sentinel/getAlertRuleAnomaly:getAlertRuleAnomaly", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getAlertRuleAnomaly. type GetAlertRuleAnomalyArgs struct { // The display name of this Sentinel Alert Rule Template. Either `displayName` or `name` have to be specified. // // > **Note:** One of `name` or `displayName` must be specified. DisplayName *string `pulumi:"displayName"` // The ID of the Log Analytics Workspace. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The guid of this Sentinel Alert Rule Template. Either `displayName` or `name` have to be specified. Name *string `pulumi:"name"` } // A collection of values returned by getAlertRuleAnomaly. type GetAlertRuleAnomalyResult struct { // The version of the Anomaly Security ML Analytics Settings. AnomalySettingsVersion int `pulumi:"anomalySettingsVersion"` // The anomaly version of the Anomaly Alert Rule. AnomalyVersion string `pulumi:"anomalyVersion"` // The description of the threshold observation. Description string `pulumi:"description"` DisplayName string `pulumi:"displayName"` // Is the Anomaly Alert Rule enabled? Enabled bool `pulumi:"enabled"` // The frequency the Anomaly Alert Rule will be run. Frequency string `pulumi:"frequency"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` Mode string `pulumi:"mode"` // A list of `multiSelectObservation` blocks as defined below. MultiSelectObservations []GetAlertRuleAnomalyMultiSelectObservation `pulumi:"multiSelectObservations"` // The name of the threshold observation. Name string `pulumi:"name"` // A list of `prioritizedExcludeObservation` blocks as defined below. PrioritizedExcludeObservations []GetAlertRuleAnomalyPrioritizedExcludeObservation `pulumi:"prioritizedExcludeObservations"` // A `requiredDataConnector` block as defined below. RequiredDataConnectors []GetAlertRuleAnomalyRequiredDataConnector `pulumi:"requiredDataConnectors"` // The ID of the anomaly settings definition Id. SettingsDefinitionId string `pulumi:"settingsDefinitionId"` // A list of `singleSelectObservation` blocks as defined below. SingleSelectObservations []GetAlertRuleAnomalySingleSelectObservation `pulumi:"singleSelectObservations"` // A list of categories of attacks by which to classify the rule. Tactics []string `pulumi:"tactics"` // A list of techniques of attacks by which to classify the rule. Techniques []string `pulumi:"techniques"` // A list of `thresholdObservation` blocks as defined below. ThresholdObservations []GetAlertRuleAnomalyThresholdObservation `pulumi:"thresholdObservations"` } func GetAlertRuleAnomalyOutput(ctx *pulumi.Context, args GetAlertRuleAnomalyOutputArgs, opts ...pulumi.InvokeOption) GetAlertRuleAnomalyResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetAlertRuleAnomalyResultOutput, error) { args := v.(GetAlertRuleAnomalyArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:sentinel/getAlertRuleAnomaly:getAlertRuleAnomaly", args, GetAlertRuleAnomalyResultOutput{}, options).(GetAlertRuleAnomalyResultOutput), nil }).(GetAlertRuleAnomalyResultOutput) } // A collection of arguments for invoking getAlertRuleAnomaly. type GetAlertRuleAnomalyOutputArgs struct { // The display name of this Sentinel Alert Rule Template. Either `displayName` or `name` have to be specified. // // > **Note:** One of `name` or `displayName` must be specified. DisplayName pulumi.StringPtrInput `pulumi:"displayName"` // The ID of the Log Analytics Workspace. LogAnalyticsWorkspaceId pulumi.StringInput `pulumi:"logAnalyticsWorkspaceId"` // The guid of this Sentinel Alert Rule Template. Either `displayName` or `name` have to be specified. Name pulumi.StringPtrInput `pulumi:"name"` } func (GetAlertRuleAnomalyOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetAlertRuleAnomalyArgs)(nil)).Elem() } // A collection of values returned by getAlertRuleAnomaly. type GetAlertRuleAnomalyResultOutput struct{ *pulumi.OutputState } func (GetAlertRuleAnomalyResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetAlertRuleAnomalyResult)(nil)).Elem() } func (o GetAlertRuleAnomalyResultOutput) ToGetAlertRuleAnomalyResultOutput() GetAlertRuleAnomalyResultOutput { return o } func (o GetAlertRuleAnomalyResultOutput) ToGetAlertRuleAnomalyResultOutputWithContext(ctx context.Context) GetAlertRuleAnomalyResultOutput { return o } // The version of the Anomaly Security ML Analytics Settings. func (o GetAlertRuleAnomalyResultOutput) AnomalySettingsVersion() pulumi.IntOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) int { return v.AnomalySettingsVersion }).(pulumi.IntOutput) } // The anomaly version of the Anomaly Alert Rule. func (o GetAlertRuleAnomalyResultOutput) AnomalyVersion() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) string { return v.AnomalyVersion }).(pulumi.StringOutput) } // The description of the threshold observation. func (o GetAlertRuleAnomalyResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) string { return v.Description }).(pulumi.StringOutput) } func (o GetAlertRuleAnomalyResultOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) string { return v.DisplayName }).(pulumi.StringOutput) } // Is the Anomaly Alert Rule enabled? func (o GetAlertRuleAnomalyResultOutput) Enabled() pulumi.BoolOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) bool { return v.Enabled }).(pulumi.BoolOutput) } // The frequency the Anomaly Alert Rule will be run. func (o GetAlertRuleAnomalyResultOutput) Frequency() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) string { return v.Frequency }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetAlertRuleAnomalyResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetAlertRuleAnomalyResultOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) string { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } func (o GetAlertRuleAnomalyResultOutput) Mode() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) string { return v.Mode }).(pulumi.StringOutput) } // A list of `multiSelectObservation` blocks as defined below. func (o GetAlertRuleAnomalyResultOutput) MultiSelectObservations() GetAlertRuleAnomalyMultiSelectObservationArrayOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) []GetAlertRuleAnomalyMultiSelectObservation { return v.MultiSelectObservations }).(GetAlertRuleAnomalyMultiSelectObservationArrayOutput) } // The name of the threshold observation. func (o GetAlertRuleAnomalyResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) string { return v.Name }).(pulumi.StringOutput) } // A list of `prioritizedExcludeObservation` blocks as defined below. func (o GetAlertRuleAnomalyResultOutput) PrioritizedExcludeObservations() GetAlertRuleAnomalyPrioritizedExcludeObservationArrayOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) []GetAlertRuleAnomalyPrioritizedExcludeObservation { return v.PrioritizedExcludeObservations }).(GetAlertRuleAnomalyPrioritizedExcludeObservationArrayOutput) } // A `requiredDataConnector` block as defined below. func (o GetAlertRuleAnomalyResultOutput) RequiredDataConnectors() GetAlertRuleAnomalyRequiredDataConnectorArrayOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) []GetAlertRuleAnomalyRequiredDataConnector { return v.RequiredDataConnectors }).(GetAlertRuleAnomalyRequiredDataConnectorArrayOutput) } // The ID of the anomaly settings definition Id. func (o GetAlertRuleAnomalyResultOutput) SettingsDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) string { return v.SettingsDefinitionId }).(pulumi.StringOutput) } // A list of `singleSelectObservation` blocks as defined below. func (o GetAlertRuleAnomalyResultOutput) SingleSelectObservations() GetAlertRuleAnomalySingleSelectObservationArrayOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) []GetAlertRuleAnomalySingleSelectObservation { return v.SingleSelectObservations }).(GetAlertRuleAnomalySingleSelectObservationArrayOutput) } // A list of categories of attacks by which to classify the rule. func (o GetAlertRuleAnomalyResultOutput) Tactics() pulumi.StringArrayOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) []string { return v.Tactics }).(pulumi.StringArrayOutput) } // A list of techniques of attacks by which to classify the rule. func (o GetAlertRuleAnomalyResultOutput) Techniques() pulumi.StringArrayOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) []string { return v.Techniques }).(pulumi.StringArrayOutput) } // A list of `thresholdObservation` blocks as defined below. func (o GetAlertRuleAnomalyResultOutput) ThresholdObservations() GetAlertRuleAnomalyThresholdObservationArrayOutput { return o.ApplyT(func(v GetAlertRuleAnomalyResult) []GetAlertRuleAnomalyThresholdObservation { return v.ThresholdObservations }).(GetAlertRuleAnomalyThresholdObservationArrayOutput) } func init() { pulumi.RegisterOutputType(GetAlertRuleAnomalyResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorIot.go
sdk/go/azure/sentinel/dataConnectorIot.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Iot Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorIot(ctx, "example", &sentinel.DataConnectorIotArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Iot Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorIot:DataConnectorIot example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorIot struct { pulumi.CustomResourceState // The ID of the Log Analytics Workspace that this Iot Data Connector resides in. Changing this forces a new Iot Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Iot Data Connector. Changing this forces a new Iot Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the subscription that this Iot Data Connector connects to. Changing this forces a new Iot Data Connector to be created. SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"` } // NewDataConnectorIot registers a new resource with the given unique name, arguments, and options. func NewDataConnectorIot(ctx *pulumi.Context, name string, args *DataConnectorIotArgs, opts ...pulumi.ResourceOption) (*DataConnectorIot, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorIot err := ctx.RegisterResource("azure:sentinel/dataConnectorIot:DataConnectorIot", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorIot gets an existing DataConnectorIot resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorIot(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorIotState, opts ...pulumi.ResourceOption) (*DataConnectorIot, error) { var resource DataConnectorIot err := ctx.ReadResource("azure:sentinel/dataConnectorIot:DataConnectorIot", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorIot resources. type dataConnectorIotState struct { // The ID of the Log Analytics Workspace that this Iot Data Connector resides in. Changing this forces a new Iot Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Iot Data Connector. Changing this forces a new Iot Data Connector to be created. Name *string `pulumi:"name"` // The ID of the subscription that this Iot Data Connector connects to. Changing this forces a new Iot Data Connector to be created. SubscriptionId *string `pulumi:"subscriptionId"` } type DataConnectorIotState struct { // The ID of the Log Analytics Workspace that this Iot Data Connector resides in. Changing this forces a new Iot Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Iot Data Connector. Changing this forces a new Iot Data Connector to be created. Name pulumi.StringPtrInput // The ID of the subscription that this Iot Data Connector connects to. Changing this forces a new Iot Data Connector to be created. SubscriptionId pulumi.StringPtrInput } func (DataConnectorIotState) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorIotState)(nil)).Elem() } type dataConnectorIotArgs struct { // The ID of the Log Analytics Workspace that this Iot Data Connector resides in. Changing this forces a new Iot Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Iot Data Connector. Changing this forces a new Iot Data Connector to be created. Name *string `pulumi:"name"` // The ID of the subscription that this Iot Data Connector connects to. Changing this forces a new Iot Data Connector to be created. SubscriptionId *string `pulumi:"subscriptionId"` } // The set of arguments for constructing a DataConnectorIot resource. type DataConnectorIotArgs struct { // The ID of the Log Analytics Workspace that this Iot Data Connector resides in. Changing this forces a new Iot Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Iot Data Connector. Changing this forces a new Iot Data Connector to be created. Name pulumi.StringPtrInput // The ID of the subscription that this Iot Data Connector connects to. Changing this forces a new Iot Data Connector to be created. SubscriptionId pulumi.StringPtrInput } func (DataConnectorIotArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorIotArgs)(nil)).Elem() } type DataConnectorIotInput interface { pulumi.Input ToDataConnectorIotOutput() DataConnectorIotOutput ToDataConnectorIotOutputWithContext(ctx context.Context) DataConnectorIotOutput } func (*DataConnectorIot) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorIot)(nil)).Elem() } func (i *DataConnectorIot) ToDataConnectorIotOutput() DataConnectorIotOutput { return i.ToDataConnectorIotOutputWithContext(context.Background()) } func (i *DataConnectorIot) ToDataConnectorIotOutputWithContext(ctx context.Context) DataConnectorIotOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorIotOutput) } // DataConnectorIotArrayInput is an input type that accepts DataConnectorIotArray and DataConnectorIotArrayOutput values. // You can construct a concrete instance of `DataConnectorIotArrayInput` via: // // DataConnectorIotArray{ DataConnectorIotArgs{...} } type DataConnectorIotArrayInput interface { pulumi.Input ToDataConnectorIotArrayOutput() DataConnectorIotArrayOutput ToDataConnectorIotArrayOutputWithContext(context.Context) DataConnectorIotArrayOutput } type DataConnectorIotArray []DataConnectorIotInput func (DataConnectorIotArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorIot)(nil)).Elem() } func (i DataConnectorIotArray) ToDataConnectorIotArrayOutput() DataConnectorIotArrayOutput { return i.ToDataConnectorIotArrayOutputWithContext(context.Background()) } func (i DataConnectorIotArray) ToDataConnectorIotArrayOutputWithContext(ctx context.Context) DataConnectorIotArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorIotArrayOutput) } // DataConnectorIotMapInput is an input type that accepts DataConnectorIotMap and DataConnectorIotMapOutput values. // You can construct a concrete instance of `DataConnectorIotMapInput` via: // // DataConnectorIotMap{ "key": DataConnectorIotArgs{...} } type DataConnectorIotMapInput interface { pulumi.Input ToDataConnectorIotMapOutput() DataConnectorIotMapOutput ToDataConnectorIotMapOutputWithContext(context.Context) DataConnectorIotMapOutput } type DataConnectorIotMap map[string]DataConnectorIotInput func (DataConnectorIotMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorIot)(nil)).Elem() } func (i DataConnectorIotMap) ToDataConnectorIotMapOutput() DataConnectorIotMapOutput { return i.ToDataConnectorIotMapOutputWithContext(context.Background()) } func (i DataConnectorIotMap) ToDataConnectorIotMapOutputWithContext(ctx context.Context) DataConnectorIotMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorIotMapOutput) } type DataConnectorIotOutput struct{ *pulumi.OutputState } func (DataConnectorIotOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorIot)(nil)).Elem() } func (o DataConnectorIotOutput) ToDataConnectorIotOutput() DataConnectorIotOutput { return o } func (o DataConnectorIotOutput) ToDataConnectorIotOutputWithContext(ctx context.Context) DataConnectorIotOutput { return o } // The ID of the Log Analytics Workspace that this Iot Data Connector resides in. Changing this forces a new Iot Data Connector to be created. func (o DataConnectorIotOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorIot) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Iot Data Connector. Changing this forces a new Iot Data Connector to be created. func (o DataConnectorIotOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorIot) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the subscription that this Iot Data Connector connects to. Changing this forces a new Iot Data Connector to be created. func (o DataConnectorIotOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorIot) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput) } type DataConnectorIotArrayOutput struct{ *pulumi.OutputState } func (DataConnectorIotArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorIot)(nil)).Elem() } func (o DataConnectorIotArrayOutput) ToDataConnectorIotArrayOutput() DataConnectorIotArrayOutput { return o } func (o DataConnectorIotArrayOutput) ToDataConnectorIotArrayOutputWithContext(ctx context.Context) DataConnectorIotArrayOutput { return o } func (o DataConnectorIotArrayOutput) Index(i pulumi.IntInput) DataConnectorIotOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorIot { return vs[0].([]*DataConnectorIot)[vs[1].(int)] }).(DataConnectorIotOutput) } type DataConnectorIotMapOutput struct{ *pulumi.OutputState } func (DataConnectorIotMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorIot)(nil)).Elem() } func (o DataConnectorIotMapOutput) ToDataConnectorIotMapOutput() DataConnectorIotMapOutput { return o } func (o DataConnectorIotMapOutput) ToDataConnectorIotMapOutputWithContext(ctx context.Context) DataConnectorIotMapOutput { return o } func (o DataConnectorIotMapOutput) MapIndex(k pulumi.StringInput) DataConnectorIotOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorIot { return vs[0].(map[string]*DataConnectorIot)[vs[1].(string)] }).(DataConnectorIotOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorIotInput)(nil)).Elem(), &DataConnectorIot{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorIotArrayInput)(nil)).Elem(), DataConnectorIotArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorIotMapInput)(nil)).Elem(), DataConnectorIotMap{}) pulumi.RegisterOutputType(DataConnectorIotOutput{}) pulumi.RegisterOutputType(DataConnectorIotArrayOutput{}) pulumi.RegisterOutputType(DataConnectorIotMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/alertRuleScheduled.go
sdk/go/azure/sentinel/alertRuleScheduled.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Sentinel Scheduled Alert Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewAlertRuleScheduled(ctx, "example", &sentinel.AlertRuleScheduledArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // DisplayName: pulumi.String("example"), // Severity: pulumi.String("High"), // Query: pulumi.String("AzureActivity |\n where OperationName == \\\"Create or Update Virtual Machine\\\" or OperationName ==\\\"Create Deployment\\\" |\n where ActivityStatus == \\\"Succeeded\\\" |\n make-series dcount(ResourceId) default=0 on EventSubmissionTimestamp in range(ago(7d), now(), 1d) by Caller\n"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.OperationalInsights` - 2023-12-01-preview // // ## Import // // Sentinel Scheduled Alert Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/alertRuleScheduled:AlertRuleScheduled example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/alertRules/rule1 // ``` type AlertRuleScheduled struct { pulumi.CustomResourceState // An `alertDetailsOverride` block as defined below. AlertDetailsOverrides AlertRuleScheduledAlertDetailsOverrideArrayOutput `pulumi:"alertDetailsOverrides"` // The GUID of the alert rule template which is used for this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel Scheduled Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringPtrOutput `pulumi:"alertRuleTemplateGuid"` // The version of the alert rule template which is used for this Sentinel Scheduled Alert Rule. AlertRuleTemplateVersion pulumi.StringPtrOutput `pulumi:"alertRuleTemplateVersion"` // A map of string key-value pairs of columns to be attached to this Sentinel Scheduled Alert Rule. The key will appear as the field name in alerts and the value is the event parameter you wish to surface in the alerts. CustomDetails pulumi.StringMapOutput `pulumi:"customDetails"` // The description of this Sentinel Scheduled Alert Rule. Description pulumi.StringPtrOutput `pulumi:"description"` // The friendly name of this Sentinel Scheduled Alert Rule. DisplayName pulumi.StringOutput `pulumi:"displayName"` // Should the Sentinel Scheduled Alert Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // A list of `entityMapping` blocks as defined below. EntityMappings AlertRuleScheduledEntityMappingArrayOutput `pulumi:"entityMappings"` // A `eventGrouping` block as defined below. EventGrouping AlertRuleScheduledEventGroupingPtrOutput `pulumi:"eventGrouping"` // A `incident` block as defined below. Incident AlertRuleScheduledIncidentOutput `pulumi:"incident"` // The ID of the Log Analytics Workspace this Sentinel Scheduled Alert Rule belongs to. Changing this forces a new Sentinel Scheduled Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel Scheduled Alert Rule to be created. Name pulumi.StringOutput `pulumi:"name"` // The query of this Sentinel Scheduled Alert Rule. Query pulumi.StringOutput `pulumi:"query"` // The ISO 8601 timespan duration between two consecutive queries. Defaults to `PT5H`. QueryFrequency pulumi.StringPtrOutput `pulumi:"queryFrequency"` // The ISO 8601 timespan duration, which determine the time period of the data covered by the query. For example, it can query the past 10 minutes of data, or the past 6 hours of data. Defaults to `PT5H`. // // > **Note:** `queryPeriod` must larger than or equal to `queryFrequency`, which ensures there is no gaps in the overall query coverage. QueryPeriod pulumi.StringPtrOutput `pulumi:"queryPeriod"` // A list of `sentinelEntityMapping` blocks as defined below. // // > **Note:** `entityMapping` and `sentinelEntityMapping` together can't exceed 10. SentinelEntityMappings AlertRuleScheduledSentinelEntityMappingArrayOutput `pulumi:"sentinelEntityMappings"` // The alert severity of this Sentinel Scheduled Alert Rule. Possible values are `High`, `Medium`, `Low` and `Informational`. Severity pulumi.StringOutput `pulumi:"severity"` // If `suppressionEnabled` is `true`, this is ISO 8601 timespan duration, which specifies the amount of time the query should stop running after alert is generated. Defaults to `PT5H`. // // > **Note:** `suppressionDuration` must larger than or equal to `queryFrequency`, otherwise the suppression has no actual effect since no query will happen during the suppression duration. SuppressionDuration pulumi.StringPtrOutput `pulumi:"suppressionDuration"` // Should the Sentinel Scheduled Alert Rulea stop running query after alert is generated? Defaults to `false`. SuppressionEnabled pulumi.BoolPtrOutput `pulumi:"suppressionEnabled"` // A list of categories of attacks by which to classify the rule. Possible values are `Collection`, `CommandAndControl`, `CredentialAccess`, `DefenseEvasion`, `Discovery`, `Execution`, `Exfiltration`, `ImpairProcessControl`, `InhibitResponseFunction`, `Impact`, `InitialAccess`, `LateralMovement`, `Persistence`, `PrivilegeEscalation`, `PreAttack`, `Reconnaissance` and `ResourceDevelopment`. Tactics pulumi.StringArrayOutput `pulumi:"tactics"` // A list of techniques of attacks by which to classify the rule. Techniques pulumi.StringArrayOutput `pulumi:"techniques"` // The alert trigger operator, combined with `triggerThreshold`, setting alert threshold of this Sentinel Scheduled Alert Rule. Possible values are `Equal`, `GreaterThan`, `LessThan`, `NotEqual`. Defaults to `GreaterThan`. TriggerOperator pulumi.StringPtrOutput `pulumi:"triggerOperator"` // The baseline number of query results generated, combined with `triggerOperator`, setting alert threshold of this Sentinel Scheduled Alert Rule. Defaults to `0`. TriggerThreshold pulumi.IntPtrOutput `pulumi:"triggerThreshold"` } // NewAlertRuleScheduled registers a new resource with the given unique name, arguments, and options. func NewAlertRuleScheduled(ctx *pulumi.Context, name string, args *AlertRuleScheduledArgs, opts ...pulumi.ResourceOption) (*AlertRuleScheduled, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } if args.Query == nil { return nil, errors.New("invalid value for required argument 'Query'") } if args.Severity == nil { return nil, errors.New("invalid value for required argument 'Severity'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AlertRuleScheduled err := ctx.RegisterResource("azure:sentinel/alertRuleScheduled:AlertRuleScheduled", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAlertRuleScheduled gets an existing AlertRuleScheduled resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetAlertRuleScheduled(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AlertRuleScheduledState, opts ...pulumi.ResourceOption) (*AlertRuleScheduled, error) { var resource AlertRuleScheduled err := ctx.ReadResource("azure:sentinel/alertRuleScheduled:AlertRuleScheduled", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AlertRuleScheduled resources. type alertRuleScheduledState struct { // An `alertDetailsOverride` block as defined below. AlertDetailsOverrides []AlertRuleScheduledAlertDetailsOverride `pulumi:"alertDetailsOverrides"` // The GUID of the alert rule template which is used for this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel Scheduled Alert Rule to be created. AlertRuleTemplateGuid *string `pulumi:"alertRuleTemplateGuid"` // The version of the alert rule template which is used for this Sentinel Scheduled Alert Rule. AlertRuleTemplateVersion *string `pulumi:"alertRuleTemplateVersion"` // A map of string key-value pairs of columns to be attached to this Sentinel Scheduled Alert Rule. The key will appear as the field name in alerts and the value is the event parameter you wish to surface in the alerts. CustomDetails map[string]string `pulumi:"customDetails"` // The description of this Sentinel Scheduled Alert Rule. Description *string `pulumi:"description"` // The friendly name of this Sentinel Scheduled Alert Rule. DisplayName *string `pulumi:"displayName"` // Should the Sentinel Scheduled Alert Rule be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // A list of `entityMapping` blocks as defined below. EntityMappings []AlertRuleScheduledEntityMapping `pulumi:"entityMappings"` // A `eventGrouping` block as defined below. EventGrouping *AlertRuleScheduledEventGrouping `pulumi:"eventGrouping"` // A `incident` block as defined below. Incident *AlertRuleScheduledIncident `pulumi:"incident"` // The ID of the Log Analytics Workspace this Sentinel Scheduled Alert Rule belongs to. Changing this forces a new Sentinel Scheduled Alert Rule to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel Scheduled Alert Rule to be created. Name *string `pulumi:"name"` // The query of this Sentinel Scheduled Alert Rule. Query *string `pulumi:"query"` // The ISO 8601 timespan duration between two consecutive queries. Defaults to `PT5H`. QueryFrequency *string `pulumi:"queryFrequency"` // The ISO 8601 timespan duration, which determine the time period of the data covered by the query. For example, it can query the past 10 minutes of data, or the past 6 hours of data. Defaults to `PT5H`. // // > **Note:** `queryPeriod` must larger than or equal to `queryFrequency`, which ensures there is no gaps in the overall query coverage. QueryPeriod *string `pulumi:"queryPeriod"` // A list of `sentinelEntityMapping` blocks as defined below. // // > **Note:** `entityMapping` and `sentinelEntityMapping` together can't exceed 10. SentinelEntityMappings []AlertRuleScheduledSentinelEntityMapping `pulumi:"sentinelEntityMappings"` // The alert severity of this Sentinel Scheduled Alert Rule. Possible values are `High`, `Medium`, `Low` and `Informational`. Severity *string `pulumi:"severity"` // If `suppressionEnabled` is `true`, this is ISO 8601 timespan duration, which specifies the amount of time the query should stop running after alert is generated. Defaults to `PT5H`. // // > **Note:** `suppressionDuration` must larger than or equal to `queryFrequency`, otherwise the suppression has no actual effect since no query will happen during the suppression duration. SuppressionDuration *string `pulumi:"suppressionDuration"` // Should the Sentinel Scheduled Alert Rulea stop running query after alert is generated? Defaults to `false`. SuppressionEnabled *bool `pulumi:"suppressionEnabled"` // A list of categories of attacks by which to classify the rule. Possible values are `Collection`, `CommandAndControl`, `CredentialAccess`, `DefenseEvasion`, `Discovery`, `Execution`, `Exfiltration`, `ImpairProcessControl`, `InhibitResponseFunction`, `Impact`, `InitialAccess`, `LateralMovement`, `Persistence`, `PrivilegeEscalation`, `PreAttack`, `Reconnaissance` and `ResourceDevelopment`. Tactics []string `pulumi:"tactics"` // A list of techniques of attacks by which to classify the rule. Techniques []string `pulumi:"techniques"` // The alert trigger operator, combined with `triggerThreshold`, setting alert threshold of this Sentinel Scheduled Alert Rule. Possible values are `Equal`, `GreaterThan`, `LessThan`, `NotEqual`. Defaults to `GreaterThan`. TriggerOperator *string `pulumi:"triggerOperator"` // The baseline number of query results generated, combined with `triggerOperator`, setting alert threshold of this Sentinel Scheduled Alert Rule. Defaults to `0`. TriggerThreshold *int `pulumi:"triggerThreshold"` } type AlertRuleScheduledState struct { // An `alertDetailsOverride` block as defined below. AlertDetailsOverrides AlertRuleScheduledAlertDetailsOverrideArrayInput // The GUID of the alert rule template which is used for this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel Scheduled Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringPtrInput // The version of the alert rule template which is used for this Sentinel Scheduled Alert Rule. AlertRuleTemplateVersion pulumi.StringPtrInput // A map of string key-value pairs of columns to be attached to this Sentinel Scheduled Alert Rule. The key will appear as the field name in alerts and the value is the event parameter you wish to surface in the alerts. CustomDetails pulumi.StringMapInput // The description of this Sentinel Scheduled Alert Rule. Description pulumi.StringPtrInput // The friendly name of this Sentinel Scheduled Alert Rule. DisplayName pulumi.StringPtrInput // Should the Sentinel Scheduled Alert Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // A list of `entityMapping` blocks as defined below. EntityMappings AlertRuleScheduledEntityMappingArrayInput // A `eventGrouping` block as defined below. EventGrouping AlertRuleScheduledEventGroupingPtrInput // A `incident` block as defined below. Incident AlertRuleScheduledIncidentPtrInput // The ID of the Log Analytics Workspace this Sentinel Scheduled Alert Rule belongs to. Changing this forces a new Sentinel Scheduled Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel Scheduled Alert Rule to be created. Name pulumi.StringPtrInput // The query of this Sentinel Scheduled Alert Rule. Query pulumi.StringPtrInput // The ISO 8601 timespan duration between two consecutive queries. Defaults to `PT5H`. QueryFrequency pulumi.StringPtrInput // The ISO 8601 timespan duration, which determine the time period of the data covered by the query. For example, it can query the past 10 minutes of data, or the past 6 hours of data. Defaults to `PT5H`. // // > **Note:** `queryPeriod` must larger than or equal to `queryFrequency`, which ensures there is no gaps in the overall query coverage. QueryPeriod pulumi.StringPtrInput // A list of `sentinelEntityMapping` blocks as defined below. // // > **Note:** `entityMapping` and `sentinelEntityMapping` together can't exceed 10. SentinelEntityMappings AlertRuleScheduledSentinelEntityMappingArrayInput // The alert severity of this Sentinel Scheduled Alert Rule. Possible values are `High`, `Medium`, `Low` and `Informational`. Severity pulumi.StringPtrInput // If `suppressionEnabled` is `true`, this is ISO 8601 timespan duration, which specifies the amount of time the query should stop running after alert is generated. Defaults to `PT5H`. // // > **Note:** `suppressionDuration` must larger than or equal to `queryFrequency`, otherwise the suppression has no actual effect since no query will happen during the suppression duration. SuppressionDuration pulumi.StringPtrInput // Should the Sentinel Scheduled Alert Rulea stop running query after alert is generated? Defaults to `false`. SuppressionEnabled pulumi.BoolPtrInput // A list of categories of attacks by which to classify the rule. Possible values are `Collection`, `CommandAndControl`, `CredentialAccess`, `DefenseEvasion`, `Discovery`, `Execution`, `Exfiltration`, `ImpairProcessControl`, `InhibitResponseFunction`, `Impact`, `InitialAccess`, `LateralMovement`, `Persistence`, `PrivilegeEscalation`, `PreAttack`, `Reconnaissance` and `ResourceDevelopment`. Tactics pulumi.StringArrayInput // A list of techniques of attacks by which to classify the rule. Techniques pulumi.StringArrayInput // The alert trigger operator, combined with `triggerThreshold`, setting alert threshold of this Sentinel Scheduled Alert Rule. Possible values are `Equal`, `GreaterThan`, `LessThan`, `NotEqual`. Defaults to `GreaterThan`. TriggerOperator pulumi.StringPtrInput // The baseline number of query results generated, combined with `triggerOperator`, setting alert threshold of this Sentinel Scheduled Alert Rule. Defaults to `0`. TriggerThreshold pulumi.IntPtrInput } func (AlertRuleScheduledState) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleScheduledState)(nil)).Elem() } type alertRuleScheduledArgs struct { // An `alertDetailsOverride` block as defined below. AlertDetailsOverrides []AlertRuleScheduledAlertDetailsOverride `pulumi:"alertDetailsOverrides"` // The GUID of the alert rule template which is used for this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel Scheduled Alert Rule to be created. AlertRuleTemplateGuid *string `pulumi:"alertRuleTemplateGuid"` // The version of the alert rule template which is used for this Sentinel Scheduled Alert Rule. AlertRuleTemplateVersion *string `pulumi:"alertRuleTemplateVersion"` // A map of string key-value pairs of columns to be attached to this Sentinel Scheduled Alert Rule. The key will appear as the field name in alerts and the value is the event parameter you wish to surface in the alerts. CustomDetails map[string]string `pulumi:"customDetails"` // The description of this Sentinel Scheduled Alert Rule. Description *string `pulumi:"description"` // The friendly name of this Sentinel Scheduled Alert Rule. DisplayName string `pulumi:"displayName"` // Should the Sentinel Scheduled Alert Rule be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // A list of `entityMapping` blocks as defined below. EntityMappings []AlertRuleScheduledEntityMapping `pulumi:"entityMappings"` // A `eventGrouping` block as defined below. EventGrouping *AlertRuleScheduledEventGrouping `pulumi:"eventGrouping"` // A `incident` block as defined below. Incident *AlertRuleScheduledIncident `pulumi:"incident"` // The ID of the Log Analytics Workspace this Sentinel Scheduled Alert Rule belongs to. Changing this forces a new Sentinel Scheduled Alert Rule to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel Scheduled Alert Rule to be created. Name *string `pulumi:"name"` // The query of this Sentinel Scheduled Alert Rule. Query string `pulumi:"query"` // The ISO 8601 timespan duration between two consecutive queries. Defaults to `PT5H`. QueryFrequency *string `pulumi:"queryFrequency"` // The ISO 8601 timespan duration, which determine the time period of the data covered by the query. For example, it can query the past 10 minutes of data, or the past 6 hours of data. Defaults to `PT5H`. // // > **Note:** `queryPeriod` must larger than or equal to `queryFrequency`, which ensures there is no gaps in the overall query coverage. QueryPeriod *string `pulumi:"queryPeriod"` // A list of `sentinelEntityMapping` blocks as defined below. // // > **Note:** `entityMapping` and `sentinelEntityMapping` together can't exceed 10. SentinelEntityMappings []AlertRuleScheduledSentinelEntityMapping `pulumi:"sentinelEntityMappings"` // The alert severity of this Sentinel Scheduled Alert Rule. Possible values are `High`, `Medium`, `Low` and `Informational`. Severity string `pulumi:"severity"` // If `suppressionEnabled` is `true`, this is ISO 8601 timespan duration, which specifies the amount of time the query should stop running after alert is generated. Defaults to `PT5H`. // // > **Note:** `suppressionDuration` must larger than or equal to `queryFrequency`, otherwise the suppression has no actual effect since no query will happen during the suppression duration. SuppressionDuration *string `pulumi:"suppressionDuration"` // Should the Sentinel Scheduled Alert Rulea stop running query after alert is generated? Defaults to `false`. SuppressionEnabled *bool `pulumi:"suppressionEnabled"` // A list of categories of attacks by which to classify the rule. Possible values are `Collection`, `CommandAndControl`, `CredentialAccess`, `DefenseEvasion`, `Discovery`, `Execution`, `Exfiltration`, `ImpairProcessControl`, `InhibitResponseFunction`, `Impact`, `InitialAccess`, `LateralMovement`, `Persistence`, `PrivilegeEscalation`, `PreAttack`, `Reconnaissance` and `ResourceDevelopment`. Tactics []string `pulumi:"tactics"` // A list of techniques of attacks by which to classify the rule. Techniques []string `pulumi:"techniques"` // The alert trigger operator, combined with `triggerThreshold`, setting alert threshold of this Sentinel Scheduled Alert Rule. Possible values are `Equal`, `GreaterThan`, `LessThan`, `NotEqual`. Defaults to `GreaterThan`. TriggerOperator *string `pulumi:"triggerOperator"` // The baseline number of query results generated, combined with `triggerOperator`, setting alert threshold of this Sentinel Scheduled Alert Rule. Defaults to `0`. TriggerThreshold *int `pulumi:"triggerThreshold"` } // The set of arguments for constructing a AlertRuleScheduled resource. type AlertRuleScheduledArgs struct { // An `alertDetailsOverride` block as defined below. AlertDetailsOverrides AlertRuleScheduledAlertDetailsOverrideArrayInput // The GUID of the alert rule template which is used for this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel Scheduled Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringPtrInput // The version of the alert rule template which is used for this Sentinel Scheduled Alert Rule. AlertRuleTemplateVersion pulumi.StringPtrInput // A map of string key-value pairs of columns to be attached to this Sentinel Scheduled Alert Rule. The key will appear as the field name in alerts and the value is the event parameter you wish to surface in the alerts. CustomDetails pulumi.StringMapInput // The description of this Sentinel Scheduled Alert Rule. Description pulumi.StringPtrInput // The friendly name of this Sentinel Scheduled Alert Rule. DisplayName pulumi.StringInput // Should the Sentinel Scheduled Alert Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // A list of `entityMapping` blocks as defined below. EntityMappings AlertRuleScheduledEntityMappingArrayInput // A `eventGrouping` block as defined below. EventGrouping AlertRuleScheduledEventGroupingPtrInput // A `incident` block as defined below. Incident AlertRuleScheduledIncidentPtrInput // The ID of the Log Analytics Workspace this Sentinel Scheduled Alert Rule belongs to. Changing this forces a new Sentinel Scheduled Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel Scheduled Alert Rule to be created. Name pulumi.StringPtrInput // The query of this Sentinel Scheduled Alert Rule. Query pulumi.StringInput // The ISO 8601 timespan duration between two consecutive queries. Defaults to `PT5H`. QueryFrequency pulumi.StringPtrInput // The ISO 8601 timespan duration, which determine the time period of the data covered by the query. For example, it can query the past 10 minutes of data, or the past 6 hours of data. Defaults to `PT5H`. // // > **Note:** `queryPeriod` must larger than or equal to `queryFrequency`, which ensures there is no gaps in the overall query coverage. QueryPeriod pulumi.StringPtrInput // A list of `sentinelEntityMapping` blocks as defined below. // // > **Note:** `entityMapping` and `sentinelEntityMapping` together can't exceed 10. SentinelEntityMappings AlertRuleScheduledSentinelEntityMappingArrayInput // The alert severity of this Sentinel Scheduled Alert Rule. Possible values are `High`, `Medium`, `Low` and `Informational`. Severity pulumi.StringInput // If `suppressionEnabled` is `true`, this is ISO 8601 timespan duration, which specifies the amount of time the query should stop running after alert is generated. Defaults to `PT5H`. // // > **Note:** `suppressionDuration` must larger than or equal to `queryFrequency`, otherwise the suppression has no actual effect since no query will happen during the suppression duration. SuppressionDuration pulumi.StringPtrInput // Should the Sentinel Scheduled Alert Rulea stop running query after alert is generated? Defaults to `false`. SuppressionEnabled pulumi.BoolPtrInput // A list of categories of attacks by which to classify the rule. Possible values are `Collection`, `CommandAndControl`, `CredentialAccess`, `DefenseEvasion`, `Discovery`, `Execution`, `Exfiltration`, `ImpairProcessControl`, `InhibitResponseFunction`, `Impact`, `InitialAccess`, `LateralMovement`, `Persistence`, `PrivilegeEscalation`, `PreAttack`, `Reconnaissance` and `ResourceDevelopment`. Tactics pulumi.StringArrayInput // A list of techniques of attacks by which to classify the rule. Techniques pulumi.StringArrayInput // The alert trigger operator, combined with `triggerThreshold`, setting alert threshold of this Sentinel Scheduled Alert Rule. Possible values are `Equal`, `GreaterThan`, `LessThan`, `NotEqual`. Defaults to `GreaterThan`. TriggerOperator pulumi.StringPtrInput // The baseline number of query results generated, combined with `triggerOperator`, setting alert threshold of this Sentinel Scheduled Alert Rule. Defaults to `0`. TriggerThreshold pulumi.IntPtrInput } func (AlertRuleScheduledArgs) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleScheduledArgs)(nil)).Elem() } type AlertRuleScheduledInput interface { pulumi.Input ToAlertRuleScheduledOutput() AlertRuleScheduledOutput ToAlertRuleScheduledOutputWithContext(ctx context.Context) AlertRuleScheduledOutput } func (*AlertRuleScheduled) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleScheduled)(nil)).Elem() } func (i *AlertRuleScheduled) ToAlertRuleScheduledOutput() AlertRuleScheduledOutput { return i.ToAlertRuleScheduledOutputWithContext(context.Background()) } func (i *AlertRuleScheduled) ToAlertRuleScheduledOutputWithContext(ctx context.Context) AlertRuleScheduledOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleScheduledOutput) } // AlertRuleScheduledArrayInput is an input type that accepts AlertRuleScheduledArray and AlertRuleScheduledArrayOutput values. // You can construct a concrete instance of `AlertRuleScheduledArrayInput` via: // // AlertRuleScheduledArray{ AlertRuleScheduledArgs{...} } type AlertRuleScheduledArrayInput interface { pulumi.Input ToAlertRuleScheduledArrayOutput() AlertRuleScheduledArrayOutput ToAlertRuleScheduledArrayOutputWithContext(context.Context) AlertRuleScheduledArrayOutput } type AlertRuleScheduledArray []AlertRuleScheduledInput func (AlertRuleScheduledArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertRuleScheduled)(nil)).Elem() } func (i AlertRuleScheduledArray) ToAlertRuleScheduledArrayOutput() AlertRuleScheduledArrayOutput { return i.ToAlertRuleScheduledArrayOutputWithContext(context.Background()) } func (i AlertRuleScheduledArray) ToAlertRuleScheduledArrayOutputWithContext(ctx context.Context) AlertRuleScheduledArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleScheduledArrayOutput) } // AlertRuleScheduledMapInput is an input type that accepts AlertRuleScheduledMap and AlertRuleScheduledMapOutput values. // You can construct a concrete instance of `AlertRuleScheduledMapInput` via: // // AlertRuleScheduledMap{ "key": AlertRuleScheduledArgs{...} } type AlertRuleScheduledMapInput interface { pulumi.Input ToAlertRuleScheduledMapOutput() AlertRuleScheduledMapOutput ToAlertRuleScheduledMapOutputWithContext(context.Context) AlertRuleScheduledMapOutput } type AlertRuleScheduledMap map[string]AlertRuleScheduledInput func (AlertRuleScheduledMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertRuleScheduled)(nil)).Elem() } func (i AlertRuleScheduledMap) ToAlertRuleScheduledMapOutput() AlertRuleScheduledMapOutput { return i.ToAlertRuleScheduledMapOutputWithContext(context.Background()) } func (i AlertRuleScheduledMap) ToAlertRuleScheduledMapOutputWithContext(ctx context.Context) AlertRuleScheduledMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleScheduledMapOutput) } type AlertRuleScheduledOutput struct{ *pulumi.OutputState } func (AlertRuleScheduledOutput) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleScheduled)(nil)).Elem() } func (o AlertRuleScheduledOutput) ToAlertRuleScheduledOutput() AlertRuleScheduledOutput { return o } func (o AlertRuleScheduledOutput) ToAlertRuleScheduledOutputWithContext(ctx context.Context) AlertRuleScheduledOutput { return o } // An `alertDetailsOverride` block as defined below. func (o AlertRuleScheduledOutput) AlertDetailsOverrides() AlertRuleScheduledAlertDetailsOverrideArrayOutput { return o.ApplyT(func(v *AlertRuleScheduled) AlertRuleScheduledAlertDetailsOverrideArrayOutput { return v.AlertDetailsOverrides }).(AlertRuleScheduledAlertDetailsOverrideArrayOutput) } // The GUID of the alert rule template which is used for this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel Scheduled Alert Rule to be created. func (o AlertRuleScheduledOutput) AlertRuleTemplateGuid() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertRuleScheduled) pulumi.StringPtrOutput { return v.AlertRuleTemplateGuid }).(pulumi.StringPtrOutput) } // The version of the alert rule template which is used for this Sentinel Scheduled Alert Rule. func (o AlertRuleScheduledOutput) AlertRuleTemplateVersion() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertRuleScheduled) pulumi.StringPtrOutput { return v.AlertRuleTemplateVersion }).(pulumi.StringPtrOutput) } // A map of string key-value pairs of columns to be attached to this Sentinel Scheduled Alert Rule. The key will appear as the field name in alerts and the value is the event parameter you wish to surface in the alerts. func (o AlertRuleScheduledOutput) CustomDetails() pulumi.StringMapOutput { return o.ApplyT(func(v *AlertRuleScheduled) pulumi.StringMapOutput { return v.CustomDetails }).(pulumi.StringMapOutput) } // The description of this Sentinel Scheduled Alert Rule. func (o AlertRuleScheduledOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertRuleScheduled) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorOfficePowerBi.go
sdk/go/azure/sentinel/dataConnectorOfficePowerBi.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Office Power BI Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorOfficePowerBi(ctx, "example", &sentinel.DataConnectorOfficePowerBiArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Office Power BI Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorOfficePowerBi:DataConnectorOfficePowerBi example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorOfficePowerBi struct { pulumi.CustomResourceState // The ID of the Log Analytics Workspace that this Office Power BI Data Connector resides in. Changing this forces a new Office Power BI Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Office Power BI Data Connector. Changing this forces a new Office Power BI Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the tenant that this Office Power BI Data Connector connects to. Changing this forces a new Office Power BI Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewDataConnectorOfficePowerBi registers a new resource with the given unique name, arguments, and options. func NewDataConnectorOfficePowerBi(ctx *pulumi.Context, name string, args *DataConnectorOfficePowerBiArgs, opts ...pulumi.ResourceOption) (*DataConnectorOfficePowerBi, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorOfficePowerBi err := ctx.RegisterResource("azure:sentinel/dataConnectorOfficePowerBi:DataConnectorOfficePowerBi", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorOfficePowerBi gets an existing DataConnectorOfficePowerBi resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorOfficePowerBi(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorOfficePowerBiState, opts ...pulumi.ResourceOption) (*DataConnectorOfficePowerBi, error) { var resource DataConnectorOfficePowerBi err := ctx.ReadResource("azure:sentinel/dataConnectorOfficePowerBi:DataConnectorOfficePowerBi", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorOfficePowerBi resources. type dataConnectorOfficePowerBiState struct { // The ID of the Log Analytics Workspace that this Office Power BI Data Connector resides in. Changing this forces a new Office Power BI Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Office Power BI Data Connector. Changing this forces a new Office Power BI Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Office Power BI Data Connector connects to. Changing this forces a new Office Power BI Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } type DataConnectorOfficePowerBiState struct { // The ID of the Log Analytics Workspace that this Office Power BI Data Connector resides in. Changing this forces a new Office Power BI Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Office Power BI Data Connector. Changing this forces a new Office Power BI Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Office Power BI Data Connector connects to. Changing this forces a new Office Power BI Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorOfficePowerBiState) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorOfficePowerBiState)(nil)).Elem() } type dataConnectorOfficePowerBiArgs struct { // The ID of the Log Analytics Workspace that this Office Power BI Data Connector resides in. Changing this forces a new Office Power BI Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Office Power BI Data Connector. Changing this forces a new Office Power BI Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Office Power BI Data Connector connects to. Changing this forces a new Office Power BI Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } // The set of arguments for constructing a DataConnectorOfficePowerBi resource. type DataConnectorOfficePowerBiArgs struct { // The ID of the Log Analytics Workspace that this Office Power BI Data Connector resides in. Changing this forces a new Office Power BI Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Office Power BI Data Connector. Changing this forces a new Office Power BI Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Office Power BI Data Connector connects to. Changing this forces a new Office Power BI Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorOfficePowerBiArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorOfficePowerBiArgs)(nil)).Elem() } type DataConnectorOfficePowerBiInput interface { pulumi.Input ToDataConnectorOfficePowerBiOutput() DataConnectorOfficePowerBiOutput ToDataConnectorOfficePowerBiOutputWithContext(ctx context.Context) DataConnectorOfficePowerBiOutput } func (*DataConnectorOfficePowerBi) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorOfficePowerBi)(nil)).Elem() } func (i *DataConnectorOfficePowerBi) ToDataConnectorOfficePowerBiOutput() DataConnectorOfficePowerBiOutput { return i.ToDataConnectorOfficePowerBiOutputWithContext(context.Background()) } func (i *DataConnectorOfficePowerBi) ToDataConnectorOfficePowerBiOutputWithContext(ctx context.Context) DataConnectorOfficePowerBiOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorOfficePowerBiOutput) } // DataConnectorOfficePowerBiArrayInput is an input type that accepts DataConnectorOfficePowerBiArray and DataConnectorOfficePowerBiArrayOutput values. // You can construct a concrete instance of `DataConnectorOfficePowerBiArrayInput` via: // // DataConnectorOfficePowerBiArray{ DataConnectorOfficePowerBiArgs{...} } type DataConnectorOfficePowerBiArrayInput interface { pulumi.Input ToDataConnectorOfficePowerBiArrayOutput() DataConnectorOfficePowerBiArrayOutput ToDataConnectorOfficePowerBiArrayOutputWithContext(context.Context) DataConnectorOfficePowerBiArrayOutput } type DataConnectorOfficePowerBiArray []DataConnectorOfficePowerBiInput func (DataConnectorOfficePowerBiArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorOfficePowerBi)(nil)).Elem() } func (i DataConnectorOfficePowerBiArray) ToDataConnectorOfficePowerBiArrayOutput() DataConnectorOfficePowerBiArrayOutput { return i.ToDataConnectorOfficePowerBiArrayOutputWithContext(context.Background()) } func (i DataConnectorOfficePowerBiArray) ToDataConnectorOfficePowerBiArrayOutputWithContext(ctx context.Context) DataConnectorOfficePowerBiArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorOfficePowerBiArrayOutput) } // DataConnectorOfficePowerBiMapInput is an input type that accepts DataConnectorOfficePowerBiMap and DataConnectorOfficePowerBiMapOutput values. // You can construct a concrete instance of `DataConnectorOfficePowerBiMapInput` via: // // DataConnectorOfficePowerBiMap{ "key": DataConnectorOfficePowerBiArgs{...} } type DataConnectorOfficePowerBiMapInput interface { pulumi.Input ToDataConnectorOfficePowerBiMapOutput() DataConnectorOfficePowerBiMapOutput ToDataConnectorOfficePowerBiMapOutputWithContext(context.Context) DataConnectorOfficePowerBiMapOutput } type DataConnectorOfficePowerBiMap map[string]DataConnectorOfficePowerBiInput func (DataConnectorOfficePowerBiMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorOfficePowerBi)(nil)).Elem() } func (i DataConnectorOfficePowerBiMap) ToDataConnectorOfficePowerBiMapOutput() DataConnectorOfficePowerBiMapOutput { return i.ToDataConnectorOfficePowerBiMapOutputWithContext(context.Background()) } func (i DataConnectorOfficePowerBiMap) ToDataConnectorOfficePowerBiMapOutputWithContext(ctx context.Context) DataConnectorOfficePowerBiMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorOfficePowerBiMapOutput) } type DataConnectorOfficePowerBiOutput struct{ *pulumi.OutputState } func (DataConnectorOfficePowerBiOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorOfficePowerBi)(nil)).Elem() } func (o DataConnectorOfficePowerBiOutput) ToDataConnectorOfficePowerBiOutput() DataConnectorOfficePowerBiOutput { return o } func (o DataConnectorOfficePowerBiOutput) ToDataConnectorOfficePowerBiOutputWithContext(ctx context.Context) DataConnectorOfficePowerBiOutput { return o } // The ID of the Log Analytics Workspace that this Office Power BI Data Connector resides in. Changing this forces a new Office Power BI Data Connector to be created. func (o DataConnectorOfficePowerBiOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorOfficePowerBi) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Office Power BI Data Connector. Changing this forces a new Office Power BI Data Connector to be created. func (o DataConnectorOfficePowerBiOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorOfficePowerBi) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the tenant that this Office Power BI Data Connector connects to. Changing this forces a new Office Power BI Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. func (o DataConnectorOfficePowerBiOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorOfficePowerBi) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type DataConnectorOfficePowerBiArrayOutput struct{ *pulumi.OutputState } func (DataConnectorOfficePowerBiArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorOfficePowerBi)(nil)).Elem() } func (o DataConnectorOfficePowerBiArrayOutput) ToDataConnectorOfficePowerBiArrayOutput() DataConnectorOfficePowerBiArrayOutput { return o } func (o DataConnectorOfficePowerBiArrayOutput) ToDataConnectorOfficePowerBiArrayOutputWithContext(ctx context.Context) DataConnectorOfficePowerBiArrayOutput { return o } func (o DataConnectorOfficePowerBiArrayOutput) Index(i pulumi.IntInput) DataConnectorOfficePowerBiOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorOfficePowerBi { return vs[0].([]*DataConnectorOfficePowerBi)[vs[1].(int)] }).(DataConnectorOfficePowerBiOutput) } type DataConnectorOfficePowerBiMapOutput struct{ *pulumi.OutputState } func (DataConnectorOfficePowerBiMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorOfficePowerBi)(nil)).Elem() } func (o DataConnectorOfficePowerBiMapOutput) ToDataConnectorOfficePowerBiMapOutput() DataConnectorOfficePowerBiMapOutput { return o } func (o DataConnectorOfficePowerBiMapOutput) ToDataConnectorOfficePowerBiMapOutputWithContext(ctx context.Context) DataConnectorOfficePowerBiMapOutput { return o } func (o DataConnectorOfficePowerBiMapOutput) MapIndex(k pulumi.StringInput) DataConnectorOfficePowerBiOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorOfficePowerBi { return vs[0].(map[string]*DataConnectorOfficePowerBi)[vs[1].(string)] }).(DataConnectorOfficePowerBiOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorOfficePowerBiInput)(nil)).Elem(), &DataConnectorOfficePowerBi{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorOfficePowerBiArrayInput)(nil)).Elem(), DataConnectorOfficePowerBiArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorOfficePowerBiMapInput)(nil)).Elem(), DataConnectorOfficePowerBiMap{}) pulumi.RegisterOutputType(DataConnectorOfficePowerBiOutput{}) pulumi.RegisterOutputType(DataConnectorOfficePowerBiArrayOutput{}) pulumi.RegisterOutputType(DataConnectorOfficePowerBiMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/getAlertRuleTemplate.go
sdk/go/azure/sentinel/getAlertRuleTemplate.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Sentinel Alert Rule Template. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := sentinel.GetAlertRuleTemplate(ctx, &sentinel.GetAlertRuleTemplateArgs{ // LogAnalyticsWorkspaceId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1", // DisplayName: pulumi.StringRef("Create incidents based on Azure Security Center for IoT alerts"), // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // return nil // }) // } // // ``` func GetAlertRuleTemplate(ctx *pulumi.Context, args *GetAlertRuleTemplateArgs, opts ...pulumi.InvokeOption) (*GetAlertRuleTemplateResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetAlertRuleTemplateResult err := ctx.Invoke("azure:sentinel/getAlertRuleTemplate:getAlertRuleTemplate", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getAlertRuleTemplate. type GetAlertRuleTemplateArgs struct { // The display name of this Sentinel Alert Rule Template. Either `displayName` or `name` have to be specified. // // > **Note:** As `displayName` is not unique, errors may occur when there are multiple Sentinel Alert Rule Template with same `displayName`. DisplayName *string `pulumi:"displayName"` // The ID of the Log Analytics Workspace. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name of this Sentinel Alert Rule Template. Either `displayName` or `name` have to be specified. Name *string `pulumi:"name"` } // A collection of values returned by getAlertRuleTemplate. type GetAlertRuleTemplateResult struct { DisplayName string `pulumi:"displayName"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` Name string `pulumi:"name"` // A `nrtTemplate` block as defined below. This only applies to Sentinel NRT Alert Rule Template. NrtTemplates []GetAlertRuleTemplateNrtTemplate `pulumi:"nrtTemplates"` // A `scheduledTemplate` block as defined below. This only applies to Sentinel Scheduled Alert Rule Template. ScheduledTemplates []GetAlertRuleTemplateScheduledTemplate `pulumi:"scheduledTemplates"` // A `securityIncidentTemplate` block as defined below. This only applies to Sentinel MS Security Incident Alert Rule Template. SecurityIncidentTemplates []GetAlertRuleTemplateSecurityIncidentTemplate `pulumi:"securityIncidentTemplates"` } func GetAlertRuleTemplateOutput(ctx *pulumi.Context, args GetAlertRuleTemplateOutputArgs, opts ...pulumi.InvokeOption) GetAlertRuleTemplateResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetAlertRuleTemplateResultOutput, error) { args := v.(GetAlertRuleTemplateArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:sentinel/getAlertRuleTemplate:getAlertRuleTemplate", args, GetAlertRuleTemplateResultOutput{}, options).(GetAlertRuleTemplateResultOutput), nil }).(GetAlertRuleTemplateResultOutput) } // A collection of arguments for invoking getAlertRuleTemplate. type GetAlertRuleTemplateOutputArgs struct { // The display name of this Sentinel Alert Rule Template. Either `displayName` or `name` have to be specified. // // > **Note:** As `displayName` is not unique, errors may occur when there are multiple Sentinel Alert Rule Template with same `displayName`. DisplayName pulumi.StringPtrInput `pulumi:"displayName"` // The ID of the Log Analytics Workspace. LogAnalyticsWorkspaceId pulumi.StringInput `pulumi:"logAnalyticsWorkspaceId"` // The name of this Sentinel Alert Rule Template. Either `displayName` or `name` have to be specified. Name pulumi.StringPtrInput `pulumi:"name"` } func (GetAlertRuleTemplateOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetAlertRuleTemplateArgs)(nil)).Elem() } // A collection of values returned by getAlertRuleTemplate. type GetAlertRuleTemplateResultOutput struct{ *pulumi.OutputState } func (GetAlertRuleTemplateResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetAlertRuleTemplateResult)(nil)).Elem() } func (o GetAlertRuleTemplateResultOutput) ToGetAlertRuleTemplateResultOutput() GetAlertRuleTemplateResultOutput { return o } func (o GetAlertRuleTemplateResultOutput) ToGetAlertRuleTemplateResultOutputWithContext(ctx context.Context) GetAlertRuleTemplateResultOutput { return o } func (o GetAlertRuleTemplateResultOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleTemplateResult) string { return v.DisplayName }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetAlertRuleTemplateResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleTemplateResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetAlertRuleTemplateResultOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleTemplateResult) string { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } func (o GetAlertRuleTemplateResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetAlertRuleTemplateResult) string { return v.Name }).(pulumi.StringOutput) } // A `nrtTemplate` block as defined below. This only applies to Sentinel NRT Alert Rule Template. func (o GetAlertRuleTemplateResultOutput) NrtTemplates() GetAlertRuleTemplateNrtTemplateArrayOutput { return o.ApplyT(func(v GetAlertRuleTemplateResult) []GetAlertRuleTemplateNrtTemplate { return v.NrtTemplates }).(GetAlertRuleTemplateNrtTemplateArrayOutput) } // A `scheduledTemplate` block as defined below. This only applies to Sentinel Scheduled Alert Rule Template. func (o GetAlertRuleTemplateResultOutput) ScheduledTemplates() GetAlertRuleTemplateScheduledTemplateArrayOutput { return o.ApplyT(func(v GetAlertRuleTemplateResult) []GetAlertRuleTemplateScheduledTemplate { return v.ScheduledTemplates }).(GetAlertRuleTemplateScheduledTemplateArrayOutput) } // A `securityIncidentTemplate` block as defined below. This only applies to Sentinel MS Security Incident Alert Rule Template. func (o GetAlertRuleTemplateResultOutput) SecurityIncidentTemplates() GetAlertRuleTemplateSecurityIncidentTemplateArrayOutput { return o.ApplyT(func(v GetAlertRuleTemplateResult) []GetAlertRuleTemplateSecurityIncidentTemplate { return v.SecurityIncidentTemplates }).(GetAlertRuleTemplateSecurityIncidentTemplateArrayOutput) } func init() { pulumi.RegisterOutputType(GetAlertRuleTemplateResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/alertRuleAnomalyDuplicate.go
sdk/go/azure/sentinel/alertRuleAnomalyDuplicate.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Duplicated Anomaly Alert Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-law"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // CustomerManagedKeyEnabled: pulumi.Bool(false), // }) // if err != nil { // return err // } // example := sentinel.GetAlertRuleAnomalyOutput(ctx, sentinel.GetAlertRuleAnomalyOutputArgs{ // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // DisplayName: pulumi.String("UEBA Anomalous Sign In"), // }, nil) // _, err = sentinel.NewAlertRuleAnomalyDuplicate(ctx, "example", &sentinel.AlertRuleAnomalyDuplicateArgs{ // DisplayName: pulumi.String("example duplicated UEBA Anomalous Sign In"), // LogAnalyticsWorkspaceId: exampleAnalyticsWorkspace.ID(), // BuiltInRuleId: pulumi.String(example.ApplyT(func(example sentinel.GetAlertRuleAnomalyResult) (*string, error) { // return &example.Id, nil // }).(pulumi.StringPtrOutput)), // Enabled: pulumi.Bool(true), // Mode: pulumi.String("Flighting"), // ThresholdObservations: sentinel.AlertRuleAnomalyDuplicateThresholdObservationArray{ // &sentinel.AlertRuleAnomalyDuplicateThresholdObservationArgs{ // Name: pulumi.String("Anomaly score threshold"), // Value: pulumi.String("0.6"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Built In Anomaly Alert Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/alertRuleAnomalyDuplicate:AlertRuleAnomalyDuplicate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings/setting1 // ``` type AlertRuleAnomalyDuplicate struct { pulumi.CustomResourceState // The version of the Anomaly Security ML Analytics Settings. AnomalySettingsVersion pulumi.IntOutput `pulumi:"anomalySettingsVersion"` // The anomaly version of the Anomaly Alert Rule. AnomalyVersion pulumi.StringOutput `pulumi:"anomalyVersion"` // The ID of the built-in Anomaly Alert Rule. Changing this forces a new Duplicated Anomaly Alert Rule to be created. BuiltInRuleId pulumi.StringOutput `pulumi:"builtInRuleId"` // The description of the Anomaly Alert Rule. Description pulumi.StringOutput `pulumi:"description"` // The Display Name of the built-in Anomaly Alert Rule. DisplayName pulumi.StringOutput `pulumi:"displayName"` // Should the Duplicated Anomaly Alert Rule be enabled? Enabled pulumi.BoolOutput `pulumi:"enabled"` // The frequency the Anomaly Alert Rule will be run, such as "P1D". Frequency pulumi.StringOutput `pulumi:"frequency"` // Whether the current settings of the Anomaly Alert Rule equals default settings. IsDefaultSettings pulumi.BoolOutput `pulumi:"isDefaultSettings"` // The ID of the Log Analytics Workspace. Changing this forces a new Duplicated Anomaly Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // mode of the Duplicated Anomaly Alert Rule. Possible Values are `Production` and `Flighting`. Mode pulumi.StringOutput `pulumi:"mode"` // A list of `multiSelectObservation` blocks as defined below. MultiSelectObservations AlertRuleAnomalyDuplicateMultiSelectObservationArrayOutput `pulumi:"multiSelectObservations"` Name pulumi.StringOutput `pulumi:"name"` // A list of `prioritizedExcludeObservation` blocks as defined below. PrioritizedExcludeObservations AlertRuleAnomalyDuplicatePrioritizedExcludeObservationArrayOutput `pulumi:"prioritizedExcludeObservations"` // A `requiredDataConnector` block as defined below. RequiredDataConnectors AlertRuleAnomalyDuplicateRequiredDataConnectorArrayOutput `pulumi:"requiredDataConnectors"` // The ID of the anomaly settings definition Id. SettingsDefinitionId pulumi.StringOutput `pulumi:"settingsDefinitionId"` // A list of `singleSelectObservation` blocks as defined below. SingleSelectObservations AlertRuleAnomalyDuplicateSingleSelectObservationArrayOutput `pulumi:"singleSelectObservations"` // A list of categories of attacks by which to classify the rule. Tactics pulumi.StringArrayOutput `pulumi:"tactics"` // A list of techniques of attacks by which to classify the rule. Techniques pulumi.StringArrayOutput `pulumi:"techniques"` // A list of `thresholdObservation` blocks as defined below. // // > **Note:** un-specified `multiSelectObservation`, `singleSelectObservation`, `prioritizedExcludeObservation` and `thresholdObservation` will be inherited from the built-in Anomaly Alert Rule. ThresholdObservations AlertRuleAnomalyDuplicateThresholdObservationArrayOutput `pulumi:"thresholdObservations"` } // NewAlertRuleAnomalyDuplicate registers a new resource with the given unique name, arguments, and options. func NewAlertRuleAnomalyDuplicate(ctx *pulumi.Context, name string, args *AlertRuleAnomalyDuplicateArgs, opts ...pulumi.ResourceOption) (*AlertRuleAnomalyDuplicate, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.BuiltInRuleId == nil { return nil, errors.New("invalid value for required argument 'BuiltInRuleId'") } if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } if args.Enabled == nil { return nil, errors.New("invalid value for required argument 'Enabled'") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } if args.Mode == nil { return nil, errors.New("invalid value for required argument 'Mode'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AlertRuleAnomalyDuplicate err := ctx.RegisterResource("azure:sentinel/alertRuleAnomalyDuplicate:AlertRuleAnomalyDuplicate", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAlertRuleAnomalyDuplicate gets an existing AlertRuleAnomalyDuplicate resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetAlertRuleAnomalyDuplicate(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AlertRuleAnomalyDuplicateState, opts ...pulumi.ResourceOption) (*AlertRuleAnomalyDuplicate, error) { var resource AlertRuleAnomalyDuplicate err := ctx.ReadResource("azure:sentinel/alertRuleAnomalyDuplicate:AlertRuleAnomalyDuplicate", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AlertRuleAnomalyDuplicate resources. type alertRuleAnomalyDuplicateState struct { // The version of the Anomaly Security ML Analytics Settings. AnomalySettingsVersion *int `pulumi:"anomalySettingsVersion"` // The anomaly version of the Anomaly Alert Rule. AnomalyVersion *string `pulumi:"anomalyVersion"` // The ID of the built-in Anomaly Alert Rule. Changing this forces a new Duplicated Anomaly Alert Rule to be created. BuiltInRuleId *string `pulumi:"builtInRuleId"` // The description of the Anomaly Alert Rule. Description *string `pulumi:"description"` // The Display Name of the built-in Anomaly Alert Rule. DisplayName *string `pulumi:"displayName"` // Should the Duplicated Anomaly Alert Rule be enabled? Enabled *bool `pulumi:"enabled"` // The frequency the Anomaly Alert Rule will be run, such as "P1D". Frequency *string `pulumi:"frequency"` // Whether the current settings of the Anomaly Alert Rule equals default settings. IsDefaultSettings *bool `pulumi:"isDefaultSettings"` // The ID of the Log Analytics Workspace. Changing this forces a new Duplicated Anomaly Alert Rule to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // mode of the Duplicated Anomaly Alert Rule. Possible Values are `Production` and `Flighting`. Mode *string `pulumi:"mode"` // A list of `multiSelectObservation` blocks as defined below. MultiSelectObservations []AlertRuleAnomalyDuplicateMultiSelectObservation `pulumi:"multiSelectObservations"` Name *string `pulumi:"name"` // A list of `prioritizedExcludeObservation` blocks as defined below. PrioritizedExcludeObservations []AlertRuleAnomalyDuplicatePrioritizedExcludeObservation `pulumi:"prioritizedExcludeObservations"` // A `requiredDataConnector` block as defined below. RequiredDataConnectors []AlertRuleAnomalyDuplicateRequiredDataConnector `pulumi:"requiredDataConnectors"` // The ID of the anomaly settings definition Id. SettingsDefinitionId *string `pulumi:"settingsDefinitionId"` // A list of `singleSelectObservation` blocks as defined below. SingleSelectObservations []AlertRuleAnomalyDuplicateSingleSelectObservation `pulumi:"singleSelectObservations"` // A list of categories of attacks by which to classify the rule. Tactics []string `pulumi:"tactics"` // A list of techniques of attacks by which to classify the rule. Techniques []string `pulumi:"techniques"` // A list of `thresholdObservation` blocks as defined below. // // > **Note:** un-specified `multiSelectObservation`, `singleSelectObservation`, `prioritizedExcludeObservation` and `thresholdObservation` will be inherited from the built-in Anomaly Alert Rule. ThresholdObservations []AlertRuleAnomalyDuplicateThresholdObservation `pulumi:"thresholdObservations"` } type AlertRuleAnomalyDuplicateState struct { // The version of the Anomaly Security ML Analytics Settings. AnomalySettingsVersion pulumi.IntPtrInput // The anomaly version of the Anomaly Alert Rule. AnomalyVersion pulumi.StringPtrInput // The ID of the built-in Anomaly Alert Rule. Changing this forces a new Duplicated Anomaly Alert Rule to be created. BuiltInRuleId pulumi.StringPtrInput // The description of the Anomaly Alert Rule. Description pulumi.StringPtrInput // The Display Name of the built-in Anomaly Alert Rule. DisplayName pulumi.StringPtrInput // Should the Duplicated Anomaly Alert Rule be enabled? Enabled pulumi.BoolPtrInput // The frequency the Anomaly Alert Rule will be run, such as "P1D". Frequency pulumi.StringPtrInput // Whether the current settings of the Anomaly Alert Rule equals default settings. IsDefaultSettings pulumi.BoolPtrInput // The ID of the Log Analytics Workspace. Changing this forces a new Duplicated Anomaly Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // mode of the Duplicated Anomaly Alert Rule. Possible Values are `Production` and `Flighting`. Mode pulumi.StringPtrInput // A list of `multiSelectObservation` blocks as defined below. MultiSelectObservations AlertRuleAnomalyDuplicateMultiSelectObservationArrayInput Name pulumi.StringPtrInput // A list of `prioritizedExcludeObservation` blocks as defined below. PrioritizedExcludeObservations AlertRuleAnomalyDuplicatePrioritizedExcludeObservationArrayInput // A `requiredDataConnector` block as defined below. RequiredDataConnectors AlertRuleAnomalyDuplicateRequiredDataConnectorArrayInput // The ID of the anomaly settings definition Id. SettingsDefinitionId pulumi.StringPtrInput // A list of `singleSelectObservation` blocks as defined below. SingleSelectObservations AlertRuleAnomalyDuplicateSingleSelectObservationArrayInput // A list of categories of attacks by which to classify the rule. Tactics pulumi.StringArrayInput // A list of techniques of attacks by which to classify the rule. Techniques pulumi.StringArrayInput // A list of `thresholdObservation` blocks as defined below. // // > **Note:** un-specified `multiSelectObservation`, `singleSelectObservation`, `prioritizedExcludeObservation` and `thresholdObservation` will be inherited from the built-in Anomaly Alert Rule. ThresholdObservations AlertRuleAnomalyDuplicateThresholdObservationArrayInput } func (AlertRuleAnomalyDuplicateState) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleAnomalyDuplicateState)(nil)).Elem() } type alertRuleAnomalyDuplicateArgs struct { // The ID of the built-in Anomaly Alert Rule. Changing this forces a new Duplicated Anomaly Alert Rule to be created. BuiltInRuleId string `pulumi:"builtInRuleId"` // The Display Name of the built-in Anomaly Alert Rule. DisplayName string `pulumi:"displayName"` // Should the Duplicated Anomaly Alert Rule be enabled? Enabled bool `pulumi:"enabled"` // The ID of the Log Analytics Workspace. Changing this forces a new Duplicated Anomaly Alert Rule to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // mode of the Duplicated Anomaly Alert Rule. Possible Values are `Production` and `Flighting`. Mode string `pulumi:"mode"` // A list of `multiSelectObservation` blocks as defined below. MultiSelectObservations []AlertRuleAnomalyDuplicateMultiSelectObservation `pulumi:"multiSelectObservations"` // A list of `prioritizedExcludeObservation` blocks as defined below. PrioritizedExcludeObservations []AlertRuleAnomalyDuplicatePrioritizedExcludeObservation `pulumi:"prioritizedExcludeObservations"` // A list of `singleSelectObservation` blocks as defined below. SingleSelectObservations []AlertRuleAnomalyDuplicateSingleSelectObservation `pulumi:"singleSelectObservations"` // A list of `thresholdObservation` blocks as defined below. // // > **Note:** un-specified `multiSelectObservation`, `singleSelectObservation`, `prioritizedExcludeObservation` and `thresholdObservation` will be inherited from the built-in Anomaly Alert Rule. ThresholdObservations []AlertRuleAnomalyDuplicateThresholdObservation `pulumi:"thresholdObservations"` } // The set of arguments for constructing a AlertRuleAnomalyDuplicate resource. type AlertRuleAnomalyDuplicateArgs struct { // The ID of the built-in Anomaly Alert Rule. Changing this forces a new Duplicated Anomaly Alert Rule to be created. BuiltInRuleId pulumi.StringInput // The Display Name of the built-in Anomaly Alert Rule. DisplayName pulumi.StringInput // Should the Duplicated Anomaly Alert Rule be enabled? Enabled pulumi.BoolInput // The ID of the Log Analytics Workspace. Changing this forces a new Duplicated Anomaly Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringInput // mode of the Duplicated Anomaly Alert Rule. Possible Values are `Production` and `Flighting`. Mode pulumi.StringInput // A list of `multiSelectObservation` blocks as defined below. MultiSelectObservations AlertRuleAnomalyDuplicateMultiSelectObservationArrayInput // A list of `prioritizedExcludeObservation` blocks as defined below. PrioritizedExcludeObservations AlertRuleAnomalyDuplicatePrioritizedExcludeObservationArrayInput // A list of `singleSelectObservation` blocks as defined below. SingleSelectObservations AlertRuleAnomalyDuplicateSingleSelectObservationArrayInput // A list of `thresholdObservation` blocks as defined below. // // > **Note:** un-specified `multiSelectObservation`, `singleSelectObservation`, `prioritizedExcludeObservation` and `thresholdObservation` will be inherited from the built-in Anomaly Alert Rule. ThresholdObservations AlertRuleAnomalyDuplicateThresholdObservationArrayInput } func (AlertRuleAnomalyDuplicateArgs) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleAnomalyDuplicateArgs)(nil)).Elem() } type AlertRuleAnomalyDuplicateInput interface { pulumi.Input ToAlertRuleAnomalyDuplicateOutput() AlertRuleAnomalyDuplicateOutput ToAlertRuleAnomalyDuplicateOutputWithContext(ctx context.Context) AlertRuleAnomalyDuplicateOutput } func (*AlertRuleAnomalyDuplicate) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleAnomalyDuplicate)(nil)).Elem() } func (i *AlertRuleAnomalyDuplicate) ToAlertRuleAnomalyDuplicateOutput() AlertRuleAnomalyDuplicateOutput { return i.ToAlertRuleAnomalyDuplicateOutputWithContext(context.Background()) } func (i *AlertRuleAnomalyDuplicate) ToAlertRuleAnomalyDuplicateOutputWithContext(ctx context.Context) AlertRuleAnomalyDuplicateOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyDuplicateOutput) } // AlertRuleAnomalyDuplicateArrayInput is an input type that accepts AlertRuleAnomalyDuplicateArray and AlertRuleAnomalyDuplicateArrayOutput values. // You can construct a concrete instance of `AlertRuleAnomalyDuplicateArrayInput` via: // // AlertRuleAnomalyDuplicateArray{ AlertRuleAnomalyDuplicateArgs{...} } type AlertRuleAnomalyDuplicateArrayInput interface { pulumi.Input ToAlertRuleAnomalyDuplicateArrayOutput() AlertRuleAnomalyDuplicateArrayOutput ToAlertRuleAnomalyDuplicateArrayOutputWithContext(context.Context) AlertRuleAnomalyDuplicateArrayOutput } type AlertRuleAnomalyDuplicateArray []AlertRuleAnomalyDuplicateInput func (AlertRuleAnomalyDuplicateArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertRuleAnomalyDuplicate)(nil)).Elem() } func (i AlertRuleAnomalyDuplicateArray) ToAlertRuleAnomalyDuplicateArrayOutput() AlertRuleAnomalyDuplicateArrayOutput { return i.ToAlertRuleAnomalyDuplicateArrayOutputWithContext(context.Background()) } func (i AlertRuleAnomalyDuplicateArray) ToAlertRuleAnomalyDuplicateArrayOutputWithContext(ctx context.Context) AlertRuleAnomalyDuplicateArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyDuplicateArrayOutput) } // AlertRuleAnomalyDuplicateMapInput is an input type that accepts AlertRuleAnomalyDuplicateMap and AlertRuleAnomalyDuplicateMapOutput values. // You can construct a concrete instance of `AlertRuleAnomalyDuplicateMapInput` via: // // AlertRuleAnomalyDuplicateMap{ "key": AlertRuleAnomalyDuplicateArgs{...} } type AlertRuleAnomalyDuplicateMapInput interface { pulumi.Input ToAlertRuleAnomalyDuplicateMapOutput() AlertRuleAnomalyDuplicateMapOutput ToAlertRuleAnomalyDuplicateMapOutputWithContext(context.Context) AlertRuleAnomalyDuplicateMapOutput } type AlertRuleAnomalyDuplicateMap map[string]AlertRuleAnomalyDuplicateInput func (AlertRuleAnomalyDuplicateMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertRuleAnomalyDuplicate)(nil)).Elem() } func (i AlertRuleAnomalyDuplicateMap) ToAlertRuleAnomalyDuplicateMapOutput() AlertRuleAnomalyDuplicateMapOutput { return i.ToAlertRuleAnomalyDuplicateMapOutputWithContext(context.Background()) } func (i AlertRuleAnomalyDuplicateMap) ToAlertRuleAnomalyDuplicateMapOutputWithContext(ctx context.Context) AlertRuleAnomalyDuplicateMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyDuplicateMapOutput) } type AlertRuleAnomalyDuplicateOutput struct{ *pulumi.OutputState } func (AlertRuleAnomalyDuplicateOutput) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleAnomalyDuplicate)(nil)).Elem() } func (o AlertRuleAnomalyDuplicateOutput) ToAlertRuleAnomalyDuplicateOutput() AlertRuleAnomalyDuplicateOutput { return o } func (o AlertRuleAnomalyDuplicateOutput) ToAlertRuleAnomalyDuplicateOutputWithContext(ctx context.Context) AlertRuleAnomalyDuplicateOutput { return o } // The version of the Anomaly Security ML Analytics Settings. func (o AlertRuleAnomalyDuplicateOutput) AnomalySettingsVersion() pulumi.IntOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) pulumi.IntOutput { return v.AnomalySettingsVersion }).(pulumi.IntOutput) } // The anomaly version of the Anomaly Alert Rule. func (o AlertRuleAnomalyDuplicateOutput) AnomalyVersion() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) pulumi.StringOutput { return v.AnomalyVersion }).(pulumi.StringOutput) } // The ID of the built-in Anomaly Alert Rule. Changing this forces a new Duplicated Anomaly Alert Rule to be created. func (o AlertRuleAnomalyDuplicateOutput) BuiltInRuleId() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) pulumi.StringOutput { return v.BuiltInRuleId }).(pulumi.StringOutput) } // The description of the Anomaly Alert Rule. func (o AlertRuleAnomalyDuplicateOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput) } // The Display Name of the built-in Anomaly Alert Rule. func (o AlertRuleAnomalyDuplicateOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // Should the Duplicated Anomaly Alert Rule be enabled? func (o AlertRuleAnomalyDuplicateOutput) Enabled() pulumi.BoolOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) pulumi.BoolOutput { return v.Enabled }).(pulumi.BoolOutput) } // The frequency the Anomaly Alert Rule will be run, such as "P1D". func (o AlertRuleAnomalyDuplicateOutput) Frequency() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) pulumi.StringOutput { return v.Frequency }).(pulumi.StringOutput) } // Whether the current settings of the Anomaly Alert Rule equals default settings. func (o AlertRuleAnomalyDuplicateOutput) IsDefaultSettings() pulumi.BoolOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) pulumi.BoolOutput { return v.IsDefaultSettings }).(pulumi.BoolOutput) } // The ID of the Log Analytics Workspace. Changing this forces a new Duplicated Anomaly Alert Rule to be created. func (o AlertRuleAnomalyDuplicateOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // mode of the Duplicated Anomaly Alert Rule. Possible Values are `Production` and `Flighting`. func (o AlertRuleAnomalyDuplicateOutput) Mode() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) pulumi.StringOutput { return v.Mode }).(pulumi.StringOutput) } // A list of `multiSelectObservation` blocks as defined below. func (o AlertRuleAnomalyDuplicateOutput) MultiSelectObservations() AlertRuleAnomalyDuplicateMultiSelectObservationArrayOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) AlertRuleAnomalyDuplicateMultiSelectObservationArrayOutput { return v.MultiSelectObservations }).(AlertRuleAnomalyDuplicateMultiSelectObservationArrayOutput) } func (o AlertRuleAnomalyDuplicateOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A list of `prioritizedExcludeObservation` blocks as defined below. func (o AlertRuleAnomalyDuplicateOutput) PrioritizedExcludeObservations() AlertRuleAnomalyDuplicatePrioritizedExcludeObservationArrayOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) AlertRuleAnomalyDuplicatePrioritizedExcludeObservationArrayOutput { return v.PrioritizedExcludeObservations }).(AlertRuleAnomalyDuplicatePrioritizedExcludeObservationArrayOutput) } // A `requiredDataConnector` block as defined below. func (o AlertRuleAnomalyDuplicateOutput) RequiredDataConnectors() AlertRuleAnomalyDuplicateRequiredDataConnectorArrayOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) AlertRuleAnomalyDuplicateRequiredDataConnectorArrayOutput { return v.RequiredDataConnectors }).(AlertRuleAnomalyDuplicateRequiredDataConnectorArrayOutput) } // The ID of the anomaly settings definition Id. func (o AlertRuleAnomalyDuplicateOutput) SettingsDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) pulumi.StringOutput { return v.SettingsDefinitionId }).(pulumi.StringOutput) } // A list of `singleSelectObservation` blocks as defined below. func (o AlertRuleAnomalyDuplicateOutput) SingleSelectObservations() AlertRuleAnomalyDuplicateSingleSelectObservationArrayOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) AlertRuleAnomalyDuplicateSingleSelectObservationArrayOutput { return v.SingleSelectObservations }).(AlertRuleAnomalyDuplicateSingleSelectObservationArrayOutput) } // A list of categories of attacks by which to classify the rule. func (o AlertRuleAnomalyDuplicateOutput) Tactics() pulumi.StringArrayOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) pulumi.StringArrayOutput { return v.Tactics }).(pulumi.StringArrayOutput) } // A list of techniques of attacks by which to classify the rule. func (o AlertRuleAnomalyDuplicateOutput) Techniques() pulumi.StringArrayOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) pulumi.StringArrayOutput { return v.Techniques }).(pulumi.StringArrayOutput) } // A list of `thresholdObservation` blocks as defined below. // // > **Note:** un-specified `multiSelectObservation`, `singleSelectObservation`, `prioritizedExcludeObservation` and `thresholdObservation` will be inherited from the built-in Anomaly Alert Rule. func (o AlertRuleAnomalyDuplicateOutput) ThresholdObservations() AlertRuleAnomalyDuplicateThresholdObservationArrayOutput { return o.ApplyT(func(v *AlertRuleAnomalyDuplicate) AlertRuleAnomalyDuplicateThresholdObservationArrayOutput { return v.ThresholdObservations }).(AlertRuleAnomalyDuplicateThresholdObservationArrayOutput) } type AlertRuleAnomalyDuplicateArrayOutput struct{ *pulumi.OutputState } func (AlertRuleAnomalyDuplicateArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertRuleAnomalyDuplicate)(nil)).Elem() } func (o AlertRuleAnomalyDuplicateArrayOutput) ToAlertRuleAnomalyDuplicateArrayOutput() AlertRuleAnomalyDuplicateArrayOutput { return o } func (o AlertRuleAnomalyDuplicateArrayOutput) ToAlertRuleAnomalyDuplicateArrayOutputWithContext(ctx context.Context) AlertRuleAnomalyDuplicateArrayOutput { return o } func (o AlertRuleAnomalyDuplicateArrayOutput) Index(i pulumi.IntInput) AlertRuleAnomalyDuplicateOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AlertRuleAnomalyDuplicate { return vs[0].([]*AlertRuleAnomalyDuplicate)[vs[1].(int)] }).(AlertRuleAnomalyDuplicateOutput) } type AlertRuleAnomalyDuplicateMapOutput struct{ *pulumi.OutputState } func (AlertRuleAnomalyDuplicateMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertRuleAnomalyDuplicate)(nil)).Elem() } func (o AlertRuleAnomalyDuplicateMapOutput) ToAlertRuleAnomalyDuplicateMapOutput() AlertRuleAnomalyDuplicateMapOutput { return o } func (o AlertRuleAnomalyDuplicateMapOutput) ToAlertRuleAnomalyDuplicateMapOutputWithContext(ctx context.Context) AlertRuleAnomalyDuplicateMapOutput { return o } func (o AlertRuleAnomalyDuplicateMapOutput) MapIndex(k pulumi.StringInput) AlertRuleAnomalyDuplicateOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AlertRuleAnomalyDuplicate { return vs[0].(map[string]*AlertRuleAnomalyDuplicate)[vs[1].(string)] }).(AlertRuleAnomalyDuplicateOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleAnomalyDuplicateInput)(nil)).Elem(), &AlertRuleAnomalyDuplicate{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleAnomalyDuplicateArrayInput)(nil)).Elem(), AlertRuleAnomalyDuplicateArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleAnomalyDuplicateMapInput)(nil)).Elem(), AlertRuleAnomalyDuplicateMap{}) pulumi.RegisterOutputType(AlertRuleAnomalyDuplicateOutput{}) pulumi.RegisterOutputType(AlertRuleAnomalyDuplicateArrayOutput{}) pulumi.RegisterOutputType(AlertRuleAnomalyDuplicateMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorMicrosoftThreatProtection.go
sdk/go/azure/sentinel/dataConnectorMicrosoftThreatProtection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Microsoft Threat Protection Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorMicrosoftThreatProtection(ctx, "example", &sentinel.DataConnectorMicrosoftThreatProtectionArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Microsoft Threat Protection Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorMicrosoftThreatProtection:DataConnectorMicrosoftThreatProtection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorMicrosoftThreatProtection struct { pulumi.CustomResourceState // The ID of the Log Analytics Workspace that this Microsoft Threat Protection Data Connector resides in. Changing this forces a new Microsoft Threat Protection Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Microsoft Threat Protection Data Connector. Changing this forces a new Microsoft Threat Protection Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the tenant that this Microsoft Threat Protection Data Connector connects to. Changing this forces a new Microsoft Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewDataConnectorMicrosoftThreatProtection registers a new resource with the given unique name, arguments, and options. func NewDataConnectorMicrosoftThreatProtection(ctx *pulumi.Context, name string, args *DataConnectorMicrosoftThreatProtectionArgs, opts ...pulumi.ResourceOption) (*DataConnectorMicrosoftThreatProtection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorMicrosoftThreatProtection err := ctx.RegisterResource("azure:sentinel/dataConnectorMicrosoftThreatProtection:DataConnectorMicrosoftThreatProtection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorMicrosoftThreatProtection gets an existing DataConnectorMicrosoftThreatProtection resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorMicrosoftThreatProtection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorMicrosoftThreatProtectionState, opts ...pulumi.ResourceOption) (*DataConnectorMicrosoftThreatProtection, error) { var resource DataConnectorMicrosoftThreatProtection err := ctx.ReadResource("azure:sentinel/dataConnectorMicrosoftThreatProtection:DataConnectorMicrosoftThreatProtection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorMicrosoftThreatProtection resources. type dataConnectorMicrosoftThreatProtectionState struct { // The ID of the Log Analytics Workspace that this Microsoft Threat Protection Data Connector resides in. Changing this forces a new Microsoft Threat Protection Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Microsoft Threat Protection Data Connector. Changing this forces a new Microsoft Threat Protection Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Microsoft Threat Protection Data Connector connects to. Changing this forces a new Microsoft Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } type DataConnectorMicrosoftThreatProtectionState struct { // The ID of the Log Analytics Workspace that this Microsoft Threat Protection Data Connector resides in. Changing this forces a new Microsoft Threat Protection Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Microsoft Threat Protection Data Connector. Changing this forces a new Microsoft Threat Protection Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Microsoft Threat Protection Data Connector connects to. Changing this forces a new Microsoft Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorMicrosoftThreatProtectionState) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorMicrosoftThreatProtectionState)(nil)).Elem() } type dataConnectorMicrosoftThreatProtectionArgs struct { // The ID of the Log Analytics Workspace that this Microsoft Threat Protection Data Connector resides in. Changing this forces a new Microsoft Threat Protection Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Microsoft Threat Protection Data Connector. Changing this forces a new Microsoft Threat Protection Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Microsoft Threat Protection Data Connector connects to. Changing this forces a new Microsoft Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } // The set of arguments for constructing a DataConnectorMicrosoftThreatProtection resource. type DataConnectorMicrosoftThreatProtectionArgs struct { // The ID of the Log Analytics Workspace that this Microsoft Threat Protection Data Connector resides in. Changing this forces a new Microsoft Threat Protection Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Microsoft Threat Protection Data Connector. Changing this forces a new Microsoft Threat Protection Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Microsoft Threat Protection Data Connector connects to. Changing this forces a new Microsoft Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorMicrosoftThreatProtectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorMicrosoftThreatProtectionArgs)(nil)).Elem() } type DataConnectorMicrosoftThreatProtectionInput interface { pulumi.Input ToDataConnectorMicrosoftThreatProtectionOutput() DataConnectorMicrosoftThreatProtectionOutput ToDataConnectorMicrosoftThreatProtectionOutputWithContext(ctx context.Context) DataConnectorMicrosoftThreatProtectionOutput } func (*DataConnectorMicrosoftThreatProtection) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorMicrosoftThreatProtection)(nil)).Elem() } func (i *DataConnectorMicrosoftThreatProtection) ToDataConnectorMicrosoftThreatProtectionOutput() DataConnectorMicrosoftThreatProtectionOutput { return i.ToDataConnectorMicrosoftThreatProtectionOutputWithContext(context.Background()) } func (i *DataConnectorMicrosoftThreatProtection) ToDataConnectorMicrosoftThreatProtectionOutputWithContext(ctx context.Context) DataConnectorMicrosoftThreatProtectionOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorMicrosoftThreatProtectionOutput) } // DataConnectorMicrosoftThreatProtectionArrayInput is an input type that accepts DataConnectorMicrosoftThreatProtectionArray and DataConnectorMicrosoftThreatProtectionArrayOutput values. // You can construct a concrete instance of `DataConnectorMicrosoftThreatProtectionArrayInput` via: // // DataConnectorMicrosoftThreatProtectionArray{ DataConnectorMicrosoftThreatProtectionArgs{...} } type DataConnectorMicrosoftThreatProtectionArrayInput interface { pulumi.Input ToDataConnectorMicrosoftThreatProtectionArrayOutput() DataConnectorMicrosoftThreatProtectionArrayOutput ToDataConnectorMicrosoftThreatProtectionArrayOutputWithContext(context.Context) DataConnectorMicrosoftThreatProtectionArrayOutput } type DataConnectorMicrosoftThreatProtectionArray []DataConnectorMicrosoftThreatProtectionInput func (DataConnectorMicrosoftThreatProtectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorMicrosoftThreatProtection)(nil)).Elem() } func (i DataConnectorMicrosoftThreatProtectionArray) ToDataConnectorMicrosoftThreatProtectionArrayOutput() DataConnectorMicrosoftThreatProtectionArrayOutput { return i.ToDataConnectorMicrosoftThreatProtectionArrayOutputWithContext(context.Background()) } func (i DataConnectorMicrosoftThreatProtectionArray) ToDataConnectorMicrosoftThreatProtectionArrayOutputWithContext(ctx context.Context) DataConnectorMicrosoftThreatProtectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorMicrosoftThreatProtectionArrayOutput) } // DataConnectorMicrosoftThreatProtectionMapInput is an input type that accepts DataConnectorMicrosoftThreatProtectionMap and DataConnectorMicrosoftThreatProtectionMapOutput values. // You can construct a concrete instance of `DataConnectorMicrosoftThreatProtectionMapInput` via: // // DataConnectorMicrosoftThreatProtectionMap{ "key": DataConnectorMicrosoftThreatProtectionArgs{...} } type DataConnectorMicrosoftThreatProtectionMapInput interface { pulumi.Input ToDataConnectorMicrosoftThreatProtectionMapOutput() DataConnectorMicrosoftThreatProtectionMapOutput ToDataConnectorMicrosoftThreatProtectionMapOutputWithContext(context.Context) DataConnectorMicrosoftThreatProtectionMapOutput } type DataConnectorMicrosoftThreatProtectionMap map[string]DataConnectorMicrosoftThreatProtectionInput func (DataConnectorMicrosoftThreatProtectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorMicrosoftThreatProtection)(nil)).Elem() } func (i DataConnectorMicrosoftThreatProtectionMap) ToDataConnectorMicrosoftThreatProtectionMapOutput() DataConnectorMicrosoftThreatProtectionMapOutput { return i.ToDataConnectorMicrosoftThreatProtectionMapOutputWithContext(context.Background()) } func (i DataConnectorMicrosoftThreatProtectionMap) ToDataConnectorMicrosoftThreatProtectionMapOutputWithContext(ctx context.Context) DataConnectorMicrosoftThreatProtectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorMicrosoftThreatProtectionMapOutput) } type DataConnectorMicrosoftThreatProtectionOutput struct{ *pulumi.OutputState } func (DataConnectorMicrosoftThreatProtectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorMicrosoftThreatProtection)(nil)).Elem() } func (o DataConnectorMicrosoftThreatProtectionOutput) ToDataConnectorMicrosoftThreatProtectionOutput() DataConnectorMicrosoftThreatProtectionOutput { return o } func (o DataConnectorMicrosoftThreatProtectionOutput) ToDataConnectorMicrosoftThreatProtectionOutputWithContext(ctx context.Context) DataConnectorMicrosoftThreatProtectionOutput { return o } // The ID of the Log Analytics Workspace that this Microsoft Threat Protection Data Connector resides in. Changing this forces a new Microsoft Threat Protection Data Connector to be created. func (o DataConnectorMicrosoftThreatProtectionOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorMicrosoftThreatProtection) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Microsoft Threat Protection Data Connector. Changing this forces a new Microsoft Threat Protection Data Connector to be created. func (o DataConnectorMicrosoftThreatProtectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorMicrosoftThreatProtection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the tenant that this Microsoft Threat Protection Data Connector connects to. Changing this forces a new Microsoft Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. func (o DataConnectorMicrosoftThreatProtectionOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorMicrosoftThreatProtection) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type DataConnectorMicrosoftThreatProtectionArrayOutput struct{ *pulumi.OutputState } func (DataConnectorMicrosoftThreatProtectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorMicrosoftThreatProtection)(nil)).Elem() } func (o DataConnectorMicrosoftThreatProtectionArrayOutput) ToDataConnectorMicrosoftThreatProtectionArrayOutput() DataConnectorMicrosoftThreatProtectionArrayOutput { return o } func (o DataConnectorMicrosoftThreatProtectionArrayOutput) ToDataConnectorMicrosoftThreatProtectionArrayOutputWithContext(ctx context.Context) DataConnectorMicrosoftThreatProtectionArrayOutput { return o } func (o DataConnectorMicrosoftThreatProtectionArrayOutput) Index(i pulumi.IntInput) DataConnectorMicrosoftThreatProtectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorMicrosoftThreatProtection { return vs[0].([]*DataConnectorMicrosoftThreatProtection)[vs[1].(int)] }).(DataConnectorMicrosoftThreatProtectionOutput) } type DataConnectorMicrosoftThreatProtectionMapOutput struct{ *pulumi.OutputState } func (DataConnectorMicrosoftThreatProtectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorMicrosoftThreatProtection)(nil)).Elem() } func (o DataConnectorMicrosoftThreatProtectionMapOutput) ToDataConnectorMicrosoftThreatProtectionMapOutput() DataConnectorMicrosoftThreatProtectionMapOutput { return o } func (o DataConnectorMicrosoftThreatProtectionMapOutput) ToDataConnectorMicrosoftThreatProtectionMapOutputWithContext(ctx context.Context) DataConnectorMicrosoftThreatProtectionMapOutput { return o } func (o DataConnectorMicrosoftThreatProtectionMapOutput) MapIndex(k pulumi.StringInput) DataConnectorMicrosoftThreatProtectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorMicrosoftThreatProtection { return vs[0].(map[string]*DataConnectorMicrosoftThreatProtection)[vs[1].(string)] }).(DataConnectorMicrosoftThreatProtectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorMicrosoftThreatProtectionInput)(nil)).Elem(), &DataConnectorMicrosoftThreatProtection{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorMicrosoftThreatProtectionArrayInput)(nil)).Elem(), DataConnectorMicrosoftThreatProtectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorMicrosoftThreatProtectionMapInput)(nil)).Elem(), DataConnectorMicrosoftThreatProtectionMap{}) pulumi.RegisterOutputType(DataConnectorMicrosoftThreatProtectionOutput{}) pulumi.RegisterOutputType(DataConnectorMicrosoftThreatProtectionArrayOutput{}) pulumi.RegisterOutputType(DataConnectorMicrosoftThreatProtectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorAwsCloudTrail.go
sdk/go/azure/sentinel/dataConnectorAwsCloudTrail.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a AWS CloudTrail Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorAwsCloudTrail(ctx, "example", &sentinel.DataConnectorAwsCloudTrailArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // AwsRoleArn: pulumi.String("arn:aws:iam::000000000000:role/role1"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // AWS CloudTrail Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorAwsCloudTrail:DataConnectorAwsCloudTrail example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorAwsCloudTrail struct { pulumi.CustomResourceState // The ARN of the AWS CloudTrail role, which is connected to this AWS CloudTrail Data Connector. AwsRoleArn pulumi.StringOutput `pulumi:"awsRoleArn"` // The ID of the Log Analytics Workspace that this AWS CloudTrail Data Connector resides in. Changing this forces a new AWS CloudTrail Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this AWS CloudTrail Data Connector. Changing this forces a new AWS CloudTrail Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` } // NewDataConnectorAwsCloudTrail registers a new resource with the given unique name, arguments, and options. func NewDataConnectorAwsCloudTrail(ctx *pulumi.Context, name string, args *DataConnectorAwsCloudTrailArgs, opts ...pulumi.ResourceOption) (*DataConnectorAwsCloudTrail, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.AwsRoleArn == nil { return nil, errors.New("invalid value for required argument 'AwsRoleArn'") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorAwsCloudTrail err := ctx.RegisterResource("azure:sentinel/dataConnectorAwsCloudTrail:DataConnectorAwsCloudTrail", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorAwsCloudTrail gets an existing DataConnectorAwsCloudTrail resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorAwsCloudTrail(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorAwsCloudTrailState, opts ...pulumi.ResourceOption) (*DataConnectorAwsCloudTrail, error) { var resource DataConnectorAwsCloudTrail err := ctx.ReadResource("azure:sentinel/dataConnectorAwsCloudTrail:DataConnectorAwsCloudTrail", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorAwsCloudTrail resources. type dataConnectorAwsCloudTrailState struct { // The ARN of the AWS CloudTrail role, which is connected to this AWS CloudTrail Data Connector. AwsRoleArn *string `pulumi:"awsRoleArn"` // The ID of the Log Analytics Workspace that this AWS CloudTrail Data Connector resides in. Changing this forces a new AWS CloudTrail Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this AWS CloudTrail Data Connector. Changing this forces a new AWS CloudTrail Data Connector to be created. Name *string `pulumi:"name"` } type DataConnectorAwsCloudTrailState struct { // The ARN of the AWS CloudTrail role, which is connected to this AWS CloudTrail Data Connector. AwsRoleArn pulumi.StringPtrInput // The ID of the Log Analytics Workspace that this AWS CloudTrail Data Connector resides in. Changing this forces a new AWS CloudTrail Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this AWS CloudTrail Data Connector. Changing this forces a new AWS CloudTrail Data Connector to be created. Name pulumi.StringPtrInput } func (DataConnectorAwsCloudTrailState) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorAwsCloudTrailState)(nil)).Elem() } type dataConnectorAwsCloudTrailArgs struct { // The ARN of the AWS CloudTrail role, which is connected to this AWS CloudTrail Data Connector. AwsRoleArn string `pulumi:"awsRoleArn"` // The ID of the Log Analytics Workspace that this AWS CloudTrail Data Connector resides in. Changing this forces a new AWS CloudTrail Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this AWS CloudTrail Data Connector. Changing this forces a new AWS CloudTrail Data Connector to be created. Name *string `pulumi:"name"` } // The set of arguments for constructing a DataConnectorAwsCloudTrail resource. type DataConnectorAwsCloudTrailArgs struct { // The ARN of the AWS CloudTrail role, which is connected to this AWS CloudTrail Data Connector. AwsRoleArn pulumi.StringInput // The ID of the Log Analytics Workspace that this AWS CloudTrail Data Connector resides in. Changing this forces a new AWS CloudTrail Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this AWS CloudTrail Data Connector. Changing this forces a new AWS CloudTrail Data Connector to be created. Name pulumi.StringPtrInput } func (DataConnectorAwsCloudTrailArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorAwsCloudTrailArgs)(nil)).Elem() } type DataConnectorAwsCloudTrailInput interface { pulumi.Input ToDataConnectorAwsCloudTrailOutput() DataConnectorAwsCloudTrailOutput ToDataConnectorAwsCloudTrailOutputWithContext(ctx context.Context) DataConnectorAwsCloudTrailOutput } func (*DataConnectorAwsCloudTrail) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorAwsCloudTrail)(nil)).Elem() } func (i *DataConnectorAwsCloudTrail) ToDataConnectorAwsCloudTrailOutput() DataConnectorAwsCloudTrailOutput { return i.ToDataConnectorAwsCloudTrailOutputWithContext(context.Background()) } func (i *DataConnectorAwsCloudTrail) ToDataConnectorAwsCloudTrailOutputWithContext(ctx context.Context) DataConnectorAwsCloudTrailOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorAwsCloudTrailOutput) } // DataConnectorAwsCloudTrailArrayInput is an input type that accepts DataConnectorAwsCloudTrailArray and DataConnectorAwsCloudTrailArrayOutput values. // You can construct a concrete instance of `DataConnectorAwsCloudTrailArrayInput` via: // // DataConnectorAwsCloudTrailArray{ DataConnectorAwsCloudTrailArgs{...} } type DataConnectorAwsCloudTrailArrayInput interface { pulumi.Input ToDataConnectorAwsCloudTrailArrayOutput() DataConnectorAwsCloudTrailArrayOutput ToDataConnectorAwsCloudTrailArrayOutputWithContext(context.Context) DataConnectorAwsCloudTrailArrayOutput } type DataConnectorAwsCloudTrailArray []DataConnectorAwsCloudTrailInput func (DataConnectorAwsCloudTrailArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorAwsCloudTrail)(nil)).Elem() } func (i DataConnectorAwsCloudTrailArray) ToDataConnectorAwsCloudTrailArrayOutput() DataConnectorAwsCloudTrailArrayOutput { return i.ToDataConnectorAwsCloudTrailArrayOutputWithContext(context.Background()) } func (i DataConnectorAwsCloudTrailArray) ToDataConnectorAwsCloudTrailArrayOutputWithContext(ctx context.Context) DataConnectorAwsCloudTrailArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorAwsCloudTrailArrayOutput) } // DataConnectorAwsCloudTrailMapInput is an input type that accepts DataConnectorAwsCloudTrailMap and DataConnectorAwsCloudTrailMapOutput values. // You can construct a concrete instance of `DataConnectorAwsCloudTrailMapInput` via: // // DataConnectorAwsCloudTrailMap{ "key": DataConnectorAwsCloudTrailArgs{...} } type DataConnectorAwsCloudTrailMapInput interface { pulumi.Input ToDataConnectorAwsCloudTrailMapOutput() DataConnectorAwsCloudTrailMapOutput ToDataConnectorAwsCloudTrailMapOutputWithContext(context.Context) DataConnectorAwsCloudTrailMapOutput } type DataConnectorAwsCloudTrailMap map[string]DataConnectorAwsCloudTrailInput func (DataConnectorAwsCloudTrailMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorAwsCloudTrail)(nil)).Elem() } func (i DataConnectorAwsCloudTrailMap) ToDataConnectorAwsCloudTrailMapOutput() DataConnectorAwsCloudTrailMapOutput { return i.ToDataConnectorAwsCloudTrailMapOutputWithContext(context.Background()) } func (i DataConnectorAwsCloudTrailMap) ToDataConnectorAwsCloudTrailMapOutputWithContext(ctx context.Context) DataConnectorAwsCloudTrailMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorAwsCloudTrailMapOutput) } type DataConnectorAwsCloudTrailOutput struct{ *pulumi.OutputState } func (DataConnectorAwsCloudTrailOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorAwsCloudTrail)(nil)).Elem() } func (o DataConnectorAwsCloudTrailOutput) ToDataConnectorAwsCloudTrailOutput() DataConnectorAwsCloudTrailOutput { return o } func (o DataConnectorAwsCloudTrailOutput) ToDataConnectorAwsCloudTrailOutputWithContext(ctx context.Context) DataConnectorAwsCloudTrailOutput { return o } // The ARN of the AWS CloudTrail role, which is connected to this AWS CloudTrail Data Connector. func (o DataConnectorAwsCloudTrailOutput) AwsRoleArn() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAwsCloudTrail) pulumi.StringOutput { return v.AwsRoleArn }).(pulumi.StringOutput) } // The ID of the Log Analytics Workspace that this AWS CloudTrail Data Connector resides in. Changing this forces a new AWS CloudTrail Data Connector to be created. func (o DataConnectorAwsCloudTrailOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAwsCloudTrail) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this AWS CloudTrail Data Connector. Changing this forces a new AWS CloudTrail Data Connector to be created. func (o DataConnectorAwsCloudTrailOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAwsCloudTrail) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } type DataConnectorAwsCloudTrailArrayOutput struct{ *pulumi.OutputState } func (DataConnectorAwsCloudTrailArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorAwsCloudTrail)(nil)).Elem() } func (o DataConnectorAwsCloudTrailArrayOutput) ToDataConnectorAwsCloudTrailArrayOutput() DataConnectorAwsCloudTrailArrayOutput { return o } func (o DataConnectorAwsCloudTrailArrayOutput) ToDataConnectorAwsCloudTrailArrayOutputWithContext(ctx context.Context) DataConnectorAwsCloudTrailArrayOutput { return o } func (o DataConnectorAwsCloudTrailArrayOutput) Index(i pulumi.IntInput) DataConnectorAwsCloudTrailOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorAwsCloudTrail { return vs[0].([]*DataConnectorAwsCloudTrail)[vs[1].(int)] }).(DataConnectorAwsCloudTrailOutput) } type DataConnectorAwsCloudTrailMapOutput struct{ *pulumi.OutputState } func (DataConnectorAwsCloudTrailMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorAwsCloudTrail)(nil)).Elem() } func (o DataConnectorAwsCloudTrailMapOutput) ToDataConnectorAwsCloudTrailMapOutput() DataConnectorAwsCloudTrailMapOutput { return o } func (o DataConnectorAwsCloudTrailMapOutput) ToDataConnectorAwsCloudTrailMapOutputWithContext(ctx context.Context) DataConnectorAwsCloudTrailMapOutput { return o } func (o DataConnectorAwsCloudTrailMapOutput) MapIndex(k pulumi.StringInput) DataConnectorAwsCloudTrailOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorAwsCloudTrail { return vs[0].(map[string]*DataConnectorAwsCloudTrail)[vs[1].(string)] }).(DataConnectorAwsCloudTrailOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorAwsCloudTrailInput)(nil)).Elem(), &DataConnectorAwsCloudTrail{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorAwsCloudTrailArrayInput)(nil)).Elem(), DataConnectorAwsCloudTrailArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorAwsCloudTrailMapInput)(nil)).Elem(), DataConnectorAwsCloudTrailMap{}) pulumi.RegisterOutputType(DataConnectorAwsCloudTrailOutput{}) pulumi.RegisterOutputType(DataConnectorAwsCloudTrailArrayOutput{}) pulumi.RegisterOutputType(DataConnectorAwsCloudTrailMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/alertRuleThreatIntelligence.go
sdk/go/azure/sentinel/alertRuleThreatIntelligence.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Sentinel Threat Intelligence Alert Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Sku: pulumi.String("pergb2018"), // }) // if err != nil { // return err // } // exampleAnalyticsSolution, err := operationalinsights.NewAnalyticsSolution(ctx, "example", &operationalinsights.AnalyticsSolutionArgs{ // SolutionName: pulumi.String("SecurityInsights"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // WorkspaceResourceId: exampleAnalyticsWorkspace.ID(), // WorkspaceName: exampleAnalyticsWorkspace.Name, // Plan: &operationalinsights.AnalyticsSolutionPlanArgs{ // Publisher: pulumi.String("Microsoft"), // Product: pulumi.String("OMSGallery/SecurityInsights"), // }, // }) // if err != nil { // return err // } // example := sentinel.GetAlertRuleTemplateOutput(ctx, sentinel.GetAlertRuleTemplateOutputArgs{ // DisplayName: pulumi.String("(Preview) Microsoft Defender Threat Intelligence Analytics"), // LogAnalyticsWorkspaceId: exampleAnalyticsSolution.WorkspaceResourceId, // }, nil) // _, err = sentinel.NewAlertRuleThreatIntelligence(ctx, "example", &sentinel.AlertRuleThreatIntelligenceArgs{ // Name: pulumi.String("example-rule"), // LogAnalyticsWorkspaceId: exampleAnalyticsSolution.WorkspaceResourceId, // AlertRuleTemplateGuid: pulumi.String(example.ApplyT(func(example sentinel.GetAlertRuleTemplateResult) (*string, error) { // return &example.Name, nil // }).(pulumi.StringPtrOutput)), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.OperationalInsights` - 2023-12-01-preview // // ## Import // // Sentinel Threat Intelligence Alert Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/alertRuleThreatIntelligence:AlertRuleThreatIntelligence example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/alertRules/rule1 // ``` type AlertRuleThreatIntelligence struct { pulumi.CustomResourceState // The GUID of the alert rule template which is used for this Sentinel Threat Intelligence Alert Rule. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringOutput `pulumi:"alertRuleTemplateGuid"` // Whether the Threat Intelligence Alert rule enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // The ID of the Log Analytics Workspace this Sentinel Threat Intelligence Alert Rule belongs to. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel Threat Intelligence Alert Rule. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. Name pulumi.StringOutput `pulumi:"name"` } // NewAlertRuleThreatIntelligence registers a new resource with the given unique name, arguments, and options. func NewAlertRuleThreatIntelligence(ctx *pulumi.Context, name string, args *AlertRuleThreatIntelligenceArgs, opts ...pulumi.ResourceOption) (*AlertRuleThreatIntelligence, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.AlertRuleTemplateGuid == nil { return nil, errors.New("invalid value for required argument 'AlertRuleTemplateGuid'") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AlertRuleThreatIntelligence err := ctx.RegisterResource("azure:sentinel/alertRuleThreatIntelligence:AlertRuleThreatIntelligence", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAlertRuleThreatIntelligence gets an existing AlertRuleThreatIntelligence resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetAlertRuleThreatIntelligence(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AlertRuleThreatIntelligenceState, opts ...pulumi.ResourceOption) (*AlertRuleThreatIntelligence, error) { var resource AlertRuleThreatIntelligence err := ctx.ReadResource("azure:sentinel/alertRuleThreatIntelligence:AlertRuleThreatIntelligence", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AlertRuleThreatIntelligence resources. type alertRuleThreatIntelligenceState struct { // The GUID of the alert rule template which is used for this Sentinel Threat Intelligence Alert Rule. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. AlertRuleTemplateGuid *string `pulumi:"alertRuleTemplateGuid"` // Whether the Threat Intelligence Alert rule enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The ID of the Log Analytics Workspace this Sentinel Threat Intelligence Alert Rule belongs to. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel Threat Intelligence Alert Rule. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. Name *string `pulumi:"name"` } type AlertRuleThreatIntelligenceState struct { // The GUID of the alert rule template which is used for this Sentinel Threat Intelligence Alert Rule. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringPtrInput // Whether the Threat Intelligence Alert rule enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The ID of the Log Analytics Workspace this Sentinel Threat Intelligence Alert Rule belongs to. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Sentinel Threat Intelligence Alert Rule. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. Name pulumi.StringPtrInput } func (AlertRuleThreatIntelligenceState) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleThreatIntelligenceState)(nil)).Elem() } type alertRuleThreatIntelligenceArgs struct { // The GUID of the alert rule template which is used for this Sentinel Threat Intelligence Alert Rule. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. AlertRuleTemplateGuid string `pulumi:"alertRuleTemplateGuid"` // Whether the Threat Intelligence Alert rule enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The ID of the Log Analytics Workspace this Sentinel Threat Intelligence Alert Rule belongs to. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel Threat Intelligence Alert Rule. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. Name *string `pulumi:"name"` } // The set of arguments for constructing a AlertRuleThreatIntelligence resource. type AlertRuleThreatIntelligenceArgs struct { // The GUID of the alert rule template which is used for this Sentinel Threat Intelligence Alert Rule. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringInput // Whether the Threat Intelligence Alert rule enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The ID of the Log Analytics Workspace this Sentinel Threat Intelligence Alert Rule belongs to. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Sentinel Threat Intelligence Alert Rule. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. Name pulumi.StringPtrInput } func (AlertRuleThreatIntelligenceArgs) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleThreatIntelligenceArgs)(nil)).Elem() } type AlertRuleThreatIntelligenceInput interface { pulumi.Input ToAlertRuleThreatIntelligenceOutput() AlertRuleThreatIntelligenceOutput ToAlertRuleThreatIntelligenceOutputWithContext(ctx context.Context) AlertRuleThreatIntelligenceOutput } func (*AlertRuleThreatIntelligence) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleThreatIntelligence)(nil)).Elem() } func (i *AlertRuleThreatIntelligence) ToAlertRuleThreatIntelligenceOutput() AlertRuleThreatIntelligenceOutput { return i.ToAlertRuleThreatIntelligenceOutputWithContext(context.Background()) } func (i *AlertRuleThreatIntelligence) ToAlertRuleThreatIntelligenceOutputWithContext(ctx context.Context) AlertRuleThreatIntelligenceOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleThreatIntelligenceOutput) } // AlertRuleThreatIntelligenceArrayInput is an input type that accepts AlertRuleThreatIntelligenceArray and AlertRuleThreatIntelligenceArrayOutput values. // You can construct a concrete instance of `AlertRuleThreatIntelligenceArrayInput` via: // // AlertRuleThreatIntelligenceArray{ AlertRuleThreatIntelligenceArgs{...} } type AlertRuleThreatIntelligenceArrayInput interface { pulumi.Input ToAlertRuleThreatIntelligenceArrayOutput() AlertRuleThreatIntelligenceArrayOutput ToAlertRuleThreatIntelligenceArrayOutputWithContext(context.Context) AlertRuleThreatIntelligenceArrayOutput } type AlertRuleThreatIntelligenceArray []AlertRuleThreatIntelligenceInput func (AlertRuleThreatIntelligenceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertRuleThreatIntelligence)(nil)).Elem() } func (i AlertRuleThreatIntelligenceArray) ToAlertRuleThreatIntelligenceArrayOutput() AlertRuleThreatIntelligenceArrayOutput { return i.ToAlertRuleThreatIntelligenceArrayOutputWithContext(context.Background()) } func (i AlertRuleThreatIntelligenceArray) ToAlertRuleThreatIntelligenceArrayOutputWithContext(ctx context.Context) AlertRuleThreatIntelligenceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleThreatIntelligenceArrayOutput) } // AlertRuleThreatIntelligenceMapInput is an input type that accepts AlertRuleThreatIntelligenceMap and AlertRuleThreatIntelligenceMapOutput values. // You can construct a concrete instance of `AlertRuleThreatIntelligenceMapInput` via: // // AlertRuleThreatIntelligenceMap{ "key": AlertRuleThreatIntelligenceArgs{...} } type AlertRuleThreatIntelligenceMapInput interface { pulumi.Input ToAlertRuleThreatIntelligenceMapOutput() AlertRuleThreatIntelligenceMapOutput ToAlertRuleThreatIntelligenceMapOutputWithContext(context.Context) AlertRuleThreatIntelligenceMapOutput } type AlertRuleThreatIntelligenceMap map[string]AlertRuleThreatIntelligenceInput func (AlertRuleThreatIntelligenceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertRuleThreatIntelligence)(nil)).Elem() } func (i AlertRuleThreatIntelligenceMap) ToAlertRuleThreatIntelligenceMapOutput() AlertRuleThreatIntelligenceMapOutput { return i.ToAlertRuleThreatIntelligenceMapOutputWithContext(context.Background()) } func (i AlertRuleThreatIntelligenceMap) ToAlertRuleThreatIntelligenceMapOutputWithContext(ctx context.Context) AlertRuleThreatIntelligenceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleThreatIntelligenceMapOutput) } type AlertRuleThreatIntelligenceOutput struct{ *pulumi.OutputState } func (AlertRuleThreatIntelligenceOutput) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleThreatIntelligence)(nil)).Elem() } func (o AlertRuleThreatIntelligenceOutput) ToAlertRuleThreatIntelligenceOutput() AlertRuleThreatIntelligenceOutput { return o } func (o AlertRuleThreatIntelligenceOutput) ToAlertRuleThreatIntelligenceOutputWithContext(ctx context.Context) AlertRuleThreatIntelligenceOutput { return o } // The GUID of the alert rule template which is used for this Sentinel Threat Intelligence Alert Rule. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. func (o AlertRuleThreatIntelligenceOutput) AlertRuleTemplateGuid() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleThreatIntelligence) pulumi.StringOutput { return v.AlertRuleTemplateGuid }).(pulumi.StringOutput) } // Whether the Threat Intelligence Alert rule enabled? Defaults to `true`. func (o AlertRuleThreatIntelligenceOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AlertRuleThreatIntelligence) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // The ID of the Log Analytics Workspace this Sentinel Threat Intelligence Alert Rule belongs to. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. func (o AlertRuleThreatIntelligenceOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleThreatIntelligence) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Sentinel Threat Intelligence Alert Rule. Changing this forces a new Sentinel Threat Intelligence Alert Rule to be created. func (o AlertRuleThreatIntelligenceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleThreatIntelligence) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } type AlertRuleThreatIntelligenceArrayOutput struct{ *pulumi.OutputState } func (AlertRuleThreatIntelligenceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertRuleThreatIntelligence)(nil)).Elem() } func (o AlertRuleThreatIntelligenceArrayOutput) ToAlertRuleThreatIntelligenceArrayOutput() AlertRuleThreatIntelligenceArrayOutput { return o } func (o AlertRuleThreatIntelligenceArrayOutput) ToAlertRuleThreatIntelligenceArrayOutputWithContext(ctx context.Context) AlertRuleThreatIntelligenceArrayOutput { return o } func (o AlertRuleThreatIntelligenceArrayOutput) Index(i pulumi.IntInput) AlertRuleThreatIntelligenceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AlertRuleThreatIntelligence { return vs[0].([]*AlertRuleThreatIntelligence)[vs[1].(int)] }).(AlertRuleThreatIntelligenceOutput) } type AlertRuleThreatIntelligenceMapOutput struct{ *pulumi.OutputState } func (AlertRuleThreatIntelligenceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertRuleThreatIntelligence)(nil)).Elem() } func (o AlertRuleThreatIntelligenceMapOutput) ToAlertRuleThreatIntelligenceMapOutput() AlertRuleThreatIntelligenceMapOutput { return o } func (o AlertRuleThreatIntelligenceMapOutput) ToAlertRuleThreatIntelligenceMapOutputWithContext(ctx context.Context) AlertRuleThreatIntelligenceMapOutput { return o } func (o AlertRuleThreatIntelligenceMapOutput) MapIndex(k pulumi.StringInput) AlertRuleThreatIntelligenceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AlertRuleThreatIntelligence { return vs[0].(map[string]*AlertRuleThreatIntelligence)[vs[1].(string)] }).(AlertRuleThreatIntelligenceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleThreatIntelligenceInput)(nil)).Elem(), &AlertRuleThreatIntelligence{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleThreatIntelligenceArrayInput)(nil)).Elem(), AlertRuleThreatIntelligenceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleThreatIntelligenceMapInput)(nil)).Elem(), AlertRuleThreatIntelligenceMap{}) pulumi.RegisterOutputType(AlertRuleThreatIntelligenceOutput{}) pulumi.RegisterOutputType(AlertRuleThreatIntelligenceArrayOutput{}) pulumi.RegisterOutputType(AlertRuleThreatIntelligenceMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorAzureActiveDirectory.go
sdk/go/azure/sentinel/dataConnectorAzureActiveDirectory.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Azure Active Directory Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorAzureActiveDirectory(ctx, "example", &sentinel.DataConnectorAzureActiveDirectoryArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Azure Active Directory Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorAzureActiveDirectory:DataConnectorAzureActiveDirectory example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorAzureActiveDirectory struct { pulumi.CustomResourceState // The ID of the Log Analytics Workspace that this Azure Active Directory Data Connector resides in. Changing this forces a new Azure Active Directory Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Azure Active Directory Data Connector. Changing this forces a new Azure Active Directory Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the tenant that this Azure Active Directory Data Connector connects to. Changing this forces a new Azure Active Directory Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewDataConnectorAzureActiveDirectory registers a new resource with the given unique name, arguments, and options. func NewDataConnectorAzureActiveDirectory(ctx *pulumi.Context, name string, args *DataConnectorAzureActiveDirectoryArgs, opts ...pulumi.ResourceOption) (*DataConnectorAzureActiveDirectory, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorAzureActiveDirectory err := ctx.RegisterResource("azure:sentinel/dataConnectorAzureActiveDirectory:DataConnectorAzureActiveDirectory", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorAzureActiveDirectory gets an existing DataConnectorAzureActiveDirectory resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorAzureActiveDirectory(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorAzureActiveDirectoryState, opts ...pulumi.ResourceOption) (*DataConnectorAzureActiveDirectory, error) { var resource DataConnectorAzureActiveDirectory err := ctx.ReadResource("azure:sentinel/dataConnectorAzureActiveDirectory:DataConnectorAzureActiveDirectory", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorAzureActiveDirectory resources. type dataConnectorAzureActiveDirectoryState struct { // The ID of the Log Analytics Workspace that this Azure Active Directory Data Connector resides in. Changing this forces a new Azure Active Directory Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Azure Active Directory Data Connector. Changing this forces a new Azure Active Directory Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Azure Active Directory Data Connector connects to. Changing this forces a new Azure Active Directory Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } type DataConnectorAzureActiveDirectoryState struct { // The ID of the Log Analytics Workspace that this Azure Active Directory Data Connector resides in. Changing this forces a new Azure Active Directory Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Azure Active Directory Data Connector. Changing this forces a new Azure Active Directory Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Azure Active Directory Data Connector connects to. Changing this forces a new Azure Active Directory Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorAzureActiveDirectoryState) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorAzureActiveDirectoryState)(nil)).Elem() } type dataConnectorAzureActiveDirectoryArgs struct { // The ID of the Log Analytics Workspace that this Azure Active Directory Data Connector resides in. Changing this forces a new Azure Active Directory Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Azure Active Directory Data Connector. Changing this forces a new Azure Active Directory Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Azure Active Directory Data Connector connects to. Changing this forces a new Azure Active Directory Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } // The set of arguments for constructing a DataConnectorAzureActiveDirectory resource. type DataConnectorAzureActiveDirectoryArgs struct { // The ID of the Log Analytics Workspace that this Azure Active Directory Data Connector resides in. Changing this forces a new Azure Active Directory Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Azure Active Directory Data Connector. Changing this forces a new Azure Active Directory Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Azure Active Directory Data Connector connects to. Changing this forces a new Azure Active Directory Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorAzureActiveDirectoryArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorAzureActiveDirectoryArgs)(nil)).Elem() } type DataConnectorAzureActiveDirectoryInput interface { pulumi.Input ToDataConnectorAzureActiveDirectoryOutput() DataConnectorAzureActiveDirectoryOutput ToDataConnectorAzureActiveDirectoryOutputWithContext(ctx context.Context) DataConnectorAzureActiveDirectoryOutput } func (*DataConnectorAzureActiveDirectory) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorAzureActiveDirectory)(nil)).Elem() } func (i *DataConnectorAzureActiveDirectory) ToDataConnectorAzureActiveDirectoryOutput() DataConnectorAzureActiveDirectoryOutput { return i.ToDataConnectorAzureActiveDirectoryOutputWithContext(context.Background()) } func (i *DataConnectorAzureActiveDirectory) ToDataConnectorAzureActiveDirectoryOutputWithContext(ctx context.Context) DataConnectorAzureActiveDirectoryOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorAzureActiveDirectoryOutput) } // DataConnectorAzureActiveDirectoryArrayInput is an input type that accepts DataConnectorAzureActiveDirectoryArray and DataConnectorAzureActiveDirectoryArrayOutput values. // You can construct a concrete instance of `DataConnectorAzureActiveDirectoryArrayInput` via: // // DataConnectorAzureActiveDirectoryArray{ DataConnectorAzureActiveDirectoryArgs{...} } type DataConnectorAzureActiveDirectoryArrayInput interface { pulumi.Input ToDataConnectorAzureActiveDirectoryArrayOutput() DataConnectorAzureActiveDirectoryArrayOutput ToDataConnectorAzureActiveDirectoryArrayOutputWithContext(context.Context) DataConnectorAzureActiveDirectoryArrayOutput } type DataConnectorAzureActiveDirectoryArray []DataConnectorAzureActiveDirectoryInput func (DataConnectorAzureActiveDirectoryArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorAzureActiveDirectory)(nil)).Elem() } func (i DataConnectorAzureActiveDirectoryArray) ToDataConnectorAzureActiveDirectoryArrayOutput() DataConnectorAzureActiveDirectoryArrayOutput { return i.ToDataConnectorAzureActiveDirectoryArrayOutputWithContext(context.Background()) } func (i DataConnectorAzureActiveDirectoryArray) ToDataConnectorAzureActiveDirectoryArrayOutputWithContext(ctx context.Context) DataConnectorAzureActiveDirectoryArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorAzureActiveDirectoryArrayOutput) } // DataConnectorAzureActiveDirectoryMapInput is an input type that accepts DataConnectorAzureActiveDirectoryMap and DataConnectorAzureActiveDirectoryMapOutput values. // You can construct a concrete instance of `DataConnectorAzureActiveDirectoryMapInput` via: // // DataConnectorAzureActiveDirectoryMap{ "key": DataConnectorAzureActiveDirectoryArgs{...} } type DataConnectorAzureActiveDirectoryMapInput interface { pulumi.Input ToDataConnectorAzureActiveDirectoryMapOutput() DataConnectorAzureActiveDirectoryMapOutput ToDataConnectorAzureActiveDirectoryMapOutputWithContext(context.Context) DataConnectorAzureActiveDirectoryMapOutput } type DataConnectorAzureActiveDirectoryMap map[string]DataConnectorAzureActiveDirectoryInput func (DataConnectorAzureActiveDirectoryMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorAzureActiveDirectory)(nil)).Elem() } func (i DataConnectorAzureActiveDirectoryMap) ToDataConnectorAzureActiveDirectoryMapOutput() DataConnectorAzureActiveDirectoryMapOutput { return i.ToDataConnectorAzureActiveDirectoryMapOutputWithContext(context.Background()) } func (i DataConnectorAzureActiveDirectoryMap) ToDataConnectorAzureActiveDirectoryMapOutputWithContext(ctx context.Context) DataConnectorAzureActiveDirectoryMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorAzureActiveDirectoryMapOutput) } type DataConnectorAzureActiveDirectoryOutput struct{ *pulumi.OutputState } func (DataConnectorAzureActiveDirectoryOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorAzureActiveDirectory)(nil)).Elem() } func (o DataConnectorAzureActiveDirectoryOutput) ToDataConnectorAzureActiveDirectoryOutput() DataConnectorAzureActiveDirectoryOutput { return o } func (o DataConnectorAzureActiveDirectoryOutput) ToDataConnectorAzureActiveDirectoryOutputWithContext(ctx context.Context) DataConnectorAzureActiveDirectoryOutput { return o } // The ID of the Log Analytics Workspace that this Azure Active Directory Data Connector resides in. Changing this forces a new Azure Active Directory Data Connector to be created. func (o DataConnectorAzureActiveDirectoryOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAzureActiveDirectory) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Azure Active Directory Data Connector. Changing this forces a new Azure Active Directory Data Connector to be created. func (o DataConnectorAzureActiveDirectoryOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAzureActiveDirectory) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the tenant that this Azure Active Directory Data Connector connects to. Changing this forces a new Azure Active Directory Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. func (o DataConnectorAzureActiveDirectoryOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAzureActiveDirectory) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type DataConnectorAzureActiveDirectoryArrayOutput struct{ *pulumi.OutputState } func (DataConnectorAzureActiveDirectoryArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorAzureActiveDirectory)(nil)).Elem() } func (o DataConnectorAzureActiveDirectoryArrayOutput) ToDataConnectorAzureActiveDirectoryArrayOutput() DataConnectorAzureActiveDirectoryArrayOutput { return o } func (o DataConnectorAzureActiveDirectoryArrayOutput) ToDataConnectorAzureActiveDirectoryArrayOutputWithContext(ctx context.Context) DataConnectorAzureActiveDirectoryArrayOutput { return o } func (o DataConnectorAzureActiveDirectoryArrayOutput) Index(i pulumi.IntInput) DataConnectorAzureActiveDirectoryOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorAzureActiveDirectory { return vs[0].([]*DataConnectorAzureActiveDirectory)[vs[1].(int)] }).(DataConnectorAzureActiveDirectoryOutput) } type DataConnectorAzureActiveDirectoryMapOutput struct{ *pulumi.OutputState } func (DataConnectorAzureActiveDirectoryMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorAzureActiveDirectory)(nil)).Elem() } func (o DataConnectorAzureActiveDirectoryMapOutput) ToDataConnectorAzureActiveDirectoryMapOutput() DataConnectorAzureActiveDirectoryMapOutput { return o } func (o DataConnectorAzureActiveDirectoryMapOutput) ToDataConnectorAzureActiveDirectoryMapOutputWithContext(ctx context.Context) DataConnectorAzureActiveDirectoryMapOutput { return o } func (o DataConnectorAzureActiveDirectoryMapOutput) MapIndex(k pulumi.StringInput) DataConnectorAzureActiveDirectoryOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorAzureActiveDirectory { return vs[0].(map[string]*DataConnectorAzureActiveDirectory)[vs[1].(string)] }).(DataConnectorAzureActiveDirectoryOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorAzureActiveDirectoryInput)(nil)).Elem(), &DataConnectorAzureActiveDirectory{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorAzureActiveDirectoryArrayInput)(nil)).Elem(), DataConnectorAzureActiveDirectoryArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorAzureActiveDirectoryMapInput)(nil)).Elem(), DataConnectorAzureActiveDirectoryMap{}) pulumi.RegisterOutputType(DataConnectorAzureActiveDirectoryOutput{}) pulumi.RegisterOutputType(DataConnectorAzureActiveDirectoryArrayOutput{}) pulumi.RegisterOutputType(DataConnectorAzureActiveDirectoryMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/metadata.go
sdk/go/azure/sentinel/metadata.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Sentinel Metadata. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("pergb2018"), // }) // if err != nil { // return err // } // exampleAnalyticsSolution, err := operationalinsights.NewAnalyticsSolution(ctx, "example", &operationalinsights.AnalyticsSolutionArgs{ // SolutionName: pulumi.String("SecurityInsights"), // Location: example.Location, // ResourceGroupName: example.Name, // WorkspaceResourceId: exampleAnalyticsWorkspace.ID(), // WorkspaceName: exampleAnalyticsWorkspace.Name, // Plan: &operationalinsights.AnalyticsSolutionPlanArgs{ // Publisher: pulumi.String("Microsoft"), // Product: pulumi.String("OMSGallery/SecurityInsights"), // }, // }) // if err != nil { // return err // } // exampleAlertRuleNrt, err := sentinel.NewAlertRuleNrt(ctx, "example", &sentinel.AlertRuleNrtArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleAnalyticsSolution.WorkspaceResourceId, // DisplayName: pulumi.String("example"), // Severity: pulumi.String("High"), // Query: pulumi.String("AzureActivity |\n where OperationName == \\\"Create or Update Virtual Machine\\\" or OperationName ==\\\"Create Deployment\\\" |\n where ActivityStatus == \\\"Succeeded\\\" |\n make-series dcount(ResourceId) default=0 on EventSubmissionTimestamp in range(ago(7d), now(), 1d) by Caller\n"), // }) // if err != nil { // return err // } // _, err = sentinel.NewMetadata(ctx, "example", &sentinel.MetadataArgs{ // Name: pulumi.String("exampl"), // WorkspaceId: exampleAnalyticsSolution.WorkspaceResourceId, // ContentId: exampleAlertRuleNrt.Name, // Kind: pulumi.String("AnalyticsRule"), // ParentId: exampleAlertRuleNrt.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.OperationalInsights` - 2022-10-01-preview // // ## Import // // Sentinel Metadata can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/metadata:Metadata example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/metadata/metadata1 // ``` type Metadata struct { pulumi.CustomResourceState // An `author` blocks as defined below. Author MetadataAuthorPtrOutput `pulumi:"author"` // A `category` block as defined below. Category MetadataCategoryPtrOutput `pulumi:"category"` // The ID of the content. Used to identify dependencies and content from solutions or community. ContentId pulumi.StringOutput `pulumi:"contentId"` // Schema version of the content. Can be used to distinguish between flow based on the schema version. ContentSchemaVersion pulumi.StringPtrOutput `pulumi:"contentSchemaVersion"` // The Custom version of the content. CustomVersion pulumi.StringPtrOutput `pulumi:"customVersion"` // A JSON formatted `dependency` block as defined below. Dependency for the content item, what other content items it requires to work. Dependency pulumi.StringPtrOutput `pulumi:"dependency"` // The first publish date of solution content item. FirstPublishDate pulumi.StringPtrOutput `pulumi:"firstPublishDate"` // The ID of the icon, this id can be fetched from the solution template. IconId pulumi.StringPtrOutput `pulumi:"iconId"` // The kind of content the metadata is for. Possible values are `AnalyticsRule`, `AnalyticsRuleTemplate`, `AutomationRule`, `AzureFunction`, `DataConnector`, `DataType`, `HuntingQuery`, `InvestigationQuery`, `LogicAppsCustomConnector`, `Parser`, `Playbook`, `PlaybookTemplate`, `Solution`, `Watchlist`, `WatchlistTemplate`, `Workbook` and `WorkbookTemplate`. Kind pulumi.StringOutput `pulumi:"kind"` // The last publish date of solution content item. LastPublishDate pulumi.StringPtrOutput `pulumi:"lastPublishDate"` // The name which should be used for this Sentinel Metadata. Changing this forces a new Sentinel Metadata to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the parent resource ID of the content item, which the metadata belongs to. ParentId pulumi.StringOutput `pulumi:"parentId"` // Specifies a list of preview image file names. These will be taken from solution artifacts. PreviewImages pulumi.StringArrayOutput `pulumi:"previewImages"` // Specifies a list of preview image file names used for dark theme. These will be taken from solution artifacts. PreviewImagesDarks pulumi.StringArrayOutput `pulumi:"previewImagesDarks"` // Specifies a list of providers for the solution content item. Providers pulumi.StringArrayOutput `pulumi:"providers"` // A `source` block as defined below. Source MetadataSourceOutput `pulumi:"source"` // A `support` block as defined below. Support MetadataSupportPtrOutput `pulumi:"support"` // Specifies a list of tactics the resource covers. Possible values are `Reconnaissance`, `ResourceDevelopment`, `InitialAccess`, `Execution`, `Persistence`, `PrivilegeEscalation`, `DefenseEvasion`, `CredentialAccess`, `Discovery`, `LateralMovement`, `Collection`, `CommandAndControl`, `Exfiltration`, `Impact`, `ImpairProcessControl` and `InhibitResponseFunction`. ThreatAnalysisTactics pulumi.StringArrayOutput `pulumi:"threatAnalysisTactics"` // Specifies a list of techniques the resource covers. ThreatAnalysisTechniques pulumi.StringArrayOutput `pulumi:"threatAnalysisTechniques"` // Version of the content. Version pulumi.StringPtrOutput `pulumi:"version"` // The ID of the Log Analytics Workspace. Changing this forces a new Sentinel Metadata to be created. WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"` } // NewMetadata registers a new resource with the given unique name, arguments, and options. func NewMetadata(ctx *pulumi.Context, name string, args *MetadataArgs, opts ...pulumi.ResourceOption) (*Metadata, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ContentId == nil { return nil, errors.New("invalid value for required argument 'ContentId'") } if args.Kind == nil { return nil, errors.New("invalid value for required argument 'Kind'") } if args.ParentId == nil { return nil, errors.New("invalid value for required argument 'ParentId'") } if args.WorkspaceId == nil { return nil, errors.New("invalid value for required argument 'WorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Metadata err := ctx.RegisterResource("azure:sentinel/metadata:Metadata", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetMetadata gets an existing Metadata resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetMetadata(ctx *pulumi.Context, name string, id pulumi.IDInput, state *MetadataState, opts ...pulumi.ResourceOption) (*Metadata, error) { var resource Metadata err := ctx.ReadResource("azure:sentinel/metadata:Metadata", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Metadata resources. type metadataState struct { // An `author` blocks as defined below. Author *MetadataAuthor `pulumi:"author"` // A `category` block as defined below. Category *MetadataCategory `pulumi:"category"` // The ID of the content. Used to identify dependencies and content from solutions or community. ContentId *string `pulumi:"contentId"` // Schema version of the content. Can be used to distinguish between flow based on the schema version. ContentSchemaVersion *string `pulumi:"contentSchemaVersion"` // The Custom version of the content. CustomVersion *string `pulumi:"customVersion"` // A JSON formatted `dependency` block as defined below. Dependency for the content item, what other content items it requires to work. Dependency *string `pulumi:"dependency"` // The first publish date of solution content item. FirstPublishDate *string `pulumi:"firstPublishDate"` // The ID of the icon, this id can be fetched from the solution template. IconId *string `pulumi:"iconId"` // The kind of content the metadata is for. Possible values are `AnalyticsRule`, `AnalyticsRuleTemplate`, `AutomationRule`, `AzureFunction`, `DataConnector`, `DataType`, `HuntingQuery`, `InvestigationQuery`, `LogicAppsCustomConnector`, `Parser`, `Playbook`, `PlaybookTemplate`, `Solution`, `Watchlist`, `WatchlistTemplate`, `Workbook` and `WorkbookTemplate`. Kind *string `pulumi:"kind"` // The last publish date of solution content item. LastPublishDate *string `pulumi:"lastPublishDate"` // The name which should be used for this Sentinel Metadata. Changing this forces a new Sentinel Metadata to be created. Name *string `pulumi:"name"` // The ID of the parent resource ID of the content item, which the metadata belongs to. ParentId *string `pulumi:"parentId"` // Specifies a list of preview image file names. These will be taken from solution artifacts. PreviewImages []string `pulumi:"previewImages"` // Specifies a list of preview image file names used for dark theme. These will be taken from solution artifacts. PreviewImagesDarks []string `pulumi:"previewImagesDarks"` // Specifies a list of providers for the solution content item. Providers []string `pulumi:"providers"` // A `source` block as defined below. Source *MetadataSource `pulumi:"source"` // A `support` block as defined below. Support *MetadataSupport `pulumi:"support"` // Specifies a list of tactics the resource covers. Possible values are `Reconnaissance`, `ResourceDevelopment`, `InitialAccess`, `Execution`, `Persistence`, `PrivilegeEscalation`, `DefenseEvasion`, `CredentialAccess`, `Discovery`, `LateralMovement`, `Collection`, `CommandAndControl`, `Exfiltration`, `Impact`, `ImpairProcessControl` and `InhibitResponseFunction`. ThreatAnalysisTactics []string `pulumi:"threatAnalysisTactics"` // Specifies a list of techniques the resource covers. ThreatAnalysisTechniques []string `pulumi:"threatAnalysisTechniques"` // Version of the content. Version *string `pulumi:"version"` // The ID of the Log Analytics Workspace. Changing this forces a new Sentinel Metadata to be created. WorkspaceId *string `pulumi:"workspaceId"` } type MetadataState struct { // An `author` blocks as defined below. Author MetadataAuthorPtrInput // A `category` block as defined below. Category MetadataCategoryPtrInput // The ID of the content. Used to identify dependencies and content from solutions or community. ContentId pulumi.StringPtrInput // Schema version of the content. Can be used to distinguish between flow based on the schema version. ContentSchemaVersion pulumi.StringPtrInput // The Custom version of the content. CustomVersion pulumi.StringPtrInput // A JSON formatted `dependency` block as defined below. Dependency for the content item, what other content items it requires to work. Dependency pulumi.StringPtrInput // The first publish date of solution content item. FirstPublishDate pulumi.StringPtrInput // The ID of the icon, this id can be fetched from the solution template. IconId pulumi.StringPtrInput // The kind of content the metadata is for. Possible values are `AnalyticsRule`, `AnalyticsRuleTemplate`, `AutomationRule`, `AzureFunction`, `DataConnector`, `DataType`, `HuntingQuery`, `InvestigationQuery`, `LogicAppsCustomConnector`, `Parser`, `Playbook`, `PlaybookTemplate`, `Solution`, `Watchlist`, `WatchlistTemplate`, `Workbook` and `WorkbookTemplate`. Kind pulumi.StringPtrInput // The last publish date of solution content item. LastPublishDate pulumi.StringPtrInput // The name which should be used for this Sentinel Metadata. Changing this forces a new Sentinel Metadata to be created. Name pulumi.StringPtrInput // The ID of the parent resource ID of the content item, which the metadata belongs to. ParentId pulumi.StringPtrInput // Specifies a list of preview image file names. These will be taken from solution artifacts. PreviewImages pulumi.StringArrayInput // Specifies a list of preview image file names used for dark theme. These will be taken from solution artifacts. PreviewImagesDarks pulumi.StringArrayInput // Specifies a list of providers for the solution content item. Providers pulumi.StringArrayInput // A `source` block as defined below. Source MetadataSourcePtrInput // A `support` block as defined below. Support MetadataSupportPtrInput // Specifies a list of tactics the resource covers. Possible values are `Reconnaissance`, `ResourceDevelopment`, `InitialAccess`, `Execution`, `Persistence`, `PrivilegeEscalation`, `DefenseEvasion`, `CredentialAccess`, `Discovery`, `LateralMovement`, `Collection`, `CommandAndControl`, `Exfiltration`, `Impact`, `ImpairProcessControl` and `InhibitResponseFunction`. ThreatAnalysisTactics pulumi.StringArrayInput // Specifies a list of techniques the resource covers. ThreatAnalysisTechniques pulumi.StringArrayInput // Version of the content. Version pulumi.StringPtrInput // The ID of the Log Analytics Workspace. Changing this forces a new Sentinel Metadata to be created. WorkspaceId pulumi.StringPtrInput } func (MetadataState) ElementType() reflect.Type { return reflect.TypeOf((*metadataState)(nil)).Elem() } type metadataArgs struct { // An `author` blocks as defined below. Author *MetadataAuthor `pulumi:"author"` // A `category` block as defined below. Category *MetadataCategory `pulumi:"category"` // The ID of the content. Used to identify dependencies and content from solutions or community. ContentId string `pulumi:"contentId"` // Schema version of the content. Can be used to distinguish between flow based on the schema version. ContentSchemaVersion *string `pulumi:"contentSchemaVersion"` // The Custom version of the content. CustomVersion *string `pulumi:"customVersion"` // A JSON formatted `dependency` block as defined below. Dependency for the content item, what other content items it requires to work. Dependency *string `pulumi:"dependency"` // The first publish date of solution content item. FirstPublishDate *string `pulumi:"firstPublishDate"` // The ID of the icon, this id can be fetched from the solution template. IconId *string `pulumi:"iconId"` // The kind of content the metadata is for. Possible values are `AnalyticsRule`, `AnalyticsRuleTemplate`, `AutomationRule`, `AzureFunction`, `DataConnector`, `DataType`, `HuntingQuery`, `InvestigationQuery`, `LogicAppsCustomConnector`, `Parser`, `Playbook`, `PlaybookTemplate`, `Solution`, `Watchlist`, `WatchlistTemplate`, `Workbook` and `WorkbookTemplate`. Kind string `pulumi:"kind"` // The last publish date of solution content item. LastPublishDate *string `pulumi:"lastPublishDate"` // The name which should be used for this Sentinel Metadata. Changing this forces a new Sentinel Metadata to be created. Name *string `pulumi:"name"` // The ID of the parent resource ID of the content item, which the metadata belongs to. ParentId string `pulumi:"parentId"` // Specifies a list of preview image file names. These will be taken from solution artifacts. PreviewImages []string `pulumi:"previewImages"` // Specifies a list of preview image file names used for dark theme. These will be taken from solution artifacts. PreviewImagesDarks []string `pulumi:"previewImagesDarks"` // Specifies a list of providers for the solution content item. Providers []string `pulumi:"providers"` // A `source` block as defined below. Source *MetadataSource `pulumi:"source"` // A `support` block as defined below. Support *MetadataSupport `pulumi:"support"` // Specifies a list of tactics the resource covers. Possible values are `Reconnaissance`, `ResourceDevelopment`, `InitialAccess`, `Execution`, `Persistence`, `PrivilegeEscalation`, `DefenseEvasion`, `CredentialAccess`, `Discovery`, `LateralMovement`, `Collection`, `CommandAndControl`, `Exfiltration`, `Impact`, `ImpairProcessControl` and `InhibitResponseFunction`. ThreatAnalysisTactics []string `pulumi:"threatAnalysisTactics"` // Specifies a list of techniques the resource covers. ThreatAnalysisTechniques []string `pulumi:"threatAnalysisTechniques"` // Version of the content. Version *string `pulumi:"version"` // The ID of the Log Analytics Workspace. Changing this forces a new Sentinel Metadata to be created. WorkspaceId string `pulumi:"workspaceId"` } // The set of arguments for constructing a Metadata resource. type MetadataArgs struct { // An `author` blocks as defined below. Author MetadataAuthorPtrInput // A `category` block as defined below. Category MetadataCategoryPtrInput // The ID of the content. Used to identify dependencies and content from solutions or community. ContentId pulumi.StringInput // Schema version of the content. Can be used to distinguish between flow based on the schema version. ContentSchemaVersion pulumi.StringPtrInput // The Custom version of the content. CustomVersion pulumi.StringPtrInput // A JSON formatted `dependency` block as defined below. Dependency for the content item, what other content items it requires to work. Dependency pulumi.StringPtrInput // The first publish date of solution content item. FirstPublishDate pulumi.StringPtrInput // The ID of the icon, this id can be fetched from the solution template. IconId pulumi.StringPtrInput // The kind of content the metadata is for. Possible values are `AnalyticsRule`, `AnalyticsRuleTemplate`, `AutomationRule`, `AzureFunction`, `DataConnector`, `DataType`, `HuntingQuery`, `InvestigationQuery`, `LogicAppsCustomConnector`, `Parser`, `Playbook`, `PlaybookTemplate`, `Solution`, `Watchlist`, `WatchlistTemplate`, `Workbook` and `WorkbookTemplate`. Kind pulumi.StringInput // The last publish date of solution content item. LastPublishDate pulumi.StringPtrInput // The name which should be used for this Sentinel Metadata. Changing this forces a new Sentinel Metadata to be created. Name pulumi.StringPtrInput // The ID of the parent resource ID of the content item, which the metadata belongs to. ParentId pulumi.StringInput // Specifies a list of preview image file names. These will be taken from solution artifacts. PreviewImages pulumi.StringArrayInput // Specifies a list of preview image file names used for dark theme. These will be taken from solution artifacts. PreviewImagesDarks pulumi.StringArrayInput // Specifies a list of providers for the solution content item. Providers pulumi.StringArrayInput // A `source` block as defined below. Source MetadataSourcePtrInput // A `support` block as defined below. Support MetadataSupportPtrInput // Specifies a list of tactics the resource covers. Possible values are `Reconnaissance`, `ResourceDevelopment`, `InitialAccess`, `Execution`, `Persistence`, `PrivilegeEscalation`, `DefenseEvasion`, `CredentialAccess`, `Discovery`, `LateralMovement`, `Collection`, `CommandAndControl`, `Exfiltration`, `Impact`, `ImpairProcessControl` and `InhibitResponseFunction`. ThreatAnalysisTactics pulumi.StringArrayInput // Specifies a list of techniques the resource covers. ThreatAnalysisTechniques pulumi.StringArrayInput // Version of the content. Version pulumi.StringPtrInput // The ID of the Log Analytics Workspace. Changing this forces a new Sentinel Metadata to be created. WorkspaceId pulumi.StringInput } func (MetadataArgs) ElementType() reflect.Type { return reflect.TypeOf((*metadataArgs)(nil)).Elem() } type MetadataInput interface { pulumi.Input ToMetadataOutput() MetadataOutput ToMetadataOutputWithContext(ctx context.Context) MetadataOutput } func (*Metadata) ElementType() reflect.Type { return reflect.TypeOf((**Metadata)(nil)).Elem() } func (i *Metadata) ToMetadataOutput() MetadataOutput { return i.ToMetadataOutputWithContext(context.Background()) } func (i *Metadata) ToMetadataOutputWithContext(ctx context.Context) MetadataOutput { return pulumi.ToOutputWithContext(ctx, i).(MetadataOutput) } // MetadataArrayInput is an input type that accepts MetadataArray and MetadataArrayOutput values. // You can construct a concrete instance of `MetadataArrayInput` via: // // MetadataArray{ MetadataArgs{...} } type MetadataArrayInput interface { pulumi.Input ToMetadataArrayOutput() MetadataArrayOutput ToMetadataArrayOutputWithContext(context.Context) MetadataArrayOutput } type MetadataArray []MetadataInput func (MetadataArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Metadata)(nil)).Elem() } func (i MetadataArray) ToMetadataArrayOutput() MetadataArrayOutput { return i.ToMetadataArrayOutputWithContext(context.Background()) } func (i MetadataArray) ToMetadataArrayOutputWithContext(ctx context.Context) MetadataArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(MetadataArrayOutput) } // MetadataMapInput is an input type that accepts MetadataMap and MetadataMapOutput values. // You can construct a concrete instance of `MetadataMapInput` via: // // MetadataMap{ "key": MetadataArgs{...} } type MetadataMapInput interface { pulumi.Input ToMetadataMapOutput() MetadataMapOutput ToMetadataMapOutputWithContext(context.Context) MetadataMapOutput } type MetadataMap map[string]MetadataInput func (MetadataMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Metadata)(nil)).Elem() } func (i MetadataMap) ToMetadataMapOutput() MetadataMapOutput { return i.ToMetadataMapOutputWithContext(context.Background()) } func (i MetadataMap) ToMetadataMapOutputWithContext(ctx context.Context) MetadataMapOutput { return pulumi.ToOutputWithContext(ctx, i).(MetadataMapOutput) } type MetadataOutput struct{ *pulumi.OutputState } func (MetadataOutput) ElementType() reflect.Type { return reflect.TypeOf((**Metadata)(nil)).Elem() } func (o MetadataOutput) ToMetadataOutput() MetadataOutput { return o } func (o MetadataOutput) ToMetadataOutputWithContext(ctx context.Context) MetadataOutput { return o } // An `author` blocks as defined below. func (o MetadataOutput) Author() MetadataAuthorPtrOutput { return o.ApplyT(func(v *Metadata) MetadataAuthorPtrOutput { return v.Author }).(MetadataAuthorPtrOutput) } // A `category` block as defined below. func (o MetadataOutput) Category() MetadataCategoryPtrOutput { return o.ApplyT(func(v *Metadata) MetadataCategoryPtrOutput { return v.Category }).(MetadataCategoryPtrOutput) } // The ID of the content. Used to identify dependencies and content from solutions or community. func (o MetadataOutput) ContentId() pulumi.StringOutput { return o.ApplyT(func(v *Metadata) pulumi.StringOutput { return v.ContentId }).(pulumi.StringOutput) } // Schema version of the content. Can be used to distinguish between flow based on the schema version. func (o MetadataOutput) ContentSchemaVersion() pulumi.StringPtrOutput { return o.ApplyT(func(v *Metadata) pulumi.StringPtrOutput { return v.ContentSchemaVersion }).(pulumi.StringPtrOutput) } // The Custom version of the content. func (o MetadataOutput) CustomVersion() pulumi.StringPtrOutput { return o.ApplyT(func(v *Metadata) pulumi.StringPtrOutput { return v.CustomVersion }).(pulumi.StringPtrOutput) } // A JSON formatted `dependency` block as defined below. Dependency for the content item, what other content items it requires to work. func (o MetadataOutput) Dependency() pulumi.StringPtrOutput { return o.ApplyT(func(v *Metadata) pulumi.StringPtrOutput { return v.Dependency }).(pulumi.StringPtrOutput) } // The first publish date of solution content item. func (o MetadataOutput) FirstPublishDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *Metadata) pulumi.StringPtrOutput { return v.FirstPublishDate }).(pulumi.StringPtrOutput) } // The ID of the icon, this id can be fetched from the solution template. func (o MetadataOutput) IconId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Metadata) pulumi.StringPtrOutput { return v.IconId }).(pulumi.StringPtrOutput) } // The kind of content the metadata is for. Possible values are `AnalyticsRule`, `AnalyticsRuleTemplate`, `AutomationRule`, `AzureFunction`, `DataConnector`, `DataType`, `HuntingQuery`, `InvestigationQuery`, `LogicAppsCustomConnector`, `Parser`, `Playbook`, `PlaybookTemplate`, `Solution`, `Watchlist`, `WatchlistTemplate`, `Workbook` and `WorkbookTemplate`. func (o MetadataOutput) Kind() pulumi.StringOutput { return o.ApplyT(func(v *Metadata) pulumi.StringOutput { return v.Kind }).(pulumi.StringOutput) } // The last publish date of solution content item. func (o MetadataOutput) LastPublishDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *Metadata) pulumi.StringPtrOutput { return v.LastPublishDate }).(pulumi.StringPtrOutput) } // The name which should be used for this Sentinel Metadata. Changing this forces a new Sentinel Metadata to be created. func (o MetadataOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Metadata) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the parent resource ID of the content item, which the metadata belongs to. func (o MetadataOutput) ParentId() pulumi.StringOutput { return o.ApplyT(func(v *Metadata) pulumi.StringOutput { return v.ParentId }).(pulumi.StringOutput) } // Specifies a list of preview image file names. These will be taken from solution artifacts. func (o MetadataOutput) PreviewImages() pulumi.StringArrayOutput { return o.ApplyT(func(v *Metadata) pulumi.StringArrayOutput { return v.PreviewImages }).(pulumi.StringArrayOutput) } // Specifies a list of preview image file names used for dark theme. These will be taken from solution artifacts. func (o MetadataOutput) PreviewImagesDarks() pulumi.StringArrayOutput { return o.ApplyT(func(v *Metadata) pulumi.StringArrayOutput { return v.PreviewImagesDarks }).(pulumi.StringArrayOutput) } // Specifies a list of providers for the solution content item. func (o MetadataOutput) Providers() pulumi.StringArrayOutput { return o.ApplyT(func(v *Metadata) pulumi.StringArrayOutput { return v.Providers }).(pulumi.StringArrayOutput) } // A `source` block as defined below. func (o MetadataOutput) Source() MetadataSourceOutput { return o.ApplyT(func(v *Metadata) MetadataSourceOutput { return v.Source }).(MetadataSourceOutput) } // A `support` block as defined below. func (o MetadataOutput) Support() MetadataSupportPtrOutput { return o.ApplyT(func(v *Metadata) MetadataSupportPtrOutput { return v.Support }).(MetadataSupportPtrOutput) } // Specifies a list of tactics the resource covers. Possible values are `Reconnaissance`, `ResourceDevelopment`, `InitialAccess`, `Execution`, `Persistence`, `PrivilegeEscalation`, `DefenseEvasion`, `CredentialAccess`, `Discovery`, `LateralMovement`, `Collection`, `CommandAndControl`, `Exfiltration`, `Impact`, `ImpairProcessControl` and `InhibitResponseFunction`. func (o MetadataOutput) ThreatAnalysisTactics() pulumi.StringArrayOutput { return o.ApplyT(func(v *Metadata) pulumi.StringArrayOutput { return v.ThreatAnalysisTactics }).(pulumi.StringArrayOutput) } // Specifies a list of techniques the resource covers. func (o MetadataOutput) ThreatAnalysisTechniques() pulumi.StringArrayOutput { return o.ApplyT(func(v *Metadata) pulumi.StringArrayOutput { return v.ThreatAnalysisTechniques }).(pulumi.StringArrayOutput) } // Version of the content. func (o MetadataOutput) Version() pulumi.StringPtrOutput { return o.ApplyT(func(v *Metadata) pulumi.StringPtrOutput { return v.Version }).(pulumi.StringPtrOutput) } // The ID of the Log Analytics Workspace. Changing this forces a new Sentinel Metadata to be created. func (o MetadataOutput) WorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *Metadata) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput) } type MetadataArrayOutput struct{ *pulumi.OutputState } func (MetadataArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Metadata)(nil)).Elem() } func (o MetadataArrayOutput) ToMetadataArrayOutput() MetadataArrayOutput { return o } func (o MetadataArrayOutput) ToMetadataArrayOutputWithContext(ctx context.Context) MetadataArrayOutput { return o } func (o MetadataArrayOutput) Index(i pulumi.IntInput) MetadataOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Metadata { return vs[0].([]*Metadata)[vs[1].(int)] }).(MetadataOutput) } type MetadataMapOutput struct{ *pulumi.OutputState } func (MetadataMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Metadata)(nil)).Elem() } func (o MetadataMapOutput) ToMetadataMapOutput() MetadataMapOutput { return o } func (o MetadataMapOutput) ToMetadataMapOutputWithContext(ctx context.Context) MetadataMapOutput { return o } func (o MetadataMapOutput) MapIndex(k pulumi.StringInput) MetadataOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Metadata { return vs[0].(map[string]*Metadata)[vs[1].(string)] }).(MetadataOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*MetadataInput)(nil)).Elem(), &Metadata{}) pulumi.RegisterInputType(reflect.TypeOf((*MetadataArrayInput)(nil)).Elem(), MetadataArray{}) pulumi.RegisterInputType(reflect.TypeOf((*MetadataMapInput)(nil)).Elem(), MetadataMap{}) pulumi.RegisterOutputType(MetadataOutput{}) pulumi.RegisterOutputType(MetadataArrayOutput{}) pulumi.RegisterOutputType(MetadataMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorOffice365Project.go
sdk/go/azure/sentinel/dataConnectorOffice365Project.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Office 365 Project Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorOffice365Project(ctx, "example", &sentinel.DataConnectorOffice365ProjectArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Office 365 Project Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorOffice365Project:DataConnectorOffice365Project example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorOffice365Project struct { pulumi.CustomResourceState // The ID of the Log Analytics Workspace that this Office 365 Project Data Connector resides in. Changing this forces a new Office 365 Project Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Office 365 Project Data Connector. Changing this forces a new Office 365 Project Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the tenant that this Office 365 Project Data Connector connects to. Changing this forces a new Office 365 Project Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewDataConnectorOffice365Project registers a new resource with the given unique name, arguments, and options. func NewDataConnectorOffice365Project(ctx *pulumi.Context, name string, args *DataConnectorOffice365ProjectArgs, opts ...pulumi.ResourceOption) (*DataConnectorOffice365Project, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorOffice365Project err := ctx.RegisterResource("azure:sentinel/dataConnectorOffice365Project:DataConnectorOffice365Project", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorOffice365Project gets an existing DataConnectorOffice365Project resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorOffice365Project(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorOffice365ProjectState, opts ...pulumi.ResourceOption) (*DataConnectorOffice365Project, error) { var resource DataConnectorOffice365Project err := ctx.ReadResource("azure:sentinel/dataConnectorOffice365Project:DataConnectorOffice365Project", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorOffice365Project resources. type dataConnectorOffice365ProjectState struct { // The ID of the Log Analytics Workspace that this Office 365 Project Data Connector resides in. Changing this forces a new Office 365 Project Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Office 365 Project Data Connector. Changing this forces a new Office 365 Project Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Office 365 Project Data Connector connects to. Changing this forces a new Office 365 Project Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } type DataConnectorOffice365ProjectState struct { // The ID of the Log Analytics Workspace that this Office 365 Project Data Connector resides in. Changing this forces a new Office 365 Project Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Office 365 Project Data Connector. Changing this forces a new Office 365 Project Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Office 365 Project Data Connector connects to. Changing this forces a new Office 365 Project Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorOffice365ProjectState) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorOffice365ProjectState)(nil)).Elem() } type dataConnectorOffice365ProjectArgs struct { // The ID of the Log Analytics Workspace that this Office 365 Project Data Connector resides in. Changing this forces a new Office 365 Project Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Office 365 Project Data Connector. Changing this forces a new Office 365 Project Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Office 365 Project Data Connector connects to. Changing this forces a new Office 365 Project Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } // The set of arguments for constructing a DataConnectorOffice365Project resource. type DataConnectorOffice365ProjectArgs struct { // The ID of the Log Analytics Workspace that this Office 365 Project Data Connector resides in. Changing this forces a new Office 365 Project Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Office 365 Project Data Connector. Changing this forces a new Office 365 Project Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Office 365 Project Data Connector connects to. Changing this forces a new Office 365 Project Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorOffice365ProjectArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorOffice365ProjectArgs)(nil)).Elem() } type DataConnectorOffice365ProjectInput interface { pulumi.Input ToDataConnectorOffice365ProjectOutput() DataConnectorOffice365ProjectOutput ToDataConnectorOffice365ProjectOutputWithContext(ctx context.Context) DataConnectorOffice365ProjectOutput } func (*DataConnectorOffice365Project) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorOffice365Project)(nil)).Elem() } func (i *DataConnectorOffice365Project) ToDataConnectorOffice365ProjectOutput() DataConnectorOffice365ProjectOutput { return i.ToDataConnectorOffice365ProjectOutputWithContext(context.Background()) } func (i *DataConnectorOffice365Project) ToDataConnectorOffice365ProjectOutputWithContext(ctx context.Context) DataConnectorOffice365ProjectOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorOffice365ProjectOutput) } // DataConnectorOffice365ProjectArrayInput is an input type that accepts DataConnectorOffice365ProjectArray and DataConnectorOffice365ProjectArrayOutput values. // You can construct a concrete instance of `DataConnectorOffice365ProjectArrayInput` via: // // DataConnectorOffice365ProjectArray{ DataConnectorOffice365ProjectArgs{...} } type DataConnectorOffice365ProjectArrayInput interface { pulumi.Input ToDataConnectorOffice365ProjectArrayOutput() DataConnectorOffice365ProjectArrayOutput ToDataConnectorOffice365ProjectArrayOutputWithContext(context.Context) DataConnectorOffice365ProjectArrayOutput } type DataConnectorOffice365ProjectArray []DataConnectorOffice365ProjectInput func (DataConnectorOffice365ProjectArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorOffice365Project)(nil)).Elem() } func (i DataConnectorOffice365ProjectArray) ToDataConnectorOffice365ProjectArrayOutput() DataConnectorOffice365ProjectArrayOutput { return i.ToDataConnectorOffice365ProjectArrayOutputWithContext(context.Background()) } func (i DataConnectorOffice365ProjectArray) ToDataConnectorOffice365ProjectArrayOutputWithContext(ctx context.Context) DataConnectorOffice365ProjectArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorOffice365ProjectArrayOutput) } // DataConnectorOffice365ProjectMapInput is an input type that accepts DataConnectorOffice365ProjectMap and DataConnectorOffice365ProjectMapOutput values. // You can construct a concrete instance of `DataConnectorOffice365ProjectMapInput` via: // // DataConnectorOffice365ProjectMap{ "key": DataConnectorOffice365ProjectArgs{...} } type DataConnectorOffice365ProjectMapInput interface { pulumi.Input ToDataConnectorOffice365ProjectMapOutput() DataConnectorOffice365ProjectMapOutput ToDataConnectorOffice365ProjectMapOutputWithContext(context.Context) DataConnectorOffice365ProjectMapOutput } type DataConnectorOffice365ProjectMap map[string]DataConnectorOffice365ProjectInput func (DataConnectorOffice365ProjectMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorOffice365Project)(nil)).Elem() } func (i DataConnectorOffice365ProjectMap) ToDataConnectorOffice365ProjectMapOutput() DataConnectorOffice365ProjectMapOutput { return i.ToDataConnectorOffice365ProjectMapOutputWithContext(context.Background()) } func (i DataConnectorOffice365ProjectMap) ToDataConnectorOffice365ProjectMapOutputWithContext(ctx context.Context) DataConnectorOffice365ProjectMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorOffice365ProjectMapOutput) } type DataConnectorOffice365ProjectOutput struct{ *pulumi.OutputState } func (DataConnectorOffice365ProjectOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorOffice365Project)(nil)).Elem() } func (o DataConnectorOffice365ProjectOutput) ToDataConnectorOffice365ProjectOutput() DataConnectorOffice365ProjectOutput { return o } func (o DataConnectorOffice365ProjectOutput) ToDataConnectorOffice365ProjectOutputWithContext(ctx context.Context) DataConnectorOffice365ProjectOutput { return o } // The ID of the Log Analytics Workspace that this Office 365 Project Data Connector resides in. Changing this forces a new Office 365 Project Data Connector to be created. func (o DataConnectorOffice365ProjectOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorOffice365Project) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Office 365 Project Data Connector. Changing this forces a new Office 365 Project Data Connector to be created. func (o DataConnectorOffice365ProjectOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorOffice365Project) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the tenant that this Office 365 Project Data Connector connects to. Changing this forces a new Office 365 Project Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. func (o DataConnectorOffice365ProjectOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorOffice365Project) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type DataConnectorOffice365ProjectArrayOutput struct{ *pulumi.OutputState } func (DataConnectorOffice365ProjectArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorOffice365Project)(nil)).Elem() } func (o DataConnectorOffice365ProjectArrayOutput) ToDataConnectorOffice365ProjectArrayOutput() DataConnectorOffice365ProjectArrayOutput { return o } func (o DataConnectorOffice365ProjectArrayOutput) ToDataConnectorOffice365ProjectArrayOutputWithContext(ctx context.Context) DataConnectorOffice365ProjectArrayOutput { return o } func (o DataConnectorOffice365ProjectArrayOutput) Index(i pulumi.IntInput) DataConnectorOffice365ProjectOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorOffice365Project { return vs[0].([]*DataConnectorOffice365Project)[vs[1].(int)] }).(DataConnectorOffice365ProjectOutput) } type DataConnectorOffice365ProjectMapOutput struct{ *pulumi.OutputState } func (DataConnectorOffice365ProjectMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorOffice365Project)(nil)).Elem() } func (o DataConnectorOffice365ProjectMapOutput) ToDataConnectorOffice365ProjectMapOutput() DataConnectorOffice365ProjectMapOutput { return o } func (o DataConnectorOffice365ProjectMapOutput) ToDataConnectorOffice365ProjectMapOutputWithContext(ctx context.Context) DataConnectorOffice365ProjectMapOutput { return o } func (o DataConnectorOffice365ProjectMapOutput) MapIndex(k pulumi.StringInput) DataConnectorOffice365ProjectOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorOffice365Project { return vs[0].(map[string]*DataConnectorOffice365Project)[vs[1].(string)] }).(DataConnectorOffice365ProjectOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorOffice365ProjectInput)(nil)).Elem(), &DataConnectorOffice365Project{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorOffice365ProjectArrayInput)(nil)).Elem(), DataConnectorOffice365ProjectArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorOffice365ProjectMapInput)(nil)).Elem(), DataConnectorOffice365ProjectMap{}) pulumi.RegisterOutputType(DataConnectorOffice365ProjectOutput{}) pulumi.RegisterOutputType(DataConnectorOffice365ProjectArrayOutput{}) pulumi.RegisterOutputType(DataConnectorOffice365ProjectMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorAwsS3.go
sdk/go/azure/sentinel/dataConnectorAwsS3.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a AWS S3 Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorAwsS3(ctx, "example", &sentinel.DataConnectorAwsS3Args{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // AwsRoleArn: pulumi.String("arn:aws:iam::000000000000:role/role1"), // DestinationTable: pulumi.String("AWSGuardDuty"), // SqsUrls: pulumi.StringArray{ // pulumi.String("https://sqs.us-east-1.amazonaws.com/000000000000/example"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // AWS S3 Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorAwsS3:DataConnectorAwsS3 example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorAwsS3 struct { pulumi.CustomResourceState // The ARN of the AWS role, which is connected to this AWS CloudTrail Data Connector. See the [Azure document](https://docs.microsoft.com/azure/sentinel/connect-aws?tabs=s3#create-an-aws-assumed-role-and-grant-access-to-the-aws-sentinel-account) for details. AwsRoleArn pulumi.StringOutput `pulumi:"awsRoleArn"` // The name of the Log Analytics table that will store the ingested data. DestinationTable pulumi.StringOutput `pulumi:"destinationTable"` // The ID of the Log Analytics Workspace that this AWS S3 Data Connector resides in. Changing this forces a new AWS S3 Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this AWS S3 Data Connector. Changing this forces a new AWS S3 Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies a list of AWS SQS urls for the AWS S3 Data Connector. SqsUrls pulumi.StringArrayOutput `pulumi:"sqsUrls"` } // NewDataConnectorAwsS3 registers a new resource with the given unique name, arguments, and options. func NewDataConnectorAwsS3(ctx *pulumi.Context, name string, args *DataConnectorAwsS3Args, opts ...pulumi.ResourceOption) (*DataConnectorAwsS3, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.AwsRoleArn == nil { return nil, errors.New("invalid value for required argument 'AwsRoleArn'") } if args.DestinationTable == nil { return nil, errors.New("invalid value for required argument 'DestinationTable'") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } if args.SqsUrls == nil { return nil, errors.New("invalid value for required argument 'SqsUrls'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorAwsS3 err := ctx.RegisterResource("azure:sentinel/dataConnectorAwsS3:DataConnectorAwsS3", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorAwsS3 gets an existing DataConnectorAwsS3 resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorAwsS3(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorAwsS3State, opts ...pulumi.ResourceOption) (*DataConnectorAwsS3, error) { var resource DataConnectorAwsS3 err := ctx.ReadResource("azure:sentinel/dataConnectorAwsS3:DataConnectorAwsS3", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorAwsS3 resources. type dataConnectorAwsS3State struct { // The ARN of the AWS role, which is connected to this AWS CloudTrail Data Connector. See the [Azure document](https://docs.microsoft.com/azure/sentinel/connect-aws?tabs=s3#create-an-aws-assumed-role-and-grant-access-to-the-aws-sentinel-account) for details. AwsRoleArn *string `pulumi:"awsRoleArn"` // The name of the Log Analytics table that will store the ingested data. DestinationTable *string `pulumi:"destinationTable"` // The ID of the Log Analytics Workspace that this AWS S3 Data Connector resides in. Changing this forces a new AWS S3 Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this AWS S3 Data Connector. Changing this forces a new AWS S3 Data Connector to be created. Name *string `pulumi:"name"` // Specifies a list of AWS SQS urls for the AWS S3 Data Connector. SqsUrls []string `pulumi:"sqsUrls"` } type DataConnectorAwsS3State struct { // The ARN of the AWS role, which is connected to this AWS CloudTrail Data Connector. See the [Azure document](https://docs.microsoft.com/azure/sentinel/connect-aws?tabs=s3#create-an-aws-assumed-role-and-grant-access-to-the-aws-sentinel-account) for details. AwsRoleArn pulumi.StringPtrInput // The name of the Log Analytics table that will store the ingested data. DestinationTable pulumi.StringPtrInput // The ID of the Log Analytics Workspace that this AWS S3 Data Connector resides in. Changing this forces a new AWS S3 Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this AWS S3 Data Connector. Changing this forces a new AWS S3 Data Connector to be created. Name pulumi.StringPtrInput // Specifies a list of AWS SQS urls for the AWS S3 Data Connector. SqsUrls pulumi.StringArrayInput } func (DataConnectorAwsS3State) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorAwsS3State)(nil)).Elem() } type dataConnectorAwsS3Args struct { // The ARN of the AWS role, which is connected to this AWS CloudTrail Data Connector. See the [Azure document](https://docs.microsoft.com/azure/sentinel/connect-aws?tabs=s3#create-an-aws-assumed-role-and-grant-access-to-the-aws-sentinel-account) for details. AwsRoleArn string `pulumi:"awsRoleArn"` // The name of the Log Analytics table that will store the ingested data. DestinationTable string `pulumi:"destinationTable"` // The ID of the Log Analytics Workspace that this AWS S3 Data Connector resides in. Changing this forces a new AWS S3 Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this AWS S3 Data Connector. Changing this forces a new AWS S3 Data Connector to be created. Name *string `pulumi:"name"` // Specifies a list of AWS SQS urls for the AWS S3 Data Connector. SqsUrls []string `pulumi:"sqsUrls"` } // The set of arguments for constructing a DataConnectorAwsS3 resource. type DataConnectorAwsS3Args struct { // The ARN of the AWS role, which is connected to this AWS CloudTrail Data Connector. See the [Azure document](https://docs.microsoft.com/azure/sentinel/connect-aws?tabs=s3#create-an-aws-assumed-role-and-grant-access-to-the-aws-sentinel-account) for details. AwsRoleArn pulumi.StringInput // The name of the Log Analytics table that will store the ingested data. DestinationTable pulumi.StringInput // The ID of the Log Analytics Workspace that this AWS S3 Data Connector resides in. Changing this forces a new AWS S3 Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this AWS S3 Data Connector. Changing this forces a new AWS S3 Data Connector to be created. Name pulumi.StringPtrInput // Specifies a list of AWS SQS urls for the AWS S3 Data Connector. SqsUrls pulumi.StringArrayInput } func (DataConnectorAwsS3Args) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorAwsS3Args)(nil)).Elem() } type DataConnectorAwsS3Input interface { pulumi.Input ToDataConnectorAwsS3Output() DataConnectorAwsS3Output ToDataConnectorAwsS3OutputWithContext(ctx context.Context) DataConnectorAwsS3Output } func (*DataConnectorAwsS3) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorAwsS3)(nil)).Elem() } func (i *DataConnectorAwsS3) ToDataConnectorAwsS3Output() DataConnectorAwsS3Output { return i.ToDataConnectorAwsS3OutputWithContext(context.Background()) } func (i *DataConnectorAwsS3) ToDataConnectorAwsS3OutputWithContext(ctx context.Context) DataConnectorAwsS3Output { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorAwsS3Output) } // DataConnectorAwsS3ArrayInput is an input type that accepts DataConnectorAwsS3Array and DataConnectorAwsS3ArrayOutput values. // You can construct a concrete instance of `DataConnectorAwsS3ArrayInput` via: // // DataConnectorAwsS3Array{ DataConnectorAwsS3Args{...} } type DataConnectorAwsS3ArrayInput interface { pulumi.Input ToDataConnectorAwsS3ArrayOutput() DataConnectorAwsS3ArrayOutput ToDataConnectorAwsS3ArrayOutputWithContext(context.Context) DataConnectorAwsS3ArrayOutput } type DataConnectorAwsS3Array []DataConnectorAwsS3Input func (DataConnectorAwsS3Array) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorAwsS3)(nil)).Elem() } func (i DataConnectorAwsS3Array) ToDataConnectorAwsS3ArrayOutput() DataConnectorAwsS3ArrayOutput { return i.ToDataConnectorAwsS3ArrayOutputWithContext(context.Background()) } func (i DataConnectorAwsS3Array) ToDataConnectorAwsS3ArrayOutputWithContext(ctx context.Context) DataConnectorAwsS3ArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorAwsS3ArrayOutput) } // DataConnectorAwsS3MapInput is an input type that accepts DataConnectorAwsS3Map and DataConnectorAwsS3MapOutput values. // You can construct a concrete instance of `DataConnectorAwsS3MapInput` via: // // DataConnectorAwsS3Map{ "key": DataConnectorAwsS3Args{...} } type DataConnectorAwsS3MapInput interface { pulumi.Input ToDataConnectorAwsS3MapOutput() DataConnectorAwsS3MapOutput ToDataConnectorAwsS3MapOutputWithContext(context.Context) DataConnectorAwsS3MapOutput } type DataConnectorAwsS3Map map[string]DataConnectorAwsS3Input func (DataConnectorAwsS3Map) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorAwsS3)(nil)).Elem() } func (i DataConnectorAwsS3Map) ToDataConnectorAwsS3MapOutput() DataConnectorAwsS3MapOutput { return i.ToDataConnectorAwsS3MapOutputWithContext(context.Background()) } func (i DataConnectorAwsS3Map) ToDataConnectorAwsS3MapOutputWithContext(ctx context.Context) DataConnectorAwsS3MapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorAwsS3MapOutput) } type DataConnectorAwsS3Output struct{ *pulumi.OutputState } func (DataConnectorAwsS3Output) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorAwsS3)(nil)).Elem() } func (o DataConnectorAwsS3Output) ToDataConnectorAwsS3Output() DataConnectorAwsS3Output { return o } func (o DataConnectorAwsS3Output) ToDataConnectorAwsS3OutputWithContext(ctx context.Context) DataConnectorAwsS3Output { return o } // The ARN of the AWS role, which is connected to this AWS CloudTrail Data Connector. See the [Azure document](https://docs.microsoft.com/azure/sentinel/connect-aws?tabs=s3#create-an-aws-assumed-role-and-grant-access-to-the-aws-sentinel-account) for details. func (o DataConnectorAwsS3Output) AwsRoleArn() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAwsS3) pulumi.StringOutput { return v.AwsRoleArn }).(pulumi.StringOutput) } // The name of the Log Analytics table that will store the ingested data. func (o DataConnectorAwsS3Output) DestinationTable() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAwsS3) pulumi.StringOutput { return v.DestinationTable }).(pulumi.StringOutput) } // The ID of the Log Analytics Workspace that this AWS S3 Data Connector resides in. Changing this forces a new AWS S3 Data Connector to be created. func (o DataConnectorAwsS3Output) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAwsS3) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this AWS S3 Data Connector. Changing this forces a new AWS S3 Data Connector to be created. func (o DataConnectorAwsS3Output) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAwsS3) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies a list of AWS SQS urls for the AWS S3 Data Connector. func (o DataConnectorAwsS3Output) SqsUrls() pulumi.StringArrayOutput { return o.ApplyT(func(v *DataConnectorAwsS3) pulumi.StringArrayOutput { return v.SqsUrls }).(pulumi.StringArrayOutput) } type DataConnectorAwsS3ArrayOutput struct{ *pulumi.OutputState } func (DataConnectorAwsS3ArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorAwsS3)(nil)).Elem() } func (o DataConnectorAwsS3ArrayOutput) ToDataConnectorAwsS3ArrayOutput() DataConnectorAwsS3ArrayOutput { return o } func (o DataConnectorAwsS3ArrayOutput) ToDataConnectorAwsS3ArrayOutputWithContext(ctx context.Context) DataConnectorAwsS3ArrayOutput { return o } func (o DataConnectorAwsS3ArrayOutput) Index(i pulumi.IntInput) DataConnectorAwsS3Output { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorAwsS3 { return vs[0].([]*DataConnectorAwsS3)[vs[1].(int)] }).(DataConnectorAwsS3Output) } type DataConnectorAwsS3MapOutput struct{ *pulumi.OutputState } func (DataConnectorAwsS3MapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorAwsS3)(nil)).Elem() } func (o DataConnectorAwsS3MapOutput) ToDataConnectorAwsS3MapOutput() DataConnectorAwsS3MapOutput { return o } func (o DataConnectorAwsS3MapOutput) ToDataConnectorAwsS3MapOutputWithContext(ctx context.Context) DataConnectorAwsS3MapOutput { return o } func (o DataConnectorAwsS3MapOutput) MapIndex(k pulumi.StringInput) DataConnectorAwsS3Output { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorAwsS3 { return vs[0].(map[string]*DataConnectorAwsS3)[vs[1].(string)] }).(DataConnectorAwsS3Output) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorAwsS3Input)(nil)).Elem(), &DataConnectorAwsS3{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorAwsS3ArrayInput)(nil)).Elem(), DataConnectorAwsS3Array{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorAwsS3MapInput)(nil)).Elem(), DataConnectorAwsS3Map{}) pulumi.RegisterOutputType(DataConnectorAwsS3Output{}) pulumi.RegisterOutputType(DataConnectorAwsS3ArrayOutput{}) pulumi.RegisterOutputType(DataConnectorAwsS3MapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorThreatIntelligence.go
sdk/go/azure/sentinel/dataConnectorThreatIntelligence.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Threat Intelligence Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorThreatIntelligence(ctx, "example", &sentinel.DataConnectorThreatIntelligenceArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Threat Intelligence Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorThreatIntelligence:DataConnectorThreatIntelligence example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorThreatIntelligence struct { pulumi.CustomResourceState // The ID of the Log Analytics Workspace that this Threat Intelligence Data Connector resides in. Changing this forces a new Threat Intelligence Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The lookback date for the this Threat Intelligence Data Connector in RFC3339. Defaults to `1970-01-01T00:00:00Z`. Changing this forces a new resource to be created. LookbackDate pulumi.StringPtrOutput `pulumi:"lookbackDate"` // The name which should be used for this Threat Intelligence Data Connector. Changing this forces a new Threat Intelligence Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the tenant that this Threat Intelligence Data Connector connects to. Changing this forces a new Threat Intelligence Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewDataConnectorThreatIntelligence registers a new resource with the given unique name, arguments, and options. func NewDataConnectorThreatIntelligence(ctx *pulumi.Context, name string, args *DataConnectorThreatIntelligenceArgs, opts ...pulumi.ResourceOption) (*DataConnectorThreatIntelligence, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorThreatIntelligence err := ctx.RegisterResource("azure:sentinel/dataConnectorThreatIntelligence:DataConnectorThreatIntelligence", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorThreatIntelligence gets an existing DataConnectorThreatIntelligence resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorThreatIntelligence(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorThreatIntelligenceState, opts ...pulumi.ResourceOption) (*DataConnectorThreatIntelligence, error) { var resource DataConnectorThreatIntelligence err := ctx.ReadResource("azure:sentinel/dataConnectorThreatIntelligence:DataConnectorThreatIntelligence", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorThreatIntelligence resources. type dataConnectorThreatIntelligenceState struct { // The ID of the Log Analytics Workspace that this Threat Intelligence Data Connector resides in. Changing this forces a new Threat Intelligence Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The lookback date for the this Threat Intelligence Data Connector in RFC3339. Defaults to `1970-01-01T00:00:00Z`. Changing this forces a new resource to be created. LookbackDate *string `pulumi:"lookbackDate"` // The name which should be used for this Threat Intelligence Data Connector. Changing this forces a new Threat Intelligence Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Threat Intelligence Data Connector connects to. Changing this forces a new Threat Intelligence Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } type DataConnectorThreatIntelligenceState struct { // The ID of the Log Analytics Workspace that this Threat Intelligence Data Connector resides in. Changing this forces a new Threat Intelligence Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The lookback date for the this Threat Intelligence Data Connector in RFC3339. Defaults to `1970-01-01T00:00:00Z`. Changing this forces a new resource to be created. LookbackDate pulumi.StringPtrInput // The name which should be used for this Threat Intelligence Data Connector. Changing this forces a new Threat Intelligence Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Threat Intelligence Data Connector connects to. Changing this forces a new Threat Intelligence Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorThreatIntelligenceState) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorThreatIntelligenceState)(nil)).Elem() } type dataConnectorThreatIntelligenceArgs struct { // The ID of the Log Analytics Workspace that this Threat Intelligence Data Connector resides in. Changing this forces a new Threat Intelligence Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The lookback date for the this Threat Intelligence Data Connector in RFC3339. Defaults to `1970-01-01T00:00:00Z`. Changing this forces a new resource to be created. LookbackDate *string `pulumi:"lookbackDate"` // The name which should be used for this Threat Intelligence Data Connector. Changing this forces a new Threat Intelligence Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Threat Intelligence Data Connector connects to. Changing this forces a new Threat Intelligence Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } // The set of arguments for constructing a DataConnectorThreatIntelligence resource. type DataConnectorThreatIntelligenceArgs struct { // The ID of the Log Analytics Workspace that this Threat Intelligence Data Connector resides in. Changing this forces a new Threat Intelligence Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The lookback date for the this Threat Intelligence Data Connector in RFC3339. Defaults to `1970-01-01T00:00:00Z`. Changing this forces a new resource to be created. LookbackDate pulumi.StringPtrInput // The name which should be used for this Threat Intelligence Data Connector. Changing this forces a new Threat Intelligence Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Threat Intelligence Data Connector connects to. Changing this forces a new Threat Intelligence Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorThreatIntelligenceArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorThreatIntelligenceArgs)(nil)).Elem() } type DataConnectorThreatIntelligenceInput interface { pulumi.Input ToDataConnectorThreatIntelligenceOutput() DataConnectorThreatIntelligenceOutput ToDataConnectorThreatIntelligenceOutputWithContext(ctx context.Context) DataConnectorThreatIntelligenceOutput } func (*DataConnectorThreatIntelligence) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorThreatIntelligence)(nil)).Elem() } func (i *DataConnectorThreatIntelligence) ToDataConnectorThreatIntelligenceOutput() DataConnectorThreatIntelligenceOutput { return i.ToDataConnectorThreatIntelligenceOutputWithContext(context.Background()) } func (i *DataConnectorThreatIntelligence) ToDataConnectorThreatIntelligenceOutputWithContext(ctx context.Context) DataConnectorThreatIntelligenceOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorThreatIntelligenceOutput) } // DataConnectorThreatIntelligenceArrayInput is an input type that accepts DataConnectorThreatIntelligenceArray and DataConnectorThreatIntelligenceArrayOutput values. // You can construct a concrete instance of `DataConnectorThreatIntelligenceArrayInput` via: // // DataConnectorThreatIntelligenceArray{ DataConnectorThreatIntelligenceArgs{...} } type DataConnectorThreatIntelligenceArrayInput interface { pulumi.Input ToDataConnectorThreatIntelligenceArrayOutput() DataConnectorThreatIntelligenceArrayOutput ToDataConnectorThreatIntelligenceArrayOutputWithContext(context.Context) DataConnectorThreatIntelligenceArrayOutput } type DataConnectorThreatIntelligenceArray []DataConnectorThreatIntelligenceInput func (DataConnectorThreatIntelligenceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorThreatIntelligence)(nil)).Elem() } func (i DataConnectorThreatIntelligenceArray) ToDataConnectorThreatIntelligenceArrayOutput() DataConnectorThreatIntelligenceArrayOutput { return i.ToDataConnectorThreatIntelligenceArrayOutputWithContext(context.Background()) } func (i DataConnectorThreatIntelligenceArray) ToDataConnectorThreatIntelligenceArrayOutputWithContext(ctx context.Context) DataConnectorThreatIntelligenceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorThreatIntelligenceArrayOutput) } // DataConnectorThreatIntelligenceMapInput is an input type that accepts DataConnectorThreatIntelligenceMap and DataConnectorThreatIntelligenceMapOutput values. // You can construct a concrete instance of `DataConnectorThreatIntelligenceMapInput` via: // // DataConnectorThreatIntelligenceMap{ "key": DataConnectorThreatIntelligenceArgs{...} } type DataConnectorThreatIntelligenceMapInput interface { pulumi.Input ToDataConnectorThreatIntelligenceMapOutput() DataConnectorThreatIntelligenceMapOutput ToDataConnectorThreatIntelligenceMapOutputWithContext(context.Context) DataConnectorThreatIntelligenceMapOutput } type DataConnectorThreatIntelligenceMap map[string]DataConnectorThreatIntelligenceInput func (DataConnectorThreatIntelligenceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorThreatIntelligence)(nil)).Elem() } func (i DataConnectorThreatIntelligenceMap) ToDataConnectorThreatIntelligenceMapOutput() DataConnectorThreatIntelligenceMapOutput { return i.ToDataConnectorThreatIntelligenceMapOutputWithContext(context.Background()) } func (i DataConnectorThreatIntelligenceMap) ToDataConnectorThreatIntelligenceMapOutputWithContext(ctx context.Context) DataConnectorThreatIntelligenceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorThreatIntelligenceMapOutput) } type DataConnectorThreatIntelligenceOutput struct{ *pulumi.OutputState } func (DataConnectorThreatIntelligenceOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorThreatIntelligence)(nil)).Elem() } func (o DataConnectorThreatIntelligenceOutput) ToDataConnectorThreatIntelligenceOutput() DataConnectorThreatIntelligenceOutput { return o } func (o DataConnectorThreatIntelligenceOutput) ToDataConnectorThreatIntelligenceOutputWithContext(ctx context.Context) DataConnectorThreatIntelligenceOutput { return o } // The ID of the Log Analytics Workspace that this Threat Intelligence Data Connector resides in. Changing this forces a new Threat Intelligence Data Connector to be created. func (o DataConnectorThreatIntelligenceOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorThreatIntelligence) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The lookback date for the this Threat Intelligence Data Connector in RFC3339. Defaults to `1970-01-01T00:00:00Z`. Changing this forces a new resource to be created. func (o DataConnectorThreatIntelligenceOutput) LookbackDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *DataConnectorThreatIntelligence) pulumi.StringPtrOutput { return v.LookbackDate }).(pulumi.StringPtrOutput) } // The name which should be used for this Threat Intelligence Data Connector. Changing this forces a new Threat Intelligence Data Connector to be created. func (o DataConnectorThreatIntelligenceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorThreatIntelligence) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the tenant that this Threat Intelligence Data Connector connects to. Changing this forces a new Threat Intelligence Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. func (o DataConnectorThreatIntelligenceOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorThreatIntelligence) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type DataConnectorThreatIntelligenceArrayOutput struct{ *pulumi.OutputState } func (DataConnectorThreatIntelligenceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorThreatIntelligence)(nil)).Elem() } func (o DataConnectorThreatIntelligenceArrayOutput) ToDataConnectorThreatIntelligenceArrayOutput() DataConnectorThreatIntelligenceArrayOutput { return o } func (o DataConnectorThreatIntelligenceArrayOutput) ToDataConnectorThreatIntelligenceArrayOutputWithContext(ctx context.Context) DataConnectorThreatIntelligenceArrayOutput { return o } func (o DataConnectorThreatIntelligenceArrayOutput) Index(i pulumi.IntInput) DataConnectorThreatIntelligenceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorThreatIntelligence { return vs[0].([]*DataConnectorThreatIntelligence)[vs[1].(int)] }).(DataConnectorThreatIntelligenceOutput) } type DataConnectorThreatIntelligenceMapOutput struct{ *pulumi.OutputState } func (DataConnectorThreatIntelligenceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorThreatIntelligence)(nil)).Elem() } func (o DataConnectorThreatIntelligenceMapOutput) ToDataConnectorThreatIntelligenceMapOutput() DataConnectorThreatIntelligenceMapOutput { return o } func (o DataConnectorThreatIntelligenceMapOutput) ToDataConnectorThreatIntelligenceMapOutputWithContext(ctx context.Context) DataConnectorThreatIntelligenceMapOutput { return o } func (o DataConnectorThreatIntelligenceMapOutput) MapIndex(k pulumi.StringInput) DataConnectorThreatIntelligenceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorThreatIntelligence { return vs[0].(map[string]*DataConnectorThreatIntelligence)[vs[1].(string)] }).(DataConnectorThreatIntelligenceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorThreatIntelligenceInput)(nil)).Elem(), &DataConnectorThreatIntelligence{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorThreatIntelligenceArrayInput)(nil)).Elem(), DataConnectorThreatIntelligenceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorThreatIntelligenceMapInput)(nil)).Elem(), DataConnectorThreatIntelligenceMap{}) pulumi.RegisterOutputType(DataConnectorThreatIntelligenceOutput{}) pulumi.RegisterOutputType(DataConnectorThreatIntelligenceArrayOutput{}) pulumi.RegisterOutputType(DataConnectorThreatIntelligenceMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorMicrosoftThreatIntelligence.go
sdk/go/azure/sentinel/dataConnectorMicrosoftThreatIntelligence.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Microsoft Threat Intelligence Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("east us"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorMicrosoftThreatIntelligence(ctx, "example", &sentinel.DataConnectorMicrosoftThreatIntelligenceArgs{ // Name: pulumi.String("example-dc-msti"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // MicrosoftEmergingThreatFeedLookbackDate: pulumi.String("1970-01-01T00:00:00Z"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // sentinels can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorMicrosoftThreatIntelligence:DataConnectorMicrosoftThreatIntelligence example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorMicrosoftThreatIntelligence struct { pulumi.CustomResourceState // The ID of the Log Analytics Workspace. Changing this forces a new Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The lookback date for the Microsoft Emerging Threat Feed in RFC3339. Changing this forces a new Data Connector to be created. MicrosoftEmergingThreatFeedLookbackDate pulumi.StringOutput `pulumi:"microsoftEmergingThreatFeedLookbackDate"` // The name which should be used for this Microsoft Threat Intelligence Data Connector. Changing this forces a new Microsoft Threat Intelligence Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the tenant that this Microsoft Threat Intelligence Data Connector connects to. Changing this forces a new Microsoft Threat Intelligence Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewDataConnectorMicrosoftThreatIntelligence registers a new resource with the given unique name, arguments, and options. func NewDataConnectorMicrosoftThreatIntelligence(ctx *pulumi.Context, name string, args *DataConnectorMicrosoftThreatIntelligenceArgs, opts ...pulumi.ResourceOption) (*DataConnectorMicrosoftThreatIntelligence, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } if args.MicrosoftEmergingThreatFeedLookbackDate == nil { return nil, errors.New("invalid value for required argument 'MicrosoftEmergingThreatFeedLookbackDate'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorMicrosoftThreatIntelligence err := ctx.RegisterResource("azure:sentinel/dataConnectorMicrosoftThreatIntelligence:DataConnectorMicrosoftThreatIntelligence", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorMicrosoftThreatIntelligence gets an existing DataConnectorMicrosoftThreatIntelligence resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorMicrosoftThreatIntelligence(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorMicrosoftThreatIntelligenceState, opts ...pulumi.ResourceOption) (*DataConnectorMicrosoftThreatIntelligence, error) { var resource DataConnectorMicrosoftThreatIntelligence err := ctx.ReadResource("azure:sentinel/dataConnectorMicrosoftThreatIntelligence:DataConnectorMicrosoftThreatIntelligence", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorMicrosoftThreatIntelligence resources. type dataConnectorMicrosoftThreatIntelligenceState struct { // The ID of the Log Analytics Workspace. Changing this forces a new Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The lookback date for the Microsoft Emerging Threat Feed in RFC3339. Changing this forces a new Data Connector to be created. MicrosoftEmergingThreatFeedLookbackDate *string `pulumi:"microsoftEmergingThreatFeedLookbackDate"` // The name which should be used for this Microsoft Threat Intelligence Data Connector. Changing this forces a new Microsoft Threat Intelligence Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Microsoft Threat Intelligence Data Connector connects to. Changing this forces a new Microsoft Threat Intelligence Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } type DataConnectorMicrosoftThreatIntelligenceState struct { // The ID of the Log Analytics Workspace. Changing this forces a new Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The lookback date for the Microsoft Emerging Threat Feed in RFC3339. Changing this forces a new Data Connector to be created. MicrosoftEmergingThreatFeedLookbackDate pulumi.StringPtrInput // The name which should be used for this Microsoft Threat Intelligence Data Connector. Changing this forces a new Microsoft Threat Intelligence Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Microsoft Threat Intelligence Data Connector connects to. Changing this forces a new Microsoft Threat Intelligence Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorMicrosoftThreatIntelligenceState) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorMicrosoftThreatIntelligenceState)(nil)).Elem() } type dataConnectorMicrosoftThreatIntelligenceArgs struct { // The ID of the Log Analytics Workspace. Changing this forces a new Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The lookback date for the Microsoft Emerging Threat Feed in RFC3339. Changing this forces a new Data Connector to be created. MicrosoftEmergingThreatFeedLookbackDate string `pulumi:"microsoftEmergingThreatFeedLookbackDate"` // The name which should be used for this Microsoft Threat Intelligence Data Connector. Changing this forces a new Microsoft Threat Intelligence Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Microsoft Threat Intelligence Data Connector connects to. Changing this forces a new Microsoft Threat Intelligence Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } // The set of arguments for constructing a DataConnectorMicrosoftThreatIntelligence resource. type DataConnectorMicrosoftThreatIntelligenceArgs struct { // The ID of the Log Analytics Workspace. Changing this forces a new Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The lookback date for the Microsoft Emerging Threat Feed in RFC3339. Changing this forces a new Data Connector to be created. MicrosoftEmergingThreatFeedLookbackDate pulumi.StringInput // The name which should be used for this Microsoft Threat Intelligence Data Connector. Changing this forces a new Microsoft Threat Intelligence Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Microsoft Threat Intelligence Data Connector connects to. Changing this forces a new Microsoft Threat Intelligence Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorMicrosoftThreatIntelligenceArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorMicrosoftThreatIntelligenceArgs)(nil)).Elem() } type DataConnectorMicrosoftThreatIntelligenceInput interface { pulumi.Input ToDataConnectorMicrosoftThreatIntelligenceOutput() DataConnectorMicrosoftThreatIntelligenceOutput ToDataConnectorMicrosoftThreatIntelligenceOutputWithContext(ctx context.Context) DataConnectorMicrosoftThreatIntelligenceOutput } func (*DataConnectorMicrosoftThreatIntelligence) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorMicrosoftThreatIntelligence)(nil)).Elem() } func (i *DataConnectorMicrosoftThreatIntelligence) ToDataConnectorMicrosoftThreatIntelligenceOutput() DataConnectorMicrosoftThreatIntelligenceOutput { return i.ToDataConnectorMicrosoftThreatIntelligenceOutputWithContext(context.Background()) } func (i *DataConnectorMicrosoftThreatIntelligence) ToDataConnectorMicrosoftThreatIntelligenceOutputWithContext(ctx context.Context) DataConnectorMicrosoftThreatIntelligenceOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorMicrosoftThreatIntelligenceOutput) } // DataConnectorMicrosoftThreatIntelligenceArrayInput is an input type that accepts DataConnectorMicrosoftThreatIntelligenceArray and DataConnectorMicrosoftThreatIntelligenceArrayOutput values. // You can construct a concrete instance of `DataConnectorMicrosoftThreatIntelligenceArrayInput` via: // // DataConnectorMicrosoftThreatIntelligenceArray{ DataConnectorMicrosoftThreatIntelligenceArgs{...} } type DataConnectorMicrosoftThreatIntelligenceArrayInput interface { pulumi.Input ToDataConnectorMicrosoftThreatIntelligenceArrayOutput() DataConnectorMicrosoftThreatIntelligenceArrayOutput ToDataConnectorMicrosoftThreatIntelligenceArrayOutputWithContext(context.Context) DataConnectorMicrosoftThreatIntelligenceArrayOutput } type DataConnectorMicrosoftThreatIntelligenceArray []DataConnectorMicrosoftThreatIntelligenceInput func (DataConnectorMicrosoftThreatIntelligenceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorMicrosoftThreatIntelligence)(nil)).Elem() } func (i DataConnectorMicrosoftThreatIntelligenceArray) ToDataConnectorMicrosoftThreatIntelligenceArrayOutput() DataConnectorMicrosoftThreatIntelligenceArrayOutput { return i.ToDataConnectorMicrosoftThreatIntelligenceArrayOutputWithContext(context.Background()) } func (i DataConnectorMicrosoftThreatIntelligenceArray) ToDataConnectorMicrosoftThreatIntelligenceArrayOutputWithContext(ctx context.Context) DataConnectorMicrosoftThreatIntelligenceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorMicrosoftThreatIntelligenceArrayOutput) } // DataConnectorMicrosoftThreatIntelligenceMapInput is an input type that accepts DataConnectorMicrosoftThreatIntelligenceMap and DataConnectorMicrosoftThreatIntelligenceMapOutput values. // You can construct a concrete instance of `DataConnectorMicrosoftThreatIntelligenceMapInput` via: // // DataConnectorMicrosoftThreatIntelligenceMap{ "key": DataConnectorMicrosoftThreatIntelligenceArgs{...} } type DataConnectorMicrosoftThreatIntelligenceMapInput interface { pulumi.Input ToDataConnectorMicrosoftThreatIntelligenceMapOutput() DataConnectorMicrosoftThreatIntelligenceMapOutput ToDataConnectorMicrosoftThreatIntelligenceMapOutputWithContext(context.Context) DataConnectorMicrosoftThreatIntelligenceMapOutput } type DataConnectorMicrosoftThreatIntelligenceMap map[string]DataConnectorMicrosoftThreatIntelligenceInput func (DataConnectorMicrosoftThreatIntelligenceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorMicrosoftThreatIntelligence)(nil)).Elem() } func (i DataConnectorMicrosoftThreatIntelligenceMap) ToDataConnectorMicrosoftThreatIntelligenceMapOutput() DataConnectorMicrosoftThreatIntelligenceMapOutput { return i.ToDataConnectorMicrosoftThreatIntelligenceMapOutputWithContext(context.Background()) } func (i DataConnectorMicrosoftThreatIntelligenceMap) ToDataConnectorMicrosoftThreatIntelligenceMapOutputWithContext(ctx context.Context) DataConnectorMicrosoftThreatIntelligenceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorMicrosoftThreatIntelligenceMapOutput) } type DataConnectorMicrosoftThreatIntelligenceOutput struct{ *pulumi.OutputState } func (DataConnectorMicrosoftThreatIntelligenceOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorMicrosoftThreatIntelligence)(nil)).Elem() } func (o DataConnectorMicrosoftThreatIntelligenceOutput) ToDataConnectorMicrosoftThreatIntelligenceOutput() DataConnectorMicrosoftThreatIntelligenceOutput { return o } func (o DataConnectorMicrosoftThreatIntelligenceOutput) ToDataConnectorMicrosoftThreatIntelligenceOutputWithContext(ctx context.Context) DataConnectorMicrosoftThreatIntelligenceOutput { return o } // The ID of the Log Analytics Workspace. Changing this forces a new Data Connector to be created. func (o DataConnectorMicrosoftThreatIntelligenceOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorMicrosoftThreatIntelligence) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The lookback date for the Microsoft Emerging Threat Feed in RFC3339. Changing this forces a new Data Connector to be created. func (o DataConnectorMicrosoftThreatIntelligenceOutput) MicrosoftEmergingThreatFeedLookbackDate() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorMicrosoftThreatIntelligence) pulumi.StringOutput { return v.MicrosoftEmergingThreatFeedLookbackDate }).(pulumi.StringOutput) } // The name which should be used for this Microsoft Threat Intelligence Data Connector. Changing this forces a new Microsoft Threat Intelligence Data Connector to be created. func (o DataConnectorMicrosoftThreatIntelligenceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorMicrosoftThreatIntelligence) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the tenant that this Microsoft Threat Intelligence Data Connector connects to. Changing this forces a new Microsoft Threat Intelligence Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. func (o DataConnectorMicrosoftThreatIntelligenceOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorMicrosoftThreatIntelligence) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type DataConnectorMicrosoftThreatIntelligenceArrayOutput struct{ *pulumi.OutputState } func (DataConnectorMicrosoftThreatIntelligenceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorMicrosoftThreatIntelligence)(nil)).Elem() } func (o DataConnectorMicrosoftThreatIntelligenceArrayOutput) ToDataConnectorMicrosoftThreatIntelligenceArrayOutput() DataConnectorMicrosoftThreatIntelligenceArrayOutput { return o } func (o DataConnectorMicrosoftThreatIntelligenceArrayOutput) ToDataConnectorMicrosoftThreatIntelligenceArrayOutputWithContext(ctx context.Context) DataConnectorMicrosoftThreatIntelligenceArrayOutput { return o } func (o DataConnectorMicrosoftThreatIntelligenceArrayOutput) Index(i pulumi.IntInput) DataConnectorMicrosoftThreatIntelligenceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorMicrosoftThreatIntelligence { return vs[0].([]*DataConnectorMicrosoftThreatIntelligence)[vs[1].(int)] }).(DataConnectorMicrosoftThreatIntelligenceOutput) } type DataConnectorMicrosoftThreatIntelligenceMapOutput struct{ *pulumi.OutputState } func (DataConnectorMicrosoftThreatIntelligenceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorMicrosoftThreatIntelligence)(nil)).Elem() } func (o DataConnectorMicrosoftThreatIntelligenceMapOutput) ToDataConnectorMicrosoftThreatIntelligenceMapOutput() DataConnectorMicrosoftThreatIntelligenceMapOutput { return o } func (o DataConnectorMicrosoftThreatIntelligenceMapOutput) ToDataConnectorMicrosoftThreatIntelligenceMapOutputWithContext(ctx context.Context) DataConnectorMicrosoftThreatIntelligenceMapOutput { return o } func (o DataConnectorMicrosoftThreatIntelligenceMapOutput) MapIndex(k pulumi.StringInput) DataConnectorMicrosoftThreatIntelligenceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorMicrosoftThreatIntelligence { return vs[0].(map[string]*DataConnectorMicrosoftThreatIntelligence)[vs[1].(string)] }).(DataConnectorMicrosoftThreatIntelligenceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorMicrosoftThreatIntelligenceInput)(nil)).Elem(), &DataConnectorMicrosoftThreatIntelligence{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorMicrosoftThreatIntelligenceArrayInput)(nil)).Elem(), DataConnectorMicrosoftThreatIntelligenceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorMicrosoftThreatIntelligenceMapInput)(nil)).Elem(), DataConnectorMicrosoftThreatIntelligenceMap{}) pulumi.RegisterOutputType(DataConnectorMicrosoftThreatIntelligenceOutput{}) pulumi.RegisterOutputType(DataConnectorMicrosoftThreatIntelligenceArrayOutput{}) pulumi.RegisterOutputType(DataConnectorMicrosoftThreatIntelligenceMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorMicrosoftCloudAppSecurity.go
sdk/go/azure/sentinel/dataConnectorMicrosoftCloudAppSecurity.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Microsoft Cloud App Security Data Connector. // // !> **Note:** This resource requires that [Enterprise Mobility + Security E5](https://www.microsoft.com/en-us/microsoft-365/enterprise-mobility-security) is enabled on the tenant being connected to. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("west europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorMicrosoftCloudAppSecurity(ctx, "example", &sentinel.DataConnectorMicrosoftCloudAppSecurityArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Microsoft Cloud App Security Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorMicrosoftCloudAppSecurity:DataConnectorMicrosoftCloudAppSecurity example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorMicrosoftCloudAppSecurity struct { pulumi.CustomResourceState // Should the alerts be enabled? Defaults to `true`. AlertsEnabled pulumi.BoolPtrOutput `pulumi:"alertsEnabled"` // Should the Discovery Logs be enabled? Defaults to `true`. // // > **Note:** One of either `alertsEnabled` or `discoveryLogsEnabled` has to be specified. DiscoveryLogsEnabled pulumi.BoolPtrOutput `pulumi:"discoveryLogsEnabled"` // The ID of the Log Analytics Workspace that this Microsoft Cloud App Security Data Connector resides in. Changing this forces a new Microsoft Cloud App Security Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Microsoft Cloud App Security Data Connector. Changing this forces a new Microsoft Cloud App Security Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Tenant that this Microsoft Cloud App Security Data Connector connects to. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewDataConnectorMicrosoftCloudAppSecurity registers a new resource with the given unique name, arguments, and options. func NewDataConnectorMicrosoftCloudAppSecurity(ctx *pulumi.Context, name string, args *DataConnectorMicrosoftCloudAppSecurityArgs, opts ...pulumi.ResourceOption) (*DataConnectorMicrosoftCloudAppSecurity, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorMicrosoftCloudAppSecurity err := ctx.RegisterResource("azure:sentinel/dataConnectorMicrosoftCloudAppSecurity:DataConnectorMicrosoftCloudAppSecurity", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorMicrosoftCloudAppSecurity gets an existing DataConnectorMicrosoftCloudAppSecurity resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorMicrosoftCloudAppSecurity(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorMicrosoftCloudAppSecurityState, opts ...pulumi.ResourceOption) (*DataConnectorMicrosoftCloudAppSecurity, error) { var resource DataConnectorMicrosoftCloudAppSecurity err := ctx.ReadResource("azure:sentinel/dataConnectorMicrosoftCloudAppSecurity:DataConnectorMicrosoftCloudAppSecurity", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorMicrosoftCloudAppSecurity resources. type dataConnectorMicrosoftCloudAppSecurityState struct { // Should the alerts be enabled? Defaults to `true`. AlertsEnabled *bool `pulumi:"alertsEnabled"` // Should the Discovery Logs be enabled? Defaults to `true`. // // > **Note:** One of either `alertsEnabled` or `discoveryLogsEnabled` has to be specified. DiscoveryLogsEnabled *bool `pulumi:"discoveryLogsEnabled"` // The ID of the Log Analytics Workspace that this Microsoft Cloud App Security Data Connector resides in. Changing this forces a new Microsoft Cloud App Security Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Microsoft Cloud App Security Data Connector. Changing this forces a new Microsoft Cloud App Security Data Connector to be created. Name *string `pulumi:"name"` // The ID of the Tenant that this Microsoft Cloud App Security Data Connector connects to. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } type DataConnectorMicrosoftCloudAppSecurityState struct { // Should the alerts be enabled? Defaults to `true`. AlertsEnabled pulumi.BoolPtrInput // Should the Discovery Logs be enabled? Defaults to `true`. // // > **Note:** One of either `alertsEnabled` or `discoveryLogsEnabled` has to be specified. DiscoveryLogsEnabled pulumi.BoolPtrInput // The ID of the Log Analytics Workspace that this Microsoft Cloud App Security Data Connector resides in. Changing this forces a new Microsoft Cloud App Security Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Microsoft Cloud App Security Data Connector. Changing this forces a new Microsoft Cloud App Security Data Connector to be created. Name pulumi.StringPtrInput // The ID of the Tenant that this Microsoft Cloud App Security Data Connector connects to. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorMicrosoftCloudAppSecurityState) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorMicrosoftCloudAppSecurityState)(nil)).Elem() } type dataConnectorMicrosoftCloudAppSecurityArgs struct { // Should the alerts be enabled? Defaults to `true`. AlertsEnabled *bool `pulumi:"alertsEnabled"` // Should the Discovery Logs be enabled? Defaults to `true`. // // > **Note:** One of either `alertsEnabled` or `discoveryLogsEnabled` has to be specified. DiscoveryLogsEnabled *bool `pulumi:"discoveryLogsEnabled"` // The ID of the Log Analytics Workspace that this Microsoft Cloud App Security Data Connector resides in. Changing this forces a new Microsoft Cloud App Security Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Microsoft Cloud App Security Data Connector. Changing this forces a new Microsoft Cloud App Security Data Connector to be created. Name *string `pulumi:"name"` // The ID of the Tenant that this Microsoft Cloud App Security Data Connector connects to. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } // The set of arguments for constructing a DataConnectorMicrosoftCloudAppSecurity resource. type DataConnectorMicrosoftCloudAppSecurityArgs struct { // Should the alerts be enabled? Defaults to `true`. AlertsEnabled pulumi.BoolPtrInput // Should the Discovery Logs be enabled? Defaults to `true`. // // > **Note:** One of either `alertsEnabled` or `discoveryLogsEnabled` has to be specified. DiscoveryLogsEnabled pulumi.BoolPtrInput // The ID of the Log Analytics Workspace that this Microsoft Cloud App Security Data Connector resides in. Changing this forces a new Microsoft Cloud App Security Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Microsoft Cloud App Security Data Connector. Changing this forces a new Microsoft Cloud App Security Data Connector to be created. Name pulumi.StringPtrInput // The ID of the Tenant that this Microsoft Cloud App Security Data Connector connects to. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorMicrosoftCloudAppSecurityArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorMicrosoftCloudAppSecurityArgs)(nil)).Elem() } type DataConnectorMicrosoftCloudAppSecurityInput interface { pulumi.Input ToDataConnectorMicrosoftCloudAppSecurityOutput() DataConnectorMicrosoftCloudAppSecurityOutput ToDataConnectorMicrosoftCloudAppSecurityOutputWithContext(ctx context.Context) DataConnectorMicrosoftCloudAppSecurityOutput } func (*DataConnectorMicrosoftCloudAppSecurity) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorMicrosoftCloudAppSecurity)(nil)).Elem() } func (i *DataConnectorMicrosoftCloudAppSecurity) ToDataConnectorMicrosoftCloudAppSecurityOutput() DataConnectorMicrosoftCloudAppSecurityOutput { return i.ToDataConnectorMicrosoftCloudAppSecurityOutputWithContext(context.Background()) } func (i *DataConnectorMicrosoftCloudAppSecurity) ToDataConnectorMicrosoftCloudAppSecurityOutputWithContext(ctx context.Context) DataConnectorMicrosoftCloudAppSecurityOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorMicrosoftCloudAppSecurityOutput) } // DataConnectorMicrosoftCloudAppSecurityArrayInput is an input type that accepts DataConnectorMicrosoftCloudAppSecurityArray and DataConnectorMicrosoftCloudAppSecurityArrayOutput values. // You can construct a concrete instance of `DataConnectorMicrosoftCloudAppSecurityArrayInput` via: // // DataConnectorMicrosoftCloudAppSecurityArray{ DataConnectorMicrosoftCloudAppSecurityArgs{...} } type DataConnectorMicrosoftCloudAppSecurityArrayInput interface { pulumi.Input ToDataConnectorMicrosoftCloudAppSecurityArrayOutput() DataConnectorMicrosoftCloudAppSecurityArrayOutput ToDataConnectorMicrosoftCloudAppSecurityArrayOutputWithContext(context.Context) DataConnectorMicrosoftCloudAppSecurityArrayOutput } type DataConnectorMicrosoftCloudAppSecurityArray []DataConnectorMicrosoftCloudAppSecurityInput func (DataConnectorMicrosoftCloudAppSecurityArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorMicrosoftCloudAppSecurity)(nil)).Elem() } func (i DataConnectorMicrosoftCloudAppSecurityArray) ToDataConnectorMicrosoftCloudAppSecurityArrayOutput() DataConnectorMicrosoftCloudAppSecurityArrayOutput { return i.ToDataConnectorMicrosoftCloudAppSecurityArrayOutputWithContext(context.Background()) } func (i DataConnectorMicrosoftCloudAppSecurityArray) ToDataConnectorMicrosoftCloudAppSecurityArrayOutputWithContext(ctx context.Context) DataConnectorMicrosoftCloudAppSecurityArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorMicrosoftCloudAppSecurityArrayOutput) } // DataConnectorMicrosoftCloudAppSecurityMapInput is an input type that accepts DataConnectorMicrosoftCloudAppSecurityMap and DataConnectorMicrosoftCloudAppSecurityMapOutput values. // You can construct a concrete instance of `DataConnectorMicrosoftCloudAppSecurityMapInput` via: // // DataConnectorMicrosoftCloudAppSecurityMap{ "key": DataConnectorMicrosoftCloudAppSecurityArgs{...} } type DataConnectorMicrosoftCloudAppSecurityMapInput interface { pulumi.Input ToDataConnectorMicrosoftCloudAppSecurityMapOutput() DataConnectorMicrosoftCloudAppSecurityMapOutput ToDataConnectorMicrosoftCloudAppSecurityMapOutputWithContext(context.Context) DataConnectorMicrosoftCloudAppSecurityMapOutput } type DataConnectorMicrosoftCloudAppSecurityMap map[string]DataConnectorMicrosoftCloudAppSecurityInput func (DataConnectorMicrosoftCloudAppSecurityMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorMicrosoftCloudAppSecurity)(nil)).Elem() } func (i DataConnectorMicrosoftCloudAppSecurityMap) ToDataConnectorMicrosoftCloudAppSecurityMapOutput() DataConnectorMicrosoftCloudAppSecurityMapOutput { return i.ToDataConnectorMicrosoftCloudAppSecurityMapOutputWithContext(context.Background()) } func (i DataConnectorMicrosoftCloudAppSecurityMap) ToDataConnectorMicrosoftCloudAppSecurityMapOutputWithContext(ctx context.Context) DataConnectorMicrosoftCloudAppSecurityMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorMicrosoftCloudAppSecurityMapOutput) } type DataConnectorMicrosoftCloudAppSecurityOutput struct{ *pulumi.OutputState } func (DataConnectorMicrosoftCloudAppSecurityOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorMicrosoftCloudAppSecurity)(nil)).Elem() } func (o DataConnectorMicrosoftCloudAppSecurityOutput) ToDataConnectorMicrosoftCloudAppSecurityOutput() DataConnectorMicrosoftCloudAppSecurityOutput { return o } func (o DataConnectorMicrosoftCloudAppSecurityOutput) ToDataConnectorMicrosoftCloudAppSecurityOutputWithContext(ctx context.Context) DataConnectorMicrosoftCloudAppSecurityOutput { return o } // Should the alerts be enabled? Defaults to `true`. func (o DataConnectorMicrosoftCloudAppSecurityOutput) AlertsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *DataConnectorMicrosoftCloudAppSecurity) pulumi.BoolPtrOutput { return v.AlertsEnabled }).(pulumi.BoolPtrOutput) } // Should the Discovery Logs be enabled? Defaults to `true`. // // > **Note:** One of either `alertsEnabled` or `discoveryLogsEnabled` has to be specified. func (o DataConnectorMicrosoftCloudAppSecurityOutput) DiscoveryLogsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *DataConnectorMicrosoftCloudAppSecurity) pulumi.BoolPtrOutput { return v.DiscoveryLogsEnabled }).(pulumi.BoolPtrOutput) } // The ID of the Log Analytics Workspace that this Microsoft Cloud App Security Data Connector resides in. Changing this forces a new Microsoft Cloud App Security Data Connector to be created. func (o DataConnectorMicrosoftCloudAppSecurityOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorMicrosoftCloudAppSecurity) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Microsoft Cloud App Security Data Connector. Changing this forces a new Microsoft Cloud App Security Data Connector to be created. func (o DataConnectorMicrosoftCloudAppSecurityOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorMicrosoftCloudAppSecurity) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Tenant that this Microsoft Cloud App Security Data Connector connects to. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. func (o DataConnectorMicrosoftCloudAppSecurityOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorMicrosoftCloudAppSecurity) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type DataConnectorMicrosoftCloudAppSecurityArrayOutput struct{ *pulumi.OutputState } func (DataConnectorMicrosoftCloudAppSecurityArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorMicrosoftCloudAppSecurity)(nil)).Elem() } func (o DataConnectorMicrosoftCloudAppSecurityArrayOutput) ToDataConnectorMicrosoftCloudAppSecurityArrayOutput() DataConnectorMicrosoftCloudAppSecurityArrayOutput { return o } func (o DataConnectorMicrosoftCloudAppSecurityArrayOutput) ToDataConnectorMicrosoftCloudAppSecurityArrayOutputWithContext(ctx context.Context) DataConnectorMicrosoftCloudAppSecurityArrayOutput { return o } func (o DataConnectorMicrosoftCloudAppSecurityArrayOutput) Index(i pulumi.IntInput) DataConnectorMicrosoftCloudAppSecurityOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorMicrosoftCloudAppSecurity { return vs[0].([]*DataConnectorMicrosoftCloudAppSecurity)[vs[1].(int)] }).(DataConnectorMicrosoftCloudAppSecurityOutput) } type DataConnectorMicrosoftCloudAppSecurityMapOutput struct{ *pulumi.OutputState } func (DataConnectorMicrosoftCloudAppSecurityMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorMicrosoftCloudAppSecurity)(nil)).Elem() } func (o DataConnectorMicrosoftCloudAppSecurityMapOutput) ToDataConnectorMicrosoftCloudAppSecurityMapOutput() DataConnectorMicrosoftCloudAppSecurityMapOutput { return o } func (o DataConnectorMicrosoftCloudAppSecurityMapOutput) ToDataConnectorMicrosoftCloudAppSecurityMapOutputWithContext(ctx context.Context) DataConnectorMicrosoftCloudAppSecurityMapOutput { return o } func (o DataConnectorMicrosoftCloudAppSecurityMapOutput) MapIndex(k pulumi.StringInput) DataConnectorMicrosoftCloudAppSecurityOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorMicrosoftCloudAppSecurity { return vs[0].(map[string]*DataConnectorMicrosoftCloudAppSecurity)[vs[1].(string)] }).(DataConnectorMicrosoftCloudAppSecurityOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorMicrosoftCloudAppSecurityInput)(nil)).Elem(), &DataConnectorMicrosoftCloudAppSecurity{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorMicrosoftCloudAppSecurityArrayInput)(nil)).Elem(), DataConnectorMicrosoftCloudAppSecurityArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorMicrosoftCloudAppSecurityMapInput)(nil)).Elem(), DataConnectorMicrosoftCloudAppSecurityMap{}) pulumi.RegisterOutputType(DataConnectorMicrosoftCloudAppSecurityOutput{}) pulumi.RegisterOutputType(DataConnectorMicrosoftCloudAppSecurityArrayOutput{}) pulumi.RegisterOutputType(DataConnectorMicrosoftCloudAppSecurityMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/logAnalyticsWorkspaceOnboarding.go
sdk/go/azure/sentinel/logAnalyticsWorkspaceOnboarding.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Security Insights Sentinel Onboarding. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-law"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // _, err = sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // CustomerManagedKeyEnabled: pulumi.Bool(false), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.OperationalInsights` - 2022-11-01 // // ## Import // // Security Insights Sentinel Onboarding States can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/logAnalyticsWorkspaceOnboarding:LogAnalyticsWorkspaceOnboarding example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/onboardingStates/defaults // ``` type LogAnalyticsWorkspaceOnboarding struct { pulumi.CustomResourceState // Specifies if the Workspace is using Customer managed key. Defaults to `false`. Changing this forces a new resource to be created. // // > **Note:** To set up Microsoft Sentinel customer-managed key it needs to enable CMK on the workspace and add access policy to your Azure Key Vault. Details could be found on [this document](https://learn.microsoft.com/en-us/azure/sentinel/customer-managed-keys) // // > **Note:** Once a workspace is onboarded to Microsoft Sentinel with `customerManagedKeyEnabled` set to true, it will not be able to be onboarded again with `customerManagedKeyEnabled` set to false. CustomerManagedKeyEnabled pulumi.BoolPtrOutput `pulumi:"customerManagedKeyEnabled"` // Specifies the Workspace Id. Changing this forces the Log Analytics Workspace off the board and onboard again. Changing this forces a new resource to be created. WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"` } // NewLogAnalyticsWorkspaceOnboarding registers a new resource with the given unique name, arguments, and options. func NewLogAnalyticsWorkspaceOnboarding(ctx *pulumi.Context, name string, args *LogAnalyticsWorkspaceOnboardingArgs, opts ...pulumi.ResourceOption) (*LogAnalyticsWorkspaceOnboarding, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.WorkspaceId == nil { return nil, errors.New("invalid value for required argument 'WorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource LogAnalyticsWorkspaceOnboarding err := ctx.RegisterResource("azure:sentinel/logAnalyticsWorkspaceOnboarding:LogAnalyticsWorkspaceOnboarding", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetLogAnalyticsWorkspaceOnboarding gets an existing LogAnalyticsWorkspaceOnboarding resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetLogAnalyticsWorkspaceOnboarding(ctx *pulumi.Context, name string, id pulumi.IDInput, state *LogAnalyticsWorkspaceOnboardingState, opts ...pulumi.ResourceOption) (*LogAnalyticsWorkspaceOnboarding, error) { var resource LogAnalyticsWorkspaceOnboarding err := ctx.ReadResource("azure:sentinel/logAnalyticsWorkspaceOnboarding:LogAnalyticsWorkspaceOnboarding", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering LogAnalyticsWorkspaceOnboarding resources. type logAnalyticsWorkspaceOnboardingState struct { // Specifies if the Workspace is using Customer managed key. Defaults to `false`. Changing this forces a new resource to be created. // // > **Note:** To set up Microsoft Sentinel customer-managed key it needs to enable CMK on the workspace and add access policy to your Azure Key Vault. Details could be found on [this document](https://learn.microsoft.com/en-us/azure/sentinel/customer-managed-keys) // // > **Note:** Once a workspace is onboarded to Microsoft Sentinel with `customerManagedKeyEnabled` set to true, it will not be able to be onboarded again with `customerManagedKeyEnabled` set to false. CustomerManagedKeyEnabled *bool `pulumi:"customerManagedKeyEnabled"` // Specifies the Workspace Id. Changing this forces the Log Analytics Workspace off the board and onboard again. Changing this forces a new resource to be created. WorkspaceId *string `pulumi:"workspaceId"` } type LogAnalyticsWorkspaceOnboardingState struct { // Specifies if the Workspace is using Customer managed key. Defaults to `false`. Changing this forces a new resource to be created. // // > **Note:** To set up Microsoft Sentinel customer-managed key it needs to enable CMK on the workspace and add access policy to your Azure Key Vault. Details could be found on [this document](https://learn.microsoft.com/en-us/azure/sentinel/customer-managed-keys) // // > **Note:** Once a workspace is onboarded to Microsoft Sentinel with `customerManagedKeyEnabled` set to true, it will not be able to be onboarded again with `customerManagedKeyEnabled` set to false. CustomerManagedKeyEnabled pulumi.BoolPtrInput // Specifies the Workspace Id. Changing this forces the Log Analytics Workspace off the board and onboard again. Changing this forces a new resource to be created. WorkspaceId pulumi.StringPtrInput } func (LogAnalyticsWorkspaceOnboardingState) ElementType() reflect.Type { return reflect.TypeOf((*logAnalyticsWorkspaceOnboardingState)(nil)).Elem() } type logAnalyticsWorkspaceOnboardingArgs struct { // Specifies if the Workspace is using Customer managed key. Defaults to `false`. Changing this forces a new resource to be created. // // > **Note:** To set up Microsoft Sentinel customer-managed key it needs to enable CMK on the workspace and add access policy to your Azure Key Vault. Details could be found on [this document](https://learn.microsoft.com/en-us/azure/sentinel/customer-managed-keys) // // > **Note:** Once a workspace is onboarded to Microsoft Sentinel with `customerManagedKeyEnabled` set to true, it will not be able to be onboarded again with `customerManagedKeyEnabled` set to false. CustomerManagedKeyEnabled *bool `pulumi:"customerManagedKeyEnabled"` // Specifies the Workspace Id. Changing this forces the Log Analytics Workspace off the board and onboard again. Changing this forces a new resource to be created. WorkspaceId string `pulumi:"workspaceId"` } // The set of arguments for constructing a LogAnalyticsWorkspaceOnboarding resource. type LogAnalyticsWorkspaceOnboardingArgs struct { // Specifies if the Workspace is using Customer managed key. Defaults to `false`. Changing this forces a new resource to be created. // // > **Note:** To set up Microsoft Sentinel customer-managed key it needs to enable CMK on the workspace and add access policy to your Azure Key Vault. Details could be found on [this document](https://learn.microsoft.com/en-us/azure/sentinel/customer-managed-keys) // // > **Note:** Once a workspace is onboarded to Microsoft Sentinel with `customerManagedKeyEnabled` set to true, it will not be able to be onboarded again with `customerManagedKeyEnabled` set to false. CustomerManagedKeyEnabled pulumi.BoolPtrInput // Specifies the Workspace Id. Changing this forces the Log Analytics Workspace off the board and onboard again. Changing this forces a new resource to be created. WorkspaceId pulumi.StringInput } func (LogAnalyticsWorkspaceOnboardingArgs) ElementType() reflect.Type { return reflect.TypeOf((*logAnalyticsWorkspaceOnboardingArgs)(nil)).Elem() } type LogAnalyticsWorkspaceOnboardingInput interface { pulumi.Input ToLogAnalyticsWorkspaceOnboardingOutput() LogAnalyticsWorkspaceOnboardingOutput ToLogAnalyticsWorkspaceOnboardingOutputWithContext(ctx context.Context) LogAnalyticsWorkspaceOnboardingOutput } func (*LogAnalyticsWorkspaceOnboarding) ElementType() reflect.Type { return reflect.TypeOf((**LogAnalyticsWorkspaceOnboarding)(nil)).Elem() } func (i *LogAnalyticsWorkspaceOnboarding) ToLogAnalyticsWorkspaceOnboardingOutput() LogAnalyticsWorkspaceOnboardingOutput { return i.ToLogAnalyticsWorkspaceOnboardingOutputWithContext(context.Background()) } func (i *LogAnalyticsWorkspaceOnboarding) ToLogAnalyticsWorkspaceOnboardingOutputWithContext(ctx context.Context) LogAnalyticsWorkspaceOnboardingOutput { return pulumi.ToOutputWithContext(ctx, i).(LogAnalyticsWorkspaceOnboardingOutput) } // LogAnalyticsWorkspaceOnboardingArrayInput is an input type that accepts LogAnalyticsWorkspaceOnboardingArray and LogAnalyticsWorkspaceOnboardingArrayOutput values. // You can construct a concrete instance of `LogAnalyticsWorkspaceOnboardingArrayInput` via: // // LogAnalyticsWorkspaceOnboardingArray{ LogAnalyticsWorkspaceOnboardingArgs{...} } type LogAnalyticsWorkspaceOnboardingArrayInput interface { pulumi.Input ToLogAnalyticsWorkspaceOnboardingArrayOutput() LogAnalyticsWorkspaceOnboardingArrayOutput ToLogAnalyticsWorkspaceOnboardingArrayOutputWithContext(context.Context) LogAnalyticsWorkspaceOnboardingArrayOutput } type LogAnalyticsWorkspaceOnboardingArray []LogAnalyticsWorkspaceOnboardingInput func (LogAnalyticsWorkspaceOnboardingArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*LogAnalyticsWorkspaceOnboarding)(nil)).Elem() } func (i LogAnalyticsWorkspaceOnboardingArray) ToLogAnalyticsWorkspaceOnboardingArrayOutput() LogAnalyticsWorkspaceOnboardingArrayOutput { return i.ToLogAnalyticsWorkspaceOnboardingArrayOutputWithContext(context.Background()) } func (i LogAnalyticsWorkspaceOnboardingArray) ToLogAnalyticsWorkspaceOnboardingArrayOutputWithContext(ctx context.Context) LogAnalyticsWorkspaceOnboardingArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(LogAnalyticsWorkspaceOnboardingArrayOutput) } // LogAnalyticsWorkspaceOnboardingMapInput is an input type that accepts LogAnalyticsWorkspaceOnboardingMap and LogAnalyticsWorkspaceOnboardingMapOutput values. // You can construct a concrete instance of `LogAnalyticsWorkspaceOnboardingMapInput` via: // // LogAnalyticsWorkspaceOnboardingMap{ "key": LogAnalyticsWorkspaceOnboardingArgs{...} } type LogAnalyticsWorkspaceOnboardingMapInput interface { pulumi.Input ToLogAnalyticsWorkspaceOnboardingMapOutput() LogAnalyticsWorkspaceOnboardingMapOutput ToLogAnalyticsWorkspaceOnboardingMapOutputWithContext(context.Context) LogAnalyticsWorkspaceOnboardingMapOutput } type LogAnalyticsWorkspaceOnboardingMap map[string]LogAnalyticsWorkspaceOnboardingInput func (LogAnalyticsWorkspaceOnboardingMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LogAnalyticsWorkspaceOnboarding)(nil)).Elem() } func (i LogAnalyticsWorkspaceOnboardingMap) ToLogAnalyticsWorkspaceOnboardingMapOutput() LogAnalyticsWorkspaceOnboardingMapOutput { return i.ToLogAnalyticsWorkspaceOnboardingMapOutputWithContext(context.Background()) } func (i LogAnalyticsWorkspaceOnboardingMap) ToLogAnalyticsWorkspaceOnboardingMapOutputWithContext(ctx context.Context) LogAnalyticsWorkspaceOnboardingMapOutput { return pulumi.ToOutputWithContext(ctx, i).(LogAnalyticsWorkspaceOnboardingMapOutput) } type LogAnalyticsWorkspaceOnboardingOutput struct{ *pulumi.OutputState } func (LogAnalyticsWorkspaceOnboardingOutput) ElementType() reflect.Type { return reflect.TypeOf((**LogAnalyticsWorkspaceOnboarding)(nil)).Elem() } func (o LogAnalyticsWorkspaceOnboardingOutput) ToLogAnalyticsWorkspaceOnboardingOutput() LogAnalyticsWorkspaceOnboardingOutput { return o } func (o LogAnalyticsWorkspaceOnboardingOutput) ToLogAnalyticsWorkspaceOnboardingOutputWithContext(ctx context.Context) LogAnalyticsWorkspaceOnboardingOutput { return o } // Specifies if the Workspace is using Customer managed key. Defaults to `false`. Changing this forces a new resource to be created. // // > **Note:** To set up Microsoft Sentinel customer-managed key it needs to enable CMK on the workspace and add access policy to your Azure Key Vault. Details could be found on [this document](https://learn.microsoft.com/en-us/azure/sentinel/customer-managed-keys) // // > **Note:** Once a workspace is onboarded to Microsoft Sentinel with `customerManagedKeyEnabled` set to true, it will not be able to be onboarded again with `customerManagedKeyEnabled` set to false. func (o LogAnalyticsWorkspaceOnboardingOutput) CustomerManagedKeyEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *LogAnalyticsWorkspaceOnboarding) pulumi.BoolPtrOutput { return v.CustomerManagedKeyEnabled }).(pulumi.BoolPtrOutput) } // Specifies the Workspace Id. Changing this forces the Log Analytics Workspace off the board and onboard again. Changing this forces a new resource to be created. func (o LogAnalyticsWorkspaceOnboardingOutput) WorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *LogAnalyticsWorkspaceOnboarding) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput) } type LogAnalyticsWorkspaceOnboardingArrayOutput struct{ *pulumi.OutputState } func (LogAnalyticsWorkspaceOnboardingArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*LogAnalyticsWorkspaceOnboarding)(nil)).Elem() } func (o LogAnalyticsWorkspaceOnboardingArrayOutput) ToLogAnalyticsWorkspaceOnboardingArrayOutput() LogAnalyticsWorkspaceOnboardingArrayOutput { return o } func (o LogAnalyticsWorkspaceOnboardingArrayOutput) ToLogAnalyticsWorkspaceOnboardingArrayOutputWithContext(ctx context.Context) LogAnalyticsWorkspaceOnboardingArrayOutput { return o } func (o LogAnalyticsWorkspaceOnboardingArrayOutput) Index(i pulumi.IntInput) LogAnalyticsWorkspaceOnboardingOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LogAnalyticsWorkspaceOnboarding { return vs[0].([]*LogAnalyticsWorkspaceOnboarding)[vs[1].(int)] }).(LogAnalyticsWorkspaceOnboardingOutput) } type LogAnalyticsWorkspaceOnboardingMapOutput struct{ *pulumi.OutputState } func (LogAnalyticsWorkspaceOnboardingMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LogAnalyticsWorkspaceOnboarding)(nil)).Elem() } func (o LogAnalyticsWorkspaceOnboardingMapOutput) ToLogAnalyticsWorkspaceOnboardingMapOutput() LogAnalyticsWorkspaceOnboardingMapOutput { return o } func (o LogAnalyticsWorkspaceOnboardingMapOutput) ToLogAnalyticsWorkspaceOnboardingMapOutputWithContext(ctx context.Context) LogAnalyticsWorkspaceOnboardingMapOutput { return o } func (o LogAnalyticsWorkspaceOnboardingMapOutput) MapIndex(k pulumi.StringInput) LogAnalyticsWorkspaceOnboardingOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LogAnalyticsWorkspaceOnboarding { return vs[0].(map[string]*LogAnalyticsWorkspaceOnboarding)[vs[1].(string)] }).(LogAnalyticsWorkspaceOnboardingOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*LogAnalyticsWorkspaceOnboardingInput)(nil)).Elem(), &LogAnalyticsWorkspaceOnboarding{}) pulumi.RegisterInputType(reflect.TypeOf((*LogAnalyticsWorkspaceOnboardingArrayInput)(nil)).Elem(), LogAnalyticsWorkspaceOnboardingArray{}) pulumi.RegisterInputType(reflect.TypeOf((*LogAnalyticsWorkspaceOnboardingMapInput)(nil)).Elem(), LogAnalyticsWorkspaceOnboardingMap{}) pulumi.RegisterOutputType(LogAnalyticsWorkspaceOnboardingOutput{}) pulumi.RegisterOutputType(LogAnalyticsWorkspaceOnboardingArrayOutput{}) pulumi.RegisterOutputType(LogAnalyticsWorkspaceOnboardingMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorMicrosoftDefenderAdvancedThreatProtection.go
sdk/go/azure/sentinel/dataConnectorMicrosoftDefenderAdvancedThreatProtection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Microsoft Defender Advanced Threat Protection Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("west europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorMicrosoftDefenderAdvancedThreatProtection(ctx, "example", &sentinel.DataConnectorMicrosoftDefenderAdvancedThreatProtectionArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Microsoft Defender Advanced Threat Protection Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorMicrosoftDefenderAdvancedThreatProtection:DataConnectorMicrosoftDefenderAdvancedThreatProtection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorMicrosoftDefenderAdvancedThreatProtection struct { pulumi.CustomResourceState // The ID of the Log Analytics Workspace that this Microsoft Defender Advanced Threat Protection Data Connector resides in. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Microsoft Defender Advanced Threat Protection Data Connector. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the tenant that this Microsoft Defender Advanced Threat Protection Data Connector connects to. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewDataConnectorMicrosoftDefenderAdvancedThreatProtection registers a new resource with the given unique name, arguments, and options. func NewDataConnectorMicrosoftDefenderAdvancedThreatProtection(ctx *pulumi.Context, name string, args *DataConnectorMicrosoftDefenderAdvancedThreatProtectionArgs, opts ...pulumi.ResourceOption) (*DataConnectorMicrosoftDefenderAdvancedThreatProtection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorMicrosoftDefenderAdvancedThreatProtection err := ctx.RegisterResource("azure:sentinel/dataConnectorMicrosoftDefenderAdvancedThreatProtection:DataConnectorMicrosoftDefenderAdvancedThreatProtection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorMicrosoftDefenderAdvancedThreatProtection gets an existing DataConnectorMicrosoftDefenderAdvancedThreatProtection resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorMicrosoftDefenderAdvancedThreatProtection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorMicrosoftDefenderAdvancedThreatProtectionState, opts ...pulumi.ResourceOption) (*DataConnectorMicrosoftDefenderAdvancedThreatProtection, error) { var resource DataConnectorMicrosoftDefenderAdvancedThreatProtection err := ctx.ReadResource("azure:sentinel/dataConnectorMicrosoftDefenderAdvancedThreatProtection:DataConnectorMicrosoftDefenderAdvancedThreatProtection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorMicrosoftDefenderAdvancedThreatProtection resources. type dataConnectorMicrosoftDefenderAdvancedThreatProtectionState struct { // The ID of the Log Analytics Workspace that this Microsoft Defender Advanced Threat Protection Data Connector resides in. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Microsoft Defender Advanced Threat Protection Data Connector. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Microsoft Defender Advanced Threat Protection Data Connector connects to. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } type DataConnectorMicrosoftDefenderAdvancedThreatProtectionState struct { // The ID of the Log Analytics Workspace that this Microsoft Defender Advanced Threat Protection Data Connector resides in. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Microsoft Defender Advanced Threat Protection Data Connector. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Microsoft Defender Advanced Threat Protection Data Connector connects to. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorMicrosoftDefenderAdvancedThreatProtectionState) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorMicrosoftDefenderAdvancedThreatProtectionState)(nil)).Elem() } type dataConnectorMicrosoftDefenderAdvancedThreatProtectionArgs struct { // The ID of the Log Analytics Workspace that this Microsoft Defender Advanced Threat Protection Data Connector resides in. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Microsoft Defender Advanced Threat Protection Data Connector. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Microsoft Defender Advanced Threat Protection Data Connector connects to. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } // The set of arguments for constructing a DataConnectorMicrosoftDefenderAdvancedThreatProtection resource. type DataConnectorMicrosoftDefenderAdvancedThreatProtectionArgs struct { // The ID of the Log Analytics Workspace that this Microsoft Defender Advanced Threat Protection Data Connector resides in. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Microsoft Defender Advanced Threat Protection Data Connector. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Microsoft Defender Advanced Threat Protection Data Connector connects to. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorMicrosoftDefenderAdvancedThreatProtectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorMicrosoftDefenderAdvancedThreatProtectionArgs)(nil)).Elem() } type DataConnectorMicrosoftDefenderAdvancedThreatProtectionInput interface { pulumi.Input ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput() DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionOutputWithContext(ctx context.Context) DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput } func (*DataConnectorMicrosoftDefenderAdvancedThreatProtection) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorMicrosoftDefenderAdvancedThreatProtection)(nil)).Elem() } func (i *DataConnectorMicrosoftDefenderAdvancedThreatProtection) ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput() DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput { return i.ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionOutputWithContext(context.Background()) } func (i *DataConnectorMicrosoftDefenderAdvancedThreatProtection) ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionOutputWithContext(ctx context.Context) DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput) } // DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayInput is an input type that accepts DataConnectorMicrosoftDefenderAdvancedThreatProtectionArray and DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput values. // You can construct a concrete instance of `DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayInput` via: // // DataConnectorMicrosoftDefenderAdvancedThreatProtectionArray{ DataConnectorMicrosoftDefenderAdvancedThreatProtectionArgs{...} } type DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayInput interface { pulumi.Input ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput() DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutputWithContext(context.Context) DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput } type DataConnectorMicrosoftDefenderAdvancedThreatProtectionArray []DataConnectorMicrosoftDefenderAdvancedThreatProtectionInput func (DataConnectorMicrosoftDefenderAdvancedThreatProtectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorMicrosoftDefenderAdvancedThreatProtection)(nil)).Elem() } func (i DataConnectorMicrosoftDefenderAdvancedThreatProtectionArray) ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput() DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput { return i.ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutputWithContext(context.Background()) } func (i DataConnectorMicrosoftDefenderAdvancedThreatProtectionArray) ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutputWithContext(ctx context.Context) DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput) } // DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapInput is an input type that accepts DataConnectorMicrosoftDefenderAdvancedThreatProtectionMap and DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput values. // You can construct a concrete instance of `DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapInput` via: // // DataConnectorMicrosoftDefenderAdvancedThreatProtectionMap{ "key": DataConnectorMicrosoftDefenderAdvancedThreatProtectionArgs{...} } type DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapInput interface { pulumi.Input ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput() DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutputWithContext(context.Context) DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput } type DataConnectorMicrosoftDefenderAdvancedThreatProtectionMap map[string]DataConnectorMicrosoftDefenderAdvancedThreatProtectionInput func (DataConnectorMicrosoftDefenderAdvancedThreatProtectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorMicrosoftDefenderAdvancedThreatProtection)(nil)).Elem() } func (i DataConnectorMicrosoftDefenderAdvancedThreatProtectionMap) ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput() DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput { return i.ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutputWithContext(context.Background()) } func (i DataConnectorMicrosoftDefenderAdvancedThreatProtectionMap) ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutputWithContext(ctx context.Context) DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput) } type DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput struct{ *pulumi.OutputState } func (DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorMicrosoftDefenderAdvancedThreatProtection)(nil)).Elem() } func (o DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput) ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput() DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput { return o } func (o DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput) ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionOutputWithContext(ctx context.Context) DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput { return o } // The ID of the Log Analytics Workspace that this Microsoft Defender Advanced Threat Protection Data Connector resides in. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. func (o DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorMicrosoftDefenderAdvancedThreatProtection) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Microsoft Defender Advanced Threat Protection Data Connector. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. func (o DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorMicrosoftDefenderAdvancedThreatProtection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the tenant that this Microsoft Defender Advanced Threat Protection Data Connector connects to. Changing this forces a new Microsoft Defender Advanced Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. func (o DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorMicrosoftDefenderAdvancedThreatProtection) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput struct{ *pulumi.OutputState } func (DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorMicrosoftDefenderAdvancedThreatProtection)(nil)).Elem() } func (o DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput) ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput() DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput { return o } func (o DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput) ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutputWithContext(ctx context.Context) DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput { return o } func (o DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput) Index(i pulumi.IntInput) DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorMicrosoftDefenderAdvancedThreatProtection { return vs[0].([]*DataConnectorMicrosoftDefenderAdvancedThreatProtection)[vs[1].(int)] }).(DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput) } type DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput struct{ *pulumi.OutputState } func (DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorMicrosoftDefenderAdvancedThreatProtection)(nil)).Elem() } func (o DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput) ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput() DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput { return o } func (o DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput) ToDataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutputWithContext(ctx context.Context) DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput { return o } func (o DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput) MapIndex(k pulumi.StringInput) DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorMicrosoftDefenderAdvancedThreatProtection { return vs[0].(map[string]*DataConnectorMicrosoftDefenderAdvancedThreatProtection)[vs[1].(string)] }).(DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorMicrosoftDefenderAdvancedThreatProtectionInput)(nil)).Elem(), &DataConnectorMicrosoftDefenderAdvancedThreatProtection{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayInput)(nil)).Elem(), DataConnectorMicrosoftDefenderAdvancedThreatProtectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapInput)(nil)).Elem(), DataConnectorMicrosoftDefenderAdvancedThreatProtectionMap{}) pulumi.RegisterOutputType(DataConnectorMicrosoftDefenderAdvancedThreatProtectionOutput{}) pulumi.RegisterOutputType(DataConnectorMicrosoftDefenderAdvancedThreatProtectionArrayOutput{}) pulumi.RegisterOutputType(DataConnectorMicrosoftDefenderAdvancedThreatProtectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/authomationRule.go
sdk/go/azure/sentinel/authomationRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Sentinel Automation Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("west europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewAutomationRule(ctx, "example", &sentinel.AutomationRuleArgs{ // Name: pulumi.String("56094f72-ac3f-40e7-a0c0-47bd95f70336"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // DisplayName: pulumi.String("automation_rule1"), // Order: pulumi.Int(1), // ActionIncidents: sentinel.AutomationRuleActionIncidentArray{ // &sentinel.AutomationRuleActionIncidentArgs{ // Order: pulumi.Int(1), // Status: pulumi.String("Active"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.OperationalInsights` - 2024-09-01 // // ## Import // // Sentinel Automation Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/authomationRule:AuthomationRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/automationRules/rule1 // ``` // // Deprecated: azure.sentinel.AuthomationRule has been deprecated in favor of azure.sentinel.AutomationRule type AuthomationRule struct { pulumi.CustomResourceState // One or more `actionIncidentTask` blocks as defined below. ActionIncidentTasks AuthomationRuleActionIncidentTaskArrayOutput `pulumi:"actionIncidentTasks"` // One or more `actionIncident` blocks as defined below. ActionIncidents AuthomationRuleActionIncidentArrayOutput `pulumi:"actionIncidents"` // One or more `actionPlaybook` blocks as defined below. // // > **Note:** Either one `actionIncident` block or `actionPlaybook` block has to be specified. ActionPlaybooks AuthomationRuleActionPlaybookArrayOutput `pulumi:"actionPlaybooks"` // A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic). ConditionJson pulumi.StringPtrOutput `pulumi:"conditionJson"` // The display name which should be used for this Sentinel Automation Rule. DisplayName pulumi.StringOutput `pulumi:"displayName"` // Whether this Sentinel Automation Rule is enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled. Expiration pulumi.StringPtrOutput `pulumi:"expiration"` // The ID of the Log Analytics Workspace where this Sentinel applies to. Changing this forces a new Sentinel Automation Rule to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The UUID which should be used for this Sentinel Automation Rule. Changing this forces a new Sentinel Automation Rule to be created. Name pulumi.StringOutput `pulumi:"name"` // The order of this Sentinel Automation Rule. Possible values varies between `1` and `1000`. Order pulumi.IntOutput `pulumi:"order"` // Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. TriggersOn pulumi.StringPtrOutput `pulumi:"triggersOn"` // Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. TriggersWhen pulumi.StringPtrOutput `pulumi:"triggersWhen"` } // NewAuthomationRule registers a new resource with the given unique name, arguments, and options. func NewAuthomationRule(ctx *pulumi.Context, name string, args *AuthomationRuleArgs, opts ...pulumi.ResourceOption) (*AuthomationRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } if args.Order == nil { return nil, errors.New("invalid value for required argument 'Order'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AuthomationRule err := ctx.RegisterResource("azure:sentinel/authomationRule:AuthomationRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAuthomationRule gets an existing AuthomationRule resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetAuthomationRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AuthomationRuleState, opts ...pulumi.ResourceOption) (*AuthomationRule, error) { var resource AuthomationRule err := ctx.ReadResource("azure:sentinel/authomationRule:AuthomationRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AuthomationRule resources. type authomationRuleState struct { // One or more `actionIncidentTask` blocks as defined below. ActionIncidentTasks []AuthomationRuleActionIncidentTask `pulumi:"actionIncidentTasks"` // One or more `actionIncident` blocks as defined below. ActionIncidents []AuthomationRuleActionIncident `pulumi:"actionIncidents"` // One or more `actionPlaybook` blocks as defined below. // // > **Note:** Either one `actionIncident` block or `actionPlaybook` block has to be specified. ActionPlaybooks []AuthomationRuleActionPlaybook `pulumi:"actionPlaybooks"` // A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic). ConditionJson *string `pulumi:"conditionJson"` // The display name which should be used for this Sentinel Automation Rule. DisplayName *string `pulumi:"displayName"` // Whether this Sentinel Automation Rule is enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled. Expiration *string `pulumi:"expiration"` // The ID of the Log Analytics Workspace where this Sentinel applies to. Changing this forces a new Sentinel Automation Rule to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The UUID which should be used for this Sentinel Automation Rule. Changing this forces a new Sentinel Automation Rule to be created. Name *string `pulumi:"name"` // The order of this Sentinel Automation Rule. Possible values varies between `1` and `1000`. Order *int `pulumi:"order"` // Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. TriggersOn *string `pulumi:"triggersOn"` // Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. TriggersWhen *string `pulumi:"triggersWhen"` } type AuthomationRuleState struct { // One or more `actionIncidentTask` blocks as defined below. ActionIncidentTasks AuthomationRuleActionIncidentTaskArrayInput // One or more `actionIncident` blocks as defined below. ActionIncidents AuthomationRuleActionIncidentArrayInput // One or more `actionPlaybook` blocks as defined below. // // > **Note:** Either one `actionIncident` block or `actionPlaybook` block has to be specified. ActionPlaybooks AuthomationRuleActionPlaybookArrayInput // A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic). ConditionJson pulumi.StringPtrInput // The display name which should be used for this Sentinel Automation Rule. DisplayName pulumi.StringPtrInput // Whether this Sentinel Automation Rule is enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled. Expiration pulumi.StringPtrInput // The ID of the Log Analytics Workspace where this Sentinel applies to. Changing this forces a new Sentinel Automation Rule to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The UUID which should be used for this Sentinel Automation Rule. Changing this forces a new Sentinel Automation Rule to be created. Name pulumi.StringPtrInput // The order of this Sentinel Automation Rule. Possible values varies between `1` and `1000`. Order pulumi.IntPtrInput // Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. TriggersOn pulumi.StringPtrInput // Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. TriggersWhen pulumi.StringPtrInput } func (AuthomationRuleState) ElementType() reflect.Type { return reflect.TypeOf((*authomationRuleState)(nil)).Elem() } type authomationRuleArgs struct { // One or more `actionIncidentTask` blocks as defined below. ActionIncidentTasks []AuthomationRuleActionIncidentTask `pulumi:"actionIncidentTasks"` // One or more `actionIncident` blocks as defined below. ActionIncidents []AuthomationRuleActionIncident `pulumi:"actionIncidents"` // One or more `actionPlaybook` blocks as defined below. // // > **Note:** Either one `actionIncident` block or `actionPlaybook` block has to be specified. ActionPlaybooks []AuthomationRuleActionPlaybook `pulumi:"actionPlaybooks"` // A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic). ConditionJson *string `pulumi:"conditionJson"` // The display name which should be used for this Sentinel Automation Rule. DisplayName string `pulumi:"displayName"` // Whether this Sentinel Automation Rule is enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled. Expiration *string `pulumi:"expiration"` // The ID of the Log Analytics Workspace where this Sentinel applies to. Changing this forces a new Sentinel Automation Rule to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The UUID which should be used for this Sentinel Automation Rule. Changing this forces a new Sentinel Automation Rule to be created. Name *string `pulumi:"name"` // The order of this Sentinel Automation Rule. Possible values varies between `1` and `1000`. Order int `pulumi:"order"` // Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. TriggersOn *string `pulumi:"triggersOn"` // Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. TriggersWhen *string `pulumi:"triggersWhen"` } // The set of arguments for constructing a AuthomationRule resource. type AuthomationRuleArgs struct { // One or more `actionIncidentTask` blocks as defined below. ActionIncidentTasks AuthomationRuleActionIncidentTaskArrayInput // One or more `actionIncident` blocks as defined below. ActionIncidents AuthomationRuleActionIncidentArrayInput // One or more `actionPlaybook` blocks as defined below. // // > **Note:** Either one `actionIncident` block or `actionPlaybook` block has to be specified. ActionPlaybooks AuthomationRuleActionPlaybookArrayInput // A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic). ConditionJson pulumi.StringPtrInput // The display name which should be used for this Sentinel Automation Rule. DisplayName pulumi.StringInput // Whether this Sentinel Automation Rule is enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled. Expiration pulumi.StringPtrInput // The ID of the Log Analytics Workspace where this Sentinel applies to. Changing this forces a new Sentinel Automation Rule to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The UUID which should be used for this Sentinel Automation Rule. Changing this forces a new Sentinel Automation Rule to be created. Name pulumi.StringPtrInput // The order of this Sentinel Automation Rule. Possible values varies between `1` and `1000`. Order pulumi.IntInput // Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. TriggersOn pulumi.StringPtrInput // Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. TriggersWhen pulumi.StringPtrInput } func (AuthomationRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*authomationRuleArgs)(nil)).Elem() } type AuthomationRuleInput interface { pulumi.Input ToAuthomationRuleOutput() AuthomationRuleOutput ToAuthomationRuleOutputWithContext(ctx context.Context) AuthomationRuleOutput } func (*AuthomationRule) ElementType() reflect.Type { return reflect.TypeOf((**AuthomationRule)(nil)).Elem() } func (i *AuthomationRule) ToAuthomationRuleOutput() AuthomationRuleOutput { return i.ToAuthomationRuleOutputWithContext(context.Background()) } func (i *AuthomationRule) ToAuthomationRuleOutputWithContext(ctx context.Context) AuthomationRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(AuthomationRuleOutput) } // AuthomationRuleArrayInput is an input type that accepts AuthomationRuleArray and AuthomationRuleArrayOutput values. // You can construct a concrete instance of `AuthomationRuleArrayInput` via: // // AuthomationRuleArray{ AuthomationRuleArgs{...} } type AuthomationRuleArrayInput interface { pulumi.Input ToAuthomationRuleArrayOutput() AuthomationRuleArrayOutput ToAuthomationRuleArrayOutputWithContext(context.Context) AuthomationRuleArrayOutput } type AuthomationRuleArray []AuthomationRuleInput func (AuthomationRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AuthomationRule)(nil)).Elem() } func (i AuthomationRuleArray) ToAuthomationRuleArrayOutput() AuthomationRuleArrayOutput { return i.ToAuthomationRuleArrayOutputWithContext(context.Background()) } func (i AuthomationRuleArray) ToAuthomationRuleArrayOutputWithContext(ctx context.Context) AuthomationRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AuthomationRuleArrayOutput) } // AuthomationRuleMapInput is an input type that accepts AuthomationRuleMap and AuthomationRuleMapOutput values. // You can construct a concrete instance of `AuthomationRuleMapInput` via: // // AuthomationRuleMap{ "key": AuthomationRuleArgs{...} } type AuthomationRuleMapInput interface { pulumi.Input ToAuthomationRuleMapOutput() AuthomationRuleMapOutput ToAuthomationRuleMapOutputWithContext(context.Context) AuthomationRuleMapOutput } type AuthomationRuleMap map[string]AuthomationRuleInput func (AuthomationRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AuthomationRule)(nil)).Elem() } func (i AuthomationRuleMap) ToAuthomationRuleMapOutput() AuthomationRuleMapOutput { return i.ToAuthomationRuleMapOutputWithContext(context.Background()) } func (i AuthomationRuleMap) ToAuthomationRuleMapOutputWithContext(ctx context.Context) AuthomationRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AuthomationRuleMapOutput) } type AuthomationRuleOutput struct{ *pulumi.OutputState } func (AuthomationRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**AuthomationRule)(nil)).Elem() } func (o AuthomationRuleOutput) ToAuthomationRuleOutput() AuthomationRuleOutput { return o } func (o AuthomationRuleOutput) ToAuthomationRuleOutputWithContext(ctx context.Context) AuthomationRuleOutput { return o } // One or more `actionIncidentTask` blocks as defined below. func (o AuthomationRuleOutput) ActionIncidentTasks() AuthomationRuleActionIncidentTaskArrayOutput { return o.ApplyT(func(v *AuthomationRule) AuthomationRuleActionIncidentTaskArrayOutput { return v.ActionIncidentTasks }).(AuthomationRuleActionIncidentTaskArrayOutput) } // One or more `actionIncident` blocks as defined below. func (o AuthomationRuleOutput) ActionIncidents() AuthomationRuleActionIncidentArrayOutput { return o.ApplyT(func(v *AuthomationRule) AuthomationRuleActionIncidentArrayOutput { return v.ActionIncidents }).(AuthomationRuleActionIncidentArrayOutput) } // One or more `actionPlaybook` blocks as defined below. // // > **Note:** Either one `actionIncident` block or `actionPlaybook` block has to be specified. func (o AuthomationRuleOutput) ActionPlaybooks() AuthomationRuleActionPlaybookArrayOutput { return o.ApplyT(func(v *AuthomationRule) AuthomationRuleActionPlaybookArrayOutput { return v.ActionPlaybooks }).(AuthomationRuleActionPlaybookArrayOutput) } // A JSON array of one or more condition JSON objects as is defined [here](https://learn.microsoft.com/en-us/rest/api/securityinsights/preview/automation-rules/create-or-update?tabs=HTTP#automationruletriggeringlogic). func (o AuthomationRuleOutput) ConditionJson() pulumi.StringPtrOutput { return o.ApplyT(func(v *AuthomationRule) pulumi.StringPtrOutput { return v.ConditionJson }).(pulumi.StringPtrOutput) } // The display name which should be used for this Sentinel Automation Rule. func (o AuthomationRuleOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *AuthomationRule) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // Whether this Sentinel Automation Rule is enabled? Defaults to `true`. func (o AuthomationRuleOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AuthomationRule) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // The time in RFC3339 format of kind `UTC` that determines when this Automation Rule should expire and be disabled. func (o AuthomationRuleOutput) Expiration() pulumi.StringPtrOutput { return o.ApplyT(func(v *AuthomationRule) pulumi.StringPtrOutput { return v.Expiration }).(pulumi.StringPtrOutput) } // The ID of the Log Analytics Workspace where this Sentinel applies to. Changing this forces a new Sentinel Automation Rule to be created. func (o AuthomationRuleOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *AuthomationRule) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The UUID which should be used for this Sentinel Automation Rule. Changing this forces a new Sentinel Automation Rule to be created. func (o AuthomationRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AuthomationRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The order of this Sentinel Automation Rule. Possible values varies between `1` and `1000`. func (o AuthomationRuleOutput) Order() pulumi.IntOutput { return o.ApplyT(func(v *AuthomationRule) pulumi.IntOutput { return v.Order }).(pulumi.IntOutput) } // Specifies what triggers this automation rule. Possible values are `Alerts` and `Incidents`. Defaults to `Incidents`. func (o AuthomationRuleOutput) TriggersOn() pulumi.StringPtrOutput { return o.ApplyT(func(v *AuthomationRule) pulumi.StringPtrOutput { return v.TriggersOn }).(pulumi.StringPtrOutput) } // Specifies when will this automation rule be triggered. Possible values are `Created` and `Updated`. Defaults to `Created`. func (o AuthomationRuleOutput) TriggersWhen() pulumi.StringPtrOutput { return o.ApplyT(func(v *AuthomationRule) pulumi.StringPtrOutput { return v.TriggersWhen }).(pulumi.StringPtrOutput) } type AuthomationRuleArrayOutput struct{ *pulumi.OutputState } func (AuthomationRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AuthomationRule)(nil)).Elem() } func (o AuthomationRuleArrayOutput) ToAuthomationRuleArrayOutput() AuthomationRuleArrayOutput { return o } func (o AuthomationRuleArrayOutput) ToAuthomationRuleArrayOutputWithContext(ctx context.Context) AuthomationRuleArrayOutput { return o } func (o AuthomationRuleArrayOutput) Index(i pulumi.IntInput) AuthomationRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AuthomationRule { return vs[0].([]*AuthomationRule)[vs[1].(int)] }).(AuthomationRuleOutput) } type AuthomationRuleMapOutput struct{ *pulumi.OutputState } func (AuthomationRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AuthomationRule)(nil)).Elem() } func (o AuthomationRuleMapOutput) ToAuthomationRuleMapOutput() AuthomationRuleMapOutput { return o } func (o AuthomationRuleMapOutput) ToAuthomationRuleMapOutputWithContext(ctx context.Context) AuthomationRuleMapOutput { return o } func (o AuthomationRuleMapOutput) MapIndex(k pulumi.StringInput) AuthomationRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AuthomationRule { return vs[0].(map[string]*AuthomationRule)[vs[1].(string)] }).(AuthomationRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AuthomationRuleInput)(nil)).Elem(), &AuthomationRule{}) pulumi.RegisterInputType(reflect.TypeOf((*AuthomationRuleArrayInput)(nil)).Elem(), AuthomationRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AuthomationRuleMapInput)(nil)).Elem(), AuthomationRuleMap{}) pulumi.RegisterOutputType(AuthomationRuleOutput{}) pulumi.RegisterOutputType(AuthomationRuleArrayOutput{}) pulumi.RegisterOutputType(AuthomationRuleMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/alertRuleAnomalyBuiltIn.go
sdk/go/azure/sentinel/alertRuleAnomalyBuiltIn.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-law"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // CustomerManagedKeyEnabled: pulumi.Bool(false), // }) // if err != nil { // return err // } // _ = sentinel.GetAlertRuleAnomalyOutput(ctx, sentinel.GetAlertRuleAnomalyOutputArgs{ // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // DisplayName: pulumi.String("Potential data staging"), // }, nil) // _, err = sentinel.NewAlertRuleAnomalyBuiltIn(ctx, "example", &sentinel.AlertRuleAnomalyBuiltInArgs{ // DisplayName: pulumi.String("Potential data staging"), // LogAnalyticsWorkspaceId: exampleAnalyticsWorkspace.ID(), // Mode: pulumi.String("Production"), // Enabled: pulumi.Bool(false), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Built In Anomaly Alert Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/alertRuleAnomalyBuiltIn:AlertRuleAnomalyBuiltIn example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/securityMLAnalyticsSettings/setting1 // ``` type AlertRuleAnomalyBuiltIn struct { pulumi.CustomResourceState // The version of the Anomaly Security ML Analytics Settings. AnomalySettingsVersion pulumi.IntOutput `pulumi:"anomalySettingsVersion"` // The anomaly version of the Anomaly Alert Rule. AnomalyVersion pulumi.StringOutput `pulumi:"anomalyVersion"` // The description of the threshold observation. Description pulumi.StringOutput `pulumi:"description"` // The Display Name of the built-in Anomaly Alert Rule. // // > **Note:** One of `name` or `displayName` block must be specified. DisplayName pulumi.StringOutput `pulumi:"displayName"` // Should the Built-in Anomaly Alert Rule be enabled? Enabled pulumi.BoolOutput `pulumi:"enabled"` // The frequency the Anomaly Alert Rule will be run. Frequency pulumi.StringOutput `pulumi:"frequency"` // The ID of the Log Analytics Workspace. Changing this forces a new Built-in Anomaly Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // mode of the Built-in Anomaly Alert Rule. Possible Values are `Production` and `Flighting`. Mode pulumi.StringOutput `pulumi:"mode"` // A list of `multiSelectObservation` blocks as defined below. MultiSelectObservations AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput `pulumi:"multiSelectObservations"` // The Name of the built-in Anomaly Alert Rule. Name pulumi.StringOutput `pulumi:"name"` // A list of `prioritizedExcludeObservation` blocks as defined below. PrioritizedExcludeObservations AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput `pulumi:"prioritizedExcludeObservations"` // A `requiredDataConnector` block as defined below. RequiredDataConnectors AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput `pulumi:"requiredDataConnectors"` // The ID of the anomaly settings definition Id. SettingsDefinitionId pulumi.StringOutput `pulumi:"settingsDefinitionId"` // A list of `singleSelectObservation` blocks as defined below. SingleSelectObservations AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput `pulumi:"singleSelectObservations"` // A list of categories of attacks by which to classify the rule. Tactics pulumi.StringArrayOutput `pulumi:"tactics"` // A list of techniques of attacks by which to classify the rule. Techniques pulumi.StringArrayOutput `pulumi:"techniques"` // A list of `thresholdObservation` blocks as defined below. ThresholdObservations AlertRuleAnomalyBuiltInThresholdObservationArrayOutput `pulumi:"thresholdObservations"` } // NewAlertRuleAnomalyBuiltIn registers a new resource with the given unique name, arguments, and options. func NewAlertRuleAnomalyBuiltIn(ctx *pulumi.Context, name string, args *AlertRuleAnomalyBuiltInArgs, opts ...pulumi.ResourceOption) (*AlertRuleAnomalyBuiltIn, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Enabled == nil { return nil, errors.New("invalid value for required argument 'Enabled'") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } if args.Mode == nil { return nil, errors.New("invalid value for required argument 'Mode'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AlertRuleAnomalyBuiltIn err := ctx.RegisterResource("azure:sentinel/alertRuleAnomalyBuiltIn:AlertRuleAnomalyBuiltIn", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAlertRuleAnomalyBuiltIn gets an existing AlertRuleAnomalyBuiltIn resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetAlertRuleAnomalyBuiltIn(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AlertRuleAnomalyBuiltInState, opts ...pulumi.ResourceOption) (*AlertRuleAnomalyBuiltIn, error) { var resource AlertRuleAnomalyBuiltIn err := ctx.ReadResource("azure:sentinel/alertRuleAnomalyBuiltIn:AlertRuleAnomalyBuiltIn", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AlertRuleAnomalyBuiltIn resources. type alertRuleAnomalyBuiltInState struct { // The version of the Anomaly Security ML Analytics Settings. AnomalySettingsVersion *int `pulumi:"anomalySettingsVersion"` // The anomaly version of the Anomaly Alert Rule. AnomalyVersion *string `pulumi:"anomalyVersion"` // The description of the threshold observation. Description *string `pulumi:"description"` // The Display Name of the built-in Anomaly Alert Rule. // // > **Note:** One of `name` or `displayName` block must be specified. DisplayName *string `pulumi:"displayName"` // Should the Built-in Anomaly Alert Rule be enabled? Enabled *bool `pulumi:"enabled"` // The frequency the Anomaly Alert Rule will be run. Frequency *string `pulumi:"frequency"` // The ID of the Log Analytics Workspace. Changing this forces a new Built-in Anomaly Alert Rule to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // mode of the Built-in Anomaly Alert Rule. Possible Values are `Production` and `Flighting`. Mode *string `pulumi:"mode"` // A list of `multiSelectObservation` blocks as defined below. MultiSelectObservations []AlertRuleAnomalyBuiltInMultiSelectObservation `pulumi:"multiSelectObservations"` // The Name of the built-in Anomaly Alert Rule. Name *string `pulumi:"name"` // A list of `prioritizedExcludeObservation` blocks as defined below. PrioritizedExcludeObservations []AlertRuleAnomalyBuiltInPrioritizedExcludeObservation `pulumi:"prioritizedExcludeObservations"` // A `requiredDataConnector` block as defined below. RequiredDataConnectors []AlertRuleAnomalyBuiltInRequiredDataConnector `pulumi:"requiredDataConnectors"` // The ID of the anomaly settings definition Id. SettingsDefinitionId *string `pulumi:"settingsDefinitionId"` // A list of `singleSelectObservation` blocks as defined below. SingleSelectObservations []AlertRuleAnomalyBuiltInSingleSelectObservation `pulumi:"singleSelectObservations"` // A list of categories of attacks by which to classify the rule. Tactics []string `pulumi:"tactics"` // A list of techniques of attacks by which to classify the rule. Techniques []string `pulumi:"techniques"` // A list of `thresholdObservation` blocks as defined below. ThresholdObservations []AlertRuleAnomalyBuiltInThresholdObservation `pulumi:"thresholdObservations"` } type AlertRuleAnomalyBuiltInState struct { // The version of the Anomaly Security ML Analytics Settings. AnomalySettingsVersion pulumi.IntPtrInput // The anomaly version of the Anomaly Alert Rule. AnomalyVersion pulumi.StringPtrInput // The description of the threshold observation. Description pulumi.StringPtrInput // The Display Name of the built-in Anomaly Alert Rule. // // > **Note:** One of `name` or `displayName` block must be specified. DisplayName pulumi.StringPtrInput // Should the Built-in Anomaly Alert Rule be enabled? Enabled pulumi.BoolPtrInput // The frequency the Anomaly Alert Rule will be run. Frequency pulumi.StringPtrInput // The ID of the Log Analytics Workspace. Changing this forces a new Built-in Anomaly Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // mode of the Built-in Anomaly Alert Rule. Possible Values are `Production` and `Flighting`. Mode pulumi.StringPtrInput // A list of `multiSelectObservation` blocks as defined below. MultiSelectObservations AlertRuleAnomalyBuiltInMultiSelectObservationArrayInput // The Name of the built-in Anomaly Alert Rule. Name pulumi.StringPtrInput // A list of `prioritizedExcludeObservation` blocks as defined below. PrioritizedExcludeObservations AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayInput // A `requiredDataConnector` block as defined below. RequiredDataConnectors AlertRuleAnomalyBuiltInRequiredDataConnectorArrayInput // The ID of the anomaly settings definition Id. SettingsDefinitionId pulumi.StringPtrInput // A list of `singleSelectObservation` blocks as defined below. SingleSelectObservations AlertRuleAnomalyBuiltInSingleSelectObservationArrayInput // A list of categories of attacks by which to classify the rule. Tactics pulumi.StringArrayInput // A list of techniques of attacks by which to classify the rule. Techniques pulumi.StringArrayInput // A list of `thresholdObservation` blocks as defined below. ThresholdObservations AlertRuleAnomalyBuiltInThresholdObservationArrayInput } func (AlertRuleAnomalyBuiltInState) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleAnomalyBuiltInState)(nil)).Elem() } type alertRuleAnomalyBuiltInArgs struct { // The Display Name of the built-in Anomaly Alert Rule. // // > **Note:** One of `name` or `displayName` block must be specified. DisplayName *string `pulumi:"displayName"` // Should the Built-in Anomaly Alert Rule be enabled? Enabled bool `pulumi:"enabled"` // The ID of the Log Analytics Workspace. Changing this forces a new Built-in Anomaly Alert Rule to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // mode of the Built-in Anomaly Alert Rule. Possible Values are `Production` and `Flighting`. Mode string `pulumi:"mode"` // The Name of the built-in Anomaly Alert Rule. Name *string `pulumi:"name"` } // The set of arguments for constructing a AlertRuleAnomalyBuiltIn resource. type AlertRuleAnomalyBuiltInArgs struct { // The Display Name of the built-in Anomaly Alert Rule. // // > **Note:** One of `name` or `displayName` block must be specified. DisplayName pulumi.StringPtrInput // Should the Built-in Anomaly Alert Rule be enabled? Enabled pulumi.BoolInput // The ID of the Log Analytics Workspace. Changing this forces a new Built-in Anomaly Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringInput // mode of the Built-in Anomaly Alert Rule. Possible Values are `Production` and `Flighting`. Mode pulumi.StringInput // The Name of the built-in Anomaly Alert Rule. Name pulumi.StringPtrInput } func (AlertRuleAnomalyBuiltInArgs) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleAnomalyBuiltInArgs)(nil)).Elem() } type AlertRuleAnomalyBuiltInInput interface { pulumi.Input ToAlertRuleAnomalyBuiltInOutput() AlertRuleAnomalyBuiltInOutput ToAlertRuleAnomalyBuiltInOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInOutput } func (*AlertRuleAnomalyBuiltIn) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleAnomalyBuiltIn)(nil)).Elem() } func (i *AlertRuleAnomalyBuiltIn) ToAlertRuleAnomalyBuiltInOutput() AlertRuleAnomalyBuiltInOutput { return i.ToAlertRuleAnomalyBuiltInOutputWithContext(context.Background()) } func (i *AlertRuleAnomalyBuiltIn) ToAlertRuleAnomalyBuiltInOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyBuiltInOutput) } // AlertRuleAnomalyBuiltInArrayInput is an input type that accepts AlertRuleAnomalyBuiltInArray and AlertRuleAnomalyBuiltInArrayOutput values. // You can construct a concrete instance of `AlertRuleAnomalyBuiltInArrayInput` via: // // AlertRuleAnomalyBuiltInArray{ AlertRuleAnomalyBuiltInArgs{...} } type AlertRuleAnomalyBuiltInArrayInput interface { pulumi.Input ToAlertRuleAnomalyBuiltInArrayOutput() AlertRuleAnomalyBuiltInArrayOutput ToAlertRuleAnomalyBuiltInArrayOutputWithContext(context.Context) AlertRuleAnomalyBuiltInArrayOutput } type AlertRuleAnomalyBuiltInArray []AlertRuleAnomalyBuiltInInput func (AlertRuleAnomalyBuiltInArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertRuleAnomalyBuiltIn)(nil)).Elem() } func (i AlertRuleAnomalyBuiltInArray) ToAlertRuleAnomalyBuiltInArrayOutput() AlertRuleAnomalyBuiltInArrayOutput { return i.ToAlertRuleAnomalyBuiltInArrayOutputWithContext(context.Background()) } func (i AlertRuleAnomalyBuiltInArray) ToAlertRuleAnomalyBuiltInArrayOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyBuiltInArrayOutput) } // AlertRuleAnomalyBuiltInMapInput is an input type that accepts AlertRuleAnomalyBuiltInMap and AlertRuleAnomalyBuiltInMapOutput values. // You can construct a concrete instance of `AlertRuleAnomalyBuiltInMapInput` via: // // AlertRuleAnomalyBuiltInMap{ "key": AlertRuleAnomalyBuiltInArgs{...} } type AlertRuleAnomalyBuiltInMapInput interface { pulumi.Input ToAlertRuleAnomalyBuiltInMapOutput() AlertRuleAnomalyBuiltInMapOutput ToAlertRuleAnomalyBuiltInMapOutputWithContext(context.Context) AlertRuleAnomalyBuiltInMapOutput } type AlertRuleAnomalyBuiltInMap map[string]AlertRuleAnomalyBuiltInInput func (AlertRuleAnomalyBuiltInMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertRuleAnomalyBuiltIn)(nil)).Elem() } func (i AlertRuleAnomalyBuiltInMap) ToAlertRuleAnomalyBuiltInMapOutput() AlertRuleAnomalyBuiltInMapOutput { return i.ToAlertRuleAnomalyBuiltInMapOutputWithContext(context.Background()) } func (i AlertRuleAnomalyBuiltInMap) ToAlertRuleAnomalyBuiltInMapOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleAnomalyBuiltInMapOutput) } type AlertRuleAnomalyBuiltInOutput struct{ *pulumi.OutputState } func (AlertRuleAnomalyBuiltInOutput) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleAnomalyBuiltIn)(nil)).Elem() } func (o AlertRuleAnomalyBuiltInOutput) ToAlertRuleAnomalyBuiltInOutput() AlertRuleAnomalyBuiltInOutput { return o } func (o AlertRuleAnomalyBuiltInOutput) ToAlertRuleAnomalyBuiltInOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInOutput { return o } // The version of the Anomaly Security ML Analytics Settings. func (o AlertRuleAnomalyBuiltInOutput) AnomalySettingsVersion() pulumi.IntOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) pulumi.IntOutput { return v.AnomalySettingsVersion }).(pulumi.IntOutput) } // The anomaly version of the Anomaly Alert Rule. func (o AlertRuleAnomalyBuiltInOutput) AnomalyVersion() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) pulumi.StringOutput { return v.AnomalyVersion }).(pulumi.StringOutput) } // The description of the threshold observation. func (o AlertRuleAnomalyBuiltInOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput) } // The Display Name of the built-in Anomaly Alert Rule. // // > **Note:** One of `name` or `displayName` block must be specified. func (o AlertRuleAnomalyBuiltInOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // Should the Built-in Anomaly Alert Rule be enabled? func (o AlertRuleAnomalyBuiltInOutput) Enabled() pulumi.BoolOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) pulumi.BoolOutput { return v.Enabled }).(pulumi.BoolOutput) } // The frequency the Anomaly Alert Rule will be run. func (o AlertRuleAnomalyBuiltInOutput) Frequency() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) pulumi.StringOutput { return v.Frequency }).(pulumi.StringOutput) } // The ID of the Log Analytics Workspace. Changing this forces a new Built-in Anomaly Alert Rule to be created. func (o AlertRuleAnomalyBuiltInOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // mode of the Built-in Anomaly Alert Rule. Possible Values are `Production` and `Flighting`. func (o AlertRuleAnomalyBuiltInOutput) Mode() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) pulumi.StringOutput { return v.Mode }).(pulumi.StringOutput) } // A list of `multiSelectObservation` blocks as defined below. func (o AlertRuleAnomalyBuiltInOutput) MultiSelectObservations() AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput { return v.MultiSelectObservations }).(AlertRuleAnomalyBuiltInMultiSelectObservationArrayOutput) } // The Name of the built-in Anomaly Alert Rule. func (o AlertRuleAnomalyBuiltInOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A list of `prioritizedExcludeObservation` blocks as defined below. func (o AlertRuleAnomalyBuiltInOutput) PrioritizedExcludeObservations() AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput { return v.PrioritizedExcludeObservations }).(AlertRuleAnomalyBuiltInPrioritizedExcludeObservationArrayOutput) } // A `requiredDataConnector` block as defined below. func (o AlertRuleAnomalyBuiltInOutput) RequiredDataConnectors() AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput { return v.RequiredDataConnectors }).(AlertRuleAnomalyBuiltInRequiredDataConnectorArrayOutput) } // The ID of the anomaly settings definition Id. func (o AlertRuleAnomalyBuiltInOutput) SettingsDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) pulumi.StringOutput { return v.SettingsDefinitionId }).(pulumi.StringOutput) } // A list of `singleSelectObservation` blocks as defined below. func (o AlertRuleAnomalyBuiltInOutput) SingleSelectObservations() AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput { return v.SingleSelectObservations }).(AlertRuleAnomalyBuiltInSingleSelectObservationArrayOutput) } // A list of categories of attacks by which to classify the rule. func (o AlertRuleAnomalyBuiltInOutput) Tactics() pulumi.StringArrayOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) pulumi.StringArrayOutput { return v.Tactics }).(pulumi.StringArrayOutput) } // A list of techniques of attacks by which to classify the rule. func (o AlertRuleAnomalyBuiltInOutput) Techniques() pulumi.StringArrayOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) pulumi.StringArrayOutput { return v.Techniques }).(pulumi.StringArrayOutput) } // A list of `thresholdObservation` blocks as defined below. func (o AlertRuleAnomalyBuiltInOutput) ThresholdObservations() AlertRuleAnomalyBuiltInThresholdObservationArrayOutput { return o.ApplyT(func(v *AlertRuleAnomalyBuiltIn) AlertRuleAnomalyBuiltInThresholdObservationArrayOutput { return v.ThresholdObservations }).(AlertRuleAnomalyBuiltInThresholdObservationArrayOutput) } type AlertRuleAnomalyBuiltInArrayOutput struct{ *pulumi.OutputState } func (AlertRuleAnomalyBuiltInArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertRuleAnomalyBuiltIn)(nil)).Elem() } func (o AlertRuleAnomalyBuiltInArrayOutput) ToAlertRuleAnomalyBuiltInArrayOutput() AlertRuleAnomalyBuiltInArrayOutput { return o } func (o AlertRuleAnomalyBuiltInArrayOutput) ToAlertRuleAnomalyBuiltInArrayOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInArrayOutput { return o } func (o AlertRuleAnomalyBuiltInArrayOutput) Index(i pulumi.IntInput) AlertRuleAnomalyBuiltInOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AlertRuleAnomalyBuiltIn { return vs[0].([]*AlertRuleAnomalyBuiltIn)[vs[1].(int)] }).(AlertRuleAnomalyBuiltInOutput) } type AlertRuleAnomalyBuiltInMapOutput struct{ *pulumi.OutputState } func (AlertRuleAnomalyBuiltInMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertRuleAnomalyBuiltIn)(nil)).Elem() } func (o AlertRuleAnomalyBuiltInMapOutput) ToAlertRuleAnomalyBuiltInMapOutput() AlertRuleAnomalyBuiltInMapOutput { return o } func (o AlertRuleAnomalyBuiltInMapOutput) ToAlertRuleAnomalyBuiltInMapOutputWithContext(ctx context.Context) AlertRuleAnomalyBuiltInMapOutput { return o } func (o AlertRuleAnomalyBuiltInMapOutput) MapIndex(k pulumi.StringInput) AlertRuleAnomalyBuiltInOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AlertRuleAnomalyBuiltIn { return vs[0].(map[string]*AlertRuleAnomalyBuiltIn)[vs[1].(string)] }).(AlertRuleAnomalyBuiltInOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleAnomalyBuiltInInput)(nil)).Elem(), &AlertRuleAnomalyBuiltIn{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleAnomalyBuiltInArrayInput)(nil)).Elem(), AlertRuleAnomalyBuiltInArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleAnomalyBuiltInMapInput)(nil)).Elem(), AlertRuleAnomalyBuiltInMap{}) pulumi.RegisterOutputType(AlertRuleAnomalyBuiltInOutput{}) pulumi.RegisterOutputType(AlertRuleAnomalyBuiltInArrayOutput{}) pulumi.RegisterOutputType(AlertRuleAnomalyBuiltInMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/alertRuleMachineLearningBehaviorAnalytics.go
sdk/go/azure/sentinel/alertRuleMachineLearningBehaviorAnalytics.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Sentinel Machine Learning Behavior Analytics Alert Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // _, err = sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewAlertRuleMachineLearningBehaviorAnalytics(ctx, "example", &sentinel.AlertRuleMachineLearningBehaviorAnalyticsArgs{ // Name: pulumi.String("example-ml-alert-rule"), // LogAnalyticsWorkspaceId: exampleAnalyticsWorkspace.ID(), // AlertRuleTemplateGuid: pulumi.String("737a2ce1-70a3-4968-9e90-3e6aca836abf"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.OperationalInsights` - 2023-12-01-preview // // ## Import // // Sentinel Machine Learning Behavior Analytics Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/alertRuleMachineLearningBehaviorAnalytics:AlertRuleMachineLearningBehaviorAnalytics example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/alertRules/rule1 // ``` type AlertRuleMachineLearningBehaviorAnalytics struct { pulumi.CustomResourceState // The GUID of the alert rule template which is used for this Sentinel Machine Learning Behavior Analytics Alert Rule. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringOutput `pulumi:"alertRuleTemplateGuid"` // Should this Sentinel Machine Learning Behavior Analytics Alert Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // The ID of the Log Analytics Workspace this SentinelMachine Learning Behavior Analytics Alert Rule belongs to. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this SentinelMachine Learning Behavior Analytics Alert Rule. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. Name pulumi.StringOutput `pulumi:"name"` } // NewAlertRuleMachineLearningBehaviorAnalytics registers a new resource with the given unique name, arguments, and options. func NewAlertRuleMachineLearningBehaviorAnalytics(ctx *pulumi.Context, name string, args *AlertRuleMachineLearningBehaviorAnalyticsArgs, opts ...pulumi.ResourceOption) (*AlertRuleMachineLearningBehaviorAnalytics, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.AlertRuleTemplateGuid == nil { return nil, errors.New("invalid value for required argument 'AlertRuleTemplateGuid'") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AlertRuleMachineLearningBehaviorAnalytics err := ctx.RegisterResource("azure:sentinel/alertRuleMachineLearningBehaviorAnalytics:AlertRuleMachineLearningBehaviorAnalytics", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAlertRuleMachineLearningBehaviorAnalytics gets an existing AlertRuleMachineLearningBehaviorAnalytics resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetAlertRuleMachineLearningBehaviorAnalytics(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AlertRuleMachineLearningBehaviorAnalyticsState, opts ...pulumi.ResourceOption) (*AlertRuleMachineLearningBehaviorAnalytics, error) { var resource AlertRuleMachineLearningBehaviorAnalytics err := ctx.ReadResource("azure:sentinel/alertRuleMachineLearningBehaviorAnalytics:AlertRuleMachineLearningBehaviorAnalytics", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AlertRuleMachineLearningBehaviorAnalytics resources. type alertRuleMachineLearningBehaviorAnalyticsState struct { // The GUID of the alert rule template which is used for this Sentinel Machine Learning Behavior Analytics Alert Rule. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. AlertRuleTemplateGuid *string `pulumi:"alertRuleTemplateGuid"` // Should this Sentinel Machine Learning Behavior Analytics Alert Rule be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The ID of the Log Analytics Workspace this SentinelMachine Learning Behavior Analytics Alert Rule belongs to. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this SentinelMachine Learning Behavior Analytics Alert Rule. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. Name *string `pulumi:"name"` } type AlertRuleMachineLearningBehaviorAnalyticsState struct { // The GUID of the alert rule template which is used for this Sentinel Machine Learning Behavior Analytics Alert Rule. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringPtrInput // Should this Sentinel Machine Learning Behavior Analytics Alert Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The ID of the Log Analytics Workspace this SentinelMachine Learning Behavior Analytics Alert Rule belongs to. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this SentinelMachine Learning Behavior Analytics Alert Rule. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. Name pulumi.StringPtrInput } func (AlertRuleMachineLearningBehaviorAnalyticsState) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleMachineLearningBehaviorAnalyticsState)(nil)).Elem() } type alertRuleMachineLearningBehaviorAnalyticsArgs struct { // The GUID of the alert rule template which is used for this Sentinel Machine Learning Behavior Analytics Alert Rule. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. AlertRuleTemplateGuid string `pulumi:"alertRuleTemplateGuid"` // Should this Sentinel Machine Learning Behavior Analytics Alert Rule be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The ID of the Log Analytics Workspace this SentinelMachine Learning Behavior Analytics Alert Rule belongs to. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this SentinelMachine Learning Behavior Analytics Alert Rule. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. Name *string `pulumi:"name"` } // The set of arguments for constructing a AlertRuleMachineLearningBehaviorAnalytics resource. type AlertRuleMachineLearningBehaviorAnalyticsArgs struct { // The GUID of the alert rule template which is used for this Sentinel Machine Learning Behavior Analytics Alert Rule. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringInput // Should this Sentinel Machine Learning Behavior Analytics Alert Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The ID of the Log Analytics Workspace this SentinelMachine Learning Behavior Analytics Alert Rule belongs to. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this SentinelMachine Learning Behavior Analytics Alert Rule. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. Name pulumi.StringPtrInput } func (AlertRuleMachineLearningBehaviorAnalyticsArgs) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleMachineLearningBehaviorAnalyticsArgs)(nil)).Elem() } type AlertRuleMachineLearningBehaviorAnalyticsInput interface { pulumi.Input ToAlertRuleMachineLearningBehaviorAnalyticsOutput() AlertRuleMachineLearningBehaviorAnalyticsOutput ToAlertRuleMachineLearningBehaviorAnalyticsOutputWithContext(ctx context.Context) AlertRuleMachineLearningBehaviorAnalyticsOutput } func (*AlertRuleMachineLearningBehaviorAnalytics) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleMachineLearningBehaviorAnalytics)(nil)).Elem() } func (i *AlertRuleMachineLearningBehaviorAnalytics) ToAlertRuleMachineLearningBehaviorAnalyticsOutput() AlertRuleMachineLearningBehaviorAnalyticsOutput { return i.ToAlertRuleMachineLearningBehaviorAnalyticsOutputWithContext(context.Background()) } func (i *AlertRuleMachineLearningBehaviorAnalytics) ToAlertRuleMachineLearningBehaviorAnalyticsOutputWithContext(ctx context.Context) AlertRuleMachineLearningBehaviorAnalyticsOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleMachineLearningBehaviorAnalyticsOutput) } // AlertRuleMachineLearningBehaviorAnalyticsArrayInput is an input type that accepts AlertRuleMachineLearningBehaviorAnalyticsArray and AlertRuleMachineLearningBehaviorAnalyticsArrayOutput values. // You can construct a concrete instance of `AlertRuleMachineLearningBehaviorAnalyticsArrayInput` via: // // AlertRuleMachineLearningBehaviorAnalyticsArray{ AlertRuleMachineLearningBehaviorAnalyticsArgs{...} } type AlertRuleMachineLearningBehaviorAnalyticsArrayInput interface { pulumi.Input ToAlertRuleMachineLearningBehaviorAnalyticsArrayOutput() AlertRuleMachineLearningBehaviorAnalyticsArrayOutput ToAlertRuleMachineLearningBehaviorAnalyticsArrayOutputWithContext(context.Context) AlertRuleMachineLearningBehaviorAnalyticsArrayOutput } type AlertRuleMachineLearningBehaviorAnalyticsArray []AlertRuleMachineLearningBehaviorAnalyticsInput func (AlertRuleMachineLearningBehaviorAnalyticsArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertRuleMachineLearningBehaviorAnalytics)(nil)).Elem() } func (i AlertRuleMachineLearningBehaviorAnalyticsArray) ToAlertRuleMachineLearningBehaviorAnalyticsArrayOutput() AlertRuleMachineLearningBehaviorAnalyticsArrayOutput { return i.ToAlertRuleMachineLearningBehaviorAnalyticsArrayOutputWithContext(context.Background()) } func (i AlertRuleMachineLearningBehaviorAnalyticsArray) ToAlertRuleMachineLearningBehaviorAnalyticsArrayOutputWithContext(ctx context.Context) AlertRuleMachineLearningBehaviorAnalyticsArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleMachineLearningBehaviorAnalyticsArrayOutput) } // AlertRuleMachineLearningBehaviorAnalyticsMapInput is an input type that accepts AlertRuleMachineLearningBehaviorAnalyticsMap and AlertRuleMachineLearningBehaviorAnalyticsMapOutput values. // You can construct a concrete instance of `AlertRuleMachineLearningBehaviorAnalyticsMapInput` via: // // AlertRuleMachineLearningBehaviorAnalyticsMap{ "key": AlertRuleMachineLearningBehaviorAnalyticsArgs{...} } type AlertRuleMachineLearningBehaviorAnalyticsMapInput interface { pulumi.Input ToAlertRuleMachineLearningBehaviorAnalyticsMapOutput() AlertRuleMachineLearningBehaviorAnalyticsMapOutput ToAlertRuleMachineLearningBehaviorAnalyticsMapOutputWithContext(context.Context) AlertRuleMachineLearningBehaviorAnalyticsMapOutput } type AlertRuleMachineLearningBehaviorAnalyticsMap map[string]AlertRuleMachineLearningBehaviorAnalyticsInput func (AlertRuleMachineLearningBehaviorAnalyticsMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertRuleMachineLearningBehaviorAnalytics)(nil)).Elem() } func (i AlertRuleMachineLearningBehaviorAnalyticsMap) ToAlertRuleMachineLearningBehaviorAnalyticsMapOutput() AlertRuleMachineLearningBehaviorAnalyticsMapOutput { return i.ToAlertRuleMachineLearningBehaviorAnalyticsMapOutputWithContext(context.Background()) } func (i AlertRuleMachineLearningBehaviorAnalyticsMap) ToAlertRuleMachineLearningBehaviorAnalyticsMapOutputWithContext(ctx context.Context) AlertRuleMachineLearningBehaviorAnalyticsMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleMachineLearningBehaviorAnalyticsMapOutput) } type AlertRuleMachineLearningBehaviorAnalyticsOutput struct{ *pulumi.OutputState } func (AlertRuleMachineLearningBehaviorAnalyticsOutput) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleMachineLearningBehaviorAnalytics)(nil)).Elem() } func (o AlertRuleMachineLearningBehaviorAnalyticsOutput) ToAlertRuleMachineLearningBehaviorAnalyticsOutput() AlertRuleMachineLearningBehaviorAnalyticsOutput { return o } func (o AlertRuleMachineLearningBehaviorAnalyticsOutput) ToAlertRuleMachineLearningBehaviorAnalyticsOutputWithContext(ctx context.Context) AlertRuleMachineLearningBehaviorAnalyticsOutput { return o } // The GUID of the alert rule template which is used for this Sentinel Machine Learning Behavior Analytics Alert Rule. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. func (o AlertRuleMachineLearningBehaviorAnalyticsOutput) AlertRuleTemplateGuid() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleMachineLearningBehaviorAnalytics) pulumi.StringOutput { return v.AlertRuleTemplateGuid }).(pulumi.StringOutput) } // Should this Sentinel Machine Learning Behavior Analytics Alert Rule be enabled? Defaults to `true`. func (o AlertRuleMachineLearningBehaviorAnalyticsOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AlertRuleMachineLearningBehaviorAnalytics) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // The ID of the Log Analytics Workspace this SentinelMachine Learning Behavior Analytics Alert Rule belongs to. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. func (o AlertRuleMachineLearningBehaviorAnalyticsOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleMachineLearningBehaviorAnalytics) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this SentinelMachine Learning Behavior Analytics Alert Rule. Changing this forces a new Sentinel Machine Learning Behavior Analytics Alert Rule to be created. func (o AlertRuleMachineLearningBehaviorAnalyticsOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleMachineLearningBehaviorAnalytics) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } type AlertRuleMachineLearningBehaviorAnalyticsArrayOutput struct{ *pulumi.OutputState } func (AlertRuleMachineLearningBehaviorAnalyticsArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertRuleMachineLearningBehaviorAnalytics)(nil)).Elem() } func (o AlertRuleMachineLearningBehaviorAnalyticsArrayOutput) ToAlertRuleMachineLearningBehaviorAnalyticsArrayOutput() AlertRuleMachineLearningBehaviorAnalyticsArrayOutput { return o } func (o AlertRuleMachineLearningBehaviorAnalyticsArrayOutput) ToAlertRuleMachineLearningBehaviorAnalyticsArrayOutputWithContext(ctx context.Context) AlertRuleMachineLearningBehaviorAnalyticsArrayOutput { return o } func (o AlertRuleMachineLearningBehaviorAnalyticsArrayOutput) Index(i pulumi.IntInput) AlertRuleMachineLearningBehaviorAnalyticsOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AlertRuleMachineLearningBehaviorAnalytics { return vs[0].([]*AlertRuleMachineLearningBehaviorAnalytics)[vs[1].(int)] }).(AlertRuleMachineLearningBehaviorAnalyticsOutput) } type AlertRuleMachineLearningBehaviorAnalyticsMapOutput struct{ *pulumi.OutputState } func (AlertRuleMachineLearningBehaviorAnalyticsMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertRuleMachineLearningBehaviorAnalytics)(nil)).Elem() } func (o AlertRuleMachineLearningBehaviorAnalyticsMapOutput) ToAlertRuleMachineLearningBehaviorAnalyticsMapOutput() AlertRuleMachineLearningBehaviorAnalyticsMapOutput { return o } func (o AlertRuleMachineLearningBehaviorAnalyticsMapOutput) ToAlertRuleMachineLearningBehaviorAnalyticsMapOutputWithContext(ctx context.Context) AlertRuleMachineLearningBehaviorAnalyticsMapOutput { return o } func (o AlertRuleMachineLearningBehaviorAnalyticsMapOutput) MapIndex(k pulumi.StringInput) AlertRuleMachineLearningBehaviorAnalyticsOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AlertRuleMachineLearningBehaviorAnalytics { return vs[0].(map[string]*AlertRuleMachineLearningBehaviorAnalytics)[vs[1].(string)] }).(AlertRuleMachineLearningBehaviorAnalyticsOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleMachineLearningBehaviorAnalyticsInput)(nil)).Elem(), &AlertRuleMachineLearningBehaviorAnalytics{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleMachineLearningBehaviorAnalyticsArrayInput)(nil)).Elem(), AlertRuleMachineLearningBehaviorAnalyticsArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleMachineLearningBehaviorAnalyticsMapInput)(nil)).Elem(), AlertRuleMachineLearningBehaviorAnalyticsMap{}) pulumi.RegisterOutputType(AlertRuleMachineLearningBehaviorAnalyticsOutput{}) pulumi.RegisterOutputType(AlertRuleMachineLearningBehaviorAnalyticsArrayOutput{}) pulumi.RegisterOutputType(AlertRuleMachineLearningBehaviorAnalyticsMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorDynamics365.go
sdk/go/azure/sentinel/dataConnectorDynamics365.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Dynamics 365 Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorDynamics365(ctx, "example", &sentinel.DataConnectorDynamics365Args{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Dynamics 365 Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorDynamics365:DataConnectorDynamics365 example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorDynamics365 struct { pulumi.CustomResourceState // The ID of the Log Analytics Workspace that this Dynamics 365 Data Connector resides in. Changing this forces a new Dynamics 365 Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Dynamics 365 Data Connector. Changing this forces a new Dynamics 365 Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the tenant that this Dynamics 365 Data Connector connects to. Changing this forces a new Dynamics 365 Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewDataConnectorDynamics365 registers a new resource with the given unique name, arguments, and options. func NewDataConnectorDynamics365(ctx *pulumi.Context, name string, args *DataConnectorDynamics365Args, opts ...pulumi.ResourceOption) (*DataConnectorDynamics365, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorDynamics365 err := ctx.RegisterResource("azure:sentinel/dataConnectorDynamics365:DataConnectorDynamics365", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorDynamics365 gets an existing DataConnectorDynamics365 resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorDynamics365(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorDynamics365State, opts ...pulumi.ResourceOption) (*DataConnectorDynamics365, error) { var resource DataConnectorDynamics365 err := ctx.ReadResource("azure:sentinel/dataConnectorDynamics365:DataConnectorDynamics365", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorDynamics365 resources. type dataConnectorDynamics365State struct { // The ID of the Log Analytics Workspace that this Dynamics 365 Data Connector resides in. Changing this forces a new Dynamics 365 Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Dynamics 365 Data Connector. Changing this forces a new Dynamics 365 Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Dynamics 365 Data Connector connects to. Changing this forces a new Dynamics 365 Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } type DataConnectorDynamics365State struct { // The ID of the Log Analytics Workspace that this Dynamics 365 Data Connector resides in. Changing this forces a new Dynamics 365 Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Dynamics 365 Data Connector. Changing this forces a new Dynamics 365 Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Dynamics 365 Data Connector connects to. Changing this forces a new Dynamics 365 Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorDynamics365State) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorDynamics365State)(nil)).Elem() } type dataConnectorDynamics365Args struct { // The ID of the Log Analytics Workspace that this Dynamics 365 Data Connector resides in. Changing this forces a new Dynamics 365 Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Dynamics 365 Data Connector. Changing this forces a new Dynamics 365 Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Dynamics 365 Data Connector connects to. Changing this forces a new Dynamics 365 Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } // The set of arguments for constructing a DataConnectorDynamics365 resource. type DataConnectorDynamics365Args struct { // The ID of the Log Analytics Workspace that this Dynamics 365 Data Connector resides in. Changing this forces a new Dynamics 365 Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Dynamics 365 Data Connector. Changing this forces a new Dynamics 365 Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Dynamics 365 Data Connector connects to. Changing this forces a new Dynamics 365 Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorDynamics365Args) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorDynamics365Args)(nil)).Elem() } type DataConnectorDynamics365Input interface { pulumi.Input ToDataConnectorDynamics365Output() DataConnectorDynamics365Output ToDataConnectorDynamics365OutputWithContext(ctx context.Context) DataConnectorDynamics365Output } func (*DataConnectorDynamics365) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorDynamics365)(nil)).Elem() } func (i *DataConnectorDynamics365) ToDataConnectorDynamics365Output() DataConnectorDynamics365Output { return i.ToDataConnectorDynamics365OutputWithContext(context.Background()) } func (i *DataConnectorDynamics365) ToDataConnectorDynamics365OutputWithContext(ctx context.Context) DataConnectorDynamics365Output { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorDynamics365Output) } // DataConnectorDynamics365ArrayInput is an input type that accepts DataConnectorDynamics365Array and DataConnectorDynamics365ArrayOutput values. // You can construct a concrete instance of `DataConnectorDynamics365ArrayInput` via: // // DataConnectorDynamics365Array{ DataConnectorDynamics365Args{...} } type DataConnectorDynamics365ArrayInput interface { pulumi.Input ToDataConnectorDynamics365ArrayOutput() DataConnectorDynamics365ArrayOutput ToDataConnectorDynamics365ArrayOutputWithContext(context.Context) DataConnectorDynamics365ArrayOutput } type DataConnectorDynamics365Array []DataConnectorDynamics365Input func (DataConnectorDynamics365Array) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorDynamics365)(nil)).Elem() } func (i DataConnectorDynamics365Array) ToDataConnectorDynamics365ArrayOutput() DataConnectorDynamics365ArrayOutput { return i.ToDataConnectorDynamics365ArrayOutputWithContext(context.Background()) } func (i DataConnectorDynamics365Array) ToDataConnectorDynamics365ArrayOutputWithContext(ctx context.Context) DataConnectorDynamics365ArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorDynamics365ArrayOutput) } // DataConnectorDynamics365MapInput is an input type that accepts DataConnectorDynamics365Map and DataConnectorDynamics365MapOutput values. // You can construct a concrete instance of `DataConnectorDynamics365MapInput` via: // // DataConnectorDynamics365Map{ "key": DataConnectorDynamics365Args{...} } type DataConnectorDynamics365MapInput interface { pulumi.Input ToDataConnectorDynamics365MapOutput() DataConnectorDynamics365MapOutput ToDataConnectorDynamics365MapOutputWithContext(context.Context) DataConnectorDynamics365MapOutput } type DataConnectorDynamics365Map map[string]DataConnectorDynamics365Input func (DataConnectorDynamics365Map) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorDynamics365)(nil)).Elem() } func (i DataConnectorDynamics365Map) ToDataConnectorDynamics365MapOutput() DataConnectorDynamics365MapOutput { return i.ToDataConnectorDynamics365MapOutputWithContext(context.Background()) } func (i DataConnectorDynamics365Map) ToDataConnectorDynamics365MapOutputWithContext(ctx context.Context) DataConnectorDynamics365MapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorDynamics365MapOutput) } type DataConnectorDynamics365Output struct{ *pulumi.OutputState } func (DataConnectorDynamics365Output) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorDynamics365)(nil)).Elem() } func (o DataConnectorDynamics365Output) ToDataConnectorDynamics365Output() DataConnectorDynamics365Output { return o } func (o DataConnectorDynamics365Output) ToDataConnectorDynamics365OutputWithContext(ctx context.Context) DataConnectorDynamics365Output { return o } // The ID of the Log Analytics Workspace that this Dynamics 365 Data Connector resides in. Changing this forces a new Dynamics 365 Data Connector to be created. func (o DataConnectorDynamics365Output) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorDynamics365) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Dynamics 365 Data Connector. Changing this forces a new Dynamics 365 Data Connector to be created. func (o DataConnectorDynamics365Output) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorDynamics365) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the tenant that this Dynamics 365 Data Connector connects to. Changing this forces a new Dynamics 365 Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. func (o DataConnectorDynamics365Output) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorDynamics365) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type DataConnectorDynamics365ArrayOutput struct{ *pulumi.OutputState } func (DataConnectorDynamics365ArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorDynamics365)(nil)).Elem() } func (o DataConnectorDynamics365ArrayOutput) ToDataConnectorDynamics365ArrayOutput() DataConnectorDynamics365ArrayOutput { return o } func (o DataConnectorDynamics365ArrayOutput) ToDataConnectorDynamics365ArrayOutputWithContext(ctx context.Context) DataConnectorDynamics365ArrayOutput { return o } func (o DataConnectorDynamics365ArrayOutput) Index(i pulumi.IntInput) DataConnectorDynamics365Output { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorDynamics365 { return vs[0].([]*DataConnectorDynamics365)[vs[1].(int)] }).(DataConnectorDynamics365Output) } type DataConnectorDynamics365MapOutput struct{ *pulumi.OutputState } func (DataConnectorDynamics365MapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorDynamics365)(nil)).Elem() } func (o DataConnectorDynamics365MapOutput) ToDataConnectorDynamics365MapOutput() DataConnectorDynamics365MapOutput { return o } func (o DataConnectorDynamics365MapOutput) ToDataConnectorDynamics365MapOutputWithContext(ctx context.Context) DataConnectorDynamics365MapOutput { return o } func (o DataConnectorDynamics365MapOutput) MapIndex(k pulumi.StringInput) DataConnectorDynamics365Output { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorDynamics365 { return vs[0].(map[string]*DataConnectorDynamics365)[vs[1].(string)] }).(DataConnectorDynamics365Output) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorDynamics365Input)(nil)).Elem(), &DataConnectorDynamics365{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorDynamics365ArrayInput)(nil)).Elem(), DataConnectorDynamics365Array{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorDynamics365MapInput)(nil)).Elem(), DataConnectorDynamics365Map{}) pulumi.RegisterOutputType(DataConnectorDynamics365Output{}) pulumi.RegisterOutputType(DataConnectorDynamics365ArrayOutput{}) pulumi.RegisterOutputType(DataConnectorDynamics365MapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/alertRuleMsSecurityIncident.go
sdk/go/azure/sentinel/alertRuleMsSecurityIncident.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Sentinel MS Security Incident Alert Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewAlertRuleMsSecurityIncident(ctx, "example", &sentinel.AlertRuleMsSecurityIncidentArgs{ // Name: pulumi.String("example-ms-security-incident-alert-rule"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // ProductFilter: pulumi.String("Microsoft Cloud App Security"), // DisplayName: pulumi.String("example rule"), // SeverityFilters: pulumi.StringArray{ // pulumi.String("High"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.OperationalInsights` - 2023-12-01-preview // // ## Import // // Sentinel MS Security Incident Alert Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/alertRuleMsSecurityIncident:AlertRuleMsSecurityIncident example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/alertRules/rule1 // ``` type AlertRuleMsSecurityIncident struct { pulumi.CustomResourceState // The GUID of the alert rule template which is used to create this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringPtrOutput `pulumi:"alertRuleTemplateGuid"` // The description of this Sentinel MS Security Incident Alert Rule. Description pulumi.StringPtrOutput `pulumi:"description"` // The friendly name of this Sentinel MS Security Incident Alert Rule. DisplayName pulumi.StringOutput `pulumi:"displayName"` // Only create incidents when the alert display name doesn't contain text from this list. DisplayNameExcludeFilters pulumi.StringArrayOutput `pulumi:"displayNameExcludeFilters"` // Only create incidents when the alert display name contain text from this list, leave empty to apply no filter. DisplayNameFilters pulumi.StringArrayOutput `pulumi:"displayNameFilters"` // Should this Sentinel MS Security Incident Alert Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // The ID of the Log Analytics Workspace this Sentinel MS Security Incident Alert Rule belongs to. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel MS Security Incident Alert Rule. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. Name pulumi.StringOutput `pulumi:"name"` // The Microsoft Security Service from where the alert will be generated. Possible values are `Azure Active Directory Identity Protection`, `Azure Advanced Threat Protection`, `Azure Security Center`, `Azure Security Center for IoT`, `Microsoft Cloud App Security`, `Microsoft Defender Advanced Threat Protection` and `Office 365 Advanced Threat Protection`. ProductFilter pulumi.StringOutput `pulumi:"productFilter"` // Only create incidents from alerts when alert severity level is contained in this list. Possible values are `High`, `Medium`, `Low` and `Informational`. // // > **Note:** At least one of the severity filters need to be set. SeverityFilters pulumi.StringArrayOutput `pulumi:"severityFilters"` } // NewAlertRuleMsSecurityIncident registers a new resource with the given unique name, arguments, and options. func NewAlertRuleMsSecurityIncident(ctx *pulumi.Context, name string, args *AlertRuleMsSecurityIncidentArgs, opts ...pulumi.ResourceOption) (*AlertRuleMsSecurityIncident, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } if args.ProductFilter == nil { return nil, errors.New("invalid value for required argument 'ProductFilter'") } if args.SeverityFilters == nil { return nil, errors.New("invalid value for required argument 'SeverityFilters'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AlertRuleMsSecurityIncident err := ctx.RegisterResource("azure:sentinel/alertRuleMsSecurityIncident:AlertRuleMsSecurityIncident", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAlertRuleMsSecurityIncident gets an existing AlertRuleMsSecurityIncident resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetAlertRuleMsSecurityIncident(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AlertRuleMsSecurityIncidentState, opts ...pulumi.ResourceOption) (*AlertRuleMsSecurityIncident, error) { var resource AlertRuleMsSecurityIncident err := ctx.ReadResource("azure:sentinel/alertRuleMsSecurityIncident:AlertRuleMsSecurityIncident", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AlertRuleMsSecurityIncident resources. type alertRuleMsSecurityIncidentState struct { // The GUID of the alert rule template which is used to create this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. AlertRuleTemplateGuid *string `pulumi:"alertRuleTemplateGuid"` // The description of this Sentinel MS Security Incident Alert Rule. Description *string `pulumi:"description"` // The friendly name of this Sentinel MS Security Incident Alert Rule. DisplayName *string `pulumi:"displayName"` // Only create incidents when the alert display name doesn't contain text from this list. DisplayNameExcludeFilters []string `pulumi:"displayNameExcludeFilters"` // Only create incidents when the alert display name contain text from this list, leave empty to apply no filter. DisplayNameFilters []string `pulumi:"displayNameFilters"` // Should this Sentinel MS Security Incident Alert Rule be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The ID of the Log Analytics Workspace this Sentinel MS Security Incident Alert Rule belongs to. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel MS Security Incident Alert Rule. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. Name *string `pulumi:"name"` // The Microsoft Security Service from where the alert will be generated. Possible values are `Azure Active Directory Identity Protection`, `Azure Advanced Threat Protection`, `Azure Security Center`, `Azure Security Center for IoT`, `Microsoft Cloud App Security`, `Microsoft Defender Advanced Threat Protection` and `Office 365 Advanced Threat Protection`. ProductFilter *string `pulumi:"productFilter"` // Only create incidents from alerts when alert severity level is contained in this list. Possible values are `High`, `Medium`, `Low` and `Informational`. // // > **Note:** At least one of the severity filters need to be set. SeverityFilters []string `pulumi:"severityFilters"` } type AlertRuleMsSecurityIncidentState struct { // The GUID of the alert rule template which is used to create this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringPtrInput // The description of this Sentinel MS Security Incident Alert Rule. Description pulumi.StringPtrInput // The friendly name of this Sentinel MS Security Incident Alert Rule. DisplayName pulumi.StringPtrInput // Only create incidents when the alert display name doesn't contain text from this list. DisplayNameExcludeFilters pulumi.StringArrayInput // Only create incidents when the alert display name contain text from this list, leave empty to apply no filter. DisplayNameFilters pulumi.StringArrayInput // Should this Sentinel MS Security Incident Alert Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The ID of the Log Analytics Workspace this Sentinel MS Security Incident Alert Rule belongs to. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Sentinel MS Security Incident Alert Rule. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. Name pulumi.StringPtrInput // The Microsoft Security Service from where the alert will be generated. Possible values are `Azure Active Directory Identity Protection`, `Azure Advanced Threat Protection`, `Azure Security Center`, `Azure Security Center for IoT`, `Microsoft Cloud App Security`, `Microsoft Defender Advanced Threat Protection` and `Office 365 Advanced Threat Protection`. ProductFilter pulumi.StringPtrInput // Only create incidents from alerts when alert severity level is contained in this list. Possible values are `High`, `Medium`, `Low` and `Informational`. // // > **Note:** At least one of the severity filters need to be set. SeverityFilters pulumi.StringArrayInput } func (AlertRuleMsSecurityIncidentState) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleMsSecurityIncidentState)(nil)).Elem() } type alertRuleMsSecurityIncidentArgs struct { // The GUID of the alert rule template which is used to create this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. AlertRuleTemplateGuid *string `pulumi:"alertRuleTemplateGuid"` // The description of this Sentinel MS Security Incident Alert Rule. Description *string `pulumi:"description"` // The friendly name of this Sentinel MS Security Incident Alert Rule. DisplayName string `pulumi:"displayName"` // Only create incidents when the alert display name doesn't contain text from this list. DisplayNameExcludeFilters []string `pulumi:"displayNameExcludeFilters"` // Only create incidents when the alert display name contain text from this list, leave empty to apply no filter. DisplayNameFilters []string `pulumi:"displayNameFilters"` // Should this Sentinel MS Security Incident Alert Rule be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The ID of the Log Analytics Workspace this Sentinel MS Security Incident Alert Rule belongs to. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Sentinel MS Security Incident Alert Rule. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. Name *string `pulumi:"name"` // The Microsoft Security Service from where the alert will be generated. Possible values are `Azure Active Directory Identity Protection`, `Azure Advanced Threat Protection`, `Azure Security Center`, `Azure Security Center for IoT`, `Microsoft Cloud App Security`, `Microsoft Defender Advanced Threat Protection` and `Office 365 Advanced Threat Protection`. ProductFilter string `pulumi:"productFilter"` // Only create incidents from alerts when alert severity level is contained in this list. Possible values are `High`, `Medium`, `Low` and `Informational`. // // > **Note:** At least one of the severity filters need to be set. SeverityFilters []string `pulumi:"severityFilters"` } // The set of arguments for constructing a AlertRuleMsSecurityIncident resource. type AlertRuleMsSecurityIncidentArgs struct { // The GUID of the alert rule template which is used to create this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringPtrInput // The description of this Sentinel MS Security Incident Alert Rule. Description pulumi.StringPtrInput // The friendly name of this Sentinel MS Security Incident Alert Rule. DisplayName pulumi.StringInput // Only create incidents when the alert display name doesn't contain text from this list. DisplayNameExcludeFilters pulumi.StringArrayInput // Only create incidents when the alert display name contain text from this list, leave empty to apply no filter. DisplayNameFilters pulumi.StringArrayInput // Should this Sentinel MS Security Incident Alert Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The ID of the Log Analytics Workspace this Sentinel MS Security Incident Alert Rule belongs to. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Sentinel MS Security Incident Alert Rule. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. Name pulumi.StringPtrInput // The Microsoft Security Service from where the alert will be generated. Possible values are `Azure Active Directory Identity Protection`, `Azure Advanced Threat Protection`, `Azure Security Center`, `Azure Security Center for IoT`, `Microsoft Cloud App Security`, `Microsoft Defender Advanced Threat Protection` and `Office 365 Advanced Threat Protection`. ProductFilter pulumi.StringInput // Only create incidents from alerts when alert severity level is contained in this list. Possible values are `High`, `Medium`, `Low` and `Informational`. // // > **Note:** At least one of the severity filters need to be set. SeverityFilters pulumi.StringArrayInput } func (AlertRuleMsSecurityIncidentArgs) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleMsSecurityIncidentArgs)(nil)).Elem() } type AlertRuleMsSecurityIncidentInput interface { pulumi.Input ToAlertRuleMsSecurityIncidentOutput() AlertRuleMsSecurityIncidentOutput ToAlertRuleMsSecurityIncidentOutputWithContext(ctx context.Context) AlertRuleMsSecurityIncidentOutput } func (*AlertRuleMsSecurityIncident) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleMsSecurityIncident)(nil)).Elem() } func (i *AlertRuleMsSecurityIncident) ToAlertRuleMsSecurityIncidentOutput() AlertRuleMsSecurityIncidentOutput { return i.ToAlertRuleMsSecurityIncidentOutputWithContext(context.Background()) } func (i *AlertRuleMsSecurityIncident) ToAlertRuleMsSecurityIncidentOutputWithContext(ctx context.Context) AlertRuleMsSecurityIncidentOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleMsSecurityIncidentOutput) } // AlertRuleMsSecurityIncidentArrayInput is an input type that accepts AlertRuleMsSecurityIncidentArray and AlertRuleMsSecurityIncidentArrayOutput values. // You can construct a concrete instance of `AlertRuleMsSecurityIncidentArrayInput` via: // // AlertRuleMsSecurityIncidentArray{ AlertRuleMsSecurityIncidentArgs{...} } type AlertRuleMsSecurityIncidentArrayInput interface { pulumi.Input ToAlertRuleMsSecurityIncidentArrayOutput() AlertRuleMsSecurityIncidentArrayOutput ToAlertRuleMsSecurityIncidentArrayOutputWithContext(context.Context) AlertRuleMsSecurityIncidentArrayOutput } type AlertRuleMsSecurityIncidentArray []AlertRuleMsSecurityIncidentInput func (AlertRuleMsSecurityIncidentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertRuleMsSecurityIncident)(nil)).Elem() } func (i AlertRuleMsSecurityIncidentArray) ToAlertRuleMsSecurityIncidentArrayOutput() AlertRuleMsSecurityIncidentArrayOutput { return i.ToAlertRuleMsSecurityIncidentArrayOutputWithContext(context.Background()) } func (i AlertRuleMsSecurityIncidentArray) ToAlertRuleMsSecurityIncidentArrayOutputWithContext(ctx context.Context) AlertRuleMsSecurityIncidentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleMsSecurityIncidentArrayOutput) } // AlertRuleMsSecurityIncidentMapInput is an input type that accepts AlertRuleMsSecurityIncidentMap and AlertRuleMsSecurityIncidentMapOutput values. // You can construct a concrete instance of `AlertRuleMsSecurityIncidentMapInput` via: // // AlertRuleMsSecurityIncidentMap{ "key": AlertRuleMsSecurityIncidentArgs{...} } type AlertRuleMsSecurityIncidentMapInput interface { pulumi.Input ToAlertRuleMsSecurityIncidentMapOutput() AlertRuleMsSecurityIncidentMapOutput ToAlertRuleMsSecurityIncidentMapOutputWithContext(context.Context) AlertRuleMsSecurityIncidentMapOutput } type AlertRuleMsSecurityIncidentMap map[string]AlertRuleMsSecurityIncidentInput func (AlertRuleMsSecurityIncidentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertRuleMsSecurityIncident)(nil)).Elem() } func (i AlertRuleMsSecurityIncidentMap) ToAlertRuleMsSecurityIncidentMapOutput() AlertRuleMsSecurityIncidentMapOutput { return i.ToAlertRuleMsSecurityIncidentMapOutputWithContext(context.Background()) } func (i AlertRuleMsSecurityIncidentMap) ToAlertRuleMsSecurityIncidentMapOutputWithContext(ctx context.Context) AlertRuleMsSecurityIncidentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleMsSecurityIncidentMapOutput) } type AlertRuleMsSecurityIncidentOutput struct{ *pulumi.OutputState } func (AlertRuleMsSecurityIncidentOutput) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleMsSecurityIncident)(nil)).Elem() } func (o AlertRuleMsSecurityIncidentOutput) ToAlertRuleMsSecurityIncidentOutput() AlertRuleMsSecurityIncidentOutput { return o } func (o AlertRuleMsSecurityIncidentOutput) ToAlertRuleMsSecurityIncidentOutputWithContext(ctx context.Context) AlertRuleMsSecurityIncidentOutput { return o } // The GUID of the alert rule template which is used to create this Sentinel Scheduled Alert Rule. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. func (o AlertRuleMsSecurityIncidentOutput) AlertRuleTemplateGuid() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertRuleMsSecurityIncident) pulumi.StringPtrOutput { return v.AlertRuleTemplateGuid }).(pulumi.StringPtrOutput) } // The description of this Sentinel MS Security Incident Alert Rule. func (o AlertRuleMsSecurityIncidentOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertRuleMsSecurityIncident) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The friendly name of this Sentinel MS Security Incident Alert Rule. func (o AlertRuleMsSecurityIncidentOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleMsSecurityIncident) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // Only create incidents when the alert display name doesn't contain text from this list. func (o AlertRuleMsSecurityIncidentOutput) DisplayNameExcludeFilters() pulumi.StringArrayOutput { return o.ApplyT(func(v *AlertRuleMsSecurityIncident) pulumi.StringArrayOutput { return v.DisplayNameExcludeFilters }).(pulumi.StringArrayOutput) } // Only create incidents when the alert display name contain text from this list, leave empty to apply no filter. func (o AlertRuleMsSecurityIncidentOutput) DisplayNameFilters() pulumi.StringArrayOutput { return o.ApplyT(func(v *AlertRuleMsSecurityIncident) pulumi.StringArrayOutput { return v.DisplayNameFilters }).(pulumi.StringArrayOutput) } // Should this Sentinel MS Security Incident Alert Rule be enabled? Defaults to `true`. func (o AlertRuleMsSecurityIncidentOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AlertRuleMsSecurityIncident) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // The ID of the Log Analytics Workspace this Sentinel MS Security Incident Alert Rule belongs to. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. func (o AlertRuleMsSecurityIncidentOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleMsSecurityIncident) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Sentinel MS Security Incident Alert Rule. Changing this forces a new Sentinel MS Security Incident Alert Rule to be created. func (o AlertRuleMsSecurityIncidentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleMsSecurityIncident) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The Microsoft Security Service from where the alert will be generated. Possible values are `Azure Active Directory Identity Protection`, `Azure Advanced Threat Protection`, `Azure Security Center`, `Azure Security Center for IoT`, `Microsoft Cloud App Security`, `Microsoft Defender Advanced Threat Protection` and `Office 365 Advanced Threat Protection`. func (o AlertRuleMsSecurityIncidentOutput) ProductFilter() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleMsSecurityIncident) pulumi.StringOutput { return v.ProductFilter }).(pulumi.StringOutput) } // Only create incidents from alerts when alert severity level is contained in this list. Possible values are `High`, `Medium`, `Low` and `Informational`. // // > **Note:** At least one of the severity filters need to be set. func (o AlertRuleMsSecurityIncidentOutput) SeverityFilters() pulumi.StringArrayOutput { return o.ApplyT(func(v *AlertRuleMsSecurityIncident) pulumi.StringArrayOutput { return v.SeverityFilters }).(pulumi.StringArrayOutput) } type AlertRuleMsSecurityIncidentArrayOutput struct{ *pulumi.OutputState } func (AlertRuleMsSecurityIncidentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertRuleMsSecurityIncident)(nil)).Elem() } func (o AlertRuleMsSecurityIncidentArrayOutput) ToAlertRuleMsSecurityIncidentArrayOutput() AlertRuleMsSecurityIncidentArrayOutput { return o } func (o AlertRuleMsSecurityIncidentArrayOutput) ToAlertRuleMsSecurityIncidentArrayOutputWithContext(ctx context.Context) AlertRuleMsSecurityIncidentArrayOutput { return o } func (o AlertRuleMsSecurityIncidentArrayOutput) Index(i pulumi.IntInput) AlertRuleMsSecurityIncidentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AlertRuleMsSecurityIncident { return vs[0].([]*AlertRuleMsSecurityIncident)[vs[1].(int)] }).(AlertRuleMsSecurityIncidentOutput) } type AlertRuleMsSecurityIncidentMapOutput struct{ *pulumi.OutputState } func (AlertRuleMsSecurityIncidentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertRuleMsSecurityIncident)(nil)).Elem() } func (o AlertRuleMsSecurityIncidentMapOutput) ToAlertRuleMsSecurityIncidentMapOutput() AlertRuleMsSecurityIncidentMapOutput { return o } func (o AlertRuleMsSecurityIncidentMapOutput) ToAlertRuleMsSecurityIncidentMapOutputWithContext(ctx context.Context) AlertRuleMsSecurityIncidentMapOutput { return o } func (o AlertRuleMsSecurityIncidentMapOutput) MapIndex(k pulumi.StringInput) AlertRuleMsSecurityIncidentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AlertRuleMsSecurityIncident { return vs[0].(map[string]*AlertRuleMsSecurityIncident)[vs[1].(string)] }).(AlertRuleMsSecurityIncidentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleMsSecurityIncidentInput)(nil)).Elem(), &AlertRuleMsSecurityIncident{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleMsSecurityIncidentArrayInput)(nil)).Elem(), AlertRuleMsSecurityIncidentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleMsSecurityIncidentMapInput)(nil)).Elem(), AlertRuleMsSecurityIncidentMap{}) pulumi.RegisterOutputType(AlertRuleMsSecurityIncidentOutput{}) pulumi.RegisterOutputType(AlertRuleMsSecurityIncidentArrayOutput{}) pulumi.RegisterOutputType(AlertRuleMsSecurityIncidentMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/alertRuleFusion.go
sdk/go/azure/sentinel/alertRuleFusion.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Sentinel Fusion Alert Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewAlertRuleFusion(ctx, "example", &sentinel.AlertRuleFusionArgs{ // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // AlertRuleTemplateGuid: pulumi.String("f71aba3d-28fb-450b-b192-4e76a83015c8"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.OperationalInsights` - 2023-12-01-preview // // ## Import // // Sentinel Fusion Alert Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/alertRuleFusion:AlertRuleFusion example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/alertRules/rule1 // ``` type AlertRuleFusion struct { pulumi.CustomResourceState // The GUID of the alert rule template which is used for this Sentinel Fusion Alert Rule. Changing this forces a new Sentinel Fusion Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringOutput `pulumi:"alertRuleTemplateGuid"` // Should this Sentinel Fusion Alert Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // The ID of the Log Analytics Workspace this Sentinel Fusion Alert Rule belongs to. Changing this forces a new Sentinel Fusion Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // Deprecated: the `name` is deprecated and will be removed in v5.0 version of the provider. Name pulumi.StringOutput `pulumi:"name"` // One or more `source` blocks as defined below. Sources AlertRuleFusionSourceArrayOutput `pulumi:"sources"` } // NewAlertRuleFusion registers a new resource with the given unique name, arguments, and options. func NewAlertRuleFusion(ctx *pulumi.Context, name string, args *AlertRuleFusionArgs, opts ...pulumi.ResourceOption) (*AlertRuleFusion, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.AlertRuleTemplateGuid == nil { return nil, errors.New("invalid value for required argument 'AlertRuleTemplateGuid'") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AlertRuleFusion err := ctx.RegisterResource("azure:sentinel/alertRuleFusion:AlertRuleFusion", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAlertRuleFusion gets an existing AlertRuleFusion resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetAlertRuleFusion(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AlertRuleFusionState, opts ...pulumi.ResourceOption) (*AlertRuleFusion, error) { var resource AlertRuleFusion err := ctx.ReadResource("azure:sentinel/alertRuleFusion:AlertRuleFusion", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AlertRuleFusion resources. type alertRuleFusionState struct { // The GUID of the alert rule template which is used for this Sentinel Fusion Alert Rule. Changing this forces a new Sentinel Fusion Alert Rule to be created. AlertRuleTemplateGuid *string `pulumi:"alertRuleTemplateGuid"` // Should this Sentinel Fusion Alert Rule be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The ID of the Log Analytics Workspace this Sentinel Fusion Alert Rule belongs to. Changing this forces a new Sentinel Fusion Alert Rule to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // Deprecated: the `name` is deprecated and will be removed in v5.0 version of the provider. Name *string `pulumi:"name"` // One or more `source` blocks as defined below. Sources []AlertRuleFusionSource `pulumi:"sources"` } type AlertRuleFusionState struct { // The GUID of the alert rule template which is used for this Sentinel Fusion Alert Rule. Changing this forces a new Sentinel Fusion Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringPtrInput // Should this Sentinel Fusion Alert Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The ID of the Log Analytics Workspace this Sentinel Fusion Alert Rule belongs to. Changing this forces a new Sentinel Fusion Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // Deprecated: the `name` is deprecated and will be removed in v5.0 version of the provider. Name pulumi.StringPtrInput // One or more `source` blocks as defined below. Sources AlertRuleFusionSourceArrayInput } func (AlertRuleFusionState) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleFusionState)(nil)).Elem() } type alertRuleFusionArgs struct { // The GUID of the alert rule template which is used for this Sentinel Fusion Alert Rule. Changing this forces a new Sentinel Fusion Alert Rule to be created. AlertRuleTemplateGuid string `pulumi:"alertRuleTemplateGuid"` // Should this Sentinel Fusion Alert Rule be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The ID of the Log Analytics Workspace this Sentinel Fusion Alert Rule belongs to. Changing this forces a new Sentinel Fusion Alert Rule to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // Deprecated: the `name` is deprecated and will be removed in v5.0 version of the provider. Name *string `pulumi:"name"` // One or more `source` blocks as defined below. Sources []AlertRuleFusionSource `pulumi:"sources"` } // The set of arguments for constructing a AlertRuleFusion resource. type AlertRuleFusionArgs struct { // The GUID of the alert rule template which is used for this Sentinel Fusion Alert Rule. Changing this forces a new Sentinel Fusion Alert Rule to be created. AlertRuleTemplateGuid pulumi.StringInput // Should this Sentinel Fusion Alert Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The ID of the Log Analytics Workspace this Sentinel Fusion Alert Rule belongs to. Changing this forces a new Sentinel Fusion Alert Rule to be created. LogAnalyticsWorkspaceId pulumi.StringInput // Deprecated: the `name` is deprecated and will be removed in v5.0 version of the provider. Name pulumi.StringPtrInput // One or more `source` blocks as defined below. Sources AlertRuleFusionSourceArrayInput } func (AlertRuleFusionArgs) ElementType() reflect.Type { return reflect.TypeOf((*alertRuleFusionArgs)(nil)).Elem() } type AlertRuleFusionInput interface { pulumi.Input ToAlertRuleFusionOutput() AlertRuleFusionOutput ToAlertRuleFusionOutputWithContext(ctx context.Context) AlertRuleFusionOutput } func (*AlertRuleFusion) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleFusion)(nil)).Elem() } func (i *AlertRuleFusion) ToAlertRuleFusionOutput() AlertRuleFusionOutput { return i.ToAlertRuleFusionOutputWithContext(context.Background()) } func (i *AlertRuleFusion) ToAlertRuleFusionOutputWithContext(ctx context.Context) AlertRuleFusionOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleFusionOutput) } // AlertRuleFusionArrayInput is an input type that accepts AlertRuleFusionArray and AlertRuleFusionArrayOutput values. // You can construct a concrete instance of `AlertRuleFusionArrayInput` via: // // AlertRuleFusionArray{ AlertRuleFusionArgs{...} } type AlertRuleFusionArrayInput interface { pulumi.Input ToAlertRuleFusionArrayOutput() AlertRuleFusionArrayOutput ToAlertRuleFusionArrayOutputWithContext(context.Context) AlertRuleFusionArrayOutput } type AlertRuleFusionArray []AlertRuleFusionInput func (AlertRuleFusionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertRuleFusion)(nil)).Elem() } func (i AlertRuleFusionArray) ToAlertRuleFusionArrayOutput() AlertRuleFusionArrayOutput { return i.ToAlertRuleFusionArrayOutputWithContext(context.Background()) } func (i AlertRuleFusionArray) ToAlertRuleFusionArrayOutputWithContext(ctx context.Context) AlertRuleFusionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleFusionArrayOutput) } // AlertRuleFusionMapInput is an input type that accepts AlertRuleFusionMap and AlertRuleFusionMapOutput values. // You can construct a concrete instance of `AlertRuleFusionMapInput` via: // // AlertRuleFusionMap{ "key": AlertRuleFusionArgs{...} } type AlertRuleFusionMapInput interface { pulumi.Input ToAlertRuleFusionMapOutput() AlertRuleFusionMapOutput ToAlertRuleFusionMapOutputWithContext(context.Context) AlertRuleFusionMapOutput } type AlertRuleFusionMap map[string]AlertRuleFusionInput func (AlertRuleFusionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertRuleFusion)(nil)).Elem() } func (i AlertRuleFusionMap) ToAlertRuleFusionMapOutput() AlertRuleFusionMapOutput { return i.ToAlertRuleFusionMapOutputWithContext(context.Background()) } func (i AlertRuleFusionMap) ToAlertRuleFusionMapOutputWithContext(ctx context.Context) AlertRuleFusionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertRuleFusionMapOutput) } type AlertRuleFusionOutput struct{ *pulumi.OutputState } func (AlertRuleFusionOutput) ElementType() reflect.Type { return reflect.TypeOf((**AlertRuleFusion)(nil)).Elem() } func (o AlertRuleFusionOutput) ToAlertRuleFusionOutput() AlertRuleFusionOutput { return o } func (o AlertRuleFusionOutput) ToAlertRuleFusionOutputWithContext(ctx context.Context) AlertRuleFusionOutput { return o } // The GUID of the alert rule template which is used for this Sentinel Fusion Alert Rule. Changing this forces a new Sentinel Fusion Alert Rule to be created. func (o AlertRuleFusionOutput) AlertRuleTemplateGuid() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleFusion) pulumi.StringOutput { return v.AlertRuleTemplateGuid }).(pulumi.StringOutput) } // Should this Sentinel Fusion Alert Rule be enabled? Defaults to `true`. func (o AlertRuleFusionOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AlertRuleFusion) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // The ID of the Log Analytics Workspace this Sentinel Fusion Alert Rule belongs to. Changing this forces a new Sentinel Fusion Alert Rule to be created. func (o AlertRuleFusionOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleFusion) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // Deprecated: the `name` is deprecated and will be removed in v5.0 version of the provider. func (o AlertRuleFusionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AlertRuleFusion) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `source` blocks as defined below. func (o AlertRuleFusionOutput) Sources() AlertRuleFusionSourceArrayOutput { return o.ApplyT(func(v *AlertRuleFusion) AlertRuleFusionSourceArrayOutput { return v.Sources }).(AlertRuleFusionSourceArrayOutput) } type AlertRuleFusionArrayOutput struct{ *pulumi.OutputState } func (AlertRuleFusionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertRuleFusion)(nil)).Elem() } func (o AlertRuleFusionArrayOutput) ToAlertRuleFusionArrayOutput() AlertRuleFusionArrayOutput { return o } func (o AlertRuleFusionArrayOutput) ToAlertRuleFusionArrayOutputWithContext(ctx context.Context) AlertRuleFusionArrayOutput { return o } func (o AlertRuleFusionArrayOutput) Index(i pulumi.IntInput) AlertRuleFusionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AlertRuleFusion { return vs[0].([]*AlertRuleFusion)[vs[1].(int)] }).(AlertRuleFusionOutput) } type AlertRuleFusionMapOutput struct{ *pulumi.OutputState } func (AlertRuleFusionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertRuleFusion)(nil)).Elem() } func (o AlertRuleFusionMapOutput) ToAlertRuleFusionMapOutput() AlertRuleFusionMapOutput { return o } func (o AlertRuleFusionMapOutput) ToAlertRuleFusionMapOutputWithContext(ctx context.Context) AlertRuleFusionMapOutput { return o } func (o AlertRuleFusionMapOutput) MapIndex(k pulumi.StringInput) AlertRuleFusionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AlertRuleFusion { return vs[0].(map[string]*AlertRuleFusion)[vs[1].(string)] }).(AlertRuleFusionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleFusionInput)(nil)).Elem(), &AlertRuleFusion{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleFusionArrayInput)(nil)).Elem(), AlertRuleFusionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertRuleFusionMapInput)(nil)).Elem(), AlertRuleFusionMap{}) pulumi.RegisterOutputType(AlertRuleFusionOutput{}) pulumi.RegisterOutputType(AlertRuleFusionArrayOutput{}) pulumi.RegisterOutputType(AlertRuleFusionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/watchlistItem.go
sdk/go/azure/sentinel/watchlistItem.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Sentinel Watchlist Item. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // exampleWatchlist, err := sentinel.NewWatchlist(ctx, "example", &sentinel.WatchlistArgs{ // Name: pulumi.String("example-watchlist"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // DisplayName: pulumi.String("example-wl"), // ItemSearchKey: pulumi.String("Key"), // }) // if err != nil { // return err // } // _, err = sentinel.NewWatchlistItem(ctx, "example", &sentinel.WatchlistItemArgs{ // Name: pulumi.String("0aac6fa5-223e-49cf-9bfd-3554dc9d2b76"), // WatchlistId: exampleWatchlist.ID(), // Properties: pulumi.StringMap{ // "k1": pulumi.String("v1"), // "k2": pulumi.String("v2"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.OperationalInsights` - 2022-11-01 // // ## Import // // Sentinel Watchlist Items can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/watchlistItem:WatchlistItem example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/watchlists/list1/watchlistItems/item1 // ``` type WatchlistItem struct { pulumi.CustomResourceState // The name in UUID format which should be used for this Sentinel Watchlist Item. Changing this forces a new Sentinel Watchlist Item to be created. Name pulumi.StringOutput `pulumi:"name"` // The key value pairs of the Sentinel Watchlist Item. Properties pulumi.StringMapOutput `pulumi:"properties"` // The ID of the Sentinel Watchlist that this Item resides in. Changing this forces a new Sentinel Watchlist Item to be created. WatchlistId pulumi.StringOutput `pulumi:"watchlistId"` } // NewWatchlistItem registers a new resource with the given unique name, arguments, and options. func NewWatchlistItem(ctx *pulumi.Context, name string, args *WatchlistItemArgs, opts ...pulumi.ResourceOption) (*WatchlistItem, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Properties == nil { return nil, errors.New("invalid value for required argument 'Properties'") } if args.WatchlistId == nil { return nil, errors.New("invalid value for required argument 'WatchlistId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource WatchlistItem err := ctx.RegisterResource("azure:sentinel/watchlistItem:WatchlistItem", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWatchlistItem gets an existing WatchlistItem resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetWatchlistItem(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WatchlistItemState, opts ...pulumi.ResourceOption) (*WatchlistItem, error) { var resource WatchlistItem err := ctx.ReadResource("azure:sentinel/watchlistItem:WatchlistItem", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering WatchlistItem resources. type watchlistItemState struct { // The name in UUID format which should be used for this Sentinel Watchlist Item. Changing this forces a new Sentinel Watchlist Item to be created. Name *string `pulumi:"name"` // The key value pairs of the Sentinel Watchlist Item. Properties map[string]string `pulumi:"properties"` // The ID of the Sentinel Watchlist that this Item resides in. Changing this forces a new Sentinel Watchlist Item to be created. WatchlistId *string `pulumi:"watchlistId"` } type WatchlistItemState struct { // The name in UUID format which should be used for this Sentinel Watchlist Item. Changing this forces a new Sentinel Watchlist Item to be created. Name pulumi.StringPtrInput // The key value pairs of the Sentinel Watchlist Item. Properties pulumi.StringMapInput // The ID of the Sentinel Watchlist that this Item resides in. Changing this forces a new Sentinel Watchlist Item to be created. WatchlistId pulumi.StringPtrInput } func (WatchlistItemState) ElementType() reflect.Type { return reflect.TypeOf((*watchlistItemState)(nil)).Elem() } type watchlistItemArgs struct { // The name in UUID format which should be used for this Sentinel Watchlist Item. Changing this forces a new Sentinel Watchlist Item to be created. Name *string `pulumi:"name"` // The key value pairs of the Sentinel Watchlist Item. Properties map[string]string `pulumi:"properties"` // The ID of the Sentinel Watchlist that this Item resides in. Changing this forces a new Sentinel Watchlist Item to be created. WatchlistId string `pulumi:"watchlistId"` } // The set of arguments for constructing a WatchlistItem resource. type WatchlistItemArgs struct { // The name in UUID format which should be used for this Sentinel Watchlist Item. Changing this forces a new Sentinel Watchlist Item to be created. Name pulumi.StringPtrInput // The key value pairs of the Sentinel Watchlist Item. Properties pulumi.StringMapInput // The ID of the Sentinel Watchlist that this Item resides in. Changing this forces a new Sentinel Watchlist Item to be created. WatchlistId pulumi.StringInput } func (WatchlistItemArgs) ElementType() reflect.Type { return reflect.TypeOf((*watchlistItemArgs)(nil)).Elem() } type WatchlistItemInput interface { pulumi.Input ToWatchlistItemOutput() WatchlistItemOutput ToWatchlistItemOutputWithContext(ctx context.Context) WatchlistItemOutput } func (*WatchlistItem) ElementType() reflect.Type { return reflect.TypeOf((**WatchlistItem)(nil)).Elem() } func (i *WatchlistItem) ToWatchlistItemOutput() WatchlistItemOutput { return i.ToWatchlistItemOutputWithContext(context.Background()) } func (i *WatchlistItem) ToWatchlistItemOutputWithContext(ctx context.Context) WatchlistItemOutput { return pulumi.ToOutputWithContext(ctx, i).(WatchlistItemOutput) } // WatchlistItemArrayInput is an input type that accepts WatchlistItemArray and WatchlistItemArrayOutput values. // You can construct a concrete instance of `WatchlistItemArrayInput` via: // // WatchlistItemArray{ WatchlistItemArgs{...} } type WatchlistItemArrayInput interface { pulumi.Input ToWatchlistItemArrayOutput() WatchlistItemArrayOutput ToWatchlistItemArrayOutputWithContext(context.Context) WatchlistItemArrayOutput } type WatchlistItemArray []WatchlistItemInput func (WatchlistItemArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*WatchlistItem)(nil)).Elem() } func (i WatchlistItemArray) ToWatchlistItemArrayOutput() WatchlistItemArrayOutput { return i.ToWatchlistItemArrayOutputWithContext(context.Background()) } func (i WatchlistItemArray) ToWatchlistItemArrayOutputWithContext(ctx context.Context) WatchlistItemArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WatchlistItemArrayOutput) } // WatchlistItemMapInput is an input type that accepts WatchlistItemMap and WatchlistItemMapOutput values. // You can construct a concrete instance of `WatchlistItemMapInput` via: // // WatchlistItemMap{ "key": WatchlistItemArgs{...} } type WatchlistItemMapInput interface { pulumi.Input ToWatchlistItemMapOutput() WatchlistItemMapOutput ToWatchlistItemMapOutputWithContext(context.Context) WatchlistItemMapOutput } type WatchlistItemMap map[string]WatchlistItemInput func (WatchlistItemMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WatchlistItem)(nil)).Elem() } func (i WatchlistItemMap) ToWatchlistItemMapOutput() WatchlistItemMapOutput { return i.ToWatchlistItemMapOutputWithContext(context.Background()) } func (i WatchlistItemMap) ToWatchlistItemMapOutputWithContext(ctx context.Context) WatchlistItemMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WatchlistItemMapOutput) } type WatchlistItemOutput struct{ *pulumi.OutputState } func (WatchlistItemOutput) ElementType() reflect.Type { return reflect.TypeOf((**WatchlistItem)(nil)).Elem() } func (o WatchlistItemOutput) ToWatchlistItemOutput() WatchlistItemOutput { return o } func (o WatchlistItemOutput) ToWatchlistItemOutputWithContext(ctx context.Context) WatchlistItemOutput { return o } // The name in UUID format which should be used for this Sentinel Watchlist Item. Changing this forces a new Sentinel Watchlist Item to be created. func (o WatchlistItemOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *WatchlistItem) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The key value pairs of the Sentinel Watchlist Item. func (o WatchlistItemOutput) Properties() pulumi.StringMapOutput { return o.ApplyT(func(v *WatchlistItem) pulumi.StringMapOutput { return v.Properties }).(pulumi.StringMapOutput) } // The ID of the Sentinel Watchlist that this Item resides in. Changing this forces a new Sentinel Watchlist Item to be created. func (o WatchlistItemOutput) WatchlistId() pulumi.StringOutput { return o.ApplyT(func(v *WatchlistItem) pulumi.StringOutput { return v.WatchlistId }).(pulumi.StringOutput) } type WatchlistItemArrayOutput struct{ *pulumi.OutputState } func (WatchlistItemArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*WatchlistItem)(nil)).Elem() } func (o WatchlistItemArrayOutput) ToWatchlistItemArrayOutput() WatchlistItemArrayOutput { return o } func (o WatchlistItemArrayOutput) ToWatchlistItemArrayOutputWithContext(ctx context.Context) WatchlistItemArrayOutput { return o } func (o WatchlistItemArrayOutput) Index(i pulumi.IntInput) WatchlistItemOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WatchlistItem { return vs[0].([]*WatchlistItem)[vs[1].(int)] }).(WatchlistItemOutput) } type WatchlistItemMapOutput struct{ *pulumi.OutputState } func (WatchlistItemMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WatchlistItem)(nil)).Elem() } func (o WatchlistItemMapOutput) ToWatchlistItemMapOutput() WatchlistItemMapOutput { return o } func (o WatchlistItemMapOutput) ToWatchlistItemMapOutputWithContext(ctx context.Context) WatchlistItemMapOutput { return o } func (o WatchlistItemMapOutput) MapIndex(k pulumi.StringInput) WatchlistItemOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WatchlistItem { return vs[0].(map[string]*WatchlistItem)[vs[1].(string)] }).(WatchlistItemOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*WatchlistItemInput)(nil)).Elem(), &WatchlistItem{}) pulumi.RegisterInputType(reflect.TypeOf((*WatchlistItemArrayInput)(nil)).Elem(), WatchlistItemArray{}) pulumi.RegisterInputType(reflect.TypeOf((*WatchlistItemMapInput)(nil)).Elem(), WatchlistItemMap{}) pulumi.RegisterOutputType(WatchlistItemOutput{}) pulumi.RegisterOutputType(WatchlistItemArrayOutput{}) pulumi.RegisterOutputType(WatchlistItemMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorAzureSecurityCenter.go
sdk/go/azure/sentinel/dataConnectorAzureSecurityCenter.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Azure Security Center Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("west europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorAzureSecurityCenter(ctx, "example", &sentinel.DataConnectorAzureSecurityCenterArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Azure Security Center Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorAzureSecurityCenter:DataConnectorAzureSecurityCenter example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorAzureSecurityCenter struct { pulumi.CustomResourceState // The ID of the Log Analytics Workspace that this Azure Security Center Data Connector resides in. Changing this forces a new Azure Security Center Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Azure Security Center Data Connector. Changing this forces a new Azure Security Center Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the subscription that this Azure Security Center Data Connector connects to. Changing this forces a new Azure Security Center Data Connector to be created. SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"` } // NewDataConnectorAzureSecurityCenter registers a new resource with the given unique name, arguments, and options. func NewDataConnectorAzureSecurityCenter(ctx *pulumi.Context, name string, args *DataConnectorAzureSecurityCenterArgs, opts ...pulumi.ResourceOption) (*DataConnectorAzureSecurityCenter, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorAzureSecurityCenter err := ctx.RegisterResource("azure:sentinel/dataConnectorAzureSecurityCenter:DataConnectorAzureSecurityCenter", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorAzureSecurityCenter gets an existing DataConnectorAzureSecurityCenter resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorAzureSecurityCenter(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorAzureSecurityCenterState, opts ...pulumi.ResourceOption) (*DataConnectorAzureSecurityCenter, error) { var resource DataConnectorAzureSecurityCenter err := ctx.ReadResource("azure:sentinel/dataConnectorAzureSecurityCenter:DataConnectorAzureSecurityCenter", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorAzureSecurityCenter resources. type dataConnectorAzureSecurityCenterState struct { // The ID of the Log Analytics Workspace that this Azure Security Center Data Connector resides in. Changing this forces a new Azure Security Center Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Azure Security Center Data Connector. Changing this forces a new Azure Security Center Data Connector to be created. Name *string `pulumi:"name"` // The ID of the subscription that this Azure Security Center Data Connector connects to. Changing this forces a new Azure Security Center Data Connector to be created. SubscriptionId *string `pulumi:"subscriptionId"` } type DataConnectorAzureSecurityCenterState struct { // The ID of the Log Analytics Workspace that this Azure Security Center Data Connector resides in. Changing this forces a new Azure Security Center Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Azure Security Center Data Connector. Changing this forces a new Azure Security Center Data Connector to be created. Name pulumi.StringPtrInput // The ID of the subscription that this Azure Security Center Data Connector connects to. Changing this forces a new Azure Security Center Data Connector to be created. SubscriptionId pulumi.StringPtrInput } func (DataConnectorAzureSecurityCenterState) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorAzureSecurityCenterState)(nil)).Elem() } type dataConnectorAzureSecurityCenterArgs struct { // The ID of the Log Analytics Workspace that this Azure Security Center Data Connector resides in. Changing this forces a new Azure Security Center Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Azure Security Center Data Connector. Changing this forces a new Azure Security Center Data Connector to be created. Name *string `pulumi:"name"` // The ID of the subscription that this Azure Security Center Data Connector connects to. Changing this forces a new Azure Security Center Data Connector to be created. SubscriptionId *string `pulumi:"subscriptionId"` } // The set of arguments for constructing a DataConnectorAzureSecurityCenter resource. type DataConnectorAzureSecurityCenterArgs struct { // The ID of the Log Analytics Workspace that this Azure Security Center Data Connector resides in. Changing this forces a new Azure Security Center Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Azure Security Center Data Connector. Changing this forces a new Azure Security Center Data Connector to be created. Name pulumi.StringPtrInput // The ID of the subscription that this Azure Security Center Data Connector connects to. Changing this forces a new Azure Security Center Data Connector to be created. SubscriptionId pulumi.StringPtrInput } func (DataConnectorAzureSecurityCenterArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorAzureSecurityCenterArgs)(nil)).Elem() } type DataConnectorAzureSecurityCenterInput interface { pulumi.Input ToDataConnectorAzureSecurityCenterOutput() DataConnectorAzureSecurityCenterOutput ToDataConnectorAzureSecurityCenterOutputWithContext(ctx context.Context) DataConnectorAzureSecurityCenterOutput } func (*DataConnectorAzureSecurityCenter) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorAzureSecurityCenter)(nil)).Elem() } func (i *DataConnectorAzureSecurityCenter) ToDataConnectorAzureSecurityCenterOutput() DataConnectorAzureSecurityCenterOutput { return i.ToDataConnectorAzureSecurityCenterOutputWithContext(context.Background()) } func (i *DataConnectorAzureSecurityCenter) ToDataConnectorAzureSecurityCenterOutputWithContext(ctx context.Context) DataConnectorAzureSecurityCenterOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorAzureSecurityCenterOutput) } // DataConnectorAzureSecurityCenterArrayInput is an input type that accepts DataConnectorAzureSecurityCenterArray and DataConnectorAzureSecurityCenterArrayOutput values. // You can construct a concrete instance of `DataConnectorAzureSecurityCenterArrayInput` via: // // DataConnectorAzureSecurityCenterArray{ DataConnectorAzureSecurityCenterArgs{...} } type DataConnectorAzureSecurityCenterArrayInput interface { pulumi.Input ToDataConnectorAzureSecurityCenterArrayOutput() DataConnectorAzureSecurityCenterArrayOutput ToDataConnectorAzureSecurityCenterArrayOutputWithContext(context.Context) DataConnectorAzureSecurityCenterArrayOutput } type DataConnectorAzureSecurityCenterArray []DataConnectorAzureSecurityCenterInput func (DataConnectorAzureSecurityCenterArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorAzureSecurityCenter)(nil)).Elem() } func (i DataConnectorAzureSecurityCenterArray) ToDataConnectorAzureSecurityCenterArrayOutput() DataConnectorAzureSecurityCenterArrayOutput { return i.ToDataConnectorAzureSecurityCenterArrayOutputWithContext(context.Background()) } func (i DataConnectorAzureSecurityCenterArray) ToDataConnectorAzureSecurityCenterArrayOutputWithContext(ctx context.Context) DataConnectorAzureSecurityCenterArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorAzureSecurityCenterArrayOutput) } // DataConnectorAzureSecurityCenterMapInput is an input type that accepts DataConnectorAzureSecurityCenterMap and DataConnectorAzureSecurityCenterMapOutput values. // You can construct a concrete instance of `DataConnectorAzureSecurityCenterMapInput` via: // // DataConnectorAzureSecurityCenterMap{ "key": DataConnectorAzureSecurityCenterArgs{...} } type DataConnectorAzureSecurityCenterMapInput interface { pulumi.Input ToDataConnectorAzureSecurityCenterMapOutput() DataConnectorAzureSecurityCenterMapOutput ToDataConnectorAzureSecurityCenterMapOutputWithContext(context.Context) DataConnectorAzureSecurityCenterMapOutput } type DataConnectorAzureSecurityCenterMap map[string]DataConnectorAzureSecurityCenterInput func (DataConnectorAzureSecurityCenterMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorAzureSecurityCenter)(nil)).Elem() } func (i DataConnectorAzureSecurityCenterMap) ToDataConnectorAzureSecurityCenterMapOutput() DataConnectorAzureSecurityCenterMapOutput { return i.ToDataConnectorAzureSecurityCenterMapOutputWithContext(context.Background()) } func (i DataConnectorAzureSecurityCenterMap) ToDataConnectorAzureSecurityCenterMapOutputWithContext(ctx context.Context) DataConnectorAzureSecurityCenterMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorAzureSecurityCenterMapOutput) } type DataConnectorAzureSecurityCenterOutput struct{ *pulumi.OutputState } func (DataConnectorAzureSecurityCenterOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorAzureSecurityCenter)(nil)).Elem() } func (o DataConnectorAzureSecurityCenterOutput) ToDataConnectorAzureSecurityCenterOutput() DataConnectorAzureSecurityCenterOutput { return o } func (o DataConnectorAzureSecurityCenterOutput) ToDataConnectorAzureSecurityCenterOutputWithContext(ctx context.Context) DataConnectorAzureSecurityCenterOutput { return o } // The ID of the Log Analytics Workspace that this Azure Security Center Data Connector resides in. Changing this forces a new Azure Security Center Data Connector to be created. func (o DataConnectorAzureSecurityCenterOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAzureSecurityCenter) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Azure Security Center Data Connector. Changing this forces a new Azure Security Center Data Connector to be created. func (o DataConnectorAzureSecurityCenterOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAzureSecurityCenter) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the subscription that this Azure Security Center Data Connector connects to. Changing this forces a new Azure Security Center Data Connector to be created. func (o DataConnectorAzureSecurityCenterOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAzureSecurityCenter) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput) } type DataConnectorAzureSecurityCenterArrayOutput struct{ *pulumi.OutputState } func (DataConnectorAzureSecurityCenterArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorAzureSecurityCenter)(nil)).Elem() } func (o DataConnectorAzureSecurityCenterArrayOutput) ToDataConnectorAzureSecurityCenterArrayOutput() DataConnectorAzureSecurityCenterArrayOutput { return o } func (o DataConnectorAzureSecurityCenterArrayOutput) ToDataConnectorAzureSecurityCenterArrayOutputWithContext(ctx context.Context) DataConnectorAzureSecurityCenterArrayOutput { return o } func (o DataConnectorAzureSecurityCenterArrayOutput) Index(i pulumi.IntInput) DataConnectorAzureSecurityCenterOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorAzureSecurityCenter { return vs[0].([]*DataConnectorAzureSecurityCenter)[vs[1].(int)] }).(DataConnectorAzureSecurityCenterOutput) } type DataConnectorAzureSecurityCenterMapOutput struct{ *pulumi.OutputState } func (DataConnectorAzureSecurityCenterMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorAzureSecurityCenter)(nil)).Elem() } func (o DataConnectorAzureSecurityCenterMapOutput) ToDataConnectorAzureSecurityCenterMapOutput() DataConnectorAzureSecurityCenterMapOutput { return o } func (o DataConnectorAzureSecurityCenterMapOutput) ToDataConnectorAzureSecurityCenterMapOutputWithContext(ctx context.Context) DataConnectorAzureSecurityCenterMapOutput { return o } func (o DataConnectorAzureSecurityCenterMapOutput) MapIndex(k pulumi.StringInput) DataConnectorAzureSecurityCenterOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorAzureSecurityCenter { return vs[0].(map[string]*DataConnectorAzureSecurityCenter)[vs[1].(string)] }).(DataConnectorAzureSecurityCenterOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorAzureSecurityCenterInput)(nil)).Elem(), &DataConnectorAzureSecurityCenter{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorAzureSecurityCenterArrayInput)(nil)).Elem(), DataConnectorAzureSecurityCenterArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorAzureSecurityCenterMapInput)(nil)).Elem(), DataConnectorAzureSecurityCenterMap{}) pulumi.RegisterOutputType(DataConnectorAzureSecurityCenterOutput{}) pulumi.RegisterOutputType(DataConnectorAzureSecurityCenterArrayOutput{}) pulumi.RegisterOutputType(DataConnectorAzureSecurityCenterMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorOfficeAtp.go
sdk/go/azure/sentinel/dataConnectorOfficeAtp.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Office ATP Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorOfficeAtp(ctx, "example", &sentinel.DataConnectorOfficeAtpArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Office ATP Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorOfficeAtp:DataConnectorOfficeAtp example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorOfficeAtp struct { pulumi.CustomResourceState // The ID of the Log Analytics Workspace that this Office ATP Data Connector resides in. Changing this forces a new Office ATP Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Office ATP Data Connector. Changing this forces a new Office ATP Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the tenant that this Office ATP Data Connector connects to. Changing this forces a new Office ATP Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewDataConnectorOfficeAtp registers a new resource with the given unique name, arguments, and options. func NewDataConnectorOfficeAtp(ctx *pulumi.Context, name string, args *DataConnectorOfficeAtpArgs, opts ...pulumi.ResourceOption) (*DataConnectorOfficeAtp, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorOfficeAtp err := ctx.RegisterResource("azure:sentinel/dataConnectorOfficeAtp:DataConnectorOfficeAtp", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorOfficeAtp gets an existing DataConnectorOfficeAtp resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorOfficeAtp(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorOfficeAtpState, opts ...pulumi.ResourceOption) (*DataConnectorOfficeAtp, error) { var resource DataConnectorOfficeAtp err := ctx.ReadResource("azure:sentinel/dataConnectorOfficeAtp:DataConnectorOfficeAtp", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorOfficeAtp resources. type dataConnectorOfficeAtpState struct { // The ID of the Log Analytics Workspace that this Office ATP Data Connector resides in. Changing this forces a new Office ATP Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Office ATP Data Connector. Changing this forces a new Office ATP Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Office ATP Data Connector connects to. Changing this forces a new Office ATP Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } type DataConnectorOfficeAtpState struct { // The ID of the Log Analytics Workspace that this Office ATP Data Connector resides in. Changing this forces a new Office ATP Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Office ATP Data Connector. Changing this forces a new Office ATP Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Office ATP Data Connector connects to. Changing this forces a new Office ATP Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorOfficeAtpState) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorOfficeAtpState)(nil)).Elem() } type dataConnectorOfficeAtpArgs struct { // The ID of the Log Analytics Workspace that this Office ATP Data Connector resides in. Changing this forces a new Office ATP Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Office ATP Data Connector. Changing this forces a new Office ATP Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Office ATP Data Connector connects to. Changing this forces a new Office ATP Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } // The set of arguments for constructing a DataConnectorOfficeAtp resource. type DataConnectorOfficeAtpArgs struct { // The ID of the Log Analytics Workspace that this Office ATP Data Connector resides in. Changing this forces a new Office ATP Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Office ATP Data Connector. Changing this forces a new Office ATP Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Office ATP Data Connector connects to. Changing this forces a new Office ATP Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorOfficeAtpArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorOfficeAtpArgs)(nil)).Elem() } type DataConnectorOfficeAtpInput interface { pulumi.Input ToDataConnectorOfficeAtpOutput() DataConnectorOfficeAtpOutput ToDataConnectorOfficeAtpOutputWithContext(ctx context.Context) DataConnectorOfficeAtpOutput } func (*DataConnectorOfficeAtp) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorOfficeAtp)(nil)).Elem() } func (i *DataConnectorOfficeAtp) ToDataConnectorOfficeAtpOutput() DataConnectorOfficeAtpOutput { return i.ToDataConnectorOfficeAtpOutputWithContext(context.Background()) } func (i *DataConnectorOfficeAtp) ToDataConnectorOfficeAtpOutputWithContext(ctx context.Context) DataConnectorOfficeAtpOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorOfficeAtpOutput) } // DataConnectorOfficeAtpArrayInput is an input type that accepts DataConnectorOfficeAtpArray and DataConnectorOfficeAtpArrayOutput values. // You can construct a concrete instance of `DataConnectorOfficeAtpArrayInput` via: // // DataConnectorOfficeAtpArray{ DataConnectorOfficeAtpArgs{...} } type DataConnectorOfficeAtpArrayInput interface { pulumi.Input ToDataConnectorOfficeAtpArrayOutput() DataConnectorOfficeAtpArrayOutput ToDataConnectorOfficeAtpArrayOutputWithContext(context.Context) DataConnectorOfficeAtpArrayOutput } type DataConnectorOfficeAtpArray []DataConnectorOfficeAtpInput func (DataConnectorOfficeAtpArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorOfficeAtp)(nil)).Elem() } func (i DataConnectorOfficeAtpArray) ToDataConnectorOfficeAtpArrayOutput() DataConnectorOfficeAtpArrayOutput { return i.ToDataConnectorOfficeAtpArrayOutputWithContext(context.Background()) } func (i DataConnectorOfficeAtpArray) ToDataConnectorOfficeAtpArrayOutputWithContext(ctx context.Context) DataConnectorOfficeAtpArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorOfficeAtpArrayOutput) } // DataConnectorOfficeAtpMapInput is an input type that accepts DataConnectorOfficeAtpMap and DataConnectorOfficeAtpMapOutput values. // You can construct a concrete instance of `DataConnectorOfficeAtpMapInput` via: // // DataConnectorOfficeAtpMap{ "key": DataConnectorOfficeAtpArgs{...} } type DataConnectorOfficeAtpMapInput interface { pulumi.Input ToDataConnectorOfficeAtpMapOutput() DataConnectorOfficeAtpMapOutput ToDataConnectorOfficeAtpMapOutputWithContext(context.Context) DataConnectorOfficeAtpMapOutput } type DataConnectorOfficeAtpMap map[string]DataConnectorOfficeAtpInput func (DataConnectorOfficeAtpMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorOfficeAtp)(nil)).Elem() } func (i DataConnectorOfficeAtpMap) ToDataConnectorOfficeAtpMapOutput() DataConnectorOfficeAtpMapOutput { return i.ToDataConnectorOfficeAtpMapOutputWithContext(context.Background()) } func (i DataConnectorOfficeAtpMap) ToDataConnectorOfficeAtpMapOutputWithContext(ctx context.Context) DataConnectorOfficeAtpMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorOfficeAtpMapOutput) } type DataConnectorOfficeAtpOutput struct{ *pulumi.OutputState } func (DataConnectorOfficeAtpOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorOfficeAtp)(nil)).Elem() } func (o DataConnectorOfficeAtpOutput) ToDataConnectorOfficeAtpOutput() DataConnectorOfficeAtpOutput { return o } func (o DataConnectorOfficeAtpOutput) ToDataConnectorOfficeAtpOutputWithContext(ctx context.Context) DataConnectorOfficeAtpOutput { return o } // The ID of the Log Analytics Workspace that this Office ATP Data Connector resides in. Changing this forces a new Office ATP Data Connector to be created. func (o DataConnectorOfficeAtpOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorOfficeAtp) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Office ATP Data Connector. Changing this forces a new Office ATP Data Connector to be created. func (o DataConnectorOfficeAtpOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorOfficeAtp) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the tenant that this Office ATP Data Connector connects to. Changing this forces a new Office ATP Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. func (o DataConnectorOfficeAtpOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorOfficeAtp) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type DataConnectorOfficeAtpArrayOutput struct{ *pulumi.OutputState } func (DataConnectorOfficeAtpArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorOfficeAtp)(nil)).Elem() } func (o DataConnectorOfficeAtpArrayOutput) ToDataConnectorOfficeAtpArrayOutput() DataConnectorOfficeAtpArrayOutput { return o } func (o DataConnectorOfficeAtpArrayOutput) ToDataConnectorOfficeAtpArrayOutputWithContext(ctx context.Context) DataConnectorOfficeAtpArrayOutput { return o } func (o DataConnectorOfficeAtpArrayOutput) Index(i pulumi.IntInput) DataConnectorOfficeAtpOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorOfficeAtp { return vs[0].([]*DataConnectorOfficeAtp)[vs[1].(int)] }).(DataConnectorOfficeAtpOutput) } type DataConnectorOfficeAtpMapOutput struct{ *pulumi.OutputState } func (DataConnectorOfficeAtpMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorOfficeAtp)(nil)).Elem() } func (o DataConnectorOfficeAtpMapOutput) ToDataConnectorOfficeAtpMapOutput() DataConnectorOfficeAtpMapOutput { return o } func (o DataConnectorOfficeAtpMapOutput) ToDataConnectorOfficeAtpMapOutputWithContext(ctx context.Context) DataConnectorOfficeAtpMapOutput { return o } func (o DataConnectorOfficeAtpMapOutput) MapIndex(k pulumi.StringInput) DataConnectorOfficeAtpOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorOfficeAtp { return vs[0].(map[string]*DataConnectorOfficeAtp)[vs[1].(string)] }).(DataConnectorOfficeAtpOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorOfficeAtpInput)(nil)).Elem(), &DataConnectorOfficeAtp{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorOfficeAtpArrayInput)(nil)).Elem(), DataConnectorOfficeAtpArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorOfficeAtpMapInput)(nil)).Elem(), DataConnectorOfficeAtpMap{}) pulumi.RegisterOutputType(DataConnectorOfficeAtpOutput{}) pulumi.RegisterOutputType(DataConnectorOfficeAtpArrayOutput{}) pulumi.RegisterOutputType(DataConnectorOfficeAtpMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorOffice365.go
sdk/go/azure/sentinel/dataConnectorOffice365.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Office 365 Data Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorOffice365(ctx, "example", &sentinel.DataConnectorOffice365Args{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Office 365 Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorOffice365:DataConnectorOffice365 example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorOffice365 struct { pulumi.CustomResourceState // Should the Exchange data connector be enabled? Defaults to `true`. ExchangeEnabled pulumi.BoolPtrOutput `pulumi:"exchangeEnabled"` // The ID of the Log Analytics Workspace that this Office 365 Data Connector resides in. Changing this forces a new Office 365 Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Office 365 Data Connector. Changing this forces a new Office 365 Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // Should the SharePoint data connector be enabled? Defaults to `true`. SharepointEnabled pulumi.BoolPtrOutput `pulumi:"sharepointEnabled"` // Should the Microsoft Teams data connector be enabled? Defaults to `true`. // // > **Note:** At least one of `exchangeEnabled`, `sharedpointEnabled` and `teamsEnabled` has to be specified. TeamsEnabled pulumi.BoolPtrOutput `pulumi:"teamsEnabled"` // The ID of the Tenant that this Office 365 Data Connector connects to. Changing this forces a new Office 365 Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewDataConnectorOffice365 registers a new resource with the given unique name, arguments, and options. func NewDataConnectorOffice365(ctx *pulumi.Context, name string, args *DataConnectorOffice365Args, opts ...pulumi.ResourceOption) (*DataConnectorOffice365, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorOffice365 err := ctx.RegisterResource("azure:sentinel/dataConnectorOffice365:DataConnectorOffice365", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorOffice365 gets an existing DataConnectorOffice365 resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorOffice365(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorOffice365State, opts ...pulumi.ResourceOption) (*DataConnectorOffice365, error) { var resource DataConnectorOffice365 err := ctx.ReadResource("azure:sentinel/dataConnectorOffice365:DataConnectorOffice365", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorOffice365 resources. type dataConnectorOffice365State struct { // Should the Exchange data connector be enabled? Defaults to `true`. ExchangeEnabled *bool `pulumi:"exchangeEnabled"` // The ID of the Log Analytics Workspace that this Office 365 Data Connector resides in. Changing this forces a new Office 365 Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Office 365 Data Connector. Changing this forces a new Office 365 Data Connector to be created. Name *string `pulumi:"name"` // Should the SharePoint data connector be enabled? Defaults to `true`. SharepointEnabled *bool `pulumi:"sharepointEnabled"` // Should the Microsoft Teams data connector be enabled? Defaults to `true`. // // > **Note:** At least one of `exchangeEnabled`, `sharedpointEnabled` and `teamsEnabled` has to be specified. TeamsEnabled *bool `pulumi:"teamsEnabled"` // The ID of the Tenant that this Office 365 Data Connector connects to. Changing this forces a new Office 365 Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } type DataConnectorOffice365State struct { // Should the Exchange data connector be enabled? Defaults to `true`. ExchangeEnabled pulumi.BoolPtrInput // The ID of the Log Analytics Workspace that this Office 365 Data Connector resides in. Changing this forces a new Office 365 Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Office 365 Data Connector. Changing this forces a new Office 365 Data Connector to be created. Name pulumi.StringPtrInput // Should the SharePoint data connector be enabled? Defaults to `true`. SharepointEnabled pulumi.BoolPtrInput // Should the Microsoft Teams data connector be enabled? Defaults to `true`. // // > **Note:** At least one of `exchangeEnabled`, `sharedpointEnabled` and `teamsEnabled` has to be specified. TeamsEnabled pulumi.BoolPtrInput // The ID of the Tenant that this Office 365 Data Connector connects to. Changing this forces a new Office 365 Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorOffice365State) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorOffice365State)(nil)).Elem() } type dataConnectorOffice365Args struct { // Should the Exchange data connector be enabled? Defaults to `true`. ExchangeEnabled *bool `pulumi:"exchangeEnabled"` // The ID of the Log Analytics Workspace that this Office 365 Data Connector resides in. Changing this forces a new Office 365 Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Office 365 Data Connector. Changing this forces a new Office 365 Data Connector to be created. Name *string `pulumi:"name"` // Should the SharePoint data connector be enabled? Defaults to `true`. SharepointEnabled *bool `pulumi:"sharepointEnabled"` // Should the Microsoft Teams data connector be enabled? Defaults to `true`. // // > **Note:** At least one of `exchangeEnabled`, `sharedpointEnabled` and `teamsEnabled` has to be specified. TeamsEnabled *bool `pulumi:"teamsEnabled"` // The ID of the Tenant that this Office 365 Data Connector connects to. Changing this forces a new Office 365 Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } // The set of arguments for constructing a DataConnectorOffice365 resource. type DataConnectorOffice365Args struct { // Should the Exchange data connector be enabled? Defaults to `true`. ExchangeEnabled pulumi.BoolPtrInput // The ID of the Log Analytics Workspace that this Office 365 Data Connector resides in. Changing this forces a new Office 365 Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Office 365 Data Connector. Changing this forces a new Office 365 Data Connector to be created. Name pulumi.StringPtrInput // Should the SharePoint data connector be enabled? Defaults to `true`. SharepointEnabled pulumi.BoolPtrInput // Should the Microsoft Teams data connector be enabled? Defaults to `true`. // // > **Note:** At least one of `exchangeEnabled`, `sharedpointEnabled` and `teamsEnabled` has to be specified. TeamsEnabled pulumi.BoolPtrInput // The ID of the Tenant that this Office 365 Data Connector connects to. Changing this forces a new Office 365 Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorOffice365Args) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorOffice365Args)(nil)).Elem() } type DataConnectorOffice365Input interface { pulumi.Input ToDataConnectorOffice365Output() DataConnectorOffice365Output ToDataConnectorOffice365OutputWithContext(ctx context.Context) DataConnectorOffice365Output } func (*DataConnectorOffice365) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorOffice365)(nil)).Elem() } func (i *DataConnectorOffice365) ToDataConnectorOffice365Output() DataConnectorOffice365Output { return i.ToDataConnectorOffice365OutputWithContext(context.Background()) } func (i *DataConnectorOffice365) ToDataConnectorOffice365OutputWithContext(ctx context.Context) DataConnectorOffice365Output { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorOffice365Output) } // DataConnectorOffice365ArrayInput is an input type that accepts DataConnectorOffice365Array and DataConnectorOffice365ArrayOutput values. // You can construct a concrete instance of `DataConnectorOffice365ArrayInput` via: // // DataConnectorOffice365Array{ DataConnectorOffice365Args{...} } type DataConnectorOffice365ArrayInput interface { pulumi.Input ToDataConnectorOffice365ArrayOutput() DataConnectorOffice365ArrayOutput ToDataConnectorOffice365ArrayOutputWithContext(context.Context) DataConnectorOffice365ArrayOutput } type DataConnectorOffice365Array []DataConnectorOffice365Input func (DataConnectorOffice365Array) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorOffice365)(nil)).Elem() } func (i DataConnectorOffice365Array) ToDataConnectorOffice365ArrayOutput() DataConnectorOffice365ArrayOutput { return i.ToDataConnectorOffice365ArrayOutputWithContext(context.Background()) } func (i DataConnectorOffice365Array) ToDataConnectorOffice365ArrayOutputWithContext(ctx context.Context) DataConnectorOffice365ArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorOffice365ArrayOutput) } // DataConnectorOffice365MapInput is an input type that accepts DataConnectorOffice365Map and DataConnectorOffice365MapOutput values. // You can construct a concrete instance of `DataConnectorOffice365MapInput` via: // // DataConnectorOffice365Map{ "key": DataConnectorOffice365Args{...} } type DataConnectorOffice365MapInput interface { pulumi.Input ToDataConnectorOffice365MapOutput() DataConnectorOffice365MapOutput ToDataConnectorOffice365MapOutputWithContext(context.Context) DataConnectorOffice365MapOutput } type DataConnectorOffice365Map map[string]DataConnectorOffice365Input func (DataConnectorOffice365Map) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorOffice365)(nil)).Elem() } func (i DataConnectorOffice365Map) ToDataConnectorOffice365MapOutput() DataConnectorOffice365MapOutput { return i.ToDataConnectorOffice365MapOutputWithContext(context.Background()) } func (i DataConnectorOffice365Map) ToDataConnectorOffice365MapOutputWithContext(ctx context.Context) DataConnectorOffice365MapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorOffice365MapOutput) } type DataConnectorOffice365Output struct{ *pulumi.OutputState } func (DataConnectorOffice365Output) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorOffice365)(nil)).Elem() } func (o DataConnectorOffice365Output) ToDataConnectorOffice365Output() DataConnectorOffice365Output { return o } func (o DataConnectorOffice365Output) ToDataConnectorOffice365OutputWithContext(ctx context.Context) DataConnectorOffice365Output { return o } // Should the Exchange data connector be enabled? Defaults to `true`. func (o DataConnectorOffice365Output) ExchangeEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *DataConnectorOffice365) pulumi.BoolPtrOutput { return v.ExchangeEnabled }).(pulumi.BoolPtrOutput) } // The ID of the Log Analytics Workspace that this Office 365 Data Connector resides in. Changing this forces a new Office 365 Data Connector to be created. func (o DataConnectorOffice365Output) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorOffice365) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Office 365 Data Connector. Changing this forces a new Office 365 Data Connector to be created. func (o DataConnectorOffice365Output) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorOffice365) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Should the SharePoint data connector be enabled? Defaults to `true`. func (o DataConnectorOffice365Output) SharepointEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *DataConnectorOffice365) pulumi.BoolPtrOutput { return v.SharepointEnabled }).(pulumi.BoolPtrOutput) } // Should the Microsoft Teams data connector be enabled? Defaults to `true`. // // > **Note:** At least one of `exchangeEnabled`, `sharedpointEnabled` and `teamsEnabled` has to be specified. func (o DataConnectorOffice365Output) TeamsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *DataConnectorOffice365) pulumi.BoolPtrOutput { return v.TeamsEnabled }).(pulumi.BoolPtrOutput) } // The ID of the Tenant that this Office 365 Data Connector connects to. Changing this forces a new Office 365 Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. func (o DataConnectorOffice365Output) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorOffice365) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type DataConnectorOffice365ArrayOutput struct{ *pulumi.OutputState } func (DataConnectorOffice365ArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorOffice365)(nil)).Elem() } func (o DataConnectorOffice365ArrayOutput) ToDataConnectorOffice365ArrayOutput() DataConnectorOffice365ArrayOutput { return o } func (o DataConnectorOffice365ArrayOutput) ToDataConnectorOffice365ArrayOutputWithContext(ctx context.Context) DataConnectorOffice365ArrayOutput { return o } func (o DataConnectorOffice365ArrayOutput) Index(i pulumi.IntInput) DataConnectorOffice365Output { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorOffice365 { return vs[0].([]*DataConnectorOffice365)[vs[1].(int)] }).(DataConnectorOffice365Output) } type DataConnectorOffice365MapOutput struct{ *pulumi.OutputState } func (DataConnectorOffice365MapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorOffice365)(nil)).Elem() } func (o DataConnectorOffice365MapOutput) ToDataConnectorOffice365MapOutput() DataConnectorOffice365MapOutput { return o } func (o DataConnectorOffice365MapOutput) ToDataConnectorOffice365MapOutputWithContext(ctx context.Context) DataConnectorOffice365MapOutput { return o } func (o DataConnectorOffice365MapOutput) MapIndex(k pulumi.StringInput) DataConnectorOffice365Output { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorOffice365 { return vs[0].(map[string]*DataConnectorOffice365)[vs[1].(string)] }).(DataConnectorOffice365Output) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorOffice365Input)(nil)).Elem(), &DataConnectorOffice365{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorOffice365ArrayInput)(nil)).Elem(), DataConnectorOffice365Array{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorOffice365MapInput)(nil)).Elem(), DataConnectorOffice365Map{}) pulumi.RegisterOutputType(DataConnectorOffice365Output{}) pulumi.RegisterOutputType(DataConnectorOffice365ArrayOutput{}) pulumi.RegisterOutputType(DataConnectorOffice365MapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/sentinel/dataConnectorAzureAdvancedThreadProtection.go
sdk/go/azure/sentinel/dataConnectorAzureAdvancedThreadProtection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package sentinel import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Azure Advanced Threat Protection Data Connector. // // !> **Note:** This resource requires that [Enterprise Mobility + Security E5](https://www.microsoft.com/en-us/microsoft-365/enterprise-mobility-security) is enabled on the tenant being connected to. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/sentinel" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("west europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("example-workspace"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // }) // if err != nil { // return err // } // exampleLogAnalyticsWorkspaceOnboarding, err := sentinel.NewLogAnalyticsWorkspaceOnboarding(ctx, "example", &sentinel.LogAnalyticsWorkspaceOnboardingArgs{ // WorkspaceId: exampleAnalyticsWorkspace.ID(), // }) // if err != nil { // return err // } // _, err = sentinel.NewDataConnectorAzureAdvancedThreadProtection(ctx, "example", &sentinel.DataConnectorAzureAdvancedThreadProtectionArgs{ // Name: pulumi.String("example"), // LogAnalyticsWorkspaceId: exampleLogAnalyticsWorkspaceOnboarding.WorkspaceId, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Azure Advanced Threat Protection Data Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:sentinel/dataConnectorAzureAdvancedThreadProtection:DataConnectorAzureAdvancedThreadProtection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/dataConnectors/dc1 // ``` type DataConnectorAzureAdvancedThreadProtection struct { pulumi.CustomResourceState // The ID of the Log Analytics Workspace that this Azure Advanced Threat Protection Data Connector resides in. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Azure Advanced Threat Protection Data Connector. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the tenant that this Azure Advanced Threat Protection Data Connector connects to. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewDataConnectorAzureAdvancedThreadProtection registers a new resource with the given unique name, arguments, and options. func NewDataConnectorAzureAdvancedThreadProtection(ctx *pulumi.Context, name string, args *DataConnectorAzureAdvancedThreadProtectionArgs, opts ...pulumi.ResourceOption) (*DataConnectorAzureAdvancedThreadProtection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LogAnalyticsWorkspaceId == nil { return nil, errors.New("invalid value for required argument 'LogAnalyticsWorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataConnectorAzureAdvancedThreadProtection err := ctx.RegisterResource("azure:sentinel/dataConnectorAzureAdvancedThreadProtection:DataConnectorAzureAdvancedThreadProtection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataConnectorAzureAdvancedThreadProtection gets an existing DataConnectorAzureAdvancedThreadProtection resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDataConnectorAzureAdvancedThreadProtection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataConnectorAzureAdvancedThreadProtectionState, opts ...pulumi.ResourceOption) (*DataConnectorAzureAdvancedThreadProtection, error) { var resource DataConnectorAzureAdvancedThreadProtection err := ctx.ReadResource("azure:sentinel/dataConnectorAzureAdvancedThreadProtection:DataConnectorAzureAdvancedThreadProtection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataConnectorAzureAdvancedThreadProtection resources. type dataConnectorAzureAdvancedThreadProtectionState struct { // The ID of the Log Analytics Workspace that this Azure Advanced Threat Protection Data Connector resides in. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Azure Advanced Threat Protection Data Connector. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Azure Advanced Threat Protection Data Connector connects to. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } type DataConnectorAzureAdvancedThreadProtectionState struct { // The ID of the Log Analytics Workspace that this Azure Advanced Threat Protection Data Connector resides in. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Azure Advanced Threat Protection Data Connector. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Azure Advanced Threat Protection Data Connector connects to. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorAzureAdvancedThreadProtectionState) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorAzureAdvancedThreadProtectionState)(nil)).Elem() } type dataConnectorAzureAdvancedThreadProtectionArgs struct { // The ID of the Log Analytics Workspace that this Azure Advanced Threat Protection Data Connector resides in. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. LogAnalyticsWorkspaceId string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Azure Advanced Threat Protection Data Connector. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. Name *string `pulumi:"name"` // The ID of the tenant that this Azure Advanced Threat Protection Data Connector connects to. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId *string `pulumi:"tenantId"` } // The set of arguments for constructing a DataConnectorAzureAdvancedThreadProtection resource. type DataConnectorAzureAdvancedThreadProtectionArgs struct { // The ID of the Log Analytics Workspace that this Azure Advanced Threat Protection Data Connector resides in. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. LogAnalyticsWorkspaceId pulumi.StringInput // The name which should be used for this Azure Advanced Threat Protection Data Connector. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. Name pulumi.StringPtrInput // The ID of the tenant that this Azure Advanced Threat Protection Data Connector connects to. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. TenantId pulumi.StringPtrInput } func (DataConnectorAzureAdvancedThreadProtectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataConnectorAzureAdvancedThreadProtectionArgs)(nil)).Elem() } type DataConnectorAzureAdvancedThreadProtectionInput interface { pulumi.Input ToDataConnectorAzureAdvancedThreadProtectionOutput() DataConnectorAzureAdvancedThreadProtectionOutput ToDataConnectorAzureAdvancedThreadProtectionOutputWithContext(ctx context.Context) DataConnectorAzureAdvancedThreadProtectionOutput } func (*DataConnectorAzureAdvancedThreadProtection) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorAzureAdvancedThreadProtection)(nil)).Elem() } func (i *DataConnectorAzureAdvancedThreadProtection) ToDataConnectorAzureAdvancedThreadProtectionOutput() DataConnectorAzureAdvancedThreadProtectionOutput { return i.ToDataConnectorAzureAdvancedThreadProtectionOutputWithContext(context.Background()) } func (i *DataConnectorAzureAdvancedThreadProtection) ToDataConnectorAzureAdvancedThreadProtectionOutputWithContext(ctx context.Context) DataConnectorAzureAdvancedThreadProtectionOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorAzureAdvancedThreadProtectionOutput) } // DataConnectorAzureAdvancedThreadProtectionArrayInput is an input type that accepts DataConnectorAzureAdvancedThreadProtectionArray and DataConnectorAzureAdvancedThreadProtectionArrayOutput values. // You can construct a concrete instance of `DataConnectorAzureAdvancedThreadProtectionArrayInput` via: // // DataConnectorAzureAdvancedThreadProtectionArray{ DataConnectorAzureAdvancedThreadProtectionArgs{...} } type DataConnectorAzureAdvancedThreadProtectionArrayInput interface { pulumi.Input ToDataConnectorAzureAdvancedThreadProtectionArrayOutput() DataConnectorAzureAdvancedThreadProtectionArrayOutput ToDataConnectorAzureAdvancedThreadProtectionArrayOutputWithContext(context.Context) DataConnectorAzureAdvancedThreadProtectionArrayOutput } type DataConnectorAzureAdvancedThreadProtectionArray []DataConnectorAzureAdvancedThreadProtectionInput func (DataConnectorAzureAdvancedThreadProtectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorAzureAdvancedThreadProtection)(nil)).Elem() } func (i DataConnectorAzureAdvancedThreadProtectionArray) ToDataConnectorAzureAdvancedThreadProtectionArrayOutput() DataConnectorAzureAdvancedThreadProtectionArrayOutput { return i.ToDataConnectorAzureAdvancedThreadProtectionArrayOutputWithContext(context.Background()) } func (i DataConnectorAzureAdvancedThreadProtectionArray) ToDataConnectorAzureAdvancedThreadProtectionArrayOutputWithContext(ctx context.Context) DataConnectorAzureAdvancedThreadProtectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorAzureAdvancedThreadProtectionArrayOutput) } // DataConnectorAzureAdvancedThreadProtectionMapInput is an input type that accepts DataConnectorAzureAdvancedThreadProtectionMap and DataConnectorAzureAdvancedThreadProtectionMapOutput values. // You can construct a concrete instance of `DataConnectorAzureAdvancedThreadProtectionMapInput` via: // // DataConnectorAzureAdvancedThreadProtectionMap{ "key": DataConnectorAzureAdvancedThreadProtectionArgs{...} } type DataConnectorAzureAdvancedThreadProtectionMapInput interface { pulumi.Input ToDataConnectorAzureAdvancedThreadProtectionMapOutput() DataConnectorAzureAdvancedThreadProtectionMapOutput ToDataConnectorAzureAdvancedThreadProtectionMapOutputWithContext(context.Context) DataConnectorAzureAdvancedThreadProtectionMapOutput } type DataConnectorAzureAdvancedThreadProtectionMap map[string]DataConnectorAzureAdvancedThreadProtectionInput func (DataConnectorAzureAdvancedThreadProtectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorAzureAdvancedThreadProtection)(nil)).Elem() } func (i DataConnectorAzureAdvancedThreadProtectionMap) ToDataConnectorAzureAdvancedThreadProtectionMapOutput() DataConnectorAzureAdvancedThreadProtectionMapOutput { return i.ToDataConnectorAzureAdvancedThreadProtectionMapOutputWithContext(context.Background()) } func (i DataConnectorAzureAdvancedThreadProtectionMap) ToDataConnectorAzureAdvancedThreadProtectionMapOutputWithContext(ctx context.Context) DataConnectorAzureAdvancedThreadProtectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataConnectorAzureAdvancedThreadProtectionMapOutput) } type DataConnectorAzureAdvancedThreadProtectionOutput struct{ *pulumi.OutputState } func (DataConnectorAzureAdvancedThreadProtectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataConnectorAzureAdvancedThreadProtection)(nil)).Elem() } func (o DataConnectorAzureAdvancedThreadProtectionOutput) ToDataConnectorAzureAdvancedThreadProtectionOutput() DataConnectorAzureAdvancedThreadProtectionOutput { return o } func (o DataConnectorAzureAdvancedThreadProtectionOutput) ToDataConnectorAzureAdvancedThreadProtectionOutputWithContext(ctx context.Context) DataConnectorAzureAdvancedThreadProtectionOutput { return o } // The ID of the Log Analytics Workspace that this Azure Advanced Threat Protection Data Connector resides in. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. func (o DataConnectorAzureAdvancedThreadProtectionOutput) LogAnalyticsWorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAzureAdvancedThreadProtection) pulumi.StringOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringOutput) } // The name which should be used for this Azure Advanced Threat Protection Data Connector. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. func (o DataConnectorAzureAdvancedThreadProtectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAzureAdvancedThreadProtection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the tenant that this Azure Advanced Threat Protection Data Connector connects to. Changing this forces a new Azure Advanced Threat Protection Data Connector to be created. // // > **Note:** Currently, only the same tenant as the running account is allowed. Cross-tenant scenario is not supported yet. func (o DataConnectorAzureAdvancedThreadProtectionOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *DataConnectorAzureAdvancedThreadProtection) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type DataConnectorAzureAdvancedThreadProtectionArrayOutput struct{ *pulumi.OutputState } func (DataConnectorAzureAdvancedThreadProtectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataConnectorAzureAdvancedThreadProtection)(nil)).Elem() } func (o DataConnectorAzureAdvancedThreadProtectionArrayOutput) ToDataConnectorAzureAdvancedThreadProtectionArrayOutput() DataConnectorAzureAdvancedThreadProtectionArrayOutput { return o } func (o DataConnectorAzureAdvancedThreadProtectionArrayOutput) ToDataConnectorAzureAdvancedThreadProtectionArrayOutputWithContext(ctx context.Context) DataConnectorAzureAdvancedThreadProtectionArrayOutput { return o } func (o DataConnectorAzureAdvancedThreadProtectionArrayOutput) Index(i pulumi.IntInput) DataConnectorAzureAdvancedThreadProtectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataConnectorAzureAdvancedThreadProtection { return vs[0].([]*DataConnectorAzureAdvancedThreadProtection)[vs[1].(int)] }).(DataConnectorAzureAdvancedThreadProtectionOutput) } type DataConnectorAzureAdvancedThreadProtectionMapOutput struct{ *pulumi.OutputState } func (DataConnectorAzureAdvancedThreadProtectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataConnectorAzureAdvancedThreadProtection)(nil)).Elem() } func (o DataConnectorAzureAdvancedThreadProtectionMapOutput) ToDataConnectorAzureAdvancedThreadProtectionMapOutput() DataConnectorAzureAdvancedThreadProtectionMapOutput { return o } func (o DataConnectorAzureAdvancedThreadProtectionMapOutput) ToDataConnectorAzureAdvancedThreadProtectionMapOutputWithContext(ctx context.Context) DataConnectorAzureAdvancedThreadProtectionMapOutput { return o } func (o DataConnectorAzureAdvancedThreadProtectionMapOutput) MapIndex(k pulumi.StringInput) DataConnectorAzureAdvancedThreadProtectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataConnectorAzureAdvancedThreadProtection { return vs[0].(map[string]*DataConnectorAzureAdvancedThreadProtection)[vs[1].(string)] }).(DataConnectorAzureAdvancedThreadProtectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorAzureAdvancedThreadProtectionInput)(nil)).Elem(), &DataConnectorAzureAdvancedThreadProtection{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorAzureAdvancedThreadProtectionArrayInput)(nil)).Elem(), DataConnectorAzureAdvancedThreadProtectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataConnectorAzureAdvancedThreadProtectionMapInput)(nil)).Elem(), DataConnectorAzureAdvancedThreadProtectionMap{}) pulumi.RegisterOutputType(DataConnectorAzureAdvancedThreadProtectionOutput{}) pulumi.RegisterOutputType(DataConnectorAzureAdvancedThreadProtectionArrayOutput{}) pulumi.RegisterOutputType(DataConnectorAzureAdvancedThreadProtectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loadtest/init.go
sdk/go/azure/loadtest/init.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package loadtest import ( "fmt" "github.com/blang/semver" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type module struct { version semver.Version } func (m *module) Version() semver.Version { return m.version } func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { case "azure:loadtest/loadTest:LoadTest": r = &LoadTest{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) return } func init() { version, err := internal.PkgVersion() if err != nil { version = semver.Version{Major: 1} } pulumi.RegisterResourceModule( "azure", "loadtest/loadTest", &module{version}, ) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loadtest/pulumiTypes.go
sdk/go/azure/loadtest/pulumiTypes.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package loadtest import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) var _ = internal.GetEnvOrDefault type LoadTestEncryption struct { // An `identity` block as defined below. Changing this forces a new Load Test to be created. Identity LoadTestEncryptionIdentity `pulumi:"identity"` // The URI specifying the Key vault and key to be used to encrypt data in this resource. The URI should include the key version. Changing this forces a new Load Test to be created. KeyUrl string `pulumi:"keyUrl"` } // LoadTestEncryptionInput is an input type that accepts LoadTestEncryptionArgs and LoadTestEncryptionOutput values. // You can construct a concrete instance of `LoadTestEncryptionInput` via: // // LoadTestEncryptionArgs{...} type LoadTestEncryptionInput interface { pulumi.Input ToLoadTestEncryptionOutput() LoadTestEncryptionOutput ToLoadTestEncryptionOutputWithContext(context.Context) LoadTestEncryptionOutput } type LoadTestEncryptionArgs struct { // An `identity` block as defined below. Changing this forces a new Load Test to be created. Identity LoadTestEncryptionIdentityInput `pulumi:"identity"` // The URI specifying the Key vault and key to be used to encrypt data in this resource. The URI should include the key version. Changing this forces a new Load Test to be created. KeyUrl pulumi.StringInput `pulumi:"keyUrl"` } func (LoadTestEncryptionArgs) ElementType() reflect.Type { return reflect.TypeOf((*LoadTestEncryption)(nil)).Elem() } func (i LoadTestEncryptionArgs) ToLoadTestEncryptionOutput() LoadTestEncryptionOutput { return i.ToLoadTestEncryptionOutputWithContext(context.Background()) } func (i LoadTestEncryptionArgs) ToLoadTestEncryptionOutputWithContext(ctx context.Context) LoadTestEncryptionOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadTestEncryptionOutput) } func (i LoadTestEncryptionArgs) ToLoadTestEncryptionPtrOutput() LoadTestEncryptionPtrOutput { return i.ToLoadTestEncryptionPtrOutputWithContext(context.Background()) } func (i LoadTestEncryptionArgs) ToLoadTestEncryptionPtrOutputWithContext(ctx context.Context) LoadTestEncryptionPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadTestEncryptionOutput).ToLoadTestEncryptionPtrOutputWithContext(ctx) } // LoadTestEncryptionPtrInput is an input type that accepts LoadTestEncryptionArgs, LoadTestEncryptionPtr and LoadTestEncryptionPtrOutput values. // You can construct a concrete instance of `LoadTestEncryptionPtrInput` via: // // LoadTestEncryptionArgs{...} // // or: // // nil type LoadTestEncryptionPtrInput interface { pulumi.Input ToLoadTestEncryptionPtrOutput() LoadTestEncryptionPtrOutput ToLoadTestEncryptionPtrOutputWithContext(context.Context) LoadTestEncryptionPtrOutput } type loadTestEncryptionPtrType LoadTestEncryptionArgs func LoadTestEncryptionPtr(v *LoadTestEncryptionArgs) LoadTestEncryptionPtrInput { return (*loadTestEncryptionPtrType)(v) } func (*loadTestEncryptionPtrType) ElementType() reflect.Type { return reflect.TypeOf((**LoadTestEncryption)(nil)).Elem() } func (i *loadTestEncryptionPtrType) ToLoadTestEncryptionPtrOutput() LoadTestEncryptionPtrOutput { return i.ToLoadTestEncryptionPtrOutputWithContext(context.Background()) } func (i *loadTestEncryptionPtrType) ToLoadTestEncryptionPtrOutputWithContext(ctx context.Context) LoadTestEncryptionPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadTestEncryptionPtrOutput) } type LoadTestEncryptionOutput struct{ *pulumi.OutputState } func (LoadTestEncryptionOutput) ElementType() reflect.Type { return reflect.TypeOf((*LoadTestEncryption)(nil)).Elem() } func (o LoadTestEncryptionOutput) ToLoadTestEncryptionOutput() LoadTestEncryptionOutput { return o } func (o LoadTestEncryptionOutput) ToLoadTestEncryptionOutputWithContext(ctx context.Context) LoadTestEncryptionOutput { return o } func (o LoadTestEncryptionOutput) ToLoadTestEncryptionPtrOutput() LoadTestEncryptionPtrOutput { return o.ToLoadTestEncryptionPtrOutputWithContext(context.Background()) } func (o LoadTestEncryptionOutput) ToLoadTestEncryptionPtrOutputWithContext(ctx context.Context) LoadTestEncryptionPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v LoadTestEncryption) *LoadTestEncryption { return &v }).(LoadTestEncryptionPtrOutput) } // An `identity` block as defined below. Changing this forces a new Load Test to be created. func (o LoadTestEncryptionOutput) Identity() LoadTestEncryptionIdentityOutput { return o.ApplyT(func(v LoadTestEncryption) LoadTestEncryptionIdentity { return v.Identity }).(LoadTestEncryptionIdentityOutput) } // The URI specifying the Key vault and key to be used to encrypt data in this resource. The URI should include the key version. Changing this forces a new Load Test to be created. func (o LoadTestEncryptionOutput) KeyUrl() pulumi.StringOutput { return o.ApplyT(func(v LoadTestEncryption) string { return v.KeyUrl }).(pulumi.StringOutput) } type LoadTestEncryptionPtrOutput struct{ *pulumi.OutputState } func (LoadTestEncryptionPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**LoadTestEncryption)(nil)).Elem() } func (o LoadTestEncryptionPtrOutput) ToLoadTestEncryptionPtrOutput() LoadTestEncryptionPtrOutput { return o } func (o LoadTestEncryptionPtrOutput) ToLoadTestEncryptionPtrOutputWithContext(ctx context.Context) LoadTestEncryptionPtrOutput { return o } func (o LoadTestEncryptionPtrOutput) Elem() LoadTestEncryptionOutput { return o.ApplyT(func(v *LoadTestEncryption) LoadTestEncryption { if v != nil { return *v } var ret LoadTestEncryption return ret }).(LoadTestEncryptionOutput) } // An `identity` block as defined below. Changing this forces a new Load Test to be created. func (o LoadTestEncryptionPtrOutput) Identity() LoadTestEncryptionIdentityPtrOutput { return o.ApplyT(func(v *LoadTestEncryption) *LoadTestEncryptionIdentity { if v == nil { return nil } return &v.Identity }).(LoadTestEncryptionIdentityPtrOutput) } // The URI specifying the Key vault and key to be used to encrypt data in this resource. The URI should include the key version. Changing this forces a new Load Test to be created. func (o LoadTestEncryptionPtrOutput) KeyUrl() pulumi.StringPtrOutput { return o.ApplyT(func(v *LoadTestEncryption) *string { if v == nil { return nil } return &v.KeyUrl }).(pulumi.StringPtrOutput) } type LoadTestEncryptionIdentity struct { // The User Assigned Identity ID that should be assigned to this Load Test Encryption. Changing this forces a new Load Test to be created. // // > **Note:** The User Assigned Identity ID specified here must also exist in `identity.identity_ids`. IdentityId string `pulumi:"identityId"` // Specifies the type of Managed Identity that should be assigned to this Load Test Encryption. Possible values are `SystemAssigned` or `UserAssigned`. Changing this forces a new Load Test to be created. Type string `pulumi:"type"` } // LoadTestEncryptionIdentityInput is an input type that accepts LoadTestEncryptionIdentityArgs and LoadTestEncryptionIdentityOutput values. // You can construct a concrete instance of `LoadTestEncryptionIdentityInput` via: // // LoadTestEncryptionIdentityArgs{...} type LoadTestEncryptionIdentityInput interface { pulumi.Input ToLoadTestEncryptionIdentityOutput() LoadTestEncryptionIdentityOutput ToLoadTestEncryptionIdentityOutputWithContext(context.Context) LoadTestEncryptionIdentityOutput } type LoadTestEncryptionIdentityArgs struct { // The User Assigned Identity ID that should be assigned to this Load Test Encryption. Changing this forces a new Load Test to be created. // // > **Note:** The User Assigned Identity ID specified here must also exist in `identity.identity_ids`. IdentityId pulumi.StringInput `pulumi:"identityId"` // Specifies the type of Managed Identity that should be assigned to this Load Test Encryption. Possible values are `SystemAssigned` or `UserAssigned`. Changing this forces a new Load Test to be created. Type pulumi.StringInput `pulumi:"type"` } func (LoadTestEncryptionIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*LoadTestEncryptionIdentity)(nil)).Elem() } func (i LoadTestEncryptionIdentityArgs) ToLoadTestEncryptionIdentityOutput() LoadTestEncryptionIdentityOutput { return i.ToLoadTestEncryptionIdentityOutputWithContext(context.Background()) } func (i LoadTestEncryptionIdentityArgs) ToLoadTestEncryptionIdentityOutputWithContext(ctx context.Context) LoadTestEncryptionIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadTestEncryptionIdentityOutput) } func (i LoadTestEncryptionIdentityArgs) ToLoadTestEncryptionIdentityPtrOutput() LoadTestEncryptionIdentityPtrOutput { return i.ToLoadTestEncryptionIdentityPtrOutputWithContext(context.Background()) } func (i LoadTestEncryptionIdentityArgs) ToLoadTestEncryptionIdentityPtrOutputWithContext(ctx context.Context) LoadTestEncryptionIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadTestEncryptionIdentityOutput).ToLoadTestEncryptionIdentityPtrOutputWithContext(ctx) } // LoadTestEncryptionIdentityPtrInput is an input type that accepts LoadTestEncryptionIdentityArgs, LoadTestEncryptionIdentityPtr and LoadTestEncryptionIdentityPtrOutput values. // You can construct a concrete instance of `LoadTestEncryptionIdentityPtrInput` via: // // LoadTestEncryptionIdentityArgs{...} // // or: // // nil type LoadTestEncryptionIdentityPtrInput interface { pulumi.Input ToLoadTestEncryptionIdentityPtrOutput() LoadTestEncryptionIdentityPtrOutput ToLoadTestEncryptionIdentityPtrOutputWithContext(context.Context) LoadTestEncryptionIdentityPtrOutput } type loadTestEncryptionIdentityPtrType LoadTestEncryptionIdentityArgs func LoadTestEncryptionIdentityPtr(v *LoadTestEncryptionIdentityArgs) LoadTestEncryptionIdentityPtrInput { return (*loadTestEncryptionIdentityPtrType)(v) } func (*loadTestEncryptionIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**LoadTestEncryptionIdentity)(nil)).Elem() } func (i *loadTestEncryptionIdentityPtrType) ToLoadTestEncryptionIdentityPtrOutput() LoadTestEncryptionIdentityPtrOutput { return i.ToLoadTestEncryptionIdentityPtrOutputWithContext(context.Background()) } func (i *loadTestEncryptionIdentityPtrType) ToLoadTestEncryptionIdentityPtrOutputWithContext(ctx context.Context) LoadTestEncryptionIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadTestEncryptionIdentityPtrOutput) } type LoadTestEncryptionIdentityOutput struct{ *pulumi.OutputState } func (LoadTestEncryptionIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*LoadTestEncryptionIdentity)(nil)).Elem() } func (o LoadTestEncryptionIdentityOutput) ToLoadTestEncryptionIdentityOutput() LoadTestEncryptionIdentityOutput { return o } func (o LoadTestEncryptionIdentityOutput) ToLoadTestEncryptionIdentityOutputWithContext(ctx context.Context) LoadTestEncryptionIdentityOutput { return o } func (o LoadTestEncryptionIdentityOutput) ToLoadTestEncryptionIdentityPtrOutput() LoadTestEncryptionIdentityPtrOutput { return o.ToLoadTestEncryptionIdentityPtrOutputWithContext(context.Background()) } func (o LoadTestEncryptionIdentityOutput) ToLoadTestEncryptionIdentityPtrOutputWithContext(ctx context.Context) LoadTestEncryptionIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v LoadTestEncryptionIdentity) *LoadTestEncryptionIdentity { return &v }).(LoadTestEncryptionIdentityPtrOutput) } // The User Assigned Identity ID that should be assigned to this Load Test Encryption. Changing this forces a new Load Test to be created. // // > **Note:** The User Assigned Identity ID specified here must also exist in `identity.identity_ids`. func (o LoadTestEncryptionIdentityOutput) IdentityId() pulumi.StringOutput { return o.ApplyT(func(v LoadTestEncryptionIdentity) string { return v.IdentityId }).(pulumi.StringOutput) } // Specifies the type of Managed Identity that should be assigned to this Load Test Encryption. Possible values are `SystemAssigned` or `UserAssigned`. Changing this forces a new Load Test to be created. func (o LoadTestEncryptionIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v LoadTestEncryptionIdentity) string { return v.Type }).(pulumi.StringOutput) } type LoadTestEncryptionIdentityPtrOutput struct{ *pulumi.OutputState } func (LoadTestEncryptionIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**LoadTestEncryptionIdentity)(nil)).Elem() } func (o LoadTestEncryptionIdentityPtrOutput) ToLoadTestEncryptionIdentityPtrOutput() LoadTestEncryptionIdentityPtrOutput { return o } func (o LoadTestEncryptionIdentityPtrOutput) ToLoadTestEncryptionIdentityPtrOutputWithContext(ctx context.Context) LoadTestEncryptionIdentityPtrOutput { return o } func (o LoadTestEncryptionIdentityPtrOutput) Elem() LoadTestEncryptionIdentityOutput { return o.ApplyT(func(v *LoadTestEncryptionIdentity) LoadTestEncryptionIdentity { if v != nil { return *v } var ret LoadTestEncryptionIdentity return ret }).(LoadTestEncryptionIdentityOutput) } // The User Assigned Identity ID that should be assigned to this Load Test Encryption. Changing this forces a new Load Test to be created. // // > **Note:** The User Assigned Identity ID specified here must also exist in `identity.identity_ids`. func (o LoadTestEncryptionIdentityPtrOutput) IdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v *LoadTestEncryptionIdentity) *string { if v == nil { return nil } return &v.IdentityId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Identity that should be assigned to this Load Test Encryption. Possible values are `SystemAssigned` or `UserAssigned`. Changing this forces a new Load Test to be created. func (o LoadTestEncryptionIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *LoadTestEncryptionIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type LoadTestIdentity struct { // A list of the User Assigned Identity IDs that should be assigned to this Load Test. IdentityIds []string `pulumi:"identityIds"` // The Principal ID for the System-Assigned Managed Identity assigned to this Load Test. PrincipalId *string `pulumi:"principalId"` // The Tenant ID for the System-Assigned Managed Identity assigned to this Load Test. TenantId *string `pulumi:"tenantId"` // Specifies the type of Managed Identity that should be assigned to this Load Test Encryption. Possible values are `SystemAssigned` or `UserAssigned`. Changing this forces a new Load Test to be created. Type string `pulumi:"type"` } // LoadTestIdentityInput is an input type that accepts LoadTestIdentityArgs and LoadTestIdentityOutput values. // You can construct a concrete instance of `LoadTestIdentityInput` via: // // LoadTestIdentityArgs{...} type LoadTestIdentityInput interface { pulumi.Input ToLoadTestIdentityOutput() LoadTestIdentityOutput ToLoadTestIdentityOutputWithContext(context.Context) LoadTestIdentityOutput } type LoadTestIdentityArgs struct { // A list of the User Assigned Identity IDs that should be assigned to this Load Test. IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"` // The Principal ID for the System-Assigned Managed Identity assigned to this Load Test. PrincipalId pulumi.StringPtrInput `pulumi:"principalId"` // The Tenant ID for the System-Assigned Managed Identity assigned to this Load Test. TenantId pulumi.StringPtrInput `pulumi:"tenantId"` // Specifies the type of Managed Identity that should be assigned to this Load Test Encryption. Possible values are `SystemAssigned` or `UserAssigned`. Changing this forces a new Load Test to be created. Type pulumi.StringInput `pulumi:"type"` } func (LoadTestIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*LoadTestIdentity)(nil)).Elem() } func (i LoadTestIdentityArgs) ToLoadTestIdentityOutput() LoadTestIdentityOutput { return i.ToLoadTestIdentityOutputWithContext(context.Background()) } func (i LoadTestIdentityArgs) ToLoadTestIdentityOutputWithContext(ctx context.Context) LoadTestIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadTestIdentityOutput) } func (i LoadTestIdentityArgs) ToLoadTestIdentityPtrOutput() LoadTestIdentityPtrOutput { return i.ToLoadTestIdentityPtrOutputWithContext(context.Background()) } func (i LoadTestIdentityArgs) ToLoadTestIdentityPtrOutputWithContext(ctx context.Context) LoadTestIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadTestIdentityOutput).ToLoadTestIdentityPtrOutputWithContext(ctx) } // LoadTestIdentityPtrInput is an input type that accepts LoadTestIdentityArgs, LoadTestIdentityPtr and LoadTestIdentityPtrOutput values. // You can construct a concrete instance of `LoadTestIdentityPtrInput` via: // // LoadTestIdentityArgs{...} // // or: // // nil type LoadTestIdentityPtrInput interface { pulumi.Input ToLoadTestIdentityPtrOutput() LoadTestIdentityPtrOutput ToLoadTestIdentityPtrOutputWithContext(context.Context) LoadTestIdentityPtrOutput } type loadTestIdentityPtrType LoadTestIdentityArgs func LoadTestIdentityPtr(v *LoadTestIdentityArgs) LoadTestIdentityPtrInput { return (*loadTestIdentityPtrType)(v) } func (*loadTestIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**LoadTestIdentity)(nil)).Elem() } func (i *loadTestIdentityPtrType) ToLoadTestIdentityPtrOutput() LoadTestIdentityPtrOutput { return i.ToLoadTestIdentityPtrOutputWithContext(context.Background()) } func (i *loadTestIdentityPtrType) ToLoadTestIdentityPtrOutputWithContext(ctx context.Context) LoadTestIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadTestIdentityPtrOutput) } type LoadTestIdentityOutput struct{ *pulumi.OutputState } func (LoadTestIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*LoadTestIdentity)(nil)).Elem() } func (o LoadTestIdentityOutput) ToLoadTestIdentityOutput() LoadTestIdentityOutput { return o } func (o LoadTestIdentityOutput) ToLoadTestIdentityOutputWithContext(ctx context.Context) LoadTestIdentityOutput { return o } func (o LoadTestIdentityOutput) ToLoadTestIdentityPtrOutput() LoadTestIdentityPtrOutput { return o.ToLoadTestIdentityPtrOutputWithContext(context.Background()) } func (o LoadTestIdentityOutput) ToLoadTestIdentityPtrOutputWithContext(ctx context.Context) LoadTestIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v LoadTestIdentity) *LoadTestIdentity { return &v }).(LoadTestIdentityPtrOutput) } // A list of the User Assigned Identity IDs that should be assigned to this Load Test. func (o LoadTestIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v LoadTestIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID for the System-Assigned Managed Identity assigned to this Load Test. func (o LoadTestIdentityOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v LoadTestIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID for the System-Assigned Managed Identity assigned to this Load Test. func (o LoadTestIdentityOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v LoadTestIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Identity that should be assigned to this Load Test Encryption. Possible values are `SystemAssigned` or `UserAssigned`. Changing this forces a new Load Test to be created. func (o LoadTestIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v LoadTestIdentity) string { return v.Type }).(pulumi.StringOutput) } type LoadTestIdentityPtrOutput struct{ *pulumi.OutputState } func (LoadTestIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**LoadTestIdentity)(nil)).Elem() } func (o LoadTestIdentityPtrOutput) ToLoadTestIdentityPtrOutput() LoadTestIdentityPtrOutput { return o } func (o LoadTestIdentityPtrOutput) ToLoadTestIdentityPtrOutputWithContext(ctx context.Context) LoadTestIdentityPtrOutput { return o } func (o LoadTestIdentityPtrOutput) Elem() LoadTestIdentityOutput { return o.ApplyT(func(v *LoadTestIdentity) LoadTestIdentity { if v != nil { return *v } var ret LoadTestIdentity return ret }).(LoadTestIdentityOutput) } // A list of the User Assigned Identity IDs that should be assigned to this Load Test. func (o LoadTestIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *LoadTestIdentity) []string { if v == nil { return nil } return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID for the System-Assigned Managed Identity assigned to this Load Test. func (o LoadTestIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v *LoadTestIdentity) *string { if v == nil { return nil } return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID for the System-Assigned Managed Identity assigned to this Load Test. func (o LoadTestIdentityPtrOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v *LoadTestIdentity) *string { if v == nil { return nil } return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Identity that should be assigned to this Load Test Encryption. Possible values are `SystemAssigned` or `UserAssigned`. Changing this forces a new Load Test to be created. func (o LoadTestIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *LoadTestIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type GetEncryption struct { // An `identity` block as defined below. Identities []GetEncryptionIdentity `pulumi:"identities"` // The URI specifying the Key vault and key to be used to encrypt data in this resource. KeyUrl string `pulumi:"keyUrl"` } // GetEncryptionInput is an input type that accepts GetEncryptionArgs and GetEncryptionOutput values. // You can construct a concrete instance of `GetEncryptionInput` via: // // GetEncryptionArgs{...} type GetEncryptionInput interface { pulumi.Input ToGetEncryptionOutput() GetEncryptionOutput ToGetEncryptionOutputWithContext(context.Context) GetEncryptionOutput } type GetEncryptionArgs struct { // An `identity` block as defined below. Identities GetEncryptionIdentityArrayInput `pulumi:"identities"` // The URI specifying the Key vault and key to be used to encrypt data in this resource. KeyUrl pulumi.StringInput `pulumi:"keyUrl"` } func (GetEncryptionArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetEncryption)(nil)).Elem() } func (i GetEncryptionArgs) ToGetEncryptionOutput() GetEncryptionOutput { return i.ToGetEncryptionOutputWithContext(context.Background()) } func (i GetEncryptionArgs) ToGetEncryptionOutputWithContext(ctx context.Context) GetEncryptionOutput { return pulumi.ToOutputWithContext(ctx, i).(GetEncryptionOutput) } // GetEncryptionArrayInput is an input type that accepts GetEncryptionArray and GetEncryptionArrayOutput values. // You can construct a concrete instance of `GetEncryptionArrayInput` via: // // GetEncryptionArray{ GetEncryptionArgs{...} } type GetEncryptionArrayInput interface { pulumi.Input ToGetEncryptionArrayOutput() GetEncryptionArrayOutput ToGetEncryptionArrayOutputWithContext(context.Context) GetEncryptionArrayOutput } type GetEncryptionArray []GetEncryptionInput func (GetEncryptionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]GetEncryption)(nil)).Elem() } func (i GetEncryptionArray) ToGetEncryptionArrayOutput() GetEncryptionArrayOutput { return i.ToGetEncryptionArrayOutputWithContext(context.Background()) } func (i GetEncryptionArray) ToGetEncryptionArrayOutputWithContext(ctx context.Context) GetEncryptionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GetEncryptionArrayOutput) } type GetEncryptionOutput struct{ *pulumi.OutputState } func (GetEncryptionOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetEncryption)(nil)).Elem() } func (o GetEncryptionOutput) ToGetEncryptionOutput() GetEncryptionOutput { return o } func (o GetEncryptionOutput) ToGetEncryptionOutputWithContext(ctx context.Context) GetEncryptionOutput { return o } // An `identity` block as defined below. func (o GetEncryptionOutput) Identities() GetEncryptionIdentityArrayOutput { return o.ApplyT(func(v GetEncryption) []GetEncryptionIdentity { return v.Identities }).(GetEncryptionIdentityArrayOutput) } // The URI specifying the Key vault and key to be used to encrypt data in this resource. func (o GetEncryptionOutput) KeyUrl() pulumi.StringOutput { return o.ApplyT(func(v GetEncryption) string { return v.KeyUrl }).(pulumi.StringOutput) } type GetEncryptionArrayOutput struct{ *pulumi.OutputState } func (GetEncryptionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]GetEncryption)(nil)).Elem() } func (o GetEncryptionArrayOutput) ToGetEncryptionArrayOutput() GetEncryptionArrayOutput { return o } func (o GetEncryptionArrayOutput) ToGetEncryptionArrayOutputWithContext(ctx context.Context) GetEncryptionArrayOutput { return o } func (o GetEncryptionArrayOutput) Index(i pulumi.IntInput) GetEncryptionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetEncryption { return vs[0].([]GetEncryption)[vs[1].(int)] }).(GetEncryptionOutput) } type GetEncryptionIdentity struct { // The User Assigned Identity ID that is assigned to this Load Test Encryption. IdentityId string `pulumi:"identityId"` // Type of Managed Service Identity that is assigned to this Load Test Encryption. Type string `pulumi:"type"` } // GetEncryptionIdentityInput is an input type that accepts GetEncryptionIdentityArgs and GetEncryptionIdentityOutput values. // You can construct a concrete instance of `GetEncryptionIdentityInput` via: // // GetEncryptionIdentityArgs{...} type GetEncryptionIdentityInput interface { pulumi.Input ToGetEncryptionIdentityOutput() GetEncryptionIdentityOutput ToGetEncryptionIdentityOutputWithContext(context.Context) GetEncryptionIdentityOutput } type GetEncryptionIdentityArgs struct { // The User Assigned Identity ID that is assigned to this Load Test Encryption. IdentityId pulumi.StringInput `pulumi:"identityId"` // Type of Managed Service Identity that is assigned to this Load Test Encryption. Type pulumi.StringInput `pulumi:"type"` } func (GetEncryptionIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetEncryptionIdentity)(nil)).Elem() } func (i GetEncryptionIdentityArgs) ToGetEncryptionIdentityOutput() GetEncryptionIdentityOutput { return i.ToGetEncryptionIdentityOutputWithContext(context.Background()) } func (i GetEncryptionIdentityArgs) ToGetEncryptionIdentityOutputWithContext(ctx context.Context) GetEncryptionIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(GetEncryptionIdentityOutput) } // GetEncryptionIdentityArrayInput is an input type that accepts GetEncryptionIdentityArray and GetEncryptionIdentityArrayOutput values. // You can construct a concrete instance of `GetEncryptionIdentityArrayInput` via: // // GetEncryptionIdentityArray{ GetEncryptionIdentityArgs{...} } type GetEncryptionIdentityArrayInput interface { pulumi.Input ToGetEncryptionIdentityArrayOutput() GetEncryptionIdentityArrayOutput ToGetEncryptionIdentityArrayOutputWithContext(context.Context) GetEncryptionIdentityArrayOutput } type GetEncryptionIdentityArray []GetEncryptionIdentityInput func (GetEncryptionIdentityArray) ElementType() reflect.Type { return reflect.TypeOf((*[]GetEncryptionIdentity)(nil)).Elem() } func (i GetEncryptionIdentityArray) ToGetEncryptionIdentityArrayOutput() GetEncryptionIdentityArrayOutput { return i.ToGetEncryptionIdentityArrayOutputWithContext(context.Background()) } func (i GetEncryptionIdentityArray) ToGetEncryptionIdentityArrayOutputWithContext(ctx context.Context) GetEncryptionIdentityArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GetEncryptionIdentityArrayOutput) } type GetEncryptionIdentityOutput struct{ *pulumi.OutputState } func (GetEncryptionIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetEncryptionIdentity)(nil)).Elem() } func (o GetEncryptionIdentityOutput) ToGetEncryptionIdentityOutput() GetEncryptionIdentityOutput { return o } func (o GetEncryptionIdentityOutput) ToGetEncryptionIdentityOutputWithContext(ctx context.Context) GetEncryptionIdentityOutput { return o } // The User Assigned Identity ID that is assigned to this Load Test Encryption. func (o GetEncryptionIdentityOutput) IdentityId() pulumi.StringOutput { return o.ApplyT(func(v GetEncryptionIdentity) string { return v.IdentityId }).(pulumi.StringOutput) } // Type of Managed Service Identity that is assigned to this Load Test Encryption. func (o GetEncryptionIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v GetEncryptionIdentity) string { return v.Type }).(pulumi.StringOutput) } type GetEncryptionIdentityArrayOutput struct{ *pulumi.OutputState } func (GetEncryptionIdentityArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]GetEncryptionIdentity)(nil)).Elem() } func (o GetEncryptionIdentityArrayOutput) ToGetEncryptionIdentityArrayOutput() GetEncryptionIdentityArrayOutput { return o } func (o GetEncryptionIdentityArrayOutput) ToGetEncryptionIdentityArrayOutputWithContext(ctx context.Context) GetEncryptionIdentityArrayOutput { return o } func (o GetEncryptionIdentityArrayOutput) Index(i pulumi.IntInput) GetEncryptionIdentityOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetEncryptionIdentity { return vs[0].([]GetEncryptionIdentity)[vs[1].(int)] }).(GetEncryptionIdentityOutput) } type GetIdentity struct { // The list of the User Assigned Identity IDs that is assigned to this Load Test Service. IdentityIds []string `pulumi:"identityIds"` // The Principal ID for the System-Assigned Managed Identity assigned to this Load Test Service. PrincipalId string `pulumi:"principalId"` // The Tenant ID for the System-Assigned Managed Identity assigned to this Load Test Service. TenantId string `pulumi:"tenantId"` // Type of Managed Service Identity that is assigned to this Load Test Encryption. Type string `pulumi:"type"` } // GetIdentityInput is an input type that accepts GetIdentityArgs and GetIdentityOutput values. // You can construct a concrete instance of `GetIdentityInput` via: // // GetIdentityArgs{...} type GetIdentityInput interface { pulumi.Input ToGetIdentityOutput() GetIdentityOutput ToGetIdentityOutputWithContext(context.Context) GetIdentityOutput } type GetIdentityArgs struct { // The list of the User Assigned Identity IDs that is assigned to this Load Test Service. IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"` // The Principal ID for the System-Assigned Managed Identity assigned to this Load Test Service. PrincipalId pulumi.StringInput `pulumi:"principalId"` // The Tenant ID for the System-Assigned Managed Identity assigned to this Load Test Service. TenantId pulumi.StringInput `pulumi:"tenantId"` // Type of Managed Service Identity that is assigned to this Load Test Encryption. Type pulumi.StringInput `pulumi:"type"` } func (GetIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetIdentity)(nil)).Elem() } func (i GetIdentityArgs) ToGetIdentityOutput() GetIdentityOutput { return i.ToGetIdentityOutputWithContext(context.Background()) } func (i GetIdentityArgs) ToGetIdentityOutputWithContext(ctx context.Context) GetIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(GetIdentityOutput) } // GetIdentityArrayInput is an input type that accepts GetIdentityArray and GetIdentityArrayOutput values. // You can construct a concrete instance of `GetIdentityArrayInput` via: // // GetIdentityArray{ GetIdentityArgs{...} } type GetIdentityArrayInput interface { pulumi.Input ToGetIdentityArrayOutput() GetIdentityArrayOutput ToGetIdentityArrayOutputWithContext(context.Context) GetIdentityArrayOutput } type GetIdentityArray []GetIdentityInput func (GetIdentityArray) ElementType() reflect.Type { return reflect.TypeOf((*[]GetIdentity)(nil)).Elem() } func (i GetIdentityArray) ToGetIdentityArrayOutput() GetIdentityArrayOutput { return i.ToGetIdentityArrayOutputWithContext(context.Background()) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loadtest/get.go
sdk/go/azure/loadtest/get.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package loadtest import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about a Load Test Service. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/loadtest" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := loadtest.Get(ctx, &loadtest.GetArgs{ // ResourceGroupName: "example-resources", // Name: "example-load-test", // }, nil) // if err != nil { // return err // } // ctx.Export("loadTestId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.LoadTestService` - 2022-12-01 func Get(ctx *pulumi.Context, args *GetArgs, opts ...pulumi.InvokeOption) (*GetResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetResult err := ctx.Invoke("azure:loadtest/get:get", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking get. type GetArgs struct { // The name of the Load Test Service. Name string `pulumi:"name"` // The name of the Resource Group in which the Load Test Service exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by get. type GetResult struct { // Resource data plane URI. DataPlaneUri string `pulumi:"dataPlaneUri"` // Description of the resource. Description string `pulumi:"description"` // An `encryption` block as defined below. Encryptions []GetEncryption `pulumi:"encryptions"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // An `identity` block as defined below. Identities []GetIdentity `pulumi:"identities"` // The Azure Region where the Load Test exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the Load Test Service. Tags map[string]string `pulumi:"tags"` } func GetOutput(ctx *pulumi.Context, args GetOutputArgs, opts ...pulumi.InvokeOption) GetResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetResultOutput, error) { args := v.(GetArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:loadtest/get:get", args, GetResultOutput{}, options).(GetResultOutput), nil }).(GetResultOutput) } // A collection of arguments for invoking get. type GetOutputArgs struct { // The name of the Load Test Service. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group in which the Load Test Service exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetArgs)(nil)).Elem() } // A collection of values returned by get. type GetResultOutput struct{ *pulumi.OutputState } func (GetResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetResult)(nil)).Elem() } func (o GetResultOutput) ToGetResultOutput() GetResultOutput { return o } func (o GetResultOutput) ToGetResultOutputWithContext(ctx context.Context) GetResultOutput { return o } // Resource data plane URI. func (o GetResultOutput) DataPlaneUri() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.DataPlaneUri }).(pulumi.StringOutput) } // Description of the resource. func (o GetResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.Description }).(pulumi.StringOutput) } // An `encryption` block as defined below. func (o GetResultOutput) Encryptions() GetEncryptionArrayOutput { return o.ApplyT(func(v GetResult) []GetEncryption { return v.Encryptions }).(GetEncryptionArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o GetResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.Id }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o GetResultOutput) Identities() GetIdentityArrayOutput { return o.ApplyT(func(v GetResult) []GetIdentity { return v.Identities }).(GetIdentityArrayOutput) } // The Azure Region where the Load Test exists. func (o GetResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.Location }).(pulumi.StringOutput) } func (o GetResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.Name }).(pulumi.StringOutput) } func (o GetResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the Load Test Service. func (o GetResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(GetResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/loadtest/loadTest.go
sdk/go/azure/loadtest/loadTest.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package loadtest import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Load Test Service. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/loadtest" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // _, err = loadtest.NewLoadTest(ctx, "example", &loadtest.LoadTestArgs{ // Location: example.Location, // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.LoadTestService` - 2022-12-01 // // ## Import // // An existing Load Test can be imported into Pulumi using the `resource id`, e.g. // // ```sh // $ pulumi import azure:loadtest/loadTest:LoadTest example /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LoadTestService/loadTests/{loadTestName} // ``` // // * Where `{subscriptionId}` is the ID of the Azure Subscription where the Load Test exists. For example `12345678-1234-9876-4563-123456789012`. // // * Where `{resourceGroupName}` is the name of Resource Group where this Load Test exists. For example `example-resource-group`. // // * Where `{loadTestName}` is the name of the Load Test. For example `loadTestValue`. type LoadTest struct { pulumi.CustomResourceState // Resource data plane URI. DataPlaneUri pulumi.StringOutput `pulumi:"dataPlaneUri"` // Description of the resource. Description pulumi.StringPtrOutput `pulumi:"description"` // An `encryption` block as defined below. Changing this forces a new Load Test to be created. Encryption LoadTestEncryptionPtrOutput `pulumi:"encryption"` // An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Load Test. Identity LoadTestIdentityPtrOutput `pulumi:"identity"` // The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of this Load Test. Changing this forces a new Load Test to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Load Test. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewLoadTest registers a new resource with the given unique name, arguments, and options. func NewLoadTest(ctx *pulumi.Context, name string, args *LoadTestArgs, opts ...pulumi.ResourceOption) (*LoadTest, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource LoadTest err := ctx.RegisterResource("azure:loadtest/loadTest:LoadTest", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetLoadTest gets an existing LoadTest resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetLoadTest(ctx *pulumi.Context, name string, id pulumi.IDInput, state *LoadTestState, opts ...pulumi.ResourceOption) (*LoadTest, error) { var resource LoadTest err := ctx.ReadResource("azure:loadtest/loadTest:LoadTest", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering LoadTest resources. type loadTestState struct { // Resource data plane URI. DataPlaneUri *string `pulumi:"dataPlaneUri"` // Description of the resource. Description *string `pulumi:"description"` // An `encryption` block as defined below. Changing this forces a new Load Test to be created. Encryption *LoadTestEncryption `pulumi:"encryption"` // An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Load Test. Identity *LoadTestIdentity `pulumi:"identity"` // The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created. Location *string `pulumi:"location"` // Specifies the name of this Load Test. Changing this forces a new Load Test to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Load Test. Tags map[string]string `pulumi:"tags"` } type LoadTestState struct { // Resource data plane URI. DataPlaneUri pulumi.StringPtrInput // Description of the resource. Description pulumi.StringPtrInput // An `encryption` block as defined below. Changing this forces a new Load Test to be created. Encryption LoadTestEncryptionPtrInput // An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Load Test. Identity LoadTestIdentityPtrInput // The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created. Location pulumi.StringPtrInput // Specifies the name of this Load Test. Changing this forces a new Load Test to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Load Test. Tags pulumi.StringMapInput } func (LoadTestState) ElementType() reflect.Type { return reflect.TypeOf((*loadTestState)(nil)).Elem() } type loadTestArgs struct { // Description of the resource. Description *string `pulumi:"description"` // An `encryption` block as defined below. Changing this forces a new Load Test to be created. Encryption *LoadTestEncryption `pulumi:"encryption"` // An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Load Test. Identity *LoadTestIdentity `pulumi:"identity"` // The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created. Location *string `pulumi:"location"` // Specifies the name of this Load Test. Changing this forces a new Load Test to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Load Test. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a LoadTest resource. type LoadTestArgs struct { // Description of the resource. Description pulumi.StringPtrInput // An `encryption` block as defined below. Changing this forces a new Load Test to be created. Encryption LoadTestEncryptionPtrInput // An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Load Test. Identity LoadTestIdentityPtrInput // The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created. Location pulumi.StringPtrInput // Specifies the name of this Load Test. Changing this forces a new Load Test to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created. ResourceGroupName pulumi.StringInput // A mapping of tags which should be assigned to the Load Test. Tags pulumi.StringMapInput } func (LoadTestArgs) ElementType() reflect.Type { return reflect.TypeOf((*loadTestArgs)(nil)).Elem() } type LoadTestInput interface { pulumi.Input ToLoadTestOutput() LoadTestOutput ToLoadTestOutputWithContext(ctx context.Context) LoadTestOutput } func (*LoadTest) ElementType() reflect.Type { return reflect.TypeOf((**LoadTest)(nil)).Elem() } func (i *LoadTest) ToLoadTestOutput() LoadTestOutput { return i.ToLoadTestOutputWithContext(context.Background()) } func (i *LoadTest) ToLoadTestOutputWithContext(ctx context.Context) LoadTestOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadTestOutput) } // LoadTestArrayInput is an input type that accepts LoadTestArray and LoadTestArrayOutput values. // You can construct a concrete instance of `LoadTestArrayInput` via: // // LoadTestArray{ LoadTestArgs{...} } type LoadTestArrayInput interface { pulumi.Input ToLoadTestArrayOutput() LoadTestArrayOutput ToLoadTestArrayOutputWithContext(context.Context) LoadTestArrayOutput } type LoadTestArray []LoadTestInput func (LoadTestArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*LoadTest)(nil)).Elem() } func (i LoadTestArray) ToLoadTestArrayOutput() LoadTestArrayOutput { return i.ToLoadTestArrayOutputWithContext(context.Background()) } func (i LoadTestArray) ToLoadTestArrayOutputWithContext(ctx context.Context) LoadTestArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadTestArrayOutput) } // LoadTestMapInput is an input type that accepts LoadTestMap and LoadTestMapOutput values. // You can construct a concrete instance of `LoadTestMapInput` via: // // LoadTestMap{ "key": LoadTestArgs{...} } type LoadTestMapInput interface { pulumi.Input ToLoadTestMapOutput() LoadTestMapOutput ToLoadTestMapOutputWithContext(context.Context) LoadTestMapOutput } type LoadTestMap map[string]LoadTestInput func (LoadTestMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LoadTest)(nil)).Elem() } func (i LoadTestMap) ToLoadTestMapOutput() LoadTestMapOutput { return i.ToLoadTestMapOutputWithContext(context.Background()) } func (i LoadTestMap) ToLoadTestMapOutputWithContext(ctx context.Context) LoadTestMapOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadTestMapOutput) } type LoadTestOutput struct{ *pulumi.OutputState } func (LoadTestOutput) ElementType() reflect.Type { return reflect.TypeOf((**LoadTest)(nil)).Elem() } func (o LoadTestOutput) ToLoadTestOutput() LoadTestOutput { return o } func (o LoadTestOutput) ToLoadTestOutputWithContext(ctx context.Context) LoadTestOutput { return o } // Resource data plane URI. func (o LoadTestOutput) DataPlaneUri() pulumi.StringOutput { return o.ApplyT(func(v *LoadTest) pulumi.StringOutput { return v.DataPlaneUri }).(pulumi.StringOutput) } // Description of the resource. func (o LoadTestOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *LoadTest) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // An `encryption` block as defined below. Changing this forces a new Load Test to be created. func (o LoadTestOutput) Encryption() LoadTestEncryptionPtrOutput { return o.ApplyT(func(v *LoadTest) LoadTestEncryptionPtrOutput { return v.Encryption }).(LoadTestEncryptionPtrOutput) } // An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Load Test. func (o LoadTestOutput) Identity() LoadTestIdentityPtrOutput { return o.ApplyT(func(v *LoadTest) LoadTestIdentityPtrOutput { return v.Identity }).(LoadTestIdentityPtrOutput) } // The Azure Region where the Load Test should exist. Changing this forces a new Load Test to be created. func (o LoadTestOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *LoadTest) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of this Load Test. Changing this forces a new Load Test to be created. func (o LoadTestOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *LoadTest) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the name of the Resource Group within which this Load Test should exist. Changing this forces a new Load Test to be created. func (o LoadTestOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *LoadTest) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Load Test. func (o LoadTestOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *LoadTest) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type LoadTestArrayOutput struct{ *pulumi.OutputState } func (LoadTestArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*LoadTest)(nil)).Elem() } func (o LoadTestArrayOutput) ToLoadTestArrayOutput() LoadTestArrayOutput { return o } func (o LoadTestArrayOutput) ToLoadTestArrayOutputWithContext(ctx context.Context) LoadTestArrayOutput { return o } func (o LoadTestArrayOutput) Index(i pulumi.IntInput) LoadTestOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LoadTest { return vs[0].([]*LoadTest)[vs[1].(int)] }).(LoadTestOutput) } type LoadTestMapOutput struct{ *pulumi.OutputState } func (LoadTestMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LoadTest)(nil)).Elem() } func (o LoadTestMapOutput) ToLoadTestMapOutput() LoadTestMapOutput { return o } func (o LoadTestMapOutput) ToLoadTestMapOutputWithContext(ctx context.Context) LoadTestMapOutput { return o } func (o LoadTestMapOutput) MapIndex(k pulumi.StringInput) LoadTestOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LoadTest { return vs[0].(map[string]*LoadTest)[vs[1].(string)] }).(LoadTestOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*LoadTestInput)(nil)).Elem(), &LoadTest{}) pulumi.RegisterInputType(reflect.TypeOf((*LoadTestArrayInput)(nil)).Elem(), LoadTestArray{}) pulumi.RegisterInputType(reflect.TypeOf((*LoadTestMapInput)(nil)).Elem(), LoadTestMap{}) pulumi.RegisterOutputType(LoadTestOutput{}) pulumi.RegisterOutputType(LoadTestArrayOutput{}) pulumi.RegisterOutputType(LoadTestMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appinsights/init.go
sdk/go/azure/appinsights/init.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appinsights import ( "fmt" "github.com/blang/semver" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type module struct { version semver.Version } func (m *module) Version() semver.Version { return m.version } func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { case "azure:appinsights/analyticsItem:AnalyticsItem": r = &AnalyticsItem{} case "azure:appinsights/apiKey:ApiKey": r = &ApiKey{} case "azure:appinsights/insights:Insights": r = &Insights{} case "azure:appinsights/smartDetectionRule:SmartDetectionRule": r = &SmartDetectionRule{} case "azure:appinsights/standardWebTest:StandardWebTest": r = &StandardWebTest{} case "azure:appinsights/webTest:WebTest": r = &WebTest{} case "azure:appinsights/workbook:Workbook": r = &Workbook{} case "azure:appinsights/workbookTemplate:WorkbookTemplate": r = &WorkbookTemplate{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) return } func init() { version, err := internal.PkgVersion() if err != nil { version = semver.Version{Major: 1} } pulumi.RegisterResourceModule( "azure", "appinsights/analyticsItem", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appinsights/apiKey", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appinsights/insights", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appinsights/smartDetectionRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appinsights/standardWebTest", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appinsights/webTest", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appinsights/workbook", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appinsights/workbookTemplate", &module{version}, ) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appinsights/pulumiTypes.go
sdk/go/azure/appinsights/pulumiTypes.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appinsights import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) var _ = internal.GetEnvOrDefault type StandardWebTestRequest struct { // The WebTest request body. Body *string `pulumi:"body"` // Should the following of redirects be enabled? Defaults to `true`. FollowRedirectsEnabled *bool `pulumi:"followRedirectsEnabled"` // One or more `header` blocks as defined above. Headers []StandardWebTestRequestHeader `pulumi:"headers"` // Which HTTP verb to use for the call. Options are 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', and 'OPTIONS'. Defaults to `GET`. HttpVerb *string `pulumi:"httpVerb"` // Should the parsing of dependend requests be enabled? Defaults to `true`. ParseDependentRequestsEnabled *bool `pulumi:"parseDependentRequestsEnabled"` // The WebTest request URL. Url string `pulumi:"url"` } // StandardWebTestRequestInput is an input type that accepts StandardWebTestRequestArgs and StandardWebTestRequestOutput values. // You can construct a concrete instance of `StandardWebTestRequestInput` via: // // StandardWebTestRequestArgs{...} type StandardWebTestRequestInput interface { pulumi.Input ToStandardWebTestRequestOutput() StandardWebTestRequestOutput ToStandardWebTestRequestOutputWithContext(context.Context) StandardWebTestRequestOutput } type StandardWebTestRequestArgs struct { // The WebTest request body. Body pulumi.StringPtrInput `pulumi:"body"` // Should the following of redirects be enabled? Defaults to `true`. FollowRedirectsEnabled pulumi.BoolPtrInput `pulumi:"followRedirectsEnabled"` // One or more `header` blocks as defined above. Headers StandardWebTestRequestHeaderArrayInput `pulumi:"headers"` // Which HTTP verb to use for the call. Options are 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', and 'OPTIONS'. Defaults to `GET`. HttpVerb pulumi.StringPtrInput `pulumi:"httpVerb"` // Should the parsing of dependend requests be enabled? Defaults to `true`. ParseDependentRequestsEnabled pulumi.BoolPtrInput `pulumi:"parseDependentRequestsEnabled"` // The WebTest request URL. Url pulumi.StringInput `pulumi:"url"` } func (StandardWebTestRequestArgs) ElementType() reflect.Type { return reflect.TypeOf((*StandardWebTestRequest)(nil)).Elem() } func (i StandardWebTestRequestArgs) ToStandardWebTestRequestOutput() StandardWebTestRequestOutput { return i.ToStandardWebTestRequestOutputWithContext(context.Background()) } func (i StandardWebTestRequestArgs) ToStandardWebTestRequestOutputWithContext(ctx context.Context) StandardWebTestRequestOutput { return pulumi.ToOutputWithContext(ctx, i).(StandardWebTestRequestOutput) } func (i StandardWebTestRequestArgs) ToStandardWebTestRequestPtrOutput() StandardWebTestRequestPtrOutput { return i.ToStandardWebTestRequestPtrOutputWithContext(context.Background()) } func (i StandardWebTestRequestArgs) ToStandardWebTestRequestPtrOutputWithContext(ctx context.Context) StandardWebTestRequestPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(StandardWebTestRequestOutput).ToStandardWebTestRequestPtrOutputWithContext(ctx) } // StandardWebTestRequestPtrInput is an input type that accepts StandardWebTestRequestArgs, StandardWebTestRequestPtr and StandardWebTestRequestPtrOutput values. // You can construct a concrete instance of `StandardWebTestRequestPtrInput` via: // // StandardWebTestRequestArgs{...} // // or: // // nil type StandardWebTestRequestPtrInput interface { pulumi.Input ToStandardWebTestRequestPtrOutput() StandardWebTestRequestPtrOutput ToStandardWebTestRequestPtrOutputWithContext(context.Context) StandardWebTestRequestPtrOutput } type standardWebTestRequestPtrType StandardWebTestRequestArgs func StandardWebTestRequestPtr(v *StandardWebTestRequestArgs) StandardWebTestRequestPtrInput { return (*standardWebTestRequestPtrType)(v) } func (*standardWebTestRequestPtrType) ElementType() reflect.Type { return reflect.TypeOf((**StandardWebTestRequest)(nil)).Elem() } func (i *standardWebTestRequestPtrType) ToStandardWebTestRequestPtrOutput() StandardWebTestRequestPtrOutput { return i.ToStandardWebTestRequestPtrOutputWithContext(context.Background()) } func (i *standardWebTestRequestPtrType) ToStandardWebTestRequestPtrOutputWithContext(ctx context.Context) StandardWebTestRequestPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(StandardWebTestRequestPtrOutput) } type StandardWebTestRequestOutput struct{ *pulumi.OutputState } func (StandardWebTestRequestOutput) ElementType() reflect.Type { return reflect.TypeOf((*StandardWebTestRequest)(nil)).Elem() } func (o StandardWebTestRequestOutput) ToStandardWebTestRequestOutput() StandardWebTestRequestOutput { return o } func (o StandardWebTestRequestOutput) ToStandardWebTestRequestOutputWithContext(ctx context.Context) StandardWebTestRequestOutput { return o } func (o StandardWebTestRequestOutput) ToStandardWebTestRequestPtrOutput() StandardWebTestRequestPtrOutput { return o.ToStandardWebTestRequestPtrOutputWithContext(context.Background()) } func (o StandardWebTestRequestOutput) ToStandardWebTestRequestPtrOutputWithContext(ctx context.Context) StandardWebTestRequestPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v StandardWebTestRequest) *StandardWebTestRequest { return &v }).(StandardWebTestRequestPtrOutput) } // The WebTest request body. func (o StandardWebTestRequestOutput) Body() pulumi.StringPtrOutput { return o.ApplyT(func(v StandardWebTestRequest) *string { return v.Body }).(pulumi.StringPtrOutput) } // Should the following of redirects be enabled? Defaults to `true`. func (o StandardWebTestRequestOutput) FollowRedirectsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v StandardWebTestRequest) *bool { return v.FollowRedirectsEnabled }).(pulumi.BoolPtrOutput) } // One or more `header` blocks as defined above. func (o StandardWebTestRequestOutput) Headers() StandardWebTestRequestHeaderArrayOutput { return o.ApplyT(func(v StandardWebTestRequest) []StandardWebTestRequestHeader { return v.Headers }).(StandardWebTestRequestHeaderArrayOutput) } // Which HTTP verb to use for the call. Options are 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', and 'OPTIONS'. Defaults to `GET`. func (o StandardWebTestRequestOutput) HttpVerb() pulumi.StringPtrOutput { return o.ApplyT(func(v StandardWebTestRequest) *string { return v.HttpVerb }).(pulumi.StringPtrOutput) } // Should the parsing of dependend requests be enabled? Defaults to `true`. func (o StandardWebTestRequestOutput) ParseDependentRequestsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v StandardWebTestRequest) *bool { return v.ParseDependentRequestsEnabled }).(pulumi.BoolPtrOutput) } // The WebTest request URL. func (o StandardWebTestRequestOutput) Url() pulumi.StringOutput { return o.ApplyT(func(v StandardWebTestRequest) string { return v.Url }).(pulumi.StringOutput) } type StandardWebTestRequestPtrOutput struct{ *pulumi.OutputState } func (StandardWebTestRequestPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**StandardWebTestRequest)(nil)).Elem() } func (o StandardWebTestRequestPtrOutput) ToStandardWebTestRequestPtrOutput() StandardWebTestRequestPtrOutput { return o } func (o StandardWebTestRequestPtrOutput) ToStandardWebTestRequestPtrOutputWithContext(ctx context.Context) StandardWebTestRequestPtrOutput { return o } func (o StandardWebTestRequestPtrOutput) Elem() StandardWebTestRequestOutput { return o.ApplyT(func(v *StandardWebTestRequest) StandardWebTestRequest { if v != nil { return *v } var ret StandardWebTestRequest return ret }).(StandardWebTestRequestOutput) } // The WebTest request body. func (o StandardWebTestRequestPtrOutput) Body() pulumi.StringPtrOutput { return o.ApplyT(func(v *StandardWebTestRequest) *string { if v == nil { return nil } return v.Body }).(pulumi.StringPtrOutput) } // Should the following of redirects be enabled? Defaults to `true`. func (o StandardWebTestRequestPtrOutput) FollowRedirectsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *StandardWebTestRequest) *bool { if v == nil { return nil } return v.FollowRedirectsEnabled }).(pulumi.BoolPtrOutput) } // One or more `header` blocks as defined above. func (o StandardWebTestRequestPtrOutput) Headers() StandardWebTestRequestHeaderArrayOutput { return o.ApplyT(func(v *StandardWebTestRequest) []StandardWebTestRequestHeader { if v == nil { return nil } return v.Headers }).(StandardWebTestRequestHeaderArrayOutput) } // Which HTTP verb to use for the call. Options are 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', and 'OPTIONS'. Defaults to `GET`. func (o StandardWebTestRequestPtrOutput) HttpVerb() pulumi.StringPtrOutput { return o.ApplyT(func(v *StandardWebTestRequest) *string { if v == nil { return nil } return v.HttpVerb }).(pulumi.StringPtrOutput) } // Should the parsing of dependend requests be enabled? Defaults to `true`. func (o StandardWebTestRequestPtrOutput) ParseDependentRequestsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *StandardWebTestRequest) *bool { if v == nil { return nil } return v.ParseDependentRequestsEnabled }).(pulumi.BoolPtrOutput) } // The WebTest request URL. func (o StandardWebTestRequestPtrOutput) Url() pulumi.StringPtrOutput { return o.ApplyT(func(v *StandardWebTestRequest) *string { if v == nil { return nil } return &v.Url }).(pulumi.StringPtrOutput) } type StandardWebTestRequestHeader struct { // The name which should be used for a header in the request. Name string `pulumi:"name"` // The value which should be used for a header in the request. Value string `pulumi:"value"` } // StandardWebTestRequestHeaderInput is an input type that accepts StandardWebTestRequestHeaderArgs and StandardWebTestRequestHeaderOutput values. // You can construct a concrete instance of `StandardWebTestRequestHeaderInput` via: // // StandardWebTestRequestHeaderArgs{...} type StandardWebTestRequestHeaderInput interface { pulumi.Input ToStandardWebTestRequestHeaderOutput() StandardWebTestRequestHeaderOutput ToStandardWebTestRequestHeaderOutputWithContext(context.Context) StandardWebTestRequestHeaderOutput } type StandardWebTestRequestHeaderArgs struct { // The name which should be used for a header in the request. Name pulumi.StringInput `pulumi:"name"` // The value which should be used for a header in the request. Value pulumi.StringInput `pulumi:"value"` } func (StandardWebTestRequestHeaderArgs) ElementType() reflect.Type { return reflect.TypeOf((*StandardWebTestRequestHeader)(nil)).Elem() } func (i StandardWebTestRequestHeaderArgs) ToStandardWebTestRequestHeaderOutput() StandardWebTestRequestHeaderOutput { return i.ToStandardWebTestRequestHeaderOutputWithContext(context.Background()) } func (i StandardWebTestRequestHeaderArgs) ToStandardWebTestRequestHeaderOutputWithContext(ctx context.Context) StandardWebTestRequestHeaderOutput { return pulumi.ToOutputWithContext(ctx, i).(StandardWebTestRequestHeaderOutput) } // StandardWebTestRequestHeaderArrayInput is an input type that accepts StandardWebTestRequestHeaderArray and StandardWebTestRequestHeaderArrayOutput values. // You can construct a concrete instance of `StandardWebTestRequestHeaderArrayInput` via: // // StandardWebTestRequestHeaderArray{ StandardWebTestRequestHeaderArgs{...} } type StandardWebTestRequestHeaderArrayInput interface { pulumi.Input ToStandardWebTestRequestHeaderArrayOutput() StandardWebTestRequestHeaderArrayOutput ToStandardWebTestRequestHeaderArrayOutputWithContext(context.Context) StandardWebTestRequestHeaderArrayOutput } type StandardWebTestRequestHeaderArray []StandardWebTestRequestHeaderInput func (StandardWebTestRequestHeaderArray) ElementType() reflect.Type { return reflect.TypeOf((*[]StandardWebTestRequestHeader)(nil)).Elem() } func (i StandardWebTestRequestHeaderArray) ToStandardWebTestRequestHeaderArrayOutput() StandardWebTestRequestHeaderArrayOutput { return i.ToStandardWebTestRequestHeaderArrayOutputWithContext(context.Background()) } func (i StandardWebTestRequestHeaderArray) ToStandardWebTestRequestHeaderArrayOutputWithContext(ctx context.Context) StandardWebTestRequestHeaderArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(StandardWebTestRequestHeaderArrayOutput) } type StandardWebTestRequestHeaderOutput struct{ *pulumi.OutputState } func (StandardWebTestRequestHeaderOutput) ElementType() reflect.Type { return reflect.TypeOf((*StandardWebTestRequestHeader)(nil)).Elem() } func (o StandardWebTestRequestHeaderOutput) ToStandardWebTestRequestHeaderOutput() StandardWebTestRequestHeaderOutput { return o } func (o StandardWebTestRequestHeaderOutput) ToStandardWebTestRequestHeaderOutputWithContext(ctx context.Context) StandardWebTestRequestHeaderOutput { return o } // The name which should be used for a header in the request. func (o StandardWebTestRequestHeaderOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v StandardWebTestRequestHeader) string { return v.Name }).(pulumi.StringOutput) } // The value which should be used for a header in the request. func (o StandardWebTestRequestHeaderOutput) Value() pulumi.StringOutput { return o.ApplyT(func(v StandardWebTestRequestHeader) string { return v.Value }).(pulumi.StringOutput) } type StandardWebTestRequestHeaderArrayOutput struct{ *pulumi.OutputState } func (StandardWebTestRequestHeaderArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]StandardWebTestRequestHeader)(nil)).Elem() } func (o StandardWebTestRequestHeaderArrayOutput) ToStandardWebTestRequestHeaderArrayOutput() StandardWebTestRequestHeaderArrayOutput { return o } func (o StandardWebTestRequestHeaderArrayOutput) ToStandardWebTestRequestHeaderArrayOutputWithContext(ctx context.Context) StandardWebTestRequestHeaderArrayOutput { return o } func (o StandardWebTestRequestHeaderArrayOutput) Index(i pulumi.IntInput) StandardWebTestRequestHeaderOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) StandardWebTestRequestHeader { return vs[0].([]StandardWebTestRequestHeader)[vs[1].(int)] }).(StandardWebTestRequestHeaderOutput) } type StandardWebTestValidationRules struct { // A `content` block as defined above. Content *StandardWebTestValidationRulesContent `pulumi:"content"` // The expected status code of the response. Default is '200', '0' means 'response code < 400' ExpectedStatusCode *int `pulumi:"expectedStatusCode"` // The number of days of SSL certificate validity remaining for the checked endpoint. If the certificate has a shorter remaining lifetime left, the test will fail. This number should be between 1 and 365. SslCertRemainingLifetime *int `pulumi:"sslCertRemainingLifetime"` // Should the SSL check be enabled? SslCheckEnabled *bool `pulumi:"sslCheckEnabled"` } // StandardWebTestValidationRulesInput is an input type that accepts StandardWebTestValidationRulesArgs and StandardWebTestValidationRulesOutput values. // You can construct a concrete instance of `StandardWebTestValidationRulesInput` via: // // StandardWebTestValidationRulesArgs{...} type StandardWebTestValidationRulesInput interface { pulumi.Input ToStandardWebTestValidationRulesOutput() StandardWebTestValidationRulesOutput ToStandardWebTestValidationRulesOutputWithContext(context.Context) StandardWebTestValidationRulesOutput } type StandardWebTestValidationRulesArgs struct { // A `content` block as defined above. Content StandardWebTestValidationRulesContentPtrInput `pulumi:"content"` // The expected status code of the response. Default is '200', '0' means 'response code < 400' ExpectedStatusCode pulumi.IntPtrInput `pulumi:"expectedStatusCode"` // The number of days of SSL certificate validity remaining for the checked endpoint. If the certificate has a shorter remaining lifetime left, the test will fail. This number should be between 1 and 365. SslCertRemainingLifetime pulumi.IntPtrInput `pulumi:"sslCertRemainingLifetime"` // Should the SSL check be enabled? SslCheckEnabled pulumi.BoolPtrInput `pulumi:"sslCheckEnabled"` } func (StandardWebTestValidationRulesArgs) ElementType() reflect.Type { return reflect.TypeOf((*StandardWebTestValidationRules)(nil)).Elem() } func (i StandardWebTestValidationRulesArgs) ToStandardWebTestValidationRulesOutput() StandardWebTestValidationRulesOutput { return i.ToStandardWebTestValidationRulesOutputWithContext(context.Background()) } func (i StandardWebTestValidationRulesArgs) ToStandardWebTestValidationRulesOutputWithContext(ctx context.Context) StandardWebTestValidationRulesOutput { return pulumi.ToOutputWithContext(ctx, i).(StandardWebTestValidationRulesOutput) } func (i StandardWebTestValidationRulesArgs) ToStandardWebTestValidationRulesPtrOutput() StandardWebTestValidationRulesPtrOutput { return i.ToStandardWebTestValidationRulesPtrOutputWithContext(context.Background()) } func (i StandardWebTestValidationRulesArgs) ToStandardWebTestValidationRulesPtrOutputWithContext(ctx context.Context) StandardWebTestValidationRulesPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(StandardWebTestValidationRulesOutput).ToStandardWebTestValidationRulesPtrOutputWithContext(ctx) } // StandardWebTestValidationRulesPtrInput is an input type that accepts StandardWebTestValidationRulesArgs, StandardWebTestValidationRulesPtr and StandardWebTestValidationRulesPtrOutput values. // You can construct a concrete instance of `StandardWebTestValidationRulesPtrInput` via: // // StandardWebTestValidationRulesArgs{...} // // or: // // nil type StandardWebTestValidationRulesPtrInput interface { pulumi.Input ToStandardWebTestValidationRulesPtrOutput() StandardWebTestValidationRulesPtrOutput ToStandardWebTestValidationRulesPtrOutputWithContext(context.Context) StandardWebTestValidationRulesPtrOutput } type standardWebTestValidationRulesPtrType StandardWebTestValidationRulesArgs func StandardWebTestValidationRulesPtr(v *StandardWebTestValidationRulesArgs) StandardWebTestValidationRulesPtrInput { return (*standardWebTestValidationRulesPtrType)(v) } func (*standardWebTestValidationRulesPtrType) ElementType() reflect.Type { return reflect.TypeOf((**StandardWebTestValidationRules)(nil)).Elem() } func (i *standardWebTestValidationRulesPtrType) ToStandardWebTestValidationRulesPtrOutput() StandardWebTestValidationRulesPtrOutput { return i.ToStandardWebTestValidationRulesPtrOutputWithContext(context.Background()) } func (i *standardWebTestValidationRulesPtrType) ToStandardWebTestValidationRulesPtrOutputWithContext(ctx context.Context) StandardWebTestValidationRulesPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(StandardWebTestValidationRulesPtrOutput) } type StandardWebTestValidationRulesOutput struct{ *pulumi.OutputState } func (StandardWebTestValidationRulesOutput) ElementType() reflect.Type { return reflect.TypeOf((*StandardWebTestValidationRules)(nil)).Elem() } func (o StandardWebTestValidationRulesOutput) ToStandardWebTestValidationRulesOutput() StandardWebTestValidationRulesOutput { return o } func (o StandardWebTestValidationRulesOutput) ToStandardWebTestValidationRulesOutputWithContext(ctx context.Context) StandardWebTestValidationRulesOutput { return o } func (o StandardWebTestValidationRulesOutput) ToStandardWebTestValidationRulesPtrOutput() StandardWebTestValidationRulesPtrOutput { return o.ToStandardWebTestValidationRulesPtrOutputWithContext(context.Background()) } func (o StandardWebTestValidationRulesOutput) ToStandardWebTestValidationRulesPtrOutputWithContext(ctx context.Context) StandardWebTestValidationRulesPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v StandardWebTestValidationRules) *StandardWebTestValidationRules { return &v }).(StandardWebTestValidationRulesPtrOutput) } // A `content` block as defined above. func (o StandardWebTestValidationRulesOutput) Content() StandardWebTestValidationRulesContentPtrOutput { return o.ApplyT(func(v StandardWebTestValidationRules) *StandardWebTestValidationRulesContent { return v.Content }).(StandardWebTestValidationRulesContentPtrOutput) } // The expected status code of the response. Default is '200', '0' means 'response code < 400' func (o StandardWebTestValidationRulesOutput) ExpectedStatusCode() pulumi.IntPtrOutput { return o.ApplyT(func(v StandardWebTestValidationRules) *int { return v.ExpectedStatusCode }).(pulumi.IntPtrOutput) } // The number of days of SSL certificate validity remaining for the checked endpoint. If the certificate has a shorter remaining lifetime left, the test will fail. This number should be between 1 and 365. func (o StandardWebTestValidationRulesOutput) SslCertRemainingLifetime() pulumi.IntPtrOutput { return o.ApplyT(func(v StandardWebTestValidationRules) *int { return v.SslCertRemainingLifetime }).(pulumi.IntPtrOutput) } // Should the SSL check be enabled? func (o StandardWebTestValidationRulesOutput) SslCheckEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v StandardWebTestValidationRules) *bool { return v.SslCheckEnabled }).(pulumi.BoolPtrOutput) } type StandardWebTestValidationRulesPtrOutput struct{ *pulumi.OutputState } func (StandardWebTestValidationRulesPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**StandardWebTestValidationRules)(nil)).Elem() } func (o StandardWebTestValidationRulesPtrOutput) ToStandardWebTestValidationRulesPtrOutput() StandardWebTestValidationRulesPtrOutput { return o } func (o StandardWebTestValidationRulesPtrOutput) ToStandardWebTestValidationRulesPtrOutputWithContext(ctx context.Context) StandardWebTestValidationRulesPtrOutput { return o } func (o StandardWebTestValidationRulesPtrOutput) Elem() StandardWebTestValidationRulesOutput { return o.ApplyT(func(v *StandardWebTestValidationRules) StandardWebTestValidationRules { if v != nil { return *v } var ret StandardWebTestValidationRules return ret }).(StandardWebTestValidationRulesOutput) } // A `content` block as defined above. func (o StandardWebTestValidationRulesPtrOutput) Content() StandardWebTestValidationRulesContentPtrOutput { return o.ApplyT(func(v *StandardWebTestValidationRules) *StandardWebTestValidationRulesContent { if v == nil { return nil } return v.Content }).(StandardWebTestValidationRulesContentPtrOutput) } // The expected status code of the response. Default is '200', '0' means 'response code < 400' func (o StandardWebTestValidationRulesPtrOutput) ExpectedStatusCode() pulumi.IntPtrOutput { return o.ApplyT(func(v *StandardWebTestValidationRules) *int { if v == nil { return nil } return v.ExpectedStatusCode }).(pulumi.IntPtrOutput) } // The number of days of SSL certificate validity remaining for the checked endpoint. If the certificate has a shorter remaining lifetime left, the test will fail. This number should be between 1 and 365. func (o StandardWebTestValidationRulesPtrOutput) SslCertRemainingLifetime() pulumi.IntPtrOutput { return o.ApplyT(func(v *StandardWebTestValidationRules) *int { if v == nil { return nil } return v.SslCertRemainingLifetime }).(pulumi.IntPtrOutput) } // Should the SSL check be enabled? func (o StandardWebTestValidationRulesPtrOutput) SslCheckEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *StandardWebTestValidationRules) *bool { if v == nil { return nil } return v.SslCheckEnabled }).(pulumi.BoolPtrOutput) } type StandardWebTestValidationRulesContent struct { // A string value containing the content to match on. ContentMatch string `pulumi:"contentMatch"` // Ignore the casing in the `contentMatch` value. IgnoreCase *bool `pulumi:"ignoreCase"` // If the content of `contentMatch` is found, pass the test. If set to `false`, the WebTest is failing if the content of `contentMatch` is found. PassIfTextFound *bool `pulumi:"passIfTextFound"` } // StandardWebTestValidationRulesContentInput is an input type that accepts StandardWebTestValidationRulesContentArgs and StandardWebTestValidationRulesContentOutput values. // You can construct a concrete instance of `StandardWebTestValidationRulesContentInput` via: // // StandardWebTestValidationRulesContentArgs{...} type StandardWebTestValidationRulesContentInput interface { pulumi.Input ToStandardWebTestValidationRulesContentOutput() StandardWebTestValidationRulesContentOutput ToStandardWebTestValidationRulesContentOutputWithContext(context.Context) StandardWebTestValidationRulesContentOutput } type StandardWebTestValidationRulesContentArgs struct { // A string value containing the content to match on. ContentMatch pulumi.StringInput `pulumi:"contentMatch"` // Ignore the casing in the `contentMatch` value. IgnoreCase pulumi.BoolPtrInput `pulumi:"ignoreCase"` // If the content of `contentMatch` is found, pass the test. If set to `false`, the WebTest is failing if the content of `contentMatch` is found. PassIfTextFound pulumi.BoolPtrInput `pulumi:"passIfTextFound"` } func (StandardWebTestValidationRulesContentArgs) ElementType() reflect.Type { return reflect.TypeOf((*StandardWebTestValidationRulesContent)(nil)).Elem() } func (i StandardWebTestValidationRulesContentArgs) ToStandardWebTestValidationRulesContentOutput() StandardWebTestValidationRulesContentOutput { return i.ToStandardWebTestValidationRulesContentOutputWithContext(context.Background()) } func (i StandardWebTestValidationRulesContentArgs) ToStandardWebTestValidationRulesContentOutputWithContext(ctx context.Context) StandardWebTestValidationRulesContentOutput { return pulumi.ToOutputWithContext(ctx, i).(StandardWebTestValidationRulesContentOutput) } func (i StandardWebTestValidationRulesContentArgs) ToStandardWebTestValidationRulesContentPtrOutput() StandardWebTestValidationRulesContentPtrOutput { return i.ToStandardWebTestValidationRulesContentPtrOutputWithContext(context.Background()) } func (i StandardWebTestValidationRulesContentArgs) ToStandardWebTestValidationRulesContentPtrOutputWithContext(ctx context.Context) StandardWebTestValidationRulesContentPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(StandardWebTestValidationRulesContentOutput).ToStandardWebTestValidationRulesContentPtrOutputWithContext(ctx) } // StandardWebTestValidationRulesContentPtrInput is an input type that accepts StandardWebTestValidationRulesContentArgs, StandardWebTestValidationRulesContentPtr and StandardWebTestValidationRulesContentPtrOutput values. // You can construct a concrete instance of `StandardWebTestValidationRulesContentPtrInput` via: // // StandardWebTestValidationRulesContentArgs{...} // // or: // // nil type StandardWebTestValidationRulesContentPtrInput interface { pulumi.Input ToStandardWebTestValidationRulesContentPtrOutput() StandardWebTestValidationRulesContentPtrOutput ToStandardWebTestValidationRulesContentPtrOutputWithContext(context.Context) StandardWebTestValidationRulesContentPtrOutput } type standardWebTestValidationRulesContentPtrType StandardWebTestValidationRulesContentArgs func StandardWebTestValidationRulesContentPtr(v *StandardWebTestValidationRulesContentArgs) StandardWebTestValidationRulesContentPtrInput { return (*standardWebTestValidationRulesContentPtrType)(v) } func (*standardWebTestValidationRulesContentPtrType) ElementType() reflect.Type { return reflect.TypeOf((**StandardWebTestValidationRulesContent)(nil)).Elem() } func (i *standardWebTestValidationRulesContentPtrType) ToStandardWebTestValidationRulesContentPtrOutput() StandardWebTestValidationRulesContentPtrOutput { return i.ToStandardWebTestValidationRulesContentPtrOutputWithContext(context.Background()) } func (i *standardWebTestValidationRulesContentPtrType) ToStandardWebTestValidationRulesContentPtrOutputWithContext(ctx context.Context) StandardWebTestValidationRulesContentPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(StandardWebTestValidationRulesContentPtrOutput) } type StandardWebTestValidationRulesContentOutput struct{ *pulumi.OutputState } func (StandardWebTestValidationRulesContentOutput) ElementType() reflect.Type { return reflect.TypeOf((*StandardWebTestValidationRulesContent)(nil)).Elem() } func (o StandardWebTestValidationRulesContentOutput) ToStandardWebTestValidationRulesContentOutput() StandardWebTestValidationRulesContentOutput { return o } func (o StandardWebTestValidationRulesContentOutput) ToStandardWebTestValidationRulesContentOutputWithContext(ctx context.Context) StandardWebTestValidationRulesContentOutput { return o } func (o StandardWebTestValidationRulesContentOutput) ToStandardWebTestValidationRulesContentPtrOutput() StandardWebTestValidationRulesContentPtrOutput { return o.ToStandardWebTestValidationRulesContentPtrOutputWithContext(context.Background()) } func (o StandardWebTestValidationRulesContentOutput) ToStandardWebTestValidationRulesContentPtrOutputWithContext(ctx context.Context) StandardWebTestValidationRulesContentPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v StandardWebTestValidationRulesContent) *StandardWebTestValidationRulesContent { return &v }).(StandardWebTestValidationRulesContentPtrOutput) } // A string value containing the content to match on. func (o StandardWebTestValidationRulesContentOutput) ContentMatch() pulumi.StringOutput { return o.ApplyT(func(v StandardWebTestValidationRulesContent) string { return v.ContentMatch }).(pulumi.StringOutput) } // Ignore the casing in the `contentMatch` value. func (o StandardWebTestValidationRulesContentOutput) IgnoreCase() pulumi.BoolPtrOutput { return o.ApplyT(func(v StandardWebTestValidationRulesContent) *bool { return v.IgnoreCase }).(pulumi.BoolPtrOutput) } // If the content of `contentMatch` is found, pass the test. If set to `false`, the WebTest is failing if the content of `contentMatch` is found. func (o StandardWebTestValidationRulesContentOutput) PassIfTextFound() pulumi.BoolPtrOutput { return o.ApplyT(func(v StandardWebTestValidationRulesContent) *bool { return v.PassIfTextFound }).(pulumi.BoolPtrOutput) } type StandardWebTestValidationRulesContentPtrOutput struct{ *pulumi.OutputState } func (StandardWebTestValidationRulesContentPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**StandardWebTestValidationRulesContent)(nil)).Elem() } func (o StandardWebTestValidationRulesContentPtrOutput) ToStandardWebTestValidationRulesContentPtrOutput() StandardWebTestValidationRulesContentPtrOutput { return o } func (o StandardWebTestValidationRulesContentPtrOutput) ToStandardWebTestValidationRulesContentPtrOutputWithContext(ctx context.Context) StandardWebTestValidationRulesContentPtrOutput { return o } func (o StandardWebTestValidationRulesContentPtrOutput) Elem() StandardWebTestValidationRulesContentOutput { return o.ApplyT(func(v *StandardWebTestValidationRulesContent) StandardWebTestValidationRulesContent { if v != nil { return *v } var ret StandardWebTestValidationRulesContent return ret }).(StandardWebTestValidationRulesContentOutput) } // A string value containing the content to match on. func (o StandardWebTestValidationRulesContentPtrOutput) ContentMatch() pulumi.StringPtrOutput { return o.ApplyT(func(v *StandardWebTestValidationRulesContent) *string { if v == nil { return nil } return &v.ContentMatch }).(pulumi.StringPtrOutput) } // Ignore the casing in the `contentMatch` value. func (o StandardWebTestValidationRulesContentPtrOutput) IgnoreCase() pulumi.BoolPtrOutput { return o.ApplyT(func(v *StandardWebTestValidationRulesContent) *bool { if v == nil { return nil } return v.IgnoreCase }).(pulumi.BoolPtrOutput) } // If the content of `contentMatch` is found, pass the test. If set to `false`, the WebTest is failing if the content of `contentMatch` is found. func (o StandardWebTestValidationRulesContentPtrOutput) PassIfTextFound() pulumi.BoolPtrOutput { return o.ApplyT(func(v *StandardWebTestValidationRulesContent) *bool { if v == nil { return nil } return v.PassIfTextFound }).(pulumi.BoolPtrOutput) } type WorkbookIdentity struct { // The list of User Assigned Managed Identity IDs assigned to this Workbook. Changing this forces a new resource to be created. IdentityIds []string `pulumi:"identityIds"` // The Principal ID of the System Assigned Managed Service Identity that is configured on this Workbook. PrincipalId *string `pulumi:"principalId"` // The Tenant ID of the System Assigned Managed Service Identity that is configured on this Workbook. TenantId *string `pulumi:"tenantId"`
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appinsights/apiKey.go
sdk/go/azure/appinsights/apiKey.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appinsights import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Application Insights API key. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("tf-test"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{ // Name: pulumi.String("tf-test-appinsights"), // Location: example.Location, // ResourceGroupName: example.Name, // ApplicationType: pulumi.String("web"), // }) // if err != nil { // return err // } // readTelemetry, err := appinsights.NewApiKey(ctx, "read_telemetry", &appinsights.ApiKeyArgs{ // Name: pulumi.String("tf-test-appinsights-read-telemetry-api-key"), // ApplicationInsightsId: exampleInsights.ID(), // ReadPermissions: pulumi.StringArray{ // pulumi.String("aggregate"), // pulumi.String("api"), // pulumi.String("draft"), // pulumi.String("extendqueries"), // pulumi.String("search"), // }, // }) // if err != nil { // return err // } // writeAnnotations, err := appinsights.NewApiKey(ctx, "write_annotations", &appinsights.ApiKeyArgs{ // Name: pulumi.String("tf-test-appinsights-write-annotations-api-key"), // ApplicationInsightsId: exampleInsights.ID(), // WritePermissions: pulumi.StringArray{ // pulumi.String("annotations"), // }, // }) // if err != nil { // return err // } // authenticateSdkControlChannel, err := appinsights.NewApiKey(ctx, "authenticate_sdk_control_channel", &appinsights.ApiKeyArgs{ // Name: pulumi.String("tf-test-appinsights-authenticate-sdk-control-channel-api-key"), // ApplicationInsightsId: exampleInsights.ID(), // ReadPermissions: pulumi.StringArray{ // pulumi.String("agentconfig"), // }, // }) // if err != nil { // return err // } // fullPermissions, err := appinsights.NewApiKey(ctx, "full_permissions", &appinsights.ApiKeyArgs{ // Name: pulumi.String("tf-test-appinsights-full-permissions-api-key"), // ApplicationInsightsId: exampleInsights.ID(), // ReadPermissions: pulumi.StringArray{ // pulumi.String("agentconfig"), // pulumi.String("aggregate"), // pulumi.String("api"), // pulumi.String("draft"), // pulumi.String("extendqueries"), // pulumi.String("search"), // }, // WritePermissions: pulumi.StringArray{ // pulumi.String("annotations"), // }, // }) // if err != nil { // return err // } // ctx.Export("readTelemetryApiKey", readTelemetry.ApiKey) // ctx.Export("writeAnnotationsApiKey", writeAnnotations.ApiKey) // ctx.Export("authenticateSdkControlChannel", authenticateSdkControlChannel.ApiKey) // ctx.Export("fullPermissionsApiKey", fullPermissions.ApiKey) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Insights` - 2015-05-01 // // ## Import // // Application Insights API keys can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appinsights/apiKey:ApiKey my_key /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Insights/components/instance1/apiKeys/00000000-0000-0000-0000-000000000000 // ``` type ApiKey struct { pulumi.CustomResourceState // The API Key secret (Sensitive). ApiKey pulumi.StringOutput `pulumi:"apiKey"` // The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created. ApplicationInsightsId pulumi.StringOutput `pulumi:"applicationInsightsId"` // Specifies the name of the Application Insights API key. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the list of read permissions granted to the API key. Valid values are `agentconfig`, `aggregate`, `api`, `draft`, `extendqueries`, `search`. Please note these values are case sensitive. Changing this forces a new resource to be created. ReadPermissions pulumi.StringArrayOutput `pulumi:"readPermissions"` // Specifies the list of write permissions granted to the API key. Valid values are `annotations`. Please note these values are case sensitive. Changing this forces a new resource to be created. // // > **Note:** At least one read or write permission must be defined. WritePermissions pulumi.StringArrayOutput `pulumi:"writePermissions"` } // NewApiKey registers a new resource with the given unique name, arguments, and options. func NewApiKey(ctx *pulumi.Context, name string, args *ApiKeyArgs, opts ...pulumi.ResourceOption) (*ApiKey, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApplicationInsightsId == nil { return nil, errors.New("invalid value for required argument 'ApplicationInsightsId'") } secrets := pulumi.AdditionalSecretOutputs([]string{ "apiKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource ApiKey err := ctx.RegisterResource("azure:appinsights/apiKey:ApiKey", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetApiKey gets an existing ApiKey resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetApiKey(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ApiKeyState, opts ...pulumi.ResourceOption) (*ApiKey, error) { var resource ApiKey err := ctx.ReadResource("azure:appinsights/apiKey:ApiKey", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ApiKey resources. type apiKeyState struct { // The API Key secret (Sensitive). ApiKey *string `pulumi:"apiKey"` // The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created. ApplicationInsightsId *string `pulumi:"applicationInsightsId"` // Specifies the name of the Application Insights API key. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the list of read permissions granted to the API key. Valid values are `agentconfig`, `aggregate`, `api`, `draft`, `extendqueries`, `search`. Please note these values are case sensitive. Changing this forces a new resource to be created. ReadPermissions []string `pulumi:"readPermissions"` // Specifies the list of write permissions granted to the API key. Valid values are `annotations`. Please note these values are case sensitive. Changing this forces a new resource to be created. // // > **Note:** At least one read or write permission must be defined. WritePermissions []string `pulumi:"writePermissions"` } type ApiKeyState struct { // The API Key secret (Sensitive). ApiKey pulumi.StringPtrInput // The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created. ApplicationInsightsId pulumi.StringPtrInput // Specifies the name of the Application Insights API key. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the list of read permissions granted to the API key. Valid values are `agentconfig`, `aggregate`, `api`, `draft`, `extendqueries`, `search`. Please note these values are case sensitive. Changing this forces a new resource to be created. ReadPermissions pulumi.StringArrayInput // Specifies the list of write permissions granted to the API key. Valid values are `annotations`. Please note these values are case sensitive. Changing this forces a new resource to be created. // // > **Note:** At least one read or write permission must be defined. WritePermissions pulumi.StringArrayInput } func (ApiKeyState) ElementType() reflect.Type { return reflect.TypeOf((*apiKeyState)(nil)).Elem() } type apiKeyArgs struct { // The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created. ApplicationInsightsId string `pulumi:"applicationInsightsId"` // Specifies the name of the Application Insights API key. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the list of read permissions granted to the API key. Valid values are `agentconfig`, `aggregate`, `api`, `draft`, `extendqueries`, `search`. Please note these values are case sensitive. Changing this forces a new resource to be created. ReadPermissions []string `pulumi:"readPermissions"` // Specifies the list of write permissions granted to the API key. Valid values are `annotations`. Please note these values are case sensitive. Changing this forces a new resource to be created. // // > **Note:** At least one read or write permission must be defined. WritePermissions []string `pulumi:"writePermissions"` } // The set of arguments for constructing a ApiKey resource. type ApiKeyArgs struct { // The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created. ApplicationInsightsId pulumi.StringInput // Specifies the name of the Application Insights API key. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the list of read permissions granted to the API key. Valid values are `agentconfig`, `aggregate`, `api`, `draft`, `extendqueries`, `search`. Please note these values are case sensitive. Changing this forces a new resource to be created. ReadPermissions pulumi.StringArrayInput // Specifies the list of write permissions granted to the API key. Valid values are `annotations`. Please note these values are case sensitive. Changing this forces a new resource to be created. // // > **Note:** At least one read or write permission must be defined. WritePermissions pulumi.StringArrayInput } func (ApiKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*apiKeyArgs)(nil)).Elem() } type ApiKeyInput interface { pulumi.Input ToApiKeyOutput() ApiKeyOutput ToApiKeyOutputWithContext(ctx context.Context) ApiKeyOutput } func (*ApiKey) ElementType() reflect.Type { return reflect.TypeOf((**ApiKey)(nil)).Elem() } func (i *ApiKey) ToApiKeyOutput() ApiKeyOutput { return i.ToApiKeyOutputWithContext(context.Background()) } func (i *ApiKey) ToApiKeyOutputWithContext(ctx context.Context) ApiKeyOutput { return pulumi.ToOutputWithContext(ctx, i).(ApiKeyOutput) } // ApiKeyArrayInput is an input type that accepts ApiKeyArray and ApiKeyArrayOutput values. // You can construct a concrete instance of `ApiKeyArrayInput` via: // // ApiKeyArray{ ApiKeyArgs{...} } type ApiKeyArrayInput interface { pulumi.Input ToApiKeyArrayOutput() ApiKeyArrayOutput ToApiKeyArrayOutputWithContext(context.Context) ApiKeyArrayOutput } type ApiKeyArray []ApiKeyInput func (ApiKeyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ApiKey)(nil)).Elem() } func (i ApiKeyArray) ToApiKeyArrayOutput() ApiKeyArrayOutput { return i.ToApiKeyArrayOutputWithContext(context.Background()) } func (i ApiKeyArray) ToApiKeyArrayOutputWithContext(ctx context.Context) ApiKeyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ApiKeyArrayOutput) } // ApiKeyMapInput is an input type that accepts ApiKeyMap and ApiKeyMapOutput values. // You can construct a concrete instance of `ApiKeyMapInput` via: // // ApiKeyMap{ "key": ApiKeyArgs{...} } type ApiKeyMapInput interface { pulumi.Input ToApiKeyMapOutput() ApiKeyMapOutput ToApiKeyMapOutputWithContext(context.Context) ApiKeyMapOutput } type ApiKeyMap map[string]ApiKeyInput func (ApiKeyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ApiKey)(nil)).Elem() } func (i ApiKeyMap) ToApiKeyMapOutput() ApiKeyMapOutput { return i.ToApiKeyMapOutputWithContext(context.Background()) } func (i ApiKeyMap) ToApiKeyMapOutputWithContext(ctx context.Context) ApiKeyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ApiKeyMapOutput) } type ApiKeyOutput struct{ *pulumi.OutputState } func (ApiKeyOutput) ElementType() reflect.Type { return reflect.TypeOf((**ApiKey)(nil)).Elem() } func (o ApiKeyOutput) ToApiKeyOutput() ApiKeyOutput { return o } func (o ApiKeyOutput) ToApiKeyOutputWithContext(ctx context.Context) ApiKeyOutput { return o } // The API Key secret (Sensitive). func (o ApiKeyOutput) ApiKey() pulumi.StringOutput { return o.ApplyT(func(v *ApiKey) pulumi.StringOutput { return v.ApiKey }).(pulumi.StringOutput) } // The ID of the Application Insights component on which the API key operates. Changing this forces a new resource to be created. func (o ApiKeyOutput) ApplicationInsightsId() pulumi.StringOutput { return o.ApplyT(func(v *ApiKey) pulumi.StringOutput { return v.ApplicationInsightsId }).(pulumi.StringOutput) } // Specifies the name of the Application Insights API key. Changing this forces a new resource to be created. func (o ApiKeyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ApiKey) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the list of read permissions granted to the API key. Valid values are `agentconfig`, `aggregate`, `api`, `draft`, `extendqueries`, `search`. Please note these values are case sensitive. Changing this forces a new resource to be created. func (o ApiKeyOutput) ReadPermissions() pulumi.StringArrayOutput { return o.ApplyT(func(v *ApiKey) pulumi.StringArrayOutput { return v.ReadPermissions }).(pulumi.StringArrayOutput) } // Specifies the list of write permissions granted to the API key. Valid values are `annotations`. Please note these values are case sensitive. Changing this forces a new resource to be created. // // > **Note:** At least one read or write permission must be defined. func (o ApiKeyOutput) WritePermissions() pulumi.StringArrayOutput { return o.ApplyT(func(v *ApiKey) pulumi.StringArrayOutput { return v.WritePermissions }).(pulumi.StringArrayOutput) } type ApiKeyArrayOutput struct{ *pulumi.OutputState } func (ApiKeyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ApiKey)(nil)).Elem() } func (o ApiKeyArrayOutput) ToApiKeyArrayOutput() ApiKeyArrayOutput { return o } func (o ApiKeyArrayOutput) ToApiKeyArrayOutputWithContext(ctx context.Context) ApiKeyArrayOutput { return o } func (o ApiKeyArrayOutput) Index(i pulumi.IntInput) ApiKeyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApiKey { return vs[0].([]*ApiKey)[vs[1].(int)] }).(ApiKeyOutput) } type ApiKeyMapOutput struct{ *pulumi.OutputState } func (ApiKeyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ApiKey)(nil)).Elem() } func (o ApiKeyMapOutput) ToApiKeyMapOutput() ApiKeyMapOutput { return o } func (o ApiKeyMapOutput) ToApiKeyMapOutputWithContext(ctx context.Context) ApiKeyMapOutput { return o } func (o ApiKeyMapOutput) MapIndex(k pulumi.StringInput) ApiKeyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApiKey { return vs[0].(map[string]*ApiKey)[vs[1].(string)] }).(ApiKeyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ApiKeyInput)(nil)).Elem(), &ApiKey{}) pulumi.RegisterInputType(reflect.TypeOf((*ApiKeyArrayInput)(nil)).Elem(), ApiKeyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ApiKeyMapInput)(nil)).Elem(), ApiKeyMap{}) pulumi.RegisterOutputType(ApiKeyOutput{}) pulumi.RegisterOutputType(ApiKeyArrayOutput{}) pulumi.RegisterOutputType(ApiKeyMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appinsights/smartDetectionRule.go
sdk/go/azure/appinsights/smartDetectionRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appinsights import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Application Insights Smart Detection Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("tf-test"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{ // Name: pulumi.String("tf-test-appinsights"), // Location: example.Location, // ResourceGroupName: example.Name, // ApplicationType: pulumi.String("web"), // }) // if err != nil { // return err // } // _, err = appinsights.NewSmartDetectionRule(ctx, "example", &appinsights.SmartDetectionRuleArgs{ // Name: pulumi.String("Slow server response time"), // ApplicationInsightsId: exampleInsights.ID(), // Enabled: pulumi.Bool(false), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Insights` - 2015-05-01 // // ## Import // // Application Insights Smart Detection Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appinsights/smartDetectionRule:SmartDetectionRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Insights/components/mycomponent1/proactiveDetectionConfigs/myrule1 // ``` type SmartDetectionRule struct { pulumi.CustomResourceState // Specifies a list of additional recipients that will be sent emails on this Application Insights Smart Detection Rule. // // > **Note:** At least one read or write permission must be defined. AdditionalEmailRecipients pulumi.StringArrayOutput `pulumi:"additionalEmailRecipients"` // The ID of the Application Insights component on which the Smart Detection Rule operates. Changing this forces a new resource to be created. ApplicationInsightsId pulumi.StringOutput `pulumi:"applicationInsightsId"` // Is the Application Insights Smart Detection Rule enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // Specifies the name of the Application Insights Smart Detection Rule. Valid values include `Slow page load time`, `Slow server response time`, `Potential memory leak detected`, `Potential security issue detected`, `Long dependency duration`, `Degradation in server response time`, `Degradation in dependency duration`, `Degradation in trace severity ratio`, `Abnormal rise in exception volume`, `Abnormal rise in daily data volume`. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Do emails get sent to subscription owners? Defaults to `true`. SendEmailsToSubscriptionOwners pulumi.BoolPtrOutput `pulumi:"sendEmailsToSubscriptionOwners"` } // NewSmartDetectionRule registers a new resource with the given unique name, arguments, and options. func NewSmartDetectionRule(ctx *pulumi.Context, name string, args *SmartDetectionRuleArgs, opts ...pulumi.ResourceOption) (*SmartDetectionRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApplicationInsightsId == nil { return nil, errors.New("invalid value for required argument 'ApplicationInsightsId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SmartDetectionRule err := ctx.RegisterResource("azure:appinsights/smartDetectionRule:SmartDetectionRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSmartDetectionRule gets an existing SmartDetectionRule resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetSmartDetectionRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SmartDetectionRuleState, opts ...pulumi.ResourceOption) (*SmartDetectionRule, error) { var resource SmartDetectionRule err := ctx.ReadResource("azure:appinsights/smartDetectionRule:SmartDetectionRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SmartDetectionRule resources. type smartDetectionRuleState struct { // Specifies a list of additional recipients that will be sent emails on this Application Insights Smart Detection Rule. // // > **Note:** At least one read or write permission must be defined. AdditionalEmailRecipients []string `pulumi:"additionalEmailRecipients"` // The ID of the Application Insights component on which the Smart Detection Rule operates. Changing this forces a new resource to be created. ApplicationInsightsId *string `pulumi:"applicationInsightsId"` // Is the Application Insights Smart Detection Rule enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // Specifies the name of the Application Insights Smart Detection Rule. Valid values include `Slow page load time`, `Slow server response time`, `Potential memory leak detected`, `Potential security issue detected`, `Long dependency duration`, `Degradation in server response time`, `Degradation in dependency duration`, `Degradation in trace severity ratio`, `Abnormal rise in exception volume`, `Abnormal rise in daily data volume`. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Do emails get sent to subscription owners? Defaults to `true`. SendEmailsToSubscriptionOwners *bool `pulumi:"sendEmailsToSubscriptionOwners"` } type SmartDetectionRuleState struct { // Specifies a list of additional recipients that will be sent emails on this Application Insights Smart Detection Rule. // // > **Note:** At least one read or write permission must be defined. AdditionalEmailRecipients pulumi.StringArrayInput // The ID of the Application Insights component on which the Smart Detection Rule operates. Changing this forces a new resource to be created. ApplicationInsightsId pulumi.StringPtrInput // Is the Application Insights Smart Detection Rule enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // Specifies the name of the Application Insights Smart Detection Rule. Valid values include `Slow page load time`, `Slow server response time`, `Potential memory leak detected`, `Potential security issue detected`, `Long dependency duration`, `Degradation in server response time`, `Degradation in dependency duration`, `Degradation in trace severity ratio`, `Abnormal rise in exception volume`, `Abnormal rise in daily data volume`. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Do emails get sent to subscription owners? Defaults to `true`. SendEmailsToSubscriptionOwners pulumi.BoolPtrInput } func (SmartDetectionRuleState) ElementType() reflect.Type { return reflect.TypeOf((*smartDetectionRuleState)(nil)).Elem() } type smartDetectionRuleArgs struct { // Specifies a list of additional recipients that will be sent emails on this Application Insights Smart Detection Rule. // // > **Note:** At least one read or write permission must be defined. AdditionalEmailRecipients []string `pulumi:"additionalEmailRecipients"` // The ID of the Application Insights component on which the Smart Detection Rule operates. Changing this forces a new resource to be created. ApplicationInsightsId string `pulumi:"applicationInsightsId"` // Is the Application Insights Smart Detection Rule enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // Specifies the name of the Application Insights Smart Detection Rule. Valid values include `Slow page load time`, `Slow server response time`, `Potential memory leak detected`, `Potential security issue detected`, `Long dependency duration`, `Degradation in server response time`, `Degradation in dependency duration`, `Degradation in trace severity ratio`, `Abnormal rise in exception volume`, `Abnormal rise in daily data volume`. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Do emails get sent to subscription owners? Defaults to `true`. SendEmailsToSubscriptionOwners *bool `pulumi:"sendEmailsToSubscriptionOwners"` } // The set of arguments for constructing a SmartDetectionRule resource. type SmartDetectionRuleArgs struct { // Specifies a list of additional recipients that will be sent emails on this Application Insights Smart Detection Rule. // // > **Note:** At least one read or write permission must be defined. AdditionalEmailRecipients pulumi.StringArrayInput // The ID of the Application Insights component on which the Smart Detection Rule operates. Changing this forces a new resource to be created. ApplicationInsightsId pulumi.StringInput // Is the Application Insights Smart Detection Rule enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // Specifies the name of the Application Insights Smart Detection Rule. Valid values include `Slow page load time`, `Slow server response time`, `Potential memory leak detected`, `Potential security issue detected`, `Long dependency duration`, `Degradation in server response time`, `Degradation in dependency duration`, `Degradation in trace severity ratio`, `Abnormal rise in exception volume`, `Abnormal rise in daily data volume`. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Do emails get sent to subscription owners? Defaults to `true`. SendEmailsToSubscriptionOwners pulumi.BoolPtrInput } func (SmartDetectionRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*smartDetectionRuleArgs)(nil)).Elem() } type SmartDetectionRuleInput interface { pulumi.Input ToSmartDetectionRuleOutput() SmartDetectionRuleOutput ToSmartDetectionRuleOutputWithContext(ctx context.Context) SmartDetectionRuleOutput } func (*SmartDetectionRule) ElementType() reflect.Type { return reflect.TypeOf((**SmartDetectionRule)(nil)).Elem() } func (i *SmartDetectionRule) ToSmartDetectionRuleOutput() SmartDetectionRuleOutput { return i.ToSmartDetectionRuleOutputWithContext(context.Background()) } func (i *SmartDetectionRule) ToSmartDetectionRuleOutputWithContext(ctx context.Context) SmartDetectionRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(SmartDetectionRuleOutput) } // SmartDetectionRuleArrayInput is an input type that accepts SmartDetectionRuleArray and SmartDetectionRuleArrayOutput values. // You can construct a concrete instance of `SmartDetectionRuleArrayInput` via: // // SmartDetectionRuleArray{ SmartDetectionRuleArgs{...} } type SmartDetectionRuleArrayInput interface { pulumi.Input ToSmartDetectionRuleArrayOutput() SmartDetectionRuleArrayOutput ToSmartDetectionRuleArrayOutputWithContext(context.Context) SmartDetectionRuleArrayOutput } type SmartDetectionRuleArray []SmartDetectionRuleInput func (SmartDetectionRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SmartDetectionRule)(nil)).Elem() } func (i SmartDetectionRuleArray) ToSmartDetectionRuleArrayOutput() SmartDetectionRuleArrayOutput { return i.ToSmartDetectionRuleArrayOutputWithContext(context.Background()) } func (i SmartDetectionRuleArray) ToSmartDetectionRuleArrayOutputWithContext(ctx context.Context) SmartDetectionRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SmartDetectionRuleArrayOutput) } // SmartDetectionRuleMapInput is an input type that accepts SmartDetectionRuleMap and SmartDetectionRuleMapOutput values. // You can construct a concrete instance of `SmartDetectionRuleMapInput` via: // // SmartDetectionRuleMap{ "key": SmartDetectionRuleArgs{...} } type SmartDetectionRuleMapInput interface { pulumi.Input ToSmartDetectionRuleMapOutput() SmartDetectionRuleMapOutput ToSmartDetectionRuleMapOutputWithContext(context.Context) SmartDetectionRuleMapOutput } type SmartDetectionRuleMap map[string]SmartDetectionRuleInput func (SmartDetectionRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SmartDetectionRule)(nil)).Elem() } func (i SmartDetectionRuleMap) ToSmartDetectionRuleMapOutput() SmartDetectionRuleMapOutput { return i.ToSmartDetectionRuleMapOutputWithContext(context.Background()) } func (i SmartDetectionRuleMap) ToSmartDetectionRuleMapOutputWithContext(ctx context.Context) SmartDetectionRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SmartDetectionRuleMapOutput) } type SmartDetectionRuleOutput struct{ *pulumi.OutputState } func (SmartDetectionRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**SmartDetectionRule)(nil)).Elem() } func (o SmartDetectionRuleOutput) ToSmartDetectionRuleOutput() SmartDetectionRuleOutput { return o } func (o SmartDetectionRuleOutput) ToSmartDetectionRuleOutputWithContext(ctx context.Context) SmartDetectionRuleOutput { return o } // Specifies a list of additional recipients that will be sent emails on this Application Insights Smart Detection Rule. // // > **Note:** At least one read or write permission must be defined. func (o SmartDetectionRuleOutput) AdditionalEmailRecipients() pulumi.StringArrayOutput { return o.ApplyT(func(v *SmartDetectionRule) pulumi.StringArrayOutput { return v.AdditionalEmailRecipients }).(pulumi.StringArrayOutput) } // The ID of the Application Insights component on which the Smart Detection Rule operates. Changing this forces a new resource to be created. func (o SmartDetectionRuleOutput) ApplicationInsightsId() pulumi.StringOutput { return o.ApplyT(func(v *SmartDetectionRule) pulumi.StringOutput { return v.ApplicationInsightsId }).(pulumi.StringOutput) } // Is the Application Insights Smart Detection Rule enabled? Defaults to `true`. func (o SmartDetectionRuleOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *SmartDetectionRule) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // Specifies the name of the Application Insights Smart Detection Rule. Valid values include `Slow page load time`, `Slow server response time`, `Potential memory leak detected`, `Potential security issue detected`, `Long dependency duration`, `Degradation in server response time`, `Degradation in dependency duration`, `Degradation in trace severity ratio`, `Abnormal rise in exception volume`, `Abnormal rise in daily data volume`. Changing this forces a new resource to be created. func (o SmartDetectionRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SmartDetectionRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Do emails get sent to subscription owners? Defaults to `true`. func (o SmartDetectionRuleOutput) SendEmailsToSubscriptionOwners() pulumi.BoolPtrOutput { return o.ApplyT(func(v *SmartDetectionRule) pulumi.BoolPtrOutput { return v.SendEmailsToSubscriptionOwners }).(pulumi.BoolPtrOutput) } type SmartDetectionRuleArrayOutput struct{ *pulumi.OutputState } func (SmartDetectionRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SmartDetectionRule)(nil)).Elem() } func (o SmartDetectionRuleArrayOutput) ToSmartDetectionRuleArrayOutput() SmartDetectionRuleArrayOutput { return o } func (o SmartDetectionRuleArrayOutput) ToSmartDetectionRuleArrayOutputWithContext(ctx context.Context) SmartDetectionRuleArrayOutput { return o } func (o SmartDetectionRuleArrayOutput) Index(i pulumi.IntInput) SmartDetectionRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SmartDetectionRule { return vs[0].([]*SmartDetectionRule)[vs[1].(int)] }).(SmartDetectionRuleOutput) } type SmartDetectionRuleMapOutput struct{ *pulumi.OutputState } func (SmartDetectionRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SmartDetectionRule)(nil)).Elem() } func (o SmartDetectionRuleMapOutput) ToSmartDetectionRuleMapOutput() SmartDetectionRuleMapOutput { return o } func (o SmartDetectionRuleMapOutput) ToSmartDetectionRuleMapOutputWithContext(ctx context.Context) SmartDetectionRuleMapOutput { return o } func (o SmartDetectionRuleMapOutput) MapIndex(k pulumi.StringInput) SmartDetectionRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SmartDetectionRule { return vs[0].(map[string]*SmartDetectionRule)[vs[1].(string)] }).(SmartDetectionRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SmartDetectionRuleInput)(nil)).Elem(), &SmartDetectionRule{}) pulumi.RegisterInputType(reflect.TypeOf((*SmartDetectionRuleArrayInput)(nil)).Elem(), SmartDetectionRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SmartDetectionRuleMapInput)(nil)).Elem(), SmartDetectionRuleMap{}) pulumi.RegisterOutputType(SmartDetectionRuleOutput{}) pulumi.RegisterOutputType(SmartDetectionRuleArrayOutput{}) pulumi.RegisterOutputType(SmartDetectionRuleMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appinsights/getInsights.go
sdk/go/azure/appinsights/getInsights.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appinsights import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Application Insights component. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := appinsights.LookupInsights(ctx, &appinsights.LookupInsightsArgs{ // Name: "production", // ResourceGroupName: "networking", // }, nil) // if err != nil { // return err // } // ctx.Export("applicationInsightsInstrumentationKey", example.InstrumentationKey) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Insights` - 2020-02-02 func LookupInsights(ctx *pulumi.Context, args *LookupInsightsArgs, opts ...pulumi.InvokeOption) (*LookupInsightsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupInsightsResult err := ctx.Invoke("azure:appinsights/getInsights:getInsights", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getInsights. type LookupInsightsArgs struct { // Specifies the name of the Application Insights component. Name string `pulumi:"name"` // Specifies the name of the resource group the Application Insights component is located in. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getInsights. type LookupInsightsResult struct { // The App ID associated with this Application Insights component. AppId string `pulumi:"appId"` // The type of the component. ApplicationType string `pulumi:"applicationType"` // The connection string of the Application Insights component. (Sensitive) ConnectionString string `pulumi:"connectionString"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The instrumentation key of the Application Insights component. InstrumentationKey string `pulumi:"instrumentationKey"` // The Azure location where the component exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // The retention period in days. RetentionInDays int `pulumi:"retentionInDays"` // Tags applied to the component. Tags map[string]string `pulumi:"tags"` // The id of the associated Log Analytics workspace WorkspaceId string `pulumi:"workspaceId"` } func LookupInsightsOutput(ctx *pulumi.Context, args LookupInsightsOutputArgs, opts ...pulumi.InvokeOption) LookupInsightsResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupInsightsResultOutput, error) { args := v.(LookupInsightsArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:appinsights/getInsights:getInsights", args, LookupInsightsResultOutput{}, options).(LookupInsightsResultOutput), nil }).(LookupInsightsResultOutput) } // A collection of arguments for invoking getInsights. type LookupInsightsOutputArgs struct { // Specifies the name of the Application Insights component. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group the Application Insights component is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupInsightsOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupInsightsArgs)(nil)).Elem() } // A collection of values returned by getInsights. type LookupInsightsResultOutput struct{ *pulumi.OutputState } func (LookupInsightsResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupInsightsResult)(nil)).Elem() } func (o LookupInsightsResultOutput) ToLookupInsightsResultOutput() LookupInsightsResultOutput { return o } func (o LookupInsightsResultOutput) ToLookupInsightsResultOutputWithContext(ctx context.Context) LookupInsightsResultOutput { return o } // The App ID associated with this Application Insights component. func (o LookupInsightsResultOutput) AppId() pulumi.StringOutput { return o.ApplyT(func(v LookupInsightsResult) string { return v.AppId }).(pulumi.StringOutput) } // The type of the component. func (o LookupInsightsResultOutput) ApplicationType() pulumi.StringOutput { return o.ApplyT(func(v LookupInsightsResult) string { return v.ApplicationType }).(pulumi.StringOutput) } // The connection string of the Application Insights component. (Sensitive) func (o LookupInsightsResultOutput) ConnectionString() pulumi.StringOutput { return o.ApplyT(func(v LookupInsightsResult) string { return v.ConnectionString }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupInsightsResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupInsightsResult) string { return v.Id }).(pulumi.StringOutput) } // The instrumentation key of the Application Insights component. func (o LookupInsightsResultOutput) InstrumentationKey() pulumi.StringOutput { return o.ApplyT(func(v LookupInsightsResult) string { return v.InstrumentationKey }).(pulumi.StringOutput) } // The Azure location where the component exists. func (o LookupInsightsResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupInsightsResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupInsightsResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupInsightsResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupInsightsResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupInsightsResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The retention period in days. func (o LookupInsightsResultOutput) RetentionInDays() pulumi.IntOutput { return o.ApplyT(func(v LookupInsightsResult) int { return v.RetentionInDays }).(pulumi.IntOutput) } // Tags applied to the component. func (o LookupInsightsResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupInsightsResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The id of the associated Log Analytics workspace func (o LookupInsightsResultOutput) WorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v LookupInsightsResult) string { return v.WorkspaceId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupInsightsResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appinsights/standardWebTest.go
sdk/go/azure/appinsights/standardWebTest.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appinsights import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Application Insights Standard WebTest. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("rg-example"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // ApplicationType: pulumi.String("web"), // }) // if err != nil { // return err // } // _, err = appinsights.NewStandardWebTest(ctx, "example", &appinsights.StandardWebTestArgs{ // Name: pulumi.String("example-test"), // ResourceGroupName: example.Name, // Location: pulumi.String("West Europe"), // ApplicationInsightsId: exampleInsights.ID(), // GeoLocations: pulumi.StringArray{ // pulumi.String("example"), // }, // Request: &appinsights.StandardWebTestRequestArgs{ // Url: pulumi.String("http://www.example.com"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Insights` - 2022-06-15 // // ## Import // // Application Insights Standard WebTests can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appinsights/standardWebTest:StandardWebTest example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Insights/webTests/appinsightswebtest // ``` type StandardWebTest struct { pulumi.CustomResourceState // The ID of the Application Insights instance on which the WebTest operates. Changing this forces a new Application Insights Standard WebTest to be created. ApplicationInsightsId pulumi.StringOutput `pulumi:"applicationInsightsId"` // Purpose/user defined descriptive test for this WebTest. Description pulumi.StringPtrOutput `pulumi:"description"` // Should the WebTest be enabled? Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // Interval in seconds between test runs for this WebTest. Valid options are `300`, `600` and `900`. Defaults to `300`. Frequency pulumi.IntPtrOutput `pulumi:"frequency"` // Specifies a list of where to physically run the tests from to give global coverage for accessibility of your application. // // > **Note:** [Valid options for geo locations are described here](https://docs.microsoft.com/azure/azure-monitor/app/monitor-web-app-availability#location-population-tags) GeoLocations pulumi.StringArrayOutput `pulumi:"geoLocations"` // The Azure Region where the Application Insights Standard WebTest should exist. Changing this forces a new Application Insights Standard WebTest to be created. It needs to correlate with location of the parent resource (azurerm_application_insights) Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Application Insights Standard WebTest. Changing this forces a new Application Insights Standard WebTest to be created. Name pulumi.StringOutput `pulumi:"name"` // A `request` block as defined below. Request StandardWebTestRequestOutput `pulumi:"request"` // The name of the Resource Group where the Application Insights Standard WebTest should exist. Changing this forces a new Application Insights Standard WebTest to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Should the retry on WebTest failure be enabled? RetryEnabled pulumi.BoolPtrOutput `pulumi:"retryEnabled"` // Unique ID of this WebTest. This is typically the same value as the Name field. SyntheticMonitorId pulumi.StringOutput `pulumi:"syntheticMonitorId"` // A mapping of tags which should be assigned to the Application Insights Standard WebTest. Tags pulumi.StringMapOutput `pulumi:"tags"` // Seconds until this WebTest will timeout and fail. Default is `30`. Timeout pulumi.IntPtrOutput `pulumi:"timeout"` // A `validationRules` block as defined below. ValidationRules StandardWebTestValidationRulesPtrOutput `pulumi:"validationRules"` } // NewStandardWebTest registers a new resource with the given unique name, arguments, and options. func NewStandardWebTest(ctx *pulumi.Context, name string, args *StandardWebTestArgs, opts ...pulumi.ResourceOption) (*StandardWebTest, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApplicationInsightsId == nil { return nil, errors.New("invalid value for required argument 'ApplicationInsightsId'") } if args.GeoLocations == nil { return nil, errors.New("invalid value for required argument 'GeoLocations'") } if args.Request == nil { return nil, errors.New("invalid value for required argument 'Request'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource StandardWebTest err := ctx.RegisterResource("azure:appinsights/standardWebTest:StandardWebTest", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetStandardWebTest gets an existing StandardWebTest resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetStandardWebTest(ctx *pulumi.Context, name string, id pulumi.IDInput, state *StandardWebTestState, opts ...pulumi.ResourceOption) (*StandardWebTest, error) { var resource StandardWebTest err := ctx.ReadResource("azure:appinsights/standardWebTest:StandardWebTest", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering StandardWebTest resources. type standardWebTestState struct { // The ID of the Application Insights instance on which the WebTest operates. Changing this forces a new Application Insights Standard WebTest to be created. ApplicationInsightsId *string `pulumi:"applicationInsightsId"` // Purpose/user defined descriptive test for this WebTest. Description *string `pulumi:"description"` // Should the WebTest be enabled? Enabled *bool `pulumi:"enabled"` // Interval in seconds between test runs for this WebTest. Valid options are `300`, `600` and `900`. Defaults to `300`. Frequency *int `pulumi:"frequency"` // Specifies a list of where to physically run the tests from to give global coverage for accessibility of your application. // // > **Note:** [Valid options for geo locations are described here](https://docs.microsoft.com/azure/azure-monitor/app/monitor-web-app-availability#location-population-tags) GeoLocations []string `pulumi:"geoLocations"` // The Azure Region where the Application Insights Standard WebTest should exist. Changing this forces a new Application Insights Standard WebTest to be created. It needs to correlate with location of the parent resource (azurerm_application_insights) Location *string `pulumi:"location"` // The name which should be used for this Application Insights Standard WebTest. Changing this forces a new Application Insights Standard WebTest to be created. Name *string `pulumi:"name"` // A `request` block as defined below. Request *StandardWebTestRequest `pulumi:"request"` // The name of the Resource Group where the Application Insights Standard WebTest should exist. Changing this forces a new Application Insights Standard WebTest to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Should the retry on WebTest failure be enabled? RetryEnabled *bool `pulumi:"retryEnabled"` // Unique ID of this WebTest. This is typically the same value as the Name field. SyntheticMonitorId *string `pulumi:"syntheticMonitorId"` // A mapping of tags which should be assigned to the Application Insights Standard WebTest. Tags map[string]string `pulumi:"tags"` // Seconds until this WebTest will timeout and fail. Default is `30`. Timeout *int `pulumi:"timeout"` // A `validationRules` block as defined below. ValidationRules *StandardWebTestValidationRules `pulumi:"validationRules"` } type StandardWebTestState struct { // The ID of the Application Insights instance on which the WebTest operates. Changing this forces a new Application Insights Standard WebTest to be created. ApplicationInsightsId pulumi.StringPtrInput // Purpose/user defined descriptive test for this WebTest. Description pulumi.StringPtrInput // Should the WebTest be enabled? Enabled pulumi.BoolPtrInput // Interval in seconds between test runs for this WebTest. Valid options are `300`, `600` and `900`. Defaults to `300`. Frequency pulumi.IntPtrInput // Specifies a list of where to physically run the tests from to give global coverage for accessibility of your application. // // > **Note:** [Valid options for geo locations are described here](https://docs.microsoft.com/azure/azure-monitor/app/monitor-web-app-availability#location-population-tags) GeoLocations pulumi.StringArrayInput // The Azure Region where the Application Insights Standard WebTest should exist. Changing this forces a new Application Insights Standard WebTest to be created. It needs to correlate with location of the parent resource (azurerm_application_insights) Location pulumi.StringPtrInput // The name which should be used for this Application Insights Standard WebTest. Changing this forces a new Application Insights Standard WebTest to be created. Name pulumi.StringPtrInput // A `request` block as defined below. Request StandardWebTestRequestPtrInput // The name of the Resource Group where the Application Insights Standard WebTest should exist. Changing this forces a new Application Insights Standard WebTest to be created. ResourceGroupName pulumi.StringPtrInput // Should the retry on WebTest failure be enabled? RetryEnabled pulumi.BoolPtrInput // Unique ID of this WebTest. This is typically the same value as the Name field. SyntheticMonitorId pulumi.StringPtrInput // A mapping of tags which should be assigned to the Application Insights Standard WebTest. Tags pulumi.StringMapInput // Seconds until this WebTest will timeout and fail. Default is `30`. Timeout pulumi.IntPtrInput // A `validationRules` block as defined below. ValidationRules StandardWebTestValidationRulesPtrInput } func (StandardWebTestState) ElementType() reflect.Type { return reflect.TypeOf((*standardWebTestState)(nil)).Elem() } type standardWebTestArgs struct { // The ID of the Application Insights instance on which the WebTest operates. Changing this forces a new Application Insights Standard WebTest to be created. ApplicationInsightsId string `pulumi:"applicationInsightsId"` // Purpose/user defined descriptive test for this WebTest. Description *string `pulumi:"description"` // Should the WebTest be enabled? Enabled *bool `pulumi:"enabled"` // Interval in seconds between test runs for this WebTest. Valid options are `300`, `600` and `900`. Defaults to `300`. Frequency *int `pulumi:"frequency"` // Specifies a list of where to physically run the tests from to give global coverage for accessibility of your application. // // > **Note:** [Valid options for geo locations are described here](https://docs.microsoft.com/azure/azure-monitor/app/monitor-web-app-availability#location-population-tags) GeoLocations []string `pulumi:"geoLocations"` // The Azure Region where the Application Insights Standard WebTest should exist. Changing this forces a new Application Insights Standard WebTest to be created. It needs to correlate with location of the parent resource (azurerm_application_insights) Location *string `pulumi:"location"` // The name which should be used for this Application Insights Standard WebTest. Changing this forces a new Application Insights Standard WebTest to be created. Name *string `pulumi:"name"` // A `request` block as defined below. Request StandardWebTestRequest `pulumi:"request"` // The name of the Resource Group where the Application Insights Standard WebTest should exist. Changing this forces a new Application Insights Standard WebTest to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Should the retry on WebTest failure be enabled? RetryEnabled *bool `pulumi:"retryEnabled"` // A mapping of tags which should be assigned to the Application Insights Standard WebTest. Tags map[string]string `pulumi:"tags"` // Seconds until this WebTest will timeout and fail. Default is `30`. Timeout *int `pulumi:"timeout"` // A `validationRules` block as defined below. ValidationRules *StandardWebTestValidationRules `pulumi:"validationRules"` } // The set of arguments for constructing a StandardWebTest resource. type StandardWebTestArgs struct { // The ID of the Application Insights instance on which the WebTest operates. Changing this forces a new Application Insights Standard WebTest to be created. ApplicationInsightsId pulumi.StringInput // Purpose/user defined descriptive test for this WebTest. Description pulumi.StringPtrInput // Should the WebTest be enabled? Enabled pulumi.BoolPtrInput // Interval in seconds between test runs for this WebTest. Valid options are `300`, `600` and `900`. Defaults to `300`. Frequency pulumi.IntPtrInput // Specifies a list of where to physically run the tests from to give global coverage for accessibility of your application. // // > **Note:** [Valid options for geo locations are described here](https://docs.microsoft.com/azure/azure-monitor/app/monitor-web-app-availability#location-population-tags) GeoLocations pulumi.StringArrayInput // The Azure Region where the Application Insights Standard WebTest should exist. Changing this forces a new Application Insights Standard WebTest to be created. It needs to correlate with location of the parent resource (azurerm_application_insights) Location pulumi.StringPtrInput // The name which should be used for this Application Insights Standard WebTest. Changing this forces a new Application Insights Standard WebTest to be created. Name pulumi.StringPtrInput // A `request` block as defined below. Request StandardWebTestRequestInput // The name of the Resource Group where the Application Insights Standard WebTest should exist. Changing this forces a new Application Insights Standard WebTest to be created. ResourceGroupName pulumi.StringInput // Should the retry on WebTest failure be enabled? RetryEnabled pulumi.BoolPtrInput // A mapping of tags which should be assigned to the Application Insights Standard WebTest. Tags pulumi.StringMapInput // Seconds until this WebTest will timeout and fail. Default is `30`. Timeout pulumi.IntPtrInput // A `validationRules` block as defined below. ValidationRules StandardWebTestValidationRulesPtrInput } func (StandardWebTestArgs) ElementType() reflect.Type { return reflect.TypeOf((*standardWebTestArgs)(nil)).Elem() } type StandardWebTestInput interface { pulumi.Input ToStandardWebTestOutput() StandardWebTestOutput ToStandardWebTestOutputWithContext(ctx context.Context) StandardWebTestOutput } func (*StandardWebTest) ElementType() reflect.Type { return reflect.TypeOf((**StandardWebTest)(nil)).Elem() } func (i *StandardWebTest) ToStandardWebTestOutput() StandardWebTestOutput { return i.ToStandardWebTestOutputWithContext(context.Background()) } func (i *StandardWebTest) ToStandardWebTestOutputWithContext(ctx context.Context) StandardWebTestOutput { return pulumi.ToOutputWithContext(ctx, i).(StandardWebTestOutput) } // StandardWebTestArrayInput is an input type that accepts StandardWebTestArray and StandardWebTestArrayOutput values. // You can construct a concrete instance of `StandardWebTestArrayInput` via: // // StandardWebTestArray{ StandardWebTestArgs{...} } type StandardWebTestArrayInput interface { pulumi.Input ToStandardWebTestArrayOutput() StandardWebTestArrayOutput ToStandardWebTestArrayOutputWithContext(context.Context) StandardWebTestArrayOutput } type StandardWebTestArray []StandardWebTestInput func (StandardWebTestArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*StandardWebTest)(nil)).Elem() } func (i StandardWebTestArray) ToStandardWebTestArrayOutput() StandardWebTestArrayOutput { return i.ToStandardWebTestArrayOutputWithContext(context.Background()) } func (i StandardWebTestArray) ToStandardWebTestArrayOutputWithContext(ctx context.Context) StandardWebTestArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(StandardWebTestArrayOutput) } // StandardWebTestMapInput is an input type that accepts StandardWebTestMap and StandardWebTestMapOutput values. // You can construct a concrete instance of `StandardWebTestMapInput` via: // // StandardWebTestMap{ "key": StandardWebTestArgs{...} } type StandardWebTestMapInput interface { pulumi.Input ToStandardWebTestMapOutput() StandardWebTestMapOutput ToStandardWebTestMapOutputWithContext(context.Context) StandardWebTestMapOutput } type StandardWebTestMap map[string]StandardWebTestInput func (StandardWebTestMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*StandardWebTest)(nil)).Elem() } func (i StandardWebTestMap) ToStandardWebTestMapOutput() StandardWebTestMapOutput { return i.ToStandardWebTestMapOutputWithContext(context.Background()) } func (i StandardWebTestMap) ToStandardWebTestMapOutputWithContext(ctx context.Context) StandardWebTestMapOutput { return pulumi.ToOutputWithContext(ctx, i).(StandardWebTestMapOutput) } type StandardWebTestOutput struct{ *pulumi.OutputState } func (StandardWebTestOutput) ElementType() reflect.Type { return reflect.TypeOf((**StandardWebTest)(nil)).Elem() } func (o StandardWebTestOutput) ToStandardWebTestOutput() StandardWebTestOutput { return o } func (o StandardWebTestOutput) ToStandardWebTestOutputWithContext(ctx context.Context) StandardWebTestOutput { return o } // The ID of the Application Insights instance on which the WebTest operates. Changing this forces a new Application Insights Standard WebTest to be created. func (o StandardWebTestOutput) ApplicationInsightsId() pulumi.StringOutput { return o.ApplyT(func(v *StandardWebTest) pulumi.StringOutput { return v.ApplicationInsightsId }).(pulumi.StringOutput) } // Purpose/user defined descriptive test for this WebTest. func (o StandardWebTestOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *StandardWebTest) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Should the WebTest be enabled? func (o StandardWebTestOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *StandardWebTest) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // Interval in seconds between test runs for this WebTest. Valid options are `300`, `600` and `900`. Defaults to `300`. func (o StandardWebTestOutput) Frequency() pulumi.IntPtrOutput { return o.ApplyT(func(v *StandardWebTest) pulumi.IntPtrOutput { return v.Frequency }).(pulumi.IntPtrOutput) } // Specifies a list of where to physically run the tests from to give global coverage for accessibility of your application. // // > **Note:** [Valid options for geo locations are described here](https://docs.microsoft.com/azure/azure-monitor/app/monitor-web-app-availability#location-population-tags) func (o StandardWebTestOutput) GeoLocations() pulumi.StringArrayOutput { return o.ApplyT(func(v *StandardWebTest) pulumi.StringArrayOutput { return v.GeoLocations }).(pulumi.StringArrayOutput) } // The Azure Region where the Application Insights Standard WebTest should exist. Changing this forces a new Application Insights Standard WebTest to be created. It needs to correlate with location of the parent resource (azurerm_application_insights) func (o StandardWebTestOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *StandardWebTest) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Application Insights Standard WebTest. Changing this forces a new Application Insights Standard WebTest to be created. func (o StandardWebTestOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *StandardWebTest) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A `request` block as defined below. func (o StandardWebTestOutput) Request() StandardWebTestRequestOutput { return o.ApplyT(func(v *StandardWebTest) StandardWebTestRequestOutput { return v.Request }).(StandardWebTestRequestOutput) } // The name of the Resource Group where the Application Insights Standard WebTest should exist. Changing this forces a new Application Insights Standard WebTest to be created. func (o StandardWebTestOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *StandardWebTest) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Should the retry on WebTest failure be enabled? func (o StandardWebTestOutput) RetryEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *StandardWebTest) pulumi.BoolPtrOutput { return v.RetryEnabled }).(pulumi.BoolPtrOutput) } // Unique ID of this WebTest. This is typically the same value as the Name field. func (o StandardWebTestOutput) SyntheticMonitorId() pulumi.StringOutput { return o.ApplyT(func(v *StandardWebTest) pulumi.StringOutput { return v.SyntheticMonitorId }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Application Insights Standard WebTest. func (o StandardWebTestOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *StandardWebTest) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Seconds until this WebTest will timeout and fail. Default is `30`. func (o StandardWebTestOutput) Timeout() pulumi.IntPtrOutput { return o.ApplyT(func(v *StandardWebTest) pulumi.IntPtrOutput { return v.Timeout }).(pulumi.IntPtrOutput) } // A `validationRules` block as defined below. func (o StandardWebTestOutput) ValidationRules() StandardWebTestValidationRulesPtrOutput { return o.ApplyT(func(v *StandardWebTest) StandardWebTestValidationRulesPtrOutput { return v.ValidationRules }).(StandardWebTestValidationRulesPtrOutput) } type StandardWebTestArrayOutput struct{ *pulumi.OutputState } func (StandardWebTestArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*StandardWebTest)(nil)).Elem() } func (o StandardWebTestArrayOutput) ToStandardWebTestArrayOutput() StandardWebTestArrayOutput { return o } func (o StandardWebTestArrayOutput) ToStandardWebTestArrayOutputWithContext(ctx context.Context) StandardWebTestArrayOutput { return o } func (o StandardWebTestArrayOutput) Index(i pulumi.IntInput) StandardWebTestOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StandardWebTest { return vs[0].([]*StandardWebTest)[vs[1].(int)] }).(StandardWebTestOutput) } type StandardWebTestMapOutput struct{ *pulumi.OutputState } func (StandardWebTestMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*StandardWebTest)(nil)).Elem() } func (o StandardWebTestMapOutput) ToStandardWebTestMapOutput() StandardWebTestMapOutput { return o } func (o StandardWebTestMapOutput) ToStandardWebTestMapOutputWithContext(ctx context.Context) StandardWebTestMapOutput { return o } func (o StandardWebTestMapOutput) MapIndex(k pulumi.StringInput) StandardWebTestOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StandardWebTest { return vs[0].(map[string]*StandardWebTest)[vs[1].(string)] }).(StandardWebTestOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*StandardWebTestInput)(nil)).Elem(), &StandardWebTest{}) pulumi.RegisterInputType(reflect.TypeOf((*StandardWebTestArrayInput)(nil)).Elem(), StandardWebTestArray{}) pulumi.RegisterInputType(reflect.TypeOf((*StandardWebTestMapInput)(nil)).Elem(), StandardWebTestMap{}) pulumi.RegisterOutputType(StandardWebTestOutput{}) pulumi.RegisterOutputType(StandardWebTestArrayOutput{}) pulumi.RegisterOutputType(StandardWebTestMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appinsights/insights.go
sdk/go/azure/appinsights/insights.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appinsights import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Application Insights component. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("tf-test"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{ // Name: pulumi.String("tf-test-appinsights"), // Location: example.Location, // ResourceGroupName: example.Name, // ApplicationType: pulumi.String("web"), // }) // if err != nil { // return err // } // ctx.Export("instrumentationKey", exampleInsights.InstrumentationKey) // ctx.Export("appId", exampleInsights.AppId) // return nil // }) // } // // ``` // // ### Workspace Mode // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("tf-test"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("workspace-test"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // RetentionInDays: pulumi.Int(30), // }) // if err != nil { // return err // } // exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{ // Name: pulumi.String("tf-test-appinsights"), // Location: example.Location, // ResourceGroupName: example.Name, // WorkspaceId: exampleAnalyticsWorkspace.ID(), // ApplicationType: pulumi.String("web"), // }) // if err != nil { // return err // } // ctx.Export("instrumentationKey", exampleInsights.InstrumentationKey) // ctx.Export("appId", exampleInsights.AppId) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.AlertsManagement` - 2019-06-01 // // * `Microsoft.Insights` - 2020-02-02, 2015-05-01 // // ## Import // // Application Insights instances can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appinsights/insights:Insights instance1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Insights/components/instance1 // ``` type Insights struct { pulumi.CustomResourceState // The App ID associated with this Application Insights component. AppId pulumi.StringOutput `pulumi:"appId"` // Specifies the type of Application Insights to create. Valid values are `ios` for _iOS_, `java` for _Java web_, `MobileCenter` for _App Center_, `Node.JS` for _Node.js_, `other` for _General_, `phone` for _Windows Phone_, `store` for _Windows Store_ and `web` for _ASP.NET_. Please note these values are case sensitive; unmatched values are treated as _ASP.NET_ by Azure. Changing this forces a new resource to be created. ApplicationType pulumi.StringOutput `pulumi:"applicationType"` // The Connection String for this Application Insights component. (Sensitive) ConnectionString pulumi.StringOutput `pulumi:"connectionString"` // Specifies the Application Insights component daily data volume cap in GB. Defaults to `100`. DailyDataCapInGb pulumi.Float64PtrOutput `pulumi:"dailyDataCapInGb"` // Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to `false`. DailyDataCapNotificationsDisabled pulumi.BoolPtrOutput `pulumi:"dailyDataCapNotificationsDisabled"` // By default the real client IP is masked as `0.0.0.0` in the logs. Use this argument to disable masking and log the real client IP. Defaults to `false`. DisableIpMasking pulumi.BoolPtrOutput `pulumi:"disableIpMasking"` // Should the Application Insights component force users to create their own storage account for profiling? Defaults to `false`. ForceCustomerStorageForProfiler pulumi.BoolPtrOutput `pulumi:"forceCustomerStorageForProfiler"` // The Instrumentation Key for this Application Insights component. (Sensitive) InstrumentationKey pulumi.StringOutput `pulumi:"instrumentationKey"` // Should the Application Insights component support ingestion over the Public Internet? Defaults to `true`. InternetIngestionEnabled pulumi.BoolPtrOutput `pulumi:"internetIngestionEnabled"` // Should the Application Insights component support querying over the Public Internet? Defaults to `true`. InternetQueryEnabled pulumi.BoolPtrOutput `pulumi:"internetQueryEnabled"` // Disable Non-Azure AD based Auth. Defaults to `false`. LocalAuthenticationDisabled pulumi.BoolPtrOutput `pulumi:"localAuthenticationDisabled"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of the Application Insights component. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the retention period in days. Possible values are `30`, `60`, `90`, `120`, `180`, `270`, `365`, `550` or `730`. Defaults to `90`. RetentionInDays pulumi.IntPtrOutput `pulumi:"retentionInDays"` // Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to `100`. SamplingPercentage pulumi.Float64PtrOutput `pulumi:"samplingPercentage"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Specifies the id of a log analytics workspace resource. // // > **Note:** `workspaceId` cannot be removed after set. More details can be found at [Migrate to workspace-based Application Insights resources](https://docs.microsoft.com/azure/azure-monitor/app/convert-classic-resource#migration-process). If `workspaceId` is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please update `workspaceId` in the config file to the new value. WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"` } // NewInsights registers a new resource with the given unique name, arguments, and options. func NewInsights(ctx *pulumi.Context, name string, args *InsightsArgs, opts ...pulumi.ResourceOption) (*Insights, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApplicationType == nil { return nil, errors.New("invalid value for required argument 'ApplicationType'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } secrets := pulumi.AdditionalSecretOutputs([]string{ "connectionString", "instrumentationKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource Insights err := ctx.RegisterResource("azure:appinsights/insights:Insights", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetInsights gets an existing Insights resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetInsights(ctx *pulumi.Context, name string, id pulumi.IDInput, state *InsightsState, opts ...pulumi.ResourceOption) (*Insights, error) { var resource Insights err := ctx.ReadResource("azure:appinsights/insights:Insights", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Insights resources. type insightsState struct { // The App ID associated with this Application Insights component. AppId *string `pulumi:"appId"` // Specifies the type of Application Insights to create. Valid values are `ios` for _iOS_, `java` for _Java web_, `MobileCenter` for _App Center_, `Node.JS` for _Node.js_, `other` for _General_, `phone` for _Windows Phone_, `store` for _Windows Store_ and `web` for _ASP.NET_. Please note these values are case sensitive; unmatched values are treated as _ASP.NET_ by Azure. Changing this forces a new resource to be created. ApplicationType *string `pulumi:"applicationType"` // The Connection String for this Application Insights component. (Sensitive) ConnectionString *string `pulumi:"connectionString"` // Specifies the Application Insights component daily data volume cap in GB. Defaults to `100`. DailyDataCapInGb *float64 `pulumi:"dailyDataCapInGb"` // Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to `false`. DailyDataCapNotificationsDisabled *bool `pulumi:"dailyDataCapNotificationsDisabled"` // By default the real client IP is masked as `0.0.0.0` in the logs. Use this argument to disable masking and log the real client IP. Defaults to `false`. DisableIpMasking *bool `pulumi:"disableIpMasking"` // Should the Application Insights component force users to create their own storage account for profiling? Defaults to `false`. ForceCustomerStorageForProfiler *bool `pulumi:"forceCustomerStorageForProfiler"` // The Instrumentation Key for this Application Insights component. (Sensitive) InstrumentationKey *string `pulumi:"instrumentationKey"` // Should the Application Insights component support ingestion over the Public Internet? Defaults to `true`. InternetIngestionEnabled *bool `pulumi:"internetIngestionEnabled"` // Should the Application Insights component support querying over the Public Internet? Defaults to `true`. InternetQueryEnabled *bool `pulumi:"internetQueryEnabled"` // Disable Non-Azure AD based Auth. Defaults to `false`. LocalAuthenticationDisabled *bool `pulumi:"localAuthenticationDisabled"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Application Insights component. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the retention period in days. Possible values are `30`, `60`, `90`, `120`, `180`, `270`, `365`, `550` or `730`. Defaults to `90`. RetentionInDays *int `pulumi:"retentionInDays"` // Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to `100`. SamplingPercentage *float64 `pulumi:"samplingPercentage"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies the id of a log analytics workspace resource. // // > **Note:** `workspaceId` cannot be removed after set. More details can be found at [Migrate to workspace-based Application Insights resources](https://docs.microsoft.com/azure/azure-monitor/app/convert-classic-resource#migration-process). If `workspaceId` is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please update `workspaceId` in the config file to the new value. WorkspaceId *string `pulumi:"workspaceId"` } type InsightsState struct { // The App ID associated with this Application Insights component. AppId pulumi.StringPtrInput // Specifies the type of Application Insights to create. Valid values are `ios` for _iOS_, `java` for _Java web_, `MobileCenter` for _App Center_, `Node.JS` for _Node.js_, `other` for _General_, `phone` for _Windows Phone_, `store` for _Windows Store_ and `web` for _ASP.NET_. Please note these values are case sensitive; unmatched values are treated as _ASP.NET_ by Azure. Changing this forces a new resource to be created. ApplicationType pulumi.StringPtrInput // The Connection String for this Application Insights component. (Sensitive) ConnectionString pulumi.StringPtrInput // Specifies the Application Insights component daily data volume cap in GB. Defaults to `100`. DailyDataCapInGb pulumi.Float64PtrInput // Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to `false`. DailyDataCapNotificationsDisabled pulumi.BoolPtrInput // By default the real client IP is masked as `0.0.0.0` in the logs. Use this argument to disable masking and log the real client IP. Defaults to `false`. DisableIpMasking pulumi.BoolPtrInput // Should the Application Insights component force users to create their own storage account for profiling? Defaults to `false`. ForceCustomerStorageForProfiler pulumi.BoolPtrInput // The Instrumentation Key for this Application Insights component. (Sensitive) InstrumentationKey pulumi.StringPtrInput // Should the Application Insights component support ingestion over the Public Internet? Defaults to `true`. InternetIngestionEnabled pulumi.BoolPtrInput // Should the Application Insights component support querying over the Public Internet? Defaults to `true`. InternetQueryEnabled pulumi.BoolPtrInput // Disable Non-Azure AD based Auth. Defaults to `false`. LocalAuthenticationDisabled pulumi.BoolPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Application Insights component. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the retention period in days. Possible values are `30`, `60`, `90`, `120`, `180`, `270`, `365`, `550` or `730`. Defaults to `90`. RetentionInDays pulumi.IntPtrInput // Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to `100`. SamplingPercentage pulumi.Float64PtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the id of a log analytics workspace resource. // // > **Note:** `workspaceId` cannot be removed after set. More details can be found at [Migrate to workspace-based Application Insights resources](https://docs.microsoft.com/azure/azure-monitor/app/convert-classic-resource#migration-process). If `workspaceId` is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please update `workspaceId` in the config file to the new value. WorkspaceId pulumi.StringPtrInput } func (InsightsState) ElementType() reflect.Type { return reflect.TypeOf((*insightsState)(nil)).Elem() } type insightsArgs struct { // Specifies the type of Application Insights to create. Valid values are `ios` for _iOS_, `java` for _Java web_, `MobileCenter` for _App Center_, `Node.JS` for _Node.js_, `other` for _General_, `phone` for _Windows Phone_, `store` for _Windows Store_ and `web` for _ASP.NET_. Please note these values are case sensitive; unmatched values are treated as _ASP.NET_ by Azure. Changing this forces a new resource to be created. ApplicationType string `pulumi:"applicationType"` // Specifies the Application Insights component daily data volume cap in GB. Defaults to `100`. DailyDataCapInGb *float64 `pulumi:"dailyDataCapInGb"` // Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to `false`. DailyDataCapNotificationsDisabled *bool `pulumi:"dailyDataCapNotificationsDisabled"` // By default the real client IP is masked as `0.0.0.0` in the logs. Use this argument to disable masking and log the real client IP. Defaults to `false`. DisableIpMasking *bool `pulumi:"disableIpMasking"` // Should the Application Insights component force users to create their own storage account for profiling? Defaults to `false`. ForceCustomerStorageForProfiler *bool `pulumi:"forceCustomerStorageForProfiler"` // Should the Application Insights component support ingestion over the Public Internet? Defaults to `true`. InternetIngestionEnabled *bool `pulumi:"internetIngestionEnabled"` // Should the Application Insights component support querying over the Public Internet? Defaults to `true`. InternetQueryEnabled *bool `pulumi:"internetQueryEnabled"` // Disable Non-Azure AD based Auth. Defaults to `false`. LocalAuthenticationDisabled *bool `pulumi:"localAuthenticationDisabled"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Application Insights component. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the retention period in days. Possible values are `30`, `60`, `90`, `120`, `180`, `270`, `365`, `550` or `730`. Defaults to `90`. RetentionInDays *int `pulumi:"retentionInDays"` // Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to `100`. SamplingPercentage *float64 `pulumi:"samplingPercentage"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies the id of a log analytics workspace resource. // // > **Note:** `workspaceId` cannot be removed after set. More details can be found at [Migrate to workspace-based Application Insights resources](https://docs.microsoft.com/azure/azure-monitor/app/convert-classic-resource#migration-process). If `workspaceId` is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please update `workspaceId` in the config file to the new value. WorkspaceId *string `pulumi:"workspaceId"` } // The set of arguments for constructing a Insights resource. type InsightsArgs struct { // Specifies the type of Application Insights to create. Valid values are `ios` for _iOS_, `java` for _Java web_, `MobileCenter` for _App Center_, `Node.JS` for _Node.js_, `other` for _General_, `phone` for _Windows Phone_, `store` for _Windows Store_ and `web` for _ASP.NET_. Please note these values are case sensitive; unmatched values are treated as _ASP.NET_ by Azure. Changing this forces a new resource to be created. ApplicationType pulumi.StringInput // Specifies the Application Insights component daily data volume cap in GB. Defaults to `100`. DailyDataCapInGb pulumi.Float64PtrInput // Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to `false`. DailyDataCapNotificationsDisabled pulumi.BoolPtrInput // By default the real client IP is masked as `0.0.0.0` in the logs. Use this argument to disable masking and log the real client IP. Defaults to `false`. DisableIpMasking pulumi.BoolPtrInput // Should the Application Insights component force users to create their own storage account for profiling? Defaults to `false`. ForceCustomerStorageForProfiler pulumi.BoolPtrInput // Should the Application Insights component support ingestion over the Public Internet? Defaults to `true`. InternetIngestionEnabled pulumi.BoolPtrInput // Should the Application Insights component support querying over the Public Internet? Defaults to `true`. InternetQueryEnabled pulumi.BoolPtrInput // Disable Non-Azure AD based Auth. Defaults to `false`. LocalAuthenticationDisabled pulumi.BoolPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Application Insights component. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies the retention period in days. Possible values are `30`, `60`, `90`, `120`, `180`, `270`, `365`, `550` or `730`. Defaults to `90`. RetentionInDays pulumi.IntPtrInput // Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to `100`. SamplingPercentage pulumi.Float64PtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the id of a log analytics workspace resource. // // > **Note:** `workspaceId` cannot be removed after set. More details can be found at [Migrate to workspace-based Application Insights resources](https://docs.microsoft.com/azure/azure-monitor/app/convert-classic-resource#migration-process). If `workspaceId` is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please update `workspaceId` in the config file to the new value. WorkspaceId pulumi.StringPtrInput } func (InsightsArgs) ElementType() reflect.Type { return reflect.TypeOf((*insightsArgs)(nil)).Elem() } type InsightsInput interface { pulumi.Input ToInsightsOutput() InsightsOutput ToInsightsOutputWithContext(ctx context.Context) InsightsOutput } func (*Insights) ElementType() reflect.Type { return reflect.TypeOf((**Insights)(nil)).Elem() } func (i *Insights) ToInsightsOutput() InsightsOutput { return i.ToInsightsOutputWithContext(context.Background()) } func (i *Insights) ToInsightsOutputWithContext(ctx context.Context) InsightsOutput { return pulumi.ToOutputWithContext(ctx, i).(InsightsOutput) } // InsightsArrayInput is an input type that accepts InsightsArray and InsightsArrayOutput values. // You can construct a concrete instance of `InsightsArrayInput` via: // // InsightsArray{ InsightsArgs{...} } type InsightsArrayInput interface { pulumi.Input ToInsightsArrayOutput() InsightsArrayOutput ToInsightsArrayOutputWithContext(context.Context) InsightsArrayOutput } type InsightsArray []InsightsInput func (InsightsArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Insights)(nil)).Elem() } func (i InsightsArray) ToInsightsArrayOutput() InsightsArrayOutput { return i.ToInsightsArrayOutputWithContext(context.Background()) } func (i InsightsArray) ToInsightsArrayOutputWithContext(ctx context.Context) InsightsArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(InsightsArrayOutput) } // InsightsMapInput is an input type that accepts InsightsMap and InsightsMapOutput values. // You can construct a concrete instance of `InsightsMapInput` via: // // InsightsMap{ "key": InsightsArgs{...} } type InsightsMapInput interface { pulumi.Input ToInsightsMapOutput() InsightsMapOutput ToInsightsMapOutputWithContext(context.Context) InsightsMapOutput } type InsightsMap map[string]InsightsInput func (InsightsMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Insights)(nil)).Elem() } func (i InsightsMap) ToInsightsMapOutput() InsightsMapOutput { return i.ToInsightsMapOutputWithContext(context.Background()) } func (i InsightsMap) ToInsightsMapOutputWithContext(ctx context.Context) InsightsMapOutput { return pulumi.ToOutputWithContext(ctx, i).(InsightsMapOutput) } type InsightsOutput struct{ *pulumi.OutputState } func (InsightsOutput) ElementType() reflect.Type { return reflect.TypeOf((**Insights)(nil)).Elem() } func (o InsightsOutput) ToInsightsOutput() InsightsOutput { return o } func (o InsightsOutput) ToInsightsOutputWithContext(ctx context.Context) InsightsOutput { return o } // The App ID associated with this Application Insights component. func (o InsightsOutput) AppId() pulumi.StringOutput { return o.ApplyT(func(v *Insights) pulumi.StringOutput { return v.AppId }).(pulumi.StringOutput) } // Specifies the type of Application Insights to create. Valid values are `ios` for _iOS_, `java` for _Java web_, `MobileCenter` for _App Center_, `Node.JS` for _Node.js_, `other` for _General_, `phone` for _Windows Phone_, `store` for _Windows Store_ and `web` for _ASP.NET_. Please note these values are case sensitive; unmatched values are treated as _ASP.NET_ by Azure. Changing this forces a new resource to be created. func (o InsightsOutput) ApplicationType() pulumi.StringOutput { return o.ApplyT(func(v *Insights) pulumi.StringOutput { return v.ApplicationType }).(pulumi.StringOutput) } // The Connection String for this Application Insights component. (Sensitive) func (o InsightsOutput) ConnectionString() pulumi.StringOutput { return o.ApplyT(func(v *Insights) pulumi.StringOutput { return v.ConnectionString }).(pulumi.StringOutput) } // Specifies the Application Insights component daily data volume cap in GB. Defaults to `100`. func (o InsightsOutput) DailyDataCapInGb() pulumi.Float64PtrOutput { return o.ApplyT(func(v *Insights) pulumi.Float64PtrOutput { return v.DailyDataCapInGb }).(pulumi.Float64PtrOutput) } // Specifies if a notification email will be sent when the daily data volume cap is met. Defaults to `false`. func (o InsightsOutput) DailyDataCapNotificationsDisabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Insights) pulumi.BoolPtrOutput { return v.DailyDataCapNotificationsDisabled }).(pulumi.BoolPtrOutput) } // By default the real client IP is masked as `0.0.0.0` in the logs. Use this argument to disable masking and log the real client IP. Defaults to `false`. func (o InsightsOutput) DisableIpMasking() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Insights) pulumi.BoolPtrOutput { return v.DisableIpMasking }).(pulumi.BoolPtrOutput) } // Should the Application Insights component force users to create their own storage account for profiling? Defaults to `false`. func (o InsightsOutput) ForceCustomerStorageForProfiler() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Insights) pulumi.BoolPtrOutput { return v.ForceCustomerStorageForProfiler }).(pulumi.BoolPtrOutput) } // The Instrumentation Key for this Application Insights component. (Sensitive) func (o InsightsOutput) InstrumentationKey() pulumi.StringOutput { return o.ApplyT(func(v *Insights) pulumi.StringOutput { return v.InstrumentationKey }).(pulumi.StringOutput) } // Should the Application Insights component support ingestion over the Public Internet? Defaults to `true`. func (o InsightsOutput) InternetIngestionEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Insights) pulumi.BoolPtrOutput { return v.InternetIngestionEnabled }).(pulumi.BoolPtrOutput) } // Should the Application Insights component support querying over the Public Internet? Defaults to `true`. func (o InsightsOutput) InternetQueryEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Insights) pulumi.BoolPtrOutput { return v.InternetQueryEnabled }).(pulumi.BoolPtrOutput) } // Disable Non-Azure AD based Auth. Defaults to `false`. func (o InsightsOutput) LocalAuthenticationDisabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Insights) pulumi.BoolPtrOutput { return v.LocalAuthenticationDisabled }).(pulumi.BoolPtrOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o InsightsOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Insights) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the Application Insights component. Changing this forces a new resource to be created. func (o InsightsOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Insights) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the Application Insights component. Changing this forces a new resource to be created. func (o InsightsOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Insights) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the retention period in days. Possible values are `30`, `60`, `90`, `120`, `180`, `270`, `365`, `550` or `730`. Defaults to `90`. func (o InsightsOutput) RetentionInDays() pulumi.IntPtrOutput { return o.ApplyT(func(v *Insights) pulumi.IntPtrOutput { return v.RetentionInDays }).(pulumi.IntPtrOutput) } // Specifies the percentage of the data produced by the monitored application that is sampled for Application Insights telemetry. Defaults to `100`. func (o InsightsOutput) SamplingPercentage() pulumi.Float64PtrOutput { return o.ApplyT(func(v *Insights) pulumi.Float64PtrOutput { return v.SamplingPercentage }).(pulumi.Float64PtrOutput) } // A mapping of tags to assign to the resource. func (o InsightsOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Insights) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Specifies the id of a log analytics workspace resource. // // > **Note:** `workspaceId` cannot be removed after set. More details can be found at [Migrate to workspace-based Application Insights resources](https://docs.microsoft.com/azure/azure-monitor/app/convert-classic-resource#migration-process). If `workspaceId` is not specified but you encounter a diff, this might indicate a Microsoft initiated automatic migration from classic resources to workspace-based resources. If this is the case, please update `workspaceId` in the config file to the new value. func (o InsightsOutput) WorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *Insights) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput) } type InsightsArrayOutput struct{ *pulumi.OutputState } func (InsightsArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Insights)(nil)).Elem() } func (o InsightsArrayOutput) ToInsightsArrayOutput() InsightsArrayOutput { return o } func (o InsightsArrayOutput) ToInsightsArrayOutputWithContext(ctx context.Context) InsightsArrayOutput { return o } func (o InsightsArrayOutput) Index(i pulumi.IntInput) InsightsOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Insights { return vs[0].([]*Insights)[vs[1].(int)] }).(InsightsOutput) } type InsightsMapOutput struct{ *pulumi.OutputState } func (InsightsMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Insights)(nil)).Elem() } func (o InsightsMapOutput) ToInsightsMapOutput() InsightsMapOutput { return o } func (o InsightsMapOutput) ToInsightsMapOutputWithContext(ctx context.Context) InsightsMapOutput { return o } func (o InsightsMapOutput) MapIndex(k pulumi.StringInput) InsightsOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Insights { return vs[0].(map[string]*Insights)[vs[1].(string)] }).(InsightsOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*InsightsInput)(nil)).Elem(), &Insights{}) pulumi.RegisterInputType(reflect.TypeOf((*InsightsArrayInput)(nil)).Elem(), InsightsArray{})
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appinsights/analyticsItem.go
sdk/go/azure/appinsights/analyticsItem.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appinsights import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Application Insights Analytics Item component. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("tf-test"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{ // Name: pulumi.String("tf-test-appinsights"), // Location: example.Location, // ResourceGroupName: example.Name, // ApplicationType: pulumi.String("web"), // }) // if err != nil { // return err // } // _, err = appinsights.NewAnalyticsItem(ctx, "example", &appinsights.AnalyticsItemArgs{ // Name: pulumi.String("testquery"), // ApplicationInsightsId: exampleInsights.ID(), // Content: pulumi.String("requests //simple example query"), // Scope: pulumi.String("shared"), // Type: pulumi.String("query"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Insights` - 2015-05-01 // // ## Import // // Application Insights Analytics Items can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appinsights/analyticsItem:AnalyticsItem example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Insights/components/mycomponent1/analyticsItems/11111111-1111-1111-1111-111111111111 // ``` // // To find the Analytics Item ID you can query the REST API using the [`az rest` CLI command](https://docs.microsoft.com/cli/azure/reference-index?view=azure-cli-latest#az-rest), e.g. // // az rest --method GET --uri "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/microsoft.insights/components/appinsightstest/analyticsItems?api-version=2015-05-01" type AnalyticsItem struct { pulumi.CustomResourceState // The ID of the Application Insights component on which the Analytics Item exists. Changing this forces a new resource to be created. ApplicationInsightsId pulumi.StringOutput `pulumi:"applicationInsightsId"` // The content for the Analytics Item, for example the query text if `type` is `query`. Content pulumi.StringOutput `pulumi:"content"` // The alias to use for the function. Required when `type` is `function`. FunctionAlias pulumi.StringPtrOutput `pulumi:"functionAlias"` // Specifies the name of the Application Insights Analytics Item. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The scope for the Analytics Item. Can be `shared` or `user`. Changing this forces a new resource to be created. Must be `shared` for functions. Scope pulumi.StringOutput `pulumi:"scope"` // A string containing the time the Analytics Item was created. TimeCreated pulumi.StringOutput `pulumi:"timeCreated"` // A string containing the time the Analytics Item was last modified. TimeModified pulumi.StringOutput `pulumi:"timeModified"` // The type of Analytics Item to create. Can be one of `query`, `function`, `folder`, `recent`. Changing this forces a new resource to be created. Type pulumi.StringOutput `pulumi:"type"` // A string indicating the version of the query format Version pulumi.StringOutput `pulumi:"version"` } // NewAnalyticsItem registers a new resource with the given unique name, arguments, and options. func NewAnalyticsItem(ctx *pulumi.Context, name string, args *AnalyticsItemArgs, opts ...pulumi.ResourceOption) (*AnalyticsItem, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApplicationInsightsId == nil { return nil, errors.New("invalid value for required argument 'ApplicationInsightsId'") } if args.Content == nil { return nil, errors.New("invalid value for required argument 'Content'") } if args.Scope == nil { return nil, errors.New("invalid value for required argument 'Scope'") } if args.Type == nil { return nil, errors.New("invalid value for required argument 'Type'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AnalyticsItem err := ctx.RegisterResource("azure:appinsights/analyticsItem:AnalyticsItem", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAnalyticsItem gets an existing AnalyticsItem resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetAnalyticsItem(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AnalyticsItemState, opts ...pulumi.ResourceOption) (*AnalyticsItem, error) { var resource AnalyticsItem err := ctx.ReadResource("azure:appinsights/analyticsItem:AnalyticsItem", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AnalyticsItem resources. type analyticsItemState struct { // The ID of the Application Insights component on which the Analytics Item exists. Changing this forces a new resource to be created. ApplicationInsightsId *string `pulumi:"applicationInsightsId"` // The content for the Analytics Item, for example the query text if `type` is `query`. Content *string `pulumi:"content"` // The alias to use for the function. Required when `type` is `function`. FunctionAlias *string `pulumi:"functionAlias"` // Specifies the name of the Application Insights Analytics Item. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The scope for the Analytics Item. Can be `shared` or `user`. Changing this forces a new resource to be created. Must be `shared` for functions. Scope *string `pulumi:"scope"` // A string containing the time the Analytics Item was created. TimeCreated *string `pulumi:"timeCreated"` // A string containing the time the Analytics Item was last modified. TimeModified *string `pulumi:"timeModified"` // The type of Analytics Item to create. Can be one of `query`, `function`, `folder`, `recent`. Changing this forces a new resource to be created. Type *string `pulumi:"type"` // A string indicating the version of the query format Version *string `pulumi:"version"` } type AnalyticsItemState struct { // The ID of the Application Insights component on which the Analytics Item exists. Changing this forces a new resource to be created. ApplicationInsightsId pulumi.StringPtrInput // The content for the Analytics Item, for example the query text if `type` is `query`. Content pulumi.StringPtrInput // The alias to use for the function. Required when `type` is `function`. FunctionAlias pulumi.StringPtrInput // Specifies the name of the Application Insights Analytics Item. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The scope for the Analytics Item. Can be `shared` or `user`. Changing this forces a new resource to be created. Must be `shared` for functions. Scope pulumi.StringPtrInput // A string containing the time the Analytics Item was created. TimeCreated pulumi.StringPtrInput // A string containing the time the Analytics Item was last modified. TimeModified pulumi.StringPtrInput // The type of Analytics Item to create. Can be one of `query`, `function`, `folder`, `recent`. Changing this forces a new resource to be created. Type pulumi.StringPtrInput // A string indicating the version of the query format Version pulumi.StringPtrInput } func (AnalyticsItemState) ElementType() reflect.Type { return reflect.TypeOf((*analyticsItemState)(nil)).Elem() } type analyticsItemArgs struct { // The ID of the Application Insights component on which the Analytics Item exists. Changing this forces a new resource to be created. ApplicationInsightsId string `pulumi:"applicationInsightsId"` // The content for the Analytics Item, for example the query text if `type` is `query`. Content string `pulumi:"content"` // The alias to use for the function. Required when `type` is `function`. FunctionAlias *string `pulumi:"functionAlias"` // Specifies the name of the Application Insights Analytics Item. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The scope for the Analytics Item. Can be `shared` or `user`. Changing this forces a new resource to be created. Must be `shared` for functions. Scope string `pulumi:"scope"` // The type of Analytics Item to create. Can be one of `query`, `function`, `folder`, `recent`. Changing this forces a new resource to be created. Type string `pulumi:"type"` } // The set of arguments for constructing a AnalyticsItem resource. type AnalyticsItemArgs struct { // The ID of the Application Insights component on which the Analytics Item exists. Changing this forces a new resource to be created. ApplicationInsightsId pulumi.StringInput // The content for the Analytics Item, for example the query text if `type` is `query`. Content pulumi.StringInput // The alias to use for the function. Required when `type` is `function`. FunctionAlias pulumi.StringPtrInput // Specifies the name of the Application Insights Analytics Item. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The scope for the Analytics Item. Can be `shared` or `user`. Changing this forces a new resource to be created. Must be `shared` for functions. Scope pulumi.StringInput // The type of Analytics Item to create. Can be one of `query`, `function`, `folder`, `recent`. Changing this forces a new resource to be created. Type pulumi.StringInput } func (AnalyticsItemArgs) ElementType() reflect.Type { return reflect.TypeOf((*analyticsItemArgs)(nil)).Elem() } type AnalyticsItemInput interface { pulumi.Input ToAnalyticsItemOutput() AnalyticsItemOutput ToAnalyticsItemOutputWithContext(ctx context.Context) AnalyticsItemOutput } func (*AnalyticsItem) ElementType() reflect.Type { return reflect.TypeOf((**AnalyticsItem)(nil)).Elem() } func (i *AnalyticsItem) ToAnalyticsItemOutput() AnalyticsItemOutput { return i.ToAnalyticsItemOutputWithContext(context.Background()) } func (i *AnalyticsItem) ToAnalyticsItemOutputWithContext(ctx context.Context) AnalyticsItemOutput { return pulumi.ToOutputWithContext(ctx, i).(AnalyticsItemOutput) } // AnalyticsItemArrayInput is an input type that accepts AnalyticsItemArray and AnalyticsItemArrayOutput values. // You can construct a concrete instance of `AnalyticsItemArrayInput` via: // // AnalyticsItemArray{ AnalyticsItemArgs{...} } type AnalyticsItemArrayInput interface { pulumi.Input ToAnalyticsItemArrayOutput() AnalyticsItemArrayOutput ToAnalyticsItemArrayOutputWithContext(context.Context) AnalyticsItemArrayOutput } type AnalyticsItemArray []AnalyticsItemInput func (AnalyticsItemArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AnalyticsItem)(nil)).Elem() } func (i AnalyticsItemArray) ToAnalyticsItemArrayOutput() AnalyticsItemArrayOutput { return i.ToAnalyticsItemArrayOutputWithContext(context.Background()) } func (i AnalyticsItemArray) ToAnalyticsItemArrayOutputWithContext(ctx context.Context) AnalyticsItemArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AnalyticsItemArrayOutput) } // AnalyticsItemMapInput is an input type that accepts AnalyticsItemMap and AnalyticsItemMapOutput values. // You can construct a concrete instance of `AnalyticsItemMapInput` via: // // AnalyticsItemMap{ "key": AnalyticsItemArgs{...} } type AnalyticsItemMapInput interface { pulumi.Input ToAnalyticsItemMapOutput() AnalyticsItemMapOutput ToAnalyticsItemMapOutputWithContext(context.Context) AnalyticsItemMapOutput } type AnalyticsItemMap map[string]AnalyticsItemInput func (AnalyticsItemMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AnalyticsItem)(nil)).Elem() } func (i AnalyticsItemMap) ToAnalyticsItemMapOutput() AnalyticsItemMapOutput { return i.ToAnalyticsItemMapOutputWithContext(context.Background()) } func (i AnalyticsItemMap) ToAnalyticsItemMapOutputWithContext(ctx context.Context) AnalyticsItemMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AnalyticsItemMapOutput) } type AnalyticsItemOutput struct{ *pulumi.OutputState } func (AnalyticsItemOutput) ElementType() reflect.Type { return reflect.TypeOf((**AnalyticsItem)(nil)).Elem() } func (o AnalyticsItemOutput) ToAnalyticsItemOutput() AnalyticsItemOutput { return o } func (o AnalyticsItemOutput) ToAnalyticsItemOutputWithContext(ctx context.Context) AnalyticsItemOutput { return o } // The ID of the Application Insights component on which the Analytics Item exists. Changing this forces a new resource to be created. func (o AnalyticsItemOutput) ApplicationInsightsId() pulumi.StringOutput { return o.ApplyT(func(v *AnalyticsItem) pulumi.StringOutput { return v.ApplicationInsightsId }).(pulumi.StringOutput) } // The content for the Analytics Item, for example the query text if `type` is `query`. func (o AnalyticsItemOutput) Content() pulumi.StringOutput { return o.ApplyT(func(v *AnalyticsItem) pulumi.StringOutput { return v.Content }).(pulumi.StringOutput) } // The alias to use for the function. Required when `type` is `function`. func (o AnalyticsItemOutput) FunctionAlias() pulumi.StringPtrOutput { return o.ApplyT(func(v *AnalyticsItem) pulumi.StringPtrOutput { return v.FunctionAlias }).(pulumi.StringPtrOutput) } // Specifies the name of the Application Insights Analytics Item. Changing this forces a new resource to be created. func (o AnalyticsItemOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AnalyticsItem) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The scope for the Analytics Item. Can be `shared` or `user`. Changing this forces a new resource to be created. Must be `shared` for functions. func (o AnalyticsItemOutput) Scope() pulumi.StringOutput { return o.ApplyT(func(v *AnalyticsItem) pulumi.StringOutput { return v.Scope }).(pulumi.StringOutput) } // A string containing the time the Analytics Item was created. func (o AnalyticsItemOutput) TimeCreated() pulumi.StringOutput { return o.ApplyT(func(v *AnalyticsItem) pulumi.StringOutput { return v.TimeCreated }).(pulumi.StringOutput) } // A string containing the time the Analytics Item was last modified. func (o AnalyticsItemOutput) TimeModified() pulumi.StringOutput { return o.ApplyT(func(v *AnalyticsItem) pulumi.StringOutput { return v.TimeModified }).(pulumi.StringOutput) } // The type of Analytics Item to create. Can be one of `query`, `function`, `folder`, `recent`. Changing this forces a new resource to be created. func (o AnalyticsItemOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v *AnalyticsItem) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) } // A string indicating the version of the query format func (o AnalyticsItemOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v *AnalyticsItem) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput) } type AnalyticsItemArrayOutput struct{ *pulumi.OutputState } func (AnalyticsItemArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AnalyticsItem)(nil)).Elem() } func (o AnalyticsItemArrayOutput) ToAnalyticsItemArrayOutput() AnalyticsItemArrayOutput { return o } func (o AnalyticsItemArrayOutput) ToAnalyticsItemArrayOutputWithContext(ctx context.Context) AnalyticsItemArrayOutput { return o } func (o AnalyticsItemArrayOutput) Index(i pulumi.IntInput) AnalyticsItemOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AnalyticsItem { return vs[0].([]*AnalyticsItem)[vs[1].(int)] }).(AnalyticsItemOutput) } type AnalyticsItemMapOutput struct{ *pulumi.OutputState } func (AnalyticsItemMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AnalyticsItem)(nil)).Elem() } func (o AnalyticsItemMapOutput) ToAnalyticsItemMapOutput() AnalyticsItemMapOutput { return o } func (o AnalyticsItemMapOutput) ToAnalyticsItemMapOutputWithContext(ctx context.Context) AnalyticsItemMapOutput { return o } func (o AnalyticsItemMapOutput) MapIndex(k pulumi.StringInput) AnalyticsItemOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AnalyticsItem { return vs[0].(map[string]*AnalyticsItem)[vs[1].(string)] }).(AnalyticsItemOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AnalyticsItemInput)(nil)).Elem(), &AnalyticsItem{}) pulumi.RegisterInputType(reflect.TypeOf((*AnalyticsItemArrayInput)(nil)).Elem(), AnalyticsItemArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AnalyticsItemMapInput)(nil)).Elem(), AnalyticsItemMap{}) pulumi.RegisterOutputType(AnalyticsItemOutput{}) pulumi.RegisterOutputType(AnalyticsItemArrayOutput{}) pulumi.RegisterOutputType(AnalyticsItemMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appinsights/webTest.go
sdk/go/azure/appinsights/webTest.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appinsights import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("tf-test"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{ // Name: pulumi.String("tf-test-appinsights"), // Location: example.Location, // ResourceGroupName: example.Name, // ApplicationType: pulumi.String("web"), // }) // if err != nil { // return err // } // exampleWebTest, err := appinsights.NewWebTest(ctx, "example", &appinsights.WebTestArgs{ // Name: pulumi.String("tf-test-appinsights-webtest"), // Location: exampleInsights.Location, // ResourceGroupName: example.Name, // ApplicationInsightsId: exampleInsights.ID(), // Kind: pulumi.String("ping"), // Frequency: pulumi.Int(300), // Timeout: pulumi.Int(60), // Enabled: pulumi.Bool(true), // GeoLocations: pulumi.StringArray{ // pulumi.String("us-tx-sn1-azr"), // pulumi.String("us-il-ch1-azr"), // }, // Configuration: pulumi.String(`<WebTest Name=\"WebTest1\" Id=\"ABD48585-0831-40CB-9069-682EA6BB3583\" Enabled=\"True\" CssProjectStructure=\"\" CssIteration=\"\" Timeout=\"0\" WorkItemIds=\"\" xmlns=\"http://microsoft.com/schemas/VisualStudio/TeamTest/2010\" Description=\"\" CredentialUserName=\"\" CredentialPassword=\"\" PreAuthenticate=\"True\" Proxy=\"default\" StopOnError=\"False\" RecordedResultFile=\"\" ResultsLocale=\"\"> // <Items> // <Request Method=\"GET\" Guid=\"a5f10126-e4cd-570d-961c-cea43999a200\" Version=\"1.1\" Url=\"http://microsoft.com\" ThinkTime=\"0\" Timeout=\"300\" ParseDependentRequests=\"True\" FollowRedirects=\"True\" RecordResult=\"True\" Cache=\"False\" ResponseTimeGoal=\"0\" Encoding=\"utf-8\" ExpectedHttpStatusCode=\"200\" ExpectedResponseUrl=\"\" ReportingName=\"\" IgnoreHttpStatusCode=\"False\" /> // </Items> // // </WebTest> // `), // // }) // if err != nil { // return err // } // ctx.Export("webtestId", exampleWebTest.ID()) // ctx.Export("webtestsSyntheticId", exampleWebTest.SyntheticMonitorId) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Insights` - 2022-06-15 // // ## Import // // Application Insights Web Tests can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appinsights/webTest:WebTest my_test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Insights/webTests/my_test // ``` type WebTest struct { pulumi.CustomResourceState // The ID of the Application Insights component on which the WebTest operates. Changing this forces a new resource to be created. ApplicationInsightsId pulumi.StringOutput `pulumi:"applicationInsightsId"` // An XML configuration specification for a WebTest ([see here for more information](https://docs.microsoft.com/rest/api/application-insights/webtests/createorupdate/)). Configuration pulumi.StringOutput `pulumi:"configuration"` // Purpose/user defined descriptive test for this WebTest. Description pulumi.StringPtrOutput `pulumi:"description"` // Is the test actively being monitored. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // Interval in seconds between test runs for this WebTest. Valid options are `300`, `600` and `900`. Defaults to `300`. Frequency pulumi.IntPtrOutput `pulumi:"frequency"` // A list of where to physically run the tests from to give global coverage for accessibility of your application. // // > **Note:** [Valid options for geo locations are described here](https://docs.microsoft.com/azure/azure-monitor/app/monitor-web-app-availability#location-population-tags) GeoLocations pulumi.StringArrayOutput `pulumi:"geoLocations"` // The kind of web test that this web test watches. Choices are `ping` and `multistep`. Changing this forces a new resource to be created. Kind pulumi.StringOutput `pulumi:"kind"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. It needs to correlate with location of parent resource (azurerm_application_insights). Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of the Application Insights WebTest. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which to create the Application Insights WebTest. Changing this forces a new resource ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Allow for retries should this WebTest fail. RetryEnabled pulumi.BoolPtrOutput `pulumi:"retryEnabled"` SyntheticMonitorId pulumi.StringOutput `pulumi:"syntheticMonitorId"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Seconds until this WebTest will timeout and fail. Default is `30`. Timeout pulumi.IntPtrOutput `pulumi:"timeout"` } // NewWebTest registers a new resource with the given unique name, arguments, and options. func NewWebTest(ctx *pulumi.Context, name string, args *WebTestArgs, opts ...pulumi.ResourceOption) (*WebTest, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ApplicationInsightsId == nil { return nil, errors.New("invalid value for required argument 'ApplicationInsightsId'") } if args.Configuration == nil { return nil, errors.New("invalid value for required argument 'Configuration'") } if args.GeoLocations == nil { return nil, errors.New("invalid value for required argument 'GeoLocations'") } if args.Kind == nil { return nil, errors.New("invalid value for required argument 'Kind'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource WebTest err := ctx.RegisterResource("azure:appinsights/webTest:WebTest", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWebTest gets an existing WebTest resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetWebTest(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WebTestState, opts ...pulumi.ResourceOption) (*WebTest, error) { var resource WebTest err := ctx.ReadResource("azure:appinsights/webTest:WebTest", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering WebTest resources. type webTestState struct { // The ID of the Application Insights component on which the WebTest operates. Changing this forces a new resource to be created. ApplicationInsightsId *string `pulumi:"applicationInsightsId"` // An XML configuration specification for a WebTest ([see here for more information](https://docs.microsoft.com/rest/api/application-insights/webtests/createorupdate/)). Configuration *string `pulumi:"configuration"` // Purpose/user defined descriptive test for this WebTest. Description *string `pulumi:"description"` // Is the test actively being monitored. Enabled *bool `pulumi:"enabled"` // Interval in seconds between test runs for this WebTest. Valid options are `300`, `600` and `900`. Defaults to `300`. Frequency *int `pulumi:"frequency"` // A list of where to physically run the tests from to give global coverage for accessibility of your application. // // > **Note:** [Valid options for geo locations are described here](https://docs.microsoft.com/azure/azure-monitor/app/monitor-web-app-availability#location-population-tags) GeoLocations []string `pulumi:"geoLocations"` // The kind of web test that this web test watches. Choices are `ping` and `multistep`. Changing this forces a new resource to be created. Kind *string `pulumi:"kind"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. It needs to correlate with location of parent resource (azurerm_application_insights). Location *string `pulumi:"location"` // Specifies the name of the Application Insights WebTest. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Application Insights WebTest. Changing this forces a new resource ResourceGroupName *string `pulumi:"resourceGroupName"` // Allow for retries should this WebTest fail. RetryEnabled *bool `pulumi:"retryEnabled"` SyntheticMonitorId *string `pulumi:"syntheticMonitorId"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Seconds until this WebTest will timeout and fail. Default is `30`. Timeout *int `pulumi:"timeout"` } type WebTestState struct { // The ID of the Application Insights component on which the WebTest operates. Changing this forces a new resource to be created. ApplicationInsightsId pulumi.StringPtrInput // An XML configuration specification for a WebTest ([see here for more information](https://docs.microsoft.com/rest/api/application-insights/webtests/createorupdate/)). Configuration pulumi.StringPtrInput // Purpose/user defined descriptive test for this WebTest. Description pulumi.StringPtrInput // Is the test actively being monitored. Enabled pulumi.BoolPtrInput // Interval in seconds between test runs for this WebTest. Valid options are `300`, `600` and `900`. Defaults to `300`. Frequency pulumi.IntPtrInput // A list of where to physically run the tests from to give global coverage for accessibility of your application. // // > **Note:** [Valid options for geo locations are described here](https://docs.microsoft.com/azure/azure-monitor/app/monitor-web-app-availability#location-population-tags) GeoLocations pulumi.StringArrayInput // The kind of web test that this web test watches. Choices are `ping` and `multistep`. Changing this forces a new resource to be created. Kind pulumi.StringPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. It needs to correlate with location of parent resource (azurerm_application_insights). Location pulumi.StringPtrInput // Specifies the name of the Application Insights WebTest. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Application Insights WebTest. Changing this forces a new resource ResourceGroupName pulumi.StringPtrInput // Allow for retries should this WebTest fail. RetryEnabled pulumi.BoolPtrInput SyntheticMonitorId pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Seconds until this WebTest will timeout and fail. Default is `30`. Timeout pulumi.IntPtrInput } func (WebTestState) ElementType() reflect.Type { return reflect.TypeOf((*webTestState)(nil)).Elem() } type webTestArgs struct { // The ID of the Application Insights component on which the WebTest operates. Changing this forces a new resource to be created. ApplicationInsightsId string `pulumi:"applicationInsightsId"` // An XML configuration specification for a WebTest ([see here for more information](https://docs.microsoft.com/rest/api/application-insights/webtests/createorupdate/)). Configuration string `pulumi:"configuration"` // Purpose/user defined descriptive test for this WebTest. Description *string `pulumi:"description"` // Is the test actively being monitored. Enabled *bool `pulumi:"enabled"` // Interval in seconds between test runs for this WebTest. Valid options are `300`, `600` and `900`. Defaults to `300`. Frequency *int `pulumi:"frequency"` // A list of where to physically run the tests from to give global coverage for accessibility of your application. // // > **Note:** [Valid options for geo locations are described here](https://docs.microsoft.com/azure/azure-monitor/app/monitor-web-app-availability#location-population-tags) GeoLocations []string `pulumi:"geoLocations"` // The kind of web test that this web test watches. Choices are `ping` and `multistep`. Changing this forces a new resource to be created. Kind string `pulumi:"kind"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. It needs to correlate with location of parent resource (azurerm_application_insights). Location *string `pulumi:"location"` // Specifies the name of the Application Insights WebTest. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Application Insights WebTest. Changing this forces a new resource ResourceGroupName string `pulumi:"resourceGroupName"` // Allow for retries should this WebTest fail. RetryEnabled *bool `pulumi:"retryEnabled"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Seconds until this WebTest will timeout and fail. Default is `30`. Timeout *int `pulumi:"timeout"` } // The set of arguments for constructing a WebTest resource. type WebTestArgs struct { // The ID of the Application Insights component on which the WebTest operates. Changing this forces a new resource to be created. ApplicationInsightsId pulumi.StringInput // An XML configuration specification for a WebTest ([see here for more information](https://docs.microsoft.com/rest/api/application-insights/webtests/createorupdate/)). Configuration pulumi.StringInput // Purpose/user defined descriptive test for this WebTest. Description pulumi.StringPtrInput // Is the test actively being monitored. Enabled pulumi.BoolPtrInput // Interval in seconds between test runs for this WebTest. Valid options are `300`, `600` and `900`. Defaults to `300`. Frequency pulumi.IntPtrInput // A list of where to physically run the tests from to give global coverage for accessibility of your application. // // > **Note:** [Valid options for geo locations are described here](https://docs.microsoft.com/azure/azure-monitor/app/monitor-web-app-availability#location-population-tags) GeoLocations pulumi.StringArrayInput // The kind of web test that this web test watches. Choices are `ping` and `multistep`. Changing this forces a new resource to be created. Kind pulumi.StringInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. It needs to correlate with location of parent resource (azurerm_application_insights). Location pulumi.StringPtrInput // Specifies the name of the Application Insights WebTest. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Application Insights WebTest. Changing this forces a new resource ResourceGroupName pulumi.StringInput // Allow for retries should this WebTest fail. RetryEnabled pulumi.BoolPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Seconds until this WebTest will timeout and fail. Default is `30`. Timeout pulumi.IntPtrInput } func (WebTestArgs) ElementType() reflect.Type { return reflect.TypeOf((*webTestArgs)(nil)).Elem() } type WebTestInput interface { pulumi.Input ToWebTestOutput() WebTestOutput ToWebTestOutputWithContext(ctx context.Context) WebTestOutput } func (*WebTest) ElementType() reflect.Type { return reflect.TypeOf((**WebTest)(nil)).Elem() } func (i *WebTest) ToWebTestOutput() WebTestOutput { return i.ToWebTestOutputWithContext(context.Background()) } func (i *WebTest) ToWebTestOutputWithContext(ctx context.Context) WebTestOutput { return pulumi.ToOutputWithContext(ctx, i).(WebTestOutput) } // WebTestArrayInput is an input type that accepts WebTestArray and WebTestArrayOutput values. // You can construct a concrete instance of `WebTestArrayInput` via: // // WebTestArray{ WebTestArgs{...} } type WebTestArrayInput interface { pulumi.Input ToWebTestArrayOutput() WebTestArrayOutput ToWebTestArrayOutputWithContext(context.Context) WebTestArrayOutput } type WebTestArray []WebTestInput func (WebTestArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*WebTest)(nil)).Elem() } func (i WebTestArray) ToWebTestArrayOutput() WebTestArrayOutput { return i.ToWebTestArrayOutputWithContext(context.Background()) } func (i WebTestArray) ToWebTestArrayOutputWithContext(ctx context.Context) WebTestArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WebTestArrayOutput) } // WebTestMapInput is an input type that accepts WebTestMap and WebTestMapOutput values. // You can construct a concrete instance of `WebTestMapInput` via: // // WebTestMap{ "key": WebTestArgs{...} } type WebTestMapInput interface { pulumi.Input ToWebTestMapOutput() WebTestMapOutput ToWebTestMapOutputWithContext(context.Context) WebTestMapOutput } type WebTestMap map[string]WebTestInput func (WebTestMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WebTest)(nil)).Elem() } func (i WebTestMap) ToWebTestMapOutput() WebTestMapOutput { return i.ToWebTestMapOutputWithContext(context.Background()) } func (i WebTestMap) ToWebTestMapOutputWithContext(ctx context.Context) WebTestMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WebTestMapOutput) } type WebTestOutput struct{ *pulumi.OutputState } func (WebTestOutput) ElementType() reflect.Type { return reflect.TypeOf((**WebTest)(nil)).Elem() } func (o WebTestOutput) ToWebTestOutput() WebTestOutput { return o } func (o WebTestOutput) ToWebTestOutputWithContext(ctx context.Context) WebTestOutput { return o } // The ID of the Application Insights component on which the WebTest operates. Changing this forces a new resource to be created. func (o WebTestOutput) ApplicationInsightsId() pulumi.StringOutput { return o.ApplyT(func(v *WebTest) pulumi.StringOutput { return v.ApplicationInsightsId }).(pulumi.StringOutput) } // An XML configuration specification for a WebTest ([see here for more information](https://docs.microsoft.com/rest/api/application-insights/webtests/createorupdate/)). func (o WebTestOutput) Configuration() pulumi.StringOutput { return o.ApplyT(func(v *WebTest) pulumi.StringOutput { return v.Configuration }).(pulumi.StringOutput) } // Purpose/user defined descriptive test for this WebTest. func (o WebTestOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *WebTest) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Is the test actively being monitored. func (o WebTestOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *WebTest) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // Interval in seconds between test runs for this WebTest. Valid options are `300`, `600` and `900`. Defaults to `300`. func (o WebTestOutput) Frequency() pulumi.IntPtrOutput { return o.ApplyT(func(v *WebTest) pulumi.IntPtrOutput { return v.Frequency }).(pulumi.IntPtrOutput) } // A list of where to physically run the tests from to give global coverage for accessibility of your application. // // > **Note:** [Valid options for geo locations are described here](https://docs.microsoft.com/azure/azure-monitor/app/monitor-web-app-availability#location-population-tags) func (o WebTestOutput) GeoLocations() pulumi.StringArrayOutput { return o.ApplyT(func(v *WebTest) pulumi.StringArrayOutput { return v.GeoLocations }).(pulumi.StringArrayOutput) } // The kind of web test that this web test watches. Choices are `ping` and `multistep`. Changing this forces a new resource to be created. func (o WebTestOutput) Kind() pulumi.StringOutput { return o.ApplyT(func(v *WebTest) pulumi.StringOutput { return v.Kind }).(pulumi.StringOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. It needs to correlate with location of parent resource (azurerm_application_insights). func (o WebTestOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *WebTest) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the Application Insights WebTest. Changing this forces a new resource to be created. func (o WebTestOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *WebTest) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the Application Insights WebTest. Changing this forces a new resource func (o WebTestOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *WebTest) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Allow for retries should this WebTest fail. func (o WebTestOutput) RetryEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *WebTest) pulumi.BoolPtrOutput { return v.RetryEnabled }).(pulumi.BoolPtrOutput) } func (o WebTestOutput) SyntheticMonitorId() pulumi.StringOutput { return o.ApplyT(func(v *WebTest) pulumi.StringOutput { return v.SyntheticMonitorId }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o WebTestOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *WebTest) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Seconds until this WebTest will timeout and fail. Default is `30`. func (o WebTestOutput) Timeout() pulumi.IntPtrOutput { return o.ApplyT(func(v *WebTest) pulumi.IntPtrOutput { return v.Timeout }).(pulumi.IntPtrOutput) } type WebTestArrayOutput struct{ *pulumi.OutputState } func (WebTestArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*WebTest)(nil)).Elem() } func (o WebTestArrayOutput) ToWebTestArrayOutput() WebTestArrayOutput { return o } func (o WebTestArrayOutput) ToWebTestArrayOutputWithContext(ctx context.Context) WebTestArrayOutput { return o } func (o WebTestArrayOutput) Index(i pulumi.IntInput) WebTestOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WebTest { return vs[0].([]*WebTest)[vs[1].(int)] }).(WebTestOutput) } type WebTestMapOutput struct{ *pulumi.OutputState } func (WebTestMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WebTest)(nil)).Elem() } func (o WebTestMapOutput) ToWebTestMapOutput() WebTestMapOutput { return o } func (o WebTestMapOutput) ToWebTestMapOutputWithContext(ctx context.Context) WebTestMapOutput { return o } func (o WebTestMapOutput) MapIndex(k pulumi.StringInput) WebTestOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WebTest { return vs[0].(map[string]*WebTest)[vs[1].(string)] }).(WebTestOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*WebTestInput)(nil)).Elem(), &WebTest{}) pulumi.RegisterInputType(reflect.TypeOf((*WebTestArrayInput)(nil)).Elem(), WebTestArray{}) pulumi.RegisterInputType(reflect.TypeOf((*WebTestMapInput)(nil)).Elem(), WebTestMap{}) pulumi.RegisterOutputType(WebTestOutput{}) pulumi.RegisterOutputType(WebTestArrayOutput{}) pulumi.RegisterOutputType(WebTestMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appinsights/workbookTemplate.go
sdk/go/azure/appinsights/workbookTemplate.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appinsights import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Application Insights Workbook Template. // // ## Example Usage // // ```go // package main // // import ( // // "encoding/json" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // tmpJSON0, err := json.Marshal(map[string]interface{}{ // "version": "Notebook/1.0", // "items": []map[string]interface{}{ // map[string]interface{}{ // "type": 1, // "content": map[string]interface{}{ // "json": "## New workbook\n---\n\nWelcome to your new workbook.", // }, // "name": "text - 2", // }, // }, // "styleSettings": map[string]interface{}{}, // "$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json", // }) // if err != nil { // return err // } // json0 := string(tmpJSON0) // tmpJSON1, err := json.Marshal(map[string]interface{}{ // "ar": []map[string]interface{}{ // map[string]interface{}{ // "galleries": []map[string]interface{}{ // map[string]interface{}{ // "name": "test", // "category": "Failures", // "type": "tsg", // "resourceType": "microsoft.insights/components", // "order": 100, // }, // }, // "templateData": map[string]interface{}{ // "version": "Notebook/1.0", // "items": []map[string]interface{}{ // map[string]interface{}{ // "type": 1, // "content": map[string]interface{}{ // "json": "## New workbook\n---\n\nWelcome to your new workbook.", // }, // "name": "text - 2", // }, // }, // "styleSettings": map[string]interface{}{}, // "$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json", // }, // }, // }, // }) // if err != nil { // return err // } // json1 := string(tmpJSON1) // _, err = appinsights.NewWorkbookTemplate(ctx, "example", &appinsights.WorkbookTemplateArgs{ // Name: pulumi.String("example-aiwt"), // ResourceGroupName: example.Name, // Location: pulumi.String("West Europe"), // Author: pulumi.String("test author"), // Priority: pulumi.Int(1), // Galleries: appinsights.WorkbookTemplateGalleryArray{ // &appinsights.WorkbookTemplateGalleryArgs{ // Category: pulumi.String("workbook"), // Name: pulumi.String("test"), // Order: pulumi.Int(100), // ResourceType: pulumi.String("microsoft.insights/components"), // Type: pulumi.String("tsg"), // }, // }, // TemplateData: pulumi.String(json0), // Localized: pulumi.String(json1), // Tags: pulumi.StringMap{ // "key": pulumi.String("value"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Insights` - 2020-11-20 // // ## Import // // Application Insights Workbook Template can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appinsights/workbookTemplate:WorkbookTemplate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Insights/workbookTemplates/resource1 // ``` type WorkbookTemplate struct { pulumi.CustomResourceState // Information about the author of the workbook template. Author pulumi.StringPtrOutput `pulumi:"author"` // A `galleries` block as defined below. Galleries WorkbookTemplateGalleryArrayOutput `pulumi:"galleries"` // Key value pairs of localized gallery. Each key is the locale code of languages supported by the Azure portal. Localized pulumi.StringPtrOutput `pulumi:"localized"` // Specifies the Azure Region where the Application Insights Workbook Template should exist. Changing this forces a new Application Insights Workbook Template to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name which should be used for this Application Insights Workbook Template. Changing this forces a new Application Insights Workbook Template to be created. Name pulumi.StringOutput `pulumi:"name"` // Priority of the template. Determines which template to open when a workbook gallery is opened in viewer mode. Defaults to `0`. Priority pulumi.IntPtrOutput `pulumi:"priority"` // Specifies the name of the Resource Group where the Application Insights Workbook Template should exist. Changing this forces a new Application Insights Workbook Template to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Application Insights Workbook Template. Tags pulumi.StringMapOutput `pulumi:"tags"` // Valid JSON object containing workbook template payload. TemplateData pulumi.StringOutput `pulumi:"templateData"` } // NewWorkbookTemplate registers a new resource with the given unique name, arguments, and options. func NewWorkbookTemplate(ctx *pulumi.Context, name string, args *WorkbookTemplateArgs, opts ...pulumi.ResourceOption) (*WorkbookTemplate, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Galleries == nil { return nil, errors.New("invalid value for required argument 'Galleries'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.TemplateData == nil { return nil, errors.New("invalid value for required argument 'TemplateData'") } opts = internal.PkgResourceDefaultOpts(opts) var resource WorkbookTemplate err := ctx.RegisterResource("azure:appinsights/workbookTemplate:WorkbookTemplate", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWorkbookTemplate gets an existing WorkbookTemplate resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetWorkbookTemplate(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WorkbookTemplateState, opts ...pulumi.ResourceOption) (*WorkbookTemplate, error) { var resource WorkbookTemplate err := ctx.ReadResource("azure:appinsights/workbookTemplate:WorkbookTemplate", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering WorkbookTemplate resources. type workbookTemplateState struct { // Information about the author of the workbook template. Author *string `pulumi:"author"` // A `galleries` block as defined below. Galleries []WorkbookTemplateGallery `pulumi:"galleries"` // Key value pairs of localized gallery. Each key is the locale code of languages supported by the Azure portal. Localized *string `pulumi:"localized"` // Specifies the Azure Region where the Application Insights Workbook Template should exist. Changing this forces a new Application Insights Workbook Template to be created. Location *string `pulumi:"location"` // Specifies the name which should be used for this Application Insights Workbook Template. Changing this forces a new Application Insights Workbook Template to be created. Name *string `pulumi:"name"` // Priority of the template. Determines which template to open when a workbook gallery is opened in viewer mode. Defaults to `0`. Priority *int `pulumi:"priority"` // Specifies the name of the Resource Group where the Application Insights Workbook Template should exist. Changing this forces a new Application Insights Workbook Template to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Application Insights Workbook Template. Tags map[string]string `pulumi:"tags"` // Valid JSON object containing workbook template payload. TemplateData *string `pulumi:"templateData"` } type WorkbookTemplateState struct { // Information about the author of the workbook template. Author pulumi.StringPtrInput // A `galleries` block as defined below. Galleries WorkbookTemplateGalleryArrayInput // Key value pairs of localized gallery. Each key is the locale code of languages supported by the Azure portal. Localized pulumi.StringPtrInput // Specifies the Azure Region where the Application Insights Workbook Template should exist. Changing this forces a new Application Insights Workbook Template to be created. Location pulumi.StringPtrInput // Specifies the name which should be used for this Application Insights Workbook Template. Changing this forces a new Application Insights Workbook Template to be created. Name pulumi.StringPtrInput // Priority of the template. Determines which template to open when a workbook gallery is opened in viewer mode. Defaults to `0`. Priority pulumi.IntPtrInput // Specifies the name of the Resource Group where the Application Insights Workbook Template should exist. Changing this forces a new Application Insights Workbook Template to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Application Insights Workbook Template. Tags pulumi.StringMapInput // Valid JSON object containing workbook template payload. TemplateData pulumi.StringPtrInput } func (WorkbookTemplateState) ElementType() reflect.Type { return reflect.TypeOf((*workbookTemplateState)(nil)).Elem() } type workbookTemplateArgs struct { // Information about the author of the workbook template. Author *string `pulumi:"author"` // A `galleries` block as defined below. Galleries []WorkbookTemplateGallery `pulumi:"galleries"` // Key value pairs of localized gallery. Each key is the locale code of languages supported by the Azure portal. Localized *string `pulumi:"localized"` // Specifies the Azure Region where the Application Insights Workbook Template should exist. Changing this forces a new Application Insights Workbook Template to be created. Location *string `pulumi:"location"` // Specifies the name which should be used for this Application Insights Workbook Template. Changing this forces a new Application Insights Workbook Template to be created. Name *string `pulumi:"name"` // Priority of the template. Determines which template to open when a workbook gallery is opened in viewer mode. Defaults to `0`. Priority *int `pulumi:"priority"` // Specifies the name of the Resource Group where the Application Insights Workbook Template should exist. Changing this forces a new Application Insights Workbook Template to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Application Insights Workbook Template. Tags map[string]string `pulumi:"tags"` // Valid JSON object containing workbook template payload. TemplateData string `pulumi:"templateData"` } // The set of arguments for constructing a WorkbookTemplate resource. type WorkbookTemplateArgs struct { // Information about the author of the workbook template. Author pulumi.StringPtrInput // A `galleries` block as defined below. Galleries WorkbookTemplateGalleryArrayInput // Key value pairs of localized gallery. Each key is the locale code of languages supported by the Azure portal. Localized pulumi.StringPtrInput // Specifies the Azure Region where the Application Insights Workbook Template should exist. Changing this forces a new Application Insights Workbook Template to be created. Location pulumi.StringPtrInput // Specifies the name which should be used for this Application Insights Workbook Template. Changing this forces a new Application Insights Workbook Template to be created. Name pulumi.StringPtrInput // Priority of the template. Determines which template to open when a workbook gallery is opened in viewer mode. Defaults to `0`. Priority pulumi.IntPtrInput // Specifies the name of the Resource Group where the Application Insights Workbook Template should exist. Changing this forces a new Application Insights Workbook Template to be created. ResourceGroupName pulumi.StringInput // A mapping of tags which should be assigned to the Application Insights Workbook Template. Tags pulumi.StringMapInput // Valid JSON object containing workbook template payload. TemplateData pulumi.StringInput } func (WorkbookTemplateArgs) ElementType() reflect.Type { return reflect.TypeOf((*workbookTemplateArgs)(nil)).Elem() } type WorkbookTemplateInput interface { pulumi.Input ToWorkbookTemplateOutput() WorkbookTemplateOutput ToWorkbookTemplateOutputWithContext(ctx context.Context) WorkbookTemplateOutput } func (*WorkbookTemplate) ElementType() reflect.Type { return reflect.TypeOf((**WorkbookTemplate)(nil)).Elem() } func (i *WorkbookTemplate) ToWorkbookTemplateOutput() WorkbookTemplateOutput { return i.ToWorkbookTemplateOutputWithContext(context.Background()) } func (i *WorkbookTemplate) ToWorkbookTemplateOutputWithContext(ctx context.Context) WorkbookTemplateOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkbookTemplateOutput) } // WorkbookTemplateArrayInput is an input type that accepts WorkbookTemplateArray and WorkbookTemplateArrayOutput values. // You can construct a concrete instance of `WorkbookTemplateArrayInput` via: // // WorkbookTemplateArray{ WorkbookTemplateArgs{...} } type WorkbookTemplateArrayInput interface { pulumi.Input ToWorkbookTemplateArrayOutput() WorkbookTemplateArrayOutput ToWorkbookTemplateArrayOutputWithContext(context.Context) WorkbookTemplateArrayOutput } type WorkbookTemplateArray []WorkbookTemplateInput func (WorkbookTemplateArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkbookTemplate)(nil)).Elem() } func (i WorkbookTemplateArray) ToWorkbookTemplateArrayOutput() WorkbookTemplateArrayOutput { return i.ToWorkbookTemplateArrayOutputWithContext(context.Background()) } func (i WorkbookTemplateArray) ToWorkbookTemplateArrayOutputWithContext(ctx context.Context) WorkbookTemplateArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkbookTemplateArrayOutput) } // WorkbookTemplateMapInput is an input type that accepts WorkbookTemplateMap and WorkbookTemplateMapOutput values. // You can construct a concrete instance of `WorkbookTemplateMapInput` via: // // WorkbookTemplateMap{ "key": WorkbookTemplateArgs{...} } type WorkbookTemplateMapInput interface { pulumi.Input ToWorkbookTemplateMapOutput() WorkbookTemplateMapOutput ToWorkbookTemplateMapOutputWithContext(context.Context) WorkbookTemplateMapOutput } type WorkbookTemplateMap map[string]WorkbookTemplateInput func (WorkbookTemplateMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkbookTemplate)(nil)).Elem() } func (i WorkbookTemplateMap) ToWorkbookTemplateMapOutput() WorkbookTemplateMapOutput { return i.ToWorkbookTemplateMapOutputWithContext(context.Background()) } func (i WorkbookTemplateMap) ToWorkbookTemplateMapOutputWithContext(ctx context.Context) WorkbookTemplateMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkbookTemplateMapOutput) } type WorkbookTemplateOutput struct{ *pulumi.OutputState } func (WorkbookTemplateOutput) ElementType() reflect.Type { return reflect.TypeOf((**WorkbookTemplate)(nil)).Elem() } func (o WorkbookTemplateOutput) ToWorkbookTemplateOutput() WorkbookTemplateOutput { return o } func (o WorkbookTemplateOutput) ToWorkbookTemplateOutputWithContext(ctx context.Context) WorkbookTemplateOutput { return o } // Information about the author of the workbook template. func (o WorkbookTemplateOutput) Author() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkbookTemplate) pulumi.StringPtrOutput { return v.Author }).(pulumi.StringPtrOutput) } // A `galleries` block as defined below. func (o WorkbookTemplateOutput) Galleries() WorkbookTemplateGalleryArrayOutput { return o.ApplyT(func(v *WorkbookTemplate) WorkbookTemplateGalleryArrayOutput { return v.Galleries }).(WorkbookTemplateGalleryArrayOutput) } // Key value pairs of localized gallery. Each key is the locale code of languages supported by the Azure portal. func (o WorkbookTemplateOutput) Localized() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkbookTemplate) pulumi.StringPtrOutput { return v.Localized }).(pulumi.StringPtrOutput) } // Specifies the Azure Region where the Application Insights Workbook Template should exist. Changing this forces a new Application Insights Workbook Template to be created. func (o WorkbookTemplateOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *WorkbookTemplate) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name which should be used for this Application Insights Workbook Template. Changing this forces a new Application Insights Workbook Template to be created. func (o WorkbookTemplateOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *WorkbookTemplate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Priority of the template. Determines which template to open when a workbook gallery is opened in viewer mode. Defaults to `0`. func (o WorkbookTemplateOutput) Priority() pulumi.IntPtrOutput { return o.ApplyT(func(v *WorkbookTemplate) pulumi.IntPtrOutput { return v.Priority }).(pulumi.IntPtrOutput) } // Specifies the name of the Resource Group where the Application Insights Workbook Template should exist. Changing this forces a new Application Insights Workbook Template to be created. func (o WorkbookTemplateOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *WorkbookTemplate) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Application Insights Workbook Template. func (o WorkbookTemplateOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *WorkbookTemplate) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Valid JSON object containing workbook template payload. func (o WorkbookTemplateOutput) TemplateData() pulumi.StringOutput { return o.ApplyT(func(v *WorkbookTemplate) pulumi.StringOutput { return v.TemplateData }).(pulumi.StringOutput) } type WorkbookTemplateArrayOutput struct{ *pulumi.OutputState } func (WorkbookTemplateArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkbookTemplate)(nil)).Elem() } func (o WorkbookTemplateArrayOutput) ToWorkbookTemplateArrayOutput() WorkbookTemplateArrayOutput { return o } func (o WorkbookTemplateArrayOutput) ToWorkbookTemplateArrayOutputWithContext(ctx context.Context) WorkbookTemplateArrayOutput { return o } func (o WorkbookTemplateArrayOutput) Index(i pulumi.IntInput) WorkbookTemplateOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkbookTemplate { return vs[0].([]*WorkbookTemplate)[vs[1].(int)] }).(WorkbookTemplateOutput) } type WorkbookTemplateMapOutput struct{ *pulumi.OutputState } func (WorkbookTemplateMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkbookTemplate)(nil)).Elem() } func (o WorkbookTemplateMapOutput) ToWorkbookTemplateMapOutput() WorkbookTemplateMapOutput { return o } func (o WorkbookTemplateMapOutput) ToWorkbookTemplateMapOutputWithContext(ctx context.Context) WorkbookTemplateMapOutput { return o } func (o WorkbookTemplateMapOutput) MapIndex(k pulumi.StringInput) WorkbookTemplateOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkbookTemplate { return vs[0].(map[string]*WorkbookTemplate)[vs[1].(string)] }).(WorkbookTemplateOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*WorkbookTemplateInput)(nil)).Elem(), &WorkbookTemplate{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkbookTemplateArrayInput)(nil)).Elem(), WorkbookTemplateArray{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkbookTemplateMapInput)(nil)).Elem(), WorkbookTemplateMap{}) pulumi.RegisterOutputType(WorkbookTemplateOutput{}) pulumi.RegisterOutputType(WorkbookTemplateArrayOutput{}) pulumi.RegisterOutputType(WorkbookTemplateMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appinsights/workbook.go
sdk/go/azure/appinsights/workbook.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appinsights import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Azure Workbook. // // ## Example Usage // // ```go // package main // // import ( // // "encoding/json" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // tmpJSON0, err := json.Marshal(map[string]interface{}{ // "version": "Notebook/1.0", // "items": []map[string]interface{}{ // map[string]interface{}{ // "type": 1, // "content": map[string]interface{}{ // "json": "Test2022", // }, // "name": "text - 0", // }, // }, // "isLocked": false, // "fallbackResourceIds": []string{ // "Azure Monitor", // }, // }) // if err != nil { // return err // } // json0 := string(tmpJSON0) // _, err = appinsights.NewWorkbook(ctx, "example", &appinsights.WorkbookArgs{ // Name: pulumi.String("85b3e8bb-fc93-40be-83f2-98f6bec18ba0"), // ResourceGroupName: example.Name, // Location: example.Location, // DisplayName: pulumi.String("workbook1"), // DataJson: pulumi.String(json0), // Tags: pulumi.StringMap{ // "ENV": pulumi.String("Test"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Insights` - 2022-04-01 // // ## Import // // Workbooks can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appinsights/workbook:Workbook example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Insights/workbooks/resource1 // ``` type Workbook struct { pulumi.CustomResourceState // Workbook category, as defined by the user at creation time. There may be additional category types beyond the following: `workbook`, `sentinel`. Defaults to `workbook`. Category pulumi.StringPtrOutput `pulumi:"category"` // Configuration of this particular workbook. Configuration data is a string containing valid JSON. DataJson pulumi.StringOutput `pulumi:"dataJson"` // Specifies the description of the workbook. Description pulumi.StringPtrOutput `pulumi:"description"` // Specifies the user-defined name (display name) of the workbook. DisplayName pulumi.StringOutput `pulumi:"displayName"` // An `identity` block as defined below. Changing this forces a new Workbook to be created. Identity WorkbookIdentityPtrOutput `pulumi:"identity"` // Specifies the Azure Region where the Workbook should exist. Changing this forces a new Workbook to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of this Workbook as a UUID/GUID. It should not contain any uppercase letters. Changing this forces a new Workbook to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the name of the Resource Group where the Workbook should exist. Changing this forces a new Workbook to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Resource ID for a source resource. It should not contain any uppercase letters. Defaults to `azure monitor`. SourceId pulumi.StringPtrOutput `pulumi:"sourceId"` // Specifies the Resource Manager ID of the Storage Container when bring your own storage is used. Changing this forces a new Workbook to be created. // // > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`. StorageContainerId pulumi.StringPtrOutput `pulumi:"storageContainerId"` // A mapping of tags which should be assigned to the Workbook. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewWorkbook registers a new resource with the given unique name, arguments, and options. func NewWorkbook(ctx *pulumi.Context, name string, args *WorkbookArgs, opts ...pulumi.ResourceOption) (*Workbook, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DataJson == nil { return nil, errors.New("invalid value for required argument 'DataJson'") } if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Workbook err := ctx.RegisterResource("azure:appinsights/workbook:Workbook", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWorkbook gets an existing Workbook resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetWorkbook(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WorkbookState, opts ...pulumi.ResourceOption) (*Workbook, error) { var resource Workbook err := ctx.ReadResource("azure:appinsights/workbook:Workbook", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Workbook resources. type workbookState struct { // Workbook category, as defined by the user at creation time. There may be additional category types beyond the following: `workbook`, `sentinel`. Defaults to `workbook`. Category *string `pulumi:"category"` // Configuration of this particular workbook. Configuration data is a string containing valid JSON. DataJson *string `pulumi:"dataJson"` // Specifies the description of the workbook. Description *string `pulumi:"description"` // Specifies the user-defined name (display name) of the workbook. DisplayName *string `pulumi:"displayName"` // An `identity` block as defined below. Changing this forces a new Workbook to be created. Identity *WorkbookIdentity `pulumi:"identity"` // Specifies the Azure Region where the Workbook should exist. Changing this forces a new Workbook to be created. Location *string `pulumi:"location"` // Specifies the name of this Workbook as a UUID/GUID. It should not contain any uppercase letters. Changing this forces a new Workbook to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group where the Workbook should exist. Changing this forces a new Workbook to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Resource ID for a source resource. It should not contain any uppercase letters. Defaults to `azure monitor`. SourceId *string `pulumi:"sourceId"` // Specifies the Resource Manager ID of the Storage Container when bring your own storage is used. Changing this forces a new Workbook to be created. // // > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`. StorageContainerId *string `pulumi:"storageContainerId"` // A mapping of tags which should be assigned to the Workbook. Tags map[string]string `pulumi:"tags"` } type WorkbookState struct { // Workbook category, as defined by the user at creation time. There may be additional category types beyond the following: `workbook`, `sentinel`. Defaults to `workbook`. Category pulumi.StringPtrInput // Configuration of this particular workbook. Configuration data is a string containing valid JSON. DataJson pulumi.StringPtrInput // Specifies the description of the workbook. Description pulumi.StringPtrInput // Specifies the user-defined name (display name) of the workbook. DisplayName pulumi.StringPtrInput // An `identity` block as defined below. Changing this forces a new Workbook to be created. Identity WorkbookIdentityPtrInput // Specifies the Azure Region where the Workbook should exist. Changing this forces a new Workbook to be created. Location pulumi.StringPtrInput // Specifies the name of this Workbook as a UUID/GUID. It should not contain any uppercase letters. Changing this forces a new Workbook to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group where the Workbook should exist. Changing this forces a new Workbook to be created. ResourceGroupName pulumi.StringPtrInput // Resource ID for a source resource. It should not contain any uppercase letters. Defaults to `azure monitor`. SourceId pulumi.StringPtrInput // Specifies the Resource Manager ID of the Storage Container when bring your own storage is used. Changing this forces a new Workbook to be created. // // > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`. StorageContainerId pulumi.StringPtrInput // A mapping of tags which should be assigned to the Workbook. Tags pulumi.StringMapInput } func (WorkbookState) ElementType() reflect.Type { return reflect.TypeOf((*workbookState)(nil)).Elem() } type workbookArgs struct { // Workbook category, as defined by the user at creation time. There may be additional category types beyond the following: `workbook`, `sentinel`. Defaults to `workbook`. Category *string `pulumi:"category"` // Configuration of this particular workbook. Configuration data is a string containing valid JSON. DataJson string `pulumi:"dataJson"` // Specifies the description of the workbook. Description *string `pulumi:"description"` // Specifies the user-defined name (display name) of the workbook. DisplayName string `pulumi:"displayName"` // An `identity` block as defined below. Changing this forces a new Workbook to be created. Identity *WorkbookIdentity `pulumi:"identity"` // Specifies the Azure Region where the Workbook should exist. Changing this forces a new Workbook to be created. Location *string `pulumi:"location"` // Specifies the name of this Workbook as a UUID/GUID. It should not contain any uppercase letters. Changing this forces a new Workbook to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group where the Workbook should exist. Changing this forces a new Workbook to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Resource ID for a source resource. It should not contain any uppercase letters. Defaults to `azure monitor`. SourceId *string `pulumi:"sourceId"` // Specifies the Resource Manager ID of the Storage Container when bring your own storage is used. Changing this forces a new Workbook to be created. // // > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`. StorageContainerId *string `pulumi:"storageContainerId"` // A mapping of tags which should be assigned to the Workbook. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Workbook resource. type WorkbookArgs struct { // Workbook category, as defined by the user at creation time. There may be additional category types beyond the following: `workbook`, `sentinel`. Defaults to `workbook`. Category pulumi.StringPtrInput // Configuration of this particular workbook. Configuration data is a string containing valid JSON. DataJson pulumi.StringInput // Specifies the description of the workbook. Description pulumi.StringPtrInput // Specifies the user-defined name (display name) of the workbook. DisplayName pulumi.StringInput // An `identity` block as defined below. Changing this forces a new Workbook to be created. Identity WorkbookIdentityPtrInput // Specifies the Azure Region where the Workbook should exist. Changing this forces a new Workbook to be created. Location pulumi.StringPtrInput // Specifies the name of this Workbook as a UUID/GUID. It should not contain any uppercase letters. Changing this forces a new Workbook to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group where the Workbook should exist. Changing this forces a new Workbook to be created. ResourceGroupName pulumi.StringInput // Resource ID for a source resource. It should not contain any uppercase letters. Defaults to `azure monitor`. SourceId pulumi.StringPtrInput // Specifies the Resource Manager ID of the Storage Container when bring your own storage is used. Changing this forces a new Workbook to be created. // // > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`. StorageContainerId pulumi.StringPtrInput // A mapping of tags which should be assigned to the Workbook. Tags pulumi.StringMapInput } func (WorkbookArgs) ElementType() reflect.Type { return reflect.TypeOf((*workbookArgs)(nil)).Elem() } type WorkbookInput interface { pulumi.Input ToWorkbookOutput() WorkbookOutput ToWorkbookOutputWithContext(ctx context.Context) WorkbookOutput } func (*Workbook) ElementType() reflect.Type { return reflect.TypeOf((**Workbook)(nil)).Elem() } func (i *Workbook) ToWorkbookOutput() WorkbookOutput { return i.ToWorkbookOutputWithContext(context.Background()) } func (i *Workbook) ToWorkbookOutputWithContext(ctx context.Context) WorkbookOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkbookOutput) } // WorkbookArrayInput is an input type that accepts WorkbookArray and WorkbookArrayOutput values. // You can construct a concrete instance of `WorkbookArrayInput` via: // // WorkbookArray{ WorkbookArgs{...} } type WorkbookArrayInput interface { pulumi.Input ToWorkbookArrayOutput() WorkbookArrayOutput ToWorkbookArrayOutputWithContext(context.Context) WorkbookArrayOutput } type WorkbookArray []WorkbookInput func (WorkbookArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Workbook)(nil)).Elem() } func (i WorkbookArray) ToWorkbookArrayOutput() WorkbookArrayOutput { return i.ToWorkbookArrayOutputWithContext(context.Background()) } func (i WorkbookArray) ToWorkbookArrayOutputWithContext(ctx context.Context) WorkbookArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkbookArrayOutput) } // WorkbookMapInput is an input type that accepts WorkbookMap and WorkbookMapOutput values. // You can construct a concrete instance of `WorkbookMapInput` via: // // WorkbookMap{ "key": WorkbookArgs{...} } type WorkbookMapInput interface { pulumi.Input ToWorkbookMapOutput() WorkbookMapOutput ToWorkbookMapOutputWithContext(context.Context) WorkbookMapOutput } type WorkbookMap map[string]WorkbookInput func (WorkbookMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Workbook)(nil)).Elem() } func (i WorkbookMap) ToWorkbookMapOutput() WorkbookMapOutput { return i.ToWorkbookMapOutputWithContext(context.Background()) } func (i WorkbookMap) ToWorkbookMapOutputWithContext(ctx context.Context) WorkbookMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkbookMapOutput) } type WorkbookOutput struct{ *pulumi.OutputState } func (WorkbookOutput) ElementType() reflect.Type { return reflect.TypeOf((**Workbook)(nil)).Elem() } func (o WorkbookOutput) ToWorkbookOutput() WorkbookOutput { return o } func (o WorkbookOutput) ToWorkbookOutputWithContext(ctx context.Context) WorkbookOutput { return o } // Workbook category, as defined by the user at creation time. There may be additional category types beyond the following: `workbook`, `sentinel`. Defaults to `workbook`. func (o WorkbookOutput) Category() pulumi.StringPtrOutput { return o.ApplyT(func(v *Workbook) pulumi.StringPtrOutput { return v.Category }).(pulumi.StringPtrOutput) } // Configuration of this particular workbook. Configuration data is a string containing valid JSON. func (o WorkbookOutput) DataJson() pulumi.StringOutput { return o.ApplyT(func(v *Workbook) pulumi.StringOutput { return v.DataJson }).(pulumi.StringOutput) } // Specifies the description of the workbook. func (o WorkbookOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *Workbook) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Specifies the user-defined name (display name) of the workbook. func (o WorkbookOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *Workbook) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // An `identity` block as defined below. Changing this forces a new Workbook to be created. func (o WorkbookOutput) Identity() WorkbookIdentityPtrOutput { return o.ApplyT(func(v *Workbook) WorkbookIdentityPtrOutput { return v.Identity }).(WorkbookIdentityPtrOutput) } // Specifies the Azure Region where the Workbook should exist. Changing this forces a new Workbook to be created. func (o WorkbookOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Workbook) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of this Workbook as a UUID/GUID. It should not contain any uppercase letters. Changing this forces a new Workbook to be created. func (o WorkbookOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Workbook) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the name of the Resource Group where the Workbook should exist. Changing this forces a new Workbook to be created. func (o WorkbookOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Workbook) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Resource ID for a source resource. It should not contain any uppercase letters. Defaults to `azure monitor`. func (o WorkbookOutput) SourceId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Workbook) pulumi.StringPtrOutput { return v.SourceId }).(pulumi.StringPtrOutput) } // Specifies the Resource Manager ID of the Storage Container when bring your own storage is used. Changing this forces a new Workbook to be created. // // > **Note:** This is the Resource Manager ID of the Storage Container, rather than the regular ID - and can be accessed on the `storage.Container` Data Source/Resource as `resourceManagerId`. func (o WorkbookOutput) StorageContainerId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Workbook) pulumi.StringPtrOutput { return v.StorageContainerId }).(pulumi.StringPtrOutput) } // A mapping of tags which should be assigned to the Workbook. func (o WorkbookOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Workbook) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type WorkbookArrayOutput struct{ *pulumi.OutputState } func (WorkbookArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Workbook)(nil)).Elem() } func (o WorkbookArrayOutput) ToWorkbookArrayOutput() WorkbookArrayOutput { return o } func (o WorkbookArrayOutput) ToWorkbookArrayOutputWithContext(ctx context.Context) WorkbookArrayOutput { return o } func (o WorkbookArrayOutput) Index(i pulumi.IntInput) WorkbookOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Workbook { return vs[0].([]*Workbook)[vs[1].(int)] }).(WorkbookOutput) } type WorkbookMapOutput struct{ *pulumi.OutputState } func (WorkbookMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Workbook)(nil)).Elem() } func (o WorkbookMapOutput) ToWorkbookMapOutput() WorkbookMapOutput { return o } func (o WorkbookMapOutput) ToWorkbookMapOutputWithContext(ctx context.Context) WorkbookMapOutput { return o } func (o WorkbookMapOutput) MapIndex(k pulumi.StringInput) WorkbookOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Workbook { return vs[0].(map[string]*Workbook)[vs[1].(string)] }).(WorkbookOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*WorkbookInput)(nil)).Elem(), &Workbook{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkbookArrayInput)(nil)).Elem(), WorkbookArray{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkbookMapInput)(nil)).Elem(), WorkbookMap{}) pulumi.RegisterOutputType(WorkbookOutput{}) pulumi.RegisterOutputType(WorkbookArrayOutput{}) pulumi.RegisterOutputType(WorkbookMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/powerbi/init.go
sdk/go/azure/powerbi/init.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package powerbi import ( "fmt" "github.com/blang/semver" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type module struct { version semver.Version } func (m *module) Version() semver.Version { return m.version } func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { case "azure:powerbi/embedded:Embedded": r = &Embedded{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) return } func init() { version, err := internal.PkgVersion() if err != nil { version = semver.Version{Major: 1} } pulumi.RegisterResourceModule( "azure", "powerbi/embedded", &module{version}, ) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/powerbi/embedded.go
sdk/go/azure/powerbi/embedded.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package powerbi import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a PowerBI Embedded. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/powerbi" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = powerbi.NewEmbedded(ctx, "example", &powerbi.EmbeddedArgs{ // Name: pulumi.String("examplepowerbi"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("A1"), // Administrators: pulumi.StringArray{ // pulumi.String("azsdktest@microsoft.com"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.PowerBIDedicated` - 2021-01-01 // // ## Import // // PowerBI Embedded can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:powerbi/embedded:Embedded example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.PowerBIDedicated/capacities/capacity1 // ``` type Embedded struct { pulumi.CustomResourceState // A set of administrator user identities, which manages the Power BI Embedded and must be a member user or a service principal in your AAD tenant. Administrators pulumi.StringArrayOutput `pulumi:"administrators"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Sets the PowerBI Embedded's mode. Possible values include: `Gen1`, `Gen2`. Defaults to `Gen1`. Changing this forces a new resource to be created. Mode pulumi.StringPtrOutput `pulumi:"mode"` // The name of the PowerBI Embedded. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the PowerBI Embedded should be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Sets the PowerBI Embedded's pricing level's SKU. Possible values include: `A1`, `A2`, `A3`, `A4`, `A5`, `A6`, `A7` and `A8`. SkuName pulumi.StringOutput `pulumi:"skuName"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewEmbedded registers a new resource with the given unique name, arguments, and options. func NewEmbedded(ctx *pulumi.Context, name string, args *EmbeddedArgs, opts ...pulumi.ResourceOption) (*Embedded, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Administrators == nil { return nil, errors.New("invalid value for required argument 'Administrators'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SkuName == nil { return nil, errors.New("invalid value for required argument 'SkuName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Embedded err := ctx.RegisterResource("azure:powerbi/embedded:Embedded", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetEmbedded gets an existing Embedded resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetEmbedded(ctx *pulumi.Context, name string, id pulumi.IDInput, state *EmbeddedState, opts ...pulumi.ResourceOption) (*Embedded, error) { var resource Embedded err := ctx.ReadResource("azure:powerbi/embedded:Embedded", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Embedded resources. type embeddedState struct { // A set of administrator user identities, which manages the Power BI Embedded and must be a member user or a service principal in your AAD tenant. Administrators []string `pulumi:"administrators"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Sets the PowerBI Embedded's mode. Possible values include: `Gen1`, `Gen2`. Defaults to `Gen1`. Changing this forces a new resource to be created. Mode *string `pulumi:"mode"` // The name of the PowerBI Embedded. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the PowerBI Embedded should be created. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Sets the PowerBI Embedded's pricing level's SKU. Possible values include: `A1`, `A2`, `A3`, `A4`, `A5`, `A6`, `A7` and `A8`. SkuName *string `pulumi:"skuName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } type EmbeddedState struct { // A set of administrator user identities, which manages the Power BI Embedded and must be a member user or a service principal in your AAD tenant. Administrators pulumi.StringArrayInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Sets the PowerBI Embedded's mode. Possible values include: `Gen1`, `Gen2`. Defaults to `Gen1`. Changing this forces a new resource to be created. Mode pulumi.StringPtrInput // The name of the PowerBI Embedded. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the PowerBI Embedded should be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Sets the PowerBI Embedded's pricing level's SKU. Possible values include: `A1`, `A2`, `A3`, `A4`, `A5`, `A6`, `A7` and `A8`. SkuName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (EmbeddedState) ElementType() reflect.Type { return reflect.TypeOf((*embeddedState)(nil)).Elem() } type embeddedArgs struct { // A set of administrator user identities, which manages the Power BI Embedded and must be a member user or a service principal in your AAD tenant. Administrators []string `pulumi:"administrators"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Sets the PowerBI Embedded's mode. Possible values include: `Gen1`, `Gen2`. Defaults to `Gen1`. Changing this forces a new resource to be created. Mode *string `pulumi:"mode"` // The name of the PowerBI Embedded. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the PowerBI Embedded should be created. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Sets the PowerBI Embedded's pricing level's SKU. Possible values include: `A1`, `A2`, `A3`, `A4`, `A5`, `A6`, `A7` and `A8`. SkuName string `pulumi:"skuName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Embedded resource. type EmbeddedArgs struct { // A set of administrator user identities, which manages the Power BI Embedded and must be a member user or a service principal in your AAD tenant. Administrators pulumi.StringArrayInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Sets the PowerBI Embedded's mode. Possible values include: `Gen1`, `Gen2`. Defaults to `Gen1`. Changing this forces a new resource to be created. Mode pulumi.StringPtrInput // The name of the PowerBI Embedded. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the PowerBI Embedded should be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Sets the PowerBI Embedded's pricing level's SKU. Possible values include: `A1`, `A2`, `A3`, `A4`, `A5`, `A6`, `A7` and `A8`. SkuName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (EmbeddedArgs) ElementType() reflect.Type { return reflect.TypeOf((*embeddedArgs)(nil)).Elem() } type EmbeddedInput interface { pulumi.Input ToEmbeddedOutput() EmbeddedOutput ToEmbeddedOutputWithContext(ctx context.Context) EmbeddedOutput } func (*Embedded) ElementType() reflect.Type { return reflect.TypeOf((**Embedded)(nil)).Elem() } func (i *Embedded) ToEmbeddedOutput() EmbeddedOutput { return i.ToEmbeddedOutputWithContext(context.Background()) } func (i *Embedded) ToEmbeddedOutputWithContext(ctx context.Context) EmbeddedOutput { return pulumi.ToOutputWithContext(ctx, i).(EmbeddedOutput) } // EmbeddedArrayInput is an input type that accepts EmbeddedArray and EmbeddedArrayOutput values. // You can construct a concrete instance of `EmbeddedArrayInput` via: // // EmbeddedArray{ EmbeddedArgs{...} } type EmbeddedArrayInput interface { pulumi.Input ToEmbeddedArrayOutput() EmbeddedArrayOutput ToEmbeddedArrayOutputWithContext(context.Context) EmbeddedArrayOutput } type EmbeddedArray []EmbeddedInput func (EmbeddedArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Embedded)(nil)).Elem() } func (i EmbeddedArray) ToEmbeddedArrayOutput() EmbeddedArrayOutput { return i.ToEmbeddedArrayOutputWithContext(context.Background()) } func (i EmbeddedArray) ToEmbeddedArrayOutputWithContext(ctx context.Context) EmbeddedArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(EmbeddedArrayOutput) } // EmbeddedMapInput is an input type that accepts EmbeddedMap and EmbeddedMapOutput values. // You can construct a concrete instance of `EmbeddedMapInput` via: // // EmbeddedMap{ "key": EmbeddedArgs{...} } type EmbeddedMapInput interface { pulumi.Input ToEmbeddedMapOutput() EmbeddedMapOutput ToEmbeddedMapOutputWithContext(context.Context) EmbeddedMapOutput } type EmbeddedMap map[string]EmbeddedInput func (EmbeddedMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Embedded)(nil)).Elem() } func (i EmbeddedMap) ToEmbeddedMapOutput() EmbeddedMapOutput { return i.ToEmbeddedMapOutputWithContext(context.Background()) } func (i EmbeddedMap) ToEmbeddedMapOutputWithContext(ctx context.Context) EmbeddedMapOutput { return pulumi.ToOutputWithContext(ctx, i).(EmbeddedMapOutput) } type EmbeddedOutput struct{ *pulumi.OutputState } func (EmbeddedOutput) ElementType() reflect.Type { return reflect.TypeOf((**Embedded)(nil)).Elem() } func (o EmbeddedOutput) ToEmbeddedOutput() EmbeddedOutput { return o } func (o EmbeddedOutput) ToEmbeddedOutputWithContext(ctx context.Context) EmbeddedOutput { return o } // A set of administrator user identities, which manages the Power BI Embedded and must be a member user or a service principal in your AAD tenant. func (o EmbeddedOutput) Administrators() pulumi.StringArrayOutput { return o.ApplyT(func(v *Embedded) pulumi.StringArrayOutput { return v.Administrators }).(pulumi.StringArrayOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o EmbeddedOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Embedded) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Sets the PowerBI Embedded's mode. Possible values include: `Gen1`, `Gen2`. Defaults to `Gen1`. Changing this forces a new resource to be created. func (o EmbeddedOutput) Mode() pulumi.StringPtrOutput { return o.ApplyT(func(v *Embedded) pulumi.StringPtrOutput { return v.Mode }).(pulumi.StringPtrOutput) } // The name of the PowerBI Embedded. Changing this forces a new resource to be created. func (o EmbeddedOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Embedded) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the PowerBI Embedded should be created. Changing this forces a new resource to be created. func (o EmbeddedOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Embedded) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Sets the PowerBI Embedded's pricing level's SKU. Possible values include: `A1`, `A2`, `A3`, `A4`, `A5`, `A6`, `A7` and `A8`. func (o EmbeddedOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v *Embedded) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o EmbeddedOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Embedded) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type EmbeddedArrayOutput struct{ *pulumi.OutputState } func (EmbeddedArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Embedded)(nil)).Elem() } func (o EmbeddedArrayOutput) ToEmbeddedArrayOutput() EmbeddedArrayOutput { return o } func (o EmbeddedArrayOutput) ToEmbeddedArrayOutputWithContext(ctx context.Context) EmbeddedArrayOutput { return o } func (o EmbeddedArrayOutput) Index(i pulumi.IntInput) EmbeddedOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Embedded { return vs[0].([]*Embedded)[vs[1].(int)] }).(EmbeddedOutput) } type EmbeddedMapOutput struct{ *pulumi.OutputState } func (EmbeddedMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Embedded)(nil)).Elem() } func (o EmbeddedMapOutput) ToEmbeddedMapOutput() EmbeddedMapOutput { return o } func (o EmbeddedMapOutput) ToEmbeddedMapOutputWithContext(ctx context.Context) EmbeddedMapOutput { return o } func (o EmbeddedMapOutput) MapIndex(k pulumi.StringInput) EmbeddedOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Embedded { return vs[0].(map[string]*Embedded)[vs[1].(string)] }).(EmbeddedOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*EmbeddedInput)(nil)).Elem(), &Embedded{}) pulumi.RegisterInputType(reflect.TypeOf((*EmbeddedArrayInput)(nil)).Elem(), EmbeddedArray{}) pulumi.RegisterInputType(reflect.TypeOf((*EmbeddedMapInput)(nil)).Elem(), EmbeddedMap{}) pulumi.RegisterOutputType(EmbeddedOutput{}) pulumi.RegisterOutputType(EmbeddedArrayOutput{}) pulumi.RegisterOutputType(EmbeddedMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/databasemigration/getProject.go
sdk/go/azure/databasemigration/getProject.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package databasemigration import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Database Migration Project. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/databasemigration" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := databasemigration.LookupProject(ctx, &databasemigration.LookupProjectArgs{ // Name: "example-dbms-project", // ResourceGroupName: "example-rg", // ServiceName: "example-dbms", // }, nil) // if err != nil { // return err // } // ctx.Export("name", example.Name) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.DataMigration` - 2021-06-30 func LookupProject(ctx *pulumi.Context, args *LookupProjectArgs, opts ...pulumi.InvokeOption) (*LookupProjectResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupProjectResult err := ctx.Invoke("azure:databasemigration/getProject:getProject", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getProject. type LookupProjectArgs struct { // Name of the database migration project. Name string `pulumi:"name"` // Name of the resource group where resource belongs to. ResourceGroupName string `pulumi:"resourceGroupName"` // Name of the database migration service where resource belongs to. ServiceName string `pulumi:"serviceName"` } // A collection of values returned by getProject. type LookupProjectResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // Azure location where the resource exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` ServiceName string `pulumi:"serviceName"` // The platform type of the migration source. SourcePlatform string `pulumi:"sourcePlatform"` // A mapping of tags to assigned to the resource. Tags map[string]string `pulumi:"tags"` // The platform type of the migration target. TargetPlatform string `pulumi:"targetPlatform"` } func LookupProjectOutput(ctx *pulumi.Context, args LookupProjectOutputArgs, opts ...pulumi.InvokeOption) LookupProjectResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupProjectResultOutput, error) { args := v.(LookupProjectArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:databasemigration/getProject:getProject", args, LookupProjectResultOutput{}, options).(LookupProjectResultOutput), nil }).(LookupProjectResultOutput) } // A collection of arguments for invoking getProject. type LookupProjectOutputArgs struct { // Name of the database migration project. Name pulumi.StringInput `pulumi:"name"` // Name of the resource group where resource belongs to. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // Name of the database migration service where resource belongs to. ServiceName pulumi.StringInput `pulumi:"serviceName"` } func (LookupProjectOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupProjectArgs)(nil)).Elem() } // A collection of values returned by getProject. type LookupProjectResultOutput struct{ *pulumi.OutputState } func (LookupProjectResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupProjectResult)(nil)).Elem() } func (o LookupProjectResultOutput) ToLookupProjectResultOutput() LookupProjectResultOutput { return o } func (o LookupProjectResultOutput) ToLookupProjectResultOutputWithContext(ctx context.Context) LookupProjectResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupProjectResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupProjectResult) string { return v.Id }).(pulumi.StringOutput) } // Azure location where the resource exists. func (o LookupProjectResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupProjectResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupProjectResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupProjectResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupProjectResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupProjectResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o LookupProjectResultOutput) ServiceName() pulumi.StringOutput { return o.ApplyT(func(v LookupProjectResult) string { return v.ServiceName }).(pulumi.StringOutput) } // The platform type of the migration source. func (o LookupProjectResultOutput) SourcePlatform() pulumi.StringOutput { return o.ApplyT(func(v LookupProjectResult) string { return v.SourcePlatform }).(pulumi.StringOutput) } // A mapping of tags to assigned to the resource. func (o LookupProjectResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupProjectResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The platform type of the migration target. func (o LookupProjectResultOutput) TargetPlatform() pulumi.StringOutput { return o.ApplyT(func(v LookupProjectResult) string { return v.TargetPlatform }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupProjectResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/databasemigration/init.go
sdk/go/azure/databasemigration/init.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package databasemigration import ( "fmt" "github.com/blang/semver" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type module struct { version semver.Version } func (m *module) Version() semver.Version { return m.version } func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { case "azure:databasemigration/project:Project": r = &Project{} case "azure:databasemigration/service:Service": r = &Service{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) return } func init() { version, err := internal.PkgVersion() if err != nil { version = semver.Version{Major: 1} } pulumi.RegisterResourceModule( "azure", "databasemigration/project", &module{version}, ) pulumi.RegisterResourceModule( "azure", "databasemigration/service", &module{version}, ) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/databasemigration/service.go
sdk/go/azure/databasemigration/service.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package databasemigration import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Azure Database Migration Service. // // > **NOTE:** Destroying a Database Migration Service will leave any outstanding tasks untouched. This is to avoid unexpectedly deleting any tasks managed outside of this provide. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/databasemigration" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("example-subnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // }) // if err != nil { // return err // } // _, err = databasemigration.NewService(ctx, "example", &databasemigration.ServiceArgs{ // Name: pulumi.String("example-dms"), // Location: example.Location, // ResourceGroupName: example.Name, // SubnetId: exampleSubnet.ID(), // SkuName: pulumi.String("Standard_1vCores"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DataMigration` - 2021-06-30 // // ## Import // // Database Migration Services can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:databasemigration/service:Service example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.DataMigration/services/database_migration_service1 // ``` type Service struct { pulumi.CustomResourceState // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specify the name of the database migration service. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The SKU name of the database migration service. Possible values are `Premium_4vCores`, `Standard_1vCores`, `Standard_2vCores` and `Standard_4vCores`. Changing this forces a new resource to be created. SkuName pulumi.StringOutput `pulumi:"skuName"` // The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created. SubnetId pulumi.StringOutput `pulumi:"subnetId"` // A mapping of tags to assigned to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewService registers a new resource with the given unique name, arguments, and options. func NewService(ctx *pulumi.Context, name string, args *ServiceArgs, opts ...pulumi.ResourceOption) (*Service, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SkuName == nil { return nil, errors.New("invalid value for required argument 'SkuName'") } if args.SubnetId == nil { return nil, errors.New("invalid value for required argument 'SubnetId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Service err := ctx.RegisterResource("azure:databasemigration/service:Service", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetService gets an existing Service resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetService(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ServiceState, opts ...pulumi.ResourceOption) (*Service, error) { var resource Service err := ctx.ReadResource("azure:databasemigration/service:Service", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Service resources. type serviceState struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specify the name of the database migration service. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The SKU name of the database migration service. Possible values are `Premium_4vCores`, `Standard_1vCores`, `Standard_2vCores` and `Standard_4vCores`. Changing this forces a new resource to be created. SkuName *string `pulumi:"skuName"` // The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created. SubnetId *string `pulumi:"subnetId"` // A mapping of tags to assigned to the resource. Tags map[string]string `pulumi:"tags"` } type ServiceState struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specify the name of the database migration service. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The SKU name of the database migration service. Possible values are `Premium_4vCores`, `Standard_1vCores`, `Standard_2vCores` and `Standard_4vCores`. Changing this forces a new resource to be created. SkuName pulumi.StringPtrInput // The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created. SubnetId pulumi.StringPtrInput // A mapping of tags to assigned to the resource. Tags pulumi.StringMapInput } func (ServiceState) ElementType() reflect.Type { return reflect.TypeOf((*serviceState)(nil)).Elem() } type serviceArgs struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specify the name of the database migration service. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU name of the database migration service. Possible values are `Premium_4vCores`, `Standard_1vCores`, `Standard_2vCores` and `Standard_4vCores`. Changing this forces a new resource to be created. SkuName string `pulumi:"skuName"` // The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created. SubnetId string `pulumi:"subnetId"` // A mapping of tags to assigned to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Service resource. type ServiceArgs struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specify the name of the database migration service. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The SKU name of the database migration service. Possible values are `Premium_4vCores`, `Standard_1vCores`, `Standard_2vCores` and `Standard_4vCores`. Changing this forces a new resource to be created. SkuName pulumi.StringInput // The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created. SubnetId pulumi.StringInput // A mapping of tags to assigned to the resource. Tags pulumi.StringMapInput } func (ServiceArgs) ElementType() reflect.Type { return reflect.TypeOf((*serviceArgs)(nil)).Elem() } type ServiceInput interface { pulumi.Input ToServiceOutput() ServiceOutput ToServiceOutputWithContext(ctx context.Context) ServiceOutput } func (*Service) ElementType() reflect.Type { return reflect.TypeOf((**Service)(nil)).Elem() } func (i *Service) ToServiceOutput() ServiceOutput { return i.ToServiceOutputWithContext(context.Background()) } func (i *Service) ToServiceOutputWithContext(ctx context.Context) ServiceOutput { return pulumi.ToOutputWithContext(ctx, i).(ServiceOutput) } // ServiceArrayInput is an input type that accepts ServiceArray and ServiceArrayOutput values. // You can construct a concrete instance of `ServiceArrayInput` via: // // ServiceArray{ ServiceArgs{...} } type ServiceArrayInput interface { pulumi.Input ToServiceArrayOutput() ServiceArrayOutput ToServiceArrayOutputWithContext(context.Context) ServiceArrayOutput } type ServiceArray []ServiceInput func (ServiceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Service)(nil)).Elem() } func (i ServiceArray) ToServiceArrayOutput() ServiceArrayOutput { return i.ToServiceArrayOutputWithContext(context.Background()) } func (i ServiceArray) ToServiceArrayOutputWithContext(ctx context.Context) ServiceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ServiceArrayOutput) } // ServiceMapInput is an input type that accepts ServiceMap and ServiceMapOutput values. // You can construct a concrete instance of `ServiceMapInput` via: // // ServiceMap{ "key": ServiceArgs{...} } type ServiceMapInput interface { pulumi.Input ToServiceMapOutput() ServiceMapOutput ToServiceMapOutputWithContext(context.Context) ServiceMapOutput } type ServiceMap map[string]ServiceInput func (ServiceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Service)(nil)).Elem() } func (i ServiceMap) ToServiceMapOutput() ServiceMapOutput { return i.ToServiceMapOutputWithContext(context.Background()) } func (i ServiceMap) ToServiceMapOutputWithContext(ctx context.Context) ServiceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ServiceMapOutput) } type ServiceOutput struct{ *pulumi.OutputState } func (ServiceOutput) ElementType() reflect.Type { return reflect.TypeOf((**Service)(nil)).Elem() } func (o ServiceOutput) ToServiceOutput() ServiceOutput { return o } func (o ServiceOutput) ToServiceOutputWithContext(ctx context.Context) ServiceOutput { return o } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o ServiceOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specify the name of the database migration service. Changing this forces a new resource to be created. func (o ServiceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created. func (o ServiceOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The SKU name of the database migration service. Possible values are `Premium_4vCores`, `Standard_1vCores`, `Standard_2vCores` and `Standard_4vCores`. Changing this forces a new resource to be created. func (o ServiceOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput) } // The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created. func (o ServiceOutput) SubnetId() pulumi.StringOutput { return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput) } // A mapping of tags to assigned to the resource. func (o ServiceOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Service) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type ServiceArrayOutput struct{ *pulumi.OutputState } func (ServiceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Service)(nil)).Elem() } func (o ServiceArrayOutput) ToServiceArrayOutput() ServiceArrayOutput { return o } func (o ServiceArrayOutput) ToServiceArrayOutputWithContext(ctx context.Context) ServiceArrayOutput { return o } func (o ServiceArrayOutput) Index(i pulumi.IntInput) ServiceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Service { return vs[0].([]*Service)[vs[1].(int)] }).(ServiceOutput) } type ServiceMapOutput struct{ *pulumi.OutputState } func (ServiceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Service)(nil)).Elem() } func (o ServiceMapOutput) ToServiceMapOutput() ServiceMapOutput { return o } func (o ServiceMapOutput) ToServiceMapOutputWithContext(ctx context.Context) ServiceMapOutput { return o } func (o ServiceMapOutput) MapIndex(k pulumi.StringInput) ServiceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Service { return vs[0].(map[string]*Service)[vs[1].(string)] }).(ServiceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ServiceInput)(nil)).Elem(), &Service{}) pulumi.RegisterInputType(reflect.TypeOf((*ServiceArrayInput)(nil)).Elem(), ServiceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ServiceMapInput)(nil)).Elem(), ServiceMap{}) pulumi.RegisterOutputType(ServiceOutput{}) pulumi.RegisterOutputType(ServiceArrayOutput{}) pulumi.RegisterOutputType(ServiceMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/databasemigration/getService.go
sdk/go/azure/databasemigration/getService.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package databasemigration import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Database Migration Service. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/databasemigration" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := databasemigration.LookupService(ctx, &databasemigration.LookupServiceArgs{ // Name: "example-dms", // ResourceGroupName: "example-rg", // }, nil) // if err != nil { // return err // } // ctx.Export("azurermDmsId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.DataMigration` - 2021-06-30 func LookupService(ctx *pulumi.Context, args *LookupServiceArgs, opts ...pulumi.InvokeOption) (*LookupServiceResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupServiceResult err := ctx.Invoke("azure:databasemigration/getService:getService", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getService. type LookupServiceArgs struct { // Specify the name of the database migration service. Name string `pulumi:"name"` // Specifies the Name of the Resource Group within which the database migration service exists ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getService. type LookupServiceResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // Azure location where the resource exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU name of database migration service. SkuName string `pulumi:"skuName"` // The ID of the virtual subnet resource to which the database migration service exists. SubnetId string `pulumi:"subnetId"` // A mapping of tags to assigned to the resource. Tags map[string]string `pulumi:"tags"` } func LookupServiceOutput(ctx *pulumi.Context, args LookupServiceOutputArgs, opts ...pulumi.InvokeOption) LookupServiceResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupServiceResultOutput, error) { args := v.(LookupServiceArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:databasemigration/getService:getService", args, LookupServiceResultOutput{}, options).(LookupServiceResultOutput), nil }).(LookupServiceResultOutput) } // A collection of arguments for invoking getService. type LookupServiceOutputArgs struct { // Specify the name of the database migration service. Name pulumi.StringInput `pulumi:"name"` // Specifies the Name of the Resource Group within which the database migration service exists ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupServiceOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupServiceArgs)(nil)).Elem() } // A collection of values returned by getService. type LookupServiceResultOutput struct{ *pulumi.OutputState } func (LookupServiceResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupServiceResult)(nil)).Elem() } func (o LookupServiceResultOutput) ToLookupServiceResultOutput() LookupServiceResultOutput { return o } func (o LookupServiceResultOutput) ToLookupServiceResultOutputWithContext(ctx context.Context) LookupServiceResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupServiceResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.Id }).(pulumi.StringOutput) } // Azure location where the resource exists. func (o LookupServiceResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupServiceResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupServiceResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The SKU name of database migration service. func (o LookupServiceResultOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.SkuName }).(pulumi.StringOutput) } // The ID of the virtual subnet resource to which the database migration service exists. func (o LookupServiceResultOutput) SubnetId() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.SubnetId }).(pulumi.StringOutput) } // A mapping of tags to assigned to the resource. func (o LookupServiceResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupServiceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupServiceResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/databasemigration/project.go
sdk/go/azure/databasemigration/project.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package databasemigration import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manage a Azure Database Migration Project. // // > **NOTE:** Destroying a Database Migration Project will leave any outstanding tasks untouched. This is to avoid unexpectedly deleting any tasks managed outside of this provider. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/databasemigration" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("example-subnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // }) // if err != nil { // return err // } // exampleService, err := databasemigration.NewService(ctx, "example", &databasemigration.ServiceArgs{ // Name: pulumi.String("example-dbms"), // Location: example.Location, // ResourceGroupName: example.Name, // SubnetId: exampleSubnet.ID(), // SkuName: pulumi.String("Standard_1vCores"), // }) // if err != nil { // return err // } // _, err = databasemigration.NewProject(ctx, "example", &databasemigration.ProjectArgs{ // Name: pulumi.String("example-dbms-project"), // ServiceName: exampleService.Name, // ResourceGroupName: example.Name, // Location: example.Location, // SourcePlatform: pulumi.String("SQL"), // TargetPlatform: pulumi.String("SQLDB"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DataMigration` - 2021-06-30 // // ## Import // // Database Migration Projects can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:databasemigration/project:Project example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.DataMigration/services/example-dms/projects/project1 // ``` type Project struct { pulumi.CustomResourceState // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specify the name of the database migration project. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Name of the resource group in which to create the database migration project. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Name of the database migration service where resource belongs to. Changing this forces a new resource to be created. ServiceName pulumi.StringOutput `pulumi:"serviceName"` // The platform type of the migration source. Possible values are `MongoDb`, `MySQL`, `PostgreSql`, `SQL` and `Unknown`. Changing this forces a new resource to be created. SourcePlatform pulumi.StringOutput `pulumi:"sourcePlatform"` // A mapping of tags to assigned to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // The platform type of the migration target. Possible values are `AzureDbForMySql`, `AzureDbForPostgreSql`, `MongoDb`, `SQLDB`, `SQLMI` and `Unknown`. Changing this forces a new resource to be created. TargetPlatform pulumi.StringOutput `pulumi:"targetPlatform"` } // NewProject registers a new resource with the given unique name, arguments, and options. func NewProject(ctx *pulumi.Context, name string, args *ProjectArgs, opts ...pulumi.ResourceOption) (*Project, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.ServiceName == nil { return nil, errors.New("invalid value for required argument 'ServiceName'") } if args.SourcePlatform == nil { return nil, errors.New("invalid value for required argument 'SourcePlatform'") } if args.TargetPlatform == nil { return nil, errors.New("invalid value for required argument 'TargetPlatform'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Project err := ctx.RegisterResource("azure:databasemigration/project:Project", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetProject gets an existing Project resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetProject(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ProjectState, opts ...pulumi.ResourceOption) (*Project, error) { var resource Project err := ctx.ReadResource("azure:databasemigration/project:Project", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Project resources. type projectState struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specify the name of the database migration project. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Name of the resource group in which to create the database migration project. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Name of the database migration service where resource belongs to. Changing this forces a new resource to be created. ServiceName *string `pulumi:"serviceName"` // The platform type of the migration source. Possible values are `MongoDb`, `MySQL`, `PostgreSql`, `SQL` and `Unknown`. Changing this forces a new resource to be created. SourcePlatform *string `pulumi:"sourcePlatform"` // A mapping of tags to assigned to the resource. Tags map[string]string `pulumi:"tags"` // The platform type of the migration target. Possible values are `AzureDbForMySql`, `AzureDbForPostgreSql`, `MongoDb`, `SQLDB`, `SQLMI` and `Unknown`. Changing this forces a new resource to be created. TargetPlatform *string `pulumi:"targetPlatform"` } type ProjectState struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specify the name of the database migration project. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Name of the resource group in which to create the database migration project. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Name of the database migration service where resource belongs to. Changing this forces a new resource to be created. ServiceName pulumi.StringPtrInput // The platform type of the migration source. Possible values are `MongoDb`, `MySQL`, `PostgreSql`, `SQL` and `Unknown`. Changing this forces a new resource to be created. SourcePlatform pulumi.StringPtrInput // A mapping of tags to assigned to the resource. Tags pulumi.StringMapInput // The platform type of the migration target. Possible values are `AzureDbForMySql`, `AzureDbForPostgreSql`, `MongoDb`, `SQLDB`, `SQLMI` and `Unknown`. Changing this forces a new resource to be created. TargetPlatform pulumi.StringPtrInput } func (ProjectState) ElementType() reflect.Type { return reflect.TypeOf((*projectState)(nil)).Elem() } type projectArgs struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specify the name of the database migration project. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Name of the resource group in which to create the database migration project. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Name of the database migration service where resource belongs to. Changing this forces a new resource to be created. ServiceName string `pulumi:"serviceName"` // The platform type of the migration source. Possible values are `MongoDb`, `MySQL`, `PostgreSql`, `SQL` and `Unknown`. Changing this forces a new resource to be created. SourcePlatform string `pulumi:"sourcePlatform"` // A mapping of tags to assigned to the resource. Tags map[string]string `pulumi:"tags"` // The platform type of the migration target. Possible values are `AzureDbForMySql`, `AzureDbForPostgreSql`, `MongoDb`, `SQLDB`, `SQLMI` and `Unknown`. Changing this forces a new resource to be created. TargetPlatform string `pulumi:"targetPlatform"` } // The set of arguments for constructing a Project resource. type ProjectArgs struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specify the name of the database migration project. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Name of the resource group in which to create the database migration project. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Name of the database migration service where resource belongs to. Changing this forces a new resource to be created. ServiceName pulumi.StringInput // The platform type of the migration source. Possible values are `MongoDb`, `MySQL`, `PostgreSql`, `SQL` and `Unknown`. Changing this forces a new resource to be created. SourcePlatform pulumi.StringInput // A mapping of tags to assigned to the resource. Tags pulumi.StringMapInput // The platform type of the migration target. Possible values are `AzureDbForMySql`, `AzureDbForPostgreSql`, `MongoDb`, `SQLDB`, `SQLMI` and `Unknown`. Changing this forces a new resource to be created. TargetPlatform pulumi.StringInput } func (ProjectArgs) ElementType() reflect.Type { return reflect.TypeOf((*projectArgs)(nil)).Elem() } type ProjectInput interface { pulumi.Input ToProjectOutput() ProjectOutput ToProjectOutputWithContext(ctx context.Context) ProjectOutput } func (*Project) ElementType() reflect.Type { return reflect.TypeOf((**Project)(nil)).Elem() } func (i *Project) ToProjectOutput() ProjectOutput { return i.ToProjectOutputWithContext(context.Background()) } func (i *Project) ToProjectOutputWithContext(ctx context.Context) ProjectOutput { return pulumi.ToOutputWithContext(ctx, i).(ProjectOutput) } // ProjectArrayInput is an input type that accepts ProjectArray and ProjectArrayOutput values. // You can construct a concrete instance of `ProjectArrayInput` via: // // ProjectArray{ ProjectArgs{...} } type ProjectArrayInput interface { pulumi.Input ToProjectArrayOutput() ProjectArrayOutput ToProjectArrayOutputWithContext(context.Context) ProjectArrayOutput } type ProjectArray []ProjectInput func (ProjectArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Project)(nil)).Elem() } func (i ProjectArray) ToProjectArrayOutput() ProjectArrayOutput { return i.ToProjectArrayOutputWithContext(context.Background()) } func (i ProjectArray) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ProjectArrayOutput) } // ProjectMapInput is an input type that accepts ProjectMap and ProjectMapOutput values. // You can construct a concrete instance of `ProjectMapInput` via: // // ProjectMap{ "key": ProjectArgs{...} } type ProjectMapInput interface { pulumi.Input ToProjectMapOutput() ProjectMapOutput ToProjectMapOutputWithContext(context.Context) ProjectMapOutput } type ProjectMap map[string]ProjectInput func (ProjectMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Project)(nil)).Elem() } func (i ProjectMap) ToProjectMapOutput() ProjectMapOutput { return i.ToProjectMapOutputWithContext(context.Background()) } func (i ProjectMap) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ProjectMapOutput) } type ProjectOutput struct{ *pulumi.OutputState } func (ProjectOutput) ElementType() reflect.Type { return reflect.TypeOf((**Project)(nil)).Elem() } func (o ProjectOutput) ToProjectOutput() ProjectOutput { return o } func (o ProjectOutput) ToProjectOutputWithContext(ctx context.Context) ProjectOutput { return o } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o ProjectOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specify the name of the database migration project. Changing this forces a new resource to be created. func (o ProjectOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Name of the resource group in which to create the database migration project. Changing this forces a new resource to be created. func (o ProjectOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Name of the database migration service where resource belongs to. Changing this forces a new resource to be created. func (o ProjectOutput) ServiceName() pulumi.StringOutput { return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.ServiceName }).(pulumi.StringOutput) } // The platform type of the migration source. Possible values are `MongoDb`, `MySQL`, `PostgreSql`, `SQL` and `Unknown`. Changing this forces a new resource to be created. func (o ProjectOutput) SourcePlatform() pulumi.StringOutput { return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.SourcePlatform }).(pulumi.StringOutput) } // A mapping of tags to assigned to the resource. func (o ProjectOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Project) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The platform type of the migration target. Possible values are `AzureDbForMySql`, `AzureDbForPostgreSql`, `MongoDb`, `SQLDB`, `SQLMI` and `Unknown`. Changing this forces a new resource to be created. func (o ProjectOutput) TargetPlatform() pulumi.StringOutput { return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.TargetPlatform }).(pulumi.StringOutput) } type ProjectArrayOutput struct{ *pulumi.OutputState } func (ProjectArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Project)(nil)).Elem() } func (o ProjectArrayOutput) ToProjectArrayOutput() ProjectArrayOutput { return o } func (o ProjectArrayOutput) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput { return o } func (o ProjectArrayOutput) Index(i pulumi.IntInput) ProjectOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Project { return vs[0].([]*Project)[vs[1].(int)] }).(ProjectOutput) } type ProjectMapOutput struct{ *pulumi.OutputState } func (ProjectMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Project)(nil)).Elem() } func (o ProjectMapOutput) ToProjectMapOutput() ProjectMapOutput { return o } func (o ProjectMapOutput) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput { return o } func (o ProjectMapOutput) MapIndex(k pulumi.StringInput) ProjectOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Project { return vs[0].(map[string]*Project)[vs[1].(string)] }).(ProjectOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ProjectInput)(nil)).Elem(), &Project{}) pulumi.RegisterInputType(reflect.TypeOf((*ProjectArrayInput)(nil)).Elem(), ProjectArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ProjectMapInput)(nil)).Elem(), ProjectMap{}) pulumi.RegisterOutputType(ProjectOutput{}) pulumi.RegisterOutputType(ProjectArrayOutput{}) pulumi.RegisterOutputType(ProjectMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/managedredis/init.go
sdk/go/azure/managedredis/init.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package managedredis import ( "fmt" "github.com/blang/semver" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type module struct { version semver.Version } func (m *module) Version() semver.Version { return m.version } func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { case "azure:managedredis/geoReplication:GeoReplication": r = &GeoReplication{} case "azure:managedredis/managedRedis:ManagedRedis": r = &ManagedRedis{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) return } func init() { version, err := internal.PkgVersion() if err != nil { version = semver.Version{Major: 1} } pulumi.RegisterResourceModule( "azure", "managedredis/geoReplication", &module{version}, ) pulumi.RegisterResourceModule( "azure", "managedredis/managedRedis", &module{version}, ) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/managedredis/pulumiTypes.go
sdk/go/azure/managedredis/pulumiTypes.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package managedredis import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) var _ = internal.GetEnvOrDefault type ManagedRedisCustomerManagedKey struct { // The ID of the key vault key used for encryption. For example: `https://example-vault-name.vault.azure.net/keys/example-key-name/a1b2c3d4`. KeyVaultKeyId string `pulumi:"keyVaultKeyId"` // The ID of the User Assigned Identity that has access to the Key Vault Key. UserAssignedIdentityId string `pulumi:"userAssignedIdentityId"` } // ManagedRedisCustomerManagedKeyInput is an input type that accepts ManagedRedisCustomerManagedKeyArgs and ManagedRedisCustomerManagedKeyOutput values. // You can construct a concrete instance of `ManagedRedisCustomerManagedKeyInput` via: // // ManagedRedisCustomerManagedKeyArgs{...} type ManagedRedisCustomerManagedKeyInput interface { pulumi.Input ToManagedRedisCustomerManagedKeyOutput() ManagedRedisCustomerManagedKeyOutput ToManagedRedisCustomerManagedKeyOutputWithContext(context.Context) ManagedRedisCustomerManagedKeyOutput } type ManagedRedisCustomerManagedKeyArgs struct { // The ID of the key vault key used for encryption. For example: `https://example-vault-name.vault.azure.net/keys/example-key-name/a1b2c3d4`. KeyVaultKeyId pulumi.StringInput `pulumi:"keyVaultKeyId"` // The ID of the User Assigned Identity that has access to the Key Vault Key. UserAssignedIdentityId pulumi.StringInput `pulumi:"userAssignedIdentityId"` } func (ManagedRedisCustomerManagedKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*ManagedRedisCustomerManagedKey)(nil)).Elem() } func (i ManagedRedisCustomerManagedKeyArgs) ToManagedRedisCustomerManagedKeyOutput() ManagedRedisCustomerManagedKeyOutput { return i.ToManagedRedisCustomerManagedKeyOutputWithContext(context.Background()) } func (i ManagedRedisCustomerManagedKeyArgs) ToManagedRedisCustomerManagedKeyOutputWithContext(ctx context.Context) ManagedRedisCustomerManagedKeyOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedRedisCustomerManagedKeyOutput) } func (i ManagedRedisCustomerManagedKeyArgs) ToManagedRedisCustomerManagedKeyPtrOutput() ManagedRedisCustomerManagedKeyPtrOutput { return i.ToManagedRedisCustomerManagedKeyPtrOutputWithContext(context.Background()) } func (i ManagedRedisCustomerManagedKeyArgs) ToManagedRedisCustomerManagedKeyPtrOutputWithContext(ctx context.Context) ManagedRedisCustomerManagedKeyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedRedisCustomerManagedKeyOutput).ToManagedRedisCustomerManagedKeyPtrOutputWithContext(ctx) } // ManagedRedisCustomerManagedKeyPtrInput is an input type that accepts ManagedRedisCustomerManagedKeyArgs, ManagedRedisCustomerManagedKeyPtr and ManagedRedisCustomerManagedKeyPtrOutput values. // You can construct a concrete instance of `ManagedRedisCustomerManagedKeyPtrInput` via: // // ManagedRedisCustomerManagedKeyArgs{...} // // or: // // nil type ManagedRedisCustomerManagedKeyPtrInput interface { pulumi.Input ToManagedRedisCustomerManagedKeyPtrOutput() ManagedRedisCustomerManagedKeyPtrOutput ToManagedRedisCustomerManagedKeyPtrOutputWithContext(context.Context) ManagedRedisCustomerManagedKeyPtrOutput } type managedRedisCustomerManagedKeyPtrType ManagedRedisCustomerManagedKeyArgs func ManagedRedisCustomerManagedKeyPtr(v *ManagedRedisCustomerManagedKeyArgs) ManagedRedisCustomerManagedKeyPtrInput { return (*managedRedisCustomerManagedKeyPtrType)(v) } func (*managedRedisCustomerManagedKeyPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ManagedRedisCustomerManagedKey)(nil)).Elem() } func (i *managedRedisCustomerManagedKeyPtrType) ToManagedRedisCustomerManagedKeyPtrOutput() ManagedRedisCustomerManagedKeyPtrOutput { return i.ToManagedRedisCustomerManagedKeyPtrOutputWithContext(context.Background()) } func (i *managedRedisCustomerManagedKeyPtrType) ToManagedRedisCustomerManagedKeyPtrOutputWithContext(ctx context.Context) ManagedRedisCustomerManagedKeyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedRedisCustomerManagedKeyPtrOutput) } type ManagedRedisCustomerManagedKeyOutput struct{ *pulumi.OutputState } func (ManagedRedisCustomerManagedKeyOutput) ElementType() reflect.Type { return reflect.TypeOf((*ManagedRedisCustomerManagedKey)(nil)).Elem() } func (o ManagedRedisCustomerManagedKeyOutput) ToManagedRedisCustomerManagedKeyOutput() ManagedRedisCustomerManagedKeyOutput { return o } func (o ManagedRedisCustomerManagedKeyOutput) ToManagedRedisCustomerManagedKeyOutputWithContext(ctx context.Context) ManagedRedisCustomerManagedKeyOutput { return o } func (o ManagedRedisCustomerManagedKeyOutput) ToManagedRedisCustomerManagedKeyPtrOutput() ManagedRedisCustomerManagedKeyPtrOutput { return o.ToManagedRedisCustomerManagedKeyPtrOutputWithContext(context.Background()) } func (o ManagedRedisCustomerManagedKeyOutput) ToManagedRedisCustomerManagedKeyPtrOutputWithContext(ctx context.Context) ManagedRedisCustomerManagedKeyPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ManagedRedisCustomerManagedKey) *ManagedRedisCustomerManagedKey { return &v }).(ManagedRedisCustomerManagedKeyPtrOutput) } // The ID of the key vault key used for encryption. For example: `https://example-vault-name.vault.azure.net/keys/example-key-name/a1b2c3d4`. func (o ManagedRedisCustomerManagedKeyOutput) KeyVaultKeyId() pulumi.StringOutput { return o.ApplyT(func(v ManagedRedisCustomerManagedKey) string { return v.KeyVaultKeyId }).(pulumi.StringOutput) } // The ID of the User Assigned Identity that has access to the Key Vault Key. func (o ManagedRedisCustomerManagedKeyOutput) UserAssignedIdentityId() pulumi.StringOutput { return o.ApplyT(func(v ManagedRedisCustomerManagedKey) string { return v.UserAssignedIdentityId }).(pulumi.StringOutput) } type ManagedRedisCustomerManagedKeyPtrOutput struct{ *pulumi.OutputState } func (ManagedRedisCustomerManagedKeyPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ManagedRedisCustomerManagedKey)(nil)).Elem() } func (o ManagedRedisCustomerManagedKeyPtrOutput) ToManagedRedisCustomerManagedKeyPtrOutput() ManagedRedisCustomerManagedKeyPtrOutput { return o } func (o ManagedRedisCustomerManagedKeyPtrOutput) ToManagedRedisCustomerManagedKeyPtrOutputWithContext(ctx context.Context) ManagedRedisCustomerManagedKeyPtrOutput { return o } func (o ManagedRedisCustomerManagedKeyPtrOutput) Elem() ManagedRedisCustomerManagedKeyOutput { return o.ApplyT(func(v *ManagedRedisCustomerManagedKey) ManagedRedisCustomerManagedKey { if v != nil { return *v } var ret ManagedRedisCustomerManagedKey return ret }).(ManagedRedisCustomerManagedKeyOutput) } // The ID of the key vault key used for encryption. For example: `https://example-vault-name.vault.azure.net/keys/example-key-name/a1b2c3d4`. func (o ManagedRedisCustomerManagedKeyPtrOutput) KeyVaultKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedRedisCustomerManagedKey) *string { if v == nil { return nil } return &v.KeyVaultKeyId }).(pulumi.StringPtrOutput) } // The ID of the User Assigned Identity that has access to the Key Vault Key. func (o ManagedRedisCustomerManagedKeyPtrOutput) UserAssignedIdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedRedisCustomerManagedKey) *string { if v == nil { return nil } return &v.UserAssignedIdentityId }).(pulumi.StringPtrOutput) } type ManagedRedisDefaultDatabase struct { // Whether access key authentication is enabled for the database. Defaults to `false`. AccessKeysAuthenticationEnabled *bool `pulumi:"accessKeysAuthenticationEnabled"` // Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Possible values are `Encrypted` and `Plaintext`. Defaults to `Encrypted`. ClientProtocol *string `pulumi:"clientProtocol"` // Clustering policy specified at create time. Possible values are `EnterpriseCluster`, `OSSCluster` and `NoCluster`. Defaults to `OSSCluster`. // // !> **Note:** Changing `clusteringPolicy` forces database recreation. Data will be lost and Managed Redis will be unavailable during the operation. ClusteringPolicy *string `pulumi:"clusteringPolicy"` // Specifies the Redis eviction policy. Possible values are `AllKeysLFU`, `AllKeysLRU`, `AllKeysRandom`, `VolatileLRU`, `VolatileLFU`, `VolatileTTL`, `VolatileRandom` and `NoEviction`. Defaults to `VolatileLRU`. EvictionPolicy *string `pulumi:"evictionPolicy"` // The name of the geo-replication group. If provided, a geo-replication group will be created for this database with itself as the only member. Use `azurermManagedRedisDatabaseGeoReplication` resource to manage group membership, linking and unlinking. All databases to be linked have to have the same group name. Refer to the [Managed Redis geo-replication documentation](https://learn.microsoft.com/azure/redis/how-to-active-geo-replication) for more information. // // !> **Note:** Changing `geoReplicationGroupName` forces database recreation. Data will be lost and Managed Redis will be unavailable during the operation. GeoReplicationGroupName *string `pulumi:"geoReplicationGroupName"` // The ID of the Managed Redis Database Instance. Id *string `pulumi:"id"` // A `module` block as defined below. Refer to [the modules documentation](https://learn.microsoft.com/azure/redis/redis-modules) to learn more. Modules []ManagedRedisDefaultDatabaseModule `pulumi:"modules"` // The frequency of Append Only File (AOF) backups. The only possible value is `1s`. Providing this value implies AOF persistence method is enabled. Conflicts with `persistenceRedisDatabaseBackupFrequency`, only one persistence method is allowed. Conflicts with `geoReplicationGroupName`, persistence can only be enabled on non-geo-replicated databases. Refer to [the persistence documentation](https://learn.microsoft.com/azure/redis/how-to-persistence) to learn more. PersistenceAppendOnlyFileBackupFrequency *string `pulumi:"persistenceAppendOnlyFileBackupFrequency"` // The frequency of Redis Database (RDB) backups. Possible values are `1h`, `6h` and `12h`. Providing this value implies RDB persistence method is enabled. Conflicts with `persistenceAppendOnlyFileBackupFrequency`, only one persistence method is allowed. Conflicts with `geoReplicationGroupName`, persistence can only be enabled on non-geo-replicated databases. Refer to [the persistence documentation](https://learn.microsoft.com/azure/redis/how-to-persistence) to learn more. PersistenceRedisDatabaseBackupFrequency *string `pulumi:"persistenceRedisDatabaseBackupFrequency"` // TCP port of the database endpoint. Port *int `pulumi:"port"` // The Primary Access Key for the Managed Redis Database Instance. Only exported if `accessKeysAuthenticationEnabled` is set to `true`. PrimaryAccessKey *string `pulumi:"primaryAccessKey"` // The Secondary Access Key for the Managed Redis Database Instance. Only exported if `accessKeysAuthenticationEnabled` is set to `true`. SecondaryAccessKey *string `pulumi:"secondaryAccessKey"` } // ManagedRedisDefaultDatabaseInput is an input type that accepts ManagedRedisDefaultDatabaseArgs and ManagedRedisDefaultDatabaseOutput values. // You can construct a concrete instance of `ManagedRedisDefaultDatabaseInput` via: // // ManagedRedisDefaultDatabaseArgs{...} type ManagedRedisDefaultDatabaseInput interface { pulumi.Input ToManagedRedisDefaultDatabaseOutput() ManagedRedisDefaultDatabaseOutput ToManagedRedisDefaultDatabaseOutputWithContext(context.Context) ManagedRedisDefaultDatabaseOutput } type ManagedRedisDefaultDatabaseArgs struct { // Whether access key authentication is enabled for the database. Defaults to `false`. AccessKeysAuthenticationEnabled pulumi.BoolPtrInput `pulumi:"accessKeysAuthenticationEnabled"` // Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Possible values are `Encrypted` and `Plaintext`. Defaults to `Encrypted`. ClientProtocol pulumi.StringPtrInput `pulumi:"clientProtocol"` // Clustering policy specified at create time. Possible values are `EnterpriseCluster`, `OSSCluster` and `NoCluster`. Defaults to `OSSCluster`. // // !> **Note:** Changing `clusteringPolicy` forces database recreation. Data will be lost and Managed Redis will be unavailable during the operation. ClusteringPolicy pulumi.StringPtrInput `pulumi:"clusteringPolicy"` // Specifies the Redis eviction policy. Possible values are `AllKeysLFU`, `AllKeysLRU`, `AllKeysRandom`, `VolatileLRU`, `VolatileLFU`, `VolatileTTL`, `VolatileRandom` and `NoEviction`. Defaults to `VolatileLRU`. EvictionPolicy pulumi.StringPtrInput `pulumi:"evictionPolicy"` // The name of the geo-replication group. If provided, a geo-replication group will be created for this database with itself as the only member. Use `azurermManagedRedisDatabaseGeoReplication` resource to manage group membership, linking and unlinking. All databases to be linked have to have the same group name. Refer to the [Managed Redis geo-replication documentation](https://learn.microsoft.com/azure/redis/how-to-active-geo-replication) for more information. // // !> **Note:** Changing `geoReplicationGroupName` forces database recreation. Data will be lost and Managed Redis will be unavailable during the operation. GeoReplicationGroupName pulumi.StringPtrInput `pulumi:"geoReplicationGroupName"` // The ID of the Managed Redis Database Instance. Id pulumi.StringPtrInput `pulumi:"id"` // A `module` block as defined below. Refer to [the modules documentation](https://learn.microsoft.com/azure/redis/redis-modules) to learn more. Modules ManagedRedisDefaultDatabaseModuleArrayInput `pulumi:"modules"` // The frequency of Append Only File (AOF) backups. The only possible value is `1s`. Providing this value implies AOF persistence method is enabled. Conflicts with `persistenceRedisDatabaseBackupFrequency`, only one persistence method is allowed. Conflicts with `geoReplicationGroupName`, persistence can only be enabled on non-geo-replicated databases. Refer to [the persistence documentation](https://learn.microsoft.com/azure/redis/how-to-persistence) to learn more. PersistenceAppendOnlyFileBackupFrequency pulumi.StringPtrInput `pulumi:"persistenceAppendOnlyFileBackupFrequency"` // The frequency of Redis Database (RDB) backups. Possible values are `1h`, `6h` and `12h`. Providing this value implies RDB persistence method is enabled. Conflicts with `persistenceAppendOnlyFileBackupFrequency`, only one persistence method is allowed. Conflicts with `geoReplicationGroupName`, persistence can only be enabled on non-geo-replicated databases. Refer to [the persistence documentation](https://learn.microsoft.com/azure/redis/how-to-persistence) to learn more. PersistenceRedisDatabaseBackupFrequency pulumi.StringPtrInput `pulumi:"persistenceRedisDatabaseBackupFrequency"` // TCP port of the database endpoint. Port pulumi.IntPtrInput `pulumi:"port"` // The Primary Access Key for the Managed Redis Database Instance. Only exported if `accessKeysAuthenticationEnabled` is set to `true`. PrimaryAccessKey pulumi.StringPtrInput `pulumi:"primaryAccessKey"` // The Secondary Access Key for the Managed Redis Database Instance. Only exported if `accessKeysAuthenticationEnabled` is set to `true`. SecondaryAccessKey pulumi.StringPtrInput `pulumi:"secondaryAccessKey"` } func (ManagedRedisDefaultDatabaseArgs) ElementType() reflect.Type { return reflect.TypeOf((*ManagedRedisDefaultDatabase)(nil)).Elem() } func (i ManagedRedisDefaultDatabaseArgs) ToManagedRedisDefaultDatabaseOutput() ManagedRedisDefaultDatabaseOutput { return i.ToManagedRedisDefaultDatabaseOutputWithContext(context.Background()) } func (i ManagedRedisDefaultDatabaseArgs) ToManagedRedisDefaultDatabaseOutputWithContext(ctx context.Context) ManagedRedisDefaultDatabaseOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedRedisDefaultDatabaseOutput) } func (i ManagedRedisDefaultDatabaseArgs) ToManagedRedisDefaultDatabasePtrOutput() ManagedRedisDefaultDatabasePtrOutput { return i.ToManagedRedisDefaultDatabasePtrOutputWithContext(context.Background()) } func (i ManagedRedisDefaultDatabaseArgs) ToManagedRedisDefaultDatabasePtrOutputWithContext(ctx context.Context) ManagedRedisDefaultDatabasePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedRedisDefaultDatabaseOutput).ToManagedRedisDefaultDatabasePtrOutputWithContext(ctx) } // ManagedRedisDefaultDatabasePtrInput is an input type that accepts ManagedRedisDefaultDatabaseArgs, ManagedRedisDefaultDatabasePtr and ManagedRedisDefaultDatabasePtrOutput values. // You can construct a concrete instance of `ManagedRedisDefaultDatabasePtrInput` via: // // ManagedRedisDefaultDatabaseArgs{...} // // or: // // nil type ManagedRedisDefaultDatabasePtrInput interface { pulumi.Input ToManagedRedisDefaultDatabasePtrOutput() ManagedRedisDefaultDatabasePtrOutput ToManagedRedisDefaultDatabasePtrOutputWithContext(context.Context) ManagedRedisDefaultDatabasePtrOutput } type managedRedisDefaultDatabasePtrType ManagedRedisDefaultDatabaseArgs func ManagedRedisDefaultDatabasePtr(v *ManagedRedisDefaultDatabaseArgs) ManagedRedisDefaultDatabasePtrInput { return (*managedRedisDefaultDatabasePtrType)(v) } func (*managedRedisDefaultDatabasePtrType) ElementType() reflect.Type { return reflect.TypeOf((**ManagedRedisDefaultDatabase)(nil)).Elem() } func (i *managedRedisDefaultDatabasePtrType) ToManagedRedisDefaultDatabasePtrOutput() ManagedRedisDefaultDatabasePtrOutput { return i.ToManagedRedisDefaultDatabasePtrOutputWithContext(context.Background()) } func (i *managedRedisDefaultDatabasePtrType) ToManagedRedisDefaultDatabasePtrOutputWithContext(ctx context.Context) ManagedRedisDefaultDatabasePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedRedisDefaultDatabasePtrOutput) } type ManagedRedisDefaultDatabaseOutput struct{ *pulumi.OutputState } func (ManagedRedisDefaultDatabaseOutput) ElementType() reflect.Type { return reflect.TypeOf((*ManagedRedisDefaultDatabase)(nil)).Elem() } func (o ManagedRedisDefaultDatabaseOutput) ToManagedRedisDefaultDatabaseOutput() ManagedRedisDefaultDatabaseOutput { return o } func (o ManagedRedisDefaultDatabaseOutput) ToManagedRedisDefaultDatabaseOutputWithContext(ctx context.Context) ManagedRedisDefaultDatabaseOutput { return o } func (o ManagedRedisDefaultDatabaseOutput) ToManagedRedisDefaultDatabasePtrOutput() ManagedRedisDefaultDatabasePtrOutput { return o.ToManagedRedisDefaultDatabasePtrOutputWithContext(context.Background()) } func (o ManagedRedisDefaultDatabaseOutput) ToManagedRedisDefaultDatabasePtrOutputWithContext(ctx context.Context) ManagedRedisDefaultDatabasePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ManagedRedisDefaultDatabase) *ManagedRedisDefaultDatabase { return &v }).(ManagedRedisDefaultDatabasePtrOutput) } // Whether access key authentication is enabled for the database. Defaults to `false`. func (o ManagedRedisDefaultDatabaseOutput) AccessKeysAuthenticationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v ManagedRedisDefaultDatabase) *bool { return v.AccessKeysAuthenticationEnabled }).(pulumi.BoolPtrOutput) } // Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Possible values are `Encrypted` and `Plaintext`. Defaults to `Encrypted`. func (o ManagedRedisDefaultDatabaseOutput) ClientProtocol() pulumi.StringPtrOutput { return o.ApplyT(func(v ManagedRedisDefaultDatabase) *string { return v.ClientProtocol }).(pulumi.StringPtrOutput) } // Clustering policy specified at create time. Possible values are `EnterpriseCluster`, `OSSCluster` and `NoCluster`. Defaults to `OSSCluster`. // // !> **Note:** Changing `clusteringPolicy` forces database recreation. Data will be lost and Managed Redis will be unavailable during the operation. func (o ManagedRedisDefaultDatabaseOutput) ClusteringPolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v ManagedRedisDefaultDatabase) *string { return v.ClusteringPolicy }).(pulumi.StringPtrOutput) } // Specifies the Redis eviction policy. Possible values are `AllKeysLFU`, `AllKeysLRU`, `AllKeysRandom`, `VolatileLRU`, `VolatileLFU`, `VolatileTTL`, `VolatileRandom` and `NoEviction`. Defaults to `VolatileLRU`. func (o ManagedRedisDefaultDatabaseOutput) EvictionPolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v ManagedRedisDefaultDatabase) *string { return v.EvictionPolicy }).(pulumi.StringPtrOutput) } // The name of the geo-replication group. If provided, a geo-replication group will be created for this database with itself as the only member. Use `azurermManagedRedisDatabaseGeoReplication` resource to manage group membership, linking and unlinking. All databases to be linked have to have the same group name. Refer to the [Managed Redis geo-replication documentation](https://learn.microsoft.com/azure/redis/how-to-active-geo-replication) for more information. // // !> **Note:** Changing `geoReplicationGroupName` forces database recreation. Data will be lost and Managed Redis will be unavailable during the operation. func (o ManagedRedisDefaultDatabaseOutput) GeoReplicationGroupName() pulumi.StringPtrOutput { return o.ApplyT(func(v ManagedRedisDefaultDatabase) *string { return v.GeoReplicationGroupName }).(pulumi.StringPtrOutput) } // The ID of the Managed Redis Database Instance. func (o ManagedRedisDefaultDatabaseOutput) Id() pulumi.StringPtrOutput { return o.ApplyT(func(v ManagedRedisDefaultDatabase) *string { return v.Id }).(pulumi.StringPtrOutput) } // A `module` block as defined below. Refer to [the modules documentation](https://learn.microsoft.com/azure/redis/redis-modules) to learn more. func (o ManagedRedisDefaultDatabaseOutput) Modules() ManagedRedisDefaultDatabaseModuleArrayOutput { return o.ApplyT(func(v ManagedRedisDefaultDatabase) []ManagedRedisDefaultDatabaseModule { return v.Modules }).(ManagedRedisDefaultDatabaseModuleArrayOutput) } // The frequency of Append Only File (AOF) backups. The only possible value is `1s`. Providing this value implies AOF persistence method is enabled. Conflicts with `persistenceRedisDatabaseBackupFrequency`, only one persistence method is allowed. Conflicts with `geoReplicationGroupName`, persistence can only be enabled on non-geo-replicated databases. Refer to [the persistence documentation](https://learn.microsoft.com/azure/redis/how-to-persistence) to learn more. func (o ManagedRedisDefaultDatabaseOutput) PersistenceAppendOnlyFileBackupFrequency() pulumi.StringPtrOutput { return o.ApplyT(func(v ManagedRedisDefaultDatabase) *string { return v.PersistenceAppendOnlyFileBackupFrequency }).(pulumi.StringPtrOutput) } // The frequency of Redis Database (RDB) backups. Possible values are `1h`, `6h` and `12h`. Providing this value implies RDB persistence method is enabled. Conflicts with `persistenceAppendOnlyFileBackupFrequency`, only one persistence method is allowed. Conflicts with `geoReplicationGroupName`, persistence can only be enabled on non-geo-replicated databases. Refer to [the persistence documentation](https://learn.microsoft.com/azure/redis/how-to-persistence) to learn more. func (o ManagedRedisDefaultDatabaseOutput) PersistenceRedisDatabaseBackupFrequency() pulumi.StringPtrOutput { return o.ApplyT(func(v ManagedRedisDefaultDatabase) *string { return v.PersistenceRedisDatabaseBackupFrequency }).(pulumi.StringPtrOutput) } // TCP port of the database endpoint. func (o ManagedRedisDefaultDatabaseOutput) Port() pulumi.IntPtrOutput { return o.ApplyT(func(v ManagedRedisDefaultDatabase) *int { return v.Port }).(pulumi.IntPtrOutput) } // The Primary Access Key for the Managed Redis Database Instance. Only exported if `accessKeysAuthenticationEnabled` is set to `true`. func (o ManagedRedisDefaultDatabaseOutput) PrimaryAccessKey() pulumi.StringPtrOutput { return o.ApplyT(func(v ManagedRedisDefaultDatabase) *string { return v.PrimaryAccessKey }).(pulumi.StringPtrOutput) } // The Secondary Access Key for the Managed Redis Database Instance. Only exported if `accessKeysAuthenticationEnabled` is set to `true`. func (o ManagedRedisDefaultDatabaseOutput) SecondaryAccessKey() pulumi.StringPtrOutput { return o.ApplyT(func(v ManagedRedisDefaultDatabase) *string { return v.SecondaryAccessKey }).(pulumi.StringPtrOutput) } type ManagedRedisDefaultDatabasePtrOutput struct{ *pulumi.OutputState } func (ManagedRedisDefaultDatabasePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ManagedRedisDefaultDatabase)(nil)).Elem() } func (o ManagedRedisDefaultDatabasePtrOutput) ToManagedRedisDefaultDatabasePtrOutput() ManagedRedisDefaultDatabasePtrOutput { return o } func (o ManagedRedisDefaultDatabasePtrOutput) ToManagedRedisDefaultDatabasePtrOutputWithContext(ctx context.Context) ManagedRedisDefaultDatabasePtrOutput { return o } func (o ManagedRedisDefaultDatabasePtrOutput) Elem() ManagedRedisDefaultDatabaseOutput { return o.ApplyT(func(v *ManagedRedisDefaultDatabase) ManagedRedisDefaultDatabase { if v != nil { return *v } var ret ManagedRedisDefaultDatabase return ret }).(ManagedRedisDefaultDatabaseOutput) } // Whether access key authentication is enabled for the database. Defaults to `false`. func (o ManagedRedisDefaultDatabasePtrOutput) AccessKeysAuthenticationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ManagedRedisDefaultDatabase) *bool { if v == nil { return nil } return v.AccessKeysAuthenticationEnabled }).(pulumi.BoolPtrOutput) } // Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Possible values are `Encrypted` and `Plaintext`. Defaults to `Encrypted`. func (o ManagedRedisDefaultDatabasePtrOutput) ClientProtocol() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedRedisDefaultDatabase) *string { if v == nil { return nil } return v.ClientProtocol }).(pulumi.StringPtrOutput) } // Clustering policy specified at create time. Possible values are `EnterpriseCluster`, `OSSCluster` and `NoCluster`. Defaults to `OSSCluster`. // // !> **Note:** Changing `clusteringPolicy` forces database recreation. Data will be lost and Managed Redis will be unavailable during the operation. func (o ManagedRedisDefaultDatabasePtrOutput) ClusteringPolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedRedisDefaultDatabase) *string { if v == nil { return nil } return v.ClusteringPolicy }).(pulumi.StringPtrOutput) } // Specifies the Redis eviction policy. Possible values are `AllKeysLFU`, `AllKeysLRU`, `AllKeysRandom`, `VolatileLRU`, `VolatileLFU`, `VolatileTTL`, `VolatileRandom` and `NoEviction`. Defaults to `VolatileLRU`. func (o ManagedRedisDefaultDatabasePtrOutput) EvictionPolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedRedisDefaultDatabase) *string { if v == nil { return nil } return v.EvictionPolicy }).(pulumi.StringPtrOutput) } // The name of the geo-replication group. If provided, a geo-replication group will be created for this database with itself as the only member. Use `azurermManagedRedisDatabaseGeoReplication` resource to manage group membership, linking and unlinking. All databases to be linked have to have the same group name. Refer to the [Managed Redis geo-replication documentation](https://learn.microsoft.com/azure/redis/how-to-active-geo-replication) for more information. // // !> **Note:** Changing `geoReplicationGroupName` forces database recreation. Data will be lost and Managed Redis will be unavailable during the operation. func (o ManagedRedisDefaultDatabasePtrOutput) GeoReplicationGroupName() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedRedisDefaultDatabase) *string { if v == nil { return nil } return v.GeoReplicationGroupName }).(pulumi.StringPtrOutput) } // The ID of the Managed Redis Database Instance. func (o ManagedRedisDefaultDatabasePtrOutput) Id() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedRedisDefaultDatabase) *string { if v == nil { return nil } return v.Id }).(pulumi.StringPtrOutput) } // A `module` block as defined below. Refer to [the modules documentation](https://learn.microsoft.com/azure/redis/redis-modules) to learn more. func (o ManagedRedisDefaultDatabasePtrOutput) Modules() ManagedRedisDefaultDatabaseModuleArrayOutput { return o.ApplyT(func(v *ManagedRedisDefaultDatabase) []ManagedRedisDefaultDatabaseModule { if v == nil { return nil } return v.Modules }).(ManagedRedisDefaultDatabaseModuleArrayOutput) } // The frequency of Append Only File (AOF) backups. The only possible value is `1s`. Providing this value implies AOF persistence method is enabled. Conflicts with `persistenceRedisDatabaseBackupFrequency`, only one persistence method is allowed. Conflicts with `geoReplicationGroupName`, persistence can only be enabled on non-geo-replicated databases. Refer to [the persistence documentation](https://learn.microsoft.com/azure/redis/how-to-persistence) to learn more. func (o ManagedRedisDefaultDatabasePtrOutput) PersistenceAppendOnlyFileBackupFrequency() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedRedisDefaultDatabase) *string { if v == nil { return nil } return v.PersistenceAppendOnlyFileBackupFrequency }).(pulumi.StringPtrOutput) } // The frequency of Redis Database (RDB) backups. Possible values are `1h`, `6h` and `12h`. Providing this value implies RDB persistence method is enabled. Conflicts with `persistenceAppendOnlyFileBackupFrequency`, only one persistence method is allowed. Conflicts with `geoReplicationGroupName`, persistence can only be enabled on non-geo-replicated databases. Refer to [the persistence documentation](https://learn.microsoft.com/azure/redis/how-to-persistence) to learn more. func (o ManagedRedisDefaultDatabasePtrOutput) PersistenceRedisDatabaseBackupFrequency() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedRedisDefaultDatabase) *string { if v == nil { return nil } return v.PersistenceRedisDatabaseBackupFrequency }).(pulumi.StringPtrOutput) } // TCP port of the database endpoint. func (o ManagedRedisDefaultDatabasePtrOutput) Port() pulumi.IntPtrOutput { return o.ApplyT(func(v *ManagedRedisDefaultDatabase) *int { if v == nil { return nil } return v.Port }).(pulumi.IntPtrOutput) } // The Primary Access Key for the Managed Redis Database Instance. Only exported if `accessKeysAuthenticationEnabled` is set to `true`. func (o ManagedRedisDefaultDatabasePtrOutput) PrimaryAccessKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedRedisDefaultDatabase) *string { if v == nil { return nil } return v.PrimaryAccessKey }).(pulumi.StringPtrOutput) } // The Secondary Access Key for the Managed Redis Database Instance. Only exported if `accessKeysAuthenticationEnabled` is set to `true`. func (o ManagedRedisDefaultDatabasePtrOutput) SecondaryAccessKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedRedisDefaultDatabase) *string { if v == nil { return nil } return v.SecondaryAccessKey }).(pulumi.StringPtrOutput) } type ManagedRedisDefaultDatabaseModule struct { // Configuration options for the module (e.g. `ERROR_RATE 0.00 INITIAL_SIZE 400`). // // !> **Note:** Changing `args` forces database recreation. Data will be lost and Managed Redis will be unavailable during the operation. // // > **Note:** Only `RediSearch` and `RedisJSON` modules are allowed with geo-replication. Args *string `pulumi:"args"` // The name which should be used for this module. Possible values are `RedisBloom`, `RedisTimeSeries`, `RediSearch` and `RedisJSON`. // // !> **Note:** Changing `name` forces database recreation. Data will be lost and Managed Redis will be unavailable during the operation. Name string `pulumi:"name"` // Version of the module to be used. Version *string `pulumi:"version"` } // ManagedRedisDefaultDatabaseModuleInput is an input type that accepts ManagedRedisDefaultDatabaseModuleArgs and ManagedRedisDefaultDatabaseModuleOutput values. // You can construct a concrete instance of `ManagedRedisDefaultDatabaseModuleInput` via: // // ManagedRedisDefaultDatabaseModuleArgs{...} type ManagedRedisDefaultDatabaseModuleInput interface { pulumi.Input ToManagedRedisDefaultDatabaseModuleOutput() ManagedRedisDefaultDatabaseModuleOutput ToManagedRedisDefaultDatabaseModuleOutputWithContext(context.Context) ManagedRedisDefaultDatabaseModuleOutput } type ManagedRedisDefaultDatabaseModuleArgs struct {
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/managedredis/managedRedis.go
sdk/go/azure/managedredis/managedRedis.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package managedredis import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a [Managed Redis](https://learn.microsoft.com/azure/redis/overview). This resource supersedes redis.EnterpriseCluster and redis.EnterpriseDatabase resources. Please refer to the migration guide for more information on migrating from Redis Enterprise to Managed Redis: [Migrating from Redis Enterprise to Managed Redis](https://learn.microsoft.com/azure/redis/migrate/migrate-overview). // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/managedredis" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = managedredis.NewManagedRedis(ctx, "example", &managedredis.ManagedRedisArgs{ // Name: pulumi.String("example-managed-redis"), // ResourceGroupName: example.Name, // Location: example.Location, // SkuName: pulumi.String("Balanced_B3"), // DefaultDatabase: &managedredis.ManagedRedisDefaultDatabaseArgs{ // GeoReplicationGroupName: pulumi.String("myGeoGroup"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### With Customer Managed Key // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/managedredis" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("standard"), // PurgeProtectionEnabled: pulumi.Bool(true), // AccessPolicies: keyvault.KeyVaultAccessPolicyArray{ // &keyvault.KeyVaultAccessPolicyArgs{ // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("Get"), // pulumi.String("List"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Update"), // pulumi.String("GetRotationPolicy"), // pulumi.String("SetRotationPolicy"), // }, // }, // &keyvault.KeyVaultAccessPolicyArgs{ // TenantId: pulumi.String(current.TenantId), // ObjectId: exampleUserAssignedIdentity.PrincipalId, // KeyPermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("WrapKey"), // pulumi.String("UnwrapKey"), // }, // }, // }, // }) // if err != nil { // return err // } // exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{ // Name: pulumi.String("managedrediscmk"), // KeyVaultId: exampleKeyVault.ID(), // KeyType: pulumi.String("RSA"), // KeySize: pulumi.Int(2048), // KeyOpts: pulumi.StringArray{ // pulumi.String("unwrapKey"), // pulumi.String("wrapKey"), // }, // }) // if err != nil { // return err // } // _, err = managedredis.NewManagedRedis(ctx, "example", &managedredis.ManagedRedisArgs{ // Name: pulumi.String("example-managed-redis"), // ResourceGroupName: example.Name, // Location: example.Location, // SkuName: pulumi.String("Balanced_B3"), // Identity: &managedredis.ManagedRedisIdentityArgs{ // Type: pulumi.String("UserAssigned"), // IdentityIds: pulumi.StringArray{ // exampleUserAssignedIdentity.ID(), // }, // }, // CustomerManagedKey: &managedredis.ManagedRedisCustomerManagedKeyArgs{ // KeyVaultKeyId: exampleKey.ID(), // UserAssignedIdentityId: exampleUserAssignedIdentity.ID(), // }, // DefaultDatabase: &managedredis.ManagedRedisDefaultDatabaseArgs{ // GeoReplicationGroupName: pulumi.String("myGeoGroup"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Cache` - 2025-07-01 // // ## Import // // Managed Redis instances can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:managedredis/managedRedis:ManagedRedis example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redisEnterprise/cluster1 // ``` type ManagedRedis struct { pulumi.CustomResourceState // A `customerManagedKey` block as defined below. CustomerManagedKey ManagedRedisCustomerManagedKeyPtrOutput `pulumi:"customerManagedKey"` // A `defaultDatabase` block as defined below. A Managed Redis instance will not be functional without a database. This block is intentionally optional to allow removal and re-creation of the database for troubleshooting purposes. A default database can be created or deleted in-place, however most properties will trigger an entire cluster replacement if changed. DefaultDatabase ManagedRedisDefaultDatabasePtrOutput `pulumi:"defaultDatabase"` // Whether to enable high availability for the Managed Redis instance. Defaults to `true`. Changing this forces a new Managed Redis instance to be created. HighAvailabilityEnabled pulumi.BoolPtrOutput `pulumi:"highAvailabilityEnabled"` // DNS name of the cluster endpoint. Hostname pulumi.StringOutput `pulumi:"hostname"` // An `identity` block as defined below. Identity ManagedRedisIdentityPtrOutput `pulumi:"identity"` // The Azure Region where the Managed Redis instance should exist. Refer to "Redis Cache" on the [product availability documentation](https://azure.microsoft.com/explore/global-infrastructure/products-by-region/table) for supported locations. Changing this forces a new Managed Redis instance to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Managed Redis instance. Changing this forces a new Managed Redis instance to be created. Name pulumi.StringOutput `pulumi:"name"` // The public network access setting for the Managed Redis instance. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`. PublicNetworkAccess pulumi.StringPtrOutput `pulumi:"publicNetworkAccess"` // The name of the Resource Group where the Managed Redis instance should exist. Changing this forces a new Managed Redis instance to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The features and specification of the Managed Redis instance to deploy. Possible values are `Balanced_B0`, `Balanced_B1`, `Balanced_B10`, `Balanced_B100`, `Balanced_B1000`, `Balanced_B150`, `Balanced_B20`, `Balanced_B250`, `Balanced_B3`, `Balanced_B350`, `Balanced_B5`, `Balanced_B50`, `Balanced_B500`, `Balanced_B700`, `ComputeOptimized_X10`, `ComputeOptimized_X100`, `ComputeOptimized_X150`, `ComputeOptimized_X20`, `ComputeOptimized_X250`, `ComputeOptimized_X3`, `ComputeOptimized_X350`, `ComputeOptimized_X5`, `ComputeOptimized_X50`, `ComputeOptimized_X500`, `ComputeOptimized_X700`, `FlashOptimized_A1000`, `FlashOptimized_A1500`, `FlashOptimized_A2000`, `FlashOptimized_A250`, `FlashOptimized_A4500`, `FlashOptimized_A500`, `FlashOptimized_A700`, `MemoryOptimized_M10`, `MemoryOptimized_M100`, `MemoryOptimized_M1000`, `MemoryOptimized_M150`, `MemoryOptimized_M1500`, `MemoryOptimized_M20`, `MemoryOptimized_M2000`, `MemoryOptimized_M250`, `MemoryOptimized_M350`, `MemoryOptimized_M50`, `MemoryOptimized_M500` and `MemoryOptimized_M700`. `Balanced_B3` SKU or higher is required for geo-replication. Changing this forces a new Managed Redis instance to be created. // // > **Note:** `Enterprise_` and `EnterpriseFlash_` prefixed SKUs were previously used by Redis Enterprise, and [not supported by Managed Redis](https://learn.microsoft.com/azure/redis/migrate/migrate-overview). SkuName pulumi.StringOutput `pulumi:"skuName"` // A mapping of tags which should be assigned to the Managed Redis instance. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewManagedRedis registers a new resource with the given unique name, arguments, and options. func NewManagedRedis(ctx *pulumi.Context, name string, args *ManagedRedisArgs, opts ...pulumi.ResourceOption) (*ManagedRedis, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SkuName == nil { return nil, errors.New("invalid value for required argument 'SkuName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ManagedRedis err := ctx.RegisterResource("azure:managedredis/managedRedis:ManagedRedis", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetManagedRedis gets an existing ManagedRedis resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetManagedRedis(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ManagedRedisState, opts ...pulumi.ResourceOption) (*ManagedRedis, error) { var resource ManagedRedis err := ctx.ReadResource("azure:managedredis/managedRedis:ManagedRedis", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ManagedRedis resources. type managedRedisState struct { // A `customerManagedKey` block as defined below. CustomerManagedKey *ManagedRedisCustomerManagedKey `pulumi:"customerManagedKey"` // A `defaultDatabase` block as defined below. A Managed Redis instance will not be functional without a database. This block is intentionally optional to allow removal and re-creation of the database for troubleshooting purposes. A default database can be created or deleted in-place, however most properties will trigger an entire cluster replacement if changed. DefaultDatabase *ManagedRedisDefaultDatabase `pulumi:"defaultDatabase"` // Whether to enable high availability for the Managed Redis instance. Defaults to `true`. Changing this forces a new Managed Redis instance to be created. HighAvailabilityEnabled *bool `pulumi:"highAvailabilityEnabled"` // DNS name of the cluster endpoint. Hostname *string `pulumi:"hostname"` // An `identity` block as defined below. Identity *ManagedRedisIdentity `pulumi:"identity"` // The Azure Region where the Managed Redis instance should exist. Refer to "Redis Cache" on the [product availability documentation](https://azure.microsoft.com/explore/global-infrastructure/products-by-region/table) for supported locations. Changing this forces a new Managed Redis instance to be created. Location *string `pulumi:"location"` // The name which should be used for this Managed Redis instance. Changing this forces a new Managed Redis instance to be created. Name *string `pulumi:"name"` // The public network access setting for the Managed Redis instance. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`. PublicNetworkAccess *string `pulumi:"publicNetworkAccess"` // The name of the Resource Group where the Managed Redis instance should exist. Changing this forces a new Managed Redis instance to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The features and specification of the Managed Redis instance to deploy. Possible values are `Balanced_B0`, `Balanced_B1`, `Balanced_B10`, `Balanced_B100`, `Balanced_B1000`, `Balanced_B150`, `Balanced_B20`, `Balanced_B250`, `Balanced_B3`, `Balanced_B350`, `Balanced_B5`, `Balanced_B50`, `Balanced_B500`, `Balanced_B700`, `ComputeOptimized_X10`, `ComputeOptimized_X100`, `ComputeOptimized_X150`, `ComputeOptimized_X20`, `ComputeOptimized_X250`, `ComputeOptimized_X3`, `ComputeOptimized_X350`, `ComputeOptimized_X5`, `ComputeOptimized_X50`, `ComputeOptimized_X500`, `ComputeOptimized_X700`, `FlashOptimized_A1000`, `FlashOptimized_A1500`, `FlashOptimized_A2000`, `FlashOptimized_A250`, `FlashOptimized_A4500`, `FlashOptimized_A500`, `FlashOptimized_A700`, `MemoryOptimized_M10`, `MemoryOptimized_M100`, `MemoryOptimized_M1000`, `MemoryOptimized_M150`, `MemoryOptimized_M1500`, `MemoryOptimized_M20`, `MemoryOptimized_M2000`, `MemoryOptimized_M250`, `MemoryOptimized_M350`, `MemoryOptimized_M50`, `MemoryOptimized_M500` and `MemoryOptimized_M700`. `Balanced_B3` SKU or higher is required for geo-replication. Changing this forces a new Managed Redis instance to be created. // // > **Note:** `Enterprise_` and `EnterpriseFlash_` prefixed SKUs were previously used by Redis Enterprise, and [not supported by Managed Redis](https://learn.microsoft.com/azure/redis/migrate/migrate-overview). SkuName *string `pulumi:"skuName"` // A mapping of tags which should be assigned to the Managed Redis instance. Tags map[string]string `pulumi:"tags"` } type ManagedRedisState struct { // A `customerManagedKey` block as defined below. CustomerManagedKey ManagedRedisCustomerManagedKeyPtrInput // A `defaultDatabase` block as defined below. A Managed Redis instance will not be functional without a database. This block is intentionally optional to allow removal and re-creation of the database for troubleshooting purposes. A default database can be created or deleted in-place, however most properties will trigger an entire cluster replacement if changed. DefaultDatabase ManagedRedisDefaultDatabasePtrInput // Whether to enable high availability for the Managed Redis instance. Defaults to `true`. Changing this forces a new Managed Redis instance to be created. HighAvailabilityEnabled pulumi.BoolPtrInput // DNS name of the cluster endpoint. Hostname pulumi.StringPtrInput // An `identity` block as defined below. Identity ManagedRedisIdentityPtrInput // The Azure Region where the Managed Redis instance should exist. Refer to "Redis Cache" on the [product availability documentation](https://azure.microsoft.com/explore/global-infrastructure/products-by-region/table) for supported locations. Changing this forces a new Managed Redis instance to be created. Location pulumi.StringPtrInput // The name which should be used for this Managed Redis instance. Changing this forces a new Managed Redis instance to be created. Name pulumi.StringPtrInput // The public network access setting for the Managed Redis instance. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`. PublicNetworkAccess pulumi.StringPtrInput // The name of the Resource Group where the Managed Redis instance should exist. Changing this forces a new Managed Redis instance to be created. ResourceGroupName pulumi.StringPtrInput // The features and specification of the Managed Redis instance to deploy. Possible values are `Balanced_B0`, `Balanced_B1`, `Balanced_B10`, `Balanced_B100`, `Balanced_B1000`, `Balanced_B150`, `Balanced_B20`, `Balanced_B250`, `Balanced_B3`, `Balanced_B350`, `Balanced_B5`, `Balanced_B50`, `Balanced_B500`, `Balanced_B700`, `ComputeOptimized_X10`, `ComputeOptimized_X100`, `ComputeOptimized_X150`, `ComputeOptimized_X20`, `ComputeOptimized_X250`, `ComputeOptimized_X3`, `ComputeOptimized_X350`, `ComputeOptimized_X5`, `ComputeOptimized_X50`, `ComputeOptimized_X500`, `ComputeOptimized_X700`, `FlashOptimized_A1000`, `FlashOptimized_A1500`, `FlashOptimized_A2000`, `FlashOptimized_A250`, `FlashOptimized_A4500`, `FlashOptimized_A500`, `FlashOptimized_A700`, `MemoryOptimized_M10`, `MemoryOptimized_M100`, `MemoryOptimized_M1000`, `MemoryOptimized_M150`, `MemoryOptimized_M1500`, `MemoryOptimized_M20`, `MemoryOptimized_M2000`, `MemoryOptimized_M250`, `MemoryOptimized_M350`, `MemoryOptimized_M50`, `MemoryOptimized_M500` and `MemoryOptimized_M700`. `Balanced_B3` SKU or higher is required for geo-replication. Changing this forces a new Managed Redis instance to be created. // // > **Note:** `Enterprise_` and `EnterpriseFlash_` prefixed SKUs were previously used by Redis Enterprise, and [not supported by Managed Redis](https://learn.microsoft.com/azure/redis/migrate/migrate-overview). SkuName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Managed Redis instance. Tags pulumi.StringMapInput } func (ManagedRedisState) ElementType() reflect.Type { return reflect.TypeOf((*managedRedisState)(nil)).Elem() } type managedRedisArgs struct { // A `customerManagedKey` block as defined below. CustomerManagedKey *ManagedRedisCustomerManagedKey `pulumi:"customerManagedKey"` // A `defaultDatabase` block as defined below. A Managed Redis instance will not be functional without a database. This block is intentionally optional to allow removal and re-creation of the database for troubleshooting purposes. A default database can be created or deleted in-place, however most properties will trigger an entire cluster replacement if changed. DefaultDatabase *ManagedRedisDefaultDatabase `pulumi:"defaultDatabase"` // Whether to enable high availability for the Managed Redis instance. Defaults to `true`. Changing this forces a new Managed Redis instance to be created. HighAvailabilityEnabled *bool `pulumi:"highAvailabilityEnabled"` // An `identity` block as defined below. Identity *ManagedRedisIdentity `pulumi:"identity"` // The Azure Region where the Managed Redis instance should exist. Refer to "Redis Cache" on the [product availability documentation](https://azure.microsoft.com/explore/global-infrastructure/products-by-region/table) for supported locations. Changing this forces a new Managed Redis instance to be created. Location *string `pulumi:"location"` // The name which should be used for this Managed Redis instance. Changing this forces a new Managed Redis instance to be created. Name *string `pulumi:"name"` // The public network access setting for the Managed Redis instance. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`. PublicNetworkAccess *string `pulumi:"publicNetworkAccess"` // The name of the Resource Group where the Managed Redis instance should exist. Changing this forces a new Managed Redis instance to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The features and specification of the Managed Redis instance to deploy. Possible values are `Balanced_B0`, `Balanced_B1`, `Balanced_B10`, `Balanced_B100`, `Balanced_B1000`, `Balanced_B150`, `Balanced_B20`, `Balanced_B250`, `Balanced_B3`, `Balanced_B350`, `Balanced_B5`, `Balanced_B50`, `Balanced_B500`, `Balanced_B700`, `ComputeOptimized_X10`, `ComputeOptimized_X100`, `ComputeOptimized_X150`, `ComputeOptimized_X20`, `ComputeOptimized_X250`, `ComputeOptimized_X3`, `ComputeOptimized_X350`, `ComputeOptimized_X5`, `ComputeOptimized_X50`, `ComputeOptimized_X500`, `ComputeOptimized_X700`, `FlashOptimized_A1000`, `FlashOptimized_A1500`, `FlashOptimized_A2000`, `FlashOptimized_A250`, `FlashOptimized_A4500`, `FlashOptimized_A500`, `FlashOptimized_A700`, `MemoryOptimized_M10`, `MemoryOptimized_M100`, `MemoryOptimized_M1000`, `MemoryOptimized_M150`, `MemoryOptimized_M1500`, `MemoryOptimized_M20`, `MemoryOptimized_M2000`, `MemoryOptimized_M250`, `MemoryOptimized_M350`, `MemoryOptimized_M50`, `MemoryOptimized_M500` and `MemoryOptimized_M700`. `Balanced_B3` SKU or higher is required for geo-replication. Changing this forces a new Managed Redis instance to be created. // // > **Note:** `Enterprise_` and `EnterpriseFlash_` prefixed SKUs were previously used by Redis Enterprise, and [not supported by Managed Redis](https://learn.microsoft.com/azure/redis/migrate/migrate-overview). SkuName string `pulumi:"skuName"` // A mapping of tags which should be assigned to the Managed Redis instance. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a ManagedRedis resource. type ManagedRedisArgs struct { // A `customerManagedKey` block as defined below. CustomerManagedKey ManagedRedisCustomerManagedKeyPtrInput // A `defaultDatabase` block as defined below. A Managed Redis instance will not be functional without a database. This block is intentionally optional to allow removal and re-creation of the database for troubleshooting purposes. A default database can be created or deleted in-place, however most properties will trigger an entire cluster replacement if changed. DefaultDatabase ManagedRedisDefaultDatabasePtrInput // Whether to enable high availability for the Managed Redis instance. Defaults to `true`. Changing this forces a new Managed Redis instance to be created. HighAvailabilityEnabled pulumi.BoolPtrInput // An `identity` block as defined below. Identity ManagedRedisIdentityPtrInput // The Azure Region where the Managed Redis instance should exist. Refer to "Redis Cache" on the [product availability documentation](https://azure.microsoft.com/explore/global-infrastructure/products-by-region/table) for supported locations. Changing this forces a new Managed Redis instance to be created. Location pulumi.StringPtrInput // The name which should be used for this Managed Redis instance. Changing this forces a new Managed Redis instance to be created. Name pulumi.StringPtrInput // The public network access setting for the Managed Redis instance. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`. PublicNetworkAccess pulumi.StringPtrInput // The name of the Resource Group where the Managed Redis instance should exist. Changing this forces a new Managed Redis instance to be created. ResourceGroupName pulumi.StringInput // The features and specification of the Managed Redis instance to deploy. Possible values are `Balanced_B0`, `Balanced_B1`, `Balanced_B10`, `Balanced_B100`, `Balanced_B1000`, `Balanced_B150`, `Balanced_B20`, `Balanced_B250`, `Balanced_B3`, `Balanced_B350`, `Balanced_B5`, `Balanced_B50`, `Balanced_B500`, `Balanced_B700`, `ComputeOptimized_X10`, `ComputeOptimized_X100`, `ComputeOptimized_X150`, `ComputeOptimized_X20`, `ComputeOptimized_X250`, `ComputeOptimized_X3`, `ComputeOptimized_X350`, `ComputeOptimized_X5`, `ComputeOptimized_X50`, `ComputeOptimized_X500`, `ComputeOptimized_X700`, `FlashOptimized_A1000`, `FlashOptimized_A1500`, `FlashOptimized_A2000`, `FlashOptimized_A250`, `FlashOptimized_A4500`, `FlashOptimized_A500`, `FlashOptimized_A700`, `MemoryOptimized_M10`, `MemoryOptimized_M100`, `MemoryOptimized_M1000`, `MemoryOptimized_M150`, `MemoryOptimized_M1500`, `MemoryOptimized_M20`, `MemoryOptimized_M2000`, `MemoryOptimized_M250`, `MemoryOptimized_M350`, `MemoryOptimized_M50`, `MemoryOptimized_M500` and `MemoryOptimized_M700`. `Balanced_B3` SKU or higher is required for geo-replication. Changing this forces a new Managed Redis instance to be created. // // > **Note:** `Enterprise_` and `EnterpriseFlash_` prefixed SKUs were previously used by Redis Enterprise, and [not supported by Managed Redis](https://learn.microsoft.com/azure/redis/migrate/migrate-overview). SkuName pulumi.StringInput // A mapping of tags which should be assigned to the Managed Redis instance. Tags pulumi.StringMapInput } func (ManagedRedisArgs) ElementType() reflect.Type { return reflect.TypeOf((*managedRedisArgs)(nil)).Elem() } type ManagedRedisInput interface { pulumi.Input ToManagedRedisOutput() ManagedRedisOutput ToManagedRedisOutputWithContext(ctx context.Context) ManagedRedisOutput } func (*ManagedRedis) ElementType() reflect.Type { return reflect.TypeOf((**ManagedRedis)(nil)).Elem() } func (i *ManagedRedis) ToManagedRedisOutput() ManagedRedisOutput { return i.ToManagedRedisOutputWithContext(context.Background()) } func (i *ManagedRedis) ToManagedRedisOutputWithContext(ctx context.Context) ManagedRedisOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedRedisOutput) } // ManagedRedisArrayInput is an input type that accepts ManagedRedisArray and ManagedRedisArrayOutput values. // You can construct a concrete instance of `ManagedRedisArrayInput` via: // // ManagedRedisArray{ ManagedRedisArgs{...} } type ManagedRedisArrayInput interface { pulumi.Input ToManagedRedisArrayOutput() ManagedRedisArrayOutput ToManagedRedisArrayOutputWithContext(context.Context) ManagedRedisArrayOutput } type ManagedRedisArray []ManagedRedisInput func (ManagedRedisArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedRedis)(nil)).Elem() } func (i ManagedRedisArray) ToManagedRedisArrayOutput() ManagedRedisArrayOutput { return i.ToManagedRedisArrayOutputWithContext(context.Background()) } func (i ManagedRedisArray) ToManagedRedisArrayOutputWithContext(ctx context.Context) ManagedRedisArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedRedisArrayOutput) } // ManagedRedisMapInput is an input type that accepts ManagedRedisMap and ManagedRedisMapOutput values. // You can construct a concrete instance of `ManagedRedisMapInput` via: // // ManagedRedisMap{ "key": ManagedRedisArgs{...} } type ManagedRedisMapInput interface { pulumi.Input ToManagedRedisMapOutput() ManagedRedisMapOutput ToManagedRedisMapOutputWithContext(context.Context) ManagedRedisMapOutput } type ManagedRedisMap map[string]ManagedRedisInput func (ManagedRedisMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManagedRedis)(nil)).Elem() } func (i ManagedRedisMap) ToManagedRedisMapOutput() ManagedRedisMapOutput { return i.ToManagedRedisMapOutputWithContext(context.Background()) } func (i ManagedRedisMap) ToManagedRedisMapOutputWithContext(ctx context.Context) ManagedRedisMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ManagedRedisMapOutput) } type ManagedRedisOutput struct{ *pulumi.OutputState } func (ManagedRedisOutput) ElementType() reflect.Type { return reflect.TypeOf((**ManagedRedis)(nil)).Elem() } func (o ManagedRedisOutput) ToManagedRedisOutput() ManagedRedisOutput { return o } func (o ManagedRedisOutput) ToManagedRedisOutputWithContext(ctx context.Context) ManagedRedisOutput { return o } // A `customerManagedKey` block as defined below. func (o ManagedRedisOutput) CustomerManagedKey() ManagedRedisCustomerManagedKeyPtrOutput { return o.ApplyT(func(v *ManagedRedis) ManagedRedisCustomerManagedKeyPtrOutput { return v.CustomerManagedKey }).(ManagedRedisCustomerManagedKeyPtrOutput) } // A `defaultDatabase` block as defined below. A Managed Redis instance will not be functional without a database. This block is intentionally optional to allow removal and re-creation of the database for troubleshooting purposes. A default database can be created or deleted in-place, however most properties will trigger an entire cluster replacement if changed. func (o ManagedRedisOutput) DefaultDatabase() ManagedRedisDefaultDatabasePtrOutput { return o.ApplyT(func(v *ManagedRedis) ManagedRedisDefaultDatabasePtrOutput { return v.DefaultDatabase }).(ManagedRedisDefaultDatabasePtrOutput) } // Whether to enable high availability for the Managed Redis instance. Defaults to `true`. Changing this forces a new Managed Redis instance to be created. func (o ManagedRedisOutput) HighAvailabilityEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ManagedRedis) pulumi.BoolPtrOutput { return v.HighAvailabilityEnabled }).(pulumi.BoolPtrOutput) } // DNS name of the cluster endpoint. func (o ManagedRedisOutput) Hostname() pulumi.StringOutput { return o.ApplyT(func(v *ManagedRedis) pulumi.StringOutput { return v.Hostname }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o ManagedRedisOutput) Identity() ManagedRedisIdentityPtrOutput { return o.ApplyT(func(v *ManagedRedis) ManagedRedisIdentityPtrOutput { return v.Identity }).(ManagedRedisIdentityPtrOutput) } // The Azure Region where the Managed Redis instance should exist. Refer to "Redis Cache" on the [product availability documentation](https://azure.microsoft.com/explore/global-infrastructure/products-by-region/table) for supported locations. Changing this forces a new Managed Redis instance to be created. func (o ManagedRedisOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ManagedRedis) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Managed Redis instance. Changing this forces a new Managed Redis instance to be created. func (o ManagedRedisOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ManagedRedis) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The public network access setting for the Managed Redis instance. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`. func (o ManagedRedisOutput) PublicNetworkAccess() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManagedRedis) pulumi.StringPtrOutput { return v.PublicNetworkAccess }).(pulumi.StringPtrOutput) } // The name of the Resource Group where the Managed Redis instance should exist. Changing this forces a new Managed Redis instance to be created. func (o ManagedRedisOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ManagedRedis) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The features and specification of the Managed Redis instance to deploy. Possible values are `Balanced_B0`, `Balanced_B1`, `Balanced_B10`, `Balanced_B100`, `Balanced_B1000`, `Balanced_B150`, `Balanced_B20`, `Balanced_B250`, `Balanced_B3`, `Balanced_B350`, `Balanced_B5`, `Balanced_B50`, `Balanced_B500`, `Balanced_B700`, `ComputeOptimized_X10`, `ComputeOptimized_X100`, `ComputeOptimized_X150`, `ComputeOptimized_X20`, `ComputeOptimized_X250`, `ComputeOptimized_X3`, `ComputeOptimized_X350`, `ComputeOptimized_X5`, `ComputeOptimized_X50`, `ComputeOptimized_X500`, `ComputeOptimized_X700`, `FlashOptimized_A1000`, `FlashOptimized_A1500`, `FlashOptimized_A2000`, `FlashOptimized_A250`, `FlashOptimized_A4500`, `FlashOptimized_A500`, `FlashOptimized_A700`, `MemoryOptimized_M10`, `MemoryOptimized_M100`, `MemoryOptimized_M1000`, `MemoryOptimized_M150`, `MemoryOptimized_M1500`, `MemoryOptimized_M20`, `MemoryOptimized_M2000`, `MemoryOptimized_M250`, `MemoryOptimized_M350`, `MemoryOptimized_M50`, `MemoryOptimized_M500` and `MemoryOptimized_M700`. `Balanced_B3` SKU or higher is required for geo-replication. Changing this forces a new Managed Redis instance to be created. // // > **Note:** `Enterprise_` and `EnterpriseFlash_` prefixed SKUs were previously used by Redis Enterprise, and [not supported by Managed Redis](https://learn.microsoft.com/azure/redis/migrate/migrate-overview). func (o ManagedRedisOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v *ManagedRedis) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Managed Redis instance. func (o ManagedRedisOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ManagedRedis) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type ManagedRedisArrayOutput struct{ *pulumi.OutputState } func (ManagedRedisArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManagedRedis)(nil)).Elem() }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/managedredis/get.go
sdk/go/azure/managedredis/get.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package managedredis import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Managed Redis instance. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/managedredis" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := managedredis.Get(ctx, &managedredis.GetArgs{ // Name: "example-managed-redis", // ResourceGroupName: "example-resources", // }, nil) // if err != nil { // return err // } // ctx.Export("managedRedisHostname", example.Hostname) // ctx.Export("managedRedisPrimaryAccessKey", example.DefaultDatabases[0].PrimaryAccessKey) // ctx.Export("managedRedisSecondaryAccessKey", example.DefaultDatabases[0].SecondaryAccessKey) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Cache` - 2025-07-01 func Get(ctx *pulumi.Context, args *GetArgs, opts ...pulumi.InvokeOption) (*GetResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetResult err := ctx.Invoke("azure:managedredis/get:get", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking get. type GetArgs struct { // The name of the Managed Redis instance. Name string `pulumi:"name"` // The name of the Resource Group where the Managed Redis instance exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by get. type GetResult struct { // A `customerManagedKey` block as defined below. CustomerManagedKeys []GetCustomerManagedKey `pulumi:"customerManagedKeys"` // A `defaultDatabase` block as defined below. DefaultDatabases []GetDefaultDatabase `pulumi:"defaultDatabases"` // Whether high availability is enabled for the Managed Redis instance. HighAvailabilityEnabled bool `pulumi:"highAvailabilityEnabled"` // The DNS hostname of the Managed Redis instance. Hostname string `pulumi:"hostname"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // An `identity` block as defined below. Identities []GetIdentity `pulumi:"identities"` // The Azure Region where the Managed Redis instance exists. Location string `pulumi:"location"` // The name of the Redis module. Name string `pulumi:"name"` // The public network access setting for the Managed Redis instance. PublicNetworkAccess string `pulumi:"publicNetworkAccess"` ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU name of the Managed Redis instance. SkuName string `pulumi:"skuName"` // A mapping of tags assigned to the Managed Redis instance. Tags map[string]string `pulumi:"tags"` } func GetOutput(ctx *pulumi.Context, args GetOutputArgs, opts ...pulumi.InvokeOption) GetResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetResultOutput, error) { args := v.(GetArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:managedredis/get:get", args, GetResultOutput{}, options).(GetResultOutput), nil }).(GetResultOutput) } // A collection of arguments for invoking get. type GetOutputArgs struct { // The name of the Managed Redis instance. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Managed Redis instance exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetArgs)(nil)).Elem() } // A collection of values returned by get. type GetResultOutput struct{ *pulumi.OutputState } func (GetResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetResult)(nil)).Elem() } func (o GetResultOutput) ToGetResultOutput() GetResultOutput { return o } func (o GetResultOutput) ToGetResultOutputWithContext(ctx context.Context) GetResultOutput { return o } // A `customerManagedKey` block as defined below. func (o GetResultOutput) CustomerManagedKeys() GetCustomerManagedKeyArrayOutput { return o.ApplyT(func(v GetResult) []GetCustomerManagedKey { return v.CustomerManagedKeys }).(GetCustomerManagedKeyArrayOutput) } // A `defaultDatabase` block as defined below. func (o GetResultOutput) DefaultDatabases() GetDefaultDatabaseArrayOutput { return o.ApplyT(func(v GetResult) []GetDefaultDatabase { return v.DefaultDatabases }).(GetDefaultDatabaseArrayOutput) } // Whether high availability is enabled for the Managed Redis instance. func (o GetResultOutput) HighAvailabilityEnabled() pulumi.BoolOutput { return o.ApplyT(func(v GetResult) bool { return v.HighAvailabilityEnabled }).(pulumi.BoolOutput) } // The DNS hostname of the Managed Redis instance. func (o GetResultOutput) Hostname() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.Hostname }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.Id }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o GetResultOutput) Identities() GetIdentityArrayOutput { return o.ApplyT(func(v GetResult) []GetIdentity { return v.Identities }).(GetIdentityArrayOutput) } // The Azure Region where the Managed Redis instance exists. func (o GetResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.Location }).(pulumi.StringOutput) } // The name of the Redis module. func (o GetResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.Name }).(pulumi.StringOutput) } // The public network access setting for the Managed Redis instance. func (o GetResultOutput) PublicNetworkAccess() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.PublicNetworkAccess }).(pulumi.StringOutput) } func (o GetResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The SKU name of the Managed Redis instance. func (o GetResultOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags assigned to the Managed Redis instance. func (o GetResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(GetResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/managedredis/geoReplication.go
sdk/go/azure/managedredis/geoReplication.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package managedredis import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages Managed Redis Geo-Replication by linking and unlinking databases in a geo-replication group. // // > **Note:** This resource manages the geo-replication group membership for Managed Redis databases. All databases to be linked must have `geoReplicationGroupName` provided with the same value. Linking will [discard cache data and cause temporary outage](https://learn.microsoft.com/azure/redis/how-to-active-geo-replication#add-an-existing-instance-to-an-active-geo-replication-group). // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/managedredis" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-managedredis"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // amr1, err := managedredis.NewManagedRedis(ctx, "amr1", &managedredis.ManagedRedisArgs{ // Name: pulumi.String("example-managedredis-amr1"), // ResourceGroupName: example.Name, // Location: pulumi.String("West Europe"), // SkuName: pulumi.String("Balanced_B3"), // DefaultDatabase: &managedredis.ManagedRedisDefaultDatabaseArgs{ // GeoReplicationGroupName: pulumi.String("example-geo-group"), // }, // }) // if err != nil { // return err // } // amr2, err := managedredis.NewManagedRedis(ctx, "amr2", &managedredis.ManagedRedisArgs{ // Name: pulumi.String("example-managedredis-amr2"), // ResourceGroupName: example.Name, // Location: pulumi.String("Central US"), // SkuName: pulumi.String("Balanced_B3"), // DefaultDatabase: &managedredis.ManagedRedisDefaultDatabaseArgs{ // GeoReplicationGroupName: pulumi.String("example-geo-group"), // }, // }) // if err != nil { // return err // } // _, err = managedredis.NewGeoReplication(ctx, "example", &managedredis.GeoReplicationArgs{ // ManagedRedisId: amr1.ID(), // LinkedManagedRedisIds: pulumi.StringArray{ // amr2.ID(), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Cache` - 2025-07-01 // // ## Import // // Managed Redis Database Geo-Replication can be imported using the Managed Redis `resource id`, e.g. // // ```sh // $ pulumi import azure:managedredis/geoReplication:GeoReplication example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redisEnterprise/cluster1 // ``` type GeoReplication struct { pulumi.CustomResourceState // A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same `geoReplicationGroupName` configured. Once linked, the geo-replication state of all Managed Redis will be updated. LinkedManagedRedisIds pulumi.StringArrayOutput `pulumi:"linkedManagedRedisIds"` // The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate `managedredis.GeoReplication` resources for each. Changing this forces a new resource to be created. ManagedRedisId pulumi.StringOutput `pulumi:"managedRedisId"` } // NewGeoReplication registers a new resource with the given unique name, arguments, and options. func NewGeoReplication(ctx *pulumi.Context, name string, args *GeoReplicationArgs, opts ...pulumi.ResourceOption) (*GeoReplication, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LinkedManagedRedisIds == nil { return nil, errors.New("invalid value for required argument 'LinkedManagedRedisIds'") } if args.ManagedRedisId == nil { return nil, errors.New("invalid value for required argument 'ManagedRedisId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource GeoReplication err := ctx.RegisterResource("azure:managedredis/geoReplication:GeoReplication", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetGeoReplication gets an existing GeoReplication resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetGeoReplication(ctx *pulumi.Context, name string, id pulumi.IDInput, state *GeoReplicationState, opts ...pulumi.ResourceOption) (*GeoReplication, error) { var resource GeoReplication err := ctx.ReadResource("azure:managedredis/geoReplication:GeoReplication", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering GeoReplication resources. type geoReplicationState struct { // A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same `geoReplicationGroupName` configured. Once linked, the geo-replication state of all Managed Redis will be updated. LinkedManagedRedisIds []string `pulumi:"linkedManagedRedisIds"` // The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate `managedredis.GeoReplication` resources for each. Changing this forces a new resource to be created. ManagedRedisId *string `pulumi:"managedRedisId"` } type GeoReplicationState struct { // A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same `geoReplicationGroupName` configured. Once linked, the geo-replication state of all Managed Redis will be updated. LinkedManagedRedisIds pulumi.StringArrayInput // The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate `managedredis.GeoReplication` resources for each. Changing this forces a new resource to be created. ManagedRedisId pulumi.StringPtrInput } func (GeoReplicationState) ElementType() reflect.Type { return reflect.TypeOf((*geoReplicationState)(nil)).Elem() } type geoReplicationArgs struct { // A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same `geoReplicationGroupName` configured. Once linked, the geo-replication state of all Managed Redis will be updated. LinkedManagedRedisIds []string `pulumi:"linkedManagedRedisIds"` // The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate `managedredis.GeoReplication` resources for each. Changing this forces a new resource to be created. ManagedRedisId string `pulumi:"managedRedisId"` } // The set of arguments for constructing a GeoReplication resource. type GeoReplicationArgs struct { // A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same `geoReplicationGroupName` configured. Once linked, the geo-replication state of all Managed Redis will be updated. LinkedManagedRedisIds pulumi.StringArrayInput // The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate `managedredis.GeoReplication` resources for each. Changing this forces a new resource to be created. ManagedRedisId pulumi.StringInput } func (GeoReplicationArgs) ElementType() reflect.Type { return reflect.TypeOf((*geoReplicationArgs)(nil)).Elem() } type GeoReplicationInput interface { pulumi.Input ToGeoReplicationOutput() GeoReplicationOutput ToGeoReplicationOutputWithContext(ctx context.Context) GeoReplicationOutput } func (*GeoReplication) ElementType() reflect.Type { return reflect.TypeOf((**GeoReplication)(nil)).Elem() } func (i *GeoReplication) ToGeoReplicationOutput() GeoReplicationOutput { return i.ToGeoReplicationOutputWithContext(context.Background()) } func (i *GeoReplication) ToGeoReplicationOutputWithContext(ctx context.Context) GeoReplicationOutput { return pulumi.ToOutputWithContext(ctx, i).(GeoReplicationOutput) } // GeoReplicationArrayInput is an input type that accepts GeoReplicationArray and GeoReplicationArrayOutput values. // You can construct a concrete instance of `GeoReplicationArrayInput` via: // // GeoReplicationArray{ GeoReplicationArgs{...} } type GeoReplicationArrayInput interface { pulumi.Input ToGeoReplicationArrayOutput() GeoReplicationArrayOutput ToGeoReplicationArrayOutputWithContext(context.Context) GeoReplicationArrayOutput } type GeoReplicationArray []GeoReplicationInput func (GeoReplicationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*GeoReplication)(nil)).Elem() } func (i GeoReplicationArray) ToGeoReplicationArrayOutput() GeoReplicationArrayOutput { return i.ToGeoReplicationArrayOutputWithContext(context.Background()) } func (i GeoReplicationArray) ToGeoReplicationArrayOutputWithContext(ctx context.Context) GeoReplicationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GeoReplicationArrayOutput) } // GeoReplicationMapInput is an input type that accepts GeoReplicationMap and GeoReplicationMapOutput values. // You can construct a concrete instance of `GeoReplicationMapInput` via: // // GeoReplicationMap{ "key": GeoReplicationArgs{...} } type GeoReplicationMapInput interface { pulumi.Input ToGeoReplicationMapOutput() GeoReplicationMapOutput ToGeoReplicationMapOutputWithContext(context.Context) GeoReplicationMapOutput } type GeoReplicationMap map[string]GeoReplicationInput func (GeoReplicationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*GeoReplication)(nil)).Elem() } func (i GeoReplicationMap) ToGeoReplicationMapOutput() GeoReplicationMapOutput { return i.ToGeoReplicationMapOutputWithContext(context.Background()) } func (i GeoReplicationMap) ToGeoReplicationMapOutputWithContext(ctx context.Context) GeoReplicationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(GeoReplicationMapOutput) } type GeoReplicationOutput struct{ *pulumi.OutputState } func (GeoReplicationOutput) ElementType() reflect.Type { return reflect.TypeOf((**GeoReplication)(nil)).Elem() } func (o GeoReplicationOutput) ToGeoReplicationOutput() GeoReplicationOutput { return o } func (o GeoReplicationOutput) ToGeoReplicationOutputWithContext(ctx context.Context) GeoReplicationOutput { return o } // A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same `geoReplicationGroupName` configured. Once linked, the geo-replication state of all Managed Redis will be updated. func (o GeoReplicationOutput) LinkedManagedRedisIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *GeoReplication) pulumi.StringArrayOutput { return v.LinkedManagedRedisIds }).(pulumi.StringArrayOutput) } // The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate `managedredis.GeoReplication` resources for each. Changing this forces a new resource to be created. func (o GeoReplicationOutput) ManagedRedisId() pulumi.StringOutput { return o.ApplyT(func(v *GeoReplication) pulumi.StringOutput { return v.ManagedRedisId }).(pulumi.StringOutput) } type GeoReplicationArrayOutput struct{ *pulumi.OutputState } func (GeoReplicationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*GeoReplication)(nil)).Elem() } func (o GeoReplicationArrayOutput) ToGeoReplicationArrayOutput() GeoReplicationArrayOutput { return o } func (o GeoReplicationArrayOutput) ToGeoReplicationArrayOutputWithContext(ctx context.Context) GeoReplicationArrayOutput { return o } func (o GeoReplicationArrayOutput) Index(i pulumi.IntInput) GeoReplicationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GeoReplication { return vs[0].([]*GeoReplication)[vs[1].(int)] }).(GeoReplicationOutput) } type GeoReplicationMapOutput struct{ *pulumi.OutputState } func (GeoReplicationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*GeoReplication)(nil)).Elem() } func (o GeoReplicationMapOutput) ToGeoReplicationMapOutput() GeoReplicationMapOutput { return o } func (o GeoReplicationMapOutput) ToGeoReplicationMapOutputWithContext(ctx context.Context) GeoReplicationMapOutput { return o } func (o GeoReplicationMapOutput) MapIndex(k pulumi.StringInput) GeoReplicationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GeoReplication { return vs[0].(map[string]*GeoReplication)[vs[1].(string)] }).(GeoReplicationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*GeoReplicationInput)(nil)).Elem(), &GeoReplication{}) pulumi.RegisterInputType(reflect.TypeOf((*GeoReplicationArrayInput)(nil)).Elem(), GeoReplicationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GeoReplicationMapInput)(nil)).Elem(), GeoReplicationMap{}) pulumi.RegisterOutputType(GeoReplicationOutput{}) pulumi.RegisterOutputType(GeoReplicationArrayOutput{}) pulumi.RegisterOutputType(GeoReplicationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/init.go
sdk/go/azure/postgresql/init.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "fmt" "github.com/blang/semver" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type module struct { version semver.Version } func (m *module) Version() semver.Version { return m.version } func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { case "azure:postgresql/activeDirectoryAdministrator:ActiveDirectoryAdministrator": r = &ActiveDirectoryAdministrator{} case "azure:postgresql/configuration:Configuration": r = &Configuration{} case "azure:postgresql/database:Database": r = &Database{} case "azure:postgresql/firewallRule:FirewallRule": r = &FirewallRule{} case "azure:postgresql/flexibleServer:FlexibleServer": r = &FlexibleServer{} case "azure:postgresql/flexibleServerActiveDirectoryAdministrator:FlexibleServerActiveDirectoryAdministrator": r = &FlexibleServerActiveDirectoryAdministrator{} case "azure:postgresql/flexibleServerBackup:FlexibleServerBackup": r = &FlexibleServerBackup{} case "azure:postgresql/flexibleServerConfiguration:FlexibleServerConfiguration": r = &FlexibleServerConfiguration{} case "azure:postgresql/flexibleServerDatabase:FlexibleServerDatabase": r = &FlexibleServerDatabase{} case "azure:postgresql/flexibleServerFirewallRule:FlexibleServerFirewallRule": r = &FlexibleServerFirewallRule{} case "azure:postgresql/flexibleServerVirtualEndpoint:FlexibleServerVirtualEndpoint": r = &FlexibleServerVirtualEndpoint{} case "azure:postgresql/server:Server": r = &Server{} case "azure:postgresql/serverKey:ServerKey": r = &ServerKey{} case "azure:postgresql/virtualNetworkRule:VirtualNetworkRule": r = &VirtualNetworkRule{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) return } func init() { version, err := internal.PkgVersion() if err != nil { version = semver.Version{Major: 1} } pulumi.RegisterResourceModule( "azure", "postgresql/activeDirectoryAdministrator", &module{version}, ) pulumi.RegisterResourceModule( "azure", "postgresql/configuration", &module{version}, ) pulumi.RegisterResourceModule( "azure", "postgresql/database", &module{version}, ) pulumi.RegisterResourceModule( "azure", "postgresql/firewallRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "postgresql/flexibleServer", &module{version}, ) pulumi.RegisterResourceModule( "azure", "postgresql/flexibleServerActiveDirectoryAdministrator", &module{version}, ) pulumi.RegisterResourceModule( "azure", "postgresql/flexibleServerBackup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "postgresql/flexibleServerConfiguration", &module{version}, ) pulumi.RegisterResourceModule( "azure", "postgresql/flexibleServerDatabase", &module{version}, ) pulumi.RegisterResourceModule( "azure", "postgresql/flexibleServerFirewallRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "postgresql/flexibleServerVirtualEndpoint", &module{version}, ) pulumi.RegisterResourceModule( "azure", "postgresql/server", &module{version}, ) pulumi.RegisterResourceModule( "azure", "postgresql/serverKey", &module{version}, ) pulumi.RegisterResourceModule( "azure", "postgresql/virtualNetworkRule", &module{version}, ) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/flexibleServerConfiguration.go
sdk/go/azure/postgresql/flexibleServerConfiguration.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Sets a PostgreSQL Configuration value on a Azure PostgreSQL Flexible Server. // // > **Note:** Changes to static server parameters will automatically trigger Azure Flex Server restart. This behavior can be disabled in the provider `features` block by setting the `restartServerOnConfigurationValueChange` field to `false` within the `postgresqlFlexibleServer` block. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleFlexibleServer, err := postgresql.NewFlexibleServer(ctx, "example", &postgresql.FlexibleServerArgs{ // Name: pulumi.String("example-psqlflexibleserver"), // ResourceGroupName: example.Name, // Location: example.Location, // Version: pulumi.String("12"), // AdministratorLogin: pulumi.String("psqladmin"), // AdministratorPassword: pulumi.String("H@Sh1CoR3!"), // StorageMb: pulumi.Int(32768), // SkuName: pulumi.String("GP_Standard_D4s_v3"), // }) // if err != nil { // return err // } // _, err = postgresql.NewFlexibleServerConfiguration(ctx, "example", &postgresql.FlexibleServerConfigurationArgs{ // Name: pulumi.String("backslash_quote"), // ServerId: exampleFlexibleServer.ID(), // Value: pulumi.String("on"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Azure Extensions // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleFlexibleServer, err := postgresql.NewFlexibleServer(ctx, "example", &postgresql.FlexibleServerArgs{ // Name: pulumi.String("example-psqlflexibleserver"), // ResourceGroupName: example.Name, // Location: example.Location, // Version: pulumi.String("12"), // AdministratorLogin: pulumi.String("psqladmin"), // AdministratorPassword: pulumi.String("H@Sh1CoR3!"), // StorageMb: pulumi.Int(32768), // SkuName: pulumi.String("GP_Standard_D4s_v3"), // }) // if err != nil { // return err // } // _, err = postgresql.NewFlexibleServerConfiguration(ctx, "example", &postgresql.FlexibleServerConfigurationArgs{ // Name: pulumi.String("azure.extensions"), // ServerId: exampleFlexibleServer.ID(), // Value: pulumi.String("CUBE,CITEXT,BTREE_GIST"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DBforPostgreSQL` - 2025-08-01 // // ## Import // // PostgreSQL Configurations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:postgresql/flexibleServerConfiguration:FlexibleServerConfiguration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforPostgreSQL/flexibleServers/server1/configurations/configuration1 // ``` type FlexibleServerConfiguration struct { pulumi.CustomResourceState // Specifies the name of the PostgreSQL Configuration, which needs [to be a valid PostgreSQL configuration name](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER). Changing this forces a new resource to be created. // // > **Note:** PostgreSQL provides the ability to extend the functionality using azure extensions, with PostgreSQL azure extensions you should specify the `name` value as `azure.extensions` and the `value` you wish to allow in the [extensions list](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-extensions?WT.mc_id=Portal-Microsoft_Azure_OSSDatabases#extension-versions). Name pulumi.StringOutput `pulumi:"name"` // The ID of the PostgreSQL Flexible Server where we want to change configuration. Changing this forces a new PostgreSQL Flexible Server Configuration resource. ServerId pulumi.StringOutput `pulumi:"serverId"` // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Value pulumi.StringOutput `pulumi:"value"` } // NewFlexibleServerConfiguration registers a new resource with the given unique name, arguments, and options. func NewFlexibleServerConfiguration(ctx *pulumi.Context, name string, args *FlexibleServerConfigurationArgs, opts ...pulumi.ResourceOption) (*FlexibleServerConfiguration, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ServerId == nil { return nil, errors.New("invalid value for required argument 'ServerId'") } if args.Value == nil { return nil, errors.New("invalid value for required argument 'Value'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FlexibleServerConfiguration err := ctx.RegisterResource("azure:postgresql/flexibleServerConfiguration:FlexibleServerConfiguration", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFlexibleServerConfiguration gets an existing FlexibleServerConfiguration resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetFlexibleServerConfiguration(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FlexibleServerConfigurationState, opts ...pulumi.ResourceOption) (*FlexibleServerConfiguration, error) { var resource FlexibleServerConfiguration err := ctx.ReadResource("azure:postgresql/flexibleServerConfiguration:FlexibleServerConfiguration", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FlexibleServerConfiguration resources. type flexibleServerConfigurationState struct { // Specifies the name of the PostgreSQL Configuration, which needs [to be a valid PostgreSQL configuration name](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER). Changing this forces a new resource to be created. // // > **Note:** PostgreSQL provides the ability to extend the functionality using azure extensions, with PostgreSQL azure extensions you should specify the `name` value as `azure.extensions` and the `value` you wish to allow in the [extensions list](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-extensions?WT.mc_id=Portal-Microsoft_Azure_OSSDatabases#extension-versions). Name *string `pulumi:"name"` // The ID of the PostgreSQL Flexible Server where we want to change configuration. Changing this forces a new PostgreSQL Flexible Server Configuration resource. ServerId *string `pulumi:"serverId"` // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Value *string `pulumi:"value"` } type FlexibleServerConfigurationState struct { // Specifies the name of the PostgreSQL Configuration, which needs [to be a valid PostgreSQL configuration name](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER). Changing this forces a new resource to be created. // // > **Note:** PostgreSQL provides the ability to extend the functionality using azure extensions, with PostgreSQL azure extensions you should specify the `name` value as `azure.extensions` and the `value` you wish to allow in the [extensions list](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-extensions?WT.mc_id=Portal-Microsoft_Azure_OSSDatabases#extension-versions). Name pulumi.StringPtrInput // The ID of the PostgreSQL Flexible Server where we want to change configuration. Changing this forces a new PostgreSQL Flexible Server Configuration resource. ServerId pulumi.StringPtrInput // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Value pulumi.StringPtrInput } func (FlexibleServerConfigurationState) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerConfigurationState)(nil)).Elem() } type flexibleServerConfigurationArgs struct { // Specifies the name of the PostgreSQL Configuration, which needs [to be a valid PostgreSQL configuration name](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER). Changing this forces a new resource to be created. // // > **Note:** PostgreSQL provides the ability to extend the functionality using azure extensions, with PostgreSQL azure extensions you should specify the `name` value as `azure.extensions` and the `value` you wish to allow in the [extensions list](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-extensions?WT.mc_id=Portal-Microsoft_Azure_OSSDatabases#extension-versions). Name *string `pulumi:"name"` // The ID of the PostgreSQL Flexible Server where we want to change configuration. Changing this forces a new PostgreSQL Flexible Server Configuration resource. ServerId string `pulumi:"serverId"` // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Value string `pulumi:"value"` } // The set of arguments for constructing a FlexibleServerConfiguration resource. type FlexibleServerConfigurationArgs struct { // Specifies the name of the PostgreSQL Configuration, which needs [to be a valid PostgreSQL configuration name](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER). Changing this forces a new resource to be created. // // > **Note:** PostgreSQL provides the ability to extend the functionality using azure extensions, with PostgreSQL azure extensions you should specify the `name` value as `azure.extensions` and the `value` you wish to allow in the [extensions list](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-extensions?WT.mc_id=Portal-Microsoft_Azure_OSSDatabases#extension-versions). Name pulumi.StringPtrInput // The ID of the PostgreSQL Flexible Server where we want to change configuration. Changing this forces a new PostgreSQL Flexible Server Configuration resource. ServerId pulumi.StringInput // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Value pulumi.StringInput } func (FlexibleServerConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerConfigurationArgs)(nil)).Elem() } type FlexibleServerConfigurationInput interface { pulumi.Input ToFlexibleServerConfigurationOutput() FlexibleServerConfigurationOutput ToFlexibleServerConfigurationOutputWithContext(ctx context.Context) FlexibleServerConfigurationOutput } func (*FlexibleServerConfiguration) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerConfiguration)(nil)).Elem() } func (i *FlexibleServerConfiguration) ToFlexibleServerConfigurationOutput() FlexibleServerConfigurationOutput { return i.ToFlexibleServerConfigurationOutputWithContext(context.Background()) } func (i *FlexibleServerConfiguration) ToFlexibleServerConfigurationOutputWithContext(ctx context.Context) FlexibleServerConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerConfigurationOutput) } // FlexibleServerConfigurationArrayInput is an input type that accepts FlexibleServerConfigurationArray and FlexibleServerConfigurationArrayOutput values. // You can construct a concrete instance of `FlexibleServerConfigurationArrayInput` via: // // FlexibleServerConfigurationArray{ FlexibleServerConfigurationArgs{...} } type FlexibleServerConfigurationArrayInput interface { pulumi.Input ToFlexibleServerConfigurationArrayOutput() FlexibleServerConfigurationArrayOutput ToFlexibleServerConfigurationArrayOutputWithContext(context.Context) FlexibleServerConfigurationArrayOutput } type FlexibleServerConfigurationArray []FlexibleServerConfigurationInput func (FlexibleServerConfigurationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerConfiguration)(nil)).Elem() } func (i FlexibleServerConfigurationArray) ToFlexibleServerConfigurationArrayOutput() FlexibleServerConfigurationArrayOutput { return i.ToFlexibleServerConfigurationArrayOutputWithContext(context.Background()) } func (i FlexibleServerConfigurationArray) ToFlexibleServerConfigurationArrayOutputWithContext(ctx context.Context) FlexibleServerConfigurationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerConfigurationArrayOutput) } // FlexibleServerConfigurationMapInput is an input type that accepts FlexibleServerConfigurationMap and FlexibleServerConfigurationMapOutput values. // You can construct a concrete instance of `FlexibleServerConfigurationMapInput` via: // // FlexibleServerConfigurationMap{ "key": FlexibleServerConfigurationArgs{...} } type FlexibleServerConfigurationMapInput interface { pulumi.Input ToFlexibleServerConfigurationMapOutput() FlexibleServerConfigurationMapOutput ToFlexibleServerConfigurationMapOutputWithContext(context.Context) FlexibleServerConfigurationMapOutput } type FlexibleServerConfigurationMap map[string]FlexibleServerConfigurationInput func (FlexibleServerConfigurationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerConfiguration)(nil)).Elem() } func (i FlexibleServerConfigurationMap) ToFlexibleServerConfigurationMapOutput() FlexibleServerConfigurationMapOutput { return i.ToFlexibleServerConfigurationMapOutputWithContext(context.Background()) } func (i FlexibleServerConfigurationMap) ToFlexibleServerConfigurationMapOutputWithContext(ctx context.Context) FlexibleServerConfigurationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerConfigurationMapOutput) } type FlexibleServerConfigurationOutput struct{ *pulumi.OutputState } func (FlexibleServerConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerConfiguration)(nil)).Elem() } func (o FlexibleServerConfigurationOutput) ToFlexibleServerConfigurationOutput() FlexibleServerConfigurationOutput { return o } func (o FlexibleServerConfigurationOutput) ToFlexibleServerConfigurationOutputWithContext(ctx context.Context) FlexibleServerConfigurationOutput { return o } // Specifies the name of the PostgreSQL Configuration, which needs [to be a valid PostgreSQL configuration name](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER). Changing this forces a new resource to be created. // // > **Note:** PostgreSQL provides the ability to extend the functionality using azure extensions, with PostgreSQL azure extensions you should specify the `name` value as `azure.extensions` and the `value` you wish to allow in the [extensions list](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-extensions?WT.mc_id=Portal-Microsoft_Azure_OSSDatabases#extension-versions). func (o FlexibleServerConfigurationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the PostgreSQL Flexible Server where we want to change configuration. Changing this forces a new PostgreSQL Flexible Server Configuration resource. func (o FlexibleServerConfigurationOutput) ServerId() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerConfiguration) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput) } // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. func (o FlexibleServerConfigurationOutput) Value() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerConfiguration) pulumi.StringOutput { return v.Value }).(pulumi.StringOutput) } type FlexibleServerConfigurationArrayOutput struct{ *pulumi.OutputState } func (FlexibleServerConfigurationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerConfiguration)(nil)).Elem() } func (o FlexibleServerConfigurationArrayOutput) ToFlexibleServerConfigurationArrayOutput() FlexibleServerConfigurationArrayOutput { return o } func (o FlexibleServerConfigurationArrayOutput) ToFlexibleServerConfigurationArrayOutputWithContext(ctx context.Context) FlexibleServerConfigurationArrayOutput { return o } func (o FlexibleServerConfigurationArrayOutput) Index(i pulumi.IntInput) FlexibleServerConfigurationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FlexibleServerConfiguration { return vs[0].([]*FlexibleServerConfiguration)[vs[1].(int)] }).(FlexibleServerConfigurationOutput) } type FlexibleServerConfigurationMapOutput struct{ *pulumi.OutputState } func (FlexibleServerConfigurationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerConfiguration)(nil)).Elem() } func (o FlexibleServerConfigurationMapOutput) ToFlexibleServerConfigurationMapOutput() FlexibleServerConfigurationMapOutput { return o } func (o FlexibleServerConfigurationMapOutput) ToFlexibleServerConfigurationMapOutputWithContext(ctx context.Context) FlexibleServerConfigurationMapOutput { return o } func (o FlexibleServerConfigurationMapOutput) MapIndex(k pulumi.StringInput) FlexibleServerConfigurationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FlexibleServerConfiguration { return vs[0].(map[string]*FlexibleServerConfiguration)[vs[1].(string)] }).(FlexibleServerConfigurationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerConfigurationInput)(nil)).Elem(), &FlexibleServerConfiguration{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerConfigurationArrayInput)(nil)).Elem(), FlexibleServerConfigurationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerConfigurationMapInput)(nil)).Elem(), FlexibleServerConfigurationMap{}) pulumi.RegisterOutputType(FlexibleServerConfigurationOutput{}) pulumi.RegisterOutputType(FlexibleServerConfigurationArrayOutput{}) pulumi.RegisterOutputType(FlexibleServerConfigurationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/pulumiTypes.go
sdk/go/azure/postgresql/pulumiTypes.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) var _ = internal.GetEnvOrDefault type FlexibleServerAuthentication struct { // Whether Active Directory authentication is allowed to access the PostgreSQL Flexible Server. Defaults to `false`. ActiveDirectoryAuthEnabled *bool `pulumi:"activeDirectoryAuthEnabled"` // Whether password authentication is allowed to access the PostgreSQL Flexible Server. Defaults to `true`. PasswordAuthEnabled *bool `pulumi:"passwordAuthEnabled"` // The Tenant ID of the Azure Active Directory which is used by the Active Directory authentication. `activeDirectoryAuthEnabled` must be set to `true`. // // > **Note:** Setting `activeDirectoryAuthEnabled` to `true` requires a Service Principal for the Postgres Flexible Server. For more details see [this document](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-configure-sign-in-azure-ad-authentication). // // > **Note:** `tenantId` is required when `activeDirectoryAuthEnabled` is set to `true`. And it should not be specified when `activeDirectoryAuthEnabled` is set to `false` TenantId *string `pulumi:"tenantId"` } // FlexibleServerAuthenticationInput is an input type that accepts FlexibleServerAuthenticationArgs and FlexibleServerAuthenticationOutput values. // You can construct a concrete instance of `FlexibleServerAuthenticationInput` via: // // FlexibleServerAuthenticationArgs{...} type FlexibleServerAuthenticationInput interface { pulumi.Input ToFlexibleServerAuthenticationOutput() FlexibleServerAuthenticationOutput ToFlexibleServerAuthenticationOutputWithContext(context.Context) FlexibleServerAuthenticationOutput } type FlexibleServerAuthenticationArgs struct { // Whether Active Directory authentication is allowed to access the PostgreSQL Flexible Server. Defaults to `false`. ActiveDirectoryAuthEnabled pulumi.BoolPtrInput `pulumi:"activeDirectoryAuthEnabled"` // Whether password authentication is allowed to access the PostgreSQL Flexible Server. Defaults to `true`. PasswordAuthEnabled pulumi.BoolPtrInput `pulumi:"passwordAuthEnabled"` // The Tenant ID of the Azure Active Directory which is used by the Active Directory authentication. `activeDirectoryAuthEnabled` must be set to `true`. // // > **Note:** Setting `activeDirectoryAuthEnabled` to `true` requires a Service Principal for the Postgres Flexible Server. For more details see [this document](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-configure-sign-in-azure-ad-authentication). // // > **Note:** `tenantId` is required when `activeDirectoryAuthEnabled` is set to `true`. And it should not be specified when `activeDirectoryAuthEnabled` is set to `false` TenantId pulumi.StringPtrInput `pulumi:"tenantId"` } func (FlexibleServerAuthenticationArgs) ElementType() reflect.Type { return reflect.TypeOf((*FlexibleServerAuthentication)(nil)).Elem() } func (i FlexibleServerAuthenticationArgs) ToFlexibleServerAuthenticationOutput() FlexibleServerAuthenticationOutput { return i.ToFlexibleServerAuthenticationOutputWithContext(context.Background()) } func (i FlexibleServerAuthenticationArgs) ToFlexibleServerAuthenticationOutputWithContext(ctx context.Context) FlexibleServerAuthenticationOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerAuthenticationOutput) } func (i FlexibleServerAuthenticationArgs) ToFlexibleServerAuthenticationPtrOutput() FlexibleServerAuthenticationPtrOutput { return i.ToFlexibleServerAuthenticationPtrOutputWithContext(context.Background()) } func (i FlexibleServerAuthenticationArgs) ToFlexibleServerAuthenticationPtrOutputWithContext(ctx context.Context) FlexibleServerAuthenticationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerAuthenticationOutput).ToFlexibleServerAuthenticationPtrOutputWithContext(ctx) } // FlexibleServerAuthenticationPtrInput is an input type that accepts FlexibleServerAuthenticationArgs, FlexibleServerAuthenticationPtr and FlexibleServerAuthenticationPtrOutput values. // You can construct a concrete instance of `FlexibleServerAuthenticationPtrInput` via: // // FlexibleServerAuthenticationArgs{...} // // or: // // nil type FlexibleServerAuthenticationPtrInput interface { pulumi.Input ToFlexibleServerAuthenticationPtrOutput() FlexibleServerAuthenticationPtrOutput ToFlexibleServerAuthenticationPtrOutputWithContext(context.Context) FlexibleServerAuthenticationPtrOutput } type flexibleServerAuthenticationPtrType FlexibleServerAuthenticationArgs func FlexibleServerAuthenticationPtr(v *FlexibleServerAuthenticationArgs) FlexibleServerAuthenticationPtrInput { return (*flexibleServerAuthenticationPtrType)(v) } func (*flexibleServerAuthenticationPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerAuthentication)(nil)).Elem() } func (i *flexibleServerAuthenticationPtrType) ToFlexibleServerAuthenticationPtrOutput() FlexibleServerAuthenticationPtrOutput { return i.ToFlexibleServerAuthenticationPtrOutputWithContext(context.Background()) } func (i *flexibleServerAuthenticationPtrType) ToFlexibleServerAuthenticationPtrOutputWithContext(ctx context.Context) FlexibleServerAuthenticationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerAuthenticationPtrOutput) } type FlexibleServerAuthenticationOutput struct{ *pulumi.OutputState } func (FlexibleServerAuthenticationOutput) ElementType() reflect.Type { return reflect.TypeOf((*FlexibleServerAuthentication)(nil)).Elem() } func (o FlexibleServerAuthenticationOutput) ToFlexibleServerAuthenticationOutput() FlexibleServerAuthenticationOutput { return o } func (o FlexibleServerAuthenticationOutput) ToFlexibleServerAuthenticationOutputWithContext(ctx context.Context) FlexibleServerAuthenticationOutput { return o } func (o FlexibleServerAuthenticationOutput) ToFlexibleServerAuthenticationPtrOutput() FlexibleServerAuthenticationPtrOutput { return o.ToFlexibleServerAuthenticationPtrOutputWithContext(context.Background()) } func (o FlexibleServerAuthenticationOutput) ToFlexibleServerAuthenticationPtrOutputWithContext(ctx context.Context) FlexibleServerAuthenticationPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FlexibleServerAuthentication) *FlexibleServerAuthentication { return &v }).(FlexibleServerAuthenticationPtrOutput) } // Whether Active Directory authentication is allowed to access the PostgreSQL Flexible Server. Defaults to `false`. func (o FlexibleServerAuthenticationOutput) ActiveDirectoryAuthEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v FlexibleServerAuthentication) *bool { return v.ActiveDirectoryAuthEnabled }).(pulumi.BoolPtrOutput) } // Whether password authentication is allowed to access the PostgreSQL Flexible Server. Defaults to `true`. func (o FlexibleServerAuthenticationOutput) PasswordAuthEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v FlexibleServerAuthentication) *bool { return v.PasswordAuthEnabled }).(pulumi.BoolPtrOutput) } // The Tenant ID of the Azure Active Directory which is used by the Active Directory authentication. `activeDirectoryAuthEnabled` must be set to `true`. // // > **Note:** Setting `activeDirectoryAuthEnabled` to `true` requires a Service Principal for the Postgres Flexible Server. For more details see [this document](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-configure-sign-in-azure-ad-authentication). // // > **Note:** `tenantId` is required when `activeDirectoryAuthEnabled` is set to `true`. And it should not be specified when `activeDirectoryAuthEnabled` is set to `false` func (o FlexibleServerAuthenticationOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v FlexibleServerAuthentication) *string { return v.TenantId }).(pulumi.StringPtrOutput) } type FlexibleServerAuthenticationPtrOutput struct{ *pulumi.OutputState } func (FlexibleServerAuthenticationPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerAuthentication)(nil)).Elem() } func (o FlexibleServerAuthenticationPtrOutput) ToFlexibleServerAuthenticationPtrOutput() FlexibleServerAuthenticationPtrOutput { return o } func (o FlexibleServerAuthenticationPtrOutput) ToFlexibleServerAuthenticationPtrOutputWithContext(ctx context.Context) FlexibleServerAuthenticationPtrOutput { return o } func (o FlexibleServerAuthenticationPtrOutput) Elem() FlexibleServerAuthenticationOutput { return o.ApplyT(func(v *FlexibleServerAuthentication) FlexibleServerAuthentication { if v != nil { return *v } var ret FlexibleServerAuthentication return ret }).(FlexibleServerAuthenticationOutput) } // Whether Active Directory authentication is allowed to access the PostgreSQL Flexible Server. Defaults to `false`. func (o FlexibleServerAuthenticationPtrOutput) ActiveDirectoryAuthEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *FlexibleServerAuthentication) *bool { if v == nil { return nil } return v.ActiveDirectoryAuthEnabled }).(pulumi.BoolPtrOutput) } // Whether password authentication is allowed to access the PostgreSQL Flexible Server. Defaults to `true`. func (o FlexibleServerAuthenticationPtrOutput) PasswordAuthEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *FlexibleServerAuthentication) *bool { if v == nil { return nil } return v.PasswordAuthEnabled }).(pulumi.BoolPtrOutput) } // The Tenant ID of the Azure Active Directory which is used by the Active Directory authentication. `activeDirectoryAuthEnabled` must be set to `true`. // // > **Note:** Setting `activeDirectoryAuthEnabled` to `true` requires a Service Principal for the Postgres Flexible Server. For more details see [this document](https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-configure-sign-in-azure-ad-authentication). // // > **Note:** `tenantId` is required when `activeDirectoryAuthEnabled` is set to `true`. And it should not be specified when `activeDirectoryAuthEnabled` is set to `false` func (o FlexibleServerAuthenticationPtrOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerAuthentication) *string { if v == nil { return nil } return v.TenantId }).(pulumi.StringPtrOutput) } type FlexibleServerCustomerManagedKey struct { // The versioned/versionless ID of the geo backup Key Vault Key. // // > **Note:** The key vault in which this key exists must be in the same region as the geo-redundant backup. GeoBackupKeyVaultKeyId *string `pulumi:"geoBackupKeyVaultKeyId"` // The geo backup user managed identity id for a Customer Managed Key. Must be added to `identity.identity_ids`. // // > **Note:** This managed identity cannot be the same as `primaryUserAssignedIdentityId`, additionally this identity must be created in the same region as the geo-redundant backup. // // > **Note:** `primaryUserAssignedIdentityId` or `geoBackupUserAssignedIdentityId` is required when `type` is set to `UserAssigned`. GeoBackupUserAssignedIdentityId *string `pulumi:"geoBackupUserAssignedIdentityId"` // The versioned/versionless ID of the Key Vault Key. KeyVaultKeyId string `pulumi:"keyVaultKeyId"` // Specifies the primary user managed identity id for a Customer Managed Key. Must be added to `identity.identity_ids`. PrimaryUserAssignedIdentityId *string `pulumi:"primaryUserAssignedIdentityId"` } // FlexibleServerCustomerManagedKeyInput is an input type that accepts FlexibleServerCustomerManagedKeyArgs and FlexibleServerCustomerManagedKeyOutput values. // You can construct a concrete instance of `FlexibleServerCustomerManagedKeyInput` via: // // FlexibleServerCustomerManagedKeyArgs{...} type FlexibleServerCustomerManagedKeyInput interface { pulumi.Input ToFlexibleServerCustomerManagedKeyOutput() FlexibleServerCustomerManagedKeyOutput ToFlexibleServerCustomerManagedKeyOutputWithContext(context.Context) FlexibleServerCustomerManagedKeyOutput } type FlexibleServerCustomerManagedKeyArgs struct { // The versioned/versionless ID of the geo backup Key Vault Key. // // > **Note:** The key vault in which this key exists must be in the same region as the geo-redundant backup. GeoBackupKeyVaultKeyId pulumi.StringPtrInput `pulumi:"geoBackupKeyVaultKeyId"` // The geo backup user managed identity id for a Customer Managed Key. Must be added to `identity.identity_ids`. // // > **Note:** This managed identity cannot be the same as `primaryUserAssignedIdentityId`, additionally this identity must be created in the same region as the geo-redundant backup. // // > **Note:** `primaryUserAssignedIdentityId` or `geoBackupUserAssignedIdentityId` is required when `type` is set to `UserAssigned`. GeoBackupUserAssignedIdentityId pulumi.StringPtrInput `pulumi:"geoBackupUserAssignedIdentityId"` // The versioned/versionless ID of the Key Vault Key. KeyVaultKeyId pulumi.StringInput `pulumi:"keyVaultKeyId"` // Specifies the primary user managed identity id for a Customer Managed Key. Must be added to `identity.identity_ids`. PrimaryUserAssignedIdentityId pulumi.StringPtrInput `pulumi:"primaryUserAssignedIdentityId"` } func (FlexibleServerCustomerManagedKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*FlexibleServerCustomerManagedKey)(nil)).Elem() } func (i FlexibleServerCustomerManagedKeyArgs) ToFlexibleServerCustomerManagedKeyOutput() FlexibleServerCustomerManagedKeyOutput { return i.ToFlexibleServerCustomerManagedKeyOutputWithContext(context.Background()) } func (i FlexibleServerCustomerManagedKeyArgs) ToFlexibleServerCustomerManagedKeyOutputWithContext(ctx context.Context) FlexibleServerCustomerManagedKeyOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerCustomerManagedKeyOutput) } func (i FlexibleServerCustomerManagedKeyArgs) ToFlexibleServerCustomerManagedKeyPtrOutput() FlexibleServerCustomerManagedKeyPtrOutput { return i.ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(context.Background()) } func (i FlexibleServerCustomerManagedKeyArgs) ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(ctx context.Context) FlexibleServerCustomerManagedKeyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerCustomerManagedKeyOutput).ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(ctx) } // FlexibleServerCustomerManagedKeyPtrInput is an input type that accepts FlexibleServerCustomerManagedKeyArgs, FlexibleServerCustomerManagedKeyPtr and FlexibleServerCustomerManagedKeyPtrOutput values. // You can construct a concrete instance of `FlexibleServerCustomerManagedKeyPtrInput` via: // // FlexibleServerCustomerManagedKeyArgs{...} // // or: // // nil type FlexibleServerCustomerManagedKeyPtrInput interface { pulumi.Input ToFlexibleServerCustomerManagedKeyPtrOutput() FlexibleServerCustomerManagedKeyPtrOutput ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(context.Context) FlexibleServerCustomerManagedKeyPtrOutput } type flexibleServerCustomerManagedKeyPtrType FlexibleServerCustomerManagedKeyArgs func FlexibleServerCustomerManagedKeyPtr(v *FlexibleServerCustomerManagedKeyArgs) FlexibleServerCustomerManagedKeyPtrInput { return (*flexibleServerCustomerManagedKeyPtrType)(v) } func (*flexibleServerCustomerManagedKeyPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerCustomerManagedKey)(nil)).Elem() } func (i *flexibleServerCustomerManagedKeyPtrType) ToFlexibleServerCustomerManagedKeyPtrOutput() FlexibleServerCustomerManagedKeyPtrOutput { return i.ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(context.Background()) } func (i *flexibleServerCustomerManagedKeyPtrType) ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(ctx context.Context) FlexibleServerCustomerManagedKeyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerCustomerManagedKeyPtrOutput) } type FlexibleServerCustomerManagedKeyOutput struct{ *pulumi.OutputState } func (FlexibleServerCustomerManagedKeyOutput) ElementType() reflect.Type { return reflect.TypeOf((*FlexibleServerCustomerManagedKey)(nil)).Elem() } func (o FlexibleServerCustomerManagedKeyOutput) ToFlexibleServerCustomerManagedKeyOutput() FlexibleServerCustomerManagedKeyOutput { return o } func (o FlexibleServerCustomerManagedKeyOutput) ToFlexibleServerCustomerManagedKeyOutputWithContext(ctx context.Context) FlexibleServerCustomerManagedKeyOutput { return o } func (o FlexibleServerCustomerManagedKeyOutput) ToFlexibleServerCustomerManagedKeyPtrOutput() FlexibleServerCustomerManagedKeyPtrOutput { return o.ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(context.Background()) } func (o FlexibleServerCustomerManagedKeyOutput) ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(ctx context.Context) FlexibleServerCustomerManagedKeyPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FlexibleServerCustomerManagedKey) *FlexibleServerCustomerManagedKey { return &v }).(FlexibleServerCustomerManagedKeyPtrOutput) } // The versioned/versionless ID of the geo backup Key Vault Key. // // > **Note:** The key vault in which this key exists must be in the same region as the geo-redundant backup. func (o FlexibleServerCustomerManagedKeyOutput) GeoBackupKeyVaultKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v FlexibleServerCustomerManagedKey) *string { return v.GeoBackupKeyVaultKeyId }).(pulumi.StringPtrOutput) } // The geo backup user managed identity id for a Customer Managed Key. Must be added to `identity.identity_ids`. // // > **Note:** This managed identity cannot be the same as `primaryUserAssignedIdentityId`, additionally this identity must be created in the same region as the geo-redundant backup. // // > **Note:** `primaryUserAssignedIdentityId` or `geoBackupUserAssignedIdentityId` is required when `type` is set to `UserAssigned`. func (o FlexibleServerCustomerManagedKeyOutput) GeoBackupUserAssignedIdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v FlexibleServerCustomerManagedKey) *string { return v.GeoBackupUserAssignedIdentityId }).(pulumi.StringPtrOutput) } // The versioned/versionless ID of the Key Vault Key. func (o FlexibleServerCustomerManagedKeyOutput) KeyVaultKeyId() pulumi.StringOutput { return o.ApplyT(func(v FlexibleServerCustomerManagedKey) string { return v.KeyVaultKeyId }).(pulumi.StringOutput) } // Specifies the primary user managed identity id for a Customer Managed Key. Must be added to `identity.identity_ids`. func (o FlexibleServerCustomerManagedKeyOutput) PrimaryUserAssignedIdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v FlexibleServerCustomerManagedKey) *string { return v.PrimaryUserAssignedIdentityId }).(pulumi.StringPtrOutput) } type FlexibleServerCustomerManagedKeyPtrOutput struct{ *pulumi.OutputState } func (FlexibleServerCustomerManagedKeyPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerCustomerManagedKey)(nil)).Elem() } func (o FlexibleServerCustomerManagedKeyPtrOutput) ToFlexibleServerCustomerManagedKeyPtrOutput() FlexibleServerCustomerManagedKeyPtrOutput { return o } func (o FlexibleServerCustomerManagedKeyPtrOutput) ToFlexibleServerCustomerManagedKeyPtrOutputWithContext(ctx context.Context) FlexibleServerCustomerManagedKeyPtrOutput { return o } func (o FlexibleServerCustomerManagedKeyPtrOutput) Elem() FlexibleServerCustomerManagedKeyOutput { return o.ApplyT(func(v *FlexibleServerCustomerManagedKey) FlexibleServerCustomerManagedKey { if v != nil { return *v } var ret FlexibleServerCustomerManagedKey return ret }).(FlexibleServerCustomerManagedKeyOutput) } // The versioned/versionless ID of the geo backup Key Vault Key. // // > **Note:** The key vault in which this key exists must be in the same region as the geo-redundant backup. func (o FlexibleServerCustomerManagedKeyPtrOutput) GeoBackupKeyVaultKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerCustomerManagedKey) *string { if v == nil { return nil } return v.GeoBackupKeyVaultKeyId }).(pulumi.StringPtrOutput) } // The geo backup user managed identity id for a Customer Managed Key. Must be added to `identity.identity_ids`. // // > **Note:** This managed identity cannot be the same as `primaryUserAssignedIdentityId`, additionally this identity must be created in the same region as the geo-redundant backup. // // > **Note:** `primaryUserAssignedIdentityId` or `geoBackupUserAssignedIdentityId` is required when `type` is set to `UserAssigned`. func (o FlexibleServerCustomerManagedKeyPtrOutput) GeoBackupUserAssignedIdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerCustomerManagedKey) *string { if v == nil { return nil } return v.GeoBackupUserAssignedIdentityId }).(pulumi.StringPtrOutput) } // The versioned/versionless ID of the Key Vault Key. func (o FlexibleServerCustomerManagedKeyPtrOutput) KeyVaultKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerCustomerManagedKey) *string { if v == nil { return nil } return &v.KeyVaultKeyId }).(pulumi.StringPtrOutput) } // Specifies the primary user managed identity id for a Customer Managed Key. Must be added to `identity.identity_ids`. func (o FlexibleServerCustomerManagedKeyPtrOutput) PrimaryUserAssignedIdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerCustomerManagedKey) *string { if v == nil { return nil } return v.PrimaryUserAssignedIdentityId }).(pulumi.StringPtrOutput) } type FlexibleServerHighAvailability struct { // The high availability mode for the PostgreSQL Flexible Server. Possible value are `SameZone` or `ZoneRedundant`. Mode string `pulumi:"mode"` StandbyAvailabilityZone *string `pulumi:"standbyAvailabilityZone"` } // FlexibleServerHighAvailabilityInput is an input type that accepts FlexibleServerHighAvailabilityArgs and FlexibleServerHighAvailabilityOutput values. // You can construct a concrete instance of `FlexibleServerHighAvailabilityInput` via: // // FlexibleServerHighAvailabilityArgs{...} type FlexibleServerHighAvailabilityInput interface { pulumi.Input ToFlexibleServerHighAvailabilityOutput() FlexibleServerHighAvailabilityOutput ToFlexibleServerHighAvailabilityOutputWithContext(context.Context) FlexibleServerHighAvailabilityOutput } type FlexibleServerHighAvailabilityArgs struct { // The high availability mode for the PostgreSQL Flexible Server. Possible value are `SameZone` or `ZoneRedundant`. Mode pulumi.StringInput `pulumi:"mode"` StandbyAvailabilityZone pulumi.StringPtrInput `pulumi:"standbyAvailabilityZone"` } func (FlexibleServerHighAvailabilityArgs) ElementType() reflect.Type { return reflect.TypeOf((*FlexibleServerHighAvailability)(nil)).Elem() } func (i FlexibleServerHighAvailabilityArgs) ToFlexibleServerHighAvailabilityOutput() FlexibleServerHighAvailabilityOutput { return i.ToFlexibleServerHighAvailabilityOutputWithContext(context.Background()) } func (i FlexibleServerHighAvailabilityArgs) ToFlexibleServerHighAvailabilityOutputWithContext(ctx context.Context) FlexibleServerHighAvailabilityOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerHighAvailabilityOutput) } func (i FlexibleServerHighAvailabilityArgs) ToFlexibleServerHighAvailabilityPtrOutput() FlexibleServerHighAvailabilityPtrOutput { return i.ToFlexibleServerHighAvailabilityPtrOutputWithContext(context.Background()) } func (i FlexibleServerHighAvailabilityArgs) ToFlexibleServerHighAvailabilityPtrOutputWithContext(ctx context.Context) FlexibleServerHighAvailabilityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerHighAvailabilityOutput).ToFlexibleServerHighAvailabilityPtrOutputWithContext(ctx) } // FlexibleServerHighAvailabilityPtrInput is an input type that accepts FlexibleServerHighAvailabilityArgs, FlexibleServerHighAvailabilityPtr and FlexibleServerHighAvailabilityPtrOutput values. // You can construct a concrete instance of `FlexibleServerHighAvailabilityPtrInput` via: // // FlexibleServerHighAvailabilityArgs{...} // // or: // // nil type FlexibleServerHighAvailabilityPtrInput interface { pulumi.Input ToFlexibleServerHighAvailabilityPtrOutput() FlexibleServerHighAvailabilityPtrOutput ToFlexibleServerHighAvailabilityPtrOutputWithContext(context.Context) FlexibleServerHighAvailabilityPtrOutput } type flexibleServerHighAvailabilityPtrType FlexibleServerHighAvailabilityArgs func FlexibleServerHighAvailabilityPtr(v *FlexibleServerHighAvailabilityArgs) FlexibleServerHighAvailabilityPtrInput { return (*flexibleServerHighAvailabilityPtrType)(v) } func (*flexibleServerHighAvailabilityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerHighAvailability)(nil)).Elem() } func (i *flexibleServerHighAvailabilityPtrType) ToFlexibleServerHighAvailabilityPtrOutput() FlexibleServerHighAvailabilityPtrOutput { return i.ToFlexibleServerHighAvailabilityPtrOutputWithContext(context.Background()) } func (i *flexibleServerHighAvailabilityPtrType) ToFlexibleServerHighAvailabilityPtrOutputWithContext(ctx context.Context) FlexibleServerHighAvailabilityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerHighAvailabilityPtrOutput) } type FlexibleServerHighAvailabilityOutput struct{ *pulumi.OutputState } func (FlexibleServerHighAvailabilityOutput) ElementType() reflect.Type { return reflect.TypeOf((*FlexibleServerHighAvailability)(nil)).Elem() } func (o FlexibleServerHighAvailabilityOutput) ToFlexibleServerHighAvailabilityOutput() FlexibleServerHighAvailabilityOutput { return o } func (o FlexibleServerHighAvailabilityOutput) ToFlexibleServerHighAvailabilityOutputWithContext(ctx context.Context) FlexibleServerHighAvailabilityOutput { return o } func (o FlexibleServerHighAvailabilityOutput) ToFlexibleServerHighAvailabilityPtrOutput() FlexibleServerHighAvailabilityPtrOutput { return o.ToFlexibleServerHighAvailabilityPtrOutputWithContext(context.Background()) } func (o FlexibleServerHighAvailabilityOutput) ToFlexibleServerHighAvailabilityPtrOutputWithContext(ctx context.Context) FlexibleServerHighAvailabilityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FlexibleServerHighAvailability) *FlexibleServerHighAvailability { return &v }).(FlexibleServerHighAvailabilityPtrOutput) } // The high availability mode for the PostgreSQL Flexible Server. Possible value are `SameZone` or `ZoneRedundant`. func (o FlexibleServerHighAvailabilityOutput) Mode() pulumi.StringOutput { return o.ApplyT(func(v FlexibleServerHighAvailability) string { return v.Mode }).(pulumi.StringOutput) } func (o FlexibleServerHighAvailabilityOutput) StandbyAvailabilityZone() pulumi.StringPtrOutput { return o.ApplyT(func(v FlexibleServerHighAvailability) *string { return v.StandbyAvailabilityZone }).(pulumi.StringPtrOutput) } type FlexibleServerHighAvailabilityPtrOutput struct{ *pulumi.OutputState } func (FlexibleServerHighAvailabilityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerHighAvailability)(nil)).Elem() } func (o FlexibleServerHighAvailabilityPtrOutput) ToFlexibleServerHighAvailabilityPtrOutput() FlexibleServerHighAvailabilityPtrOutput { return o } func (o FlexibleServerHighAvailabilityPtrOutput) ToFlexibleServerHighAvailabilityPtrOutputWithContext(ctx context.Context) FlexibleServerHighAvailabilityPtrOutput { return o } func (o FlexibleServerHighAvailabilityPtrOutput) Elem() FlexibleServerHighAvailabilityOutput { return o.ApplyT(func(v *FlexibleServerHighAvailability) FlexibleServerHighAvailability { if v != nil { return *v } var ret FlexibleServerHighAvailability return ret }).(FlexibleServerHighAvailabilityOutput) } // The high availability mode for the PostgreSQL Flexible Server. Possible value are `SameZone` or `ZoneRedundant`. func (o FlexibleServerHighAvailabilityPtrOutput) Mode() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerHighAvailability) *string { if v == nil { return nil } return &v.Mode }).(pulumi.StringPtrOutput) } func (o FlexibleServerHighAvailabilityPtrOutput) StandbyAvailabilityZone() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerHighAvailability) *string { if v == nil { return nil } return v.StandbyAvailabilityZone }).(pulumi.StringPtrOutput) } type FlexibleServerIdentity struct { // A list of User Assigned Managed Identity IDs to be assigned to this PostgreSQL Flexible Server. Required if used together with `customerManagedKey` block. // // > **Note:** `identityIds` is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. IdentityIds []string `pulumi:"identityIds"` // The Principal ID associated with this Managed Service Identity. PrincipalId *string `pulumi:"principalId"` // The Tenant ID associated with this Managed Service Identity. TenantId *string `pulumi:"tenantId"` // Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Flexible Server. Possible values are `UserAssigned`, `SystemAssigned` and `SystemAssigned, UserAssigned`. // // > **Note:** Once `UserAssigned` has been added, removing it forces a new resource to be created. Type string `pulumi:"type"` } // FlexibleServerIdentityInput is an input type that accepts FlexibleServerIdentityArgs and FlexibleServerIdentityOutput values. // You can construct a concrete instance of `FlexibleServerIdentityInput` via: // // FlexibleServerIdentityArgs{...} type FlexibleServerIdentityInput interface { pulumi.Input ToFlexibleServerIdentityOutput() FlexibleServerIdentityOutput ToFlexibleServerIdentityOutputWithContext(context.Context) FlexibleServerIdentityOutput } type FlexibleServerIdentityArgs struct { // A list of User Assigned Managed Identity IDs to be assigned to this PostgreSQL Flexible Server. Required if used together with `customerManagedKey` block. // // > **Note:** `identityIds` is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"` // The Principal ID associated with this Managed Service Identity. PrincipalId pulumi.StringPtrInput `pulumi:"principalId"` // The Tenant ID associated with this Managed Service Identity. TenantId pulumi.StringPtrInput `pulumi:"tenantId"` // Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Flexible Server. Possible values are `UserAssigned`, `SystemAssigned` and `SystemAssigned, UserAssigned`. // // > **Note:** Once `UserAssigned` has been added, removing it forces a new resource to be created. Type pulumi.StringInput `pulumi:"type"` } func (FlexibleServerIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*FlexibleServerIdentity)(nil)).Elem() } func (i FlexibleServerIdentityArgs) ToFlexibleServerIdentityOutput() FlexibleServerIdentityOutput { return i.ToFlexibleServerIdentityOutputWithContext(context.Background()) } func (i FlexibleServerIdentityArgs) ToFlexibleServerIdentityOutputWithContext(ctx context.Context) FlexibleServerIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerIdentityOutput) } func (i FlexibleServerIdentityArgs) ToFlexibleServerIdentityPtrOutput() FlexibleServerIdentityPtrOutput { return i.ToFlexibleServerIdentityPtrOutputWithContext(context.Background()) } func (i FlexibleServerIdentityArgs) ToFlexibleServerIdentityPtrOutputWithContext(ctx context.Context) FlexibleServerIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerIdentityOutput).ToFlexibleServerIdentityPtrOutputWithContext(ctx) } // FlexibleServerIdentityPtrInput is an input type that accepts FlexibleServerIdentityArgs, FlexibleServerIdentityPtr and FlexibleServerIdentityPtrOutput values. // You can construct a concrete instance of `FlexibleServerIdentityPtrInput` via: // // FlexibleServerIdentityArgs{...} // // or: // // nil type FlexibleServerIdentityPtrInput interface { pulumi.Input ToFlexibleServerIdentityPtrOutput() FlexibleServerIdentityPtrOutput ToFlexibleServerIdentityPtrOutputWithContext(context.Context) FlexibleServerIdentityPtrOutput } type flexibleServerIdentityPtrType FlexibleServerIdentityArgs func FlexibleServerIdentityPtr(v *FlexibleServerIdentityArgs) FlexibleServerIdentityPtrInput { return (*flexibleServerIdentityPtrType)(v) } func (*flexibleServerIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerIdentity)(nil)).Elem()
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/getServer.go
sdk/go/azure/postgresql/getServer.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing PostgreSQL Azure Database Server. // // > **Note:** The `postgresql.Server` data source is deprecated and will be removed in v5.0 of the AzureRM Provider. Azure Database for PostgreSQL Single Server and its sub resources have been retired as of 2025-03-28, please use the `postgresql.FlexibleServer` data source instead. For more information, see https://techcommunity.microsoft.com/blog/adforpostgresql/retiring-azure-database-for-postgresql-single-server-in-2025/3783783. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := postgresql.LookupServer(ctx, &postgresql.LookupServerArgs{ // Name: "postgresql-server-1", // ResourceGroupName: "api-rg-pro", // }, nil) // if err != nil { // return err // } // ctx.Export("postgresqlServerId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.DBforPostgreSQL` - 2017-12-01 func LookupServer(ctx *pulumi.Context, args *LookupServerArgs, opts ...pulumi.InvokeOption) (*LookupServerResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupServerResult err := ctx.Invoke("azure:postgresql/getServer:getServer", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getServer. type LookupServerArgs struct { // The name of the PostgreSQL Server. Name string `pulumi:"name"` // Specifies the name of the Resource Group where the PostgreSQL Server exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getServer. type LookupServerResult struct { // The administrator username of the PostgreSQL Server. AdministratorLogin string `pulumi:"administratorLogin"` // The fully qualified domain name of the PostgreSQL Server. Fqdn string `pulumi:"fqdn"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // An `identity` block as defined below. Identities []GetServerIdentity `pulumi:"identities"` // The location of the Resource Group in which the PostgreSQL Server exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU name of the PostgreSQL Server. SkuName string `pulumi:"skuName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` // The version of the PostgreSQL Server. Version string `pulumi:"version"` } func LookupServerOutput(ctx *pulumi.Context, args LookupServerOutputArgs, opts ...pulumi.InvokeOption) LookupServerResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupServerResultOutput, error) { args := v.(LookupServerArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:postgresql/getServer:getServer", args, LookupServerResultOutput{}, options).(LookupServerResultOutput), nil }).(LookupServerResultOutput) } // A collection of arguments for invoking getServer. type LookupServerOutputArgs struct { // The name of the PostgreSQL Server. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the Resource Group where the PostgreSQL Server exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupServerOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupServerArgs)(nil)).Elem() } // A collection of values returned by getServer. type LookupServerResultOutput struct{ *pulumi.OutputState } func (LookupServerResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupServerResult)(nil)).Elem() } func (o LookupServerResultOutput) ToLookupServerResultOutput() LookupServerResultOutput { return o } func (o LookupServerResultOutput) ToLookupServerResultOutputWithContext(ctx context.Context) LookupServerResultOutput { return o } // The administrator username of the PostgreSQL Server. func (o LookupServerResultOutput) AdministratorLogin() pulumi.StringOutput { return o.ApplyT(func(v LookupServerResult) string { return v.AdministratorLogin }).(pulumi.StringOutput) } // The fully qualified domain name of the PostgreSQL Server. func (o LookupServerResultOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v LookupServerResult) string { return v.Fqdn }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupServerResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupServerResult) string { return v.Id }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o LookupServerResultOutput) Identities() GetServerIdentityArrayOutput { return o.ApplyT(func(v LookupServerResult) []GetServerIdentity { return v.Identities }).(GetServerIdentityArrayOutput) } // The location of the Resource Group in which the PostgreSQL Server exists. func (o LookupServerResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupServerResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupServerResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupServerResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupServerResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupServerResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The SKU name of the PostgreSQL Server. func (o LookupServerResultOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v LookupServerResult) string { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o LookupServerResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupServerResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The version of the PostgreSQL Server. func (o LookupServerResultOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v LookupServerResult) string { return v.Version }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupServerResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/flexibleServer.go
sdk/go/azure/postgresql/flexibleServer.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a PostgreSQL Flexible Server. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatedns" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vn"), // Location: example.Location, // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("example-sn"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // ServiceEndpoints: pulumi.StringArray{ // pulumi.String("Microsoft.Storage"), // }, // Delegations: network.SubnetDelegationArray{ // &network.SubnetDelegationArgs{ // Name: pulumi.String("fs"), // ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{ // Name: pulumi.String("Microsoft.DBforPostgreSQL/flexibleServers"), // Actions: pulumi.StringArray{ // pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"), // }, // }, // }, // }, // }) // if err != nil { // return err // } // exampleZone, err := privatedns.NewZone(ctx, "example", &privatedns.ZoneArgs{ // Name: pulumi.String("example.postgres.database.azure.com"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleZoneVirtualNetworkLink, err := privatedns.NewZoneVirtualNetworkLink(ctx, "example", &privatedns.ZoneVirtualNetworkLinkArgs{ // Name: pulumi.String("exampleVnetZone.com"), // PrivateDnsZoneName: exampleZone.Name, // VirtualNetworkId: exampleVirtualNetwork.ID(), // ResourceGroupName: example.Name, // }, pulumi.DependsOn([]pulumi.Resource{ // exampleSubnet, // })) // if err != nil { // return err // } // _, err = postgresql.NewFlexibleServer(ctx, "example", &postgresql.FlexibleServerArgs{ // Name: pulumi.String("example-psqlflexibleserver"), // ResourceGroupName: example.Name, // Location: example.Location, // Version: pulumi.String("12"), // DelegatedSubnetId: exampleSubnet.ID(), // PrivateDnsZoneId: exampleZone.ID(), // PublicNetworkAccessEnabled: pulumi.Bool(false), // AdministratorLogin: pulumi.String("psqladmin"), // AdministratorPassword: pulumi.String("H@Sh1CoR3!"), // Zone: pulumi.String("1"), // StorageMb: pulumi.Int(32768), // StorageTier: pulumi.String("P4"), // SkuName: pulumi.String("B_Standard_B1ms"), // }, pulumi.DependsOn([]pulumi.Resource{ // exampleZoneVirtualNetworkLink, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## `storageTier` defaults based on `storageMb` // // | `storageMb` | GiB | TiB | Default | Supported `storageTier`'s | Provisioned `IOPS` | // |:------------:|:-----:|:---:|:-------:|:------------------------------------:|:-------------------:| // | 32768 | 32 | - | P4 | P4, P6, P10, P15, P20, P30, P40, P50 | 120 | // | 65536 | 64 | - | P6 | P6, P10, P15, P20, P30, P40, P50 | 240 | // | 131072 | 128 | - | P10 | P10, P15, P20, P30, P40, P50 | 500 | // | 262144 | 256 | - | P15 | P15, P20, P30, P40, P50 | 1,100 | // | 524288 | 512 | - | P20 | P20, P30, P40, P50 | 2,300 | // | 1048576 | 1024 | 1 | P30 | P30, P40, P50 | 5,000 | // | 2097152 | 2048 | 2 | P40 | P40, P50 | 7,500 | // | 4193280 | 4095 | 4 | P50 | P50 | 7,500 | // | 4194304 | 4096 | 4 | P50 | P50 | 7,500 | // | 8388608 | 8192 | 8 | P60 | P60, P70 | 16,000 | // | 16777216 | 16384 | 16 | P70 | P70, P80 | 18,000 | // | 33553408 | 32767 | 32 | P80 | P80 | 20,000 | // // > **Note:** Host Caching (ReadOnly and Read/Write) is supported on disk sizes less than 4194304 MiB. This means any disk that is provisioned up to 4193280 MiB can take advantage of Host Caching. Host caching is not supported for disk sizes larger than 4193280 MiB. For example, a P50 premium disk provisioned at 4193280 GiB can take advantage of Host caching while a P50 disk provisioned at 4194304 MiB cannot. Moving from a smaller disk size to a larger disk size, greater than 4193280 MiB, will cause the disk to lose the disk caching ability. // // *** // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DBforPostgreSQL` - 2025-08-01 // // ## Import // // PostgreSQL Flexible Servers can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:postgresql/flexibleServer:FlexibleServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforPostgreSQL/flexibleServers/server1 // ``` type FlexibleServer struct { pulumi.CustomResourceState // The Administrator login for the PostgreSQL Flexible Server. Required when `createMode` is `Default` and `authentication.password_auth_enabled` is `true`. // // > **Note:** Once `administratorLogin` is specified, changing this forces a new PostgreSQL Flexible Server to be created. // // > **Note:** To create with `administratorLogin` specified or update with it first specified , `authentication.password_auth_enabled` must be set to `true`. AdministratorLogin pulumi.StringOutput `pulumi:"administratorLogin"` // The Password associated with the `administratorLogin` for the PostgreSQL Flexible Server. AdministratorPassword pulumi.StringPtrOutput `pulumi:"administratorPassword"` // An integer value used to trigger an update for `administratorPasswordWo`. This property should be incremented when updating `administratorPasswordWo`. AdministratorPasswordWoVersion pulumi.IntPtrOutput `pulumi:"administratorPasswordWoVersion"` // An `authentication` block as defined below. Authentication FlexibleServerAuthenticationOutput `pulumi:"authentication"` // Is the storage auto grow for PostgreSQL Flexible Server enabled? Defaults to `false`. AutoGrowEnabled pulumi.BoolPtrOutput `pulumi:"autoGrowEnabled"` // The backup retention days for the PostgreSQL Flexible Server. Possible values are between `7` and `35` days. BackupRetentionDays pulumi.IntOutput `pulumi:"backupRetentionDays"` // The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `GeoRestore`, `PointInTimeRestore`, `Replica`, `ReviveDropped` and `Update`. CreateMode pulumi.StringPtrOutput `pulumi:"createMode"` // A `customerManagedKey` block as defined below. Changing this forces a new resource to be created. CustomerManagedKey FlexibleServerCustomerManagedKeyPtrOutput `pulumi:"customerManagedKey"` // The ID of the virtual network subnet to create the PostgreSQL Flexible Server. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to the PostgreSQL Flexible Server, if not already delegated. Changing this forces a new PostgreSQL Flexible Server to be created. DelegatedSubnetId pulumi.StringPtrOutput `pulumi:"delegatedSubnetId"` // The FQDN of the PostgreSQL Flexible Server. Fqdn pulumi.StringOutput `pulumi:"fqdn"` // Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to `false`. Changing this forces a new PostgreSQL Flexible Server to be created. GeoRedundantBackupEnabled pulumi.BoolPtrOutput `pulumi:"geoRedundantBackupEnabled"` // A `highAvailability` block as defined below. HighAvailability FlexibleServerHighAvailabilityPtrOutput `pulumi:"highAvailability"` // An `identity` block as defined below. Identity FlexibleServerIdentityPtrOutput `pulumi:"identity"` // The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. Location pulumi.StringOutput `pulumi:"location"` // A `maintenanceWindow` block as defined below. MaintenanceWindow FlexibleServerMaintenanceWindowPtrOutput `pulumi:"maintenanceWindow"` // The name which should be used for this PostgreSQL Flexible Server. Changing this forces a new PostgreSQL Flexible Server to be created. // // > **Note:** This must be unique across the entire Azure service, not just within the resource group. Name pulumi.StringOutput `pulumi:"name"` // The point in time to restore from `sourceServerId` when `createMode` is `GeoRestore`, `PointInTimeRestore`. Changing this forces a new PostgreSQL Flexible Server to be created. PointInTimeRestoreTimeInUtc pulumi.StringPtrOutput `pulumi:"pointInTimeRestoreTimeInUtc"` // The ID of the private DNS zone to create the PostgreSQL Flexible Server. // // > **Note:** There will be a breaking change from upstream service at 15th July 2021, the `privateDnsZoneId` will be required when setting a `delegatedSubnetId`. For existing flexible servers who don't want to be recreated, you need to provide the `privateDnsZoneId` to the service team to manually migrate to the specified private DNS zone. The `privatedns.Zone` should end with suffix `.postgres.database.azure.com`. PrivateDnsZoneId pulumi.StringOutput `pulumi:"privateDnsZoneId"` // Specifies whether this PostgreSQL Flexible Server is publicly accessible. Defaults to `true`. // // > **Note:** `publicNetworkAccessEnabled` must be set to `false` when `delegatedSubnetId` and `privateDnsZoneId` have a value. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // The replication role for the PostgreSQL Flexible Server. Possible value is `None`. // // > **Note:** The `replicationRole` cannot be set while creating and only can be updated to `None` for replica server. ReplicationRole pulumi.StringPtrOutput `pulumi:"replicationRole"` // The name of the Resource Group where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the `tier` + `name` pattern (e.g. `B_Standard_B1ms`, `GP_Standard_D2s_v3`, `MO_Standard_E4s_v3`). SkuName pulumi.StringOutput `pulumi:"skuName"` // The resource ID of the source PostgreSQL Flexible Server to be restored. Required when `createMode` is `GeoRestore`, `PointInTimeRestore` or `Replica`. Changing this forces a new PostgreSQL Flexible Server to be created. SourceServerId pulumi.StringPtrOutput `pulumi:"sourceServerId"` // The max storage allowed for the PostgreSQL Flexible Server. Possible values are `32768`, `65536`, `131072`, `262144`, `524288`, `1048576`, `2097152`, `4193280`, `4194304`, `8388608`, `16777216` and `33553408`. // // > **Note:** If the `storageMb` field is undefined on the initial deployment of the PostgreSQL Flexible Server resource it will default to `32768`. If the `storageMb` field has been defined and then removed, the `storageMb` field will retain the previously defined value. // // > **Note:** The `storageMb` can only be scaled up, for example, you can scale the `storageMb` from `32768` to `65536`, but not from `65536` to `32768`. Scaling down `storageMb` forces a new PostgreSQL Flexible Server to be created. StorageMb pulumi.IntOutput `pulumi:"storageMb"` // The name of storage performance tier for IOPS of the PostgreSQL Flexible Server. Possible values are `P4`, `P6`, `P10`, `P15`,`P20`, `P30`,`P40`, `P50`,`P60`, `P70` or `P80`. Default value is dependent on the `storageMb` value. Please see the `storageTier` defaults based on `storageMb` table below. // // > **Note:** The `storageTier` can be scaled once every 12 hours, this restriction is in place to ensure stability and performance after any changes to your PostgreSQL Flexible Server's configuration. StorageTier pulumi.StringOutput `pulumi:"storageTier"` // A mapping of tags which should be assigned to the PostgreSQL Flexible Server. Tags pulumi.StringMapOutput `pulumi:"tags"` // The version of PostgreSQL Flexible Server to use. Possible values are `11`,`12`, `13`, `14`, `15`, `16`, `17`, and `18`. Required when `createMode` is `Default`. // // > **Note:** Downgrading `version` isn't supported and will force a new PostgreSQL Flexible Server to be created. // // > **Note:** In-place version updates are irreversible and may cause downtime for the PostgreSQL Flexible Server, determined by the size of the instance. Version pulumi.StringOutput `pulumi:"version"` Zone pulumi.StringPtrOutput `pulumi:"zone"` } // NewFlexibleServer registers a new resource with the given unique name, arguments, and options. func NewFlexibleServer(ctx *pulumi.Context, name string, args *FlexibleServerArgs, opts ...pulumi.ResourceOption) (*FlexibleServer, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.AdministratorPassword != nil { args.AdministratorPassword = pulumi.ToSecret(args.AdministratorPassword).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "administratorPassword", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource FlexibleServer err := ctx.RegisterResource("azure:postgresql/flexibleServer:FlexibleServer", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFlexibleServer gets an existing FlexibleServer resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetFlexibleServer(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FlexibleServerState, opts ...pulumi.ResourceOption) (*FlexibleServer, error) { var resource FlexibleServer err := ctx.ReadResource("azure:postgresql/flexibleServer:FlexibleServer", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FlexibleServer resources. type flexibleServerState struct { // The Administrator login for the PostgreSQL Flexible Server. Required when `createMode` is `Default` and `authentication.password_auth_enabled` is `true`. // // > **Note:** Once `administratorLogin` is specified, changing this forces a new PostgreSQL Flexible Server to be created. // // > **Note:** To create with `administratorLogin` specified or update with it first specified , `authentication.password_auth_enabled` must be set to `true`. AdministratorLogin *string `pulumi:"administratorLogin"` // The Password associated with the `administratorLogin` for the PostgreSQL Flexible Server. AdministratorPassword *string `pulumi:"administratorPassword"` // An integer value used to trigger an update for `administratorPasswordWo`. This property should be incremented when updating `administratorPasswordWo`. AdministratorPasswordWoVersion *int `pulumi:"administratorPasswordWoVersion"` // An `authentication` block as defined below. Authentication *FlexibleServerAuthentication `pulumi:"authentication"` // Is the storage auto grow for PostgreSQL Flexible Server enabled? Defaults to `false`. AutoGrowEnabled *bool `pulumi:"autoGrowEnabled"` // The backup retention days for the PostgreSQL Flexible Server. Possible values are between `7` and `35` days. BackupRetentionDays *int `pulumi:"backupRetentionDays"` // The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `GeoRestore`, `PointInTimeRestore`, `Replica`, `ReviveDropped` and `Update`. CreateMode *string `pulumi:"createMode"` // A `customerManagedKey` block as defined below. Changing this forces a new resource to be created. CustomerManagedKey *FlexibleServerCustomerManagedKey `pulumi:"customerManagedKey"` // The ID of the virtual network subnet to create the PostgreSQL Flexible Server. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to the PostgreSQL Flexible Server, if not already delegated. Changing this forces a new PostgreSQL Flexible Server to be created. DelegatedSubnetId *string `pulumi:"delegatedSubnetId"` // The FQDN of the PostgreSQL Flexible Server. Fqdn *string `pulumi:"fqdn"` // Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to `false`. Changing this forces a new PostgreSQL Flexible Server to be created. GeoRedundantBackupEnabled *bool `pulumi:"geoRedundantBackupEnabled"` // A `highAvailability` block as defined below. HighAvailability *FlexibleServerHighAvailability `pulumi:"highAvailability"` // An `identity` block as defined below. Identity *FlexibleServerIdentity `pulumi:"identity"` // The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. Location *string `pulumi:"location"` // A `maintenanceWindow` block as defined below. MaintenanceWindow *FlexibleServerMaintenanceWindow `pulumi:"maintenanceWindow"` // The name which should be used for this PostgreSQL Flexible Server. Changing this forces a new PostgreSQL Flexible Server to be created. // // > **Note:** This must be unique across the entire Azure service, not just within the resource group. Name *string `pulumi:"name"` // The point in time to restore from `sourceServerId` when `createMode` is `GeoRestore`, `PointInTimeRestore`. Changing this forces a new PostgreSQL Flexible Server to be created. PointInTimeRestoreTimeInUtc *string `pulumi:"pointInTimeRestoreTimeInUtc"` // The ID of the private DNS zone to create the PostgreSQL Flexible Server. // // > **Note:** There will be a breaking change from upstream service at 15th July 2021, the `privateDnsZoneId` will be required when setting a `delegatedSubnetId`. For existing flexible servers who don't want to be recreated, you need to provide the `privateDnsZoneId` to the service team to manually migrate to the specified private DNS zone. The `privatedns.Zone` should end with suffix `.postgres.database.azure.com`. PrivateDnsZoneId *string `pulumi:"privateDnsZoneId"` // Specifies whether this PostgreSQL Flexible Server is publicly accessible. Defaults to `true`. // // > **Note:** `publicNetworkAccessEnabled` must be set to `false` when `delegatedSubnetId` and `privateDnsZoneId` have a value. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The replication role for the PostgreSQL Flexible Server. Possible value is `None`. // // > **Note:** The `replicationRole` cannot be set while creating and only can be updated to `None` for replica server. ReplicationRole *string `pulumi:"replicationRole"` // The name of the Resource Group where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the `tier` + `name` pattern (e.g. `B_Standard_B1ms`, `GP_Standard_D2s_v3`, `MO_Standard_E4s_v3`). SkuName *string `pulumi:"skuName"` // The resource ID of the source PostgreSQL Flexible Server to be restored. Required when `createMode` is `GeoRestore`, `PointInTimeRestore` or `Replica`. Changing this forces a new PostgreSQL Flexible Server to be created. SourceServerId *string `pulumi:"sourceServerId"` // The max storage allowed for the PostgreSQL Flexible Server. Possible values are `32768`, `65536`, `131072`, `262144`, `524288`, `1048576`, `2097152`, `4193280`, `4194304`, `8388608`, `16777216` and `33553408`. // // > **Note:** If the `storageMb` field is undefined on the initial deployment of the PostgreSQL Flexible Server resource it will default to `32768`. If the `storageMb` field has been defined and then removed, the `storageMb` field will retain the previously defined value. // // > **Note:** The `storageMb` can only be scaled up, for example, you can scale the `storageMb` from `32768` to `65536`, but not from `65536` to `32768`. Scaling down `storageMb` forces a new PostgreSQL Flexible Server to be created. StorageMb *int `pulumi:"storageMb"` // The name of storage performance tier for IOPS of the PostgreSQL Flexible Server. Possible values are `P4`, `P6`, `P10`, `P15`,`P20`, `P30`,`P40`, `P50`,`P60`, `P70` or `P80`. Default value is dependent on the `storageMb` value. Please see the `storageTier` defaults based on `storageMb` table below. // // > **Note:** The `storageTier` can be scaled once every 12 hours, this restriction is in place to ensure stability and performance after any changes to your PostgreSQL Flexible Server's configuration. StorageTier *string `pulumi:"storageTier"` // A mapping of tags which should be assigned to the PostgreSQL Flexible Server. Tags map[string]string `pulumi:"tags"` // The version of PostgreSQL Flexible Server to use. Possible values are `11`,`12`, `13`, `14`, `15`, `16`, `17`, and `18`. Required when `createMode` is `Default`. // // > **Note:** Downgrading `version` isn't supported and will force a new PostgreSQL Flexible Server to be created. // // > **Note:** In-place version updates are irreversible and may cause downtime for the PostgreSQL Flexible Server, determined by the size of the instance. Version *string `pulumi:"version"` Zone *string `pulumi:"zone"` } type FlexibleServerState struct { // The Administrator login for the PostgreSQL Flexible Server. Required when `createMode` is `Default` and `authentication.password_auth_enabled` is `true`. // // > **Note:** Once `administratorLogin` is specified, changing this forces a new PostgreSQL Flexible Server to be created. // // > **Note:** To create with `administratorLogin` specified or update with it first specified , `authentication.password_auth_enabled` must be set to `true`. AdministratorLogin pulumi.StringPtrInput // The Password associated with the `administratorLogin` for the PostgreSQL Flexible Server. AdministratorPassword pulumi.StringPtrInput // An integer value used to trigger an update for `administratorPasswordWo`. This property should be incremented when updating `administratorPasswordWo`. AdministratorPasswordWoVersion pulumi.IntPtrInput // An `authentication` block as defined below. Authentication FlexibleServerAuthenticationPtrInput // Is the storage auto grow for PostgreSQL Flexible Server enabled? Defaults to `false`. AutoGrowEnabled pulumi.BoolPtrInput // The backup retention days for the PostgreSQL Flexible Server. Possible values are between `7` and `35` days. BackupRetentionDays pulumi.IntPtrInput // The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `GeoRestore`, `PointInTimeRestore`, `Replica`, `ReviveDropped` and `Update`. CreateMode pulumi.StringPtrInput // A `customerManagedKey` block as defined below. Changing this forces a new resource to be created. CustomerManagedKey FlexibleServerCustomerManagedKeyPtrInput // The ID of the virtual network subnet to create the PostgreSQL Flexible Server. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to the PostgreSQL Flexible Server, if not already delegated. Changing this forces a new PostgreSQL Flexible Server to be created. DelegatedSubnetId pulumi.StringPtrInput // The FQDN of the PostgreSQL Flexible Server. Fqdn pulumi.StringPtrInput // Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to `false`. Changing this forces a new PostgreSQL Flexible Server to be created. GeoRedundantBackupEnabled pulumi.BoolPtrInput // A `highAvailability` block as defined below. HighAvailability FlexibleServerHighAvailabilityPtrInput // An `identity` block as defined below. Identity FlexibleServerIdentityPtrInput // The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. Location pulumi.StringPtrInput // A `maintenanceWindow` block as defined below. MaintenanceWindow FlexibleServerMaintenanceWindowPtrInput // The name which should be used for this PostgreSQL Flexible Server. Changing this forces a new PostgreSQL Flexible Server to be created. // // > **Note:** This must be unique across the entire Azure service, not just within the resource group. Name pulumi.StringPtrInput // The point in time to restore from `sourceServerId` when `createMode` is `GeoRestore`, `PointInTimeRestore`. Changing this forces a new PostgreSQL Flexible Server to be created. PointInTimeRestoreTimeInUtc pulumi.StringPtrInput // The ID of the private DNS zone to create the PostgreSQL Flexible Server. // // > **Note:** There will be a breaking change from upstream service at 15th July 2021, the `privateDnsZoneId` will be required when setting a `delegatedSubnetId`. For existing flexible servers who don't want to be recreated, you need to provide the `privateDnsZoneId` to the service team to manually migrate to the specified private DNS zone. The `privatedns.Zone` should end with suffix `.postgres.database.azure.com`. PrivateDnsZoneId pulumi.StringPtrInput // Specifies whether this PostgreSQL Flexible Server is publicly accessible. Defaults to `true`. // // > **Note:** `publicNetworkAccessEnabled` must be set to `false` when `delegatedSubnetId` and `privateDnsZoneId` have a value. PublicNetworkAccessEnabled pulumi.BoolPtrInput // The replication role for the PostgreSQL Flexible Server. Possible value is `None`. // // > **Note:** The `replicationRole` cannot be set while creating and only can be updated to `None` for replica server. ReplicationRole pulumi.StringPtrInput // The name of the Resource Group where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. ResourceGroupName pulumi.StringPtrInput // The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the `tier` + `name` pattern (e.g. `B_Standard_B1ms`, `GP_Standard_D2s_v3`, `MO_Standard_E4s_v3`). SkuName pulumi.StringPtrInput // The resource ID of the source PostgreSQL Flexible Server to be restored. Required when `createMode` is `GeoRestore`, `PointInTimeRestore` or `Replica`. Changing this forces a new PostgreSQL Flexible Server to be created. SourceServerId pulumi.StringPtrInput // The max storage allowed for the PostgreSQL Flexible Server. Possible values are `32768`, `65536`, `131072`, `262144`, `524288`, `1048576`, `2097152`, `4193280`, `4194304`, `8388608`, `16777216` and `33553408`. // // > **Note:** If the `storageMb` field is undefined on the initial deployment of the PostgreSQL Flexible Server resource it will default to `32768`. If the `storageMb` field has been defined and then removed, the `storageMb` field will retain the previously defined value. // // > **Note:** The `storageMb` can only be scaled up, for example, you can scale the `storageMb` from `32768` to `65536`, but not from `65536` to `32768`. Scaling down `storageMb` forces a new PostgreSQL Flexible Server to be created. StorageMb pulumi.IntPtrInput // The name of storage performance tier for IOPS of the PostgreSQL Flexible Server. Possible values are `P4`, `P6`, `P10`, `P15`,`P20`, `P30`,`P40`, `P50`,`P60`, `P70` or `P80`. Default value is dependent on the `storageMb` value. Please see the `storageTier` defaults based on `storageMb` table below. // // > **Note:** The `storageTier` can be scaled once every 12 hours, this restriction is in place to ensure stability and performance after any changes to your PostgreSQL Flexible Server's configuration. StorageTier pulumi.StringPtrInput // A mapping of tags which should be assigned to the PostgreSQL Flexible Server. Tags pulumi.StringMapInput // The version of PostgreSQL Flexible Server to use. Possible values are `11`,`12`, `13`, `14`, `15`, `16`, `17`, and `18`. Required when `createMode` is `Default`. // // > **Note:** Downgrading `version` isn't supported and will force a new PostgreSQL Flexible Server to be created. // // > **Note:** In-place version updates are irreversible and may cause downtime for the PostgreSQL Flexible Server, determined by the size of the instance. Version pulumi.StringPtrInput Zone pulumi.StringPtrInput } func (FlexibleServerState) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerState)(nil)).Elem() } type flexibleServerArgs struct { // The Administrator login for the PostgreSQL Flexible Server. Required when `createMode` is `Default` and `authentication.password_auth_enabled` is `true`. // // > **Note:** Once `administratorLogin` is specified, changing this forces a new PostgreSQL Flexible Server to be created. // // > **Note:** To create with `administratorLogin` specified or update with it first specified , `authentication.password_auth_enabled` must be set to `true`. AdministratorLogin *string `pulumi:"administratorLogin"` // The Password associated with the `administratorLogin` for the PostgreSQL Flexible Server. AdministratorPassword *string `pulumi:"administratorPassword"` // An integer value used to trigger an update for `administratorPasswordWo`. This property should be incremented when updating `administratorPasswordWo`. AdministratorPasswordWoVersion *int `pulumi:"administratorPasswordWoVersion"` // An `authentication` block as defined below. Authentication *FlexibleServerAuthentication `pulumi:"authentication"` // Is the storage auto grow for PostgreSQL Flexible Server enabled? Defaults to `false`. AutoGrowEnabled *bool `pulumi:"autoGrowEnabled"` // The backup retention days for the PostgreSQL Flexible Server. Possible values are between `7` and `35` days. BackupRetentionDays *int `pulumi:"backupRetentionDays"` // The creation mode which can be used to restore or replicate existing servers. Possible values are `Default`, `GeoRestore`, `PointInTimeRestore`, `Replica`, `ReviveDropped` and `Update`. CreateMode *string `pulumi:"createMode"` // A `customerManagedKey` block as defined below. Changing this forces a new resource to be created. CustomerManagedKey *FlexibleServerCustomerManagedKey `pulumi:"customerManagedKey"` // The ID of the virtual network subnet to create the PostgreSQL Flexible Server. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to the PostgreSQL Flexible Server, if not already delegated. Changing this forces a new PostgreSQL Flexible Server to be created. DelegatedSubnetId *string `pulumi:"delegatedSubnetId"` // Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to `false`. Changing this forces a new PostgreSQL Flexible Server to be created. GeoRedundantBackupEnabled *bool `pulumi:"geoRedundantBackupEnabled"` // A `highAvailability` block as defined below.
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/getFlexibleServer.go
sdk/go/azure/postgresql/getFlexibleServer.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing PostgreSQL Flexible Server. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := postgresql.LookupFlexibleServer(ctx, &postgresql.LookupFlexibleServerArgs{ // Name: "existing-postgresql-fs", // ResourceGroupName: "existing-postgresql-resgroup", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.DBforPostgreSQL` - 2025-08-01 func LookupFlexibleServer(ctx *pulumi.Context, args *LookupFlexibleServerArgs, opts ...pulumi.InvokeOption) (*LookupFlexibleServerResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupFlexibleServerResult err := ctx.Invoke("azure:postgresql/getFlexibleServer:getFlexibleServer", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getFlexibleServer. type LookupFlexibleServerArgs struct { // The name of this PostgreSQL Flexible Server. Name string `pulumi:"name"` // The name of the Resource Group where the PostgreSQL Flexible Server exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getFlexibleServer. type LookupFlexibleServerResult struct { // The Administrator login for the PostgreSQL Flexible Server. AdministratorLogin string `pulumi:"administratorLogin"` // Is the storage auto grow for PostgreSQL Flexible Server enabled? AutoGrowEnabled bool `pulumi:"autoGrowEnabled"` // The backup retention days for the PostgreSQL Flexible Server. BackupRetentionDays int `pulumi:"backupRetentionDays"` // The ID of the virtual network subnet to create the PostgreSQL Flexible Server. DelegatedSubnetId string `pulumi:"delegatedSubnetId"` // The FQDN of the PostgreSQL Flexible Server. Fqdn string `pulumi:"fqdn"` // A `highAvailability` block for this PostgreSQL Flexible Server as defined below. HighAvailabilities []GetFlexibleServerHighAvailability `pulumi:"highAvailabilities"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region where the PostgreSQL Flexible Server exists. Location string `pulumi:"location"` Name string `pulumi:"name"` // Is public network access enabled? PublicNetworkAccessEnabled bool `pulumi:"publicNetworkAccessEnabled"` ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the `tier` + `name` pattern (e.g. `B_Standard_B1ms`, `GP_Standard_D2s_v3`, `MO_Standard_E4s_v3`). SkuName string `pulumi:"skuName"` // The max storage allowed for the PostgreSQL Flexible Server. StorageMb int `pulumi:"storageMb"` // A mapping of tags assigned to the PostgreSQL Flexible Server. Tags map[string]string `pulumi:"tags"` // The version of PostgreSQL Flexible Server to use. Version string `pulumi:"version"` // The Availability Zones where this PostgreSQL Flexible Server is located. Zone string `pulumi:"zone"` } func LookupFlexibleServerOutput(ctx *pulumi.Context, args LookupFlexibleServerOutputArgs, opts ...pulumi.InvokeOption) LookupFlexibleServerResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupFlexibleServerResultOutput, error) { args := v.(LookupFlexibleServerArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:postgresql/getFlexibleServer:getFlexibleServer", args, LookupFlexibleServerResultOutput{}, options).(LookupFlexibleServerResultOutput), nil }).(LookupFlexibleServerResultOutput) } // A collection of arguments for invoking getFlexibleServer. type LookupFlexibleServerOutputArgs struct { // The name of this PostgreSQL Flexible Server. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the PostgreSQL Flexible Server exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupFlexibleServerOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupFlexibleServerArgs)(nil)).Elem() } // A collection of values returned by getFlexibleServer. type LookupFlexibleServerResultOutput struct{ *pulumi.OutputState } func (LookupFlexibleServerResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupFlexibleServerResult)(nil)).Elem() } func (o LookupFlexibleServerResultOutput) ToLookupFlexibleServerResultOutput() LookupFlexibleServerResultOutput { return o } func (o LookupFlexibleServerResultOutput) ToLookupFlexibleServerResultOutputWithContext(ctx context.Context) LookupFlexibleServerResultOutput { return o } // The Administrator login for the PostgreSQL Flexible Server. func (o LookupFlexibleServerResultOutput) AdministratorLogin() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.AdministratorLogin }).(pulumi.StringOutput) } // Is the storage auto grow for PostgreSQL Flexible Server enabled? func (o LookupFlexibleServerResultOutput) AutoGrowEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupFlexibleServerResult) bool { return v.AutoGrowEnabled }).(pulumi.BoolOutput) } // The backup retention days for the PostgreSQL Flexible Server. func (o LookupFlexibleServerResultOutput) BackupRetentionDays() pulumi.IntOutput { return o.ApplyT(func(v LookupFlexibleServerResult) int { return v.BackupRetentionDays }).(pulumi.IntOutput) } // The ID of the virtual network subnet to create the PostgreSQL Flexible Server. func (o LookupFlexibleServerResultOutput) DelegatedSubnetId() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.DelegatedSubnetId }).(pulumi.StringOutput) } // The FQDN of the PostgreSQL Flexible Server. func (o LookupFlexibleServerResultOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.Fqdn }).(pulumi.StringOutput) } // A `highAvailability` block for this PostgreSQL Flexible Server as defined below. func (o LookupFlexibleServerResultOutput) HighAvailabilities() GetFlexibleServerHighAvailabilityArrayOutput { return o.ApplyT(func(v LookupFlexibleServerResult) []GetFlexibleServerHighAvailability { return v.HighAvailabilities }).(GetFlexibleServerHighAvailabilityArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupFlexibleServerResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region where the PostgreSQL Flexible Server exists. func (o LookupFlexibleServerResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupFlexibleServerResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.Name }).(pulumi.StringOutput) } // Is public network access enabled? func (o LookupFlexibleServerResultOutput) PublicNetworkAccessEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupFlexibleServerResult) bool { return v.PublicNetworkAccessEnabled }).(pulumi.BoolOutput) } func (o LookupFlexibleServerResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the `tier` + `name` pattern (e.g. `B_Standard_B1ms`, `GP_Standard_D2s_v3`, `MO_Standard_E4s_v3`). func (o LookupFlexibleServerResultOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.SkuName }).(pulumi.StringOutput) } // The max storage allowed for the PostgreSQL Flexible Server. func (o LookupFlexibleServerResultOutput) StorageMb() pulumi.IntOutput { return o.ApplyT(func(v LookupFlexibleServerResult) int { return v.StorageMb }).(pulumi.IntOutput) } // A mapping of tags assigned to the PostgreSQL Flexible Server. func (o LookupFlexibleServerResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupFlexibleServerResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The version of PostgreSQL Flexible Server to use. func (o LookupFlexibleServerResultOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.Version }).(pulumi.StringOutput) } // The Availability Zones where this PostgreSQL Flexible Server is located. func (o LookupFlexibleServerResultOutput) Zone() pulumi.StringOutput { return o.ApplyT(func(v LookupFlexibleServerResult) string { return v.Zone }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupFlexibleServerResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/configuration.go
sdk/go/azure/postgresql/configuration.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Sets a PostgreSQL Configuration value on a PostgreSQL Server. // // > **Note:** The `postgresql.Configuration` resource is deprecated and will be removed in v5.0 of the AzureRM Provider. Azure Database for PostgreSQL Single Server and its sub resources have been retired as of 2025-03-28, please use the `postgresql.FlexibleServerConfiguration` resource instead. For more information, see https://techcommunity.microsoft.com/blog/adforpostgresql/retiring-azure-database-for-postgresql-single-server-in-2025/3783783. // // ## Disclaimers // // > **Note:** Since this resource is provisioned by default, the Azure Provider will not check for the presence of an existing resource prior to attempting to create it. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("api-rg-pro"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleServer, err := postgresql.NewServer(ctx, "example", &postgresql.ServerArgs{ // Name: pulumi.String("postgresql-server-1"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("B_Gen5_2"), // StorageMb: pulumi.Int(5120), // BackupRetentionDays: pulumi.Int(7), // GeoRedundantBackupEnabled: pulumi.Bool(false), // AutoGrowEnabled: pulumi.Bool(true), // AdministratorLogin: pulumi.String("psqladmin"), // AdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Version: pulumi.String("9.5"), // SslEnforcementEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // _, err = postgresql.NewConfiguration(ctx, "example", &postgresql.ConfigurationArgs{ // Name: pulumi.String("backslash_quote"), // ResourceGroupName: example.Name, // ServerName: exampleServer.Name, // Value: pulumi.String("on"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DBforPostgreSQL` - 2017-12-01 // // ## Import // // PostgreSQL Configurations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:postgresql/configuration:Configuration backslash_quote /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforPostgreSQL/servers/server1/configurations/backslash_quote // ``` type Configuration struct { pulumi.CustomResourceState // Specifies the name of the PostgreSQL Configuration, which needs [to be a valid PostgreSQL configuration name](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER). Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. ServerName pulumi.StringOutput `pulumi:"serverName"` // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Changing this forces a new resource to be created. Value pulumi.StringOutput `pulumi:"value"` } // NewConfiguration registers a new resource with the given unique name, arguments, and options. func NewConfiguration(ctx *pulumi.Context, name string, args *ConfigurationArgs, opts ...pulumi.ResourceOption) (*Configuration, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Name == nil { return nil, errors.New("invalid value for required argument 'Name'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.ServerName == nil { return nil, errors.New("invalid value for required argument 'ServerName'") } if args.Value == nil { return nil, errors.New("invalid value for required argument 'Value'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Configuration err := ctx.RegisterResource("azure:postgresql/configuration:Configuration", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetConfiguration gets an existing Configuration resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetConfiguration(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ConfigurationState, opts ...pulumi.ResourceOption) (*Configuration, error) { var resource Configuration err := ctx.ReadResource("azure:postgresql/configuration:Configuration", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Configuration resources. type configurationState struct { // Specifies the name of the PostgreSQL Configuration, which needs [to be a valid PostgreSQL configuration name](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER). Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. ServerName *string `pulumi:"serverName"` // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Changing this forces a new resource to be created. Value *string `pulumi:"value"` } type ConfigurationState struct { // Specifies the name of the PostgreSQL Configuration, which needs [to be a valid PostgreSQL configuration name](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER). Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. ServerName pulumi.StringPtrInput // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Changing this forces a new resource to be created. Value pulumi.StringPtrInput } func (ConfigurationState) ElementType() reflect.Type { return reflect.TypeOf((*configurationState)(nil)).Elem() } type configurationArgs struct { // Specifies the name of the PostgreSQL Configuration, which needs [to be a valid PostgreSQL configuration name](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER). Changing this forces a new resource to be created. Name string `pulumi:"name"` // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. ServerName string `pulumi:"serverName"` // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Changing this forces a new resource to be created. Value string `pulumi:"value"` } // The set of arguments for constructing a Configuration resource. type ConfigurationArgs struct { // Specifies the name of the PostgreSQL Configuration, which needs [to be a valid PostgreSQL configuration name](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER). Changing this forces a new resource to be created. Name pulumi.StringInput // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. ServerName pulumi.StringInput // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Changing this forces a new resource to be created. Value pulumi.StringInput } func (ConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*configurationArgs)(nil)).Elem() } type ConfigurationInput interface { pulumi.Input ToConfigurationOutput() ConfigurationOutput ToConfigurationOutputWithContext(ctx context.Context) ConfigurationOutput } func (*Configuration) ElementType() reflect.Type { return reflect.TypeOf((**Configuration)(nil)).Elem() } func (i *Configuration) ToConfigurationOutput() ConfigurationOutput { return i.ToConfigurationOutputWithContext(context.Background()) } func (i *Configuration) ToConfigurationOutputWithContext(ctx context.Context) ConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationOutput) } // ConfigurationArrayInput is an input type that accepts ConfigurationArray and ConfigurationArrayOutput values. // You can construct a concrete instance of `ConfigurationArrayInput` via: // // ConfigurationArray{ ConfigurationArgs{...} } type ConfigurationArrayInput interface { pulumi.Input ToConfigurationArrayOutput() ConfigurationArrayOutput ToConfigurationArrayOutputWithContext(context.Context) ConfigurationArrayOutput } type ConfigurationArray []ConfigurationInput func (ConfigurationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Configuration)(nil)).Elem() } func (i ConfigurationArray) ToConfigurationArrayOutput() ConfigurationArrayOutput { return i.ToConfigurationArrayOutputWithContext(context.Background()) } func (i ConfigurationArray) ToConfigurationArrayOutputWithContext(ctx context.Context) ConfigurationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationArrayOutput) } // ConfigurationMapInput is an input type that accepts ConfigurationMap and ConfigurationMapOutput values. // You can construct a concrete instance of `ConfigurationMapInput` via: // // ConfigurationMap{ "key": ConfigurationArgs{...} } type ConfigurationMapInput interface { pulumi.Input ToConfigurationMapOutput() ConfigurationMapOutput ToConfigurationMapOutputWithContext(context.Context) ConfigurationMapOutput } type ConfigurationMap map[string]ConfigurationInput func (ConfigurationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Configuration)(nil)).Elem() } func (i ConfigurationMap) ToConfigurationMapOutput() ConfigurationMapOutput { return i.ToConfigurationMapOutputWithContext(context.Background()) } func (i ConfigurationMap) ToConfigurationMapOutputWithContext(ctx context.Context) ConfigurationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ConfigurationMapOutput) } type ConfigurationOutput struct{ *pulumi.OutputState } func (ConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((**Configuration)(nil)).Elem() } func (o ConfigurationOutput) ToConfigurationOutput() ConfigurationOutput { return o } func (o ConfigurationOutput) ToConfigurationOutputWithContext(ctx context.Context) ConfigurationOutput { return o } // Specifies the name of the PostgreSQL Configuration, which needs [to be a valid PostgreSQL configuration name](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER). Changing this forces a new resource to be created. func (o ConfigurationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. func (o ConfigurationOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. func (o ConfigurationOutput) ServerName() pulumi.StringOutput { return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.ServerName }).(pulumi.StringOutput) } // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Changing this forces a new resource to be created. func (o ConfigurationOutput) Value() pulumi.StringOutput { return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.Value }).(pulumi.StringOutput) } type ConfigurationArrayOutput struct{ *pulumi.OutputState } func (ConfigurationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Configuration)(nil)).Elem() } func (o ConfigurationArrayOutput) ToConfigurationArrayOutput() ConfigurationArrayOutput { return o } func (o ConfigurationArrayOutput) ToConfigurationArrayOutputWithContext(ctx context.Context) ConfigurationArrayOutput { return o } func (o ConfigurationArrayOutput) Index(i pulumi.IntInput) ConfigurationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Configuration { return vs[0].([]*Configuration)[vs[1].(int)] }).(ConfigurationOutput) } type ConfigurationMapOutput struct{ *pulumi.OutputState } func (ConfigurationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Configuration)(nil)).Elem() } func (o ConfigurationMapOutput) ToConfigurationMapOutput() ConfigurationMapOutput { return o } func (o ConfigurationMapOutput) ToConfigurationMapOutputWithContext(ctx context.Context) ConfigurationMapOutput { return o } func (o ConfigurationMapOutput) MapIndex(k pulumi.StringInput) ConfigurationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Configuration { return vs[0].(map[string]*Configuration)[vs[1].(string)] }).(ConfigurationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationInput)(nil)).Elem(), &Configuration{}) pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationArrayInput)(nil)).Elem(), ConfigurationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationMapInput)(nil)).Elem(), ConfigurationMap{}) pulumi.RegisterOutputType(ConfigurationOutput{}) pulumi.RegisterOutputType(ConfigurationArrayOutput{}) pulumi.RegisterOutputType(ConfigurationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/flexibleServerBackup.go
sdk/go/azure/postgresql/flexibleServerBackup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a PostgreSQL Flexible Server Backup. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleFlexibleServer, err := postgresql.NewFlexibleServer(ctx, "example", &postgresql.FlexibleServerArgs{ // Name: pulumi.String("example-fs"), // ResourceGroupName: example.Name, // Location: example.Location, // AdministratorLogin: pulumi.String("adminTerraform"), // AdministratorPassword: pulumi.String("QAZwsx123"), // Version: pulumi.String("12"), // SkuName: pulumi.String("GP_Standard_D2s_v3"), // Zone: pulumi.String("2"), // }) // if err != nil { // return err // } // _, err = postgresql.NewFlexibleServerBackup(ctx, "example", &postgresql.FlexibleServerBackupArgs{ // Name: pulumi.String("example-pfsb"), // ServerId: exampleFlexibleServer.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DBforPostgreSQL` - 2025-08-01 // // ## Import // // An existing PostgreSQL Flexible Server Backup can be imported into Pulumi using the `resource id`, e.g. // // ```sh // $ pulumi import azure:postgresql/flexibleServerBackup:FlexibleServerBackup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DBforPostgreSQL/flexibleServers/fs1/backups/backup1 // ``` type FlexibleServerBackup struct { pulumi.CustomResourceState // The Time (ISO8601 format) at which the backup was completed. CompletedTime pulumi.StringOutput `pulumi:"completedTime"` // Specifies the name of this PostgreSQL Flexible Server Backup. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Backup. Changing this forces a new resource to be created. ServerId pulumi.StringOutput `pulumi:"serverId"` } // NewFlexibleServerBackup registers a new resource with the given unique name, arguments, and options. func NewFlexibleServerBackup(ctx *pulumi.Context, name string, args *FlexibleServerBackupArgs, opts ...pulumi.ResourceOption) (*FlexibleServerBackup, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ServerId == nil { return nil, errors.New("invalid value for required argument 'ServerId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FlexibleServerBackup err := ctx.RegisterResource("azure:postgresql/flexibleServerBackup:FlexibleServerBackup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFlexibleServerBackup gets an existing FlexibleServerBackup resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetFlexibleServerBackup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FlexibleServerBackupState, opts ...pulumi.ResourceOption) (*FlexibleServerBackup, error) { var resource FlexibleServerBackup err := ctx.ReadResource("azure:postgresql/flexibleServerBackup:FlexibleServerBackup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FlexibleServerBackup resources. type flexibleServerBackupState struct { // The Time (ISO8601 format) at which the backup was completed. CompletedTime *string `pulumi:"completedTime"` // Specifies the name of this PostgreSQL Flexible Server Backup. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Backup. Changing this forces a new resource to be created. ServerId *string `pulumi:"serverId"` } type FlexibleServerBackupState struct { // The Time (ISO8601 format) at which the backup was completed. CompletedTime pulumi.StringPtrInput // Specifies the name of this PostgreSQL Flexible Server Backup. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Backup. Changing this forces a new resource to be created. ServerId pulumi.StringPtrInput } func (FlexibleServerBackupState) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerBackupState)(nil)).Elem() } type flexibleServerBackupArgs struct { // Specifies the name of this PostgreSQL Flexible Server Backup. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Backup. Changing this forces a new resource to be created. ServerId string `pulumi:"serverId"` } // The set of arguments for constructing a FlexibleServerBackup resource. type FlexibleServerBackupArgs struct { // Specifies the name of this PostgreSQL Flexible Server Backup. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Backup. Changing this forces a new resource to be created. ServerId pulumi.StringInput } func (FlexibleServerBackupArgs) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerBackupArgs)(nil)).Elem() } type FlexibleServerBackupInput interface { pulumi.Input ToFlexibleServerBackupOutput() FlexibleServerBackupOutput ToFlexibleServerBackupOutputWithContext(ctx context.Context) FlexibleServerBackupOutput } func (*FlexibleServerBackup) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerBackup)(nil)).Elem() } func (i *FlexibleServerBackup) ToFlexibleServerBackupOutput() FlexibleServerBackupOutput { return i.ToFlexibleServerBackupOutputWithContext(context.Background()) } func (i *FlexibleServerBackup) ToFlexibleServerBackupOutputWithContext(ctx context.Context) FlexibleServerBackupOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerBackupOutput) } // FlexibleServerBackupArrayInput is an input type that accepts FlexibleServerBackupArray and FlexibleServerBackupArrayOutput values. // You can construct a concrete instance of `FlexibleServerBackupArrayInput` via: // // FlexibleServerBackupArray{ FlexibleServerBackupArgs{...} } type FlexibleServerBackupArrayInput interface { pulumi.Input ToFlexibleServerBackupArrayOutput() FlexibleServerBackupArrayOutput ToFlexibleServerBackupArrayOutputWithContext(context.Context) FlexibleServerBackupArrayOutput } type FlexibleServerBackupArray []FlexibleServerBackupInput func (FlexibleServerBackupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerBackup)(nil)).Elem() } func (i FlexibleServerBackupArray) ToFlexibleServerBackupArrayOutput() FlexibleServerBackupArrayOutput { return i.ToFlexibleServerBackupArrayOutputWithContext(context.Background()) } func (i FlexibleServerBackupArray) ToFlexibleServerBackupArrayOutputWithContext(ctx context.Context) FlexibleServerBackupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerBackupArrayOutput) } // FlexibleServerBackupMapInput is an input type that accepts FlexibleServerBackupMap and FlexibleServerBackupMapOutput values. // You can construct a concrete instance of `FlexibleServerBackupMapInput` via: // // FlexibleServerBackupMap{ "key": FlexibleServerBackupArgs{...} } type FlexibleServerBackupMapInput interface { pulumi.Input ToFlexibleServerBackupMapOutput() FlexibleServerBackupMapOutput ToFlexibleServerBackupMapOutputWithContext(context.Context) FlexibleServerBackupMapOutput } type FlexibleServerBackupMap map[string]FlexibleServerBackupInput func (FlexibleServerBackupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerBackup)(nil)).Elem() } func (i FlexibleServerBackupMap) ToFlexibleServerBackupMapOutput() FlexibleServerBackupMapOutput { return i.ToFlexibleServerBackupMapOutputWithContext(context.Background()) } func (i FlexibleServerBackupMap) ToFlexibleServerBackupMapOutputWithContext(ctx context.Context) FlexibleServerBackupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerBackupMapOutput) } type FlexibleServerBackupOutput struct{ *pulumi.OutputState } func (FlexibleServerBackupOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerBackup)(nil)).Elem() } func (o FlexibleServerBackupOutput) ToFlexibleServerBackupOutput() FlexibleServerBackupOutput { return o } func (o FlexibleServerBackupOutput) ToFlexibleServerBackupOutputWithContext(ctx context.Context) FlexibleServerBackupOutput { return o } // The Time (ISO8601 format) at which the backup was completed. func (o FlexibleServerBackupOutput) CompletedTime() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerBackup) pulumi.StringOutput { return v.CompletedTime }).(pulumi.StringOutput) } // Specifies the name of this PostgreSQL Flexible Server Backup. Changing this forces a new resource to be created. func (o FlexibleServerBackupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerBackup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Backup. Changing this forces a new resource to be created. func (o FlexibleServerBackupOutput) ServerId() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerBackup) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput) } type FlexibleServerBackupArrayOutput struct{ *pulumi.OutputState } func (FlexibleServerBackupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerBackup)(nil)).Elem() } func (o FlexibleServerBackupArrayOutput) ToFlexibleServerBackupArrayOutput() FlexibleServerBackupArrayOutput { return o } func (o FlexibleServerBackupArrayOutput) ToFlexibleServerBackupArrayOutputWithContext(ctx context.Context) FlexibleServerBackupArrayOutput { return o } func (o FlexibleServerBackupArrayOutput) Index(i pulumi.IntInput) FlexibleServerBackupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FlexibleServerBackup { return vs[0].([]*FlexibleServerBackup)[vs[1].(int)] }).(FlexibleServerBackupOutput) } type FlexibleServerBackupMapOutput struct{ *pulumi.OutputState } func (FlexibleServerBackupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerBackup)(nil)).Elem() } func (o FlexibleServerBackupMapOutput) ToFlexibleServerBackupMapOutput() FlexibleServerBackupMapOutput { return o } func (o FlexibleServerBackupMapOutput) ToFlexibleServerBackupMapOutputWithContext(ctx context.Context) FlexibleServerBackupMapOutput { return o } func (o FlexibleServerBackupMapOutput) MapIndex(k pulumi.StringInput) FlexibleServerBackupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FlexibleServerBackup { return vs[0].(map[string]*FlexibleServerBackup)[vs[1].(string)] }).(FlexibleServerBackupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerBackupInput)(nil)).Elem(), &FlexibleServerBackup{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerBackupArrayInput)(nil)).Elem(), FlexibleServerBackupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerBackupMapInput)(nil)).Elem(), FlexibleServerBackupMap{}) pulumi.RegisterOutputType(FlexibleServerBackupOutput{}) pulumi.RegisterOutputType(FlexibleServerBackupArrayOutput{}) pulumi.RegisterOutputType(FlexibleServerBackupMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/database.go
sdk/go/azure/postgresql/database.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("api-rg-pro"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleServer, err := postgresql.NewServer(ctx, "example", &postgresql.ServerArgs{ // Name: pulumi.String("postgresql-server-1"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("B_Gen5_2"), // StorageMb: pulumi.Int(5120), // BackupRetentionDays: pulumi.Int(7), // GeoRedundantBackupEnabled: pulumi.Bool(false), // AutoGrowEnabled: pulumi.Bool(true), // AdministratorLogin: pulumi.String("psqladmin"), // AdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Version: pulumi.String("9.5"), // SslEnforcementEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // _, err = postgresql.NewDatabase(ctx, "example", &postgresql.DatabaseArgs{ // Name: pulumi.String("exampledb"), // ResourceGroupName: example.Name, // ServerName: exampleServer.Name, // Charset: pulumi.String("UTF8"), // Collation: pulumi.String("English_United States.1252"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DBforPostgreSQL` - 2017-12-01 // // ## Import // // PostgreSQL Database's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:postgresql/database:Database database1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforPostgreSQL/servers/server1/databases/database1 // ``` type Database struct { pulumi.CustomResourceState // Specifies the Charset for the PostgreSQL Database, which needs [to be a valid PostgreSQL Charset](https://www.postgresql.org/docs/current/static/multibyte.html). Changing this forces a new resource to be created. Charset pulumi.StringOutput `pulumi:"charset"` // Specifies the Collation for the PostgreSQL Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Note that Microsoft uses different [notation](https://msdn.microsoft.com/library/windows/desktop/dd373814.aspx) - en-US instead of en_US. Changing this forces a new resource to be created. Collation pulumi.StringOutput `pulumi:"collation"` // Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. ServerName pulumi.StringOutput `pulumi:"serverName"` } // NewDatabase registers a new resource with the given unique name, arguments, and options. func NewDatabase(ctx *pulumi.Context, name string, args *DatabaseArgs, opts ...pulumi.ResourceOption) (*Database, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Charset == nil { return nil, errors.New("invalid value for required argument 'Charset'") } if args.Collation == nil { return nil, errors.New("invalid value for required argument 'Collation'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.ServerName == nil { return nil, errors.New("invalid value for required argument 'ServerName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Database err := ctx.RegisterResource("azure:postgresql/database:Database", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDatabase gets an existing Database resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDatabase(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DatabaseState, opts ...pulumi.ResourceOption) (*Database, error) { var resource Database err := ctx.ReadResource("azure:postgresql/database:Database", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Database resources. type databaseState struct { // Specifies the Charset for the PostgreSQL Database, which needs [to be a valid PostgreSQL Charset](https://www.postgresql.org/docs/current/static/multibyte.html). Changing this forces a new resource to be created. Charset *string `pulumi:"charset"` // Specifies the Collation for the PostgreSQL Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Note that Microsoft uses different [notation](https://msdn.microsoft.com/library/windows/desktop/dd373814.aspx) - en-US instead of en_US. Changing this forces a new resource to be created. Collation *string `pulumi:"collation"` // Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. ServerName *string `pulumi:"serverName"` } type DatabaseState struct { // Specifies the Charset for the PostgreSQL Database, which needs [to be a valid PostgreSQL Charset](https://www.postgresql.org/docs/current/static/multibyte.html). Changing this forces a new resource to be created. Charset pulumi.StringPtrInput // Specifies the Collation for the PostgreSQL Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Note that Microsoft uses different [notation](https://msdn.microsoft.com/library/windows/desktop/dd373814.aspx) - en-US instead of en_US. Changing this forces a new resource to be created. Collation pulumi.StringPtrInput // Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. ServerName pulumi.StringPtrInput } func (DatabaseState) ElementType() reflect.Type { return reflect.TypeOf((*databaseState)(nil)).Elem() } type databaseArgs struct { // Specifies the Charset for the PostgreSQL Database, which needs [to be a valid PostgreSQL Charset](https://www.postgresql.org/docs/current/static/multibyte.html). Changing this forces a new resource to be created. Charset string `pulumi:"charset"` // Specifies the Collation for the PostgreSQL Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Note that Microsoft uses different [notation](https://msdn.microsoft.com/library/windows/desktop/dd373814.aspx) - en-US instead of en_US. Changing this forces a new resource to be created. Collation string `pulumi:"collation"` // Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. ServerName string `pulumi:"serverName"` } // The set of arguments for constructing a Database resource. type DatabaseArgs struct { // Specifies the Charset for the PostgreSQL Database, which needs [to be a valid PostgreSQL Charset](https://www.postgresql.org/docs/current/static/multibyte.html). Changing this forces a new resource to be created. Charset pulumi.StringInput // Specifies the Collation for the PostgreSQL Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Note that Microsoft uses different [notation](https://msdn.microsoft.com/library/windows/desktop/dd373814.aspx) - en-US instead of en_US. Changing this forces a new resource to be created. Collation pulumi.StringInput // Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. ServerName pulumi.StringInput } func (DatabaseArgs) ElementType() reflect.Type { return reflect.TypeOf((*databaseArgs)(nil)).Elem() } type DatabaseInput interface { pulumi.Input ToDatabaseOutput() DatabaseOutput ToDatabaseOutputWithContext(ctx context.Context) DatabaseOutput } func (*Database) ElementType() reflect.Type { return reflect.TypeOf((**Database)(nil)).Elem() } func (i *Database) ToDatabaseOutput() DatabaseOutput { return i.ToDatabaseOutputWithContext(context.Background()) } func (i *Database) ToDatabaseOutputWithContext(ctx context.Context) DatabaseOutput { return pulumi.ToOutputWithContext(ctx, i).(DatabaseOutput) } // DatabaseArrayInput is an input type that accepts DatabaseArray and DatabaseArrayOutput values. // You can construct a concrete instance of `DatabaseArrayInput` via: // // DatabaseArray{ DatabaseArgs{...} } type DatabaseArrayInput interface { pulumi.Input ToDatabaseArrayOutput() DatabaseArrayOutput ToDatabaseArrayOutputWithContext(context.Context) DatabaseArrayOutput } type DatabaseArray []DatabaseInput func (DatabaseArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Database)(nil)).Elem() } func (i DatabaseArray) ToDatabaseArrayOutput() DatabaseArrayOutput { return i.ToDatabaseArrayOutputWithContext(context.Background()) } func (i DatabaseArray) ToDatabaseArrayOutputWithContext(ctx context.Context) DatabaseArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DatabaseArrayOutput) } // DatabaseMapInput is an input type that accepts DatabaseMap and DatabaseMapOutput values. // You can construct a concrete instance of `DatabaseMapInput` via: // // DatabaseMap{ "key": DatabaseArgs{...} } type DatabaseMapInput interface { pulumi.Input ToDatabaseMapOutput() DatabaseMapOutput ToDatabaseMapOutputWithContext(context.Context) DatabaseMapOutput } type DatabaseMap map[string]DatabaseInput func (DatabaseMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Database)(nil)).Elem() } func (i DatabaseMap) ToDatabaseMapOutput() DatabaseMapOutput { return i.ToDatabaseMapOutputWithContext(context.Background()) } func (i DatabaseMap) ToDatabaseMapOutputWithContext(ctx context.Context) DatabaseMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DatabaseMapOutput) } type DatabaseOutput struct{ *pulumi.OutputState } func (DatabaseOutput) ElementType() reflect.Type { return reflect.TypeOf((**Database)(nil)).Elem() } func (o DatabaseOutput) ToDatabaseOutput() DatabaseOutput { return o } func (o DatabaseOutput) ToDatabaseOutputWithContext(ctx context.Context) DatabaseOutput { return o } // Specifies the Charset for the PostgreSQL Database, which needs [to be a valid PostgreSQL Charset](https://www.postgresql.org/docs/current/static/multibyte.html). Changing this forces a new resource to be created. func (o DatabaseOutput) Charset() pulumi.StringOutput { return o.ApplyT(func(v *Database) pulumi.StringOutput { return v.Charset }).(pulumi.StringOutput) } // Specifies the Collation for the PostgreSQL Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Note that Microsoft uses different [notation](https://msdn.microsoft.com/library/windows/desktop/dd373814.aspx) - en-US instead of en_US. Changing this forces a new resource to be created. func (o DatabaseOutput) Collation() pulumi.StringOutput { return o.ApplyT(func(v *Database) pulumi.StringOutput { return v.Collation }).(pulumi.StringOutput) } // Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a new resource to be created. func (o DatabaseOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Database) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. func (o DatabaseOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Database) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. func (o DatabaseOutput) ServerName() pulumi.StringOutput { return o.ApplyT(func(v *Database) pulumi.StringOutput { return v.ServerName }).(pulumi.StringOutput) } type DatabaseArrayOutput struct{ *pulumi.OutputState } func (DatabaseArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Database)(nil)).Elem() } func (o DatabaseArrayOutput) ToDatabaseArrayOutput() DatabaseArrayOutput { return o } func (o DatabaseArrayOutput) ToDatabaseArrayOutputWithContext(ctx context.Context) DatabaseArrayOutput { return o } func (o DatabaseArrayOutput) Index(i pulumi.IntInput) DatabaseOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Database { return vs[0].([]*Database)[vs[1].(int)] }).(DatabaseOutput) } type DatabaseMapOutput struct{ *pulumi.OutputState } func (DatabaseMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Database)(nil)).Elem() } func (o DatabaseMapOutput) ToDatabaseMapOutput() DatabaseMapOutput { return o } func (o DatabaseMapOutput) ToDatabaseMapOutputWithContext(ctx context.Context) DatabaseMapOutput { return o } func (o DatabaseMapOutput) MapIndex(k pulumi.StringInput) DatabaseOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Database { return vs[0].(map[string]*Database)[vs[1].(string)] }).(DatabaseOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DatabaseInput)(nil)).Elem(), &Database{}) pulumi.RegisterInputType(reflect.TypeOf((*DatabaseArrayInput)(nil)).Elem(), DatabaseArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DatabaseMapInput)(nil)).Elem(), DatabaseMap{}) pulumi.RegisterOutputType(DatabaseOutput{}) pulumi.RegisterOutputType(DatabaseArrayOutput{}) pulumi.RegisterOutputType(DatabaseMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/virtualNetworkRule.go
sdk/go/azure/postgresql/virtualNetworkRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a PostgreSQL Virtual Network Rule. // // > **Note:** The `postgresql.VirtualNetworkRule` resource is deprecated and will be removed in v5.0 of the AzureRM Provider. Azure Database for PostgreSQL Single Server and its sub resources have been retired as of 2025-03-28. For more information, see https://techcommunity.microsoft.com/blog/adforpostgresql/retiring-azure-database-for-postgresql-single-server-in-2025/3783783. // // > **Note:** PostgreSQL Virtual Network Rules [can only be used with SKU Tiers of `GeneralPurpose` or `MemoryOptimized`](https://docs.microsoft.com/azure/postgresql/concepts-data-access-and-security-vnet) // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.7.29.0/29"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // internal, err := network.NewSubnet(ctx, "internal", &network.SubnetArgs{ // Name: pulumi.String("internal"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.7.29.0/29"), // }, // ServiceEndpoints: pulumi.StringArray{ // pulumi.String("Microsoft.Sql"), // }, // }) // if err != nil { // return err // } // exampleServer, err := postgresql.NewServer(ctx, "example", &postgresql.ServerArgs{ // Name: pulumi.String("postgresql-server-1"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("GP_Gen5_2"), // StorageMb: pulumi.Int(5120), // BackupRetentionDays: pulumi.Int(7), // AdministratorLogin: pulumi.String("psqladmin"), // AdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // Version: pulumi.String("9.5"), // SslEnforcementEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // _, err = postgresql.NewVirtualNetworkRule(ctx, "example", &postgresql.VirtualNetworkRuleArgs{ // Name: pulumi.String("postgresql-vnet-rule"), // ResourceGroupName: example.Name, // ServerName: exampleServer.Name, // SubnetId: internal.ID(), // IgnoreMissingVnetServiceEndpoint: pulumi.Bool(true), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DBforPostgreSQL` - 2017-12-01 // // ## Import // // PostgreSQL Virtual Network Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:postgresql/virtualNetworkRule:VirtualNetworkRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.DBforPostgreSQL/servers/myserver/virtualNetworkRules/vnetrulename // ``` type VirtualNetworkRule struct { pulumi.CustomResourceState // Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? IgnoreMissingVnetServiceEndpoint pulumi.BoolPtrOutput `pulumi:"ignoreMissingVnetServiceEndpoint"` // The name of the PostgreSQL virtual network rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created. // // > **Note:** `name` must be between 1-128 characters long and must satisfy all of the requirements below: // // 1. Contains only alphanumeric and hyphen characters // 2. Cannot start with a number or hyphen // 3. Cannot end with a hyphen Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created. ServerName pulumi.StringOutput `pulumi:"serverName"` // The ID of the subnet that the PostgreSQL server will be connected to. SubnetId pulumi.StringOutput `pulumi:"subnetId"` } // NewVirtualNetworkRule registers a new resource with the given unique name, arguments, and options. func NewVirtualNetworkRule(ctx *pulumi.Context, name string, args *VirtualNetworkRuleArgs, opts ...pulumi.ResourceOption) (*VirtualNetworkRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.ServerName == nil { return nil, errors.New("invalid value for required argument 'ServerName'") } if args.SubnetId == nil { return nil, errors.New("invalid value for required argument 'SubnetId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualNetworkRule err := ctx.RegisterResource("azure:postgresql/virtualNetworkRule:VirtualNetworkRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualNetworkRule gets an existing VirtualNetworkRule resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetVirtualNetworkRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualNetworkRuleState, opts ...pulumi.ResourceOption) (*VirtualNetworkRule, error) { var resource VirtualNetworkRule err := ctx.ReadResource("azure:postgresql/virtualNetworkRule:VirtualNetworkRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualNetworkRule resources. type virtualNetworkRuleState struct { // Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? IgnoreMissingVnetServiceEndpoint *bool `pulumi:"ignoreMissingVnetServiceEndpoint"` // The name of the PostgreSQL virtual network rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created. // // > **Note:** `name` must be between 1-128 characters long and must satisfy all of the requirements below: // // 1. Contains only alphanumeric and hyphen characters // 2. Cannot start with a number or hyphen // 3. Cannot end with a hyphen Name *string `pulumi:"name"` // The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created. ServerName *string `pulumi:"serverName"` // The ID of the subnet that the PostgreSQL server will be connected to. SubnetId *string `pulumi:"subnetId"` } type VirtualNetworkRuleState struct { // Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? IgnoreMissingVnetServiceEndpoint pulumi.BoolPtrInput // The name of the PostgreSQL virtual network rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created. // // > **Note:** `name` must be between 1-128 characters long and must satisfy all of the requirements below: // // 1. Contains only alphanumeric and hyphen characters // 2. Cannot start with a number or hyphen // 3. Cannot end with a hyphen Name pulumi.StringPtrInput // The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created. ServerName pulumi.StringPtrInput // The ID of the subnet that the PostgreSQL server will be connected to. SubnetId pulumi.StringPtrInput } func (VirtualNetworkRuleState) ElementType() reflect.Type { return reflect.TypeOf((*virtualNetworkRuleState)(nil)).Elem() } type virtualNetworkRuleArgs struct { // Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? IgnoreMissingVnetServiceEndpoint *bool `pulumi:"ignoreMissingVnetServiceEndpoint"` // The name of the PostgreSQL virtual network rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created. // // > **Note:** `name` must be between 1-128 characters long and must satisfy all of the requirements below: // // 1. Contains only alphanumeric and hyphen characters // 2. Cannot start with a number or hyphen // 3. Cannot end with a hyphen Name *string `pulumi:"name"` // The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created. ServerName string `pulumi:"serverName"` // The ID of the subnet that the PostgreSQL server will be connected to. SubnetId string `pulumi:"subnetId"` } // The set of arguments for constructing a VirtualNetworkRule resource. type VirtualNetworkRuleArgs struct { // Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? IgnoreMissingVnetServiceEndpoint pulumi.BoolPtrInput // The name of the PostgreSQL virtual network rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created. // // > **Note:** `name` must be between 1-128 characters long and must satisfy all of the requirements below: // // 1. Contains only alphanumeric and hyphen characters // 2. Cannot start with a number or hyphen // 3. Cannot end with a hyphen Name pulumi.StringPtrInput // The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created. ServerName pulumi.StringInput // The ID of the subnet that the PostgreSQL server will be connected to. SubnetId pulumi.StringInput } func (VirtualNetworkRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualNetworkRuleArgs)(nil)).Elem() } type VirtualNetworkRuleInput interface { pulumi.Input ToVirtualNetworkRuleOutput() VirtualNetworkRuleOutput ToVirtualNetworkRuleOutputWithContext(ctx context.Context) VirtualNetworkRuleOutput } func (*VirtualNetworkRule) ElementType() reflect.Type { return reflect.TypeOf((**VirtualNetworkRule)(nil)).Elem() } func (i *VirtualNetworkRule) ToVirtualNetworkRuleOutput() VirtualNetworkRuleOutput { return i.ToVirtualNetworkRuleOutputWithContext(context.Background()) } func (i *VirtualNetworkRule) ToVirtualNetworkRuleOutputWithContext(ctx context.Context) VirtualNetworkRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkRuleOutput) } // VirtualNetworkRuleArrayInput is an input type that accepts VirtualNetworkRuleArray and VirtualNetworkRuleArrayOutput values. // You can construct a concrete instance of `VirtualNetworkRuleArrayInput` via: // // VirtualNetworkRuleArray{ VirtualNetworkRuleArgs{...} } type VirtualNetworkRuleArrayInput interface { pulumi.Input ToVirtualNetworkRuleArrayOutput() VirtualNetworkRuleArrayOutput ToVirtualNetworkRuleArrayOutputWithContext(context.Context) VirtualNetworkRuleArrayOutput } type VirtualNetworkRuleArray []VirtualNetworkRuleInput func (VirtualNetworkRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualNetworkRule)(nil)).Elem() } func (i VirtualNetworkRuleArray) ToVirtualNetworkRuleArrayOutput() VirtualNetworkRuleArrayOutput { return i.ToVirtualNetworkRuleArrayOutputWithContext(context.Background()) } func (i VirtualNetworkRuleArray) ToVirtualNetworkRuleArrayOutputWithContext(ctx context.Context) VirtualNetworkRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkRuleArrayOutput) } // VirtualNetworkRuleMapInput is an input type that accepts VirtualNetworkRuleMap and VirtualNetworkRuleMapOutput values. // You can construct a concrete instance of `VirtualNetworkRuleMapInput` via: // // VirtualNetworkRuleMap{ "key": VirtualNetworkRuleArgs{...} } type VirtualNetworkRuleMapInput interface { pulumi.Input ToVirtualNetworkRuleMapOutput() VirtualNetworkRuleMapOutput ToVirtualNetworkRuleMapOutputWithContext(context.Context) VirtualNetworkRuleMapOutput } type VirtualNetworkRuleMap map[string]VirtualNetworkRuleInput func (VirtualNetworkRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualNetworkRule)(nil)).Elem() } func (i VirtualNetworkRuleMap) ToVirtualNetworkRuleMapOutput() VirtualNetworkRuleMapOutput { return i.ToVirtualNetworkRuleMapOutputWithContext(context.Background()) } func (i VirtualNetworkRuleMap) ToVirtualNetworkRuleMapOutputWithContext(ctx context.Context) VirtualNetworkRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkRuleMapOutput) } type VirtualNetworkRuleOutput struct{ *pulumi.OutputState } func (VirtualNetworkRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualNetworkRule)(nil)).Elem() } func (o VirtualNetworkRuleOutput) ToVirtualNetworkRuleOutput() VirtualNetworkRuleOutput { return o } func (o VirtualNetworkRuleOutput) ToVirtualNetworkRuleOutputWithContext(ctx context.Context) VirtualNetworkRuleOutput { return o } // Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? func (o VirtualNetworkRuleOutput) IgnoreMissingVnetServiceEndpoint() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualNetworkRule) pulumi.BoolPtrOutput { return v.IgnoreMissingVnetServiceEndpoint }).(pulumi.BoolPtrOutput) } // The name of the PostgreSQL virtual network rule. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen. Changing this forces a new resource to be created. // // > **Note:** `name` must be between 1-128 characters long and must satisfy all of the requirements below: // // 1. Contains only alphanumeric and hyphen characters // 2. Cannot start with a number or hyphen // 3. Cannot end with a hyphen func (o VirtualNetworkRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created. func (o VirtualNetworkRuleOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkRule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created. func (o VirtualNetworkRuleOutput) ServerName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkRule) pulumi.StringOutput { return v.ServerName }).(pulumi.StringOutput) } // The ID of the subnet that the PostgreSQL server will be connected to. func (o VirtualNetworkRuleOutput) SubnetId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkRule) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput) } type VirtualNetworkRuleArrayOutput struct{ *pulumi.OutputState } func (VirtualNetworkRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualNetworkRule)(nil)).Elem() } func (o VirtualNetworkRuleArrayOutput) ToVirtualNetworkRuleArrayOutput() VirtualNetworkRuleArrayOutput { return o } func (o VirtualNetworkRuleArrayOutput) ToVirtualNetworkRuleArrayOutputWithContext(ctx context.Context) VirtualNetworkRuleArrayOutput { return o } func (o VirtualNetworkRuleArrayOutput) Index(i pulumi.IntInput) VirtualNetworkRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualNetworkRule { return vs[0].([]*VirtualNetworkRule)[vs[1].(int)] }).(VirtualNetworkRuleOutput) } type VirtualNetworkRuleMapOutput struct{ *pulumi.OutputState } func (VirtualNetworkRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualNetworkRule)(nil)).Elem() } func (o VirtualNetworkRuleMapOutput) ToVirtualNetworkRuleMapOutput() VirtualNetworkRuleMapOutput { return o } func (o VirtualNetworkRuleMapOutput) ToVirtualNetworkRuleMapOutputWithContext(ctx context.Context) VirtualNetworkRuleMapOutput { return o } func (o VirtualNetworkRuleMapOutput) MapIndex(k pulumi.StringInput) VirtualNetworkRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualNetworkRule { return vs[0].(map[string]*VirtualNetworkRule)[vs[1].(string)] }).(VirtualNetworkRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkRuleInput)(nil)).Elem(), &VirtualNetworkRule{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkRuleArrayInput)(nil)).Elem(), VirtualNetworkRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkRuleMapInput)(nil)).Elem(), VirtualNetworkRuleMap{}) pulumi.RegisterOutputType(VirtualNetworkRuleOutput{}) pulumi.RegisterOutputType(VirtualNetworkRuleArrayOutput{}) pulumi.RegisterOutputType(VirtualNetworkRuleMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/server.go
sdk/go/azure/postgresql/server.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a PostgreSQL Server. // // > **Note:** The `postgresql.Server` resource is deprecated and will be removed in v5.0 of the AzureRM Provider. Azure Database for PostgreSQL Single Server and its sub resources have been retired as of 2025-03-28, please use the `postgresql.FlexibleServer` resource instead. For more information, see https://techcommunity.microsoft.com/blog/adforpostgresql/retiring-azure-database-for-postgresql-single-server-in-2025/3783783. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = postgresql.NewServer(ctx, "example", &postgresql.ServerArgs{ // Name: pulumi.String("example-psqlserver"), // Location: example.Location, // ResourceGroupName: example.Name, // AdministratorLogin: pulumi.String("psqladmin"), // AdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // SkuName: pulumi.String("GP_Gen5_4"), // Version: pulumi.String("11"), // StorageMb: pulumi.Int(640000), // BackupRetentionDays: pulumi.Int(7), // GeoRedundantBackupEnabled: pulumi.Bool(true), // AutoGrowEnabled: pulumi.Bool(true), // PublicNetworkAccessEnabled: pulumi.Bool(false), // SslEnforcementEnabled: pulumi.Bool(true), // SslMinimalTlsVersionEnforced: pulumi.String("TLS1_2"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DBforPostgreSQL` - 2017-12-01 // // ## Import // // PostgreSQL Server's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:postgresql/server:Server server1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforPostgreSQL/servers/server1 // ``` type Server struct { pulumi.CustomResourceState // The Administrator login for the PostgreSQL Server. Required when `createMode` is `Default`. Changing this forces a new resource to be created. AdministratorLogin pulumi.StringOutput `pulumi:"administratorLogin"` // The Password associated with the `administratorLogin` for the PostgreSQL Server. AdministratorLoginPassword pulumi.StringPtrOutput `pulumi:"administratorLoginPassword"` // An integer value used to trigger an update for `administratorLoginPasswordWo`. This property should be incremented when updating `administratorLoginPasswordWo`. AdministratorLoginPasswordWoVersion pulumi.IntPtrOutput `pulumi:"administratorLoginPasswordWoVersion"` // Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to `true`. AutoGrowEnabled pulumi.BoolPtrOutput `pulumi:"autoGrowEnabled"` // Backup retention days for the server, supported values are between `7` and `35` days. BackupRetentionDays pulumi.IntOutput `pulumi:"backupRetentionDays"` // The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`. CreateMode pulumi.StringPtrOutput `pulumi:"createMode"` // For creation modes other than `Default`, the source server ID to use. CreationSourceServerId pulumi.StringPtrOutput `pulumi:"creationSourceServerId"` // The FQDN of the PostgreSQL Server. Fqdn pulumi.StringOutput `pulumi:"fqdn"` // Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created. GeoRedundantBackupEnabled pulumi.BoolPtrOutput `pulumi:"geoRedundantBackupEnabled"` // An `identity` block as defined below. Identity ServerIdentityPtrOutput `pulumi:"identity"` // Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. // // > **Note:** This property is currently still in development and not supported by Microsoft. If the `infrastructureEncryptionEnabled` attribute is set to `true` the PostgreSQL instance will incur a substantial performance degradation due to a second encryption pass on top of the existing default encryption that is already provided by Azure Storage. It is strongly suggested to leave this value `false` as not doing so can lead to unclear error messages. InfrastructureEncryptionEnabled pulumi.BoolPtrOutput `pulumi:"infrastructureEncryptionEnabled"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Whether or not public network access is allowed for this server. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // When `createMode` is `PointInTimeRestore` the point in time to restore from `creationSourceServerId`. It should be provided in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format, e.g. `2013-11-08T22:00:40Z`. RestorePointInTime pulumi.StringPtrOutput `pulumi:"restorePointInTime"` // Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/rest/api/postgresql/singleserver/servers/create#sku). Possible values are `B_Gen4_1`, `B_Gen4_2`, `B_Gen5_1`, `B_Gen5_2`, `GP_Gen4_2`, `GP_Gen4_4`, `GP_Gen4_8`, `GP_Gen4_16`, `GP_Gen4_32`, `GP_Gen5_2`, `GP_Gen5_4`, `GP_Gen5_8`, `GP_Gen5_16`, `GP_Gen5_32`, `GP_Gen5_64`, `MO_Gen5_2`, `MO_Gen5_4`, `MO_Gen5_8`, `MO_Gen5_16` and `MO_Gen5_32`. // // > **Note:** When replication is set up and `skuName` is changed to a higher tier or more capacity for the primary, all replicas are scaled up to the same tier/capacity. This is an Azure requirement, for more information see the [replica scaling documentation](https://docs.microsoft.com/azure/postgresql/concepts-read-replicas#scaling) SkuName pulumi.StringOutput `pulumi:"skuName"` // Specifies if SSL should be enforced on connections. Possible values are `true` and `false`. // // > **Note:** `sslMinimalTlsVersionEnforced` must be set to `TLSEnforcementDisabled` when `sslEnforcementEnabled` is set to `false`. SslEnforcementEnabled pulumi.BoolOutput `pulumi:"sslEnforcementEnabled"` // The minimum TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLS1_2`. SslMinimalTlsVersionEnforced pulumi.StringPtrOutput `pulumi:"sslMinimalTlsVersionEnforced"` // Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `16777216` MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/azure/postgresql/concepts-pricing-tiers#storage). StorageMb pulumi.IntOutput `pulumi:"storageMb"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threatDetectionPolicy` block supports fields documented below. ThreatDetectionPolicy ServerThreatDetectionPolicyPtrOutput `pulumi:"threatDetectionPolicy"` // Specifies the version of PostgreSQL to use. Valid values are `9.5`, `9.6`, `10`, `10.0`, `10.2` and `11`. Changing this forces a new resource to be created. Version pulumi.StringOutput `pulumi:"version"` } // NewServer registers a new resource with the given unique name, arguments, and options. func NewServer(ctx *pulumi.Context, name string, args *ServerArgs, opts ...pulumi.ResourceOption) (*Server, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SkuName == nil { return nil, errors.New("invalid value for required argument 'SkuName'") } if args.SslEnforcementEnabled == nil { return nil, errors.New("invalid value for required argument 'SslEnforcementEnabled'") } if args.Version == nil { return nil, errors.New("invalid value for required argument 'Version'") } if args.AdministratorLoginPassword != nil { args.AdministratorLoginPassword = pulumi.ToSecret(args.AdministratorLoginPassword).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "administratorLoginPassword", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource Server err := ctx.RegisterResource("azure:postgresql/server:Server", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetServer gets an existing Server resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetServer(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ServerState, opts ...pulumi.ResourceOption) (*Server, error) { var resource Server err := ctx.ReadResource("azure:postgresql/server:Server", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Server resources. type serverState struct { // The Administrator login for the PostgreSQL Server. Required when `createMode` is `Default`. Changing this forces a new resource to be created. AdministratorLogin *string `pulumi:"administratorLogin"` // The Password associated with the `administratorLogin` for the PostgreSQL Server. AdministratorLoginPassword *string `pulumi:"administratorLoginPassword"` // An integer value used to trigger an update for `administratorLoginPasswordWo`. This property should be incremented when updating `administratorLoginPasswordWo`. AdministratorLoginPasswordWoVersion *int `pulumi:"administratorLoginPasswordWoVersion"` // Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to `true`. AutoGrowEnabled *bool `pulumi:"autoGrowEnabled"` // Backup retention days for the server, supported values are between `7` and `35` days. BackupRetentionDays *int `pulumi:"backupRetentionDays"` // The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`. CreateMode *string `pulumi:"createMode"` // For creation modes other than `Default`, the source server ID to use. CreationSourceServerId *string `pulumi:"creationSourceServerId"` // The FQDN of the PostgreSQL Server. Fqdn *string `pulumi:"fqdn"` // Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created. GeoRedundantBackupEnabled *bool `pulumi:"geoRedundantBackupEnabled"` // An `identity` block as defined below. Identity *ServerIdentity `pulumi:"identity"` // Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. // // > **Note:** This property is currently still in development and not supported by Microsoft. If the `infrastructureEncryptionEnabled` attribute is set to `true` the PostgreSQL instance will incur a substantial performance degradation due to a second encryption pass on top of the existing default encryption that is already provided by Azure Storage. It is strongly suggested to leave this value `false` as not doing so can lead to unclear error messages. InfrastructureEncryptionEnabled *bool `pulumi:"infrastructureEncryptionEnabled"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Whether or not public network access is allowed for this server. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // When `createMode` is `PointInTimeRestore` the point in time to restore from `creationSourceServerId`. It should be provided in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format, e.g. `2013-11-08T22:00:40Z`. RestorePointInTime *string `pulumi:"restorePointInTime"` // Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/rest/api/postgresql/singleserver/servers/create#sku). Possible values are `B_Gen4_1`, `B_Gen4_2`, `B_Gen5_1`, `B_Gen5_2`, `GP_Gen4_2`, `GP_Gen4_4`, `GP_Gen4_8`, `GP_Gen4_16`, `GP_Gen4_32`, `GP_Gen5_2`, `GP_Gen5_4`, `GP_Gen5_8`, `GP_Gen5_16`, `GP_Gen5_32`, `GP_Gen5_64`, `MO_Gen5_2`, `MO_Gen5_4`, `MO_Gen5_8`, `MO_Gen5_16` and `MO_Gen5_32`. // // > **Note:** When replication is set up and `skuName` is changed to a higher tier or more capacity for the primary, all replicas are scaled up to the same tier/capacity. This is an Azure requirement, for more information see the [replica scaling documentation](https://docs.microsoft.com/azure/postgresql/concepts-read-replicas#scaling) SkuName *string `pulumi:"skuName"` // Specifies if SSL should be enforced on connections. Possible values are `true` and `false`. // // > **Note:** `sslMinimalTlsVersionEnforced` must be set to `TLSEnforcementDisabled` when `sslEnforcementEnabled` is set to `false`. SslEnforcementEnabled *bool `pulumi:"sslEnforcementEnabled"` // The minimum TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLS1_2`. SslMinimalTlsVersionEnforced *string `pulumi:"sslMinimalTlsVersionEnforced"` // Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `16777216` MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/azure/postgresql/concepts-pricing-tiers#storage). StorageMb *int `pulumi:"storageMb"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threatDetectionPolicy` block supports fields documented below. ThreatDetectionPolicy *ServerThreatDetectionPolicy `pulumi:"threatDetectionPolicy"` // Specifies the version of PostgreSQL to use. Valid values are `9.5`, `9.6`, `10`, `10.0`, `10.2` and `11`. Changing this forces a new resource to be created. Version *string `pulumi:"version"` } type ServerState struct { // The Administrator login for the PostgreSQL Server. Required when `createMode` is `Default`. Changing this forces a new resource to be created. AdministratorLogin pulumi.StringPtrInput // The Password associated with the `administratorLogin` for the PostgreSQL Server. AdministratorLoginPassword pulumi.StringPtrInput // An integer value used to trigger an update for `administratorLoginPasswordWo`. This property should be incremented when updating `administratorLoginPasswordWo`. AdministratorLoginPasswordWoVersion pulumi.IntPtrInput // Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to `true`. AutoGrowEnabled pulumi.BoolPtrInput // Backup retention days for the server, supported values are between `7` and `35` days. BackupRetentionDays pulumi.IntPtrInput // The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`. CreateMode pulumi.StringPtrInput // For creation modes other than `Default`, the source server ID to use. CreationSourceServerId pulumi.StringPtrInput // The FQDN of the PostgreSQL Server. Fqdn pulumi.StringPtrInput // Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created. GeoRedundantBackupEnabled pulumi.BoolPtrInput // An `identity` block as defined below. Identity ServerIdentityPtrInput // Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. // // > **Note:** This property is currently still in development and not supported by Microsoft. If the `infrastructureEncryptionEnabled` attribute is set to `true` the PostgreSQL instance will incur a substantial performance degradation due to a second encryption pass on top of the existing default encryption that is already provided by Azure Storage. It is strongly suggested to leave this value `false` as not doing so can lead to unclear error messages. InfrastructureEncryptionEnabled pulumi.BoolPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Whether or not public network access is allowed for this server. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // When `createMode` is `PointInTimeRestore` the point in time to restore from `creationSourceServerId`. It should be provided in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format, e.g. `2013-11-08T22:00:40Z`. RestorePointInTime pulumi.StringPtrInput // Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/rest/api/postgresql/singleserver/servers/create#sku). Possible values are `B_Gen4_1`, `B_Gen4_2`, `B_Gen5_1`, `B_Gen5_2`, `GP_Gen4_2`, `GP_Gen4_4`, `GP_Gen4_8`, `GP_Gen4_16`, `GP_Gen4_32`, `GP_Gen5_2`, `GP_Gen5_4`, `GP_Gen5_8`, `GP_Gen5_16`, `GP_Gen5_32`, `GP_Gen5_64`, `MO_Gen5_2`, `MO_Gen5_4`, `MO_Gen5_8`, `MO_Gen5_16` and `MO_Gen5_32`. // // > **Note:** When replication is set up and `skuName` is changed to a higher tier or more capacity for the primary, all replicas are scaled up to the same tier/capacity. This is an Azure requirement, for more information see the [replica scaling documentation](https://docs.microsoft.com/azure/postgresql/concepts-read-replicas#scaling) SkuName pulumi.StringPtrInput // Specifies if SSL should be enforced on connections. Possible values are `true` and `false`. // // > **Note:** `sslMinimalTlsVersionEnforced` must be set to `TLSEnforcementDisabled` when `sslEnforcementEnabled` is set to `false`. SslEnforcementEnabled pulumi.BoolPtrInput // The minimum TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLS1_2`. SslMinimalTlsVersionEnforced pulumi.StringPtrInput // Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `16777216` MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/azure/postgresql/concepts-pricing-tiers#storage). StorageMb pulumi.IntPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threatDetectionPolicy` block supports fields documented below. ThreatDetectionPolicy ServerThreatDetectionPolicyPtrInput // Specifies the version of PostgreSQL to use. Valid values are `9.5`, `9.6`, `10`, `10.0`, `10.2` and `11`. Changing this forces a new resource to be created. Version pulumi.StringPtrInput } func (ServerState) ElementType() reflect.Type { return reflect.TypeOf((*serverState)(nil)).Elem() } type serverArgs struct { // The Administrator login for the PostgreSQL Server. Required when `createMode` is `Default`. Changing this forces a new resource to be created. AdministratorLogin *string `pulumi:"administratorLogin"` // The Password associated with the `administratorLogin` for the PostgreSQL Server. AdministratorLoginPassword *string `pulumi:"administratorLoginPassword"` // An integer value used to trigger an update for `administratorLoginPasswordWo`. This property should be incremented when updating `administratorLoginPasswordWo`. AdministratorLoginPasswordWoVersion *int `pulumi:"administratorLoginPasswordWoVersion"` // Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to `true`. AutoGrowEnabled *bool `pulumi:"autoGrowEnabled"` // Backup retention days for the server, supported values are between `7` and `35` days. BackupRetentionDays *int `pulumi:"backupRetentionDays"` // The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`. CreateMode *string `pulumi:"createMode"` // For creation modes other than `Default`, the source server ID to use. CreationSourceServerId *string `pulumi:"creationSourceServerId"` // Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created. GeoRedundantBackupEnabled *bool `pulumi:"geoRedundantBackupEnabled"` // An `identity` block as defined below. Identity *ServerIdentity `pulumi:"identity"` // Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. // // > **Note:** This property is currently still in development and not supported by Microsoft. If the `infrastructureEncryptionEnabled` attribute is set to `true` the PostgreSQL instance will incur a substantial performance degradation due to a second encryption pass on top of the existing default encryption that is already provided by Azure Storage. It is strongly suggested to leave this value `false` as not doing so can lead to unclear error messages. InfrastructureEncryptionEnabled *bool `pulumi:"infrastructureEncryptionEnabled"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Whether or not public network access is allowed for this server. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // When `createMode` is `PointInTimeRestore` the point in time to restore from `creationSourceServerId`. It should be provided in [RFC3339](https://www.rfc-editor.org/rfc/rfc3339) format, e.g. `2013-11-08T22:00:40Z`. RestorePointInTime *string `pulumi:"restorePointInTime"` // Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the `tier` + `family` + `cores` pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). For more information see the [product documentation](https://docs.microsoft.com/rest/api/postgresql/singleserver/servers/create#sku). Possible values are `B_Gen4_1`, `B_Gen4_2`, `B_Gen5_1`, `B_Gen5_2`, `GP_Gen4_2`, `GP_Gen4_4`, `GP_Gen4_8`, `GP_Gen4_16`, `GP_Gen4_32`, `GP_Gen5_2`, `GP_Gen5_4`, `GP_Gen5_8`, `GP_Gen5_16`, `GP_Gen5_32`, `GP_Gen5_64`, `MO_Gen5_2`, `MO_Gen5_4`, `MO_Gen5_8`, `MO_Gen5_16` and `MO_Gen5_32`. // // > **Note:** When replication is set up and `skuName` is changed to a higher tier or more capacity for the primary, all replicas are scaled up to the same tier/capacity. This is an Azure requirement, for more information see the [replica scaling documentation](https://docs.microsoft.com/azure/postgresql/concepts-read-replicas#scaling) SkuName string `pulumi:"skuName"` // Specifies if SSL should be enforced on connections. Possible values are `true` and `false`. // // > **Note:** `sslMinimalTlsVersionEnforced` must be set to `TLSEnforcementDisabled` when `sslEnforcementEnabled` is set to `false`. SslEnforcementEnabled bool `pulumi:"sslEnforcementEnabled"` // The minimum TLS version to support on the sever. Possible values are `TLSEnforcementDisabled`, `TLS1_0`, `TLS1_1`, and `TLS1_2`. Defaults to `TLS1_2`. SslMinimalTlsVersionEnforced *string `pulumi:"sslMinimalTlsVersionEnforced"` // Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `16777216` MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the [product documentation](https://docs.microsoft.com/azure/postgresql/concepts-pricing-tiers#storage). StorageMb *int `pulumi:"storageMb"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Threat detection policy configuration, known in the API as Server Security Alerts Policy. The `threatDetectionPolicy` block supports fields documented below. ThreatDetectionPolicy *ServerThreatDetectionPolicy `pulumi:"threatDetectionPolicy"` // Specifies the version of PostgreSQL to use. Valid values are `9.5`, `9.6`, `10`, `10.0`, `10.2` and `11`. Changing this forces a new resource to be created. Version string `pulumi:"version"` } // The set of arguments for constructing a Server resource. type ServerArgs struct { // The Administrator login for the PostgreSQL Server. Required when `createMode` is `Default`. Changing this forces a new resource to be created. AdministratorLogin pulumi.StringPtrInput // The Password associated with the `administratorLogin` for the PostgreSQL Server. AdministratorLoginPassword pulumi.StringPtrInput // An integer value used to trigger an update for `administratorLoginPasswordWo`. This property should be incremented when updating `administratorLoginPasswordWo`. AdministratorLoginPasswordWoVersion pulumi.IntPtrInput // Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to `true`. AutoGrowEnabled pulumi.BoolPtrInput // Backup retention days for the server, supported values are between `7` and `35` days. BackupRetentionDays pulumi.IntPtrInput // The creation mode. Can be used to restore or replicate existing servers. Possible values are `Default`, `Replica`, `GeoRestore`, and `PointInTimeRestore`. Defaults to `Default`. CreateMode pulumi.StringPtrInput // For creation modes other than `Default`, the source server ID to use. CreationSourceServerId pulumi.StringPtrInput // Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created. GeoRedundantBackupEnabled pulumi.BoolPtrInput // An `identity` block as defined below. Identity ServerIdentityPtrInput // Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. // // > **Note:** This property is currently still in development and not supported by Microsoft. If the `infrastructureEncryptionEnabled` attribute is set to `true` the PostgreSQL instance will incur a substantial performance degradation due to a second encryption pass on top of the existing default encryption that is already provided by Azure Storage. It is strongly suggested to leave this value `false` as not doing so can lead to unclear error messages. InfrastructureEncryptionEnabled pulumi.BoolPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Whether or not public network access is allowed for this server. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/flexibleServerVirtualEndpoint.go
sdk/go/azure/postgresql/flexibleServerVirtualEndpoint.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Allows you to create a Virtual Endpoint associated with a Postgres Flexible Replica. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("East US"), // }) // if err != nil { // return err // } // exampleFlexibleServer, err := postgresql.NewFlexibleServer(ctx, "example", &postgresql.FlexibleServerArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // Version: pulumi.String("16"), // PublicNetworkAccessEnabled: pulumi.Bool(false), // AdministratorLogin: pulumi.String("psqladmin"), // AdministratorPassword: pulumi.String("H@Sh1CoR3!"), // Zone: pulumi.String("1"), // StorageMb: pulumi.Int(32768), // StorageTier: pulumi.String("P30"), // SkuName: pulumi.String("GP_Standard_D2ads_v5"), // }) // if err != nil { // return err // } // exampleReplica, err := postgresql.NewFlexibleServer(ctx, "example_replica", &postgresql.FlexibleServerArgs{ // Name: pulumi.String("example-replica"), // ResourceGroupName: exampleFlexibleServer.ResourceGroupName, // Location: exampleFlexibleServer.Location, // CreateMode: pulumi.String("Replica"), // SourceServerId: exampleFlexibleServer.ID(), // Version: pulumi.String("16"), // PublicNetworkAccessEnabled: pulumi.Bool(false), // Zone: pulumi.String("1"), // StorageMb: pulumi.Int(32768), // StorageTier: pulumi.String("P30"), // SkuName: pulumi.String("GP_Standard_D2ads_v5"), // }) // if err != nil { // return err // } // _, err = postgresql.NewFlexibleServerVirtualEndpoint(ctx, "example", &postgresql.FlexibleServerVirtualEndpointArgs{ // Name: pulumi.String("example-endpoint-1"), // SourceServerId: exampleFlexibleServer.ID(), // ReplicaServerId: exampleReplica.ID(), // Type: pulumi.String("ReadWrite"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // > **Note:** If creating multiple replicas, an error can occur if virtual endpoints are created before all replicas have been completed. To avoid this error, use a `dependsOn` property on `postgresql.FlexibleServerVirtualEndpoint` that references all Postgres Flexible Server Replicas. // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DBforPostgreSQL` - 2025-08-01 // // ## Import // // A PostgreSQL Flexible Virtual Endpoint can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:postgresql/flexibleServerVirtualEndpoint:FlexibleServerVirtualEndpoint example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DBforPostgreSQL/flexibleServers/sourceServerName/virtualEndpoints/endpointName|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DBforPostgreSQL/flexibleServers/replicaServerName/virtualEndpoints/endpointName" // ``` type FlexibleServerVirtualEndpoint struct { pulumi.CustomResourceState // The name of the Virtual Endpoint. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The Resource ID of the *Replica* Postgres Flexible Server this should be associated with // // > **Note:** If a fail-over has occurred, you will be unable to update `replicaServerId`. You can remove the resource from state and reimport it back in with `sourceServerId` and `replicaServerId` flipped and then update `replicaServerId`. ReplicaServerId pulumi.StringOutput `pulumi:"replicaServerId"` // The Resource ID of the *Source* Postgres Flexible Server this should be associated with. Changing this forces a new resource to be created. SourceServerId pulumi.StringOutput `pulumi:"sourceServerId"` // The type of Virtual Endpoint. Currently only `ReadWrite` is supported. Changing this forces a new resource to be created. Type pulumi.StringOutput `pulumi:"type"` } // NewFlexibleServerVirtualEndpoint registers a new resource with the given unique name, arguments, and options. func NewFlexibleServerVirtualEndpoint(ctx *pulumi.Context, name string, args *FlexibleServerVirtualEndpointArgs, opts ...pulumi.ResourceOption) (*FlexibleServerVirtualEndpoint, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ReplicaServerId == nil { return nil, errors.New("invalid value for required argument 'ReplicaServerId'") } if args.SourceServerId == nil { return nil, errors.New("invalid value for required argument 'SourceServerId'") } if args.Type == nil { return nil, errors.New("invalid value for required argument 'Type'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FlexibleServerVirtualEndpoint err := ctx.RegisterResource("azure:postgresql/flexibleServerVirtualEndpoint:FlexibleServerVirtualEndpoint", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFlexibleServerVirtualEndpoint gets an existing FlexibleServerVirtualEndpoint resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetFlexibleServerVirtualEndpoint(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FlexibleServerVirtualEndpointState, opts ...pulumi.ResourceOption) (*FlexibleServerVirtualEndpoint, error) { var resource FlexibleServerVirtualEndpoint err := ctx.ReadResource("azure:postgresql/flexibleServerVirtualEndpoint:FlexibleServerVirtualEndpoint", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FlexibleServerVirtualEndpoint resources. type flexibleServerVirtualEndpointState struct { // The name of the Virtual Endpoint. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The Resource ID of the *Replica* Postgres Flexible Server this should be associated with // // > **Note:** If a fail-over has occurred, you will be unable to update `replicaServerId`. You can remove the resource from state and reimport it back in with `sourceServerId` and `replicaServerId` flipped and then update `replicaServerId`. ReplicaServerId *string `pulumi:"replicaServerId"` // The Resource ID of the *Source* Postgres Flexible Server this should be associated with. Changing this forces a new resource to be created. SourceServerId *string `pulumi:"sourceServerId"` // The type of Virtual Endpoint. Currently only `ReadWrite` is supported. Changing this forces a new resource to be created. Type *string `pulumi:"type"` } type FlexibleServerVirtualEndpointState struct { // The name of the Virtual Endpoint. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The Resource ID of the *Replica* Postgres Flexible Server this should be associated with // // > **Note:** If a fail-over has occurred, you will be unable to update `replicaServerId`. You can remove the resource from state and reimport it back in with `sourceServerId` and `replicaServerId` flipped and then update `replicaServerId`. ReplicaServerId pulumi.StringPtrInput // The Resource ID of the *Source* Postgres Flexible Server this should be associated with. Changing this forces a new resource to be created. SourceServerId pulumi.StringPtrInput // The type of Virtual Endpoint. Currently only `ReadWrite` is supported. Changing this forces a new resource to be created. Type pulumi.StringPtrInput } func (FlexibleServerVirtualEndpointState) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerVirtualEndpointState)(nil)).Elem() } type flexibleServerVirtualEndpointArgs struct { // The name of the Virtual Endpoint. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The Resource ID of the *Replica* Postgres Flexible Server this should be associated with // // > **Note:** If a fail-over has occurred, you will be unable to update `replicaServerId`. You can remove the resource from state and reimport it back in with `sourceServerId` and `replicaServerId` flipped and then update `replicaServerId`. ReplicaServerId string `pulumi:"replicaServerId"` // The Resource ID of the *Source* Postgres Flexible Server this should be associated with. Changing this forces a new resource to be created. SourceServerId string `pulumi:"sourceServerId"` // The type of Virtual Endpoint. Currently only `ReadWrite` is supported. Changing this forces a new resource to be created. Type string `pulumi:"type"` } // The set of arguments for constructing a FlexibleServerVirtualEndpoint resource. type FlexibleServerVirtualEndpointArgs struct { // The name of the Virtual Endpoint. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The Resource ID of the *Replica* Postgres Flexible Server this should be associated with // // > **Note:** If a fail-over has occurred, you will be unable to update `replicaServerId`. You can remove the resource from state and reimport it back in with `sourceServerId` and `replicaServerId` flipped and then update `replicaServerId`. ReplicaServerId pulumi.StringInput // The Resource ID of the *Source* Postgres Flexible Server this should be associated with. Changing this forces a new resource to be created. SourceServerId pulumi.StringInput // The type of Virtual Endpoint. Currently only `ReadWrite` is supported. Changing this forces a new resource to be created. Type pulumi.StringInput } func (FlexibleServerVirtualEndpointArgs) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerVirtualEndpointArgs)(nil)).Elem() } type FlexibleServerVirtualEndpointInput interface { pulumi.Input ToFlexibleServerVirtualEndpointOutput() FlexibleServerVirtualEndpointOutput ToFlexibleServerVirtualEndpointOutputWithContext(ctx context.Context) FlexibleServerVirtualEndpointOutput } func (*FlexibleServerVirtualEndpoint) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerVirtualEndpoint)(nil)).Elem() } func (i *FlexibleServerVirtualEndpoint) ToFlexibleServerVirtualEndpointOutput() FlexibleServerVirtualEndpointOutput { return i.ToFlexibleServerVirtualEndpointOutputWithContext(context.Background()) } func (i *FlexibleServerVirtualEndpoint) ToFlexibleServerVirtualEndpointOutputWithContext(ctx context.Context) FlexibleServerVirtualEndpointOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerVirtualEndpointOutput) } // FlexibleServerVirtualEndpointArrayInput is an input type that accepts FlexibleServerVirtualEndpointArray and FlexibleServerVirtualEndpointArrayOutput values. // You can construct a concrete instance of `FlexibleServerVirtualEndpointArrayInput` via: // // FlexibleServerVirtualEndpointArray{ FlexibleServerVirtualEndpointArgs{...} } type FlexibleServerVirtualEndpointArrayInput interface { pulumi.Input ToFlexibleServerVirtualEndpointArrayOutput() FlexibleServerVirtualEndpointArrayOutput ToFlexibleServerVirtualEndpointArrayOutputWithContext(context.Context) FlexibleServerVirtualEndpointArrayOutput } type FlexibleServerVirtualEndpointArray []FlexibleServerVirtualEndpointInput func (FlexibleServerVirtualEndpointArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerVirtualEndpoint)(nil)).Elem() } func (i FlexibleServerVirtualEndpointArray) ToFlexibleServerVirtualEndpointArrayOutput() FlexibleServerVirtualEndpointArrayOutput { return i.ToFlexibleServerVirtualEndpointArrayOutputWithContext(context.Background()) } func (i FlexibleServerVirtualEndpointArray) ToFlexibleServerVirtualEndpointArrayOutputWithContext(ctx context.Context) FlexibleServerVirtualEndpointArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerVirtualEndpointArrayOutput) } // FlexibleServerVirtualEndpointMapInput is an input type that accepts FlexibleServerVirtualEndpointMap and FlexibleServerVirtualEndpointMapOutput values. // You can construct a concrete instance of `FlexibleServerVirtualEndpointMapInput` via: // // FlexibleServerVirtualEndpointMap{ "key": FlexibleServerVirtualEndpointArgs{...} } type FlexibleServerVirtualEndpointMapInput interface { pulumi.Input ToFlexibleServerVirtualEndpointMapOutput() FlexibleServerVirtualEndpointMapOutput ToFlexibleServerVirtualEndpointMapOutputWithContext(context.Context) FlexibleServerVirtualEndpointMapOutput } type FlexibleServerVirtualEndpointMap map[string]FlexibleServerVirtualEndpointInput func (FlexibleServerVirtualEndpointMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerVirtualEndpoint)(nil)).Elem() } func (i FlexibleServerVirtualEndpointMap) ToFlexibleServerVirtualEndpointMapOutput() FlexibleServerVirtualEndpointMapOutput { return i.ToFlexibleServerVirtualEndpointMapOutputWithContext(context.Background()) } func (i FlexibleServerVirtualEndpointMap) ToFlexibleServerVirtualEndpointMapOutputWithContext(ctx context.Context) FlexibleServerVirtualEndpointMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerVirtualEndpointMapOutput) } type FlexibleServerVirtualEndpointOutput struct{ *pulumi.OutputState } func (FlexibleServerVirtualEndpointOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerVirtualEndpoint)(nil)).Elem() } func (o FlexibleServerVirtualEndpointOutput) ToFlexibleServerVirtualEndpointOutput() FlexibleServerVirtualEndpointOutput { return o } func (o FlexibleServerVirtualEndpointOutput) ToFlexibleServerVirtualEndpointOutputWithContext(ctx context.Context) FlexibleServerVirtualEndpointOutput { return o } // The name of the Virtual Endpoint. Changing this forces a new resource to be created. func (o FlexibleServerVirtualEndpointOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerVirtualEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The Resource ID of the *Replica* Postgres Flexible Server this should be associated with // // > **Note:** If a fail-over has occurred, you will be unable to update `replicaServerId`. You can remove the resource from state and reimport it back in with `sourceServerId` and `replicaServerId` flipped and then update `replicaServerId`. func (o FlexibleServerVirtualEndpointOutput) ReplicaServerId() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerVirtualEndpoint) pulumi.StringOutput { return v.ReplicaServerId }).(pulumi.StringOutput) } // The Resource ID of the *Source* Postgres Flexible Server this should be associated with. Changing this forces a new resource to be created. func (o FlexibleServerVirtualEndpointOutput) SourceServerId() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerVirtualEndpoint) pulumi.StringOutput { return v.SourceServerId }).(pulumi.StringOutput) } // The type of Virtual Endpoint. Currently only `ReadWrite` is supported. Changing this forces a new resource to be created. func (o FlexibleServerVirtualEndpointOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerVirtualEndpoint) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) } type FlexibleServerVirtualEndpointArrayOutput struct{ *pulumi.OutputState } func (FlexibleServerVirtualEndpointArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerVirtualEndpoint)(nil)).Elem() } func (o FlexibleServerVirtualEndpointArrayOutput) ToFlexibleServerVirtualEndpointArrayOutput() FlexibleServerVirtualEndpointArrayOutput { return o } func (o FlexibleServerVirtualEndpointArrayOutput) ToFlexibleServerVirtualEndpointArrayOutputWithContext(ctx context.Context) FlexibleServerVirtualEndpointArrayOutput { return o } func (o FlexibleServerVirtualEndpointArrayOutput) Index(i pulumi.IntInput) FlexibleServerVirtualEndpointOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FlexibleServerVirtualEndpoint { return vs[0].([]*FlexibleServerVirtualEndpoint)[vs[1].(int)] }).(FlexibleServerVirtualEndpointOutput) } type FlexibleServerVirtualEndpointMapOutput struct{ *pulumi.OutputState } func (FlexibleServerVirtualEndpointMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerVirtualEndpoint)(nil)).Elem() } func (o FlexibleServerVirtualEndpointMapOutput) ToFlexibleServerVirtualEndpointMapOutput() FlexibleServerVirtualEndpointMapOutput { return o } func (o FlexibleServerVirtualEndpointMapOutput) ToFlexibleServerVirtualEndpointMapOutputWithContext(ctx context.Context) FlexibleServerVirtualEndpointMapOutput { return o } func (o FlexibleServerVirtualEndpointMapOutput) MapIndex(k pulumi.StringInput) FlexibleServerVirtualEndpointOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FlexibleServerVirtualEndpoint { return vs[0].(map[string]*FlexibleServerVirtualEndpoint)[vs[1].(string)] }).(FlexibleServerVirtualEndpointOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerVirtualEndpointInput)(nil)).Elem(), &FlexibleServerVirtualEndpoint{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerVirtualEndpointArrayInput)(nil)).Elem(), FlexibleServerVirtualEndpointArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerVirtualEndpointMapInput)(nil)).Elem(), FlexibleServerVirtualEndpointMap{}) pulumi.RegisterOutputType(FlexibleServerVirtualEndpointOutput{}) pulumi.RegisterOutputType(FlexibleServerVirtualEndpointArrayOutput{}) pulumi.RegisterOutputType(FlexibleServerVirtualEndpointMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/flexibleServerFirewallRule.go
sdk/go/azure/postgresql/flexibleServerFirewallRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a PostgreSQL Flexible Server Firewall Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleFlexibleServer, err := postgresql.NewFlexibleServer(ctx, "example", &postgresql.FlexibleServerArgs{ // Name: pulumi.String("example-psqlflexibleserver"), // ResourceGroupName: example.Name, // Location: example.Location, // Version: pulumi.String("12"), // AdministratorLogin: pulumi.String("psqladmin"), // AdministratorPassword: pulumi.String("H@Sh1CoR3!"), // StorageMb: pulumi.Int(32768), // SkuName: pulumi.String("GP_Standard_D4s_v3"), // }) // if err != nil { // return err // } // _, err = postgresql.NewFlexibleServerFirewallRule(ctx, "example", &postgresql.FlexibleServerFirewallRuleArgs{ // Name: pulumi.String("example-fw"), // ServerId: exampleFlexibleServer.ID(), // StartIpAddress: pulumi.String("122.122.0.0"), // EndIpAddress: pulumi.String("122.122.0.0"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DBforPostgreSQL` - 2025-08-01 // // ## Import // // PostgreSQL Flexible Server Firewall Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:postgresql/flexibleServerFirewallRule:FlexibleServerFirewallRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServer1/firewallRules/firewallRule1 // ``` type FlexibleServerFirewallRule struct { pulumi.CustomResourceState // The IPv4 Address defining the end of the range of addresses associated with this PostgreSQL Flexible Server Firewall Rule. EndIpAddress pulumi.StringOutput `pulumi:"endIpAddress"` // The name which should be used for this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. ServerId pulumi.StringOutput `pulumi:"serverId"` // The IPv4 Address defining the start of the range of addresses associated with this PostgreSQL Flexible Server Firewall Rule. StartIpAddress pulumi.StringOutput `pulumi:"startIpAddress"` } // NewFlexibleServerFirewallRule registers a new resource with the given unique name, arguments, and options. func NewFlexibleServerFirewallRule(ctx *pulumi.Context, name string, args *FlexibleServerFirewallRuleArgs, opts ...pulumi.ResourceOption) (*FlexibleServerFirewallRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.EndIpAddress == nil { return nil, errors.New("invalid value for required argument 'EndIpAddress'") } if args.ServerId == nil { return nil, errors.New("invalid value for required argument 'ServerId'") } if args.StartIpAddress == nil { return nil, errors.New("invalid value for required argument 'StartIpAddress'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FlexibleServerFirewallRule err := ctx.RegisterResource("azure:postgresql/flexibleServerFirewallRule:FlexibleServerFirewallRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFlexibleServerFirewallRule gets an existing FlexibleServerFirewallRule resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetFlexibleServerFirewallRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FlexibleServerFirewallRuleState, opts ...pulumi.ResourceOption) (*FlexibleServerFirewallRule, error) { var resource FlexibleServerFirewallRule err := ctx.ReadResource("azure:postgresql/flexibleServerFirewallRule:FlexibleServerFirewallRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FlexibleServerFirewallRule resources. type flexibleServerFirewallRuleState struct { // The IPv4 Address defining the end of the range of addresses associated with this PostgreSQL Flexible Server Firewall Rule. EndIpAddress *string `pulumi:"endIpAddress"` // The name which should be used for this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. Name *string `pulumi:"name"` // The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. ServerId *string `pulumi:"serverId"` // The IPv4 Address defining the start of the range of addresses associated with this PostgreSQL Flexible Server Firewall Rule. StartIpAddress *string `pulumi:"startIpAddress"` } type FlexibleServerFirewallRuleState struct { // The IPv4 Address defining the end of the range of addresses associated with this PostgreSQL Flexible Server Firewall Rule. EndIpAddress pulumi.StringPtrInput // The name which should be used for this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. Name pulumi.StringPtrInput // The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. ServerId pulumi.StringPtrInput // The IPv4 Address defining the start of the range of addresses associated with this PostgreSQL Flexible Server Firewall Rule. StartIpAddress pulumi.StringPtrInput } func (FlexibleServerFirewallRuleState) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerFirewallRuleState)(nil)).Elem() } type flexibleServerFirewallRuleArgs struct { // The IPv4 Address defining the end of the range of addresses associated with this PostgreSQL Flexible Server Firewall Rule. EndIpAddress string `pulumi:"endIpAddress"` // The name which should be used for this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. Name *string `pulumi:"name"` // The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. ServerId string `pulumi:"serverId"` // The IPv4 Address defining the start of the range of addresses associated with this PostgreSQL Flexible Server Firewall Rule. StartIpAddress string `pulumi:"startIpAddress"` } // The set of arguments for constructing a FlexibleServerFirewallRule resource. type FlexibleServerFirewallRuleArgs struct { // The IPv4 Address defining the end of the range of addresses associated with this PostgreSQL Flexible Server Firewall Rule. EndIpAddress pulumi.StringInput // The name which should be used for this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. Name pulumi.StringPtrInput // The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. ServerId pulumi.StringInput // The IPv4 Address defining the start of the range of addresses associated with this PostgreSQL Flexible Server Firewall Rule. StartIpAddress pulumi.StringInput } func (FlexibleServerFirewallRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerFirewallRuleArgs)(nil)).Elem() } type FlexibleServerFirewallRuleInput interface { pulumi.Input ToFlexibleServerFirewallRuleOutput() FlexibleServerFirewallRuleOutput ToFlexibleServerFirewallRuleOutputWithContext(ctx context.Context) FlexibleServerFirewallRuleOutput } func (*FlexibleServerFirewallRule) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerFirewallRule)(nil)).Elem() } func (i *FlexibleServerFirewallRule) ToFlexibleServerFirewallRuleOutput() FlexibleServerFirewallRuleOutput { return i.ToFlexibleServerFirewallRuleOutputWithContext(context.Background()) } func (i *FlexibleServerFirewallRule) ToFlexibleServerFirewallRuleOutputWithContext(ctx context.Context) FlexibleServerFirewallRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerFirewallRuleOutput) } // FlexibleServerFirewallRuleArrayInput is an input type that accepts FlexibleServerFirewallRuleArray and FlexibleServerFirewallRuleArrayOutput values. // You can construct a concrete instance of `FlexibleServerFirewallRuleArrayInput` via: // // FlexibleServerFirewallRuleArray{ FlexibleServerFirewallRuleArgs{...} } type FlexibleServerFirewallRuleArrayInput interface { pulumi.Input ToFlexibleServerFirewallRuleArrayOutput() FlexibleServerFirewallRuleArrayOutput ToFlexibleServerFirewallRuleArrayOutputWithContext(context.Context) FlexibleServerFirewallRuleArrayOutput } type FlexibleServerFirewallRuleArray []FlexibleServerFirewallRuleInput func (FlexibleServerFirewallRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerFirewallRule)(nil)).Elem() } func (i FlexibleServerFirewallRuleArray) ToFlexibleServerFirewallRuleArrayOutput() FlexibleServerFirewallRuleArrayOutput { return i.ToFlexibleServerFirewallRuleArrayOutputWithContext(context.Background()) } func (i FlexibleServerFirewallRuleArray) ToFlexibleServerFirewallRuleArrayOutputWithContext(ctx context.Context) FlexibleServerFirewallRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerFirewallRuleArrayOutput) } // FlexibleServerFirewallRuleMapInput is an input type that accepts FlexibleServerFirewallRuleMap and FlexibleServerFirewallRuleMapOutput values. // You can construct a concrete instance of `FlexibleServerFirewallRuleMapInput` via: // // FlexibleServerFirewallRuleMap{ "key": FlexibleServerFirewallRuleArgs{...} } type FlexibleServerFirewallRuleMapInput interface { pulumi.Input ToFlexibleServerFirewallRuleMapOutput() FlexibleServerFirewallRuleMapOutput ToFlexibleServerFirewallRuleMapOutputWithContext(context.Context) FlexibleServerFirewallRuleMapOutput } type FlexibleServerFirewallRuleMap map[string]FlexibleServerFirewallRuleInput func (FlexibleServerFirewallRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerFirewallRule)(nil)).Elem() } func (i FlexibleServerFirewallRuleMap) ToFlexibleServerFirewallRuleMapOutput() FlexibleServerFirewallRuleMapOutput { return i.ToFlexibleServerFirewallRuleMapOutputWithContext(context.Background()) } func (i FlexibleServerFirewallRuleMap) ToFlexibleServerFirewallRuleMapOutputWithContext(ctx context.Context) FlexibleServerFirewallRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerFirewallRuleMapOutput) } type FlexibleServerFirewallRuleOutput struct{ *pulumi.OutputState } func (FlexibleServerFirewallRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerFirewallRule)(nil)).Elem() } func (o FlexibleServerFirewallRuleOutput) ToFlexibleServerFirewallRuleOutput() FlexibleServerFirewallRuleOutput { return o } func (o FlexibleServerFirewallRuleOutput) ToFlexibleServerFirewallRuleOutputWithContext(ctx context.Context) FlexibleServerFirewallRuleOutput { return o } // The IPv4 Address defining the end of the range of addresses associated with this PostgreSQL Flexible Server Firewall Rule. func (o FlexibleServerFirewallRuleOutput) EndIpAddress() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerFirewallRule) pulumi.StringOutput { return v.EndIpAddress }).(pulumi.StringOutput) } // The name which should be used for this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. func (o FlexibleServerFirewallRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerFirewallRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. func (o FlexibleServerFirewallRuleOutput) ServerId() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerFirewallRule) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput) } // The IPv4 Address defining the start of the range of addresses associated with this PostgreSQL Flexible Server Firewall Rule. func (o FlexibleServerFirewallRuleOutput) StartIpAddress() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerFirewallRule) pulumi.StringOutput { return v.StartIpAddress }).(pulumi.StringOutput) } type FlexibleServerFirewallRuleArrayOutput struct{ *pulumi.OutputState } func (FlexibleServerFirewallRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerFirewallRule)(nil)).Elem() } func (o FlexibleServerFirewallRuleArrayOutput) ToFlexibleServerFirewallRuleArrayOutput() FlexibleServerFirewallRuleArrayOutput { return o } func (o FlexibleServerFirewallRuleArrayOutput) ToFlexibleServerFirewallRuleArrayOutputWithContext(ctx context.Context) FlexibleServerFirewallRuleArrayOutput { return o } func (o FlexibleServerFirewallRuleArrayOutput) Index(i pulumi.IntInput) FlexibleServerFirewallRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FlexibleServerFirewallRule { return vs[0].([]*FlexibleServerFirewallRule)[vs[1].(int)] }).(FlexibleServerFirewallRuleOutput) } type FlexibleServerFirewallRuleMapOutput struct{ *pulumi.OutputState } func (FlexibleServerFirewallRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerFirewallRule)(nil)).Elem() } func (o FlexibleServerFirewallRuleMapOutput) ToFlexibleServerFirewallRuleMapOutput() FlexibleServerFirewallRuleMapOutput { return o } func (o FlexibleServerFirewallRuleMapOutput) ToFlexibleServerFirewallRuleMapOutputWithContext(ctx context.Context) FlexibleServerFirewallRuleMapOutput { return o } func (o FlexibleServerFirewallRuleMapOutput) MapIndex(k pulumi.StringInput) FlexibleServerFirewallRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FlexibleServerFirewallRule { return vs[0].(map[string]*FlexibleServerFirewallRule)[vs[1].(string)] }).(FlexibleServerFirewallRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerFirewallRuleInput)(nil)).Elem(), &FlexibleServerFirewallRule{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerFirewallRuleArrayInput)(nil)).Elem(), FlexibleServerFirewallRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerFirewallRuleMapInput)(nil)).Elem(), FlexibleServerFirewallRuleMap{}) pulumi.RegisterOutputType(FlexibleServerFirewallRuleOutput{}) pulumi.RegisterOutputType(FlexibleServerFirewallRuleArrayOutput{}) pulumi.RegisterOutputType(FlexibleServerFirewallRuleMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/flexibleServerDatabase.go
sdk/go/azure/postgresql/flexibleServerDatabase.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleFlexibleServer, err := postgresql.NewFlexibleServer(ctx, "example", &postgresql.FlexibleServerArgs{ // Name: pulumi.String("example-psqlflexibleserver"), // ResourceGroupName: example.Name, // Location: example.Location, // Version: pulumi.String("12"), // AdministratorLogin: pulumi.String("psqladmin"), // AdministratorPassword: pulumi.String("H@Sh1CoR3!"), // StorageMb: pulumi.Int(32768), // SkuName: pulumi.String("GP_Standard_D4s_v3"), // }) // if err != nil { // return err // } // _, err = postgresql.NewFlexibleServerDatabase(ctx, "example", &postgresql.FlexibleServerDatabaseArgs{ // Name: pulumi.String("exampledb"), // ServerId: exampleFlexibleServer.ID(), // Collation: pulumi.String("en_US.utf8"), // Charset: pulumi.String("UTF8"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DBforPostgreSQL` - 2025-08-01 // // ## Import // // Azure PostgreSQL Flexible Server Database can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:postgresql/flexibleServerDatabase:FlexibleServerDatabase example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DBforPostgreSQL/flexibleServers/flexibleServer1/databases/database1 // ``` type FlexibleServerDatabase struct { pulumi.CustomResourceState // Specifies the Charset for the Azure PostgreSQL Flexible Server Database, which needs [to be a valid PostgreSQL Charset](https://www.postgresql.org/docs/current/static/multibyte.html). Defaults to `UTF8`. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. Charset pulumi.StringPtrOutput `pulumi:"charset"` // Specifies the Collation for the Azure PostgreSQL Flexible Server Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Defaults to `en_US.utf8`. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. Collation pulumi.StringPtrOutput `pulumi:"collation"` // Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Azure PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Database. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. ServerId pulumi.StringOutput `pulumi:"serverId"` } // NewFlexibleServerDatabase registers a new resource with the given unique name, arguments, and options. func NewFlexibleServerDatabase(ctx *pulumi.Context, name string, args *FlexibleServerDatabaseArgs, opts ...pulumi.ResourceOption) (*FlexibleServerDatabase, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ServerId == nil { return nil, errors.New("invalid value for required argument 'ServerId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FlexibleServerDatabase err := ctx.RegisterResource("azure:postgresql/flexibleServerDatabase:FlexibleServerDatabase", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFlexibleServerDatabase gets an existing FlexibleServerDatabase resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetFlexibleServerDatabase(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FlexibleServerDatabaseState, opts ...pulumi.ResourceOption) (*FlexibleServerDatabase, error) { var resource FlexibleServerDatabase err := ctx.ReadResource("azure:postgresql/flexibleServerDatabase:FlexibleServerDatabase", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FlexibleServerDatabase resources. type flexibleServerDatabaseState struct { // Specifies the Charset for the Azure PostgreSQL Flexible Server Database, which needs [to be a valid PostgreSQL Charset](https://www.postgresql.org/docs/current/static/multibyte.html). Defaults to `UTF8`. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. Charset *string `pulumi:"charset"` // Specifies the Collation for the Azure PostgreSQL Flexible Server Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Defaults to `en_US.utf8`. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. Collation *string `pulumi:"collation"` // Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. Name *string `pulumi:"name"` // The ID of the Azure PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Database. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. ServerId *string `pulumi:"serverId"` } type FlexibleServerDatabaseState struct { // Specifies the Charset for the Azure PostgreSQL Flexible Server Database, which needs [to be a valid PostgreSQL Charset](https://www.postgresql.org/docs/current/static/multibyte.html). Defaults to `UTF8`. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. Charset pulumi.StringPtrInput // Specifies the Collation for the Azure PostgreSQL Flexible Server Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Defaults to `en_US.utf8`. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. Collation pulumi.StringPtrInput // Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. Name pulumi.StringPtrInput // The ID of the Azure PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Database. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. ServerId pulumi.StringPtrInput } func (FlexibleServerDatabaseState) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerDatabaseState)(nil)).Elem() } type flexibleServerDatabaseArgs struct { // Specifies the Charset for the Azure PostgreSQL Flexible Server Database, which needs [to be a valid PostgreSQL Charset](https://www.postgresql.org/docs/current/static/multibyte.html). Defaults to `UTF8`. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. Charset *string `pulumi:"charset"` // Specifies the Collation for the Azure PostgreSQL Flexible Server Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Defaults to `en_US.utf8`. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. Collation *string `pulumi:"collation"` // Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. Name *string `pulumi:"name"` // The ID of the Azure PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Database. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. ServerId string `pulumi:"serverId"` } // The set of arguments for constructing a FlexibleServerDatabase resource. type FlexibleServerDatabaseArgs struct { // Specifies the Charset for the Azure PostgreSQL Flexible Server Database, which needs [to be a valid PostgreSQL Charset](https://www.postgresql.org/docs/current/static/multibyte.html). Defaults to `UTF8`. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. Charset pulumi.StringPtrInput // Specifies the Collation for the Azure PostgreSQL Flexible Server Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Defaults to `en_US.utf8`. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. Collation pulumi.StringPtrInput // Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. Name pulumi.StringPtrInput // The ID of the Azure PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Database. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. ServerId pulumi.StringInput } func (FlexibleServerDatabaseArgs) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerDatabaseArgs)(nil)).Elem() } type FlexibleServerDatabaseInput interface { pulumi.Input ToFlexibleServerDatabaseOutput() FlexibleServerDatabaseOutput ToFlexibleServerDatabaseOutputWithContext(ctx context.Context) FlexibleServerDatabaseOutput } func (*FlexibleServerDatabase) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerDatabase)(nil)).Elem() } func (i *FlexibleServerDatabase) ToFlexibleServerDatabaseOutput() FlexibleServerDatabaseOutput { return i.ToFlexibleServerDatabaseOutputWithContext(context.Background()) } func (i *FlexibleServerDatabase) ToFlexibleServerDatabaseOutputWithContext(ctx context.Context) FlexibleServerDatabaseOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerDatabaseOutput) } // FlexibleServerDatabaseArrayInput is an input type that accepts FlexibleServerDatabaseArray and FlexibleServerDatabaseArrayOutput values. // You can construct a concrete instance of `FlexibleServerDatabaseArrayInput` via: // // FlexibleServerDatabaseArray{ FlexibleServerDatabaseArgs{...} } type FlexibleServerDatabaseArrayInput interface { pulumi.Input ToFlexibleServerDatabaseArrayOutput() FlexibleServerDatabaseArrayOutput ToFlexibleServerDatabaseArrayOutputWithContext(context.Context) FlexibleServerDatabaseArrayOutput } type FlexibleServerDatabaseArray []FlexibleServerDatabaseInput func (FlexibleServerDatabaseArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerDatabase)(nil)).Elem() } func (i FlexibleServerDatabaseArray) ToFlexibleServerDatabaseArrayOutput() FlexibleServerDatabaseArrayOutput { return i.ToFlexibleServerDatabaseArrayOutputWithContext(context.Background()) } func (i FlexibleServerDatabaseArray) ToFlexibleServerDatabaseArrayOutputWithContext(ctx context.Context) FlexibleServerDatabaseArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerDatabaseArrayOutput) } // FlexibleServerDatabaseMapInput is an input type that accepts FlexibleServerDatabaseMap and FlexibleServerDatabaseMapOutput values. // You can construct a concrete instance of `FlexibleServerDatabaseMapInput` via: // // FlexibleServerDatabaseMap{ "key": FlexibleServerDatabaseArgs{...} } type FlexibleServerDatabaseMapInput interface { pulumi.Input ToFlexibleServerDatabaseMapOutput() FlexibleServerDatabaseMapOutput ToFlexibleServerDatabaseMapOutputWithContext(context.Context) FlexibleServerDatabaseMapOutput } type FlexibleServerDatabaseMap map[string]FlexibleServerDatabaseInput func (FlexibleServerDatabaseMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerDatabase)(nil)).Elem() } func (i FlexibleServerDatabaseMap) ToFlexibleServerDatabaseMapOutput() FlexibleServerDatabaseMapOutput { return i.ToFlexibleServerDatabaseMapOutputWithContext(context.Background()) } func (i FlexibleServerDatabaseMap) ToFlexibleServerDatabaseMapOutputWithContext(ctx context.Context) FlexibleServerDatabaseMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerDatabaseMapOutput) } type FlexibleServerDatabaseOutput struct{ *pulumi.OutputState } func (FlexibleServerDatabaseOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerDatabase)(nil)).Elem() } func (o FlexibleServerDatabaseOutput) ToFlexibleServerDatabaseOutput() FlexibleServerDatabaseOutput { return o } func (o FlexibleServerDatabaseOutput) ToFlexibleServerDatabaseOutputWithContext(ctx context.Context) FlexibleServerDatabaseOutput { return o } // Specifies the Charset for the Azure PostgreSQL Flexible Server Database, which needs [to be a valid PostgreSQL Charset](https://www.postgresql.org/docs/current/static/multibyte.html). Defaults to `UTF8`. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. func (o FlexibleServerDatabaseOutput) Charset() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerDatabase) pulumi.StringPtrOutput { return v.Charset }).(pulumi.StringPtrOutput) } // Specifies the Collation for the Azure PostgreSQL Flexible Server Database, which needs [to be a valid PostgreSQL Collation](https://www.postgresql.org/docs/current/static/collation.html). Defaults to `en_US.utf8`. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. func (o FlexibleServerDatabaseOutput) Collation() pulumi.StringPtrOutput { return o.ApplyT(func(v *FlexibleServerDatabase) pulumi.StringPtrOutput { return v.Collation }).(pulumi.StringPtrOutput) } // Specifies the name of the PostgreSQL Database, which needs [to be a valid PostgreSQL identifier](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS). Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. func (o FlexibleServerDatabaseOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerDatabase) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Azure PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Database. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. func (o FlexibleServerDatabaseOutput) ServerId() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerDatabase) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput) } type FlexibleServerDatabaseArrayOutput struct{ *pulumi.OutputState } func (FlexibleServerDatabaseArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerDatabase)(nil)).Elem() } func (o FlexibleServerDatabaseArrayOutput) ToFlexibleServerDatabaseArrayOutput() FlexibleServerDatabaseArrayOutput { return o } func (o FlexibleServerDatabaseArrayOutput) ToFlexibleServerDatabaseArrayOutputWithContext(ctx context.Context) FlexibleServerDatabaseArrayOutput { return o } func (o FlexibleServerDatabaseArrayOutput) Index(i pulumi.IntInput) FlexibleServerDatabaseOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FlexibleServerDatabase { return vs[0].([]*FlexibleServerDatabase)[vs[1].(int)] }).(FlexibleServerDatabaseOutput) } type FlexibleServerDatabaseMapOutput struct{ *pulumi.OutputState } func (FlexibleServerDatabaseMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerDatabase)(nil)).Elem() } func (o FlexibleServerDatabaseMapOutput) ToFlexibleServerDatabaseMapOutput() FlexibleServerDatabaseMapOutput { return o } func (o FlexibleServerDatabaseMapOutput) ToFlexibleServerDatabaseMapOutputWithContext(ctx context.Context) FlexibleServerDatabaseMapOutput { return o } func (o FlexibleServerDatabaseMapOutput) MapIndex(k pulumi.StringInput) FlexibleServerDatabaseOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FlexibleServerDatabase { return vs[0].(map[string]*FlexibleServerDatabase)[vs[1].(string)] }).(FlexibleServerDatabaseOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerDatabaseInput)(nil)).Elem(), &FlexibleServerDatabase{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerDatabaseArrayInput)(nil)).Elem(), FlexibleServerDatabaseArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerDatabaseMapInput)(nil)).Elem(), FlexibleServerDatabaseMap{}) pulumi.RegisterOutputType(FlexibleServerDatabaseOutput{}) pulumi.RegisterOutputType(FlexibleServerDatabaseArrayOutput{}) pulumi.RegisterOutputType(FlexibleServerDatabaseMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/flexibleServerActiveDirectoryAdministrator.go
sdk/go/azure/postgresql/flexibleServerActiveDirectoryAdministrator.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Allows you to set a user or group as the AD administrator for a PostgreSQL Flexible Server. // // ## Import // // A PostgreSQL Flexible Server Active Directory Administrator can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:postgresql/flexibleServerActiveDirectoryAdministrator:FlexibleServerActiveDirectoryAdministrator example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/myserver/administrators/objectId // ``` type FlexibleServerActiveDirectoryAdministrator struct { pulumi.CustomResourceState // The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created. ObjectId pulumi.StringOutput `pulumi:"objectId"` // The name of Azure Active Directory principal. Changing this forces a new resource to be created. PrincipalName pulumi.StringOutput `pulumi:"principalName"` // The type of Azure Active Directory principal. Possible values are `Group`, `ServicePrincipal` and `User`. Changing this forces a new resource to be created. PrincipalType pulumi.StringOutput `pulumi:"principalType"` // The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created. ServerName pulumi.StringOutput `pulumi:"serverName"` // The Azure Tenant ID. Changing this forces a new resource to be created. TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewFlexibleServerActiveDirectoryAdministrator registers a new resource with the given unique name, arguments, and options. func NewFlexibleServerActiveDirectoryAdministrator(ctx *pulumi.Context, name string, args *FlexibleServerActiveDirectoryAdministratorArgs, opts ...pulumi.ResourceOption) (*FlexibleServerActiveDirectoryAdministrator, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ObjectId == nil { return nil, errors.New("invalid value for required argument 'ObjectId'") } if args.PrincipalName == nil { return nil, errors.New("invalid value for required argument 'PrincipalName'") } if args.PrincipalType == nil { return nil, errors.New("invalid value for required argument 'PrincipalType'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.ServerName == nil { return nil, errors.New("invalid value for required argument 'ServerName'") } if args.TenantId == nil { return nil, errors.New("invalid value for required argument 'TenantId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FlexibleServerActiveDirectoryAdministrator err := ctx.RegisterResource("azure:postgresql/flexibleServerActiveDirectoryAdministrator:FlexibleServerActiveDirectoryAdministrator", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFlexibleServerActiveDirectoryAdministrator gets an existing FlexibleServerActiveDirectoryAdministrator resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetFlexibleServerActiveDirectoryAdministrator(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FlexibleServerActiveDirectoryAdministratorState, opts ...pulumi.ResourceOption) (*FlexibleServerActiveDirectoryAdministrator, error) { var resource FlexibleServerActiveDirectoryAdministrator err := ctx.ReadResource("azure:postgresql/flexibleServerActiveDirectoryAdministrator:FlexibleServerActiveDirectoryAdministrator", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FlexibleServerActiveDirectoryAdministrator resources. type flexibleServerActiveDirectoryAdministratorState struct { // The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created. ObjectId *string `pulumi:"objectId"` // The name of Azure Active Directory principal. Changing this forces a new resource to be created. PrincipalName *string `pulumi:"principalName"` // The type of Azure Active Directory principal. Possible values are `Group`, `ServicePrincipal` and `User`. Changing this forces a new resource to be created. PrincipalType *string `pulumi:"principalType"` // The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created. ServerName *string `pulumi:"serverName"` // The Azure Tenant ID. Changing this forces a new resource to be created. TenantId *string `pulumi:"tenantId"` } type FlexibleServerActiveDirectoryAdministratorState struct { // The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created. ObjectId pulumi.StringPtrInput // The name of Azure Active Directory principal. Changing this forces a new resource to be created. PrincipalName pulumi.StringPtrInput // The type of Azure Active Directory principal. Possible values are `Group`, `ServicePrincipal` and `User`. Changing this forces a new resource to be created. PrincipalType pulumi.StringPtrInput // The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created. ServerName pulumi.StringPtrInput // The Azure Tenant ID. Changing this forces a new resource to be created. TenantId pulumi.StringPtrInput } func (FlexibleServerActiveDirectoryAdministratorState) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerActiveDirectoryAdministratorState)(nil)).Elem() } type flexibleServerActiveDirectoryAdministratorArgs struct { // The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created. ObjectId string `pulumi:"objectId"` // The name of Azure Active Directory principal. Changing this forces a new resource to be created. PrincipalName string `pulumi:"principalName"` // The type of Azure Active Directory principal. Possible values are `Group`, `ServicePrincipal` and `User`. Changing this forces a new resource to be created. PrincipalType string `pulumi:"principalType"` // The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created. ServerName string `pulumi:"serverName"` // The Azure Tenant ID. Changing this forces a new resource to be created. TenantId string `pulumi:"tenantId"` } // The set of arguments for constructing a FlexibleServerActiveDirectoryAdministrator resource. type FlexibleServerActiveDirectoryAdministratorArgs struct { // The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created. ObjectId pulumi.StringInput // The name of Azure Active Directory principal. Changing this forces a new resource to be created. PrincipalName pulumi.StringInput // The type of Azure Active Directory principal. Possible values are `Group`, `ServicePrincipal` and `User`. Changing this forces a new resource to be created. PrincipalType pulumi.StringInput // The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created. ServerName pulumi.StringInput // The Azure Tenant ID. Changing this forces a new resource to be created. TenantId pulumi.StringInput } func (FlexibleServerActiveDirectoryAdministratorArgs) ElementType() reflect.Type { return reflect.TypeOf((*flexibleServerActiveDirectoryAdministratorArgs)(nil)).Elem() } type FlexibleServerActiveDirectoryAdministratorInput interface { pulumi.Input ToFlexibleServerActiveDirectoryAdministratorOutput() FlexibleServerActiveDirectoryAdministratorOutput ToFlexibleServerActiveDirectoryAdministratorOutputWithContext(ctx context.Context) FlexibleServerActiveDirectoryAdministratorOutput } func (*FlexibleServerActiveDirectoryAdministrator) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerActiveDirectoryAdministrator)(nil)).Elem() } func (i *FlexibleServerActiveDirectoryAdministrator) ToFlexibleServerActiveDirectoryAdministratorOutput() FlexibleServerActiveDirectoryAdministratorOutput { return i.ToFlexibleServerActiveDirectoryAdministratorOutputWithContext(context.Background()) } func (i *FlexibleServerActiveDirectoryAdministrator) ToFlexibleServerActiveDirectoryAdministratorOutputWithContext(ctx context.Context) FlexibleServerActiveDirectoryAdministratorOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerActiveDirectoryAdministratorOutput) } // FlexibleServerActiveDirectoryAdministratorArrayInput is an input type that accepts FlexibleServerActiveDirectoryAdministratorArray and FlexibleServerActiveDirectoryAdministratorArrayOutput values. // You can construct a concrete instance of `FlexibleServerActiveDirectoryAdministratorArrayInput` via: // // FlexibleServerActiveDirectoryAdministratorArray{ FlexibleServerActiveDirectoryAdministratorArgs{...} } type FlexibleServerActiveDirectoryAdministratorArrayInput interface { pulumi.Input ToFlexibleServerActiveDirectoryAdministratorArrayOutput() FlexibleServerActiveDirectoryAdministratorArrayOutput ToFlexibleServerActiveDirectoryAdministratorArrayOutputWithContext(context.Context) FlexibleServerActiveDirectoryAdministratorArrayOutput } type FlexibleServerActiveDirectoryAdministratorArray []FlexibleServerActiveDirectoryAdministratorInput func (FlexibleServerActiveDirectoryAdministratorArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerActiveDirectoryAdministrator)(nil)).Elem() } func (i FlexibleServerActiveDirectoryAdministratorArray) ToFlexibleServerActiveDirectoryAdministratorArrayOutput() FlexibleServerActiveDirectoryAdministratorArrayOutput { return i.ToFlexibleServerActiveDirectoryAdministratorArrayOutputWithContext(context.Background()) } func (i FlexibleServerActiveDirectoryAdministratorArray) ToFlexibleServerActiveDirectoryAdministratorArrayOutputWithContext(ctx context.Context) FlexibleServerActiveDirectoryAdministratorArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerActiveDirectoryAdministratorArrayOutput) } // FlexibleServerActiveDirectoryAdministratorMapInput is an input type that accepts FlexibleServerActiveDirectoryAdministratorMap and FlexibleServerActiveDirectoryAdministratorMapOutput values. // You can construct a concrete instance of `FlexibleServerActiveDirectoryAdministratorMapInput` via: // // FlexibleServerActiveDirectoryAdministratorMap{ "key": FlexibleServerActiveDirectoryAdministratorArgs{...} } type FlexibleServerActiveDirectoryAdministratorMapInput interface { pulumi.Input ToFlexibleServerActiveDirectoryAdministratorMapOutput() FlexibleServerActiveDirectoryAdministratorMapOutput ToFlexibleServerActiveDirectoryAdministratorMapOutputWithContext(context.Context) FlexibleServerActiveDirectoryAdministratorMapOutput } type FlexibleServerActiveDirectoryAdministratorMap map[string]FlexibleServerActiveDirectoryAdministratorInput func (FlexibleServerActiveDirectoryAdministratorMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerActiveDirectoryAdministrator)(nil)).Elem() } func (i FlexibleServerActiveDirectoryAdministratorMap) ToFlexibleServerActiveDirectoryAdministratorMapOutput() FlexibleServerActiveDirectoryAdministratorMapOutput { return i.ToFlexibleServerActiveDirectoryAdministratorMapOutputWithContext(context.Background()) } func (i FlexibleServerActiveDirectoryAdministratorMap) ToFlexibleServerActiveDirectoryAdministratorMapOutputWithContext(ctx context.Context) FlexibleServerActiveDirectoryAdministratorMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FlexibleServerActiveDirectoryAdministratorMapOutput) } type FlexibleServerActiveDirectoryAdministratorOutput struct{ *pulumi.OutputState } func (FlexibleServerActiveDirectoryAdministratorOutput) ElementType() reflect.Type { return reflect.TypeOf((**FlexibleServerActiveDirectoryAdministrator)(nil)).Elem() } func (o FlexibleServerActiveDirectoryAdministratorOutput) ToFlexibleServerActiveDirectoryAdministratorOutput() FlexibleServerActiveDirectoryAdministratorOutput { return o } func (o FlexibleServerActiveDirectoryAdministratorOutput) ToFlexibleServerActiveDirectoryAdministratorOutputWithContext(ctx context.Context) FlexibleServerActiveDirectoryAdministratorOutput { return o } // The object ID of a user, service principal or security group in the Azure Active Directory tenant set as the Flexible Server Admin. Changing this forces a new resource to be created. func (o FlexibleServerActiveDirectoryAdministratorOutput) ObjectId() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerActiveDirectoryAdministrator) pulumi.StringOutput { return v.ObjectId }).(pulumi.StringOutput) } // The name of Azure Active Directory principal. Changing this forces a new resource to be created. func (o FlexibleServerActiveDirectoryAdministratorOutput) PrincipalName() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerActiveDirectoryAdministrator) pulumi.StringOutput { return v.PrincipalName }).(pulumi.StringOutput) } // The type of Azure Active Directory principal. Possible values are `Group`, `ServicePrincipal` and `User`. Changing this forces a new resource to be created. func (o FlexibleServerActiveDirectoryAdministratorOutput) PrincipalType() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerActiveDirectoryAdministrator) pulumi.StringOutput { return v.PrincipalType }).(pulumi.StringOutput) } // The name of the resource group for the PostgreSQL Server. Changing this forces a new resource to be created. func (o FlexibleServerActiveDirectoryAdministratorOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerActiveDirectoryAdministrator) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The name of the PostgreSQL Flexible Server on which to set the administrator. Changing this forces a new resource to be created. func (o FlexibleServerActiveDirectoryAdministratorOutput) ServerName() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerActiveDirectoryAdministrator) pulumi.StringOutput { return v.ServerName }).(pulumi.StringOutput) } // The Azure Tenant ID. Changing this forces a new resource to be created. func (o FlexibleServerActiveDirectoryAdministratorOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *FlexibleServerActiveDirectoryAdministrator) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type FlexibleServerActiveDirectoryAdministratorArrayOutput struct{ *pulumi.OutputState } func (FlexibleServerActiveDirectoryAdministratorArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FlexibleServerActiveDirectoryAdministrator)(nil)).Elem() } func (o FlexibleServerActiveDirectoryAdministratorArrayOutput) ToFlexibleServerActiveDirectoryAdministratorArrayOutput() FlexibleServerActiveDirectoryAdministratorArrayOutput { return o } func (o FlexibleServerActiveDirectoryAdministratorArrayOutput) ToFlexibleServerActiveDirectoryAdministratorArrayOutputWithContext(ctx context.Context) FlexibleServerActiveDirectoryAdministratorArrayOutput { return o } func (o FlexibleServerActiveDirectoryAdministratorArrayOutput) Index(i pulumi.IntInput) FlexibleServerActiveDirectoryAdministratorOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FlexibleServerActiveDirectoryAdministrator { return vs[0].([]*FlexibleServerActiveDirectoryAdministrator)[vs[1].(int)] }).(FlexibleServerActiveDirectoryAdministratorOutput) } type FlexibleServerActiveDirectoryAdministratorMapOutput struct{ *pulumi.OutputState } func (FlexibleServerActiveDirectoryAdministratorMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FlexibleServerActiveDirectoryAdministrator)(nil)).Elem() } func (o FlexibleServerActiveDirectoryAdministratorMapOutput) ToFlexibleServerActiveDirectoryAdministratorMapOutput() FlexibleServerActiveDirectoryAdministratorMapOutput { return o } func (o FlexibleServerActiveDirectoryAdministratorMapOutput) ToFlexibleServerActiveDirectoryAdministratorMapOutputWithContext(ctx context.Context) FlexibleServerActiveDirectoryAdministratorMapOutput { return o } func (o FlexibleServerActiveDirectoryAdministratorMapOutput) MapIndex(k pulumi.StringInput) FlexibleServerActiveDirectoryAdministratorOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FlexibleServerActiveDirectoryAdministrator { return vs[0].(map[string]*FlexibleServerActiveDirectoryAdministrator)[vs[1].(string)] }).(FlexibleServerActiveDirectoryAdministratorOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerActiveDirectoryAdministratorInput)(nil)).Elem(), &FlexibleServerActiveDirectoryAdministrator{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerActiveDirectoryAdministratorArrayInput)(nil)).Elem(), FlexibleServerActiveDirectoryAdministratorArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FlexibleServerActiveDirectoryAdministratorMapInput)(nil)).Elem(), FlexibleServerActiveDirectoryAdministratorMap{}) pulumi.RegisterOutputType(FlexibleServerActiveDirectoryAdministratorOutput{}) pulumi.RegisterOutputType(FlexibleServerActiveDirectoryAdministratorArrayOutput{}) pulumi.RegisterOutputType(FlexibleServerActiveDirectoryAdministratorMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/serverKey.go
sdk/go/azure/postgresql/serverKey.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Customer Managed Key for a PostgreSQL Server. // // > **Note:** The `postgresql.ServerKey` resource is deprecated and will be removed in v5.0 of the AzureRM Provider. Azure Database for PostgreSQL Single Server and its sub resources have been retired as of 2025-03-28. For more information, see https://techcommunity.microsoft.com/blog/adforpostgresql/retiring-azure-database-for-postgresql-single-server-in-2025/3783783. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("examplekv"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("premium"), // PurgeProtectionEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // exampleServer, err := postgresql.NewServer(ctx, "example", &postgresql.ServerArgs{ // Name: pulumi.String("example-postgre-server"), // Location: example.Location, // ResourceGroupName: example.Name, // AdministratorLogin: pulumi.String("psqladmin"), // AdministratorLoginPassword: pulumi.String("H@Sh1CoR3!"), // SkuName: pulumi.String("GP_Gen5_2"), // Version: pulumi.String("11"), // StorageMb: pulumi.Int(51200), // SslEnforcementEnabled: pulumi.Bool(true), // Identity: &postgresql.ServerIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // server, err := keyvault.NewAccessPolicy(ctx, "server", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(exampleServer.Identity.ApplyT(func(identity postgresql.ServerIdentity) (*string, error) { // return &identity.PrincipalId, nil // }).(pulumi.StringPtrOutput)), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("UnwrapKey"), // pulumi.String("WrapKey"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("Get"), // }, // }) // if err != nil { // return err // } // client, err := keyvault.NewAccessPolicy(ctx, "client", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("List"), // pulumi.String("Restore"), // pulumi.String("Recover"), // pulumi.String("UnwrapKey"), // pulumi.String("WrapKey"), // pulumi.String("Purge"), // pulumi.String("Encrypt"), // pulumi.String("Decrypt"), // pulumi.String("Sign"), // pulumi.String("Verify"), // pulumi.String("GetRotationPolicy"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("Get"), // }, // }) // if err != nil { // return err // } // exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{ // Name: pulumi.String("tfex-key"), // KeyVaultId: exampleKeyVault.ID(), // KeyType: pulumi.String("RSA"), // KeySize: pulumi.Int(2048), // KeyOpts: pulumi.StringArray{ // pulumi.String("decrypt"), // pulumi.String("encrypt"), // pulumi.String("sign"), // pulumi.String("unwrapKey"), // pulumi.String("verify"), // pulumi.String("wrapKey"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // client, // server, // })) // if err != nil { // return err // } // _, err = postgresql.NewServerKey(ctx, "example", &postgresql.ServerKeyArgs{ // ServerId: exampleServer.ID(), // KeyVaultKeyId: exampleKey.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DBforPostgreSQL` - 2020-01-01 // // ## Import // // A PostgreSQL Server Key can be imported using the `resource id` of the PostgreSQL Server Key, e.g. // // ```sh // $ pulumi import azure:postgresql/serverKey:ServerKey example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DBforPostgreSQL/servers/server1/keys/keyvaultname_key-name_keyversion // ``` type ServerKey struct { pulumi.CustomResourceState // The URL to a Key Vault Key. KeyVaultKeyId pulumi.StringOutput `pulumi:"keyVaultKeyId"` // The ID of the PostgreSQL Server. Changing this forces a new resource to be created. ServerId pulumi.StringOutput `pulumi:"serverId"` } // NewServerKey registers a new resource with the given unique name, arguments, and options. func NewServerKey(ctx *pulumi.Context, name string, args *ServerKeyArgs, opts ...pulumi.ResourceOption) (*ServerKey, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.KeyVaultKeyId == nil { return nil, errors.New("invalid value for required argument 'KeyVaultKeyId'") } if args.ServerId == nil { return nil, errors.New("invalid value for required argument 'ServerId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ServerKey err := ctx.RegisterResource("azure:postgresql/serverKey:ServerKey", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetServerKey gets an existing ServerKey resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetServerKey(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ServerKeyState, opts ...pulumi.ResourceOption) (*ServerKey, error) { var resource ServerKey err := ctx.ReadResource("azure:postgresql/serverKey:ServerKey", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ServerKey resources. type serverKeyState struct { // The URL to a Key Vault Key. KeyVaultKeyId *string `pulumi:"keyVaultKeyId"` // The ID of the PostgreSQL Server. Changing this forces a new resource to be created. ServerId *string `pulumi:"serverId"` } type ServerKeyState struct { // The URL to a Key Vault Key. KeyVaultKeyId pulumi.StringPtrInput // The ID of the PostgreSQL Server. Changing this forces a new resource to be created. ServerId pulumi.StringPtrInput } func (ServerKeyState) ElementType() reflect.Type { return reflect.TypeOf((*serverKeyState)(nil)).Elem() } type serverKeyArgs struct { // The URL to a Key Vault Key. KeyVaultKeyId string `pulumi:"keyVaultKeyId"` // The ID of the PostgreSQL Server. Changing this forces a new resource to be created. ServerId string `pulumi:"serverId"` } // The set of arguments for constructing a ServerKey resource. type ServerKeyArgs struct { // The URL to a Key Vault Key. KeyVaultKeyId pulumi.StringInput // The ID of the PostgreSQL Server. Changing this forces a new resource to be created. ServerId pulumi.StringInput } func (ServerKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*serverKeyArgs)(nil)).Elem() } type ServerKeyInput interface { pulumi.Input ToServerKeyOutput() ServerKeyOutput ToServerKeyOutputWithContext(ctx context.Context) ServerKeyOutput } func (*ServerKey) ElementType() reflect.Type { return reflect.TypeOf((**ServerKey)(nil)).Elem() } func (i *ServerKey) ToServerKeyOutput() ServerKeyOutput { return i.ToServerKeyOutputWithContext(context.Background()) } func (i *ServerKey) ToServerKeyOutputWithContext(ctx context.Context) ServerKeyOutput { return pulumi.ToOutputWithContext(ctx, i).(ServerKeyOutput) } // ServerKeyArrayInput is an input type that accepts ServerKeyArray and ServerKeyArrayOutput values. // You can construct a concrete instance of `ServerKeyArrayInput` via: // // ServerKeyArray{ ServerKeyArgs{...} } type ServerKeyArrayInput interface { pulumi.Input ToServerKeyArrayOutput() ServerKeyArrayOutput ToServerKeyArrayOutputWithContext(context.Context) ServerKeyArrayOutput } type ServerKeyArray []ServerKeyInput func (ServerKeyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ServerKey)(nil)).Elem() } func (i ServerKeyArray) ToServerKeyArrayOutput() ServerKeyArrayOutput { return i.ToServerKeyArrayOutputWithContext(context.Background()) } func (i ServerKeyArray) ToServerKeyArrayOutputWithContext(ctx context.Context) ServerKeyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ServerKeyArrayOutput) } // ServerKeyMapInput is an input type that accepts ServerKeyMap and ServerKeyMapOutput values. // You can construct a concrete instance of `ServerKeyMapInput` via: // // ServerKeyMap{ "key": ServerKeyArgs{...} } type ServerKeyMapInput interface { pulumi.Input ToServerKeyMapOutput() ServerKeyMapOutput ToServerKeyMapOutputWithContext(context.Context) ServerKeyMapOutput } type ServerKeyMap map[string]ServerKeyInput func (ServerKeyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ServerKey)(nil)).Elem() } func (i ServerKeyMap) ToServerKeyMapOutput() ServerKeyMapOutput { return i.ToServerKeyMapOutputWithContext(context.Background()) } func (i ServerKeyMap) ToServerKeyMapOutputWithContext(ctx context.Context) ServerKeyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ServerKeyMapOutput) } type ServerKeyOutput struct{ *pulumi.OutputState } func (ServerKeyOutput) ElementType() reflect.Type { return reflect.TypeOf((**ServerKey)(nil)).Elem() } func (o ServerKeyOutput) ToServerKeyOutput() ServerKeyOutput { return o } func (o ServerKeyOutput) ToServerKeyOutputWithContext(ctx context.Context) ServerKeyOutput { return o } // The URL to a Key Vault Key. func (o ServerKeyOutput) KeyVaultKeyId() pulumi.StringOutput { return o.ApplyT(func(v *ServerKey) pulumi.StringOutput { return v.KeyVaultKeyId }).(pulumi.StringOutput) } // The ID of the PostgreSQL Server. Changing this forces a new resource to be created. func (o ServerKeyOutput) ServerId() pulumi.StringOutput { return o.ApplyT(func(v *ServerKey) pulumi.StringOutput { return v.ServerId }).(pulumi.StringOutput) } type ServerKeyArrayOutput struct{ *pulumi.OutputState } func (ServerKeyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ServerKey)(nil)).Elem() } func (o ServerKeyArrayOutput) ToServerKeyArrayOutput() ServerKeyArrayOutput { return o } func (o ServerKeyArrayOutput) ToServerKeyArrayOutputWithContext(ctx context.Context) ServerKeyArrayOutput { return o } func (o ServerKeyArrayOutput) Index(i pulumi.IntInput) ServerKeyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServerKey { return vs[0].([]*ServerKey)[vs[1].(int)] }).(ServerKeyOutput) } type ServerKeyMapOutput struct{ *pulumi.OutputState } func (ServerKeyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ServerKey)(nil)).Elem() } func (o ServerKeyMapOutput) ToServerKeyMapOutput() ServerKeyMapOutput { return o } func (o ServerKeyMapOutput) ToServerKeyMapOutputWithContext(ctx context.Context) ServerKeyMapOutput { return o } func (o ServerKeyMapOutput) MapIndex(k pulumi.StringInput) ServerKeyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServerKey { return vs[0].(map[string]*ServerKey)[vs[1].(string)] }).(ServerKeyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ServerKeyInput)(nil)).Elem(), &ServerKey{}) pulumi.RegisterInputType(reflect.TypeOf((*ServerKeyArrayInput)(nil)).Elem(), ServerKeyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ServerKeyMapInput)(nil)).Elem(), ServerKeyMap{}) pulumi.RegisterOutputType(ServerKeyOutput{}) pulumi.RegisterOutputType(ServerKeyArrayOutput{}) pulumi.RegisterOutputType(ServerKeyMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/activeDirectoryAdministrator.go
sdk/go/azure/postgresql/activeDirectoryAdministrator.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Allows you to set a user or group as the AD administrator for an PostgreSQL server in Azure // // > **Note:** The `postgresql.ActiveDirectoryAdministrator` resource is deprecated and will be removed in v5.0 of the AzureRM Provider. Azure Database for PostgreSQL Single Server and its sub resources have been retired as of 2025-03-28, please use the `postgresql.FlexibleServerActiveDirectoryAdministrator` resource instead. For more information, see https://techcommunity.microsoft.com/blog/adforpostgresql/retiring-azure-database-for-postgresql-single-server-in-2025/3783783. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleServer, err := postgresql.NewServer(ctx, "example", &postgresql.ServerArgs{ // Name: pulumi.String("example-psqlserver"), // ResourceGroupName: example.Name, // Location: example.Location, // Version: pulumi.String("9.6"), // AdministratorLogin: pulumi.String("4dm1n157r470r"), // AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"), // SkuName: pulumi.String("GP_Gen5_2"), // SslEnforcementEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // _, err = postgresql.NewActiveDirectoryAdministrator(ctx, "example", &postgresql.ActiveDirectoryAdministratorArgs{ // ServerName: exampleServer.Name, // ResourceGroupName: example.Name, // Login: pulumi.String("sqladmin"), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DBforPostgreSQL` - 2017-12-01 // // ## Import // // A PostgreSQL Active Directory Administrator can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:postgresql/activeDirectoryAdministrator:ActiveDirectoryAdministrator administrator /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.DBforPostgreSQL/servers/myserver // ``` type ActiveDirectoryAdministrator struct { pulumi.CustomResourceState // The login name of the principal to set as the server administrator Login pulumi.StringOutput `pulumi:"login"` // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. ObjectId pulumi.StringOutput `pulumi:"objectId"` // The name of the resource group for the PostgreSQL server. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The name of the PostgreSQL Server on which to set the administrator. Changing this forces a new resource to be created. ServerName pulumi.StringOutput `pulumi:"serverName"` // The Azure Tenant ID TenantId pulumi.StringOutput `pulumi:"tenantId"` } // NewActiveDirectoryAdministrator registers a new resource with the given unique name, arguments, and options. func NewActiveDirectoryAdministrator(ctx *pulumi.Context, name string, args *ActiveDirectoryAdministratorArgs, opts ...pulumi.ResourceOption) (*ActiveDirectoryAdministrator, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Login == nil { return nil, errors.New("invalid value for required argument 'Login'") } if args.ObjectId == nil { return nil, errors.New("invalid value for required argument 'ObjectId'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.ServerName == nil { return nil, errors.New("invalid value for required argument 'ServerName'") } if args.TenantId == nil { return nil, errors.New("invalid value for required argument 'TenantId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ActiveDirectoryAdministrator err := ctx.RegisterResource("azure:postgresql/activeDirectoryAdministrator:ActiveDirectoryAdministrator", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetActiveDirectoryAdministrator gets an existing ActiveDirectoryAdministrator resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetActiveDirectoryAdministrator(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ActiveDirectoryAdministratorState, opts ...pulumi.ResourceOption) (*ActiveDirectoryAdministrator, error) { var resource ActiveDirectoryAdministrator err := ctx.ReadResource("azure:postgresql/activeDirectoryAdministrator:ActiveDirectoryAdministrator", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ActiveDirectoryAdministrator resources. type activeDirectoryAdministratorState struct { // The login name of the principal to set as the server administrator Login *string `pulumi:"login"` // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. ObjectId *string `pulumi:"objectId"` // The name of the resource group for the PostgreSQL server. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The name of the PostgreSQL Server on which to set the administrator. Changing this forces a new resource to be created. ServerName *string `pulumi:"serverName"` // The Azure Tenant ID TenantId *string `pulumi:"tenantId"` } type ActiveDirectoryAdministratorState struct { // The login name of the principal to set as the server administrator Login pulumi.StringPtrInput // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. ObjectId pulumi.StringPtrInput // The name of the resource group for the PostgreSQL server. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The name of the PostgreSQL Server on which to set the administrator. Changing this forces a new resource to be created. ServerName pulumi.StringPtrInput // The Azure Tenant ID TenantId pulumi.StringPtrInput } func (ActiveDirectoryAdministratorState) ElementType() reflect.Type { return reflect.TypeOf((*activeDirectoryAdministratorState)(nil)).Elem() } type activeDirectoryAdministratorArgs struct { // The login name of the principal to set as the server administrator Login string `pulumi:"login"` // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. ObjectId string `pulumi:"objectId"` // The name of the resource group for the PostgreSQL server. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The name of the PostgreSQL Server on which to set the administrator. Changing this forces a new resource to be created. ServerName string `pulumi:"serverName"` // The Azure Tenant ID TenantId string `pulumi:"tenantId"` } // The set of arguments for constructing a ActiveDirectoryAdministrator resource. type ActiveDirectoryAdministratorArgs struct { // The login name of the principal to set as the server administrator Login pulumi.StringInput // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. ObjectId pulumi.StringInput // The name of the resource group for the PostgreSQL server. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The name of the PostgreSQL Server on which to set the administrator. Changing this forces a new resource to be created. ServerName pulumi.StringInput // The Azure Tenant ID TenantId pulumi.StringInput } func (ActiveDirectoryAdministratorArgs) ElementType() reflect.Type { return reflect.TypeOf((*activeDirectoryAdministratorArgs)(nil)).Elem() } type ActiveDirectoryAdministratorInput interface { pulumi.Input ToActiveDirectoryAdministratorOutput() ActiveDirectoryAdministratorOutput ToActiveDirectoryAdministratorOutputWithContext(ctx context.Context) ActiveDirectoryAdministratorOutput } func (*ActiveDirectoryAdministrator) ElementType() reflect.Type { return reflect.TypeOf((**ActiveDirectoryAdministrator)(nil)).Elem() } func (i *ActiveDirectoryAdministrator) ToActiveDirectoryAdministratorOutput() ActiveDirectoryAdministratorOutput { return i.ToActiveDirectoryAdministratorOutputWithContext(context.Background()) } func (i *ActiveDirectoryAdministrator) ToActiveDirectoryAdministratorOutputWithContext(ctx context.Context) ActiveDirectoryAdministratorOutput { return pulumi.ToOutputWithContext(ctx, i).(ActiveDirectoryAdministratorOutput) } // ActiveDirectoryAdministratorArrayInput is an input type that accepts ActiveDirectoryAdministratorArray and ActiveDirectoryAdministratorArrayOutput values. // You can construct a concrete instance of `ActiveDirectoryAdministratorArrayInput` via: // // ActiveDirectoryAdministratorArray{ ActiveDirectoryAdministratorArgs{...} } type ActiveDirectoryAdministratorArrayInput interface { pulumi.Input ToActiveDirectoryAdministratorArrayOutput() ActiveDirectoryAdministratorArrayOutput ToActiveDirectoryAdministratorArrayOutputWithContext(context.Context) ActiveDirectoryAdministratorArrayOutput } type ActiveDirectoryAdministratorArray []ActiveDirectoryAdministratorInput func (ActiveDirectoryAdministratorArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ActiveDirectoryAdministrator)(nil)).Elem() } func (i ActiveDirectoryAdministratorArray) ToActiveDirectoryAdministratorArrayOutput() ActiveDirectoryAdministratorArrayOutput { return i.ToActiveDirectoryAdministratorArrayOutputWithContext(context.Background()) } func (i ActiveDirectoryAdministratorArray) ToActiveDirectoryAdministratorArrayOutputWithContext(ctx context.Context) ActiveDirectoryAdministratorArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ActiveDirectoryAdministratorArrayOutput) } // ActiveDirectoryAdministratorMapInput is an input type that accepts ActiveDirectoryAdministratorMap and ActiveDirectoryAdministratorMapOutput values. // You can construct a concrete instance of `ActiveDirectoryAdministratorMapInput` via: // // ActiveDirectoryAdministratorMap{ "key": ActiveDirectoryAdministratorArgs{...} } type ActiveDirectoryAdministratorMapInput interface { pulumi.Input ToActiveDirectoryAdministratorMapOutput() ActiveDirectoryAdministratorMapOutput ToActiveDirectoryAdministratorMapOutputWithContext(context.Context) ActiveDirectoryAdministratorMapOutput } type ActiveDirectoryAdministratorMap map[string]ActiveDirectoryAdministratorInput func (ActiveDirectoryAdministratorMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ActiveDirectoryAdministrator)(nil)).Elem() } func (i ActiveDirectoryAdministratorMap) ToActiveDirectoryAdministratorMapOutput() ActiveDirectoryAdministratorMapOutput { return i.ToActiveDirectoryAdministratorMapOutputWithContext(context.Background()) } func (i ActiveDirectoryAdministratorMap) ToActiveDirectoryAdministratorMapOutputWithContext(ctx context.Context) ActiveDirectoryAdministratorMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ActiveDirectoryAdministratorMapOutput) } type ActiveDirectoryAdministratorOutput struct{ *pulumi.OutputState } func (ActiveDirectoryAdministratorOutput) ElementType() reflect.Type { return reflect.TypeOf((**ActiveDirectoryAdministrator)(nil)).Elem() } func (o ActiveDirectoryAdministratorOutput) ToActiveDirectoryAdministratorOutput() ActiveDirectoryAdministratorOutput { return o } func (o ActiveDirectoryAdministratorOutput) ToActiveDirectoryAdministratorOutputWithContext(ctx context.Context) ActiveDirectoryAdministratorOutput { return o } // The login name of the principal to set as the server administrator func (o ActiveDirectoryAdministratorOutput) Login() pulumi.StringOutput { return o.ApplyT(func(v *ActiveDirectoryAdministrator) pulumi.StringOutput { return v.Login }).(pulumi.StringOutput) } // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. func (o ActiveDirectoryAdministratorOutput) ObjectId() pulumi.StringOutput { return o.ApplyT(func(v *ActiveDirectoryAdministrator) pulumi.StringOutput { return v.ObjectId }).(pulumi.StringOutput) } // The name of the resource group for the PostgreSQL server. Changing this forces a new resource to be created. func (o ActiveDirectoryAdministratorOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ActiveDirectoryAdministrator) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The name of the PostgreSQL Server on which to set the administrator. Changing this forces a new resource to be created. func (o ActiveDirectoryAdministratorOutput) ServerName() pulumi.StringOutput { return o.ApplyT(func(v *ActiveDirectoryAdministrator) pulumi.StringOutput { return v.ServerName }).(pulumi.StringOutput) } // The Azure Tenant ID func (o ActiveDirectoryAdministratorOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v *ActiveDirectoryAdministrator) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput) } type ActiveDirectoryAdministratorArrayOutput struct{ *pulumi.OutputState } func (ActiveDirectoryAdministratorArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ActiveDirectoryAdministrator)(nil)).Elem() } func (o ActiveDirectoryAdministratorArrayOutput) ToActiveDirectoryAdministratorArrayOutput() ActiveDirectoryAdministratorArrayOutput { return o } func (o ActiveDirectoryAdministratorArrayOutput) ToActiveDirectoryAdministratorArrayOutputWithContext(ctx context.Context) ActiveDirectoryAdministratorArrayOutput { return o } func (o ActiveDirectoryAdministratorArrayOutput) Index(i pulumi.IntInput) ActiveDirectoryAdministratorOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ActiveDirectoryAdministrator { return vs[0].([]*ActiveDirectoryAdministrator)[vs[1].(int)] }).(ActiveDirectoryAdministratorOutput) } type ActiveDirectoryAdministratorMapOutput struct{ *pulumi.OutputState } func (ActiveDirectoryAdministratorMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ActiveDirectoryAdministrator)(nil)).Elem() } func (o ActiveDirectoryAdministratorMapOutput) ToActiveDirectoryAdministratorMapOutput() ActiveDirectoryAdministratorMapOutput { return o } func (o ActiveDirectoryAdministratorMapOutput) ToActiveDirectoryAdministratorMapOutputWithContext(ctx context.Context) ActiveDirectoryAdministratorMapOutput { return o } func (o ActiveDirectoryAdministratorMapOutput) MapIndex(k pulumi.StringInput) ActiveDirectoryAdministratorOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ActiveDirectoryAdministrator { return vs[0].(map[string]*ActiveDirectoryAdministrator)[vs[1].(string)] }).(ActiveDirectoryAdministratorOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ActiveDirectoryAdministratorInput)(nil)).Elem(), &ActiveDirectoryAdministrator{}) pulumi.RegisterInputType(reflect.TypeOf((*ActiveDirectoryAdministratorArrayInput)(nil)).Elem(), ActiveDirectoryAdministratorArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ActiveDirectoryAdministratorMapInput)(nil)).Elem(), ActiveDirectoryAdministratorMap{}) pulumi.RegisterOutputType(ActiveDirectoryAdministratorOutput{}) pulumi.RegisterOutputType(ActiveDirectoryAdministratorArrayOutput{}) pulumi.RegisterOutputType(ActiveDirectoryAdministratorMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/postgresql/firewallRule.go
sdk/go/azure/postgresql/firewallRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package postgresql import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Firewall Rule for a PostgreSQL Server // // > **Note:** The `postgresql.FirewallRule` resource is deprecated and will be removed in v5.0 of the AzureRM Provider. Azure Database for PostgreSQL Single Server and its sub resources have been retired as of 2025-03-28, please use the `postgresql.FlexibleServerFirewallRule` resource instead. For more information, see https://techcommunity.microsoft.com/blog/adforpostgresql/retiring-azure-database-for-postgresql-single-server-in-2025/3783783. // // ## Example Usage // // ### Single IP Address) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("api-rg-pro"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleServer, err := postgresql.NewServer(ctx, "example", &postgresql.ServerArgs{ // Name: pulumi.String("example-postgre-server"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("GP_Gen5_2"), // Version: pulumi.String("11"), // SslEnforcementEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // _, err = postgresql.NewFirewallRule(ctx, "example", &postgresql.FirewallRuleArgs{ // Name: pulumi.String("office"), // ResourceGroupName: example.Name, // ServerName: exampleServer.Name, // StartIpAddress: pulumi.String("40.112.8.12"), // EndIpAddress: pulumi.String("40.112.8.12"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### IP Range) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/postgresql" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("api-rg-pro"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleServer, err := postgresql.NewServer(ctx, "example", nil) // if err != nil { // return err // } // _, err = postgresql.NewFirewallRule(ctx, "example", &postgresql.FirewallRuleArgs{ // Name: pulumi.String("office"), // ResourceGroupName: example.Name, // ServerName: exampleServer.Name, // StartIpAddress: pulumi.String("40.112.0.0"), // EndIpAddress: pulumi.String("40.112.255.255"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.DBforPostgreSQL` - 2017-12-01 // // ## Import // // PostgreSQL Firewall Rule's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:postgresql/firewallRule:FirewallRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforPostgreSQL/servers/server1/firewallRules/rule1 // ``` type FirewallRule struct { pulumi.CustomResourceState // Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)). EndIpAddress pulumi.StringOutput `pulumi:"endIpAddress"` // Specifies the name of the PostgreSQL Firewall Rule. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. ServerName pulumi.StringOutput `pulumi:"serverName"` // Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. StartIpAddress pulumi.StringOutput `pulumi:"startIpAddress"` } // NewFirewallRule registers a new resource with the given unique name, arguments, and options. func NewFirewallRule(ctx *pulumi.Context, name string, args *FirewallRuleArgs, opts ...pulumi.ResourceOption) (*FirewallRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.EndIpAddress == nil { return nil, errors.New("invalid value for required argument 'EndIpAddress'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.ServerName == nil { return nil, errors.New("invalid value for required argument 'ServerName'") } if args.StartIpAddress == nil { return nil, errors.New("invalid value for required argument 'StartIpAddress'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FirewallRule err := ctx.RegisterResource("azure:postgresql/firewallRule:FirewallRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFirewallRule gets an existing FirewallRule resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetFirewallRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FirewallRuleState, opts ...pulumi.ResourceOption) (*FirewallRule, error) { var resource FirewallRule err := ctx.ReadResource("azure:postgresql/firewallRule:FirewallRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FirewallRule resources. type firewallRuleState struct { // Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)). EndIpAddress *string `pulumi:"endIpAddress"` // Specifies the name of the PostgreSQL Firewall Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. ServerName *string `pulumi:"serverName"` // Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. StartIpAddress *string `pulumi:"startIpAddress"` } type FirewallRuleState struct { // Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)). EndIpAddress pulumi.StringPtrInput // Specifies the name of the PostgreSQL Firewall Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. ServerName pulumi.StringPtrInput // Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. StartIpAddress pulumi.StringPtrInput } func (FirewallRuleState) ElementType() reflect.Type { return reflect.TypeOf((*firewallRuleState)(nil)).Elem() } type firewallRuleArgs struct { // Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)). EndIpAddress string `pulumi:"endIpAddress"` // Specifies the name of the PostgreSQL Firewall Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. ServerName string `pulumi:"serverName"` // Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. StartIpAddress string `pulumi:"startIpAddress"` } // The set of arguments for constructing a FirewallRule resource. type FirewallRuleArgs struct { // Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)). EndIpAddress pulumi.StringInput // Specifies the name of the PostgreSQL Firewall Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. ServerName pulumi.StringInput // Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. StartIpAddress pulumi.StringInput } func (FirewallRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*firewallRuleArgs)(nil)).Elem() } type FirewallRuleInput interface { pulumi.Input ToFirewallRuleOutput() FirewallRuleOutput ToFirewallRuleOutputWithContext(ctx context.Context) FirewallRuleOutput } func (*FirewallRule) ElementType() reflect.Type { return reflect.TypeOf((**FirewallRule)(nil)).Elem() } func (i *FirewallRule) ToFirewallRuleOutput() FirewallRuleOutput { return i.ToFirewallRuleOutputWithContext(context.Background()) } func (i *FirewallRule) ToFirewallRuleOutputWithContext(ctx context.Context) FirewallRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallRuleOutput) } // FirewallRuleArrayInput is an input type that accepts FirewallRuleArray and FirewallRuleArrayOutput values. // You can construct a concrete instance of `FirewallRuleArrayInput` via: // // FirewallRuleArray{ FirewallRuleArgs{...} } type FirewallRuleArrayInput interface { pulumi.Input ToFirewallRuleArrayOutput() FirewallRuleArrayOutput ToFirewallRuleArrayOutputWithContext(context.Context) FirewallRuleArrayOutput } type FirewallRuleArray []FirewallRuleInput func (FirewallRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallRule)(nil)).Elem() } func (i FirewallRuleArray) ToFirewallRuleArrayOutput() FirewallRuleArrayOutput { return i.ToFirewallRuleArrayOutputWithContext(context.Background()) } func (i FirewallRuleArray) ToFirewallRuleArrayOutputWithContext(ctx context.Context) FirewallRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallRuleArrayOutput) } // FirewallRuleMapInput is an input type that accepts FirewallRuleMap and FirewallRuleMapOutput values. // You can construct a concrete instance of `FirewallRuleMapInput` via: // // FirewallRuleMap{ "key": FirewallRuleArgs{...} } type FirewallRuleMapInput interface { pulumi.Input ToFirewallRuleMapOutput() FirewallRuleMapOutput ToFirewallRuleMapOutputWithContext(context.Context) FirewallRuleMapOutput } type FirewallRuleMap map[string]FirewallRuleInput func (FirewallRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallRule)(nil)).Elem() } func (i FirewallRuleMap) ToFirewallRuleMapOutput() FirewallRuleMapOutput { return i.ToFirewallRuleMapOutputWithContext(context.Background()) } func (i FirewallRuleMap) ToFirewallRuleMapOutputWithContext(ctx context.Context) FirewallRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallRuleMapOutput) } type FirewallRuleOutput struct{ *pulumi.OutputState } func (FirewallRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**FirewallRule)(nil)).Elem() } func (o FirewallRuleOutput) ToFirewallRuleOutput() FirewallRuleOutput { return o } func (o FirewallRuleOutput) ToFirewallRuleOutputWithContext(ctx context.Context) FirewallRuleOutput { return o } // Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. // // > **Note:** The Azure feature `Allow access to Azure services` can be enabled by setting `startIpAddress` and `endIpAddress` to `0.0.0.0` which ([is documented in the Azure API Docs](https://docs.microsoft.com/rest/api/sql/firewallrules/createorupdate)). func (o FirewallRuleOutput) EndIpAddress() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.EndIpAddress }).(pulumi.StringOutput) } // Specifies the name of the PostgreSQL Firewall Rule. Changing this forces a new resource to be created. func (o FirewallRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. func (o FirewallRuleOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. func (o FirewallRuleOutput) ServerName() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.ServerName }).(pulumi.StringOutput) } // Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. func (o FirewallRuleOutput) StartIpAddress() pulumi.StringOutput { return o.ApplyT(func(v *FirewallRule) pulumi.StringOutput { return v.StartIpAddress }).(pulumi.StringOutput) } type FirewallRuleArrayOutput struct{ *pulumi.OutputState } func (FirewallRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallRule)(nil)).Elem() } func (o FirewallRuleArrayOutput) ToFirewallRuleArrayOutput() FirewallRuleArrayOutput { return o } func (o FirewallRuleArrayOutput) ToFirewallRuleArrayOutputWithContext(ctx context.Context) FirewallRuleArrayOutput { return o } func (o FirewallRuleArrayOutput) Index(i pulumi.IntInput) FirewallRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FirewallRule { return vs[0].([]*FirewallRule)[vs[1].(int)] }).(FirewallRuleOutput) } type FirewallRuleMapOutput struct{ *pulumi.OutputState } func (FirewallRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallRule)(nil)).Elem() } func (o FirewallRuleMapOutput) ToFirewallRuleMapOutput() FirewallRuleMapOutput { return o } func (o FirewallRuleMapOutput) ToFirewallRuleMapOutputWithContext(ctx context.Context) FirewallRuleMapOutput { return o } func (o FirewallRuleMapOutput) MapIndex(k pulumi.StringInput) FirewallRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FirewallRule { return vs[0].(map[string]*FirewallRule)[vs[1].(string)] }).(FirewallRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FirewallRuleInput)(nil)).Elem(), &FirewallRule{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallRuleArrayInput)(nil)).Elem(), FirewallRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallRuleMapInput)(nil)).Elem(), FirewallRuleMap{}) pulumi.RegisterOutputType(FirewallRuleOutput{}) pulumi.RegisterOutputType(FirewallRuleArrayOutput{}) pulumi.RegisterOutputType(FirewallRuleMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/advisor/init.go
sdk/go/azure/advisor/init.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package advisor import ( "fmt" "github.com/blang/semver" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type module struct { version semver.Version } func (m *module) Version() semver.Version { return m.version } func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { case "azure:advisor/suppression:Suppression": r = &Suppression{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) return } func init() { version, err := internal.PkgVersion() if err != nil { version = semver.Version{Major: 1} } pulumi.RegisterResourceModule( "azure", "advisor/suppression", &module{version}, ) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/advisor/pulumiTypes.go
sdk/go/azure/advisor/pulumiTypes.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package advisor import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) var _ = internal.GetEnvOrDefault type GetRecommendationsRecommendation struct { // The category of the recommendation. Category string `pulumi:"category"` // The description of the issue or the opportunity identified by the recommendation. Description string `pulumi:"description"` // The business impact of the recommendation. Impact string `pulumi:"impact"` // The name of the Advisor Recommendation. RecommendationName string `pulumi:"recommendationName"` // The recommendation type id of the Advisor Recommendation. RecommendationTypeId string `pulumi:"recommendationTypeId"` // The name of the identified resource of the Advisor Recommendation. ResourceName string `pulumi:"resourceName"` // The type of the identified resource of the Advisor Recommendation. ResourceType string `pulumi:"resourceType"` // A list of Advisor Suppression names of the Advisor Recommendation. SuppressionNames []string `pulumi:"suppressionNames"` // The most recent time that Advisor checked the validity of the recommendation.. UpdatedTime string `pulumi:"updatedTime"` } // GetRecommendationsRecommendationInput is an input type that accepts GetRecommendationsRecommendationArgs and GetRecommendationsRecommendationOutput values. // You can construct a concrete instance of `GetRecommendationsRecommendationInput` via: // // GetRecommendationsRecommendationArgs{...} type GetRecommendationsRecommendationInput interface { pulumi.Input ToGetRecommendationsRecommendationOutput() GetRecommendationsRecommendationOutput ToGetRecommendationsRecommendationOutputWithContext(context.Context) GetRecommendationsRecommendationOutput } type GetRecommendationsRecommendationArgs struct { // The category of the recommendation. Category pulumi.StringInput `pulumi:"category"` // The description of the issue or the opportunity identified by the recommendation. Description pulumi.StringInput `pulumi:"description"` // The business impact of the recommendation. Impact pulumi.StringInput `pulumi:"impact"` // The name of the Advisor Recommendation. RecommendationName pulumi.StringInput `pulumi:"recommendationName"` // The recommendation type id of the Advisor Recommendation. RecommendationTypeId pulumi.StringInput `pulumi:"recommendationTypeId"` // The name of the identified resource of the Advisor Recommendation. ResourceName pulumi.StringInput `pulumi:"resourceName"` // The type of the identified resource of the Advisor Recommendation. ResourceType pulumi.StringInput `pulumi:"resourceType"` // A list of Advisor Suppression names of the Advisor Recommendation. SuppressionNames pulumi.StringArrayInput `pulumi:"suppressionNames"` // The most recent time that Advisor checked the validity of the recommendation.. UpdatedTime pulumi.StringInput `pulumi:"updatedTime"` } func (GetRecommendationsRecommendationArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetRecommendationsRecommendation)(nil)).Elem() } func (i GetRecommendationsRecommendationArgs) ToGetRecommendationsRecommendationOutput() GetRecommendationsRecommendationOutput { return i.ToGetRecommendationsRecommendationOutputWithContext(context.Background()) } func (i GetRecommendationsRecommendationArgs) ToGetRecommendationsRecommendationOutputWithContext(ctx context.Context) GetRecommendationsRecommendationOutput { return pulumi.ToOutputWithContext(ctx, i).(GetRecommendationsRecommendationOutput) } // GetRecommendationsRecommendationArrayInput is an input type that accepts GetRecommendationsRecommendationArray and GetRecommendationsRecommendationArrayOutput values. // You can construct a concrete instance of `GetRecommendationsRecommendationArrayInput` via: // // GetRecommendationsRecommendationArray{ GetRecommendationsRecommendationArgs{...} } type GetRecommendationsRecommendationArrayInput interface { pulumi.Input ToGetRecommendationsRecommendationArrayOutput() GetRecommendationsRecommendationArrayOutput ToGetRecommendationsRecommendationArrayOutputWithContext(context.Context) GetRecommendationsRecommendationArrayOutput } type GetRecommendationsRecommendationArray []GetRecommendationsRecommendationInput func (GetRecommendationsRecommendationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]GetRecommendationsRecommendation)(nil)).Elem() } func (i GetRecommendationsRecommendationArray) ToGetRecommendationsRecommendationArrayOutput() GetRecommendationsRecommendationArrayOutput { return i.ToGetRecommendationsRecommendationArrayOutputWithContext(context.Background()) } func (i GetRecommendationsRecommendationArray) ToGetRecommendationsRecommendationArrayOutputWithContext(ctx context.Context) GetRecommendationsRecommendationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GetRecommendationsRecommendationArrayOutput) } type GetRecommendationsRecommendationOutput struct{ *pulumi.OutputState } func (GetRecommendationsRecommendationOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetRecommendationsRecommendation)(nil)).Elem() } func (o GetRecommendationsRecommendationOutput) ToGetRecommendationsRecommendationOutput() GetRecommendationsRecommendationOutput { return o } func (o GetRecommendationsRecommendationOutput) ToGetRecommendationsRecommendationOutputWithContext(ctx context.Context) GetRecommendationsRecommendationOutput { return o } // The category of the recommendation. func (o GetRecommendationsRecommendationOutput) Category() pulumi.StringOutput { return o.ApplyT(func(v GetRecommendationsRecommendation) string { return v.Category }).(pulumi.StringOutput) } // The description of the issue or the opportunity identified by the recommendation. func (o GetRecommendationsRecommendationOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v GetRecommendationsRecommendation) string { return v.Description }).(pulumi.StringOutput) } // The business impact of the recommendation. func (o GetRecommendationsRecommendationOutput) Impact() pulumi.StringOutput { return o.ApplyT(func(v GetRecommendationsRecommendation) string { return v.Impact }).(pulumi.StringOutput) } // The name of the Advisor Recommendation. func (o GetRecommendationsRecommendationOutput) RecommendationName() pulumi.StringOutput { return o.ApplyT(func(v GetRecommendationsRecommendation) string { return v.RecommendationName }).(pulumi.StringOutput) } // The recommendation type id of the Advisor Recommendation. func (o GetRecommendationsRecommendationOutput) RecommendationTypeId() pulumi.StringOutput { return o.ApplyT(func(v GetRecommendationsRecommendation) string { return v.RecommendationTypeId }).(pulumi.StringOutput) } // The name of the identified resource of the Advisor Recommendation. func (o GetRecommendationsRecommendationOutput) ResourceName() pulumi.StringOutput { return o.ApplyT(func(v GetRecommendationsRecommendation) string { return v.ResourceName }).(pulumi.StringOutput) } // The type of the identified resource of the Advisor Recommendation. func (o GetRecommendationsRecommendationOutput) ResourceType() pulumi.StringOutput { return o.ApplyT(func(v GetRecommendationsRecommendation) string { return v.ResourceType }).(pulumi.StringOutput) } // A list of Advisor Suppression names of the Advisor Recommendation. func (o GetRecommendationsRecommendationOutput) SuppressionNames() pulumi.StringArrayOutput { return o.ApplyT(func(v GetRecommendationsRecommendation) []string { return v.SuppressionNames }).(pulumi.StringArrayOutput) } // The most recent time that Advisor checked the validity of the recommendation.. func (o GetRecommendationsRecommendationOutput) UpdatedTime() pulumi.StringOutput { return o.ApplyT(func(v GetRecommendationsRecommendation) string { return v.UpdatedTime }).(pulumi.StringOutput) } type GetRecommendationsRecommendationArrayOutput struct{ *pulumi.OutputState } func (GetRecommendationsRecommendationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]GetRecommendationsRecommendation)(nil)).Elem() } func (o GetRecommendationsRecommendationArrayOutput) ToGetRecommendationsRecommendationArrayOutput() GetRecommendationsRecommendationArrayOutput { return o } func (o GetRecommendationsRecommendationArrayOutput) ToGetRecommendationsRecommendationArrayOutputWithContext(ctx context.Context) GetRecommendationsRecommendationArrayOutput { return o } func (o GetRecommendationsRecommendationArrayOutput) Index(i pulumi.IntInput) GetRecommendationsRecommendationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetRecommendationsRecommendation { return vs[0].([]GetRecommendationsRecommendation)[vs[1].(int)] }).(GetRecommendationsRecommendationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*GetRecommendationsRecommendationInput)(nil)).Elem(), GetRecommendationsRecommendationArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetRecommendationsRecommendationArrayInput)(nil)).Elem(), GetRecommendationsRecommendationArray{}) pulumi.RegisterOutputType(GetRecommendationsRecommendationOutput{}) pulumi.RegisterOutputType(GetRecommendationsRecommendationArrayOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/advisor/getRecommendations.go
sdk/go/azure/advisor/getRecommendations.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package advisor import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Advisor Recommendations. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/advisor" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := advisor.GetRecommendations(ctx, &advisor.GetRecommendationsArgs{ // FilterByCategories: []string{ // "security", // "cost", // }, // FilterByResourceGroups: []string{ // "example-resgroups", // }, // }, nil) // if err != nil { // return err // } // ctx.Export("recommendations", example.Recommendations) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Advisor` - 2023-01-01 func GetRecommendations(ctx *pulumi.Context, args *GetRecommendationsArgs, opts ...pulumi.InvokeOption) (*GetRecommendationsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetRecommendationsResult err := ctx.Invoke("azure:advisor/getRecommendations:getRecommendations", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getRecommendations. type GetRecommendationsArgs struct { // Specifies a list of categories in which the Advisor Recommendations will be listed. Possible values are `HighAvailability`, `Security`, `Performance`, `Cost` and `OperationalExcellence`. FilterByCategories []string `pulumi:"filterByCategories"` // Specifies a list of resource groups about which the Advisor Recommendations will be listed. FilterByResourceGroups []string `pulumi:"filterByResourceGroups"` } // A collection of values returned by getRecommendations. type GetRecommendationsResult struct { FilterByCategories []string `pulumi:"filterByCategories"` FilterByResourceGroups []string `pulumi:"filterByResourceGroups"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // One or more `recommendations` blocks as defined below. Recommendations []GetRecommendationsRecommendation `pulumi:"recommendations"` } func GetRecommendationsOutput(ctx *pulumi.Context, args GetRecommendationsOutputArgs, opts ...pulumi.InvokeOption) GetRecommendationsResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetRecommendationsResultOutput, error) { args := v.(GetRecommendationsArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:advisor/getRecommendations:getRecommendations", args, GetRecommendationsResultOutput{}, options).(GetRecommendationsResultOutput), nil }).(GetRecommendationsResultOutput) } // A collection of arguments for invoking getRecommendations. type GetRecommendationsOutputArgs struct { // Specifies a list of categories in which the Advisor Recommendations will be listed. Possible values are `HighAvailability`, `Security`, `Performance`, `Cost` and `OperationalExcellence`. FilterByCategories pulumi.StringArrayInput `pulumi:"filterByCategories"` // Specifies a list of resource groups about which the Advisor Recommendations will be listed. FilterByResourceGroups pulumi.StringArrayInput `pulumi:"filterByResourceGroups"` } func (GetRecommendationsOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetRecommendationsArgs)(nil)).Elem() } // A collection of values returned by getRecommendations. type GetRecommendationsResultOutput struct{ *pulumi.OutputState } func (GetRecommendationsResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetRecommendationsResult)(nil)).Elem() } func (o GetRecommendationsResultOutput) ToGetRecommendationsResultOutput() GetRecommendationsResultOutput { return o } func (o GetRecommendationsResultOutput) ToGetRecommendationsResultOutputWithContext(ctx context.Context) GetRecommendationsResultOutput { return o } func (o GetRecommendationsResultOutput) FilterByCategories() pulumi.StringArrayOutput { return o.ApplyT(func(v GetRecommendationsResult) []string { return v.FilterByCategories }).(pulumi.StringArrayOutput) } func (o GetRecommendationsResultOutput) FilterByResourceGroups() pulumi.StringArrayOutput { return o.ApplyT(func(v GetRecommendationsResult) []string { return v.FilterByResourceGroups }).(pulumi.StringArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o GetRecommendationsResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetRecommendationsResult) string { return v.Id }).(pulumi.StringOutput) } // One or more `recommendations` blocks as defined below. func (o GetRecommendationsResultOutput) Recommendations() GetRecommendationsRecommendationArrayOutput { return o.ApplyT(func(v GetRecommendationsResult) []GetRecommendationsRecommendation { return v.Recommendations }).(GetRecommendationsRecommendationArrayOutput) } func init() { pulumi.RegisterOutputType(GetRecommendationsResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/advisor/suppression.go
sdk/go/azure/advisor/suppression.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package advisor import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Specifies a suppression for an Azure Advisor recommendation. // // ## Example Usage // // ```go // package main // // import ( // // "fmt" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/advisor" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // _, err = advisor.GetRecommendations(ctx, &advisor.GetRecommendationsArgs{}, nil) // if err != nil { // return err // } // _, err = advisor.NewSuppression(ctx, "example", &advisor.SuppressionArgs{ // Name: pulumi.String("HardcodedSuppressionName"), // RecommendationId: pulumi.Any(test.Recommendations[0].RecommendationName), // ResourceId: pulumi.Sprintf("/subscriptions/%v", current.SubscriptionId), // Ttl: pulumi.String("01:00:00:00"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Advisor` - 2023-01-01 // // ## Import // // Advisor suppressions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:advisor/suppression:Suppression example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Advisor/recommendations/00000000-0000-0000-0000-000000000000/suppressions/name // ``` type Suppression struct { pulumi.CustomResourceState // The Name which should be used for this Advisor suppression. Changing this forces a new Advisor suppression to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Advisor recommendation to suppress. Changing this forces a new Advisor suppression to be created. RecommendationId pulumi.StringOutput `pulumi:"recommendationId"` // The ID of the Resource to suppress the Advisor recommendation for. Changing this forces a new Advisor suppression to be created. ResourceId pulumi.StringOutput `pulumi:"resourceId"` // The GUID of the suppression. SuppressionId pulumi.StringOutput `pulumi:"suppressionId"` // A optional time to live value. If omitted, the suppression will not expire. Changing this forces a new Advisor suppression to be created. Ttl pulumi.StringPtrOutput `pulumi:"ttl"` } // NewSuppression registers a new resource with the given unique name, arguments, and options. func NewSuppression(ctx *pulumi.Context, name string, args *SuppressionArgs, opts ...pulumi.ResourceOption) (*Suppression, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RecommendationId == nil { return nil, errors.New("invalid value for required argument 'RecommendationId'") } if args.ResourceId == nil { return nil, errors.New("invalid value for required argument 'ResourceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Suppression err := ctx.RegisterResource("azure:advisor/suppression:Suppression", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSuppression gets an existing Suppression resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetSuppression(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SuppressionState, opts ...pulumi.ResourceOption) (*Suppression, error) { var resource Suppression err := ctx.ReadResource("azure:advisor/suppression:Suppression", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Suppression resources. type suppressionState struct { // The Name which should be used for this Advisor suppression. Changing this forces a new Advisor suppression to be created. Name *string `pulumi:"name"` // The ID of the Advisor recommendation to suppress. Changing this forces a new Advisor suppression to be created. RecommendationId *string `pulumi:"recommendationId"` // The ID of the Resource to suppress the Advisor recommendation for. Changing this forces a new Advisor suppression to be created. ResourceId *string `pulumi:"resourceId"` // The GUID of the suppression. SuppressionId *string `pulumi:"suppressionId"` // A optional time to live value. If omitted, the suppression will not expire. Changing this forces a new Advisor suppression to be created. Ttl *string `pulumi:"ttl"` } type SuppressionState struct { // The Name which should be used for this Advisor suppression. Changing this forces a new Advisor suppression to be created. Name pulumi.StringPtrInput // The ID of the Advisor recommendation to suppress. Changing this forces a new Advisor suppression to be created. RecommendationId pulumi.StringPtrInput // The ID of the Resource to suppress the Advisor recommendation for. Changing this forces a new Advisor suppression to be created. ResourceId pulumi.StringPtrInput // The GUID of the suppression. SuppressionId pulumi.StringPtrInput // A optional time to live value. If omitted, the suppression will not expire. Changing this forces a new Advisor suppression to be created. Ttl pulumi.StringPtrInput } func (SuppressionState) ElementType() reflect.Type { return reflect.TypeOf((*suppressionState)(nil)).Elem() } type suppressionArgs struct { // The Name which should be used for this Advisor suppression. Changing this forces a new Advisor suppression to be created. Name *string `pulumi:"name"` // The ID of the Advisor recommendation to suppress. Changing this forces a new Advisor suppression to be created. RecommendationId string `pulumi:"recommendationId"` // The ID of the Resource to suppress the Advisor recommendation for. Changing this forces a new Advisor suppression to be created. ResourceId string `pulumi:"resourceId"` // A optional time to live value. If omitted, the suppression will not expire. Changing this forces a new Advisor suppression to be created. Ttl *string `pulumi:"ttl"` } // The set of arguments for constructing a Suppression resource. type SuppressionArgs struct { // The Name which should be used for this Advisor suppression. Changing this forces a new Advisor suppression to be created. Name pulumi.StringPtrInput // The ID of the Advisor recommendation to suppress. Changing this forces a new Advisor suppression to be created. RecommendationId pulumi.StringInput // The ID of the Resource to suppress the Advisor recommendation for. Changing this forces a new Advisor suppression to be created. ResourceId pulumi.StringInput // A optional time to live value. If omitted, the suppression will not expire. Changing this forces a new Advisor suppression to be created. Ttl pulumi.StringPtrInput } func (SuppressionArgs) ElementType() reflect.Type { return reflect.TypeOf((*suppressionArgs)(nil)).Elem() } type SuppressionInput interface { pulumi.Input ToSuppressionOutput() SuppressionOutput ToSuppressionOutputWithContext(ctx context.Context) SuppressionOutput } func (*Suppression) ElementType() reflect.Type { return reflect.TypeOf((**Suppression)(nil)).Elem() } func (i *Suppression) ToSuppressionOutput() SuppressionOutput { return i.ToSuppressionOutputWithContext(context.Background()) } func (i *Suppression) ToSuppressionOutputWithContext(ctx context.Context) SuppressionOutput { return pulumi.ToOutputWithContext(ctx, i).(SuppressionOutput) } // SuppressionArrayInput is an input type that accepts SuppressionArray and SuppressionArrayOutput values. // You can construct a concrete instance of `SuppressionArrayInput` via: // // SuppressionArray{ SuppressionArgs{...} } type SuppressionArrayInput interface { pulumi.Input ToSuppressionArrayOutput() SuppressionArrayOutput ToSuppressionArrayOutputWithContext(context.Context) SuppressionArrayOutput } type SuppressionArray []SuppressionInput func (SuppressionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Suppression)(nil)).Elem() } func (i SuppressionArray) ToSuppressionArrayOutput() SuppressionArrayOutput { return i.ToSuppressionArrayOutputWithContext(context.Background()) } func (i SuppressionArray) ToSuppressionArrayOutputWithContext(ctx context.Context) SuppressionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SuppressionArrayOutput) } // SuppressionMapInput is an input type that accepts SuppressionMap and SuppressionMapOutput values. // You can construct a concrete instance of `SuppressionMapInput` via: // // SuppressionMap{ "key": SuppressionArgs{...} } type SuppressionMapInput interface { pulumi.Input ToSuppressionMapOutput() SuppressionMapOutput ToSuppressionMapOutputWithContext(context.Context) SuppressionMapOutput } type SuppressionMap map[string]SuppressionInput func (SuppressionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Suppression)(nil)).Elem() } func (i SuppressionMap) ToSuppressionMapOutput() SuppressionMapOutput { return i.ToSuppressionMapOutputWithContext(context.Background()) } func (i SuppressionMap) ToSuppressionMapOutputWithContext(ctx context.Context) SuppressionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SuppressionMapOutput) } type SuppressionOutput struct{ *pulumi.OutputState } func (SuppressionOutput) ElementType() reflect.Type { return reflect.TypeOf((**Suppression)(nil)).Elem() } func (o SuppressionOutput) ToSuppressionOutput() SuppressionOutput { return o } func (o SuppressionOutput) ToSuppressionOutputWithContext(ctx context.Context) SuppressionOutput { return o } // The Name which should be used for this Advisor suppression. Changing this forces a new Advisor suppression to be created. func (o SuppressionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Suppression) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Advisor recommendation to suppress. Changing this forces a new Advisor suppression to be created. func (o SuppressionOutput) RecommendationId() pulumi.StringOutput { return o.ApplyT(func(v *Suppression) pulumi.StringOutput { return v.RecommendationId }).(pulumi.StringOutput) } // The ID of the Resource to suppress the Advisor recommendation for. Changing this forces a new Advisor suppression to be created. func (o SuppressionOutput) ResourceId() pulumi.StringOutput { return o.ApplyT(func(v *Suppression) pulumi.StringOutput { return v.ResourceId }).(pulumi.StringOutput) } // The GUID of the suppression. func (o SuppressionOutput) SuppressionId() pulumi.StringOutput { return o.ApplyT(func(v *Suppression) pulumi.StringOutput { return v.SuppressionId }).(pulumi.StringOutput) } // A optional time to live value. If omitted, the suppression will not expire. Changing this forces a new Advisor suppression to be created. func (o SuppressionOutput) Ttl() pulumi.StringPtrOutput { return o.ApplyT(func(v *Suppression) pulumi.StringPtrOutput { return v.Ttl }).(pulumi.StringPtrOutput) } type SuppressionArrayOutput struct{ *pulumi.OutputState } func (SuppressionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Suppression)(nil)).Elem() } func (o SuppressionArrayOutput) ToSuppressionArrayOutput() SuppressionArrayOutput { return o } func (o SuppressionArrayOutput) ToSuppressionArrayOutputWithContext(ctx context.Context) SuppressionArrayOutput { return o } func (o SuppressionArrayOutput) Index(i pulumi.IntInput) SuppressionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Suppression { return vs[0].([]*Suppression)[vs[1].(int)] }).(SuppressionOutput) } type SuppressionMapOutput struct{ *pulumi.OutputState } func (SuppressionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Suppression)(nil)).Elem() } func (o SuppressionMapOutput) ToSuppressionMapOutput() SuppressionMapOutput { return o } func (o SuppressionMapOutput) ToSuppressionMapOutputWithContext(ctx context.Context) SuppressionMapOutput { return o } func (o SuppressionMapOutput) MapIndex(k pulumi.StringInput) SuppressionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Suppression { return vs[0].(map[string]*Suppression)[vs[1].(string)] }).(SuppressionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SuppressionInput)(nil)).Elem(), &Suppression{}) pulumi.RegisterInputType(reflect.TypeOf((*SuppressionArrayInput)(nil)).Elem(), SuppressionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SuppressionMapInput)(nil)).Elem(), SuppressionMap{}) pulumi.RegisterOutputType(SuppressionOutput{}) pulumi.RegisterOutputType(SuppressionArrayOutput{}) pulumi.RegisterOutputType(SuppressionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dynatrace/init.go
sdk/go/azure/dynatrace/init.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package dynatrace import ( "fmt" "github.com/blang/semver" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type module struct { version semver.Version } func (m *module) Version() semver.Version { return m.version } func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { case "azure:dynatrace/monitor:Monitor": r = &Monitor{} case "azure:dynatrace/tagRules:TagRules": r = &TagRules{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) return } func init() { version, err := internal.PkgVersion() if err != nil { version = semver.Version{Major: 1} } pulumi.RegisterResourceModule( "azure", "dynatrace/monitor", &module{version}, ) pulumi.RegisterResourceModule( "azure", "dynatrace/tagRules", &module{version}, ) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dynatrace/pulumiTypes.go
sdk/go/azure/dynatrace/pulumiTypes.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package dynatrace import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) var _ = internal.GetEnvOrDefault type MonitorEnvironmentProperty struct { // Information about the Dynatrace environment. An `environmentInfo` block as defined below. EnvironmentInfos []MonitorEnvironmentPropertyEnvironmentInfo `pulumi:"environmentInfos"` } // MonitorEnvironmentPropertyInput is an input type that accepts MonitorEnvironmentPropertyArgs and MonitorEnvironmentPropertyOutput values. // You can construct a concrete instance of `MonitorEnvironmentPropertyInput` via: // // MonitorEnvironmentPropertyArgs{...} type MonitorEnvironmentPropertyInput interface { pulumi.Input ToMonitorEnvironmentPropertyOutput() MonitorEnvironmentPropertyOutput ToMonitorEnvironmentPropertyOutputWithContext(context.Context) MonitorEnvironmentPropertyOutput } type MonitorEnvironmentPropertyArgs struct { // Information about the Dynatrace environment. An `environmentInfo` block as defined below. EnvironmentInfos MonitorEnvironmentPropertyEnvironmentInfoArrayInput `pulumi:"environmentInfos"` } func (MonitorEnvironmentPropertyArgs) ElementType() reflect.Type { return reflect.TypeOf((*MonitorEnvironmentProperty)(nil)).Elem() } func (i MonitorEnvironmentPropertyArgs) ToMonitorEnvironmentPropertyOutput() MonitorEnvironmentPropertyOutput { return i.ToMonitorEnvironmentPropertyOutputWithContext(context.Background()) } func (i MonitorEnvironmentPropertyArgs) ToMonitorEnvironmentPropertyOutputWithContext(ctx context.Context) MonitorEnvironmentPropertyOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorEnvironmentPropertyOutput) } // MonitorEnvironmentPropertyArrayInput is an input type that accepts MonitorEnvironmentPropertyArray and MonitorEnvironmentPropertyArrayOutput values. // You can construct a concrete instance of `MonitorEnvironmentPropertyArrayInput` via: // // MonitorEnvironmentPropertyArray{ MonitorEnvironmentPropertyArgs{...} } type MonitorEnvironmentPropertyArrayInput interface { pulumi.Input ToMonitorEnvironmentPropertyArrayOutput() MonitorEnvironmentPropertyArrayOutput ToMonitorEnvironmentPropertyArrayOutputWithContext(context.Context) MonitorEnvironmentPropertyArrayOutput } type MonitorEnvironmentPropertyArray []MonitorEnvironmentPropertyInput func (MonitorEnvironmentPropertyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]MonitorEnvironmentProperty)(nil)).Elem() } func (i MonitorEnvironmentPropertyArray) ToMonitorEnvironmentPropertyArrayOutput() MonitorEnvironmentPropertyArrayOutput { return i.ToMonitorEnvironmentPropertyArrayOutputWithContext(context.Background()) } func (i MonitorEnvironmentPropertyArray) ToMonitorEnvironmentPropertyArrayOutputWithContext(ctx context.Context) MonitorEnvironmentPropertyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorEnvironmentPropertyArrayOutput) } type MonitorEnvironmentPropertyOutput struct{ *pulumi.OutputState } func (MonitorEnvironmentPropertyOutput) ElementType() reflect.Type { return reflect.TypeOf((*MonitorEnvironmentProperty)(nil)).Elem() } func (o MonitorEnvironmentPropertyOutput) ToMonitorEnvironmentPropertyOutput() MonitorEnvironmentPropertyOutput { return o } func (o MonitorEnvironmentPropertyOutput) ToMonitorEnvironmentPropertyOutputWithContext(ctx context.Context) MonitorEnvironmentPropertyOutput { return o } // Information about the Dynatrace environment. An `environmentInfo` block as defined below. func (o MonitorEnvironmentPropertyOutput) EnvironmentInfos() MonitorEnvironmentPropertyEnvironmentInfoArrayOutput { return o.ApplyT(func(v MonitorEnvironmentProperty) []MonitorEnvironmentPropertyEnvironmentInfo { return v.EnvironmentInfos }).(MonitorEnvironmentPropertyEnvironmentInfoArrayOutput) } type MonitorEnvironmentPropertyArrayOutput struct{ *pulumi.OutputState } func (MonitorEnvironmentPropertyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]MonitorEnvironmentProperty)(nil)).Elem() } func (o MonitorEnvironmentPropertyArrayOutput) ToMonitorEnvironmentPropertyArrayOutput() MonitorEnvironmentPropertyArrayOutput { return o } func (o MonitorEnvironmentPropertyArrayOutput) ToMonitorEnvironmentPropertyArrayOutputWithContext(ctx context.Context) MonitorEnvironmentPropertyArrayOutput { return o } func (o MonitorEnvironmentPropertyArrayOutput) Index(i pulumi.IntInput) MonitorEnvironmentPropertyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) MonitorEnvironmentProperty { return vs[0].([]MonitorEnvironmentProperty)[vs[1].(int)] }).(MonitorEnvironmentPropertyOutput) } type MonitorEnvironmentPropertyEnvironmentInfo struct { // The ID of the Dynatrace environment to be created. EnvironmentId string `pulumi:"environmentId"` } // MonitorEnvironmentPropertyEnvironmentInfoInput is an input type that accepts MonitorEnvironmentPropertyEnvironmentInfoArgs and MonitorEnvironmentPropertyEnvironmentInfoOutput values. // You can construct a concrete instance of `MonitorEnvironmentPropertyEnvironmentInfoInput` via: // // MonitorEnvironmentPropertyEnvironmentInfoArgs{...} type MonitorEnvironmentPropertyEnvironmentInfoInput interface { pulumi.Input ToMonitorEnvironmentPropertyEnvironmentInfoOutput() MonitorEnvironmentPropertyEnvironmentInfoOutput ToMonitorEnvironmentPropertyEnvironmentInfoOutputWithContext(context.Context) MonitorEnvironmentPropertyEnvironmentInfoOutput } type MonitorEnvironmentPropertyEnvironmentInfoArgs struct { // The ID of the Dynatrace environment to be created. EnvironmentId pulumi.StringInput `pulumi:"environmentId"` } func (MonitorEnvironmentPropertyEnvironmentInfoArgs) ElementType() reflect.Type { return reflect.TypeOf((*MonitorEnvironmentPropertyEnvironmentInfo)(nil)).Elem() } func (i MonitorEnvironmentPropertyEnvironmentInfoArgs) ToMonitorEnvironmentPropertyEnvironmentInfoOutput() MonitorEnvironmentPropertyEnvironmentInfoOutput { return i.ToMonitorEnvironmentPropertyEnvironmentInfoOutputWithContext(context.Background()) } func (i MonitorEnvironmentPropertyEnvironmentInfoArgs) ToMonitorEnvironmentPropertyEnvironmentInfoOutputWithContext(ctx context.Context) MonitorEnvironmentPropertyEnvironmentInfoOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorEnvironmentPropertyEnvironmentInfoOutput) } // MonitorEnvironmentPropertyEnvironmentInfoArrayInput is an input type that accepts MonitorEnvironmentPropertyEnvironmentInfoArray and MonitorEnvironmentPropertyEnvironmentInfoArrayOutput values. // You can construct a concrete instance of `MonitorEnvironmentPropertyEnvironmentInfoArrayInput` via: // // MonitorEnvironmentPropertyEnvironmentInfoArray{ MonitorEnvironmentPropertyEnvironmentInfoArgs{...} } type MonitorEnvironmentPropertyEnvironmentInfoArrayInput interface { pulumi.Input ToMonitorEnvironmentPropertyEnvironmentInfoArrayOutput() MonitorEnvironmentPropertyEnvironmentInfoArrayOutput ToMonitorEnvironmentPropertyEnvironmentInfoArrayOutputWithContext(context.Context) MonitorEnvironmentPropertyEnvironmentInfoArrayOutput } type MonitorEnvironmentPropertyEnvironmentInfoArray []MonitorEnvironmentPropertyEnvironmentInfoInput func (MonitorEnvironmentPropertyEnvironmentInfoArray) ElementType() reflect.Type { return reflect.TypeOf((*[]MonitorEnvironmentPropertyEnvironmentInfo)(nil)).Elem() } func (i MonitorEnvironmentPropertyEnvironmentInfoArray) ToMonitorEnvironmentPropertyEnvironmentInfoArrayOutput() MonitorEnvironmentPropertyEnvironmentInfoArrayOutput { return i.ToMonitorEnvironmentPropertyEnvironmentInfoArrayOutputWithContext(context.Background()) } func (i MonitorEnvironmentPropertyEnvironmentInfoArray) ToMonitorEnvironmentPropertyEnvironmentInfoArrayOutputWithContext(ctx context.Context) MonitorEnvironmentPropertyEnvironmentInfoArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorEnvironmentPropertyEnvironmentInfoArrayOutput) } type MonitorEnvironmentPropertyEnvironmentInfoOutput struct{ *pulumi.OutputState } func (MonitorEnvironmentPropertyEnvironmentInfoOutput) ElementType() reflect.Type { return reflect.TypeOf((*MonitorEnvironmentPropertyEnvironmentInfo)(nil)).Elem() } func (o MonitorEnvironmentPropertyEnvironmentInfoOutput) ToMonitorEnvironmentPropertyEnvironmentInfoOutput() MonitorEnvironmentPropertyEnvironmentInfoOutput { return o } func (o MonitorEnvironmentPropertyEnvironmentInfoOutput) ToMonitorEnvironmentPropertyEnvironmentInfoOutputWithContext(ctx context.Context) MonitorEnvironmentPropertyEnvironmentInfoOutput { return o } // The ID of the Dynatrace environment to be created. func (o MonitorEnvironmentPropertyEnvironmentInfoOutput) EnvironmentId() pulumi.StringOutput { return o.ApplyT(func(v MonitorEnvironmentPropertyEnvironmentInfo) string { return v.EnvironmentId }).(pulumi.StringOutput) } type MonitorEnvironmentPropertyEnvironmentInfoArrayOutput struct{ *pulumi.OutputState } func (MonitorEnvironmentPropertyEnvironmentInfoArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]MonitorEnvironmentPropertyEnvironmentInfo)(nil)).Elem() } func (o MonitorEnvironmentPropertyEnvironmentInfoArrayOutput) ToMonitorEnvironmentPropertyEnvironmentInfoArrayOutput() MonitorEnvironmentPropertyEnvironmentInfoArrayOutput { return o } func (o MonitorEnvironmentPropertyEnvironmentInfoArrayOutput) ToMonitorEnvironmentPropertyEnvironmentInfoArrayOutputWithContext(ctx context.Context) MonitorEnvironmentPropertyEnvironmentInfoArrayOutput { return o } func (o MonitorEnvironmentPropertyEnvironmentInfoArrayOutput) Index(i pulumi.IntInput) MonitorEnvironmentPropertyEnvironmentInfoOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) MonitorEnvironmentPropertyEnvironmentInfo { return vs[0].([]MonitorEnvironmentPropertyEnvironmentInfo)[vs[1].(int)] }).(MonitorEnvironmentPropertyEnvironmentInfoOutput) } type MonitorIdentity struct { PrincipalId *string `pulumi:"principalId"` TenantId *string `pulumi:"tenantId"` // The type of identity used for the resource. Only possible value is `SystemAssigned`. Type string `pulumi:"type"` } // MonitorIdentityInput is an input type that accepts MonitorIdentityArgs and MonitorIdentityOutput values. // You can construct a concrete instance of `MonitorIdentityInput` via: // // MonitorIdentityArgs{...} type MonitorIdentityInput interface { pulumi.Input ToMonitorIdentityOutput() MonitorIdentityOutput ToMonitorIdentityOutputWithContext(context.Context) MonitorIdentityOutput } type MonitorIdentityArgs struct { PrincipalId pulumi.StringPtrInput `pulumi:"principalId"` TenantId pulumi.StringPtrInput `pulumi:"tenantId"` // The type of identity used for the resource. Only possible value is `SystemAssigned`. Type pulumi.StringInput `pulumi:"type"` } func (MonitorIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*MonitorIdentity)(nil)).Elem() } func (i MonitorIdentityArgs) ToMonitorIdentityOutput() MonitorIdentityOutput { return i.ToMonitorIdentityOutputWithContext(context.Background()) } func (i MonitorIdentityArgs) ToMonitorIdentityOutputWithContext(ctx context.Context) MonitorIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorIdentityOutput) } func (i MonitorIdentityArgs) ToMonitorIdentityPtrOutput() MonitorIdentityPtrOutput { return i.ToMonitorIdentityPtrOutputWithContext(context.Background()) } func (i MonitorIdentityArgs) ToMonitorIdentityPtrOutputWithContext(ctx context.Context) MonitorIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorIdentityOutput).ToMonitorIdentityPtrOutputWithContext(ctx) } // MonitorIdentityPtrInput is an input type that accepts MonitorIdentityArgs, MonitorIdentityPtr and MonitorIdentityPtrOutput values. // You can construct a concrete instance of `MonitorIdentityPtrInput` via: // // MonitorIdentityArgs{...} // // or: // // nil type MonitorIdentityPtrInput interface { pulumi.Input ToMonitorIdentityPtrOutput() MonitorIdentityPtrOutput ToMonitorIdentityPtrOutputWithContext(context.Context) MonitorIdentityPtrOutput } type monitorIdentityPtrType MonitorIdentityArgs func MonitorIdentityPtr(v *MonitorIdentityArgs) MonitorIdentityPtrInput { return (*monitorIdentityPtrType)(v) } func (*monitorIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**MonitorIdentity)(nil)).Elem() } func (i *monitorIdentityPtrType) ToMonitorIdentityPtrOutput() MonitorIdentityPtrOutput { return i.ToMonitorIdentityPtrOutputWithContext(context.Background()) } func (i *monitorIdentityPtrType) ToMonitorIdentityPtrOutputWithContext(ctx context.Context) MonitorIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorIdentityPtrOutput) } type MonitorIdentityOutput struct{ *pulumi.OutputState } func (MonitorIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*MonitorIdentity)(nil)).Elem() } func (o MonitorIdentityOutput) ToMonitorIdentityOutput() MonitorIdentityOutput { return o } func (o MonitorIdentityOutput) ToMonitorIdentityOutputWithContext(ctx context.Context) MonitorIdentityOutput { return o } func (o MonitorIdentityOutput) ToMonitorIdentityPtrOutput() MonitorIdentityPtrOutput { return o.ToMonitorIdentityPtrOutputWithContext(context.Background()) } func (o MonitorIdentityOutput) ToMonitorIdentityPtrOutputWithContext(ctx context.Context) MonitorIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v MonitorIdentity) *MonitorIdentity { return &v }).(MonitorIdentityPtrOutput) } func (o MonitorIdentityOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v MonitorIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput) } func (o MonitorIdentityOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v MonitorIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput) } // The type of identity used for the resource. Only possible value is `SystemAssigned`. func (o MonitorIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v MonitorIdentity) string { return v.Type }).(pulumi.StringOutput) } type MonitorIdentityPtrOutput struct{ *pulumi.OutputState } func (MonitorIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**MonitorIdentity)(nil)).Elem() } func (o MonitorIdentityPtrOutput) ToMonitorIdentityPtrOutput() MonitorIdentityPtrOutput { return o } func (o MonitorIdentityPtrOutput) ToMonitorIdentityPtrOutputWithContext(ctx context.Context) MonitorIdentityPtrOutput { return o } func (o MonitorIdentityPtrOutput) Elem() MonitorIdentityOutput { return o.ApplyT(func(v *MonitorIdentity) MonitorIdentity { if v != nil { return *v } var ret MonitorIdentity return ret }).(MonitorIdentityOutput) } func (o MonitorIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorIdentity) *string { if v == nil { return nil } return v.PrincipalId }).(pulumi.StringPtrOutput) } func (o MonitorIdentityPtrOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorIdentity) *string { if v == nil { return nil } return v.TenantId }).(pulumi.StringPtrOutput) } // The type of identity used for the resource. Only possible value is `SystemAssigned`. func (o MonitorIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type MonitorPlan struct { // Different billing cycles. Possible values are `MONTHLY`, `WEEKLY` and `YEARLY`. BillingCycle *string `pulumi:"billingCycle"` // Date when plan was applied. EffectiveDate *string `pulumi:"effectiveDate"` // Plan id as published by Dynatrace. Plan string `pulumi:"plan"` // Different usage type. Possible values are `PAYG` and `COMMITTED`. UsageType *string `pulumi:"usageType"` } // MonitorPlanInput is an input type that accepts MonitorPlanArgs and MonitorPlanOutput values. // You can construct a concrete instance of `MonitorPlanInput` via: // // MonitorPlanArgs{...} type MonitorPlanInput interface { pulumi.Input ToMonitorPlanOutput() MonitorPlanOutput ToMonitorPlanOutputWithContext(context.Context) MonitorPlanOutput } type MonitorPlanArgs struct { // Different billing cycles. Possible values are `MONTHLY`, `WEEKLY` and `YEARLY`. BillingCycle pulumi.StringPtrInput `pulumi:"billingCycle"` // Date when plan was applied. EffectiveDate pulumi.StringPtrInput `pulumi:"effectiveDate"` // Plan id as published by Dynatrace. Plan pulumi.StringInput `pulumi:"plan"` // Different usage type. Possible values are `PAYG` and `COMMITTED`. UsageType pulumi.StringPtrInput `pulumi:"usageType"` } func (MonitorPlanArgs) ElementType() reflect.Type { return reflect.TypeOf((*MonitorPlan)(nil)).Elem() } func (i MonitorPlanArgs) ToMonitorPlanOutput() MonitorPlanOutput { return i.ToMonitorPlanOutputWithContext(context.Background()) } func (i MonitorPlanArgs) ToMonitorPlanOutputWithContext(ctx context.Context) MonitorPlanOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorPlanOutput) } func (i MonitorPlanArgs) ToMonitorPlanPtrOutput() MonitorPlanPtrOutput { return i.ToMonitorPlanPtrOutputWithContext(context.Background()) } func (i MonitorPlanArgs) ToMonitorPlanPtrOutputWithContext(ctx context.Context) MonitorPlanPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorPlanOutput).ToMonitorPlanPtrOutputWithContext(ctx) } // MonitorPlanPtrInput is an input type that accepts MonitorPlanArgs, MonitorPlanPtr and MonitorPlanPtrOutput values. // You can construct a concrete instance of `MonitorPlanPtrInput` via: // // MonitorPlanArgs{...} // // or: // // nil type MonitorPlanPtrInput interface { pulumi.Input ToMonitorPlanPtrOutput() MonitorPlanPtrOutput ToMonitorPlanPtrOutputWithContext(context.Context) MonitorPlanPtrOutput } type monitorPlanPtrType MonitorPlanArgs func MonitorPlanPtr(v *MonitorPlanArgs) MonitorPlanPtrInput { return (*monitorPlanPtrType)(v) } func (*monitorPlanPtrType) ElementType() reflect.Type { return reflect.TypeOf((**MonitorPlan)(nil)).Elem() } func (i *monitorPlanPtrType) ToMonitorPlanPtrOutput() MonitorPlanPtrOutput { return i.ToMonitorPlanPtrOutputWithContext(context.Background()) } func (i *monitorPlanPtrType) ToMonitorPlanPtrOutputWithContext(ctx context.Context) MonitorPlanPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorPlanPtrOutput) } type MonitorPlanOutput struct{ *pulumi.OutputState } func (MonitorPlanOutput) ElementType() reflect.Type { return reflect.TypeOf((*MonitorPlan)(nil)).Elem() } func (o MonitorPlanOutput) ToMonitorPlanOutput() MonitorPlanOutput { return o } func (o MonitorPlanOutput) ToMonitorPlanOutputWithContext(ctx context.Context) MonitorPlanOutput { return o } func (o MonitorPlanOutput) ToMonitorPlanPtrOutput() MonitorPlanPtrOutput { return o.ToMonitorPlanPtrOutputWithContext(context.Background()) } func (o MonitorPlanOutput) ToMonitorPlanPtrOutputWithContext(ctx context.Context) MonitorPlanPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v MonitorPlan) *MonitorPlan { return &v }).(MonitorPlanPtrOutput) } // Different billing cycles. Possible values are `MONTHLY`, `WEEKLY` and `YEARLY`. func (o MonitorPlanOutput) BillingCycle() pulumi.StringPtrOutput { return o.ApplyT(func(v MonitorPlan) *string { return v.BillingCycle }).(pulumi.StringPtrOutput) } // Date when plan was applied. func (o MonitorPlanOutput) EffectiveDate() pulumi.StringPtrOutput { return o.ApplyT(func(v MonitorPlan) *string { return v.EffectiveDate }).(pulumi.StringPtrOutput) } // Plan id as published by Dynatrace. func (o MonitorPlanOutput) Plan() pulumi.StringOutput { return o.ApplyT(func(v MonitorPlan) string { return v.Plan }).(pulumi.StringOutput) } // Different usage type. Possible values are `PAYG` and `COMMITTED`. func (o MonitorPlanOutput) UsageType() pulumi.StringPtrOutput { return o.ApplyT(func(v MonitorPlan) *string { return v.UsageType }).(pulumi.StringPtrOutput) } type MonitorPlanPtrOutput struct{ *pulumi.OutputState } func (MonitorPlanPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**MonitorPlan)(nil)).Elem() } func (o MonitorPlanPtrOutput) ToMonitorPlanPtrOutput() MonitorPlanPtrOutput { return o } func (o MonitorPlanPtrOutput) ToMonitorPlanPtrOutputWithContext(ctx context.Context) MonitorPlanPtrOutput { return o } func (o MonitorPlanPtrOutput) Elem() MonitorPlanOutput { return o.ApplyT(func(v *MonitorPlan) MonitorPlan { if v != nil { return *v } var ret MonitorPlan return ret }).(MonitorPlanOutput) } // Different billing cycles. Possible values are `MONTHLY`, `WEEKLY` and `YEARLY`. func (o MonitorPlanPtrOutput) BillingCycle() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorPlan) *string { if v == nil { return nil } return v.BillingCycle }).(pulumi.StringPtrOutput) } // Date when plan was applied. func (o MonitorPlanPtrOutput) EffectiveDate() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorPlan) *string { if v == nil { return nil } return v.EffectiveDate }).(pulumi.StringPtrOutput) } // Plan id as published by Dynatrace. func (o MonitorPlanPtrOutput) Plan() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorPlan) *string { if v == nil { return nil } return &v.Plan }).(pulumi.StringPtrOutput) } // Different usage type. Possible values are `PAYG` and `COMMITTED`. func (o MonitorPlanPtrOutput) UsageType() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorPlan) *string { if v == nil { return nil } return v.UsageType }).(pulumi.StringPtrOutput) } type MonitorUser struct { // Country of the user. Country *string `pulumi:"country"` // Email of the user used by Dynatrace for contacting them if needed. Email string `pulumi:"email"` // First name of the user. FirstName string `pulumi:"firstName"` // Last name of the user. LastName string `pulumi:"lastName"` // phone number of the user by Dynatrace for contacting them if needed. PhoneNumber *string `pulumi:"phoneNumber"` } // MonitorUserInput is an input type that accepts MonitorUserArgs and MonitorUserOutput values. // You can construct a concrete instance of `MonitorUserInput` via: // // MonitorUserArgs{...} type MonitorUserInput interface { pulumi.Input ToMonitorUserOutput() MonitorUserOutput ToMonitorUserOutputWithContext(context.Context) MonitorUserOutput } type MonitorUserArgs struct { // Country of the user. Country pulumi.StringPtrInput `pulumi:"country"` // Email of the user used by Dynatrace for contacting them if needed. Email pulumi.StringInput `pulumi:"email"` // First name of the user. FirstName pulumi.StringInput `pulumi:"firstName"` // Last name of the user. LastName pulumi.StringInput `pulumi:"lastName"` // phone number of the user by Dynatrace for contacting them if needed. PhoneNumber pulumi.StringPtrInput `pulumi:"phoneNumber"` } func (MonitorUserArgs) ElementType() reflect.Type { return reflect.TypeOf((*MonitorUser)(nil)).Elem() } func (i MonitorUserArgs) ToMonitorUserOutput() MonitorUserOutput { return i.ToMonitorUserOutputWithContext(context.Background()) } func (i MonitorUserArgs) ToMonitorUserOutputWithContext(ctx context.Context) MonitorUserOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorUserOutput) } func (i MonitorUserArgs) ToMonitorUserPtrOutput() MonitorUserPtrOutput { return i.ToMonitorUserPtrOutputWithContext(context.Background()) } func (i MonitorUserArgs) ToMonitorUserPtrOutputWithContext(ctx context.Context) MonitorUserPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorUserOutput).ToMonitorUserPtrOutputWithContext(ctx) } // MonitorUserPtrInput is an input type that accepts MonitorUserArgs, MonitorUserPtr and MonitorUserPtrOutput values. // You can construct a concrete instance of `MonitorUserPtrInput` via: // // MonitorUserArgs{...} // // or: // // nil type MonitorUserPtrInput interface { pulumi.Input ToMonitorUserPtrOutput() MonitorUserPtrOutput ToMonitorUserPtrOutputWithContext(context.Context) MonitorUserPtrOutput } type monitorUserPtrType MonitorUserArgs func MonitorUserPtr(v *MonitorUserArgs) MonitorUserPtrInput { return (*monitorUserPtrType)(v) } func (*monitorUserPtrType) ElementType() reflect.Type { return reflect.TypeOf((**MonitorUser)(nil)).Elem() } func (i *monitorUserPtrType) ToMonitorUserPtrOutput() MonitorUserPtrOutput { return i.ToMonitorUserPtrOutputWithContext(context.Background()) } func (i *monitorUserPtrType) ToMonitorUserPtrOutputWithContext(ctx context.Context) MonitorUserPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorUserPtrOutput) } type MonitorUserOutput struct{ *pulumi.OutputState } func (MonitorUserOutput) ElementType() reflect.Type { return reflect.TypeOf((*MonitorUser)(nil)).Elem() } func (o MonitorUserOutput) ToMonitorUserOutput() MonitorUserOutput { return o } func (o MonitorUserOutput) ToMonitorUserOutputWithContext(ctx context.Context) MonitorUserOutput { return o } func (o MonitorUserOutput) ToMonitorUserPtrOutput() MonitorUserPtrOutput { return o.ToMonitorUserPtrOutputWithContext(context.Background()) } func (o MonitorUserOutput) ToMonitorUserPtrOutputWithContext(ctx context.Context) MonitorUserPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v MonitorUser) *MonitorUser { return &v }).(MonitorUserPtrOutput) } // Country of the user. func (o MonitorUserOutput) Country() pulumi.StringPtrOutput { return o.ApplyT(func(v MonitorUser) *string { return v.Country }).(pulumi.StringPtrOutput) } // Email of the user used by Dynatrace for contacting them if needed. func (o MonitorUserOutput) Email() pulumi.StringOutput { return o.ApplyT(func(v MonitorUser) string { return v.Email }).(pulumi.StringOutput) } // First name of the user. func (o MonitorUserOutput) FirstName() pulumi.StringOutput { return o.ApplyT(func(v MonitorUser) string { return v.FirstName }).(pulumi.StringOutput) } // Last name of the user. func (o MonitorUserOutput) LastName() pulumi.StringOutput { return o.ApplyT(func(v MonitorUser) string { return v.LastName }).(pulumi.StringOutput) } // phone number of the user by Dynatrace for contacting them if needed. func (o MonitorUserOutput) PhoneNumber() pulumi.StringPtrOutput { return o.ApplyT(func(v MonitorUser) *string { return v.PhoneNumber }).(pulumi.StringPtrOutput) } type MonitorUserPtrOutput struct{ *pulumi.OutputState } func (MonitorUserPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**MonitorUser)(nil)).Elem() } func (o MonitorUserPtrOutput) ToMonitorUserPtrOutput() MonitorUserPtrOutput { return o } func (o MonitorUserPtrOutput) ToMonitorUserPtrOutputWithContext(ctx context.Context) MonitorUserPtrOutput { return o } func (o MonitorUserPtrOutput) Elem() MonitorUserOutput { return o.ApplyT(func(v *MonitorUser) MonitorUser { if v != nil { return *v } var ret MonitorUser return ret }).(MonitorUserOutput) } // Country of the user. func (o MonitorUserPtrOutput) Country() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorUser) *string { if v == nil { return nil } return v.Country }).(pulumi.StringPtrOutput) } // Email of the user used by Dynatrace for contacting them if needed. func (o MonitorUserPtrOutput) Email() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorUser) *string { if v == nil { return nil } return &v.Email }).(pulumi.StringPtrOutput) } // First name of the user. func (o MonitorUserPtrOutput) FirstName() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorUser) *string { if v == nil { return nil } return &v.FirstName }).(pulumi.StringPtrOutput) } // Last name of the user. func (o MonitorUserPtrOutput) LastName() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorUser) *string { if v == nil { return nil } return &v.LastName }).(pulumi.StringPtrOutput) } // phone number of the user by Dynatrace for contacting them if needed. func (o MonitorUserPtrOutput) PhoneNumber() pulumi.StringPtrOutput { return o.ApplyT(func(v *MonitorUser) *string { if v == nil { return nil } return v.PhoneNumber }).(pulumi.StringPtrOutput) } type TagRulesLogRule struct { // Filtering tag for the log rule. A `filteringTag` block as defined below. FilteringTags []TagRulesLogRuleFilteringTag `pulumi:"filteringTags"` // Send Activity logs. The default value is `false`. SendActivityLogsEnabled *bool `pulumi:"sendActivityLogsEnabled"` // Send Azure Active Directory logs. The default value is `false`. SendAzureActiveDirectoryLogsEnabled *bool `pulumi:"sendAzureActiveDirectoryLogsEnabled"` // Send Subscription logs. The default value is `false`. SendSubscriptionLogsEnabled *bool `pulumi:"sendSubscriptionLogsEnabled"` } // TagRulesLogRuleInput is an input type that accepts TagRulesLogRuleArgs and TagRulesLogRuleOutput values. // You can construct a concrete instance of `TagRulesLogRuleInput` via: // // TagRulesLogRuleArgs{...} type TagRulesLogRuleInput interface { pulumi.Input ToTagRulesLogRuleOutput() TagRulesLogRuleOutput ToTagRulesLogRuleOutputWithContext(context.Context) TagRulesLogRuleOutput } type TagRulesLogRuleArgs struct { // Filtering tag for the log rule. A `filteringTag` block as defined below. FilteringTags TagRulesLogRuleFilteringTagArrayInput `pulumi:"filteringTags"` // Send Activity logs. The default value is `false`. SendActivityLogsEnabled pulumi.BoolPtrInput `pulumi:"sendActivityLogsEnabled"` // Send Azure Active Directory logs. The default value is `false`. SendAzureActiveDirectoryLogsEnabled pulumi.BoolPtrInput `pulumi:"sendAzureActiveDirectoryLogsEnabled"` // Send Subscription logs. The default value is `false`. SendSubscriptionLogsEnabled pulumi.BoolPtrInput `pulumi:"sendSubscriptionLogsEnabled"` } func (TagRulesLogRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*TagRulesLogRule)(nil)).Elem() } func (i TagRulesLogRuleArgs) ToTagRulesLogRuleOutput() TagRulesLogRuleOutput { return i.ToTagRulesLogRuleOutputWithContext(context.Background()) } func (i TagRulesLogRuleArgs) ToTagRulesLogRuleOutputWithContext(ctx context.Context) TagRulesLogRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(TagRulesLogRuleOutput) } func (i TagRulesLogRuleArgs) ToTagRulesLogRulePtrOutput() TagRulesLogRulePtrOutput { return i.ToTagRulesLogRulePtrOutputWithContext(context.Background()) } func (i TagRulesLogRuleArgs) ToTagRulesLogRulePtrOutputWithContext(ctx context.Context) TagRulesLogRulePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(TagRulesLogRuleOutput).ToTagRulesLogRulePtrOutputWithContext(ctx) } // TagRulesLogRulePtrInput is an input type that accepts TagRulesLogRuleArgs, TagRulesLogRulePtr and TagRulesLogRulePtrOutput values. // You can construct a concrete instance of `TagRulesLogRulePtrInput` via: // // TagRulesLogRuleArgs{...} // // or: // // nil type TagRulesLogRulePtrInput interface { pulumi.Input ToTagRulesLogRulePtrOutput() TagRulesLogRulePtrOutput ToTagRulesLogRulePtrOutputWithContext(context.Context) TagRulesLogRulePtrOutput } type tagRulesLogRulePtrType TagRulesLogRuleArgs func TagRulesLogRulePtr(v *TagRulesLogRuleArgs) TagRulesLogRulePtrInput { return (*tagRulesLogRulePtrType)(v) } func (*tagRulesLogRulePtrType) ElementType() reflect.Type { return reflect.TypeOf((**TagRulesLogRule)(nil)).Elem() } func (i *tagRulesLogRulePtrType) ToTagRulesLogRulePtrOutput() TagRulesLogRulePtrOutput { return i.ToTagRulesLogRulePtrOutputWithContext(context.Background()) } func (i *tagRulesLogRulePtrType) ToTagRulesLogRulePtrOutputWithContext(ctx context.Context) TagRulesLogRulePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(TagRulesLogRulePtrOutput) } type TagRulesLogRuleOutput struct{ *pulumi.OutputState } func (TagRulesLogRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((*TagRulesLogRule)(nil)).Elem() } func (o TagRulesLogRuleOutput) ToTagRulesLogRuleOutput() TagRulesLogRuleOutput { return o } func (o TagRulesLogRuleOutput) ToTagRulesLogRuleOutputWithContext(ctx context.Context) TagRulesLogRuleOutput { return o } func (o TagRulesLogRuleOutput) ToTagRulesLogRulePtrOutput() TagRulesLogRulePtrOutput { return o.ToTagRulesLogRulePtrOutputWithContext(context.Background()) } func (o TagRulesLogRuleOutput) ToTagRulesLogRulePtrOutputWithContext(ctx context.Context) TagRulesLogRulePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v TagRulesLogRule) *TagRulesLogRule { return &v }).(TagRulesLogRulePtrOutput) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dynatrace/getMonitor.go
sdk/go/azure/dynatrace/getMonitor.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package dynatrace import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing Dynatrace Monitor. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dynatrace" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := dynatrace.LookupMonitor(ctx, &dynatrace.LookupMonitorArgs{ // Name: "example-dynatracemonitor", // ResourceGroupName: "example-resources", // }, nil) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Dynatrace.Observability` - 2023-04-27 func LookupMonitor(ctx *pulumi.Context, args *LookupMonitorArgs, opts ...pulumi.InvokeOption) (*LookupMonitorResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupMonitorResult err := ctx.Invoke("azure:dynatrace/getMonitor:getMonitor", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getMonitor. type LookupMonitorArgs struct { // Name of the Dynatrace monitor. Name string `pulumi:"name"` // The name of the Resource Group where the Dynatrace monitor should exist. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getMonitor. type LookupMonitorResult struct { EnvironmentProperties []GetMonitorEnvironmentProperty `pulumi:"environmentProperties"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The kind of managed identity assigned to this resource. A `identity` block as defined below. Identities []GetMonitorIdentity `pulumi:"identities"` // The Azure Region where the Dynatrace monitor should exist. Location string `pulumi:"location"` // Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. MarketplaceSubscription string `pulumi:"marketplaceSubscription"` // Flag specifying if the resource monitoring is enabled or disabled. MonitoringEnabled bool `pulumi:"monitoringEnabled"` Name string `pulumi:"name"` // Plan id as published by Dynatrace. Plans []GetMonitorPlan `pulumi:"plans"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // User's information. A `user` block as defined below. Users []GetMonitorUser `pulumi:"users"` } func LookupMonitorOutput(ctx *pulumi.Context, args LookupMonitorOutputArgs, opts ...pulumi.InvokeOption) LookupMonitorResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupMonitorResultOutput, error) { args := v.(LookupMonitorArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:dynatrace/getMonitor:getMonitor", args, LookupMonitorResultOutput{}, options).(LookupMonitorResultOutput), nil }).(LookupMonitorResultOutput) } // A collection of arguments for invoking getMonitor. type LookupMonitorOutputArgs struct { // Name of the Dynatrace monitor. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Dynatrace monitor should exist. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupMonitorOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupMonitorArgs)(nil)).Elem() } // A collection of values returned by getMonitor. type LookupMonitorResultOutput struct{ *pulumi.OutputState } func (LookupMonitorResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupMonitorResult)(nil)).Elem() } func (o LookupMonitorResultOutput) ToLookupMonitorResultOutput() LookupMonitorResultOutput { return o } func (o LookupMonitorResultOutput) ToLookupMonitorResultOutputWithContext(ctx context.Context) LookupMonitorResultOutput { return o } func (o LookupMonitorResultOutput) EnvironmentProperties() GetMonitorEnvironmentPropertyArrayOutput { return o.ApplyT(func(v LookupMonitorResult) []GetMonitorEnvironmentProperty { return v.EnvironmentProperties }).(GetMonitorEnvironmentPropertyArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupMonitorResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupMonitorResult) string { return v.Id }).(pulumi.StringOutput) } // The kind of managed identity assigned to this resource. A `identity` block as defined below. func (o LookupMonitorResultOutput) Identities() GetMonitorIdentityArrayOutput { return o.ApplyT(func(v LookupMonitorResult) []GetMonitorIdentity { return v.Identities }).(GetMonitorIdentityArrayOutput) } // The Azure Region where the Dynatrace monitor should exist. func (o LookupMonitorResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupMonitorResult) string { return v.Location }).(pulumi.StringOutput) } // Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. func (o LookupMonitorResultOutput) MarketplaceSubscription() pulumi.StringOutput { return o.ApplyT(func(v LookupMonitorResult) string { return v.MarketplaceSubscription }).(pulumi.StringOutput) } // Flag specifying if the resource monitoring is enabled or disabled. func (o LookupMonitorResultOutput) MonitoringEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupMonitorResult) bool { return v.MonitoringEnabled }).(pulumi.BoolOutput) } func (o LookupMonitorResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupMonitorResult) string { return v.Name }).(pulumi.StringOutput) } // Plan id as published by Dynatrace. func (o LookupMonitorResultOutput) Plans() GetMonitorPlanArrayOutput { return o.ApplyT(func(v LookupMonitorResult) []GetMonitorPlan { return v.Plans }).(GetMonitorPlanArrayOutput) } func (o LookupMonitorResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupMonitorResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o LookupMonitorResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupMonitorResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // User's information. A `user` block as defined below. func (o LookupMonitorResultOutput) Users() GetMonitorUserArrayOutput { return o.ApplyT(func(v LookupMonitorResult) []GetMonitorUser { return v.Users }).(GetMonitorUserArrayOutput) } func init() { pulumi.RegisterOutputType(LookupMonitorResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dynatrace/monitor.go
sdk/go/azure/dynatrace/monitor.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package dynatrace import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Dynatrace monitor. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dynatrace" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = dynatrace.NewMonitor(ctx, "example", &dynatrace.MonitorArgs{ // Name: pulumi.String("exmpledynatracemonitor"), // ResourceGroupName: example.Name, // Location: pulumi.Any(test.Location), // MonitoringEnabled: pulumi.Bool(true), // MarketplaceSubscriptionStatus: "Active", // Identity: &dynatrace.MonitorIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // User: &dynatrace.MonitorUserArgs{ // FirstName: pulumi.String("Alice"), // LastName: pulumi.String("Bobab"), // Email: pulumi.String("alice@microsoft.com"), // PhoneNumber: pulumi.String("123456"), // Country: pulumi.String("westus"), // }, // Plan: &dynatrace.MonitorPlanArgs{ // UsageType: pulumi.String("COMMITTED"), // BillingCycle: pulumi.String("MONTHLY"), // Plan: pulumi.String("azureportalintegration_privatepreview@TIDhjdtn7tfnxcy"), // EffectiveDate: pulumi.String("2019-08-30T15:14:33Z"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Dynatrace.Observability` - 2023-04-27 // // ## Import // // Dynatrace monitor can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:dynatrace/monitor:Monitor example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Dynatrace.Observability/monitors/monitor1 // ``` type Monitor struct { pulumi.CustomResourceState // Properties of the Dynatrace environment. An `environmentProperties` block as defined below. EnvironmentProperties MonitorEnvironmentPropertyArrayOutput `pulumi:"environmentProperties"` // The kind of managed identity assigned to this resource. A `identity` block as defined below. Identity MonitorIdentityOutput `pulumi:"identity"` // The Azure Region where the Dynatrace monitor should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. Possible values are `Active` and `Suspended`. Changing this forces a new resource to be created. MarketplaceSubscription pulumi.StringOutput `pulumi:"marketplaceSubscription"` // Flag specifying if the resource monitoring is enabled or disabled. Default is `true`. Changing this forces a new resource to be created. MonitoringEnabled pulumi.BoolPtrOutput `pulumi:"monitoringEnabled"` // Name of the Dynatrace monitor. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Billing plan information. A `plan` block as defined below. Changing this forces a new resource to be created. Plan MonitorPlanOutput `pulumi:"plan"` // The name of the Resource Group where the Dynatrace monitor should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // User's information. A `user` block as defined below. Changing this forces a new resource to be created. User MonitorUserOutput `pulumi:"user"` } // NewMonitor registers a new resource with the given unique name, arguments, and options. func NewMonitor(ctx *pulumi.Context, name string, args *MonitorArgs, opts ...pulumi.ResourceOption) (*Monitor, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Identity == nil { return nil, errors.New("invalid value for required argument 'Identity'") } if args.MarketplaceSubscription == nil { return nil, errors.New("invalid value for required argument 'MarketplaceSubscription'") } if args.Plan == nil { return nil, errors.New("invalid value for required argument 'Plan'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.User == nil { return nil, errors.New("invalid value for required argument 'User'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Monitor err := ctx.RegisterResource("azure:dynatrace/monitor:Monitor", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetMonitor gets an existing Monitor resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetMonitor(ctx *pulumi.Context, name string, id pulumi.IDInput, state *MonitorState, opts ...pulumi.ResourceOption) (*Monitor, error) { var resource Monitor err := ctx.ReadResource("azure:dynatrace/monitor:Monitor", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Monitor resources. type monitorState struct { // Properties of the Dynatrace environment. An `environmentProperties` block as defined below. EnvironmentProperties []MonitorEnvironmentProperty `pulumi:"environmentProperties"` // The kind of managed identity assigned to this resource. A `identity` block as defined below. Identity *MonitorIdentity `pulumi:"identity"` // The Azure Region where the Dynatrace monitor should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. Possible values are `Active` and `Suspended`. Changing this forces a new resource to be created. MarketplaceSubscription *string `pulumi:"marketplaceSubscription"` // Flag specifying if the resource monitoring is enabled or disabled. Default is `true`. Changing this forces a new resource to be created. MonitoringEnabled *bool `pulumi:"monitoringEnabled"` // Name of the Dynatrace monitor. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Billing plan information. A `plan` block as defined below. Changing this forces a new resource to be created. Plan *MonitorPlan `pulumi:"plan"` // The name of the Resource Group where the Dynatrace monitor should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // User's information. A `user` block as defined below. Changing this forces a new resource to be created. User *MonitorUser `pulumi:"user"` } type MonitorState struct { // Properties of the Dynatrace environment. An `environmentProperties` block as defined below. EnvironmentProperties MonitorEnvironmentPropertyArrayInput // The kind of managed identity assigned to this resource. A `identity` block as defined below. Identity MonitorIdentityPtrInput // The Azure Region where the Dynatrace monitor should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. Possible values are `Active` and `Suspended`. Changing this forces a new resource to be created. MarketplaceSubscription pulumi.StringPtrInput // Flag specifying if the resource monitoring is enabled or disabled. Default is `true`. Changing this forces a new resource to be created. MonitoringEnabled pulumi.BoolPtrInput // Name of the Dynatrace monitor. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Billing plan information. A `plan` block as defined below. Changing this forces a new resource to be created. Plan MonitorPlanPtrInput // The name of the Resource Group where the Dynatrace monitor should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // User's information. A `user` block as defined below. Changing this forces a new resource to be created. User MonitorUserPtrInput } func (MonitorState) ElementType() reflect.Type { return reflect.TypeOf((*monitorState)(nil)).Elem() } type monitorArgs struct { // Properties of the Dynatrace environment. An `environmentProperties` block as defined below. EnvironmentProperties []MonitorEnvironmentProperty `pulumi:"environmentProperties"` // The kind of managed identity assigned to this resource. A `identity` block as defined below. Identity MonitorIdentity `pulumi:"identity"` // The Azure Region where the Dynatrace monitor should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. Possible values are `Active` and `Suspended`. Changing this forces a new resource to be created. MarketplaceSubscription string `pulumi:"marketplaceSubscription"` // Flag specifying if the resource monitoring is enabled or disabled. Default is `true`. Changing this forces a new resource to be created. MonitoringEnabled *bool `pulumi:"monitoringEnabled"` // Name of the Dynatrace monitor. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Billing plan information. A `plan` block as defined below. Changing this forces a new resource to be created. Plan MonitorPlan `pulumi:"plan"` // The name of the Resource Group where the Dynatrace monitor should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // User's information. A `user` block as defined below. Changing this forces a new resource to be created. User MonitorUser `pulumi:"user"` } // The set of arguments for constructing a Monitor resource. type MonitorArgs struct { // Properties of the Dynatrace environment. An `environmentProperties` block as defined below. EnvironmentProperties MonitorEnvironmentPropertyArrayInput // The kind of managed identity assigned to this resource. A `identity` block as defined below. Identity MonitorIdentityInput // The Azure Region where the Dynatrace monitor should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. Possible values are `Active` and `Suspended`. Changing this forces a new resource to be created. MarketplaceSubscription pulumi.StringInput // Flag specifying if the resource monitoring is enabled or disabled. Default is `true`. Changing this forces a new resource to be created. MonitoringEnabled pulumi.BoolPtrInput // Name of the Dynatrace monitor. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Billing plan information. A `plan` block as defined below. Changing this forces a new resource to be created. Plan MonitorPlanInput // The name of the Resource Group where the Dynatrace monitor should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // User's information. A `user` block as defined below. Changing this forces a new resource to be created. User MonitorUserInput } func (MonitorArgs) ElementType() reflect.Type { return reflect.TypeOf((*monitorArgs)(nil)).Elem() } type MonitorInput interface { pulumi.Input ToMonitorOutput() MonitorOutput ToMonitorOutputWithContext(ctx context.Context) MonitorOutput } func (*Monitor) ElementType() reflect.Type { return reflect.TypeOf((**Monitor)(nil)).Elem() } func (i *Monitor) ToMonitorOutput() MonitorOutput { return i.ToMonitorOutputWithContext(context.Background()) } func (i *Monitor) ToMonitorOutputWithContext(ctx context.Context) MonitorOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorOutput) } // MonitorArrayInput is an input type that accepts MonitorArray and MonitorArrayOutput values. // You can construct a concrete instance of `MonitorArrayInput` via: // // MonitorArray{ MonitorArgs{...} } type MonitorArrayInput interface { pulumi.Input ToMonitorArrayOutput() MonitorArrayOutput ToMonitorArrayOutputWithContext(context.Context) MonitorArrayOutput } type MonitorArray []MonitorInput func (MonitorArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Monitor)(nil)).Elem() } func (i MonitorArray) ToMonitorArrayOutput() MonitorArrayOutput { return i.ToMonitorArrayOutputWithContext(context.Background()) } func (i MonitorArray) ToMonitorArrayOutputWithContext(ctx context.Context) MonitorArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorArrayOutput) } // MonitorMapInput is an input type that accepts MonitorMap and MonitorMapOutput values. // You can construct a concrete instance of `MonitorMapInput` via: // // MonitorMap{ "key": MonitorArgs{...} } type MonitorMapInput interface { pulumi.Input ToMonitorMapOutput() MonitorMapOutput ToMonitorMapOutputWithContext(context.Context) MonitorMapOutput } type MonitorMap map[string]MonitorInput func (MonitorMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Monitor)(nil)).Elem() } func (i MonitorMap) ToMonitorMapOutput() MonitorMapOutput { return i.ToMonitorMapOutputWithContext(context.Background()) } func (i MonitorMap) ToMonitorMapOutputWithContext(ctx context.Context) MonitorMapOutput { return pulumi.ToOutputWithContext(ctx, i).(MonitorMapOutput) } type MonitorOutput struct{ *pulumi.OutputState } func (MonitorOutput) ElementType() reflect.Type { return reflect.TypeOf((**Monitor)(nil)).Elem() } func (o MonitorOutput) ToMonitorOutput() MonitorOutput { return o } func (o MonitorOutput) ToMonitorOutputWithContext(ctx context.Context) MonitorOutput { return o } // Properties of the Dynatrace environment. An `environmentProperties` block as defined below. func (o MonitorOutput) EnvironmentProperties() MonitorEnvironmentPropertyArrayOutput { return o.ApplyT(func(v *Monitor) MonitorEnvironmentPropertyArrayOutput { return v.EnvironmentProperties }).(MonitorEnvironmentPropertyArrayOutput) } // The kind of managed identity assigned to this resource. A `identity` block as defined below. func (o MonitorOutput) Identity() MonitorIdentityOutput { return o.ApplyT(func(v *Monitor) MonitorIdentityOutput { return v.Identity }).(MonitorIdentityOutput) } // The Azure Region where the Dynatrace monitor should exist. Changing this forces a new resource to be created. func (o MonitorOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Monitor) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. Possible values are `Active` and `Suspended`. Changing this forces a new resource to be created. func (o MonitorOutput) MarketplaceSubscription() pulumi.StringOutput { return o.ApplyT(func(v *Monitor) pulumi.StringOutput { return v.MarketplaceSubscription }).(pulumi.StringOutput) } // Flag specifying if the resource monitoring is enabled or disabled. Default is `true`. Changing this forces a new resource to be created. func (o MonitorOutput) MonitoringEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Monitor) pulumi.BoolPtrOutput { return v.MonitoringEnabled }).(pulumi.BoolPtrOutput) } // Name of the Dynatrace monitor. Changing this forces a new resource to be created. func (o MonitorOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Monitor) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Billing plan information. A `plan` block as defined below. Changing this forces a new resource to be created. func (o MonitorOutput) Plan() MonitorPlanOutput { return o.ApplyT(func(v *Monitor) MonitorPlanOutput { return v.Plan }).(MonitorPlanOutput) } // The name of the Resource Group where the Dynatrace monitor should exist. Changing this forces a new resource to be created. func (o MonitorOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Monitor) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o MonitorOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Monitor) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // User's information. A `user` block as defined below. Changing this forces a new resource to be created. func (o MonitorOutput) User() MonitorUserOutput { return o.ApplyT(func(v *Monitor) MonitorUserOutput { return v.User }).(MonitorUserOutput) } type MonitorArrayOutput struct{ *pulumi.OutputState } func (MonitorArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Monitor)(nil)).Elem() } func (o MonitorArrayOutput) ToMonitorArrayOutput() MonitorArrayOutput { return o } func (o MonitorArrayOutput) ToMonitorArrayOutputWithContext(ctx context.Context) MonitorArrayOutput { return o } func (o MonitorArrayOutput) Index(i pulumi.IntInput) MonitorOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Monitor { return vs[0].([]*Monitor)[vs[1].(int)] }).(MonitorOutput) } type MonitorMapOutput struct{ *pulumi.OutputState } func (MonitorMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Monitor)(nil)).Elem() } func (o MonitorMapOutput) ToMonitorMapOutput() MonitorMapOutput { return o } func (o MonitorMapOutput) ToMonitorMapOutputWithContext(ctx context.Context) MonitorMapOutput { return o } func (o MonitorMapOutput) MapIndex(k pulumi.StringInput) MonitorOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Monitor { return vs[0].(map[string]*Monitor)[vs[1].(string)] }).(MonitorOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*MonitorInput)(nil)).Elem(), &Monitor{}) pulumi.RegisterInputType(reflect.TypeOf((*MonitorArrayInput)(nil)).Elem(), MonitorArray{}) pulumi.RegisterInputType(reflect.TypeOf((*MonitorMapInput)(nil)).Elem(), MonitorMap{}) pulumi.RegisterOutputType(MonitorOutput{}) pulumi.RegisterOutputType(MonitorArrayOutput{}) pulumi.RegisterOutputType(MonitorMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/dynatrace/tagRules.go
sdk/go/azure/dynatrace/tagRules.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package dynatrace import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages Dynatrace tag rules. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dynatrace" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = dynatrace.NewMonitor(ctx, "example", &dynatrace.MonitorArgs{ // Name: pulumi.String("exmpledynatracemonitor"), // ResourceGroupName: example.Name, // Location: pulumi.Any(test.Location), // MonitoringEnabled: pulumi.Bool(true), // MarketplaceSubscriptionStatus: "Active", // Identity: &dynatrace.MonitorIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // User: &dynatrace.MonitorUserArgs{ // FirstName: pulumi.String("Alice"), // LastName: pulumi.String("Bobab"), // Email: pulumi.String("alice@microsoft.com"), // PhoneNumber: pulumi.String("123456"), // Country: pulumi.String("westus"), // }, // Plan: &dynatrace.MonitorPlanArgs{ // UsageType: pulumi.String("COMMITTED"), // BillingCycle: pulumi.String("MONTHLY"), // Plan: pulumi.String("azureportalintegration_privatepreview@TIDhjdtn7tfnxcy"), // EffectiveDate: pulumi.String("2019-08-30T15:14:33Z"), // }, // }) // if err != nil { // return err // } // _, err = dynatrace.NewTagRules(ctx, "example", &dynatrace.TagRulesArgs{ // Name: pulumi.String("default"), // MonitorId: pulumi.Any(testAzurermDynatraceMonitors.Id), // LogRule: &dynatrace.TagRulesLogRuleArgs{ // FilteringTags: dynatrace.TagRulesLogRuleFilteringTagArray{ // &dynatrace.TagRulesLogRuleFilteringTagArgs{ // Name: pulumi.String("Environment"), // Value: pulumi.String("Prod"), // Action: pulumi.String("Include"), // }, // }, // SendAzureActiveDirectoryLogsEnabled: pulumi.Bool(true), // SendActivityLogsEnabled: pulumi.Bool(true), // SendSubscriptionLogsEnabled: pulumi.Bool(true), // }, // MetricRule: &dynatrace.TagRulesMetricRuleArgs{ // FilteringTags: dynatrace.TagRulesMetricRuleFilteringTagArray{ // &dynatrace.TagRulesMetricRuleFilteringTagArgs{ // Name: pulumi.String("Environment"), // Value: pulumi.String("Prod"), // Action: pulumi.String("Include"), // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Dynatrace.Observability` - 2023-04-27 // // ## Import // // Dynatrace tag rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:dynatrace/tagRules:TagRules example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Dynatrace.Observability/monitors/monitor1/tagRules/tagRules1 // ``` type TagRules struct { pulumi.CustomResourceState // Set of rules for sending logs for the Monitor resource. A `logRule` block as defined below. LogRule TagRulesLogRulePtrOutput `pulumi:"logRule"` // Set of rules for sending metrics for the Monitor resource. A `metricRule` block as defined below. MetricRule TagRulesMetricRulePtrOutput `pulumi:"metricRule"` // Name of the Dynatrace monitor. Changing this forces a new resource to be created. MonitorId pulumi.StringOutput `pulumi:"monitorId"` // Name of the Dynatrace tag rules. Currently, the only supported value is `default`. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` } // NewTagRules registers a new resource with the given unique name, arguments, and options. func NewTagRules(ctx *pulumi.Context, name string, args *TagRulesArgs, opts ...pulumi.ResourceOption) (*TagRules, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.MonitorId == nil { return nil, errors.New("invalid value for required argument 'MonitorId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource TagRules err := ctx.RegisterResource("azure:dynatrace/tagRules:TagRules", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetTagRules gets an existing TagRules resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetTagRules(ctx *pulumi.Context, name string, id pulumi.IDInput, state *TagRulesState, opts ...pulumi.ResourceOption) (*TagRules, error) { var resource TagRules err := ctx.ReadResource("azure:dynatrace/tagRules:TagRules", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering TagRules resources. type tagRulesState struct { // Set of rules for sending logs for the Monitor resource. A `logRule` block as defined below. LogRule *TagRulesLogRule `pulumi:"logRule"` // Set of rules for sending metrics for the Monitor resource. A `metricRule` block as defined below. MetricRule *TagRulesMetricRule `pulumi:"metricRule"` // Name of the Dynatrace monitor. Changing this forces a new resource to be created. MonitorId *string `pulumi:"monitorId"` // Name of the Dynatrace tag rules. Currently, the only supported value is `default`. Changing this forces a new resource to be created. Name *string `pulumi:"name"` } type TagRulesState struct { // Set of rules for sending logs for the Monitor resource. A `logRule` block as defined below. LogRule TagRulesLogRulePtrInput // Set of rules for sending metrics for the Monitor resource. A `metricRule` block as defined below. MetricRule TagRulesMetricRulePtrInput // Name of the Dynatrace monitor. Changing this forces a new resource to be created. MonitorId pulumi.StringPtrInput // Name of the Dynatrace tag rules. Currently, the only supported value is `default`. Changing this forces a new resource to be created. Name pulumi.StringPtrInput } func (TagRulesState) ElementType() reflect.Type { return reflect.TypeOf((*tagRulesState)(nil)).Elem() } type tagRulesArgs struct { // Set of rules for sending logs for the Monitor resource. A `logRule` block as defined below. LogRule *TagRulesLogRule `pulumi:"logRule"` // Set of rules for sending metrics for the Monitor resource. A `metricRule` block as defined below. MetricRule *TagRulesMetricRule `pulumi:"metricRule"` // Name of the Dynatrace monitor. Changing this forces a new resource to be created. MonitorId string `pulumi:"monitorId"` // Name of the Dynatrace tag rules. Currently, the only supported value is `default`. Changing this forces a new resource to be created. Name *string `pulumi:"name"` } // The set of arguments for constructing a TagRules resource. type TagRulesArgs struct { // Set of rules for sending logs for the Monitor resource. A `logRule` block as defined below. LogRule TagRulesLogRulePtrInput // Set of rules for sending metrics for the Monitor resource. A `metricRule` block as defined below. MetricRule TagRulesMetricRulePtrInput // Name of the Dynatrace monitor. Changing this forces a new resource to be created. MonitorId pulumi.StringInput // Name of the Dynatrace tag rules. Currently, the only supported value is `default`. Changing this forces a new resource to be created. Name pulumi.StringPtrInput } func (TagRulesArgs) ElementType() reflect.Type { return reflect.TypeOf((*tagRulesArgs)(nil)).Elem() } type TagRulesInput interface { pulumi.Input ToTagRulesOutput() TagRulesOutput ToTagRulesOutputWithContext(ctx context.Context) TagRulesOutput } func (*TagRules) ElementType() reflect.Type { return reflect.TypeOf((**TagRules)(nil)).Elem() } func (i *TagRules) ToTagRulesOutput() TagRulesOutput { return i.ToTagRulesOutputWithContext(context.Background()) } func (i *TagRules) ToTagRulesOutputWithContext(ctx context.Context) TagRulesOutput { return pulumi.ToOutputWithContext(ctx, i).(TagRulesOutput) } // TagRulesArrayInput is an input type that accepts TagRulesArray and TagRulesArrayOutput values. // You can construct a concrete instance of `TagRulesArrayInput` via: // // TagRulesArray{ TagRulesArgs{...} } type TagRulesArrayInput interface { pulumi.Input ToTagRulesArrayOutput() TagRulesArrayOutput ToTagRulesArrayOutputWithContext(context.Context) TagRulesArrayOutput } type TagRulesArray []TagRulesInput func (TagRulesArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*TagRules)(nil)).Elem() } func (i TagRulesArray) ToTagRulesArrayOutput() TagRulesArrayOutput { return i.ToTagRulesArrayOutputWithContext(context.Background()) } func (i TagRulesArray) ToTagRulesArrayOutputWithContext(ctx context.Context) TagRulesArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(TagRulesArrayOutput) } // TagRulesMapInput is an input type that accepts TagRulesMap and TagRulesMapOutput values. // You can construct a concrete instance of `TagRulesMapInput` via: // // TagRulesMap{ "key": TagRulesArgs{...} } type TagRulesMapInput interface { pulumi.Input ToTagRulesMapOutput() TagRulesMapOutput ToTagRulesMapOutputWithContext(context.Context) TagRulesMapOutput } type TagRulesMap map[string]TagRulesInput func (TagRulesMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*TagRules)(nil)).Elem() } func (i TagRulesMap) ToTagRulesMapOutput() TagRulesMapOutput { return i.ToTagRulesMapOutputWithContext(context.Background()) } func (i TagRulesMap) ToTagRulesMapOutputWithContext(ctx context.Context) TagRulesMapOutput { return pulumi.ToOutputWithContext(ctx, i).(TagRulesMapOutput) } type TagRulesOutput struct{ *pulumi.OutputState } func (TagRulesOutput) ElementType() reflect.Type { return reflect.TypeOf((**TagRules)(nil)).Elem() } func (o TagRulesOutput) ToTagRulesOutput() TagRulesOutput { return o } func (o TagRulesOutput) ToTagRulesOutputWithContext(ctx context.Context) TagRulesOutput { return o } // Set of rules for sending logs for the Monitor resource. A `logRule` block as defined below. func (o TagRulesOutput) LogRule() TagRulesLogRulePtrOutput { return o.ApplyT(func(v *TagRules) TagRulesLogRulePtrOutput { return v.LogRule }).(TagRulesLogRulePtrOutput) } // Set of rules for sending metrics for the Monitor resource. A `metricRule` block as defined below. func (o TagRulesOutput) MetricRule() TagRulesMetricRulePtrOutput { return o.ApplyT(func(v *TagRules) TagRulesMetricRulePtrOutput { return v.MetricRule }).(TagRulesMetricRulePtrOutput) } // Name of the Dynatrace monitor. Changing this forces a new resource to be created. func (o TagRulesOutput) MonitorId() pulumi.StringOutput { return o.ApplyT(func(v *TagRules) pulumi.StringOutput { return v.MonitorId }).(pulumi.StringOutput) } // Name of the Dynatrace tag rules. Currently, the only supported value is `default`. Changing this forces a new resource to be created. func (o TagRulesOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *TagRules) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } type TagRulesArrayOutput struct{ *pulumi.OutputState } func (TagRulesArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*TagRules)(nil)).Elem() } func (o TagRulesArrayOutput) ToTagRulesArrayOutput() TagRulesArrayOutput { return o } func (o TagRulesArrayOutput) ToTagRulesArrayOutputWithContext(ctx context.Context) TagRulesArrayOutput { return o } func (o TagRulesArrayOutput) Index(i pulumi.IntInput) TagRulesOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TagRules { return vs[0].([]*TagRules)[vs[1].(int)] }).(TagRulesOutput) } type TagRulesMapOutput struct{ *pulumi.OutputState } func (TagRulesMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*TagRules)(nil)).Elem() } func (o TagRulesMapOutput) ToTagRulesMapOutput() TagRulesMapOutput { return o } func (o TagRulesMapOutput) ToTagRulesMapOutputWithContext(ctx context.Context) TagRulesMapOutput { return o } func (o TagRulesMapOutput) MapIndex(k pulumi.StringInput) TagRulesOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TagRules { return vs[0].(map[string]*TagRules)[vs[1].(string)] }).(TagRulesOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*TagRulesInput)(nil)).Elem(), &TagRules{}) pulumi.RegisterInputType(reflect.TypeOf((*TagRulesArrayInput)(nil)).Elem(), TagRulesArray{}) pulumi.RegisterInputType(reflect.TypeOf((*TagRulesMapInput)(nil)).Elem(), TagRulesMap{}) pulumi.RegisterOutputType(TagRulesOutput{}) pulumi.RegisterOutputType(TagRulesArrayOutput{}) pulumi.RegisterOutputType(TagRulesMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/expressroute/getCircuitPeering.go
sdk/go/azure/expressroute/getCircuitPeering.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package expressroute import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Use this data source to access information about an existing ExpressRoute Circuit Peering. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/expressroute" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := expressroute.GetCircuitPeering(ctx, &expressroute.GetCircuitPeeringArgs{ // PeeringType: "example-peering", // ExpressRouteCircuitName: "example-expressroute", // ResourceGroupName: "example-resources", // }, nil) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func GetCircuitPeering(ctx *pulumi.Context, args *GetCircuitPeeringArgs, opts ...pulumi.InvokeOption) (*GetCircuitPeeringResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetCircuitPeeringResult err := ctx.Invoke("azure:expressroute/getCircuitPeering:getCircuitPeering", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getCircuitPeering. type GetCircuitPeeringArgs struct { // The name of the ExpressRoute Circuit in which to create the Peering. Changing this forces a new resource to be created. ExpressRouteCircuitName string `pulumi:"expressRouteCircuitName"` // The type of the ExpressRoute Circuit Peering. Acceptable values include `AzurePrivatePeering`, `AzurePublicPeering` and `MicrosoftPeering`. PeeringType string `pulumi:"peeringType"` // The name of the resource group in which to create the Express Route Circuit Peering. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getCircuitPeering. type GetCircuitPeeringResult struct { // The ASN used by Azure for the peering. AzureAsn int `pulumi:"azureAsn"` ExpressRouteCircuitName string `pulumi:"expressRouteCircuitName"` GatewayManagerEtag string `pulumi:"gatewayManagerEtag"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // Indicates if IPv4 is enabled. Ipv4Enabled bool `pulumi:"ipv4Enabled"` PeerAsn int `pulumi:"peerAsn"` // The type of the ExpressRoute Circuit Peering. PeeringType string `pulumi:"peeringType"` // The primary port used by Azure for this peering. PrimaryAzurePort string `pulumi:"primaryAzurePort"` // The primary peer address prefix. PrimaryPeerAddressPrefix string `pulumi:"primaryPeerAddressPrefix"` ResourceGroupName string `pulumi:"resourceGroupName"` RouteFilterId string `pulumi:"routeFilterId"` // The secondary port used by Azure for this peering. SecondaryAzurePort string `pulumi:"secondaryAzurePort"` // The secondary peer address prefix. SecondaryPeerAddressPrefix string `pulumi:"secondaryPeerAddressPrefix"` SharedKey string `pulumi:"sharedKey"` // The VLAN ID used for this peering. VlanId int `pulumi:"vlanId"` } func GetCircuitPeeringOutput(ctx *pulumi.Context, args GetCircuitPeeringOutputArgs, opts ...pulumi.InvokeOption) GetCircuitPeeringResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetCircuitPeeringResultOutput, error) { args := v.(GetCircuitPeeringArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:expressroute/getCircuitPeering:getCircuitPeering", args, GetCircuitPeeringResultOutput{}, options).(GetCircuitPeeringResultOutput), nil }).(GetCircuitPeeringResultOutput) } // A collection of arguments for invoking getCircuitPeering. type GetCircuitPeeringOutputArgs struct { // The name of the ExpressRoute Circuit in which to create the Peering. Changing this forces a new resource to be created. ExpressRouteCircuitName pulumi.StringInput `pulumi:"expressRouteCircuitName"` // The type of the ExpressRoute Circuit Peering. Acceptable values include `AzurePrivatePeering`, `AzurePublicPeering` and `MicrosoftPeering`. PeeringType pulumi.StringInput `pulumi:"peeringType"` // The name of the resource group in which to create the Express Route Circuit Peering. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetCircuitPeeringOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetCircuitPeeringArgs)(nil)).Elem() } // A collection of values returned by getCircuitPeering. type GetCircuitPeeringResultOutput struct{ *pulumi.OutputState } func (GetCircuitPeeringResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetCircuitPeeringResult)(nil)).Elem() } func (o GetCircuitPeeringResultOutput) ToGetCircuitPeeringResultOutput() GetCircuitPeeringResultOutput { return o } func (o GetCircuitPeeringResultOutput) ToGetCircuitPeeringResultOutputWithContext(ctx context.Context) GetCircuitPeeringResultOutput { return o } // The ASN used by Azure for the peering. func (o GetCircuitPeeringResultOutput) AzureAsn() pulumi.IntOutput { return o.ApplyT(func(v GetCircuitPeeringResult) int { return v.AzureAsn }).(pulumi.IntOutput) } func (o GetCircuitPeeringResultOutput) ExpressRouteCircuitName() pulumi.StringOutput { return o.ApplyT(func(v GetCircuitPeeringResult) string { return v.ExpressRouteCircuitName }).(pulumi.StringOutput) } func (o GetCircuitPeeringResultOutput) GatewayManagerEtag() pulumi.StringOutput { return o.ApplyT(func(v GetCircuitPeeringResult) string { return v.GatewayManagerEtag }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetCircuitPeeringResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetCircuitPeeringResult) string { return v.Id }).(pulumi.StringOutput) } // Indicates if IPv4 is enabled. func (o GetCircuitPeeringResultOutput) Ipv4Enabled() pulumi.BoolOutput { return o.ApplyT(func(v GetCircuitPeeringResult) bool { return v.Ipv4Enabled }).(pulumi.BoolOutput) } func (o GetCircuitPeeringResultOutput) PeerAsn() pulumi.IntOutput { return o.ApplyT(func(v GetCircuitPeeringResult) int { return v.PeerAsn }).(pulumi.IntOutput) } // The type of the ExpressRoute Circuit Peering. func (o GetCircuitPeeringResultOutput) PeeringType() pulumi.StringOutput { return o.ApplyT(func(v GetCircuitPeeringResult) string { return v.PeeringType }).(pulumi.StringOutput) } // The primary port used by Azure for this peering. func (o GetCircuitPeeringResultOutput) PrimaryAzurePort() pulumi.StringOutput { return o.ApplyT(func(v GetCircuitPeeringResult) string { return v.PrimaryAzurePort }).(pulumi.StringOutput) } // The primary peer address prefix. func (o GetCircuitPeeringResultOutput) PrimaryPeerAddressPrefix() pulumi.StringOutput { return o.ApplyT(func(v GetCircuitPeeringResult) string { return v.PrimaryPeerAddressPrefix }).(pulumi.StringOutput) } func (o GetCircuitPeeringResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetCircuitPeeringResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o GetCircuitPeeringResultOutput) RouteFilterId() pulumi.StringOutput { return o.ApplyT(func(v GetCircuitPeeringResult) string { return v.RouteFilterId }).(pulumi.StringOutput) } // The secondary port used by Azure for this peering. func (o GetCircuitPeeringResultOutput) SecondaryAzurePort() pulumi.StringOutput { return o.ApplyT(func(v GetCircuitPeeringResult) string { return v.SecondaryAzurePort }).(pulumi.StringOutput) } // The secondary peer address prefix. func (o GetCircuitPeeringResultOutput) SecondaryPeerAddressPrefix() pulumi.StringOutput { return o.ApplyT(func(v GetCircuitPeeringResult) string { return v.SecondaryPeerAddressPrefix }).(pulumi.StringOutput) } func (o GetCircuitPeeringResultOutput) SharedKey() pulumi.StringOutput { return o.ApplyT(func(v GetCircuitPeeringResult) string { return v.SharedKey }).(pulumi.StringOutput) } // The VLAN ID used for this peering. func (o GetCircuitPeeringResultOutput) VlanId() pulumi.IntOutput { return o.ApplyT(func(v GetCircuitPeeringResult) int { return v.VlanId }).(pulumi.IntOutput) } func init() { pulumi.RegisterOutputType(GetCircuitPeeringResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appservice/webAppHybridConnection.go
sdk/go/azure/appservice/webAppHybridConnection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appservice import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Web App Hybrid Connection. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/relay" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleServicePlan, err := appservice.NewServicePlan(ctx, "example", &appservice.ServicePlanArgs{ // Name: pulumi.String("example-plan"), // Location: example.Location, // ResourceGroupName: example.Name, // OsType: pulumi.String("Windows"), // SkuName: pulumi.String("S1"), // }) // if err != nil { // return err // } // exampleNamespace, err := relay.NewNamespace(ctx, "example", &relay.NamespaceArgs{ // Name: pulumi.String("example-relay"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("Standard"), // }) // if err != nil { // return err // } // exampleHybridConnection, err := relay.NewHybridConnection(ctx, "example", &relay.HybridConnectionArgs{ // Name: pulumi.String("examplerhc1"), // ResourceGroupName: example.Name, // RelayNamespaceName: exampleNamespace.Name, // }) // if err != nil { // return err // } // exampleWindowsWebApp, err := appservice.NewWindowsWebApp(ctx, "example", &appservice.WindowsWebAppArgs{ // Name: pulumi.String("example-web-app"), // Location: example.Location, // ResourceGroupName: example.Name, // ServicePlanId: exampleServicePlan.ID(), // SiteConfig: &appservice.WindowsWebAppSiteConfigArgs{}, // }) // if err != nil { // return err // } // _, err = appservice.NewWebAppHybridConnection(ctx, "example", &appservice.WebAppHybridConnectionArgs{ // WebAppId: exampleWindowsWebApp.ID(), // RelayId: exampleHybridConnection.ID(), // Hostname: pulumi.String("myhostname.example"), // Port: pulumi.Int(8081), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Relay` - 2021-11-01 // // * `Microsoft.Web` - 2023-12-01 // // ## Import // // a Web App Hybrid Connection can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appservice/webAppHybridConnection:WebAppHybridConnection example "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/sites/site1/hybridConnectionNamespaces/hybridConnectionNamespace1/relays/relay1" // ``` type WebAppHybridConnection struct { pulumi.CustomResourceState // The hostname of the endpoint. Hostname pulumi.StringOutput `pulumi:"hostname"` // The name of the Relay Namespace. NamespaceName pulumi.StringOutput `pulumi:"namespaceName"` // The port to use for the endpoint. Port pulumi.IntOutput `pulumi:"port"` // The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created. RelayId pulumi.StringOutput `pulumi:"relayId"` // The name of the Relay in use. RelayName pulumi.StringOutput `pulumi:"relayName"` // The name of the Relay key with `Send` permission to use. Defaults to `RootManageSharedAccessKey` SendKeyName pulumi.StringPtrOutput `pulumi:"sendKeyName"` // The Primary Access Key for the `sendKeyName` SendKeyValue pulumi.StringOutput `pulumi:"sendKeyValue"` // The Service Bus Namespace. ServiceBusNamespace pulumi.StringOutput `pulumi:"serviceBusNamespace"` // The suffix for the endpoint. ServiceBusSuffix pulumi.StringOutput `pulumi:"serviceBusSuffix"` // The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created. WebAppId pulumi.StringOutput `pulumi:"webAppId"` } // NewWebAppHybridConnection registers a new resource with the given unique name, arguments, and options. func NewWebAppHybridConnection(ctx *pulumi.Context, name string, args *WebAppHybridConnectionArgs, opts ...pulumi.ResourceOption) (*WebAppHybridConnection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Hostname == nil { return nil, errors.New("invalid value for required argument 'Hostname'") } if args.Port == nil { return nil, errors.New("invalid value for required argument 'Port'") } if args.RelayId == nil { return nil, errors.New("invalid value for required argument 'RelayId'") } if args.WebAppId == nil { return nil, errors.New("invalid value for required argument 'WebAppId'") } secrets := pulumi.AdditionalSecretOutputs([]string{ "sendKeyValue", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource WebAppHybridConnection err := ctx.RegisterResource("azure:appservice/webAppHybridConnection:WebAppHybridConnection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWebAppHybridConnection gets an existing WebAppHybridConnection resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetWebAppHybridConnection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WebAppHybridConnectionState, opts ...pulumi.ResourceOption) (*WebAppHybridConnection, error) { var resource WebAppHybridConnection err := ctx.ReadResource("azure:appservice/webAppHybridConnection:WebAppHybridConnection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering WebAppHybridConnection resources. type webAppHybridConnectionState struct { // The hostname of the endpoint. Hostname *string `pulumi:"hostname"` // The name of the Relay Namespace. NamespaceName *string `pulumi:"namespaceName"` // The port to use for the endpoint. Port *int `pulumi:"port"` // The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created. RelayId *string `pulumi:"relayId"` // The name of the Relay in use. RelayName *string `pulumi:"relayName"` // The name of the Relay key with `Send` permission to use. Defaults to `RootManageSharedAccessKey` SendKeyName *string `pulumi:"sendKeyName"` // The Primary Access Key for the `sendKeyName` SendKeyValue *string `pulumi:"sendKeyValue"` // The Service Bus Namespace. ServiceBusNamespace *string `pulumi:"serviceBusNamespace"` // The suffix for the endpoint. ServiceBusSuffix *string `pulumi:"serviceBusSuffix"` // The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created. WebAppId *string `pulumi:"webAppId"` } type WebAppHybridConnectionState struct { // The hostname of the endpoint. Hostname pulumi.StringPtrInput // The name of the Relay Namespace. NamespaceName pulumi.StringPtrInput // The port to use for the endpoint. Port pulumi.IntPtrInput // The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created. RelayId pulumi.StringPtrInput // The name of the Relay in use. RelayName pulumi.StringPtrInput // The name of the Relay key with `Send` permission to use. Defaults to `RootManageSharedAccessKey` SendKeyName pulumi.StringPtrInput // The Primary Access Key for the `sendKeyName` SendKeyValue pulumi.StringPtrInput // The Service Bus Namespace. ServiceBusNamespace pulumi.StringPtrInput // The suffix for the endpoint. ServiceBusSuffix pulumi.StringPtrInput // The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created. WebAppId pulumi.StringPtrInput } func (WebAppHybridConnectionState) ElementType() reflect.Type { return reflect.TypeOf((*webAppHybridConnectionState)(nil)).Elem() } type webAppHybridConnectionArgs struct { // The hostname of the endpoint. Hostname string `pulumi:"hostname"` // The port to use for the endpoint. Port int `pulumi:"port"` // The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created. RelayId string `pulumi:"relayId"` // The name of the Relay key with `Send` permission to use. Defaults to `RootManageSharedAccessKey` SendKeyName *string `pulumi:"sendKeyName"` // The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created. WebAppId string `pulumi:"webAppId"` } // The set of arguments for constructing a WebAppHybridConnection resource. type WebAppHybridConnectionArgs struct { // The hostname of the endpoint. Hostname pulumi.StringInput // The port to use for the endpoint. Port pulumi.IntInput // The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created. RelayId pulumi.StringInput // The name of the Relay key with `Send` permission to use. Defaults to `RootManageSharedAccessKey` SendKeyName pulumi.StringPtrInput // The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created. WebAppId pulumi.StringInput } func (WebAppHybridConnectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*webAppHybridConnectionArgs)(nil)).Elem() } type WebAppHybridConnectionInput interface { pulumi.Input ToWebAppHybridConnectionOutput() WebAppHybridConnectionOutput ToWebAppHybridConnectionOutputWithContext(ctx context.Context) WebAppHybridConnectionOutput } func (*WebAppHybridConnection) ElementType() reflect.Type { return reflect.TypeOf((**WebAppHybridConnection)(nil)).Elem() } func (i *WebAppHybridConnection) ToWebAppHybridConnectionOutput() WebAppHybridConnectionOutput { return i.ToWebAppHybridConnectionOutputWithContext(context.Background()) } func (i *WebAppHybridConnection) ToWebAppHybridConnectionOutputWithContext(ctx context.Context) WebAppHybridConnectionOutput { return pulumi.ToOutputWithContext(ctx, i).(WebAppHybridConnectionOutput) } // WebAppHybridConnectionArrayInput is an input type that accepts WebAppHybridConnectionArray and WebAppHybridConnectionArrayOutput values. // You can construct a concrete instance of `WebAppHybridConnectionArrayInput` via: // // WebAppHybridConnectionArray{ WebAppHybridConnectionArgs{...} } type WebAppHybridConnectionArrayInput interface { pulumi.Input ToWebAppHybridConnectionArrayOutput() WebAppHybridConnectionArrayOutput ToWebAppHybridConnectionArrayOutputWithContext(context.Context) WebAppHybridConnectionArrayOutput } type WebAppHybridConnectionArray []WebAppHybridConnectionInput func (WebAppHybridConnectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*WebAppHybridConnection)(nil)).Elem() } func (i WebAppHybridConnectionArray) ToWebAppHybridConnectionArrayOutput() WebAppHybridConnectionArrayOutput { return i.ToWebAppHybridConnectionArrayOutputWithContext(context.Background()) } func (i WebAppHybridConnectionArray) ToWebAppHybridConnectionArrayOutputWithContext(ctx context.Context) WebAppHybridConnectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WebAppHybridConnectionArrayOutput) } // WebAppHybridConnectionMapInput is an input type that accepts WebAppHybridConnectionMap and WebAppHybridConnectionMapOutput values. // You can construct a concrete instance of `WebAppHybridConnectionMapInput` via: // // WebAppHybridConnectionMap{ "key": WebAppHybridConnectionArgs{...} } type WebAppHybridConnectionMapInput interface { pulumi.Input ToWebAppHybridConnectionMapOutput() WebAppHybridConnectionMapOutput ToWebAppHybridConnectionMapOutputWithContext(context.Context) WebAppHybridConnectionMapOutput } type WebAppHybridConnectionMap map[string]WebAppHybridConnectionInput func (WebAppHybridConnectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WebAppHybridConnection)(nil)).Elem() } func (i WebAppHybridConnectionMap) ToWebAppHybridConnectionMapOutput() WebAppHybridConnectionMapOutput { return i.ToWebAppHybridConnectionMapOutputWithContext(context.Background()) } func (i WebAppHybridConnectionMap) ToWebAppHybridConnectionMapOutputWithContext(ctx context.Context) WebAppHybridConnectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WebAppHybridConnectionMapOutput) } type WebAppHybridConnectionOutput struct{ *pulumi.OutputState } func (WebAppHybridConnectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**WebAppHybridConnection)(nil)).Elem() } func (o WebAppHybridConnectionOutput) ToWebAppHybridConnectionOutput() WebAppHybridConnectionOutput { return o } func (o WebAppHybridConnectionOutput) ToWebAppHybridConnectionOutputWithContext(ctx context.Context) WebAppHybridConnectionOutput { return o } // The hostname of the endpoint. func (o WebAppHybridConnectionOutput) Hostname() pulumi.StringOutput { return o.ApplyT(func(v *WebAppHybridConnection) pulumi.StringOutput { return v.Hostname }).(pulumi.StringOutput) } // The name of the Relay Namespace. func (o WebAppHybridConnectionOutput) NamespaceName() pulumi.StringOutput { return o.ApplyT(func(v *WebAppHybridConnection) pulumi.StringOutput { return v.NamespaceName }).(pulumi.StringOutput) } // The port to use for the endpoint. func (o WebAppHybridConnectionOutput) Port() pulumi.IntOutput { return o.ApplyT(func(v *WebAppHybridConnection) pulumi.IntOutput { return v.Port }).(pulumi.IntOutput) } // The ID of the Relay Hybrid Connection to use. Changing this forces a new resource to be created. func (o WebAppHybridConnectionOutput) RelayId() pulumi.StringOutput { return o.ApplyT(func(v *WebAppHybridConnection) pulumi.StringOutput { return v.RelayId }).(pulumi.StringOutput) } // The name of the Relay in use. func (o WebAppHybridConnectionOutput) RelayName() pulumi.StringOutput { return o.ApplyT(func(v *WebAppHybridConnection) pulumi.StringOutput { return v.RelayName }).(pulumi.StringOutput) } // The name of the Relay key with `Send` permission to use. Defaults to `RootManageSharedAccessKey` func (o WebAppHybridConnectionOutput) SendKeyName() pulumi.StringPtrOutput { return o.ApplyT(func(v *WebAppHybridConnection) pulumi.StringPtrOutput { return v.SendKeyName }).(pulumi.StringPtrOutput) } // The Primary Access Key for the `sendKeyName` func (o WebAppHybridConnectionOutput) SendKeyValue() pulumi.StringOutput { return o.ApplyT(func(v *WebAppHybridConnection) pulumi.StringOutput { return v.SendKeyValue }).(pulumi.StringOutput) } // The Service Bus Namespace. func (o WebAppHybridConnectionOutput) ServiceBusNamespace() pulumi.StringOutput { return o.ApplyT(func(v *WebAppHybridConnection) pulumi.StringOutput { return v.ServiceBusNamespace }).(pulumi.StringOutput) } // The suffix for the endpoint. func (o WebAppHybridConnectionOutput) ServiceBusSuffix() pulumi.StringOutput { return o.ApplyT(func(v *WebAppHybridConnection) pulumi.StringOutput { return v.ServiceBusSuffix }).(pulumi.StringOutput) } // The ID of the Web App for this Hybrid Connection. Changing this forces a new resource to be created. func (o WebAppHybridConnectionOutput) WebAppId() pulumi.StringOutput { return o.ApplyT(func(v *WebAppHybridConnection) pulumi.StringOutput { return v.WebAppId }).(pulumi.StringOutput) } type WebAppHybridConnectionArrayOutput struct{ *pulumi.OutputState } func (WebAppHybridConnectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*WebAppHybridConnection)(nil)).Elem() } func (o WebAppHybridConnectionArrayOutput) ToWebAppHybridConnectionArrayOutput() WebAppHybridConnectionArrayOutput { return o } func (o WebAppHybridConnectionArrayOutput) ToWebAppHybridConnectionArrayOutputWithContext(ctx context.Context) WebAppHybridConnectionArrayOutput { return o } func (o WebAppHybridConnectionArrayOutput) Index(i pulumi.IntInput) WebAppHybridConnectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WebAppHybridConnection { return vs[0].([]*WebAppHybridConnection)[vs[1].(int)] }).(WebAppHybridConnectionOutput) } type WebAppHybridConnectionMapOutput struct{ *pulumi.OutputState } func (WebAppHybridConnectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WebAppHybridConnection)(nil)).Elem() } func (o WebAppHybridConnectionMapOutput) ToWebAppHybridConnectionMapOutput() WebAppHybridConnectionMapOutput { return o } func (o WebAppHybridConnectionMapOutput) ToWebAppHybridConnectionMapOutputWithContext(ctx context.Context) WebAppHybridConnectionMapOutput { return o } func (o WebAppHybridConnectionMapOutput) MapIndex(k pulumi.StringInput) WebAppHybridConnectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WebAppHybridConnection { return vs[0].(map[string]*WebAppHybridConnection)[vs[1].(string)] }).(WebAppHybridConnectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*WebAppHybridConnectionInput)(nil)).Elem(), &WebAppHybridConnection{}) pulumi.RegisterInputType(reflect.TypeOf((*WebAppHybridConnectionArrayInput)(nil)).Elem(), WebAppHybridConnectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*WebAppHybridConnectionMapInput)(nil)).Elem(), WebAppHybridConnectionMap{}) pulumi.RegisterOutputType(WebAppHybridConnectionOutput{}) pulumi.RegisterOutputType(WebAppHybridConnectionArrayOutput{}) pulumi.RegisterOutputType(WebAppHybridConnectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appservice/init.go
sdk/go/azure/appservice/init.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appservice import ( "fmt" "github.com/blang/semver" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type module struct { version semver.Version } func (m *module) Version() semver.Version { return m.version } func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { case "azure:appservice/activeSlot:ActiveSlot": r = &ActiveSlot{} case "azure:appservice/appConnection:AppConnection": r = &AppConnection{} case "azure:appservice/appFlexConsumption:AppFlexConsumption": r = &AppFlexConsumption{} case "azure:appservice/appService:AppService": r = &AppService{} case "azure:appservice/certificate:Certificate": r = &Certificate{} case "azure:appservice/certificateBinding:CertificateBinding": r = &CertificateBinding{} case "azure:appservice/certificateOrder:CertificateOrder": r = &CertificateOrder{} case "azure:appservice/connection:Connection": r = &Connection{} case "azure:appservice/customHostnameBinding:CustomHostnameBinding": r = &CustomHostnameBinding{} case "azure:appservice/environmentV3:EnvironmentV3": r = &EnvironmentV3{} case "azure:appservice/functionApp:FunctionApp": r = &FunctionApp{} case "azure:appservice/functionAppActiveSlot:FunctionAppActiveSlot": r = &FunctionAppActiveSlot{} case "azure:appservice/functionAppFunction:FunctionAppFunction": r = &FunctionAppFunction{} case "azure:appservice/functionAppHybridConnection:FunctionAppHybridConnection": r = &FunctionAppHybridConnection{} case "azure:appservice/functionAppSlot:FunctionAppSlot": r = &FunctionAppSlot{} case "azure:appservice/hybridConnection:HybridConnection": r = &HybridConnection{} case "azure:appservice/linuxFunctionApp:LinuxFunctionApp": r = &LinuxFunctionApp{} case "azure:appservice/linuxFunctionAppSlot:LinuxFunctionAppSlot": r = &LinuxFunctionAppSlot{} case "azure:appservice/linuxWebApp:LinuxWebApp": r = &LinuxWebApp{} case "azure:appservice/linuxWebAppSlot:LinuxWebAppSlot": r = &LinuxWebAppSlot{} case "azure:appservice/managedCertificate:ManagedCertificate": r = &ManagedCertificate{} case "azure:appservice/plan:Plan": r = &Plan{} case "azure:appservice/publicCertificate:PublicCertificate": r = &PublicCertificate{} case "azure:appservice/servicePlan:ServicePlan": r = &ServicePlan{} case "azure:appservice/slot:Slot": r = &Slot{} case "azure:appservice/slotCustomHostnameBinding:SlotCustomHostnameBinding": r = &SlotCustomHostnameBinding{} case "azure:appservice/slotVirtualNetworkSwiftConnection:SlotVirtualNetworkSwiftConnection": r = &SlotVirtualNetworkSwiftConnection{} case "azure:appservice/sourceCodeToken:SourceCodeToken": r = &SourceCodeToken{} case "azure:appservice/sourceControl:SourceControl": r = &SourceControl{} case "azure:appservice/sourceControlSlot:SourceControlSlot": r = &SourceControlSlot{} case "azure:appservice/sourceControlToken:SourceControlToken": r = &SourceControlToken{} case "azure:appservice/staticSite:StaticSite": r = &StaticSite{} case "azure:appservice/staticSiteCustomDomain:StaticSiteCustomDomain": r = &StaticSiteCustomDomain{} case "azure:appservice/staticWebApp:StaticWebApp": r = &StaticWebApp{} case "azure:appservice/staticWebAppCustomDomain:StaticWebAppCustomDomain": r = &StaticWebAppCustomDomain{} case "azure:appservice/staticWebAppFunctionAppRegistration:StaticWebAppFunctionAppRegistration": r = &StaticWebAppFunctionAppRegistration{} case "azure:appservice/virtualNetworkSwiftConnection:VirtualNetworkSwiftConnection": r = &VirtualNetworkSwiftConnection{} case "azure:appservice/webAppActiveSlot:WebAppActiveSlot": r = &WebAppActiveSlot{} case "azure:appservice/webAppHybridConnection:WebAppHybridConnection": r = &WebAppHybridConnection{} case "azure:appservice/windowsFunctionApp:WindowsFunctionApp": r = &WindowsFunctionApp{} case "azure:appservice/windowsFunctionAppSlot:WindowsFunctionAppSlot": r = &WindowsFunctionAppSlot{} case "azure:appservice/windowsWebApp:WindowsWebApp": r = &WindowsWebApp{} case "azure:appservice/windowsWebAppSlot:WindowsWebAppSlot": r = &WindowsWebAppSlot{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) return } func init() { version, err := internal.PkgVersion() if err != nil { version = semver.Version{Major: 1} } pulumi.RegisterResourceModule( "azure", "appservice/activeSlot", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/appConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/appFlexConsumption", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/appService", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/certificate", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/certificateBinding", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/certificateOrder", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/connection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/customHostnameBinding", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/environmentV3", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/functionApp", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/functionAppActiveSlot", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/functionAppFunction", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/functionAppHybridConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/functionAppSlot", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/hybridConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/linuxFunctionApp", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/linuxFunctionAppSlot", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/linuxWebApp", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/linuxWebAppSlot", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/managedCertificate", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/plan", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/publicCertificate", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/servicePlan", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/slot", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/slotCustomHostnameBinding", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/slotVirtualNetworkSwiftConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/sourceCodeToken", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/sourceControl", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/sourceControlSlot", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/sourceControlToken", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/staticSite", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/staticSiteCustomDomain", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/staticWebApp", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/staticWebAppCustomDomain", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/staticWebAppFunctionAppRegistration", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/virtualNetworkSwiftConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/webAppActiveSlot", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/webAppHybridConnection", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/windowsFunctionApp", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/windowsFunctionAppSlot", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/windowsWebApp", &module{version}, ) pulumi.RegisterResourceModule( "azure", "appservice/windowsWebAppSlot", &module{version}, ) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appservice/pulumiTypes.go
sdk/go/azure/appservice/pulumiTypes.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appservice import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) var _ = internal.GetEnvOrDefault type AppConnectionAuthentication struct { // Service principal certificate for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalCertificate`. Certificate *string `pulumi:"certificate"` // Client ID for `userAssignedIdentity` or `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`. When `type` is set to `userAssignedIdentity`, `clientId` and `subscriptionId` should be either both specified or both not specified. ClientId *string `pulumi:"clientId"` // Username or account name for secret auth. `name` and `secret` should be either both specified or both not specified when `type` is set to `secret`. Name *string `pulumi:"name"` // Principal ID for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`. PrincipalId *string `pulumi:"principalId"` // Password or account key for secret auth. `secret` and `name` should be either both specified or both not specified when `type` is set to `secret`. Secret *string `pulumi:"secret"` // Subscription ID for `userAssignedIdentity`. `subscriptionId` and `clientId` should be either both specified or both not specified. SubscriptionId *string `pulumi:"subscriptionId"` // The authentication type. Possible values are `systemAssignedIdentity`, `userAssignedIdentity`, `servicePrincipalSecret`, `servicePrincipalCertificate`, `secret`. Changing this forces a new resource to be created. Type string `pulumi:"type"` } // AppConnectionAuthenticationInput is an input type that accepts AppConnectionAuthenticationArgs and AppConnectionAuthenticationOutput values. // You can construct a concrete instance of `AppConnectionAuthenticationInput` via: // // AppConnectionAuthenticationArgs{...} type AppConnectionAuthenticationInput interface { pulumi.Input ToAppConnectionAuthenticationOutput() AppConnectionAuthenticationOutput ToAppConnectionAuthenticationOutputWithContext(context.Context) AppConnectionAuthenticationOutput } type AppConnectionAuthenticationArgs struct { // Service principal certificate for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalCertificate`. Certificate pulumi.StringPtrInput `pulumi:"certificate"` // Client ID for `userAssignedIdentity` or `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`. When `type` is set to `userAssignedIdentity`, `clientId` and `subscriptionId` should be either both specified or both not specified. ClientId pulumi.StringPtrInput `pulumi:"clientId"` // Username or account name for secret auth. `name` and `secret` should be either both specified or both not specified when `type` is set to `secret`. Name pulumi.StringPtrInput `pulumi:"name"` // Principal ID for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`. PrincipalId pulumi.StringPtrInput `pulumi:"principalId"` // Password or account key for secret auth. `secret` and `name` should be either both specified or both not specified when `type` is set to `secret`. Secret pulumi.StringPtrInput `pulumi:"secret"` // Subscription ID for `userAssignedIdentity`. `subscriptionId` and `clientId` should be either both specified or both not specified. SubscriptionId pulumi.StringPtrInput `pulumi:"subscriptionId"` // The authentication type. Possible values are `systemAssignedIdentity`, `userAssignedIdentity`, `servicePrincipalSecret`, `servicePrincipalCertificate`, `secret`. Changing this forces a new resource to be created. Type pulumi.StringInput `pulumi:"type"` } func (AppConnectionAuthenticationArgs) ElementType() reflect.Type { return reflect.TypeOf((*AppConnectionAuthentication)(nil)).Elem() } func (i AppConnectionAuthenticationArgs) ToAppConnectionAuthenticationOutput() AppConnectionAuthenticationOutput { return i.ToAppConnectionAuthenticationOutputWithContext(context.Background()) } func (i AppConnectionAuthenticationArgs) ToAppConnectionAuthenticationOutputWithContext(ctx context.Context) AppConnectionAuthenticationOutput { return pulumi.ToOutputWithContext(ctx, i).(AppConnectionAuthenticationOutput) } func (i AppConnectionAuthenticationArgs) ToAppConnectionAuthenticationPtrOutput() AppConnectionAuthenticationPtrOutput { return i.ToAppConnectionAuthenticationPtrOutputWithContext(context.Background()) } func (i AppConnectionAuthenticationArgs) ToAppConnectionAuthenticationPtrOutputWithContext(ctx context.Context) AppConnectionAuthenticationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(AppConnectionAuthenticationOutput).ToAppConnectionAuthenticationPtrOutputWithContext(ctx) } // AppConnectionAuthenticationPtrInput is an input type that accepts AppConnectionAuthenticationArgs, AppConnectionAuthenticationPtr and AppConnectionAuthenticationPtrOutput values. // You can construct a concrete instance of `AppConnectionAuthenticationPtrInput` via: // // AppConnectionAuthenticationArgs{...} // // or: // // nil type AppConnectionAuthenticationPtrInput interface { pulumi.Input ToAppConnectionAuthenticationPtrOutput() AppConnectionAuthenticationPtrOutput ToAppConnectionAuthenticationPtrOutputWithContext(context.Context) AppConnectionAuthenticationPtrOutput } type appConnectionAuthenticationPtrType AppConnectionAuthenticationArgs func AppConnectionAuthenticationPtr(v *AppConnectionAuthenticationArgs) AppConnectionAuthenticationPtrInput { return (*appConnectionAuthenticationPtrType)(v) } func (*appConnectionAuthenticationPtrType) ElementType() reflect.Type { return reflect.TypeOf((**AppConnectionAuthentication)(nil)).Elem() } func (i *appConnectionAuthenticationPtrType) ToAppConnectionAuthenticationPtrOutput() AppConnectionAuthenticationPtrOutput { return i.ToAppConnectionAuthenticationPtrOutputWithContext(context.Background()) } func (i *appConnectionAuthenticationPtrType) ToAppConnectionAuthenticationPtrOutputWithContext(ctx context.Context) AppConnectionAuthenticationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(AppConnectionAuthenticationPtrOutput) } type AppConnectionAuthenticationOutput struct{ *pulumi.OutputState } func (AppConnectionAuthenticationOutput) ElementType() reflect.Type { return reflect.TypeOf((*AppConnectionAuthentication)(nil)).Elem() } func (o AppConnectionAuthenticationOutput) ToAppConnectionAuthenticationOutput() AppConnectionAuthenticationOutput { return o } func (o AppConnectionAuthenticationOutput) ToAppConnectionAuthenticationOutputWithContext(ctx context.Context) AppConnectionAuthenticationOutput { return o } func (o AppConnectionAuthenticationOutput) ToAppConnectionAuthenticationPtrOutput() AppConnectionAuthenticationPtrOutput { return o.ToAppConnectionAuthenticationPtrOutputWithContext(context.Background()) } func (o AppConnectionAuthenticationOutput) ToAppConnectionAuthenticationPtrOutputWithContext(ctx context.Context) AppConnectionAuthenticationPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v AppConnectionAuthentication) *AppConnectionAuthentication { return &v }).(AppConnectionAuthenticationPtrOutput) } // Service principal certificate for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalCertificate`. func (o AppConnectionAuthenticationOutput) Certificate() pulumi.StringPtrOutput { return o.ApplyT(func(v AppConnectionAuthentication) *string { return v.Certificate }).(pulumi.StringPtrOutput) } // Client ID for `userAssignedIdentity` or `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`. When `type` is set to `userAssignedIdentity`, `clientId` and `subscriptionId` should be either both specified or both not specified. func (o AppConnectionAuthenticationOutput) ClientId() pulumi.StringPtrOutput { return o.ApplyT(func(v AppConnectionAuthentication) *string { return v.ClientId }).(pulumi.StringPtrOutput) } // Username or account name for secret auth. `name` and `secret` should be either both specified or both not specified when `type` is set to `secret`. func (o AppConnectionAuthenticationOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v AppConnectionAuthentication) *string { return v.Name }).(pulumi.StringPtrOutput) } // Principal ID for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`. func (o AppConnectionAuthenticationOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v AppConnectionAuthentication) *string { return v.PrincipalId }).(pulumi.StringPtrOutput) } // Password or account key for secret auth. `secret` and `name` should be either both specified or both not specified when `type` is set to `secret`. func (o AppConnectionAuthenticationOutput) Secret() pulumi.StringPtrOutput { return o.ApplyT(func(v AppConnectionAuthentication) *string { return v.Secret }).(pulumi.StringPtrOutput) } // Subscription ID for `userAssignedIdentity`. `subscriptionId` and `clientId` should be either both specified or both not specified. func (o AppConnectionAuthenticationOutput) SubscriptionId() pulumi.StringPtrOutput { return o.ApplyT(func(v AppConnectionAuthentication) *string { return v.SubscriptionId }).(pulumi.StringPtrOutput) } // The authentication type. Possible values are `systemAssignedIdentity`, `userAssignedIdentity`, `servicePrincipalSecret`, `servicePrincipalCertificate`, `secret`. Changing this forces a new resource to be created. func (o AppConnectionAuthenticationOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v AppConnectionAuthentication) string { return v.Type }).(pulumi.StringOutput) } type AppConnectionAuthenticationPtrOutput struct{ *pulumi.OutputState } func (AppConnectionAuthenticationPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**AppConnectionAuthentication)(nil)).Elem() } func (o AppConnectionAuthenticationPtrOutput) ToAppConnectionAuthenticationPtrOutput() AppConnectionAuthenticationPtrOutput { return o } func (o AppConnectionAuthenticationPtrOutput) ToAppConnectionAuthenticationPtrOutputWithContext(ctx context.Context) AppConnectionAuthenticationPtrOutput { return o } func (o AppConnectionAuthenticationPtrOutput) Elem() AppConnectionAuthenticationOutput { return o.ApplyT(func(v *AppConnectionAuthentication) AppConnectionAuthentication { if v != nil { return *v } var ret AppConnectionAuthentication return ret }).(AppConnectionAuthenticationOutput) } // Service principal certificate for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalCertificate`. func (o AppConnectionAuthenticationPtrOutput) Certificate() pulumi.StringPtrOutput { return o.ApplyT(func(v *AppConnectionAuthentication) *string { if v == nil { return nil } return v.Certificate }).(pulumi.StringPtrOutput) } // Client ID for `userAssignedIdentity` or `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`. When `type` is set to `userAssignedIdentity`, `clientId` and `subscriptionId` should be either both specified or both not specified. func (o AppConnectionAuthenticationPtrOutput) ClientId() pulumi.StringPtrOutput { return o.ApplyT(func(v *AppConnectionAuthentication) *string { if v == nil { return nil } return v.ClientId }).(pulumi.StringPtrOutput) } // Username or account name for secret auth. `name` and `secret` should be either both specified or both not specified when `type` is set to `secret`. func (o AppConnectionAuthenticationPtrOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v *AppConnectionAuthentication) *string { if v == nil { return nil } return v.Name }).(pulumi.StringPtrOutput) } // Principal ID for `servicePrincipal` auth. Should be specified when `type` is set to `servicePrincipalSecret` or `servicePrincipalCertificate`. func (o AppConnectionAuthenticationPtrOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v *AppConnectionAuthentication) *string { if v == nil { return nil } return v.PrincipalId }).(pulumi.StringPtrOutput) } // Password or account key for secret auth. `secret` and `name` should be either both specified or both not specified when `type` is set to `secret`. func (o AppConnectionAuthenticationPtrOutput) Secret() pulumi.StringPtrOutput { return o.ApplyT(func(v *AppConnectionAuthentication) *string { if v == nil { return nil } return v.Secret }).(pulumi.StringPtrOutput) } // Subscription ID for `userAssignedIdentity`. `subscriptionId` and `clientId` should be either both specified or both not specified. func (o AppConnectionAuthenticationPtrOutput) SubscriptionId() pulumi.StringPtrOutput { return o.ApplyT(func(v *AppConnectionAuthentication) *string { if v == nil { return nil } return v.SubscriptionId }).(pulumi.StringPtrOutput) } // The authentication type. Possible values are `systemAssignedIdentity`, `userAssignedIdentity`, `servicePrincipalSecret`, `servicePrincipalCertificate`, `secret`. Changing this forces a new resource to be created. func (o AppConnectionAuthenticationPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *AppConnectionAuthentication) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type AppConnectionSecretStore struct { // The key vault id to store secret. KeyVaultId string `pulumi:"keyVaultId"` } // AppConnectionSecretStoreInput is an input type that accepts AppConnectionSecretStoreArgs and AppConnectionSecretStoreOutput values. // You can construct a concrete instance of `AppConnectionSecretStoreInput` via: // // AppConnectionSecretStoreArgs{...} type AppConnectionSecretStoreInput interface { pulumi.Input ToAppConnectionSecretStoreOutput() AppConnectionSecretStoreOutput ToAppConnectionSecretStoreOutputWithContext(context.Context) AppConnectionSecretStoreOutput } type AppConnectionSecretStoreArgs struct { // The key vault id to store secret. KeyVaultId pulumi.StringInput `pulumi:"keyVaultId"` } func (AppConnectionSecretStoreArgs) ElementType() reflect.Type { return reflect.TypeOf((*AppConnectionSecretStore)(nil)).Elem() } func (i AppConnectionSecretStoreArgs) ToAppConnectionSecretStoreOutput() AppConnectionSecretStoreOutput { return i.ToAppConnectionSecretStoreOutputWithContext(context.Background()) } func (i AppConnectionSecretStoreArgs) ToAppConnectionSecretStoreOutputWithContext(ctx context.Context) AppConnectionSecretStoreOutput { return pulumi.ToOutputWithContext(ctx, i).(AppConnectionSecretStoreOutput) } func (i AppConnectionSecretStoreArgs) ToAppConnectionSecretStorePtrOutput() AppConnectionSecretStorePtrOutput { return i.ToAppConnectionSecretStorePtrOutputWithContext(context.Background()) } func (i AppConnectionSecretStoreArgs) ToAppConnectionSecretStorePtrOutputWithContext(ctx context.Context) AppConnectionSecretStorePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(AppConnectionSecretStoreOutput).ToAppConnectionSecretStorePtrOutputWithContext(ctx) } // AppConnectionSecretStorePtrInput is an input type that accepts AppConnectionSecretStoreArgs, AppConnectionSecretStorePtr and AppConnectionSecretStorePtrOutput values. // You can construct a concrete instance of `AppConnectionSecretStorePtrInput` via: // // AppConnectionSecretStoreArgs{...} // // or: // // nil type AppConnectionSecretStorePtrInput interface { pulumi.Input ToAppConnectionSecretStorePtrOutput() AppConnectionSecretStorePtrOutput ToAppConnectionSecretStorePtrOutputWithContext(context.Context) AppConnectionSecretStorePtrOutput } type appConnectionSecretStorePtrType AppConnectionSecretStoreArgs func AppConnectionSecretStorePtr(v *AppConnectionSecretStoreArgs) AppConnectionSecretStorePtrInput { return (*appConnectionSecretStorePtrType)(v) } func (*appConnectionSecretStorePtrType) ElementType() reflect.Type { return reflect.TypeOf((**AppConnectionSecretStore)(nil)).Elem() } func (i *appConnectionSecretStorePtrType) ToAppConnectionSecretStorePtrOutput() AppConnectionSecretStorePtrOutput { return i.ToAppConnectionSecretStorePtrOutputWithContext(context.Background()) } func (i *appConnectionSecretStorePtrType) ToAppConnectionSecretStorePtrOutputWithContext(ctx context.Context) AppConnectionSecretStorePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(AppConnectionSecretStorePtrOutput) } type AppConnectionSecretStoreOutput struct{ *pulumi.OutputState } func (AppConnectionSecretStoreOutput) ElementType() reflect.Type { return reflect.TypeOf((*AppConnectionSecretStore)(nil)).Elem() } func (o AppConnectionSecretStoreOutput) ToAppConnectionSecretStoreOutput() AppConnectionSecretStoreOutput { return o } func (o AppConnectionSecretStoreOutput) ToAppConnectionSecretStoreOutputWithContext(ctx context.Context) AppConnectionSecretStoreOutput { return o } func (o AppConnectionSecretStoreOutput) ToAppConnectionSecretStorePtrOutput() AppConnectionSecretStorePtrOutput { return o.ToAppConnectionSecretStorePtrOutputWithContext(context.Background()) } func (o AppConnectionSecretStoreOutput) ToAppConnectionSecretStorePtrOutputWithContext(ctx context.Context) AppConnectionSecretStorePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v AppConnectionSecretStore) *AppConnectionSecretStore { return &v }).(AppConnectionSecretStorePtrOutput) } // The key vault id to store secret. func (o AppConnectionSecretStoreOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v AppConnectionSecretStore) string { return v.KeyVaultId }).(pulumi.StringOutput) } type AppConnectionSecretStorePtrOutput struct{ *pulumi.OutputState } func (AppConnectionSecretStorePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**AppConnectionSecretStore)(nil)).Elem() } func (o AppConnectionSecretStorePtrOutput) ToAppConnectionSecretStorePtrOutput() AppConnectionSecretStorePtrOutput { return o } func (o AppConnectionSecretStorePtrOutput) ToAppConnectionSecretStorePtrOutputWithContext(ctx context.Context) AppConnectionSecretStorePtrOutput { return o } func (o AppConnectionSecretStorePtrOutput) Elem() AppConnectionSecretStoreOutput { return o.ApplyT(func(v *AppConnectionSecretStore) AppConnectionSecretStore { if v != nil { return *v } var ret AppConnectionSecretStore return ret }).(AppConnectionSecretStoreOutput) } // The key vault id to store secret. func (o AppConnectionSecretStorePtrOutput) KeyVaultId() pulumi.StringPtrOutput { return o.ApplyT(func(v *AppConnectionSecretStore) *string { if v == nil { return nil } return &v.KeyVaultId }).(pulumi.StringPtrOutput) } type AppFlexConsumptionAlwaysReady struct { // The instance count of the `alwaysReady` of the Function App. The minimum number is `0`. The total number of `instanceCount` should not exceed the `maximumInstanceCount`. InstanceCount *int `pulumi:"instanceCount"` // The name of the `alwaysReady` of the Function App. Name string `pulumi:"name"` } // AppFlexConsumptionAlwaysReadyInput is an input type that accepts AppFlexConsumptionAlwaysReadyArgs and AppFlexConsumptionAlwaysReadyOutput values. // You can construct a concrete instance of `AppFlexConsumptionAlwaysReadyInput` via: // // AppFlexConsumptionAlwaysReadyArgs{...} type AppFlexConsumptionAlwaysReadyInput interface { pulumi.Input ToAppFlexConsumptionAlwaysReadyOutput() AppFlexConsumptionAlwaysReadyOutput ToAppFlexConsumptionAlwaysReadyOutputWithContext(context.Context) AppFlexConsumptionAlwaysReadyOutput } type AppFlexConsumptionAlwaysReadyArgs struct { // The instance count of the `alwaysReady` of the Function App. The minimum number is `0`. The total number of `instanceCount` should not exceed the `maximumInstanceCount`. InstanceCount pulumi.IntPtrInput `pulumi:"instanceCount"` // The name of the `alwaysReady` of the Function App. Name pulumi.StringInput `pulumi:"name"` } func (AppFlexConsumptionAlwaysReadyArgs) ElementType() reflect.Type { return reflect.TypeOf((*AppFlexConsumptionAlwaysReady)(nil)).Elem() } func (i AppFlexConsumptionAlwaysReadyArgs) ToAppFlexConsumptionAlwaysReadyOutput() AppFlexConsumptionAlwaysReadyOutput { return i.ToAppFlexConsumptionAlwaysReadyOutputWithContext(context.Background()) } func (i AppFlexConsumptionAlwaysReadyArgs) ToAppFlexConsumptionAlwaysReadyOutputWithContext(ctx context.Context) AppFlexConsumptionAlwaysReadyOutput { return pulumi.ToOutputWithContext(ctx, i).(AppFlexConsumptionAlwaysReadyOutput) } // AppFlexConsumptionAlwaysReadyArrayInput is an input type that accepts AppFlexConsumptionAlwaysReadyArray and AppFlexConsumptionAlwaysReadyArrayOutput values. // You can construct a concrete instance of `AppFlexConsumptionAlwaysReadyArrayInput` via: // // AppFlexConsumptionAlwaysReadyArray{ AppFlexConsumptionAlwaysReadyArgs{...} } type AppFlexConsumptionAlwaysReadyArrayInput interface { pulumi.Input ToAppFlexConsumptionAlwaysReadyArrayOutput() AppFlexConsumptionAlwaysReadyArrayOutput ToAppFlexConsumptionAlwaysReadyArrayOutputWithContext(context.Context) AppFlexConsumptionAlwaysReadyArrayOutput } type AppFlexConsumptionAlwaysReadyArray []AppFlexConsumptionAlwaysReadyInput func (AppFlexConsumptionAlwaysReadyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]AppFlexConsumptionAlwaysReady)(nil)).Elem() } func (i AppFlexConsumptionAlwaysReadyArray) ToAppFlexConsumptionAlwaysReadyArrayOutput() AppFlexConsumptionAlwaysReadyArrayOutput { return i.ToAppFlexConsumptionAlwaysReadyArrayOutputWithContext(context.Background()) } func (i AppFlexConsumptionAlwaysReadyArray) ToAppFlexConsumptionAlwaysReadyArrayOutputWithContext(ctx context.Context) AppFlexConsumptionAlwaysReadyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AppFlexConsumptionAlwaysReadyArrayOutput) } type AppFlexConsumptionAlwaysReadyOutput struct{ *pulumi.OutputState } func (AppFlexConsumptionAlwaysReadyOutput) ElementType() reflect.Type { return reflect.TypeOf((*AppFlexConsumptionAlwaysReady)(nil)).Elem() } func (o AppFlexConsumptionAlwaysReadyOutput) ToAppFlexConsumptionAlwaysReadyOutput() AppFlexConsumptionAlwaysReadyOutput { return o } func (o AppFlexConsumptionAlwaysReadyOutput) ToAppFlexConsumptionAlwaysReadyOutputWithContext(ctx context.Context) AppFlexConsumptionAlwaysReadyOutput { return o } // The instance count of the `alwaysReady` of the Function App. The minimum number is `0`. The total number of `instanceCount` should not exceed the `maximumInstanceCount`. func (o AppFlexConsumptionAlwaysReadyOutput) InstanceCount() pulumi.IntPtrOutput { return o.ApplyT(func(v AppFlexConsumptionAlwaysReady) *int { return v.InstanceCount }).(pulumi.IntPtrOutput) } // The name of the `alwaysReady` of the Function App. func (o AppFlexConsumptionAlwaysReadyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v AppFlexConsumptionAlwaysReady) string { return v.Name }).(pulumi.StringOutput) } type AppFlexConsumptionAlwaysReadyArrayOutput struct{ *pulumi.OutputState } func (AppFlexConsumptionAlwaysReadyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]AppFlexConsumptionAlwaysReady)(nil)).Elem() } func (o AppFlexConsumptionAlwaysReadyArrayOutput) ToAppFlexConsumptionAlwaysReadyArrayOutput() AppFlexConsumptionAlwaysReadyArrayOutput { return o } func (o AppFlexConsumptionAlwaysReadyArrayOutput) ToAppFlexConsumptionAlwaysReadyArrayOutputWithContext(ctx context.Context) AppFlexConsumptionAlwaysReadyArrayOutput { return o } func (o AppFlexConsumptionAlwaysReadyArrayOutput) Index(i pulumi.IntInput) AppFlexConsumptionAlwaysReadyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) AppFlexConsumptionAlwaysReady { return vs[0].([]AppFlexConsumptionAlwaysReady)[vs[1].(int)] }).(AppFlexConsumptionAlwaysReadyOutput) } type AppFlexConsumptionAuthSettings struct { // An `activeDirectory` block as defined above. ActiveDirectory *AppFlexConsumptionAuthSettingsActiveDirectory `pulumi:"activeDirectory"` // Specifies a map of login Parameters to send to the OpenID Connect authorization endpoint when a user logs in. AdditionalLoginParameters map[string]string `pulumi:"additionalLoginParameters"` // Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Linux Web App. AllowedExternalRedirectUrls []string `pulumi:"allowedExternalRedirectUrls"` // The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github` // // > **Note:** This setting is only needed if multiple providers are configured, and the `unauthenticatedClientAction` is set to "RedirectToLoginPage". DefaultProvider *string `pulumi:"defaultProvider"` // Should the Authentication / Authorization feature be enabled for the Linux Web App? Enabled bool `pulumi:"enabled"` // A `facebook` block as defined below. Facebook *AppFlexConsumptionAuthSettingsFacebook `pulumi:"facebook"` // A `github` block as defined below. Github *AppFlexConsumptionAuthSettingsGithub `pulumi:"github"` // A `google` block as defined below. Google *AppFlexConsumptionAuthSettingsGoogle `pulumi:"google"` // The OpenID Connect Issuer URI that represents the entity which issues access tokens for this Linux Web App. // // > **Note:** When using Azure Active Directory, this value is the URI of the directory tenant, e.g. <https://sts.windows.net/{tenant-guid}/>. Issuer *string `pulumi:"issuer"` // A `microsoft` block as defined below. Microsoft *AppFlexConsumptionAuthSettingsMicrosoft `pulumi:"microsoft"` // The RuntimeVersion of the Authentication / Authorization feature in use for the Linux Web App. RuntimeVersion *string `pulumi:"runtimeVersion"` // The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours. TokenRefreshExtensionHours *float64 `pulumi:"tokenRefreshExtensionHours"` // Should the Linux Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`. TokenStoreEnabled *bool `pulumi:"tokenStoreEnabled"` // A `twitter` block as defined below. Twitter *AppFlexConsumptionAuthSettingsTwitter `pulumi:"twitter"` // The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. UnauthenticatedClientAction *string `pulumi:"unauthenticatedClientAction"` } // AppFlexConsumptionAuthSettingsInput is an input type that accepts AppFlexConsumptionAuthSettingsArgs and AppFlexConsumptionAuthSettingsOutput values. // You can construct a concrete instance of `AppFlexConsumptionAuthSettingsInput` via: // // AppFlexConsumptionAuthSettingsArgs{...} type AppFlexConsumptionAuthSettingsInput interface { pulumi.Input ToAppFlexConsumptionAuthSettingsOutput() AppFlexConsumptionAuthSettingsOutput ToAppFlexConsumptionAuthSettingsOutputWithContext(context.Context) AppFlexConsumptionAuthSettingsOutput } type AppFlexConsumptionAuthSettingsArgs struct { // An `activeDirectory` block as defined above. ActiveDirectory AppFlexConsumptionAuthSettingsActiveDirectoryPtrInput `pulumi:"activeDirectory"` // Specifies a map of login Parameters to send to the OpenID Connect authorization endpoint when a user logs in. AdditionalLoginParameters pulumi.StringMapInput `pulumi:"additionalLoginParameters"` // Specifies a list of External URLs that can be redirected to as part of logging in or logging out of the Linux Web App. AllowedExternalRedirectUrls pulumi.StringArrayInput `pulumi:"allowedExternalRedirectUrls"` // The default authentication provider to use when multiple providers are configured. Possible values include: `AzureActiveDirectory`, `Facebook`, `Google`, `MicrosoftAccount`, `Twitter`, `Github` // // > **Note:** This setting is only needed if multiple providers are configured, and the `unauthenticatedClientAction` is set to "RedirectToLoginPage". DefaultProvider pulumi.StringPtrInput `pulumi:"defaultProvider"` // Should the Authentication / Authorization feature be enabled for the Linux Web App? Enabled pulumi.BoolInput `pulumi:"enabled"` // A `facebook` block as defined below. Facebook AppFlexConsumptionAuthSettingsFacebookPtrInput `pulumi:"facebook"` // A `github` block as defined below. Github AppFlexConsumptionAuthSettingsGithubPtrInput `pulumi:"github"` // A `google` block as defined below. Google AppFlexConsumptionAuthSettingsGooglePtrInput `pulumi:"google"` // The OpenID Connect Issuer URI that represents the entity which issues access tokens for this Linux Web App. // // > **Note:** When using Azure Active Directory, this value is the URI of the directory tenant, e.g. <https://sts.windows.net/{tenant-guid}/>. Issuer pulumi.StringPtrInput `pulumi:"issuer"` // A `microsoft` block as defined below. Microsoft AppFlexConsumptionAuthSettingsMicrosoftPtrInput `pulumi:"microsoft"` // The RuntimeVersion of the Authentication / Authorization feature in use for the Linux Web App. RuntimeVersion pulumi.StringPtrInput `pulumi:"runtimeVersion"` // The number of hours after session token expiration that a session token can be used to call the token refresh API. Defaults to `72` hours. TokenRefreshExtensionHours pulumi.Float64PtrInput `pulumi:"tokenRefreshExtensionHours"` // Should the Linux Web App durably store platform-specific security tokens that are obtained during login flows? Defaults to `false`. TokenStoreEnabled pulumi.BoolPtrInput `pulumi:"tokenStoreEnabled"` // A `twitter` block as defined below. Twitter AppFlexConsumptionAuthSettingsTwitterPtrInput `pulumi:"twitter"` // The action to take when an unauthenticated client attempts to access the app. Possible values include: `RedirectToLoginPage`, `AllowAnonymous`. UnauthenticatedClientAction pulumi.StringPtrInput `pulumi:"unauthenticatedClientAction"` } func (AppFlexConsumptionAuthSettingsArgs) ElementType() reflect.Type { return reflect.TypeOf((*AppFlexConsumptionAuthSettings)(nil)).Elem() } func (i AppFlexConsumptionAuthSettingsArgs) ToAppFlexConsumptionAuthSettingsOutput() AppFlexConsumptionAuthSettingsOutput { return i.ToAppFlexConsumptionAuthSettingsOutputWithContext(context.Background()) } func (i AppFlexConsumptionAuthSettingsArgs) ToAppFlexConsumptionAuthSettingsOutputWithContext(ctx context.Context) AppFlexConsumptionAuthSettingsOutput { return pulumi.ToOutputWithContext(ctx, i).(AppFlexConsumptionAuthSettingsOutput) } func (i AppFlexConsumptionAuthSettingsArgs) ToAppFlexConsumptionAuthSettingsPtrOutput() AppFlexConsumptionAuthSettingsPtrOutput { return i.ToAppFlexConsumptionAuthSettingsPtrOutputWithContext(context.Background()) } func (i AppFlexConsumptionAuthSettingsArgs) ToAppFlexConsumptionAuthSettingsPtrOutputWithContext(ctx context.Context) AppFlexConsumptionAuthSettingsPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(AppFlexConsumptionAuthSettingsOutput).ToAppFlexConsumptionAuthSettingsPtrOutputWithContext(ctx) } // AppFlexConsumptionAuthSettingsPtrInput is an input type that accepts AppFlexConsumptionAuthSettingsArgs, AppFlexConsumptionAuthSettingsPtr and AppFlexConsumptionAuthSettingsPtrOutput values. // You can construct a concrete instance of `AppFlexConsumptionAuthSettingsPtrInput` via: // // AppFlexConsumptionAuthSettingsArgs{...} // // or: // // nil type AppFlexConsumptionAuthSettingsPtrInput interface { pulumi.Input ToAppFlexConsumptionAuthSettingsPtrOutput() AppFlexConsumptionAuthSettingsPtrOutput ToAppFlexConsumptionAuthSettingsPtrOutputWithContext(context.Context) AppFlexConsumptionAuthSettingsPtrOutput } type appFlexConsumptionAuthSettingsPtrType AppFlexConsumptionAuthSettingsArgs func AppFlexConsumptionAuthSettingsPtr(v *AppFlexConsumptionAuthSettingsArgs) AppFlexConsumptionAuthSettingsPtrInput { return (*appFlexConsumptionAuthSettingsPtrType)(v) } func (*appFlexConsumptionAuthSettingsPtrType) ElementType() reflect.Type { return reflect.TypeOf((**AppFlexConsumptionAuthSettings)(nil)).Elem() } func (i *appFlexConsumptionAuthSettingsPtrType) ToAppFlexConsumptionAuthSettingsPtrOutput() AppFlexConsumptionAuthSettingsPtrOutput {
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appservice/windowsFunctionAppSlot.go
sdk/go/azure/appservice/windowsFunctionAppSlot.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appservice import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Windows Function App Slot. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("windowsfunctionappsa"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleServicePlan, err := appservice.NewServicePlan(ctx, "example", &appservice.ServicePlanArgs{ // Name: pulumi.String("example-app-service-plan"), // ResourceGroupName: example.Name, // Location: example.Location, // OsType: pulumi.String("Windows"), // SkuName: pulumi.String("Y1"), // }) // if err != nil { // return err // } // exampleWindowsFunctionApp, err := appservice.NewWindowsFunctionApp(ctx, "example", &appservice.WindowsFunctionAppArgs{ // Name: pulumi.String("example-windows-function-app"), // ResourceGroupName: example.Name, // Location: example.Location, // StorageAccountName: exampleAccount.Name, // ServicePlanId: exampleServicePlan.ID(), // SiteConfig: &appservice.WindowsFunctionAppSiteConfigArgs{}, // }) // if err != nil { // return err // } // _, err = appservice.NewWindowsFunctionAppSlot(ctx, "example", &appservice.WindowsFunctionAppSlotArgs{ // Name: pulumi.String("example-slot"), // FunctionAppId: exampleWindowsFunctionApp.ID(), // StorageAccountName: exampleAccount.Name, // SiteConfig: &appservice.WindowsFunctionAppSlotSiteConfigArgs{}, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Web` - 2023-12-01, 2023-01-01 // // ## Import // // A Windows Function App Slot can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appservice/windowsFunctionAppSlot:WindowsFunctionAppSlot example "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/sites/site1/slots/slot1" // ``` type WindowsFunctionAppSlot struct { pulumi.CustomResourceState // A map of key-value pairs for [App Settings](https://docs.microsoft.com/azure/azure-functions/functions-app-settings) and custom values. AppSettings pulumi.StringMapOutput `pulumi:"appSettings"` // an `authSettings` block as detailed below. AuthSettings WindowsFunctionAppSlotAuthSettingsPtrOutput `pulumi:"authSettings"` // an `authSettingsV2` block as detailed below. AuthSettingsV2 WindowsFunctionAppSlotAuthSettingsV2PtrOutput `pulumi:"authSettingsV2"` // a `backup` block as detailed below. Backup WindowsFunctionAppSlotBackupPtrOutput `pulumi:"backup"` // Should built-in logging be enabled. Configures `AzureWebJobsDashboard` app setting based on the configured storage setting. Defaults to `true`. BuiltinLoggingEnabled pulumi.BoolPtrOutput `pulumi:"builtinLoggingEnabled"` // Should the Function App Slot use Client Certificates. ClientCertificateEnabled pulumi.BoolPtrOutput `pulumi:"clientCertificateEnabled"` // Paths to exclude when using client certificates, separated by ; ClientCertificateExclusionPaths pulumi.StringPtrOutput `pulumi:"clientCertificateExclusionPaths"` // The mode of the Function App Slot's client certificates requirement for incoming requests. Possible values are `Required`, `Optional`, and `OptionalInteractiveUser`. Defaults to `Optional`. ClientCertificateMode pulumi.StringPtrOutput `pulumi:"clientCertificateMode"` // a `connectionString` block as detailed below. ConnectionStrings WindowsFunctionAppSlotConnectionStringArrayOutput `pulumi:"connectionStrings"` // Force disable the content share settings. ContentShareForceDisabled pulumi.BoolPtrOutput `pulumi:"contentShareForceDisabled"` // The identifier used by App Service to perform domain ownership verification via DNS TXT record. CustomDomainVerificationId pulumi.StringOutput `pulumi:"customDomainVerificationId"` // The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps in Consumption Plans. Defaults to `0`. DailyMemoryTimeQuota pulumi.IntPtrOutput `pulumi:"dailyMemoryTimeQuota"` // The default hostname of the Windows Function App Slot. DefaultHostname pulumi.StringOutput `pulumi:"defaultHostname"` // Is the Windows Function App Slot enabled. Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `true`. FtpPublishBasicAuthenticationEnabled pulumi.BoolPtrOutput `pulumi:"ftpPublishBasicAuthenticationEnabled"` // The name of the Windows Function App this Slot is a member of. Changing this forces a new resource to be created. FunctionAppId pulumi.StringOutput `pulumi:"functionAppId"` // The runtime version associated with the Function App Slot. Defaults to `~4`. FunctionsExtensionVersion pulumi.StringPtrOutput `pulumi:"functionsExtensionVersion"` // The ID of the App Service Environment used by Function App Slot. HostingEnvironmentId pulumi.StringOutput `pulumi:"hostingEnvironmentId"` // Can the Function App Slot only be accessed via HTTPS?. Defaults to `false`. HttpsOnly pulumi.BoolPtrOutput `pulumi:"httpsOnly"` // an `identity` block as detailed below. Identity WindowsFunctionAppSlotIdentityPtrOutput `pulumi:"identity"` // The User Assigned Identity ID used for accessing KeyVault secrets. The identity must be assigned to the application in the `identity` block. [For more information see - Access vaults with a user-assigned identity](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity) KeyVaultReferenceIdentityId pulumi.StringOutput `pulumi:"keyVaultReferenceIdentityId"` // The Kind value for this Windows Function App Slot. Kind pulumi.StringOutput `pulumi:"kind"` // Specifies the name of the Windows Function App Slot. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A list of outbound IP addresses. For example `["52.23.25.3", "52.143.43.12"]`. OutboundIpAddressLists pulumi.StringArrayOutput `pulumi:"outboundIpAddressLists"` // A comma separated list of outbound IP addresses as a string. For example `52.23.25.3,52.143.43.12`. OutboundIpAddresses pulumi.StringOutput `pulumi:"outboundIpAddresses"` // A list of possible outbound IP addresses, not all of which are necessarily in use. This is a superset of `outboundIpAddressList`. For example `["52.23.25.3", "52.143.43.12"]`. PossibleOutboundIpAddressLists pulumi.StringArrayOutput `pulumi:"possibleOutboundIpAddressLists"` // A comma separated list of possible outbound IP addresses as a string. For example `52.23.25.3,52.143.43.12,52.143.43.17`. This is a superset of `outboundIpAddresses`. For example `["52.23.25.3", "52.143.43.12","52.143.43.17"]`. PossibleOutboundIpAddresses pulumi.StringOutput `pulumi:"possibleOutboundIpAddresses"` // Should public network access be enabled for the Function App. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // The ID of the Service Plan in which to run this slot. If not specified the same Service Plan as the Windows Function App will be used. ServicePlanId pulumi.StringPtrOutput `pulumi:"servicePlanId"` // a `siteConfig` block as detailed below. SiteConfig WindowsFunctionAppSlotSiteConfigOutput `pulumi:"siteConfig"` // A `siteCredential` block as defined below. SiteCredentials WindowsFunctionAppSlotSiteCredentialArrayOutput `pulumi:"siteCredentials"` // The access key which will be used to access the storage account for the Function App Slot. StorageAccountAccessKey pulumi.StringPtrOutput `pulumi:"storageAccountAccessKey"` // The backend storage account name which will be used by this Function App Slot. StorageAccountName pulumi.StringPtrOutput `pulumi:"storageAccountName"` // One or more `storageAccount` blocks as defined below. StorageAccounts WindowsFunctionAppSlotStorageAccountArrayOutput `pulumi:"storageAccounts"` // The Key Vault Secret ID, optionally including version, that contains the Connection String to connect to the storage account for this Function App Slot. // // > **Note:** `storageKeyVaultSecretId` cannot be used with `storageAccountName`. // // > **Note:** `storageKeyVaultSecretId` used without a version will use the latest version of the secret, however, the service can take up to 24h to pick up a rotation of the latest version. See the [official docs](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#rotation) for more information. StorageKeyVaultSecretId pulumi.StringPtrOutput `pulumi:"storageKeyVaultSecretId"` // Should the Function App Slot use its Managed Identity to access storage. // // > **Note:** One of `storageAccountAccessKey` or `storageUsesManagedIdentity` must be specified when using `storageAccountName`. StorageUsesManagedIdentity pulumi.BoolPtrOutput `pulumi:"storageUsesManagedIdentity"` // A mapping of tags which should be assigned to the Windows Function App Slot. Tags pulumi.StringMapOutput `pulumi:"tags"` // Whether backup and restore operations over the linked virtual network are enabled. Defaults to `false`. VirtualNetworkBackupRestoreEnabled pulumi.BoolPtrOutput `pulumi:"virtualNetworkBackupRestoreEnabled"` VirtualNetworkSubnetId pulumi.StringPtrOutput `pulumi:"virtualNetworkSubnetId"` // Specifies whether traffic for the image pull should be routed over virtual network. Defaults to `false`. // // > **Note:** The feature can also be enabled via the app setting `WEBSITE_PULL_IMAGE_OVER_VNET`. The Setting is enabled by default for app running in the App Service Environment. VnetImagePullEnabled pulumi.BoolPtrOutput `pulumi:"vnetImagePullEnabled"` // Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to `true`. WebdeployPublishBasicAuthenticationEnabled pulumi.BoolPtrOutput `pulumi:"webdeployPublishBasicAuthenticationEnabled"` } // NewWindowsFunctionAppSlot registers a new resource with the given unique name, arguments, and options. func NewWindowsFunctionAppSlot(ctx *pulumi.Context, name string, args *WindowsFunctionAppSlotArgs, opts ...pulumi.ResourceOption) (*WindowsFunctionAppSlot, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.FunctionAppId == nil { return nil, errors.New("invalid value for required argument 'FunctionAppId'") } if args.SiteConfig == nil { return nil, errors.New("invalid value for required argument 'SiteConfig'") } if args.StorageAccountAccessKey != nil { args.StorageAccountAccessKey = pulumi.ToSecret(args.StorageAccountAccessKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "customDomainVerificationId", "siteCredentials", "storageAccountAccessKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource WindowsFunctionAppSlot err := ctx.RegisterResource("azure:appservice/windowsFunctionAppSlot:WindowsFunctionAppSlot", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWindowsFunctionAppSlot gets an existing WindowsFunctionAppSlot resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetWindowsFunctionAppSlot(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WindowsFunctionAppSlotState, opts ...pulumi.ResourceOption) (*WindowsFunctionAppSlot, error) { var resource WindowsFunctionAppSlot err := ctx.ReadResource("azure:appservice/windowsFunctionAppSlot:WindowsFunctionAppSlot", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering WindowsFunctionAppSlot resources. type windowsFunctionAppSlotState struct { // A map of key-value pairs for [App Settings](https://docs.microsoft.com/azure/azure-functions/functions-app-settings) and custom values. AppSettings map[string]string `pulumi:"appSettings"` // an `authSettings` block as detailed below. AuthSettings *WindowsFunctionAppSlotAuthSettings `pulumi:"authSettings"` // an `authSettingsV2` block as detailed below. AuthSettingsV2 *WindowsFunctionAppSlotAuthSettingsV2 `pulumi:"authSettingsV2"` // a `backup` block as detailed below. Backup *WindowsFunctionAppSlotBackup `pulumi:"backup"` // Should built-in logging be enabled. Configures `AzureWebJobsDashboard` app setting based on the configured storage setting. Defaults to `true`. BuiltinLoggingEnabled *bool `pulumi:"builtinLoggingEnabled"` // Should the Function App Slot use Client Certificates. ClientCertificateEnabled *bool `pulumi:"clientCertificateEnabled"` // Paths to exclude when using client certificates, separated by ; ClientCertificateExclusionPaths *string `pulumi:"clientCertificateExclusionPaths"` // The mode of the Function App Slot's client certificates requirement for incoming requests. Possible values are `Required`, `Optional`, and `OptionalInteractiveUser`. Defaults to `Optional`. ClientCertificateMode *string `pulumi:"clientCertificateMode"` // a `connectionString` block as detailed below. ConnectionStrings []WindowsFunctionAppSlotConnectionString `pulumi:"connectionStrings"` // Force disable the content share settings. ContentShareForceDisabled *bool `pulumi:"contentShareForceDisabled"` // The identifier used by App Service to perform domain ownership verification via DNS TXT record. CustomDomainVerificationId *string `pulumi:"customDomainVerificationId"` // The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps in Consumption Plans. Defaults to `0`. DailyMemoryTimeQuota *int `pulumi:"dailyMemoryTimeQuota"` // The default hostname of the Windows Function App Slot. DefaultHostname *string `pulumi:"defaultHostname"` // Is the Windows Function App Slot enabled. Defaults to `true`. Enabled *bool `pulumi:"enabled"` // Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `true`. FtpPublishBasicAuthenticationEnabled *bool `pulumi:"ftpPublishBasicAuthenticationEnabled"` // The name of the Windows Function App this Slot is a member of. Changing this forces a new resource to be created. FunctionAppId *string `pulumi:"functionAppId"` // The runtime version associated with the Function App Slot. Defaults to `~4`. FunctionsExtensionVersion *string `pulumi:"functionsExtensionVersion"` // The ID of the App Service Environment used by Function App Slot. HostingEnvironmentId *string `pulumi:"hostingEnvironmentId"` // Can the Function App Slot only be accessed via HTTPS?. Defaults to `false`. HttpsOnly *bool `pulumi:"httpsOnly"` // an `identity` block as detailed below. Identity *WindowsFunctionAppSlotIdentity `pulumi:"identity"` // The User Assigned Identity ID used for accessing KeyVault secrets. The identity must be assigned to the application in the `identity` block. [For more information see - Access vaults with a user-assigned identity](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity) KeyVaultReferenceIdentityId *string `pulumi:"keyVaultReferenceIdentityId"` // The Kind value for this Windows Function App Slot. Kind *string `pulumi:"kind"` // Specifies the name of the Windows Function App Slot. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of outbound IP addresses. For example `["52.23.25.3", "52.143.43.12"]`. OutboundIpAddressLists []string `pulumi:"outboundIpAddressLists"` // A comma separated list of outbound IP addresses as a string. For example `52.23.25.3,52.143.43.12`. OutboundIpAddresses *string `pulumi:"outboundIpAddresses"` // A list of possible outbound IP addresses, not all of which are necessarily in use. This is a superset of `outboundIpAddressList`. For example `["52.23.25.3", "52.143.43.12"]`. PossibleOutboundIpAddressLists []string `pulumi:"possibleOutboundIpAddressLists"` // A comma separated list of possible outbound IP addresses as a string. For example `52.23.25.3,52.143.43.12,52.143.43.17`. This is a superset of `outboundIpAddresses`. For example `["52.23.25.3", "52.143.43.12","52.143.43.17"]`. PossibleOutboundIpAddresses *string `pulumi:"possibleOutboundIpAddresses"` // Should public network access be enabled for the Function App. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The ID of the Service Plan in which to run this slot. If not specified the same Service Plan as the Windows Function App will be used. ServicePlanId *string `pulumi:"servicePlanId"` // a `siteConfig` block as detailed below. SiteConfig *WindowsFunctionAppSlotSiteConfig `pulumi:"siteConfig"` // A `siteCredential` block as defined below. SiteCredentials []WindowsFunctionAppSlotSiteCredential `pulumi:"siteCredentials"` // The access key which will be used to access the storage account for the Function App Slot. StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"` // The backend storage account name which will be used by this Function App Slot. StorageAccountName *string `pulumi:"storageAccountName"` // One or more `storageAccount` blocks as defined below. StorageAccounts []WindowsFunctionAppSlotStorageAccount `pulumi:"storageAccounts"` // The Key Vault Secret ID, optionally including version, that contains the Connection String to connect to the storage account for this Function App Slot. // // > **Note:** `storageKeyVaultSecretId` cannot be used with `storageAccountName`. // // > **Note:** `storageKeyVaultSecretId` used without a version will use the latest version of the secret, however, the service can take up to 24h to pick up a rotation of the latest version. See the [official docs](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#rotation) for more information. StorageKeyVaultSecretId *string `pulumi:"storageKeyVaultSecretId"` // Should the Function App Slot use its Managed Identity to access storage. // // > **Note:** One of `storageAccountAccessKey` or `storageUsesManagedIdentity` must be specified when using `storageAccountName`. StorageUsesManagedIdentity *bool `pulumi:"storageUsesManagedIdentity"` // A mapping of tags which should be assigned to the Windows Function App Slot. Tags map[string]string `pulumi:"tags"` // Whether backup and restore operations over the linked virtual network are enabled. Defaults to `false`. VirtualNetworkBackupRestoreEnabled *bool `pulumi:"virtualNetworkBackupRestoreEnabled"` VirtualNetworkSubnetId *string `pulumi:"virtualNetworkSubnetId"` // Specifies whether traffic for the image pull should be routed over virtual network. Defaults to `false`. // // > **Note:** The feature can also be enabled via the app setting `WEBSITE_PULL_IMAGE_OVER_VNET`. The Setting is enabled by default for app running in the App Service Environment. VnetImagePullEnabled *bool `pulumi:"vnetImagePullEnabled"` // Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to `true`. WebdeployPublishBasicAuthenticationEnabled *bool `pulumi:"webdeployPublishBasicAuthenticationEnabled"` } type WindowsFunctionAppSlotState struct { // A map of key-value pairs for [App Settings](https://docs.microsoft.com/azure/azure-functions/functions-app-settings) and custom values. AppSettings pulumi.StringMapInput // an `authSettings` block as detailed below. AuthSettings WindowsFunctionAppSlotAuthSettingsPtrInput // an `authSettingsV2` block as detailed below. AuthSettingsV2 WindowsFunctionAppSlotAuthSettingsV2PtrInput // a `backup` block as detailed below. Backup WindowsFunctionAppSlotBackupPtrInput // Should built-in logging be enabled. Configures `AzureWebJobsDashboard` app setting based on the configured storage setting. Defaults to `true`. BuiltinLoggingEnabled pulumi.BoolPtrInput // Should the Function App Slot use Client Certificates. ClientCertificateEnabled pulumi.BoolPtrInput // Paths to exclude when using client certificates, separated by ; ClientCertificateExclusionPaths pulumi.StringPtrInput // The mode of the Function App Slot's client certificates requirement for incoming requests. Possible values are `Required`, `Optional`, and `OptionalInteractiveUser`. Defaults to `Optional`. ClientCertificateMode pulumi.StringPtrInput // a `connectionString` block as detailed below. ConnectionStrings WindowsFunctionAppSlotConnectionStringArrayInput // Force disable the content share settings. ContentShareForceDisabled pulumi.BoolPtrInput // The identifier used by App Service to perform domain ownership verification via DNS TXT record. CustomDomainVerificationId pulumi.StringPtrInput // The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps in Consumption Plans. Defaults to `0`. DailyMemoryTimeQuota pulumi.IntPtrInput // The default hostname of the Windows Function App Slot. DefaultHostname pulumi.StringPtrInput // Is the Windows Function App Slot enabled. Defaults to `true`. Enabled pulumi.BoolPtrInput // Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `true`. FtpPublishBasicAuthenticationEnabled pulumi.BoolPtrInput // The name of the Windows Function App this Slot is a member of. Changing this forces a new resource to be created. FunctionAppId pulumi.StringPtrInput // The runtime version associated with the Function App Slot. Defaults to `~4`. FunctionsExtensionVersion pulumi.StringPtrInput // The ID of the App Service Environment used by Function App Slot. HostingEnvironmentId pulumi.StringPtrInput // Can the Function App Slot only be accessed via HTTPS?. Defaults to `false`. HttpsOnly pulumi.BoolPtrInput // an `identity` block as detailed below. Identity WindowsFunctionAppSlotIdentityPtrInput // The User Assigned Identity ID used for accessing KeyVault secrets. The identity must be assigned to the application in the `identity` block. [For more information see - Access vaults with a user-assigned identity](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity) KeyVaultReferenceIdentityId pulumi.StringPtrInput // The Kind value for this Windows Function App Slot. Kind pulumi.StringPtrInput // Specifies the name of the Windows Function App Slot. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of outbound IP addresses. For example `["52.23.25.3", "52.143.43.12"]`. OutboundIpAddressLists pulumi.StringArrayInput // A comma separated list of outbound IP addresses as a string. For example `52.23.25.3,52.143.43.12`. OutboundIpAddresses pulumi.StringPtrInput // A list of possible outbound IP addresses, not all of which are necessarily in use. This is a superset of `outboundIpAddressList`. For example `["52.23.25.3", "52.143.43.12"]`. PossibleOutboundIpAddressLists pulumi.StringArrayInput // A comma separated list of possible outbound IP addresses as a string. For example `52.23.25.3,52.143.43.12,52.143.43.17`. This is a superset of `outboundIpAddresses`. For example `["52.23.25.3", "52.143.43.12","52.143.43.17"]`. PossibleOutboundIpAddresses pulumi.StringPtrInput // Should public network access be enabled for the Function App. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // The ID of the Service Plan in which to run this slot. If not specified the same Service Plan as the Windows Function App will be used. ServicePlanId pulumi.StringPtrInput // a `siteConfig` block as detailed below. SiteConfig WindowsFunctionAppSlotSiteConfigPtrInput // A `siteCredential` block as defined below. SiteCredentials WindowsFunctionAppSlotSiteCredentialArrayInput // The access key which will be used to access the storage account for the Function App Slot. StorageAccountAccessKey pulumi.StringPtrInput // The backend storage account name which will be used by this Function App Slot. StorageAccountName pulumi.StringPtrInput // One or more `storageAccount` blocks as defined below. StorageAccounts WindowsFunctionAppSlotStorageAccountArrayInput // The Key Vault Secret ID, optionally including version, that contains the Connection String to connect to the storage account for this Function App Slot. // // > **Note:** `storageKeyVaultSecretId` cannot be used with `storageAccountName`. // // > **Note:** `storageKeyVaultSecretId` used without a version will use the latest version of the secret, however, the service can take up to 24h to pick up a rotation of the latest version. See the [official docs](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#rotation) for more information. StorageKeyVaultSecretId pulumi.StringPtrInput // Should the Function App Slot use its Managed Identity to access storage. // // > **Note:** One of `storageAccountAccessKey` or `storageUsesManagedIdentity` must be specified when using `storageAccountName`. StorageUsesManagedIdentity pulumi.BoolPtrInput // A mapping of tags which should be assigned to the Windows Function App Slot. Tags pulumi.StringMapInput // Whether backup and restore operations over the linked virtual network are enabled. Defaults to `false`. VirtualNetworkBackupRestoreEnabled pulumi.BoolPtrInput VirtualNetworkSubnetId pulumi.StringPtrInput // Specifies whether traffic for the image pull should be routed over virtual network. Defaults to `false`. // // > **Note:** The feature can also be enabled via the app setting `WEBSITE_PULL_IMAGE_OVER_VNET`. The Setting is enabled by default for app running in the App Service Environment. VnetImagePullEnabled pulumi.BoolPtrInput // Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to `true`. WebdeployPublishBasicAuthenticationEnabled pulumi.BoolPtrInput } func (WindowsFunctionAppSlotState) ElementType() reflect.Type { return reflect.TypeOf((*windowsFunctionAppSlotState)(nil)).Elem() } type windowsFunctionAppSlotArgs struct { // A map of key-value pairs for [App Settings](https://docs.microsoft.com/azure/azure-functions/functions-app-settings) and custom values. AppSettings map[string]string `pulumi:"appSettings"` // an `authSettings` block as detailed below. AuthSettings *WindowsFunctionAppSlotAuthSettings `pulumi:"authSettings"` // an `authSettingsV2` block as detailed below. AuthSettingsV2 *WindowsFunctionAppSlotAuthSettingsV2 `pulumi:"authSettingsV2"` // a `backup` block as detailed below. Backup *WindowsFunctionAppSlotBackup `pulumi:"backup"` // Should built-in logging be enabled. Configures `AzureWebJobsDashboard` app setting based on the configured storage setting. Defaults to `true`. BuiltinLoggingEnabled *bool `pulumi:"builtinLoggingEnabled"` // Should the Function App Slot use Client Certificates. ClientCertificateEnabled *bool `pulumi:"clientCertificateEnabled"` // Paths to exclude when using client certificates, separated by ; ClientCertificateExclusionPaths *string `pulumi:"clientCertificateExclusionPaths"` // The mode of the Function App Slot's client certificates requirement for incoming requests. Possible values are `Required`, `Optional`, and `OptionalInteractiveUser`. Defaults to `Optional`. ClientCertificateMode *string `pulumi:"clientCertificateMode"` // a `connectionString` block as detailed below. ConnectionStrings []WindowsFunctionAppSlotConnectionString `pulumi:"connectionStrings"` // Force disable the content share settings. ContentShareForceDisabled *bool `pulumi:"contentShareForceDisabled"` // The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps in Consumption Plans. Defaults to `0`. DailyMemoryTimeQuota *int `pulumi:"dailyMemoryTimeQuota"` // Is the Windows Function App Slot enabled. Defaults to `true`. Enabled *bool `pulumi:"enabled"` // Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `true`. FtpPublishBasicAuthenticationEnabled *bool `pulumi:"ftpPublishBasicAuthenticationEnabled"` // The name of the Windows Function App this Slot is a member of. Changing this forces a new resource to be created. FunctionAppId string `pulumi:"functionAppId"` // The runtime version associated with the Function App Slot. Defaults to `~4`. FunctionsExtensionVersion *string `pulumi:"functionsExtensionVersion"` // Can the Function App Slot only be accessed via HTTPS?. Defaults to `false`. HttpsOnly *bool `pulumi:"httpsOnly"` // an `identity` block as detailed below. Identity *WindowsFunctionAppSlotIdentity `pulumi:"identity"` // The User Assigned Identity ID used for accessing KeyVault secrets. The identity must be assigned to the application in the `identity` block. [For more information see - Access vaults with a user-assigned identity](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity) KeyVaultReferenceIdentityId *string `pulumi:"keyVaultReferenceIdentityId"` // Specifies the name of the Windows Function App Slot. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Should public network access be enabled for the Function App. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The ID of the Service Plan in which to run this slot. If not specified the same Service Plan as the Windows Function App will be used. ServicePlanId *string `pulumi:"servicePlanId"` // a `siteConfig` block as detailed below. SiteConfig WindowsFunctionAppSlotSiteConfig `pulumi:"siteConfig"` // The access key which will be used to access the storage account for the Function App Slot. StorageAccountAccessKey *string `pulumi:"storageAccountAccessKey"` // The backend storage account name which will be used by this Function App Slot. StorageAccountName *string `pulumi:"storageAccountName"` // One or more `storageAccount` blocks as defined below. StorageAccounts []WindowsFunctionAppSlotStorageAccount `pulumi:"storageAccounts"` // The Key Vault Secret ID, optionally including version, that contains the Connection String to connect to the storage account for this Function App Slot. // // > **Note:** `storageKeyVaultSecretId` cannot be used with `storageAccountName`. // // > **Note:** `storageKeyVaultSecretId` used without a version will use the latest version of the secret, however, the service can take up to 24h to pick up a rotation of the latest version. See the [official docs](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#rotation) for more information. StorageKeyVaultSecretId *string `pulumi:"storageKeyVaultSecretId"` // Should the Function App Slot use its Managed Identity to access storage. // // > **Note:** One of `storageAccountAccessKey` or `storageUsesManagedIdentity` must be specified when using `storageAccountName`. StorageUsesManagedIdentity *bool `pulumi:"storageUsesManagedIdentity"` // A mapping of tags which should be assigned to the Windows Function App Slot.
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appservice/plan.go
sdk/go/azure/appservice/plan.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appservice import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an App Service Plan component. // // !> **NOTE:** This resource has been deprecated in version 5.0 of the provider and will be removed in version 6.0. Please use `appservice.ServicePlan` resource instead. // // ## Example Usage // // ### Dedicated) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("api-rg-pro"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = appservice.NewPlan(ctx, "example", &appservice.PlanArgs{ // Name: pulumi.String("api-appserviceplan-pro"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: &appservice.PlanSkuArgs{ // Tier: pulumi.String("Standard"), // Size: pulumi.String("S1"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Shared / Consumption Plan) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("api-rg-pro"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = appservice.NewPlan(ctx, "example", &appservice.PlanArgs{ // Name: pulumi.String("api-appserviceplan-pro"), // Location: example.Location, // ResourceGroupName: example.Name, // Kind: pulumi.Any("FunctionApp"), // Sku: &appservice.PlanSkuArgs{ // Tier: pulumi.String("Dynamic"), // Size: pulumi.String("Y1"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Linux) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("api-rg-pro"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = appservice.NewPlan(ctx, "example", &appservice.PlanArgs{ // Name: pulumi.String("api-appserviceplan-pro"), // Location: example.Location, // ResourceGroupName: example.Name, // Kind: pulumi.Any("Linux"), // Reserved: pulumi.Bool(true), // Sku: &appservice.PlanSkuArgs{ // Tier: pulumi.String("Standard"), // Size: pulumi.String("S1"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Windows Container) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("api-rg-pro"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = appservice.NewPlan(ctx, "example", &appservice.PlanArgs{ // Name: pulumi.String("api-appserviceplan-pro"), // Location: example.Location, // ResourceGroupName: example.Name, // Kind: pulumi.Any("xenon"), // IsXenon: pulumi.Bool(true), // Sku: &appservice.PlanSkuArgs{ // Tier: pulumi.String("PremiumContainer"), // Size: pulumi.String("PC2"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // App Service Plan instances can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appservice/plan:Plan instance1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Web/serverFarms/instance1 // ``` type Plan struct { pulumi.CustomResourceState // The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created. // // > **NOTE:** Attaching to an App Service Environment requires the App Service Plan use a `Premium` SKU (when using an ASEv1) and the `Isolated` SKU (for an ASEv2). AppServiceEnvironmentId pulumi.StringPtrOutput `pulumi:"appServiceEnvironmentId"` // Whether to create a xenon App Service Plan. IsXenon pulumi.BoolPtrOutput `pulumi:"isXenon"` // The kind of the App Service Plan to create. Possible values are `Windows` (also available as `App`), `Linux`, `elastic` (for Premium Consumption), `xenon` and `FunctionApp` (for a Consumption Plan). Defaults to `Windows`. Changing this forces a new resource to be created. // // > **NOTE:** When creating a `Linux` App Service Plan, the `reserved` field must be set to `true`, and when creating a `Windows`/`app` App Service Plan the `reserved` field must be set to `false`. Kind pulumi.StringPtrOutput `pulumi:"kind"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan. MaximumElasticWorkerCount pulumi.IntOutput `pulumi:"maximumElasticWorkerCount"` // The maximum number of workers supported with the App Service Plan's sku. MaximumNumberOfWorkers pulumi.IntOutput `pulumi:"maximumNumberOfWorkers"` // Specifies the name of the App Service Plan component. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Can Apps assigned to this App Service Plan be scaled independently? If set to `false` apps assigned to this plan will scale to all instances of the plan. PerSiteScaling pulumi.BoolPtrOutput `pulumi:"perSiteScaling"` // Is this App Service Plan `Reserved`. Reserved pulumi.BoolPtrOutput `pulumi:"reserved"` // The name of the resource group in which to create the App Service Plan component. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `sku` block as documented below. Sku PlanSkuOutput `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Specifies if the App Service Plan should be Zone Redundant. Changing this forces a new resource to be created. // // > **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html). ZoneRedundant pulumi.BoolPtrOutput `pulumi:"zoneRedundant"` } // NewPlan registers a new resource with the given unique name, arguments, and options. func NewPlan(ctx *pulumi.Context, name string, args *PlanArgs, opts ...pulumi.ResourceOption) (*Plan, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Sku == nil { return nil, errors.New("invalid value for required argument 'Sku'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Plan err := ctx.RegisterResource("azure:appservice/plan:Plan", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPlan gets an existing Plan resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetPlan(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PlanState, opts ...pulumi.ResourceOption) (*Plan, error) { var resource Plan err := ctx.ReadResource("azure:appservice/plan:Plan", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Plan resources. type planState struct { // The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created. // // > **NOTE:** Attaching to an App Service Environment requires the App Service Plan use a `Premium` SKU (when using an ASEv1) and the `Isolated` SKU (for an ASEv2). AppServiceEnvironmentId *string `pulumi:"appServiceEnvironmentId"` // Whether to create a xenon App Service Plan. IsXenon *bool `pulumi:"isXenon"` // The kind of the App Service Plan to create. Possible values are `Windows` (also available as `App`), `Linux`, `elastic` (for Premium Consumption), `xenon` and `FunctionApp` (for a Consumption Plan). Defaults to `Windows`. Changing this forces a new resource to be created. // // > **NOTE:** When creating a `Linux` App Service Plan, the `reserved` field must be set to `true`, and when creating a `Windows`/`app` App Service Plan the `reserved` field must be set to `false`. Kind interface{} `pulumi:"kind"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan. MaximumElasticWorkerCount *int `pulumi:"maximumElasticWorkerCount"` // The maximum number of workers supported with the App Service Plan's sku. MaximumNumberOfWorkers *int `pulumi:"maximumNumberOfWorkers"` // Specifies the name of the App Service Plan component. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Can Apps assigned to this App Service Plan be scaled independently? If set to `false` apps assigned to this plan will scale to all instances of the plan. PerSiteScaling *bool `pulumi:"perSiteScaling"` // Is this App Service Plan `Reserved`. Reserved *bool `pulumi:"reserved"` // The name of the resource group in which to create the App Service Plan component. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `sku` block as documented below. Sku *PlanSku `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies if the App Service Plan should be Zone Redundant. Changing this forces a new resource to be created. // // > **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html). ZoneRedundant *bool `pulumi:"zoneRedundant"` } type PlanState struct { // The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created. // // > **NOTE:** Attaching to an App Service Environment requires the App Service Plan use a `Premium` SKU (when using an ASEv1) and the `Isolated` SKU (for an ASEv2). AppServiceEnvironmentId pulumi.StringPtrInput // Whether to create a xenon App Service Plan. IsXenon pulumi.BoolPtrInput // The kind of the App Service Plan to create. Possible values are `Windows` (also available as `App`), `Linux`, `elastic` (for Premium Consumption), `xenon` and `FunctionApp` (for a Consumption Plan). Defaults to `Windows`. Changing this forces a new resource to be created. // // > **NOTE:** When creating a `Linux` App Service Plan, the `reserved` field must be set to `true`, and when creating a `Windows`/`app` App Service Plan the `reserved` field must be set to `false`. Kind pulumi.Input // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan. MaximumElasticWorkerCount pulumi.IntPtrInput // The maximum number of workers supported with the App Service Plan's sku. MaximumNumberOfWorkers pulumi.IntPtrInput // Specifies the name of the App Service Plan component. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Can Apps assigned to this App Service Plan be scaled independently? If set to `false` apps assigned to this plan will scale to all instances of the plan. PerSiteScaling pulumi.BoolPtrInput // Is this App Service Plan `Reserved`. Reserved pulumi.BoolPtrInput // The name of the resource group in which to create the App Service Plan component. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `sku` block as documented below. Sku PlanSkuPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies if the App Service Plan should be Zone Redundant. Changing this forces a new resource to be created. // // > **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html). ZoneRedundant pulumi.BoolPtrInput } func (PlanState) ElementType() reflect.Type { return reflect.TypeOf((*planState)(nil)).Elem() } type planArgs struct { // The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created. // // > **NOTE:** Attaching to an App Service Environment requires the App Service Plan use a `Premium` SKU (when using an ASEv1) and the `Isolated` SKU (for an ASEv2). AppServiceEnvironmentId *string `pulumi:"appServiceEnvironmentId"` // Whether to create a xenon App Service Plan. IsXenon *bool `pulumi:"isXenon"` // The kind of the App Service Plan to create. Possible values are `Windows` (also available as `App`), `Linux`, `elastic` (for Premium Consumption), `xenon` and `FunctionApp` (for a Consumption Plan). Defaults to `Windows`. Changing this forces a new resource to be created. // // > **NOTE:** When creating a `Linux` App Service Plan, the `reserved` field must be set to `true`, and when creating a `Windows`/`app` App Service Plan the `reserved` field must be set to `false`. Kind interface{} `pulumi:"kind"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan. MaximumElasticWorkerCount *int `pulumi:"maximumElasticWorkerCount"` // Specifies the name of the App Service Plan component. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Can Apps assigned to this App Service Plan be scaled independently? If set to `false` apps assigned to this plan will scale to all instances of the plan. PerSiteScaling *bool `pulumi:"perSiteScaling"` // Is this App Service Plan `Reserved`. Reserved *bool `pulumi:"reserved"` // The name of the resource group in which to create the App Service Plan component. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `sku` block as documented below. Sku PlanSku `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies if the App Service Plan should be Zone Redundant. Changing this forces a new resource to be created. // // > **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html). ZoneRedundant *bool `pulumi:"zoneRedundant"` } // The set of arguments for constructing a Plan resource. type PlanArgs struct { // The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created. // // > **NOTE:** Attaching to an App Service Environment requires the App Service Plan use a `Premium` SKU (when using an ASEv1) and the `Isolated` SKU (for an ASEv2). AppServiceEnvironmentId pulumi.StringPtrInput // Whether to create a xenon App Service Plan. IsXenon pulumi.BoolPtrInput // The kind of the App Service Plan to create. Possible values are `Windows` (also available as `App`), `Linux`, `elastic` (for Premium Consumption), `xenon` and `FunctionApp` (for a Consumption Plan). Defaults to `Windows`. Changing this forces a new resource to be created. // // > **NOTE:** When creating a `Linux` App Service Plan, the `reserved` field must be set to `true`, and when creating a `Windows`/`app` App Service Plan the `reserved` field must be set to `false`. Kind pulumi.Input // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan. MaximumElasticWorkerCount pulumi.IntPtrInput // Specifies the name of the App Service Plan component. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Can Apps assigned to this App Service Plan be scaled independently? If set to `false` apps assigned to this plan will scale to all instances of the plan. PerSiteScaling pulumi.BoolPtrInput // Is this App Service Plan `Reserved`. Reserved pulumi.BoolPtrInput // The name of the resource group in which to create the App Service Plan component. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `sku` block as documented below. Sku PlanSkuInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies if the App Service Plan should be Zone Redundant. Changing this forces a new resource to be created. // // > **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html). ZoneRedundant pulumi.BoolPtrInput } func (PlanArgs) ElementType() reflect.Type { return reflect.TypeOf((*planArgs)(nil)).Elem() } type PlanInput interface { pulumi.Input ToPlanOutput() PlanOutput ToPlanOutputWithContext(ctx context.Context) PlanOutput } func (*Plan) ElementType() reflect.Type { return reflect.TypeOf((**Plan)(nil)).Elem() } func (i *Plan) ToPlanOutput() PlanOutput { return i.ToPlanOutputWithContext(context.Background()) } func (i *Plan) ToPlanOutputWithContext(ctx context.Context) PlanOutput { return pulumi.ToOutputWithContext(ctx, i).(PlanOutput) } // PlanArrayInput is an input type that accepts PlanArray and PlanArrayOutput values. // You can construct a concrete instance of `PlanArrayInput` via: // // PlanArray{ PlanArgs{...} } type PlanArrayInput interface { pulumi.Input ToPlanArrayOutput() PlanArrayOutput ToPlanArrayOutputWithContext(context.Context) PlanArrayOutput } type PlanArray []PlanInput func (PlanArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Plan)(nil)).Elem() } func (i PlanArray) ToPlanArrayOutput() PlanArrayOutput { return i.ToPlanArrayOutputWithContext(context.Background()) } func (i PlanArray) ToPlanArrayOutputWithContext(ctx context.Context) PlanArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PlanArrayOutput) } // PlanMapInput is an input type that accepts PlanMap and PlanMapOutput values. // You can construct a concrete instance of `PlanMapInput` via: // // PlanMap{ "key": PlanArgs{...} } type PlanMapInput interface { pulumi.Input ToPlanMapOutput() PlanMapOutput ToPlanMapOutputWithContext(context.Context) PlanMapOutput } type PlanMap map[string]PlanInput func (PlanMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Plan)(nil)).Elem() } func (i PlanMap) ToPlanMapOutput() PlanMapOutput { return i.ToPlanMapOutputWithContext(context.Background()) } func (i PlanMap) ToPlanMapOutputWithContext(ctx context.Context) PlanMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PlanMapOutput) } type PlanOutput struct{ *pulumi.OutputState } func (PlanOutput) ElementType() reflect.Type { return reflect.TypeOf((**Plan)(nil)).Elem() } func (o PlanOutput) ToPlanOutput() PlanOutput { return o } func (o PlanOutput) ToPlanOutputWithContext(ctx context.Context) PlanOutput { return o } // The ID of the App Service Environment where the App Service Plan should be located. Changing forces a new resource to be created. // // > **NOTE:** Attaching to an App Service Environment requires the App Service Plan use a `Premium` SKU (when using an ASEv1) and the `Isolated` SKU (for an ASEv2). func (o PlanOutput) AppServiceEnvironmentId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Plan) pulumi.StringPtrOutput { return v.AppServiceEnvironmentId }).(pulumi.StringPtrOutput) } // Whether to create a xenon App Service Plan. func (o PlanOutput) IsXenon() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Plan) pulumi.BoolPtrOutput { return v.IsXenon }).(pulumi.BoolPtrOutput) } // The kind of the App Service Plan to create. Possible values are `Windows` (also available as `App`), `Linux`, `elastic` (for Premium Consumption), `xenon` and `FunctionApp` (for a Consumption Plan). Defaults to `Windows`. Changing this forces a new resource to be created. // // > **NOTE:** When creating a `Linux` App Service Plan, the `reserved` field must be set to `true`, and when creating a `Windows`/`app` App Service Plan the `reserved` field must be set to `false`. func (o PlanOutput) Kind() pulumi.StringPtrOutput { return o.ApplyT(func(v *Plan) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o PlanOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Plan) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan. func (o PlanOutput) MaximumElasticWorkerCount() pulumi.IntOutput { return o.ApplyT(func(v *Plan) pulumi.IntOutput { return v.MaximumElasticWorkerCount }).(pulumi.IntOutput) } // The maximum number of workers supported with the App Service Plan's sku. func (o PlanOutput) MaximumNumberOfWorkers() pulumi.IntOutput { return o.ApplyT(func(v *Plan) pulumi.IntOutput { return v.MaximumNumberOfWorkers }).(pulumi.IntOutput) } // Specifies the name of the App Service Plan component. Changing this forces a new resource to be created. func (o PlanOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Plan) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Can Apps assigned to this App Service Plan be scaled independently? If set to `false` apps assigned to this plan will scale to all instances of the plan. func (o PlanOutput) PerSiteScaling() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Plan) pulumi.BoolPtrOutput { return v.PerSiteScaling }).(pulumi.BoolPtrOutput) } // Is this App Service Plan `Reserved`. func (o PlanOutput) Reserved() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Plan) pulumi.BoolPtrOutput { return v.Reserved }).(pulumi.BoolPtrOutput) } // The name of the resource group in which to create the App Service Plan component. Changing this forces a new resource to be created. func (o PlanOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Plan) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `sku` block as documented below. func (o PlanOutput) Sku() PlanSkuOutput { return o.ApplyT(func(v *Plan) PlanSkuOutput { return v.Sku }).(PlanSkuOutput) } // A mapping of tags to assign to the resource. func (o PlanOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Plan) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Specifies if the App Service Plan should be Zone Redundant. Changing this forces a new resource to be created. // // > **NOTE:** Requires either `PremiumV2` or `PremiumV3` SKU and that at least 3 instances. For more information, please see the [App Service Team Blog](https://azure.github.io/AppService/2021/08/25/App-service-support-for-availability-zones.html). func (o PlanOutput) ZoneRedundant() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Plan) pulumi.BoolPtrOutput { return v.ZoneRedundant }).(pulumi.BoolPtrOutput) } type PlanArrayOutput struct{ *pulumi.OutputState } func (PlanArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Plan)(nil)).Elem() } func (o PlanArrayOutput) ToPlanArrayOutput() PlanArrayOutput { return o } func (o PlanArrayOutput) ToPlanArrayOutputWithContext(ctx context.Context) PlanArrayOutput { return o } func (o PlanArrayOutput) Index(i pulumi.IntInput) PlanOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Plan { return vs[0].([]*Plan)[vs[1].(int)] }).(PlanOutput) } type PlanMapOutput struct{ *pulumi.OutputState } func (PlanMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Plan)(nil)).Elem() } func (o PlanMapOutput) ToPlanMapOutput() PlanMapOutput { return o } func (o PlanMapOutput) ToPlanMapOutputWithContext(ctx context.Context) PlanMapOutput { return o } func (o PlanMapOutput) MapIndex(k pulumi.StringInput) PlanOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Plan { return vs[0].(map[string]*Plan)[vs[1].(string)] }).(PlanOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PlanInput)(nil)).Elem(), &Plan{}) pulumi.RegisterInputType(reflect.TypeOf((*PlanArrayInput)(nil)).Elem(), PlanArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PlanMapInput)(nil)).Elem(), PlanMap{}) pulumi.RegisterOutputType(PlanOutput{}) pulumi.RegisterOutputType(PlanArrayOutput{}) pulumi.RegisterOutputType(PlanMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/appservice/staticWebApp.go
sdk/go/azure/appservice/staticWebApp.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package appservice import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an App Service Static Web App. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = appservice.NewStaticWebApp(ctx, "example", &appservice.StaticWebAppArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Web` - 2023-01-01 // // ## Import // // Static Web Apps can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:appservice/staticWebApp:StaticWebApp example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Web/staticSites/my-static-site1 // ``` type StaticWebApp struct { pulumi.CustomResourceState // The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action. ApiKey pulumi.StringOutput `pulumi:"apiKey"` // A key-value pair of App Settings. AppSettings pulumi.StringMapOutput `pulumi:"appSettings"` // A `basicAuth` block as defined below. BasicAuth StaticWebAppBasicAuthPtrOutput `pulumi:"basicAuth"` // Should changes to the configuration file be permitted. Defaults to `true`. ConfigurationFileChangesEnabled pulumi.BoolPtrOutput `pulumi:"configurationFileChangesEnabled"` // The default host name of the Static Web App. DefaultHostName pulumi.StringOutput `pulumi:"defaultHostName"` // An `identity` block as defined below. Identity StaticWebAppIdentityPtrOutput `pulumi:"identity"` // The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created. Name pulumi.StringOutput `pulumi:"name"` // Are Preview (Staging) environments enabled. Defaults to `true`. PreviewEnvironmentsEnabled pulumi.BoolPtrOutput `pulumi:"previewEnvironmentsEnabled"` // Should public network access be enabled for the Static Web App. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // Repository branch to use for the Static Web App. `repositoryUrl` and `repositoryToken` must also be set. RepositoryBranch pulumi.StringPtrOutput `pulumi:"repositoryBranch"` // Repository Token with `admin` privileges to use for the Static Web App. `repositoryBranch` and `repositoryUrl` must also be set. RepositoryToken pulumi.StringPtrOutput `pulumi:"repositoryToken"` // Repository URL to use for the Static Web App. `repositoryBranch` and `repositoryToken` must also be set. RepositoryUrl pulumi.StringPtrOutput `pulumi:"repositoryUrl"` // The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the SKU size of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. SkuSize pulumi.StringPtrOutput `pulumi:"skuSize"` // Specifies the SKU tier of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. SkuTier pulumi.StringPtrOutput `pulumi:"skuTier"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewStaticWebApp registers a new resource with the given unique name, arguments, and options. func NewStaticWebApp(ctx *pulumi.Context, name string, args *StaticWebAppArgs, opts ...pulumi.ResourceOption) (*StaticWebApp, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.BasicAuth != nil { args.BasicAuth = pulumi.ToSecret(args.BasicAuth).(StaticWebAppBasicAuthPtrInput) } if args.RepositoryToken != nil { args.RepositoryToken = pulumi.ToSecret(args.RepositoryToken).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "apiKey", "basicAuth", "repositoryToken", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource StaticWebApp err := ctx.RegisterResource("azure:appservice/staticWebApp:StaticWebApp", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetStaticWebApp gets an existing StaticWebApp resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetStaticWebApp(ctx *pulumi.Context, name string, id pulumi.IDInput, state *StaticWebAppState, opts ...pulumi.ResourceOption) (*StaticWebApp, error) { var resource StaticWebApp err := ctx.ReadResource("azure:appservice/staticWebApp:StaticWebApp", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering StaticWebApp resources. type staticWebAppState struct { // The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action. ApiKey *string `pulumi:"apiKey"` // A key-value pair of App Settings. AppSettings map[string]string `pulumi:"appSettings"` // A `basicAuth` block as defined below. BasicAuth *StaticWebAppBasicAuth `pulumi:"basicAuth"` // Should changes to the configuration file be permitted. Defaults to `true`. ConfigurationFileChangesEnabled *bool `pulumi:"configurationFileChangesEnabled"` // The default host name of the Static Web App. DefaultHostName *string `pulumi:"defaultHostName"` // An `identity` block as defined below. Identity *StaticWebAppIdentity `pulumi:"identity"` // The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created. Location *string `pulumi:"location"` // The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created. Name *string `pulumi:"name"` // Are Preview (Staging) environments enabled. Defaults to `true`. PreviewEnvironmentsEnabled *bool `pulumi:"previewEnvironmentsEnabled"` // Should public network access be enabled for the Static Web App. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // Repository branch to use for the Static Web App. `repositoryUrl` and `repositoryToken` must also be set. RepositoryBranch *string `pulumi:"repositoryBranch"` // Repository Token with `admin` privileges to use for the Static Web App. `repositoryBranch` and `repositoryUrl` must also be set. RepositoryToken *string `pulumi:"repositoryToken"` // Repository URL to use for the Static Web App. `repositoryBranch` and `repositoryToken` must also be set. RepositoryUrl *string `pulumi:"repositoryUrl"` // The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the SKU size of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. SkuSize *string `pulumi:"skuSize"` // Specifies the SKU tier of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. SkuTier *string `pulumi:"skuTier"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } type StaticWebAppState struct { // The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action. ApiKey pulumi.StringPtrInput // A key-value pair of App Settings. AppSettings pulumi.StringMapInput // A `basicAuth` block as defined below. BasicAuth StaticWebAppBasicAuthPtrInput // Should changes to the configuration file be permitted. Defaults to `true`. ConfigurationFileChangesEnabled pulumi.BoolPtrInput // The default host name of the Static Web App. DefaultHostName pulumi.StringPtrInput // An `identity` block as defined below. Identity StaticWebAppIdentityPtrInput // The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created. Location pulumi.StringPtrInput // The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created. Name pulumi.StringPtrInput // Are Preview (Staging) environments enabled. Defaults to `true`. PreviewEnvironmentsEnabled pulumi.BoolPtrInput // Should public network access be enabled for the Static Web App. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // Repository branch to use for the Static Web App. `repositoryUrl` and `repositoryToken` must also be set. RepositoryBranch pulumi.StringPtrInput // Repository Token with `admin` privileges to use for the Static Web App. `repositoryBranch` and `repositoryUrl` must also be set. RepositoryToken pulumi.StringPtrInput // Repository URL to use for the Static Web App. `repositoryBranch` and `repositoryToken` must also be set. RepositoryUrl pulumi.StringPtrInput // The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the SKU size of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. SkuSize pulumi.StringPtrInput // Specifies the SKU tier of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. SkuTier pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (StaticWebAppState) ElementType() reflect.Type { return reflect.TypeOf((*staticWebAppState)(nil)).Elem() } type staticWebAppArgs struct { // A key-value pair of App Settings. AppSettings map[string]string `pulumi:"appSettings"` // A `basicAuth` block as defined below. BasicAuth *StaticWebAppBasicAuth `pulumi:"basicAuth"` // Should changes to the configuration file be permitted. Defaults to `true`. ConfigurationFileChangesEnabled *bool `pulumi:"configurationFileChangesEnabled"` // An `identity` block as defined below. Identity *StaticWebAppIdentity `pulumi:"identity"` // The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created. Location *string `pulumi:"location"` // The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created. Name *string `pulumi:"name"` // Are Preview (Staging) environments enabled. Defaults to `true`. PreviewEnvironmentsEnabled *bool `pulumi:"previewEnvironmentsEnabled"` // Should public network access be enabled for the Static Web App. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // Repository branch to use for the Static Web App. `repositoryUrl` and `repositoryToken` must also be set. RepositoryBranch *string `pulumi:"repositoryBranch"` // Repository Token with `admin` privileges to use for the Static Web App. `repositoryBranch` and `repositoryUrl` must also be set. RepositoryToken *string `pulumi:"repositoryToken"` // Repository URL to use for the Static Web App. `repositoryBranch` and `repositoryToken` must also be set. RepositoryUrl *string `pulumi:"repositoryUrl"` // The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the SKU size of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. SkuSize *string `pulumi:"skuSize"` // Specifies the SKU tier of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. SkuTier *string `pulumi:"skuTier"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a StaticWebApp resource. type StaticWebAppArgs struct { // A key-value pair of App Settings. AppSettings pulumi.StringMapInput // A `basicAuth` block as defined below. BasicAuth StaticWebAppBasicAuthPtrInput // Should changes to the configuration file be permitted. Defaults to `true`. ConfigurationFileChangesEnabled pulumi.BoolPtrInput // An `identity` block as defined below. Identity StaticWebAppIdentityPtrInput // The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created. Location pulumi.StringPtrInput // The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created. Name pulumi.StringPtrInput // Are Preview (Staging) environments enabled. Defaults to `true`. PreviewEnvironmentsEnabled pulumi.BoolPtrInput // Should public network access be enabled for the Static Web App. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // Repository branch to use for the Static Web App. `repositoryUrl` and `repositoryToken` must also be set. RepositoryBranch pulumi.StringPtrInput // Repository Token with `admin` privileges to use for the Static Web App. `repositoryBranch` and `repositoryUrl` must also be set. RepositoryToken pulumi.StringPtrInput // Repository URL to use for the Static Web App. `repositoryBranch` and `repositoryToken` must also be set. RepositoryUrl pulumi.StringPtrInput // The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created. ResourceGroupName pulumi.StringInput // Specifies the SKU size of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. SkuSize pulumi.StringPtrInput // Specifies the SKU tier of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. SkuTier pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (StaticWebAppArgs) ElementType() reflect.Type { return reflect.TypeOf((*staticWebAppArgs)(nil)).Elem() } type StaticWebAppInput interface { pulumi.Input ToStaticWebAppOutput() StaticWebAppOutput ToStaticWebAppOutputWithContext(ctx context.Context) StaticWebAppOutput } func (*StaticWebApp) ElementType() reflect.Type { return reflect.TypeOf((**StaticWebApp)(nil)).Elem() } func (i *StaticWebApp) ToStaticWebAppOutput() StaticWebAppOutput { return i.ToStaticWebAppOutputWithContext(context.Background()) } func (i *StaticWebApp) ToStaticWebAppOutputWithContext(ctx context.Context) StaticWebAppOutput { return pulumi.ToOutputWithContext(ctx, i).(StaticWebAppOutput) } // StaticWebAppArrayInput is an input type that accepts StaticWebAppArray and StaticWebAppArrayOutput values. // You can construct a concrete instance of `StaticWebAppArrayInput` via: // // StaticWebAppArray{ StaticWebAppArgs{...} } type StaticWebAppArrayInput interface { pulumi.Input ToStaticWebAppArrayOutput() StaticWebAppArrayOutput ToStaticWebAppArrayOutputWithContext(context.Context) StaticWebAppArrayOutput } type StaticWebAppArray []StaticWebAppInput func (StaticWebAppArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*StaticWebApp)(nil)).Elem() } func (i StaticWebAppArray) ToStaticWebAppArrayOutput() StaticWebAppArrayOutput { return i.ToStaticWebAppArrayOutputWithContext(context.Background()) } func (i StaticWebAppArray) ToStaticWebAppArrayOutputWithContext(ctx context.Context) StaticWebAppArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(StaticWebAppArrayOutput) } // StaticWebAppMapInput is an input type that accepts StaticWebAppMap and StaticWebAppMapOutput values. // You can construct a concrete instance of `StaticWebAppMapInput` via: // // StaticWebAppMap{ "key": StaticWebAppArgs{...} } type StaticWebAppMapInput interface { pulumi.Input ToStaticWebAppMapOutput() StaticWebAppMapOutput ToStaticWebAppMapOutputWithContext(context.Context) StaticWebAppMapOutput } type StaticWebAppMap map[string]StaticWebAppInput func (StaticWebAppMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*StaticWebApp)(nil)).Elem() } func (i StaticWebAppMap) ToStaticWebAppMapOutput() StaticWebAppMapOutput { return i.ToStaticWebAppMapOutputWithContext(context.Background()) } func (i StaticWebAppMap) ToStaticWebAppMapOutputWithContext(ctx context.Context) StaticWebAppMapOutput { return pulumi.ToOutputWithContext(ctx, i).(StaticWebAppMapOutput) } type StaticWebAppOutput struct{ *pulumi.OutputState } func (StaticWebAppOutput) ElementType() reflect.Type { return reflect.TypeOf((**StaticWebApp)(nil)).Elem() } func (o StaticWebAppOutput) ToStaticWebAppOutput() StaticWebAppOutput { return o } func (o StaticWebAppOutput) ToStaticWebAppOutputWithContext(ctx context.Context) StaticWebAppOutput { return o } // The API key of this Static Web App, which is used for later interacting with this Static Web App from other clients, e.g. GitHub Action. func (o StaticWebAppOutput) ApiKey() pulumi.StringOutput { return o.ApplyT(func(v *StaticWebApp) pulumi.StringOutput { return v.ApiKey }).(pulumi.StringOutput) } // A key-value pair of App Settings. func (o StaticWebAppOutput) AppSettings() pulumi.StringMapOutput { return o.ApplyT(func(v *StaticWebApp) pulumi.StringMapOutput { return v.AppSettings }).(pulumi.StringMapOutput) } // A `basicAuth` block as defined below. func (o StaticWebAppOutput) BasicAuth() StaticWebAppBasicAuthPtrOutput { return o.ApplyT(func(v *StaticWebApp) StaticWebAppBasicAuthPtrOutput { return v.BasicAuth }).(StaticWebAppBasicAuthPtrOutput) } // Should changes to the configuration file be permitted. Defaults to `true`. func (o StaticWebAppOutput) ConfigurationFileChangesEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *StaticWebApp) pulumi.BoolPtrOutput { return v.ConfigurationFileChangesEnabled }).(pulumi.BoolPtrOutput) } // The default host name of the Static Web App. func (o StaticWebAppOutput) DefaultHostName() pulumi.StringOutput { return o.ApplyT(func(v *StaticWebApp) pulumi.StringOutput { return v.DefaultHostName }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o StaticWebAppOutput) Identity() StaticWebAppIdentityPtrOutput { return o.ApplyT(func(v *StaticWebApp) StaticWebAppIdentityPtrOutput { return v.Identity }).(StaticWebAppIdentityPtrOutput) } // The Azure Region where the Static Web App should exist. Changing this forces a new Static Web App to be created. func (o StaticWebAppOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *StaticWebApp) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Static Web App. Changing this forces a new Static Web App to be created. func (o StaticWebAppOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *StaticWebApp) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Are Preview (Staging) environments enabled. Defaults to `true`. func (o StaticWebAppOutput) PreviewEnvironmentsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *StaticWebApp) pulumi.BoolPtrOutput { return v.PreviewEnvironmentsEnabled }).(pulumi.BoolPtrOutput) } // Should public network access be enabled for the Static Web App. Defaults to `true`. func (o StaticWebAppOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *StaticWebApp) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput) } // Repository branch to use for the Static Web App. `repositoryUrl` and `repositoryToken` must also be set. func (o StaticWebAppOutput) RepositoryBranch() pulumi.StringPtrOutput { return o.ApplyT(func(v *StaticWebApp) pulumi.StringPtrOutput { return v.RepositoryBranch }).(pulumi.StringPtrOutput) } // Repository Token with `admin` privileges to use for the Static Web App. `repositoryBranch` and `repositoryUrl` must also be set. func (o StaticWebAppOutput) RepositoryToken() pulumi.StringPtrOutput { return o.ApplyT(func(v *StaticWebApp) pulumi.StringPtrOutput { return v.RepositoryToken }).(pulumi.StringPtrOutput) } // Repository URL to use for the Static Web App. `repositoryBranch` and `repositoryToken` must also be set. func (o StaticWebAppOutput) RepositoryUrl() pulumi.StringPtrOutput { return o.ApplyT(func(v *StaticWebApp) pulumi.StringPtrOutput { return v.RepositoryUrl }).(pulumi.StringPtrOutput) } // The name of the Resource Group where the Static Web App should exist. Changing this forces a new Static Web App to be created. func (o StaticWebAppOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *StaticWebApp) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the SKU size of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. func (o StaticWebAppOutput) SkuSize() pulumi.StringPtrOutput { return o.ApplyT(func(v *StaticWebApp) pulumi.StringPtrOutput { return v.SkuSize }).(pulumi.StringPtrOutput) } // Specifies the SKU tier of the Static Web App. Possible values are `Free` or `Standard`. Defaults to `Free`. func (o StaticWebAppOutput) SkuTier() pulumi.StringPtrOutput { return o.ApplyT(func(v *StaticWebApp) pulumi.StringPtrOutput { return v.SkuTier }).(pulumi.StringPtrOutput) } // A mapping of tags to assign to the resource. func (o StaticWebAppOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *StaticWebApp) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type StaticWebAppArrayOutput struct{ *pulumi.OutputState } func (StaticWebAppArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*StaticWebApp)(nil)).Elem() } func (o StaticWebAppArrayOutput) ToStaticWebAppArrayOutput() StaticWebAppArrayOutput { return o } func (o StaticWebAppArrayOutput) ToStaticWebAppArrayOutputWithContext(ctx context.Context) StaticWebAppArrayOutput { return o } func (o StaticWebAppArrayOutput) Index(i pulumi.IntInput) StaticWebAppOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StaticWebApp { return vs[0].([]*StaticWebApp)[vs[1].(int)] }).(StaticWebAppOutput) } type StaticWebAppMapOutput struct{ *pulumi.OutputState } func (StaticWebAppMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*StaticWebApp)(nil)).Elem() } func (o StaticWebAppMapOutput) ToStaticWebAppMapOutput() StaticWebAppMapOutput { return o } func (o StaticWebAppMapOutput) ToStaticWebAppMapOutputWithContext(ctx context.Context) StaticWebAppMapOutput { return o } func (o StaticWebAppMapOutput) MapIndex(k pulumi.StringInput) StaticWebAppOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StaticWebApp { return vs[0].(map[string]*StaticWebApp)[vs[1].(string)] }).(StaticWebAppOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*StaticWebAppInput)(nil)).Elem(), &StaticWebApp{}) pulumi.RegisterInputType(reflect.TypeOf((*StaticWebAppArrayInput)(nil)).Elem(), StaticWebAppArray{}) pulumi.RegisterInputType(reflect.TypeOf((*StaticWebAppMapInput)(nil)).Elem(), StaticWebAppMap{}) pulumi.RegisterOutputType(StaticWebAppOutput{}) pulumi.RegisterOutputType(StaticWebAppArrayOutput{}) pulumi.RegisterOutputType(StaticWebAppMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false