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/avs/netappVolumeAttachment.go
sdk/go/azure/avs/netappVolumeAttachment.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 avs 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 VMware Solution Private Cloud Netapp File Attachment. // // ## Example Usage // // > **Note:** For Azure VMware Solution Private Cloud, normal `pulumi up` could ignore this note. Please disable correlation request id for continuous operations in one build (like acctest). The continuous operations like `update` or `delete` could not be triggered when it shares the same `correlation-id` with its previous operation. // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/avs" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/netapp" // "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 { // _, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // test, err := network.NewPublicIp(ctx, "test", &network.PublicIpArgs{ // Name: pulumi.String("example-public-ip"), // Location: pulumi.Any(testAzurermResourceGroup.Location), // ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name), // AllocationMethod: pulumi.String("Static"), // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // testVirtualNetwork, err := network.NewVirtualNetwork(ctx, "test", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-VirtualNetwork"), // Location: pulumi.Any(testAzurermResourceGroup.Location), // ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.88.0.0/16"), // }, // }) // if err != nil { // return err // } // netappSubnet, err := network.NewSubnet(ctx, "netappSubnet", &network.SubnetArgs{ // Name: pulumi.String("example-Subnet"), // ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name), // VirtualNetworkName: testVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.88.2.0/24"), // }, // Delegations: network.SubnetDelegationArray{ // &network.SubnetDelegationArgs{ // Name: pulumi.String("testdelegation"), // ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{ // Name: pulumi.String("Microsoft.Netapp/volumes"), // Actions: pulumi.StringArray{ // pulumi.String("Microsoft.Network/networkinterfaces/*"), // pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"), // }, // }, // }, // }, // }) // if err != nil { // return err // } // gatewaySubnet, err := network.NewSubnet(ctx, "gatewaySubnet", &network.SubnetArgs{ // Name: pulumi.String("GatewaySubnet"), // ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name), // VirtualNetworkName: testVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.88.1.0/24"), // }, // }) // if err != nil { // return err // } // testVirtualNetworkGateway, err := network.NewVirtualNetworkGateway(ctx, "test", &network.VirtualNetworkGatewayArgs{ // Name: pulumi.String("example-vnet-gateway"), // Location: pulumi.Any(testAzurermResourceGroup.Location), // ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name), // Type: pulumi.String("ExpressRoute"), // Sku: pulumi.String("Standard"), // IpConfigurations: network.VirtualNetworkGatewayIpConfigurationArray{ // &network.VirtualNetworkGatewayIpConfigurationArgs{ // Name: pulumi.String("vnetGatewayConfig"), // PublicIpAddressId: test.ID(), // SubnetId: gatewaySubnet.ID(), // }, // }, // }) // if err != nil { // return err // } // testAccount, err := netapp.NewAccount(ctx, "test", &netapp.AccountArgs{ // Name: pulumi.String("example-NetAppAccount"), // Location: pulumi.Any(testAzurermResourceGroup.Location), // ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name), // }) // if err != nil { // return err // } // testPool, err := netapp.NewPool(ctx, "test", &netapp.PoolArgs{ // Name: pulumi.String("example-NetAppPool"), // Location: pulumi.Any(testAzurermResourceGroup.Location), // ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name), // AccountName: testAccount.Name, // ServiceLevel: pulumi.String("Standard"), // SizeInTb: pulumi.Int(4), // }) // if err != nil { // return err // } // testVolume, err := netapp.NewVolume(ctx, "test", &netapp.VolumeArgs{ // Name: pulumi.String("example-NetAppVolume"), // Location: pulumi.Any(testAzurermResourceGroup.Location), // ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name), // AccountName: testAccount.Name, // PoolName: testPool.Name, // VolumePath: pulumi.String("my-unique-file-path-%d"), // ServiceLevel: pulumi.String("Standard"), // SubnetId: netappSubnet.ID(), // Protocols: pulumi.StringArray{ // pulumi.String("NFSv3"), // }, // StorageQuotaInGb: pulumi.Int(100), // AzureVmwareDataStoreEnabled: pulumi.Bool(true), // ExportPolicyRules: netapp.VolumeExportPolicyRuleArray{ // &netapp.VolumeExportPolicyRuleArgs{ // RuleIndex: pulumi.Int(1), // AllowedClients: pulumi.StringArray{ // pulumi.String("0.0.0.0/0"), // }, // ProtocolsEnabled: pulumi.String("NFSv3"), // UnixReadOnly: pulumi.Bool(false), // UnixReadWrite: pulumi.Bool(true), // RootAccessEnabled: pulumi.Bool(true), // }, // }, // }) // if err != nil { // return err // } // testPrivateCloud, err := avs.NewPrivateCloud(ctx, "test", &avs.PrivateCloudArgs{ // Name: pulumi.String("example-PC"), // ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name), // Location: pulumi.Any(testAzurermResourceGroup.Location), // SkuName: pulumi.String("av36"), // ManagementCluster: &avs.PrivateCloudManagementClusterArgs{ // Size: pulumi.Int(3), // }, // NetworkSubnetCidr: pulumi.String("192.168.48.0/22"), // }) // if err != nil { // return err // } // testCluster, err := avs.NewCluster(ctx, "test", &avs.ClusterArgs{ // Name: pulumi.String("example-vm-cluster"), // VmwareCloudId: testPrivateCloud.ID(), // ClusterNodeCount: pulumi.Int(3), // SkuName: pulumi.String("av36"), // }) // if err != nil { // return err // } // testExpressRouteAuthorization, err := avs.NewExpressRouteAuthorization(ctx, "test", &avs.ExpressRouteAuthorizationArgs{ // Name: pulumi.String("example-VmwareAuthorization"), // PrivateCloudId: testPrivateCloud.ID(), // }) // if err != nil { // return err // } // testVirtualNetworkGatewayConnection, err := network.NewVirtualNetworkGatewayConnection(ctx, "test", &network.VirtualNetworkGatewayConnectionArgs{ // Name: pulumi.String("example-vnetgwconn"), // Location: pulumi.Any(testAzurermResourceGroup.Location), // ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name), // Type: pulumi.String("ExpressRoute"), // VirtualNetworkGatewayId: testVirtualNetworkGateway.ID(), // ExpressRouteCircuitId: pulumi.String(testPrivateCloud.Circuits.ApplyT(func(circuits []avs.PrivateCloudCircuit) (*string, error) { // return &circuits[0].ExpressRouteId, nil // }).(pulumi.StringPtrOutput)), // AuthorizationKey: testExpressRouteAuthorization.ExpressRouteAuthorizationKey, // }) // if err != nil { // return err // } // _, err = avs.NewNetappVolumeAttachment(ctx, "test", &avs.NetappVolumeAttachmentArgs{ // Name: pulumi.String("example-vmwareattachment"), // NetappVolumeId: testVolume.ID(), // VmwareClusterId: testCluster.ID(), // }, pulumi.DependsOn([]pulumi.Resource{ // testVirtualNetworkGatewayConnection, // })) // 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.AVS` - 2022-05-01 // // ## Import // // Azure VMware Solution Private Cloud Netapp File Volume Attachments can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:avs/netappVolumeAttachment:NetappVolumeAttachment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/privateCloud1/clusters/Cluster1/dataStores/datastore1 // ``` type NetappVolumeAttachment struct { pulumi.CustomResourceState // The name which should be used for this Azure VMware Solution Private Cloud Netapp File Volume Attachment. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. Name pulumi.StringOutput `pulumi:"name"` // The netapp file volume for this Azure VMware Solution Private Cloud Netapp File Volume Attachment to connect to. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. NetappVolumeId pulumi.StringOutput `pulumi:"netappVolumeId"` // The vmware cluster for this Azure VMware Solution Private Cloud Netapp File Volume Attachment to associated to. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. // // > **Note:** please follow the prerequisites mentioned in this [article](https://learn.microsoft.com/en-us/azure/azure-vmware/attach-azure-netapp-files-to-azure-vmware-solution-hosts?tabs=azure-portal#prerequisites) before associating the netapp file volume to the Azure VMware Solution hosts. VmwareClusterId pulumi.StringOutput `pulumi:"vmwareClusterId"` } // NewNetappVolumeAttachment registers a new resource with the given unique name, arguments, and options. func NewNetappVolumeAttachment(ctx *pulumi.Context, name string, args *NetappVolumeAttachmentArgs, opts ...pulumi.ResourceOption) (*NetappVolumeAttachment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NetappVolumeId == nil { return nil, errors.New("invalid value for required argument 'NetappVolumeId'") } if args.VmwareClusterId == nil { return nil, errors.New("invalid value for required argument 'VmwareClusterId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetappVolumeAttachment err := ctx.RegisterResource("azure:avs/netappVolumeAttachment:NetappVolumeAttachment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetappVolumeAttachment gets an existing NetappVolumeAttachment 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 GetNetappVolumeAttachment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetappVolumeAttachmentState, opts ...pulumi.ResourceOption) (*NetappVolumeAttachment, error) { var resource NetappVolumeAttachment err := ctx.ReadResource("azure:avs/netappVolumeAttachment:NetappVolumeAttachment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetappVolumeAttachment resources. type netappVolumeAttachmentState struct { // The name which should be used for this Azure VMware Solution Private Cloud Netapp File Volume Attachment. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. Name *string `pulumi:"name"` // The netapp file volume for this Azure VMware Solution Private Cloud Netapp File Volume Attachment to connect to. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. NetappVolumeId *string `pulumi:"netappVolumeId"` // The vmware cluster for this Azure VMware Solution Private Cloud Netapp File Volume Attachment to associated to. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. // // > **Note:** please follow the prerequisites mentioned in this [article](https://learn.microsoft.com/en-us/azure/azure-vmware/attach-azure-netapp-files-to-azure-vmware-solution-hosts?tabs=azure-portal#prerequisites) before associating the netapp file volume to the Azure VMware Solution hosts. VmwareClusterId *string `pulumi:"vmwareClusterId"` } type NetappVolumeAttachmentState struct { // The name which should be used for this Azure VMware Solution Private Cloud Netapp File Volume Attachment. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. Name pulumi.StringPtrInput // The netapp file volume for this Azure VMware Solution Private Cloud Netapp File Volume Attachment to connect to. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. NetappVolumeId pulumi.StringPtrInput // The vmware cluster for this Azure VMware Solution Private Cloud Netapp File Volume Attachment to associated to. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. // // > **Note:** please follow the prerequisites mentioned in this [article](https://learn.microsoft.com/en-us/azure/azure-vmware/attach-azure-netapp-files-to-azure-vmware-solution-hosts?tabs=azure-portal#prerequisites) before associating the netapp file volume to the Azure VMware Solution hosts. VmwareClusterId pulumi.StringPtrInput } func (NetappVolumeAttachmentState) ElementType() reflect.Type { return reflect.TypeOf((*netappVolumeAttachmentState)(nil)).Elem() } type netappVolumeAttachmentArgs struct { // The name which should be used for this Azure VMware Solution Private Cloud Netapp File Volume Attachment. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. Name *string `pulumi:"name"` // The netapp file volume for this Azure VMware Solution Private Cloud Netapp File Volume Attachment to connect to. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. NetappVolumeId string `pulumi:"netappVolumeId"` // The vmware cluster for this Azure VMware Solution Private Cloud Netapp File Volume Attachment to associated to. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. // // > **Note:** please follow the prerequisites mentioned in this [article](https://learn.microsoft.com/en-us/azure/azure-vmware/attach-azure-netapp-files-to-azure-vmware-solution-hosts?tabs=azure-portal#prerequisites) before associating the netapp file volume to the Azure VMware Solution hosts. VmwareClusterId string `pulumi:"vmwareClusterId"` } // The set of arguments for constructing a NetappVolumeAttachment resource. type NetappVolumeAttachmentArgs struct { // The name which should be used for this Azure VMware Solution Private Cloud Netapp File Volume Attachment. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. Name pulumi.StringPtrInput // The netapp file volume for this Azure VMware Solution Private Cloud Netapp File Volume Attachment to connect to. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. NetappVolumeId pulumi.StringInput // The vmware cluster for this Azure VMware Solution Private Cloud Netapp File Volume Attachment to associated to. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. // // > **Note:** please follow the prerequisites mentioned in this [article](https://learn.microsoft.com/en-us/azure/azure-vmware/attach-azure-netapp-files-to-azure-vmware-solution-hosts?tabs=azure-portal#prerequisites) before associating the netapp file volume to the Azure VMware Solution hosts. VmwareClusterId pulumi.StringInput } func (NetappVolumeAttachmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*netappVolumeAttachmentArgs)(nil)).Elem() } type NetappVolumeAttachmentInput interface { pulumi.Input ToNetappVolumeAttachmentOutput() NetappVolumeAttachmentOutput ToNetappVolumeAttachmentOutputWithContext(ctx context.Context) NetappVolumeAttachmentOutput } func (*NetappVolumeAttachment) ElementType() reflect.Type { return reflect.TypeOf((**NetappVolumeAttachment)(nil)).Elem() } func (i *NetappVolumeAttachment) ToNetappVolumeAttachmentOutput() NetappVolumeAttachmentOutput { return i.ToNetappVolumeAttachmentOutputWithContext(context.Background()) } func (i *NetappVolumeAttachment) ToNetappVolumeAttachmentOutputWithContext(ctx context.Context) NetappVolumeAttachmentOutput { return pulumi.ToOutputWithContext(ctx, i).(NetappVolumeAttachmentOutput) } // NetappVolumeAttachmentArrayInput is an input type that accepts NetappVolumeAttachmentArray and NetappVolumeAttachmentArrayOutput values. // You can construct a concrete instance of `NetappVolumeAttachmentArrayInput` via: // // NetappVolumeAttachmentArray{ NetappVolumeAttachmentArgs{...} } type NetappVolumeAttachmentArrayInput interface { pulumi.Input ToNetappVolumeAttachmentArrayOutput() NetappVolumeAttachmentArrayOutput ToNetappVolumeAttachmentArrayOutputWithContext(context.Context) NetappVolumeAttachmentArrayOutput } type NetappVolumeAttachmentArray []NetappVolumeAttachmentInput func (NetappVolumeAttachmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetappVolumeAttachment)(nil)).Elem() } func (i NetappVolumeAttachmentArray) ToNetappVolumeAttachmentArrayOutput() NetappVolumeAttachmentArrayOutput { return i.ToNetappVolumeAttachmentArrayOutputWithContext(context.Background()) } func (i NetappVolumeAttachmentArray) ToNetappVolumeAttachmentArrayOutputWithContext(ctx context.Context) NetappVolumeAttachmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetappVolumeAttachmentArrayOutput) } // NetappVolumeAttachmentMapInput is an input type that accepts NetappVolumeAttachmentMap and NetappVolumeAttachmentMapOutput values. // You can construct a concrete instance of `NetappVolumeAttachmentMapInput` via: // // NetappVolumeAttachmentMap{ "key": NetappVolumeAttachmentArgs{...} } type NetappVolumeAttachmentMapInput interface { pulumi.Input ToNetappVolumeAttachmentMapOutput() NetappVolumeAttachmentMapOutput ToNetappVolumeAttachmentMapOutputWithContext(context.Context) NetappVolumeAttachmentMapOutput } type NetappVolumeAttachmentMap map[string]NetappVolumeAttachmentInput func (NetappVolumeAttachmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetappVolumeAttachment)(nil)).Elem() } func (i NetappVolumeAttachmentMap) ToNetappVolumeAttachmentMapOutput() NetappVolumeAttachmentMapOutput { return i.ToNetappVolumeAttachmentMapOutputWithContext(context.Background()) } func (i NetappVolumeAttachmentMap) ToNetappVolumeAttachmentMapOutputWithContext(ctx context.Context) NetappVolumeAttachmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetappVolumeAttachmentMapOutput) } type NetappVolumeAttachmentOutput struct{ *pulumi.OutputState } func (NetappVolumeAttachmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetappVolumeAttachment)(nil)).Elem() } func (o NetappVolumeAttachmentOutput) ToNetappVolumeAttachmentOutput() NetappVolumeAttachmentOutput { return o } func (o NetappVolumeAttachmentOutput) ToNetappVolumeAttachmentOutputWithContext(ctx context.Context) NetappVolumeAttachmentOutput { return o } // The name which should be used for this Azure VMware Solution Private Cloud Netapp File Volume Attachment. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. func (o NetappVolumeAttachmentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetappVolumeAttachment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The netapp file volume for this Azure VMware Solution Private Cloud Netapp File Volume Attachment to connect to. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. func (o NetappVolumeAttachmentOutput) NetappVolumeId() pulumi.StringOutput { return o.ApplyT(func(v *NetappVolumeAttachment) pulumi.StringOutput { return v.NetappVolumeId }).(pulumi.StringOutput) } // The vmware cluster for this Azure VMware Solution Private Cloud Netapp File Volume Attachment to associated to. Changing this forces a new Azure VMware Solution Private Cloud Netapp File Volume Attachment to be created. // // > **Note:** please follow the prerequisites mentioned in this [article](https://learn.microsoft.com/en-us/azure/azure-vmware/attach-azure-netapp-files-to-azure-vmware-solution-hosts?tabs=azure-portal#prerequisites) before associating the netapp file volume to the Azure VMware Solution hosts. func (o NetappVolumeAttachmentOutput) VmwareClusterId() pulumi.StringOutput { return o.ApplyT(func(v *NetappVolumeAttachment) pulumi.StringOutput { return v.VmwareClusterId }).(pulumi.StringOutput) } type NetappVolumeAttachmentArrayOutput struct{ *pulumi.OutputState } func (NetappVolumeAttachmentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetappVolumeAttachment)(nil)).Elem() } func (o NetappVolumeAttachmentArrayOutput) ToNetappVolumeAttachmentArrayOutput() NetappVolumeAttachmentArrayOutput { return o } func (o NetappVolumeAttachmentArrayOutput) ToNetappVolumeAttachmentArrayOutputWithContext(ctx context.Context) NetappVolumeAttachmentArrayOutput { return o } func (o NetappVolumeAttachmentArrayOutput) Index(i pulumi.IntInput) NetappVolumeAttachmentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetappVolumeAttachment { return vs[0].([]*NetappVolumeAttachment)[vs[1].(int)] }).(NetappVolumeAttachmentOutput) } type NetappVolumeAttachmentMapOutput struct{ *pulumi.OutputState } func (NetappVolumeAttachmentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetappVolumeAttachment)(nil)).Elem() } func (o NetappVolumeAttachmentMapOutput) ToNetappVolumeAttachmentMapOutput() NetappVolumeAttachmentMapOutput { return o } func (o NetappVolumeAttachmentMapOutput) ToNetappVolumeAttachmentMapOutputWithContext(ctx context.Context) NetappVolumeAttachmentMapOutput { return o } func (o NetappVolumeAttachmentMapOutput) MapIndex(k pulumi.StringInput) NetappVolumeAttachmentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetappVolumeAttachment { return vs[0].(map[string]*NetappVolumeAttachment)[vs[1].(string)] }).(NetappVolumeAttachmentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetappVolumeAttachmentInput)(nil)).Elem(), &NetappVolumeAttachment{}) pulumi.RegisterInputType(reflect.TypeOf((*NetappVolumeAttachmentArrayInput)(nil)).Elem(), NetappVolumeAttachmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetappVolumeAttachmentMapInput)(nil)).Elem(), NetappVolumeAttachmentMap{}) pulumi.RegisterOutputType(NetappVolumeAttachmentOutput{}) pulumi.RegisterOutputType(NetappVolumeAttachmentArrayOutput{}) pulumi.RegisterOutputType(NetappVolumeAttachmentMapOutput{}) }
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/avs/privateCloud.go
sdk/go/azure/avs/privateCloud.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 avs 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 VMware Solution Private Cloud. // // ## Example Usage // // > **Note:** Normal `pulumi up` could ignore this note. Please disable correlation request id for continuous operations in one build (like acctest). The continuous operations like `update` or `delete` could not be triggered when it shares the same `correlation-id` with its previous operation. // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/avs" // "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 = avs.NewPrivateCloud(ctx, "example", &avs.PrivateCloudArgs{ // Name: pulumi.String("example-vmware-private-cloud"), // ResourceGroupName: example.Name, // Location: example.Location, // SkuName: pulumi.String("av36"), // ManagementCluster: &avs.PrivateCloudManagementClusterArgs{ // Size: pulumi.Int(3), // }, // NetworkSubnetCidr: pulumi.String("192.168.48.0/22"), // InternetConnectionEnabled: pulumi.Bool(false), // NsxtPassword: pulumi.String("QazWsx13$Edc"), // VcenterPassword: pulumi.String("WsxEdc23$Rfv"), // }) // 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.AVS` - 2022-05-01 // // ## Import // // Azure VMware Solution Private Clouds can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:avs/privateCloud:PrivateCloud example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/privateCloud1 // ``` type PrivateCloud struct { pulumi.CustomResourceState // A `circuit` block as defined below. Circuits PrivateCloudCircuitArrayOutput `pulumi:"circuits"` // The endpoint for the VMware HCX Cloud Manager. HcxCloudManagerEndpoint pulumi.StringOutput `pulumi:"hcxCloudManagerEndpoint"` // Is the Azure VMware Solution Private Cloud connected to the internet? This field can not be updated with `management_cluster[0].size` together. // > **Note:** `internetConnectionEnabled` and `management_cluster[0].size` cannot be updated at the same time. InternetConnectionEnabled pulumi.BoolPtrOutput `pulumi:"internetConnectionEnabled"` // The Azure Region where the Azure VMware Solution Private Cloud should exist. Changing this forces a new Azure VMware Solution Private Cloud to be created. Location pulumi.StringOutput `pulumi:"location"` // A `managementCluster` block as defined below. // > **Note:** `internetConnectionEnabled` and `management_cluster[0].size` cannot be updated at the same time. ManagementCluster PrivateCloudManagementClusterOutput `pulumi:"managementCluster"` // The network used to access VMware vCenter Server and NSX Manager. ManagementSubnetCidr pulumi.StringOutput `pulumi:"managementSubnetCidr"` // The name which should be used for this Azure VMware Solution Private Cloud. Changing this forces a new Azure VMware Solution Private Cloud to be created. Name pulumi.StringOutput `pulumi:"name"` // The subnet which should be unique across virtual network in your subscription as well as on-premise. Changing this forces a new Azure VMware Solution Private Cloud to be created. NetworkSubnetCidr pulumi.StringOutput `pulumi:"networkSubnetCidr"` // The thumbprint of the VMware NSX Manager SSL certificate. NsxtCertificateThumbprint pulumi.StringOutput `pulumi:"nsxtCertificateThumbprint"` // The endpoint for the VMware NSX Manager. NsxtManagerEndpoint pulumi.StringOutput `pulumi:"nsxtManagerEndpoint"` // The password of the VMware NSX Manager cloudadmin. Changing this forces a new Azure VMware Solution Private Cloud to be created. NsxtPassword pulumi.StringPtrOutput `pulumi:"nsxtPassword"` // The network which is used for virtual machine cold migration, cloning, and snapshot migration. ProvisioningSubnetCidr pulumi.StringOutput `pulumi:"provisioningSubnetCidr"` // The name of the Resource Group where the Azure VMware Solution Private Cloud should exist. Changing this forces a new Azure VMware Solution Private Cloud to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The Name of the SKU used for this Azure VMware Solution Private Cloud. Possible values are `av20`, `av36`, `av36t`, `av36p`, `av36pt`, `av48`, `av48t`, `av52`, `av52t`, and `av64`. Changing this forces a new Azure VMware Solution Private Cloud to be created. SkuName pulumi.StringOutput `pulumi:"skuName"` // A mapping of tags which should be assigned to the Azure VMware Solution Private Cloud. Tags pulumi.StringMapOutput `pulumi:"tags"` // The thumbprint of the VMware vCenter Server SSL certificate. VcenterCertificateThumbprint pulumi.StringOutput `pulumi:"vcenterCertificateThumbprint"` // The password of the VMware vCenter Server cloudadmin. Changing this forces a new Azure VMware Solution Private Cloud to be created. VcenterPassword pulumi.StringPtrOutput `pulumi:"vcenterPassword"` // The endpoint for VMware vCenter Server Appliance. VcsaEndpoint pulumi.StringOutput `pulumi:"vcsaEndpoint"` // The network which is used for live migration of virtual machines. VmotionSubnetCidr pulumi.StringOutput `pulumi:"vmotionSubnetCidr"` } // NewPrivateCloud registers a new resource with the given unique name, arguments, and options. func NewPrivateCloud(ctx *pulumi.Context, name string, args *PrivateCloudArgs, opts ...pulumi.ResourceOption) (*PrivateCloud, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ManagementCluster == nil { return nil, errors.New("invalid value for required argument 'ManagementCluster'") } if args.NetworkSubnetCidr == nil { return nil, errors.New("invalid value for required argument 'NetworkSubnetCidr'") } 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.NsxtPassword != nil { args.NsxtPassword = pulumi.ToSecret(args.NsxtPassword).(pulumi.StringPtrInput) } if args.VcenterPassword != nil { args.VcenterPassword = pulumi.ToSecret(args.VcenterPassword).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "nsxtPassword", "vcenterPassword", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource PrivateCloud err := ctx.RegisterResource("azure:avs/privateCloud:PrivateCloud", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPrivateCloud gets an existing PrivateCloud 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 GetPrivateCloud(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PrivateCloudState, opts ...pulumi.ResourceOption) (*PrivateCloud, error) { var resource PrivateCloud err := ctx.ReadResource("azure:avs/privateCloud:PrivateCloud", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering PrivateCloud resources. type privateCloudState struct { // A `circuit` block as defined below. Circuits []PrivateCloudCircuit `pulumi:"circuits"` // The endpoint for the VMware HCX Cloud Manager. HcxCloudManagerEndpoint *string `pulumi:"hcxCloudManagerEndpoint"` // Is the Azure VMware Solution Private Cloud connected to the internet? This field can not be updated with `management_cluster[0].size` together. // > **Note:** `internetConnectionEnabled` and `management_cluster[0].size` cannot be updated at the same time. InternetConnectionEnabled *bool `pulumi:"internetConnectionEnabled"` // The Azure Region where the Azure VMware Solution Private Cloud should exist. Changing this forces a new Azure VMware Solution Private Cloud to be created. Location *string `pulumi:"location"` // A `managementCluster` block as defined below. // > **Note:** `internetConnectionEnabled` and `management_cluster[0].size` cannot be updated at the same time. ManagementCluster *PrivateCloudManagementCluster `pulumi:"managementCluster"` // The network used to access VMware vCenter Server and NSX Manager. ManagementSubnetCidr *string `pulumi:"managementSubnetCidr"` // The name which should be used for this Azure VMware Solution Private Cloud. Changing this forces a new Azure VMware Solution Private Cloud to be created. Name *string `pulumi:"name"` // The subnet which should be unique across virtual network in your subscription as well as on-premise. Changing this forces a new Azure VMware Solution Private Cloud to be created. NetworkSubnetCidr *string `pulumi:"networkSubnetCidr"` // The thumbprint of the VMware NSX Manager SSL certificate. NsxtCertificateThumbprint *string `pulumi:"nsxtCertificateThumbprint"` // The endpoint for the VMware NSX Manager. NsxtManagerEndpoint *string `pulumi:"nsxtManagerEndpoint"` // The password of the VMware NSX Manager cloudadmin. Changing this forces a new Azure VMware Solution Private Cloud to be created. NsxtPassword *string `pulumi:"nsxtPassword"` // The network which is used for virtual machine cold migration, cloning, and snapshot migration. ProvisioningSubnetCidr *string `pulumi:"provisioningSubnetCidr"` // The name of the Resource Group where the Azure VMware Solution Private Cloud should exist. Changing this forces a new Azure VMware Solution Private Cloud to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The Name of the SKU used for this Azure VMware Solution Private Cloud. Possible values are `av20`, `av36`, `av36t`, `av36p`, `av36pt`, `av48`, `av48t`, `av52`, `av52t`, and `av64`. Changing this forces a new Azure VMware Solution Private Cloud to be created. SkuName *string `pulumi:"skuName"` // A mapping of tags which should be assigned to the Azure VMware Solution Private Cloud. Tags map[string]string `pulumi:"tags"` // The thumbprint of the VMware vCenter Server SSL certificate. VcenterCertificateThumbprint *string `pulumi:"vcenterCertificateThumbprint"` // The password of the VMware vCenter Server cloudadmin. Changing this forces a new Azure VMware Solution Private Cloud to be created. VcenterPassword *string `pulumi:"vcenterPassword"` // The endpoint for VMware vCenter Server Appliance. VcsaEndpoint *string `pulumi:"vcsaEndpoint"` // The network which is used for live migration of virtual machines. VmotionSubnetCidr *string `pulumi:"vmotionSubnetCidr"` } type PrivateCloudState struct { // A `circuit` block as defined below. Circuits PrivateCloudCircuitArrayInput // The endpoint for the VMware HCX Cloud Manager. HcxCloudManagerEndpoint pulumi.StringPtrInput // Is the Azure VMware Solution Private Cloud connected to the internet? This field can not be updated with `management_cluster[0].size` together. // > **Note:** `internetConnectionEnabled` and `management_cluster[0].size` cannot be updated at the same time. InternetConnectionEnabled pulumi.BoolPtrInput // The Azure Region where the Azure VMware Solution Private Cloud should exist. Changing this forces a new Azure VMware Solution Private Cloud to be created. Location pulumi.StringPtrInput // A `managementCluster` block as defined below. // > **Note:** `internetConnectionEnabled` and `management_cluster[0].size` cannot be updated at the same time. ManagementCluster PrivateCloudManagementClusterPtrInput // The network used to access VMware vCenter Server and NSX Manager. ManagementSubnetCidr pulumi.StringPtrInput // The name which should be used for this Azure VMware Solution Private Cloud. Changing this forces a new Azure VMware Solution Private Cloud to be created. Name pulumi.StringPtrInput // The subnet which should be unique across virtual network in your subscription as well as on-premise. Changing this forces a new Azure VMware Solution Private Cloud to be created. NetworkSubnetCidr pulumi.StringPtrInput // The thumbprint of the VMware NSX Manager SSL certificate. NsxtCertificateThumbprint pulumi.StringPtrInput // The endpoint for the VMware NSX Manager. NsxtManagerEndpoint pulumi.StringPtrInput // The password of the VMware NSX Manager cloudadmin. Changing this forces a new Azure VMware Solution Private Cloud to be created. NsxtPassword pulumi.StringPtrInput // The network which is used for virtual machine cold migration, cloning, and snapshot migration. ProvisioningSubnetCidr pulumi.StringPtrInput // The name of the Resource Group where the Azure VMware Solution Private Cloud should exist. Changing this forces a new Azure VMware Solution Private Cloud to be created. ResourceGroupName pulumi.StringPtrInput // The Name of the SKU used for this Azure VMware Solution Private Cloud. Possible values are `av20`, `av36`, `av36t`, `av36p`, `av36pt`, `av48`, `av48t`, `av52`, `av52t`, and `av64`. Changing this forces a new Azure VMware Solution Private Cloud to be created. SkuName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Azure VMware Solution Private Cloud. Tags pulumi.StringMapInput // The thumbprint of the VMware vCenter Server SSL certificate. VcenterCertificateThumbprint pulumi.StringPtrInput // The password of the VMware vCenter Server cloudadmin. Changing this forces a new Azure VMware Solution Private Cloud to be created. VcenterPassword pulumi.StringPtrInput // The endpoint for VMware vCenter Server Appliance. VcsaEndpoint pulumi.StringPtrInput // The network which is used for live migration of virtual machines. VmotionSubnetCidr pulumi.StringPtrInput } func (PrivateCloudState) ElementType() reflect.Type { return reflect.TypeOf((*privateCloudState)(nil)).Elem() } type privateCloudArgs struct { // Is the Azure VMware Solution Private Cloud connected to the internet? This field can not be updated with `management_cluster[0].size` together. // > **Note:** `internetConnectionEnabled` and `management_cluster[0].size` cannot be updated at the same time. InternetConnectionEnabled *bool `pulumi:"internetConnectionEnabled"` // The Azure Region where the Azure VMware Solution Private Cloud should exist. Changing this forces a new Azure VMware Solution Private Cloud to be created. Location *string `pulumi:"location"` // A `managementCluster` block as defined below. // > **Note:** `internetConnectionEnabled` and `management_cluster[0].size` cannot be updated at the same time. ManagementCluster PrivateCloudManagementCluster `pulumi:"managementCluster"` // The name which should be used for this Azure VMware Solution Private Cloud. Changing this forces a new Azure VMware Solution Private Cloud to be created. Name *string `pulumi:"name"` // The subnet which should be unique across virtual network in your subscription as well as on-premise. Changing this forces a new Azure VMware Solution Private Cloud to be created. NetworkSubnetCidr string `pulumi:"networkSubnetCidr"` // The password of the VMware NSX Manager cloudadmin. Changing this forces a new Azure VMware Solution Private Cloud to be created. NsxtPassword *string `pulumi:"nsxtPassword"` // The name of the Resource Group where the Azure VMware Solution Private Cloud should exist. Changing this forces a new Azure VMware Solution Private Cloud to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The Name of the SKU used for this Azure VMware Solution Private Cloud. Possible values are `av20`, `av36`, `av36t`, `av36p`, `av36pt`, `av48`, `av48t`, `av52`, `av52t`, and `av64`. Changing this forces a new Azure VMware Solution Private Cloud to be created. SkuName string `pulumi:"skuName"` // A mapping of tags which should be assigned to the Azure VMware Solution Private Cloud. Tags map[string]string `pulumi:"tags"` // The password of the VMware vCenter Server cloudadmin. Changing this forces a new Azure VMware Solution Private Cloud to be created. VcenterPassword *string `pulumi:"vcenterPassword"` } // The set of arguments for constructing a PrivateCloud resource. type PrivateCloudArgs struct { // Is the Azure VMware Solution Private Cloud connected to the internet? This field can not be updated with `management_cluster[0].size` together. // > **Note:** `internetConnectionEnabled` and `management_cluster[0].size` cannot be updated at the same time. InternetConnectionEnabled pulumi.BoolPtrInput // The Azure Region where the Azure VMware Solution Private Cloud should exist. Changing this forces a new Azure VMware Solution Private Cloud to be created. Location pulumi.StringPtrInput // A `managementCluster` block as defined below. // > **Note:** `internetConnectionEnabled` and `management_cluster[0].size` cannot be updated at the same time. ManagementCluster PrivateCloudManagementClusterInput // The name which should be used for this Azure VMware Solution Private Cloud. Changing this forces a new Azure VMware Solution Private Cloud to be created. Name pulumi.StringPtrInput // The subnet which should be unique across virtual network in your subscription as well as on-premise. Changing this forces a new Azure VMware Solution Private Cloud to be created. NetworkSubnetCidr pulumi.StringInput // The password of the VMware NSX Manager cloudadmin. Changing this forces a new Azure VMware Solution Private Cloud to be created. NsxtPassword pulumi.StringPtrInput // The name of the Resource Group where the Azure VMware Solution Private Cloud should exist. Changing this forces a new Azure VMware Solution Private Cloud to be created. ResourceGroupName pulumi.StringInput // The Name of the SKU used for this Azure VMware Solution Private Cloud. Possible values are `av20`, `av36`, `av36t`, `av36p`, `av36pt`, `av48`, `av48t`, `av52`, `av52t`, and `av64`. Changing this forces a new Azure VMware Solution Private Cloud to be created. SkuName pulumi.StringInput // A mapping of tags which should be assigned to the Azure VMware Solution Private Cloud. Tags pulumi.StringMapInput // The password of the VMware vCenter Server cloudadmin. Changing this forces a new Azure VMware Solution Private Cloud to be created. VcenterPassword pulumi.StringPtrInput } func (PrivateCloudArgs) ElementType() reflect.Type { return reflect.TypeOf((*privateCloudArgs)(nil)).Elem() } type PrivateCloudInput interface { pulumi.Input ToPrivateCloudOutput() PrivateCloudOutput ToPrivateCloudOutputWithContext(ctx context.Context) PrivateCloudOutput } func (*PrivateCloud) ElementType() reflect.Type { return reflect.TypeOf((**PrivateCloud)(nil)).Elem() } func (i *PrivateCloud) ToPrivateCloudOutput() PrivateCloudOutput { return i.ToPrivateCloudOutputWithContext(context.Background()) } func (i *PrivateCloud) ToPrivateCloudOutputWithContext(ctx context.Context) PrivateCloudOutput { return pulumi.ToOutputWithContext(ctx, i).(PrivateCloudOutput) } // PrivateCloudArrayInput is an input type that accepts PrivateCloudArray and PrivateCloudArrayOutput values. // You can construct a concrete instance of `PrivateCloudArrayInput` via: // // PrivateCloudArray{ PrivateCloudArgs{...} } type PrivateCloudArrayInput interface { pulumi.Input ToPrivateCloudArrayOutput() PrivateCloudArrayOutput ToPrivateCloudArrayOutputWithContext(context.Context) PrivateCloudArrayOutput } type PrivateCloudArray []PrivateCloudInput func (PrivateCloudArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*PrivateCloud)(nil)).Elem() } func (i PrivateCloudArray) ToPrivateCloudArrayOutput() PrivateCloudArrayOutput { return i.ToPrivateCloudArrayOutputWithContext(context.Background()) } func (i PrivateCloudArray) ToPrivateCloudArrayOutputWithContext(ctx context.Context) PrivateCloudArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PrivateCloudArrayOutput) } // PrivateCloudMapInput is an input type that accepts PrivateCloudMap and PrivateCloudMapOutput values. // You can construct a concrete instance of `PrivateCloudMapInput` via: // // PrivateCloudMap{ "key": PrivateCloudArgs{...} } type PrivateCloudMapInput interface { pulumi.Input ToPrivateCloudMapOutput() PrivateCloudMapOutput ToPrivateCloudMapOutputWithContext(context.Context) PrivateCloudMapOutput } type PrivateCloudMap map[string]PrivateCloudInput func (PrivateCloudMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PrivateCloud)(nil)).Elem() } func (i PrivateCloudMap) ToPrivateCloudMapOutput() PrivateCloudMapOutput { return i.ToPrivateCloudMapOutputWithContext(context.Background()) } func (i PrivateCloudMap) ToPrivateCloudMapOutputWithContext(ctx context.Context) PrivateCloudMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PrivateCloudMapOutput) } type PrivateCloudOutput struct{ *pulumi.OutputState } func (PrivateCloudOutput) ElementType() reflect.Type { return reflect.TypeOf((**PrivateCloud)(nil)).Elem() } func (o PrivateCloudOutput) ToPrivateCloudOutput() PrivateCloudOutput { return o } func (o PrivateCloudOutput) ToPrivateCloudOutputWithContext(ctx context.Context) PrivateCloudOutput { return o } // A `circuit` block as defined below. func (o PrivateCloudOutput) Circuits() PrivateCloudCircuitArrayOutput { return o.ApplyT(func(v *PrivateCloud) PrivateCloudCircuitArrayOutput { return v.Circuits }).(PrivateCloudCircuitArrayOutput) } // The endpoint for the VMware HCX Cloud Manager. func (o PrivateCloudOutput) HcxCloudManagerEndpoint() pulumi.StringOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringOutput { return v.HcxCloudManagerEndpoint }).(pulumi.StringOutput) } // Is the Azure VMware Solution Private Cloud connected to the internet? This field can not be updated with `management_cluster[0].size` together. // > **Note:** `internetConnectionEnabled` and `management_cluster[0].size` cannot be updated at the same time. func (o PrivateCloudOutput) InternetConnectionEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.BoolPtrOutput { return v.InternetConnectionEnabled }).(pulumi.BoolPtrOutput) } // The Azure Region where the Azure VMware Solution Private Cloud should exist. Changing this forces a new Azure VMware Solution Private Cloud to be created. func (o PrivateCloudOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // A `managementCluster` block as defined below. // > **Note:** `internetConnectionEnabled` and `management_cluster[0].size` cannot be updated at the same time. func (o PrivateCloudOutput) ManagementCluster() PrivateCloudManagementClusterOutput { return o.ApplyT(func(v *PrivateCloud) PrivateCloudManagementClusterOutput { return v.ManagementCluster }).(PrivateCloudManagementClusterOutput) } // The network used to access VMware vCenter Server and NSX Manager. func (o PrivateCloudOutput) ManagementSubnetCidr() pulumi.StringOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringOutput { return v.ManagementSubnetCidr }).(pulumi.StringOutput) } // The name which should be used for this Azure VMware Solution Private Cloud. Changing this forces a new Azure VMware Solution Private Cloud to be created. func (o PrivateCloudOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The subnet which should be unique across virtual network in your subscription as well as on-premise. Changing this forces a new Azure VMware Solution Private Cloud to be created. func (o PrivateCloudOutput) NetworkSubnetCidr() pulumi.StringOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringOutput { return v.NetworkSubnetCidr }).(pulumi.StringOutput) } // The thumbprint of the VMware NSX Manager SSL certificate. func (o PrivateCloudOutput) NsxtCertificateThumbprint() pulumi.StringOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringOutput { return v.NsxtCertificateThumbprint }).(pulumi.StringOutput) } // The endpoint for the VMware NSX Manager. func (o PrivateCloudOutput) NsxtManagerEndpoint() pulumi.StringOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringOutput { return v.NsxtManagerEndpoint }).(pulumi.StringOutput) } // The password of the VMware NSX Manager cloudadmin. Changing this forces a new Azure VMware Solution Private Cloud to be created. func (o PrivateCloudOutput) NsxtPassword() pulumi.StringPtrOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringPtrOutput { return v.NsxtPassword }).(pulumi.StringPtrOutput) } // The network which is used for virtual machine cold migration, cloning, and snapshot migration. func (o PrivateCloudOutput) ProvisioningSubnetCidr() pulumi.StringOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringOutput { return v.ProvisioningSubnetCidr }).(pulumi.StringOutput) } // The name of the Resource Group where the Azure VMware Solution Private Cloud should exist. Changing this forces a new Azure VMware Solution Private Cloud to be created. func (o PrivateCloudOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The Name of the SKU used for this Azure VMware Solution Private Cloud. Possible values are `av20`, `av36`, `av36t`, `av36p`, `av36pt`, `av48`, `av48t`, `av52`, `av52t`, and `av64`. Changing this forces a new Azure VMware Solution Private Cloud to be created. func (o PrivateCloudOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Azure VMware Solution Private Cloud. func (o PrivateCloudOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The thumbprint of the VMware vCenter Server SSL certificate. func (o PrivateCloudOutput) VcenterCertificateThumbprint() pulumi.StringOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringOutput { return v.VcenterCertificateThumbprint }).(pulumi.StringOutput) } // The password of the VMware vCenter Server cloudadmin. Changing this forces a new Azure VMware Solution Private Cloud to be created. func (o PrivateCloudOutput) VcenterPassword() pulumi.StringPtrOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringPtrOutput { return v.VcenterPassword }).(pulumi.StringPtrOutput) } // The endpoint for VMware vCenter Server Appliance. func (o PrivateCloudOutput) VcsaEndpoint() pulumi.StringOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringOutput { return v.VcsaEndpoint }).(pulumi.StringOutput) } // The network which is used for live migration of virtual machines. func (o PrivateCloudOutput) VmotionSubnetCidr() pulumi.StringOutput { return o.ApplyT(func(v *PrivateCloud) pulumi.StringOutput { return v.VmotionSubnetCidr }).(pulumi.StringOutput) } type PrivateCloudArrayOutput struct{ *pulumi.OutputState } func (PrivateCloudArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*PrivateCloud)(nil)).Elem() } func (o PrivateCloudArrayOutput) ToPrivateCloudArrayOutput() PrivateCloudArrayOutput { return o } func (o PrivateCloudArrayOutput) ToPrivateCloudArrayOutputWithContext(ctx context.Context) PrivateCloudArrayOutput { return o } func (o PrivateCloudArrayOutput) Index(i pulumi.IntInput) PrivateCloudOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PrivateCloud { return vs[0].([]*PrivateCloud)[vs[1].(int)] }).(PrivateCloudOutput) } type PrivateCloudMapOutput struct{ *pulumi.OutputState } func (PrivateCloudMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PrivateCloud)(nil)).Elem() } func (o PrivateCloudMapOutput) ToPrivateCloudMapOutput() PrivateCloudMapOutput { return o } func (o PrivateCloudMapOutput) ToPrivateCloudMapOutputWithContext(ctx context.Context) PrivateCloudMapOutput { return o } func (o PrivateCloudMapOutput) MapIndex(k pulumi.StringInput) PrivateCloudOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PrivateCloud { return vs[0].(map[string]*PrivateCloud)[vs[1].(string)] }).(PrivateCloudOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PrivateCloudInput)(nil)).Elem(), &PrivateCloud{}) pulumi.RegisterInputType(reflect.TypeOf((*PrivateCloudArrayInput)(nil)).Elem(), PrivateCloudArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PrivateCloudMapInput)(nil)).Elem(), PrivateCloudMap{}) pulumi.RegisterOutputType(PrivateCloudOutput{}) pulumi.RegisterOutputType(PrivateCloudArrayOutput{}) pulumi.RegisterOutputType(PrivateCloudMapOutput{}) }
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/avs/expressRouteAuthorization.go
sdk/go/azure/avs/expressRouteAuthorization.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 avs 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 VMware Solution ExpressRoute Circuit Authorization. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/avs" // "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 // } // examplePrivateCloud, err := avs.NewPrivateCloud(ctx, "example", &avs.PrivateCloudArgs{ // Name: pulumi.String("example-vmware-private-cloud"), // ResourceGroupName: example.Name, // Location: example.Location, // SkuName: pulumi.String("av36"), // ManagementCluster: &avs.PrivateCloudManagementClusterArgs{ // Size: pulumi.Int(3), // }, // NetworkSubnetCidr: pulumi.String("192.168.48.0/22"), // InternetConnectionEnabled: pulumi.Bool(false), // NsxtPassword: pulumi.String("QazWsx13$Edc"), // VcenterPassword: pulumi.String("WsxEdc23$Rfv"), // }) // if err != nil { // return err // } // _, err = avs.NewExpressRouteAuthorization(ctx, "example", &avs.ExpressRouteAuthorizationArgs{ // Name: pulumi.String("example-authorization"), // PrivateCloudId: examplePrivateCloud.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.AVS` - 2022-05-01 // // ## Import // // Azure VMware Solution ExpressRoute Circuit Authorizations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:avs/expressRouteAuthorization:ExpressRouteAuthorization example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.AVS/privateClouds/privateCloud1/authorizations/authorization1 // ``` type ExpressRouteAuthorization struct { pulumi.CustomResourceState // The ID of the Azure VMware Solution ExpressRoute Circuit Authorization. ExpressRouteAuthorizationId pulumi.StringOutput `pulumi:"expressRouteAuthorizationId"` // The key of the Azure VMware Solution ExpressRoute Circuit Authorization. ExpressRouteAuthorizationKey pulumi.StringOutput `pulumi:"expressRouteAuthorizationKey"` // The name which should be used for this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Azure VMware Solution Private Cloud in which to create this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created. PrivateCloudId pulumi.StringOutput `pulumi:"privateCloudId"` } // NewExpressRouteAuthorization registers a new resource with the given unique name, arguments, and options. func NewExpressRouteAuthorization(ctx *pulumi.Context, name string, args *ExpressRouteAuthorizationArgs, opts ...pulumi.ResourceOption) (*ExpressRouteAuthorization, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PrivateCloudId == nil { return nil, errors.New("invalid value for required argument 'PrivateCloudId'") } secrets := pulumi.AdditionalSecretOutputs([]string{ "expressRouteAuthorizationKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource ExpressRouteAuthorization err := ctx.RegisterResource("azure:avs/expressRouteAuthorization:ExpressRouteAuthorization", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetExpressRouteAuthorization gets an existing ExpressRouteAuthorization 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 GetExpressRouteAuthorization(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ExpressRouteAuthorizationState, opts ...pulumi.ResourceOption) (*ExpressRouteAuthorization, error) { var resource ExpressRouteAuthorization err := ctx.ReadResource("azure:avs/expressRouteAuthorization:ExpressRouteAuthorization", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ExpressRouteAuthorization resources. type expressRouteAuthorizationState struct { // The ID of the Azure VMware Solution ExpressRoute Circuit Authorization. ExpressRouteAuthorizationId *string `pulumi:"expressRouteAuthorizationId"` // The key of the Azure VMware Solution ExpressRoute Circuit Authorization. ExpressRouteAuthorizationKey *string `pulumi:"expressRouteAuthorizationKey"` // The name which should be used for this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created. Name *string `pulumi:"name"` // The ID of the Azure VMware Solution Private Cloud in which to create this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created. PrivateCloudId *string `pulumi:"privateCloudId"` } type ExpressRouteAuthorizationState struct { // The ID of the Azure VMware Solution ExpressRoute Circuit Authorization. ExpressRouteAuthorizationId pulumi.StringPtrInput // The key of the Azure VMware Solution ExpressRoute Circuit Authorization. ExpressRouteAuthorizationKey pulumi.StringPtrInput // The name which should be used for this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created. Name pulumi.StringPtrInput // The ID of the Azure VMware Solution Private Cloud in which to create this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created. PrivateCloudId pulumi.StringPtrInput } func (ExpressRouteAuthorizationState) ElementType() reflect.Type { return reflect.TypeOf((*expressRouteAuthorizationState)(nil)).Elem() } type expressRouteAuthorizationArgs struct { // The name which should be used for this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created. Name *string `pulumi:"name"` // The ID of the Azure VMware Solution Private Cloud in which to create this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created. PrivateCloudId string `pulumi:"privateCloudId"` } // The set of arguments for constructing a ExpressRouteAuthorization resource. type ExpressRouteAuthorizationArgs struct { // The name which should be used for this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created. Name pulumi.StringPtrInput // The ID of the Azure VMware Solution Private Cloud in which to create this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created. PrivateCloudId pulumi.StringInput } func (ExpressRouteAuthorizationArgs) ElementType() reflect.Type { return reflect.TypeOf((*expressRouteAuthorizationArgs)(nil)).Elem() } type ExpressRouteAuthorizationInput interface { pulumi.Input ToExpressRouteAuthorizationOutput() ExpressRouteAuthorizationOutput ToExpressRouteAuthorizationOutputWithContext(ctx context.Context) ExpressRouteAuthorizationOutput } func (*ExpressRouteAuthorization) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRouteAuthorization)(nil)).Elem() } func (i *ExpressRouteAuthorization) ToExpressRouteAuthorizationOutput() ExpressRouteAuthorizationOutput { return i.ToExpressRouteAuthorizationOutputWithContext(context.Background()) } func (i *ExpressRouteAuthorization) ToExpressRouteAuthorizationOutputWithContext(ctx context.Context) ExpressRouteAuthorizationOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteAuthorizationOutput) } // ExpressRouteAuthorizationArrayInput is an input type that accepts ExpressRouteAuthorizationArray and ExpressRouteAuthorizationArrayOutput values. // You can construct a concrete instance of `ExpressRouteAuthorizationArrayInput` via: // // ExpressRouteAuthorizationArray{ ExpressRouteAuthorizationArgs{...} } type ExpressRouteAuthorizationArrayInput interface { pulumi.Input ToExpressRouteAuthorizationArrayOutput() ExpressRouteAuthorizationArrayOutput ToExpressRouteAuthorizationArrayOutputWithContext(context.Context) ExpressRouteAuthorizationArrayOutput } type ExpressRouteAuthorizationArray []ExpressRouteAuthorizationInput func (ExpressRouteAuthorizationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRouteAuthorization)(nil)).Elem() } func (i ExpressRouteAuthorizationArray) ToExpressRouteAuthorizationArrayOutput() ExpressRouteAuthorizationArrayOutput { return i.ToExpressRouteAuthorizationArrayOutputWithContext(context.Background()) } func (i ExpressRouteAuthorizationArray) ToExpressRouteAuthorizationArrayOutputWithContext(ctx context.Context) ExpressRouteAuthorizationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteAuthorizationArrayOutput) } // ExpressRouteAuthorizationMapInput is an input type that accepts ExpressRouteAuthorizationMap and ExpressRouteAuthorizationMapOutput values. // You can construct a concrete instance of `ExpressRouteAuthorizationMapInput` via: // // ExpressRouteAuthorizationMap{ "key": ExpressRouteAuthorizationArgs{...} } type ExpressRouteAuthorizationMapInput interface { pulumi.Input ToExpressRouteAuthorizationMapOutput() ExpressRouteAuthorizationMapOutput ToExpressRouteAuthorizationMapOutputWithContext(context.Context) ExpressRouteAuthorizationMapOutput } type ExpressRouteAuthorizationMap map[string]ExpressRouteAuthorizationInput func (ExpressRouteAuthorizationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRouteAuthorization)(nil)).Elem() } func (i ExpressRouteAuthorizationMap) ToExpressRouteAuthorizationMapOutput() ExpressRouteAuthorizationMapOutput { return i.ToExpressRouteAuthorizationMapOutputWithContext(context.Background()) } func (i ExpressRouteAuthorizationMap) ToExpressRouteAuthorizationMapOutputWithContext(ctx context.Context) ExpressRouteAuthorizationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteAuthorizationMapOutput) } type ExpressRouteAuthorizationOutput struct{ *pulumi.OutputState } func (ExpressRouteAuthorizationOutput) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRouteAuthorization)(nil)).Elem() } func (o ExpressRouteAuthorizationOutput) ToExpressRouteAuthorizationOutput() ExpressRouteAuthorizationOutput { return o } func (o ExpressRouteAuthorizationOutput) ToExpressRouteAuthorizationOutputWithContext(ctx context.Context) ExpressRouteAuthorizationOutput { return o } // The ID of the Azure VMware Solution ExpressRoute Circuit Authorization. func (o ExpressRouteAuthorizationOutput) ExpressRouteAuthorizationId() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteAuthorization) pulumi.StringOutput { return v.ExpressRouteAuthorizationId }).(pulumi.StringOutput) } // The key of the Azure VMware Solution ExpressRoute Circuit Authorization. func (o ExpressRouteAuthorizationOutput) ExpressRouteAuthorizationKey() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteAuthorization) pulumi.StringOutput { return v.ExpressRouteAuthorizationKey }).(pulumi.StringOutput) } // The name which should be used for this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created. func (o ExpressRouteAuthorizationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteAuthorization) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Azure VMware Solution Private Cloud in which to create this Azure VMware Solution ExpressRoute Circuit Authorization. Changing this forces a new Azure VMware Solution ExpressRoute Circuit Authorization to be created. func (o ExpressRouteAuthorizationOutput) PrivateCloudId() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteAuthorization) pulumi.StringOutput { return v.PrivateCloudId }).(pulumi.StringOutput) } type ExpressRouteAuthorizationArrayOutput struct{ *pulumi.OutputState } func (ExpressRouteAuthorizationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRouteAuthorization)(nil)).Elem() } func (o ExpressRouteAuthorizationArrayOutput) ToExpressRouteAuthorizationArrayOutput() ExpressRouteAuthorizationArrayOutput { return o } func (o ExpressRouteAuthorizationArrayOutput) ToExpressRouteAuthorizationArrayOutputWithContext(ctx context.Context) ExpressRouteAuthorizationArrayOutput { return o } func (o ExpressRouteAuthorizationArrayOutput) Index(i pulumi.IntInput) ExpressRouteAuthorizationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ExpressRouteAuthorization { return vs[0].([]*ExpressRouteAuthorization)[vs[1].(int)] }).(ExpressRouteAuthorizationOutput) } type ExpressRouteAuthorizationMapOutput struct{ *pulumi.OutputState } func (ExpressRouteAuthorizationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRouteAuthorization)(nil)).Elem() } func (o ExpressRouteAuthorizationMapOutput) ToExpressRouteAuthorizationMapOutput() ExpressRouteAuthorizationMapOutput { return o } func (o ExpressRouteAuthorizationMapOutput) ToExpressRouteAuthorizationMapOutputWithContext(ctx context.Context) ExpressRouteAuthorizationMapOutput { return o } func (o ExpressRouteAuthorizationMapOutput) MapIndex(k pulumi.StringInput) ExpressRouteAuthorizationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ExpressRouteAuthorization { return vs[0].(map[string]*ExpressRouteAuthorization)[vs[1].(string)] }).(ExpressRouteAuthorizationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteAuthorizationInput)(nil)).Elem(), &ExpressRouteAuthorization{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteAuthorizationArrayInput)(nil)).Elem(), ExpressRouteAuthorizationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteAuthorizationMapInput)(nil)).Elem(), ExpressRouteAuthorizationMap{}) pulumi.RegisterOutputType(ExpressRouteAuthorizationOutput{}) pulumi.RegisterOutputType(ExpressRouteAuthorizationArrayOutput{}) pulumi.RegisterOutputType(ExpressRouteAuthorizationMapOutput{}) }
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/lighthouse/init.go
sdk/go/azure/lighthouse/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 lighthouse 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:lighthouse/assignment:Assignment": r = &Assignment{} case "azure:lighthouse/definition:Definition": r = &Definition{} 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", "lighthouse/assignment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "lighthouse/definition", &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/lighthouse/pulumiTypes.go
sdk/go/azure/lighthouse/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 lighthouse 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 DefinitionAuthorization struct { // The set of role definition ids which define all the permissions that the principal id can assign. DelegatedRoleDefinitionIds []string `pulumi:"delegatedRoleDefinitionIds"` // The display name of the security group/service principal/user that would be assigned permissions to the projected subscription. PrincipalDisplayName *string `pulumi:"principalDisplayName"` // Principal ID of the security group/service principal/user that would be assigned permissions to the projected subscription. PrincipalId string `pulumi:"principalId"` // The role definition identifier. This role will define the permissions that are granted to the principal. This cannot be an `Owner` role. RoleDefinitionId string `pulumi:"roleDefinitionId"` } // DefinitionAuthorizationInput is an input type that accepts DefinitionAuthorizationArgs and DefinitionAuthorizationOutput values. // You can construct a concrete instance of `DefinitionAuthorizationInput` via: // // DefinitionAuthorizationArgs{...} type DefinitionAuthorizationInput interface { pulumi.Input ToDefinitionAuthorizationOutput() DefinitionAuthorizationOutput ToDefinitionAuthorizationOutputWithContext(context.Context) DefinitionAuthorizationOutput } type DefinitionAuthorizationArgs struct { // The set of role definition ids which define all the permissions that the principal id can assign. DelegatedRoleDefinitionIds pulumi.StringArrayInput `pulumi:"delegatedRoleDefinitionIds"` // The display name of the security group/service principal/user that would be assigned permissions to the projected subscription. PrincipalDisplayName pulumi.StringPtrInput `pulumi:"principalDisplayName"` // Principal ID of the security group/service principal/user that would be assigned permissions to the projected subscription. PrincipalId pulumi.StringInput `pulumi:"principalId"` // The role definition identifier. This role will define the permissions that are granted to the principal. This cannot be an `Owner` role. RoleDefinitionId pulumi.StringInput `pulumi:"roleDefinitionId"` } func (DefinitionAuthorizationArgs) ElementType() reflect.Type { return reflect.TypeOf((*DefinitionAuthorization)(nil)).Elem() } func (i DefinitionAuthorizationArgs) ToDefinitionAuthorizationOutput() DefinitionAuthorizationOutput { return i.ToDefinitionAuthorizationOutputWithContext(context.Background()) } func (i DefinitionAuthorizationArgs) ToDefinitionAuthorizationOutputWithContext(ctx context.Context) DefinitionAuthorizationOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionAuthorizationOutput) } // DefinitionAuthorizationArrayInput is an input type that accepts DefinitionAuthorizationArray and DefinitionAuthorizationArrayOutput values. // You can construct a concrete instance of `DefinitionAuthorizationArrayInput` via: // // DefinitionAuthorizationArray{ DefinitionAuthorizationArgs{...} } type DefinitionAuthorizationArrayInput interface { pulumi.Input ToDefinitionAuthorizationArrayOutput() DefinitionAuthorizationArrayOutput ToDefinitionAuthorizationArrayOutputWithContext(context.Context) DefinitionAuthorizationArrayOutput } type DefinitionAuthorizationArray []DefinitionAuthorizationInput func (DefinitionAuthorizationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]DefinitionAuthorization)(nil)).Elem() } func (i DefinitionAuthorizationArray) ToDefinitionAuthorizationArrayOutput() DefinitionAuthorizationArrayOutput { return i.ToDefinitionAuthorizationArrayOutputWithContext(context.Background()) } func (i DefinitionAuthorizationArray) ToDefinitionAuthorizationArrayOutputWithContext(ctx context.Context) DefinitionAuthorizationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionAuthorizationArrayOutput) } type DefinitionAuthorizationOutput struct{ *pulumi.OutputState } func (DefinitionAuthorizationOutput) ElementType() reflect.Type { return reflect.TypeOf((*DefinitionAuthorization)(nil)).Elem() } func (o DefinitionAuthorizationOutput) ToDefinitionAuthorizationOutput() DefinitionAuthorizationOutput { return o } func (o DefinitionAuthorizationOutput) ToDefinitionAuthorizationOutputWithContext(ctx context.Context) DefinitionAuthorizationOutput { return o } // The set of role definition ids which define all the permissions that the principal id can assign. func (o DefinitionAuthorizationOutput) DelegatedRoleDefinitionIds() pulumi.StringArrayOutput { return o.ApplyT(func(v DefinitionAuthorization) []string { return v.DelegatedRoleDefinitionIds }).(pulumi.StringArrayOutput) } // The display name of the security group/service principal/user that would be assigned permissions to the projected subscription. func (o DefinitionAuthorizationOutput) PrincipalDisplayName() pulumi.StringPtrOutput { return o.ApplyT(func(v DefinitionAuthorization) *string { return v.PrincipalDisplayName }).(pulumi.StringPtrOutput) } // Principal ID of the security group/service principal/user that would be assigned permissions to the projected subscription. func (o DefinitionAuthorizationOutput) PrincipalId() pulumi.StringOutput { return o.ApplyT(func(v DefinitionAuthorization) string { return v.PrincipalId }).(pulumi.StringOutput) } // The role definition identifier. This role will define the permissions that are granted to the principal. This cannot be an `Owner` role. func (o DefinitionAuthorizationOutput) RoleDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v DefinitionAuthorization) string { return v.RoleDefinitionId }).(pulumi.StringOutput) } type DefinitionAuthorizationArrayOutput struct{ *pulumi.OutputState } func (DefinitionAuthorizationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]DefinitionAuthorization)(nil)).Elem() } func (o DefinitionAuthorizationArrayOutput) ToDefinitionAuthorizationArrayOutput() DefinitionAuthorizationArrayOutput { return o } func (o DefinitionAuthorizationArrayOutput) ToDefinitionAuthorizationArrayOutputWithContext(ctx context.Context) DefinitionAuthorizationArrayOutput { return o } func (o DefinitionAuthorizationArrayOutput) Index(i pulumi.IntInput) DefinitionAuthorizationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) DefinitionAuthorization { return vs[0].([]DefinitionAuthorization)[vs[1].(int)] }).(DefinitionAuthorizationOutput) } type DefinitionEligibleAuthorization struct { // A `justInTimeAccessPolicy` block as defined below. JustInTimeAccessPolicy *DefinitionEligibleAuthorizationJustInTimeAccessPolicy `pulumi:"justInTimeAccessPolicy"` // The display name of the Azure Active Directory Principal. PrincipalDisplayName *string `pulumi:"principalDisplayName"` // Principal ID of the security group/service principal/user that would be assigned permissions to the projected subscription. PrincipalId string `pulumi:"principalId"` // The Principal ID of the Azure built-in role that defines the permissions that the Azure Active Directory will have on the projected scope. RoleDefinitionId string `pulumi:"roleDefinitionId"` } // DefinitionEligibleAuthorizationInput is an input type that accepts DefinitionEligibleAuthorizationArgs and DefinitionEligibleAuthorizationOutput values. // You can construct a concrete instance of `DefinitionEligibleAuthorizationInput` via: // // DefinitionEligibleAuthorizationArgs{...} type DefinitionEligibleAuthorizationInput interface { pulumi.Input ToDefinitionEligibleAuthorizationOutput() DefinitionEligibleAuthorizationOutput ToDefinitionEligibleAuthorizationOutputWithContext(context.Context) DefinitionEligibleAuthorizationOutput } type DefinitionEligibleAuthorizationArgs struct { // A `justInTimeAccessPolicy` block as defined below. JustInTimeAccessPolicy DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrInput `pulumi:"justInTimeAccessPolicy"` // The display name of the Azure Active Directory Principal. PrincipalDisplayName pulumi.StringPtrInput `pulumi:"principalDisplayName"` // Principal ID of the security group/service principal/user that would be assigned permissions to the projected subscription. PrincipalId pulumi.StringInput `pulumi:"principalId"` // The Principal ID of the Azure built-in role that defines the permissions that the Azure Active Directory will have on the projected scope. RoleDefinitionId pulumi.StringInput `pulumi:"roleDefinitionId"` } func (DefinitionEligibleAuthorizationArgs) ElementType() reflect.Type { return reflect.TypeOf((*DefinitionEligibleAuthorization)(nil)).Elem() } func (i DefinitionEligibleAuthorizationArgs) ToDefinitionEligibleAuthorizationOutput() DefinitionEligibleAuthorizationOutput { return i.ToDefinitionEligibleAuthorizationOutputWithContext(context.Background()) } func (i DefinitionEligibleAuthorizationArgs) ToDefinitionEligibleAuthorizationOutputWithContext(ctx context.Context) DefinitionEligibleAuthorizationOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionEligibleAuthorizationOutput) } // DefinitionEligibleAuthorizationArrayInput is an input type that accepts DefinitionEligibleAuthorizationArray and DefinitionEligibleAuthorizationArrayOutput values. // You can construct a concrete instance of `DefinitionEligibleAuthorizationArrayInput` via: // // DefinitionEligibleAuthorizationArray{ DefinitionEligibleAuthorizationArgs{...} } type DefinitionEligibleAuthorizationArrayInput interface { pulumi.Input ToDefinitionEligibleAuthorizationArrayOutput() DefinitionEligibleAuthorizationArrayOutput ToDefinitionEligibleAuthorizationArrayOutputWithContext(context.Context) DefinitionEligibleAuthorizationArrayOutput } type DefinitionEligibleAuthorizationArray []DefinitionEligibleAuthorizationInput func (DefinitionEligibleAuthorizationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]DefinitionEligibleAuthorization)(nil)).Elem() } func (i DefinitionEligibleAuthorizationArray) ToDefinitionEligibleAuthorizationArrayOutput() DefinitionEligibleAuthorizationArrayOutput { return i.ToDefinitionEligibleAuthorizationArrayOutputWithContext(context.Background()) } func (i DefinitionEligibleAuthorizationArray) ToDefinitionEligibleAuthorizationArrayOutputWithContext(ctx context.Context) DefinitionEligibleAuthorizationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionEligibleAuthorizationArrayOutput) } type DefinitionEligibleAuthorizationOutput struct{ *pulumi.OutputState } func (DefinitionEligibleAuthorizationOutput) ElementType() reflect.Type { return reflect.TypeOf((*DefinitionEligibleAuthorization)(nil)).Elem() } func (o DefinitionEligibleAuthorizationOutput) ToDefinitionEligibleAuthorizationOutput() DefinitionEligibleAuthorizationOutput { return o } func (o DefinitionEligibleAuthorizationOutput) ToDefinitionEligibleAuthorizationOutputWithContext(ctx context.Context) DefinitionEligibleAuthorizationOutput { return o } // A `justInTimeAccessPolicy` block as defined below. func (o DefinitionEligibleAuthorizationOutput) JustInTimeAccessPolicy() DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput { return o.ApplyT(func(v DefinitionEligibleAuthorization) *DefinitionEligibleAuthorizationJustInTimeAccessPolicy { return v.JustInTimeAccessPolicy }).(DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput) } // The display name of the Azure Active Directory Principal. func (o DefinitionEligibleAuthorizationOutput) PrincipalDisplayName() pulumi.StringPtrOutput { return o.ApplyT(func(v DefinitionEligibleAuthorization) *string { return v.PrincipalDisplayName }).(pulumi.StringPtrOutput) } // Principal ID of the security group/service principal/user that would be assigned permissions to the projected subscription. func (o DefinitionEligibleAuthorizationOutput) PrincipalId() pulumi.StringOutput { return o.ApplyT(func(v DefinitionEligibleAuthorization) string { return v.PrincipalId }).(pulumi.StringOutput) } // The Principal ID of the Azure built-in role that defines the permissions that the Azure Active Directory will have on the projected scope. func (o DefinitionEligibleAuthorizationOutput) RoleDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v DefinitionEligibleAuthorization) string { return v.RoleDefinitionId }).(pulumi.StringOutput) } type DefinitionEligibleAuthorizationArrayOutput struct{ *pulumi.OutputState } func (DefinitionEligibleAuthorizationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]DefinitionEligibleAuthorization)(nil)).Elem() } func (o DefinitionEligibleAuthorizationArrayOutput) ToDefinitionEligibleAuthorizationArrayOutput() DefinitionEligibleAuthorizationArrayOutput { return o } func (o DefinitionEligibleAuthorizationArrayOutput) ToDefinitionEligibleAuthorizationArrayOutputWithContext(ctx context.Context) DefinitionEligibleAuthorizationArrayOutput { return o } func (o DefinitionEligibleAuthorizationArrayOutput) Index(i pulumi.IntInput) DefinitionEligibleAuthorizationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) DefinitionEligibleAuthorization { return vs[0].([]DefinitionEligibleAuthorization)[vs[1].(int)] }).(DefinitionEligibleAuthorizationOutput) } type DefinitionEligibleAuthorizationJustInTimeAccessPolicy struct { // An `approver` block as defined below. Approvers []DefinitionEligibleAuthorizationJustInTimeAccessPolicyApprover `pulumi:"approvers"` // The maximum access duration in ISO 8601 format for just-in-time access requests. Defaults to `PT8H`. MaximumActivationDuration *string `pulumi:"maximumActivationDuration"` // The multi-factor authorization provider to be used for just-in-time access requests. Possible value is `Azure`. // // > **Note:** When this property isn't set, it would be set to `None`. MultiFactorAuthProvider *string `pulumi:"multiFactorAuthProvider"` } // DefinitionEligibleAuthorizationJustInTimeAccessPolicyInput is an input type that accepts DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs and DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput values. // You can construct a concrete instance of `DefinitionEligibleAuthorizationJustInTimeAccessPolicyInput` via: // // DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs{...} type DefinitionEligibleAuthorizationJustInTimeAccessPolicyInput interface { pulumi.Input ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput() DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyOutputWithContext(context.Context) DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput } type DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs struct { // An `approver` block as defined below. Approvers DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayInput `pulumi:"approvers"` // The maximum access duration in ISO 8601 format for just-in-time access requests. Defaults to `PT8H`. MaximumActivationDuration pulumi.StringPtrInput `pulumi:"maximumActivationDuration"` // The multi-factor authorization provider to be used for just-in-time access requests. Possible value is `Azure`. // // > **Note:** When this property isn't set, it would be set to `None`. MultiFactorAuthProvider pulumi.StringPtrInput `pulumi:"multiFactorAuthProvider"` } func (DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*DefinitionEligibleAuthorizationJustInTimeAccessPolicy)(nil)).Elem() } func (i DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput() DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput { return i.ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyOutputWithContext(context.Background()) } func (i DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyOutputWithContext(ctx context.Context) DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput) } func (i DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput() DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput { return i.ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutputWithContext(context.Background()) } func (i DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutputWithContext(ctx context.Context) DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput).ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutputWithContext(ctx) } // DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrInput is an input type that accepts DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs, DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtr and DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput values. // You can construct a concrete instance of `DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrInput` via: // // DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs{...} // // or: // // nil type DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrInput interface { pulumi.Input ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput() DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutputWithContext(context.Context) DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput } type definitionEligibleAuthorizationJustInTimeAccessPolicyPtrType DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs func DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtr(v *DefinitionEligibleAuthorizationJustInTimeAccessPolicyArgs) DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrInput { return (*definitionEligibleAuthorizationJustInTimeAccessPolicyPtrType)(v) } func (*definitionEligibleAuthorizationJustInTimeAccessPolicyPtrType) ElementType() reflect.Type { return reflect.TypeOf((**DefinitionEligibleAuthorizationJustInTimeAccessPolicy)(nil)).Elem() } func (i *definitionEligibleAuthorizationJustInTimeAccessPolicyPtrType) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput() DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput { return i.ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutputWithContext(context.Background()) } func (i *definitionEligibleAuthorizationJustInTimeAccessPolicyPtrType) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutputWithContext(ctx context.Context) DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput) } type DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput struct{ *pulumi.OutputState } func (DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((*DefinitionEligibleAuthorizationJustInTimeAccessPolicy)(nil)).Elem() } func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput() DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput { return o } func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyOutputWithContext(ctx context.Context) DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput { return o } func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput() DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput { return o.ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutputWithContext(context.Background()) } func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutputWithContext(ctx context.Context) DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v DefinitionEligibleAuthorizationJustInTimeAccessPolicy) *DefinitionEligibleAuthorizationJustInTimeAccessPolicy { return &v }).(DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput) } // An `approver` block as defined below. func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput) Approvers() DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput { return o.ApplyT(func(v DefinitionEligibleAuthorizationJustInTimeAccessPolicy) []DefinitionEligibleAuthorizationJustInTimeAccessPolicyApprover { return v.Approvers }).(DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput) } // The maximum access duration in ISO 8601 format for just-in-time access requests. Defaults to `PT8H`. func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput) MaximumActivationDuration() pulumi.StringPtrOutput { return o.ApplyT(func(v DefinitionEligibleAuthorizationJustInTimeAccessPolicy) *string { return v.MaximumActivationDuration }).(pulumi.StringPtrOutput) } // The multi-factor authorization provider to be used for just-in-time access requests. Possible value is `Azure`. // // > **Note:** When this property isn't set, it would be set to `None`. func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput) MultiFactorAuthProvider() pulumi.StringPtrOutput { return o.ApplyT(func(v DefinitionEligibleAuthorizationJustInTimeAccessPolicy) *string { return v.MultiFactorAuthProvider }).(pulumi.StringPtrOutput) } type DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput struct{ *pulumi.OutputState } func (DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**DefinitionEligibleAuthorizationJustInTimeAccessPolicy)(nil)).Elem() } func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput() DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput { return o } func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutputWithContext(ctx context.Context) DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput { return o } func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput) Elem() DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput { return o.ApplyT(func(v *DefinitionEligibleAuthorizationJustInTimeAccessPolicy) DefinitionEligibleAuthorizationJustInTimeAccessPolicy { if v != nil { return *v } var ret DefinitionEligibleAuthorizationJustInTimeAccessPolicy return ret }).(DefinitionEligibleAuthorizationJustInTimeAccessPolicyOutput) } // An `approver` block as defined below. func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput) Approvers() DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput { return o.ApplyT(func(v *DefinitionEligibleAuthorizationJustInTimeAccessPolicy) []DefinitionEligibleAuthorizationJustInTimeAccessPolicyApprover { if v == nil { return nil } return v.Approvers }).(DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput) } // The maximum access duration in ISO 8601 format for just-in-time access requests. Defaults to `PT8H`. func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput) MaximumActivationDuration() pulumi.StringPtrOutput { return o.ApplyT(func(v *DefinitionEligibleAuthorizationJustInTimeAccessPolicy) *string { if v == nil { return nil } return v.MaximumActivationDuration }).(pulumi.StringPtrOutput) } // The multi-factor authorization provider to be used for just-in-time access requests. Possible value is `Azure`. // // > **Note:** When this property isn't set, it would be set to `None`. func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyPtrOutput) MultiFactorAuthProvider() pulumi.StringPtrOutput { return o.ApplyT(func(v *DefinitionEligibleAuthorizationJustInTimeAccessPolicy) *string { if v == nil { return nil } return v.MultiFactorAuthProvider }).(pulumi.StringPtrOutput) } type DefinitionEligibleAuthorizationJustInTimeAccessPolicyApprover struct { // The display name of the Azure Active Directory Principal for the approver. PrincipalDisplayName *string `pulumi:"principalDisplayName"` // The Principal ID of the Azure Active Directory principal for the approver. PrincipalId string `pulumi:"principalId"` } // DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverInput is an input type that accepts DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArgs and DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput values. // You can construct a concrete instance of `DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverInput` via: // // DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArgs{...} type DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverInput interface { pulumi.Input ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput() DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutputWithContext(context.Context) DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput } type DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArgs struct { // The display name of the Azure Active Directory Principal for the approver. PrincipalDisplayName pulumi.StringPtrInput `pulumi:"principalDisplayName"` // The Principal ID of the Azure Active Directory principal for the approver. PrincipalId pulumi.StringInput `pulumi:"principalId"` } func (DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArgs) ElementType() reflect.Type { return reflect.TypeOf((*DefinitionEligibleAuthorizationJustInTimeAccessPolicyApprover)(nil)).Elem() } func (i DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArgs) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput() DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput { return i.ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutputWithContext(context.Background()) } func (i DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArgs) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutputWithContext(ctx context.Context) DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput) } // DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayInput is an input type that accepts DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArray and DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput values. // You can construct a concrete instance of `DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayInput` via: // // DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArray{ DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArgs{...} } type DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayInput interface { pulumi.Input ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput() DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutputWithContext(context.Context) DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput } type DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArray []DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverInput func (DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArray) ElementType() reflect.Type { return reflect.TypeOf((*[]DefinitionEligibleAuthorizationJustInTimeAccessPolicyApprover)(nil)).Elem() } func (i DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArray) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput() DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput { return i.ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutputWithContext(context.Background()) } func (i DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArray) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutputWithContext(ctx context.Context) DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput) } type DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput struct{ *pulumi.OutputState } func (DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput) ElementType() reflect.Type { return reflect.TypeOf((*DefinitionEligibleAuthorizationJustInTimeAccessPolicyApprover)(nil)).Elem() } func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput() DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput { return o } func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutputWithContext(ctx context.Context) DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput { return o } // The display name of the Azure Active Directory Principal for the approver. func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput) PrincipalDisplayName() pulumi.StringPtrOutput { return o.ApplyT(func(v DefinitionEligibleAuthorizationJustInTimeAccessPolicyApprover) *string { return v.PrincipalDisplayName }).(pulumi.StringPtrOutput) } // The Principal ID of the Azure Active Directory principal for the approver. func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput) PrincipalId() pulumi.StringOutput { return o.ApplyT(func(v DefinitionEligibleAuthorizationJustInTimeAccessPolicyApprover) string { return v.PrincipalId }).(pulumi.StringOutput) } type DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput struct{ *pulumi.OutputState } func (DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]DefinitionEligibleAuthorizationJustInTimeAccessPolicyApprover)(nil)).Elem() } func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput() DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput { return o } func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput) ToDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutputWithContext(ctx context.Context) DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput { return o } func (o DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverArrayOutput) Index(i pulumi.IntInput) DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) DefinitionEligibleAuthorizationJustInTimeAccessPolicyApprover { return vs[0].([]DefinitionEligibleAuthorizationJustInTimeAccessPolicyApprover)[vs[1].(int)] }).(DefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutput) } type DefinitionPlan struct { // The plan name of the marketplace offer. Name string `pulumi:"name"` // The product code of the plan. Product string `pulumi:"product"` // The publisher ID of the plan. Publisher string `pulumi:"publisher"` // The version of the plan. Version string `pulumi:"version"` } // DefinitionPlanInput is an input type that accepts DefinitionPlanArgs and DefinitionPlanOutput values. // You can construct a concrete instance of `DefinitionPlanInput` via: // // DefinitionPlanArgs{...} type DefinitionPlanInput interface { pulumi.Input ToDefinitionPlanOutput() DefinitionPlanOutput ToDefinitionPlanOutputWithContext(context.Context) DefinitionPlanOutput } type DefinitionPlanArgs struct { // The plan name of the marketplace offer.
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/lighthouse/assignment.go
sdk/go/azure/lighthouse/assignment.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 lighthouse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a [Lighthouse](https://docs.microsoft.com/azure/lighthouse) Assignment to a subscription, or to a resource 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/lighthouse" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // primary, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // _, err = lighthouse.NewAssignment(ctx, "example", &lighthouse.AssignmentArgs{ // Scope: pulumi.String(primary.Id), // LighthouseDefinitionId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/00000000-0000-0000-0000-000000000000"), // }) // 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.ManagedServices` - 2022-10-01 // // ## Import // // Lighthouse Assignments can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:lighthouse/assignment:Assignment example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationAssignments/00000000-0000-0000-0000-000000000000 // ``` type Assignment struct { pulumi.CustomResourceState // A Fully qualified path of the lighthouse definition, such as `/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2`. Changing this forces a new resource to be created. LighthouseDefinitionId pulumi.StringOutput `pulumi:"lighthouseDefinitionId"` // A unique UUID/GUID which identifies this lighthouse assignment- one will be generated if not specified. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The scope at which the Lighthouse Assignment applies too, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333` or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`. Changing this forces a new resource to be created. Scope pulumi.StringOutput `pulumi:"scope"` } // NewAssignment registers a new resource with the given unique name, arguments, and options. func NewAssignment(ctx *pulumi.Context, name string, args *AssignmentArgs, opts ...pulumi.ResourceOption) (*Assignment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LighthouseDefinitionId == nil { return nil, errors.New("invalid value for required argument 'LighthouseDefinitionId'") } if args.Scope == nil { return nil, errors.New("invalid value for required argument 'Scope'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Assignment err := ctx.RegisterResource("azure:lighthouse/assignment:Assignment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAssignment gets an existing Assignment 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 GetAssignment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AssignmentState, opts ...pulumi.ResourceOption) (*Assignment, error) { var resource Assignment err := ctx.ReadResource("azure:lighthouse/assignment:Assignment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Assignment resources. type assignmentState struct { // A Fully qualified path of the lighthouse definition, such as `/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2`. Changing this forces a new resource to be created. LighthouseDefinitionId *string `pulumi:"lighthouseDefinitionId"` // A unique UUID/GUID which identifies this lighthouse assignment- one will be generated if not specified. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The scope at which the Lighthouse Assignment applies too, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333` or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`. Changing this forces a new resource to be created. Scope *string `pulumi:"scope"` } type AssignmentState struct { // A Fully qualified path of the lighthouse definition, such as `/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2`. Changing this forces a new resource to be created. LighthouseDefinitionId pulumi.StringPtrInput // A unique UUID/GUID which identifies this lighthouse assignment- one will be generated if not specified. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The scope at which the Lighthouse Assignment applies too, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333` or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`. Changing this forces a new resource to be created. Scope pulumi.StringPtrInput } func (AssignmentState) ElementType() reflect.Type { return reflect.TypeOf((*assignmentState)(nil)).Elem() } type assignmentArgs struct { // A Fully qualified path of the lighthouse definition, such as `/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2`. Changing this forces a new resource to be created. LighthouseDefinitionId string `pulumi:"lighthouseDefinitionId"` // A unique UUID/GUID which identifies this lighthouse assignment- one will be generated if not specified. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The scope at which the Lighthouse Assignment applies too, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333` or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`. Changing this forces a new resource to be created. Scope string `pulumi:"scope"` } // The set of arguments for constructing a Assignment resource. type AssignmentArgs struct { // A Fully qualified path of the lighthouse definition, such as `/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2`. Changing this forces a new resource to be created. LighthouseDefinitionId pulumi.StringInput // A unique UUID/GUID which identifies this lighthouse assignment- one will be generated if not specified. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The scope at which the Lighthouse Assignment applies too, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333` or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`. Changing this forces a new resource to be created. Scope pulumi.StringInput } func (AssignmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*assignmentArgs)(nil)).Elem() } type AssignmentInput interface { pulumi.Input ToAssignmentOutput() AssignmentOutput ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput } func (*Assignment) ElementType() reflect.Type { return reflect.TypeOf((**Assignment)(nil)).Elem() } func (i *Assignment) ToAssignmentOutput() AssignmentOutput { return i.ToAssignmentOutputWithContext(context.Background()) } func (i *Assignment) ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput { return pulumi.ToOutputWithContext(ctx, i).(AssignmentOutput) } // AssignmentArrayInput is an input type that accepts AssignmentArray and AssignmentArrayOutput values. // You can construct a concrete instance of `AssignmentArrayInput` via: // // AssignmentArray{ AssignmentArgs{...} } type AssignmentArrayInput interface { pulumi.Input ToAssignmentArrayOutput() AssignmentArrayOutput ToAssignmentArrayOutputWithContext(context.Context) AssignmentArrayOutput } type AssignmentArray []AssignmentInput func (AssignmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Assignment)(nil)).Elem() } func (i AssignmentArray) ToAssignmentArrayOutput() AssignmentArrayOutput { return i.ToAssignmentArrayOutputWithContext(context.Background()) } func (i AssignmentArray) ToAssignmentArrayOutputWithContext(ctx context.Context) AssignmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AssignmentArrayOutput) } // AssignmentMapInput is an input type that accepts AssignmentMap and AssignmentMapOutput values. // You can construct a concrete instance of `AssignmentMapInput` via: // // AssignmentMap{ "key": AssignmentArgs{...} } type AssignmentMapInput interface { pulumi.Input ToAssignmentMapOutput() AssignmentMapOutput ToAssignmentMapOutputWithContext(context.Context) AssignmentMapOutput } type AssignmentMap map[string]AssignmentInput func (AssignmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Assignment)(nil)).Elem() } func (i AssignmentMap) ToAssignmentMapOutput() AssignmentMapOutput { return i.ToAssignmentMapOutputWithContext(context.Background()) } func (i AssignmentMap) ToAssignmentMapOutputWithContext(ctx context.Context) AssignmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AssignmentMapOutput) } type AssignmentOutput struct{ *pulumi.OutputState } func (AssignmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**Assignment)(nil)).Elem() } func (o AssignmentOutput) ToAssignmentOutput() AssignmentOutput { return o } func (o AssignmentOutput) ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput { return o } // A Fully qualified path of the lighthouse definition, such as `/subscriptions/0afefe50-734e-4610-8c82-a144aff49dea/providers/Microsoft.ManagedServices/registrationDefinitions/26c128c2-fefa-4340-9bb1-8e081c90ada2`. Changing this forces a new resource to be created. func (o AssignmentOutput) LighthouseDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v *Assignment) pulumi.StringOutput { return v.LighthouseDefinitionId }).(pulumi.StringOutput) } // A unique UUID/GUID which identifies this lighthouse assignment- one will be generated if not specified. Changing this forces a new resource to be created. func (o AssignmentOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Assignment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The scope at which the Lighthouse Assignment applies too, such as `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333` or `/subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup`. Changing this forces a new resource to be created. func (o AssignmentOutput) Scope() pulumi.StringOutput { return o.ApplyT(func(v *Assignment) pulumi.StringOutput { return v.Scope }).(pulumi.StringOutput) } type AssignmentArrayOutput struct{ *pulumi.OutputState } func (AssignmentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Assignment)(nil)).Elem() } func (o AssignmentArrayOutput) ToAssignmentArrayOutput() AssignmentArrayOutput { return o } func (o AssignmentArrayOutput) ToAssignmentArrayOutputWithContext(ctx context.Context) AssignmentArrayOutput { return o } func (o AssignmentArrayOutput) Index(i pulumi.IntInput) AssignmentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Assignment { return vs[0].([]*Assignment)[vs[1].(int)] }).(AssignmentOutput) } type AssignmentMapOutput struct{ *pulumi.OutputState } func (AssignmentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Assignment)(nil)).Elem() } func (o AssignmentMapOutput) ToAssignmentMapOutput() AssignmentMapOutput { return o } func (o AssignmentMapOutput) ToAssignmentMapOutputWithContext(ctx context.Context) AssignmentMapOutput { return o } func (o AssignmentMapOutput) MapIndex(k pulumi.StringInput) AssignmentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Assignment { return vs[0].(map[string]*Assignment)[vs[1].(string)] }).(AssignmentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AssignmentInput)(nil)).Elem(), &Assignment{}) pulumi.RegisterInputType(reflect.TypeOf((*AssignmentArrayInput)(nil)).Elem(), AssignmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AssignmentMapInput)(nil)).Elem(), AssignmentMap{}) pulumi.RegisterOutputType(AssignmentOutput{}) pulumi.RegisterOutputType(AssignmentArrayOutput{}) pulumi.RegisterOutputType(AssignmentMapOutput{}) }
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/lighthouse/definition.go
sdk/go/azure/lighthouse/definition.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 lighthouse import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a [Lighthouse](https://docs.microsoft.com/azure/lighthouse) Definition. // // ## 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/lighthouse" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // contributor, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{ // RoleDefinitionId: pulumi.StringRef("b24988ac-6180-42a0-ab88-20f7382dd24c"), // }, nil) // if err != nil { // return err // } // _, err = lighthouse.NewDefinition(ctx, "example", &lighthouse.DefinitionArgs{ // Name: pulumi.String("Sample definition"), // Description: pulumi.String("This is a lighthouse definition created IaC"), // ManagingTenantId: pulumi.String("00000000-0000-0000-0000-000000000000"), // Scope: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000"), // Authorizations: lighthouse.DefinitionAuthorizationArray{ // &lighthouse.DefinitionAuthorizationArgs{ // PrincipalId: pulumi.String("00000000-0000-0000-0000-000000000000"), // RoleDefinitionId: pulumi.String(contributor.RoleDefinitionId), // PrincipalDisplayName: pulumi.String("Tier 1 Support"), // }, // }, // }) // 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.ManagedServices` - 2022-10-01 // // ## Import // // Lighthouse Definitions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:lighthouse/definition:Definition example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ManagedServices/registrationDefinitions/00000000-0000-0000-0000-000000000000 // ``` type Definition struct { pulumi.CustomResourceState // An `authorization` block as defined below. Authorizations DefinitionAuthorizationArrayOutput `pulumi:"authorizations"` // A description of the Lighthouse Definition. Description pulumi.StringPtrOutput `pulumi:"description"` // An `eligibleAuthorization` block as defined below. EligibleAuthorizations DefinitionEligibleAuthorizationArrayOutput `pulumi:"eligibleAuthorizations"` // A unique UUID/GUID which identifies this lighthouse definition - one will be generated if not specified. Changing this forces a new resource to be created. LighthouseDefinitionId pulumi.StringOutput `pulumi:"lighthouseDefinitionId"` // The ID of the managing tenant. Changing this forces a new resource to be created. ManagingTenantId pulumi.StringOutput `pulumi:"managingTenantId"` // The name of the Lighthouse Definition. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A `plan` block as defined below. Plan DefinitionPlanPtrOutput `pulumi:"plan"` // The ID of the managed subscription. Changing this forces a new resource to be created. Scope pulumi.StringOutput `pulumi:"scope"` } // NewDefinition registers a new resource with the given unique name, arguments, and options. func NewDefinition(ctx *pulumi.Context, name string, args *DefinitionArgs, opts ...pulumi.ResourceOption) (*Definition, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Authorizations == nil { return nil, errors.New("invalid value for required argument 'Authorizations'") } if args.ManagingTenantId == nil { return nil, errors.New("invalid value for required argument 'ManagingTenantId'") } if args.Scope == nil { return nil, errors.New("invalid value for required argument 'Scope'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Definition err := ctx.RegisterResource("azure:lighthouse/definition:Definition", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDefinition gets an existing Definition 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 GetDefinition(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DefinitionState, opts ...pulumi.ResourceOption) (*Definition, error) { var resource Definition err := ctx.ReadResource("azure:lighthouse/definition:Definition", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Definition resources. type definitionState struct { // An `authorization` block as defined below. Authorizations []DefinitionAuthorization `pulumi:"authorizations"` // A description of the Lighthouse Definition. Description *string `pulumi:"description"` // An `eligibleAuthorization` block as defined below. EligibleAuthorizations []DefinitionEligibleAuthorization `pulumi:"eligibleAuthorizations"` // A unique UUID/GUID which identifies this lighthouse definition - one will be generated if not specified. Changing this forces a new resource to be created. LighthouseDefinitionId *string `pulumi:"lighthouseDefinitionId"` // The ID of the managing tenant. Changing this forces a new resource to be created. ManagingTenantId *string `pulumi:"managingTenantId"` // The name of the Lighthouse Definition. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A `plan` block as defined below. Plan *DefinitionPlan `pulumi:"plan"` // The ID of the managed subscription. Changing this forces a new resource to be created. Scope *string `pulumi:"scope"` } type DefinitionState struct { // An `authorization` block as defined below. Authorizations DefinitionAuthorizationArrayInput // A description of the Lighthouse Definition. Description pulumi.StringPtrInput // An `eligibleAuthorization` block as defined below. EligibleAuthorizations DefinitionEligibleAuthorizationArrayInput // A unique UUID/GUID which identifies this lighthouse definition - one will be generated if not specified. Changing this forces a new resource to be created. LighthouseDefinitionId pulumi.StringPtrInput // The ID of the managing tenant. Changing this forces a new resource to be created. ManagingTenantId pulumi.StringPtrInput // The name of the Lighthouse Definition. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A `plan` block as defined below. Plan DefinitionPlanPtrInput // The ID of the managed subscription. Changing this forces a new resource to be created. Scope pulumi.StringPtrInput } func (DefinitionState) ElementType() reflect.Type { return reflect.TypeOf((*definitionState)(nil)).Elem() } type definitionArgs struct { // An `authorization` block as defined below. Authorizations []DefinitionAuthorization `pulumi:"authorizations"` // A description of the Lighthouse Definition. Description *string `pulumi:"description"` // An `eligibleAuthorization` block as defined below. EligibleAuthorizations []DefinitionEligibleAuthorization `pulumi:"eligibleAuthorizations"` // A unique UUID/GUID which identifies this lighthouse definition - one will be generated if not specified. Changing this forces a new resource to be created. LighthouseDefinitionId *string `pulumi:"lighthouseDefinitionId"` // The ID of the managing tenant. Changing this forces a new resource to be created. ManagingTenantId string `pulumi:"managingTenantId"` // The name of the Lighthouse Definition. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A `plan` block as defined below. Plan *DefinitionPlan `pulumi:"plan"` // The ID of the managed subscription. Changing this forces a new resource to be created. Scope string `pulumi:"scope"` } // The set of arguments for constructing a Definition resource. type DefinitionArgs struct { // An `authorization` block as defined below. Authorizations DefinitionAuthorizationArrayInput // A description of the Lighthouse Definition. Description pulumi.StringPtrInput // An `eligibleAuthorization` block as defined below. EligibleAuthorizations DefinitionEligibleAuthorizationArrayInput // A unique UUID/GUID which identifies this lighthouse definition - one will be generated if not specified. Changing this forces a new resource to be created. LighthouseDefinitionId pulumi.StringPtrInput // The ID of the managing tenant. Changing this forces a new resource to be created. ManagingTenantId pulumi.StringInput // The name of the Lighthouse Definition. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A `plan` block as defined below. Plan DefinitionPlanPtrInput // The ID of the managed subscription. Changing this forces a new resource to be created. Scope pulumi.StringInput } func (DefinitionArgs) ElementType() reflect.Type { return reflect.TypeOf((*definitionArgs)(nil)).Elem() } type DefinitionInput interface { pulumi.Input ToDefinitionOutput() DefinitionOutput ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput } func (*Definition) ElementType() reflect.Type { return reflect.TypeOf((**Definition)(nil)).Elem() } func (i *Definition) ToDefinitionOutput() DefinitionOutput { return i.ToDefinitionOutputWithContext(context.Background()) } func (i *Definition) ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionOutput) } // DefinitionArrayInput is an input type that accepts DefinitionArray and DefinitionArrayOutput values. // You can construct a concrete instance of `DefinitionArrayInput` via: // // DefinitionArray{ DefinitionArgs{...} } type DefinitionArrayInput interface { pulumi.Input ToDefinitionArrayOutput() DefinitionArrayOutput ToDefinitionArrayOutputWithContext(context.Context) DefinitionArrayOutput } type DefinitionArray []DefinitionInput func (DefinitionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Definition)(nil)).Elem() } func (i DefinitionArray) ToDefinitionArrayOutput() DefinitionArrayOutput { return i.ToDefinitionArrayOutputWithContext(context.Background()) } func (i DefinitionArray) ToDefinitionArrayOutputWithContext(ctx context.Context) DefinitionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionArrayOutput) } // DefinitionMapInput is an input type that accepts DefinitionMap and DefinitionMapOutput values. // You can construct a concrete instance of `DefinitionMapInput` via: // // DefinitionMap{ "key": DefinitionArgs{...} } type DefinitionMapInput interface { pulumi.Input ToDefinitionMapOutput() DefinitionMapOutput ToDefinitionMapOutputWithContext(context.Context) DefinitionMapOutput } type DefinitionMap map[string]DefinitionInput func (DefinitionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Definition)(nil)).Elem() } func (i DefinitionMap) ToDefinitionMapOutput() DefinitionMapOutput { return i.ToDefinitionMapOutputWithContext(context.Background()) } func (i DefinitionMap) ToDefinitionMapOutputWithContext(ctx context.Context) DefinitionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionMapOutput) } type DefinitionOutput struct{ *pulumi.OutputState } func (DefinitionOutput) ElementType() reflect.Type { return reflect.TypeOf((**Definition)(nil)).Elem() } func (o DefinitionOutput) ToDefinitionOutput() DefinitionOutput { return o } func (o DefinitionOutput) ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput { return o } // An `authorization` block as defined below. func (o DefinitionOutput) Authorizations() DefinitionAuthorizationArrayOutput { return o.ApplyT(func(v *Definition) DefinitionAuthorizationArrayOutput { return v.Authorizations }).(DefinitionAuthorizationArrayOutput) } // A description of the Lighthouse Definition. func (o DefinitionOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *Definition) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // An `eligibleAuthorization` block as defined below. func (o DefinitionOutput) EligibleAuthorizations() DefinitionEligibleAuthorizationArrayOutput { return o.ApplyT(func(v *Definition) DefinitionEligibleAuthorizationArrayOutput { return v.EligibleAuthorizations }).(DefinitionEligibleAuthorizationArrayOutput) } // A unique UUID/GUID which identifies this lighthouse definition - one will be generated if not specified. Changing this forces a new resource to be created. func (o DefinitionOutput) LighthouseDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.LighthouseDefinitionId }).(pulumi.StringOutput) } // The ID of the managing tenant. Changing this forces a new resource to be created. func (o DefinitionOutput) ManagingTenantId() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.ManagingTenantId }).(pulumi.StringOutput) } // The name of the Lighthouse Definition. Changing this forces a new resource to be created. func (o DefinitionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A `plan` block as defined below. func (o DefinitionOutput) Plan() DefinitionPlanPtrOutput { return o.ApplyT(func(v *Definition) DefinitionPlanPtrOutput { return v.Plan }).(DefinitionPlanPtrOutput) } // The ID of the managed subscription. Changing this forces a new resource to be created. func (o DefinitionOutput) Scope() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.Scope }).(pulumi.StringOutput) } type DefinitionArrayOutput struct{ *pulumi.OutputState } func (DefinitionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Definition)(nil)).Elem() } func (o DefinitionArrayOutput) ToDefinitionArrayOutput() DefinitionArrayOutput { return o } func (o DefinitionArrayOutput) ToDefinitionArrayOutputWithContext(ctx context.Context) DefinitionArrayOutput { return o } func (o DefinitionArrayOutput) Index(i pulumi.IntInput) DefinitionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Definition { return vs[0].([]*Definition)[vs[1].(int)] }).(DefinitionOutput) } type DefinitionMapOutput struct{ *pulumi.OutputState } func (DefinitionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Definition)(nil)).Elem() } func (o DefinitionMapOutput) ToDefinitionMapOutput() DefinitionMapOutput { return o } func (o DefinitionMapOutput) ToDefinitionMapOutputWithContext(ctx context.Context) DefinitionMapOutput { return o } func (o DefinitionMapOutput) MapIndex(k pulumi.StringInput) DefinitionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Definition { return vs[0].(map[string]*Definition)[vs[1].(string)] }).(DefinitionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DefinitionInput)(nil)).Elem(), &Definition{}) pulumi.RegisterInputType(reflect.TypeOf((*DefinitionArrayInput)(nil)).Elem(), DefinitionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DefinitionMapInput)(nil)).Elem(), DefinitionMap{}) pulumi.RegisterOutputType(DefinitionOutput{}) pulumi.RegisterOutputType(DefinitionArrayOutput{}) pulumi.RegisterOutputType(DefinitionMapOutput{}) }
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/maps/init.go
sdk/go/azure/maps/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 maps 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:maps/account:Account": r = &Account{} case "azure:maps/creator:Creator": r = &Creator{} 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", "maps/account", &module{version}, ) pulumi.RegisterResourceModule( "azure", "maps/creator", &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/maps/pulumiTypes.go
sdk/go/azure/maps/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 maps 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 AccountCors struct { // A list of origins that should be allowed to make cross-origin calls. AllowedOrigins []string `pulumi:"allowedOrigins"` } // AccountCorsInput is an input type that accepts AccountCorsArgs and AccountCorsOutput values. // You can construct a concrete instance of `AccountCorsInput` via: // // AccountCorsArgs{...} type AccountCorsInput interface { pulumi.Input ToAccountCorsOutput() AccountCorsOutput ToAccountCorsOutputWithContext(context.Context) AccountCorsOutput } type AccountCorsArgs struct { // A list of origins that should be allowed to make cross-origin calls. AllowedOrigins pulumi.StringArrayInput `pulumi:"allowedOrigins"` } func (AccountCorsArgs) ElementType() reflect.Type { return reflect.TypeOf((*AccountCors)(nil)).Elem() } func (i AccountCorsArgs) ToAccountCorsOutput() AccountCorsOutput { return i.ToAccountCorsOutputWithContext(context.Background()) } func (i AccountCorsArgs) ToAccountCorsOutputWithContext(ctx context.Context) AccountCorsOutput { return pulumi.ToOutputWithContext(ctx, i).(AccountCorsOutput) } func (i AccountCorsArgs) ToAccountCorsPtrOutput() AccountCorsPtrOutput { return i.ToAccountCorsPtrOutputWithContext(context.Background()) } func (i AccountCorsArgs) ToAccountCorsPtrOutputWithContext(ctx context.Context) AccountCorsPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(AccountCorsOutput).ToAccountCorsPtrOutputWithContext(ctx) } // AccountCorsPtrInput is an input type that accepts AccountCorsArgs, AccountCorsPtr and AccountCorsPtrOutput values. // You can construct a concrete instance of `AccountCorsPtrInput` via: // // AccountCorsArgs{...} // // or: // // nil type AccountCorsPtrInput interface { pulumi.Input ToAccountCorsPtrOutput() AccountCorsPtrOutput ToAccountCorsPtrOutputWithContext(context.Context) AccountCorsPtrOutput } type accountCorsPtrType AccountCorsArgs func AccountCorsPtr(v *AccountCorsArgs) AccountCorsPtrInput { return (*accountCorsPtrType)(v) } func (*accountCorsPtrType) ElementType() reflect.Type { return reflect.TypeOf((**AccountCors)(nil)).Elem() } func (i *accountCorsPtrType) ToAccountCorsPtrOutput() AccountCorsPtrOutput { return i.ToAccountCorsPtrOutputWithContext(context.Background()) } func (i *accountCorsPtrType) ToAccountCorsPtrOutputWithContext(ctx context.Context) AccountCorsPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(AccountCorsPtrOutput) } type AccountCorsOutput struct{ *pulumi.OutputState } func (AccountCorsOutput) ElementType() reflect.Type { return reflect.TypeOf((*AccountCors)(nil)).Elem() } func (o AccountCorsOutput) ToAccountCorsOutput() AccountCorsOutput { return o } func (o AccountCorsOutput) ToAccountCorsOutputWithContext(ctx context.Context) AccountCorsOutput { return o } func (o AccountCorsOutput) ToAccountCorsPtrOutput() AccountCorsPtrOutput { return o.ToAccountCorsPtrOutputWithContext(context.Background()) } func (o AccountCorsOutput) ToAccountCorsPtrOutputWithContext(ctx context.Context) AccountCorsPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v AccountCors) *AccountCors { return &v }).(AccountCorsPtrOutput) } // A list of origins that should be allowed to make cross-origin calls. func (o AccountCorsOutput) AllowedOrigins() pulumi.StringArrayOutput { return o.ApplyT(func(v AccountCors) []string { return v.AllowedOrigins }).(pulumi.StringArrayOutput) } type AccountCorsPtrOutput struct{ *pulumi.OutputState } func (AccountCorsPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**AccountCors)(nil)).Elem() } func (o AccountCorsPtrOutput) ToAccountCorsPtrOutput() AccountCorsPtrOutput { return o } func (o AccountCorsPtrOutput) ToAccountCorsPtrOutputWithContext(ctx context.Context) AccountCorsPtrOutput { return o } func (o AccountCorsPtrOutput) Elem() AccountCorsOutput { return o.ApplyT(func(v *AccountCors) AccountCors { if v != nil { return *v } var ret AccountCors return ret }).(AccountCorsOutput) } // A list of origins that should be allowed to make cross-origin calls. func (o AccountCorsPtrOutput) AllowedOrigins() pulumi.StringArrayOutput { return o.ApplyT(func(v *AccountCors) []string { if v == nil { return nil } return v.AllowedOrigins }).(pulumi.StringArrayOutput) } type AccountDataStore struct { // The ID of the Storage Account that should be linked to this Azure Maps Account. StorageAccountId *string `pulumi:"storageAccountId"` // The name given to the linked Storage Account. UniqueName string `pulumi:"uniqueName"` } // AccountDataStoreInput is an input type that accepts AccountDataStoreArgs and AccountDataStoreOutput values. // You can construct a concrete instance of `AccountDataStoreInput` via: // // AccountDataStoreArgs{...} type AccountDataStoreInput interface { pulumi.Input ToAccountDataStoreOutput() AccountDataStoreOutput ToAccountDataStoreOutputWithContext(context.Context) AccountDataStoreOutput } type AccountDataStoreArgs struct { // The ID of the Storage Account that should be linked to this Azure Maps Account. StorageAccountId pulumi.StringPtrInput `pulumi:"storageAccountId"` // The name given to the linked Storage Account. UniqueName pulumi.StringInput `pulumi:"uniqueName"` } func (AccountDataStoreArgs) ElementType() reflect.Type { return reflect.TypeOf((*AccountDataStore)(nil)).Elem() } func (i AccountDataStoreArgs) ToAccountDataStoreOutput() AccountDataStoreOutput { return i.ToAccountDataStoreOutputWithContext(context.Background()) } func (i AccountDataStoreArgs) ToAccountDataStoreOutputWithContext(ctx context.Context) AccountDataStoreOutput { return pulumi.ToOutputWithContext(ctx, i).(AccountDataStoreOutput) } // AccountDataStoreArrayInput is an input type that accepts AccountDataStoreArray and AccountDataStoreArrayOutput values. // You can construct a concrete instance of `AccountDataStoreArrayInput` via: // // AccountDataStoreArray{ AccountDataStoreArgs{...} } type AccountDataStoreArrayInput interface { pulumi.Input ToAccountDataStoreArrayOutput() AccountDataStoreArrayOutput ToAccountDataStoreArrayOutputWithContext(context.Context) AccountDataStoreArrayOutput } type AccountDataStoreArray []AccountDataStoreInput func (AccountDataStoreArray) ElementType() reflect.Type { return reflect.TypeOf((*[]AccountDataStore)(nil)).Elem() } func (i AccountDataStoreArray) ToAccountDataStoreArrayOutput() AccountDataStoreArrayOutput { return i.ToAccountDataStoreArrayOutputWithContext(context.Background()) } func (i AccountDataStoreArray) ToAccountDataStoreArrayOutputWithContext(ctx context.Context) AccountDataStoreArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AccountDataStoreArrayOutput) } type AccountDataStoreOutput struct{ *pulumi.OutputState } func (AccountDataStoreOutput) ElementType() reflect.Type { return reflect.TypeOf((*AccountDataStore)(nil)).Elem() } func (o AccountDataStoreOutput) ToAccountDataStoreOutput() AccountDataStoreOutput { return o } func (o AccountDataStoreOutput) ToAccountDataStoreOutputWithContext(ctx context.Context) AccountDataStoreOutput { return o } // The ID of the Storage Account that should be linked to this Azure Maps Account. func (o AccountDataStoreOutput) StorageAccountId() pulumi.StringPtrOutput { return o.ApplyT(func(v AccountDataStore) *string { return v.StorageAccountId }).(pulumi.StringPtrOutput) } // The name given to the linked Storage Account. func (o AccountDataStoreOutput) UniqueName() pulumi.StringOutput { return o.ApplyT(func(v AccountDataStore) string { return v.UniqueName }).(pulumi.StringOutput) } type AccountDataStoreArrayOutput struct{ *pulumi.OutputState } func (AccountDataStoreArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]AccountDataStore)(nil)).Elem() } func (o AccountDataStoreArrayOutput) ToAccountDataStoreArrayOutput() AccountDataStoreArrayOutput { return o } func (o AccountDataStoreArrayOutput) ToAccountDataStoreArrayOutputWithContext(ctx context.Context) AccountDataStoreArrayOutput { return o } func (o AccountDataStoreArrayOutput) Index(i pulumi.IntInput) AccountDataStoreOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) AccountDataStore { return vs[0].([]AccountDataStore)[vs[1].(int)] }).(AccountDataStoreOutput) } type AccountIdentity struct { // A list of User Assigned Managed Identity IDs to be assigned to this Azure Maps Account. // // > **Note:** This 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 Azure Maps Account. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). Type string `pulumi:"type"` } // AccountIdentityInput is an input type that accepts AccountIdentityArgs and AccountIdentityOutput values. // You can construct a concrete instance of `AccountIdentityInput` via: // // AccountIdentityArgs{...} type AccountIdentityInput interface { pulumi.Input ToAccountIdentityOutput() AccountIdentityOutput ToAccountIdentityOutputWithContext(context.Context) AccountIdentityOutput } type AccountIdentityArgs struct { // A list of User Assigned Managed Identity IDs to be assigned to this Azure Maps Account. // // > **Note:** This 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 Azure Maps Account. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). Type pulumi.StringInput `pulumi:"type"` } func (AccountIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*AccountIdentity)(nil)).Elem() } func (i AccountIdentityArgs) ToAccountIdentityOutput() AccountIdentityOutput { return i.ToAccountIdentityOutputWithContext(context.Background()) } func (i AccountIdentityArgs) ToAccountIdentityOutputWithContext(ctx context.Context) AccountIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(AccountIdentityOutput) } func (i AccountIdentityArgs) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput { return i.ToAccountIdentityPtrOutputWithContext(context.Background()) } func (i AccountIdentityArgs) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(AccountIdentityOutput).ToAccountIdentityPtrOutputWithContext(ctx) } // AccountIdentityPtrInput is an input type that accepts AccountIdentityArgs, AccountIdentityPtr and AccountIdentityPtrOutput values. // You can construct a concrete instance of `AccountIdentityPtrInput` via: // // AccountIdentityArgs{...} // // or: // // nil type AccountIdentityPtrInput interface { pulumi.Input ToAccountIdentityPtrOutput() AccountIdentityPtrOutput ToAccountIdentityPtrOutputWithContext(context.Context) AccountIdentityPtrOutput } type accountIdentityPtrType AccountIdentityArgs func AccountIdentityPtr(v *AccountIdentityArgs) AccountIdentityPtrInput { return (*accountIdentityPtrType)(v) } func (*accountIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**AccountIdentity)(nil)).Elem() } func (i *accountIdentityPtrType) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput { return i.ToAccountIdentityPtrOutputWithContext(context.Background()) } func (i *accountIdentityPtrType) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(AccountIdentityPtrOutput) } type AccountIdentityOutput struct{ *pulumi.OutputState } func (AccountIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*AccountIdentity)(nil)).Elem() } func (o AccountIdentityOutput) ToAccountIdentityOutput() AccountIdentityOutput { return o } func (o AccountIdentityOutput) ToAccountIdentityOutputWithContext(ctx context.Context) AccountIdentityOutput { return o } func (o AccountIdentityOutput) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput { return o.ToAccountIdentityPtrOutputWithContext(context.Background()) } func (o AccountIdentityOutput) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v AccountIdentity) *AccountIdentity { return &v }).(AccountIdentityPtrOutput) } // A list of User Assigned Managed Identity IDs to be assigned to this Azure Maps Account. // // > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. func (o AccountIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v AccountIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with this Managed Service Identity. func (o AccountIdentityOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v AccountIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. func (o AccountIdentityOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v AccountIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity that should be configured on this Azure Maps Account. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). func (o AccountIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v AccountIdentity) string { return v.Type }).(pulumi.StringOutput) } type AccountIdentityPtrOutput struct{ *pulumi.OutputState } func (AccountIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**AccountIdentity)(nil)).Elem() } func (o AccountIdentityPtrOutput) ToAccountIdentityPtrOutput() AccountIdentityPtrOutput { return o } func (o AccountIdentityPtrOutput) ToAccountIdentityPtrOutputWithContext(ctx context.Context) AccountIdentityPtrOutput { return o } func (o AccountIdentityPtrOutput) Elem() AccountIdentityOutput { return o.ApplyT(func(v *AccountIdentity) AccountIdentity { if v != nil { return *v } var ret AccountIdentity return ret }).(AccountIdentityOutput) } // A list of User Assigned Managed Identity IDs to be assigned to this Azure Maps Account. // // > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. func (o AccountIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *AccountIdentity) []string { if v == nil { return nil } return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with this Managed Service Identity. func (o AccountIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v *AccountIdentity) *string { if v == nil { return nil } return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. func (o AccountIdentityPtrOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v *AccountIdentity) *string { if v == nil { return nil } return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity that should be configured on this Azure Maps Account. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). func (o AccountIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *AccountIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AccountCorsInput)(nil)).Elem(), AccountCorsArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*AccountCorsPtrInput)(nil)).Elem(), AccountCorsArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*AccountDataStoreInput)(nil)).Elem(), AccountDataStoreArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*AccountDataStoreArrayInput)(nil)).Elem(), AccountDataStoreArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AccountIdentityInput)(nil)).Elem(), AccountIdentityArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*AccountIdentityPtrInput)(nil)).Elem(), AccountIdentityArgs{}) pulumi.RegisterOutputType(AccountCorsOutput{}) pulumi.RegisterOutputType(AccountCorsPtrOutput{}) pulumi.RegisterOutputType(AccountDataStoreOutput{}) pulumi.RegisterOutputType(AccountDataStoreArrayOutput{}) pulumi.RegisterOutputType(AccountIdentityOutput{}) pulumi.RegisterOutputType(AccountIdentityPtrOutput{}) }
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/maps/getAccount.go
sdk/go/azure/maps/getAccount.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 maps 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 Maps Account. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/maps" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := maps.LookupAccount(ctx, &maps.LookupAccountArgs{ // Name: "production", // ResourceGroupName: "maps", // }, nil) // if err != nil { // return err // } // ctx.Export("mapsAccountId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Maps` - 2023-06-01 func LookupAccount(ctx *pulumi.Context, args *LookupAccountArgs, opts ...pulumi.InvokeOption) (*LookupAccountResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupAccountResult err := ctx.Invoke("azure:maps/getAccount:getAccount", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getAccount. type LookupAccountArgs struct { // Specifies the name of the Maps Account. Name string `pulumi:"name"` // Specifies the name of the Resource Group in which the Maps Account is located. ResourceGroupName string `pulumi:"resourceGroupName"` Tags map[string]string `pulumi:"tags"` } // A collection of values returned by getAccount. type LookupAccountResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // The primary key used to authenticate and authorize access to the Maps REST APIs. PrimaryAccessKey string `pulumi:"primaryAccessKey"` ResourceGroupName string `pulumi:"resourceGroupName"` // The primary key used to authenticate and authorize access to the Maps REST APIs. The second key is given to provide seamless key regeneration. SecondaryAccessKey string `pulumi:"secondaryAccessKey"` // The SKU of the Azure Maps Account. SkuName string `pulumi:"skuName"` Tags map[string]string `pulumi:"tags"` // A unique identifier for the Maps Account. XMsClientId string `pulumi:"xMsClientId"` } func LookupAccountOutput(ctx *pulumi.Context, args LookupAccountOutputArgs, opts ...pulumi.InvokeOption) LookupAccountResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupAccountResultOutput, error) { args := v.(LookupAccountArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:maps/getAccount:getAccount", args, LookupAccountResultOutput{}, options).(LookupAccountResultOutput), nil }).(LookupAccountResultOutput) } // A collection of arguments for invoking getAccount. type LookupAccountOutputArgs struct { // Specifies the name of the Maps Account. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the Resource Group in which the Maps Account is located. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` Tags pulumi.StringMapInput `pulumi:"tags"` } func (LookupAccountOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupAccountArgs)(nil)).Elem() } // A collection of values returned by getAccount. type LookupAccountResultOutput struct{ *pulumi.OutputState } func (LookupAccountResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupAccountResult)(nil)).Elem() } func (o LookupAccountResultOutput) ToLookupAccountResultOutput() LookupAccountResultOutput { return o } func (o LookupAccountResultOutput) ToLookupAccountResultOutputWithContext(ctx context.Context) LookupAccountResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupAccountResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupAccountResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupAccountResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupAccountResult) string { return v.Name }).(pulumi.StringOutput) } // The primary key used to authenticate and authorize access to the Maps REST APIs. func (o LookupAccountResultOutput) PrimaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryAccessKey }).(pulumi.StringOutput) } func (o LookupAccountResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupAccountResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The primary key used to authenticate and authorize access to the Maps REST APIs. The second key is given to provide seamless key regeneration. func (o LookupAccountResultOutput) SecondaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v LookupAccountResult) string { return v.SecondaryAccessKey }).(pulumi.StringOutput) } // The SKU of the Azure Maps Account. func (o LookupAccountResultOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v LookupAccountResult) string { return v.SkuName }).(pulumi.StringOutput) } func (o LookupAccountResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupAccountResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // A unique identifier for the Maps Account. func (o LookupAccountResultOutput) XMsClientId() pulumi.StringOutput { return o.ApplyT(func(v LookupAccountResult) string { return v.XMsClientId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupAccountResultOutput{}) }
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/maps/creator.go
sdk/go/azure/maps/creator.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 maps 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 Maps Creator. // // > **Note:** The `maps.Creator` resource has been deprecated because the service is retiring from 2024-09-23 and will be removed in v5.0 of the AzureRM 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/maps" // "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 := maps.NewAccount(ctx, "example", &maps.AccountArgs{ // Name: pulumi.String("example-maps-account"), // ResourceGroupName: example.Name, // SkuName: pulumi.String("G2"), // Tags: pulumi.StringMap{ // "environment": pulumi.String("Test"), // }, // }) // if err != nil { // return err // } // _, err = maps.NewCreator(ctx, "example", &maps.CreatorArgs{ // Name: pulumi.String("example-maps-creator"), // MapsAccountId: exampleAccount.ID(), // Location: example.Location, // StorageUnits: pulumi.Int(1), // Tags: pulumi.StringMap{ // "environment": 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.Maps` - 2023-06-01 // // ## Import // // An Azure Maps Creators can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:maps/creator:Creator example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Maps/accounts/account1/creators/creator1 // ``` type Creator struct { pulumi.CustomResourceState // The Azure Region where the Azure Maps Creator should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The ID of the Azure Maps Creator. Changing this forces a new resource to be created. MapsAccountId pulumi.StringOutput `pulumi:"mapsAccountId"` // The name of the Azure Maps Creator. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The storage units to be allocated. Integer values from 1 to 100, inclusive. StorageUnits pulumi.IntOutput `pulumi:"storageUnits"` // A mapping of tags which should be assigned to the Azure Maps Creator. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewCreator registers a new resource with the given unique name, arguments, and options. func NewCreator(ctx *pulumi.Context, name string, args *CreatorArgs, opts ...pulumi.ResourceOption) (*Creator, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.MapsAccountId == nil { return nil, errors.New("invalid value for required argument 'MapsAccountId'") } if args.StorageUnits == nil { return nil, errors.New("invalid value for required argument 'StorageUnits'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Creator err := ctx.RegisterResource("azure:maps/creator:Creator", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCreator gets an existing Creator 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 GetCreator(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CreatorState, opts ...pulumi.ResourceOption) (*Creator, error) { var resource Creator err := ctx.ReadResource("azure:maps/creator:Creator", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Creator resources. type creatorState struct { // The Azure Region where the Azure Maps Creator should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The ID of the Azure Maps Creator. Changing this forces a new resource to be created. MapsAccountId *string `pulumi:"mapsAccountId"` // The name of the Azure Maps Creator. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The storage units to be allocated. Integer values from 1 to 100, inclusive. StorageUnits *int `pulumi:"storageUnits"` // A mapping of tags which should be assigned to the Azure Maps Creator. Tags map[string]string `pulumi:"tags"` } type CreatorState struct { // The Azure Region where the Azure Maps Creator should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The ID of the Azure Maps Creator. Changing this forces a new resource to be created. MapsAccountId pulumi.StringPtrInput // The name of the Azure Maps Creator. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The storage units to be allocated. Integer values from 1 to 100, inclusive. StorageUnits pulumi.IntPtrInput // A mapping of tags which should be assigned to the Azure Maps Creator. Tags pulumi.StringMapInput } func (CreatorState) ElementType() reflect.Type { return reflect.TypeOf((*creatorState)(nil)).Elem() } type creatorArgs struct { // The Azure Region where the Azure Maps Creator should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The ID of the Azure Maps Creator. Changing this forces a new resource to be created. MapsAccountId string `pulumi:"mapsAccountId"` // The name of the Azure Maps Creator. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The storage units to be allocated. Integer values from 1 to 100, inclusive. StorageUnits int `pulumi:"storageUnits"` // A mapping of tags which should be assigned to the Azure Maps Creator. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Creator resource. type CreatorArgs struct { // The Azure Region where the Azure Maps Creator should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The ID of the Azure Maps Creator. Changing this forces a new resource to be created. MapsAccountId pulumi.StringInput // The name of the Azure Maps Creator. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The storage units to be allocated. Integer values from 1 to 100, inclusive. StorageUnits pulumi.IntInput // A mapping of tags which should be assigned to the Azure Maps Creator. Tags pulumi.StringMapInput } func (CreatorArgs) ElementType() reflect.Type { return reflect.TypeOf((*creatorArgs)(nil)).Elem() } type CreatorInput interface { pulumi.Input ToCreatorOutput() CreatorOutput ToCreatorOutputWithContext(ctx context.Context) CreatorOutput } func (*Creator) ElementType() reflect.Type { return reflect.TypeOf((**Creator)(nil)).Elem() } func (i *Creator) ToCreatorOutput() CreatorOutput { return i.ToCreatorOutputWithContext(context.Background()) } func (i *Creator) ToCreatorOutputWithContext(ctx context.Context) CreatorOutput { return pulumi.ToOutputWithContext(ctx, i).(CreatorOutput) } // CreatorArrayInput is an input type that accepts CreatorArray and CreatorArrayOutput values. // You can construct a concrete instance of `CreatorArrayInput` via: // // CreatorArray{ CreatorArgs{...} } type CreatorArrayInput interface { pulumi.Input ToCreatorArrayOutput() CreatorArrayOutput ToCreatorArrayOutputWithContext(context.Context) CreatorArrayOutput } type CreatorArray []CreatorInput func (CreatorArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Creator)(nil)).Elem() } func (i CreatorArray) ToCreatorArrayOutput() CreatorArrayOutput { return i.ToCreatorArrayOutputWithContext(context.Background()) } func (i CreatorArray) ToCreatorArrayOutputWithContext(ctx context.Context) CreatorArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CreatorArrayOutput) } // CreatorMapInput is an input type that accepts CreatorMap and CreatorMapOutput values. // You can construct a concrete instance of `CreatorMapInput` via: // // CreatorMap{ "key": CreatorArgs{...} } type CreatorMapInput interface { pulumi.Input ToCreatorMapOutput() CreatorMapOutput ToCreatorMapOutputWithContext(context.Context) CreatorMapOutput } type CreatorMap map[string]CreatorInput func (CreatorMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Creator)(nil)).Elem() } func (i CreatorMap) ToCreatorMapOutput() CreatorMapOutput { return i.ToCreatorMapOutputWithContext(context.Background()) } func (i CreatorMap) ToCreatorMapOutputWithContext(ctx context.Context) CreatorMapOutput { return pulumi.ToOutputWithContext(ctx, i).(CreatorMapOutput) } type CreatorOutput struct{ *pulumi.OutputState } func (CreatorOutput) ElementType() reflect.Type { return reflect.TypeOf((**Creator)(nil)).Elem() } func (o CreatorOutput) ToCreatorOutput() CreatorOutput { return o } func (o CreatorOutput) ToCreatorOutputWithContext(ctx context.Context) CreatorOutput { return o } // The Azure Region where the Azure Maps Creator should exist. Changing this forces a new resource to be created. func (o CreatorOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Creator) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The ID of the Azure Maps Creator. Changing this forces a new resource to be created. func (o CreatorOutput) MapsAccountId() pulumi.StringOutput { return o.ApplyT(func(v *Creator) pulumi.StringOutput { return v.MapsAccountId }).(pulumi.StringOutput) } // The name of the Azure Maps Creator. Changing this forces a new resource to be created. func (o CreatorOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Creator) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The storage units to be allocated. Integer values from 1 to 100, inclusive. func (o CreatorOutput) StorageUnits() pulumi.IntOutput { return o.ApplyT(func(v *Creator) pulumi.IntOutput { return v.StorageUnits }).(pulumi.IntOutput) } // A mapping of tags which should be assigned to the Azure Maps Creator. func (o CreatorOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Creator) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type CreatorArrayOutput struct{ *pulumi.OutputState } func (CreatorArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Creator)(nil)).Elem() } func (o CreatorArrayOutput) ToCreatorArrayOutput() CreatorArrayOutput { return o } func (o CreatorArrayOutput) ToCreatorArrayOutputWithContext(ctx context.Context) CreatorArrayOutput { return o } func (o CreatorArrayOutput) Index(i pulumi.IntInput) CreatorOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Creator { return vs[0].([]*Creator)[vs[1].(int)] }).(CreatorOutput) } type CreatorMapOutput struct{ *pulumi.OutputState } func (CreatorMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Creator)(nil)).Elem() } func (o CreatorMapOutput) ToCreatorMapOutput() CreatorMapOutput { return o } func (o CreatorMapOutput) ToCreatorMapOutputWithContext(ctx context.Context) CreatorMapOutput { return o } func (o CreatorMapOutput) MapIndex(k pulumi.StringInput) CreatorOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Creator { return vs[0].(map[string]*Creator)[vs[1].(string)] }).(CreatorOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*CreatorInput)(nil)).Elem(), &Creator{}) pulumi.RegisterInputType(reflect.TypeOf((*CreatorArrayInput)(nil)).Elem(), CreatorArray{}) pulumi.RegisterInputType(reflect.TypeOf((*CreatorMapInput)(nil)).Elem(), CreatorMap{}) pulumi.RegisterOutputType(CreatorOutput{}) pulumi.RegisterOutputType(CreatorArrayOutput{}) pulumi.RegisterOutputType(CreatorMapOutput{}) }
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/maps/account.go
sdk/go/azure/maps/account.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 maps 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 Maps Account. // // ## 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/maps" // "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 = maps.NewAccount(ctx, "example", &maps.AccountArgs{ // Name: pulumi.String("example-maps-account"), // ResourceGroupName: example.Name, // SkuName: pulumi.String("S1"), // LocalAuthenticationEnabled: pulumi.Bool(true), // Tags: pulumi.StringMap{ // "environment": 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.Maps` - 2023-06-01 // // ## Import // // A Maps Account can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:maps/account:Account example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Maps/accounts/my-maps-account // ``` type Account struct { pulumi.CustomResourceState // A `cors` block as defined below Cors AccountCorsPtrOutput `pulumi:"cors"` // One or more `dataStore` blocks as defined below. DataStores AccountDataStoreArrayOutput `pulumi:"dataStores"` // An `identity` block as defined below. Identity AccountIdentityPtrOutput `pulumi:"identity"` // Is local authentication enabled for this Azure Maps Account? When `false`, all authentication to the Azure Maps data-plane REST API is disabled, except Azure AD authentication. Defaults to `true`. LocalAuthenticationEnabled pulumi.BoolPtrOutput `pulumi:"localAuthenticationEnabled"` // The Location in which the Azure Maps Account should be provisioned. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the Azure Maps Account. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The primary key used to authenticate and authorize access to the Maps REST APIs. PrimaryAccessKey pulumi.StringOutput `pulumi:"primaryAccessKey"` // The name of the Resource Group in which the Azure Maps Account should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The secondary key used to authenticate and authorize access to the Maps REST APIs. SecondaryAccessKey pulumi.StringOutput `pulumi:"secondaryAccessKey"` // The SKU of the Azure Maps Account. Possible values are `S0`, `S1` and `G2`. Changing this forces a new resource to be created. // // > **Note:** Gen1 SKUs (`S0` and `S1`) are deprecated and can no longer be used for new deployments, which should instead use a Gen2 SKU (`G2`) - more information can be found [in the Azure documentation](https://learn.microsoft.com/azure/azure-maps/how-to-manage-pricing-tier). SkuName pulumi.StringOutput `pulumi:"skuName"` // A mapping of tags to assign to the Azure Maps Account. Tags pulumi.StringMapOutput `pulumi:"tags"` // A unique identifier for the Maps Account. XMsClientId pulumi.StringOutput `pulumi:"xMsClientId"` } // NewAccount registers a new resource with the given unique name, arguments, and options. func NewAccount(ctx *pulumi.Context, name string, args *AccountArgs, opts ...pulumi.ResourceOption) (*Account, 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'") } secrets := pulumi.AdditionalSecretOutputs([]string{ "primaryAccessKey", "secondaryAccessKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource Account err := ctx.RegisterResource("azure:maps/account:Account", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAccount gets an existing Account 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 GetAccount(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AccountState, opts ...pulumi.ResourceOption) (*Account, error) { var resource Account err := ctx.ReadResource("azure:maps/account:Account", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Account resources. type accountState struct { // A `cors` block as defined below Cors *AccountCors `pulumi:"cors"` // One or more `dataStore` blocks as defined below. DataStores []AccountDataStore `pulumi:"dataStores"` // An `identity` block as defined below. Identity *AccountIdentity `pulumi:"identity"` // Is local authentication enabled for this Azure Maps Account? When `false`, all authentication to the Azure Maps data-plane REST API is disabled, except Azure AD authentication. Defaults to `true`. LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"` // The Location in which the Azure Maps Account should be provisioned. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Azure Maps Account. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The primary key used to authenticate and authorize access to the Maps REST APIs. PrimaryAccessKey *string `pulumi:"primaryAccessKey"` // The name of the Resource Group in which the Azure Maps Account should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The secondary key used to authenticate and authorize access to the Maps REST APIs. SecondaryAccessKey *string `pulumi:"secondaryAccessKey"` // The SKU of the Azure Maps Account. Possible values are `S0`, `S1` and `G2`. Changing this forces a new resource to be created. // // > **Note:** Gen1 SKUs (`S0` and `S1`) are deprecated and can no longer be used for new deployments, which should instead use a Gen2 SKU (`G2`) - more information can be found [in the Azure documentation](https://learn.microsoft.com/azure/azure-maps/how-to-manage-pricing-tier). SkuName *string `pulumi:"skuName"` // A mapping of tags to assign to the Azure Maps Account. Tags map[string]string `pulumi:"tags"` // A unique identifier for the Maps Account. XMsClientId *string `pulumi:"xMsClientId"` } type AccountState struct { // A `cors` block as defined below Cors AccountCorsPtrInput // One or more `dataStore` blocks as defined below. DataStores AccountDataStoreArrayInput // An `identity` block as defined below. Identity AccountIdentityPtrInput // Is local authentication enabled for this Azure Maps Account? When `false`, all authentication to the Azure Maps data-plane REST API is disabled, except Azure AD authentication. Defaults to `true`. LocalAuthenticationEnabled pulumi.BoolPtrInput // The Location in which the Azure Maps Account should be provisioned. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Azure Maps Account. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The primary key used to authenticate and authorize access to the Maps REST APIs. PrimaryAccessKey pulumi.StringPtrInput // The name of the Resource Group in which the Azure Maps Account should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The secondary key used to authenticate and authorize access to the Maps REST APIs. SecondaryAccessKey pulumi.StringPtrInput // The SKU of the Azure Maps Account. Possible values are `S0`, `S1` and `G2`. Changing this forces a new resource to be created. // // > **Note:** Gen1 SKUs (`S0` and `S1`) are deprecated and can no longer be used for new deployments, which should instead use a Gen2 SKU (`G2`) - more information can be found [in the Azure documentation](https://learn.microsoft.com/azure/azure-maps/how-to-manage-pricing-tier). SkuName pulumi.StringPtrInput // A mapping of tags to assign to the Azure Maps Account. Tags pulumi.StringMapInput // A unique identifier for the Maps Account. XMsClientId pulumi.StringPtrInput } func (AccountState) ElementType() reflect.Type { return reflect.TypeOf((*accountState)(nil)).Elem() } type accountArgs struct { // A `cors` block as defined below Cors *AccountCors `pulumi:"cors"` // One or more `dataStore` blocks as defined below. DataStores []AccountDataStore `pulumi:"dataStores"` // An `identity` block as defined below. Identity *AccountIdentity `pulumi:"identity"` // Is local authentication enabled for this Azure Maps Account? When `false`, all authentication to the Azure Maps data-plane REST API is disabled, except Azure AD authentication. Defaults to `true`. LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"` // The Location in which the Azure Maps Account should be provisioned. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Azure Maps Account. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group in which the Azure Maps Account should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU of the Azure Maps Account. Possible values are `S0`, `S1` and `G2`. Changing this forces a new resource to be created. // // > **Note:** Gen1 SKUs (`S0` and `S1`) are deprecated and can no longer be used for new deployments, which should instead use a Gen2 SKU (`G2`) - more information can be found [in the Azure documentation](https://learn.microsoft.com/azure/azure-maps/how-to-manage-pricing-tier). SkuName string `pulumi:"skuName"` // A mapping of tags to assign to the Azure Maps Account. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Account resource. type AccountArgs struct { // A `cors` block as defined below Cors AccountCorsPtrInput // One or more `dataStore` blocks as defined below. DataStores AccountDataStoreArrayInput // An `identity` block as defined below. Identity AccountIdentityPtrInput // Is local authentication enabled for this Azure Maps Account? When `false`, all authentication to the Azure Maps data-plane REST API is disabled, except Azure AD authentication. Defaults to `true`. LocalAuthenticationEnabled pulumi.BoolPtrInput // The Location in which the Azure Maps Account should be provisioned. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Azure Maps Account. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group in which the Azure Maps Account should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The SKU of the Azure Maps Account. Possible values are `S0`, `S1` and `G2`. Changing this forces a new resource to be created. // // > **Note:** Gen1 SKUs (`S0` and `S1`) are deprecated and can no longer be used for new deployments, which should instead use a Gen2 SKU (`G2`) - more information can be found [in the Azure documentation](https://learn.microsoft.com/azure/azure-maps/how-to-manage-pricing-tier). SkuName pulumi.StringInput // A mapping of tags to assign to the Azure Maps Account. Tags pulumi.StringMapInput } func (AccountArgs) ElementType() reflect.Type { return reflect.TypeOf((*accountArgs)(nil)).Elem() } type AccountInput interface { pulumi.Input ToAccountOutput() AccountOutput ToAccountOutputWithContext(ctx context.Context) AccountOutput } func (*Account) ElementType() reflect.Type { return reflect.TypeOf((**Account)(nil)).Elem() } func (i *Account) ToAccountOutput() AccountOutput { return i.ToAccountOutputWithContext(context.Background()) } func (i *Account) ToAccountOutputWithContext(ctx context.Context) AccountOutput { return pulumi.ToOutputWithContext(ctx, i).(AccountOutput) } // AccountArrayInput is an input type that accepts AccountArray and AccountArrayOutput values. // You can construct a concrete instance of `AccountArrayInput` via: // // AccountArray{ AccountArgs{...} } type AccountArrayInput interface { pulumi.Input ToAccountArrayOutput() AccountArrayOutput ToAccountArrayOutputWithContext(context.Context) AccountArrayOutput } type AccountArray []AccountInput func (AccountArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Account)(nil)).Elem() } func (i AccountArray) ToAccountArrayOutput() AccountArrayOutput { return i.ToAccountArrayOutputWithContext(context.Background()) } func (i AccountArray) ToAccountArrayOutputWithContext(ctx context.Context) AccountArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AccountArrayOutput) } // AccountMapInput is an input type that accepts AccountMap and AccountMapOutput values. // You can construct a concrete instance of `AccountMapInput` via: // // AccountMap{ "key": AccountArgs{...} } type AccountMapInput interface { pulumi.Input ToAccountMapOutput() AccountMapOutput ToAccountMapOutputWithContext(context.Context) AccountMapOutput } type AccountMap map[string]AccountInput func (AccountMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Account)(nil)).Elem() } func (i AccountMap) ToAccountMapOutput() AccountMapOutput { return i.ToAccountMapOutputWithContext(context.Background()) } func (i AccountMap) ToAccountMapOutputWithContext(ctx context.Context) AccountMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AccountMapOutput) } type AccountOutput struct{ *pulumi.OutputState } func (AccountOutput) ElementType() reflect.Type { return reflect.TypeOf((**Account)(nil)).Elem() } func (o AccountOutput) ToAccountOutput() AccountOutput { return o } func (o AccountOutput) ToAccountOutputWithContext(ctx context.Context) AccountOutput { return o } // A `cors` block as defined below func (o AccountOutput) Cors() AccountCorsPtrOutput { return o.ApplyT(func(v *Account) AccountCorsPtrOutput { return v.Cors }).(AccountCorsPtrOutput) } // One or more `dataStore` blocks as defined below. func (o AccountOutput) DataStores() AccountDataStoreArrayOutput { return o.ApplyT(func(v *Account) AccountDataStoreArrayOutput { return v.DataStores }).(AccountDataStoreArrayOutput) } // An `identity` block as defined below. func (o AccountOutput) Identity() AccountIdentityPtrOutput { return o.ApplyT(func(v *Account) AccountIdentityPtrOutput { return v.Identity }).(AccountIdentityPtrOutput) } // Is local authentication enabled for this Azure Maps Account? When `false`, all authentication to the Azure Maps data-plane REST API is disabled, except Azure AD authentication. Defaults to `true`. func (o AccountOutput) LocalAuthenticationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Account) pulumi.BoolPtrOutput { return v.LocalAuthenticationEnabled }).(pulumi.BoolPtrOutput) } // The Location in which the Azure Maps Account should be provisioned. Changing this forces a new resource to be created. func (o AccountOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the Azure Maps Account. Changing this forces a new resource to be created. func (o AccountOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The primary key used to authenticate and authorize access to the Maps REST APIs. func (o AccountOutput) PrimaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.PrimaryAccessKey }).(pulumi.StringOutput) } // The name of the Resource Group in which the Azure Maps Account should exist. Changing this forces a new resource to be created. func (o AccountOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The secondary key used to authenticate and authorize access to the Maps REST APIs. func (o AccountOutput) SecondaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.SecondaryAccessKey }).(pulumi.StringOutput) } // The SKU of the Azure Maps Account. Possible values are `S0`, `S1` and `G2`. Changing this forces a new resource to be created. // // > **Note:** Gen1 SKUs (`S0` and `S1`) are deprecated and can no longer be used for new deployments, which should instead use a Gen2 SKU (`G2`) - more information can be found [in the Azure documentation](https://learn.microsoft.com/azure/azure-maps/how-to-manage-pricing-tier). func (o AccountOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags to assign to the Azure Maps Account. func (o AccountOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Account) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // A unique identifier for the Maps Account. func (o AccountOutput) XMsClientId() pulumi.StringOutput { return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.XMsClientId }).(pulumi.StringOutput) } type AccountArrayOutput struct{ *pulumi.OutputState } func (AccountArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Account)(nil)).Elem() } func (o AccountArrayOutput) ToAccountArrayOutput() AccountArrayOutput { return o } func (o AccountArrayOutput) ToAccountArrayOutputWithContext(ctx context.Context) AccountArrayOutput { return o } func (o AccountArrayOutput) Index(i pulumi.IntInput) AccountOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Account { return vs[0].([]*Account)[vs[1].(int)] }).(AccountOutput) } type AccountMapOutput struct{ *pulumi.OutputState } func (AccountMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Account)(nil)).Elem() } func (o AccountMapOutput) ToAccountMapOutput() AccountMapOutput { return o } func (o AccountMapOutput) ToAccountMapOutputWithContext(ctx context.Context) AccountMapOutput { return o } func (o AccountMapOutput) MapIndex(k pulumi.StringInput) AccountOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Account { return vs[0].(map[string]*Account)[vs[1].(string)] }).(AccountOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AccountInput)(nil)).Elem(), &Account{}) pulumi.RegisterInputType(reflect.TypeOf((*AccountArrayInput)(nil)).Elem(), AccountArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AccountMapInput)(nil)).Elem(), AccountMap{}) pulumi.RegisterOutputType(AccountOutput{}) pulumi.RegisterOutputType(AccountArrayOutput{}) pulumi.RegisterOutputType(AccountMapOutput{}) }
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/notificationhub/getNamespace.go
sdk/go/azure/notificationhub/getNamespace.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 notificationhub 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 Notification Hub Namespace. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/notificationhub" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := notificationhub.LookupNamespace(ctx, &notificationhub.LookupNamespaceArgs{ // Name: "my-namespace", // ResourceGroupName: "my-resource-group", // }, nil) // if err != nil { // return err // } // ctx.Export("servicebusEndpoint", example.ServicebusEndpoint) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.NotificationHubs` - 2023-09-01 func LookupNamespace(ctx *pulumi.Context, args *LookupNamespaceArgs, opts ...pulumi.InvokeOption) (*LookupNamespaceResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupNamespaceResult err := ctx.Invoke("azure:notificationhub/getNamespace:getNamespace", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getNamespace. type LookupNamespaceArgs struct { // Specifies the Name of the Notification Hub Namespace. Name string `pulumi:"name"` // Specifies the Name of the Resource Group within which the Notification Hub exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getNamespace. type LookupNamespaceResult struct { // Is this Notification Hub Namespace enabled? Enabled bool `pulumi:"enabled"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region in which this Notification Hub Namespace exists. Location string `pulumi:"location"` // The name of the SKU to use for this Notification Hub Namespace. Possible values are `Free`, `Basic` or `Standard.` Name string `pulumi:"name"` // The Type of Namespace, such as `Messaging` or `NotificationHub`. NamespaceType string `pulumi:"namespaceType"` ResourceGroupName string `pulumi:"resourceGroupName"` ServicebusEndpoint string `pulumi:"servicebusEndpoint"` // A `sku` block as defined below. Sku GetNamespaceSku `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } func LookupNamespaceOutput(ctx *pulumi.Context, args LookupNamespaceOutputArgs, opts ...pulumi.InvokeOption) LookupNamespaceResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupNamespaceResultOutput, error) { args := v.(LookupNamespaceArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:notificationhub/getNamespace:getNamespace", args, LookupNamespaceResultOutput{}, options).(LookupNamespaceResultOutput), nil }).(LookupNamespaceResultOutput) } // A collection of arguments for invoking getNamespace. type LookupNamespaceOutputArgs struct { // Specifies the Name of the Notification Hub Namespace. Name pulumi.StringInput `pulumi:"name"` // Specifies the Name of the Resource Group within which the Notification Hub exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupNamespaceOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupNamespaceArgs)(nil)).Elem() } // A collection of values returned by getNamespace. type LookupNamespaceResultOutput struct{ *pulumi.OutputState } func (LookupNamespaceResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupNamespaceResult)(nil)).Elem() } func (o LookupNamespaceResultOutput) ToLookupNamespaceResultOutput() LookupNamespaceResultOutput { return o } func (o LookupNamespaceResultOutput) ToLookupNamespaceResultOutputWithContext(ctx context.Context) LookupNamespaceResultOutput { return o } // Is this Notification Hub Namespace enabled? func (o LookupNamespaceResultOutput) Enabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupNamespaceResult) bool { return v.Enabled }).(pulumi.BoolOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupNamespaceResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupNamespaceResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region in which this Notification Hub Namespace exists. func (o LookupNamespaceResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupNamespaceResult) string { return v.Location }).(pulumi.StringOutput) } // The name of the SKU to use for this Notification Hub Namespace. Possible values are `Free`, `Basic` or `Standard.` func (o LookupNamespaceResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupNamespaceResult) string { return v.Name }).(pulumi.StringOutput) } // The Type of Namespace, such as `Messaging` or `NotificationHub`. func (o LookupNamespaceResultOutput) NamespaceType() pulumi.StringOutput { return o.ApplyT(func(v LookupNamespaceResult) string { return v.NamespaceType }).(pulumi.StringOutput) } func (o LookupNamespaceResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupNamespaceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o LookupNamespaceResultOutput) ServicebusEndpoint() pulumi.StringOutput { return o.ApplyT(func(v LookupNamespaceResult) string { return v.ServicebusEndpoint }).(pulumi.StringOutput) } // A `sku` block as defined below. func (o LookupNamespaceResultOutput) Sku() GetNamespaceSkuOutput { return o.ApplyT(func(v LookupNamespaceResult) GetNamespaceSku { return v.Sku }).(GetNamespaceSkuOutput) } // A mapping of tags to assign to the resource. func (o LookupNamespaceResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupNamespaceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupNamespaceResultOutput{}) }
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/notificationhub/init.go
sdk/go/azure/notificationhub/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 notificationhub 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:notificationhub/authorizationRule:AuthorizationRule": r = &AuthorizationRule{} case "azure:notificationhub/hub:Hub": r = &Hub{} case "azure:notificationhub/namespace:Namespace": r = &Namespace{} 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", "notificationhub/authorizationRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "notificationhub/hub", &module{version}, ) pulumi.RegisterResourceModule( "azure", "notificationhub/namespace", &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/notificationhub/pulumiTypes.go
sdk/go/azure/notificationhub/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 notificationhub 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 HubApnsCredential struct { // The Application Mode which defines which server the APNS Messages should be sent to. Possible values are `Production` and `Sandbox`. ApplicationMode string `pulumi:"applicationMode"` // The Bundle ID of the iOS/macOS application to send push notifications for, such as `com.org.example`. BundleId string `pulumi:"bundleId"` // The Apple Push Notifications Service (APNS) Key. KeyId string `pulumi:"keyId"` // The ID of the team the Token. TeamId string `pulumi:"teamId"` // The Push Token associated with the Apple Developer Account. This is the contents of the `key` downloaded from [the Apple Developer Portal](https://developer.apple.com/account/ios/authkey/) between the `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----` blocks. Token string `pulumi:"token"` } // HubApnsCredentialInput is an input type that accepts HubApnsCredentialArgs and HubApnsCredentialOutput values. // You can construct a concrete instance of `HubApnsCredentialInput` via: // // HubApnsCredentialArgs{...} type HubApnsCredentialInput interface { pulumi.Input ToHubApnsCredentialOutput() HubApnsCredentialOutput ToHubApnsCredentialOutputWithContext(context.Context) HubApnsCredentialOutput } type HubApnsCredentialArgs struct { // The Application Mode which defines which server the APNS Messages should be sent to. Possible values are `Production` and `Sandbox`. ApplicationMode pulumi.StringInput `pulumi:"applicationMode"` // The Bundle ID of the iOS/macOS application to send push notifications for, such as `com.org.example`. BundleId pulumi.StringInput `pulumi:"bundleId"` // The Apple Push Notifications Service (APNS) Key. KeyId pulumi.StringInput `pulumi:"keyId"` // The ID of the team the Token. TeamId pulumi.StringInput `pulumi:"teamId"` // The Push Token associated with the Apple Developer Account. This is the contents of the `key` downloaded from [the Apple Developer Portal](https://developer.apple.com/account/ios/authkey/) between the `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----` blocks. Token pulumi.StringInput `pulumi:"token"` } func (HubApnsCredentialArgs) ElementType() reflect.Type { return reflect.TypeOf((*HubApnsCredential)(nil)).Elem() } func (i HubApnsCredentialArgs) ToHubApnsCredentialOutput() HubApnsCredentialOutput { return i.ToHubApnsCredentialOutputWithContext(context.Background()) } func (i HubApnsCredentialArgs) ToHubApnsCredentialOutputWithContext(ctx context.Context) HubApnsCredentialOutput { return pulumi.ToOutputWithContext(ctx, i).(HubApnsCredentialOutput) } func (i HubApnsCredentialArgs) ToHubApnsCredentialPtrOutput() HubApnsCredentialPtrOutput { return i.ToHubApnsCredentialPtrOutputWithContext(context.Background()) } func (i HubApnsCredentialArgs) ToHubApnsCredentialPtrOutputWithContext(ctx context.Context) HubApnsCredentialPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(HubApnsCredentialOutput).ToHubApnsCredentialPtrOutputWithContext(ctx) } // HubApnsCredentialPtrInput is an input type that accepts HubApnsCredentialArgs, HubApnsCredentialPtr and HubApnsCredentialPtrOutput values. // You can construct a concrete instance of `HubApnsCredentialPtrInput` via: // // HubApnsCredentialArgs{...} // // or: // // nil type HubApnsCredentialPtrInput interface { pulumi.Input ToHubApnsCredentialPtrOutput() HubApnsCredentialPtrOutput ToHubApnsCredentialPtrOutputWithContext(context.Context) HubApnsCredentialPtrOutput } type hubApnsCredentialPtrType HubApnsCredentialArgs func HubApnsCredentialPtr(v *HubApnsCredentialArgs) HubApnsCredentialPtrInput { return (*hubApnsCredentialPtrType)(v) } func (*hubApnsCredentialPtrType) ElementType() reflect.Type { return reflect.TypeOf((**HubApnsCredential)(nil)).Elem() } func (i *hubApnsCredentialPtrType) ToHubApnsCredentialPtrOutput() HubApnsCredentialPtrOutput { return i.ToHubApnsCredentialPtrOutputWithContext(context.Background()) } func (i *hubApnsCredentialPtrType) ToHubApnsCredentialPtrOutputWithContext(ctx context.Context) HubApnsCredentialPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(HubApnsCredentialPtrOutput) } type HubApnsCredentialOutput struct{ *pulumi.OutputState } func (HubApnsCredentialOutput) ElementType() reflect.Type { return reflect.TypeOf((*HubApnsCredential)(nil)).Elem() } func (o HubApnsCredentialOutput) ToHubApnsCredentialOutput() HubApnsCredentialOutput { return o } func (o HubApnsCredentialOutput) ToHubApnsCredentialOutputWithContext(ctx context.Context) HubApnsCredentialOutput { return o } func (o HubApnsCredentialOutput) ToHubApnsCredentialPtrOutput() HubApnsCredentialPtrOutput { return o.ToHubApnsCredentialPtrOutputWithContext(context.Background()) } func (o HubApnsCredentialOutput) ToHubApnsCredentialPtrOutputWithContext(ctx context.Context) HubApnsCredentialPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v HubApnsCredential) *HubApnsCredential { return &v }).(HubApnsCredentialPtrOutput) } // The Application Mode which defines which server the APNS Messages should be sent to. Possible values are `Production` and `Sandbox`. func (o HubApnsCredentialOutput) ApplicationMode() pulumi.StringOutput { return o.ApplyT(func(v HubApnsCredential) string { return v.ApplicationMode }).(pulumi.StringOutput) } // The Bundle ID of the iOS/macOS application to send push notifications for, such as `com.org.example`. func (o HubApnsCredentialOutput) BundleId() pulumi.StringOutput { return o.ApplyT(func(v HubApnsCredential) string { return v.BundleId }).(pulumi.StringOutput) } // The Apple Push Notifications Service (APNS) Key. func (o HubApnsCredentialOutput) KeyId() pulumi.StringOutput { return o.ApplyT(func(v HubApnsCredential) string { return v.KeyId }).(pulumi.StringOutput) } // The ID of the team the Token. func (o HubApnsCredentialOutput) TeamId() pulumi.StringOutput { return o.ApplyT(func(v HubApnsCredential) string { return v.TeamId }).(pulumi.StringOutput) } // The Push Token associated with the Apple Developer Account. This is the contents of the `key` downloaded from [the Apple Developer Portal](https://developer.apple.com/account/ios/authkey/) between the `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----` blocks. func (o HubApnsCredentialOutput) Token() pulumi.StringOutput { return o.ApplyT(func(v HubApnsCredential) string { return v.Token }).(pulumi.StringOutput) } type HubApnsCredentialPtrOutput struct{ *pulumi.OutputState } func (HubApnsCredentialPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**HubApnsCredential)(nil)).Elem() } func (o HubApnsCredentialPtrOutput) ToHubApnsCredentialPtrOutput() HubApnsCredentialPtrOutput { return o } func (o HubApnsCredentialPtrOutput) ToHubApnsCredentialPtrOutputWithContext(ctx context.Context) HubApnsCredentialPtrOutput { return o } func (o HubApnsCredentialPtrOutput) Elem() HubApnsCredentialOutput { return o.ApplyT(func(v *HubApnsCredential) HubApnsCredential { if v != nil { return *v } var ret HubApnsCredential return ret }).(HubApnsCredentialOutput) } // The Application Mode which defines which server the APNS Messages should be sent to. Possible values are `Production` and `Sandbox`. func (o HubApnsCredentialPtrOutput) ApplicationMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubApnsCredential) *string { if v == nil { return nil } return &v.ApplicationMode }).(pulumi.StringPtrOutput) } // The Bundle ID of the iOS/macOS application to send push notifications for, such as `com.org.example`. func (o HubApnsCredentialPtrOutput) BundleId() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubApnsCredential) *string { if v == nil { return nil } return &v.BundleId }).(pulumi.StringPtrOutput) } // The Apple Push Notifications Service (APNS) Key. func (o HubApnsCredentialPtrOutput) KeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubApnsCredential) *string { if v == nil { return nil } return &v.KeyId }).(pulumi.StringPtrOutput) } // The ID of the team the Token. func (o HubApnsCredentialPtrOutput) TeamId() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubApnsCredential) *string { if v == nil { return nil } return &v.TeamId }).(pulumi.StringPtrOutput) } // The Push Token associated with the Apple Developer Account. This is the contents of the `key` downloaded from [the Apple Developer Portal](https://developer.apple.com/account/ios/authkey/) between the `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----` blocks. func (o HubApnsCredentialPtrOutput) Token() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubApnsCredential) *string { if v == nil { return nil } return &v.Token }).(pulumi.StringPtrOutput) } type HubBrowserCredential struct { // The subject name of web push. Subject string `pulumi:"subject"` // The Voluntary Application Server Identification (VAPID) private key. VapidPrivateKey string `pulumi:"vapidPrivateKey"` // The Voluntary Application Server Identification (VAPID) public key. VapidPublicKey string `pulumi:"vapidPublicKey"` } // HubBrowserCredentialInput is an input type that accepts HubBrowserCredentialArgs and HubBrowserCredentialOutput values. // You can construct a concrete instance of `HubBrowserCredentialInput` via: // // HubBrowserCredentialArgs{...} type HubBrowserCredentialInput interface { pulumi.Input ToHubBrowserCredentialOutput() HubBrowserCredentialOutput ToHubBrowserCredentialOutputWithContext(context.Context) HubBrowserCredentialOutput } type HubBrowserCredentialArgs struct { // The subject name of web push. Subject pulumi.StringInput `pulumi:"subject"` // The Voluntary Application Server Identification (VAPID) private key. VapidPrivateKey pulumi.StringInput `pulumi:"vapidPrivateKey"` // The Voluntary Application Server Identification (VAPID) public key. VapidPublicKey pulumi.StringInput `pulumi:"vapidPublicKey"` } func (HubBrowserCredentialArgs) ElementType() reflect.Type { return reflect.TypeOf((*HubBrowserCredential)(nil)).Elem() } func (i HubBrowserCredentialArgs) ToHubBrowserCredentialOutput() HubBrowserCredentialOutput { return i.ToHubBrowserCredentialOutputWithContext(context.Background()) } func (i HubBrowserCredentialArgs) ToHubBrowserCredentialOutputWithContext(ctx context.Context) HubBrowserCredentialOutput { return pulumi.ToOutputWithContext(ctx, i).(HubBrowserCredentialOutput) } func (i HubBrowserCredentialArgs) ToHubBrowserCredentialPtrOutput() HubBrowserCredentialPtrOutput { return i.ToHubBrowserCredentialPtrOutputWithContext(context.Background()) } func (i HubBrowserCredentialArgs) ToHubBrowserCredentialPtrOutputWithContext(ctx context.Context) HubBrowserCredentialPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(HubBrowserCredentialOutput).ToHubBrowserCredentialPtrOutputWithContext(ctx) } // HubBrowserCredentialPtrInput is an input type that accepts HubBrowserCredentialArgs, HubBrowserCredentialPtr and HubBrowserCredentialPtrOutput values. // You can construct a concrete instance of `HubBrowserCredentialPtrInput` via: // // HubBrowserCredentialArgs{...} // // or: // // nil type HubBrowserCredentialPtrInput interface { pulumi.Input ToHubBrowserCredentialPtrOutput() HubBrowserCredentialPtrOutput ToHubBrowserCredentialPtrOutputWithContext(context.Context) HubBrowserCredentialPtrOutput } type hubBrowserCredentialPtrType HubBrowserCredentialArgs func HubBrowserCredentialPtr(v *HubBrowserCredentialArgs) HubBrowserCredentialPtrInput { return (*hubBrowserCredentialPtrType)(v) } func (*hubBrowserCredentialPtrType) ElementType() reflect.Type { return reflect.TypeOf((**HubBrowserCredential)(nil)).Elem() } func (i *hubBrowserCredentialPtrType) ToHubBrowserCredentialPtrOutput() HubBrowserCredentialPtrOutput { return i.ToHubBrowserCredentialPtrOutputWithContext(context.Background()) } func (i *hubBrowserCredentialPtrType) ToHubBrowserCredentialPtrOutputWithContext(ctx context.Context) HubBrowserCredentialPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(HubBrowserCredentialPtrOutput) } type HubBrowserCredentialOutput struct{ *pulumi.OutputState } func (HubBrowserCredentialOutput) ElementType() reflect.Type { return reflect.TypeOf((*HubBrowserCredential)(nil)).Elem() } func (o HubBrowserCredentialOutput) ToHubBrowserCredentialOutput() HubBrowserCredentialOutput { return o } func (o HubBrowserCredentialOutput) ToHubBrowserCredentialOutputWithContext(ctx context.Context) HubBrowserCredentialOutput { return o } func (o HubBrowserCredentialOutput) ToHubBrowserCredentialPtrOutput() HubBrowserCredentialPtrOutput { return o.ToHubBrowserCredentialPtrOutputWithContext(context.Background()) } func (o HubBrowserCredentialOutput) ToHubBrowserCredentialPtrOutputWithContext(ctx context.Context) HubBrowserCredentialPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v HubBrowserCredential) *HubBrowserCredential { return &v }).(HubBrowserCredentialPtrOutput) } // The subject name of web push. func (o HubBrowserCredentialOutput) Subject() pulumi.StringOutput { return o.ApplyT(func(v HubBrowserCredential) string { return v.Subject }).(pulumi.StringOutput) } // The Voluntary Application Server Identification (VAPID) private key. func (o HubBrowserCredentialOutput) VapidPrivateKey() pulumi.StringOutput { return o.ApplyT(func(v HubBrowserCredential) string { return v.VapidPrivateKey }).(pulumi.StringOutput) } // The Voluntary Application Server Identification (VAPID) public key. func (o HubBrowserCredentialOutput) VapidPublicKey() pulumi.StringOutput { return o.ApplyT(func(v HubBrowserCredential) string { return v.VapidPublicKey }).(pulumi.StringOutput) } type HubBrowserCredentialPtrOutput struct{ *pulumi.OutputState } func (HubBrowserCredentialPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**HubBrowserCredential)(nil)).Elem() } func (o HubBrowserCredentialPtrOutput) ToHubBrowserCredentialPtrOutput() HubBrowserCredentialPtrOutput { return o } func (o HubBrowserCredentialPtrOutput) ToHubBrowserCredentialPtrOutputWithContext(ctx context.Context) HubBrowserCredentialPtrOutput { return o } func (o HubBrowserCredentialPtrOutput) Elem() HubBrowserCredentialOutput { return o.ApplyT(func(v *HubBrowserCredential) HubBrowserCredential { if v != nil { return *v } var ret HubBrowserCredential return ret }).(HubBrowserCredentialOutput) } // The subject name of web push. func (o HubBrowserCredentialPtrOutput) Subject() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubBrowserCredential) *string { if v == nil { return nil } return &v.Subject }).(pulumi.StringPtrOutput) } // The Voluntary Application Server Identification (VAPID) private key. func (o HubBrowserCredentialPtrOutput) VapidPrivateKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubBrowserCredential) *string { if v == nil { return nil } return &v.VapidPrivateKey }).(pulumi.StringPtrOutput) } // The Voluntary Application Server Identification (VAPID) public key. func (o HubBrowserCredentialPtrOutput) VapidPublicKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubBrowserCredential) *string { if v == nil { return nil } return &v.VapidPublicKey }).(pulumi.StringPtrOutput) } type HubGcmCredential struct { // The API Key associated with the Google Cloud Messaging service. ApiKey string `pulumi:"apiKey"` } // HubGcmCredentialInput is an input type that accepts HubGcmCredentialArgs and HubGcmCredentialOutput values. // You can construct a concrete instance of `HubGcmCredentialInput` via: // // HubGcmCredentialArgs{...} type HubGcmCredentialInput interface { pulumi.Input ToHubGcmCredentialOutput() HubGcmCredentialOutput ToHubGcmCredentialOutputWithContext(context.Context) HubGcmCredentialOutput } type HubGcmCredentialArgs struct { // The API Key associated with the Google Cloud Messaging service. ApiKey pulumi.StringInput `pulumi:"apiKey"` } func (HubGcmCredentialArgs) ElementType() reflect.Type { return reflect.TypeOf((*HubGcmCredential)(nil)).Elem() } func (i HubGcmCredentialArgs) ToHubGcmCredentialOutput() HubGcmCredentialOutput { return i.ToHubGcmCredentialOutputWithContext(context.Background()) } func (i HubGcmCredentialArgs) ToHubGcmCredentialOutputWithContext(ctx context.Context) HubGcmCredentialOutput { return pulumi.ToOutputWithContext(ctx, i).(HubGcmCredentialOutput) } func (i HubGcmCredentialArgs) ToHubGcmCredentialPtrOutput() HubGcmCredentialPtrOutput { return i.ToHubGcmCredentialPtrOutputWithContext(context.Background()) } func (i HubGcmCredentialArgs) ToHubGcmCredentialPtrOutputWithContext(ctx context.Context) HubGcmCredentialPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(HubGcmCredentialOutput).ToHubGcmCredentialPtrOutputWithContext(ctx) } // HubGcmCredentialPtrInput is an input type that accepts HubGcmCredentialArgs, HubGcmCredentialPtr and HubGcmCredentialPtrOutput values. // You can construct a concrete instance of `HubGcmCredentialPtrInput` via: // // HubGcmCredentialArgs{...} // // or: // // nil type HubGcmCredentialPtrInput interface { pulumi.Input ToHubGcmCredentialPtrOutput() HubGcmCredentialPtrOutput ToHubGcmCredentialPtrOutputWithContext(context.Context) HubGcmCredentialPtrOutput } type hubGcmCredentialPtrType HubGcmCredentialArgs func HubGcmCredentialPtr(v *HubGcmCredentialArgs) HubGcmCredentialPtrInput { return (*hubGcmCredentialPtrType)(v) } func (*hubGcmCredentialPtrType) ElementType() reflect.Type { return reflect.TypeOf((**HubGcmCredential)(nil)).Elem() } func (i *hubGcmCredentialPtrType) ToHubGcmCredentialPtrOutput() HubGcmCredentialPtrOutput { return i.ToHubGcmCredentialPtrOutputWithContext(context.Background()) } func (i *hubGcmCredentialPtrType) ToHubGcmCredentialPtrOutputWithContext(ctx context.Context) HubGcmCredentialPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(HubGcmCredentialPtrOutput) } type HubGcmCredentialOutput struct{ *pulumi.OutputState } func (HubGcmCredentialOutput) ElementType() reflect.Type { return reflect.TypeOf((*HubGcmCredential)(nil)).Elem() } func (o HubGcmCredentialOutput) ToHubGcmCredentialOutput() HubGcmCredentialOutput { return o } func (o HubGcmCredentialOutput) ToHubGcmCredentialOutputWithContext(ctx context.Context) HubGcmCredentialOutput { return o } func (o HubGcmCredentialOutput) ToHubGcmCredentialPtrOutput() HubGcmCredentialPtrOutput { return o.ToHubGcmCredentialPtrOutputWithContext(context.Background()) } func (o HubGcmCredentialOutput) ToHubGcmCredentialPtrOutputWithContext(ctx context.Context) HubGcmCredentialPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v HubGcmCredential) *HubGcmCredential { return &v }).(HubGcmCredentialPtrOutput) } // The API Key associated with the Google Cloud Messaging service. func (o HubGcmCredentialOutput) ApiKey() pulumi.StringOutput { return o.ApplyT(func(v HubGcmCredential) string { return v.ApiKey }).(pulumi.StringOutput) } type HubGcmCredentialPtrOutput struct{ *pulumi.OutputState } func (HubGcmCredentialPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**HubGcmCredential)(nil)).Elem() } func (o HubGcmCredentialPtrOutput) ToHubGcmCredentialPtrOutput() HubGcmCredentialPtrOutput { return o } func (o HubGcmCredentialPtrOutput) ToHubGcmCredentialPtrOutputWithContext(ctx context.Context) HubGcmCredentialPtrOutput { return o } func (o HubGcmCredentialPtrOutput) Elem() HubGcmCredentialOutput { return o.ApplyT(func(v *HubGcmCredential) HubGcmCredential { if v != nil { return *v } var ret HubGcmCredential return ret }).(HubGcmCredentialOutput) } // The API Key associated with the Google Cloud Messaging service. func (o HubGcmCredentialPtrOutput) ApiKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubGcmCredential) *string { if v == nil { return nil } return &v.ApiKey }).(pulumi.StringPtrOutput) } type GetHubApnsCredential struct { // The Application Mode which defines which server the APNS Messages should be sent to. Possible values are `Production` and `Sandbox`. ApplicationMode string `pulumi:"applicationMode"` // The Bundle ID of the iOS/macOS application to send push notifications for, such as `com.org.example`. BundleId string `pulumi:"bundleId"` // The Apple Push Notifications Service (APNS) Key. KeyId string `pulumi:"keyId"` // The ID of the team the Token. TeamId string `pulumi:"teamId"` // The Push Token associated with the Apple Developer Account. Token string `pulumi:"token"` } // GetHubApnsCredentialInput is an input type that accepts GetHubApnsCredentialArgs and GetHubApnsCredentialOutput values. // You can construct a concrete instance of `GetHubApnsCredentialInput` via: // // GetHubApnsCredentialArgs{...} type GetHubApnsCredentialInput interface { pulumi.Input ToGetHubApnsCredentialOutput() GetHubApnsCredentialOutput ToGetHubApnsCredentialOutputWithContext(context.Context) GetHubApnsCredentialOutput } type GetHubApnsCredentialArgs struct { // The Application Mode which defines which server the APNS Messages should be sent to. Possible values are `Production` and `Sandbox`. ApplicationMode pulumi.StringInput `pulumi:"applicationMode"` // The Bundle ID of the iOS/macOS application to send push notifications for, such as `com.org.example`. BundleId pulumi.StringInput `pulumi:"bundleId"` // The Apple Push Notifications Service (APNS) Key. KeyId pulumi.StringInput `pulumi:"keyId"` // The ID of the team the Token. TeamId pulumi.StringInput `pulumi:"teamId"` // The Push Token associated with the Apple Developer Account. Token pulumi.StringInput `pulumi:"token"` } func (GetHubApnsCredentialArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetHubApnsCredential)(nil)).Elem() } func (i GetHubApnsCredentialArgs) ToGetHubApnsCredentialOutput() GetHubApnsCredentialOutput { return i.ToGetHubApnsCredentialOutputWithContext(context.Background()) } func (i GetHubApnsCredentialArgs) ToGetHubApnsCredentialOutputWithContext(ctx context.Context) GetHubApnsCredentialOutput { return pulumi.ToOutputWithContext(ctx, i).(GetHubApnsCredentialOutput) } // GetHubApnsCredentialArrayInput is an input type that accepts GetHubApnsCredentialArray and GetHubApnsCredentialArrayOutput values. // You can construct a concrete instance of `GetHubApnsCredentialArrayInput` via: // // GetHubApnsCredentialArray{ GetHubApnsCredentialArgs{...} } type GetHubApnsCredentialArrayInput interface { pulumi.Input ToGetHubApnsCredentialArrayOutput() GetHubApnsCredentialArrayOutput ToGetHubApnsCredentialArrayOutputWithContext(context.Context) GetHubApnsCredentialArrayOutput } type GetHubApnsCredentialArray []GetHubApnsCredentialInput func (GetHubApnsCredentialArray) ElementType() reflect.Type { return reflect.TypeOf((*[]GetHubApnsCredential)(nil)).Elem() } func (i GetHubApnsCredentialArray) ToGetHubApnsCredentialArrayOutput() GetHubApnsCredentialArrayOutput { return i.ToGetHubApnsCredentialArrayOutputWithContext(context.Background()) } func (i GetHubApnsCredentialArray) ToGetHubApnsCredentialArrayOutputWithContext(ctx context.Context) GetHubApnsCredentialArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GetHubApnsCredentialArrayOutput) } type GetHubApnsCredentialOutput struct{ *pulumi.OutputState } func (GetHubApnsCredentialOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetHubApnsCredential)(nil)).Elem() } func (o GetHubApnsCredentialOutput) ToGetHubApnsCredentialOutput() GetHubApnsCredentialOutput { return o } func (o GetHubApnsCredentialOutput) ToGetHubApnsCredentialOutputWithContext(ctx context.Context) GetHubApnsCredentialOutput { return o } // The Application Mode which defines which server the APNS Messages should be sent to. Possible values are `Production` and `Sandbox`. func (o GetHubApnsCredentialOutput) ApplicationMode() pulumi.StringOutput { return o.ApplyT(func(v GetHubApnsCredential) string { return v.ApplicationMode }).(pulumi.StringOutput) } // The Bundle ID of the iOS/macOS application to send push notifications for, such as `com.org.example`. func (o GetHubApnsCredentialOutput) BundleId() pulumi.StringOutput { return o.ApplyT(func(v GetHubApnsCredential) string { return v.BundleId }).(pulumi.StringOutput) } // The Apple Push Notifications Service (APNS) Key. func (o GetHubApnsCredentialOutput) KeyId() pulumi.StringOutput { return o.ApplyT(func(v GetHubApnsCredential) string { return v.KeyId }).(pulumi.StringOutput) } // The ID of the team the Token. func (o GetHubApnsCredentialOutput) TeamId() pulumi.StringOutput { return o.ApplyT(func(v GetHubApnsCredential) string { return v.TeamId }).(pulumi.StringOutput) } // The Push Token associated with the Apple Developer Account. func (o GetHubApnsCredentialOutput) Token() pulumi.StringOutput { return o.ApplyT(func(v GetHubApnsCredential) string { return v.Token }).(pulumi.StringOutput) } type GetHubApnsCredentialArrayOutput struct{ *pulumi.OutputState } func (GetHubApnsCredentialArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]GetHubApnsCredential)(nil)).Elem() } func (o GetHubApnsCredentialArrayOutput) ToGetHubApnsCredentialArrayOutput() GetHubApnsCredentialArrayOutput { return o } func (o GetHubApnsCredentialArrayOutput) ToGetHubApnsCredentialArrayOutputWithContext(ctx context.Context) GetHubApnsCredentialArrayOutput { return o } func (o GetHubApnsCredentialArrayOutput) Index(i pulumi.IntInput) GetHubApnsCredentialOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetHubApnsCredential { return vs[0].([]GetHubApnsCredential)[vs[1].(int)] }).(GetHubApnsCredentialOutput) } type GetHubGcmCredential struct { // The API Key associated with the Google Cloud Messaging service. ApiKey string `pulumi:"apiKey"` } // GetHubGcmCredentialInput is an input type that accepts GetHubGcmCredentialArgs and GetHubGcmCredentialOutput values. // You can construct a concrete instance of `GetHubGcmCredentialInput` via: // // GetHubGcmCredentialArgs{...} type GetHubGcmCredentialInput interface { pulumi.Input ToGetHubGcmCredentialOutput() GetHubGcmCredentialOutput ToGetHubGcmCredentialOutputWithContext(context.Context) GetHubGcmCredentialOutput } type GetHubGcmCredentialArgs struct { // The API Key associated with the Google Cloud Messaging service. ApiKey pulumi.StringInput `pulumi:"apiKey"` } func (GetHubGcmCredentialArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetHubGcmCredential)(nil)).Elem() } func (i GetHubGcmCredentialArgs) ToGetHubGcmCredentialOutput() GetHubGcmCredentialOutput { return i.ToGetHubGcmCredentialOutputWithContext(context.Background()) } func (i GetHubGcmCredentialArgs) ToGetHubGcmCredentialOutputWithContext(ctx context.Context) GetHubGcmCredentialOutput { return pulumi.ToOutputWithContext(ctx, i).(GetHubGcmCredentialOutput) } // GetHubGcmCredentialArrayInput is an input type that accepts GetHubGcmCredentialArray and GetHubGcmCredentialArrayOutput values. // You can construct a concrete instance of `GetHubGcmCredentialArrayInput` via: // // GetHubGcmCredentialArray{ GetHubGcmCredentialArgs{...} } type GetHubGcmCredentialArrayInput interface { pulumi.Input ToGetHubGcmCredentialArrayOutput() GetHubGcmCredentialArrayOutput ToGetHubGcmCredentialArrayOutputWithContext(context.Context) GetHubGcmCredentialArrayOutput } type GetHubGcmCredentialArray []GetHubGcmCredentialInput func (GetHubGcmCredentialArray) ElementType() reflect.Type { return reflect.TypeOf((*[]GetHubGcmCredential)(nil)).Elem() } func (i GetHubGcmCredentialArray) ToGetHubGcmCredentialArrayOutput() GetHubGcmCredentialArrayOutput { return i.ToGetHubGcmCredentialArrayOutputWithContext(context.Background()) } func (i GetHubGcmCredentialArray) ToGetHubGcmCredentialArrayOutputWithContext(ctx context.Context) GetHubGcmCredentialArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GetHubGcmCredentialArrayOutput) } type GetHubGcmCredentialOutput struct{ *pulumi.OutputState } func (GetHubGcmCredentialOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetHubGcmCredential)(nil)).Elem() } func (o GetHubGcmCredentialOutput) ToGetHubGcmCredentialOutput() GetHubGcmCredentialOutput { return o } func (o GetHubGcmCredentialOutput) ToGetHubGcmCredentialOutputWithContext(ctx context.Context) GetHubGcmCredentialOutput { return o } // The API Key associated with the Google Cloud Messaging service. func (o GetHubGcmCredentialOutput) ApiKey() pulumi.StringOutput { return o.ApplyT(func(v GetHubGcmCredential) string { return v.ApiKey }).(pulumi.StringOutput) } type GetHubGcmCredentialArrayOutput struct{ *pulumi.OutputState } func (GetHubGcmCredentialArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]GetHubGcmCredential)(nil)).Elem() } func (o GetHubGcmCredentialArrayOutput) ToGetHubGcmCredentialArrayOutput() GetHubGcmCredentialArrayOutput { return o } func (o GetHubGcmCredentialArrayOutput) ToGetHubGcmCredentialArrayOutputWithContext(ctx context.Context) GetHubGcmCredentialArrayOutput { return o } func (o GetHubGcmCredentialArrayOutput) Index(i pulumi.IntInput) GetHubGcmCredentialOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetHubGcmCredential { return vs[0].([]GetHubGcmCredential)[vs[1].(int)] }).(GetHubGcmCredentialOutput) } type GetNamespaceSku struct { // Specifies the Name of the Notification Hub Namespace. Name string `pulumi:"name"` } // GetNamespaceSkuInput is an input type that accepts GetNamespaceSkuArgs and GetNamespaceSkuOutput values. // You can construct a concrete instance of `GetNamespaceSkuInput` via: // // GetNamespaceSkuArgs{...} type GetNamespaceSkuInput interface { pulumi.Input ToGetNamespaceSkuOutput() GetNamespaceSkuOutput ToGetNamespaceSkuOutputWithContext(context.Context) GetNamespaceSkuOutput } type GetNamespaceSkuArgs struct { // Specifies the Name of the Notification Hub Namespace. Name pulumi.StringInput `pulumi:"name"` } func (GetNamespaceSkuArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetNamespaceSku)(nil)).Elem() } func (i GetNamespaceSkuArgs) ToGetNamespaceSkuOutput() GetNamespaceSkuOutput { return i.ToGetNamespaceSkuOutputWithContext(context.Background()) } func (i GetNamespaceSkuArgs) ToGetNamespaceSkuOutputWithContext(ctx context.Context) GetNamespaceSkuOutput { return pulumi.ToOutputWithContext(ctx, i).(GetNamespaceSkuOutput) } type GetNamespaceSkuOutput struct{ *pulumi.OutputState } func (GetNamespaceSkuOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetNamespaceSku)(nil)).Elem() } func (o GetNamespaceSkuOutput) ToGetNamespaceSkuOutput() GetNamespaceSkuOutput { return o } func (o GetNamespaceSkuOutput) ToGetNamespaceSkuOutputWithContext(ctx context.Context) GetNamespaceSkuOutput { return o } // Specifies the Name of the Notification Hub Namespace. func (o GetNamespaceSkuOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetNamespaceSku) string { return v.Name }).(pulumi.StringOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*HubApnsCredentialInput)(nil)).Elem(), HubApnsCredentialArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*HubApnsCredentialPtrInput)(nil)).Elem(), HubApnsCredentialArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*HubBrowserCredentialInput)(nil)).Elem(), HubBrowserCredentialArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*HubBrowserCredentialPtrInput)(nil)).Elem(), HubBrowserCredentialArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*HubGcmCredentialInput)(nil)).Elem(), HubGcmCredentialArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*HubGcmCredentialPtrInput)(nil)).Elem(), HubGcmCredentialArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetHubApnsCredentialInput)(nil)).Elem(), GetHubApnsCredentialArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetHubApnsCredentialArrayInput)(nil)).Elem(), GetHubApnsCredentialArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetHubGcmCredentialInput)(nil)).Elem(), GetHubGcmCredentialArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetHubGcmCredentialArrayInput)(nil)).Elem(), GetHubGcmCredentialArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetNamespaceSkuInput)(nil)).Elem(), GetNamespaceSkuArgs{}) pulumi.RegisterOutputType(HubApnsCredentialOutput{}) pulumi.RegisterOutputType(HubApnsCredentialPtrOutput{})
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/notificationhub/hub.go
sdk/go/azure/notificationhub/hub.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 notificationhub import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Notification Hub within a Notification Hub Namespace. // // ## 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/notificationhub" // "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("notificationhub-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleNamespace, err := notificationhub.NewNamespace(ctx, "example", &notificationhub.NamespaceArgs{ // Name: pulumi.String("myappnamespace"), // ResourceGroupName: example.Name, // Location: example.Location, // NamespaceType: pulumi.String("NotificationHub"), // SkuName: pulumi.String("Free"), // }) // if err != nil { // return err // } // _, err = notificationhub.NewHub(ctx, "example", &notificationhub.HubArgs{ // Name: pulumi.String("mynotificationhub"), // NamespaceName: exampleNamespace.Name, // 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.NotificationHubs` - 2023-09-01 // // ## Import // // Notification Hubs can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:notificationhub/hub:Hub hub1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.NotificationHubs/namespaces/namespace1/notificationHubs/hub1 // ``` type Hub struct { pulumi.CustomResourceState // A `apnsCredential` block as defined below. // // > **Note:** Removing the `apnsCredential` block will currently force a recreation of this resource [due to this bug in the Azure SDK for Go](https://github.com/Azure/azure-sdk-for-go/issues/2246) - we'll remove this limitation when the SDK bug is fixed. ApnsCredential HubApnsCredentialPtrOutput `pulumi:"apnsCredential"` // A `browserCredential` block as defined below. Changing this forces a new resource to be created. BrowserCredential HubBrowserCredentialPtrOutput `pulumi:"browserCredential"` // A `gcmCredential` block as defined below. // // > **Note:** Removing the `gcmCredential` block will currently force a recreation of this resource [due to this bug in the Azure SDK for Go](https://github.com/Azure/azure-sdk-for-go/issues/2246) - we'll remove this limitation when the SDK bug is fixed. GcmCredential HubGcmCredentialPtrOutput `pulumi:"gcmCredential"` // The Azure Region in which this Notification Hub Namespace exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name to use for this Notification Hub. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Notification Hub Namespace in which to create this Notification Hub. Changing this forces a new resource to be created. NamespaceName pulumi.StringOutput `pulumi:"namespaceName"` // The name of the Resource Group in which the Notification Hub Namespace exists. 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"` } // NewHub registers a new resource with the given unique name, arguments, and options. func NewHub(ctx *pulumi.Context, name string, args *HubArgs, opts ...pulumi.ResourceOption) (*Hub, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NamespaceName == nil { return nil, errors.New("invalid value for required argument 'NamespaceName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Hub err := ctx.RegisterResource("azure:notificationhub/hub:Hub", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetHub gets an existing Hub 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 GetHub(ctx *pulumi.Context, name string, id pulumi.IDInput, state *HubState, opts ...pulumi.ResourceOption) (*Hub, error) { var resource Hub err := ctx.ReadResource("azure:notificationhub/hub:Hub", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Hub resources. type hubState struct { // A `apnsCredential` block as defined below. // // > **Note:** Removing the `apnsCredential` block will currently force a recreation of this resource [due to this bug in the Azure SDK for Go](https://github.com/Azure/azure-sdk-for-go/issues/2246) - we'll remove this limitation when the SDK bug is fixed. ApnsCredential *HubApnsCredential `pulumi:"apnsCredential"` // A `browserCredential` block as defined below. Changing this forces a new resource to be created. BrowserCredential *HubBrowserCredential `pulumi:"browserCredential"` // A `gcmCredential` block as defined below. // // > **Note:** Removing the `gcmCredential` block will currently force a recreation of this resource [due to this bug in the Azure SDK for Go](https://github.com/Azure/azure-sdk-for-go/issues/2246) - we'll remove this limitation when the SDK bug is fixed. GcmCredential *HubGcmCredential `pulumi:"gcmCredential"` // The Azure Region in which this Notification Hub Namespace exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name to use for this Notification Hub. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Notification Hub Namespace in which to create this Notification Hub. Changing this forces a new resource to be created. NamespaceName *string `pulumi:"namespaceName"` // The name of the Resource Group in which the Notification Hub Namespace exists. 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"` } type HubState struct { // A `apnsCredential` block as defined below. // // > **Note:** Removing the `apnsCredential` block will currently force a recreation of this resource [due to this bug in the Azure SDK for Go](https://github.com/Azure/azure-sdk-for-go/issues/2246) - we'll remove this limitation when the SDK bug is fixed. ApnsCredential HubApnsCredentialPtrInput // A `browserCredential` block as defined below. Changing this forces a new resource to be created. BrowserCredential HubBrowserCredentialPtrInput // A `gcmCredential` block as defined below. // // > **Note:** Removing the `gcmCredential` block will currently force a recreation of this resource [due to this bug in the Azure SDK for Go](https://github.com/Azure/azure-sdk-for-go/issues/2246) - we'll remove this limitation when the SDK bug is fixed. GcmCredential HubGcmCredentialPtrInput // The Azure Region in which this Notification Hub Namespace exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name to use for this Notification Hub. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Notification Hub Namespace in which to create this Notification Hub. Changing this forces a new resource to be created. NamespaceName pulumi.StringPtrInput // The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (HubState) ElementType() reflect.Type { return reflect.TypeOf((*hubState)(nil)).Elem() } type hubArgs struct { // A `apnsCredential` block as defined below. // // > **Note:** Removing the `apnsCredential` block will currently force a recreation of this resource [due to this bug in the Azure SDK for Go](https://github.com/Azure/azure-sdk-for-go/issues/2246) - we'll remove this limitation when the SDK bug is fixed. ApnsCredential *HubApnsCredential `pulumi:"apnsCredential"` // A `browserCredential` block as defined below. Changing this forces a new resource to be created. BrowserCredential *HubBrowserCredential `pulumi:"browserCredential"` // A `gcmCredential` block as defined below. // // > **Note:** Removing the `gcmCredential` block will currently force a recreation of this resource [due to this bug in the Azure SDK for Go](https://github.com/Azure/azure-sdk-for-go/issues/2246) - we'll remove this limitation when the SDK bug is fixed. GcmCredential *HubGcmCredential `pulumi:"gcmCredential"` // The Azure Region in which this Notification Hub Namespace exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name to use for this Notification Hub. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Notification Hub Namespace in which to create this Notification Hub. Changing this forces a new resource to be created. NamespaceName string `pulumi:"namespaceName"` // The name of the Resource Group in which the Notification Hub Namespace exists. 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"` } // The set of arguments for constructing a Hub resource. type HubArgs struct { // A `apnsCredential` block as defined below. // // > **Note:** Removing the `apnsCredential` block will currently force a recreation of this resource [due to this bug in the Azure SDK for Go](https://github.com/Azure/azure-sdk-for-go/issues/2246) - we'll remove this limitation when the SDK bug is fixed. ApnsCredential HubApnsCredentialPtrInput // A `browserCredential` block as defined below. Changing this forces a new resource to be created. BrowserCredential HubBrowserCredentialPtrInput // A `gcmCredential` block as defined below. // // > **Note:** Removing the `gcmCredential` block will currently force a recreation of this resource [due to this bug in the Azure SDK for Go](https://github.com/Azure/azure-sdk-for-go/issues/2246) - we'll remove this limitation when the SDK bug is fixed. GcmCredential HubGcmCredentialPtrInput // The Azure Region in which this Notification Hub Namespace exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name to use for this Notification Hub. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Notification Hub Namespace in which to create this Notification Hub. Changing this forces a new resource to be created. NamespaceName pulumi.StringInput // The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (HubArgs) ElementType() reflect.Type { return reflect.TypeOf((*hubArgs)(nil)).Elem() } type HubInput interface { pulumi.Input ToHubOutput() HubOutput ToHubOutputWithContext(ctx context.Context) HubOutput } func (*Hub) ElementType() reflect.Type { return reflect.TypeOf((**Hub)(nil)).Elem() } func (i *Hub) ToHubOutput() HubOutput { return i.ToHubOutputWithContext(context.Background()) } func (i *Hub) ToHubOutputWithContext(ctx context.Context) HubOutput { return pulumi.ToOutputWithContext(ctx, i).(HubOutput) } // HubArrayInput is an input type that accepts HubArray and HubArrayOutput values. // You can construct a concrete instance of `HubArrayInput` via: // // HubArray{ HubArgs{...} } type HubArrayInput interface { pulumi.Input ToHubArrayOutput() HubArrayOutput ToHubArrayOutputWithContext(context.Context) HubArrayOutput } type HubArray []HubInput func (HubArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Hub)(nil)).Elem() } func (i HubArray) ToHubArrayOutput() HubArrayOutput { return i.ToHubArrayOutputWithContext(context.Background()) } func (i HubArray) ToHubArrayOutputWithContext(ctx context.Context) HubArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(HubArrayOutput) } // HubMapInput is an input type that accepts HubMap and HubMapOutput values. // You can construct a concrete instance of `HubMapInput` via: // // HubMap{ "key": HubArgs{...} } type HubMapInput interface { pulumi.Input ToHubMapOutput() HubMapOutput ToHubMapOutputWithContext(context.Context) HubMapOutput } type HubMap map[string]HubInput func (HubMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Hub)(nil)).Elem() } func (i HubMap) ToHubMapOutput() HubMapOutput { return i.ToHubMapOutputWithContext(context.Background()) } func (i HubMap) ToHubMapOutputWithContext(ctx context.Context) HubMapOutput { return pulumi.ToOutputWithContext(ctx, i).(HubMapOutput) } type HubOutput struct{ *pulumi.OutputState } func (HubOutput) ElementType() reflect.Type { return reflect.TypeOf((**Hub)(nil)).Elem() } func (o HubOutput) ToHubOutput() HubOutput { return o } func (o HubOutput) ToHubOutputWithContext(ctx context.Context) HubOutput { return o } // A `apnsCredential` block as defined below. // // > **Note:** Removing the `apnsCredential` block will currently force a recreation of this resource [due to this bug in the Azure SDK for Go](https://github.com/Azure/azure-sdk-for-go/issues/2246) - we'll remove this limitation when the SDK bug is fixed. func (o HubOutput) ApnsCredential() HubApnsCredentialPtrOutput { return o.ApplyT(func(v *Hub) HubApnsCredentialPtrOutput { return v.ApnsCredential }).(HubApnsCredentialPtrOutput) } // A `browserCredential` block as defined below. Changing this forces a new resource to be created. func (o HubOutput) BrowserCredential() HubBrowserCredentialPtrOutput { return o.ApplyT(func(v *Hub) HubBrowserCredentialPtrOutput { return v.BrowserCredential }).(HubBrowserCredentialPtrOutput) } // A `gcmCredential` block as defined below. // // > **Note:** Removing the `gcmCredential` block will currently force a recreation of this resource [due to this bug in the Azure SDK for Go](https://github.com/Azure/azure-sdk-for-go/issues/2246) - we'll remove this limitation when the SDK bug is fixed. func (o HubOutput) GcmCredential() HubGcmCredentialPtrOutput { return o.ApplyT(func(v *Hub) HubGcmCredentialPtrOutput { return v.GcmCredential }).(HubGcmCredentialPtrOutput) } // The Azure Region in which this Notification Hub Namespace exists. Changing this forces a new resource to be created. func (o HubOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Hub) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name to use for this Notification Hub. Changing this forces a new resource to be created. func (o HubOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Hub) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Notification Hub Namespace in which to create this Notification Hub. Changing this forces a new resource to be created. func (o HubOutput) NamespaceName() pulumi.StringOutput { return o.ApplyT(func(v *Hub) pulumi.StringOutput { return v.NamespaceName }).(pulumi.StringOutput) } // The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created. func (o HubOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Hub) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o HubOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Hub) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type HubArrayOutput struct{ *pulumi.OutputState } func (HubArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Hub)(nil)).Elem() } func (o HubArrayOutput) ToHubArrayOutput() HubArrayOutput { return o } func (o HubArrayOutput) ToHubArrayOutputWithContext(ctx context.Context) HubArrayOutput { return o } func (o HubArrayOutput) Index(i pulumi.IntInput) HubOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Hub { return vs[0].([]*Hub)[vs[1].(int)] }).(HubOutput) } type HubMapOutput struct{ *pulumi.OutputState } func (HubMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Hub)(nil)).Elem() } func (o HubMapOutput) ToHubMapOutput() HubMapOutput { return o } func (o HubMapOutput) ToHubMapOutputWithContext(ctx context.Context) HubMapOutput { return o } func (o HubMapOutput) MapIndex(k pulumi.StringInput) HubOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Hub { return vs[0].(map[string]*Hub)[vs[1].(string)] }).(HubOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*HubInput)(nil)).Elem(), &Hub{}) pulumi.RegisterInputType(reflect.TypeOf((*HubArrayInput)(nil)).Elem(), HubArray{}) pulumi.RegisterInputType(reflect.TypeOf((*HubMapInput)(nil)).Elem(), HubMap{}) pulumi.RegisterOutputType(HubOutput{}) pulumi.RegisterOutputType(HubArrayOutput{}) pulumi.RegisterOutputType(HubMapOutput{}) }
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/notificationhub/authorizationRule.go
sdk/go/azure/notificationhub/authorizationRule.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 notificationhub import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Authorization Rule associated with a Notification Hub within a Notification Hub Namespace. // // ## 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/notificationhub" // "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("notificationhub-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleNamespace, err := notificationhub.NewNamespace(ctx, "example", &notificationhub.NamespaceArgs{ // Name: pulumi.String("myappnamespace"), // ResourceGroupName: example.Name, // Location: example.Location, // NamespaceType: pulumi.String("NotificationHub"), // SkuName: pulumi.String("Free"), // }) // if err != nil { // return err // } // exampleHub, err := notificationhub.NewHub(ctx, "example", &notificationhub.HubArgs{ // Name: pulumi.String("mynotificationhub"), // NamespaceName: exampleNamespace.Name, // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // _, err = notificationhub.NewAuthorizationRule(ctx, "example", &notificationhub.AuthorizationRuleArgs{ // Name: pulumi.String("management-auth-rule"), // NotificationHubName: exampleHub.Name, // NamespaceName: exampleNamespace.Name, // ResourceGroupName: example.Name, // Manage: pulumi.Bool(true), // Send: pulumi.Bool(true), // Listen: 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.NotificationHubs` - 2023-09-01 // // ## Import // // Notification Hub Authorization Rule can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:notificationhub/authorizationRule:AuthorizationRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.NotificationHubs/namespaces/namespace1/notificationHubs/hub1/authorizationRules/rule1 // ``` type AuthorizationRule struct { pulumi.CustomResourceState // Does this Authorization Rule have Listen access to the Notification Hub? Defaults to `false`. Listen pulumi.BoolPtrOutput `pulumi:"listen"` // Does this Authorization Rule have Manage access to the Notification Hub? Defaults to `false`. // // > **Note:** If `manage` is set to `true` then both `send` and `listen` must also be set to `true`. Manage pulumi.BoolPtrOutput `pulumi:"manage"` // The name to use for this Authorization Rule. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Notification Hub Namespace in which the Notification Hub exists. Changing this forces a new resource to be created. NamespaceName pulumi.StringOutput `pulumi:"namespaceName"` // The name of the Notification Hub for which the Authorization Rule should be created. Changing this forces a new resource to be created. NotificationHubName pulumi.StringOutput `pulumi:"notificationHubName"` // The Primary Access Key associated with this Authorization Rule. PrimaryAccessKey pulumi.StringOutput `pulumi:"primaryAccessKey"` // The Primary Connetion String associated with this Authorization Rule. PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"` // The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The Secondary Access Key associated with this Authorization Rule. SecondaryAccessKey pulumi.StringOutput `pulumi:"secondaryAccessKey"` // The Secondary Connetion String associated with this Authorization Rule. SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"` // Does this Authorization Rule have Send access to the Notification Hub? Defaults to `false`. Send pulumi.BoolPtrOutput `pulumi:"send"` } // NewAuthorizationRule registers a new resource with the given unique name, arguments, and options. func NewAuthorizationRule(ctx *pulumi.Context, name string, args *AuthorizationRuleArgs, opts ...pulumi.ResourceOption) (*AuthorizationRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NamespaceName == nil { return nil, errors.New("invalid value for required argument 'NamespaceName'") } if args.NotificationHubName == nil { return nil, errors.New("invalid value for required argument 'NotificationHubName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } secrets := pulumi.AdditionalSecretOutputs([]string{ "primaryAccessKey", "primaryConnectionString", "secondaryAccessKey", "secondaryConnectionString", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource AuthorizationRule err := ctx.RegisterResource("azure:notificationhub/authorizationRule:AuthorizationRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAuthorizationRule gets an existing AuthorizationRule 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 GetAuthorizationRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AuthorizationRuleState, opts ...pulumi.ResourceOption) (*AuthorizationRule, error) { var resource AuthorizationRule err := ctx.ReadResource("azure:notificationhub/authorizationRule:AuthorizationRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AuthorizationRule resources. type authorizationRuleState struct { // Does this Authorization Rule have Listen access to the Notification Hub? Defaults to `false`. Listen *bool `pulumi:"listen"` // Does this Authorization Rule have Manage access to the Notification Hub? Defaults to `false`. // // > **Note:** If `manage` is set to `true` then both `send` and `listen` must also be set to `true`. Manage *bool `pulumi:"manage"` // The name to use for this Authorization Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Notification Hub Namespace in which the Notification Hub exists. Changing this forces a new resource to be created. NamespaceName *string `pulumi:"namespaceName"` // The name of the Notification Hub for which the Authorization Rule should be created. Changing this forces a new resource to be created. NotificationHubName *string `pulumi:"notificationHubName"` // The Primary Access Key associated with this Authorization Rule. PrimaryAccessKey *string `pulumi:"primaryAccessKey"` // The Primary Connetion String associated with this Authorization Rule. PrimaryConnectionString *string `pulumi:"primaryConnectionString"` // The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The Secondary Access Key associated with this Authorization Rule. SecondaryAccessKey *string `pulumi:"secondaryAccessKey"` // The Secondary Connetion String associated with this Authorization Rule. SecondaryConnectionString *string `pulumi:"secondaryConnectionString"` // Does this Authorization Rule have Send access to the Notification Hub? Defaults to `false`. Send *bool `pulumi:"send"` } type AuthorizationRuleState struct { // Does this Authorization Rule have Listen access to the Notification Hub? Defaults to `false`. Listen pulumi.BoolPtrInput // Does this Authorization Rule have Manage access to the Notification Hub? Defaults to `false`. // // > **Note:** If `manage` is set to `true` then both `send` and `listen` must also be set to `true`. Manage pulumi.BoolPtrInput // The name to use for this Authorization Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Notification Hub Namespace in which the Notification Hub exists. Changing this forces a new resource to be created. NamespaceName pulumi.StringPtrInput // The name of the Notification Hub for which the Authorization Rule should be created. Changing this forces a new resource to be created. NotificationHubName pulumi.StringPtrInput // The Primary Access Key associated with this Authorization Rule. PrimaryAccessKey pulumi.StringPtrInput // The Primary Connetion String associated with this Authorization Rule. PrimaryConnectionString pulumi.StringPtrInput // The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The Secondary Access Key associated with this Authorization Rule. SecondaryAccessKey pulumi.StringPtrInput // The Secondary Connetion String associated with this Authorization Rule. SecondaryConnectionString pulumi.StringPtrInput // Does this Authorization Rule have Send access to the Notification Hub? Defaults to `false`. Send pulumi.BoolPtrInput } func (AuthorizationRuleState) ElementType() reflect.Type { return reflect.TypeOf((*authorizationRuleState)(nil)).Elem() } type authorizationRuleArgs struct { // Does this Authorization Rule have Listen access to the Notification Hub? Defaults to `false`. Listen *bool `pulumi:"listen"` // Does this Authorization Rule have Manage access to the Notification Hub? Defaults to `false`. // // > **Note:** If `manage` is set to `true` then both `send` and `listen` must also be set to `true`. Manage *bool `pulumi:"manage"` // The name to use for this Authorization Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Notification Hub Namespace in which the Notification Hub exists. Changing this forces a new resource to be created. NamespaceName string `pulumi:"namespaceName"` // The name of the Notification Hub for which the Authorization Rule should be created. Changing this forces a new resource to be created. NotificationHubName string `pulumi:"notificationHubName"` // The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Does this Authorization Rule have Send access to the Notification Hub? Defaults to `false`. Send *bool `pulumi:"send"` } // The set of arguments for constructing a AuthorizationRule resource. type AuthorizationRuleArgs struct { // Does this Authorization Rule have Listen access to the Notification Hub? Defaults to `false`. Listen pulumi.BoolPtrInput // Does this Authorization Rule have Manage access to the Notification Hub? Defaults to `false`. // // > **Note:** If `manage` is set to `true` then both `send` and `listen` must also be set to `true`. Manage pulumi.BoolPtrInput // The name to use for this Authorization Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Notification Hub Namespace in which the Notification Hub exists. Changing this forces a new resource to be created. NamespaceName pulumi.StringInput // The name of the Notification Hub for which the Authorization Rule should be created. Changing this forces a new resource to be created. NotificationHubName pulumi.StringInput // The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Does this Authorization Rule have Send access to the Notification Hub? Defaults to `false`. Send pulumi.BoolPtrInput } func (AuthorizationRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*authorizationRuleArgs)(nil)).Elem() } type AuthorizationRuleInput interface { pulumi.Input ToAuthorizationRuleOutput() AuthorizationRuleOutput ToAuthorizationRuleOutputWithContext(ctx context.Context) AuthorizationRuleOutput } func (*AuthorizationRule) ElementType() reflect.Type { return reflect.TypeOf((**AuthorizationRule)(nil)).Elem() } func (i *AuthorizationRule) ToAuthorizationRuleOutput() AuthorizationRuleOutput { return i.ToAuthorizationRuleOutputWithContext(context.Background()) } func (i *AuthorizationRule) ToAuthorizationRuleOutputWithContext(ctx context.Context) AuthorizationRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(AuthorizationRuleOutput) } // AuthorizationRuleArrayInput is an input type that accepts AuthorizationRuleArray and AuthorizationRuleArrayOutput values. // You can construct a concrete instance of `AuthorizationRuleArrayInput` via: // // AuthorizationRuleArray{ AuthorizationRuleArgs{...} } type AuthorizationRuleArrayInput interface { pulumi.Input ToAuthorizationRuleArrayOutput() AuthorizationRuleArrayOutput ToAuthorizationRuleArrayOutputWithContext(context.Context) AuthorizationRuleArrayOutput } type AuthorizationRuleArray []AuthorizationRuleInput func (AuthorizationRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AuthorizationRule)(nil)).Elem() } func (i AuthorizationRuleArray) ToAuthorizationRuleArrayOutput() AuthorizationRuleArrayOutput { return i.ToAuthorizationRuleArrayOutputWithContext(context.Background()) } func (i AuthorizationRuleArray) ToAuthorizationRuleArrayOutputWithContext(ctx context.Context) AuthorizationRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AuthorizationRuleArrayOutput) } // AuthorizationRuleMapInput is an input type that accepts AuthorizationRuleMap and AuthorizationRuleMapOutput values. // You can construct a concrete instance of `AuthorizationRuleMapInput` via: // // AuthorizationRuleMap{ "key": AuthorizationRuleArgs{...} } type AuthorizationRuleMapInput interface { pulumi.Input ToAuthorizationRuleMapOutput() AuthorizationRuleMapOutput ToAuthorizationRuleMapOutputWithContext(context.Context) AuthorizationRuleMapOutput } type AuthorizationRuleMap map[string]AuthorizationRuleInput func (AuthorizationRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AuthorizationRule)(nil)).Elem() } func (i AuthorizationRuleMap) ToAuthorizationRuleMapOutput() AuthorizationRuleMapOutput { return i.ToAuthorizationRuleMapOutputWithContext(context.Background()) } func (i AuthorizationRuleMap) ToAuthorizationRuleMapOutputWithContext(ctx context.Context) AuthorizationRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AuthorizationRuleMapOutput) } type AuthorizationRuleOutput struct{ *pulumi.OutputState } func (AuthorizationRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**AuthorizationRule)(nil)).Elem() } func (o AuthorizationRuleOutput) ToAuthorizationRuleOutput() AuthorizationRuleOutput { return o } func (o AuthorizationRuleOutput) ToAuthorizationRuleOutputWithContext(ctx context.Context) AuthorizationRuleOutput { return o } // Does this Authorization Rule have Listen access to the Notification Hub? Defaults to `false`. func (o AuthorizationRuleOutput) Listen() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AuthorizationRule) pulumi.BoolPtrOutput { return v.Listen }).(pulumi.BoolPtrOutput) } // Does this Authorization Rule have Manage access to the Notification Hub? Defaults to `false`. // // > **Note:** If `manage` is set to `true` then both `send` and `listen` must also be set to `true`. func (o AuthorizationRuleOutput) Manage() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AuthorizationRule) pulumi.BoolPtrOutput { return v.Manage }).(pulumi.BoolPtrOutput) } // The name to use for this Authorization Rule. Changing this forces a new resource to be created. func (o AuthorizationRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Notification Hub Namespace in which the Notification Hub exists. Changing this forces a new resource to be created. func (o AuthorizationRuleOutput) NamespaceName() pulumi.StringOutput { return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.NamespaceName }).(pulumi.StringOutput) } // The name of the Notification Hub for which the Authorization Rule should be created. Changing this forces a new resource to be created. func (o AuthorizationRuleOutput) NotificationHubName() pulumi.StringOutput { return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.NotificationHubName }).(pulumi.StringOutput) } // The Primary Access Key associated with this Authorization Rule. func (o AuthorizationRuleOutput) PrimaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.PrimaryAccessKey }).(pulumi.StringOutput) } // The Primary Connetion String associated with this Authorization Rule. func (o AuthorizationRuleOutput) PrimaryConnectionString() pulumi.StringOutput { return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput) } // The name of the Resource Group in which the Notification Hub Namespace exists. Changing this forces a new resource to be created. func (o AuthorizationRuleOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The Secondary Access Key associated with this Authorization Rule. func (o AuthorizationRuleOutput) SecondaryAccessKey() pulumi.StringOutput { return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.SecondaryAccessKey }).(pulumi.StringOutput) } // The Secondary Connetion String associated with this Authorization Rule. func (o AuthorizationRuleOutput) SecondaryConnectionString() pulumi.StringOutput { return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput) } // Does this Authorization Rule have Send access to the Notification Hub? Defaults to `false`. func (o AuthorizationRuleOutput) Send() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AuthorizationRule) pulumi.BoolPtrOutput { return v.Send }).(pulumi.BoolPtrOutput) } type AuthorizationRuleArrayOutput struct{ *pulumi.OutputState } func (AuthorizationRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AuthorizationRule)(nil)).Elem() } func (o AuthorizationRuleArrayOutput) ToAuthorizationRuleArrayOutput() AuthorizationRuleArrayOutput { return o } func (o AuthorizationRuleArrayOutput) ToAuthorizationRuleArrayOutputWithContext(ctx context.Context) AuthorizationRuleArrayOutput { return o } func (o AuthorizationRuleArrayOutput) Index(i pulumi.IntInput) AuthorizationRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AuthorizationRule { return vs[0].([]*AuthorizationRule)[vs[1].(int)] }).(AuthorizationRuleOutput) } type AuthorizationRuleMapOutput struct{ *pulumi.OutputState } func (AuthorizationRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AuthorizationRule)(nil)).Elem() } func (o AuthorizationRuleMapOutput) ToAuthorizationRuleMapOutput() AuthorizationRuleMapOutput { return o } func (o AuthorizationRuleMapOutput) ToAuthorizationRuleMapOutputWithContext(ctx context.Context) AuthorizationRuleMapOutput { return o } func (o AuthorizationRuleMapOutput) MapIndex(k pulumi.StringInput) AuthorizationRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AuthorizationRule { return vs[0].(map[string]*AuthorizationRule)[vs[1].(string)] }).(AuthorizationRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AuthorizationRuleInput)(nil)).Elem(), &AuthorizationRule{}) pulumi.RegisterInputType(reflect.TypeOf((*AuthorizationRuleArrayInput)(nil)).Elem(), AuthorizationRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AuthorizationRuleMapInput)(nil)).Elem(), AuthorizationRuleMap{}) pulumi.RegisterOutputType(AuthorizationRuleOutput{}) pulumi.RegisterOutputType(AuthorizationRuleArrayOutput{}) pulumi.RegisterOutputType(AuthorizationRuleMapOutput{}) }
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/notificationhub/namespace.go
sdk/go/azure/notificationhub/namespace.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 notificationhub import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Notification Hub Namespace. // // ## 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/notificationhub" // "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("notificationhub-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = notificationhub.NewNamespace(ctx, "example", &notificationhub.NamespaceArgs{ // Name: pulumi.String("myappnamespace"), // ResourceGroupName: example.Name, // Location: example.Location, // NamespaceType: pulumi.String("NotificationHub"), // SkuName: pulumi.String("Free"), // }) // 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.NotificationHubs` - 2023-09-01 // // ## Import // // Notification Hub Namespaces can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:notificationhub/namespace:Namespace namespace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.NotificationHubs/namespaces/namespace1 // ``` type Namespace struct { pulumi.CustomResourceState // Is this Notification Hub Namespace enabled? Defaults to `true`. Changing this forces a new resource to be created. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The Type of Namespace - possible values are `Messaging` or `NotificationHub`. Changing this forces a new resource to be created. NamespaceType pulumi.StringOutput `pulumi:"namespaceType"` // The allowed Replication Region for the Notification Hub Namespace. Possible values are `Default`, `None`, `AustraliaEast`, `BrazilSouth`, `NorthEurope`, `SouthAfricaNorth`, `SouthEastAsia`, `WestUs2`. Changing this forces a new resource to be created. Defaults to `Default`. ReplicationRegion pulumi.StringPtrOutput `pulumi:"replicationRegion"` // The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The ServiceBus Endpoint for this Notification Hub Namespace. ServicebusEndpoint pulumi.StringOutput `pulumi:"servicebusEndpoint"` // The name of the SKU to use for this Notification Hub Namespace. Possible values are `Free`, `Basic` or `Standard`. SkuName pulumi.StringOutput `pulumi:"skuName"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Is Zone Redundancy Enabled for the Notification Hub Namespace. Defaults to `false`. Changing this forces a new resource to be created. ZoneRedundancyEnabled pulumi.BoolPtrOutput `pulumi:"zoneRedundancyEnabled"` } // NewNamespace registers a new resource with the given unique name, arguments, and options. func NewNamespace(ctx *pulumi.Context, name string, args *NamespaceArgs, opts ...pulumi.ResourceOption) (*Namespace, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NamespaceType == nil { return nil, errors.New("invalid value for required argument 'NamespaceType'") } 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 Namespace err := ctx.RegisterResource("azure:notificationhub/namespace:Namespace", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNamespace gets an existing Namespace 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 GetNamespace(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NamespaceState, opts ...pulumi.ResourceOption) (*Namespace, error) { var resource Namespace err := ctx.ReadResource("azure:notificationhub/namespace:Namespace", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Namespace resources. type namespaceState struct { // Is this Notification Hub Namespace enabled? Defaults to `true`. Changing this forces a new resource to be created. Enabled *bool `pulumi:"enabled"` // The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The Type of Namespace - possible values are `Messaging` or `NotificationHub`. Changing this forces a new resource to be created. NamespaceType *string `pulumi:"namespaceType"` // The allowed Replication Region for the Notification Hub Namespace. Possible values are `Default`, `None`, `AustraliaEast`, `BrazilSouth`, `NorthEurope`, `SouthAfricaNorth`, `SouthEastAsia`, `WestUs2`. Changing this forces a new resource to be created. Defaults to `Default`. ReplicationRegion *string `pulumi:"replicationRegion"` // The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The ServiceBus Endpoint for this Notification Hub Namespace. ServicebusEndpoint *string `pulumi:"servicebusEndpoint"` // The name of the SKU to use for this Notification Hub Namespace. Possible values are `Free`, `Basic` or `Standard`. SkuName *string `pulumi:"skuName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Is Zone Redundancy Enabled for the Notification Hub Namespace. Defaults to `false`. Changing this forces a new resource to be created. ZoneRedundancyEnabled *bool `pulumi:"zoneRedundancyEnabled"` } type NamespaceState struct { // Is this Notification Hub Namespace enabled? Defaults to `true`. Changing this forces a new resource to be created. Enabled pulumi.BoolPtrInput // The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The Type of Namespace - possible values are `Messaging` or `NotificationHub`. Changing this forces a new resource to be created. NamespaceType pulumi.StringPtrInput // The allowed Replication Region for the Notification Hub Namespace. Possible values are `Default`, `None`, `AustraliaEast`, `BrazilSouth`, `NorthEurope`, `SouthAfricaNorth`, `SouthEastAsia`, `WestUs2`. Changing this forces a new resource to be created. Defaults to `Default`. ReplicationRegion pulumi.StringPtrInput // The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The ServiceBus Endpoint for this Notification Hub Namespace. ServicebusEndpoint pulumi.StringPtrInput // The name of the SKU to use for this Notification Hub Namespace. Possible values are `Free`, `Basic` or `Standard`. SkuName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Is Zone Redundancy Enabled for the Notification Hub Namespace. Defaults to `false`. Changing this forces a new resource to be created. ZoneRedundancyEnabled pulumi.BoolPtrInput } func (NamespaceState) ElementType() reflect.Type { return reflect.TypeOf((*namespaceState)(nil)).Elem() } type namespaceArgs struct { // Is this Notification Hub Namespace enabled? Defaults to `true`. Changing this forces a new resource to be created. Enabled *bool `pulumi:"enabled"` // The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The Type of Namespace - possible values are `Messaging` or `NotificationHub`. Changing this forces a new resource to be created. NamespaceType string `pulumi:"namespaceType"` // The allowed Replication Region for the Notification Hub Namespace. Possible values are `Default`, `None`, `AustraliaEast`, `BrazilSouth`, `NorthEurope`, `SouthAfricaNorth`, `SouthEastAsia`, `WestUs2`. Changing this forces a new resource to be created. Defaults to `Default`. ReplicationRegion *string `pulumi:"replicationRegion"` // The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The name of the SKU to use for this Notification Hub Namespace. Possible values are `Free`, `Basic` or `Standard`. SkuName string `pulumi:"skuName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Is Zone Redundancy Enabled for the Notification Hub Namespace. Defaults to `false`. Changing this forces a new resource to be created. ZoneRedundancyEnabled *bool `pulumi:"zoneRedundancyEnabled"` } // The set of arguments for constructing a Namespace resource. type NamespaceArgs struct { // Is this Notification Hub Namespace enabled? Defaults to `true`. Changing this forces a new resource to be created. Enabled pulumi.BoolPtrInput // The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The Type of Namespace - possible values are `Messaging` or `NotificationHub`. Changing this forces a new resource to be created. NamespaceType pulumi.StringInput // The allowed Replication Region for the Notification Hub Namespace. Possible values are `Default`, `None`, `AustraliaEast`, `BrazilSouth`, `NorthEurope`, `SouthAfricaNorth`, `SouthEastAsia`, `WestUs2`. Changing this forces a new resource to be created. Defaults to `Default`. ReplicationRegion pulumi.StringPtrInput // The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The name of the SKU to use for this Notification Hub Namespace. Possible values are `Free`, `Basic` or `Standard`. SkuName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Is Zone Redundancy Enabled for the Notification Hub Namespace. Defaults to `false`. Changing this forces a new resource to be created. ZoneRedundancyEnabled pulumi.BoolPtrInput } func (NamespaceArgs) ElementType() reflect.Type { return reflect.TypeOf((*namespaceArgs)(nil)).Elem() } type NamespaceInput interface { pulumi.Input ToNamespaceOutput() NamespaceOutput ToNamespaceOutputWithContext(ctx context.Context) NamespaceOutput } func (*Namespace) ElementType() reflect.Type { return reflect.TypeOf((**Namespace)(nil)).Elem() } func (i *Namespace) ToNamespaceOutput() NamespaceOutput { return i.ToNamespaceOutputWithContext(context.Background()) } func (i *Namespace) ToNamespaceOutputWithContext(ctx context.Context) NamespaceOutput { return pulumi.ToOutputWithContext(ctx, i).(NamespaceOutput) } // NamespaceArrayInput is an input type that accepts NamespaceArray and NamespaceArrayOutput values. // You can construct a concrete instance of `NamespaceArrayInput` via: // // NamespaceArray{ NamespaceArgs{...} } type NamespaceArrayInput interface { pulumi.Input ToNamespaceArrayOutput() NamespaceArrayOutput ToNamespaceArrayOutputWithContext(context.Context) NamespaceArrayOutput } type NamespaceArray []NamespaceInput func (NamespaceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Namespace)(nil)).Elem() } func (i NamespaceArray) ToNamespaceArrayOutput() NamespaceArrayOutput { return i.ToNamespaceArrayOutputWithContext(context.Background()) } func (i NamespaceArray) ToNamespaceArrayOutputWithContext(ctx context.Context) NamespaceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NamespaceArrayOutput) } // NamespaceMapInput is an input type that accepts NamespaceMap and NamespaceMapOutput values. // You can construct a concrete instance of `NamespaceMapInput` via: // // NamespaceMap{ "key": NamespaceArgs{...} } type NamespaceMapInput interface { pulumi.Input ToNamespaceMapOutput() NamespaceMapOutput ToNamespaceMapOutputWithContext(context.Context) NamespaceMapOutput } type NamespaceMap map[string]NamespaceInput func (NamespaceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Namespace)(nil)).Elem() } func (i NamespaceMap) ToNamespaceMapOutput() NamespaceMapOutput { return i.ToNamespaceMapOutputWithContext(context.Background()) } func (i NamespaceMap) ToNamespaceMapOutputWithContext(ctx context.Context) NamespaceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NamespaceMapOutput) } type NamespaceOutput struct{ *pulumi.OutputState } func (NamespaceOutput) ElementType() reflect.Type { return reflect.TypeOf((**Namespace)(nil)).Elem() } func (o NamespaceOutput) ToNamespaceOutput() NamespaceOutput { return o } func (o NamespaceOutput) ToNamespaceOutputWithContext(ctx context.Context) NamespaceOutput { return o } // Is this Notification Hub Namespace enabled? Defaults to `true`. Changing this forces a new resource to be created. func (o NamespaceOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Namespace) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created. func (o NamespaceOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created. func (o NamespaceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The Type of Namespace - possible values are `Messaging` or `NotificationHub`. Changing this forces a new resource to be created. func (o NamespaceOutput) NamespaceType() pulumi.StringOutput { return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.NamespaceType }).(pulumi.StringOutput) } // The allowed Replication Region for the Notification Hub Namespace. Possible values are `Default`, `None`, `AustraliaEast`, `BrazilSouth`, `NorthEurope`, `SouthAfricaNorth`, `SouthEastAsia`, `WestUs2`. Changing this forces a new resource to be created. Defaults to `Default`. func (o NamespaceOutput) ReplicationRegion() pulumi.StringPtrOutput { return o.ApplyT(func(v *Namespace) pulumi.StringPtrOutput { return v.ReplicationRegion }).(pulumi.StringPtrOutput) } // The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created. func (o NamespaceOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The ServiceBus Endpoint for this Notification Hub Namespace. func (o NamespaceOutput) ServicebusEndpoint() pulumi.StringOutput { return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.ServicebusEndpoint }).(pulumi.StringOutput) } // The name of the SKU to use for this Notification Hub Namespace. Possible values are `Free`, `Basic` or `Standard`. func (o NamespaceOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o NamespaceOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Namespace) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Is Zone Redundancy Enabled for the Notification Hub Namespace. Defaults to `false`. Changing this forces a new resource to be created. func (o NamespaceOutput) ZoneRedundancyEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Namespace) pulumi.BoolPtrOutput { return v.ZoneRedundancyEnabled }).(pulumi.BoolPtrOutput) } type NamespaceArrayOutput struct{ *pulumi.OutputState } func (NamespaceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Namespace)(nil)).Elem() } func (o NamespaceArrayOutput) ToNamespaceArrayOutput() NamespaceArrayOutput { return o } func (o NamespaceArrayOutput) ToNamespaceArrayOutputWithContext(ctx context.Context) NamespaceArrayOutput { return o } func (o NamespaceArrayOutput) Index(i pulumi.IntInput) NamespaceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Namespace { return vs[0].([]*Namespace)[vs[1].(int)] }).(NamespaceOutput) } type NamespaceMapOutput struct{ *pulumi.OutputState } func (NamespaceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Namespace)(nil)).Elem() } func (o NamespaceMapOutput) ToNamespaceMapOutput() NamespaceMapOutput { return o } func (o NamespaceMapOutput) ToNamespaceMapOutputWithContext(ctx context.Context) NamespaceMapOutput { return o } func (o NamespaceMapOutput) MapIndex(k pulumi.StringInput) NamespaceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Namespace { return vs[0].(map[string]*Namespace)[vs[1].(string)] }).(NamespaceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NamespaceInput)(nil)).Elem(), &Namespace{}) pulumi.RegisterInputType(reflect.TypeOf((*NamespaceArrayInput)(nil)).Elem(), NamespaceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NamespaceMapInput)(nil)).Elem(), NamespaceMap{}) pulumi.RegisterOutputType(NamespaceOutput{}) pulumi.RegisterOutputType(NamespaceArrayOutput{}) pulumi.RegisterOutputType(NamespaceMapOutput{}) }
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/notificationhub/getHub.go
sdk/go/azure/notificationhub/getHub.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 notificationhub 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 Notification Hub within a Notification Hub Namespace. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/notificationhub" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := notificationhub.LookupHub(ctx, &notificationhub.LookupHubArgs{ // Name: "notification-hub", // NamespaceName: "namespace-name", // ResourceGroupName: "resource-group-name", // }, 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.NotificationHubs` - 2023-09-01 func LookupHub(ctx *pulumi.Context, args *LookupHubArgs, opts ...pulumi.InvokeOption) (*LookupHubResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupHubResult err := ctx.Invoke("azure:notificationhub/getHub:getHub", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getHub. type LookupHubArgs struct { // Specifies the Name of the Notification Hub. Name string `pulumi:"name"` // Specifies the Name of the Notification Hub Namespace which contains the Notification Hub. NamespaceName string `pulumi:"namespaceName"` // Specifies the Name of the Resource Group within which the Notification Hub exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getHub. type LookupHubResult struct { // A `apnsCredential` block as defined below. ApnsCredentials []GetHubApnsCredential `pulumi:"apnsCredentials"` // A `gcmCredential` block as defined below. GcmCredentials []GetHubGcmCredential `pulumi:"gcmCredentials"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region in which this Notification Hub exists. Location string `pulumi:"location"` Name string `pulumi:"name"` NamespaceName string `pulumi:"namespaceName"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } func LookupHubOutput(ctx *pulumi.Context, args LookupHubOutputArgs, opts ...pulumi.InvokeOption) LookupHubResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupHubResultOutput, error) { args := v.(LookupHubArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:notificationhub/getHub:getHub", args, LookupHubResultOutput{}, options).(LookupHubResultOutput), nil }).(LookupHubResultOutput) } // A collection of arguments for invoking getHub. type LookupHubOutputArgs struct { // Specifies the Name of the Notification Hub. Name pulumi.StringInput `pulumi:"name"` // Specifies the Name of the Notification Hub Namespace which contains the Notification Hub. NamespaceName pulumi.StringInput `pulumi:"namespaceName"` // Specifies the Name of the Resource Group within which the Notification Hub exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupHubOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupHubArgs)(nil)).Elem() } // A collection of values returned by getHub. type LookupHubResultOutput struct{ *pulumi.OutputState } func (LookupHubResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupHubResult)(nil)).Elem() } func (o LookupHubResultOutput) ToLookupHubResultOutput() LookupHubResultOutput { return o } func (o LookupHubResultOutput) ToLookupHubResultOutputWithContext(ctx context.Context) LookupHubResultOutput { return o } // A `apnsCredential` block as defined below. func (o LookupHubResultOutput) ApnsCredentials() GetHubApnsCredentialArrayOutput { return o.ApplyT(func(v LookupHubResult) []GetHubApnsCredential { return v.ApnsCredentials }).(GetHubApnsCredentialArrayOutput) } // A `gcmCredential` block as defined below. func (o LookupHubResultOutput) GcmCredentials() GetHubGcmCredentialArrayOutput { return o.ApplyT(func(v LookupHubResult) []GetHubGcmCredential { return v.GcmCredentials }).(GetHubGcmCredentialArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupHubResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupHubResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region in which this Notification Hub exists. func (o LookupHubResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupHubResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupHubResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupHubResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupHubResultOutput) NamespaceName() pulumi.StringOutput { return o.ApplyT(func(v LookupHubResult) string { return v.NamespaceName }).(pulumi.StringOutput) } func (o LookupHubResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupHubResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o LookupHubResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupHubResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupHubResultOutput{}) }
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/databricks/getWorkspace.go
sdk/go/azure/databricks/getWorkspace.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 databricks 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 Databricks workspace. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/databricks" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := databricks.LookupWorkspace(ctx, &databricks.LookupWorkspaceArgs{ // Name: "example-workspace", // ResourceGroupName: "example-rg", // }, nil) // if err != nil { // return err // } // ctx.Export("databricksWorkspaceId", example.WorkspaceId) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Databricks` - 2024-05-01 func LookupWorkspace(ctx *pulumi.Context, args *LookupWorkspaceArgs, opts ...pulumi.InvokeOption) (*LookupWorkspaceResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupWorkspaceResult err := ctx.Invoke("azure:databricks/getWorkspace:getWorkspace", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getWorkspace. type LookupWorkspaceArgs struct { // The name of the Databricks Workspace. Name string `pulumi:"name"` // The Name of the Resource Group where the Databricks Workspace exists. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the Databricks Workspace. Tags map[string]string `pulumi:"tags"` } // A collection of values returned by getWorkspace. type LookupWorkspaceResult struct { // A `customParameters` block as documented below. // * CustomParameters []GetWorkspaceCustomParameter `pulumi:"customParameters"` // An `enhancedSecurityCompliance` block as documented below. EnhancedSecurityCompliances []GetWorkspaceEnhancedSecurityCompliance `pulumi:"enhancedSecurityCompliances"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure location where the Databricks Workspace exists. Location string `pulumi:"location"` // A `managedDiskIdentity` block as documented below. ManagedDiskIdentities []GetWorkspaceManagedDiskIdentity `pulumi:"managedDiskIdentities"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // SKU of this Databricks Workspace. Sku string `pulumi:"sku"` // A `storageAccountIdentity` block as documented below. StorageAccountIdentities []GetWorkspaceStorageAccountIdentity `pulumi:"storageAccountIdentities"` // A mapping of tags to assign to the Databricks Workspace. Tags map[string]string `pulumi:"tags"` // Unique ID of this Databricks Workspace in Databricks management plane. WorkspaceId string `pulumi:"workspaceId"` // URL this Databricks Workspace is accessible on. WorkspaceUrl string `pulumi:"workspaceUrl"` } func LookupWorkspaceOutput(ctx *pulumi.Context, args LookupWorkspaceOutputArgs, opts ...pulumi.InvokeOption) LookupWorkspaceResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupWorkspaceResultOutput, error) { args := v.(LookupWorkspaceArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:databricks/getWorkspace:getWorkspace", args, LookupWorkspaceResultOutput{}, options).(LookupWorkspaceResultOutput), nil }).(LookupWorkspaceResultOutput) } // A collection of arguments for invoking getWorkspace. type LookupWorkspaceOutputArgs struct { // The name of the Databricks Workspace. Name pulumi.StringInput `pulumi:"name"` // The Name of the Resource Group where the Databricks Workspace exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the Databricks Workspace. Tags pulumi.StringMapInput `pulumi:"tags"` } func (LookupWorkspaceOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupWorkspaceArgs)(nil)).Elem() } // A collection of values returned by getWorkspace. type LookupWorkspaceResultOutput struct{ *pulumi.OutputState } func (LookupWorkspaceResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupWorkspaceResult)(nil)).Elem() } func (o LookupWorkspaceResultOutput) ToLookupWorkspaceResultOutput() LookupWorkspaceResultOutput { return o } func (o LookupWorkspaceResultOutput) ToLookupWorkspaceResultOutputWithContext(ctx context.Context) LookupWorkspaceResultOutput { return o } // A `customParameters` block as documented below. // * func (o LookupWorkspaceResultOutput) CustomParameters() GetWorkspaceCustomParameterArrayOutput { return o.ApplyT(func(v LookupWorkspaceResult) []GetWorkspaceCustomParameter { return v.CustomParameters }).(GetWorkspaceCustomParameterArrayOutput) } // An `enhancedSecurityCompliance` block as documented below. func (o LookupWorkspaceResultOutput) EnhancedSecurityCompliances() GetWorkspaceEnhancedSecurityComplianceArrayOutput { return o.ApplyT(func(v LookupWorkspaceResult) []GetWorkspaceEnhancedSecurityCompliance { return v.EnhancedSecurityCompliances }).(GetWorkspaceEnhancedSecurityComplianceArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupWorkspaceResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure location where the Databricks Workspace exists. func (o LookupWorkspaceResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Location }).(pulumi.StringOutput) } // A `managedDiskIdentity` block as documented below. func (o LookupWorkspaceResultOutput) ManagedDiskIdentities() GetWorkspaceManagedDiskIdentityArrayOutput { return o.ApplyT(func(v LookupWorkspaceResult) []GetWorkspaceManagedDiskIdentity { return v.ManagedDiskIdentities }).(GetWorkspaceManagedDiskIdentityArrayOutput) } func (o LookupWorkspaceResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupWorkspaceResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // SKU of this Databricks Workspace. func (o LookupWorkspaceResultOutput) Sku() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Sku }).(pulumi.StringOutput) } // A `storageAccountIdentity` block as documented below. func (o LookupWorkspaceResultOutput) StorageAccountIdentities() GetWorkspaceStorageAccountIdentityArrayOutput { return o.ApplyT(func(v LookupWorkspaceResult) []GetWorkspaceStorageAccountIdentity { return v.StorageAccountIdentities }).(GetWorkspaceStorageAccountIdentityArrayOutput) } // A mapping of tags to assign to the Databricks Workspace. func (o LookupWorkspaceResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupWorkspaceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // Unique ID of this Databricks Workspace in Databricks management plane. func (o LookupWorkspaceResultOutput) WorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.WorkspaceId }).(pulumi.StringOutput) } // URL this Databricks Workspace is accessible on. func (o LookupWorkspaceResultOutput) WorkspaceUrl() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.WorkspaceUrl }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupWorkspaceResultOutput{}) }
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/databricks/init.go
sdk/go/azure/databricks/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 databricks 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:databricks/accessConnector:AccessConnector": r = &AccessConnector{} case "azure:databricks/virtualNetworkPeering:VirtualNetworkPeering": r = &VirtualNetworkPeering{} case "azure:databricks/workspace:Workspace": r = &Workspace{} case "azure:databricks/workspaceCustomerManagedKey:WorkspaceCustomerManagedKey": r = &WorkspaceCustomerManagedKey{} case "azure:databricks/workspaceRootDbfsCustomerManagedKey:WorkspaceRootDbfsCustomerManagedKey": r = &WorkspaceRootDbfsCustomerManagedKey{} 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", "databricks/accessConnector", &module{version}, ) pulumi.RegisterResourceModule( "azure", "databricks/virtualNetworkPeering", &module{version}, ) pulumi.RegisterResourceModule( "azure", "databricks/workspace", &module{version}, ) pulumi.RegisterResourceModule( "azure", "databricks/workspaceCustomerManagedKey", &module{version}, ) pulumi.RegisterResourceModule( "azure", "databricks/workspaceRootDbfsCustomerManagedKey", &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/databricks/pulumiTypes.go
sdk/go/azure/databricks/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 databricks 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 AccessConnectorIdentity struct { // Specifies a list of User Assigned Managed Identity IDs to be assigned to the Databricks Access Connector. Only one User Assigned Managed Identity ID is supported per Databricks Access Connector resource. // // > **Note:** `identityIds` are required when `type` is set to `UserAssigned`. IdentityIds []string `pulumi:"identityIds"` // The Principal ID of the System Assigned Managed Service Identity that is configured on this Access Connector. PrincipalId *string `pulumi:"principalId"` // The Tenant ID of the System Assigned Managed Service Identity that is configured on this Access Connector. TenantId *string `pulumi:"tenantId"` // Specifies the type of Managed Service Identity that should be configured on the Databricks Access Connector. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned`. Type string `pulumi:"type"` } // AccessConnectorIdentityInput is an input type that accepts AccessConnectorIdentityArgs and AccessConnectorIdentityOutput values. // You can construct a concrete instance of `AccessConnectorIdentityInput` via: // // AccessConnectorIdentityArgs{...} type AccessConnectorIdentityInput interface { pulumi.Input ToAccessConnectorIdentityOutput() AccessConnectorIdentityOutput ToAccessConnectorIdentityOutputWithContext(context.Context) AccessConnectorIdentityOutput } type AccessConnectorIdentityArgs struct { // Specifies a list of User Assigned Managed Identity IDs to be assigned to the Databricks Access Connector. Only one User Assigned Managed Identity ID is supported per Databricks Access Connector resource. // // > **Note:** `identityIds` are required when `type` is set to `UserAssigned`. IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"` // The Principal ID of the System Assigned Managed Service Identity that is configured on this Access Connector. PrincipalId pulumi.StringPtrInput `pulumi:"principalId"` // The Tenant ID of the System Assigned Managed Service Identity that is configured on this Access Connector. TenantId pulumi.StringPtrInput `pulumi:"tenantId"` // Specifies the type of Managed Service Identity that should be configured on the Databricks Access Connector. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned`. Type pulumi.StringInput `pulumi:"type"` } func (AccessConnectorIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*AccessConnectorIdentity)(nil)).Elem() } func (i AccessConnectorIdentityArgs) ToAccessConnectorIdentityOutput() AccessConnectorIdentityOutput { return i.ToAccessConnectorIdentityOutputWithContext(context.Background()) } func (i AccessConnectorIdentityArgs) ToAccessConnectorIdentityOutputWithContext(ctx context.Context) AccessConnectorIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(AccessConnectorIdentityOutput) } func (i AccessConnectorIdentityArgs) ToAccessConnectorIdentityPtrOutput() AccessConnectorIdentityPtrOutput { return i.ToAccessConnectorIdentityPtrOutputWithContext(context.Background()) } func (i AccessConnectorIdentityArgs) ToAccessConnectorIdentityPtrOutputWithContext(ctx context.Context) AccessConnectorIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(AccessConnectorIdentityOutput).ToAccessConnectorIdentityPtrOutputWithContext(ctx) } // AccessConnectorIdentityPtrInput is an input type that accepts AccessConnectorIdentityArgs, AccessConnectorIdentityPtr and AccessConnectorIdentityPtrOutput values. // You can construct a concrete instance of `AccessConnectorIdentityPtrInput` via: // // AccessConnectorIdentityArgs{...} // // or: // // nil type AccessConnectorIdentityPtrInput interface { pulumi.Input ToAccessConnectorIdentityPtrOutput() AccessConnectorIdentityPtrOutput ToAccessConnectorIdentityPtrOutputWithContext(context.Context) AccessConnectorIdentityPtrOutput } type accessConnectorIdentityPtrType AccessConnectorIdentityArgs func AccessConnectorIdentityPtr(v *AccessConnectorIdentityArgs) AccessConnectorIdentityPtrInput { return (*accessConnectorIdentityPtrType)(v) } func (*accessConnectorIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**AccessConnectorIdentity)(nil)).Elem() } func (i *accessConnectorIdentityPtrType) ToAccessConnectorIdentityPtrOutput() AccessConnectorIdentityPtrOutput { return i.ToAccessConnectorIdentityPtrOutputWithContext(context.Background()) } func (i *accessConnectorIdentityPtrType) ToAccessConnectorIdentityPtrOutputWithContext(ctx context.Context) AccessConnectorIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(AccessConnectorIdentityPtrOutput) } type AccessConnectorIdentityOutput struct{ *pulumi.OutputState } func (AccessConnectorIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*AccessConnectorIdentity)(nil)).Elem() } func (o AccessConnectorIdentityOutput) ToAccessConnectorIdentityOutput() AccessConnectorIdentityOutput { return o } func (o AccessConnectorIdentityOutput) ToAccessConnectorIdentityOutputWithContext(ctx context.Context) AccessConnectorIdentityOutput { return o } func (o AccessConnectorIdentityOutput) ToAccessConnectorIdentityPtrOutput() AccessConnectorIdentityPtrOutput { return o.ToAccessConnectorIdentityPtrOutputWithContext(context.Background()) } func (o AccessConnectorIdentityOutput) ToAccessConnectorIdentityPtrOutputWithContext(ctx context.Context) AccessConnectorIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v AccessConnectorIdentity) *AccessConnectorIdentity { return &v }).(AccessConnectorIdentityPtrOutput) } // Specifies a list of User Assigned Managed Identity IDs to be assigned to the Databricks Access Connector. Only one User Assigned Managed Identity ID is supported per Databricks Access Connector resource. // // > **Note:** `identityIds` are required when `type` is set to `UserAssigned`. func (o AccessConnectorIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v AccessConnectorIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID of the System Assigned Managed Service Identity that is configured on this Access Connector. func (o AccessConnectorIdentityOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v AccessConnectorIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID of the System Assigned Managed Service Identity that is configured on this Access Connector. func (o AccessConnectorIdentityOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v AccessConnectorIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity that should be configured on the Databricks Access Connector. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned`. func (o AccessConnectorIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v AccessConnectorIdentity) string { return v.Type }).(pulumi.StringOutput) } type AccessConnectorIdentityPtrOutput struct{ *pulumi.OutputState } func (AccessConnectorIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**AccessConnectorIdentity)(nil)).Elem() } func (o AccessConnectorIdentityPtrOutput) ToAccessConnectorIdentityPtrOutput() AccessConnectorIdentityPtrOutput { return o } func (o AccessConnectorIdentityPtrOutput) ToAccessConnectorIdentityPtrOutputWithContext(ctx context.Context) AccessConnectorIdentityPtrOutput { return o } func (o AccessConnectorIdentityPtrOutput) Elem() AccessConnectorIdentityOutput { return o.ApplyT(func(v *AccessConnectorIdentity) AccessConnectorIdentity { if v != nil { return *v } var ret AccessConnectorIdentity return ret }).(AccessConnectorIdentityOutput) } // Specifies a list of User Assigned Managed Identity IDs to be assigned to the Databricks Access Connector. Only one User Assigned Managed Identity ID is supported per Databricks Access Connector resource. // // > **Note:** `identityIds` are required when `type` is set to `UserAssigned`. func (o AccessConnectorIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *AccessConnectorIdentity) []string { if v == nil { return nil } return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID of the System Assigned Managed Service Identity that is configured on this Access Connector. func (o AccessConnectorIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v *AccessConnectorIdentity) *string { if v == nil { return nil } return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID of the System Assigned Managed Service Identity that is configured on this Access Connector. func (o AccessConnectorIdentityPtrOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v *AccessConnectorIdentity) *string { if v == nil { return nil } return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity that should be configured on the Databricks Access Connector. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned`. func (o AccessConnectorIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *AccessConnectorIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type WorkspaceCustomParameters struct { // The ID of a Azure Machine Learning workspace to link with Databricks workspace. Changing this forces a new resource to be created. MachineLearningWorkspaceId *string `pulumi:"machineLearningWorkspaceId"` // Name of the NAT gateway for Secure Cluster Connectivity (No Public IP) workspace subnets (only for workspace with managed virtual network). Defaults to `nat-gateway`. Changing this forces a new resource to be created. NatGatewayName *string `pulumi:"natGatewayName"` // Are public IP Addresses not allowed? Possible values are `true` or `false`. Defaults to `true`. // // > **Note:** Updating `noPublicIp` parameter is only allowed if the value is changing from `false` to `true` and only for VNet-injected workspaces. // // > **Note:** In `v3.104.0` and higher of the provider the `noPublicIp` parameter will now default to `true` instead of `false`. NoPublicIp *bool `pulumi:"noPublicIp"` // The name of the Private Subnet within the Virtual Network. Required if `virtualNetworkId` is set. Changing this forces a new resource to be created. PrivateSubnetName *string `pulumi:"privateSubnetName"` // The resource ID of the `network.SubnetNetworkSecurityGroupAssociation` resource which is referred to by the `privateSubnetName` field. This is the same as the ID of the subnet referred to by the `privateSubnetName` field. Required if `virtualNetworkId` is set. PrivateSubnetNetworkSecurityGroupAssociationId *string `pulumi:"privateSubnetNetworkSecurityGroupAssociationId"` // Name of the Public IP for No Public IP workspace with managed virtual network. Defaults to `nat-gw-public-ip`. Changing this forces a new resource to be created. PublicIpName *string `pulumi:"publicIpName"` // The name of the Public Subnet within the Virtual Network. Required if `virtualNetworkId` is set. Changing this forces a new resource to be created. PublicSubnetName *string `pulumi:"publicSubnetName"` // The resource ID of the `network.SubnetNetworkSecurityGroupAssociation` resource which is referred to by the `publicSubnetName` field. This is the same as the ID of the subnet referred to by the `publicSubnetName` field. Required if `virtualNetworkId` is set. PublicSubnetNetworkSecurityGroupAssociationId *string `pulumi:"publicSubnetNetworkSecurityGroupAssociationId"` // Default Databricks File Storage account name. Defaults to a randomized name(e.g. `dbstoragel6mfeghoe5kxu`). Changing this forces a new resource to be created. StorageAccountName *string `pulumi:"storageAccountName"` // Storage account SKU name. Possible values include `Standard_LRS`, `Standard_GRS`, `Standard_RAGRS`, `Standard_GZRS`, `Standard_RAGZRS`, `Standard_ZRS`, `Premium_LRS` or `Premium_ZRS`. Defaults to `Standard_GRS`. StorageAccountSkuName *string `pulumi:"storageAccountSkuName"` // The ID of a Virtual Network where this Databricks Cluster should be created. Changing this forces a new resource to be created. VirtualNetworkId *string `pulumi:"virtualNetworkId"` // Address prefix for Managed virtual network. Defaults to `10.139`. Changing this forces a new resource to be created. // // > **Note:** Databricks requires that a network security group is associated with the `public` and `private` subnets when a `virtualNetworkId` has been defined. Both `public` and `private` subnets must be delegated to `Microsoft.Databricks/workspaces`. For more information about subnet delegation see the [product documentation](https://docs.microsoft.com/azure/virtual-network/subnet-delegation-overview). VnetAddressPrefix *string `pulumi:"vnetAddressPrefix"` } // WorkspaceCustomParametersInput is an input type that accepts WorkspaceCustomParametersArgs and WorkspaceCustomParametersOutput values. // You can construct a concrete instance of `WorkspaceCustomParametersInput` via: // // WorkspaceCustomParametersArgs{...} type WorkspaceCustomParametersInput interface { pulumi.Input ToWorkspaceCustomParametersOutput() WorkspaceCustomParametersOutput ToWorkspaceCustomParametersOutputWithContext(context.Context) WorkspaceCustomParametersOutput } type WorkspaceCustomParametersArgs struct { // The ID of a Azure Machine Learning workspace to link with Databricks workspace. Changing this forces a new resource to be created. MachineLearningWorkspaceId pulumi.StringPtrInput `pulumi:"machineLearningWorkspaceId"` // Name of the NAT gateway for Secure Cluster Connectivity (No Public IP) workspace subnets (only for workspace with managed virtual network). Defaults to `nat-gateway`. Changing this forces a new resource to be created. NatGatewayName pulumi.StringPtrInput `pulumi:"natGatewayName"` // Are public IP Addresses not allowed? Possible values are `true` or `false`. Defaults to `true`. // // > **Note:** Updating `noPublicIp` parameter is only allowed if the value is changing from `false` to `true` and only for VNet-injected workspaces. // // > **Note:** In `v3.104.0` and higher of the provider the `noPublicIp` parameter will now default to `true` instead of `false`. NoPublicIp pulumi.BoolPtrInput `pulumi:"noPublicIp"` // The name of the Private Subnet within the Virtual Network. Required if `virtualNetworkId` is set. Changing this forces a new resource to be created. PrivateSubnetName pulumi.StringPtrInput `pulumi:"privateSubnetName"` // The resource ID of the `network.SubnetNetworkSecurityGroupAssociation` resource which is referred to by the `privateSubnetName` field. This is the same as the ID of the subnet referred to by the `privateSubnetName` field. Required if `virtualNetworkId` is set. PrivateSubnetNetworkSecurityGroupAssociationId pulumi.StringPtrInput `pulumi:"privateSubnetNetworkSecurityGroupAssociationId"` // Name of the Public IP for No Public IP workspace with managed virtual network. Defaults to `nat-gw-public-ip`. Changing this forces a new resource to be created. PublicIpName pulumi.StringPtrInput `pulumi:"publicIpName"` // The name of the Public Subnet within the Virtual Network. Required if `virtualNetworkId` is set. Changing this forces a new resource to be created. PublicSubnetName pulumi.StringPtrInput `pulumi:"publicSubnetName"` // The resource ID of the `network.SubnetNetworkSecurityGroupAssociation` resource which is referred to by the `publicSubnetName` field. This is the same as the ID of the subnet referred to by the `publicSubnetName` field. Required if `virtualNetworkId` is set. PublicSubnetNetworkSecurityGroupAssociationId pulumi.StringPtrInput `pulumi:"publicSubnetNetworkSecurityGroupAssociationId"` // Default Databricks File Storage account name. Defaults to a randomized name(e.g. `dbstoragel6mfeghoe5kxu`). Changing this forces a new resource to be created. StorageAccountName pulumi.StringPtrInput `pulumi:"storageAccountName"` // Storage account SKU name. Possible values include `Standard_LRS`, `Standard_GRS`, `Standard_RAGRS`, `Standard_GZRS`, `Standard_RAGZRS`, `Standard_ZRS`, `Premium_LRS` or `Premium_ZRS`. Defaults to `Standard_GRS`. StorageAccountSkuName pulumi.StringPtrInput `pulumi:"storageAccountSkuName"` // The ID of a Virtual Network where this Databricks Cluster should be created. Changing this forces a new resource to be created. VirtualNetworkId pulumi.StringPtrInput `pulumi:"virtualNetworkId"` // Address prefix for Managed virtual network. Defaults to `10.139`. Changing this forces a new resource to be created. // // > **Note:** Databricks requires that a network security group is associated with the `public` and `private` subnets when a `virtualNetworkId` has been defined. Both `public` and `private` subnets must be delegated to `Microsoft.Databricks/workspaces`. For more information about subnet delegation see the [product documentation](https://docs.microsoft.com/azure/virtual-network/subnet-delegation-overview). VnetAddressPrefix pulumi.StringPtrInput `pulumi:"vnetAddressPrefix"` } func (WorkspaceCustomParametersArgs) ElementType() reflect.Type { return reflect.TypeOf((*WorkspaceCustomParameters)(nil)).Elem() } func (i WorkspaceCustomParametersArgs) ToWorkspaceCustomParametersOutput() WorkspaceCustomParametersOutput { return i.ToWorkspaceCustomParametersOutputWithContext(context.Background()) } func (i WorkspaceCustomParametersArgs) ToWorkspaceCustomParametersOutputWithContext(ctx context.Context) WorkspaceCustomParametersOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceCustomParametersOutput) } func (i WorkspaceCustomParametersArgs) ToWorkspaceCustomParametersPtrOutput() WorkspaceCustomParametersPtrOutput { return i.ToWorkspaceCustomParametersPtrOutputWithContext(context.Background()) } func (i WorkspaceCustomParametersArgs) ToWorkspaceCustomParametersPtrOutputWithContext(ctx context.Context) WorkspaceCustomParametersPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceCustomParametersOutput).ToWorkspaceCustomParametersPtrOutputWithContext(ctx) } // WorkspaceCustomParametersPtrInput is an input type that accepts WorkspaceCustomParametersArgs, WorkspaceCustomParametersPtr and WorkspaceCustomParametersPtrOutput values. // You can construct a concrete instance of `WorkspaceCustomParametersPtrInput` via: // // WorkspaceCustomParametersArgs{...} // // or: // // nil type WorkspaceCustomParametersPtrInput interface { pulumi.Input ToWorkspaceCustomParametersPtrOutput() WorkspaceCustomParametersPtrOutput ToWorkspaceCustomParametersPtrOutputWithContext(context.Context) WorkspaceCustomParametersPtrOutput } type workspaceCustomParametersPtrType WorkspaceCustomParametersArgs func WorkspaceCustomParametersPtr(v *WorkspaceCustomParametersArgs) WorkspaceCustomParametersPtrInput { return (*workspaceCustomParametersPtrType)(v) } func (*workspaceCustomParametersPtrType) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceCustomParameters)(nil)).Elem() } func (i *workspaceCustomParametersPtrType) ToWorkspaceCustomParametersPtrOutput() WorkspaceCustomParametersPtrOutput { return i.ToWorkspaceCustomParametersPtrOutputWithContext(context.Background()) } func (i *workspaceCustomParametersPtrType) ToWorkspaceCustomParametersPtrOutputWithContext(ctx context.Context) WorkspaceCustomParametersPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceCustomParametersPtrOutput) } type WorkspaceCustomParametersOutput struct{ *pulumi.OutputState } func (WorkspaceCustomParametersOutput) ElementType() reflect.Type { return reflect.TypeOf((*WorkspaceCustomParameters)(nil)).Elem() } func (o WorkspaceCustomParametersOutput) ToWorkspaceCustomParametersOutput() WorkspaceCustomParametersOutput { return o } func (o WorkspaceCustomParametersOutput) ToWorkspaceCustomParametersOutputWithContext(ctx context.Context) WorkspaceCustomParametersOutput { return o } func (o WorkspaceCustomParametersOutput) ToWorkspaceCustomParametersPtrOutput() WorkspaceCustomParametersPtrOutput { return o.ToWorkspaceCustomParametersPtrOutputWithContext(context.Background()) } func (o WorkspaceCustomParametersOutput) ToWorkspaceCustomParametersPtrOutputWithContext(ctx context.Context) WorkspaceCustomParametersPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v WorkspaceCustomParameters) *WorkspaceCustomParameters { return &v }).(WorkspaceCustomParametersPtrOutput) } // The ID of a Azure Machine Learning workspace to link with Databricks workspace. Changing this forces a new resource to be created. func (o WorkspaceCustomParametersOutput) MachineLearningWorkspaceId() pulumi.StringPtrOutput { return o.ApplyT(func(v WorkspaceCustomParameters) *string { return v.MachineLearningWorkspaceId }).(pulumi.StringPtrOutput) } // Name of the NAT gateway for Secure Cluster Connectivity (No Public IP) workspace subnets (only for workspace with managed virtual network). Defaults to `nat-gateway`. Changing this forces a new resource to be created. func (o WorkspaceCustomParametersOutput) NatGatewayName() pulumi.StringPtrOutput { return o.ApplyT(func(v WorkspaceCustomParameters) *string { return v.NatGatewayName }).(pulumi.StringPtrOutput) } // Are public IP Addresses not allowed? Possible values are `true` or `false`. Defaults to `true`. // // > **Note:** Updating `noPublicIp` parameter is only allowed if the value is changing from `false` to `true` and only for VNet-injected workspaces. // // > **Note:** In `v3.104.0` and higher of the provider the `noPublicIp` parameter will now default to `true` instead of `false`. func (o WorkspaceCustomParametersOutput) NoPublicIp() pulumi.BoolPtrOutput { return o.ApplyT(func(v WorkspaceCustomParameters) *bool { return v.NoPublicIp }).(pulumi.BoolPtrOutput) } // The name of the Private Subnet within the Virtual Network. Required if `virtualNetworkId` is set. Changing this forces a new resource to be created. func (o WorkspaceCustomParametersOutput) PrivateSubnetName() pulumi.StringPtrOutput { return o.ApplyT(func(v WorkspaceCustomParameters) *string { return v.PrivateSubnetName }).(pulumi.StringPtrOutput) } // The resource ID of the `network.SubnetNetworkSecurityGroupAssociation` resource which is referred to by the `privateSubnetName` field. This is the same as the ID of the subnet referred to by the `privateSubnetName` field. Required if `virtualNetworkId` is set. func (o WorkspaceCustomParametersOutput) PrivateSubnetNetworkSecurityGroupAssociationId() pulumi.StringPtrOutput { return o.ApplyT(func(v WorkspaceCustomParameters) *string { return v.PrivateSubnetNetworkSecurityGroupAssociationId }).(pulumi.StringPtrOutput) } // Name of the Public IP for No Public IP workspace with managed virtual network. Defaults to `nat-gw-public-ip`. Changing this forces a new resource to be created. func (o WorkspaceCustomParametersOutput) PublicIpName() pulumi.StringPtrOutput { return o.ApplyT(func(v WorkspaceCustomParameters) *string { return v.PublicIpName }).(pulumi.StringPtrOutput) } // The name of the Public Subnet within the Virtual Network. Required if `virtualNetworkId` is set. Changing this forces a new resource to be created. func (o WorkspaceCustomParametersOutput) PublicSubnetName() pulumi.StringPtrOutput { return o.ApplyT(func(v WorkspaceCustomParameters) *string { return v.PublicSubnetName }).(pulumi.StringPtrOutput) } // The resource ID of the `network.SubnetNetworkSecurityGroupAssociation` resource which is referred to by the `publicSubnetName` field. This is the same as the ID of the subnet referred to by the `publicSubnetName` field. Required if `virtualNetworkId` is set. func (o WorkspaceCustomParametersOutput) PublicSubnetNetworkSecurityGroupAssociationId() pulumi.StringPtrOutput { return o.ApplyT(func(v WorkspaceCustomParameters) *string { return v.PublicSubnetNetworkSecurityGroupAssociationId }).(pulumi.StringPtrOutput) } // Default Databricks File Storage account name. Defaults to a randomized name(e.g. `dbstoragel6mfeghoe5kxu`). Changing this forces a new resource to be created. func (o WorkspaceCustomParametersOutput) StorageAccountName() pulumi.StringPtrOutput { return o.ApplyT(func(v WorkspaceCustomParameters) *string { return v.StorageAccountName }).(pulumi.StringPtrOutput) } // Storage account SKU name. Possible values include `Standard_LRS`, `Standard_GRS`, `Standard_RAGRS`, `Standard_GZRS`, `Standard_RAGZRS`, `Standard_ZRS`, `Premium_LRS` or `Premium_ZRS`. Defaults to `Standard_GRS`. func (o WorkspaceCustomParametersOutput) StorageAccountSkuName() pulumi.StringPtrOutput { return o.ApplyT(func(v WorkspaceCustomParameters) *string { return v.StorageAccountSkuName }).(pulumi.StringPtrOutput) } // The ID of a Virtual Network where this Databricks Cluster should be created. Changing this forces a new resource to be created. func (o WorkspaceCustomParametersOutput) VirtualNetworkId() pulumi.StringPtrOutput { return o.ApplyT(func(v WorkspaceCustomParameters) *string { return v.VirtualNetworkId }).(pulumi.StringPtrOutput) } // Address prefix for Managed virtual network. Defaults to `10.139`. Changing this forces a new resource to be created. // // > **Note:** Databricks requires that a network security group is associated with the `public` and `private` subnets when a `virtualNetworkId` has been defined. Both `public` and `private` subnets must be delegated to `Microsoft.Databricks/workspaces`. For more information about subnet delegation see the [product documentation](https://docs.microsoft.com/azure/virtual-network/subnet-delegation-overview). func (o WorkspaceCustomParametersOutput) VnetAddressPrefix() pulumi.StringPtrOutput { return o.ApplyT(func(v WorkspaceCustomParameters) *string { return v.VnetAddressPrefix }).(pulumi.StringPtrOutput) } type WorkspaceCustomParametersPtrOutput struct{ *pulumi.OutputState } func (WorkspaceCustomParametersPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceCustomParameters)(nil)).Elem() } func (o WorkspaceCustomParametersPtrOutput) ToWorkspaceCustomParametersPtrOutput() WorkspaceCustomParametersPtrOutput { return o } func (o WorkspaceCustomParametersPtrOutput) ToWorkspaceCustomParametersPtrOutputWithContext(ctx context.Context) WorkspaceCustomParametersPtrOutput { return o } func (o WorkspaceCustomParametersPtrOutput) Elem() WorkspaceCustomParametersOutput { return o.ApplyT(func(v *WorkspaceCustomParameters) WorkspaceCustomParameters { if v != nil { return *v } var ret WorkspaceCustomParameters return ret }).(WorkspaceCustomParametersOutput) } // The ID of a Azure Machine Learning workspace to link with Databricks workspace. Changing this forces a new resource to be created. func (o WorkspaceCustomParametersPtrOutput) MachineLearningWorkspaceId() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceCustomParameters) *string { if v == nil { return nil } return v.MachineLearningWorkspaceId }).(pulumi.StringPtrOutput) } // Name of the NAT gateway for Secure Cluster Connectivity (No Public IP) workspace subnets (only for workspace with managed virtual network). Defaults to `nat-gateway`. Changing this forces a new resource to be created. func (o WorkspaceCustomParametersPtrOutput) NatGatewayName() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceCustomParameters) *string { if v == nil { return nil } return v.NatGatewayName }).(pulumi.StringPtrOutput) } // Are public IP Addresses not allowed? Possible values are `true` or `false`. Defaults to `true`. // // > **Note:** Updating `noPublicIp` parameter is only allowed if the value is changing from `false` to `true` and only for VNet-injected workspaces. // // > **Note:** In `v3.104.0` and higher of the provider the `noPublicIp` parameter will now default to `true` instead of `false`. func (o WorkspaceCustomParametersPtrOutput) NoPublicIp() pulumi.BoolPtrOutput { return o.ApplyT(func(v *WorkspaceCustomParameters) *bool { if v == nil { return nil } return v.NoPublicIp }).(pulumi.BoolPtrOutput) } // The name of the Private Subnet within the Virtual Network. Required if `virtualNetworkId` is set. Changing this forces a new resource to be created. func (o WorkspaceCustomParametersPtrOutput) PrivateSubnetName() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceCustomParameters) *string { if v == nil { return nil } return v.PrivateSubnetName }).(pulumi.StringPtrOutput) } // The resource ID of the `network.SubnetNetworkSecurityGroupAssociation` resource which is referred to by the `privateSubnetName` field. This is the same as the ID of the subnet referred to by the `privateSubnetName` field. Required if `virtualNetworkId` is set. func (o WorkspaceCustomParametersPtrOutput) PrivateSubnetNetworkSecurityGroupAssociationId() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceCustomParameters) *string { if v == nil { return nil } return v.PrivateSubnetNetworkSecurityGroupAssociationId }).(pulumi.StringPtrOutput) } // Name of the Public IP for No Public IP workspace with managed virtual network. Defaults to `nat-gw-public-ip`. Changing this forces a new resource to be created. func (o WorkspaceCustomParametersPtrOutput) PublicIpName() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceCustomParameters) *string { if v == nil { return nil } return v.PublicIpName }).(pulumi.StringPtrOutput) } // The name of the Public Subnet within the Virtual Network. Required if `virtualNetworkId` is set. Changing this forces a new resource to be created. func (o WorkspaceCustomParametersPtrOutput) PublicSubnetName() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceCustomParameters) *string { if v == nil { return nil } return v.PublicSubnetName }).(pulumi.StringPtrOutput) } // The resource ID of the `network.SubnetNetworkSecurityGroupAssociation` resource which is referred to by the `publicSubnetName` field. This is the same as the ID of the subnet referred to by the `publicSubnetName` field. Required if `virtualNetworkId` is set. func (o WorkspaceCustomParametersPtrOutput) PublicSubnetNetworkSecurityGroupAssociationId() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceCustomParameters) *string { if v == nil { return nil } return v.PublicSubnetNetworkSecurityGroupAssociationId }).(pulumi.StringPtrOutput) } // Default Databricks File Storage account name. Defaults to a randomized name(e.g. `dbstoragel6mfeghoe5kxu`). Changing this forces a new resource to be created. func (o WorkspaceCustomParametersPtrOutput) StorageAccountName() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceCustomParameters) *string { if v == nil { return nil } return v.StorageAccountName }).(pulumi.StringPtrOutput) } // Storage account SKU name. Possible values include `Standard_LRS`, `Standard_GRS`, `Standard_RAGRS`, `Standard_GZRS`, `Standard_RAGZRS`, `Standard_ZRS`, `Premium_LRS` or `Premium_ZRS`. Defaults to `Standard_GRS`. func (o WorkspaceCustomParametersPtrOutput) StorageAccountSkuName() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceCustomParameters) *string { if v == nil { return nil } return v.StorageAccountSkuName }).(pulumi.StringPtrOutput) } // The ID of a Virtual Network where this Databricks Cluster should be created. Changing this forces a new resource to be created. func (o WorkspaceCustomParametersPtrOutput) VirtualNetworkId() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceCustomParameters) *string { if v == nil { return nil } return v.VirtualNetworkId }).(pulumi.StringPtrOutput) } // Address prefix for Managed virtual network. Defaults to `10.139`. Changing this forces a new resource to be created. //
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/databricks/workspaceRootDbfsCustomerManagedKey.go
sdk/go/azure/databricks/workspaceRootDbfsCustomerManagedKey.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 databricks 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 the Databricks Workspaces Root Databricks File System (DBFS) // // ## 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/databricks" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "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("examplekeyvault"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SkuName: pulumi.String("premium"), // PurgeProtectionEnabled: pulumi.Bool(true), // SoftDeleteRetentionDays: pulumi.Int(7), // }) // if err != nil { // return err // } // terraform, err := keyvault.NewAccessPolicy(ctx, "terraform", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: exampleKeyVault.TenantId, // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("Get"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Update"), // pulumi.String("List"), // pulumi.String("Decrypt"), // pulumi.String("Sign"), // pulumi.String("GetRotationPolicy"), // }, // }) // if err != nil { // return err // } // exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{ // Name: pulumi.String("example-certificate"), // 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{ // terraform, // })) // if err != nil { // return err // } // exampleWorkspace, err := databricks.NewWorkspace(ctx, "example", &databricks.WorkspaceArgs{ // Name: pulumi.String("example-workspace"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: pulumi.String("premium"), // CustomerManagedKeyEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // databricks, err := keyvault.NewAccessPolicy(ctx, "databricks", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(exampleWorkspace.StorageAccountIdentities.ApplyT(func(storageAccountIdentities []databricks.WorkspaceStorageAccountIdentity) (*string, error) { // return &storageAccountIdentities[0].TenantId, nil // }).(pulumi.StringPtrOutput)), // ObjectId: pulumi.String(exampleWorkspace.StorageAccountIdentities.ApplyT(func(storageAccountIdentities []databricks.WorkspaceStorageAccountIdentity) (*string, error) { // return &storageAccountIdentities[0].PrincipalId, nil // }).(pulumi.StringPtrOutput)), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("Get"), // pulumi.String("Purge"), // pulumi.String("Recover"), // pulumi.String("Update"), // pulumi.String("List"), // pulumi.String("Decrypt"), // pulumi.String("Sign"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // exampleWorkspace, // })) // if err != nil { // return err // } // _, err = databricks.NewWorkspaceRootDbfsCustomerManagedKey(ctx, "example", &databricks.WorkspaceRootDbfsCustomerManagedKeyArgs{ // WorkspaceId: exampleWorkspace.ID(), // KeyVaultKeyId: exampleKey.ID(), // }, pulumi.DependsOn([]pulumi.Resource{ // databricks, // })) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Example HCL Configurations // // * Databricks Workspace with Root Databricks File System Customer Managed Keys // * Databricks Workspace with Root Databricks File System Customer Managed Keys in a Different Subscription // * Databricks Workspace with Private Endpoint, Customer Managed Keys for Managed Services and Root Databricks File System Customer Managed Keys // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Databricks` - 2024-05-01 // // ## Import // // Databricks Workspace Root DBFS Customer Managed Key can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:databricks/workspaceRootDbfsCustomerManagedKey:WorkspaceRootDbfsCustomerManagedKey workspace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Databricks/workspaces/workspace1 // ``` type WorkspaceRootDbfsCustomerManagedKey struct { pulumi.CustomResourceState KeyVaultId pulumi.StringPtrOutput `pulumi:"keyVaultId"` // The ID of the Key Vault Key to be used. KeyVaultKeyId pulumi.StringOutput `pulumi:"keyVaultKeyId"` // The Resource ID of the Databricks Workspace. WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"` } // NewWorkspaceRootDbfsCustomerManagedKey registers a new resource with the given unique name, arguments, and options. func NewWorkspaceRootDbfsCustomerManagedKey(ctx *pulumi.Context, name string, args *WorkspaceRootDbfsCustomerManagedKeyArgs, opts ...pulumi.ResourceOption) (*WorkspaceRootDbfsCustomerManagedKey, 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.WorkspaceId == nil { return nil, errors.New("invalid value for required argument 'WorkspaceId'") } aliases := pulumi.Aliases([]pulumi.Alias{ { Type: pulumi.String("azure:databricks/workspaceCustomerManagedKey:WorkspaceCustomerManagedKey"), }, }) opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource WorkspaceRootDbfsCustomerManagedKey err := ctx.RegisterResource("azure:databricks/workspaceRootDbfsCustomerManagedKey:WorkspaceRootDbfsCustomerManagedKey", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWorkspaceRootDbfsCustomerManagedKey gets an existing WorkspaceRootDbfsCustomerManagedKey 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 GetWorkspaceRootDbfsCustomerManagedKey(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WorkspaceRootDbfsCustomerManagedKeyState, opts ...pulumi.ResourceOption) (*WorkspaceRootDbfsCustomerManagedKey, error) { var resource WorkspaceRootDbfsCustomerManagedKey err := ctx.ReadResource("azure:databricks/workspaceRootDbfsCustomerManagedKey:WorkspaceRootDbfsCustomerManagedKey", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering WorkspaceRootDbfsCustomerManagedKey resources. type workspaceRootDbfsCustomerManagedKeyState struct { KeyVaultId *string `pulumi:"keyVaultId"` // The ID of the Key Vault Key to be used. KeyVaultKeyId *string `pulumi:"keyVaultKeyId"` // The Resource ID of the Databricks Workspace. WorkspaceId *string `pulumi:"workspaceId"` } type WorkspaceRootDbfsCustomerManagedKeyState struct { KeyVaultId pulumi.StringPtrInput // The ID of the Key Vault Key to be used. KeyVaultKeyId pulumi.StringPtrInput // The Resource ID of the Databricks Workspace. WorkspaceId pulumi.StringPtrInput } func (WorkspaceRootDbfsCustomerManagedKeyState) ElementType() reflect.Type { return reflect.TypeOf((*workspaceRootDbfsCustomerManagedKeyState)(nil)).Elem() } type workspaceRootDbfsCustomerManagedKeyArgs struct { KeyVaultId *string `pulumi:"keyVaultId"` // The ID of the Key Vault Key to be used. KeyVaultKeyId string `pulumi:"keyVaultKeyId"` // The Resource ID of the Databricks Workspace. WorkspaceId string `pulumi:"workspaceId"` } // The set of arguments for constructing a WorkspaceRootDbfsCustomerManagedKey resource. type WorkspaceRootDbfsCustomerManagedKeyArgs struct { KeyVaultId pulumi.StringPtrInput // The ID of the Key Vault Key to be used. KeyVaultKeyId pulumi.StringInput // The Resource ID of the Databricks Workspace. WorkspaceId pulumi.StringInput } func (WorkspaceRootDbfsCustomerManagedKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*workspaceRootDbfsCustomerManagedKeyArgs)(nil)).Elem() } type WorkspaceRootDbfsCustomerManagedKeyInput interface { pulumi.Input ToWorkspaceRootDbfsCustomerManagedKeyOutput() WorkspaceRootDbfsCustomerManagedKeyOutput ToWorkspaceRootDbfsCustomerManagedKeyOutputWithContext(ctx context.Context) WorkspaceRootDbfsCustomerManagedKeyOutput } func (*WorkspaceRootDbfsCustomerManagedKey) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceRootDbfsCustomerManagedKey)(nil)).Elem() } func (i *WorkspaceRootDbfsCustomerManagedKey) ToWorkspaceRootDbfsCustomerManagedKeyOutput() WorkspaceRootDbfsCustomerManagedKeyOutput { return i.ToWorkspaceRootDbfsCustomerManagedKeyOutputWithContext(context.Background()) } func (i *WorkspaceRootDbfsCustomerManagedKey) ToWorkspaceRootDbfsCustomerManagedKeyOutputWithContext(ctx context.Context) WorkspaceRootDbfsCustomerManagedKeyOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceRootDbfsCustomerManagedKeyOutput) } // WorkspaceRootDbfsCustomerManagedKeyArrayInput is an input type that accepts WorkspaceRootDbfsCustomerManagedKeyArray and WorkspaceRootDbfsCustomerManagedKeyArrayOutput values. // You can construct a concrete instance of `WorkspaceRootDbfsCustomerManagedKeyArrayInput` via: // // WorkspaceRootDbfsCustomerManagedKeyArray{ WorkspaceRootDbfsCustomerManagedKeyArgs{...} } type WorkspaceRootDbfsCustomerManagedKeyArrayInput interface { pulumi.Input ToWorkspaceRootDbfsCustomerManagedKeyArrayOutput() WorkspaceRootDbfsCustomerManagedKeyArrayOutput ToWorkspaceRootDbfsCustomerManagedKeyArrayOutputWithContext(context.Context) WorkspaceRootDbfsCustomerManagedKeyArrayOutput } type WorkspaceRootDbfsCustomerManagedKeyArray []WorkspaceRootDbfsCustomerManagedKeyInput func (WorkspaceRootDbfsCustomerManagedKeyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceRootDbfsCustomerManagedKey)(nil)).Elem() } func (i WorkspaceRootDbfsCustomerManagedKeyArray) ToWorkspaceRootDbfsCustomerManagedKeyArrayOutput() WorkspaceRootDbfsCustomerManagedKeyArrayOutput { return i.ToWorkspaceRootDbfsCustomerManagedKeyArrayOutputWithContext(context.Background()) } func (i WorkspaceRootDbfsCustomerManagedKeyArray) ToWorkspaceRootDbfsCustomerManagedKeyArrayOutputWithContext(ctx context.Context) WorkspaceRootDbfsCustomerManagedKeyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceRootDbfsCustomerManagedKeyArrayOutput) } // WorkspaceRootDbfsCustomerManagedKeyMapInput is an input type that accepts WorkspaceRootDbfsCustomerManagedKeyMap and WorkspaceRootDbfsCustomerManagedKeyMapOutput values. // You can construct a concrete instance of `WorkspaceRootDbfsCustomerManagedKeyMapInput` via: // // WorkspaceRootDbfsCustomerManagedKeyMap{ "key": WorkspaceRootDbfsCustomerManagedKeyArgs{...} } type WorkspaceRootDbfsCustomerManagedKeyMapInput interface { pulumi.Input ToWorkspaceRootDbfsCustomerManagedKeyMapOutput() WorkspaceRootDbfsCustomerManagedKeyMapOutput ToWorkspaceRootDbfsCustomerManagedKeyMapOutputWithContext(context.Context) WorkspaceRootDbfsCustomerManagedKeyMapOutput } type WorkspaceRootDbfsCustomerManagedKeyMap map[string]WorkspaceRootDbfsCustomerManagedKeyInput func (WorkspaceRootDbfsCustomerManagedKeyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceRootDbfsCustomerManagedKey)(nil)).Elem() } func (i WorkspaceRootDbfsCustomerManagedKeyMap) ToWorkspaceRootDbfsCustomerManagedKeyMapOutput() WorkspaceRootDbfsCustomerManagedKeyMapOutput { return i.ToWorkspaceRootDbfsCustomerManagedKeyMapOutputWithContext(context.Background()) } func (i WorkspaceRootDbfsCustomerManagedKeyMap) ToWorkspaceRootDbfsCustomerManagedKeyMapOutputWithContext(ctx context.Context) WorkspaceRootDbfsCustomerManagedKeyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceRootDbfsCustomerManagedKeyMapOutput) } type WorkspaceRootDbfsCustomerManagedKeyOutput struct{ *pulumi.OutputState } func (WorkspaceRootDbfsCustomerManagedKeyOutput) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceRootDbfsCustomerManagedKey)(nil)).Elem() } func (o WorkspaceRootDbfsCustomerManagedKeyOutput) ToWorkspaceRootDbfsCustomerManagedKeyOutput() WorkspaceRootDbfsCustomerManagedKeyOutput { return o } func (o WorkspaceRootDbfsCustomerManagedKeyOutput) ToWorkspaceRootDbfsCustomerManagedKeyOutputWithContext(ctx context.Context) WorkspaceRootDbfsCustomerManagedKeyOutput { return o } func (o WorkspaceRootDbfsCustomerManagedKeyOutput) KeyVaultId() pulumi.StringPtrOutput { return o.ApplyT(func(v *WorkspaceRootDbfsCustomerManagedKey) pulumi.StringPtrOutput { return v.KeyVaultId }).(pulumi.StringPtrOutput) } // The ID of the Key Vault Key to be used. func (o WorkspaceRootDbfsCustomerManagedKeyOutput) KeyVaultKeyId() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceRootDbfsCustomerManagedKey) pulumi.StringOutput { return v.KeyVaultKeyId }).(pulumi.StringOutput) } // The Resource ID of the Databricks Workspace. func (o WorkspaceRootDbfsCustomerManagedKeyOutput) WorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceRootDbfsCustomerManagedKey) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput) } type WorkspaceRootDbfsCustomerManagedKeyArrayOutput struct{ *pulumi.OutputState } func (WorkspaceRootDbfsCustomerManagedKeyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceRootDbfsCustomerManagedKey)(nil)).Elem() } func (o WorkspaceRootDbfsCustomerManagedKeyArrayOutput) ToWorkspaceRootDbfsCustomerManagedKeyArrayOutput() WorkspaceRootDbfsCustomerManagedKeyArrayOutput { return o } func (o WorkspaceRootDbfsCustomerManagedKeyArrayOutput) ToWorkspaceRootDbfsCustomerManagedKeyArrayOutputWithContext(ctx context.Context) WorkspaceRootDbfsCustomerManagedKeyArrayOutput { return o } func (o WorkspaceRootDbfsCustomerManagedKeyArrayOutput) Index(i pulumi.IntInput) WorkspaceRootDbfsCustomerManagedKeyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceRootDbfsCustomerManagedKey { return vs[0].([]*WorkspaceRootDbfsCustomerManagedKey)[vs[1].(int)] }).(WorkspaceRootDbfsCustomerManagedKeyOutput) } type WorkspaceRootDbfsCustomerManagedKeyMapOutput struct{ *pulumi.OutputState } func (WorkspaceRootDbfsCustomerManagedKeyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceRootDbfsCustomerManagedKey)(nil)).Elem() } func (o WorkspaceRootDbfsCustomerManagedKeyMapOutput) ToWorkspaceRootDbfsCustomerManagedKeyMapOutput() WorkspaceRootDbfsCustomerManagedKeyMapOutput { return o } func (o WorkspaceRootDbfsCustomerManagedKeyMapOutput) ToWorkspaceRootDbfsCustomerManagedKeyMapOutputWithContext(ctx context.Context) WorkspaceRootDbfsCustomerManagedKeyMapOutput { return o } func (o WorkspaceRootDbfsCustomerManagedKeyMapOutput) MapIndex(k pulumi.StringInput) WorkspaceRootDbfsCustomerManagedKeyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceRootDbfsCustomerManagedKey { return vs[0].(map[string]*WorkspaceRootDbfsCustomerManagedKey)[vs[1].(string)] }).(WorkspaceRootDbfsCustomerManagedKeyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceRootDbfsCustomerManagedKeyInput)(nil)).Elem(), &WorkspaceRootDbfsCustomerManagedKey{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceRootDbfsCustomerManagedKeyArrayInput)(nil)).Elem(), WorkspaceRootDbfsCustomerManagedKeyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceRootDbfsCustomerManagedKeyMapInput)(nil)).Elem(), WorkspaceRootDbfsCustomerManagedKeyMap{}) pulumi.RegisterOutputType(WorkspaceRootDbfsCustomerManagedKeyOutput{}) pulumi.RegisterOutputType(WorkspaceRootDbfsCustomerManagedKeyArrayOutput{}) pulumi.RegisterOutputType(WorkspaceRootDbfsCustomerManagedKeyMapOutput{}) }
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/databricks/accessConnector.go
sdk/go/azure/databricks/accessConnector.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 databricks import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Databricks Access 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/databricks" // "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 = databricks.NewAccessConnector(ctx, "example", &databricks.AccessConnectorArgs{ // Name: pulumi.String("example-resource"), // ResourceGroupName: example.Name, // Location: example.Location, // Identity: &databricks.AccessConnectorIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // Tags: pulumi.StringMap{ // "Environment": pulumi.String("Production"), // }, // }) // 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.Databricks` - 2022-10-01-preview // // ## Import // // Databricks Access Connectors can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:databricks/accessConnector:AccessConnector connector1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Databricks/accessConnectors/connector1 // ``` type AccessConnector struct { pulumi.CustomResourceState // An `identity` block as defined below. Identity AccessConnectorIdentityPtrOutput `pulumi:"identity"` // Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of the Databricks Access Connector resource. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group in which the Databricks Access Connector 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"` } // NewAccessConnector registers a new resource with the given unique name, arguments, and options. func NewAccessConnector(ctx *pulumi.Context, name string, args *AccessConnectorArgs, opts ...pulumi.ResourceOption) (*AccessConnector, 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 AccessConnector err := ctx.RegisterResource("azure:databricks/accessConnector:AccessConnector", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAccessConnector gets an existing AccessConnector 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 GetAccessConnector(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AccessConnectorState, opts ...pulumi.ResourceOption) (*AccessConnector, error) { var resource AccessConnector err := ctx.ReadResource("azure:databricks/accessConnector:AccessConnector", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AccessConnector resources. type accessConnectorState struct { // An `identity` block as defined below. Identity *AccessConnectorIdentity `pulumi:"identity"` // Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Databricks Access Connector resource. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group in which the Databricks Access Connector 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"` } type AccessConnectorState struct { // An `identity` block as defined below. Identity AccessConnectorIdentityPtrInput // Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Databricks Access Connector resource. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group in which the Databricks Access Connector 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 } func (AccessConnectorState) ElementType() reflect.Type { return reflect.TypeOf((*accessConnectorState)(nil)).Elem() } type accessConnectorArgs struct { // An `identity` block as defined below. Identity *AccessConnectorIdentity `pulumi:"identity"` // Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Databricks Access Connector resource. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group in which the Databricks Access Connector 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"` } // The set of arguments for constructing a AccessConnector resource. type AccessConnectorArgs struct { // An `identity` block as defined below. Identity AccessConnectorIdentityPtrInput // Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Databricks Access Connector resource. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group in which the Databricks Access Connector 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 } func (AccessConnectorArgs) ElementType() reflect.Type { return reflect.TypeOf((*accessConnectorArgs)(nil)).Elem() } type AccessConnectorInput interface { pulumi.Input ToAccessConnectorOutput() AccessConnectorOutput ToAccessConnectorOutputWithContext(ctx context.Context) AccessConnectorOutput } func (*AccessConnector) ElementType() reflect.Type { return reflect.TypeOf((**AccessConnector)(nil)).Elem() } func (i *AccessConnector) ToAccessConnectorOutput() AccessConnectorOutput { return i.ToAccessConnectorOutputWithContext(context.Background()) } func (i *AccessConnector) ToAccessConnectorOutputWithContext(ctx context.Context) AccessConnectorOutput { return pulumi.ToOutputWithContext(ctx, i).(AccessConnectorOutput) } // AccessConnectorArrayInput is an input type that accepts AccessConnectorArray and AccessConnectorArrayOutput values. // You can construct a concrete instance of `AccessConnectorArrayInput` via: // // AccessConnectorArray{ AccessConnectorArgs{...} } type AccessConnectorArrayInput interface { pulumi.Input ToAccessConnectorArrayOutput() AccessConnectorArrayOutput ToAccessConnectorArrayOutputWithContext(context.Context) AccessConnectorArrayOutput } type AccessConnectorArray []AccessConnectorInput func (AccessConnectorArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AccessConnector)(nil)).Elem() } func (i AccessConnectorArray) ToAccessConnectorArrayOutput() AccessConnectorArrayOutput { return i.ToAccessConnectorArrayOutputWithContext(context.Background()) } func (i AccessConnectorArray) ToAccessConnectorArrayOutputWithContext(ctx context.Context) AccessConnectorArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AccessConnectorArrayOutput) } // AccessConnectorMapInput is an input type that accepts AccessConnectorMap and AccessConnectorMapOutput values. // You can construct a concrete instance of `AccessConnectorMapInput` via: // // AccessConnectorMap{ "key": AccessConnectorArgs{...} } type AccessConnectorMapInput interface { pulumi.Input ToAccessConnectorMapOutput() AccessConnectorMapOutput ToAccessConnectorMapOutputWithContext(context.Context) AccessConnectorMapOutput } type AccessConnectorMap map[string]AccessConnectorInput func (AccessConnectorMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AccessConnector)(nil)).Elem() } func (i AccessConnectorMap) ToAccessConnectorMapOutput() AccessConnectorMapOutput { return i.ToAccessConnectorMapOutputWithContext(context.Background()) } func (i AccessConnectorMap) ToAccessConnectorMapOutputWithContext(ctx context.Context) AccessConnectorMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AccessConnectorMapOutput) } type AccessConnectorOutput struct{ *pulumi.OutputState } func (AccessConnectorOutput) ElementType() reflect.Type { return reflect.TypeOf((**AccessConnector)(nil)).Elem() } func (o AccessConnectorOutput) ToAccessConnectorOutput() AccessConnectorOutput { return o } func (o AccessConnectorOutput) ToAccessConnectorOutputWithContext(ctx context.Context) AccessConnectorOutput { return o } // An `identity` block as defined below. func (o AccessConnectorOutput) Identity() AccessConnectorIdentityPtrOutput { return o.ApplyT(func(v *AccessConnector) AccessConnectorIdentityPtrOutput { return v.Identity }).(AccessConnectorIdentityPtrOutput) } // Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created. func (o AccessConnectorOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *AccessConnector) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the Databricks Access Connector resource. Changing this forces a new resource to be created. func (o AccessConnectorOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AccessConnector) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group in which the Databricks Access Connector should exist. Changing this forces a new resource to be created. func (o AccessConnectorOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *AccessConnector) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o AccessConnectorOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *AccessConnector) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type AccessConnectorArrayOutput struct{ *pulumi.OutputState } func (AccessConnectorArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AccessConnector)(nil)).Elem() } func (o AccessConnectorArrayOutput) ToAccessConnectorArrayOutput() AccessConnectorArrayOutput { return o } func (o AccessConnectorArrayOutput) ToAccessConnectorArrayOutputWithContext(ctx context.Context) AccessConnectorArrayOutput { return o } func (o AccessConnectorArrayOutput) Index(i pulumi.IntInput) AccessConnectorOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AccessConnector { return vs[0].([]*AccessConnector)[vs[1].(int)] }).(AccessConnectorOutput) } type AccessConnectorMapOutput struct{ *pulumi.OutputState } func (AccessConnectorMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AccessConnector)(nil)).Elem() } func (o AccessConnectorMapOutput) ToAccessConnectorMapOutput() AccessConnectorMapOutput { return o } func (o AccessConnectorMapOutput) ToAccessConnectorMapOutputWithContext(ctx context.Context) AccessConnectorMapOutput { return o } func (o AccessConnectorMapOutput) MapIndex(k pulumi.StringInput) AccessConnectorOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AccessConnector { return vs[0].(map[string]*AccessConnector)[vs[1].(string)] }).(AccessConnectorOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AccessConnectorInput)(nil)).Elem(), &AccessConnector{}) pulumi.RegisterInputType(reflect.TypeOf((*AccessConnectorArrayInput)(nil)).Elem(), AccessConnectorArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AccessConnectorMapInput)(nil)).Elem(), AccessConnectorMap{}) pulumi.RegisterOutputType(AccessConnectorOutput{}) pulumi.RegisterOutputType(AccessConnectorArrayOutput{}) pulumi.RegisterOutputType(AccessConnectorMapOutput{}) }
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/databricks/workspaceCustomerManagedKey.go
sdk/go/azure/databricks/workspaceCustomerManagedKey.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 databricks import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## Import // // Databrick Workspaces can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:databricks/workspaceCustomerManagedKey:WorkspaceCustomerManagedKey workspace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Databricks/workspaces/workspace1 // ``` type WorkspaceCustomerManagedKey struct { pulumi.CustomResourceState KeyVaultKeyId pulumi.StringOutput `pulumi:"keyVaultKeyId"` // The unique identifier of the databricks workspace in Databricks control plane. WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"` } // NewWorkspaceCustomerManagedKey registers a new resource with the given unique name, arguments, and options. func NewWorkspaceCustomerManagedKey(ctx *pulumi.Context, name string, args *WorkspaceCustomerManagedKeyArgs, opts ...pulumi.ResourceOption) (*WorkspaceCustomerManagedKey, 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.WorkspaceId == nil { return nil, errors.New("invalid value for required argument 'WorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource WorkspaceCustomerManagedKey err := ctx.RegisterResource("azure:databricks/workspaceCustomerManagedKey:WorkspaceCustomerManagedKey", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWorkspaceCustomerManagedKey gets an existing WorkspaceCustomerManagedKey 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 GetWorkspaceCustomerManagedKey(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WorkspaceCustomerManagedKeyState, opts ...pulumi.ResourceOption) (*WorkspaceCustomerManagedKey, error) { var resource WorkspaceCustomerManagedKey err := ctx.ReadResource("azure:databricks/workspaceCustomerManagedKey:WorkspaceCustomerManagedKey", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering WorkspaceCustomerManagedKey resources. type workspaceCustomerManagedKeyState struct { KeyVaultKeyId *string `pulumi:"keyVaultKeyId"` // The unique identifier of the databricks workspace in Databricks control plane. WorkspaceId *string `pulumi:"workspaceId"` } type WorkspaceCustomerManagedKeyState struct { KeyVaultKeyId pulumi.StringPtrInput // The unique identifier of the databricks workspace in Databricks control plane. WorkspaceId pulumi.StringPtrInput } func (WorkspaceCustomerManagedKeyState) ElementType() reflect.Type { return reflect.TypeOf((*workspaceCustomerManagedKeyState)(nil)).Elem() } type workspaceCustomerManagedKeyArgs struct { KeyVaultKeyId string `pulumi:"keyVaultKeyId"` // The unique identifier of the databricks workspace in Databricks control plane. WorkspaceId string `pulumi:"workspaceId"` } // The set of arguments for constructing a WorkspaceCustomerManagedKey resource. type WorkspaceCustomerManagedKeyArgs struct { KeyVaultKeyId pulumi.StringInput // The unique identifier of the databricks workspace in Databricks control plane. WorkspaceId pulumi.StringInput } func (WorkspaceCustomerManagedKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*workspaceCustomerManagedKeyArgs)(nil)).Elem() } type WorkspaceCustomerManagedKeyInput interface { pulumi.Input ToWorkspaceCustomerManagedKeyOutput() WorkspaceCustomerManagedKeyOutput ToWorkspaceCustomerManagedKeyOutputWithContext(ctx context.Context) WorkspaceCustomerManagedKeyOutput } func (*WorkspaceCustomerManagedKey) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceCustomerManagedKey)(nil)).Elem() } func (i *WorkspaceCustomerManagedKey) ToWorkspaceCustomerManagedKeyOutput() WorkspaceCustomerManagedKeyOutput { return i.ToWorkspaceCustomerManagedKeyOutputWithContext(context.Background()) } func (i *WorkspaceCustomerManagedKey) ToWorkspaceCustomerManagedKeyOutputWithContext(ctx context.Context) WorkspaceCustomerManagedKeyOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceCustomerManagedKeyOutput) } // WorkspaceCustomerManagedKeyArrayInput is an input type that accepts WorkspaceCustomerManagedKeyArray and WorkspaceCustomerManagedKeyArrayOutput values. // You can construct a concrete instance of `WorkspaceCustomerManagedKeyArrayInput` via: // // WorkspaceCustomerManagedKeyArray{ WorkspaceCustomerManagedKeyArgs{...} } type WorkspaceCustomerManagedKeyArrayInput interface { pulumi.Input ToWorkspaceCustomerManagedKeyArrayOutput() WorkspaceCustomerManagedKeyArrayOutput ToWorkspaceCustomerManagedKeyArrayOutputWithContext(context.Context) WorkspaceCustomerManagedKeyArrayOutput } type WorkspaceCustomerManagedKeyArray []WorkspaceCustomerManagedKeyInput func (WorkspaceCustomerManagedKeyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceCustomerManagedKey)(nil)).Elem() } func (i WorkspaceCustomerManagedKeyArray) ToWorkspaceCustomerManagedKeyArrayOutput() WorkspaceCustomerManagedKeyArrayOutput { return i.ToWorkspaceCustomerManagedKeyArrayOutputWithContext(context.Background()) } func (i WorkspaceCustomerManagedKeyArray) ToWorkspaceCustomerManagedKeyArrayOutputWithContext(ctx context.Context) WorkspaceCustomerManagedKeyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceCustomerManagedKeyArrayOutput) } // WorkspaceCustomerManagedKeyMapInput is an input type that accepts WorkspaceCustomerManagedKeyMap and WorkspaceCustomerManagedKeyMapOutput values. // You can construct a concrete instance of `WorkspaceCustomerManagedKeyMapInput` via: // // WorkspaceCustomerManagedKeyMap{ "key": WorkspaceCustomerManagedKeyArgs{...} } type WorkspaceCustomerManagedKeyMapInput interface { pulumi.Input ToWorkspaceCustomerManagedKeyMapOutput() WorkspaceCustomerManagedKeyMapOutput ToWorkspaceCustomerManagedKeyMapOutputWithContext(context.Context) WorkspaceCustomerManagedKeyMapOutput } type WorkspaceCustomerManagedKeyMap map[string]WorkspaceCustomerManagedKeyInput func (WorkspaceCustomerManagedKeyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceCustomerManagedKey)(nil)).Elem() } func (i WorkspaceCustomerManagedKeyMap) ToWorkspaceCustomerManagedKeyMapOutput() WorkspaceCustomerManagedKeyMapOutput { return i.ToWorkspaceCustomerManagedKeyMapOutputWithContext(context.Background()) } func (i WorkspaceCustomerManagedKeyMap) ToWorkspaceCustomerManagedKeyMapOutputWithContext(ctx context.Context) WorkspaceCustomerManagedKeyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceCustomerManagedKeyMapOutput) } type WorkspaceCustomerManagedKeyOutput struct{ *pulumi.OutputState } func (WorkspaceCustomerManagedKeyOutput) ElementType() reflect.Type { return reflect.TypeOf((**WorkspaceCustomerManagedKey)(nil)).Elem() } func (o WorkspaceCustomerManagedKeyOutput) ToWorkspaceCustomerManagedKeyOutput() WorkspaceCustomerManagedKeyOutput { return o } func (o WorkspaceCustomerManagedKeyOutput) ToWorkspaceCustomerManagedKeyOutputWithContext(ctx context.Context) WorkspaceCustomerManagedKeyOutput { return o } func (o WorkspaceCustomerManagedKeyOutput) KeyVaultKeyId() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceCustomerManagedKey) pulumi.StringOutput { return v.KeyVaultKeyId }).(pulumi.StringOutput) } // The unique identifier of the databricks workspace in Databricks control plane. func (o WorkspaceCustomerManagedKeyOutput) WorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *WorkspaceCustomerManagedKey) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput) } type WorkspaceCustomerManagedKeyArrayOutput struct{ *pulumi.OutputState } func (WorkspaceCustomerManagedKeyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*WorkspaceCustomerManagedKey)(nil)).Elem() } func (o WorkspaceCustomerManagedKeyArrayOutput) ToWorkspaceCustomerManagedKeyArrayOutput() WorkspaceCustomerManagedKeyArrayOutput { return o } func (o WorkspaceCustomerManagedKeyArrayOutput) ToWorkspaceCustomerManagedKeyArrayOutputWithContext(ctx context.Context) WorkspaceCustomerManagedKeyArrayOutput { return o } func (o WorkspaceCustomerManagedKeyArrayOutput) Index(i pulumi.IntInput) WorkspaceCustomerManagedKeyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceCustomerManagedKey { return vs[0].([]*WorkspaceCustomerManagedKey)[vs[1].(int)] }).(WorkspaceCustomerManagedKeyOutput) } type WorkspaceCustomerManagedKeyMapOutput struct{ *pulumi.OutputState } func (WorkspaceCustomerManagedKeyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*WorkspaceCustomerManagedKey)(nil)).Elem() } func (o WorkspaceCustomerManagedKeyMapOutput) ToWorkspaceCustomerManagedKeyMapOutput() WorkspaceCustomerManagedKeyMapOutput { return o } func (o WorkspaceCustomerManagedKeyMapOutput) ToWorkspaceCustomerManagedKeyMapOutputWithContext(ctx context.Context) WorkspaceCustomerManagedKeyMapOutput { return o } func (o WorkspaceCustomerManagedKeyMapOutput) MapIndex(k pulumi.StringInput) WorkspaceCustomerManagedKeyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceCustomerManagedKey { return vs[0].(map[string]*WorkspaceCustomerManagedKey)[vs[1].(string)] }).(WorkspaceCustomerManagedKeyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceCustomerManagedKeyInput)(nil)).Elem(), &WorkspaceCustomerManagedKey{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceCustomerManagedKeyArrayInput)(nil)).Elem(), WorkspaceCustomerManagedKeyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceCustomerManagedKeyMapInput)(nil)).Elem(), WorkspaceCustomerManagedKeyMap{}) pulumi.RegisterOutputType(WorkspaceCustomerManagedKeyOutput{}) pulumi.RegisterOutputType(WorkspaceCustomerManagedKeyArrayOutput{}) pulumi.RegisterOutputType(WorkspaceCustomerManagedKeyMapOutput{}) }
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/databricks/virtualNetworkPeering.go
sdk/go/azure/databricks/virtualNetworkPeering.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 databricks import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Databricks Virtual Network Peering // // ## 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/databricks" // "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-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // remote, err := network.NewVirtualNetwork(ctx, "remote", &network.VirtualNetworkArgs{ // Name: pulumi.String("remote-vnet"), // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // Location: example.Location, // }) // if err != nil { // return err // } // exampleWorkspace, err := databricks.NewWorkspace(ctx, "example", &databricks.WorkspaceArgs{ // Name: pulumi.String("example-workspace"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: pulumi.String("standard"), // }) // if err != nil { // return err // } // exampleVirtualNetworkPeering, err := databricks.NewVirtualNetworkPeering(ctx, "example", &databricks.VirtualNetworkPeeringArgs{ // Name: pulumi.String("databricks-vnet-peer"), // ResourceGroupName: example.Name, // WorkspaceId: exampleWorkspace.ID(), // RemoteAddressSpacePrefixes: remote.AddressSpaces, // RemoteVirtualNetworkId: remote.ID(), // AllowVirtualNetworkAccess: pulumi.Bool(true), // }) // if err != nil { // return err // } // _, err = network.NewVirtualNetworkPeering(ctx, "remote", &network.VirtualNetworkPeeringArgs{ // Name: pulumi.String("peer-to-databricks"), // ResourceGroupName: example.Name, // VirtualNetworkName: remote.Name, // RemoteVirtualNetworkId: exampleVirtualNetworkPeering.VirtualNetworkId, // AllowVirtualNetworkAccess: 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.Databricks` - 2024-05-01 // // ## Import // // Databrick Virtual Network Peerings can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:databricks/virtualNetworkPeering:VirtualNetworkPeering example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Databricks/workspaces/workspace1/virtualNetworkPeerings/peering1 // ``` type VirtualNetworkPeering struct { pulumi.CustomResourceState // A list of address blocks reserved for this virtual network in CIDR notation. AddressSpacePrefixes pulumi.StringArrayOutput `pulumi:"addressSpacePrefixes"` // Can the forwarded traffic from the VMs in the local virtual network be forwarded to the remote virtual network? Defaults to `false`. AllowForwardedTraffic pulumi.BoolPtrOutput `pulumi:"allowForwardedTraffic"` // Can the gateway links be used in the remote virtual network to link to the Databricks virtual network? Defaults to `false`. AllowGatewayTransit pulumi.BoolPtrOutput `pulumi:"allowGatewayTransit"` // Can the VMs in the local virtual network space access the VMs in the remote virtual network space? Defaults to `true`. AllowVirtualNetworkAccess pulumi.BoolPtrOutput `pulumi:"allowVirtualNetworkAccess"` // Specifies the name of the Databricks Virtual Network Peering resource. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A list of address blocks reserved for the remote virtual network in CIDR notation. Changing this forces a new resource to be created. RemoteAddressSpacePrefixes pulumi.StringArrayOutput `pulumi:"remoteAddressSpacePrefixes"` // The ID of the remote virtual network. Changing this forces a new resource to be created. // // > **Note:** The remote virtual network should be in the same region as the databricks workspace. Please see the [product documentation](https://learn.microsoft.com/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering) for more information. RemoteVirtualNetworkId pulumi.StringOutput `pulumi:"remoteVirtualNetworkId"` // The name of the Resource Group in which the Databricks Virtual Network Peering should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Can remote gateways be used on the Databricks virtual network? Defaults to `false`. // // > **Note:** If the `useRemoteGateways` is set to `true`, and `allowGatewayTransit` on the remote peering is also `true`, the virtual network will use the gateways of the remote virtual network for transit. Only one peering can have this flag set to `true`. `useRemoteGateways` cannot be set if the virtual network already has a gateway. UseRemoteGateways pulumi.BoolPtrOutput `pulumi:"useRemoteGateways"` // The ID of the internal Virtual Network used by the DataBricks Workspace. // // > **Note:** The `virtualNetworkId` field is the value you must supply to the `network.VirtualNetworkPeering` resources `remoteVirtualNetworkId` field to successfully peer the Databricks Virtual Network with the remote virtual network. VirtualNetworkId pulumi.StringOutput `pulumi:"virtualNetworkId"` // The ID of the Databricks Workspace that this Databricks Virtual Network Peering is bound. Changing this forces a new resource to be created. WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"` } // NewVirtualNetworkPeering registers a new resource with the given unique name, arguments, and options. func NewVirtualNetworkPeering(ctx *pulumi.Context, name string, args *VirtualNetworkPeeringArgs, opts ...pulumi.ResourceOption) (*VirtualNetworkPeering, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RemoteAddressSpacePrefixes == nil { return nil, errors.New("invalid value for required argument 'RemoteAddressSpacePrefixes'") } if args.RemoteVirtualNetworkId == nil { return nil, errors.New("invalid value for required argument 'RemoteVirtualNetworkId'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.WorkspaceId == nil { return nil, errors.New("invalid value for required argument 'WorkspaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualNetworkPeering err := ctx.RegisterResource("azure:databricks/virtualNetworkPeering:VirtualNetworkPeering", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualNetworkPeering gets an existing VirtualNetworkPeering 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 GetVirtualNetworkPeering(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualNetworkPeeringState, opts ...pulumi.ResourceOption) (*VirtualNetworkPeering, error) { var resource VirtualNetworkPeering err := ctx.ReadResource("azure:databricks/virtualNetworkPeering:VirtualNetworkPeering", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualNetworkPeering resources. type virtualNetworkPeeringState struct { // A list of address blocks reserved for this virtual network in CIDR notation. AddressSpacePrefixes []string `pulumi:"addressSpacePrefixes"` // Can the forwarded traffic from the VMs in the local virtual network be forwarded to the remote virtual network? Defaults to `false`. AllowForwardedTraffic *bool `pulumi:"allowForwardedTraffic"` // Can the gateway links be used in the remote virtual network to link to the Databricks virtual network? Defaults to `false`. AllowGatewayTransit *bool `pulumi:"allowGatewayTransit"` // Can the VMs in the local virtual network space access the VMs in the remote virtual network space? Defaults to `true`. AllowVirtualNetworkAccess *bool `pulumi:"allowVirtualNetworkAccess"` // Specifies the name of the Databricks Virtual Network Peering resource. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of address blocks reserved for the remote virtual network in CIDR notation. Changing this forces a new resource to be created. RemoteAddressSpacePrefixes []string `pulumi:"remoteAddressSpacePrefixes"` // The ID of the remote virtual network. Changing this forces a new resource to be created. // // > **Note:** The remote virtual network should be in the same region as the databricks workspace. Please see the [product documentation](https://learn.microsoft.com/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering) for more information. RemoteVirtualNetworkId *string `pulumi:"remoteVirtualNetworkId"` // The name of the Resource Group in which the Databricks Virtual Network Peering should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Can remote gateways be used on the Databricks virtual network? Defaults to `false`. // // > **Note:** If the `useRemoteGateways` is set to `true`, and `allowGatewayTransit` on the remote peering is also `true`, the virtual network will use the gateways of the remote virtual network for transit. Only one peering can have this flag set to `true`. `useRemoteGateways` cannot be set if the virtual network already has a gateway. UseRemoteGateways *bool `pulumi:"useRemoteGateways"` // The ID of the internal Virtual Network used by the DataBricks Workspace. // // > **Note:** The `virtualNetworkId` field is the value you must supply to the `network.VirtualNetworkPeering` resources `remoteVirtualNetworkId` field to successfully peer the Databricks Virtual Network with the remote virtual network. VirtualNetworkId *string `pulumi:"virtualNetworkId"` // The ID of the Databricks Workspace that this Databricks Virtual Network Peering is bound. Changing this forces a new resource to be created. WorkspaceId *string `pulumi:"workspaceId"` } type VirtualNetworkPeeringState struct { // A list of address blocks reserved for this virtual network in CIDR notation. AddressSpacePrefixes pulumi.StringArrayInput // Can the forwarded traffic from the VMs in the local virtual network be forwarded to the remote virtual network? Defaults to `false`. AllowForwardedTraffic pulumi.BoolPtrInput // Can the gateway links be used in the remote virtual network to link to the Databricks virtual network? Defaults to `false`. AllowGatewayTransit pulumi.BoolPtrInput // Can the VMs in the local virtual network space access the VMs in the remote virtual network space? Defaults to `true`. AllowVirtualNetworkAccess pulumi.BoolPtrInput // Specifies the name of the Databricks Virtual Network Peering resource. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of address blocks reserved for the remote virtual network in CIDR notation. Changing this forces a new resource to be created. RemoteAddressSpacePrefixes pulumi.StringArrayInput // The ID of the remote virtual network. Changing this forces a new resource to be created. // // > **Note:** The remote virtual network should be in the same region as the databricks workspace. Please see the [product documentation](https://learn.microsoft.com/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering) for more information. RemoteVirtualNetworkId pulumi.StringPtrInput // The name of the Resource Group in which the Databricks Virtual Network Peering should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Can remote gateways be used on the Databricks virtual network? Defaults to `false`. // // > **Note:** If the `useRemoteGateways` is set to `true`, and `allowGatewayTransit` on the remote peering is also `true`, the virtual network will use the gateways of the remote virtual network for transit. Only one peering can have this flag set to `true`. `useRemoteGateways` cannot be set if the virtual network already has a gateway. UseRemoteGateways pulumi.BoolPtrInput // The ID of the internal Virtual Network used by the DataBricks Workspace. // // > **Note:** The `virtualNetworkId` field is the value you must supply to the `network.VirtualNetworkPeering` resources `remoteVirtualNetworkId` field to successfully peer the Databricks Virtual Network with the remote virtual network. VirtualNetworkId pulumi.StringPtrInput // The ID of the Databricks Workspace that this Databricks Virtual Network Peering is bound. Changing this forces a new resource to be created. WorkspaceId pulumi.StringPtrInput } func (VirtualNetworkPeeringState) ElementType() reflect.Type { return reflect.TypeOf((*virtualNetworkPeeringState)(nil)).Elem() } type virtualNetworkPeeringArgs struct { // Can the forwarded traffic from the VMs in the local virtual network be forwarded to the remote virtual network? Defaults to `false`. AllowForwardedTraffic *bool `pulumi:"allowForwardedTraffic"` // Can the gateway links be used in the remote virtual network to link to the Databricks virtual network? Defaults to `false`. AllowGatewayTransit *bool `pulumi:"allowGatewayTransit"` // Can the VMs in the local virtual network space access the VMs in the remote virtual network space? Defaults to `true`. AllowVirtualNetworkAccess *bool `pulumi:"allowVirtualNetworkAccess"` // Specifies the name of the Databricks Virtual Network Peering resource. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of address blocks reserved for the remote virtual network in CIDR notation. Changing this forces a new resource to be created. RemoteAddressSpacePrefixes []string `pulumi:"remoteAddressSpacePrefixes"` // The ID of the remote virtual network. Changing this forces a new resource to be created. // // > **Note:** The remote virtual network should be in the same region as the databricks workspace. Please see the [product documentation](https://learn.microsoft.com/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering) for more information. RemoteVirtualNetworkId string `pulumi:"remoteVirtualNetworkId"` // The name of the Resource Group in which the Databricks Virtual Network Peering should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Can remote gateways be used on the Databricks virtual network? Defaults to `false`. // // > **Note:** If the `useRemoteGateways` is set to `true`, and `allowGatewayTransit` on the remote peering is also `true`, the virtual network will use the gateways of the remote virtual network for transit. Only one peering can have this flag set to `true`. `useRemoteGateways` cannot be set if the virtual network already has a gateway. UseRemoteGateways *bool `pulumi:"useRemoteGateways"` // The ID of the Databricks Workspace that this Databricks Virtual Network Peering is bound. Changing this forces a new resource to be created. WorkspaceId string `pulumi:"workspaceId"` } // The set of arguments for constructing a VirtualNetworkPeering resource. type VirtualNetworkPeeringArgs struct { // Can the forwarded traffic from the VMs in the local virtual network be forwarded to the remote virtual network? Defaults to `false`. AllowForwardedTraffic pulumi.BoolPtrInput // Can the gateway links be used in the remote virtual network to link to the Databricks virtual network? Defaults to `false`. AllowGatewayTransit pulumi.BoolPtrInput // Can the VMs in the local virtual network space access the VMs in the remote virtual network space? Defaults to `true`. AllowVirtualNetworkAccess pulumi.BoolPtrInput // Specifies the name of the Databricks Virtual Network Peering resource. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of address blocks reserved for the remote virtual network in CIDR notation. Changing this forces a new resource to be created. RemoteAddressSpacePrefixes pulumi.StringArrayInput // The ID of the remote virtual network. Changing this forces a new resource to be created. // // > **Note:** The remote virtual network should be in the same region as the databricks workspace. Please see the [product documentation](https://learn.microsoft.com/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering) for more information. RemoteVirtualNetworkId pulumi.StringInput // The name of the Resource Group in which the Databricks Virtual Network Peering should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Can remote gateways be used on the Databricks virtual network? Defaults to `false`. // // > **Note:** If the `useRemoteGateways` is set to `true`, and `allowGatewayTransit` on the remote peering is also `true`, the virtual network will use the gateways of the remote virtual network for transit. Only one peering can have this flag set to `true`. `useRemoteGateways` cannot be set if the virtual network already has a gateway. UseRemoteGateways pulumi.BoolPtrInput // The ID of the Databricks Workspace that this Databricks Virtual Network Peering is bound. Changing this forces a new resource to be created. WorkspaceId pulumi.StringInput } func (VirtualNetworkPeeringArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualNetworkPeeringArgs)(nil)).Elem() } type VirtualNetworkPeeringInput interface { pulumi.Input ToVirtualNetworkPeeringOutput() VirtualNetworkPeeringOutput ToVirtualNetworkPeeringOutputWithContext(ctx context.Context) VirtualNetworkPeeringOutput } func (*VirtualNetworkPeering) ElementType() reflect.Type { return reflect.TypeOf((**VirtualNetworkPeering)(nil)).Elem() } func (i *VirtualNetworkPeering) ToVirtualNetworkPeeringOutput() VirtualNetworkPeeringOutput { return i.ToVirtualNetworkPeeringOutputWithContext(context.Background()) } func (i *VirtualNetworkPeering) ToVirtualNetworkPeeringOutputWithContext(ctx context.Context) VirtualNetworkPeeringOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkPeeringOutput) } // VirtualNetworkPeeringArrayInput is an input type that accepts VirtualNetworkPeeringArray and VirtualNetworkPeeringArrayOutput values. // You can construct a concrete instance of `VirtualNetworkPeeringArrayInput` via: // // VirtualNetworkPeeringArray{ VirtualNetworkPeeringArgs{...} } type VirtualNetworkPeeringArrayInput interface { pulumi.Input ToVirtualNetworkPeeringArrayOutput() VirtualNetworkPeeringArrayOutput ToVirtualNetworkPeeringArrayOutputWithContext(context.Context) VirtualNetworkPeeringArrayOutput } type VirtualNetworkPeeringArray []VirtualNetworkPeeringInput func (VirtualNetworkPeeringArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualNetworkPeering)(nil)).Elem() } func (i VirtualNetworkPeeringArray) ToVirtualNetworkPeeringArrayOutput() VirtualNetworkPeeringArrayOutput { return i.ToVirtualNetworkPeeringArrayOutputWithContext(context.Background()) } func (i VirtualNetworkPeeringArray) ToVirtualNetworkPeeringArrayOutputWithContext(ctx context.Context) VirtualNetworkPeeringArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkPeeringArrayOutput) } // VirtualNetworkPeeringMapInput is an input type that accepts VirtualNetworkPeeringMap and VirtualNetworkPeeringMapOutput values. // You can construct a concrete instance of `VirtualNetworkPeeringMapInput` via: // // VirtualNetworkPeeringMap{ "key": VirtualNetworkPeeringArgs{...} } type VirtualNetworkPeeringMapInput interface { pulumi.Input ToVirtualNetworkPeeringMapOutput() VirtualNetworkPeeringMapOutput ToVirtualNetworkPeeringMapOutputWithContext(context.Context) VirtualNetworkPeeringMapOutput } type VirtualNetworkPeeringMap map[string]VirtualNetworkPeeringInput func (VirtualNetworkPeeringMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualNetworkPeering)(nil)).Elem() } func (i VirtualNetworkPeeringMap) ToVirtualNetworkPeeringMapOutput() VirtualNetworkPeeringMapOutput { return i.ToVirtualNetworkPeeringMapOutputWithContext(context.Background()) } func (i VirtualNetworkPeeringMap) ToVirtualNetworkPeeringMapOutputWithContext(ctx context.Context) VirtualNetworkPeeringMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkPeeringMapOutput) } type VirtualNetworkPeeringOutput struct{ *pulumi.OutputState } func (VirtualNetworkPeeringOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualNetworkPeering)(nil)).Elem() } func (o VirtualNetworkPeeringOutput) ToVirtualNetworkPeeringOutput() VirtualNetworkPeeringOutput { return o } func (o VirtualNetworkPeeringOutput) ToVirtualNetworkPeeringOutputWithContext(ctx context.Context) VirtualNetworkPeeringOutput { return o } // A list of address blocks reserved for this virtual network in CIDR notation. func (o VirtualNetworkPeeringOutput) AddressSpacePrefixes() pulumi.StringArrayOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.StringArrayOutput { return v.AddressSpacePrefixes }).(pulumi.StringArrayOutput) } // Can the forwarded traffic from the VMs in the local virtual network be forwarded to the remote virtual network? Defaults to `false`. func (o VirtualNetworkPeeringOutput) AllowForwardedTraffic() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.BoolPtrOutput { return v.AllowForwardedTraffic }).(pulumi.BoolPtrOutput) } // Can the gateway links be used in the remote virtual network to link to the Databricks virtual network? Defaults to `false`. func (o VirtualNetworkPeeringOutput) AllowGatewayTransit() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.BoolPtrOutput { return v.AllowGatewayTransit }).(pulumi.BoolPtrOutput) } // Can the VMs in the local virtual network space access the VMs in the remote virtual network space? Defaults to `true`. func (o VirtualNetworkPeeringOutput) AllowVirtualNetworkAccess() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.BoolPtrOutput { return v.AllowVirtualNetworkAccess }).(pulumi.BoolPtrOutput) } // Specifies the name of the Databricks Virtual Network Peering resource. Changing this forces a new resource to be created. func (o VirtualNetworkPeeringOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A list of address blocks reserved for the remote virtual network in CIDR notation. Changing this forces a new resource to be created. func (o VirtualNetworkPeeringOutput) RemoteAddressSpacePrefixes() pulumi.StringArrayOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.StringArrayOutput { return v.RemoteAddressSpacePrefixes }).(pulumi.StringArrayOutput) } // The ID of the remote virtual network. Changing this forces a new resource to be created. // // > **Note:** The remote virtual network should be in the same region as the databricks workspace. Please see the [product documentation](https://learn.microsoft.com/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering) for more information. func (o VirtualNetworkPeeringOutput) RemoteVirtualNetworkId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.StringOutput { return v.RemoteVirtualNetworkId }).(pulumi.StringOutput) } // The name of the Resource Group in which the Databricks Virtual Network Peering should exist. Changing this forces a new resource to be created. func (o VirtualNetworkPeeringOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Can remote gateways be used on the Databricks virtual network? Defaults to `false`. // // > **Note:** If the `useRemoteGateways` is set to `true`, and `allowGatewayTransit` on the remote peering is also `true`, the virtual network will use the gateways of the remote virtual network for transit. Only one peering can have this flag set to `true`. `useRemoteGateways` cannot be set if the virtual network already has a gateway. func (o VirtualNetworkPeeringOutput) UseRemoteGateways() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.BoolPtrOutput { return v.UseRemoteGateways }).(pulumi.BoolPtrOutput) } // The ID of the internal Virtual Network used by the DataBricks Workspace. // // > **Note:** The `virtualNetworkId` field is the value you must supply to the `network.VirtualNetworkPeering` resources `remoteVirtualNetworkId` field to successfully peer the Databricks Virtual Network with the remote virtual network. func (o VirtualNetworkPeeringOutput) VirtualNetworkId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.StringOutput { return v.VirtualNetworkId }).(pulumi.StringOutput) } // The ID of the Databricks Workspace that this Databricks Virtual Network Peering is bound. Changing this forces a new resource to be created. func (o VirtualNetworkPeeringOutput) WorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualNetworkPeering) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput) } type VirtualNetworkPeeringArrayOutput struct{ *pulumi.OutputState } func (VirtualNetworkPeeringArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualNetworkPeering)(nil)).Elem() } func (o VirtualNetworkPeeringArrayOutput) ToVirtualNetworkPeeringArrayOutput() VirtualNetworkPeeringArrayOutput { return o } func (o VirtualNetworkPeeringArrayOutput) ToVirtualNetworkPeeringArrayOutputWithContext(ctx context.Context) VirtualNetworkPeeringArrayOutput { return o } func (o VirtualNetworkPeeringArrayOutput) Index(i pulumi.IntInput) VirtualNetworkPeeringOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualNetworkPeering { return vs[0].([]*VirtualNetworkPeering)[vs[1].(int)] }).(VirtualNetworkPeeringOutput) } type VirtualNetworkPeeringMapOutput struct{ *pulumi.OutputState } func (VirtualNetworkPeeringMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualNetworkPeering)(nil)).Elem() } func (o VirtualNetworkPeeringMapOutput) ToVirtualNetworkPeeringMapOutput() VirtualNetworkPeeringMapOutput { return o } func (o VirtualNetworkPeeringMapOutput) ToVirtualNetworkPeeringMapOutputWithContext(ctx context.Context) VirtualNetworkPeeringMapOutput { return o } func (o VirtualNetworkPeeringMapOutput) MapIndex(k pulumi.StringInput) VirtualNetworkPeeringOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualNetworkPeering { return vs[0].(map[string]*VirtualNetworkPeering)[vs[1].(string)] }).(VirtualNetworkPeeringOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkPeeringInput)(nil)).Elem(), &VirtualNetworkPeering{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkPeeringArrayInput)(nil)).Elem(), VirtualNetworkPeeringArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkPeeringMapInput)(nil)).Elem(), VirtualNetworkPeeringMap{}) pulumi.RegisterOutputType(VirtualNetworkPeeringOutput{}) pulumi.RegisterOutputType(VirtualNetworkPeeringArrayOutput{}) pulumi.RegisterOutputType(VirtualNetworkPeeringMapOutput{}) }
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/databricks/getAccessConnector.go
sdk/go/azure/databricks/getAccessConnector.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 databricks 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 Databricks Access Connector. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/databricks" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := databricks.LookupAccessConnector(ctx, &databricks.LookupAccessConnectorArgs{ // Name: "existing", // ResourceGroupName: "existing", // }, 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.Databricks` - 2022-10-01-preview func LookupAccessConnector(ctx *pulumi.Context, args *LookupAccessConnectorArgs, opts ...pulumi.InvokeOption) (*LookupAccessConnectorResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupAccessConnectorResult err := ctx.Invoke("azure:databricks/getAccessConnector:getAccessConnector", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getAccessConnector. type LookupAccessConnectorArgs struct { // The name of this Databricks Access Connector. Name string `pulumi:"name"` // The name of the Resource Group where the Databricks Access Connector exists. Changing this forces a new Databricks Access Connector to be created. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getAccessConnector. type LookupAccessConnectorResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // A `identity` block as defined below. Identities []GetAccessConnectorIdentity `pulumi:"identities"` // The Azure Region where the Databricks Access Connector exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the Databricks Access Connector. Tags map[string]string `pulumi:"tags"` } func LookupAccessConnectorOutput(ctx *pulumi.Context, args LookupAccessConnectorOutputArgs, opts ...pulumi.InvokeOption) LookupAccessConnectorResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupAccessConnectorResultOutput, error) { args := v.(LookupAccessConnectorArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:databricks/getAccessConnector:getAccessConnector", args, LookupAccessConnectorResultOutput{}, options).(LookupAccessConnectorResultOutput), nil }).(LookupAccessConnectorResultOutput) } // A collection of arguments for invoking getAccessConnector. type LookupAccessConnectorOutputArgs struct { // The name of this Databricks Access Connector. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Databricks Access Connector exists. Changing this forces a new Databricks Access Connector to be created. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupAccessConnectorOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupAccessConnectorArgs)(nil)).Elem() } // A collection of values returned by getAccessConnector. type LookupAccessConnectorResultOutput struct{ *pulumi.OutputState } func (LookupAccessConnectorResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupAccessConnectorResult)(nil)).Elem() } func (o LookupAccessConnectorResultOutput) ToLookupAccessConnectorResultOutput() LookupAccessConnectorResultOutput { return o } func (o LookupAccessConnectorResultOutput) ToLookupAccessConnectorResultOutputWithContext(ctx context.Context) LookupAccessConnectorResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupAccessConnectorResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupAccessConnectorResult) string { return v.Id }).(pulumi.StringOutput) } // A `identity` block as defined below. func (o LookupAccessConnectorResultOutput) Identities() GetAccessConnectorIdentityArrayOutput { return o.ApplyT(func(v LookupAccessConnectorResult) []GetAccessConnectorIdentity { return v.Identities }).(GetAccessConnectorIdentityArrayOutput) } // The Azure Region where the Databricks Access Connector exists. func (o LookupAccessConnectorResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupAccessConnectorResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupAccessConnectorResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupAccessConnectorResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupAccessConnectorResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupAccessConnectorResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the Databricks Access Connector. func (o LookupAccessConnectorResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupAccessConnectorResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupAccessConnectorResultOutput{}) }
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/databricks/workspace.go
sdk/go/azure/databricks/workspace.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 databricks import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## Import // // Databrick Workspaces can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:databricks/workspace:Workspace workspace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Databricks/workspaces/workspace1 // ``` type Workspace struct { pulumi.CustomResourceState // Access Connector ID to use when default storage account firewall is enabled. // // > **Note:** The `accessConnectorId` field is only required if `defaultStorageFirewallEnabled` is set to `true`. AccessConnectorId pulumi.StringPtrOutput `pulumi:"accessConnectorId"` // A `customParameters` block as documented below. CustomParameters WorkspaceCustomParametersOutput `pulumi:"customParameters"` // Is the workspace enabled for customer managed key encryption? If `true` this enables the Managed Identity for the managed storage account. Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`. CustomerManagedKeyEnabled pulumi.BoolPtrOutput `pulumi:"customerManagedKeyEnabled"` // Disallow public access to default storage account. Defaults to `false`. DefaultStorageFirewallEnabled pulumi.BoolPtrOutput `pulumi:"defaultStorageFirewallEnabled"` // The ID of Managed Disk Encryption Set created by the Databricks Workspace. DiskEncryptionSetId pulumi.StringOutput `pulumi:"diskEncryptionSetId"` // An `enhancedSecurityCompliance` block as documented below. This feature is only valid if `sku` is set to `premium`. EnhancedSecurityCompliance WorkspaceEnhancedSecurityCompliancePtrOutput `pulumi:"enhancedSecurityCompliance"` // Is the Databricks File System root file system enabled with a secondary layer of encryption with platform managed keys? Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`. Changing this forces a new resource to be created. InfrastructureEncryptionEnabled pulumi.BoolPtrOutput `pulumi:"infrastructureEncryptionEnabled"` // Resource ID of the Outbound Load balancer Backend Address Pool for Secure Cluster Connectivity (No Public IP) workspace with managed virtual network. Changing this forces a new resource to be created. LoadBalancerBackendAddressPoolId pulumi.StringPtrOutput `pulumi:"loadBalancerBackendAddressPoolId"` // Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` ManagedDiskCmkKeyVaultId pulumi.StringPtrOutput `pulumi:"managedDiskCmkKeyVaultId"` // Customer managed encryption properties for the Databricks Workspace managed disks. ManagedDiskCmkKeyVaultKeyId pulumi.StringPtrOutput `pulumi:"managedDiskCmkKeyVaultKeyId"` // Whether customer managed keys for disk encryption will automatically be rotated to the latest version. ManagedDiskCmkRotationToLatestVersionEnabled pulumi.BoolPtrOutput `pulumi:"managedDiskCmkRotationToLatestVersionEnabled"` // A `managedDiskIdentity` block as documented below. ManagedDiskIdentities WorkspaceManagedDiskIdentityArrayOutput `pulumi:"managedDiskIdentities"` // The ID of the Managed Resource Group created by the Databricks Workspace. ManagedResourceGroupId pulumi.StringOutput `pulumi:"managedResourceGroupId"` // The name of the resource group where Azure should place the managed Databricks resources. Changing this forces a new resource to be created. // // > **Note:** Make sure that this field is unique if you have multiple Databrick Workspaces deployed in your subscription and choose to not have the `managedResourceGroupName` auto generated by the Azure Resource Provider. Having multiple Databrick Workspaces deployed in the same subscription with the same `manageResourceGroupName` may result in some resources that cannot be deleted. ManagedResourceGroupName pulumi.StringOutput `pulumi:"managedResourceGroupName"` ManagedServicesCmkKeyVaultId pulumi.StringPtrOutput `pulumi:"managedServicesCmkKeyVaultId"` // Customer managed encryption properties for the Databricks Workspace managed resources(e.g. Notebooks and Artifacts). ManagedServicesCmkKeyVaultKeyId pulumi.StringPtrOutput `pulumi:"managedServicesCmkKeyVaultKeyId"` // Specifies the name of the Databricks Workspace resource. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Does the data plane (clusters) to control plane communication happen over private link endpoint only or publicly? Possible values `AllRules`, `NoAzureDatabricksRules` or `NoAzureServiceRules`. Required when `publicNetworkAccessEnabled` is set to `false`. NetworkSecurityGroupRulesRequired pulumi.StringPtrOutput `pulumi:"networkSecurityGroupRulesRequired"` // Allow public access for accessing workspace. Set value to `false` to access workspace only via private link endpoint. Possible values include `true` or `false`. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // The name of the Resource Group in which the Databricks Workspace should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The `sku` to use for the Databricks Workspace. Possible values are `standard`, `premium`, or `trial`. // // > **Note:** Downgrading to a `trial sku` from a `standard` or `premium sku` will force a new resource to be created. Sku pulumi.StringOutput `pulumi:"sku"` // A `storageAccountIdentity` block as documented below. StorageAccountIdentities WorkspaceStorageAccountIdentityArrayOutput `pulumi:"storageAccountIdentities"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // The unique identifier of the databricks workspace in Databricks control plane. WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"` // The workspace URL which is of the format 'adb-{workspaceId}.{random}.azuredatabricks.net' WorkspaceUrl pulumi.StringOutput `pulumi:"workspaceUrl"` } // NewWorkspace registers a new resource with the given unique name, arguments, and options. func NewWorkspace(ctx *pulumi.Context, name string, args *WorkspaceArgs, opts ...pulumi.ResourceOption) (*Workspace, 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 Workspace err := ctx.RegisterResource("azure:databricks/workspace:Workspace", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWorkspace gets an existing Workspace 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 GetWorkspace(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WorkspaceState, opts ...pulumi.ResourceOption) (*Workspace, error) { var resource Workspace err := ctx.ReadResource("azure:databricks/workspace:Workspace", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Workspace resources. type workspaceState struct { // Access Connector ID to use when default storage account firewall is enabled. // // > **Note:** The `accessConnectorId` field is only required if `defaultStorageFirewallEnabled` is set to `true`. AccessConnectorId *string `pulumi:"accessConnectorId"` // A `customParameters` block as documented below. CustomParameters *WorkspaceCustomParameters `pulumi:"customParameters"` // Is the workspace enabled for customer managed key encryption? If `true` this enables the Managed Identity for the managed storage account. Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`. CustomerManagedKeyEnabled *bool `pulumi:"customerManagedKeyEnabled"` // Disallow public access to default storage account. Defaults to `false`. DefaultStorageFirewallEnabled *bool `pulumi:"defaultStorageFirewallEnabled"` // The ID of Managed Disk Encryption Set created by the Databricks Workspace. DiskEncryptionSetId *string `pulumi:"diskEncryptionSetId"` // An `enhancedSecurityCompliance` block as documented below. This feature is only valid if `sku` is set to `premium`. EnhancedSecurityCompliance *WorkspaceEnhancedSecurityCompliance `pulumi:"enhancedSecurityCompliance"` // Is the Databricks File System root file system enabled with a secondary layer of encryption with platform managed keys? Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`. Changing this forces a new resource to be created. InfrastructureEncryptionEnabled *bool `pulumi:"infrastructureEncryptionEnabled"` // Resource ID of the Outbound Load balancer Backend Address Pool for Secure Cluster Connectivity (No Public IP) workspace with managed virtual network. Changing this forces a new resource to be created. LoadBalancerBackendAddressPoolId *string `pulumi:"loadBalancerBackendAddressPoolId"` // Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` ManagedDiskCmkKeyVaultId *string `pulumi:"managedDiskCmkKeyVaultId"` // Customer managed encryption properties for the Databricks Workspace managed disks. ManagedDiskCmkKeyVaultKeyId *string `pulumi:"managedDiskCmkKeyVaultKeyId"` // Whether customer managed keys for disk encryption will automatically be rotated to the latest version. ManagedDiskCmkRotationToLatestVersionEnabled *bool `pulumi:"managedDiskCmkRotationToLatestVersionEnabled"` // A `managedDiskIdentity` block as documented below. ManagedDiskIdentities []WorkspaceManagedDiskIdentity `pulumi:"managedDiskIdentities"` // The ID of the Managed Resource Group created by the Databricks Workspace. ManagedResourceGroupId *string `pulumi:"managedResourceGroupId"` // The name of the resource group where Azure should place the managed Databricks resources. Changing this forces a new resource to be created. // // > **Note:** Make sure that this field is unique if you have multiple Databrick Workspaces deployed in your subscription and choose to not have the `managedResourceGroupName` auto generated by the Azure Resource Provider. Having multiple Databrick Workspaces deployed in the same subscription with the same `manageResourceGroupName` may result in some resources that cannot be deleted. ManagedResourceGroupName *string `pulumi:"managedResourceGroupName"` ManagedServicesCmkKeyVaultId *string `pulumi:"managedServicesCmkKeyVaultId"` // Customer managed encryption properties for the Databricks Workspace managed resources(e.g. Notebooks and Artifacts). ManagedServicesCmkKeyVaultKeyId *string `pulumi:"managedServicesCmkKeyVaultKeyId"` // Specifies the name of the Databricks Workspace resource. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Does the data plane (clusters) to control plane communication happen over private link endpoint only or publicly? Possible values `AllRules`, `NoAzureDatabricksRules` or `NoAzureServiceRules`. Required when `publicNetworkAccessEnabled` is set to `false`. NetworkSecurityGroupRulesRequired *string `pulumi:"networkSecurityGroupRulesRequired"` // Allow public access for accessing workspace. Set value to `false` to access workspace only via private link endpoint. Possible values include `true` or `false`. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The name of the Resource Group in which the Databricks Workspace should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The `sku` to use for the Databricks Workspace. Possible values are `standard`, `premium`, or `trial`. // // > **Note:** Downgrading to a `trial sku` from a `standard` or `premium sku` will force a new resource to be created. Sku *string `pulumi:"sku"` // A `storageAccountIdentity` block as documented below. StorageAccountIdentities []WorkspaceStorageAccountIdentity `pulumi:"storageAccountIdentities"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The unique identifier of the databricks workspace in Databricks control plane. WorkspaceId *string `pulumi:"workspaceId"` // The workspace URL which is of the format 'adb-{workspaceId}.{random}.azuredatabricks.net' WorkspaceUrl *string `pulumi:"workspaceUrl"` } type WorkspaceState struct { // Access Connector ID to use when default storage account firewall is enabled. // // > **Note:** The `accessConnectorId` field is only required if `defaultStorageFirewallEnabled` is set to `true`. AccessConnectorId pulumi.StringPtrInput // A `customParameters` block as documented below. CustomParameters WorkspaceCustomParametersPtrInput // Is the workspace enabled for customer managed key encryption? If `true` this enables the Managed Identity for the managed storage account. Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`. CustomerManagedKeyEnabled pulumi.BoolPtrInput // Disallow public access to default storage account. Defaults to `false`. DefaultStorageFirewallEnabled pulumi.BoolPtrInput // The ID of Managed Disk Encryption Set created by the Databricks Workspace. DiskEncryptionSetId pulumi.StringPtrInput // An `enhancedSecurityCompliance` block as documented below. This feature is only valid if `sku` is set to `premium`. EnhancedSecurityCompliance WorkspaceEnhancedSecurityCompliancePtrInput // Is the Databricks File System root file system enabled with a secondary layer of encryption with platform managed keys? Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`. Changing this forces a new resource to be created. InfrastructureEncryptionEnabled pulumi.BoolPtrInput // Resource ID of the Outbound Load balancer Backend Address Pool for Secure Cluster Connectivity (No Public IP) workspace with managed virtual network. Changing this forces a new resource to be created. LoadBalancerBackendAddressPoolId pulumi.StringPtrInput // Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput ManagedDiskCmkKeyVaultId pulumi.StringPtrInput // Customer managed encryption properties for the Databricks Workspace managed disks. ManagedDiskCmkKeyVaultKeyId pulumi.StringPtrInput // Whether customer managed keys for disk encryption will automatically be rotated to the latest version. ManagedDiskCmkRotationToLatestVersionEnabled pulumi.BoolPtrInput // A `managedDiskIdentity` block as documented below. ManagedDiskIdentities WorkspaceManagedDiskIdentityArrayInput // The ID of the Managed Resource Group created by the Databricks Workspace. ManagedResourceGroupId pulumi.StringPtrInput // The name of the resource group where Azure should place the managed Databricks resources. Changing this forces a new resource to be created. // // > **Note:** Make sure that this field is unique if you have multiple Databrick Workspaces deployed in your subscription and choose to not have the `managedResourceGroupName` auto generated by the Azure Resource Provider. Having multiple Databrick Workspaces deployed in the same subscription with the same `manageResourceGroupName` may result in some resources that cannot be deleted. ManagedResourceGroupName pulumi.StringPtrInput ManagedServicesCmkKeyVaultId pulumi.StringPtrInput // Customer managed encryption properties for the Databricks Workspace managed resources(e.g. Notebooks and Artifacts). ManagedServicesCmkKeyVaultKeyId pulumi.StringPtrInput // Specifies the name of the Databricks Workspace resource. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Does the data plane (clusters) to control plane communication happen over private link endpoint only or publicly? Possible values `AllRules`, `NoAzureDatabricksRules` or `NoAzureServiceRules`. Required when `publicNetworkAccessEnabled` is set to `false`. NetworkSecurityGroupRulesRequired pulumi.StringPtrInput // Allow public access for accessing workspace. Set value to `false` to access workspace only via private link endpoint. Possible values include `true` or `false`. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // The name of the Resource Group in which the Databricks Workspace should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The `sku` to use for the Databricks Workspace. Possible values are `standard`, `premium`, or `trial`. // // > **Note:** Downgrading to a `trial sku` from a `standard` or `premium sku` will force a new resource to be created. Sku pulumi.StringPtrInput // A `storageAccountIdentity` block as documented below. StorageAccountIdentities WorkspaceStorageAccountIdentityArrayInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The unique identifier of the databricks workspace in Databricks control plane. WorkspaceId pulumi.StringPtrInput // The workspace URL which is of the format 'adb-{workspaceId}.{random}.azuredatabricks.net' WorkspaceUrl pulumi.StringPtrInput } func (WorkspaceState) ElementType() reflect.Type { return reflect.TypeOf((*workspaceState)(nil)).Elem() } type workspaceArgs struct { // Access Connector ID to use when default storage account firewall is enabled. // // > **Note:** The `accessConnectorId` field is only required if `defaultStorageFirewallEnabled` is set to `true`. AccessConnectorId *string `pulumi:"accessConnectorId"` // A `customParameters` block as documented below. CustomParameters *WorkspaceCustomParameters `pulumi:"customParameters"` // Is the workspace enabled for customer managed key encryption? If `true` this enables the Managed Identity for the managed storage account. Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`. CustomerManagedKeyEnabled *bool `pulumi:"customerManagedKeyEnabled"` // Disallow public access to default storage account. Defaults to `false`. DefaultStorageFirewallEnabled *bool `pulumi:"defaultStorageFirewallEnabled"` // An `enhancedSecurityCompliance` block as documented below. This feature is only valid if `sku` is set to `premium`. EnhancedSecurityCompliance *WorkspaceEnhancedSecurityCompliance `pulumi:"enhancedSecurityCompliance"` // Is the Databricks File System root file system enabled with a secondary layer of encryption with platform managed keys? Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`. Changing this forces a new resource to be created. InfrastructureEncryptionEnabled *bool `pulumi:"infrastructureEncryptionEnabled"` // Resource ID of the Outbound Load balancer Backend Address Pool for Secure Cluster Connectivity (No Public IP) workspace with managed virtual network. Changing this forces a new resource to be created. LoadBalancerBackendAddressPoolId *string `pulumi:"loadBalancerBackendAddressPoolId"` // Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` ManagedDiskCmkKeyVaultId *string `pulumi:"managedDiskCmkKeyVaultId"` // Customer managed encryption properties for the Databricks Workspace managed disks. ManagedDiskCmkKeyVaultKeyId *string `pulumi:"managedDiskCmkKeyVaultKeyId"` // Whether customer managed keys for disk encryption will automatically be rotated to the latest version. ManagedDiskCmkRotationToLatestVersionEnabled *bool `pulumi:"managedDiskCmkRotationToLatestVersionEnabled"` // The name of the resource group where Azure should place the managed Databricks resources. Changing this forces a new resource to be created. // // > **Note:** Make sure that this field is unique if you have multiple Databrick Workspaces deployed in your subscription and choose to not have the `managedResourceGroupName` auto generated by the Azure Resource Provider. Having multiple Databrick Workspaces deployed in the same subscription with the same `manageResourceGroupName` may result in some resources that cannot be deleted. ManagedResourceGroupName *string `pulumi:"managedResourceGroupName"` ManagedServicesCmkKeyVaultId *string `pulumi:"managedServicesCmkKeyVaultId"` // Customer managed encryption properties for the Databricks Workspace managed resources(e.g. Notebooks and Artifacts). ManagedServicesCmkKeyVaultKeyId *string `pulumi:"managedServicesCmkKeyVaultKeyId"` // Specifies the name of the Databricks Workspace resource. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Does the data plane (clusters) to control plane communication happen over private link endpoint only or publicly? Possible values `AllRules`, `NoAzureDatabricksRules` or `NoAzureServiceRules`. Required when `publicNetworkAccessEnabled` is set to `false`. NetworkSecurityGroupRulesRequired *string `pulumi:"networkSecurityGroupRulesRequired"` // Allow public access for accessing workspace. Set value to `false` to access workspace only via private link endpoint. Possible values include `true` or `false`. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The name of the Resource Group in which the Databricks Workspace should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The `sku` to use for the Databricks Workspace. Possible values are `standard`, `premium`, or `trial`. // // > **Note:** Downgrading to a `trial sku` from a `standard` or `premium sku` will force a new resource to be created. Sku string `pulumi:"sku"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Workspace resource. type WorkspaceArgs struct { // Access Connector ID to use when default storage account firewall is enabled. // // > **Note:** The `accessConnectorId` field is only required if `defaultStorageFirewallEnabled` is set to `true`. AccessConnectorId pulumi.StringPtrInput // A `customParameters` block as documented below. CustomParameters WorkspaceCustomParametersPtrInput // Is the workspace enabled for customer managed key encryption? If `true` this enables the Managed Identity for the managed storage account. Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`. CustomerManagedKeyEnabled pulumi.BoolPtrInput // Disallow public access to default storage account. Defaults to `false`. DefaultStorageFirewallEnabled pulumi.BoolPtrInput // An `enhancedSecurityCompliance` block as documented below. This feature is only valid if `sku` is set to `premium`. EnhancedSecurityCompliance WorkspaceEnhancedSecurityCompliancePtrInput // Is the Databricks File System root file system enabled with a secondary layer of encryption with platform managed keys? Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`. Changing this forces a new resource to be created. InfrastructureEncryptionEnabled pulumi.BoolPtrInput // Resource ID of the Outbound Load balancer Backend Address Pool for Secure Cluster Connectivity (No Public IP) workspace with managed virtual network. Changing this forces a new resource to be created. LoadBalancerBackendAddressPoolId pulumi.StringPtrInput // Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput ManagedDiskCmkKeyVaultId pulumi.StringPtrInput // Customer managed encryption properties for the Databricks Workspace managed disks. ManagedDiskCmkKeyVaultKeyId pulumi.StringPtrInput // Whether customer managed keys for disk encryption will automatically be rotated to the latest version. ManagedDiskCmkRotationToLatestVersionEnabled pulumi.BoolPtrInput // The name of the resource group where Azure should place the managed Databricks resources. Changing this forces a new resource to be created. // // > **Note:** Make sure that this field is unique if you have multiple Databrick Workspaces deployed in your subscription and choose to not have the `managedResourceGroupName` auto generated by the Azure Resource Provider. Having multiple Databrick Workspaces deployed in the same subscription with the same `manageResourceGroupName` may result in some resources that cannot be deleted. ManagedResourceGroupName pulumi.StringPtrInput ManagedServicesCmkKeyVaultId pulumi.StringPtrInput // Customer managed encryption properties for the Databricks Workspace managed resources(e.g. Notebooks and Artifacts). ManagedServicesCmkKeyVaultKeyId pulumi.StringPtrInput // Specifies the name of the Databricks Workspace resource. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Does the data plane (clusters) to control plane communication happen over private link endpoint only or publicly? Possible values `AllRules`, `NoAzureDatabricksRules` or `NoAzureServiceRules`. Required when `publicNetworkAccessEnabled` is set to `false`. NetworkSecurityGroupRulesRequired pulumi.StringPtrInput // Allow public access for accessing workspace. Set value to `false` to access workspace only via private link endpoint. Possible values include `true` or `false`. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // The name of the Resource Group in which the Databricks Workspace should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The `sku` to use for the Databricks Workspace. Possible values are `standard`, `premium`, or `trial`. // // > **Note:** Downgrading to a `trial sku` from a `standard` or `premium sku` will force a new resource to be created. Sku pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (WorkspaceArgs) ElementType() reflect.Type { return reflect.TypeOf((*workspaceArgs)(nil)).Elem() } type WorkspaceInput interface { pulumi.Input ToWorkspaceOutput() WorkspaceOutput ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput } func (*Workspace) ElementType() reflect.Type { return reflect.TypeOf((**Workspace)(nil)).Elem() } func (i *Workspace) ToWorkspaceOutput() WorkspaceOutput { return i.ToWorkspaceOutputWithContext(context.Background()) } func (i *Workspace) ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceOutput) } // WorkspaceArrayInput is an input type that accepts WorkspaceArray and WorkspaceArrayOutput values. // You can construct a concrete instance of `WorkspaceArrayInput` via: // // WorkspaceArray{ WorkspaceArgs{...} } type WorkspaceArrayInput interface { pulumi.Input ToWorkspaceArrayOutput() WorkspaceArrayOutput ToWorkspaceArrayOutputWithContext(context.Context) WorkspaceArrayOutput } type WorkspaceArray []WorkspaceInput func (WorkspaceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Workspace)(nil)).Elem() } func (i WorkspaceArray) ToWorkspaceArrayOutput() WorkspaceArrayOutput { return i.ToWorkspaceArrayOutputWithContext(context.Background()) } func (i WorkspaceArray) ToWorkspaceArrayOutputWithContext(ctx context.Context) WorkspaceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceArrayOutput) } // WorkspaceMapInput is an input type that accepts WorkspaceMap and WorkspaceMapOutput values. // You can construct a concrete instance of `WorkspaceMapInput` via: // // WorkspaceMap{ "key": WorkspaceArgs{...} } type WorkspaceMapInput interface { pulumi.Input ToWorkspaceMapOutput() WorkspaceMapOutput ToWorkspaceMapOutputWithContext(context.Context) WorkspaceMapOutput } type WorkspaceMap map[string]WorkspaceInput func (WorkspaceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Workspace)(nil)).Elem() } func (i WorkspaceMap) ToWorkspaceMapOutput() WorkspaceMapOutput { return i.ToWorkspaceMapOutputWithContext(context.Background()) } func (i WorkspaceMap) ToWorkspaceMapOutputWithContext(ctx context.Context) WorkspaceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceMapOutput) } type WorkspaceOutput struct{ *pulumi.OutputState } func (WorkspaceOutput) ElementType() reflect.Type { return reflect.TypeOf((**Workspace)(nil)).Elem() } func (o WorkspaceOutput) ToWorkspaceOutput() WorkspaceOutput { return o } func (o WorkspaceOutput) ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput { return o } // Access Connector ID to use when default storage account firewall is enabled. // // > **Note:** The `accessConnectorId` field is only required if `defaultStorageFirewallEnabled` is set to `true`. func (o WorkspaceOutput) AccessConnectorId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Workspace) pulumi.StringPtrOutput { return v.AccessConnectorId }).(pulumi.StringPtrOutput) } // A `customParameters` block as documented below. func (o WorkspaceOutput) CustomParameters() WorkspaceCustomParametersOutput { return o.ApplyT(func(v *Workspace) WorkspaceCustomParametersOutput { return v.CustomParameters }).(WorkspaceCustomParametersOutput) } // Is the workspace enabled for customer managed key encryption? If `true` this enables the Managed Identity for the managed storage account. Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`. func (o WorkspaceOutput) CustomerManagedKeyEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Workspace) pulumi.BoolPtrOutput { return v.CustomerManagedKeyEnabled }).(pulumi.BoolPtrOutput) } // Disallow public access to default storage account. Defaults to `false`. func (o WorkspaceOutput) DefaultStorageFirewallEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Workspace) pulumi.BoolPtrOutput { return v.DefaultStorageFirewallEnabled }).(pulumi.BoolPtrOutput) } // The ID of Managed Disk Encryption Set created by the Databricks Workspace. func (o WorkspaceOutput) DiskEncryptionSetId() pulumi.StringOutput { return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.DiskEncryptionSetId }).(pulumi.StringOutput) } // An `enhancedSecurityCompliance` block as documented below. This feature is only valid if `sku` is set to `premium`. func (o WorkspaceOutput) EnhancedSecurityCompliance() WorkspaceEnhancedSecurityCompliancePtrOutput { return o.ApplyT(func(v *Workspace) WorkspaceEnhancedSecurityCompliancePtrOutput { return v.EnhancedSecurityCompliance }).(WorkspaceEnhancedSecurityCompliancePtrOutput) } // Is the Databricks File System root file system enabled with a secondary layer of encryption with platform managed keys? Possible values are `true` or `false`. Defaults to `false`. This field is only valid if the Databricks Workspace `sku` is set to `premium`. Changing this forces a new resource to be created. func (o WorkspaceOutput) InfrastructureEncryptionEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Workspace) pulumi.BoolPtrOutput { return v.InfrastructureEncryptionEnabled }).(pulumi.BoolPtrOutput) } // Resource ID of the Outbound Load balancer Backend Address Pool for Secure Cluster Connectivity (No Public IP) workspace with managed virtual network. Changing this forces a new resource to be created.
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/databricks/getWorkspacePrivateEndpointConnection.go
sdk/go/azure/databricks/getWorkspacePrivateEndpointConnection.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 databricks 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 on an existing Databricks Workspace private endpoint connection state. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/databricks" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := databricks.GetWorkspacePrivateEndpointConnection(ctx, &databricks.GetWorkspacePrivateEndpointConnectionArgs{ // WorkspaceId: exampleAzurermDatabricksWorkspace.Id, // PrivateEndpointId: exampleAzurermPrivateEndpoint.Id, // }, nil) // if err != nil { // return err // } // ctx.Export("databricksWorkspacePrivateEndpointConnectionStatus", example.Connections[0].Status) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Databricks` - 2024-05-01 func GetWorkspacePrivateEndpointConnection(ctx *pulumi.Context, args *GetWorkspacePrivateEndpointConnectionArgs, opts ...pulumi.InvokeOption) (*GetWorkspacePrivateEndpointConnectionResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetWorkspacePrivateEndpointConnectionResult err := ctx.Invoke("azure:databricks/getWorkspacePrivateEndpointConnection:getWorkspacePrivateEndpointConnection", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getWorkspacePrivateEndpointConnection. type GetWorkspacePrivateEndpointConnectionArgs struct { // The resource ID of the Private Endpoint. PrivateEndpointId string `pulumi:"privateEndpointId"` // The resource ID of the Databricks Workspace. WorkspaceId string `pulumi:"workspaceId"` } // A collection of values returned by getWorkspacePrivateEndpointConnection. type GetWorkspacePrivateEndpointConnectionResult struct { // A `connections` block as documented below. Connections []GetWorkspacePrivateEndpointConnectionConnection `pulumi:"connections"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The resource ID of the Private Endpoint. PrivateEndpointId string `pulumi:"privateEndpointId"` // The resource ID of the Databricks Workspace. WorkspaceId string `pulumi:"workspaceId"` } func GetWorkspacePrivateEndpointConnectionOutput(ctx *pulumi.Context, args GetWorkspacePrivateEndpointConnectionOutputArgs, opts ...pulumi.InvokeOption) GetWorkspacePrivateEndpointConnectionResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetWorkspacePrivateEndpointConnectionResultOutput, error) { args := v.(GetWorkspacePrivateEndpointConnectionArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:databricks/getWorkspacePrivateEndpointConnection:getWorkspacePrivateEndpointConnection", args, GetWorkspacePrivateEndpointConnectionResultOutput{}, options).(GetWorkspacePrivateEndpointConnectionResultOutput), nil }).(GetWorkspacePrivateEndpointConnectionResultOutput) } // A collection of arguments for invoking getWorkspacePrivateEndpointConnection. type GetWorkspacePrivateEndpointConnectionOutputArgs struct { // The resource ID of the Private Endpoint. PrivateEndpointId pulumi.StringInput `pulumi:"privateEndpointId"` // The resource ID of the Databricks Workspace. WorkspaceId pulumi.StringInput `pulumi:"workspaceId"` } func (GetWorkspacePrivateEndpointConnectionOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetWorkspacePrivateEndpointConnectionArgs)(nil)).Elem() } // A collection of values returned by getWorkspacePrivateEndpointConnection. type GetWorkspacePrivateEndpointConnectionResultOutput struct{ *pulumi.OutputState } func (GetWorkspacePrivateEndpointConnectionResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetWorkspacePrivateEndpointConnectionResult)(nil)).Elem() } func (o GetWorkspacePrivateEndpointConnectionResultOutput) ToGetWorkspacePrivateEndpointConnectionResultOutput() GetWorkspacePrivateEndpointConnectionResultOutput { return o } func (o GetWorkspacePrivateEndpointConnectionResultOutput) ToGetWorkspacePrivateEndpointConnectionResultOutputWithContext(ctx context.Context) GetWorkspacePrivateEndpointConnectionResultOutput { return o } // A `connections` block as documented below. func (o GetWorkspacePrivateEndpointConnectionResultOutput) Connections() GetWorkspacePrivateEndpointConnectionConnectionArrayOutput { return o.ApplyT(func(v GetWorkspacePrivateEndpointConnectionResult) []GetWorkspacePrivateEndpointConnectionConnection { return v.Connections }).(GetWorkspacePrivateEndpointConnectionConnectionArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o GetWorkspacePrivateEndpointConnectionResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetWorkspacePrivateEndpointConnectionResult) string { return v.Id }).(pulumi.StringOutput) } // The resource ID of the Private Endpoint. func (o GetWorkspacePrivateEndpointConnectionResultOutput) PrivateEndpointId() pulumi.StringOutput { return o.ApplyT(func(v GetWorkspacePrivateEndpointConnectionResult) string { return v.PrivateEndpointId }).(pulumi.StringOutput) } // The resource ID of the Databricks Workspace. func (o GetWorkspacePrivateEndpointConnectionResultOutput) WorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v GetWorkspacePrivateEndpointConnectionResult) string { return v.WorkspaceId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetWorkspacePrivateEndpointConnectionResultOutput{}) }
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/dns/init.go
sdk/go/azure/dns/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 dns 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:dns/aRecord:ARecord": r = &ARecord{} case "azure:dns/aaaaRecord:AaaaRecord": r = &AaaaRecord{} case "azure:dns/cNameRecord:CNameRecord": r = &CNameRecord{} case "azure:dns/caaRecord:CaaRecord": r = &CaaRecord{} case "azure:dns/mxRecord:MxRecord": r = &MxRecord{} case "azure:dns/nsRecord:NsRecord": r = &NsRecord{} case "azure:dns/ptrRecord:PtrRecord": r = &PtrRecord{} case "azure:dns/srvRecord:SrvRecord": r = &SrvRecord{} case "azure:dns/txtRecord:TxtRecord": r = &TxtRecord{} case "azure:dns/zone:Zone": r = &Zone{} 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", "dns/aRecord", &module{version}, ) pulumi.RegisterResourceModule( "azure", "dns/aaaaRecord", &module{version}, ) pulumi.RegisterResourceModule( "azure", "dns/cNameRecord", &module{version}, ) pulumi.RegisterResourceModule( "azure", "dns/caaRecord", &module{version}, ) pulumi.RegisterResourceModule( "azure", "dns/mxRecord", &module{version}, ) pulumi.RegisterResourceModule( "azure", "dns/nsRecord", &module{version}, ) pulumi.RegisterResourceModule( "azure", "dns/ptrRecord", &module{version}, ) pulumi.RegisterResourceModule( "azure", "dns/srvRecord", &module{version}, ) pulumi.RegisterResourceModule( "azure", "dns/txtRecord", &module{version}, ) pulumi.RegisterResourceModule( "azure", "dns/zone", &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/dns/getCnameRecord.go
sdk/go/azure/dns/getCnameRecord.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 dns import ( "context" "reflect" "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/dns" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := dns.GetCnameRecord(ctx, &dns.GetCnameRecordArgs{ // Name: "test", // ZoneName: "test-zone", // ResourceGroupName: "test-rg", // }, nil) // if err != nil { // return err // } // ctx.Export("dnsCnameRecordId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2018-05-01 func GetCnameRecord(ctx *pulumi.Context, args *GetCnameRecordArgs, opts ...pulumi.InvokeOption) (*GetCnameRecordResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetCnameRecordResult err := ctx.Invoke("azure:dns/getCnameRecord:getCnameRecord", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getCnameRecord. type GetCnameRecordArgs struct { // The name of the DNS CNAME Record. Name string `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName string `pulumi:"zoneName"` } // A collection of values returned by getCnameRecord. type GetCnameRecordResult struct { // The FQDN of the DNS CName Record. Fqdn string `pulumi:"fqdn"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // The target of the CNAME. Record string `pulumi:"record"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` // The Azure resource id of the target object from where the dns resource value is taken. TargetResourceId string `pulumi:"targetResourceId"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` ZoneName string `pulumi:"zoneName"` } func GetCnameRecordOutput(ctx *pulumi.Context, args GetCnameRecordOutputArgs, opts ...pulumi.InvokeOption) GetCnameRecordResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetCnameRecordResultOutput, error) { args := v.(GetCnameRecordArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:dns/getCnameRecord:getCnameRecord", args, GetCnameRecordResultOutput{}, options).(GetCnameRecordResultOutput), nil }).(GetCnameRecordResultOutput) } // A collection of arguments for invoking getCnameRecord. type GetCnameRecordOutputArgs struct { // The name of the DNS CNAME Record. Name pulumi.StringInput `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName pulumi.StringInput `pulumi:"zoneName"` } func (GetCnameRecordOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetCnameRecordArgs)(nil)).Elem() } // A collection of values returned by getCnameRecord. type GetCnameRecordResultOutput struct{ *pulumi.OutputState } func (GetCnameRecordResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetCnameRecordResult)(nil)).Elem() } func (o GetCnameRecordResultOutput) ToGetCnameRecordResultOutput() GetCnameRecordResultOutput { return o } func (o GetCnameRecordResultOutput) ToGetCnameRecordResultOutputWithContext(ctx context.Context) GetCnameRecordResultOutput { return o } // The FQDN of the DNS CName Record. func (o GetCnameRecordResultOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v GetCnameRecordResult) string { return v.Fqdn }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetCnameRecordResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetCnameRecordResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetCnameRecordResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetCnameRecordResult) string { return v.Name }).(pulumi.StringOutput) } // The target of the CNAME. func (o GetCnameRecordResultOutput) Record() pulumi.StringOutput { return o.ApplyT(func(v GetCnameRecordResult) string { return v.Record }).(pulumi.StringOutput) } func (o GetCnameRecordResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetCnameRecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o GetCnameRecordResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetCnameRecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Azure resource id of the target object from where the dns resource value is taken. func (o GetCnameRecordResultOutput) TargetResourceId() pulumi.StringOutput { return o.ApplyT(func(v GetCnameRecordResult) string { return v.TargetResourceId }).(pulumi.StringOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o GetCnameRecordResultOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v GetCnameRecordResult) int { return v.Ttl }).(pulumi.IntOutput) } func (o GetCnameRecordResultOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v GetCnameRecordResult) string { return v.ZoneName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetCnameRecordResultOutput{}) }
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/dns/ptrRecord.go
sdk/go/azure/dns/ptrRecord.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 dns 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/dns" // "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 // } // exampleZone, err := dns.NewZone(ctx, "example", &dns.ZoneArgs{ // Name: pulumi.String("mydomain.com"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = dns.NewPtrRecord(ctx, "example", &dns.PtrRecordArgs{ // Name: pulumi.String("test"), // ZoneName: exampleZone.Name, // ResourceGroupName: example.Name, // Ttl: pulumi.Int(300), // Records: pulumi.StringArray{ // pulumi.String("yourdomain.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.Network` - 2018-05-01 // // ## Import // // PTR records can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:dns/ptrRecord:PtrRecord example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/dnsZones/zone1/PTR/myrecord1 // ``` type PtrRecord struct { pulumi.CustomResourceState // The FQDN of the DNS PTR Record. Fqdn pulumi.StringOutput `pulumi:"fqdn"` // The name of the DNS PTR Record. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // List of Fully Qualified Domain Names. Records pulumi.StringArrayOutput `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntOutput `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringOutput `pulumi:"zoneName"` } // NewPtrRecord registers a new resource with the given unique name, arguments, and options. func NewPtrRecord(ctx *pulumi.Context, name string, args *PtrRecordArgs, opts ...pulumi.ResourceOption) (*PtrRecord, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Records == nil { return nil, errors.New("invalid value for required argument 'Records'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Ttl == nil { return nil, errors.New("invalid value for required argument 'Ttl'") } if args.ZoneName == nil { return nil, errors.New("invalid value for required argument 'ZoneName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource PtrRecord err := ctx.RegisterResource("azure:dns/ptrRecord:PtrRecord", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPtrRecord gets an existing PtrRecord 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 GetPtrRecord(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PtrRecordState, opts ...pulumi.ResourceOption) (*PtrRecord, error) { var resource PtrRecord err := ctx.ReadResource("azure:dns/ptrRecord:PtrRecord", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering PtrRecord resources. type ptrRecordState struct { // The FQDN of the DNS PTR Record. Fqdn *string `pulumi:"fqdn"` // The name of the DNS PTR Record. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // List of Fully Qualified Domain Names. Records []string `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl *int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName *string `pulumi:"zoneName"` } type PtrRecordState struct { // The FQDN of the DNS PTR Record. Fqdn pulumi.StringPtrInput // The name of the DNS PTR Record. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // List of Fully Qualified Domain Names. Records pulumi.StringArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntPtrInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringPtrInput } func (PtrRecordState) ElementType() reflect.Type { return reflect.TypeOf((*ptrRecordState)(nil)).Elem() } type ptrRecordArgs struct { // The name of the DNS PTR Record. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // List of Fully Qualified Domain Names. Records []string `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName string `pulumi:"zoneName"` } // The set of arguments for constructing a PtrRecord resource. type PtrRecordArgs struct { // The name of the DNS PTR Record. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // List of Fully Qualified Domain Names. Records pulumi.StringArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringInput } func (PtrRecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*ptrRecordArgs)(nil)).Elem() } type PtrRecordInput interface { pulumi.Input ToPtrRecordOutput() PtrRecordOutput ToPtrRecordOutputWithContext(ctx context.Context) PtrRecordOutput } func (*PtrRecord) ElementType() reflect.Type { return reflect.TypeOf((**PtrRecord)(nil)).Elem() } func (i *PtrRecord) ToPtrRecordOutput() PtrRecordOutput { return i.ToPtrRecordOutputWithContext(context.Background()) } func (i *PtrRecord) ToPtrRecordOutputWithContext(ctx context.Context) PtrRecordOutput { return pulumi.ToOutputWithContext(ctx, i).(PtrRecordOutput) } // PtrRecordArrayInput is an input type that accepts PtrRecordArray and PtrRecordArrayOutput values. // You can construct a concrete instance of `PtrRecordArrayInput` via: // // PtrRecordArray{ PtrRecordArgs{...} } type PtrRecordArrayInput interface { pulumi.Input ToPtrRecordArrayOutput() PtrRecordArrayOutput ToPtrRecordArrayOutputWithContext(context.Context) PtrRecordArrayOutput } type PtrRecordArray []PtrRecordInput func (PtrRecordArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*PtrRecord)(nil)).Elem() } func (i PtrRecordArray) ToPtrRecordArrayOutput() PtrRecordArrayOutput { return i.ToPtrRecordArrayOutputWithContext(context.Background()) } func (i PtrRecordArray) ToPtrRecordArrayOutputWithContext(ctx context.Context) PtrRecordArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PtrRecordArrayOutput) } // PtrRecordMapInput is an input type that accepts PtrRecordMap and PtrRecordMapOutput values. // You can construct a concrete instance of `PtrRecordMapInput` via: // // PtrRecordMap{ "key": PtrRecordArgs{...} } type PtrRecordMapInput interface { pulumi.Input ToPtrRecordMapOutput() PtrRecordMapOutput ToPtrRecordMapOutputWithContext(context.Context) PtrRecordMapOutput } type PtrRecordMap map[string]PtrRecordInput func (PtrRecordMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PtrRecord)(nil)).Elem() } func (i PtrRecordMap) ToPtrRecordMapOutput() PtrRecordMapOutput { return i.ToPtrRecordMapOutputWithContext(context.Background()) } func (i PtrRecordMap) ToPtrRecordMapOutputWithContext(ctx context.Context) PtrRecordMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PtrRecordMapOutput) } type PtrRecordOutput struct{ *pulumi.OutputState } func (PtrRecordOutput) ElementType() reflect.Type { return reflect.TypeOf((**PtrRecord)(nil)).Elem() } func (o PtrRecordOutput) ToPtrRecordOutput() PtrRecordOutput { return o } func (o PtrRecordOutput) ToPtrRecordOutputWithContext(ctx context.Context) PtrRecordOutput { return o } // The FQDN of the DNS PTR Record. func (o PtrRecordOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v *PtrRecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) } // The name of the DNS PTR Record. Changing this forces a new resource to be created. func (o PtrRecordOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *PtrRecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // List of Fully Qualified Domain Names. func (o PtrRecordOutput) Records() pulumi.StringArrayOutput { return o.ApplyT(func(v *PtrRecord) pulumi.StringArrayOutput { return v.Records }).(pulumi.StringArrayOutput) } // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. func (o PtrRecordOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *PtrRecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o PtrRecordOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *PtrRecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o PtrRecordOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v *PtrRecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput) } // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. func (o PtrRecordOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v *PtrRecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput) } type PtrRecordArrayOutput struct{ *pulumi.OutputState } func (PtrRecordArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*PtrRecord)(nil)).Elem() } func (o PtrRecordArrayOutput) ToPtrRecordArrayOutput() PtrRecordArrayOutput { return o } func (o PtrRecordArrayOutput) ToPtrRecordArrayOutputWithContext(ctx context.Context) PtrRecordArrayOutput { return o } func (o PtrRecordArrayOutput) Index(i pulumi.IntInput) PtrRecordOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PtrRecord { return vs[0].([]*PtrRecord)[vs[1].(int)] }).(PtrRecordOutput) } type PtrRecordMapOutput struct{ *pulumi.OutputState } func (PtrRecordMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PtrRecord)(nil)).Elem() } func (o PtrRecordMapOutput) ToPtrRecordMapOutput() PtrRecordMapOutput { return o } func (o PtrRecordMapOutput) ToPtrRecordMapOutputWithContext(ctx context.Context) PtrRecordMapOutput { return o } func (o PtrRecordMapOutput) MapIndex(k pulumi.StringInput) PtrRecordOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PtrRecord { return vs[0].(map[string]*PtrRecord)[vs[1].(string)] }).(PtrRecordOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PtrRecordInput)(nil)).Elem(), &PtrRecord{}) pulumi.RegisterInputType(reflect.TypeOf((*PtrRecordArrayInput)(nil)).Elem(), PtrRecordArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PtrRecordMapInput)(nil)).Elem(), PtrRecordMap{}) pulumi.RegisterOutputType(PtrRecordOutput{}) pulumi.RegisterOutputType(PtrRecordArrayOutput{}) pulumi.RegisterOutputType(PtrRecordMapOutput{}) }
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/dns/getMxRecord.go
sdk/go/azure/dns/getMxRecord.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 dns import ( "context" "reflect" "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/dns" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := dns.LookupMxRecord(ctx, &dns.LookupMxRecordArgs{ // Name: pulumi.StringRef("test"), // ZoneName: "test-zone", // ResourceGroupName: "test-rg", // }, nil) // if err != nil { // return err // } // ctx.Export("dnsMxRecordId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2018-05-01 func LookupMxRecord(ctx *pulumi.Context, args *LookupMxRecordArgs, opts ...pulumi.InvokeOption) (*LookupMxRecordResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupMxRecordResult err := ctx.Invoke("azure:dns/getMxRecord:getMxRecord", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getMxRecord. type LookupMxRecordArgs struct { // The name of the DNS MX Record. Name *string `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName string `pulumi:"zoneName"` } // A collection of values returned by getMxRecord. type LookupMxRecordResult struct { // The FQDN of the DNS MX Record. Fqdn string `pulumi:"fqdn"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name *string `pulumi:"name"` // A list of values that make up the MX record. Each `record` block supports fields documented below. Records []GetMxRecordRecord `pulumi:"records"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` ZoneName string `pulumi:"zoneName"` } func LookupMxRecordOutput(ctx *pulumi.Context, args LookupMxRecordOutputArgs, opts ...pulumi.InvokeOption) LookupMxRecordResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupMxRecordResultOutput, error) { args := v.(LookupMxRecordArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:dns/getMxRecord:getMxRecord", args, LookupMxRecordResultOutput{}, options).(LookupMxRecordResultOutput), nil }).(LookupMxRecordResultOutput) } // A collection of arguments for invoking getMxRecord. type LookupMxRecordOutputArgs struct { // The name of the DNS MX Record. Name pulumi.StringPtrInput `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName pulumi.StringInput `pulumi:"zoneName"` } func (LookupMxRecordOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupMxRecordArgs)(nil)).Elem() } // A collection of values returned by getMxRecord. type LookupMxRecordResultOutput struct{ *pulumi.OutputState } func (LookupMxRecordResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupMxRecordResult)(nil)).Elem() } func (o LookupMxRecordResultOutput) ToLookupMxRecordResultOutput() LookupMxRecordResultOutput { return o } func (o LookupMxRecordResultOutput) ToLookupMxRecordResultOutputWithContext(ctx context.Context) LookupMxRecordResultOutput { return o } // The FQDN of the DNS MX Record. func (o LookupMxRecordResultOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v LookupMxRecordResult) string { return v.Fqdn }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupMxRecordResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupMxRecordResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupMxRecordResultOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v LookupMxRecordResult) *string { return v.Name }).(pulumi.StringPtrOutput) } // A list of values that make up the MX record. Each `record` block supports fields documented below. func (o LookupMxRecordResultOutput) Records() GetMxRecordRecordArrayOutput { return o.ApplyT(func(v LookupMxRecordResult) []GetMxRecordRecord { return v.Records }).(GetMxRecordRecordArrayOutput) } func (o LookupMxRecordResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupMxRecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o LookupMxRecordResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupMxRecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o LookupMxRecordResultOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v LookupMxRecordResult) int { return v.Ttl }).(pulumi.IntOutput) } func (o LookupMxRecordResultOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v LookupMxRecordResult) string { return v.ZoneName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupMxRecordResultOutput{}) }
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/dns/pulumiTypes.go
sdk/go/azure/dns/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 dns 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 CaaRecordRecord struct { // Extensible CAA flags, currently only 1 is implemented to set the issuer critical flag. Flags int `pulumi:"flags"` // A property tag, options are `issue`, `issuewild`, `iodef`, and `contactemail`. Tag string `pulumi:"tag"` // A property value such as a registrar domain. Value string `pulumi:"value"` } // CaaRecordRecordInput is an input type that accepts CaaRecordRecordArgs and CaaRecordRecordOutput values. // You can construct a concrete instance of `CaaRecordRecordInput` via: // // CaaRecordRecordArgs{...} type CaaRecordRecordInput interface { pulumi.Input ToCaaRecordRecordOutput() CaaRecordRecordOutput ToCaaRecordRecordOutputWithContext(context.Context) CaaRecordRecordOutput } type CaaRecordRecordArgs struct { // Extensible CAA flags, currently only 1 is implemented to set the issuer critical flag. Flags pulumi.IntInput `pulumi:"flags"` // A property tag, options are `issue`, `issuewild`, `iodef`, and `contactemail`. Tag pulumi.StringInput `pulumi:"tag"` // A property value such as a registrar domain. Value pulumi.StringInput `pulumi:"value"` } func (CaaRecordRecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*CaaRecordRecord)(nil)).Elem() } func (i CaaRecordRecordArgs) ToCaaRecordRecordOutput() CaaRecordRecordOutput { return i.ToCaaRecordRecordOutputWithContext(context.Background()) } func (i CaaRecordRecordArgs) ToCaaRecordRecordOutputWithContext(ctx context.Context) CaaRecordRecordOutput { return pulumi.ToOutputWithContext(ctx, i).(CaaRecordRecordOutput) } // CaaRecordRecordArrayInput is an input type that accepts CaaRecordRecordArray and CaaRecordRecordArrayOutput values. // You can construct a concrete instance of `CaaRecordRecordArrayInput` via: // // CaaRecordRecordArray{ CaaRecordRecordArgs{...} } type CaaRecordRecordArrayInput interface { pulumi.Input ToCaaRecordRecordArrayOutput() CaaRecordRecordArrayOutput ToCaaRecordRecordArrayOutputWithContext(context.Context) CaaRecordRecordArrayOutput } type CaaRecordRecordArray []CaaRecordRecordInput func (CaaRecordRecordArray) ElementType() reflect.Type { return reflect.TypeOf((*[]CaaRecordRecord)(nil)).Elem() } func (i CaaRecordRecordArray) ToCaaRecordRecordArrayOutput() CaaRecordRecordArrayOutput { return i.ToCaaRecordRecordArrayOutputWithContext(context.Background()) } func (i CaaRecordRecordArray) ToCaaRecordRecordArrayOutputWithContext(ctx context.Context) CaaRecordRecordArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CaaRecordRecordArrayOutput) } type CaaRecordRecordOutput struct{ *pulumi.OutputState } func (CaaRecordRecordOutput) ElementType() reflect.Type { return reflect.TypeOf((*CaaRecordRecord)(nil)).Elem() } func (o CaaRecordRecordOutput) ToCaaRecordRecordOutput() CaaRecordRecordOutput { return o } func (o CaaRecordRecordOutput) ToCaaRecordRecordOutputWithContext(ctx context.Context) CaaRecordRecordOutput { return o } // Extensible CAA flags, currently only 1 is implemented to set the issuer critical flag. func (o CaaRecordRecordOutput) Flags() pulumi.IntOutput { return o.ApplyT(func(v CaaRecordRecord) int { return v.Flags }).(pulumi.IntOutput) } // A property tag, options are `issue`, `issuewild`, `iodef`, and `contactemail`. func (o CaaRecordRecordOutput) Tag() pulumi.StringOutput { return o.ApplyT(func(v CaaRecordRecord) string { return v.Tag }).(pulumi.StringOutput) } // A property value such as a registrar domain. func (o CaaRecordRecordOutput) Value() pulumi.StringOutput { return o.ApplyT(func(v CaaRecordRecord) string { return v.Value }).(pulumi.StringOutput) } type CaaRecordRecordArrayOutput struct{ *pulumi.OutputState } func (CaaRecordRecordArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]CaaRecordRecord)(nil)).Elem() } func (o CaaRecordRecordArrayOutput) ToCaaRecordRecordArrayOutput() CaaRecordRecordArrayOutput { return o } func (o CaaRecordRecordArrayOutput) ToCaaRecordRecordArrayOutputWithContext(ctx context.Context) CaaRecordRecordArrayOutput { return o } func (o CaaRecordRecordArrayOutput) Index(i pulumi.IntInput) CaaRecordRecordOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) CaaRecordRecord { return vs[0].([]CaaRecordRecord)[vs[1].(int)] }).(CaaRecordRecordOutput) } type MxRecordRecord struct { // The mail server responsible for the domain covered by the MX record. Exchange string `pulumi:"exchange"` // String representing the "preference” value of the MX records. Records with lower preference value take priority. Preference string `pulumi:"preference"` } // MxRecordRecordInput is an input type that accepts MxRecordRecordArgs and MxRecordRecordOutput values. // You can construct a concrete instance of `MxRecordRecordInput` via: // // MxRecordRecordArgs{...} type MxRecordRecordInput interface { pulumi.Input ToMxRecordRecordOutput() MxRecordRecordOutput ToMxRecordRecordOutputWithContext(context.Context) MxRecordRecordOutput } type MxRecordRecordArgs struct { // The mail server responsible for the domain covered by the MX record. Exchange pulumi.StringInput `pulumi:"exchange"` // String representing the "preference” value of the MX records. Records with lower preference value take priority. Preference pulumi.StringInput `pulumi:"preference"` } func (MxRecordRecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*MxRecordRecord)(nil)).Elem() } func (i MxRecordRecordArgs) ToMxRecordRecordOutput() MxRecordRecordOutput { return i.ToMxRecordRecordOutputWithContext(context.Background()) } func (i MxRecordRecordArgs) ToMxRecordRecordOutputWithContext(ctx context.Context) MxRecordRecordOutput { return pulumi.ToOutputWithContext(ctx, i).(MxRecordRecordOutput) } // MxRecordRecordArrayInput is an input type that accepts MxRecordRecordArray and MxRecordRecordArrayOutput values. // You can construct a concrete instance of `MxRecordRecordArrayInput` via: // // MxRecordRecordArray{ MxRecordRecordArgs{...} } type MxRecordRecordArrayInput interface { pulumi.Input ToMxRecordRecordArrayOutput() MxRecordRecordArrayOutput ToMxRecordRecordArrayOutputWithContext(context.Context) MxRecordRecordArrayOutput } type MxRecordRecordArray []MxRecordRecordInput func (MxRecordRecordArray) ElementType() reflect.Type { return reflect.TypeOf((*[]MxRecordRecord)(nil)).Elem() } func (i MxRecordRecordArray) ToMxRecordRecordArrayOutput() MxRecordRecordArrayOutput { return i.ToMxRecordRecordArrayOutputWithContext(context.Background()) } func (i MxRecordRecordArray) ToMxRecordRecordArrayOutputWithContext(ctx context.Context) MxRecordRecordArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(MxRecordRecordArrayOutput) } type MxRecordRecordOutput struct{ *pulumi.OutputState } func (MxRecordRecordOutput) ElementType() reflect.Type { return reflect.TypeOf((*MxRecordRecord)(nil)).Elem() } func (o MxRecordRecordOutput) ToMxRecordRecordOutput() MxRecordRecordOutput { return o } func (o MxRecordRecordOutput) ToMxRecordRecordOutputWithContext(ctx context.Context) MxRecordRecordOutput { return o } // The mail server responsible for the domain covered by the MX record. func (o MxRecordRecordOutput) Exchange() pulumi.StringOutput { return o.ApplyT(func(v MxRecordRecord) string { return v.Exchange }).(pulumi.StringOutput) } // String representing the "preference” value of the MX records. Records with lower preference value take priority. func (o MxRecordRecordOutput) Preference() pulumi.StringOutput { return o.ApplyT(func(v MxRecordRecord) string { return v.Preference }).(pulumi.StringOutput) } type MxRecordRecordArrayOutput struct{ *pulumi.OutputState } func (MxRecordRecordArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]MxRecordRecord)(nil)).Elem() } func (o MxRecordRecordArrayOutput) ToMxRecordRecordArrayOutput() MxRecordRecordArrayOutput { return o } func (o MxRecordRecordArrayOutput) ToMxRecordRecordArrayOutputWithContext(ctx context.Context) MxRecordRecordArrayOutput { return o } func (o MxRecordRecordArrayOutput) Index(i pulumi.IntInput) MxRecordRecordOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) MxRecordRecord { return vs[0].([]MxRecordRecord)[vs[1].(int)] }).(MxRecordRecordOutput) } type SrvRecordRecord struct { // Port the service is listening on. Port int `pulumi:"port"` // Priority of the SRV record. Priority int `pulumi:"priority"` // FQDN of the service. Target string `pulumi:"target"` // Weight of the SRV record. Weight int `pulumi:"weight"` } // SrvRecordRecordInput is an input type that accepts SrvRecordRecordArgs and SrvRecordRecordOutput values. // You can construct a concrete instance of `SrvRecordRecordInput` via: // // SrvRecordRecordArgs{...} type SrvRecordRecordInput interface { pulumi.Input ToSrvRecordRecordOutput() SrvRecordRecordOutput ToSrvRecordRecordOutputWithContext(context.Context) SrvRecordRecordOutput } type SrvRecordRecordArgs struct { // Port the service is listening on. Port pulumi.IntInput `pulumi:"port"` // Priority of the SRV record. Priority pulumi.IntInput `pulumi:"priority"` // FQDN of the service. Target pulumi.StringInput `pulumi:"target"` // Weight of the SRV record. Weight pulumi.IntInput `pulumi:"weight"` } func (SrvRecordRecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*SrvRecordRecord)(nil)).Elem() } func (i SrvRecordRecordArgs) ToSrvRecordRecordOutput() SrvRecordRecordOutput { return i.ToSrvRecordRecordOutputWithContext(context.Background()) } func (i SrvRecordRecordArgs) ToSrvRecordRecordOutputWithContext(ctx context.Context) SrvRecordRecordOutput { return pulumi.ToOutputWithContext(ctx, i).(SrvRecordRecordOutput) } // SrvRecordRecordArrayInput is an input type that accepts SrvRecordRecordArray and SrvRecordRecordArrayOutput values. // You can construct a concrete instance of `SrvRecordRecordArrayInput` via: // // SrvRecordRecordArray{ SrvRecordRecordArgs{...} } type SrvRecordRecordArrayInput interface { pulumi.Input ToSrvRecordRecordArrayOutput() SrvRecordRecordArrayOutput ToSrvRecordRecordArrayOutputWithContext(context.Context) SrvRecordRecordArrayOutput } type SrvRecordRecordArray []SrvRecordRecordInput func (SrvRecordRecordArray) ElementType() reflect.Type { return reflect.TypeOf((*[]SrvRecordRecord)(nil)).Elem() } func (i SrvRecordRecordArray) ToSrvRecordRecordArrayOutput() SrvRecordRecordArrayOutput { return i.ToSrvRecordRecordArrayOutputWithContext(context.Background()) } func (i SrvRecordRecordArray) ToSrvRecordRecordArrayOutputWithContext(ctx context.Context) SrvRecordRecordArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SrvRecordRecordArrayOutput) } type SrvRecordRecordOutput struct{ *pulumi.OutputState } func (SrvRecordRecordOutput) ElementType() reflect.Type { return reflect.TypeOf((*SrvRecordRecord)(nil)).Elem() } func (o SrvRecordRecordOutput) ToSrvRecordRecordOutput() SrvRecordRecordOutput { return o } func (o SrvRecordRecordOutput) ToSrvRecordRecordOutputWithContext(ctx context.Context) SrvRecordRecordOutput { return o } // Port the service is listening on. func (o SrvRecordRecordOutput) Port() pulumi.IntOutput { return o.ApplyT(func(v SrvRecordRecord) int { return v.Port }).(pulumi.IntOutput) } // Priority of the SRV record. func (o SrvRecordRecordOutput) Priority() pulumi.IntOutput { return o.ApplyT(func(v SrvRecordRecord) int { return v.Priority }).(pulumi.IntOutput) } // FQDN of the service. func (o SrvRecordRecordOutput) Target() pulumi.StringOutput { return o.ApplyT(func(v SrvRecordRecord) string { return v.Target }).(pulumi.StringOutput) } // Weight of the SRV record. func (o SrvRecordRecordOutput) Weight() pulumi.IntOutput { return o.ApplyT(func(v SrvRecordRecord) int { return v.Weight }).(pulumi.IntOutput) } type SrvRecordRecordArrayOutput struct{ *pulumi.OutputState } func (SrvRecordRecordArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]SrvRecordRecord)(nil)).Elem() } func (o SrvRecordRecordArrayOutput) ToSrvRecordRecordArrayOutput() SrvRecordRecordArrayOutput { return o } func (o SrvRecordRecordArrayOutput) ToSrvRecordRecordArrayOutputWithContext(ctx context.Context) SrvRecordRecordArrayOutput { return o } func (o SrvRecordRecordArrayOutput) Index(i pulumi.IntInput) SrvRecordRecordOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) SrvRecordRecord { return vs[0].([]SrvRecordRecord)[vs[1].(int)] }).(SrvRecordRecordOutput) } type TxtRecordRecord struct { // The value of the record. Max length: 4096 characters Value string `pulumi:"value"` } // TxtRecordRecordInput is an input type that accepts TxtRecordRecordArgs and TxtRecordRecordOutput values. // You can construct a concrete instance of `TxtRecordRecordInput` via: // // TxtRecordRecordArgs{...} type TxtRecordRecordInput interface { pulumi.Input ToTxtRecordRecordOutput() TxtRecordRecordOutput ToTxtRecordRecordOutputWithContext(context.Context) TxtRecordRecordOutput } type TxtRecordRecordArgs struct { // The value of the record. Max length: 4096 characters Value pulumi.StringInput `pulumi:"value"` } func (TxtRecordRecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*TxtRecordRecord)(nil)).Elem() } func (i TxtRecordRecordArgs) ToTxtRecordRecordOutput() TxtRecordRecordOutput { return i.ToTxtRecordRecordOutputWithContext(context.Background()) } func (i TxtRecordRecordArgs) ToTxtRecordRecordOutputWithContext(ctx context.Context) TxtRecordRecordOutput { return pulumi.ToOutputWithContext(ctx, i).(TxtRecordRecordOutput) } // TxtRecordRecordArrayInput is an input type that accepts TxtRecordRecordArray and TxtRecordRecordArrayOutput values. // You can construct a concrete instance of `TxtRecordRecordArrayInput` via: // // TxtRecordRecordArray{ TxtRecordRecordArgs{...} } type TxtRecordRecordArrayInput interface { pulumi.Input ToTxtRecordRecordArrayOutput() TxtRecordRecordArrayOutput ToTxtRecordRecordArrayOutputWithContext(context.Context) TxtRecordRecordArrayOutput } type TxtRecordRecordArray []TxtRecordRecordInput func (TxtRecordRecordArray) ElementType() reflect.Type { return reflect.TypeOf((*[]TxtRecordRecord)(nil)).Elem() } func (i TxtRecordRecordArray) ToTxtRecordRecordArrayOutput() TxtRecordRecordArrayOutput { return i.ToTxtRecordRecordArrayOutputWithContext(context.Background()) } func (i TxtRecordRecordArray) ToTxtRecordRecordArrayOutputWithContext(ctx context.Context) TxtRecordRecordArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(TxtRecordRecordArrayOutput) } type TxtRecordRecordOutput struct{ *pulumi.OutputState } func (TxtRecordRecordOutput) ElementType() reflect.Type { return reflect.TypeOf((*TxtRecordRecord)(nil)).Elem() } func (o TxtRecordRecordOutput) ToTxtRecordRecordOutput() TxtRecordRecordOutput { return o } func (o TxtRecordRecordOutput) ToTxtRecordRecordOutputWithContext(ctx context.Context) TxtRecordRecordOutput { return o } // The value of the record. Max length: 4096 characters func (o TxtRecordRecordOutput) Value() pulumi.StringOutput { return o.ApplyT(func(v TxtRecordRecord) string { return v.Value }).(pulumi.StringOutput) } type TxtRecordRecordArrayOutput struct{ *pulumi.OutputState } func (TxtRecordRecordArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]TxtRecordRecord)(nil)).Elem() } func (o TxtRecordRecordArrayOutput) ToTxtRecordRecordArrayOutput() TxtRecordRecordArrayOutput { return o } func (o TxtRecordRecordArrayOutput) ToTxtRecordRecordArrayOutputWithContext(ctx context.Context) TxtRecordRecordArrayOutput { return o } func (o TxtRecordRecordArrayOutput) Index(i pulumi.IntInput) TxtRecordRecordOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) TxtRecordRecord { return vs[0].([]TxtRecordRecord)[vs[1].(int)] }).(TxtRecordRecordOutput) } type ZoneSoaRecord struct { // The email contact for the SOA record. Email string `pulumi:"email"` // The expire time for the SOA record. Defaults to `2419200`. ExpireTime *int `pulumi:"expireTime"` // The fully qualified domain name. Fqdn *string `pulumi:"fqdn"` // The domain name of the authoritative name server for the SOA record. HostName *string `pulumi:"hostName"` // The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. Defaults to `300`. MinimumTtl *int `pulumi:"minimumTtl"` // The refresh time for the SOA record. Defaults to `3600`. RefreshTime *int `pulumi:"refreshTime"` // The retry time for the SOA record. Defaults to `300`. RetryTime *int `pulumi:"retryTime"` // The serial number for the SOA record. Defaults to `1`. SerialNumber *int `pulumi:"serialNumber"` // A mapping of tags to assign to the Record Set. Tags map[string]string `pulumi:"tags"` // The Time To Live of the SOA Record in seconds. Defaults to `3600`. Ttl *int `pulumi:"ttl"` } // ZoneSoaRecordInput is an input type that accepts ZoneSoaRecordArgs and ZoneSoaRecordOutput values. // You can construct a concrete instance of `ZoneSoaRecordInput` via: // // ZoneSoaRecordArgs{...} type ZoneSoaRecordInput interface { pulumi.Input ToZoneSoaRecordOutput() ZoneSoaRecordOutput ToZoneSoaRecordOutputWithContext(context.Context) ZoneSoaRecordOutput } type ZoneSoaRecordArgs struct { // The email contact for the SOA record. Email pulumi.StringInput `pulumi:"email"` // The expire time for the SOA record. Defaults to `2419200`. ExpireTime pulumi.IntPtrInput `pulumi:"expireTime"` // The fully qualified domain name. Fqdn pulumi.StringPtrInput `pulumi:"fqdn"` // The domain name of the authoritative name server for the SOA record. HostName pulumi.StringPtrInput `pulumi:"hostName"` // The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. Defaults to `300`. MinimumTtl pulumi.IntPtrInput `pulumi:"minimumTtl"` // The refresh time for the SOA record. Defaults to `3600`. RefreshTime pulumi.IntPtrInput `pulumi:"refreshTime"` // The retry time for the SOA record. Defaults to `300`. RetryTime pulumi.IntPtrInput `pulumi:"retryTime"` // The serial number for the SOA record. Defaults to `1`. SerialNumber pulumi.IntPtrInput `pulumi:"serialNumber"` // A mapping of tags to assign to the Record Set. Tags pulumi.StringMapInput `pulumi:"tags"` // The Time To Live of the SOA Record in seconds. Defaults to `3600`. Ttl pulumi.IntPtrInput `pulumi:"ttl"` } func (ZoneSoaRecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*ZoneSoaRecord)(nil)).Elem() } func (i ZoneSoaRecordArgs) ToZoneSoaRecordOutput() ZoneSoaRecordOutput { return i.ToZoneSoaRecordOutputWithContext(context.Background()) } func (i ZoneSoaRecordArgs) ToZoneSoaRecordOutputWithContext(ctx context.Context) ZoneSoaRecordOutput { return pulumi.ToOutputWithContext(ctx, i).(ZoneSoaRecordOutput) } func (i ZoneSoaRecordArgs) ToZoneSoaRecordPtrOutput() ZoneSoaRecordPtrOutput { return i.ToZoneSoaRecordPtrOutputWithContext(context.Background()) } func (i ZoneSoaRecordArgs) ToZoneSoaRecordPtrOutputWithContext(ctx context.Context) ZoneSoaRecordPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ZoneSoaRecordOutput).ToZoneSoaRecordPtrOutputWithContext(ctx) } // ZoneSoaRecordPtrInput is an input type that accepts ZoneSoaRecordArgs, ZoneSoaRecordPtr and ZoneSoaRecordPtrOutput values. // You can construct a concrete instance of `ZoneSoaRecordPtrInput` via: // // ZoneSoaRecordArgs{...} // // or: // // nil type ZoneSoaRecordPtrInput interface { pulumi.Input ToZoneSoaRecordPtrOutput() ZoneSoaRecordPtrOutput ToZoneSoaRecordPtrOutputWithContext(context.Context) ZoneSoaRecordPtrOutput } type zoneSoaRecordPtrType ZoneSoaRecordArgs func ZoneSoaRecordPtr(v *ZoneSoaRecordArgs) ZoneSoaRecordPtrInput { return (*zoneSoaRecordPtrType)(v) } func (*zoneSoaRecordPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ZoneSoaRecord)(nil)).Elem() } func (i *zoneSoaRecordPtrType) ToZoneSoaRecordPtrOutput() ZoneSoaRecordPtrOutput { return i.ToZoneSoaRecordPtrOutputWithContext(context.Background()) } func (i *zoneSoaRecordPtrType) ToZoneSoaRecordPtrOutputWithContext(ctx context.Context) ZoneSoaRecordPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ZoneSoaRecordPtrOutput) } type ZoneSoaRecordOutput struct{ *pulumi.OutputState } func (ZoneSoaRecordOutput) ElementType() reflect.Type { return reflect.TypeOf((*ZoneSoaRecord)(nil)).Elem() } func (o ZoneSoaRecordOutput) ToZoneSoaRecordOutput() ZoneSoaRecordOutput { return o } func (o ZoneSoaRecordOutput) ToZoneSoaRecordOutputWithContext(ctx context.Context) ZoneSoaRecordOutput { return o } func (o ZoneSoaRecordOutput) ToZoneSoaRecordPtrOutput() ZoneSoaRecordPtrOutput { return o.ToZoneSoaRecordPtrOutputWithContext(context.Background()) } func (o ZoneSoaRecordOutput) ToZoneSoaRecordPtrOutputWithContext(ctx context.Context) ZoneSoaRecordPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ZoneSoaRecord) *ZoneSoaRecord { return &v }).(ZoneSoaRecordPtrOutput) } // The email contact for the SOA record. func (o ZoneSoaRecordOutput) Email() pulumi.StringOutput { return o.ApplyT(func(v ZoneSoaRecord) string { return v.Email }).(pulumi.StringOutput) } // The expire time for the SOA record. Defaults to `2419200`. func (o ZoneSoaRecordOutput) ExpireTime() pulumi.IntPtrOutput { return o.ApplyT(func(v ZoneSoaRecord) *int { return v.ExpireTime }).(pulumi.IntPtrOutput) } // The fully qualified domain name. func (o ZoneSoaRecordOutput) Fqdn() pulumi.StringPtrOutput { return o.ApplyT(func(v ZoneSoaRecord) *string { return v.Fqdn }).(pulumi.StringPtrOutput) } // The domain name of the authoritative name server for the SOA record. func (o ZoneSoaRecordOutput) HostName() pulumi.StringPtrOutput { return o.ApplyT(func(v ZoneSoaRecord) *string { return v.HostName }).(pulumi.StringPtrOutput) } // The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. Defaults to `300`. func (o ZoneSoaRecordOutput) MinimumTtl() pulumi.IntPtrOutput { return o.ApplyT(func(v ZoneSoaRecord) *int { return v.MinimumTtl }).(pulumi.IntPtrOutput) } // The refresh time for the SOA record. Defaults to `3600`. func (o ZoneSoaRecordOutput) RefreshTime() pulumi.IntPtrOutput { return o.ApplyT(func(v ZoneSoaRecord) *int { return v.RefreshTime }).(pulumi.IntPtrOutput) } // The retry time for the SOA record. Defaults to `300`. func (o ZoneSoaRecordOutput) RetryTime() pulumi.IntPtrOutput { return o.ApplyT(func(v ZoneSoaRecord) *int { return v.RetryTime }).(pulumi.IntPtrOutput) } // The serial number for the SOA record. Defaults to `1`. func (o ZoneSoaRecordOutput) SerialNumber() pulumi.IntPtrOutput { return o.ApplyT(func(v ZoneSoaRecord) *int { return v.SerialNumber }).(pulumi.IntPtrOutput) } // A mapping of tags to assign to the Record Set. func (o ZoneSoaRecordOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v ZoneSoaRecord) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Time To Live of the SOA Record in seconds. Defaults to `3600`. func (o ZoneSoaRecordOutput) Ttl() pulumi.IntPtrOutput { return o.ApplyT(func(v ZoneSoaRecord) *int { return v.Ttl }).(pulumi.IntPtrOutput) } type ZoneSoaRecordPtrOutput struct{ *pulumi.OutputState } func (ZoneSoaRecordPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ZoneSoaRecord)(nil)).Elem() } func (o ZoneSoaRecordPtrOutput) ToZoneSoaRecordPtrOutput() ZoneSoaRecordPtrOutput { return o } func (o ZoneSoaRecordPtrOutput) ToZoneSoaRecordPtrOutputWithContext(ctx context.Context) ZoneSoaRecordPtrOutput { return o } func (o ZoneSoaRecordPtrOutput) Elem() ZoneSoaRecordOutput { return o.ApplyT(func(v *ZoneSoaRecord) ZoneSoaRecord { if v != nil { return *v } var ret ZoneSoaRecord return ret }).(ZoneSoaRecordOutput) } // The email contact for the SOA record. func (o ZoneSoaRecordPtrOutput) Email() pulumi.StringPtrOutput { return o.ApplyT(func(v *ZoneSoaRecord) *string { if v == nil { return nil } return &v.Email }).(pulumi.StringPtrOutput) } // The expire time for the SOA record. Defaults to `2419200`. func (o ZoneSoaRecordPtrOutput) ExpireTime() pulumi.IntPtrOutput { return o.ApplyT(func(v *ZoneSoaRecord) *int { if v == nil { return nil } return v.ExpireTime }).(pulumi.IntPtrOutput) } // The fully qualified domain name. func (o ZoneSoaRecordPtrOutput) Fqdn() pulumi.StringPtrOutput { return o.ApplyT(func(v *ZoneSoaRecord) *string { if v == nil { return nil } return v.Fqdn }).(pulumi.StringPtrOutput) } // The domain name of the authoritative name server for the SOA record. func (o ZoneSoaRecordPtrOutput) HostName() pulumi.StringPtrOutput { return o.ApplyT(func(v *ZoneSoaRecord) *string { if v == nil { return nil } return v.HostName }).(pulumi.StringPtrOutput) } // The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. Defaults to `300`. func (o ZoneSoaRecordPtrOutput) MinimumTtl() pulumi.IntPtrOutput { return o.ApplyT(func(v *ZoneSoaRecord) *int { if v == nil { return nil } return v.MinimumTtl }).(pulumi.IntPtrOutput) } // The refresh time for the SOA record. Defaults to `3600`. func (o ZoneSoaRecordPtrOutput) RefreshTime() pulumi.IntPtrOutput { return o.ApplyT(func(v *ZoneSoaRecord) *int { if v == nil { return nil } return v.RefreshTime }).(pulumi.IntPtrOutput) } // The retry time for the SOA record. Defaults to `300`. func (o ZoneSoaRecordPtrOutput) RetryTime() pulumi.IntPtrOutput { return o.ApplyT(func(v *ZoneSoaRecord) *int { if v == nil { return nil } return v.RetryTime }).(pulumi.IntPtrOutput) } // The serial number for the SOA record. Defaults to `1`. func (o ZoneSoaRecordPtrOutput) SerialNumber() pulumi.IntPtrOutput { return o.ApplyT(func(v *ZoneSoaRecord) *int { if v == nil { return nil } return v.SerialNumber }).(pulumi.IntPtrOutput) } // A mapping of tags to assign to the Record Set. func (o ZoneSoaRecordPtrOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ZoneSoaRecord) map[string]string { if v == nil { return nil } return v.Tags }).(pulumi.StringMapOutput) } // The Time To Live of the SOA Record in seconds. Defaults to `3600`. func (o ZoneSoaRecordPtrOutput) Ttl() pulumi.IntPtrOutput { return o.ApplyT(func(v *ZoneSoaRecord) *int { if v == nil { return nil } return v.Ttl }).(pulumi.IntPtrOutput) } type GetCAARecordRecord struct { // Extensible CAA flags, currently only 1 is implemented to set the issuer critical flag. Flags int `pulumi:"flags"` // A property tag, options are `issue`, `issuewild`, `iodef`, and `contactemail`. Tag string `pulumi:"tag"` // A property value such as a registrar domain. Value string `pulumi:"value"` } // GetCAARecordRecordInput is an input type that accepts GetCAARecordRecordArgs and GetCAARecordRecordOutput values. // You can construct a concrete instance of `GetCAARecordRecordInput` via: // // GetCAARecordRecordArgs{...} type GetCAARecordRecordInput interface { pulumi.Input ToGetCAARecordRecordOutput() GetCAARecordRecordOutput ToGetCAARecordRecordOutputWithContext(context.Context) GetCAARecordRecordOutput } type GetCAARecordRecordArgs struct { // Extensible CAA flags, currently only 1 is implemented to set the issuer critical flag. Flags pulumi.IntInput `pulumi:"flags"` // A property tag, options are `issue`, `issuewild`, `iodef`, and `contactemail`. Tag pulumi.StringInput `pulumi:"tag"` // A property value such as a registrar domain. Value pulumi.StringInput `pulumi:"value"` } func (GetCAARecordRecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetCAARecordRecord)(nil)).Elem() } func (i GetCAARecordRecordArgs) ToGetCAARecordRecordOutput() GetCAARecordRecordOutput { return i.ToGetCAARecordRecordOutputWithContext(context.Background()) } func (i GetCAARecordRecordArgs) ToGetCAARecordRecordOutputWithContext(ctx context.Context) GetCAARecordRecordOutput { return pulumi.ToOutputWithContext(ctx, i).(GetCAARecordRecordOutput) } // GetCAARecordRecordArrayInput is an input type that accepts GetCAARecordRecordArray and GetCAARecordRecordArrayOutput values. // You can construct a concrete instance of `GetCAARecordRecordArrayInput` via: // // GetCAARecordRecordArray{ GetCAARecordRecordArgs{...} } type GetCAARecordRecordArrayInput interface { pulumi.Input ToGetCAARecordRecordArrayOutput() GetCAARecordRecordArrayOutput ToGetCAARecordRecordArrayOutputWithContext(context.Context) GetCAARecordRecordArrayOutput } type GetCAARecordRecordArray []GetCAARecordRecordInput func (GetCAARecordRecordArray) ElementType() reflect.Type { return reflect.TypeOf((*[]GetCAARecordRecord)(nil)).Elem() } func (i GetCAARecordRecordArray) ToGetCAARecordRecordArrayOutput() GetCAARecordRecordArrayOutput { return i.ToGetCAARecordRecordArrayOutputWithContext(context.Background()) } func (i GetCAARecordRecordArray) ToGetCAARecordRecordArrayOutputWithContext(ctx context.Context) GetCAARecordRecordArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GetCAARecordRecordArrayOutput) } type GetCAARecordRecordOutput struct{ *pulumi.OutputState } func (GetCAARecordRecordOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetCAARecordRecord)(nil)).Elem() } func (o GetCAARecordRecordOutput) ToGetCAARecordRecordOutput() GetCAARecordRecordOutput { return o } func (o GetCAARecordRecordOutput) ToGetCAARecordRecordOutputWithContext(ctx context.Context) GetCAARecordRecordOutput { return o } // Extensible CAA flags, currently only 1 is implemented to set the issuer critical flag. func (o GetCAARecordRecordOutput) Flags() pulumi.IntOutput { return o.ApplyT(func(v GetCAARecordRecord) int { return v.Flags }).(pulumi.IntOutput) } // A property tag, options are `issue`, `issuewild`, `iodef`, and `contactemail`. func (o GetCAARecordRecordOutput) Tag() pulumi.StringOutput { return o.ApplyT(func(v GetCAARecordRecord) string { return v.Tag }).(pulumi.StringOutput) } // A property value such as a registrar domain. func (o GetCAARecordRecordOutput) Value() pulumi.StringOutput { return o.ApplyT(func(v GetCAARecordRecord) string { return v.Value }).(pulumi.StringOutput) } type GetCAARecordRecordArrayOutput struct{ *pulumi.OutputState } func (GetCAARecordRecordArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]GetCAARecordRecord)(nil)).Elem() } func (o GetCAARecordRecordArrayOutput) ToGetCAARecordRecordArrayOutput() GetCAARecordRecordArrayOutput { return o } func (o GetCAARecordRecordArrayOutput) ToGetCAARecordRecordArrayOutputWithContext(ctx context.Context) GetCAARecordRecordArrayOutput { return o } func (o GetCAARecordRecordArrayOutput) Index(i pulumi.IntInput) GetCAARecordRecordOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetCAARecordRecord { return vs[0].([]GetCAARecordRecord)[vs[1].(int)] }).(GetCAARecordRecordOutput) } type GetMxRecordRecord struct { // The mail server responsible for the domain covered by the MX record. Exchange string `pulumi:"exchange"` // String representing the "preference” value of the MX records. Records with lower preference value take priority. Preference string `pulumi:"preference"` } // GetMxRecordRecordInput is an input type that accepts GetMxRecordRecordArgs and GetMxRecordRecordOutput values. // You can construct a concrete instance of `GetMxRecordRecordInput` via: // // GetMxRecordRecordArgs{...} type GetMxRecordRecordInput interface { pulumi.Input ToGetMxRecordRecordOutput() GetMxRecordRecordOutput ToGetMxRecordRecordOutputWithContext(context.Context) GetMxRecordRecordOutput } type GetMxRecordRecordArgs struct { // The mail server responsible for the domain covered by the MX record. Exchange pulumi.StringInput `pulumi:"exchange"` // String representing the "preference” value of the MX records. Records with lower preference value take priority. Preference pulumi.StringInput `pulumi:"preference"` } func (GetMxRecordRecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetMxRecordRecord)(nil)).Elem() } func (i GetMxRecordRecordArgs) ToGetMxRecordRecordOutput() GetMxRecordRecordOutput { return i.ToGetMxRecordRecordOutputWithContext(context.Background()) } func (i GetMxRecordRecordArgs) ToGetMxRecordRecordOutputWithContext(ctx context.Context) GetMxRecordRecordOutput {
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/dns/getNsRecord.go
sdk/go/azure/dns/getNsRecord.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 dns import ( "context" "reflect" "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/dns" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := dns.LookupNsRecord(ctx, &dns.LookupNsRecordArgs{ // Name: "test", // ZoneName: "test-zone", // ResourceGroupName: "test-rg", // }, nil) // if err != nil { // return err // } // ctx.Export("dnsNsRecordId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2018-05-01 func LookupNsRecord(ctx *pulumi.Context, args *LookupNsRecordArgs, opts ...pulumi.InvokeOption) (*LookupNsRecordResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupNsRecordResult err := ctx.Invoke("azure:dns/getNsRecord:getNsRecord", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getNsRecord. type LookupNsRecordArgs struct { // The name of the DNS NS Record. Name string `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName string `pulumi:"zoneName"` } // A collection of values returned by getNsRecord. type LookupNsRecordResult struct { // The FQDN of the DNS NS Record. Fqdn string `pulumi:"fqdn"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // A list of values that make up the NS record. Records []string `pulumi:"records"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` ZoneName string `pulumi:"zoneName"` } func LookupNsRecordOutput(ctx *pulumi.Context, args LookupNsRecordOutputArgs, opts ...pulumi.InvokeOption) LookupNsRecordResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupNsRecordResultOutput, error) { args := v.(LookupNsRecordArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:dns/getNsRecord:getNsRecord", args, LookupNsRecordResultOutput{}, options).(LookupNsRecordResultOutput), nil }).(LookupNsRecordResultOutput) } // A collection of arguments for invoking getNsRecord. type LookupNsRecordOutputArgs struct { // The name of the DNS NS Record. Name pulumi.StringInput `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName pulumi.StringInput `pulumi:"zoneName"` } func (LookupNsRecordOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupNsRecordArgs)(nil)).Elem() } // A collection of values returned by getNsRecord. type LookupNsRecordResultOutput struct{ *pulumi.OutputState } func (LookupNsRecordResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupNsRecordResult)(nil)).Elem() } func (o LookupNsRecordResultOutput) ToLookupNsRecordResultOutput() LookupNsRecordResultOutput { return o } func (o LookupNsRecordResultOutput) ToLookupNsRecordResultOutputWithContext(ctx context.Context) LookupNsRecordResultOutput { return o } // The FQDN of the DNS NS Record. func (o LookupNsRecordResultOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v LookupNsRecordResult) string { return v.Fqdn }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupNsRecordResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupNsRecordResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupNsRecordResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupNsRecordResult) string { return v.Name }).(pulumi.StringOutput) } // A list of values that make up the NS record. func (o LookupNsRecordResultOutput) Records() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupNsRecordResult) []string { return v.Records }).(pulumi.StringArrayOutput) } func (o LookupNsRecordResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupNsRecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o LookupNsRecordResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupNsRecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o LookupNsRecordResultOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v LookupNsRecordResult) int { return v.Ttl }).(pulumi.IntOutput) } func (o LookupNsRecordResultOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v LookupNsRecordResult) string { return v.ZoneName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupNsRecordResultOutput{}) }
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/dns/getCAARecord.go
sdk/go/azure/dns/getCAARecord.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 dns import ( "context" "reflect" "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/dns" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := dns.GetCAARecord(ctx, &dns.GetCAARecordArgs{ // Name: "test", // ZoneName: "test-zone", // ResourceGroupName: "test-rg", // }, nil) // if err != nil { // return err // } // ctx.Export("dnsCaaRecordId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2018-05-01 func GetCAARecord(ctx *pulumi.Context, args *GetCAARecordArgs, opts ...pulumi.InvokeOption) (*GetCAARecordResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetCAARecordResult err := ctx.Invoke("azure:dns/getCAARecord:getCAARecord", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getCAARecord. type GetCAARecordArgs struct { // The name of the DNS CAA Record. Name string `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName string `pulumi:"zoneName"` } // A collection of values returned by getCAARecord. type GetCAARecordResult struct { // The FQDN of the DNS CAA Record. Fqdn string `pulumi:"fqdn"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // A list of values that make up the CAA record. Each `record` block supports fields documented below. Records []GetCAARecordRecord `pulumi:"records"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` ZoneName string `pulumi:"zoneName"` } func GetCAARecordOutput(ctx *pulumi.Context, args GetCAARecordOutputArgs, opts ...pulumi.InvokeOption) GetCAARecordResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetCAARecordResultOutput, error) { args := v.(GetCAARecordArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:dns/getCAARecord:getCAARecord", args, GetCAARecordResultOutput{}, options).(GetCAARecordResultOutput), nil }).(GetCAARecordResultOutput) } // A collection of arguments for invoking getCAARecord. type GetCAARecordOutputArgs struct { // The name of the DNS CAA Record. Name pulumi.StringInput `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName pulumi.StringInput `pulumi:"zoneName"` } func (GetCAARecordOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetCAARecordArgs)(nil)).Elem() } // A collection of values returned by getCAARecord. type GetCAARecordResultOutput struct{ *pulumi.OutputState } func (GetCAARecordResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetCAARecordResult)(nil)).Elem() } func (o GetCAARecordResultOutput) ToGetCAARecordResultOutput() GetCAARecordResultOutput { return o } func (o GetCAARecordResultOutput) ToGetCAARecordResultOutputWithContext(ctx context.Context) GetCAARecordResultOutput { return o } // The FQDN of the DNS CAA Record. func (o GetCAARecordResultOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v GetCAARecordResult) string { return v.Fqdn }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetCAARecordResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetCAARecordResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetCAARecordResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetCAARecordResult) string { return v.Name }).(pulumi.StringOutput) } // A list of values that make up the CAA record. Each `record` block supports fields documented below. func (o GetCAARecordResultOutput) Records() GetCAARecordRecordArrayOutput { return o.ApplyT(func(v GetCAARecordResult) []GetCAARecordRecord { return v.Records }).(GetCAARecordRecordArrayOutput) } func (o GetCAARecordResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetCAARecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o GetCAARecordResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetCAARecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o GetCAARecordResultOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v GetCAARecordResult) int { return v.Ttl }).(pulumi.IntOutput) } func (o GetCAARecordResultOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v GetCAARecordResult) string { return v.ZoneName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetCAARecordResultOutput{}) }
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/dns/cnameRecord.go
sdk/go/azure/dns/cnameRecord.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 dns 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/dns" // "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 // } // exampleZone, err := dns.NewZone(ctx, "example", &dns.ZoneArgs{ // Name: pulumi.String("mydomain.com"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = dns.NewCNameRecord(ctx, "example", &dns.CNameRecordArgs{ // Name: pulumi.String("test"), // ZoneName: exampleZone.Name, // ResourceGroupName: example.Name, // Ttl: pulumi.Int(300), // Record: pulumi.String("contoso.com"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Alias Record) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dns" // "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 // } // exampleZone, err := dns.NewZone(ctx, "example", &dns.ZoneArgs{ // Name: pulumi.String("mydomain.com"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // target, err := dns.NewCNameRecord(ctx, "target", &dns.CNameRecordArgs{ // Name: pulumi.String("target"), // ZoneName: exampleZone.Name, // ResourceGroupName: example.Name, // Ttl: pulumi.Int(300), // Record: pulumi.String("contoso.com"), // }) // if err != nil { // return err // } // _, err = dns.NewCNameRecord(ctx, "example", &dns.CNameRecordArgs{ // Name: pulumi.String("test"), // ZoneName: exampleZone.Name, // ResourceGroupName: example.Name, // Ttl: pulumi.Int(300), // TargetResourceId: target.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.Network` - 2018-05-01 // // ## Import // // CNAME records can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:dns/cNameRecord:CNameRecord example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/dnsZones/zone1/CNAME/myrecord1 // ``` type CNameRecord struct { pulumi.CustomResourceState // The FQDN of the DNS CName Record. Fqdn pulumi.StringOutput `pulumi:"fqdn"` // The name of the DNS CNAME Record. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The target of the CNAME. Record pulumi.StringPtrOutput `pulumi:"record"` // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. // // > **Note:** either `record` OR `targetResourceId` must be specified, but not both. Tags pulumi.StringMapOutput `pulumi:"tags"` // The Azure resource id of the target object. Conflicts with `record`. TargetResourceId pulumi.StringPtrOutput `pulumi:"targetResourceId"` // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntOutput `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringOutput `pulumi:"zoneName"` } // NewCNameRecord registers a new resource with the given unique name, arguments, and options. func NewCNameRecord(ctx *pulumi.Context, name string, args *CNameRecordArgs, opts ...pulumi.ResourceOption) (*CNameRecord, 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.Ttl == nil { return nil, errors.New("invalid value for required argument 'Ttl'") } if args.ZoneName == nil { return nil, errors.New("invalid value for required argument 'ZoneName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource CNameRecord err := ctx.RegisterResource("azure:dns/cNameRecord:CNameRecord", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCNameRecord gets an existing CNameRecord 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 GetCNameRecord(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CNameRecordState, opts ...pulumi.ResourceOption) (*CNameRecord, error) { var resource CNameRecord err := ctx.ReadResource("azure:dns/cNameRecord:CNameRecord", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering CNameRecord resources. type cnameRecordState struct { // The FQDN of the DNS CName Record. Fqdn *string `pulumi:"fqdn"` // The name of the DNS CNAME Record. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The target of the CNAME. Record *string `pulumi:"record"` // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. // // > **Note:** either `record` OR `targetResourceId` must be specified, but not both. Tags map[string]string `pulumi:"tags"` // The Azure resource id of the target object. Conflicts with `record`. TargetResourceId *string `pulumi:"targetResourceId"` // The Time To Live (TTL) of the DNS record in seconds. Ttl *int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName *string `pulumi:"zoneName"` } type CNameRecordState struct { // The FQDN of the DNS CName Record. Fqdn pulumi.StringPtrInput // The name of the DNS CNAME Record. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The target of the CNAME. Record pulumi.StringPtrInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. // // > **Note:** either `record` OR `targetResourceId` must be specified, but not both. Tags pulumi.StringMapInput // The Azure resource id of the target object. Conflicts with `record`. TargetResourceId pulumi.StringPtrInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntPtrInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringPtrInput } func (CNameRecordState) ElementType() reflect.Type { return reflect.TypeOf((*cnameRecordState)(nil)).Elem() } type cnameRecordArgs struct { // The name of the DNS CNAME Record. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The target of the CNAME. Record *string `pulumi:"record"` // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. // // > **Note:** either `record` OR `targetResourceId` must be specified, but not both. Tags map[string]string `pulumi:"tags"` // The Azure resource id of the target object. Conflicts with `record`. TargetResourceId *string `pulumi:"targetResourceId"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName string `pulumi:"zoneName"` } // The set of arguments for constructing a CNameRecord resource. type CNameRecordArgs struct { // The name of the DNS CNAME Record. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The target of the CNAME. Record pulumi.StringPtrInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. // // > **Note:** either `record` OR `targetResourceId` must be specified, but not both. Tags pulumi.StringMapInput // The Azure resource id of the target object. Conflicts with `record`. TargetResourceId pulumi.StringPtrInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringInput } func (CNameRecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*cnameRecordArgs)(nil)).Elem() } type CNameRecordInput interface { pulumi.Input ToCNameRecordOutput() CNameRecordOutput ToCNameRecordOutputWithContext(ctx context.Context) CNameRecordOutput } func (*CNameRecord) ElementType() reflect.Type { return reflect.TypeOf((**CNameRecord)(nil)).Elem() } func (i *CNameRecord) ToCNameRecordOutput() CNameRecordOutput { return i.ToCNameRecordOutputWithContext(context.Background()) } func (i *CNameRecord) ToCNameRecordOutputWithContext(ctx context.Context) CNameRecordOutput { return pulumi.ToOutputWithContext(ctx, i).(CNameRecordOutput) } // CNameRecordArrayInput is an input type that accepts CNameRecordArray and CNameRecordArrayOutput values. // You can construct a concrete instance of `CNameRecordArrayInput` via: // // CNameRecordArray{ CNameRecordArgs{...} } type CNameRecordArrayInput interface { pulumi.Input ToCNameRecordArrayOutput() CNameRecordArrayOutput ToCNameRecordArrayOutputWithContext(context.Context) CNameRecordArrayOutput } type CNameRecordArray []CNameRecordInput func (CNameRecordArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*CNameRecord)(nil)).Elem() } func (i CNameRecordArray) ToCNameRecordArrayOutput() CNameRecordArrayOutput { return i.ToCNameRecordArrayOutputWithContext(context.Background()) } func (i CNameRecordArray) ToCNameRecordArrayOutputWithContext(ctx context.Context) CNameRecordArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CNameRecordArrayOutput) } // CNameRecordMapInput is an input type that accepts CNameRecordMap and CNameRecordMapOutput values. // You can construct a concrete instance of `CNameRecordMapInput` via: // // CNameRecordMap{ "key": CNameRecordArgs{...} } type CNameRecordMapInput interface { pulumi.Input ToCNameRecordMapOutput() CNameRecordMapOutput ToCNameRecordMapOutputWithContext(context.Context) CNameRecordMapOutput } type CNameRecordMap map[string]CNameRecordInput func (CNameRecordMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CNameRecord)(nil)).Elem() } func (i CNameRecordMap) ToCNameRecordMapOutput() CNameRecordMapOutput { return i.ToCNameRecordMapOutputWithContext(context.Background()) } func (i CNameRecordMap) ToCNameRecordMapOutputWithContext(ctx context.Context) CNameRecordMapOutput { return pulumi.ToOutputWithContext(ctx, i).(CNameRecordMapOutput) } type CNameRecordOutput struct{ *pulumi.OutputState } func (CNameRecordOutput) ElementType() reflect.Type { return reflect.TypeOf((**CNameRecord)(nil)).Elem() } func (o CNameRecordOutput) ToCNameRecordOutput() CNameRecordOutput { return o } func (o CNameRecordOutput) ToCNameRecordOutputWithContext(ctx context.Context) CNameRecordOutput { return o } // The FQDN of the DNS CName Record. func (o CNameRecordOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v *CNameRecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) } // The name of the DNS CNAME Record. Changing this forces a new resource to be created. func (o CNameRecordOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *CNameRecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The target of the CNAME. func (o CNameRecordOutput) Record() pulumi.StringPtrOutput { return o.ApplyT(func(v *CNameRecord) pulumi.StringPtrOutput { return v.Record }).(pulumi.StringPtrOutput) } // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. func (o CNameRecordOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *CNameRecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. // // > **Note:** either `record` OR `targetResourceId` must be specified, but not both. func (o CNameRecordOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *CNameRecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The Azure resource id of the target object. Conflicts with `record`. func (o CNameRecordOutput) TargetResourceId() pulumi.StringPtrOutput { return o.ApplyT(func(v *CNameRecord) pulumi.StringPtrOutput { return v.TargetResourceId }).(pulumi.StringPtrOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o CNameRecordOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v *CNameRecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput) } // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. func (o CNameRecordOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v *CNameRecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput) } type CNameRecordArrayOutput struct{ *pulumi.OutputState } func (CNameRecordArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*CNameRecord)(nil)).Elem() } func (o CNameRecordArrayOutput) ToCNameRecordArrayOutput() CNameRecordArrayOutput { return o } func (o CNameRecordArrayOutput) ToCNameRecordArrayOutputWithContext(ctx context.Context) CNameRecordArrayOutput { return o } func (o CNameRecordArrayOutput) Index(i pulumi.IntInput) CNameRecordOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CNameRecord { return vs[0].([]*CNameRecord)[vs[1].(int)] }).(CNameRecordOutput) } type CNameRecordMapOutput struct{ *pulumi.OutputState } func (CNameRecordMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CNameRecord)(nil)).Elem() } func (o CNameRecordMapOutput) ToCNameRecordMapOutput() CNameRecordMapOutput { return o } func (o CNameRecordMapOutput) ToCNameRecordMapOutputWithContext(ctx context.Context) CNameRecordMapOutput { return o } func (o CNameRecordMapOutput) MapIndex(k pulumi.StringInput) CNameRecordOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CNameRecord { return vs[0].(map[string]*CNameRecord)[vs[1].(string)] }).(CNameRecordOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*CNameRecordInput)(nil)).Elem(), &CNameRecord{}) pulumi.RegisterInputType(reflect.TypeOf((*CNameRecordArrayInput)(nil)).Elem(), CNameRecordArray{}) pulumi.RegisterInputType(reflect.TypeOf((*CNameRecordMapInput)(nil)).Elem(), CNameRecordMap{}) pulumi.RegisterOutputType(CNameRecordOutput{}) pulumi.RegisterOutputType(CNameRecordArrayOutput{}) pulumi.RegisterOutputType(CNameRecordMapOutput{}) }
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/dns/zone.go
sdk/go/azure/dns/zone.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 dns import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Enables you to manage DNS zones within Azure DNS. These zones are hosted on Azure's name servers to which you can delegate the zone from the parent domain. // // ## 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/dns" // "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 = dns.NewZone(ctx, "example-public", &dns.ZoneArgs{ // Name: pulumi.String("mydomain.com"), // 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.Network` - 2018-05-01 // // ## Import // // DNS Zones can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:dns/zone:Zone zone1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/dnsZones/zone1 // ``` type Zone struct { pulumi.CustomResourceState // Maximum number of Records in the zone. MaxNumberOfRecordSets pulumi.IntOutput `pulumi:"maxNumberOfRecordSets"` // The name of the DNS Zone. Must be a valid domain name. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A list of values that make up the NS record for the zone. NameServers pulumi.StringArrayOutput `pulumi:"nameServers"` // The number of records already in the zone. NumberOfRecordSets pulumi.IntOutput `pulumi:"numberOfRecordSets"` // Specifies the resource group where the resource exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `soaRecord` block as defined below. SoaRecord ZoneSoaRecordOutput `pulumi:"soaRecord"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewZone registers a new resource with the given unique name, arguments, and options. func NewZone(ctx *pulumi.Context, name string, args *ZoneArgs, opts ...pulumi.ResourceOption) (*Zone, 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 Zone err := ctx.RegisterResource("azure:dns/zone:Zone", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetZone gets an existing Zone 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 GetZone(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ZoneState, opts ...pulumi.ResourceOption) (*Zone, error) { var resource Zone err := ctx.ReadResource("azure:dns/zone:Zone", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Zone resources. type zoneState struct { // Maximum number of Records in the zone. MaxNumberOfRecordSets *int `pulumi:"maxNumberOfRecordSets"` // The name of the DNS Zone. Must be a valid domain name. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of values that make up the NS record for the zone. NameServers []string `pulumi:"nameServers"` // The number of records already in the zone. NumberOfRecordSets *int `pulumi:"numberOfRecordSets"` // Specifies the resource group where the resource exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `soaRecord` block as defined below. SoaRecord *ZoneSoaRecord `pulumi:"soaRecord"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } type ZoneState struct { // Maximum number of Records in the zone. MaxNumberOfRecordSets pulumi.IntPtrInput // The name of the DNS Zone. Must be a valid domain name. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of values that make up the NS record for the zone. NameServers pulumi.StringArrayInput // The number of records already in the zone. NumberOfRecordSets pulumi.IntPtrInput // Specifies the resource group where the resource exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `soaRecord` block as defined below. SoaRecord ZoneSoaRecordPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (ZoneState) ElementType() reflect.Type { return reflect.TypeOf((*zoneState)(nil)).Elem() } type zoneArgs struct { // The name of the DNS Zone. Must be a valid domain name. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the resource group where the resource exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `soaRecord` block as defined below. SoaRecord *ZoneSoaRecord `pulumi:"soaRecord"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Zone resource. type ZoneArgs struct { // The name of the DNS Zone. Must be a valid domain name. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the resource group where the resource exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `soaRecord` block as defined below. SoaRecord ZoneSoaRecordPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (ZoneArgs) ElementType() reflect.Type { return reflect.TypeOf((*zoneArgs)(nil)).Elem() } type ZoneInput interface { pulumi.Input ToZoneOutput() ZoneOutput ToZoneOutputWithContext(ctx context.Context) ZoneOutput } func (*Zone) ElementType() reflect.Type { return reflect.TypeOf((**Zone)(nil)).Elem() } func (i *Zone) ToZoneOutput() ZoneOutput { return i.ToZoneOutputWithContext(context.Background()) } func (i *Zone) ToZoneOutputWithContext(ctx context.Context) ZoneOutput { return pulumi.ToOutputWithContext(ctx, i).(ZoneOutput) } // ZoneArrayInput is an input type that accepts ZoneArray and ZoneArrayOutput values. // You can construct a concrete instance of `ZoneArrayInput` via: // // ZoneArray{ ZoneArgs{...} } type ZoneArrayInput interface { pulumi.Input ToZoneArrayOutput() ZoneArrayOutput ToZoneArrayOutputWithContext(context.Context) ZoneArrayOutput } type ZoneArray []ZoneInput func (ZoneArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Zone)(nil)).Elem() } func (i ZoneArray) ToZoneArrayOutput() ZoneArrayOutput { return i.ToZoneArrayOutputWithContext(context.Background()) } func (i ZoneArray) ToZoneArrayOutputWithContext(ctx context.Context) ZoneArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ZoneArrayOutput) } // ZoneMapInput is an input type that accepts ZoneMap and ZoneMapOutput values. // You can construct a concrete instance of `ZoneMapInput` via: // // ZoneMap{ "key": ZoneArgs{...} } type ZoneMapInput interface { pulumi.Input ToZoneMapOutput() ZoneMapOutput ToZoneMapOutputWithContext(context.Context) ZoneMapOutput } type ZoneMap map[string]ZoneInput func (ZoneMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Zone)(nil)).Elem() } func (i ZoneMap) ToZoneMapOutput() ZoneMapOutput { return i.ToZoneMapOutputWithContext(context.Background()) } func (i ZoneMap) ToZoneMapOutputWithContext(ctx context.Context) ZoneMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ZoneMapOutput) } type ZoneOutput struct{ *pulumi.OutputState } func (ZoneOutput) ElementType() reflect.Type { return reflect.TypeOf((**Zone)(nil)).Elem() } func (o ZoneOutput) ToZoneOutput() ZoneOutput { return o } func (o ZoneOutput) ToZoneOutputWithContext(ctx context.Context) ZoneOutput { return o } // Maximum number of Records in the zone. func (o ZoneOutput) MaxNumberOfRecordSets() pulumi.IntOutput { return o.ApplyT(func(v *Zone) pulumi.IntOutput { return v.MaxNumberOfRecordSets }).(pulumi.IntOutput) } // The name of the DNS Zone. Must be a valid domain name. Changing this forces a new resource to be created. func (o ZoneOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Zone) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A list of values that make up the NS record for the zone. func (o ZoneOutput) NameServers() pulumi.StringArrayOutput { return o.ApplyT(func(v *Zone) pulumi.StringArrayOutput { return v.NameServers }).(pulumi.StringArrayOutput) } // The number of records already in the zone. func (o ZoneOutput) NumberOfRecordSets() pulumi.IntOutput { return o.ApplyT(func(v *Zone) pulumi.IntOutput { return v.NumberOfRecordSets }).(pulumi.IntOutput) } // Specifies the resource group where the resource exists. Changing this forces a new resource to be created. func (o ZoneOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Zone) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `soaRecord` block as defined below. func (o ZoneOutput) SoaRecord() ZoneSoaRecordOutput { return o.ApplyT(func(v *Zone) ZoneSoaRecordOutput { return v.SoaRecord }).(ZoneSoaRecordOutput) } // A mapping of tags to assign to the resource. func (o ZoneOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Zone) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type ZoneArrayOutput struct{ *pulumi.OutputState } func (ZoneArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Zone)(nil)).Elem() } func (o ZoneArrayOutput) ToZoneArrayOutput() ZoneArrayOutput { return o } func (o ZoneArrayOutput) ToZoneArrayOutputWithContext(ctx context.Context) ZoneArrayOutput { return o } func (o ZoneArrayOutput) Index(i pulumi.IntInput) ZoneOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Zone { return vs[0].([]*Zone)[vs[1].(int)] }).(ZoneOutput) } type ZoneMapOutput struct{ *pulumi.OutputState } func (ZoneMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Zone)(nil)).Elem() } func (o ZoneMapOutput) ToZoneMapOutput() ZoneMapOutput { return o } func (o ZoneMapOutput) ToZoneMapOutputWithContext(ctx context.Context) ZoneMapOutput { return o } func (o ZoneMapOutput) MapIndex(k pulumi.StringInput) ZoneOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Zone { return vs[0].(map[string]*Zone)[vs[1].(string)] }).(ZoneOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ZoneInput)(nil)).Elem(), &Zone{}) pulumi.RegisterInputType(reflect.TypeOf((*ZoneArrayInput)(nil)).Elem(), ZoneArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ZoneMapInput)(nil)).Elem(), ZoneMap{}) pulumi.RegisterOutputType(ZoneOutput{}) pulumi.RegisterOutputType(ZoneArrayOutput{}) pulumi.RegisterOutputType(ZoneMapOutput{}) }
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/dns/txtRecord.go
sdk/go/azure/dns/txtRecord.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 dns 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/dns" // "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 // } // exampleZone, err := dns.NewZone(ctx, "example", &dns.ZoneArgs{ // Name: pulumi.String("mydomain.com"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = dns.NewTxtRecord(ctx, "example", &dns.TxtRecordArgs{ // Name: pulumi.String("test"), // ZoneName: exampleZone.Name, // ResourceGroupName: example.Name, // Ttl: pulumi.Int(300), // Records: dns.TxtRecordRecordArray{ // &dns.TxtRecordRecordArgs{ // Value: pulumi.String("google-site-authenticator"), // }, // &dns.TxtRecordRecordArgs{ // Value: pulumi.String("more site information here"), // }, // }, // Tags: pulumi.StringMap{ // "Environment": pulumi.String("Production"), // }, // }) // 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.Network` - 2018-05-01 // // ## Import // // TXT records can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:dns/txtRecord:TxtRecord example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/dnsZones/zone1/TXT/myrecord1 // ``` type TxtRecord struct { pulumi.CustomResourceState // The FQDN of the DNS TXT Record. Fqdn pulumi.StringOutput `pulumi:"fqdn"` // The name of the DNS TXT Record. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A list of values that make up the txt record. Each `record` block supports fields documented below. Records TxtRecordRecordArrayOutput `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntOutput `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringOutput `pulumi:"zoneName"` } // NewTxtRecord registers a new resource with the given unique name, arguments, and options. func NewTxtRecord(ctx *pulumi.Context, name string, args *TxtRecordArgs, opts ...pulumi.ResourceOption) (*TxtRecord, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Records == nil { return nil, errors.New("invalid value for required argument 'Records'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Ttl == nil { return nil, errors.New("invalid value for required argument 'Ttl'") } if args.ZoneName == nil { return nil, errors.New("invalid value for required argument 'ZoneName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource TxtRecord err := ctx.RegisterResource("azure:dns/txtRecord:TxtRecord", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetTxtRecord gets an existing TxtRecord 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 GetTxtRecord(ctx *pulumi.Context, name string, id pulumi.IDInput, state *TxtRecordState, opts ...pulumi.ResourceOption) (*TxtRecord, error) { var resource TxtRecord err := ctx.ReadResource("azure:dns/txtRecord:TxtRecord", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering TxtRecord resources. type txtRecordState struct { // The FQDN of the DNS TXT Record. Fqdn *string `pulumi:"fqdn"` // The name of the DNS TXT Record. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of values that make up the txt record. Each `record` block supports fields documented below. Records []TxtRecordRecord `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl *int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName *string `pulumi:"zoneName"` } type TxtRecordState struct { // The FQDN of the DNS TXT Record. Fqdn pulumi.StringPtrInput // The name of the DNS TXT Record. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of values that make up the txt record. Each `record` block supports fields documented below. Records TxtRecordRecordArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntPtrInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringPtrInput } func (TxtRecordState) ElementType() reflect.Type { return reflect.TypeOf((*txtRecordState)(nil)).Elem() } type txtRecordArgs struct { // The name of the DNS TXT Record. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of values that make up the txt record. Each `record` block supports fields documented below. Records []TxtRecordRecord `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName string `pulumi:"zoneName"` } // The set of arguments for constructing a TxtRecord resource. type TxtRecordArgs struct { // The name of the DNS TXT Record. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of values that make up the txt record. Each `record` block supports fields documented below. Records TxtRecordRecordArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringInput } func (TxtRecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*txtRecordArgs)(nil)).Elem() } type TxtRecordInput interface { pulumi.Input ToTxtRecordOutput() TxtRecordOutput ToTxtRecordOutputWithContext(ctx context.Context) TxtRecordOutput } func (*TxtRecord) ElementType() reflect.Type { return reflect.TypeOf((**TxtRecord)(nil)).Elem() } func (i *TxtRecord) ToTxtRecordOutput() TxtRecordOutput { return i.ToTxtRecordOutputWithContext(context.Background()) } func (i *TxtRecord) ToTxtRecordOutputWithContext(ctx context.Context) TxtRecordOutput { return pulumi.ToOutputWithContext(ctx, i).(TxtRecordOutput) } // TxtRecordArrayInput is an input type that accepts TxtRecordArray and TxtRecordArrayOutput values. // You can construct a concrete instance of `TxtRecordArrayInput` via: // // TxtRecordArray{ TxtRecordArgs{...} } type TxtRecordArrayInput interface { pulumi.Input ToTxtRecordArrayOutput() TxtRecordArrayOutput ToTxtRecordArrayOutputWithContext(context.Context) TxtRecordArrayOutput } type TxtRecordArray []TxtRecordInput func (TxtRecordArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*TxtRecord)(nil)).Elem() } func (i TxtRecordArray) ToTxtRecordArrayOutput() TxtRecordArrayOutput { return i.ToTxtRecordArrayOutputWithContext(context.Background()) } func (i TxtRecordArray) ToTxtRecordArrayOutputWithContext(ctx context.Context) TxtRecordArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(TxtRecordArrayOutput) } // TxtRecordMapInput is an input type that accepts TxtRecordMap and TxtRecordMapOutput values. // You can construct a concrete instance of `TxtRecordMapInput` via: // // TxtRecordMap{ "key": TxtRecordArgs{...} } type TxtRecordMapInput interface { pulumi.Input ToTxtRecordMapOutput() TxtRecordMapOutput ToTxtRecordMapOutputWithContext(context.Context) TxtRecordMapOutput } type TxtRecordMap map[string]TxtRecordInput func (TxtRecordMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*TxtRecord)(nil)).Elem() } func (i TxtRecordMap) ToTxtRecordMapOutput() TxtRecordMapOutput { return i.ToTxtRecordMapOutputWithContext(context.Background()) } func (i TxtRecordMap) ToTxtRecordMapOutputWithContext(ctx context.Context) TxtRecordMapOutput { return pulumi.ToOutputWithContext(ctx, i).(TxtRecordMapOutput) } type TxtRecordOutput struct{ *pulumi.OutputState } func (TxtRecordOutput) ElementType() reflect.Type { return reflect.TypeOf((**TxtRecord)(nil)).Elem() } func (o TxtRecordOutput) ToTxtRecordOutput() TxtRecordOutput { return o } func (o TxtRecordOutput) ToTxtRecordOutputWithContext(ctx context.Context) TxtRecordOutput { return o } // The FQDN of the DNS TXT Record. func (o TxtRecordOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v *TxtRecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) } // The name of the DNS TXT Record. Changing this forces a new resource to be created. func (o TxtRecordOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *TxtRecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A list of values that make up the txt record. Each `record` block supports fields documented below. func (o TxtRecordOutput) Records() TxtRecordRecordArrayOutput { return o.ApplyT(func(v *TxtRecord) TxtRecordRecordArrayOutput { return v.Records }).(TxtRecordRecordArrayOutput) } // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. func (o TxtRecordOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *TxtRecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o TxtRecordOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *TxtRecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o TxtRecordOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v *TxtRecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput) } // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. func (o TxtRecordOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v *TxtRecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput) } type TxtRecordArrayOutput struct{ *pulumi.OutputState } func (TxtRecordArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*TxtRecord)(nil)).Elem() } func (o TxtRecordArrayOutput) ToTxtRecordArrayOutput() TxtRecordArrayOutput { return o } func (o TxtRecordArrayOutput) ToTxtRecordArrayOutputWithContext(ctx context.Context) TxtRecordArrayOutput { return o } func (o TxtRecordArrayOutput) Index(i pulumi.IntInput) TxtRecordOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TxtRecord { return vs[0].([]*TxtRecord)[vs[1].(int)] }).(TxtRecordOutput) } type TxtRecordMapOutput struct{ *pulumi.OutputState } func (TxtRecordMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*TxtRecord)(nil)).Elem() } func (o TxtRecordMapOutput) ToTxtRecordMapOutput() TxtRecordMapOutput { return o } func (o TxtRecordMapOutput) ToTxtRecordMapOutputWithContext(ctx context.Context) TxtRecordMapOutput { return o } func (o TxtRecordMapOutput) MapIndex(k pulumi.StringInput) TxtRecordOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TxtRecord { return vs[0].(map[string]*TxtRecord)[vs[1].(string)] }).(TxtRecordOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*TxtRecordInput)(nil)).Elem(), &TxtRecord{}) pulumi.RegisterInputType(reflect.TypeOf((*TxtRecordArrayInput)(nil)).Elem(), TxtRecordArray{}) pulumi.RegisterInputType(reflect.TypeOf((*TxtRecordMapInput)(nil)).Elem(), TxtRecordMap{}) pulumi.RegisterOutputType(TxtRecordOutput{}) pulumi.RegisterOutputType(TxtRecordArrayOutput{}) pulumi.RegisterOutputType(TxtRecordMapOutput{}) }
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/dns/aaaaRecord.go
sdk/go/azure/dns/aaaaRecord.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 dns 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/dns" // "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 // } // exampleZone, err := dns.NewZone(ctx, "example", &dns.ZoneArgs{ // Name: pulumi.String("mydomain.com"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = dns.NewAaaaRecord(ctx, "example", &dns.AaaaRecordArgs{ // Name: pulumi.String("test"), // ZoneName: exampleZone.Name, // ResourceGroupName: example.Name, // Ttl: pulumi.Int(300), // Records: pulumi.StringArray{ // pulumi.String("2001:db8::1:0:0:1"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Alias Record) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dns" // "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-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleZone, err := dns.NewZone(ctx, "example", &dns.ZoneArgs{ // Name: pulumi.String("mydomain.com"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("mypublicip"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Dynamic"), // IpVersion: pulumi.String("IPv6"), // }) // if err != nil { // return err // } // _, err = dns.NewAaaaRecord(ctx, "example", &dns.AaaaRecordArgs{ // Name: pulumi.String("test"), // ZoneName: exampleZone.Name, // ResourceGroupName: example.Name, // Ttl: pulumi.Int(300), // TargetResourceId: examplePublicIp.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.Network` - 2018-05-01 // // ## Import // // AAAA records can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:dns/aaaaRecord:AaaaRecord example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/dnsZones/zone1/AAAA/myrecord1 // ``` type AaaaRecord struct { pulumi.CustomResourceState // The FQDN of the DNS AAAA Record. Fqdn pulumi.StringOutput `pulumi:"fqdn"` // The name of the DNS AAAA Record. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // List of IPv6 Addresses. Conflicts with `targetResourceId`. Records pulumi.StringArrayOutput `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. // // > **Note:** either `records` OR `targetResourceId` must be specified, but not both. Tags pulumi.StringMapOutput `pulumi:"tags"` // The Azure resource id of the target object. Conflicts with `records`. TargetResourceId pulumi.StringPtrOutput `pulumi:"targetResourceId"` // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntOutput `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringOutput `pulumi:"zoneName"` } // NewAaaaRecord registers a new resource with the given unique name, arguments, and options. func NewAaaaRecord(ctx *pulumi.Context, name string, args *AaaaRecordArgs, opts ...pulumi.ResourceOption) (*AaaaRecord, 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.Ttl == nil { return nil, errors.New("invalid value for required argument 'Ttl'") } if args.ZoneName == nil { return nil, errors.New("invalid value for required argument 'ZoneName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AaaaRecord err := ctx.RegisterResource("azure:dns/aaaaRecord:AaaaRecord", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAaaaRecord gets an existing AaaaRecord 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 GetAaaaRecord(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AaaaRecordState, opts ...pulumi.ResourceOption) (*AaaaRecord, error) { var resource AaaaRecord err := ctx.ReadResource("azure:dns/aaaaRecord:AaaaRecord", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AaaaRecord resources. type aaaaRecordState struct { // The FQDN of the DNS AAAA Record. Fqdn *string `pulumi:"fqdn"` // The name of the DNS AAAA Record. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // List of IPv6 Addresses. Conflicts with `targetResourceId`. Records []string `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. // // > **Note:** either `records` OR `targetResourceId` must be specified, but not both. Tags map[string]string `pulumi:"tags"` // The Azure resource id of the target object. Conflicts with `records`. TargetResourceId *string `pulumi:"targetResourceId"` // The Time To Live (TTL) of the DNS record in seconds. Ttl *int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName *string `pulumi:"zoneName"` } type AaaaRecordState struct { // The FQDN of the DNS AAAA Record. Fqdn pulumi.StringPtrInput // The name of the DNS AAAA Record. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // List of IPv6 Addresses. Conflicts with `targetResourceId`. Records pulumi.StringArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. // // > **Note:** either `records` OR `targetResourceId` must be specified, but not both. Tags pulumi.StringMapInput // The Azure resource id of the target object. Conflicts with `records`. TargetResourceId pulumi.StringPtrInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntPtrInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringPtrInput } func (AaaaRecordState) ElementType() reflect.Type { return reflect.TypeOf((*aaaaRecordState)(nil)).Elem() } type aaaaRecordArgs struct { // The name of the DNS AAAA Record. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // List of IPv6 Addresses. Conflicts with `targetResourceId`. Records []string `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. // // > **Note:** either `records` OR `targetResourceId` must be specified, but not both. Tags map[string]string `pulumi:"tags"` // The Azure resource id of the target object. Conflicts with `records`. TargetResourceId *string `pulumi:"targetResourceId"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName string `pulumi:"zoneName"` } // The set of arguments for constructing a AaaaRecord resource. type AaaaRecordArgs struct { // The name of the DNS AAAA Record. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // List of IPv6 Addresses. Conflicts with `targetResourceId`. Records pulumi.StringArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. // // > **Note:** either `records` OR `targetResourceId` must be specified, but not both. Tags pulumi.StringMapInput // The Azure resource id of the target object. Conflicts with `records`. TargetResourceId pulumi.StringPtrInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringInput } func (AaaaRecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*aaaaRecordArgs)(nil)).Elem() } type AaaaRecordInput interface { pulumi.Input ToAaaaRecordOutput() AaaaRecordOutput ToAaaaRecordOutputWithContext(ctx context.Context) AaaaRecordOutput } func (*AaaaRecord) ElementType() reflect.Type { return reflect.TypeOf((**AaaaRecord)(nil)).Elem() } func (i *AaaaRecord) ToAaaaRecordOutput() AaaaRecordOutput { return i.ToAaaaRecordOutputWithContext(context.Background()) } func (i *AaaaRecord) ToAaaaRecordOutputWithContext(ctx context.Context) AaaaRecordOutput { return pulumi.ToOutputWithContext(ctx, i).(AaaaRecordOutput) } // AaaaRecordArrayInput is an input type that accepts AaaaRecordArray and AaaaRecordArrayOutput values. // You can construct a concrete instance of `AaaaRecordArrayInput` via: // // AaaaRecordArray{ AaaaRecordArgs{...} } type AaaaRecordArrayInput interface { pulumi.Input ToAaaaRecordArrayOutput() AaaaRecordArrayOutput ToAaaaRecordArrayOutputWithContext(context.Context) AaaaRecordArrayOutput } type AaaaRecordArray []AaaaRecordInput func (AaaaRecordArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AaaaRecord)(nil)).Elem() } func (i AaaaRecordArray) ToAaaaRecordArrayOutput() AaaaRecordArrayOutput { return i.ToAaaaRecordArrayOutputWithContext(context.Background()) } func (i AaaaRecordArray) ToAaaaRecordArrayOutputWithContext(ctx context.Context) AaaaRecordArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AaaaRecordArrayOutput) } // AaaaRecordMapInput is an input type that accepts AaaaRecordMap and AaaaRecordMapOutput values. // You can construct a concrete instance of `AaaaRecordMapInput` via: // // AaaaRecordMap{ "key": AaaaRecordArgs{...} } type AaaaRecordMapInput interface { pulumi.Input ToAaaaRecordMapOutput() AaaaRecordMapOutput ToAaaaRecordMapOutputWithContext(context.Context) AaaaRecordMapOutput } type AaaaRecordMap map[string]AaaaRecordInput func (AaaaRecordMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AaaaRecord)(nil)).Elem() } func (i AaaaRecordMap) ToAaaaRecordMapOutput() AaaaRecordMapOutput { return i.ToAaaaRecordMapOutputWithContext(context.Background()) } func (i AaaaRecordMap) ToAaaaRecordMapOutputWithContext(ctx context.Context) AaaaRecordMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AaaaRecordMapOutput) } type AaaaRecordOutput struct{ *pulumi.OutputState } func (AaaaRecordOutput) ElementType() reflect.Type { return reflect.TypeOf((**AaaaRecord)(nil)).Elem() } func (o AaaaRecordOutput) ToAaaaRecordOutput() AaaaRecordOutput { return o } func (o AaaaRecordOutput) ToAaaaRecordOutputWithContext(ctx context.Context) AaaaRecordOutput { return o } // The FQDN of the DNS AAAA Record. func (o AaaaRecordOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v *AaaaRecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) } // The name of the DNS AAAA Record. Changing this forces a new resource to be created. func (o AaaaRecordOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AaaaRecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // List of IPv6 Addresses. Conflicts with `targetResourceId`. func (o AaaaRecordOutput) Records() pulumi.StringArrayOutput { return o.ApplyT(func(v *AaaaRecord) pulumi.StringArrayOutput { return v.Records }).(pulumi.StringArrayOutput) } // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. func (o AaaaRecordOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *AaaaRecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. // // > **Note:** either `records` OR `targetResourceId` must be specified, but not both. func (o AaaaRecordOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *AaaaRecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The Azure resource id of the target object. Conflicts with `records`. func (o AaaaRecordOutput) TargetResourceId() pulumi.StringPtrOutput { return o.ApplyT(func(v *AaaaRecord) pulumi.StringPtrOutput { return v.TargetResourceId }).(pulumi.StringPtrOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o AaaaRecordOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v *AaaaRecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput) } // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. func (o AaaaRecordOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v *AaaaRecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput) } type AaaaRecordArrayOutput struct{ *pulumi.OutputState } func (AaaaRecordArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AaaaRecord)(nil)).Elem() } func (o AaaaRecordArrayOutput) ToAaaaRecordArrayOutput() AaaaRecordArrayOutput { return o } func (o AaaaRecordArrayOutput) ToAaaaRecordArrayOutputWithContext(ctx context.Context) AaaaRecordArrayOutput { return o } func (o AaaaRecordArrayOutput) Index(i pulumi.IntInput) AaaaRecordOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AaaaRecord { return vs[0].([]*AaaaRecord)[vs[1].(int)] }).(AaaaRecordOutput) } type AaaaRecordMapOutput struct{ *pulumi.OutputState } func (AaaaRecordMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AaaaRecord)(nil)).Elem() } func (o AaaaRecordMapOutput) ToAaaaRecordMapOutput() AaaaRecordMapOutput { return o } func (o AaaaRecordMapOutput) ToAaaaRecordMapOutputWithContext(ctx context.Context) AaaaRecordMapOutput { return o } func (o AaaaRecordMapOutput) MapIndex(k pulumi.StringInput) AaaaRecordOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AaaaRecord { return vs[0].(map[string]*AaaaRecord)[vs[1].(string)] }).(AaaaRecordOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AaaaRecordInput)(nil)).Elem(), &AaaaRecord{}) pulumi.RegisterInputType(reflect.TypeOf((*AaaaRecordArrayInput)(nil)).Elem(), AaaaRecordArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AaaaRecordMapInput)(nil)).Elem(), AaaaRecordMap{}) pulumi.RegisterOutputType(AaaaRecordOutput{}) pulumi.RegisterOutputType(AaaaRecordArrayOutput{}) pulumi.RegisterOutputType(AaaaRecordMapOutput{}) }
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/dns/arecord.go
sdk/go/azure/dns/arecord.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 dns 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/dns" // "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 // } // exampleZone, err := dns.NewZone(ctx, "example", &dns.ZoneArgs{ // Name: pulumi.String("mydomain.com"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = dns.NewARecord(ctx, "example", &dns.ARecordArgs{ // Name: pulumi.String("test"), // ZoneName: exampleZone.Name, // ResourceGroupName: example.Name, // Ttl: pulumi.Int(300), // Records: pulumi.StringArray{ // pulumi.String("10.0.180.17"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Alias Record) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dns" // "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-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleZone, err := dns.NewZone(ctx, "example", &dns.ZoneArgs{ // Name: pulumi.String("mydomain.com"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("mypublicip"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Dynamic"), // IpVersion: pulumi.String("IPv4"), // }) // if err != nil { // return err // } // _, err = dns.NewARecord(ctx, "example", &dns.ARecordArgs{ // Name: pulumi.String("test"), // ZoneName: exampleZone.Name, // ResourceGroupName: example.Name, // Ttl: pulumi.Int(300), // TargetResourceId: examplePublicIp.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.Network` - 2018-05-01 // // ## Import // // A records can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:dns/aRecord:ARecord example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/dnsZones/zone1/A/myrecord1 // ``` type ARecord struct { pulumi.CustomResourceState // The FQDN of the DNS A Record. Fqdn pulumi.StringOutput `pulumi:"fqdn"` // The name of the DNS A Record. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // List of IPv4 Addresses. Conflicts with `targetResourceId`. Records pulumi.StringArrayOutput `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. // // > **Note:** either `records` OR `targetResourceId` must be specified, but not both. Tags pulumi.StringMapOutput `pulumi:"tags"` // The Azure resource id of the target object. Conflicts with `records`. TargetResourceId pulumi.StringPtrOutput `pulumi:"targetResourceId"` // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntOutput `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. // // > **Note:** The `zoneName` should be the name of resource `dns.Zone` instead of `privatedns.Zone`. ZoneName pulumi.StringOutput `pulumi:"zoneName"` } // NewARecord registers a new resource with the given unique name, arguments, and options. func NewARecord(ctx *pulumi.Context, name string, args *ARecordArgs, opts ...pulumi.ResourceOption) (*ARecord, 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.Ttl == nil { return nil, errors.New("invalid value for required argument 'Ttl'") } if args.ZoneName == nil { return nil, errors.New("invalid value for required argument 'ZoneName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ARecord err := ctx.RegisterResource("azure:dns/aRecord:ARecord", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetARecord gets an existing ARecord 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 GetARecord(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ARecordState, opts ...pulumi.ResourceOption) (*ARecord, error) { var resource ARecord err := ctx.ReadResource("azure:dns/aRecord:ARecord", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ARecord resources. type arecordState struct { // The FQDN of the DNS A Record. Fqdn *string `pulumi:"fqdn"` // The name of the DNS A Record. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // List of IPv4 Addresses. Conflicts with `targetResourceId`. Records []string `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. // // > **Note:** either `records` OR `targetResourceId` must be specified, but not both. Tags map[string]string `pulumi:"tags"` // The Azure resource id of the target object. Conflicts with `records`. TargetResourceId *string `pulumi:"targetResourceId"` // The Time To Live (TTL) of the DNS record in seconds. Ttl *int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. // // > **Note:** The `zoneName` should be the name of resource `dns.Zone` instead of `privatedns.Zone`. ZoneName *string `pulumi:"zoneName"` } type ARecordState struct { // The FQDN of the DNS A Record. Fqdn pulumi.StringPtrInput // The name of the DNS A Record. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // List of IPv4 Addresses. Conflicts with `targetResourceId`. Records pulumi.StringArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. // // > **Note:** either `records` OR `targetResourceId` must be specified, but not both. Tags pulumi.StringMapInput // The Azure resource id of the target object. Conflicts with `records`. TargetResourceId pulumi.StringPtrInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntPtrInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. // // > **Note:** The `zoneName` should be the name of resource `dns.Zone` instead of `privatedns.Zone`. ZoneName pulumi.StringPtrInput } func (ARecordState) ElementType() reflect.Type { return reflect.TypeOf((*arecordState)(nil)).Elem() } type arecordArgs struct { // The name of the DNS A Record. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // List of IPv4 Addresses. Conflicts with `targetResourceId`. Records []string `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. // // > **Note:** either `records` OR `targetResourceId` must be specified, but not both. Tags map[string]string `pulumi:"tags"` // The Azure resource id of the target object. Conflicts with `records`. TargetResourceId *string `pulumi:"targetResourceId"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. // // > **Note:** The `zoneName` should be the name of resource `dns.Zone` instead of `privatedns.Zone`. ZoneName string `pulumi:"zoneName"` } // The set of arguments for constructing a ARecord resource. type ARecordArgs struct { // The name of the DNS A Record. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // List of IPv4 Addresses. Conflicts with `targetResourceId`. Records pulumi.StringArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. // // > **Note:** either `records` OR `targetResourceId` must be specified, but not both. Tags pulumi.StringMapInput // The Azure resource id of the target object. Conflicts with `records`. TargetResourceId pulumi.StringPtrInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. // // > **Note:** The `zoneName` should be the name of resource `dns.Zone` instead of `privatedns.Zone`. ZoneName pulumi.StringInput } func (ARecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*arecordArgs)(nil)).Elem() } type ARecordInput interface { pulumi.Input ToARecordOutput() ARecordOutput ToARecordOutputWithContext(ctx context.Context) ARecordOutput } func (*ARecord) ElementType() reflect.Type { return reflect.TypeOf((**ARecord)(nil)).Elem() } func (i *ARecord) ToARecordOutput() ARecordOutput { return i.ToARecordOutputWithContext(context.Background()) } func (i *ARecord) ToARecordOutputWithContext(ctx context.Context) ARecordOutput { return pulumi.ToOutputWithContext(ctx, i).(ARecordOutput) } // ARecordArrayInput is an input type that accepts ARecordArray and ARecordArrayOutput values. // You can construct a concrete instance of `ARecordArrayInput` via: // // ARecordArray{ ARecordArgs{...} } type ARecordArrayInput interface { pulumi.Input ToARecordArrayOutput() ARecordArrayOutput ToARecordArrayOutputWithContext(context.Context) ARecordArrayOutput } type ARecordArray []ARecordInput func (ARecordArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ARecord)(nil)).Elem() } func (i ARecordArray) ToARecordArrayOutput() ARecordArrayOutput { return i.ToARecordArrayOutputWithContext(context.Background()) } func (i ARecordArray) ToARecordArrayOutputWithContext(ctx context.Context) ARecordArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ARecordArrayOutput) } // ARecordMapInput is an input type that accepts ARecordMap and ARecordMapOutput values. // You can construct a concrete instance of `ARecordMapInput` via: // // ARecordMap{ "key": ARecordArgs{...} } type ARecordMapInput interface { pulumi.Input ToARecordMapOutput() ARecordMapOutput ToARecordMapOutputWithContext(context.Context) ARecordMapOutput } type ARecordMap map[string]ARecordInput func (ARecordMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ARecord)(nil)).Elem() } func (i ARecordMap) ToARecordMapOutput() ARecordMapOutput { return i.ToARecordMapOutputWithContext(context.Background()) } func (i ARecordMap) ToARecordMapOutputWithContext(ctx context.Context) ARecordMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ARecordMapOutput) } type ARecordOutput struct{ *pulumi.OutputState } func (ARecordOutput) ElementType() reflect.Type { return reflect.TypeOf((**ARecord)(nil)).Elem() } func (o ARecordOutput) ToARecordOutput() ARecordOutput { return o } func (o ARecordOutput) ToARecordOutputWithContext(ctx context.Context) ARecordOutput { return o } // The FQDN of the DNS A Record. func (o ARecordOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v *ARecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) } // The name of the DNS A Record. Changing this forces a new resource to be created. func (o ARecordOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ARecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // List of IPv4 Addresses. Conflicts with `targetResourceId`. func (o ARecordOutput) Records() pulumi.StringArrayOutput { return o.ApplyT(func(v *ARecord) pulumi.StringArrayOutput { return v.Records }).(pulumi.StringArrayOutput) } // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. func (o ARecordOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ARecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. // // > **Note:** either `records` OR `targetResourceId` must be specified, but not both. func (o ARecordOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ARecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The Azure resource id of the target object. Conflicts with `records`. func (o ARecordOutput) TargetResourceId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ARecord) pulumi.StringPtrOutput { return v.TargetResourceId }).(pulumi.StringPtrOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o ARecordOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v *ARecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput) } // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. // // > **Note:** The `zoneName` should be the name of resource `dns.Zone` instead of `privatedns.Zone`. func (o ARecordOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v *ARecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput) } type ARecordArrayOutput struct{ *pulumi.OutputState } func (ARecordArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ARecord)(nil)).Elem() } func (o ARecordArrayOutput) ToARecordArrayOutput() ARecordArrayOutput { return o } func (o ARecordArrayOutput) ToARecordArrayOutputWithContext(ctx context.Context) ARecordArrayOutput { return o } func (o ARecordArrayOutput) Index(i pulumi.IntInput) ARecordOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ARecord { return vs[0].([]*ARecord)[vs[1].(int)] }).(ARecordOutput) } type ARecordMapOutput struct{ *pulumi.OutputState } func (ARecordMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ARecord)(nil)).Elem() } func (o ARecordMapOutput) ToARecordMapOutput() ARecordMapOutput { return o } func (o ARecordMapOutput) ToARecordMapOutputWithContext(ctx context.Context) ARecordMapOutput { return o } func (o ARecordMapOutput) MapIndex(k pulumi.StringInput) ARecordOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ARecord { return vs[0].(map[string]*ARecord)[vs[1].(string)] }).(ARecordOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ARecordInput)(nil)).Elem(), &ARecord{}) pulumi.RegisterInputType(reflect.TypeOf((*ARecordArrayInput)(nil)).Elem(), ARecordArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ARecordMapInput)(nil)).Elem(), ARecordMap{}) pulumi.RegisterOutputType(ARecordOutput{}) pulumi.RegisterOutputType(ARecordArrayOutput{}) pulumi.RegisterOutputType(ARecordMapOutput{}) }
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/dns/getARecord.go
sdk/go/azure/dns/getARecord.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 dns import ( "context" "reflect" "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/dns" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := dns.LookupARecord(ctx, &dns.LookupARecordArgs{ // Name: "test", // ZoneName: "test-zone", // ResourceGroupName: "test-rg", // }, nil) // if err != nil { // return err // } // ctx.Export("dnsARecordId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2018-05-01 func LookupARecord(ctx *pulumi.Context, args *LookupARecordArgs, opts ...pulumi.InvokeOption) (*LookupARecordResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupARecordResult err := ctx.Invoke("azure:dns/getARecord:getARecord", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getARecord. type LookupARecordArgs struct { // The name of the DNS A Record. Name string `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName string `pulumi:"zoneName"` } // A collection of values returned by getARecord. type LookupARecordResult struct { // The FQDN of the DNS A Record. Fqdn string `pulumi:"fqdn"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // List of IPv4 Addresses. Records []string `pulumi:"records"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the DNS A Record. Tags map[string]string `pulumi:"tags"` // The Azure resource id of the target object from where the dns resource value is taken. TargetResourceId string `pulumi:"targetResourceId"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` ZoneName string `pulumi:"zoneName"` } func LookupARecordOutput(ctx *pulumi.Context, args LookupARecordOutputArgs, opts ...pulumi.InvokeOption) LookupARecordResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupARecordResultOutput, error) { args := v.(LookupARecordArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:dns/getARecord:getARecord", args, LookupARecordResultOutput{}, options).(LookupARecordResultOutput), nil }).(LookupARecordResultOutput) } // A collection of arguments for invoking getARecord. type LookupARecordOutputArgs struct { // The name of the DNS A Record. Name pulumi.StringInput `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName pulumi.StringInput `pulumi:"zoneName"` } func (LookupARecordOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupARecordArgs)(nil)).Elem() } // A collection of values returned by getARecord. type LookupARecordResultOutput struct{ *pulumi.OutputState } func (LookupARecordResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupARecordResult)(nil)).Elem() } func (o LookupARecordResultOutput) ToLookupARecordResultOutput() LookupARecordResultOutput { return o } func (o LookupARecordResultOutput) ToLookupARecordResultOutputWithContext(ctx context.Context) LookupARecordResultOutput { return o } // The FQDN of the DNS A Record. func (o LookupARecordResultOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v LookupARecordResult) string { return v.Fqdn }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupARecordResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupARecordResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupARecordResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupARecordResult) string { return v.Name }).(pulumi.StringOutput) } // List of IPv4 Addresses. func (o LookupARecordResultOutput) Records() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupARecordResult) []string { return v.Records }).(pulumi.StringArrayOutput) } func (o LookupARecordResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupARecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the DNS A Record. func (o LookupARecordResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupARecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Azure resource id of the target object from where the dns resource value is taken. func (o LookupARecordResultOutput) TargetResourceId() pulumi.StringOutput { return o.ApplyT(func(v LookupARecordResult) string { return v.TargetResourceId }).(pulumi.StringOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o LookupARecordResultOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v LookupARecordResult) int { return v.Ttl }).(pulumi.IntOutput) } func (o LookupARecordResultOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v LookupARecordResult) string { return v.ZoneName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupARecordResultOutput{}) }
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/dns/nsRecord.go
sdk/go/azure/dns/nsRecord.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 dns 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/dns" // "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 // } // exampleZone, err := dns.NewZone(ctx, "example", &dns.ZoneArgs{ // Name: pulumi.String("mydomain.com"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = dns.NewNsRecord(ctx, "example", &dns.NsRecordArgs{ // Name: pulumi.String("test"), // ZoneName: exampleZone.Name, // ResourceGroupName: example.Name, // Ttl: pulumi.Int(300), // Records: pulumi.StringArray{ // pulumi.String("ns1.contoso.com."), // pulumi.String("ns2.contoso.com."), // }, // Tags: pulumi.StringMap{ // "Environment": pulumi.String("Production"), // }, // }) // 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.Network` - 2018-05-01 // // ## Import // // NS records can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:dns/nsRecord:NsRecord example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/dnsZones/zone1/NS/myrecord1 // ``` type NsRecord struct { pulumi.CustomResourceState // The FQDN of the DNS NS Record. Fqdn pulumi.StringOutput `pulumi:"fqdn"` // The name of the DNS NS Record. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A list of values that make up the NS record. Records pulumi.StringArrayOutput `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntOutput `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringOutput `pulumi:"zoneName"` } // NewNsRecord registers a new resource with the given unique name, arguments, and options. func NewNsRecord(ctx *pulumi.Context, name string, args *NsRecordArgs, opts ...pulumi.ResourceOption) (*NsRecord, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Records == nil { return nil, errors.New("invalid value for required argument 'Records'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Ttl == nil { return nil, errors.New("invalid value for required argument 'Ttl'") } if args.ZoneName == nil { return nil, errors.New("invalid value for required argument 'ZoneName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NsRecord err := ctx.RegisterResource("azure:dns/nsRecord:NsRecord", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNsRecord gets an existing NsRecord 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 GetNsRecord(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NsRecordState, opts ...pulumi.ResourceOption) (*NsRecord, error) { var resource NsRecord err := ctx.ReadResource("azure:dns/nsRecord:NsRecord", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NsRecord resources. type nsRecordState struct { // The FQDN of the DNS NS Record. Fqdn *string `pulumi:"fqdn"` // The name of the DNS NS Record. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of values that make up the NS record. Records []string `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl *int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName *string `pulumi:"zoneName"` } type NsRecordState struct { // The FQDN of the DNS NS Record. Fqdn pulumi.StringPtrInput // The name of the DNS NS Record. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of values that make up the NS record. Records pulumi.StringArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntPtrInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringPtrInput } func (NsRecordState) ElementType() reflect.Type { return reflect.TypeOf((*nsRecordState)(nil)).Elem() } type nsRecordArgs struct { // The name of the DNS NS Record. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of values that make up the NS record. Records []string `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName string `pulumi:"zoneName"` } // The set of arguments for constructing a NsRecord resource. type NsRecordArgs struct { // The name of the DNS NS Record. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of values that make up the NS record. Records pulumi.StringArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringInput } func (NsRecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*nsRecordArgs)(nil)).Elem() } type NsRecordInput interface { pulumi.Input ToNsRecordOutput() NsRecordOutput ToNsRecordOutputWithContext(ctx context.Context) NsRecordOutput } func (*NsRecord) ElementType() reflect.Type { return reflect.TypeOf((**NsRecord)(nil)).Elem() } func (i *NsRecord) ToNsRecordOutput() NsRecordOutput { return i.ToNsRecordOutputWithContext(context.Background()) } func (i *NsRecord) ToNsRecordOutputWithContext(ctx context.Context) NsRecordOutput { return pulumi.ToOutputWithContext(ctx, i).(NsRecordOutput) } // NsRecordArrayInput is an input type that accepts NsRecordArray and NsRecordArrayOutput values. // You can construct a concrete instance of `NsRecordArrayInput` via: // // NsRecordArray{ NsRecordArgs{...} } type NsRecordArrayInput interface { pulumi.Input ToNsRecordArrayOutput() NsRecordArrayOutput ToNsRecordArrayOutputWithContext(context.Context) NsRecordArrayOutput } type NsRecordArray []NsRecordInput func (NsRecordArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NsRecord)(nil)).Elem() } func (i NsRecordArray) ToNsRecordArrayOutput() NsRecordArrayOutput { return i.ToNsRecordArrayOutputWithContext(context.Background()) } func (i NsRecordArray) ToNsRecordArrayOutputWithContext(ctx context.Context) NsRecordArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NsRecordArrayOutput) } // NsRecordMapInput is an input type that accepts NsRecordMap and NsRecordMapOutput values. // You can construct a concrete instance of `NsRecordMapInput` via: // // NsRecordMap{ "key": NsRecordArgs{...} } type NsRecordMapInput interface { pulumi.Input ToNsRecordMapOutput() NsRecordMapOutput ToNsRecordMapOutputWithContext(context.Context) NsRecordMapOutput } type NsRecordMap map[string]NsRecordInput func (NsRecordMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NsRecord)(nil)).Elem() } func (i NsRecordMap) ToNsRecordMapOutput() NsRecordMapOutput { return i.ToNsRecordMapOutputWithContext(context.Background()) } func (i NsRecordMap) ToNsRecordMapOutputWithContext(ctx context.Context) NsRecordMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NsRecordMapOutput) } type NsRecordOutput struct{ *pulumi.OutputState } func (NsRecordOutput) ElementType() reflect.Type { return reflect.TypeOf((**NsRecord)(nil)).Elem() } func (o NsRecordOutput) ToNsRecordOutput() NsRecordOutput { return o } func (o NsRecordOutput) ToNsRecordOutputWithContext(ctx context.Context) NsRecordOutput { return o } // The FQDN of the DNS NS Record. func (o NsRecordOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v *NsRecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) } // The name of the DNS NS Record. Changing this forces a new resource to be created. func (o NsRecordOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NsRecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A list of values that make up the NS record. func (o NsRecordOutput) Records() pulumi.StringArrayOutput { return o.ApplyT(func(v *NsRecord) pulumi.StringArrayOutput { return v.Records }).(pulumi.StringArrayOutput) } // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. func (o NsRecordOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *NsRecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o NsRecordOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *NsRecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o NsRecordOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v *NsRecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput) } // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. func (o NsRecordOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v *NsRecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput) } type NsRecordArrayOutput struct{ *pulumi.OutputState } func (NsRecordArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NsRecord)(nil)).Elem() } func (o NsRecordArrayOutput) ToNsRecordArrayOutput() NsRecordArrayOutput { return o } func (o NsRecordArrayOutput) ToNsRecordArrayOutputWithContext(ctx context.Context) NsRecordArrayOutput { return o } func (o NsRecordArrayOutput) Index(i pulumi.IntInput) NsRecordOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NsRecord { return vs[0].([]*NsRecord)[vs[1].(int)] }).(NsRecordOutput) } type NsRecordMapOutput struct{ *pulumi.OutputState } func (NsRecordMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NsRecord)(nil)).Elem() } func (o NsRecordMapOutput) ToNsRecordMapOutput() NsRecordMapOutput { return o } func (o NsRecordMapOutput) ToNsRecordMapOutputWithContext(ctx context.Context) NsRecordMapOutput { return o } func (o NsRecordMapOutput) MapIndex(k pulumi.StringInput) NsRecordOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NsRecord { return vs[0].(map[string]*NsRecord)[vs[1].(string)] }).(NsRecordOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NsRecordInput)(nil)).Elem(), &NsRecord{}) pulumi.RegisterInputType(reflect.TypeOf((*NsRecordArrayInput)(nil)).Elem(), NsRecordArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NsRecordMapInput)(nil)).Elem(), NsRecordMap{}) pulumi.RegisterOutputType(NsRecordOutput{}) pulumi.RegisterOutputType(NsRecordArrayOutput{}) pulumi.RegisterOutputType(NsRecordMapOutput{}) }
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/dns/getSrvRecord.go
sdk/go/azure/dns/getSrvRecord.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 dns import ( "context" "reflect" "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/dns" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := dns.LookupSrvRecord(ctx, &dns.LookupSrvRecordArgs{ // Name: "test", // ZoneName: "test-zone", // ResourceGroupName: "test-rg", // }, nil) // if err != nil { // return err // } // ctx.Export("dnsSrvRecordId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2018-05-01 func LookupSrvRecord(ctx *pulumi.Context, args *LookupSrvRecordArgs, opts ...pulumi.InvokeOption) (*LookupSrvRecordResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupSrvRecordResult err := ctx.Invoke("azure:dns/getSrvRecord:getSrvRecord", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getSrvRecord. type LookupSrvRecordArgs struct { // The name of the DNS SRV Record. Name string `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName string `pulumi:"zoneName"` } // A collection of values returned by getSrvRecord. type LookupSrvRecordResult struct { // The FQDN of the DNS SRV Record. Fqdn string `pulumi:"fqdn"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // A list of values that make up the SRV record. Each `record` block supports fields documented below. Records []GetSrvRecordRecord `pulumi:"records"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` ZoneName string `pulumi:"zoneName"` } func LookupSrvRecordOutput(ctx *pulumi.Context, args LookupSrvRecordOutputArgs, opts ...pulumi.InvokeOption) LookupSrvRecordResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupSrvRecordResultOutput, error) { args := v.(LookupSrvRecordArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:dns/getSrvRecord:getSrvRecord", args, LookupSrvRecordResultOutput{}, options).(LookupSrvRecordResultOutput), nil }).(LookupSrvRecordResultOutput) } // A collection of arguments for invoking getSrvRecord. type LookupSrvRecordOutputArgs struct { // The name of the DNS SRV Record. Name pulumi.StringInput `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName pulumi.StringInput `pulumi:"zoneName"` } func (LookupSrvRecordOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupSrvRecordArgs)(nil)).Elem() } // A collection of values returned by getSrvRecord. type LookupSrvRecordResultOutput struct{ *pulumi.OutputState } func (LookupSrvRecordResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupSrvRecordResult)(nil)).Elem() } func (o LookupSrvRecordResultOutput) ToLookupSrvRecordResultOutput() LookupSrvRecordResultOutput { return o } func (o LookupSrvRecordResultOutput) ToLookupSrvRecordResultOutputWithContext(ctx context.Context) LookupSrvRecordResultOutput { return o } // The FQDN of the DNS SRV Record. func (o LookupSrvRecordResultOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v LookupSrvRecordResult) string { return v.Fqdn }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupSrvRecordResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupSrvRecordResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupSrvRecordResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupSrvRecordResult) string { return v.Name }).(pulumi.StringOutput) } // A list of values that make up the SRV record. Each `record` block supports fields documented below. func (o LookupSrvRecordResultOutput) Records() GetSrvRecordRecordArrayOutput { return o.ApplyT(func(v LookupSrvRecordResult) []GetSrvRecordRecord { return v.Records }).(GetSrvRecordRecordArrayOutput) } func (o LookupSrvRecordResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupSrvRecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o LookupSrvRecordResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupSrvRecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o LookupSrvRecordResultOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v LookupSrvRecordResult) int { return v.Ttl }).(pulumi.IntOutput) } func (o LookupSrvRecordResultOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v LookupSrvRecordResult) string { return v.ZoneName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupSrvRecordResultOutput{}) }
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/dns/getAAAARecord.go
sdk/go/azure/dns/getAAAARecord.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 dns import ( "context" "reflect" "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/dns" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := dns.GetAAAARecord(ctx, &dns.GetAAAARecordArgs{ // Name: "test", // ZoneName: "test-zone", // ResourceGroupName: "test-rg", // }, nil) // if err != nil { // return err // } // ctx.Export("dnsAaaaRecordId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2018-05-01 func GetAAAARecord(ctx *pulumi.Context, args *GetAAAARecordArgs, opts ...pulumi.InvokeOption) (*GetAAAARecordResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetAAAARecordResult err := ctx.Invoke("azure:dns/getAAAARecord:getAAAARecord", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getAAAARecord. type GetAAAARecordArgs struct { // The name of the DNS AAAA Record. Name string `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName string `pulumi:"zoneName"` } // A collection of values returned by getAAAARecord. type GetAAAARecordResult struct { // The FQDN of the DNS AAAA Record. Fqdn string `pulumi:"fqdn"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // List of IPv6 Addresses. Records []string `pulumi:"records"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` // The Azure resource id of the target object from where the dns resource value is taken. TargetResourceId string `pulumi:"targetResourceId"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` ZoneName string `pulumi:"zoneName"` } func GetAAAARecordOutput(ctx *pulumi.Context, args GetAAAARecordOutputArgs, opts ...pulumi.InvokeOption) GetAAAARecordResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetAAAARecordResultOutput, error) { args := v.(GetAAAARecordArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:dns/getAAAARecord:getAAAARecord", args, GetAAAARecordResultOutput{}, options).(GetAAAARecordResultOutput), nil }).(GetAAAARecordResultOutput) } // A collection of arguments for invoking getAAAARecord. type GetAAAARecordOutputArgs struct { // The name of the DNS AAAA Record. Name pulumi.StringInput `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName pulumi.StringInput `pulumi:"zoneName"` } func (GetAAAARecordOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetAAAARecordArgs)(nil)).Elem() } // A collection of values returned by getAAAARecord. type GetAAAARecordResultOutput struct{ *pulumi.OutputState } func (GetAAAARecordResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetAAAARecordResult)(nil)).Elem() } func (o GetAAAARecordResultOutput) ToGetAAAARecordResultOutput() GetAAAARecordResultOutput { return o } func (o GetAAAARecordResultOutput) ToGetAAAARecordResultOutputWithContext(ctx context.Context) GetAAAARecordResultOutput { return o } // The FQDN of the DNS AAAA Record. func (o GetAAAARecordResultOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v GetAAAARecordResult) string { return v.Fqdn }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetAAAARecordResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetAAAARecordResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetAAAARecordResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetAAAARecordResult) string { return v.Name }).(pulumi.StringOutput) } // List of IPv6 Addresses. func (o GetAAAARecordResultOutput) Records() pulumi.StringArrayOutput { return o.ApplyT(func(v GetAAAARecordResult) []string { return v.Records }).(pulumi.StringArrayOutput) } func (o GetAAAARecordResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetAAAARecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o GetAAAARecordResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetAAAARecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Azure resource id of the target object from where the dns resource value is taken. func (o GetAAAARecordResultOutput) TargetResourceId() pulumi.StringOutput { return o.ApplyT(func(v GetAAAARecordResult) string { return v.TargetResourceId }).(pulumi.StringOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o GetAAAARecordResultOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v GetAAAARecordResult) int { return v.Ttl }).(pulumi.IntOutput) } func (o GetAAAARecordResultOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v GetAAAARecordResult) string { return v.ZoneName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetAAAARecordResultOutput{}) }
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/dns/mxRecord.go
sdk/go/azure/dns/mxRecord.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 dns 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/dns" // "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 // } // exampleZone, err := dns.NewZone(ctx, "example", &dns.ZoneArgs{ // Name: pulumi.String("mydomain.com"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = dns.NewMxRecord(ctx, "example", &dns.MxRecordArgs{ // Name: pulumi.String("test"), // ZoneName: exampleZone.Name, // ResourceGroupName: example.Name, // Ttl: pulumi.Int(300), // Records: dns.MxRecordRecordArray{ // &dns.MxRecordRecordArgs{ // Preference: pulumi.String("10"), // Exchange: pulumi.String("mail1.contoso.com"), // }, // &dns.MxRecordRecordArgs{ // Preference: pulumi.String("20"), // Exchange: pulumi.String("mail2.contoso.com"), // }, // }, // Tags: pulumi.StringMap{ // "Environment": pulumi.String("Production"), // }, // }) // 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.Network` - 2018-05-01 // // ## Import // // MX records can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:dns/mxRecord:MxRecord example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/dnsZones/zone1/MX/myrecord1 // ``` type MxRecord struct { pulumi.CustomResourceState // The FQDN of the DNS MX Record. Fqdn pulumi.StringOutput `pulumi:"fqdn"` // The name of the DNS MX Record. Defaults to `@` (root). Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A list of values that make up the MX record. Each `record` block supports fields documented below. Records MxRecordRecordArrayOutput `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntOutput `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringOutput `pulumi:"zoneName"` } // NewMxRecord registers a new resource with the given unique name, arguments, and options. func NewMxRecord(ctx *pulumi.Context, name string, args *MxRecordArgs, opts ...pulumi.ResourceOption) (*MxRecord, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Records == nil { return nil, errors.New("invalid value for required argument 'Records'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Ttl == nil { return nil, errors.New("invalid value for required argument 'Ttl'") } if args.ZoneName == nil { return nil, errors.New("invalid value for required argument 'ZoneName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource MxRecord err := ctx.RegisterResource("azure:dns/mxRecord:MxRecord", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetMxRecord gets an existing MxRecord 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 GetMxRecord(ctx *pulumi.Context, name string, id pulumi.IDInput, state *MxRecordState, opts ...pulumi.ResourceOption) (*MxRecord, error) { var resource MxRecord err := ctx.ReadResource("azure:dns/mxRecord:MxRecord", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering MxRecord resources. type mxRecordState struct { // The FQDN of the DNS MX Record. Fqdn *string `pulumi:"fqdn"` // The name of the DNS MX Record. Defaults to `@` (root). Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of values that make up the MX record. Each `record` block supports fields documented below. Records []MxRecordRecord `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl *int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName *string `pulumi:"zoneName"` } type MxRecordState struct { // The FQDN of the DNS MX Record. Fqdn pulumi.StringPtrInput // The name of the DNS MX Record. Defaults to `@` (root). Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of values that make up the MX record. Each `record` block supports fields documented below. Records MxRecordRecordArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntPtrInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringPtrInput } func (MxRecordState) ElementType() reflect.Type { return reflect.TypeOf((*mxRecordState)(nil)).Elem() } type mxRecordArgs struct { // The name of the DNS MX Record. Defaults to `@` (root). Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of values that make up the MX record. Each `record` block supports fields documented below. Records []MxRecordRecord `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName string `pulumi:"zoneName"` } // The set of arguments for constructing a MxRecord resource. type MxRecordArgs struct { // The name of the DNS MX Record. Defaults to `@` (root). Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of values that make up the MX record. Each `record` block supports fields documented below. Records MxRecordRecordArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringInput } func (MxRecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*mxRecordArgs)(nil)).Elem() } type MxRecordInput interface { pulumi.Input ToMxRecordOutput() MxRecordOutput ToMxRecordOutputWithContext(ctx context.Context) MxRecordOutput } func (*MxRecord) ElementType() reflect.Type { return reflect.TypeOf((**MxRecord)(nil)).Elem() } func (i *MxRecord) ToMxRecordOutput() MxRecordOutput { return i.ToMxRecordOutputWithContext(context.Background()) } func (i *MxRecord) ToMxRecordOutputWithContext(ctx context.Context) MxRecordOutput { return pulumi.ToOutputWithContext(ctx, i).(MxRecordOutput) } // MxRecordArrayInput is an input type that accepts MxRecordArray and MxRecordArrayOutput values. // You can construct a concrete instance of `MxRecordArrayInput` via: // // MxRecordArray{ MxRecordArgs{...} } type MxRecordArrayInput interface { pulumi.Input ToMxRecordArrayOutput() MxRecordArrayOutput ToMxRecordArrayOutputWithContext(context.Context) MxRecordArrayOutput } type MxRecordArray []MxRecordInput func (MxRecordArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*MxRecord)(nil)).Elem() } func (i MxRecordArray) ToMxRecordArrayOutput() MxRecordArrayOutput { return i.ToMxRecordArrayOutputWithContext(context.Background()) } func (i MxRecordArray) ToMxRecordArrayOutputWithContext(ctx context.Context) MxRecordArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(MxRecordArrayOutput) } // MxRecordMapInput is an input type that accepts MxRecordMap and MxRecordMapOutput values. // You can construct a concrete instance of `MxRecordMapInput` via: // // MxRecordMap{ "key": MxRecordArgs{...} } type MxRecordMapInput interface { pulumi.Input ToMxRecordMapOutput() MxRecordMapOutput ToMxRecordMapOutputWithContext(context.Context) MxRecordMapOutput } type MxRecordMap map[string]MxRecordInput func (MxRecordMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*MxRecord)(nil)).Elem() } func (i MxRecordMap) ToMxRecordMapOutput() MxRecordMapOutput { return i.ToMxRecordMapOutputWithContext(context.Background()) } func (i MxRecordMap) ToMxRecordMapOutputWithContext(ctx context.Context) MxRecordMapOutput { return pulumi.ToOutputWithContext(ctx, i).(MxRecordMapOutput) } type MxRecordOutput struct{ *pulumi.OutputState } func (MxRecordOutput) ElementType() reflect.Type { return reflect.TypeOf((**MxRecord)(nil)).Elem() } func (o MxRecordOutput) ToMxRecordOutput() MxRecordOutput { return o } func (o MxRecordOutput) ToMxRecordOutputWithContext(ctx context.Context) MxRecordOutput { return o } // The FQDN of the DNS MX Record. func (o MxRecordOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v *MxRecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) } // The name of the DNS MX Record. Defaults to `@` (root). Changing this forces a new resource to be created. func (o MxRecordOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *MxRecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A list of values that make up the MX record. Each `record` block supports fields documented below. func (o MxRecordOutput) Records() MxRecordRecordArrayOutput { return o.ApplyT(func(v *MxRecord) MxRecordRecordArrayOutput { return v.Records }).(MxRecordRecordArrayOutput) } // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. func (o MxRecordOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *MxRecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o MxRecordOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *MxRecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o MxRecordOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v *MxRecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput) } // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. func (o MxRecordOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v *MxRecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput) } type MxRecordArrayOutput struct{ *pulumi.OutputState } func (MxRecordArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*MxRecord)(nil)).Elem() } func (o MxRecordArrayOutput) ToMxRecordArrayOutput() MxRecordArrayOutput { return o } func (o MxRecordArrayOutput) ToMxRecordArrayOutputWithContext(ctx context.Context) MxRecordArrayOutput { return o } func (o MxRecordArrayOutput) Index(i pulumi.IntInput) MxRecordOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MxRecord { return vs[0].([]*MxRecord)[vs[1].(int)] }).(MxRecordOutput) } type MxRecordMapOutput struct{ *pulumi.OutputState } func (MxRecordMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*MxRecord)(nil)).Elem() } func (o MxRecordMapOutput) ToMxRecordMapOutput() MxRecordMapOutput { return o } func (o MxRecordMapOutput) ToMxRecordMapOutputWithContext(ctx context.Context) MxRecordMapOutput { return o } func (o MxRecordMapOutput) MapIndex(k pulumi.StringInput) MxRecordOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MxRecord { return vs[0].(map[string]*MxRecord)[vs[1].(string)] }).(MxRecordOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*MxRecordInput)(nil)).Elem(), &MxRecord{}) pulumi.RegisterInputType(reflect.TypeOf((*MxRecordArrayInput)(nil)).Elem(), MxRecordArray{}) pulumi.RegisterInputType(reflect.TypeOf((*MxRecordMapInput)(nil)).Elem(), MxRecordMap{}) pulumi.RegisterOutputType(MxRecordOutput{}) pulumi.RegisterOutputType(MxRecordArrayOutput{}) pulumi.RegisterOutputType(MxRecordMapOutput{}) }
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/dns/caaRecord.go
sdk/go/azure/dns/caaRecord.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 dns 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/dns" // "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 // } // exampleZone, err := dns.NewZone(ctx, "example", &dns.ZoneArgs{ // Name: pulumi.String("mydomain.com"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = dns.NewCaaRecord(ctx, "example", &dns.CaaRecordArgs{ // Name: pulumi.String("test"), // ZoneName: exampleZone.Name, // ResourceGroupName: example.Name, // Ttl: pulumi.Int(300), // Records: dns.CaaRecordRecordArray{ // &dns.CaaRecordRecordArgs{ // Flags: pulumi.Int(0), // Tag: pulumi.String("issue"), // Value: pulumi.String("example.com"), // }, // &dns.CaaRecordRecordArgs{ // Flags: pulumi.Int(0), // Tag: pulumi.String("issue"), // Value: pulumi.String("example.net"), // }, // &dns.CaaRecordRecordArgs{ // Flags: pulumi.Int(0), // Tag: pulumi.String("issuewild"), // Value: pulumi.String(";"), // }, // &dns.CaaRecordRecordArgs{ // Flags: pulumi.Int(0), // Tag: pulumi.String("iodef"), // Value: pulumi.String("mailto:user@nonexisting.tld"), // }, // }, // Tags: pulumi.StringMap{ // "Environment": pulumi.String("Production"), // }, // }) // 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.Network` - 2018-05-01 // // ## Import // // CAA records can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:dns/caaRecord:CaaRecord example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/dnsZones/zone1/CAA/myrecord1 // ``` type CaaRecord struct { pulumi.CustomResourceState // The FQDN of the DNS CAA Record. Fqdn pulumi.StringOutput `pulumi:"fqdn"` // The name of the DNS CAA Record. If you are creating the record in the apex of the zone use `"@"` as the name. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A list of values that make up the CAA record. Each `record` block supports fields documented below. Records CaaRecordRecordArrayOutput `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntOutput `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringOutput `pulumi:"zoneName"` } // NewCaaRecord registers a new resource with the given unique name, arguments, and options. func NewCaaRecord(ctx *pulumi.Context, name string, args *CaaRecordArgs, opts ...pulumi.ResourceOption) (*CaaRecord, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Records == nil { return nil, errors.New("invalid value for required argument 'Records'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Ttl == nil { return nil, errors.New("invalid value for required argument 'Ttl'") } if args.ZoneName == nil { return nil, errors.New("invalid value for required argument 'ZoneName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource CaaRecord err := ctx.RegisterResource("azure:dns/caaRecord:CaaRecord", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetCaaRecord gets an existing CaaRecord 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 GetCaaRecord(ctx *pulumi.Context, name string, id pulumi.IDInput, state *CaaRecordState, opts ...pulumi.ResourceOption) (*CaaRecord, error) { var resource CaaRecord err := ctx.ReadResource("azure:dns/caaRecord:CaaRecord", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering CaaRecord resources. type caaRecordState struct { // The FQDN of the DNS CAA Record. Fqdn *string `pulumi:"fqdn"` // The name of the DNS CAA Record. If you are creating the record in the apex of the zone use `"@"` as the name. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of values that make up the CAA record. Each `record` block supports fields documented below. Records []CaaRecordRecord `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl *int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName *string `pulumi:"zoneName"` } type CaaRecordState struct { // The FQDN of the DNS CAA Record. Fqdn pulumi.StringPtrInput // The name of the DNS CAA Record. If you are creating the record in the apex of the zone use `"@"` as the name. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of values that make up the CAA record. Each `record` block supports fields documented below. Records CaaRecordRecordArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntPtrInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringPtrInput } func (CaaRecordState) ElementType() reflect.Type { return reflect.TypeOf((*caaRecordState)(nil)).Elem() } type caaRecordArgs struct { // The name of the DNS CAA Record. If you are creating the record in the apex of the zone use `"@"` as the name. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of values that make up the CAA record. Each `record` block supports fields documented below. Records []CaaRecordRecord `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName string `pulumi:"zoneName"` } // The set of arguments for constructing a CaaRecord resource. type CaaRecordArgs struct { // The name of the DNS CAA Record. If you are creating the record in the apex of the zone use `"@"` as the name. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of values that make up the CAA record. Each `record` block supports fields documented below. Records CaaRecordRecordArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringInput } func (CaaRecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*caaRecordArgs)(nil)).Elem() } type CaaRecordInput interface { pulumi.Input ToCaaRecordOutput() CaaRecordOutput ToCaaRecordOutputWithContext(ctx context.Context) CaaRecordOutput } func (*CaaRecord) ElementType() reflect.Type { return reflect.TypeOf((**CaaRecord)(nil)).Elem() } func (i *CaaRecord) ToCaaRecordOutput() CaaRecordOutput { return i.ToCaaRecordOutputWithContext(context.Background()) } func (i *CaaRecord) ToCaaRecordOutputWithContext(ctx context.Context) CaaRecordOutput { return pulumi.ToOutputWithContext(ctx, i).(CaaRecordOutput) } // CaaRecordArrayInput is an input type that accepts CaaRecordArray and CaaRecordArrayOutput values. // You can construct a concrete instance of `CaaRecordArrayInput` via: // // CaaRecordArray{ CaaRecordArgs{...} } type CaaRecordArrayInput interface { pulumi.Input ToCaaRecordArrayOutput() CaaRecordArrayOutput ToCaaRecordArrayOutputWithContext(context.Context) CaaRecordArrayOutput } type CaaRecordArray []CaaRecordInput func (CaaRecordArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*CaaRecord)(nil)).Elem() } func (i CaaRecordArray) ToCaaRecordArrayOutput() CaaRecordArrayOutput { return i.ToCaaRecordArrayOutputWithContext(context.Background()) } func (i CaaRecordArray) ToCaaRecordArrayOutputWithContext(ctx context.Context) CaaRecordArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(CaaRecordArrayOutput) } // CaaRecordMapInput is an input type that accepts CaaRecordMap and CaaRecordMapOutput values. // You can construct a concrete instance of `CaaRecordMapInput` via: // // CaaRecordMap{ "key": CaaRecordArgs{...} } type CaaRecordMapInput interface { pulumi.Input ToCaaRecordMapOutput() CaaRecordMapOutput ToCaaRecordMapOutputWithContext(context.Context) CaaRecordMapOutput } type CaaRecordMap map[string]CaaRecordInput func (CaaRecordMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CaaRecord)(nil)).Elem() } func (i CaaRecordMap) ToCaaRecordMapOutput() CaaRecordMapOutput { return i.ToCaaRecordMapOutputWithContext(context.Background()) } func (i CaaRecordMap) ToCaaRecordMapOutputWithContext(ctx context.Context) CaaRecordMapOutput { return pulumi.ToOutputWithContext(ctx, i).(CaaRecordMapOutput) } type CaaRecordOutput struct{ *pulumi.OutputState } func (CaaRecordOutput) ElementType() reflect.Type { return reflect.TypeOf((**CaaRecord)(nil)).Elem() } func (o CaaRecordOutput) ToCaaRecordOutput() CaaRecordOutput { return o } func (o CaaRecordOutput) ToCaaRecordOutputWithContext(ctx context.Context) CaaRecordOutput { return o } // The FQDN of the DNS CAA Record. func (o CaaRecordOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v *CaaRecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) } // The name of the DNS CAA Record. If you are creating the record in the apex of the zone use `"@"` as the name. Changing this forces a new resource to be created. func (o CaaRecordOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *CaaRecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A list of values that make up the CAA record. Each `record` block supports fields documented below. func (o CaaRecordOutput) Records() CaaRecordRecordArrayOutput { return o.ApplyT(func(v *CaaRecord) CaaRecordRecordArrayOutput { return v.Records }).(CaaRecordRecordArrayOutput) } // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. func (o CaaRecordOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *CaaRecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o CaaRecordOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *CaaRecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o CaaRecordOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v *CaaRecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput) } // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. func (o CaaRecordOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v *CaaRecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput) } type CaaRecordArrayOutput struct{ *pulumi.OutputState } func (CaaRecordArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*CaaRecord)(nil)).Elem() } func (o CaaRecordArrayOutput) ToCaaRecordArrayOutput() CaaRecordArrayOutput { return o } func (o CaaRecordArrayOutput) ToCaaRecordArrayOutputWithContext(ctx context.Context) CaaRecordArrayOutput { return o } func (o CaaRecordArrayOutput) Index(i pulumi.IntInput) CaaRecordOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CaaRecord { return vs[0].([]*CaaRecord)[vs[1].(int)] }).(CaaRecordOutput) } type CaaRecordMapOutput struct{ *pulumi.OutputState } func (CaaRecordMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*CaaRecord)(nil)).Elem() } func (o CaaRecordMapOutput) ToCaaRecordMapOutput() CaaRecordMapOutput { return o } func (o CaaRecordMapOutput) ToCaaRecordMapOutputWithContext(ctx context.Context) CaaRecordMapOutput { return o } func (o CaaRecordMapOutput) MapIndex(k pulumi.StringInput) CaaRecordOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CaaRecord { return vs[0].(map[string]*CaaRecord)[vs[1].(string)] }).(CaaRecordOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*CaaRecordInput)(nil)).Elem(), &CaaRecord{}) pulumi.RegisterInputType(reflect.TypeOf((*CaaRecordArrayInput)(nil)).Elem(), CaaRecordArray{}) pulumi.RegisterInputType(reflect.TypeOf((*CaaRecordMapInput)(nil)).Elem(), CaaRecordMap{}) pulumi.RegisterOutputType(CaaRecordOutput{}) pulumi.RegisterOutputType(CaaRecordArrayOutput{}) pulumi.RegisterOutputType(CaaRecordMapOutput{}) }
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/dns/getSoaRecord.go
sdk/go/azure/dns/getSoaRecord.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 dns import ( "context" "reflect" "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/dns" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := dns.GetSoaRecord(ctx, &dns.GetSoaRecordArgs{ // ZoneName: "test-zone", // ResourceGroupName: "test-rg", // }, nil) // if err != nil { // return err // } // ctx.Export("dnsSoaRecordId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2018-05-01 func GetSoaRecord(ctx *pulumi.Context, args *GetSoaRecordArgs, opts ...pulumi.InvokeOption) (*GetSoaRecordResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetSoaRecordResult err := ctx.Invoke("azure:dns/getSoaRecord:getSoaRecord", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getSoaRecord. type GetSoaRecordArgs struct { // The name of the DNS SOA Record. Name *string `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName string `pulumi:"zoneName"` } // A collection of values returned by getSoaRecord. type GetSoaRecordResult struct { // The email contact for the SOA record. Email string `pulumi:"email"` // The expire time for the SOA record. ExpireTime int `pulumi:"expireTime"` // The FQDN of the DNS SOA Record. Fqdn string `pulumi:"fqdn"` // The domain name of the authoritative name server for the SOA record. HostName string `pulumi:"hostName"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. MinimumTtl int `pulumi:"minimumTtl"` // The name of the DNS SOA Record. Name *string `pulumi:"name"` // The refresh time for the SOA record. RefreshTime int `pulumi:"refreshTime"` ResourceGroupName string `pulumi:"resourceGroupName"` // The retry time for the SOA record. RetryTime int `pulumi:"retryTime"` // The serial number for the SOA record. SerialNumber int `pulumi:"serialNumber"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` ZoneName string `pulumi:"zoneName"` } func GetSoaRecordOutput(ctx *pulumi.Context, args GetSoaRecordOutputArgs, opts ...pulumi.InvokeOption) GetSoaRecordResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetSoaRecordResultOutput, error) { args := v.(GetSoaRecordArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:dns/getSoaRecord:getSoaRecord", args, GetSoaRecordResultOutput{}, options).(GetSoaRecordResultOutput), nil }).(GetSoaRecordResultOutput) } // A collection of arguments for invoking getSoaRecord. type GetSoaRecordOutputArgs struct { // The name of the DNS SOA Record. Name pulumi.StringPtrInput `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName pulumi.StringInput `pulumi:"zoneName"` } func (GetSoaRecordOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetSoaRecordArgs)(nil)).Elem() } // A collection of values returned by getSoaRecord. type GetSoaRecordResultOutput struct{ *pulumi.OutputState } func (GetSoaRecordResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetSoaRecordResult)(nil)).Elem() } func (o GetSoaRecordResultOutput) ToGetSoaRecordResultOutput() GetSoaRecordResultOutput { return o } func (o GetSoaRecordResultOutput) ToGetSoaRecordResultOutputWithContext(ctx context.Context) GetSoaRecordResultOutput { return o } // The email contact for the SOA record. func (o GetSoaRecordResultOutput) Email() pulumi.StringOutput { return o.ApplyT(func(v GetSoaRecordResult) string { return v.Email }).(pulumi.StringOutput) } // The expire time for the SOA record. func (o GetSoaRecordResultOutput) ExpireTime() pulumi.IntOutput { return o.ApplyT(func(v GetSoaRecordResult) int { return v.ExpireTime }).(pulumi.IntOutput) } // The FQDN of the DNS SOA Record. func (o GetSoaRecordResultOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v GetSoaRecordResult) string { return v.Fqdn }).(pulumi.StringOutput) } // The domain name of the authoritative name server for the SOA record. func (o GetSoaRecordResultOutput) HostName() pulumi.StringOutput { return o.ApplyT(func(v GetSoaRecordResult) string { return v.HostName }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o GetSoaRecordResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetSoaRecordResult) string { return v.Id }).(pulumi.StringOutput) } // The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. func (o GetSoaRecordResultOutput) MinimumTtl() pulumi.IntOutput { return o.ApplyT(func(v GetSoaRecordResult) int { return v.MinimumTtl }).(pulumi.IntOutput) } // The name of the DNS SOA Record. func (o GetSoaRecordResultOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v GetSoaRecordResult) *string { return v.Name }).(pulumi.StringPtrOutput) } // The refresh time for the SOA record. func (o GetSoaRecordResultOutput) RefreshTime() pulumi.IntOutput { return o.ApplyT(func(v GetSoaRecordResult) int { return v.RefreshTime }).(pulumi.IntOutput) } func (o GetSoaRecordResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetSoaRecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The retry time for the SOA record. func (o GetSoaRecordResultOutput) RetryTime() pulumi.IntOutput { return o.ApplyT(func(v GetSoaRecordResult) int { return v.RetryTime }).(pulumi.IntOutput) } // The serial number for the SOA record. func (o GetSoaRecordResultOutput) SerialNumber() pulumi.IntOutput { return o.ApplyT(func(v GetSoaRecordResult) int { return v.SerialNumber }).(pulumi.IntOutput) } // A mapping of tags assigned to the resource. func (o GetSoaRecordResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetSoaRecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o GetSoaRecordResultOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v GetSoaRecordResult) int { return v.Ttl }).(pulumi.IntOutput) } func (o GetSoaRecordResultOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v GetSoaRecordResult) string { return v.ZoneName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetSoaRecordResultOutput{}) }
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/dns/srvRecord.go
sdk/go/azure/dns/srvRecord.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 dns 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/dns" // "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 // } // exampleZone, err := dns.NewZone(ctx, "example", &dns.ZoneArgs{ // Name: pulumi.String("mydomain.com"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = dns.NewSrvRecord(ctx, "example", &dns.SrvRecordArgs{ // Name: pulumi.String("test"), // ZoneName: exampleZone.Name, // ResourceGroupName: example.Name, // Ttl: pulumi.Int(300), // Records: dns.SrvRecordRecordArray{ // &dns.SrvRecordRecordArgs{ // Priority: pulumi.Int(1), // Weight: pulumi.Int(5), // Port: pulumi.Int(8080), // Target: pulumi.String("target1.contoso.com"), // }, // }, // Tags: pulumi.StringMap{ // "Environment": pulumi.String("Production"), // }, // }) // 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.Network` - 2018-05-01 // // ## Import // // SRV records can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:dns/srvRecord:SrvRecord example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/dnsZones/zone1/SRV/myrecord1 // ``` type SrvRecord struct { pulumi.CustomResourceState // The FQDN of the DNS SRV Record. Fqdn pulumi.StringOutput `pulumi:"fqdn"` // The name of the DNS SRV Record. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A list of values that make up the SRV record. Each `record` block supports fields documented below. Records SrvRecordRecordArrayOutput `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntOutput `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringOutput `pulumi:"zoneName"` } // NewSrvRecord registers a new resource with the given unique name, arguments, and options. func NewSrvRecord(ctx *pulumi.Context, name string, args *SrvRecordArgs, opts ...pulumi.ResourceOption) (*SrvRecord, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Records == nil { return nil, errors.New("invalid value for required argument 'Records'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Ttl == nil { return nil, errors.New("invalid value for required argument 'Ttl'") } if args.ZoneName == nil { return nil, errors.New("invalid value for required argument 'ZoneName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SrvRecord err := ctx.RegisterResource("azure:dns/srvRecord:SrvRecord", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSrvRecord gets an existing SrvRecord 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 GetSrvRecord(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SrvRecordState, opts ...pulumi.ResourceOption) (*SrvRecord, error) { var resource SrvRecord err := ctx.ReadResource("azure:dns/srvRecord:SrvRecord", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SrvRecord resources. type srvRecordState struct { // The FQDN of the DNS SRV Record. Fqdn *string `pulumi:"fqdn"` // The name of the DNS SRV Record. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of values that make up the SRV record. Each `record` block supports fields documented below. Records []SrvRecordRecord `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl *int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName *string `pulumi:"zoneName"` } type SrvRecordState struct { // The FQDN of the DNS SRV Record. Fqdn pulumi.StringPtrInput // The name of the DNS SRV Record. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of values that make up the SRV record. Each `record` block supports fields documented below. Records SrvRecordRecordArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntPtrInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringPtrInput } func (SrvRecordState) ElementType() reflect.Type { return reflect.TypeOf((*srvRecordState)(nil)).Elem() } type srvRecordArgs struct { // The name of the DNS SRV Record. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of values that make up the SRV record. Each `record` block supports fields documented below. Records []SrvRecordRecord `pulumi:"records"` // Specifies the resource group where the DNS Zone (parent resource) exists. 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"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName string `pulumi:"zoneName"` } // The set of arguments for constructing a SrvRecord resource. type SrvRecordArgs struct { // The name of the DNS SRV Record. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of values that make up the SRV record. Each `record` block supports fields documented below. Records SrvRecordRecordArrayInput // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The Time To Live (TTL) of the DNS record in seconds. Ttl pulumi.IntInput // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. ZoneName pulumi.StringInput } func (SrvRecordArgs) ElementType() reflect.Type { return reflect.TypeOf((*srvRecordArgs)(nil)).Elem() } type SrvRecordInput interface { pulumi.Input ToSrvRecordOutput() SrvRecordOutput ToSrvRecordOutputWithContext(ctx context.Context) SrvRecordOutput } func (*SrvRecord) ElementType() reflect.Type { return reflect.TypeOf((**SrvRecord)(nil)).Elem() } func (i *SrvRecord) ToSrvRecordOutput() SrvRecordOutput { return i.ToSrvRecordOutputWithContext(context.Background()) } func (i *SrvRecord) ToSrvRecordOutputWithContext(ctx context.Context) SrvRecordOutput { return pulumi.ToOutputWithContext(ctx, i).(SrvRecordOutput) } // SrvRecordArrayInput is an input type that accepts SrvRecordArray and SrvRecordArrayOutput values. // You can construct a concrete instance of `SrvRecordArrayInput` via: // // SrvRecordArray{ SrvRecordArgs{...} } type SrvRecordArrayInput interface { pulumi.Input ToSrvRecordArrayOutput() SrvRecordArrayOutput ToSrvRecordArrayOutputWithContext(context.Context) SrvRecordArrayOutput } type SrvRecordArray []SrvRecordInput func (SrvRecordArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SrvRecord)(nil)).Elem() } func (i SrvRecordArray) ToSrvRecordArrayOutput() SrvRecordArrayOutput { return i.ToSrvRecordArrayOutputWithContext(context.Background()) } func (i SrvRecordArray) ToSrvRecordArrayOutputWithContext(ctx context.Context) SrvRecordArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SrvRecordArrayOutput) } // SrvRecordMapInput is an input type that accepts SrvRecordMap and SrvRecordMapOutput values. // You can construct a concrete instance of `SrvRecordMapInput` via: // // SrvRecordMap{ "key": SrvRecordArgs{...} } type SrvRecordMapInput interface { pulumi.Input ToSrvRecordMapOutput() SrvRecordMapOutput ToSrvRecordMapOutputWithContext(context.Context) SrvRecordMapOutput } type SrvRecordMap map[string]SrvRecordInput func (SrvRecordMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SrvRecord)(nil)).Elem() } func (i SrvRecordMap) ToSrvRecordMapOutput() SrvRecordMapOutput { return i.ToSrvRecordMapOutputWithContext(context.Background()) } func (i SrvRecordMap) ToSrvRecordMapOutputWithContext(ctx context.Context) SrvRecordMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SrvRecordMapOutput) } type SrvRecordOutput struct{ *pulumi.OutputState } func (SrvRecordOutput) ElementType() reflect.Type { return reflect.TypeOf((**SrvRecord)(nil)).Elem() } func (o SrvRecordOutput) ToSrvRecordOutput() SrvRecordOutput { return o } func (o SrvRecordOutput) ToSrvRecordOutputWithContext(ctx context.Context) SrvRecordOutput { return o } // The FQDN of the DNS SRV Record. func (o SrvRecordOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v *SrvRecord) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) } // The name of the DNS SRV Record. Changing this forces a new resource to be created. func (o SrvRecordOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SrvRecord) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A list of values that make up the SRV record. Each `record` block supports fields documented below. func (o SrvRecordOutput) Records() SrvRecordRecordArrayOutput { return o.ApplyT(func(v *SrvRecord) SrvRecordRecordArrayOutput { return v.Records }).(SrvRecordRecordArrayOutput) } // Specifies the resource group where the DNS Zone (parent resource) exists. Changing this forces a new resource to be created. func (o SrvRecordOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *SrvRecord) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o SrvRecordOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *SrvRecord) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o SrvRecordOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v *SrvRecord) pulumi.IntOutput { return v.Ttl }).(pulumi.IntOutput) } // Specifies the DNS Zone where the resource exists. Changing this forces a new resource to be created. func (o SrvRecordOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v *SrvRecord) pulumi.StringOutput { return v.ZoneName }).(pulumi.StringOutput) } type SrvRecordArrayOutput struct{ *pulumi.OutputState } func (SrvRecordArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SrvRecord)(nil)).Elem() } func (o SrvRecordArrayOutput) ToSrvRecordArrayOutput() SrvRecordArrayOutput { return o } func (o SrvRecordArrayOutput) ToSrvRecordArrayOutputWithContext(ctx context.Context) SrvRecordArrayOutput { return o } func (o SrvRecordArrayOutput) Index(i pulumi.IntInput) SrvRecordOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SrvRecord { return vs[0].([]*SrvRecord)[vs[1].(int)] }).(SrvRecordOutput) } type SrvRecordMapOutput struct{ *pulumi.OutputState } func (SrvRecordMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SrvRecord)(nil)).Elem() } func (o SrvRecordMapOutput) ToSrvRecordMapOutput() SrvRecordMapOutput { return o } func (o SrvRecordMapOutput) ToSrvRecordMapOutputWithContext(ctx context.Context) SrvRecordMapOutput { return o } func (o SrvRecordMapOutput) MapIndex(k pulumi.StringInput) SrvRecordOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SrvRecord { return vs[0].(map[string]*SrvRecord)[vs[1].(string)] }).(SrvRecordOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SrvRecordInput)(nil)).Elem(), &SrvRecord{}) pulumi.RegisterInputType(reflect.TypeOf((*SrvRecordArrayInput)(nil)).Elem(), SrvRecordArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SrvRecordMapInput)(nil)).Elem(), SrvRecordMap{}) pulumi.RegisterOutputType(SrvRecordOutput{}) pulumi.RegisterOutputType(SrvRecordArrayOutput{}) pulumi.RegisterOutputType(SrvRecordMapOutput{}) }
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/dns/getZone.go
sdk/go/azure/dns/getZone.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 dns 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 DNS Zone. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dns" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := dns.LookupZone(ctx, &dns.LookupZoneArgs{ // Name: "search-eventhubns", // ResourceGroupName: pulumi.StringRef("search-service"), // }, nil) // if err != nil { // return err // } // ctx.Export("dnsZoneId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2018-05-01 func LookupZone(ctx *pulumi.Context, args *LookupZoneArgs, opts ...pulumi.InvokeOption) (*LookupZoneResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupZoneResult err := ctx.Invoke("azure:dns/getZone:getZone", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getZone. type LookupZoneArgs struct { // The name of the DNS Zone. Name string `pulumi:"name"` // The Name of the Resource Group where the DNS Zone exists. // If the Name of the Resource Group is not provided, the first DNS Zone from the list of DNS Zones // in your subscription that matches `name` will be returned. ResourceGroupName *string `pulumi:"resourceGroupName"` } // A collection of values returned by getZone. type LookupZoneResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // Maximum number of Records in the zone. MaxNumberOfRecordSets int `pulumi:"maxNumberOfRecordSets"` Name string `pulumi:"name"` // A list of values that make up the NS record for the zone. NameServers []string `pulumi:"nameServers"` // The number of records already in the zone. NumberOfRecordSets int `pulumi:"numberOfRecordSets"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the DNS Zone. Tags map[string]string `pulumi:"tags"` } func LookupZoneOutput(ctx *pulumi.Context, args LookupZoneOutputArgs, opts ...pulumi.InvokeOption) LookupZoneResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupZoneResultOutput, error) { args := v.(LookupZoneArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:dns/getZone:getZone", args, LookupZoneResultOutput{}, options).(LookupZoneResultOutput), nil }).(LookupZoneResultOutput) } // A collection of arguments for invoking getZone. type LookupZoneOutputArgs struct { // The name of the DNS Zone. Name pulumi.StringInput `pulumi:"name"` // The Name of the Resource Group where the DNS Zone exists. // If the Name of the Resource Group is not provided, the first DNS Zone from the list of DNS Zones // in your subscription that matches `name` will be returned. ResourceGroupName pulumi.StringPtrInput `pulumi:"resourceGroupName"` } func (LookupZoneOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupZoneArgs)(nil)).Elem() } // A collection of values returned by getZone. type LookupZoneResultOutput struct{ *pulumi.OutputState } func (LookupZoneResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupZoneResult)(nil)).Elem() } func (o LookupZoneResultOutput) ToLookupZoneResultOutput() LookupZoneResultOutput { return o } func (o LookupZoneResultOutput) ToLookupZoneResultOutputWithContext(ctx context.Context) LookupZoneResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupZoneResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupZoneResult) string { return v.Id }).(pulumi.StringOutput) } // Maximum number of Records in the zone. func (o LookupZoneResultOutput) MaxNumberOfRecordSets() pulumi.IntOutput { return o.ApplyT(func(v LookupZoneResult) int { return v.MaxNumberOfRecordSets }).(pulumi.IntOutput) } func (o LookupZoneResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupZoneResult) string { return v.Name }).(pulumi.StringOutput) } // A list of values that make up the NS record for the zone. func (o LookupZoneResultOutput) NameServers() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupZoneResult) []string { return v.NameServers }).(pulumi.StringArrayOutput) } // The number of records already in the zone. func (o LookupZoneResultOutput) NumberOfRecordSets() pulumi.IntOutput { return o.ApplyT(func(v LookupZoneResult) int { return v.NumberOfRecordSets }).(pulumi.IntOutput) } func (o LookupZoneResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupZoneResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the DNS Zone. func (o LookupZoneResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupZoneResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupZoneResultOutput{}) }
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/dns/getPtrRecord.go
sdk/go/azure/dns/getPtrRecord.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 dns import ( "context" "reflect" "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/dns" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := dns.LookupPtrRecord(ctx, &dns.LookupPtrRecordArgs{ // Name: "test", // ZoneName: "test-zone", // ResourceGroupName: "test-rg", // }, nil) // if err != nil { // return err // } // ctx.Export("dnsPtrRecordId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2018-05-01 func LookupPtrRecord(ctx *pulumi.Context, args *LookupPtrRecordArgs, opts ...pulumi.InvokeOption) (*LookupPtrRecordResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupPtrRecordResult err := ctx.Invoke("azure:dns/getPtrRecord:getPtrRecord", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getPtrRecord. type LookupPtrRecordArgs struct { // The name of the DNS PTR Record. Name string `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName string `pulumi:"zoneName"` } // A collection of values returned by getPtrRecord. type LookupPtrRecordResult struct { // The FQDN of the DNS PTR Record. Fqdn string `pulumi:"fqdn"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // List of Fully Qualified Domain Names. Records []string `pulumi:"records"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` ZoneName string `pulumi:"zoneName"` } func LookupPtrRecordOutput(ctx *pulumi.Context, args LookupPtrRecordOutputArgs, opts ...pulumi.InvokeOption) LookupPtrRecordResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupPtrRecordResultOutput, error) { args := v.(LookupPtrRecordArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:dns/getPtrRecord:getPtrRecord", args, LookupPtrRecordResultOutput{}, options).(LookupPtrRecordResultOutput), nil }).(LookupPtrRecordResultOutput) } // A collection of arguments for invoking getPtrRecord. type LookupPtrRecordOutputArgs struct { // The name of the DNS PTR Record. Name pulumi.StringInput `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName pulumi.StringInput `pulumi:"zoneName"` } func (LookupPtrRecordOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupPtrRecordArgs)(nil)).Elem() } // A collection of values returned by getPtrRecord. type LookupPtrRecordResultOutput struct{ *pulumi.OutputState } func (LookupPtrRecordResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupPtrRecordResult)(nil)).Elem() } func (o LookupPtrRecordResultOutput) ToLookupPtrRecordResultOutput() LookupPtrRecordResultOutput { return o } func (o LookupPtrRecordResultOutput) ToLookupPtrRecordResultOutputWithContext(ctx context.Context) LookupPtrRecordResultOutput { return o } // The FQDN of the DNS PTR Record. func (o LookupPtrRecordResultOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v LookupPtrRecordResult) string { return v.Fqdn }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupPtrRecordResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupPtrRecordResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupPtrRecordResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupPtrRecordResult) string { return v.Name }).(pulumi.StringOutput) } // List of Fully Qualified Domain Names. func (o LookupPtrRecordResultOutput) Records() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupPtrRecordResult) []string { return v.Records }).(pulumi.StringArrayOutput) } func (o LookupPtrRecordResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupPtrRecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o LookupPtrRecordResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupPtrRecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o LookupPtrRecordResultOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v LookupPtrRecordResult) int { return v.Ttl }).(pulumi.IntOutput) } func (o LookupPtrRecordResultOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v LookupPtrRecordResult) string { return v.ZoneName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupPtrRecordResultOutput{}) }
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/dns/getTxtRecord.go
sdk/go/azure/dns/getTxtRecord.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 dns import ( "context" "reflect" "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/dns" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := dns.LookupTxtRecord(ctx, &dns.LookupTxtRecordArgs{ // Name: "test", // ZoneName: "test-zone", // ResourceGroupName: "test-rg", // }, nil) // if err != nil { // return err // } // ctx.Export("dnsTxtRecordId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2018-05-01 func LookupTxtRecord(ctx *pulumi.Context, args *LookupTxtRecordArgs, opts ...pulumi.InvokeOption) (*LookupTxtRecordResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupTxtRecordResult err := ctx.Invoke("azure:dns/getTxtRecord:getTxtRecord", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getTxtRecord. type LookupTxtRecordArgs struct { // The name of the DNS TXT Record. Name string `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName string `pulumi:"zoneName"` } // A collection of values returned by getTxtRecord. type LookupTxtRecordResult struct { // The FQDN of the DNS TXT Record. Fqdn string `pulumi:"fqdn"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // A list of values that make up the txt record. Each `record` block supports fields documented below. Records []GetTxtRecordRecord `pulumi:"records"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` // The Time To Live (TTL) of the DNS record in seconds. Ttl int `pulumi:"ttl"` ZoneName string `pulumi:"zoneName"` } func LookupTxtRecordOutput(ctx *pulumi.Context, args LookupTxtRecordOutputArgs, opts ...pulumi.InvokeOption) LookupTxtRecordResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupTxtRecordResultOutput, error) { args := v.(LookupTxtRecordArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:dns/getTxtRecord:getTxtRecord", args, LookupTxtRecordResultOutput{}, options).(LookupTxtRecordResultOutput), nil }).(LookupTxtRecordResultOutput) } // A collection of arguments for invoking getTxtRecord. type LookupTxtRecordOutputArgs struct { // The name of the DNS TXT Record. Name pulumi.StringInput `pulumi:"name"` // Specifies the resource group where the DNS Zone (parent resource) exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` // Specifies the DNS Zone where the resource exists. ZoneName pulumi.StringInput `pulumi:"zoneName"` } func (LookupTxtRecordOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupTxtRecordArgs)(nil)).Elem() } // A collection of values returned by getTxtRecord. type LookupTxtRecordResultOutput struct{ *pulumi.OutputState } func (LookupTxtRecordResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupTxtRecordResult)(nil)).Elem() } func (o LookupTxtRecordResultOutput) ToLookupTxtRecordResultOutput() LookupTxtRecordResultOutput { return o } func (o LookupTxtRecordResultOutput) ToLookupTxtRecordResultOutputWithContext(ctx context.Context) LookupTxtRecordResultOutput { return o } // The FQDN of the DNS TXT Record. func (o LookupTxtRecordResultOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v LookupTxtRecordResult) string { return v.Fqdn }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupTxtRecordResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupTxtRecordResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupTxtRecordResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupTxtRecordResult) string { return v.Name }).(pulumi.StringOutput) } // A list of values that make up the txt record. Each `record` block supports fields documented below. func (o LookupTxtRecordResultOutput) Records() GetTxtRecordRecordArrayOutput { return o.ApplyT(func(v LookupTxtRecordResult) []GetTxtRecordRecord { return v.Records }).(GetTxtRecordRecordArrayOutput) } func (o LookupTxtRecordResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupTxtRecordResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o LookupTxtRecordResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupTxtRecordResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The Time To Live (TTL) of the DNS record in seconds. func (o LookupTxtRecordResultOutput) Ttl() pulumi.IntOutput { return o.ApplyT(func(v LookupTxtRecordResult) int { return v.Ttl }).(pulumi.IntOutput) } func (o LookupTxtRecordResultOutput) ZoneName() pulumi.StringOutput { return o.ApplyT(func(v LookupTxtRecordResult) string { return v.ZoneName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupTxtRecordResultOutput{}) }
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/internal/pulumiUtilities.go
sdk/go/azure/internal/pulumiUtilities.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 internal import ( "fmt" "os" "reflect" "regexp" "strconv" "strings" "github.com/blang/semver" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi/internals" ) type envParser func(v string) interface{} func ParseEnvBool(v string) interface{} { b, err := strconv.ParseBool(v) if err != nil { return nil } return b } func ParseEnvInt(v string) interface{} { i, err := strconv.ParseInt(v, 0, 0) if err != nil { return nil } return int(i) } func ParseEnvFloat(v string) interface{} { f, err := strconv.ParseFloat(v, 64) if err != nil { return nil } return f } func ParseEnvStringArray(v string) interface{} { var result pulumi.StringArray for _, item := range strings.Split(v, ";") { result = append(result, pulumi.String(item)) } return result } func GetEnvOrDefault(def interface{}, parser envParser, vars ...string) interface{} { for _, v := range vars { if value, ok := os.LookupEnv(v); ok { if parser != nil { return parser(value) } return value } } return def } // PkgVersion uses reflection to determine the version of the current package. // If a version cannot be determined, v1 will be assumed. The second return // value is always nil. func PkgVersion() (semver.Version, error) { // emptyVersion defaults to v0.0.0 if !SdkVersion.Equals(semver.Version{}) { return SdkVersion, nil } type sentinal struct{} pkgPath := reflect.TypeOf(sentinal{}).PkgPath() re := regexp.MustCompile("^.*/pulumi-azure/sdk(/v\\d+)?") if match := re.FindStringSubmatch(pkgPath); match != nil { vStr := match[1] if len(vStr) == 0 { // If the version capture group was empty, default to v1. return semver.Version{Major: 1}, nil } return semver.MustParse(fmt.Sprintf("%s.0.0", vStr[2:])), nil } return semver.Version{Major: 1}, nil } // isZero is a null safe check for if a value is it's types zero value. func IsZero(v interface{}) bool { if v == nil { return true } return reflect.ValueOf(v).IsZero() } func CallPlain( ctx *pulumi.Context, tok string, args pulumi.Input, output pulumi.Output, self pulumi.Resource, property string, resultPtr reflect.Value, errorPtr *error, opts ...pulumi.InvokeOption, ) { res, err := callPlainInner(ctx, tok, args, output, self, opts...) if err != nil { *errorPtr = err return } v := reflect.ValueOf(res) // extract res.property field if asked to do so if property != "" { v = v.FieldByName("Res") } // return by setting the result pointer; this style of returns shortens the generated code without generics resultPtr.Elem().Set(v) } func callPlainInner( ctx *pulumi.Context, tok string, args pulumi.Input, output pulumi.Output, self pulumi.Resource, opts ...pulumi.InvokeOption, ) (any, error) { o, err := ctx.Call(tok, args, output, self, opts...) if err != nil { return nil, err } outputData, err := internals.UnsafeAwaitOutput(ctx.Context(), o) if err != nil { return nil, err } // Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency. known := outputData.Known value := outputData.Value secret := outputData.Secret problem := "" if !known { problem = "an unknown value" } else if secret { problem = "a secret value" } if problem != "" { return nil, fmt.Errorf("Plain resource method %q incorrectly returned %s. "+ "This is an error in the provider, please report this to the provider developer.", tok, problem) } return value, nil } // PkgResourceDefaultOpts provides package level defaults to pulumi.OptionResource. func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { defaults := []pulumi.ResourceOption{} version := semver.MustParse("6.0.0-alpha.0+dev") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } return append(defaults, opts...) } // PkgInvokeDefaultOpts provides package level defaults to pulumi.OptionInvoke. func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption { defaults := []pulumi.InvokeOption{} version := semver.MustParse("6.0.0-alpha.0+dev") if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) } return append(defaults, opts...) }
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/internal/pulumiVersion.go
sdk/go/azure/internal/pulumiVersion.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 internal import ( "github.com/blang/semver" ) var SdkVersion semver.Version = semver.Version{} var pluginDownloadURL string = ""
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/aifoundry/init.go
sdk/go/azure/aifoundry/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 aifoundry 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:aifoundry/hub:Hub": r = &Hub{} case "azure:aifoundry/project:Project": r = &Project{} 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", "aifoundry/hub", &module{version}, ) pulumi.RegisterResourceModule( "azure", "aifoundry/project", &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/aifoundry/pulumiTypes.go
sdk/go/azure/aifoundry/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 aifoundry 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 HubEncryption struct { // The Key Vault URI to access the encryption key. KeyId string `pulumi:"keyId"` // The Key Vault ID where the customer owned encryption key exists. KeyVaultId string `pulumi:"keyVaultId"` // The user assigned identity ID that has access to the encryption key. // // > **Note:** `userAssignedIdentityId` must be set when`identity.type` is `UserAssigned` in order for the service to find the assigned permissions. UserAssignedIdentityId *string `pulumi:"userAssignedIdentityId"` } // HubEncryptionInput is an input type that accepts HubEncryptionArgs and HubEncryptionOutput values. // You can construct a concrete instance of `HubEncryptionInput` via: // // HubEncryptionArgs{...} type HubEncryptionInput interface { pulumi.Input ToHubEncryptionOutput() HubEncryptionOutput ToHubEncryptionOutputWithContext(context.Context) HubEncryptionOutput } type HubEncryptionArgs struct { // The Key Vault URI to access the encryption key. KeyId pulumi.StringInput `pulumi:"keyId"` // The Key Vault ID where the customer owned encryption key exists. KeyVaultId pulumi.StringInput `pulumi:"keyVaultId"` // The user assigned identity ID that has access to the encryption key. // // > **Note:** `userAssignedIdentityId` must be set when`identity.type` is `UserAssigned` in order for the service to find the assigned permissions. UserAssignedIdentityId pulumi.StringPtrInput `pulumi:"userAssignedIdentityId"` } func (HubEncryptionArgs) ElementType() reflect.Type { return reflect.TypeOf((*HubEncryption)(nil)).Elem() } func (i HubEncryptionArgs) ToHubEncryptionOutput() HubEncryptionOutput { return i.ToHubEncryptionOutputWithContext(context.Background()) } func (i HubEncryptionArgs) ToHubEncryptionOutputWithContext(ctx context.Context) HubEncryptionOutput { return pulumi.ToOutputWithContext(ctx, i).(HubEncryptionOutput) } func (i HubEncryptionArgs) ToHubEncryptionPtrOutput() HubEncryptionPtrOutput { return i.ToHubEncryptionPtrOutputWithContext(context.Background()) } func (i HubEncryptionArgs) ToHubEncryptionPtrOutputWithContext(ctx context.Context) HubEncryptionPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(HubEncryptionOutput).ToHubEncryptionPtrOutputWithContext(ctx) } // HubEncryptionPtrInput is an input type that accepts HubEncryptionArgs, HubEncryptionPtr and HubEncryptionPtrOutput values. // You can construct a concrete instance of `HubEncryptionPtrInput` via: // // HubEncryptionArgs{...} // // or: // // nil type HubEncryptionPtrInput interface { pulumi.Input ToHubEncryptionPtrOutput() HubEncryptionPtrOutput ToHubEncryptionPtrOutputWithContext(context.Context) HubEncryptionPtrOutput } type hubEncryptionPtrType HubEncryptionArgs func HubEncryptionPtr(v *HubEncryptionArgs) HubEncryptionPtrInput { return (*hubEncryptionPtrType)(v) } func (*hubEncryptionPtrType) ElementType() reflect.Type { return reflect.TypeOf((**HubEncryption)(nil)).Elem() } func (i *hubEncryptionPtrType) ToHubEncryptionPtrOutput() HubEncryptionPtrOutput { return i.ToHubEncryptionPtrOutputWithContext(context.Background()) } func (i *hubEncryptionPtrType) ToHubEncryptionPtrOutputWithContext(ctx context.Context) HubEncryptionPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(HubEncryptionPtrOutput) } type HubEncryptionOutput struct{ *pulumi.OutputState } func (HubEncryptionOutput) ElementType() reflect.Type { return reflect.TypeOf((*HubEncryption)(nil)).Elem() } func (o HubEncryptionOutput) ToHubEncryptionOutput() HubEncryptionOutput { return o } func (o HubEncryptionOutput) ToHubEncryptionOutputWithContext(ctx context.Context) HubEncryptionOutput { return o } func (o HubEncryptionOutput) ToHubEncryptionPtrOutput() HubEncryptionPtrOutput { return o.ToHubEncryptionPtrOutputWithContext(context.Background()) } func (o HubEncryptionOutput) ToHubEncryptionPtrOutputWithContext(ctx context.Context) HubEncryptionPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v HubEncryption) *HubEncryption { return &v }).(HubEncryptionPtrOutput) } // The Key Vault URI to access the encryption key. func (o HubEncryptionOutput) KeyId() pulumi.StringOutput { return o.ApplyT(func(v HubEncryption) string { return v.KeyId }).(pulumi.StringOutput) } // The Key Vault ID where the customer owned encryption key exists. func (o HubEncryptionOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v HubEncryption) string { return v.KeyVaultId }).(pulumi.StringOutput) } // The user assigned identity ID that has access to the encryption key. // // > **Note:** `userAssignedIdentityId` must be set when`identity.type` is `UserAssigned` in order for the service to find the assigned permissions. func (o HubEncryptionOutput) UserAssignedIdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v HubEncryption) *string { return v.UserAssignedIdentityId }).(pulumi.StringPtrOutput) } type HubEncryptionPtrOutput struct{ *pulumi.OutputState } func (HubEncryptionPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**HubEncryption)(nil)).Elem() } func (o HubEncryptionPtrOutput) ToHubEncryptionPtrOutput() HubEncryptionPtrOutput { return o } func (o HubEncryptionPtrOutput) ToHubEncryptionPtrOutputWithContext(ctx context.Context) HubEncryptionPtrOutput { return o } func (o HubEncryptionPtrOutput) Elem() HubEncryptionOutput { return o.ApplyT(func(v *HubEncryption) HubEncryption { if v != nil { return *v } var ret HubEncryption return ret }).(HubEncryptionOutput) } // The Key Vault URI to access the encryption key. func (o HubEncryptionPtrOutput) KeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubEncryption) *string { if v == nil { return nil } return &v.KeyId }).(pulumi.StringPtrOutput) } // The Key Vault ID where the customer owned encryption key exists. func (o HubEncryptionPtrOutput) KeyVaultId() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubEncryption) *string { if v == nil { return nil } return &v.KeyVaultId }).(pulumi.StringPtrOutput) } // The user assigned identity ID that has access to the encryption key. // // > **Note:** `userAssignedIdentityId` must be set when`identity.type` is `UserAssigned` in order for the service to find the assigned permissions. func (o HubEncryptionPtrOutput) UserAssignedIdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubEncryption) *string { if v == nil { return nil } return v.UserAssignedIdentityId }).(pulumi.StringPtrOutput) } type HubIdentity struct { // Specifies a list of User Assigned Managed Identity IDs to be assigned to this AI Foundry Hub. // // > **Note:** This 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 AI Foundry Hub. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). Type string `pulumi:"type"` } // HubIdentityInput is an input type that accepts HubIdentityArgs and HubIdentityOutput values. // You can construct a concrete instance of `HubIdentityInput` via: // // HubIdentityArgs{...} type HubIdentityInput interface { pulumi.Input ToHubIdentityOutput() HubIdentityOutput ToHubIdentityOutputWithContext(context.Context) HubIdentityOutput } type HubIdentityArgs struct { // Specifies a list of User Assigned Managed Identity IDs to be assigned to this AI Foundry Hub. // // > **Note:** This 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 AI Foundry Hub. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). Type pulumi.StringInput `pulumi:"type"` } func (HubIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*HubIdentity)(nil)).Elem() } func (i HubIdentityArgs) ToHubIdentityOutput() HubIdentityOutput { return i.ToHubIdentityOutputWithContext(context.Background()) } func (i HubIdentityArgs) ToHubIdentityOutputWithContext(ctx context.Context) HubIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(HubIdentityOutput) } func (i HubIdentityArgs) ToHubIdentityPtrOutput() HubIdentityPtrOutput { return i.ToHubIdentityPtrOutputWithContext(context.Background()) } func (i HubIdentityArgs) ToHubIdentityPtrOutputWithContext(ctx context.Context) HubIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(HubIdentityOutput).ToHubIdentityPtrOutputWithContext(ctx) } // HubIdentityPtrInput is an input type that accepts HubIdentityArgs, HubIdentityPtr and HubIdentityPtrOutput values. // You can construct a concrete instance of `HubIdentityPtrInput` via: // // HubIdentityArgs{...} // // or: // // nil type HubIdentityPtrInput interface { pulumi.Input ToHubIdentityPtrOutput() HubIdentityPtrOutput ToHubIdentityPtrOutputWithContext(context.Context) HubIdentityPtrOutput } type hubIdentityPtrType HubIdentityArgs func HubIdentityPtr(v *HubIdentityArgs) HubIdentityPtrInput { return (*hubIdentityPtrType)(v) } func (*hubIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**HubIdentity)(nil)).Elem() } func (i *hubIdentityPtrType) ToHubIdentityPtrOutput() HubIdentityPtrOutput { return i.ToHubIdentityPtrOutputWithContext(context.Background()) } func (i *hubIdentityPtrType) ToHubIdentityPtrOutputWithContext(ctx context.Context) HubIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(HubIdentityPtrOutput) } type HubIdentityOutput struct{ *pulumi.OutputState } func (HubIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*HubIdentity)(nil)).Elem() } func (o HubIdentityOutput) ToHubIdentityOutput() HubIdentityOutput { return o } func (o HubIdentityOutput) ToHubIdentityOutputWithContext(ctx context.Context) HubIdentityOutput { return o } func (o HubIdentityOutput) ToHubIdentityPtrOutput() HubIdentityPtrOutput { return o.ToHubIdentityPtrOutputWithContext(context.Background()) } func (o HubIdentityOutput) ToHubIdentityPtrOutputWithContext(ctx context.Context) HubIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v HubIdentity) *HubIdentity { return &v }).(HubIdentityPtrOutput) } // Specifies a list of User Assigned Managed Identity IDs to be assigned to this AI Foundry Hub. // // > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. func (o HubIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v HubIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with this Managed Service Identity. func (o HubIdentityOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v HubIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. func (o HubIdentityOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v HubIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity that should be configured on this AI Foundry Hub. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). func (o HubIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v HubIdentity) string { return v.Type }).(pulumi.StringOutput) } type HubIdentityPtrOutput struct{ *pulumi.OutputState } func (HubIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**HubIdentity)(nil)).Elem() } func (o HubIdentityPtrOutput) ToHubIdentityPtrOutput() HubIdentityPtrOutput { return o } func (o HubIdentityPtrOutput) ToHubIdentityPtrOutputWithContext(ctx context.Context) HubIdentityPtrOutput { return o } func (o HubIdentityPtrOutput) Elem() HubIdentityOutput { return o.ApplyT(func(v *HubIdentity) HubIdentity { if v != nil { return *v } var ret HubIdentity return ret }).(HubIdentityOutput) } // Specifies a list of User Assigned Managed Identity IDs to be assigned to this AI Foundry Hub. // // > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. func (o HubIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *HubIdentity) []string { if v == nil { return nil } return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with this Managed Service Identity. func (o HubIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubIdentity) *string { if v == nil { return nil } return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. func (o HubIdentityPtrOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubIdentity) *string { if v == nil { return nil } return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity that should be configured on this AI Foundry Hub. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). func (o HubIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type HubManagedNetwork struct { // The isolation mode of the AI Foundry Hub. Possible values are `Disabled`, `AllowOnlyApprovedOutbound`, and `AllowInternetOutbound`. IsolationMode *string `pulumi:"isolationMode"` } // HubManagedNetworkInput is an input type that accepts HubManagedNetworkArgs and HubManagedNetworkOutput values. // You can construct a concrete instance of `HubManagedNetworkInput` via: // // HubManagedNetworkArgs{...} type HubManagedNetworkInput interface { pulumi.Input ToHubManagedNetworkOutput() HubManagedNetworkOutput ToHubManagedNetworkOutputWithContext(context.Context) HubManagedNetworkOutput } type HubManagedNetworkArgs struct { // The isolation mode of the AI Foundry Hub. Possible values are `Disabled`, `AllowOnlyApprovedOutbound`, and `AllowInternetOutbound`. IsolationMode pulumi.StringPtrInput `pulumi:"isolationMode"` } func (HubManagedNetworkArgs) ElementType() reflect.Type { return reflect.TypeOf((*HubManagedNetwork)(nil)).Elem() } func (i HubManagedNetworkArgs) ToHubManagedNetworkOutput() HubManagedNetworkOutput { return i.ToHubManagedNetworkOutputWithContext(context.Background()) } func (i HubManagedNetworkArgs) ToHubManagedNetworkOutputWithContext(ctx context.Context) HubManagedNetworkOutput { return pulumi.ToOutputWithContext(ctx, i).(HubManagedNetworkOutput) } func (i HubManagedNetworkArgs) ToHubManagedNetworkPtrOutput() HubManagedNetworkPtrOutput { return i.ToHubManagedNetworkPtrOutputWithContext(context.Background()) } func (i HubManagedNetworkArgs) ToHubManagedNetworkPtrOutputWithContext(ctx context.Context) HubManagedNetworkPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(HubManagedNetworkOutput).ToHubManagedNetworkPtrOutputWithContext(ctx) } // HubManagedNetworkPtrInput is an input type that accepts HubManagedNetworkArgs, HubManagedNetworkPtr and HubManagedNetworkPtrOutput values. // You can construct a concrete instance of `HubManagedNetworkPtrInput` via: // // HubManagedNetworkArgs{...} // // or: // // nil type HubManagedNetworkPtrInput interface { pulumi.Input ToHubManagedNetworkPtrOutput() HubManagedNetworkPtrOutput ToHubManagedNetworkPtrOutputWithContext(context.Context) HubManagedNetworkPtrOutput } type hubManagedNetworkPtrType HubManagedNetworkArgs func HubManagedNetworkPtr(v *HubManagedNetworkArgs) HubManagedNetworkPtrInput { return (*hubManagedNetworkPtrType)(v) } func (*hubManagedNetworkPtrType) ElementType() reflect.Type { return reflect.TypeOf((**HubManagedNetwork)(nil)).Elem() } func (i *hubManagedNetworkPtrType) ToHubManagedNetworkPtrOutput() HubManagedNetworkPtrOutput { return i.ToHubManagedNetworkPtrOutputWithContext(context.Background()) } func (i *hubManagedNetworkPtrType) ToHubManagedNetworkPtrOutputWithContext(ctx context.Context) HubManagedNetworkPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(HubManagedNetworkPtrOutput) } type HubManagedNetworkOutput struct{ *pulumi.OutputState } func (HubManagedNetworkOutput) ElementType() reflect.Type { return reflect.TypeOf((*HubManagedNetwork)(nil)).Elem() } func (o HubManagedNetworkOutput) ToHubManagedNetworkOutput() HubManagedNetworkOutput { return o } func (o HubManagedNetworkOutput) ToHubManagedNetworkOutputWithContext(ctx context.Context) HubManagedNetworkOutput { return o } func (o HubManagedNetworkOutput) ToHubManagedNetworkPtrOutput() HubManagedNetworkPtrOutput { return o.ToHubManagedNetworkPtrOutputWithContext(context.Background()) } func (o HubManagedNetworkOutput) ToHubManagedNetworkPtrOutputWithContext(ctx context.Context) HubManagedNetworkPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v HubManagedNetwork) *HubManagedNetwork { return &v }).(HubManagedNetworkPtrOutput) } // The isolation mode of the AI Foundry Hub. Possible values are `Disabled`, `AllowOnlyApprovedOutbound`, and `AllowInternetOutbound`. func (o HubManagedNetworkOutput) IsolationMode() pulumi.StringPtrOutput { return o.ApplyT(func(v HubManagedNetwork) *string { return v.IsolationMode }).(pulumi.StringPtrOutput) } type HubManagedNetworkPtrOutput struct{ *pulumi.OutputState } func (HubManagedNetworkPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**HubManagedNetwork)(nil)).Elem() } func (o HubManagedNetworkPtrOutput) ToHubManagedNetworkPtrOutput() HubManagedNetworkPtrOutput { return o } func (o HubManagedNetworkPtrOutput) ToHubManagedNetworkPtrOutputWithContext(ctx context.Context) HubManagedNetworkPtrOutput { return o } func (o HubManagedNetworkPtrOutput) Elem() HubManagedNetworkOutput { return o.ApplyT(func(v *HubManagedNetwork) HubManagedNetwork { if v != nil { return *v } var ret HubManagedNetwork return ret }).(HubManagedNetworkOutput) } // The isolation mode of the AI Foundry Hub. Possible values are `Disabled`, `AllowOnlyApprovedOutbound`, and `AllowInternetOutbound`. func (o HubManagedNetworkPtrOutput) IsolationMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *HubManagedNetwork) *string { if v == nil { return nil } return v.IsolationMode }).(pulumi.StringPtrOutput) } type ProjectIdentity struct { // Specifies a list of User Assigned Managed Identity IDs to be assigned to this AI Foundry Project. // // > **Note:** This 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 AI Foundry Project. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). Type string `pulumi:"type"` } // ProjectIdentityInput is an input type that accepts ProjectIdentityArgs and ProjectIdentityOutput values. // You can construct a concrete instance of `ProjectIdentityInput` via: // // ProjectIdentityArgs{...} type ProjectIdentityInput interface { pulumi.Input ToProjectIdentityOutput() ProjectIdentityOutput ToProjectIdentityOutputWithContext(context.Context) ProjectIdentityOutput } type ProjectIdentityArgs struct { // Specifies a list of User Assigned Managed Identity IDs to be assigned to this AI Foundry Project. // // > **Note:** This 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 AI Foundry Project. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). Type pulumi.StringInput `pulumi:"type"` } func (ProjectIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*ProjectIdentity)(nil)).Elem() } func (i ProjectIdentityArgs) ToProjectIdentityOutput() ProjectIdentityOutput { return i.ToProjectIdentityOutputWithContext(context.Background()) } func (i ProjectIdentityArgs) ToProjectIdentityOutputWithContext(ctx context.Context) ProjectIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(ProjectIdentityOutput) } func (i ProjectIdentityArgs) ToProjectIdentityPtrOutput() ProjectIdentityPtrOutput { return i.ToProjectIdentityPtrOutputWithContext(context.Background()) } func (i ProjectIdentityArgs) ToProjectIdentityPtrOutputWithContext(ctx context.Context) ProjectIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ProjectIdentityOutput).ToProjectIdentityPtrOutputWithContext(ctx) } // ProjectIdentityPtrInput is an input type that accepts ProjectIdentityArgs, ProjectIdentityPtr and ProjectIdentityPtrOutput values. // You can construct a concrete instance of `ProjectIdentityPtrInput` via: // // ProjectIdentityArgs{...} // // or: // // nil type ProjectIdentityPtrInput interface { pulumi.Input ToProjectIdentityPtrOutput() ProjectIdentityPtrOutput ToProjectIdentityPtrOutputWithContext(context.Context) ProjectIdentityPtrOutput } type projectIdentityPtrType ProjectIdentityArgs func ProjectIdentityPtr(v *ProjectIdentityArgs) ProjectIdentityPtrInput { return (*projectIdentityPtrType)(v) } func (*projectIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ProjectIdentity)(nil)).Elem() } func (i *projectIdentityPtrType) ToProjectIdentityPtrOutput() ProjectIdentityPtrOutput { return i.ToProjectIdentityPtrOutputWithContext(context.Background()) } func (i *projectIdentityPtrType) ToProjectIdentityPtrOutputWithContext(ctx context.Context) ProjectIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ProjectIdentityPtrOutput) } type ProjectIdentityOutput struct{ *pulumi.OutputState } func (ProjectIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*ProjectIdentity)(nil)).Elem() } func (o ProjectIdentityOutput) ToProjectIdentityOutput() ProjectIdentityOutput { return o } func (o ProjectIdentityOutput) ToProjectIdentityOutputWithContext(ctx context.Context) ProjectIdentityOutput { return o } func (o ProjectIdentityOutput) ToProjectIdentityPtrOutput() ProjectIdentityPtrOutput { return o.ToProjectIdentityPtrOutputWithContext(context.Background()) } func (o ProjectIdentityOutput) ToProjectIdentityPtrOutputWithContext(ctx context.Context) ProjectIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ProjectIdentity) *ProjectIdentity { return &v }).(ProjectIdentityPtrOutput) } // Specifies a list of User Assigned Managed Identity IDs to be assigned to this AI Foundry Project. // // > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. func (o ProjectIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v ProjectIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with this Managed Service Identity. func (o ProjectIdentityOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v ProjectIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. func (o ProjectIdentityOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v ProjectIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity that should be configured on this AI Foundry Project. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). func (o ProjectIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v ProjectIdentity) string { return v.Type }).(pulumi.StringOutput) } type ProjectIdentityPtrOutput struct{ *pulumi.OutputState } func (ProjectIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ProjectIdentity)(nil)).Elem() } func (o ProjectIdentityPtrOutput) ToProjectIdentityPtrOutput() ProjectIdentityPtrOutput { return o } func (o ProjectIdentityPtrOutput) ToProjectIdentityPtrOutputWithContext(ctx context.Context) ProjectIdentityPtrOutput { return o } func (o ProjectIdentityPtrOutput) Elem() ProjectIdentityOutput { return o.ApplyT(func(v *ProjectIdentity) ProjectIdentity { if v != nil { return *v } var ret ProjectIdentity return ret }).(ProjectIdentityOutput) } // Specifies a list of User Assigned Managed Identity IDs to be assigned to this AI Foundry Project. // // > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`. func (o ProjectIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *ProjectIdentity) []string { if v == nil { return nil } return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with this Managed Service Identity. func (o ProjectIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ProjectIdentity) *string { if v == nil { return nil } return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. func (o ProjectIdentityPtrOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ProjectIdentity) *string { if v == nil { return nil } return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity that should be configured on this AI Foundry Project. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both). func (o ProjectIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *ProjectIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*HubEncryptionInput)(nil)).Elem(), HubEncryptionArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*HubEncryptionPtrInput)(nil)).Elem(), HubEncryptionArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*HubIdentityInput)(nil)).Elem(), HubIdentityArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*HubIdentityPtrInput)(nil)).Elem(), HubIdentityArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*HubManagedNetworkInput)(nil)).Elem(), HubManagedNetworkArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*HubManagedNetworkPtrInput)(nil)).Elem(), HubManagedNetworkArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ProjectIdentityInput)(nil)).Elem(), ProjectIdentityArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ProjectIdentityPtrInput)(nil)).Elem(), ProjectIdentityArgs{}) pulumi.RegisterOutputType(HubEncryptionOutput{}) pulumi.RegisterOutputType(HubEncryptionPtrOutput{}) pulumi.RegisterOutputType(HubIdentityOutput{}) pulumi.RegisterOutputType(HubIdentityPtrOutput{}) pulumi.RegisterOutputType(HubManagedNetworkOutput{}) pulumi.RegisterOutputType(HubManagedNetworkPtrOutput{}) pulumi.RegisterOutputType(ProjectIdentityOutput{}) pulumi.RegisterOutputType(ProjectIdentityPtrOutput{}) }
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/aifoundry/hub.go
sdk/go/azure/aifoundry/hub.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 aifoundry import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an AI Foundry Hub. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/aifoundry" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cognitive" // "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/storage" // "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"), // Location: pulumi.String("westeurope"), // }) // 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("standard"), // PurgeProtectionEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // _, err = keyvault.NewAccessPolicy(ctx, "test", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Get"), // pulumi.String("Delete"), // pulumi.String("Purge"), // pulumi.String("GetRotationPolicy"), // }, // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplesa"), // Location: example.Location, // ResourceGroupName: example.Name, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleAIServices, err := cognitive.NewAIServices(ctx, "example", &cognitive.AIServicesArgs{ // Name: pulumi.String("exampleaiservices"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("S0"), // }) // if err != nil { // return err // } // _, err = aifoundry.NewHub(ctx, "example", &aifoundry.HubArgs{ // Name: pulumi.String("exampleaihub"), // Location: exampleAIServices.Location, // ResourceGroupName: example.Name, // StorageAccountId: exampleAccount.ID(), // KeyVaultId: exampleKeyVault.ID(), // Identity: &aifoundry.HubIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // 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.MachineLearningServices` - 2025-06-01 // // ## Import // // AI Foundry Hubs can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:aifoundry/hub:Hub example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.MachineLearningServices/workspaces/hub1 // ``` type Hub struct { pulumi.CustomResourceState // The Application Insights ID that should be used by this AI Foundry Hub. ApplicationInsightsId pulumi.StringPtrOutput `pulumi:"applicationInsightsId"` // The Container Registry ID that should be used by this AI Foundry Hub. ContainerRegistryId pulumi.StringPtrOutput `pulumi:"containerRegistryId"` // The description of this AI Foundry Hub. Description pulumi.StringPtrOutput `pulumi:"description"` // The URL for the discovery service to identify regional endpoints for AI Foundry Hub services. DiscoveryUrl pulumi.StringOutput `pulumi:"discoveryUrl"` // An `encryption` block as defined below. Changing this forces a new AI Foundry Hub to be created. Encryption HubEncryptionPtrOutput `pulumi:"encryption"` // The display name of this AI Foundry Hub. FriendlyName pulumi.StringPtrOutput `pulumi:"friendlyName"` // Whether High Business Impact (HBI) should be enabled or not. Enabling this setting will reduce diagnostic data collected by the service. Changing this forces a new AI Foundry Hub to be created. Defaults to `false`. // // > **Note:** `highBusinessImpactEnabled` will be enabled by default when creating an AI Foundry Hub with `encryption` enabled. HighBusinessImpactEnabled pulumi.BoolOutput `pulumi:"highBusinessImpactEnabled"` // A `identity` block as defined below. Identity HubIdentityOutput `pulumi:"identity"` // The Key Vault ID that should be used by this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. KeyVaultId pulumi.StringOutput `pulumi:"keyVaultId"` // The Azure Region where the AI Foundry Hub should exist. Changing this forces a new AI Foundry Hub to be created. Location pulumi.StringOutput `pulumi:"location"` // A `managedNetwork` block as defined below. ManagedNetwork HubManagedNetworkOutput `pulumi:"managedNetwork"` // The name which should be used for this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. Name pulumi.StringOutput `pulumi:"name"` // The user assigned identity ID that represents the AI Foundry Hub identity. This must be set when enabling encryption with a user assigned identity. PrimaryUserAssignedIdentity pulumi.StringPtrOutput `pulumi:"primaryUserAssignedIdentity"` // Whether public network access for this AI Service Hub should be enabled. Possible values include `Enabled` and `Disabled`. Defaults to `Enabled`. PublicNetworkAccess pulumi.StringPtrOutput `pulumi:"publicNetworkAccess"` // The name of the Resource Group where the AI Foundry Hub should exist. Changing this forces a new AI Foundry Hub to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The Storage Account ID that should be used by this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"` // A mapping of tags which should be assigned to the AI Foundry Hub. Tags pulumi.StringMapOutput `pulumi:"tags"` // The immutable ID associated with this AI Foundry Hub. WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"` } // NewHub registers a new resource with the given unique name, arguments, and options. func NewHub(ctx *pulumi.Context, name string, args *HubArgs, opts ...pulumi.ResourceOption) (*Hub, 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.KeyVaultId == nil { return nil, errors.New("invalid value for required argument 'KeyVaultId'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.StorageAccountId == nil { return nil, errors.New("invalid value for required argument 'StorageAccountId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Hub err := ctx.RegisterResource("azure:aifoundry/hub:Hub", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetHub gets an existing Hub 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 GetHub(ctx *pulumi.Context, name string, id pulumi.IDInput, state *HubState, opts ...pulumi.ResourceOption) (*Hub, error) { var resource Hub err := ctx.ReadResource("azure:aifoundry/hub:Hub", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Hub resources. type hubState struct { // The Application Insights ID that should be used by this AI Foundry Hub. ApplicationInsightsId *string `pulumi:"applicationInsightsId"` // The Container Registry ID that should be used by this AI Foundry Hub. ContainerRegistryId *string `pulumi:"containerRegistryId"` // The description of this AI Foundry Hub. Description *string `pulumi:"description"` // The URL for the discovery service to identify regional endpoints for AI Foundry Hub services. DiscoveryUrl *string `pulumi:"discoveryUrl"` // An `encryption` block as defined below. Changing this forces a new AI Foundry Hub to be created. Encryption *HubEncryption `pulumi:"encryption"` // The display name of this AI Foundry Hub. FriendlyName *string `pulumi:"friendlyName"` // Whether High Business Impact (HBI) should be enabled or not. Enabling this setting will reduce diagnostic data collected by the service. Changing this forces a new AI Foundry Hub to be created. Defaults to `false`. // // > **Note:** `highBusinessImpactEnabled` will be enabled by default when creating an AI Foundry Hub with `encryption` enabled. HighBusinessImpactEnabled *bool `pulumi:"highBusinessImpactEnabled"` // A `identity` block as defined below. Identity *HubIdentity `pulumi:"identity"` // The Key Vault ID that should be used by this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. KeyVaultId *string `pulumi:"keyVaultId"` // The Azure Region where the AI Foundry Hub should exist. Changing this forces a new AI Foundry Hub to be created. Location *string `pulumi:"location"` // A `managedNetwork` block as defined below. ManagedNetwork *HubManagedNetwork `pulumi:"managedNetwork"` // The name which should be used for this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. Name *string `pulumi:"name"` // The user assigned identity ID that represents the AI Foundry Hub identity. This must be set when enabling encryption with a user assigned identity. PrimaryUserAssignedIdentity *string `pulumi:"primaryUserAssignedIdentity"` // Whether public network access for this AI Service Hub should be enabled. Possible values include `Enabled` and `Disabled`. Defaults to `Enabled`. PublicNetworkAccess *string `pulumi:"publicNetworkAccess"` // The name of the Resource Group where the AI Foundry Hub should exist. Changing this forces a new AI Foundry Hub to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The Storage Account ID that should be used by this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. StorageAccountId *string `pulumi:"storageAccountId"` // A mapping of tags which should be assigned to the AI Foundry Hub. Tags map[string]string `pulumi:"tags"` // The immutable ID associated with this AI Foundry Hub. WorkspaceId *string `pulumi:"workspaceId"` } type HubState struct { // The Application Insights ID that should be used by this AI Foundry Hub. ApplicationInsightsId pulumi.StringPtrInput // The Container Registry ID that should be used by this AI Foundry Hub. ContainerRegistryId pulumi.StringPtrInput // The description of this AI Foundry Hub. Description pulumi.StringPtrInput // The URL for the discovery service to identify regional endpoints for AI Foundry Hub services. DiscoveryUrl pulumi.StringPtrInput // An `encryption` block as defined below. Changing this forces a new AI Foundry Hub to be created. Encryption HubEncryptionPtrInput // The display name of this AI Foundry Hub. FriendlyName pulumi.StringPtrInput // Whether High Business Impact (HBI) should be enabled or not. Enabling this setting will reduce diagnostic data collected by the service. Changing this forces a new AI Foundry Hub to be created. Defaults to `false`. // // > **Note:** `highBusinessImpactEnabled` will be enabled by default when creating an AI Foundry Hub with `encryption` enabled. HighBusinessImpactEnabled pulumi.BoolPtrInput // A `identity` block as defined below. Identity HubIdentityPtrInput // The Key Vault ID that should be used by this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. KeyVaultId pulumi.StringPtrInput // The Azure Region where the AI Foundry Hub should exist. Changing this forces a new AI Foundry Hub to be created. Location pulumi.StringPtrInput // A `managedNetwork` block as defined below. ManagedNetwork HubManagedNetworkPtrInput // The name which should be used for this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. Name pulumi.StringPtrInput // The user assigned identity ID that represents the AI Foundry Hub identity. This must be set when enabling encryption with a user assigned identity. PrimaryUserAssignedIdentity pulumi.StringPtrInput // Whether public network access for this AI Service Hub should be enabled. Possible values include `Enabled` and `Disabled`. Defaults to `Enabled`. PublicNetworkAccess pulumi.StringPtrInput // The name of the Resource Group where the AI Foundry Hub should exist. Changing this forces a new AI Foundry Hub to be created. ResourceGroupName pulumi.StringPtrInput // The Storage Account ID that should be used by this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. StorageAccountId pulumi.StringPtrInput // A mapping of tags which should be assigned to the AI Foundry Hub. Tags pulumi.StringMapInput // The immutable ID associated with this AI Foundry Hub. WorkspaceId pulumi.StringPtrInput } func (HubState) ElementType() reflect.Type { return reflect.TypeOf((*hubState)(nil)).Elem() } type hubArgs struct { // The Application Insights ID that should be used by this AI Foundry Hub. ApplicationInsightsId *string `pulumi:"applicationInsightsId"` // The Container Registry ID that should be used by this AI Foundry Hub. ContainerRegistryId *string `pulumi:"containerRegistryId"` // The description of this AI Foundry Hub. Description *string `pulumi:"description"` // An `encryption` block as defined below. Changing this forces a new AI Foundry Hub to be created. Encryption *HubEncryption `pulumi:"encryption"` // The display name of this AI Foundry Hub. FriendlyName *string `pulumi:"friendlyName"` // Whether High Business Impact (HBI) should be enabled or not. Enabling this setting will reduce diagnostic data collected by the service. Changing this forces a new AI Foundry Hub to be created. Defaults to `false`. // // > **Note:** `highBusinessImpactEnabled` will be enabled by default when creating an AI Foundry Hub with `encryption` enabled. HighBusinessImpactEnabled *bool `pulumi:"highBusinessImpactEnabled"` // A `identity` block as defined below. Identity HubIdentity `pulumi:"identity"` // The Key Vault ID that should be used by this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. KeyVaultId string `pulumi:"keyVaultId"` // The Azure Region where the AI Foundry Hub should exist. Changing this forces a new AI Foundry Hub to be created. Location *string `pulumi:"location"` // A `managedNetwork` block as defined below. ManagedNetwork *HubManagedNetwork `pulumi:"managedNetwork"` // The name which should be used for this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. Name *string `pulumi:"name"` // The user assigned identity ID that represents the AI Foundry Hub identity. This must be set when enabling encryption with a user assigned identity. PrimaryUserAssignedIdentity *string `pulumi:"primaryUserAssignedIdentity"` // Whether public network access for this AI Service Hub should be enabled. Possible values include `Enabled` and `Disabled`. Defaults to `Enabled`. PublicNetworkAccess *string `pulumi:"publicNetworkAccess"` // The name of the Resource Group where the AI Foundry Hub should exist. Changing this forces a new AI Foundry Hub to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The Storage Account ID that should be used by this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. StorageAccountId string `pulumi:"storageAccountId"` // A mapping of tags which should be assigned to the AI Foundry Hub. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Hub resource. type HubArgs struct { // The Application Insights ID that should be used by this AI Foundry Hub. ApplicationInsightsId pulumi.StringPtrInput // The Container Registry ID that should be used by this AI Foundry Hub. ContainerRegistryId pulumi.StringPtrInput // The description of this AI Foundry Hub. Description pulumi.StringPtrInput // An `encryption` block as defined below. Changing this forces a new AI Foundry Hub to be created. Encryption HubEncryptionPtrInput // The display name of this AI Foundry Hub. FriendlyName pulumi.StringPtrInput // Whether High Business Impact (HBI) should be enabled or not. Enabling this setting will reduce diagnostic data collected by the service. Changing this forces a new AI Foundry Hub to be created. Defaults to `false`. // // > **Note:** `highBusinessImpactEnabled` will be enabled by default when creating an AI Foundry Hub with `encryption` enabled. HighBusinessImpactEnabled pulumi.BoolPtrInput // A `identity` block as defined below. Identity HubIdentityInput // The Key Vault ID that should be used by this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. KeyVaultId pulumi.StringInput // The Azure Region where the AI Foundry Hub should exist. Changing this forces a new AI Foundry Hub to be created. Location pulumi.StringPtrInput // A `managedNetwork` block as defined below. ManagedNetwork HubManagedNetworkPtrInput // The name which should be used for this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. Name pulumi.StringPtrInput // The user assigned identity ID that represents the AI Foundry Hub identity. This must be set when enabling encryption with a user assigned identity. PrimaryUserAssignedIdentity pulumi.StringPtrInput // Whether public network access for this AI Service Hub should be enabled. Possible values include `Enabled` and `Disabled`. Defaults to `Enabled`. PublicNetworkAccess pulumi.StringPtrInput // The name of the Resource Group where the AI Foundry Hub should exist. Changing this forces a new AI Foundry Hub to be created. ResourceGroupName pulumi.StringInput // The Storage Account ID that should be used by this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. StorageAccountId pulumi.StringInput // A mapping of tags which should be assigned to the AI Foundry Hub. Tags pulumi.StringMapInput } func (HubArgs) ElementType() reflect.Type { return reflect.TypeOf((*hubArgs)(nil)).Elem() } type HubInput interface { pulumi.Input ToHubOutput() HubOutput ToHubOutputWithContext(ctx context.Context) HubOutput } func (*Hub) ElementType() reflect.Type { return reflect.TypeOf((**Hub)(nil)).Elem() } func (i *Hub) ToHubOutput() HubOutput { return i.ToHubOutputWithContext(context.Background()) } func (i *Hub) ToHubOutputWithContext(ctx context.Context) HubOutput { return pulumi.ToOutputWithContext(ctx, i).(HubOutput) } // HubArrayInput is an input type that accepts HubArray and HubArrayOutput values. // You can construct a concrete instance of `HubArrayInput` via: // // HubArray{ HubArgs{...} } type HubArrayInput interface { pulumi.Input ToHubArrayOutput() HubArrayOutput ToHubArrayOutputWithContext(context.Context) HubArrayOutput } type HubArray []HubInput func (HubArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Hub)(nil)).Elem() } func (i HubArray) ToHubArrayOutput() HubArrayOutput { return i.ToHubArrayOutputWithContext(context.Background()) } func (i HubArray) ToHubArrayOutputWithContext(ctx context.Context) HubArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(HubArrayOutput) } // HubMapInput is an input type that accepts HubMap and HubMapOutput values. // You can construct a concrete instance of `HubMapInput` via: // // HubMap{ "key": HubArgs{...} } type HubMapInput interface { pulumi.Input ToHubMapOutput() HubMapOutput ToHubMapOutputWithContext(context.Context) HubMapOutput } type HubMap map[string]HubInput func (HubMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Hub)(nil)).Elem() } func (i HubMap) ToHubMapOutput() HubMapOutput { return i.ToHubMapOutputWithContext(context.Background()) } func (i HubMap) ToHubMapOutputWithContext(ctx context.Context) HubMapOutput { return pulumi.ToOutputWithContext(ctx, i).(HubMapOutput) } type HubOutput struct{ *pulumi.OutputState } func (HubOutput) ElementType() reflect.Type { return reflect.TypeOf((**Hub)(nil)).Elem() } func (o HubOutput) ToHubOutput() HubOutput { return o } func (o HubOutput) ToHubOutputWithContext(ctx context.Context) HubOutput { return o } // The Application Insights ID that should be used by this AI Foundry Hub. func (o HubOutput) ApplicationInsightsId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Hub) pulumi.StringPtrOutput { return v.ApplicationInsightsId }).(pulumi.StringPtrOutput) } // The Container Registry ID that should be used by this AI Foundry Hub. func (o HubOutput) ContainerRegistryId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Hub) pulumi.StringPtrOutput { return v.ContainerRegistryId }).(pulumi.StringPtrOutput) } // The description of this AI Foundry Hub. func (o HubOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *Hub) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The URL for the discovery service to identify regional endpoints for AI Foundry Hub services. func (o HubOutput) DiscoveryUrl() pulumi.StringOutput { return o.ApplyT(func(v *Hub) pulumi.StringOutput { return v.DiscoveryUrl }).(pulumi.StringOutput) } // An `encryption` block as defined below. Changing this forces a new AI Foundry Hub to be created. func (o HubOutput) Encryption() HubEncryptionPtrOutput { return o.ApplyT(func(v *Hub) HubEncryptionPtrOutput { return v.Encryption }).(HubEncryptionPtrOutput) } // The display name of this AI Foundry Hub. func (o HubOutput) FriendlyName() pulumi.StringPtrOutput { return o.ApplyT(func(v *Hub) pulumi.StringPtrOutput { return v.FriendlyName }).(pulumi.StringPtrOutput) } // Whether High Business Impact (HBI) should be enabled or not. Enabling this setting will reduce diagnostic data collected by the service. Changing this forces a new AI Foundry Hub to be created. Defaults to `false`. // // > **Note:** `highBusinessImpactEnabled` will be enabled by default when creating an AI Foundry Hub with `encryption` enabled. func (o HubOutput) HighBusinessImpactEnabled() pulumi.BoolOutput { return o.ApplyT(func(v *Hub) pulumi.BoolOutput { return v.HighBusinessImpactEnabled }).(pulumi.BoolOutput) } // A `identity` block as defined below. func (o HubOutput) Identity() HubIdentityOutput { return o.ApplyT(func(v *Hub) HubIdentityOutput { return v.Identity }).(HubIdentityOutput) } // The Key Vault ID that should be used by this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. func (o HubOutput) KeyVaultId() pulumi.StringOutput { return o.ApplyT(func(v *Hub) pulumi.StringOutput { return v.KeyVaultId }).(pulumi.StringOutput) } // The Azure Region where the AI Foundry Hub should exist. Changing this forces a new AI Foundry Hub to be created. func (o HubOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Hub) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // A `managedNetwork` block as defined below. func (o HubOutput) ManagedNetwork() HubManagedNetworkOutput { return o.ApplyT(func(v *Hub) HubManagedNetworkOutput { return v.ManagedNetwork }).(HubManagedNetworkOutput) } // The name which should be used for this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. func (o HubOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Hub) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The user assigned identity ID that represents the AI Foundry Hub identity. This must be set when enabling encryption with a user assigned identity. func (o HubOutput) PrimaryUserAssignedIdentity() pulumi.StringPtrOutput { return o.ApplyT(func(v *Hub) pulumi.StringPtrOutput { return v.PrimaryUserAssignedIdentity }).(pulumi.StringPtrOutput) } // Whether public network access for this AI Service Hub should be enabled. Possible values include `Enabled` and `Disabled`. Defaults to `Enabled`. func (o HubOutput) PublicNetworkAccess() pulumi.StringPtrOutput { return o.ApplyT(func(v *Hub) pulumi.StringPtrOutput { return v.PublicNetworkAccess }).(pulumi.StringPtrOutput) } // The name of the Resource Group where the AI Foundry Hub should exist. Changing this forces a new AI Foundry Hub to be created. func (o HubOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Hub) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The Storage Account ID that should be used by this AI Foundry Hub. Changing this forces a new AI Foundry Hub to be created. func (o HubOutput) StorageAccountId() pulumi.StringOutput { return o.ApplyT(func(v *Hub) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the AI Foundry Hub. func (o HubOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Hub) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The immutable ID associated with this AI Foundry Hub. func (o HubOutput) WorkspaceId() pulumi.StringOutput { return o.ApplyT(func(v *Hub) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput) } type HubArrayOutput struct{ *pulumi.OutputState } func (HubArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Hub)(nil)).Elem() } func (o HubArrayOutput) ToHubArrayOutput() HubArrayOutput { return o } func (o HubArrayOutput) ToHubArrayOutputWithContext(ctx context.Context) HubArrayOutput { return o } func (o HubArrayOutput) Index(i pulumi.IntInput) HubOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Hub { return vs[0].([]*Hub)[vs[1].(int)] }).(HubOutput) } type HubMapOutput struct{ *pulumi.OutputState } func (HubMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Hub)(nil)).Elem() } func (o HubMapOutput) ToHubMapOutput() HubMapOutput { return o } func (o HubMapOutput) ToHubMapOutputWithContext(ctx context.Context) HubMapOutput { return o } func (o HubMapOutput) MapIndex(k pulumi.StringInput) HubOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Hub { return vs[0].(map[string]*Hub)[vs[1].(string)] }).(HubOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*HubInput)(nil)).Elem(), &Hub{}) pulumi.RegisterInputType(reflect.TypeOf((*HubArrayInput)(nil)).Elem(), HubArray{}) pulumi.RegisterInputType(reflect.TypeOf((*HubMapInput)(nil)).Elem(), HubMap{}) pulumi.RegisterOutputType(HubOutput{}) pulumi.RegisterOutputType(HubArrayOutput{}) pulumi.RegisterOutputType(HubMapOutput{}) }
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/aifoundry/project.go
sdk/go/azure/aifoundry/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 aifoundry import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an AI Foundry Project. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/aifoundry" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cognitive" // "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/storage" // "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"), // Location: pulumi.String("westeurope"), // }) // 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("standard"), // PurgeProtectionEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // _, err = keyvault.NewAccessPolicy(ctx, "example", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Create"), // pulumi.String("Get"), // pulumi.String("Delete"), // pulumi.String("Purge"), // pulumi.String("GetRotationPolicy"), // }, // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplesa"), // Location: example.Location, // ResourceGroupName: example.Name, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleAIServices, err := cognitive.NewAIServices(ctx, "example", &cognitive.AIServicesArgs{ // Name: pulumi.String("exampleaiservices"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("S0"), // }) // if err != nil { // return err // } // exampleHub, err := aifoundry.NewHub(ctx, "example", &aifoundry.HubArgs{ // Name: pulumi.String("exampleaihub"), // Location: exampleAIServices.Location, // ResourceGroupName: example.Name, // StorageAccountId: exampleAccount.ID(), // KeyVaultId: exampleKeyVault.ID(), // Identity: &aifoundry.HubIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // _, err = aifoundry.NewProject(ctx, "example", &aifoundry.ProjectArgs{ // Name: pulumi.String("example"), // Location: exampleHub.Location, // AiServicesHubId: exampleHub.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.MachineLearningServices` - 2025-06-01 // // ## Import // // AI Foundry Projects can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:aifoundry/project:Project example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.MachineLearningServices/workspaces/project1 // ``` type Project struct { pulumi.CustomResourceState // The AI Foundry ID under which this Project should be created. Changing this forces a new AI Foundry Project to be created. AiServicesHubId pulumi.StringOutput `pulumi:"aiServicesHubId"` // The description of this AI Foundry Project. Description pulumi.StringPtrOutput `pulumi:"description"` // The display name of this AI Foundry Project. FriendlyName pulumi.StringPtrOutput `pulumi:"friendlyName"` // Whether High Business Impact (HBI) should be enabled or not. Enabling this setting will reduce diagnostic data collected by the service. Changing this forces a new AI Foundry Project to be created. Defaults to `false`. HighBusinessImpactEnabled pulumi.BoolOutput `pulumi:"highBusinessImpactEnabled"` // A `identity` block as defined below. Identity ProjectIdentityPtrOutput `pulumi:"identity"` // The Azure Region where the AI Foundry Project should exist. Changing this forces a new AI Foundry Project to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this AI Foundry Project. Changing this forces a new AI Foundry Project to be created. Name pulumi.StringOutput `pulumi:"name"` // The user assigned identity ID that represents the AI Foundry Hub identity. This must be set when enabling encryption with a user assigned identity. PrimaryUserAssignedIdentity pulumi.StringPtrOutput `pulumi:"primaryUserAssignedIdentity"` // The immutable project ID associated with this AI Foundry Project. ProjectId pulumi.StringOutput `pulumi:"projectId"` // A mapping of tags which should be assigned to the AI Foundry Project. Tags pulumi.StringMapOutput `pulumi:"tags"` } // 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.AiServicesHubId == nil { return nil, errors.New("invalid value for required argument 'AiServicesHubId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Project err := ctx.RegisterResource("azure:aifoundry/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:aifoundry/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 { // The AI Foundry ID under which this Project should be created. Changing this forces a new AI Foundry Project to be created. AiServicesHubId *string `pulumi:"aiServicesHubId"` // The description of this AI Foundry Project. Description *string `pulumi:"description"` // The display name of this AI Foundry Project. FriendlyName *string `pulumi:"friendlyName"` // Whether High Business Impact (HBI) should be enabled or not. Enabling this setting will reduce diagnostic data collected by the service. Changing this forces a new AI Foundry Project to be created. Defaults to `false`. HighBusinessImpactEnabled *bool `pulumi:"highBusinessImpactEnabled"` // A `identity` block as defined below. Identity *ProjectIdentity `pulumi:"identity"` // The Azure Region where the AI Foundry Project should exist. Changing this forces a new AI Foundry Project to be created. Location *string `pulumi:"location"` // The name which should be used for this AI Foundry Project. Changing this forces a new AI Foundry Project to be created. Name *string `pulumi:"name"` // The user assigned identity ID that represents the AI Foundry Hub identity. This must be set when enabling encryption with a user assigned identity. PrimaryUserAssignedIdentity *string `pulumi:"primaryUserAssignedIdentity"` // The immutable project ID associated with this AI Foundry Project. ProjectId *string `pulumi:"projectId"` // A mapping of tags which should be assigned to the AI Foundry Project. Tags map[string]string `pulumi:"tags"` } type ProjectState struct { // The AI Foundry ID under which this Project should be created. Changing this forces a new AI Foundry Project to be created. AiServicesHubId pulumi.StringPtrInput // The description of this AI Foundry Project. Description pulumi.StringPtrInput // The display name of this AI Foundry Project. FriendlyName pulumi.StringPtrInput // Whether High Business Impact (HBI) should be enabled or not. Enabling this setting will reduce diagnostic data collected by the service. Changing this forces a new AI Foundry Project to be created. Defaults to `false`. HighBusinessImpactEnabled pulumi.BoolPtrInput // A `identity` block as defined below. Identity ProjectIdentityPtrInput // The Azure Region where the AI Foundry Project should exist. Changing this forces a new AI Foundry Project to be created. Location pulumi.StringPtrInput // The name which should be used for this AI Foundry Project. Changing this forces a new AI Foundry Project to be created. Name pulumi.StringPtrInput // The user assigned identity ID that represents the AI Foundry Hub identity. This must be set when enabling encryption with a user assigned identity. PrimaryUserAssignedIdentity pulumi.StringPtrInput // The immutable project ID associated with this AI Foundry Project. ProjectId pulumi.StringPtrInput // A mapping of tags which should be assigned to the AI Foundry Project. Tags pulumi.StringMapInput } func (ProjectState) ElementType() reflect.Type { return reflect.TypeOf((*projectState)(nil)).Elem() } type projectArgs struct { // The AI Foundry ID under which this Project should be created. Changing this forces a new AI Foundry Project to be created. AiServicesHubId string `pulumi:"aiServicesHubId"` // The description of this AI Foundry Project. Description *string `pulumi:"description"` // The display name of this AI Foundry Project. FriendlyName *string `pulumi:"friendlyName"` // Whether High Business Impact (HBI) should be enabled or not. Enabling this setting will reduce diagnostic data collected by the service. Changing this forces a new AI Foundry Project to be created. Defaults to `false`. HighBusinessImpactEnabled *bool `pulumi:"highBusinessImpactEnabled"` // A `identity` block as defined below. Identity *ProjectIdentity `pulumi:"identity"` // The Azure Region where the AI Foundry Project should exist. Changing this forces a new AI Foundry Project to be created. Location *string `pulumi:"location"` // The name which should be used for this AI Foundry Project. Changing this forces a new AI Foundry Project to be created. Name *string `pulumi:"name"` // The user assigned identity ID that represents the AI Foundry Hub identity. This must be set when enabling encryption with a user assigned identity. PrimaryUserAssignedIdentity *string `pulumi:"primaryUserAssignedIdentity"` // A mapping of tags which should be assigned to the AI Foundry Project. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Project resource. type ProjectArgs struct { // The AI Foundry ID under which this Project should be created. Changing this forces a new AI Foundry Project to be created. AiServicesHubId pulumi.StringInput // The description of this AI Foundry Project. Description pulumi.StringPtrInput // The display name of this AI Foundry Project. FriendlyName pulumi.StringPtrInput // Whether High Business Impact (HBI) should be enabled or not. Enabling this setting will reduce diagnostic data collected by the service. Changing this forces a new AI Foundry Project to be created. Defaults to `false`. HighBusinessImpactEnabled pulumi.BoolPtrInput // A `identity` block as defined below. Identity ProjectIdentityPtrInput // The Azure Region where the AI Foundry Project should exist. Changing this forces a new AI Foundry Project to be created. Location pulumi.StringPtrInput // The name which should be used for this AI Foundry Project. Changing this forces a new AI Foundry Project to be created. Name pulumi.StringPtrInput // The user assigned identity ID that represents the AI Foundry Hub identity. This must be set when enabling encryption with a user assigned identity. PrimaryUserAssignedIdentity pulumi.StringPtrInput // A mapping of tags which should be assigned to the AI Foundry Project. Tags pulumi.StringMapInput } 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 } // The AI Foundry ID under which this Project should be created. Changing this forces a new AI Foundry Project to be created. func (o ProjectOutput) AiServicesHubId() pulumi.StringOutput { return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.AiServicesHubId }).(pulumi.StringOutput) } // The description of this AI Foundry Project. func (o ProjectOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *Project) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The display name of this AI Foundry Project. func (o ProjectOutput) FriendlyName() pulumi.StringPtrOutput { return o.ApplyT(func(v *Project) pulumi.StringPtrOutput { return v.FriendlyName }).(pulumi.StringPtrOutput) } // Whether High Business Impact (HBI) should be enabled or not. Enabling this setting will reduce diagnostic data collected by the service. Changing this forces a new AI Foundry Project to be created. Defaults to `false`. func (o ProjectOutput) HighBusinessImpactEnabled() pulumi.BoolOutput { return o.ApplyT(func(v *Project) pulumi.BoolOutput { return v.HighBusinessImpactEnabled }).(pulumi.BoolOutput) } // A `identity` block as defined below. func (o ProjectOutput) Identity() ProjectIdentityPtrOutput { return o.ApplyT(func(v *Project) ProjectIdentityPtrOutput { return v.Identity }).(ProjectIdentityPtrOutput) } // The Azure Region where the AI Foundry Project should exist. Changing this forces a new AI Foundry Project to be created. func (o ProjectOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this AI Foundry Project. Changing this forces a new AI Foundry Project to be created. func (o ProjectOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The user assigned identity ID that represents the AI Foundry Hub identity. This must be set when enabling encryption with a user assigned identity. func (o ProjectOutput) PrimaryUserAssignedIdentity() pulumi.StringPtrOutput { return o.ApplyT(func(v *Project) pulumi.StringPtrOutput { return v.PrimaryUserAssignedIdentity }).(pulumi.StringPtrOutput) } // The immutable project ID associated with this AI Foundry Project. func (o ProjectOutput) ProjectId() pulumi.StringOutput { return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.ProjectId }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the AI Foundry Project. func (o ProjectOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Project) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } 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/dashboard/init.go
sdk/go/azure/dashboard/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 dashboard 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:dashboard/grafana:Grafana": r = &Grafana{} case "azure:dashboard/grafanaManagedPrivateEndpoint:GrafanaManagedPrivateEndpoint": r = &GrafanaManagedPrivateEndpoint{} 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", "dashboard/grafana", &module{version}, ) pulumi.RegisterResourceModule( "azure", "dashboard/grafanaManagedPrivateEndpoint", &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/dashboard/pulumiTypes.go
sdk/go/azure/dashboard/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 dashboard 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 GrafanaAzureMonitorWorkspaceIntegration struct { // Specifies the resource ID of the connected Azure Monitor Workspace. ResourceId string `pulumi:"resourceId"` } // GrafanaAzureMonitorWorkspaceIntegrationInput is an input type that accepts GrafanaAzureMonitorWorkspaceIntegrationArgs and GrafanaAzureMonitorWorkspaceIntegrationOutput values. // You can construct a concrete instance of `GrafanaAzureMonitorWorkspaceIntegrationInput` via: // // GrafanaAzureMonitorWorkspaceIntegrationArgs{...} type GrafanaAzureMonitorWorkspaceIntegrationInput interface { pulumi.Input ToGrafanaAzureMonitorWorkspaceIntegrationOutput() GrafanaAzureMonitorWorkspaceIntegrationOutput ToGrafanaAzureMonitorWorkspaceIntegrationOutputWithContext(context.Context) GrafanaAzureMonitorWorkspaceIntegrationOutput } type GrafanaAzureMonitorWorkspaceIntegrationArgs struct { // Specifies the resource ID of the connected Azure Monitor Workspace. ResourceId pulumi.StringInput `pulumi:"resourceId"` } func (GrafanaAzureMonitorWorkspaceIntegrationArgs) ElementType() reflect.Type { return reflect.TypeOf((*GrafanaAzureMonitorWorkspaceIntegration)(nil)).Elem() } func (i GrafanaAzureMonitorWorkspaceIntegrationArgs) ToGrafanaAzureMonitorWorkspaceIntegrationOutput() GrafanaAzureMonitorWorkspaceIntegrationOutput { return i.ToGrafanaAzureMonitorWorkspaceIntegrationOutputWithContext(context.Background()) } func (i GrafanaAzureMonitorWorkspaceIntegrationArgs) ToGrafanaAzureMonitorWorkspaceIntegrationOutputWithContext(ctx context.Context) GrafanaAzureMonitorWorkspaceIntegrationOutput { return pulumi.ToOutputWithContext(ctx, i).(GrafanaAzureMonitorWorkspaceIntegrationOutput) } // GrafanaAzureMonitorWorkspaceIntegrationArrayInput is an input type that accepts GrafanaAzureMonitorWorkspaceIntegrationArray and GrafanaAzureMonitorWorkspaceIntegrationArrayOutput values. // You can construct a concrete instance of `GrafanaAzureMonitorWorkspaceIntegrationArrayInput` via: // // GrafanaAzureMonitorWorkspaceIntegrationArray{ GrafanaAzureMonitorWorkspaceIntegrationArgs{...} } type GrafanaAzureMonitorWorkspaceIntegrationArrayInput interface { pulumi.Input ToGrafanaAzureMonitorWorkspaceIntegrationArrayOutput() GrafanaAzureMonitorWorkspaceIntegrationArrayOutput ToGrafanaAzureMonitorWorkspaceIntegrationArrayOutputWithContext(context.Context) GrafanaAzureMonitorWorkspaceIntegrationArrayOutput } type GrafanaAzureMonitorWorkspaceIntegrationArray []GrafanaAzureMonitorWorkspaceIntegrationInput func (GrafanaAzureMonitorWorkspaceIntegrationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]GrafanaAzureMonitorWorkspaceIntegration)(nil)).Elem() } func (i GrafanaAzureMonitorWorkspaceIntegrationArray) ToGrafanaAzureMonitorWorkspaceIntegrationArrayOutput() GrafanaAzureMonitorWorkspaceIntegrationArrayOutput { return i.ToGrafanaAzureMonitorWorkspaceIntegrationArrayOutputWithContext(context.Background()) } func (i GrafanaAzureMonitorWorkspaceIntegrationArray) ToGrafanaAzureMonitorWorkspaceIntegrationArrayOutputWithContext(ctx context.Context) GrafanaAzureMonitorWorkspaceIntegrationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GrafanaAzureMonitorWorkspaceIntegrationArrayOutput) } type GrafanaAzureMonitorWorkspaceIntegrationOutput struct{ *pulumi.OutputState } func (GrafanaAzureMonitorWorkspaceIntegrationOutput) ElementType() reflect.Type { return reflect.TypeOf((*GrafanaAzureMonitorWorkspaceIntegration)(nil)).Elem() } func (o GrafanaAzureMonitorWorkspaceIntegrationOutput) ToGrafanaAzureMonitorWorkspaceIntegrationOutput() GrafanaAzureMonitorWorkspaceIntegrationOutput { return o } func (o GrafanaAzureMonitorWorkspaceIntegrationOutput) ToGrafanaAzureMonitorWorkspaceIntegrationOutputWithContext(ctx context.Context) GrafanaAzureMonitorWorkspaceIntegrationOutput { return o } // Specifies the resource ID of the connected Azure Monitor Workspace. func (o GrafanaAzureMonitorWorkspaceIntegrationOutput) ResourceId() pulumi.StringOutput { return o.ApplyT(func(v GrafanaAzureMonitorWorkspaceIntegration) string { return v.ResourceId }).(pulumi.StringOutput) } type GrafanaAzureMonitorWorkspaceIntegrationArrayOutput struct{ *pulumi.OutputState } func (GrafanaAzureMonitorWorkspaceIntegrationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]GrafanaAzureMonitorWorkspaceIntegration)(nil)).Elem() } func (o GrafanaAzureMonitorWorkspaceIntegrationArrayOutput) ToGrafanaAzureMonitorWorkspaceIntegrationArrayOutput() GrafanaAzureMonitorWorkspaceIntegrationArrayOutput { return o } func (o GrafanaAzureMonitorWorkspaceIntegrationArrayOutput) ToGrafanaAzureMonitorWorkspaceIntegrationArrayOutputWithContext(ctx context.Context) GrafanaAzureMonitorWorkspaceIntegrationArrayOutput { return o } func (o GrafanaAzureMonitorWorkspaceIntegrationArrayOutput) Index(i pulumi.IntInput) GrafanaAzureMonitorWorkspaceIntegrationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GrafanaAzureMonitorWorkspaceIntegration { return vs[0].([]GrafanaAzureMonitorWorkspaceIntegration)[vs[1].(int)] }).(GrafanaAzureMonitorWorkspaceIntegrationOutput) } type GrafanaIdentity struct { // Specifies the list of User Assigned Managed Service Identity IDs which should be assigned to this Dashboard Grafana. Changing this forces a new resource to be created. 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. Possible values are `SystemAssigned`, `UserAssigned`. Changing this forces a new resource to be created. Type string `pulumi:"type"` } // GrafanaIdentityInput is an input type that accepts GrafanaIdentityArgs and GrafanaIdentityOutput values. // You can construct a concrete instance of `GrafanaIdentityInput` via: // // GrafanaIdentityArgs{...} type GrafanaIdentityInput interface { pulumi.Input ToGrafanaIdentityOutput() GrafanaIdentityOutput ToGrafanaIdentityOutputWithContext(context.Context) GrafanaIdentityOutput } type GrafanaIdentityArgs struct { // Specifies the list of User Assigned Managed Service Identity IDs which should be assigned to this Dashboard Grafana. Changing this forces a new resource to be created. 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. Possible values are `SystemAssigned`, `UserAssigned`. Changing this forces a new resource to be created. Type pulumi.StringInput `pulumi:"type"` } func (GrafanaIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*GrafanaIdentity)(nil)).Elem() } func (i GrafanaIdentityArgs) ToGrafanaIdentityOutput() GrafanaIdentityOutput { return i.ToGrafanaIdentityOutputWithContext(context.Background()) } func (i GrafanaIdentityArgs) ToGrafanaIdentityOutputWithContext(ctx context.Context) GrafanaIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(GrafanaIdentityOutput) } func (i GrafanaIdentityArgs) ToGrafanaIdentityPtrOutput() GrafanaIdentityPtrOutput { return i.ToGrafanaIdentityPtrOutputWithContext(context.Background()) } func (i GrafanaIdentityArgs) ToGrafanaIdentityPtrOutputWithContext(ctx context.Context) GrafanaIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(GrafanaIdentityOutput).ToGrafanaIdentityPtrOutputWithContext(ctx) } // GrafanaIdentityPtrInput is an input type that accepts GrafanaIdentityArgs, GrafanaIdentityPtr and GrafanaIdentityPtrOutput values. // You can construct a concrete instance of `GrafanaIdentityPtrInput` via: // // GrafanaIdentityArgs{...} // // or: // // nil type GrafanaIdentityPtrInput interface { pulumi.Input ToGrafanaIdentityPtrOutput() GrafanaIdentityPtrOutput ToGrafanaIdentityPtrOutputWithContext(context.Context) GrafanaIdentityPtrOutput } type grafanaIdentityPtrType GrafanaIdentityArgs func GrafanaIdentityPtr(v *GrafanaIdentityArgs) GrafanaIdentityPtrInput { return (*grafanaIdentityPtrType)(v) } func (*grafanaIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**GrafanaIdentity)(nil)).Elem() } func (i *grafanaIdentityPtrType) ToGrafanaIdentityPtrOutput() GrafanaIdentityPtrOutput { return i.ToGrafanaIdentityPtrOutputWithContext(context.Background()) } func (i *grafanaIdentityPtrType) ToGrafanaIdentityPtrOutputWithContext(ctx context.Context) GrafanaIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(GrafanaIdentityPtrOutput) } type GrafanaIdentityOutput struct{ *pulumi.OutputState } func (GrafanaIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*GrafanaIdentity)(nil)).Elem() } func (o GrafanaIdentityOutput) ToGrafanaIdentityOutput() GrafanaIdentityOutput { return o } func (o GrafanaIdentityOutput) ToGrafanaIdentityOutputWithContext(ctx context.Context) GrafanaIdentityOutput { return o } func (o GrafanaIdentityOutput) ToGrafanaIdentityPtrOutput() GrafanaIdentityPtrOutput { return o.ToGrafanaIdentityPtrOutputWithContext(context.Background()) } func (o GrafanaIdentityOutput) ToGrafanaIdentityPtrOutputWithContext(ctx context.Context) GrafanaIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v GrafanaIdentity) *GrafanaIdentity { return &v }).(GrafanaIdentityPtrOutput) } // Specifies the list of User Assigned Managed Service Identity IDs which should be assigned to this Dashboard Grafana. Changing this forces a new resource to be created. func (o GrafanaIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v GrafanaIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with this Managed Service Identity. func (o GrafanaIdentityOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v GrafanaIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. func (o GrafanaIdentityOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v GrafanaIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity. Possible values are `SystemAssigned`, `UserAssigned`. Changing this forces a new resource to be created. func (o GrafanaIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v GrafanaIdentity) string { return v.Type }).(pulumi.StringOutput) } type GrafanaIdentityPtrOutput struct{ *pulumi.OutputState } func (GrafanaIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**GrafanaIdentity)(nil)).Elem() } func (o GrafanaIdentityPtrOutput) ToGrafanaIdentityPtrOutput() GrafanaIdentityPtrOutput { return o } func (o GrafanaIdentityPtrOutput) ToGrafanaIdentityPtrOutputWithContext(ctx context.Context) GrafanaIdentityPtrOutput { return o } func (o GrafanaIdentityPtrOutput) Elem() GrafanaIdentityOutput { return o.ApplyT(func(v *GrafanaIdentity) GrafanaIdentity { if v != nil { return *v } var ret GrafanaIdentity return ret }).(GrafanaIdentityOutput) } // Specifies the list of User Assigned Managed Service Identity IDs which should be assigned to this Dashboard Grafana. Changing this forces a new resource to be created. func (o GrafanaIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *GrafanaIdentity) []string { if v == nil { return nil } return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with this Managed Service Identity. func (o GrafanaIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v *GrafanaIdentity) *string { if v == nil { return nil } return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. func (o GrafanaIdentityPtrOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v *GrafanaIdentity) *string { if v == nil { return nil } return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity. Possible values are `SystemAssigned`, `UserAssigned`. Changing this forces a new resource to be created. func (o GrafanaIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *GrafanaIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type GrafanaSmtp struct { // Whether to enable the smtp setting of the Grafana instance. Defaults to `false`. Enabled *bool `pulumi:"enabled"` // Address used when sending emails. FromAddress string `pulumi:"fromAddress"` // Name used when sending emails. Defaults to `Azure Managed Grafana Notification`. FromName *string `pulumi:"fromName"` // SMTP server hostname with port, e.g. test.email.net:587 Host string `pulumi:"host"` // Password of SMTP authentication. Password string `pulumi:"password"` // Whether to use TLS when connecting to SMTP server. Possible values are `OpportunisticStartTLS`, `NoStartTLS`, `MandatoryStartTLS`. StartTlsPolicy string `pulumi:"startTlsPolicy"` // User of SMTP authentication. User string `pulumi:"user"` // Whether verify SSL for SMTP server. Defaults to `false`. VerificationSkipEnabled *bool `pulumi:"verificationSkipEnabled"` } // GrafanaSmtpInput is an input type that accepts GrafanaSmtpArgs and GrafanaSmtpOutput values. // You can construct a concrete instance of `GrafanaSmtpInput` via: // // GrafanaSmtpArgs{...} type GrafanaSmtpInput interface { pulumi.Input ToGrafanaSmtpOutput() GrafanaSmtpOutput ToGrafanaSmtpOutputWithContext(context.Context) GrafanaSmtpOutput } type GrafanaSmtpArgs struct { // Whether to enable the smtp setting of the Grafana instance. Defaults to `false`. Enabled pulumi.BoolPtrInput `pulumi:"enabled"` // Address used when sending emails. FromAddress pulumi.StringInput `pulumi:"fromAddress"` // Name used when sending emails. Defaults to `Azure Managed Grafana Notification`. FromName pulumi.StringPtrInput `pulumi:"fromName"` // SMTP server hostname with port, e.g. test.email.net:587 Host pulumi.StringInput `pulumi:"host"` // Password of SMTP authentication. Password pulumi.StringInput `pulumi:"password"` // Whether to use TLS when connecting to SMTP server. Possible values are `OpportunisticStartTLS`, `NoStartTLS`, `MandatoryStartTLS`. StartTlsPolicy pulumi.StringInput `pulumi:"startTlsPolicy"` // User of SMTP authentication. User pulumi.StringInput `pulumi:"user"` // Whether verify SSL for SMTP server. Defaults to `false`. VerificationSkipEnabled pulumi.BoolPtrInput `pulumi:"verificationSkipEnabled"` } func (GrafanaSmtpArgs) ElementType() reflect.Type { return reflect.TypeOf((*GrafanaSmtp)(nil)).Elem() } func (i GrafanaSmtpArgs) ToGrafanaSmtpOutput() GrafanaSmtpOutput { return i.ToGrafanaSmtpOutputWithContext(context.Background()) } func (i GrafanaSmtpArgs) ToGrafanaSmtpOutputWithContext(ctx context.Context) GrafanaSmtpOutput { return pulumi.ToOutputWithContext(ctx, i).(GrafanaSmtpOutput) } func (i GrafanaSmtpArgs) ToGrafanaSmtpPtrOutput() GrafanaSmtpPtrOutput { return i.ToGrafanaSmtpPtrOutputWithContext(context.Background()) } func (i GrafanaSmtpArgs) ToGrafanaSmtpPtrOutputWithContext(ctx context.Context) GrafanaSmtpPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(GrafanaSmtpOutput).ToGrafanaSmtpPtrOutputWithContext(ctx) } // GrafanaSmtpPtrInput is an input type that accepts GrafanaSmtpArgs, GrafanaSmtpPtr and GrafanaSmtpPtrOutput values. // You can construct a concrete instance of `GrafanaSmtpPtrInput` via: // // GrafanaSmtpArgs{...} // // or: // // nil type GrafanaSmtpPtrInput interface { pulumi.Input ToGrafanaSmtpPtrOutput() GrafanaSmtpPtrOutput ToGrafanaSmtpPtrOutputWithContext(context.Context) GrafanaSmtpPtrOutput } type grafanaSmtpPtrType GrafanaSmtpArgs func GrafanaSmtpPtr(v *GrafanaSmtpArgs) GrafanaSmtpPtrInput { return (*grafanaSmtpPtrType)(v) } func (*grafanaSmtpPtrType) ElementType() reflect.Type { return reflect.TypeOf((**GrafanaSmtp)(nil)).Elem() } func (i *grafanaSmtpPtrType) ToGrafanaSmtpPtrOutput() GrafanaSmtpPtrOutput { return i.ToGrafanaSmtpPtrOutputWithContext(context.Background()) } func (i *grafanaSmtpPtrType) ToGrafanaSmtpPtrOutputWithContext(ctx context.Context) GrafanaSmtpPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(GrafanaSmtpPtrOutput) } type GrafanaSmtpOutput struct{ *pulumi.OutputState } func (GrafanaSmtpOutput) ElementType() reflect.Type { return reflect.TypeOf((*GrafanaSmtp)(nil)).Elem() } func (o GrafanaSmtpOutput) ToGrafanaSmtpOutput() GrafanaSmtpOutput { return o } func (o GrafanaSmtpOutput) ToGrafanaSmtpOutputWithContext(ctx context.Context) GrafanaSmtpOutput { return o } func (o GrafanaSmtpOutput) ToGrafanaSmtpPtrOutput() GrafanaSmtpPtrOutput { return o.ToGrafanaSmtpPtrOutputWithContext(context.Background()) } func (o GrafanaSmtpOutput) ToGrafanaSmtpPtrOutputWithContext(ctx context.Context) GrafanaSmtpPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v GrafanaSmtp) *GrafanaSmtp { return &v }).(GrafanaSmtpPtrOutput) } // Whether to enable the smtp setting of the Grafana instance. Defaults to `false`. func (o GrafanaSmtpOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v GrafanaSmtp) *bool { return v.Enabled }).(pulumi.BoolPtrOutput) } // Address used when sending emails. func (o GrafanaSmtpOutput) FromAddress() pulumi.StringOutput { return o.ApplyT(func(v GrafanaSmtp) string { return v.FromAddress }).(pulumi.StringOutput) } // Name used when sending emails. Defaults to `Azure Managed Grafana Notification`. func (o GrafanaSmtpOutput) FromName() pulumi.StringPtrOutput { return o.ApplyT(func(v GrafanaSmtp) *string { return v.FromName }).(pulumi.StringPtrOutput) } // SMTP server hostname with port, e.g. test.email.net:587 func (o GrafanaSmtpOutput) Host() pulumi.StringOutput { return o.ApplyT(func(v GrafanaSmtp) string { return v.Host }).(pulumi.StringOutput) } // Password of SMTP authentication. func (o GrafanaSmtpOutput) Password() pulumi.StringOutput { return o.ApplyT(func(v GrafanaSmtp) string { return v.Password }).(pulumi.StringOutput) } // Whether to use TLS when connecting to SMTP server. Possible values are `OpportunisticStartTLS`, `NoStartTLS`, `MandatoryStartTLS`. func (o GrafanaSmtpOutput) StartTlsPolicy() pulumi.StringOutput { return o.ApplyT(func(v GrafanaSmtp) string { return v.StartTlsPolicy }).(pulumi.StringOutput) } // User of SMTP authentication. func (o GrafanaSmtpOutput) User() pulumi.StringOutput { return o.ApplyT(func(v GrafanaSmtp) string { return v.User }).(pulumi.StringOutput) } // Whether verify SSL for SMTP server. Defaults to `false`. func (o GrafanaSmtpOutput) VerificationSkipEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v GrafanaSmtp) *bool { return v.VerificationSkipEnabled }).(pulumi.BoolPtrOutput) } type GrafanaSmtpPtrOutput struct{ *pulumi.OutputState } func (GrafanaSmtpPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**GrafanaSmtp)(nil)).Elem() } func (o GrafanaSmtpPtrOutput) ToGrafanaSmtpPtrOutput() GrafanaSmtpPtrOutput { return o } func (o GrafanaSmtpPtrOutput) ToGrafanaSmtpPtrOutputWithContext(ctx context.Context) GrafanaSmtpPtrOutput { return o } func (o GrafanaSmtpPtrOutput) Elem() GrafanaSmtpOutput { return o.ApplyT(func(v *GrafanaSmtp) GrafanaSmtp { if v != nil { return *v } var ret GrafanaSmtp return ret }).(GrafanaSmtpOutput) } // Whether to enable the smtp setting of the Grafana instance. Defaults to `false`. func (o GrafanaSmtpPtrOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *GrafanaSmtp) *bool { if v == nil { return nil } return v.Enabled }).(pulumi.BoolPtrOutput) } // Address used when sending emails. func (o GrafanaSmtpPtrOutput) FromAddress() pulumi.StringPtrOutput { return o.ApplyT(func(v *GrafanaSmtp) *string { if v == nil { return nil } return &v.FromAddress }).(pulumi.StringPtrOutput) } // Name used when sending emails. Defaults to `Azure Managed Grafana Notification`. func (o GrafanaSmtpPtrOutput) FromName() pulumi.StringPtrOutput { return o.ApplyT(func(v *GrafanaSmtp) *string { if v == nil { return nil } return v.FromName }).(pulumi.StringPtrOutput) } // SMTP server hostname with port, e.g. test.email.net:587 func (o GrafanaSmtpPtrOutput) Host() pulumi.StringPtrOutput { return o.ApplyT(func(v *GrafanaSmtp) *string { if v == nil { return nil } return &v.Host }).(pulumi.StringPtrOutput) } // Password of SMTP authentication. func (o GrafanaSmtpPtrOutput) Password() pulumi.StringPtrOutput { return o.ApplyT(func(v *GrafanaSmtp) *string { if v == nil { return nil } return &v.Password }).(pulumi.StringPtrOutput) } // Whether to use TLS when connecting to SMTP server. Possible values are `OpportunisticStartTLS`, `NoStartTLS`, `MandatoryStartTLS`. func (o GrafanaSmtpPtrOutput) StartTlsPolicy() pulumi.StringPtrOutput { return o.ApplyT(func(v *GrafanaSmtp) *string { if v == nil { return nil } return &v.StartTlsPolicy }).(pulumi.StringPtrOutput) } // User of SMTP authentication. func (o GrafanaSmtpPtrOutput) User() pulumi.StringPtrOutput { return o.ApplyT(func(v *GrafanaSmtp) *string { if v == nil { return nil } return &v.User }).(pulumi.StringPtrOutput) } // Whether verify SSL for SMTP server. Defaults to `false`. func (o GrafanaSmtpPtrOutput) VerificationSkipEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *GrafanaSmtp) *bool { if v == nil { return nil } return v.VerificationSkipEnabled }).(pulumi.BoolPtrOutput) } type GetGrafanaAzureMonitorWorkspaceIntegration struct { ResourceId string `pulumi:"resourceId"` } // GetGrafanaAzureMonitorWorkspaceIntegrationInput is an input type that accepts GetGrafanaAzureMonitorWorkspaceIntegrationArgs and GetGrafanaAzureMonitorWorkspaceIntegrationOutput values. // You can construct a concrete instance of `GetGrafanaAzureMonitorWorkspaceIntegrationInput` via: // // GetGrafanaAzureMonitorWorkspaceIntegrationArgs{...} type GetGrafanaAzureMonitorWorkspaceIntegrationInput interface { pulumi.Input ToGetGrafanaAzureMonitorWorkspaceIntegrationOutput() GetGrafanaAzureMonitorWorkspaceIntegrationOutput ToGetGrafanaAzureMonitorWorkspaceIntegrationOutputWithContext(context.Context) GetGrafanaAzureMonitorWorkspaceIntegrationOutput } type GetGrafanaAzureMonitorWorkspaceIntegrationArgs struct { ResourceId pulumi.StringInput `pulumi:"resourceId"` } func (GetGrafanaAzureMonitorWorkspaceIntegrationArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetGrafanaAzureMonitorWorkspaceIntegration)(nil)).Elem() } func (i GetGrafanaAzureMonitorWorkspaceIntegrationArgs) ToGetGrafanaAzureMonitorWorkspaceIntegrationOutput() GetGrafanaAzureMonitorWorkspaceIntegrationOutput { return i.ToGetGrafanaAzureMonitorWorkspaceIntegrationOutputWithContext(context.Background()) } func (i GetGrafanaAzureMonitorWorkspaceIntegrationArgs) ToGetGrafanaAzureMonitorWorkspaceIntegrationOutputWithContext(ctx context.Context) GetGrafanaAzureMonitorWorkspaceIntegrationOutput { return pulumi.ToOutputWithContext(ctx, i).(GetGrafanaAzureMonitorWorkspaceIntegrationOutput) } // GetGrafanaAzureMonitorWorkspaceIntegrationArrayInput is an input type that accepts GetGrafanaAzureMonitorWorkspaceIntegrationArray and GetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput values. // You can construct a concrete instance of `GetGrafanaAzureMonitorWorkspaceIntegrationArrayInput` via: // // GetGrafanaAzureMonitorWorkspaceIntegrationArray{ GetGrafanaAzureMonitorWorkspaceIntegrationArgs{...} } type GetGrafanaAzureMonitorWorkspaceIntegrationArrayInput interface { pulumi.Input ToGetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput() GetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput ToGetGrafanaAzureMonitorWorkspaceIntegrationArrayOutputWithContext(context.Context) GetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput } type GetGrafanaAzureMonitorWorkspaceIntegrationArray []GetGrafanaAzureMonitorWorkspaceIntegrationInput func (GetGrafanaAzureMonitorWorkspaceIntegrationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]GetGrafanaAzureMonitorWorkspaceIntegration)(nil)).Elem() } func (i GetGrafanaAzureMonitorWorkspaceIntegrationArray) ToGetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput() GetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput { return i.ToGetGrafanaAzureMonitorWorkspaceIntegrationArrayOutputWithContext(context.Background()) } func (i GetGrafanaAzureMonitorWorkspaceIntegrationArray) ToGetGrafanaAzureMonitorWorkspaceIntegrationArrayOutputWithContext(ctx context.Context) GetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput) } type GetGrafanaAzureMonitorWorkspaceIntegrationOutput struct{ *pulumi.OutputState } func (GetGrafanaAzureMonitorWorkspaceIntegrationOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetGrafanaAzureMonitorWorkspaceIntegration)(nil)).Elem() } func (o GetGrafanaAzureMonitorWorkspaceIntegrationOutput) ToGetGrafanaAzureMonitorWorkspaceIntegrationOutput() GetGrafanaAzureMonitorWorkspaceIntegrationOutput { return o } func (o GetGrafanaAzureMonitorWorkspaceIntegrationOutput) ToGetGrafanaAzureMonitorWorkspaceIntegrationOutputWithContext(ctx context.Context) GetGrafanaAzureMonitorWorkspaceIntegrationOutput { return o } func (o GetGrafanaAzureMonitorWorkspaceIntegrationOutput) ResourceId() pulumi.StringOutput { return o.ApplyT(func(v GetGrafanaAzureMonitorWorkspaceIntegration) string { return v.ResourceId }).(pulumi.StringOutput) } type GetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput struct{ *pulumi.OutputState } func (GetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]GetGrafanaAzureMonitorWorkspaceIntegration)(nil)).Elem() } func (o GetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput) ToGetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput() GetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput { return o } func (o GetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput) ToGetGrafanaAzureMonitorWorkspaceIntegrationArrayOutputWithContext(ctx context.Context) GetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput { return o } func (o GetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput) Index(i pulumi.IntInput) GetGrafanaAzureMonitorWorkspaceIntegrationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetGrafanaAzureMonitorWorkspaceIntegration { return vs[0].([]GetGrafanaAzureMonitorWorkspaceIntegration)[vs[1].(int)] }).(GetGrafanaAzureMonitorWorkspaceIntegrationOutput) } type GetGrafanaIdentity struct { IdentityIds []string `pulumi:"identityIds"` PrincipalId string `pulumi:"principalId"` TenantId string `pulumi:"tenantId"` Type string `pulumi:"type"` } // GetGrafanaIdentityInput is an input type that accepts GetGrafanaIdentityArgs and GetGrafanaIdentityOutput values. // You can construct a concrete instance of `GetGrafanaIdentityInput` via: // // GetGrafanaIdentityArgs{...} type GetGrafanaIdentityInput interface { pulumi.Input ToGetGrafanaIdentityOutput() GetGrafanaIdentityOutput ToGetGrafanaIdentityOutputWithContext(context.Context) GetGrafanaIdentityOutput } type GetGrafanaIdentityArgs struct { IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"` PrincipalId pulumi.StringInput `pulumi:"principalId"` TenantId pulumi.StringInput `pulumi:"tenantId"` Type pulumi.StringInput `pulumi:"type"` } func (GetGrafanaIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetGrafanaIdentity)(nil)).Elem() } func (i GetGrafanaIdentityArgs) ToGetGrafanaIdentityOutput() GetGrafanaIdentityOutput { return i.ToGetGrafanaIdentityOutputWithContext(context.Background()) } func (i GetGrafanaIdentityArgs) ToGetGrafanaIdentityOutputWithContext(ctx context.Context) GetGrafanaIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(GetGrafanaIdentityOutput) } func (i GetGrafanaIdentityArgs) ToGetGrafanaIdentityPtrOutput() GetGrafanaIdentityPtrOutput { return i.ToGetGrafanaIdentityPtrOutputWithContext(context.Background()) } func (i GetGrafanaIdentityArgs) ToGetGrafanaIdentityPtrOutputWithContext(ctx context.Context) GetGrafanaIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(GetGrafanaIdentityOutput).ToGetGrafanaIdentityPtrOutputWithContext(ctx) } // GetGrafanaIdentityPtrInput is an input type that accepts GetGrafanaIdentityArgs, GetGrafanaIdentityPtr and GetGrafanaIdentityPtrOutput values. // You can construct a concrete instance of `GetGrafanaIdentityPtrInput` via: // // GetGrafanaIdentityArgs{...} // // or: // // nil type GetGrafanaIdentityPtrInput interface { pulumi.Input ToGetGrafanaIdentityPtrOutput() GetGrafanaIdentityPtrOutput ToGetGrafanaIdentityPtrOutputWithContext(context.Context) GetGrafanaIdentityPtrOutput } type getGrafanaIdentityPtrType GetGrafanaIdentityArgs func GetGrafanaIdentityPtr(v *GetGrafanaIdentityArgs) GetGrafanaIdentityPtrInput { return (*getGrafanaIdentityPtrType)(v) } func (*getGrafanaIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**GetGrafanaIdentity)(nil)).Elem() } func (i *getGrafanaIdentityPtrType) ToGetGrafanaIdentityPtrOutput() GetGrafanaIdentityPtrOutput { return i.ToGetGrafanaIdentityPtrOutputWithContext(context.Background()) } func (i *getGrafanaIdentityPtrType) ToGetGrafanaIdentityPtrOutputWithContext(ctx context.Context) GetGrafanaIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(GetGrafanaIdentityPtrOutput) } type GetGrafanaIdentityOutput struct{ *pulumi.OutputState } func (GetGrafanaIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetGrafanaIdentity)(nil)).Elem() } func (o GetGrafanaIdentityOutput) ToGetGrafanaIdentityOutput() GetGrafanaIdentityOutput { return o } func (o GetGrafanaIdentityOutput) ToGetGrafanaIdentityOutputWithContext(ctx context.Context) GetGrafanaIdentityOutput { return o } func (o GetGrafanaIdentityOutput) ToGetGrafanaIdentityPtrOutput() GetGrafanaIdentityPtrOutput { return o.ToGetGrafanaIdentityPtrOutputWithContext(context.Background()) } func (o GetGrafanaIdentityOutput) ToGetGrafanaIdentityPtrOutputWithContext(ctx context.Context) GetGrafanaIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v GetGrafanaIdentity) *GetGrafanaIdentity { return &v }).(GetGrafanaIdentityPtrOutput) } func (o GetGrafanaIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v GetGrafanaIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } func (o GetGrafanaIdentityOutput) PrincipalId() pulumi.StringOutput { return o.ApplyT(func(v GetGrafanaIdentity) string { return v.PrincipalId }).(pulumi.StringOutput) } func (o GetGrafanaIdentityOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v GetGrafanaIdentity) string { return v.TenantId }).(pulumi.StringOutput) } func (o GetGrafanaIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v GetGrafanaIdentity) string { return v.Type }).(pulumi.StringOutput) } type GetGrafanaIdentityPtrOutput struct{ *pulumi.OutputState } func (GetGrafanaIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**GetGrafanaIdentity)(nil)).Elem() } func (o GetGrafanaIdentityPtrOutput) ToGetGrafanaIdentityPtrOutput() GetGrafanaIdentityPtrOutput { return o } func (o GetGrafanaIdentityPtrOutput) ToGetGrafanaIdentityPtrOutputWithContext(ctx context.Context) GetGrafanaIdentityPtrOutput { return o } func (o GetGrafanaIdentityPtrOutput) Elem() GetGrafanaIdentityOutput { return o.ApplyT(func(v *GetGrafanaIdentity) GetGrafanaIdentity { if v != nil { return *v } var ret GetGrafanaIdentity return ret }).(GetGrafanaIdentityOutput) } func (o GetGrafanaIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *GetGrafanaIdentity) []string { if v == nil { return nil } return v.IdentityIds }).(pulumi.StringArrayOutput)
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/dashboard/getGrafana.go
sdk/go/azure/dashboard/getGrafana.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 dashboard 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 Grafana Dashboard. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/dashboard" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := dashboard.LookupGrafana(ctx, &dashboard.LookupGrafanaArgs{ // Name: "example-grafana-dashboard", // ResourceGroupName: "example-rg", // }, 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.Dashboard` - 2025-08-01 func LookupGrafana(ctx *pulumi.Context, args *LookupGrafanaArgs, opts ...pulumi.InvokeOption) (*LookupGrafanaResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupGrafanaResult err := ctx.Invoke("azure:dashboard/getGrafana:getGrafana", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getGrafana. type LookupGrafanaArgs struct { // The managed identity of the grafana resource. Identity *GetGrafanaIdentity `pulumi:"identity"` // Name of the grafana dashboard. Name string `pulumi:"name"` // Name of the resource group where resource belongs to. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getGrafana. type LookupGrafanaResult struct { // Whether the api key setting of the Grafana instance is enabled. ApiKeyEnabled bool `pulumi:"apiKeyEnabled"` // Scope for dns deterministic name hash calculation. AutoGeneratedDomainNameLabelScope string `pulumi:"autoGeneratedDomainNameLabelScope"` // Integrations for Azure Monitor Workspace. AzureMonitorWorkspaceIntegrations []GetGrafanaAzureMonitorWorkspaceIntegration `pulumi:"azureMonitorWorkspaceIntegrations"` // Whether the Grafana instance uses deterministic outbound IPs. DeterministicOutboundIpEnabled bool `pulumi:"deterministicOutboundIpEnabled"` // The endpoint of the Grafana instance. Endpoint string `pulumi:"endpoint"` // Major version of Grafana instance. GrafanaMajorVersion string `pulumi:"grafanaMajorVersion"` // The full Grafana software semantic version deployed. GrafanaVersion string `pulumi:"grafanaVersion"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The managed identity of the grafana resource. Identity *GetGrafanaIdentity `pulumi:"identity"` // Azure location where the resource exists. Location string `pulumi:"location"` Name string `pulumi:"name"` OutboundIps []string `pulumi:"outboundIps"` // Whether or not public endpoint access is allowed for this server. PublicNetworkAccessEnabled bool `pulumi:"publicNetworkAccessEnabled"` ResourceGroupName string `pulumi:"resourceGroupName"` // The name of the SKU used for the Grafana instance. Sku string `pulumi:"sku"` // A mapping of tags to assigned to the resource. Tags map[string]string `pulumi:"tags"` // The zone redundancy setting of the Grafana instance. ZoneRedundancyEnabled bool `pulumi:"zoneRedundancyEnabled"` } func LookupGrafanaOutput(ctx *pulumi.Context, args LookupGrafanaOutputArgs, opts ...pulumi.InvokeOption) LookupGrafanaResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupGrafanaResultOutput, error) { args := v.(LookupGrafanaArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:dashboard/getGrafana:getGrafana", args, LookupGrafanaResultOutput{}, options).(LookupGrafanaResultOutput), nil }).(LookupGrafanaResultOutput) } // A collection of arguments for invoking getGrafana. type LookupGrafanaOutputArgs struct { // The managed identity of the grafana resource. Identity GetGrafanaIdentityPtrInput `pulumi:"identity"` // Name of the grafana dashboard. Name pulumi.StringInput `pulumi:"name"` // Name of the resource group where resource belongs to. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupGrafanaOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupGrafanaArgs)(nil)).Elem() } // A collection of values returned by getGrafana. type LookupGrafanaResultOutput struct{ *pulumi.OutputState } func (LookupGrafanaResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupGrafanaResult)(nil)).Elem() } func (o LookupGrafanaResultOutput) ToLookupGrafanaResultOutput() LookupGrafanaResultOutput { return o } func (o LookupGrafanaResultOutput) ToLookupGrafanaResultOutputWithContext(ctx context.Context) LookupGrafanaResultOutput { return o } // Whether the api key setting of the Grafana instance is enabled. func (o LookupGrafanaResultOutput) ApiKeyEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupGrafanaResult) bool { return v.ApiKeyEnabled }).(pulumi.BoolOutput) } // Scope for dns deterministic name hash calculation. func (o LookupGrafanaResultOutput) AutoGeneratedDomainNameLabelScope() pulumi.StringOutput { return o.ApplyT(func(v LookupGrafanaResult) string { return v.AutoGeneratedDomainNameLabelScope }).(pulumi.StringOutput) } // Integrations for Azure Monitor Workspace. func (o LookupGrafanaResultOutput) AzureMonitorWorkspaceIntegrations() GetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput { return o.ApplyT(func(v LookupGrafanaResult) []GetGrafanaAzureMonitorWorkspaceIntegration { return v.AzureMonitorWorkspaceIntegrations }).(GetGrafanaAzureMonitorWorkspaceIntegrationArrayOutput) } // Whether the Grafana instance uses deterministic outbound IPs. func (o LookupGrafanaResultOutput) DeterministicOutboundIpEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupGrafanaResult) bool { return v.DeterministicOutboundIpEnabled }).(pulumi.BoolOutput) } // The endpoint of the Grafana instance. func (o LookupGrafanaResultOutput) Endpoint() pulumi.StringOutput { return o.ApplyT(func(v LookupGrafanaResult) string { return v.Endpoint }).(pulumi.StringOutput) } // Major version of Grafana instance. func (o LookupGrafanaResultOutput) GrafanaMajorVersion() pulumi.StringOutput { return o.ApplyT(func(v LookupGrafanaResult) string { return v.GrafanaMajorVersion }).(pulumi.StringOutput) } // The full Grafana software semantic version deployed. func (o LookupGrafanaResultOutput) GrafanaVersion() pulumi.StringOutput { return o.ApplyT(func(v LookupGrafanaResult) string { return v.GrafanaVersion }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupGrafanaResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupGrafanaResult) string { return v.Id }).(pulumi.StringOutput) } // The managed identity of the grafana resource. func (o LookupGrafanaResultOutput) Identity() GetGrafanaIdentityPtrOutput { return o.ApplyT(func(v LookupGrafanaResult) *GetGrafanaIdentity { return v.Identity }).(GetGrafanaIdentityPtrOutput) } // Azure location where the resource exists. func (o LookupGrafanaResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupGrafanaResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupGrafanaResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupGrafanaResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupGrafanaResultOutput) OutboundIps() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupGrafanaResult) []string { return v.OutboundIps }).(pulumi.StringArrayOutput) } // Whether or not public endpoint access is allowed for this server. func (o LookupGrafanaResultOutput) PublicNetworkAccessEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupGrafanaResult) bool { return v.PublicNetworkAccessEnabled }).(pulumi.BoolOutput) } func (o LookupGrafanaResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupGrafanaResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The name of the SKU used for the Grafana instance. func (o LookupGrafanaResultOutput) Sku() pulumi.StringOutput { return o.ApplyT(func(v LookupGrafanaResult) string { return v.Sku }).(pulumi.StringOutput) } // A mapping of tags to assigned to the resource. func (o LookupGrafanaResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupGrafanaResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The zone redundancy setting of the Grafana instance. func (o LookupGrafanaResultOutput) ZoneRedundancyEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupGrafanaResult) bool { return v.ZoneRedundancyEnabled }).(pulumi.BoolOutput) } func init() { pulumi.RegisterOutputType(LookupGrafanaResultOutput{}) }
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/dashboard/grafana.go
sdk/go/azure/dashboard/grafana.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 dashboard import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Dashboard Grafana. // // ## 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/dashboard" // "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 = dashboard.NewGrafana(ctx, "example", &dashboard.GrafanaArgs{ // Name: pulumi.String("example-dg"), // ResourceGroupName: example.Name, // Location: pulumi.String("West Europe"), // GrafanaMajorVersion: pulumi.String("11"), // ApiKeyEnabled: pulumi.Bool(true), // DeterministicOutboundIpEnabled: pulumi.Bool(true), // PublicNetworkAccessEnabled: pulumi.Bool(false), // Identity: &dashboard.GrafanaIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // 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.Dashboard` - 2025-08-01 // // ## Import // // Dashboard Grafana can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:dashboard/grafana:Grafana example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Dashboard/grafana/workspace1 // ``` type Grafana struct { pulumi.CustomResourceState // Whether to enable the api key setting of the Grafana instance. Defaults to `false`. ApiKeyEnabled pulumi.BoolPtrOutput `pulumi:"apiKeyEnabled"` // Scope for dns deterministic name hash calculation. The only possible value is `TenantReuse`. Defaults to `TenantReuse`. AutoGeneratedDomainNameLabelScope pulumi.StringPtrOutput `pulumi:"autoGeneratedDomainNameLabelScope"` // A `azureMonitorWorkspaceIntegrations` block as defined below. AzureMonitorWorkspaceIntegrations GrafanaAzureMonitorWorkspaceIntegrationArrayOutput `pulumi:"azureMonitorWorkspaceIntegrations"` // Whether to enable the Grafana instance to use deterministic outbound IPs. Defaults to `false`. DeterministicOutboundIpEnabled pulumi.BoolPtrOutput `pulumi:"deterministicOutboundIpEnabled"` // The endpoint of the Grafana instance. Endpoint pulumi.StringOutput `pulumi:"endpoint"` // Which major version of Grafana to deploy. Possible values are `10`, `11`. GrafanaMajorVersion pulumi.StringOutput `pulumi:"grafanaMajorVersion"` // The full Grafana software semantic version deployed. GrafanaVersion pulumi.StringOutput `pulumi:"grafanaVersion"` // An `identity` block as defined below. Changing this forces a new Dashboard Grafana to be created. Identity GrafanaIdentityPtrOutput `pulumi:"identity"` // Specifies the Azure Region where the Dashboard Grafana should exist. Changing this forces a new Dashboard Grafana to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name which should be used for this Dashboard Grafana. Changing this forces a new Dashboard Grafana to be created. Name pulumi.StringOutput `pulumi:"name"` // List of outbound IPs if deterministicOutboundIP is enabled. OutboundIps pulumi.StringArrayOutput `pulumi:"outboundIps"` // Whether to enable traffic over the public interface. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // Specifies the name of the Resource Group where the Dashboard Grafana should exist. Changing this forces a new Dashboard Grafana to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The name of the SKU used for the Grafana instance. Possible values are `Standard` and `Essential`. Defaults to `Standard`. Changing this forces a new Dashboard Grafana to be created. Sku pulumi.StringPtrOutput `pulumi:"sku"` // A `smtp` block as defined below. Smtp GrafanaSmtpPtrOutput `pulumi:"smtp"` // A mapping of tags which should be assigned to the Dashboard Grafana. Tags pulumi.StringMapOutput `pulumi:"tags"` // Whether to enable the zone redundancy setting of the Grafana instance. Defaults to `false`. Changing this forces a new Dashboard Grafana to be created. ZoneRedundancyEnabled pulumi.BoolPtrOutput `pulumi:"zoneRedundancyEnabled"` } // NewGrafana registers a new resource with the given unique name, arguments, and options. func NewGrafana(ctx *pulumi.Context, name string, args *GrafanaArgs, opts ...pulumi.ResourceOption) (*Grafana, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.GrafanaMajorVersion == nil { return nil, errors.New("invalid value for required argument 'GrafanaMajorVersion'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Grafana err := ctx.RegisterResource("azure:dashboard/grafana:Grafana", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetGrafana gets an existing Grafana 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 GetGrafana(ctx *pulumi.Context, name string, id pulumi.IDInput, state *GrafanaState, opts ...pulumi.ResourceOption) (*Grafana, error) { var resource Grafana err := ctx.ReadResource("azure:dashboard/grafana:Grafana", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Grafana resources. type grafanaState struct { // Whether to enable the api key setting of the Grafana instance. Defaults to `false`. ApiKeyEnabled *bool `pulumi:"apiKeyEnabled"` // Scope for dns deterministic name hash calculation. The only possible value is `TenantReuse`. Defaults to `TenantReuse`. AutoGeneratedDomainNameLabelScope *string `pulumi:"autoGeneratedDomainNameLabelScope"` // A `azureMonitorWorkspaceIntegrations` block as defined below. AzureMonitorWorkspaceIntegrations []GrafanaAzureMonitorWorkspaceIntegration `pulumi:"azureMonitorWorkspaceIntegrations"` // Whether to enable the Grafana instance to use deterministic outbound IPs. Defaults to `false`. DeterministicOutboundIpEnabled *bool `pulumi:"deterministicOutboundIpEnabled"` // The endpoint of the Grafana instance. Endpoint *string `pulumi:"endpoint"` // Which major version of Grafana to deploy. Possible values are `10`, `11`. GrafanaMajorVersion *string `pulumi:"grafanaMajorVersion"` // The full Grafana software semantic version deployed. GrafanaVersion *string `pulumi:"grafanaVersion"` // An `identity` block as defined below. Changing this forces a new Dashboard Grafana to be created. Identity *GrafanaIdentity `pulumi:"identity"` // Specifies the Azure Region where the Dashboard Grafana should exist. Changing this forces a new Dashboard Grafana to be created. Location *string `pulumi:"location"` // Specifies the name which should be used for this Dashboard Grafana. Changing this forces a new Dashboard Grafana to be created. Name *string `pulumi:"name"` // List of outbound IPs if deterministicOutboundIP is enabled. OutboundIps []string `pulumi:"outboundIps"` // Whether to enable traffic over the public interface. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // Specifies the name of the Resource Group where the Dashboard Grafana should exist. Changing this forces a new Dashboard Grafana to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The name of the SKU used for the Grafana instance. Possible values are `Standard` and `Essential`. Defaults to `Standard`. Changing this forces a new Dashboard Grafana to be created. Sku *string `pulumi:"sku"` // A `smtp` block as defined below. Smtp *GrafanaSmtp `pulumi:"smtp"` // A mapping of tags which should be assigned to the Dashboard Grafana. Tags map[string]string `pulumi:"tags"` // Whether to enable the zone redundancy setting of the Grafana instance. Defaults to `false`. Changing this forces a new Dashboard Grafana to be created. ZoneRedundancyEnabled *bool `pulumi:"zoneRedundancyEnabled"` } type GrafanaState struct { // Whether to enable the api key setting of the Grafana instance. Defaults to `false`. ApiKeyEnabled pulumi.BoolPtrInput // Scope for dns deterministic name hash calculation. The only possible value is `TenantReuse`. Defaults to `TenantReuse`. AutoGeneratedDomainNameLabelScope pulumi.StringPtrInput // A `azureMonitorWorkspaceIntegrations` block as defined below. AzureMonitorWorkspaceIntegrations GrafanaAzureMonitorWorkspaceIntegrationArrayInput // Whether to enable the Grafana instance to use deterministic outbound IPs. Defaults to `false`. DeterministicOutboundIpEnabled pulumi.BoolPtrInput // The endpoint of the Grafana instance. Endpoint pulumi.StringPtrInput // Which major version of Grafana to deploy. Possible values are `10`, `11`. GrafanaMajorVersion pulumi.StringPtrInput // The full Grafana software semantic version deployed. GrafanaVersion pulumi.StringPtrInput // An `identity` block as defined below. Changing this forces a new Dashboard Grafana to be created. Identity GrafanaIdentityPtrInput // Specifies the Azure Region where the Dashboard Grafana should exist. Changing this forces a new Dashboard Grafana to be created. Location pulumi.StringPtrInput // Specifies the name which should be used for this Dashboard Grafana. Changing this forces a new Dashboard Grafana to be created. Name pulumi.StringPtrInput // List of outbound IPs if deterministicOutboundIP is enabled. OutboundIps pulumi.StringArrayInput // Whether to enable traffic over the public interface. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // Specifies the name of the Resource Group where the Dashboard Grafana should exist. Changing this forces a new Dashboard Grafana to be created. ResourceGroupName pulumi.StringPtrInput // The name of the SKU used for the Grafana instance. Possible values are `Standard` and `Essential`. Defaults to `Standard`. Changing this forces a new Dashboard Grafana to be created. Sku pulumi.StringPtrInput // A `smtp` block as defined below. Smtp GrafanaSmtpPtrInput // A mapping of tags which should be assigned to the Dashboard Grafana. Tags pulumi.StringMapInput // Whether to enable the zone redundancy setting of the Grafana instance. Defaults to `false`. Changing this forces a new Dashboard Grafana to be created. ZoneRedundancyEnabled pulumi.BoolPtrInput } func (GrafanaState) ElementType() reflect.Type { return reflect.TypeOf((*grafanaState)(nil)).Elem() } type grafanaArgs struct { // Whether to enable the api key setting of the Grafana instance. Defaults to `false`. ApiKeyEnabled *bool `pulumi:"apiKeyEnabled"` // Scope for dns deterministic name hash calculation. The only possible value is `TenantReuse`. Defaults to `TenantReuse`. AutoGeneratedDomainNameLabelScope *string `pulumi:"autoGeneratedDomainNameLabelScope"` // A `azureMonitorWorkspaceIntegrations` block as defined below. AzureMonitorWorkspaceIntegrations []GrafanaAzureMonitorWorkspaceIntegration `pulumi:"azureMonitorWorkspaceIntegrations"` // Whether to enable the Grafana instance to use deterministic outbound IPs. Defaults to `false`. DeterministicOutboundIpEnabled *bool `pulumi:"deterministicOutboundIpEnabled"` // Which major version of Grafana to deploy. Possible values are `10`, `11`. GrafanaMajorVersion string `pulumi:"grafanaMajorVersion"` // An `identity` block as defined below. Changing this forces a new Dashboard Grafana to be created. Identity *GrafanaIdentity `pulumi:"identity"` // Specifies the Azure Region where the Dashboard Grafana should exist. Changing this forces a new Dashboard Grafana to be created. Location *string `pulumi:"location"` // Specifies the name which should be used for this Dashboard Grafana. Changing this forces a new Dashboard Grafana to be created. Name *string `pulumi:"name"` // Whether to enable traffic over the public interface. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // Specifies the name of the Resource Group where the Dashboard Grafana should exist. Changing this forces a new Dashboard Grafana to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The name of the SKU used for the Grafana instance. Possible values are `Standard` and `Essential`. Defaults to `Standard`. Changing this forces a new Dashboard Grafana to be created. Sku *string `pulumi:"sku"` // A `smtp` block as defined below. Smtp *GrafanaSmtp `pulumi:"smtp"` // A mapping of tags which should be assigned to the Dashboard Grafana. Tags map[string]string `pulumi:"tags"` // Whether to enable the zone redundancy setting of the Grafana instance. Defaults to `false`. Changing this forces a new Dashboard Grafana to be created. ZoneRedundancyEnabled *bool `pulumi:"zoneRedundancyEnabled"` } // The set of arguments for constructing a Grafana resource. type GrafanaArgs struct { // Whether to enable the api key setting of the Grafana instance. Defaults to `false`. ApiKeyEnabled pulumi.BoolPtrInput // Scope for dns deterministic name hash calculation. The only possible value is `TenantReuse`. Defaults to `TenantReuse`. AutoGeneratedDomainNameLabelScope pulumi.StringPtrInput // A `azureMonitorWorkspaceIntegrations` block as defined below. AzureMonitorWorkspaceIntegrations GrafanaAzureMonitorWorkspaceIntegrationArrayInput // Whether to enable the Grafana instance to use deterministic outbound IPs. Defaults to `false`. DeterministicOutboundIpEnabled pulumi.BoolPtrInput // Which major version of Grafana to deploy. Possible values are `10`, `11`. GrafanaMajorVersion pulumi.StringInput // An `identity` block as defined below. Changing this forces a new Dashboard Grafana to be created. Identity GrafanaIdentityPtrInput // Specifies the Azure Region where the Dashboard Grafana should exist. Changing this forces a new Dashboard Grafana to be created. Location pulumi.StringPtrInput // Specifies the name which should be used for this Dashboard Grafana. Changing this forces a new Dashboard Grafana to be created. Name pulumi.StringPtrInput // Whether to enable traffic over the public interface. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // Specifies the name of the Resource Group where the Dashboard Grafana should exist. Changing this forces a new Dashboard Grafana to be created. ResourceGroupName pulumi.StringInput // The name of the SKU used for the Grafana instance. Possible values are `Standard` and `Essential`. Defaults to `Standard`. Changing this forces a new Dashboard Grafana to be created. Sku pulumi.StringPtrInput // A `smtp` block as defined below. Smtp GrafanaSmtpPtrInput // A mapping of tags which should be assigned to the Dashboard Grafana. Tags pulumi.StringMapInput // Whether to enable the zone redundancy setting of the Grafana instance. Defaults to `false`. Changing this forces a new Dashboard Grafana to be created. ZoneRedundancyEnabled pulumi.BoolPtrInput } func (GrafanaArgs) ElementType() reflect.Type { return reflect.TypeOf((*grafanaArgs)(nil)).Elem() } type GrafanaInput interface { pulumi.Input ToGrafanaOutput() GrafanaOutput ToGrafanaOutputWithContext(ctx context.Context) GrafanaOutput } func (*Grafana) ElementType() reflect.Type { return reflect.TypeOf((**Grafana)(nil)).Elem() } func (i *Grafana) ToGrafanaOutput() GrafanaOutput { return i.ToGrafanaOutputWithContext(context.Background()) } func (i *Grafana) ToGrafanaOutputWithContext(ctx context.Context) GrafanaOutput { return pulumi.ToOutputWithContext(ctx, i).(GrafanaOutput) } // GrafanaArrayInput is an input type that accepts GrafanaArray and GrafanaArrayOutput values. // You can construct a concrete instance of `GrafanaArrayInput` via: // // GrafanaArray{ GrafanaArgs{...} } type GrafanaArrayInput interface { pulumi.Input ToGrafanaArrayOutput() GrafanaArrayOutput ToGrafanaArrayOutputWithContext(context.Context) GrafanaArrayOutput } type GrafanaArray []GrafanaInput func (GrafanaArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Grafana)(nil)).Elem() } func (i GrafanaArray) ToGrafanaArrayOutput() GrafanaArrayOutput { return i.ToGrafanaArrayOutputWithContext(context.Background()) } func (i GrafanaArray) ToGrafanaArrayOutputWithContext(ctx context.Context) GrafanaArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GrafanaArrayOutput) } // GrafanaMapInput is an input type that accepts GrafanaMap and GrafanaMapOutput values. // You can construct a concrete instance of `GrafanaMapInput` via: // // GrafanaMap{ "key": GrafanaArgs{...} } type GrafanaMapInput interface { pulumi.Input ToGrafanaMapOutput() GrafanaMapOutput ToGrafanaMapOutputWithContext(context.Context) GrafanaMapOutput } type GrafanaMap map[string]GrafanaInput func (GrafanaMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Grafana)(nil)).Elem() } func (i GrafanaMap) ToGrafanaMapOutput() GrafanaMapOutput { return i.ToGrafanaMapOutputWithContext(context.Background()) } func (i GrafanaMap) ToGrafanaMapOutputWithContext(ctx context.Context) GrafanaMapOutput { return pulumi.ToOutputWithContext(ctx, i).(GrafanaMapOutput) } type GrafanaOutput struct{ *pulumi.OutputState } func (GrafanaOutput) ElementType() reflect.Type { return reflect.TypeOf((**Grafana)(nil)).Elem() } func (o GrafanaOutput) ToGrafanaOutput() GrafanaOutput { return o } func (o GrafanaOutput) ToGrafanaOutputWithContext(ctx context.Context) GrafanaOutput { return o } // Whether to enable the api key setting of the Grafana instance. Defaults to `false`. func (o GrafanaOutput) ApiKeyEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Grafana) pulumi.BoolPtrOutput { return v.ApiKeyEnabled }).(pulumi.BoolPtrOutput) } // Scope for dns deterministic name hash calculation. The only possible value is `TenantReuse`. Defaults to `TenantReuse`. func (o GrafanaOutput) AutoGeneratedDomainNameLabelScope() pulumi.StringPtrOutput { return o.ApplyT(func(v *Grafana) pulumi.StringPtrOutput { return v.AutoGeneratedDomainNameLabelScope }).(pulumi.StringPtrOutput) } // A `azureMonitorWorkspaceIntegrations` block as defined below. func (o GrafanaOutput) AzureMonitorWorkspaceIntegrations() GrafanaAzureMonitorWorkspaceIntegrationArrayOutput { return o.ApplyT(func(v *Grafana) GrafanaAzureMonitorWorkspaceIntegrationArrayOutput { return v.AzureMonitorWorkspaceIntegrations }).(GrafanaAzureMonitorWorkspaceIntegrationArrayOutput) } // Whether to enable the Grafana instance to use deterministic outbound IPs. Defaults to `false`. func (o GrafanaOutput) DeterministicOutboundIpEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Grafana) pulumi.BoolPtrOutput { return v.DeterministicOutboundIpEnabled }).(pulumi.BoolPtrOutput) } // The endpoint of the Grafana instance. func (o GrafanaOutput) Endpoint() pulumi.StringOutput { return o.ApplyT(func(v *Grafana) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput) } // Which major version of Grafana to deploy. Possible values are `10`, `11`. func (o GrafanaOutput) GrafanaMajorVersion() pulumi.StringOutput { return o.ApplyT(func(v *Grafana) pulumi.StringOutput { return v.GrafanaMajorVersion }).(pulumi.StringOutput) } // The full Grafana software semantic version deployed. func (o GrafanaOutput) GrafanaVersion() pulumi.StringOutput { return o.ApplyT(func(v *Grafana) pulumi.StringOutput { return v.GrafanaVersion }).(pulumi.StringOutput) } // An `identity` block as defined below. Changing this forces a new Dashboard Grafana to be created. func (o GrafanaOutput) Identity() GrafanaIdentityPtrOutput { return o.ApplyT(func(v *Grafana) GrafanaIdentityPtrOutput { return v.Identity }).(GrafanaIdentityPtrOutput) } // Specifies the Azure Region where the Dashboard Grafana should exist. Changing this forces a new Dashboard Grafana to be created. func (o GrafanaOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Grafana) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name which should be used for this Dashboard Grafana. Changing this forces a new Dashboard Grafana to be created. func (o GrafanaOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Grafana) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // List of outbound IPs if deterministicOutboundIP is enabled. func (o GrafanaOutput) OutboundIps() pulumi.StringArrayOutput { return o.ApplyT(func(v *Grafana) pulumi.StringArrayOutput { return v.OutboundIps }).(pulumi.StringArrayOutput) } // Whether to enable traffic over the public interface. Defaults to `true`. func (o GrafanaOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Grafana) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput) } // Specifies the name of the Resource Group where the Dashboard Grafana should exist. Changing this forces a new Dashboard Grafana to be created. func (o GrafanaOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Grafana) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The name of the SKU used for the Grafana instance. Possible values are `Standard` and `Essential`. Defaults to `Standard`. Changing this forces a new Dashboard Grafana to be created. func (o GrafanaOutput) Sku() pulumi.StringPtrOutput { return o.ApplyT(func(v *Grafana) pulumi.StringPtrOutput { return v.Sku }).(pulumi.StringPtrOutput) } // A `smtp` block as defined below. func (o GrafanaOutput) Smtp() GrafanaSmtpPtrOutput { return o.ApplyT(func(v *Grafana) GrafanaSmtpPtrOutput { return v.Smtp }).(GrafanaSmtpPtrOutput) } // A mapping of tags which should be assigned to the Dashboard Grafana. func (o GrafanaOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Grafana) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Whether to enable the zone redundancy setting of the Grafana instance. Defaults to `false`. Changing this forces a new Dashboard Grafana to be created. func (o GrafanaOutput) ZoneRedundancyEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Grafana) pulumi.BoolPtrOutput { return v.ZoneRedundancyEnabled }).(pulumi.BoolPtrOutput) } type GrafanaArrayOutput struct{ *pulumi.OutputState } func (GrafanaArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Grafana)(nil)).Elem() } func (o GrafanaArrayOutput) ToGrafanaArrayOutput() GrafanaArrayOutput { return o } func (o GrafanaArrayOutput) ToGrafanaArrayOutputWithContext(ctx context.Context) GrafanaArrayOutput { return o } func (o GrafanaArrayOutput) Index(i pulumi.IntInput) GrafanaOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Grafana { return vs[0].([]*Grafana)[vs[1].(int)] }).(GrafanaOutput) } type GrafanaMapOutput struct{ *pulumi.OutputState } func (GrafanaMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Grafana)(nil)).Elem() } func (o GrafanaMapOutput) ToGrafanaMapOutput() GrafanaMapOutput { return o } func (o GrafanaMapOutput) ToGrafanaMapOutputWithContext(ctx context.Context) GrafanaMapOutput { return o } func (o GrafanaMapOutput) MapIndex(k pulumi.StringInput) GrafanaOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Grafana { return vs[0].(map[string]*Grafana)[vs[1].(string)] }).(GrafanaOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*GrafanaInput)(nil)).Elem(), &Grafana{}) pulumi.RegisterInputType(reflect.TypeOf((*GrafanaArrayInput)(nil)).Elem(), GrafanaArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GrafanaMapInput)(nil)).Elem(), GrafanaMap{}) pulumi.RegisterOutputType(GrafanaOutput{}) pulumi.RegisterOutputType(GrafanaArrayOutput{}) pulumi.RegisterOutputType(GrafanaMapOutput{}) }
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/dashboard/grafanaManagedPrivateEndpoint.go
sdk/go/azure/dashboard/grafanaManagedPrivateEndpoint.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 dashboard import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Dashboard Grafana Managed Private Endpoint. // // > **Note:** This resource will _not_ approve the managed private endpoint connection on the linked resource. This will need to be done manually via Azure CLI, PowerShell, or AzAPI resources. See here for an example that uses AzAPI. // // ## 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/dashboard" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "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("Canada Central"), // }) // if err != nil { // return err // } // exampleWorkspace, err := monitoring.NewWorkspace(ctx, "example", &monitoring.WorkspaceArgs{ // Name: pulumi.String("example-mamw"), // ResourceGroupName: example.Name, // Location: example.Location, // PublicNetworkAccessEnabled: pulumi.Bool(false), // }) // if err != nil { // return err // } // exampleGrafana, err := dashboard.NewGrafana(ctx, "example", &dashboard.GrafanaArgs{ // Name: pulumi.String("example-dg"), // ResourceGroupName: example.Name, // Location: example.Location, // GrafanaMajorVersion: pulumi.String("11"), // PublicNetworkAccessEnabled: pulumi.Bool(false), // AzureMonitorWorkspaceIntegrations: dashboard.GrafanaAzureMonitorWorkspaceIntegrationArray{ // &dashboard.GrafanaAzureMonitorWorkspaceIntegrationArgs{ // ResourceId: exampleWorkspace.ID(), // }, // }, // }) // if err != nil { // return err // } // _, err = dashboard.NewGrafanaManagedPrivateEndpoint(ctx, "example", &dashboard.GrafanaManagedPrivateEndpointArgs{ // GrafanaId: exampleGrafana.ID(), // Name: pulumi.String("example-mpe"), // Location: exampleGrafana.Location, // PrivateLinkResourceId: exampleWorkspace.ID(), // GroupIds: pulumi.StringArray{ // pulumi.String("prometheusMetrics"), // }, // PrivateLinkResourceRegion: exampleGrafana.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.Dashboard` - 2025-08-01 // // ## Import // // Dashboard Grafana Managed Private Endpoint Examples can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:dashboard/grafanaManagedPrivateEndpoint:GrafanaManagedPrivateEndpoint example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Dashboard/grafana/workspace1/managedPrivateEndpoints/endpoint1 // ``` type GrafanaManagedPrivateEndpoint struct { pulumi.CustomResourceState // The id of the associated managed Grafana. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. GrafanaId pulumi.StringOutput `pulumi:"grafanaId"` // Specifies a list of private link group IDs. The value of this will depend on the private link resource to which you are connecting. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. GroupIds pulumi.StringArrayOutput `pulumi:"groupIds"` // The Azure Region where the Dashboard Grafana Managed Private Endpoint should exist. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Dashboard Grafana Managed Private Endpoint. Must be between 2 and 20 alphanumeric characters or dashes, must begin with letter and end with a letter or number. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the resource to which this Dashboard Grafana Managed Private Endpoint will connect. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. PrivateLinkResourceId pulumi.StringOutput `pulumi:"privateLinkResourceId"` // The region in which to create the private link. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. PrivateLinkResourceRegion pulumi.StringPtrOutput `pulumi:"privateLinkResourceRegion"` // A domain name for this endpoint to be used within Grafana. Must be just a domain, without schema, and with at least three parts. PrivateLinkServiceUrl pulumi.StringPtrOutput `pulumi:"privateLinkServiceUrl"` // A message to provide in the request which will be seen by approvers. RequestMessage pulumi.StringPtrOutput `pulumi:"requestMessage"` // A mapping of tags which should be assigned to the Dashboard Grafana Managed Private Endpoint. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewGrafanaManagedPrivateEndpoint registers a new resource with the given unique name, arguments, and options. func NewGrafanaManagedPrivateEndpoint(ctx *pulumi.Context, name string, args *GrafanaManagedPrivateEndpointArgs, opts ...pulumi.ResourceOption) (*GrafanaManagedPrivateEndpoint, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.GrafanaId == nil { return nil, errors.New("invalid value for required argument 'GrafanaId'") } if args.PrivateLinkResourceId == nil { return nil, errors.New("invalid value for required argument 'PrivateLinkResourceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource GrafanaManagedPrivateEndpoint err := ctx.RegisterResource("azure:dashboard/grafanaManagedPrivateEndpoint:GrafanaManagedPrivateEndpoint", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetGrafanaManagedPrivateEndpoint gets an existing GrafanaManagedPrivateEndpoint 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 GetGrafanaManagedPrivateEndpoint(ctx *pulumi.Context, name string, id pulumi.IDInput, state *GrafanaManagedPrivateEndpointState, opts ...pulumi.ResourceOption) (*GrafanaManagedPrivateEndpoint, error) { var resource GrafanaManagedPrivateEndpoint err := ctx.ReadResource("azure:dashboard/grafanaManagedPrivateEndpoint:GrafanaManagedPrivateEndpoint", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering GrafanaManagedPrivateEndpoint resources. type grafanaManagedPrivateEndpointState struct { // The id of the associated managed Grafana. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. GrafanaId *string `pulumi:"grafanaId"` // Specifies a list of private link group IDs. The value of this will depend on the private link resource to which you are connecting. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. GroupIds []string `pulumi:"groupIds"` // The Azure Region where the Dashboard Grafana Managed Private Endpoint should exist. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. Location *string `pulumi:"location"` // The name which should be used for this Dashboard Grafana Managed Private Endpoint. Must be between 2 and 20 alphanumeric characters or dashes, must begin with letter and end with a letter or number. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. Name *string `pulumi:"name"` // The ID of the resource to which this Dashboard Grafana Managed Private Endpoint will connect. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. PrivateLinkResourceId *string `pulumi:"privateLinkResourceId"` // The region in which to create the private link. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. PrivateLinkResourceRegion *string `pulumi:"privateLinkResourceRegion"` // A domain name for this endpoint to be used within Grafana. Must be just a domain, without schema, and with at least three parts. PrivateLinkServiceUrl *string `pulumi:"privateLinkServiceUrl"` // A message to provide in the request which will be seen by approvers. RequestMessage *string `pulumi:"requestMessage"` // A mapping of tags which should be assigned to the Dashboard Grafana Managed Private Endpoint. Tags map[string]string `pulumi:"tags"` } type GrafanaManagedPrivateEndpointState struct { // The id of the associated managed Grafana. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. GrafanaId pulumi.StringPtrInput // Specifies a list of private link group IDs. The value of this will depend on the private link resource to which you are connecting. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. GroupIds pulumi.StringArrayInput // The Azure Region where the Dashboard Grafana Managed Private Endpoint should exist. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. Location pulumi.StringPtrInput // The name which should be used for this Dashboard Grafana Managed Private Endpoint. Must be between 2 and 20 alphanumeric characters or dashes, must begin with letter and end with a letter or number. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. Name pulumi.StringPtrInput // The ID of the resource to which this Dashboard Grafana Managed Private Endpoint will connect. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. PrivateLinkResourceId pulumi.StringPtrInput // The region in which to create the private link. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. PrivateLinkResourceRegion pulumi.StringPtrInput // A domain name for this endpoint to be used within Grafana. Must be just a domain, without schema, and with at least three parts. PrivateLinkServiceUrl pulumi.StringPtrInput // A message to provide in the request which will be seen by approvers. RequestMessage pulumi.StringPtrInput // A mapping of tags which should be assigned to the Dashboard Grafana Managed Private Endpoint. Tags pulumi.StringMapInput } func (GrafanaManagedPrivateEndpointState) ElementType() reflect.Type { return reflect.TypeOf((*grafanaManagedPrivateEndpointState)(nil)).Elem() } type grafanaManagedPrivateEndpointArgs struct { // The id of the associated managed Grafana. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. GrafanaId string `pulumi:"grafanaId"` // Specifies a list of private link group IDs. The value of this will depend on the private link resource to which you are connecting. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. GroupIds []string `pulumi:"groupIds"` // The Azure Region where the Dashboard Grafana Managed Private Endpoint should exist. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. Location *string `pulumi:"location"` // The name which should be used for this Dashboard Grafana Managed Private Endpoint. Must be between 2 and 20 alphanumeric characters or dashes, must begin with letter and end with a letter or number. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. Name *string `pulumi:"name"` // The ID of the resource to which this Dashboard Grafana Managed Private Endpoint will connect. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. PrivateLinkResourceId string `pulumi:"privateLinkResourceId"` // The region in which to create the private link. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. PrivateLinkResourceRegion *string `pulumi:"privateLinkResourceRegion"` // A domain name for this endpoint to be used within Grafana. Must be just a domain, without schema, and with at least three parts. PrivateLinkServiceUrl *string `pulumi:"privateLinkServiceUrl"` // A message to provide in the request which will be seen by approvers. RequestMessage *string `pulumi:"requestMessage"` // A mapping of tags which should be assigned to the Dashboard Grafana Managed Private Endpoint. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a GrafanaManagedPrivateEndpoint resource. type GrafanaManagedPrivateEndpointArgs struct { // The id of the associated managed Grafana. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. GrafanaId pulumi.StringInput // Specifies a list of private link group IDs. The value of this will depend on the private link resource to which you are connecting. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. GroupIds pulumi.StringArrayInput // The Azure Region where the Dashboard Grafana Managed Private Endpoint should exist. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. Location pulumi.StringPtrInput // The name which should be used for this Dashboard Grafana Managed Private Endpoint. Must be between 2 and 20 alphanumeric characters or dashes, must begin with letter and end with a letter or number. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. Name pulumi.StringPtrInput // The ID of the resource to which this Dashboard Grafana Managed Private Endpoint will connect. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. PrivateLinkResourceId pulumi.StringInput // The region in which to create the private link. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. PrivateLinkResourceRegion pulumi.StringPtrInput // A domain name for this endpoint to be used within Grafana. Must be just a domain, without schema, and with at least three parts. PrivateLinkServiceUrl pulumi.StringPtrInput // A message to provide in the request which will be seen by approvers. RequestMessage pulumi.StringPtrInput // A mapping of tags which should be assigned to the Dashboard Grafana Managed Private Endpoint. Tags pulumi.StringMapInput } func (GrafanaManagedPrivateEndpointArgs) ElementType() reflect.Type { return reflect.TypeOf((*grafanaManagedPrivateEndpointArgs)(nil)).Elem() } type GrafanaManagedPrivateEndpointInput interface { pulumi.Input ToGrafanaManagedPrivateEndpointOutput() GrafanaManagedPrivateEndpointOutput ToGrafanaManagedPrivateEndpointOutputWithContext(ctx context.Context) GrafanaManagedPrivateEndpointOutput } func (*GrafanaManagedPrivateEndpoint) ElementType() reflect.Type { return reflect.TypeOf((**GrafanaManagedPrivateEndpoint)(nil)).Elem() } func (i *GrafanaManagedPrivateEndpoint) ToGrafanaManagedPrivateEndpointOutput() GrafanaManagedPrivateEndpointOutput { return i.ToGrafanaManagedPrivateEndpointOutputWithContext(context.Background()) } func (i *GrafanaManagedPrivateEndpoint) ToGrafanaManagedPrivateEndpointOutputWithContext(ctx context.Context) GrafanaManagedPrivateEndpointOutput { return pulumi.ToOutputWithContext(ctx, i).(GrafanaManagedPrivateEndpointOutput) } // GrafanaManagedPrivateEndpointArrayInput is an input type that accepts GrafanaManagedPrivateEndpointArray and GrafanaManagedPrivateEndpointArrayOutput values. // You can construct a concrete instance of `GrafanaManagedPrivateEndpointArrayInput` via: // // GrafanaManagedPrivateEndpointArray{ GrafanaManagedPrivateEndpointArgs{...} } type GrafanaManagedPrivateEndpointArrayInput interface { pulumi.Input ToGrafanaManagedPrivateEndpointArrayOutput() GrafanaManagedPrivateEndpointArrayOutput ToGrafanaManagedPrivateEndpointArrayOutputWithContext(context.Context) GrafanaManagedPrivateEndpointArrayOutput } type GrafanaManagedPrivateEndpointArray []GrafanaManagedPrivateEndpointInput func (GrafanaManagedPrivateEndpointArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*GrafanaManagedPrivateEndpoint)(nil)).Elem() } func (i GrafanaManagedPrivateEndpointArray) ToGrafanaManagedPrivateEndpointArrayOutput() GrafanaManagedPrivateEndpointArrayOutput { return i.ToGrafanaManagedPrivateEndpointArrayOutputWithContext(context.Background()) } func (i GrafanaManagedPrivateEndpointArray) ToGrafanaManagedPrivateEndpointArrayOutputWithContext(ctx context.Context) GrafanaManagedPrivateEndpointArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GrafanaManagedPrivateEndpointArrayOutput) } // GrafanaManagedPrivateEndpointMapInput is an input type that accepts GrafanaManagedPrivateEndpointMap and GrafanaManagedPrivateEndpointMapOutput values. // You can construct a concrete instance of `GrafanaManagedPrivateEndpointMapInput` via: // // GrafanaManagedPrivateEndpointMap{ "key": GrafanaManagedPrivateEndpointArgs{...} } type GrafanaManagedPrivateEndpointMapInput interface { pulumi.Input ToGrafanaManagedPrivateEndpointMapOutput() GrafanaManagedPrivateEndpointMapOutput ToGrafanaManagedPrivateEndpointMapOutputWithContext(context.Context) GrafanaManagedPrivateEndpointMapOutput } type GrafanaManagedPrivateEndpointMap map[string]GrafanaManagedPrivateEndpointInput func (GrafanaManagedPrivateEndpointMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*GrafanaManagedPrivateEndpoint)(nil)).Elem() } func (i GrafanaManagedPrivateEndpointMap) ToGrafanaManagedPrivateEndpointMapOutput() GrafanaManagedPrivateEndpointMapOutput { return i.ToGrafanaManagedPrivateEndpointMapOutputWithContext(context.Background()) } func (i GrafanaManagedPrivateEndpointMap) ToGrafanaManagedPrivateEndpointMapOutputWithContext(ctx context.Context) GrafanaManagedPrivateEndpointMapOutput { return pulumi.ToOutputWithContext(ctx, i).(GrafanaManagedPrivateEndpointMapOutput) } type GrafanaManagedPrivateEndpointOutput struct{ *pulumi.OutputState } func (GrafanaManagedPrivateEndpointOutput) ElementType() reflect.Type { return reflect.TypeOf((**GrafanaManagedPrivateEndpoint)(nil)).Elem() } func (o GrafanaManagedPrivateEndpointOutput) ToGrafanaManagedPrivateEndpointOutput() GrafanaManagedPrivateEndpointOutput { return o } func (o GrafanaManagedPrivateEndpointOutput) ToGrafanaManagedPrivateEndpointOutputWithContext(ctx context.Context) GrafanaManagedPrivateEndpointOutput { return o } // The id of the associated managed Grafana. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. func (o GrafanaManagedPrivateEndpointOutput) GrafanaId() pulumi.StringOutput { return o.ApplyT(func(v *GrafanaManagedPrivateEndpoint) pulumi.StringOutput { return v.GrafanaId }).(pulumi.StringOutput) } // Specifies a list of private link group IDs. The value of this will depend on the private link resource to which you are connecting. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. func (o GrafanaManagedPrivateEndpointOutput) GroupIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *GrafanaManagedPrivateEndpoint) pulumi.StringArrayOutput { return v.GroupIds }).(pulumi.StringArrayOutput) } // The Azure Region where the Dashboard Grafana Managed Private Endpoint should exist. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. func (o GrafanaManagedPrivateEndpointOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *GrafanaManagedPrivateEndpoint) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Dashboard Grafana Managed Private Endpoint. Must be between 2 and 20 alphanumeric characters or dashes, must begin with letter and end with a letter or number. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. func (o GrafanaManagedPrivateEndpointOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *GrafanaManagedPrivateEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the resource to which this Dashboard Grafana Managed Private Endpoint will connect. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. func (o GrafanaManagedPrivateEndpointOutput) PrivateLinkResourceId() pulumi.StringOutput { return o.ApplyT(func(v *GrafanaManagedPrivateEndpoint) pulumi.StringOutput { return v.PrivateLinkResourceId }).(pulumi.StringOutput) } // The region in which to create the private link. Changing this forces a new Dashboard Grafana Managed Private Endpoint to be created. func (o GrafanaManagedPrivateEndpointOutput) PrivateLinkResourceRegion() pulumi.StringPtrOutput { return o.ApplyT(func(v *GrafanaManagedPrivateEndpoint) pulumi.StringPtrOutput { return v.PrivateLinkResourceRegion }).(pulumi.StringPtrOutput) } // A domain name for this endpoint to be used within Grafana. Must be just a domain, without schema, and with at least three parts. func (o GrafanaManagedPrivateEndpointOutput) PrivateLinkServiceUrl() pulumi.StringPtrOutput { return o.ApplyT(func(v *GrafanaManagedPrivateEndpoint) pulumi.StringPtrOutput { return v.PrivateLinkServiceUrl }).(pulumi.StringPtrOutput) } // A message to provide in the request which will be seen by approvers. func (o GrafanaManagedPrivateEndpointOutput) RequestMessage() pulumi.StringPtrOutput { return o.ApplyT(func(v *GrafanaManagedPrivateEndpoint) pulumi.StringPtrOutput { return v.RequestMessage }).(pulumi.StringPtrOutput) } // A mapping of tags which should be assigned to the Dashboard Grafana Managed Private Endpoint. func (o GrafanaManagedPrivateEndpointOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *GrafanaManagedPrivateEndpoint) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type GrafanaManagedPrivateEndpointArrayOutput struct{ *pulumi.OutputState } func (GrafanaManagedPrivateEndpointArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*GrafanaManagedPrivateEndpoint)(nil)).Elem() } func (o GrafanaManagedPrivateEndpointArrayOutput) ToGrafanaManagedPrivateEndpointArrayOutput() GrafanaManagedPrivateEndpointArrayOutput { return o } func (o GrafanaManagedPrivateEndpointArrayOutput) ToGrafanaManagedPrivateEndpointArrayOutputWithContext(ctx context.Context) GrafanaManagedPrivateEndpointArrayOutput { return o } func (o GrafanaManagedPrivateEndpointArrayOutput) Index(i pulumi.IntInput) GrafanaManagedPrivateEndpointOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GrafanaManagedPrivateEndpoint { return vs[0].([]*GrafanaManagedPrivateEndpoint)[vs[1].(int)] }).(GrafanaManagedPrivateEndpointOutput) } type GrafanaManagedPrivateEndpointMapOutput struct{ *pulumi.OutputState } func (GrafanaManagedPrivateEndpointMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*GrafanaManagedPrivateEndpoint)(nil)).Elem() } func (o GrafanaManagedPrivateEndpointMapOutput) ToGrafanaManagedPrivateEndpointMapOutput() GrafanaManagedPrivateEndpointMapOutput { return o } func (o GrafanaManagedPrivateEndpointMapOutput) ToGrafanaManagedPrivateEndpointMapOutputWithContext(ctx context.Context) GrafanaManagedPrivateEndpointMapOutput { return o } func (o GrafanaManagedPrivateEndpointMapOutput) MapIndex(k pulumi.StringInput) GrafanaManagedPrivateEndpointOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GrafanaManagedPrivateEndpoint { return vs[0].(map[string]*GrafanaManagedPrivateEndpoint)[vs[1].(string)] }).(GrafanaManagedPrivateEndpointOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*GrafanaManagedPrivateEndpointInput)(nil)).Elem(), &GrafanaManagedPrivateEndpoint{}) pulumi.RegisterInputType(reflect.TypeOf((*GrafanaManagedPrivateEndpointArrayInput)(nil)).Elem(), GrafanaManagedPrivateEndpointArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GrafanaManagedPrivateEndpointMapInput)(nil)).Elem(), GrafanaManagedPrivateEndpointMap{}) pulumi.RegisterOutputType(GrafanaManagedPrivateEndpointOutput{}) pulumi.RegisterOutputType(GrafanaManagedPrivateEndpointArrayOutput{}) pulumi.RegisterOutputType(GrafanaManagedPrivateEndpointMapOutput{}) }
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/dashboard/azurerm_portal_dashboard.go
sdk/go/azure/dashboard/azurerm_portal_dashboard.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 dashboard 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 shared dashboard in the Azure Portal. This is the data source of the `azurermDashboard` resource. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/portal" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := portal.Azurerm_portal_dashboard(ctx, &portal.Azurerm_portal_dashboardArgs{ // Name: pulumi.StringRef("existing-dashboard"), // ResourceGroupName: "dashboard-rg", // }, nil) // if err != nil { // return err // } // ctx.Export("id", exampleAzurermDashboard.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Portal` - 2019-01-01-preview // // Deprecated: azure.dashboard/azurerm_portal_dashboard.azurerm_portal_dashboard has been deprecated in favor of azure.portal/azurerm_portal_dashboard.azurerm_portal_dashboard func Azurerm_portal_dashboard(ctx *pulumi.Context, args *Azurerm_portal_dashboardArgs, opts ...pulumi.InvokeOption) (*Azurerm_portal_dashboardResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv Azurerm_portal_dashboardResult err := ctx.Invoke("azure:dashboard/azurerm_portal_dashboard:azurerm_portal_dashboard", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking azurerm_portal_dashboard. type Azurerm_portal_dashboardArgs struct { // JSON data representing dashboard body. DashboardProperties *string `pulumi:"dashboardProperties"` // Specifies the display name of the shared Azure Portal Dashboard. DisplayName *string `pulumi:"displayName"` // Specifies the name of the shared Azure Portal Dashboard. Name *string `pulumi:"name"` // Specifies the name of the resource group the shared Azure Portal Dashboard is located in. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by azurerm_portal_dashboard. type Azurerm_portal_dashboardResult struct { // JSON data representing dashboard body. DashboardProperties string `pulumi:"dashboardProperties"` DisplayName *string `pulumi:"displayName"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region where the shared Azure Portal dashboard exists. Location string `pulumi:"location"` Name *string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the shared Azure Portal dashboard. Tags map[string]string `pulumi:"tags"` } func Azurerm_portal_dashboardOutput(ctx *pulumi.Context, args Azurerm_portal_dashboardOutputArgs, opts ...pulumi.InvokeOption) Azurerm_portal_dashboardResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (Azurerm_portal_dashboardResultOutput, error) { args := v.(Azurerm_portal_dashboardArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:dashboard/azurerm_portal_dashboard:azurerm_portal_dashboard", args, Azurerm_portal_dashboardResultOutput{}, options).(Azurerm_portal_dashboardResultOutput), nil }).(Azurerm_portal_dashboardResultOutput) } // A collection of arguments for invoking azurerm_portal_dashboard. type Azurerm_portal_dashboardOutputArgs struct { // JSON data representing dashboard body. DashboardProperties pulumi.StringPtrInput `pulumi:"dashboardProperties"` // Specifies the display name of the shared Azure Portal Dashboard. DisplayName pulumi.StringPtrInput `pulumi:"displayName"` // Specifies the name of the shared Azure Portal Dashboard. Name pulumi.StringPtrInput `pulumi:"name"` // Specifies the name of the resource group the shared Azure Portal Dashboard is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (Azurerm_portal_dashboardOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*Azurerm_portal_dashboardArgs)(nil)).Elem() } // A collection of values returned by azurerm_portal_dashboard. type Azurerm_portal_dashboardResultOutput struct{ *pulumi.OutputState } func (Azurerm_portal_dashboardResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*Azurerm_portal_dashboardResult)(nil)).Elem() } func (o Azurerm_portal_dashboardResultOutput) ToAzurerm_portal_dashboardResultOutput() Azurerm_portal_dashboardResultOutput { return o } func (o Azurerm_portal_dashboardResultOutput) ToAzurerm_portal_dashboardResultOutputWithContext(ctx context.Context) Azurerm_portal_dashboardResultOutput { return o } // JSON data representing dashboard body. func (o Azurerm_portal_dashboardResultOutput) DashboardProperties() pulumi.StringOutput { return o.ApplyT(func(v Azurerm_portal_dashboardResult) string { return v.DashboardProperties }).(pulumi.StringOutput) } func (o Azurerm_portal_dashboardResultOutput) DisplayName() pulumi.StringPtrOutput { return o.ApplyT(func(v Azurerm_portal_dashboardResult) *string { return v.DisplayName }).(pulumi.StringPtrOutput) } // The provider-assigned unique ID for this managed resource. func (o Azurerm_portal_dashboardResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v Azurerm_portal_dashboardResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region where the shared Azure Portal dashboard exists. func (o Azurerm_portal_dashboardResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v Azurerm_portal_dashboardResult) string { return v.Location }).(pulumi.StringOutput) } func (o Azurerm_portal_dashboardResultOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v Azurerm_portal_dashboardResult) *string { return v.Name }).(pulumi.StringPtrOutput) } func (o Azurerm_portal_dashboardResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v Azurerm_portal_dashboardResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the shared Azure Portal dashboard. func (o Azurerm_portal_dashboardResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v Azurerm_portal_dashboardResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(Azurerm_portal_dashboardResultOutput{}) }
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/managedlustre/init.go
sdk/go/azure/managedlustre/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 managedlustre 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:managedlustre/fileSystem:FileSystem": r = &FileSystem{} 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", "managedlustre/fileSystem", &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/managedlustre/pulumiTypes.go
sdk/go/azure/managedlustre/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 managedlustre 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 FileSystemEncryptionKey struct { // The URL to the Key Vault Key used as the Encryption Key. This can be found as `id` on the `keyvault.Key` resource. KeyUrl string `pulumi:"keyUrl"` // The ID of the source Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. SourceVaultId string `pulumi:"sourceVaultId"` } // FileSystemEncryptionKeyInput is an input type that accepts FileSystemEncryptionKeyArgs and FileSystemEncryptionKeyOutput values. // You can construct a concrete instance of `FileSystemEncryptionKeyInput` via: // // FileSystemEncryptionKeyArgs{...} type FileSystemEncryptionKeyInput interface { pulumi.Input ToFileSystemEncryptionKeyOutput() FileSystemEncryptionKeyOutput ToFileSystemEncryptionKeyOutputWithContext(context.Context) FileSystemEncryptionKeyOutput } type FileSystemEncryptionKeyArgs struct { // The URL to the Key Vault Key used as the Encryption Key. This can be found as `id` on the `keyvault.Key` resource. KeyUrl pulumi.StringInput `pulumi:"keyUrl"` // The ID of the source Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. SourceVaultId pulumi.StringInput `pulumi:"sourceVaultId"` } func (FileSystemEncryptionKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*FileSystemEncryptionKey)(nil)).Elem() } func (i FileSystemEncryptionKeyArgs) ToFileSystemEncryptionKeyOutput() FileSystemEncryptionKeyOutput { return i.ToFileSystemEncryptionKeyOutputWithContext(context.Background()) } func (i FileSystemEncryptionKeyArgs) ToFileSystemEncryptionKeyOutputWithContext(ctx context.Context) FileSystemEncryptionKeyOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemEncryptionKeyOutput) } func (i FileSystemEncryptionKeyArgs) ToFileSystemEncryptionKeyPtrOutput() FileSystemEncryptionKeyPtrOutput { return i.ToFileSystemEncryptionKeyPtrOutputWithContext(context.Background()) } func (i FileSystemEncryptionKeyArgs) ToFileSystemEncryptionKeyPtrOutputWithContext(ctx context.Context) FileSystemEncryptionKeyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemEncryptionKeyOutput).ToFileSystemEncryptionKeyPtrOutputWithContext(ctx) } // FileSystemEncryptionKeyPtrInput is an input type that accepts FileSystemEncryptionKeyArgs, FileSystemEncryptionKeyPtr and FileSystemEncryptionKeyPtrOutput values. // You can construct a concrete instance of `FileSystemEncryptionKeyPtrInput` via: // // FileSystemEncryptionKeyArgs{...} // // or: // // nil type FileSystemEncryptionKeyPtrInput interface { pulumi.Input ToFileSystemEncryptionKeyPtrOutput() FileSystemEncryptionKeyPtrOutput ToFileSystemEncryptionKeyPtrOutputWithContext(context.Context) FileSystemEncryptionKeyPtrOutput } type fileSystemEncryptionKeyPtrType FileSystemEncryptionKeyArgs func FileSystemEncryptionKeyPtr(v *FileSystemEncryptionKeyArgs) FileSystemEncryptionKeyPtrInput { return (*fileSystemEncryptionKeyPtrType)(v) } func (*fileSystemEncryptionKeyPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FileSystemEncryptionKey)(nil)).Elem() } func (i *fileSystemEncryptionKeyPtrType) ToFileSystemEncryptionKeyPtrOutput() FileSystemEncryptionKeyPtrOutput { return i.ToFileSystemEncryptionKeyPtrOutputWithContext(context.Background()) } func (i *fileSystemEncryptionKeyPtrType) ToFileSystemEncryptionKeyPtrOutputWithContext(ctx context.Context) FileSystemEncryptionKeyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemEncryptionKeyPtrOutput) } type FileSystemEncryptionKeyOutput struct{ *pulumi.OutputState } func (FileSystemEncryptionKeyOutput) ElementType() reflect.Type { return reflect.TypeOf((*FileSystemEncryptionKey)(nil)).Elem() } func (o FileSystemEncryptionKeyOutput) ToFileSystemEncryptionKeyOutput() FileSystemEncryptionKeyOutput { return o } func (o FileSystemEncryptionKeyOutput) ToFileSystemEncryptionKeyOutputWithContext(ctx context.Context) FileSystemEncryptionKeyOutput { return o } func (o FileSystemEncryptionKeyOutput) ToFileSystemEncryptionKeyPtrOutput() FileSystemEncryptionKeyPtrOutput { return o.ToFileSystemEncryptionKeyPtrOutputWithContext(context.Background()) } func (o FileSystemEncryptionKeyOutput) ToFileSystemEncryptionKeyPtrOutputWithContext(ctx context.Context) FileSystemEncryptionKeyPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FileSystemEncryptionKey) *FileSystemEncryptionKey { return &v }).(FileSystemEncryptionKeyPtrOutput) } // The URL to the Key Vault Key used as the Encryption Key. This can be found as `id` on the `keyvault.Key` resource. func (o FileSystemEncryptionKeyOutput) KeyUrl() pulumi.StringOutput { return o.ApplyT(func(v FileSystemEncryptionKey) string { return v.KeyUrl }).(pulumi.StringOutput) } // The ID of the source Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. func (o FileSystemEncryptionKeyOutput) SourceVaultId() pulumi.StringOutput { return o.ApplyT(func(v FileSystemEncryptionKey) string { return v.SourceVaultId }).(pulumi.StringOutput) } type FileSystemEncryptionKeyPtrOutput struct{ *pulumi.OutputState } func (FileSystemEncryptionKeyPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FileSystemEncryptionKey)(nil)).Elem() } func (o FileSystemEncryptionKeyPtrOutput) ToFileSystemEncryptionKeyPtrOutput() FileSystemEncryptionKeyPtrOutput { return o } func (o FileSystemEncryptionKeyPtrOutput) ToFileSystemEncryptionKeyPtrOutputWithContext(ctx context.Context) FileSystemEncryptionKeyPtrOutput { return o } func (o FileSystemEncryptionKeyPtrOutput) Elem() FileSystemEncryptionKeyOutput { return o.ApplyT(func(v *FileSystemEncryptionKey) FileSystemEncryptionKey { if v != nil { return *v } var ret FileSystemEncryptionKey return ret }).(FileSystemEncryptionKeyOutput) } // The URL to the Key Vault Key used as the Encryption Key. This can be found as `id` on the `keyvault.Key` resource. func (o FileSystemEncryptionKeyPtrOutput) KeyUrl() pulumi.StringPtrOutput { return o.ApplyT(func(v *FileSystemEncryptionKey) *string { if v == nil { return nil } return &v.KeyUrl }).(pulumi.StringPtrOutput) } // The ID of the source Key Vault. This can be found as `id` on the `keyvault.KeyVault` resource. func (o FileSystemEncryptionKeyPtrOutput) SourceVaultId() pulumi.StringPtrOutput { return o.ApplyT(func(v *FileSystemEncryptionKey) *string { if v == nil { return nil } return &v.SourceVaultId }).(pulumi.StringPtrOutput) } type FileSystemHsmSetting struct { // The resource ID of the storage container that is used for hydrating the namespace and archiving from the namespace. Changing this forces a new resource to be created. ContainerId string `pulumi:"containerId"` // The import prefix for the Azure Managed Lustre File System. Only blobs in the non-logging container that start with this path/prefix get hydrated into the cluster namespace. Changing this forces a new resource to be created. // // > **Note:** The roles `Contributor` and `Storage Blob Data Contributor` must be added to the Service Principal `HPC Cache Resource Provider` for the Storage Account. See official docs for more information. ImportPrefix *string `pulumi:"importPrefix"` // The resource ID of the storage container that is used for logging events and errors. Changing this forces a new resource to be created. LoggingContainerId string `pulumi:"loggingContainerId"` } // FileSystemHsmSettingInput is an input type that accepts FileSystemHsmSettingArgs and FileSystemHsmSettingOutput values. // You can construct a concrete instance of `FileSystemHsmSettingInput` via: // // FileSystemHsmSettingArgs{...} type FileSystemHsmSettingInput interface { pulumi.Input ToFileSystemHsmSettingOutput() FileSystemHsmSettingOutput ToFileSystemHsmSettingOutputWithContext(context.Context) FileSystemHsmSettingOutput } type FileSystemHsmSettingArgs struct { // The resource ID of the storage container that is used for hydrating the namespace and archiving from the namespace. Changing this forces a new resource to be created. ContainerId pulumi.StringInput `pulumi:"containerId"` // The import prefix for the Azure Managed Lustre File System. Only blobs in the non-logging container that start with this path/prefix get hydrated into the cluster namespace. Changing this forces a new resource to be created. // // > **Note:** The roles `Contributor` and `Storage Blob Data Contributor` must be added to the Service Principal `HPC Cache Resource Provider` for the Storage Account. See official docs for more information. ImportPrefix pulumi.StringPtrInput `pulumi:"importPrefix"` // The resource ID of the storage container that is used for logging events and errors. Changing this forces a new resource to be created. LoggingContainerId pulumi.StringInput `pulumi:"loggingContainerId"` } func (FileSystemHsmSettingArgs) ElementType() reflect.Type { return reflect.TypeOf((*FileSystemHsmSetting)(nil)).Elem() } func (i FileSystemHsmSettingArgs) ToFileSystemHsmSettingOutput() FileSystemHsmSettingOutput { return i.ToFileSystemHsmSettingOutputWithContext(context.Background()) } func (i FileSystemHsmSettingArgs) ToFileSystemHsmSettingOutputWithContext(ctx context.Context) FileSystemHsmSettingOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemHsmSettingOutput) } func (i FileSystemHsmSettingArgs) ToFileSystemHsmSettingPtrOutput() FileSystemHsmSettingPtrOutput { return i.ToFileSystemHsmSettingPtrOutputWithContext(context.Background()) } func (i FileSystemHsmSettingArgs) ToFileSystemHsmSettingPtrOutputWithContext(ctx context.Context) FileSystemHsmSettingPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemHsmSettingOutput).ToFileSystemHsmSettingPtrOutputWithContext(ctx) } // FileSystemHsmSettingPtrInput is an input type that accepts FileSystemHsmSettingArgs, FileSystemHsmSettingPtr and FileSystemHsmSettingPtrOutput values. // You can construct a concrete instance of `FileSystemHsmSettingPtrInput` via: // // FileSystemHsmSettingArgs{...} // // or: // // nil type FileSystemHsmSettingPtrInput interface { pulumi.Input ToFileSystemHsmSettingPtrOutput() FileSystemHsmSettingPtrOutput ToFileSystemHsmSettingPtrOutputWithContext(context.Context) FileSystemHsmSettingPtrOutput } type fileSystemHsmSettingPtrType FileSystemHsmSettingArgs func FileSystemHsmSettingPtr(v *FileSystemHsmSettingArgs) FileSystemHsmSettingPtrInput { return (*fileSystemHsmSettingPtrType)(v) } func (*fileSystemHsmSettingPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FileSystemHsmSetting)(nil)).Elem() } func (i *fileSystemHsmSettingPtrType) ToFileSystemHsmSettingPtrOutput() FileSystemHsmSettingPtrOutput { return i.ToFileSystemHsmSettingPtrOutputWithContext(context.Background()) } func (i *fileSystemHsmSettingPtrType) ToFileSystemHsmSettingPtrOutputWithContext(ctx context.Context) FileSystemHsmSettingPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemHsmSettingPtrOutput) } type FileSystemHsmSettingOutput struct{ *pulumi.OutputState } func (FileSystemHsmSettingOutput) ElementType() reflect.Type { return reflect.TypeOf((*FileSystemHsmSetting)(nil)).Elem() } func (o FileSystemHsmSettingOutput) ToFileSystemHsmSettingOutput() FileSystemHsmSettingOutput { return o } func (o FileSystemHsmSettingOutput) ToFileSystemHsmSettingOutputWithContext(ctx context.Context) FileSystemHsmSettingOutput { return o } func (o FileSystemHsmSettingOutput) ToFileSystemHsmSettingPtrOutput() FileSystemHsmSettingPtrOutput { return o.ToFileSystemHsmSettingPtrOutputWithContext(context.Background()) } func (o FileSystemHsmSettingOutput) ToFileSystemHsmSettingPtrOutputWithContext(ctx context.Context) FileSystemHsmSettingPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FileSystemHsmSetting) *FileSystemHsmSetting { return &v }).(FileSystemHsmSettingPtrOutput) } // The resource ID of the storage container that is used for hydrating the namespace and archiving from the namespace. Changing this forces a new resource to be created. func (o FileSystemHsmSettingOutput) ContainerId() pulumi.StringOutput { return o.ApplyT(func(v FileSystemHsmSetting) string { return v.ContainerId }).(pulumi.StringOutput) } // The import prefix for the Azure Managed Lustre File System. Only blobs in the non-logging container that start with this path/prefix get hydrated into the cluster namespace. Changing this forces a new resource to be created. // // > **Note:** The roles `Contributor` and `Storage Blob Data Contributor` must be added to the Service Principal `HPC Cache Resource Provider` for the Storage Account. See official docs for more information. func (o FileSystemHsmSettingOutput) ImportPrefix() pulumi.StringPtrOutput { return o.ApplyT(func(v FileSystemHsmSetting) *string { return v.ImportPrefix }).(pulumi.StringPtrOutput) } // The resource ID of the storage container that is used for logging events and errors. Changing this forces a new resource to be created. func (o FileSystemHsmSettingOutput) LoggingContainerId() pulumi.StringOutput { return o.ApplyT(func(v FileSystemHsmSetting) string { return v.LoggingContainerId }).(pulumi.StringOutput) } type FileSystemHsmSettingPtrOutput struct{ *pulumi.OutputState } func (FileSystemHsmSettingPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FileSystemHsmSetting)(nil)).Elem() } func (o FileSystemHsmSettingPtrOutput) ToFileSystemHsmSettingPtrOutput() FileSystemHsmSettingPtrOutput { return o } func (o FileSystemHsmSettingPtrOutput) ToFileSystemHsmSettingPtrOutputWithContext(ctx context.Context) FileSystemHsmSettingPtrOutput { return o } func (o FileSystemHsmSettingPtrOutput) Elem() FileSystemHsmSettingOutput { return o.ApplyT(func(v *FileSystemHsmSetting) FileSystemHsmSetting { if v != nil { return *v } var ret FileSystemHsmSetting return ret }).(FileSystemHsmSettingOutput) } // The resource ID of the storage container that is used for hydrating the namespace and archiving from the namespace. Changing this forces a new resource to be created. func (o FileSystemHsmSettingPtrOutput) ContainerId() pulumi.StringPtrOutput { return o.ApplyT(func(v *FileSystemHsmSetting) *string { if v == nil { return nil } return &v.ContainerId }).(pulumi.StringPtrOutput) } // The import prefix for the Azure Managed Lustre File System. Only blobs in the non-logging container that start with this path/prefix get hydrated into the cluster namespace. Changing this forces a new resource to be created. // // > **Note:** The roles `Contributor` and `Storage Blob Data Contributor` must be added to the Service Principal `HPC Cache Resource Provider` for the Storage Account. See official docs for more information. func (o FileSystemHsmSettingPtrOutput) ImportPrefix() pulumi.StringPtrOutput { return o.ApplyT(func(v *FileSystemHsmSetting) *string { if v == nil { return nil } return v.ImportPrefix }).(pulumi.StringPtrOutput) } // The resource ID of the storage container that is used for logging events and errors. Changing this forces a new resource to be created. func (o FileSystemHsmSettingPtrOutput) LoggingContainerId() pulumi.StringPtrOutput { return o.ApplyT(func(v *FileSystemHsmSetting) *string { if v == nil { return nil } return &v.LoggingContainerId }).(pulumi.StringPtrOutput) } type FileSystemIdentity struct { // A list of User Assigned Managed Identity IDs to be assigned to this Azure Managed Lustre File System. Changing this forces a new resource to be created. IdentityIds []string `pulumi:"identityIds"` // The type of Managed Service Identity that should be configured on this Azure Managed Lustre File System. Only possible value is `UserAssigned`. Changing this forces a new resource to be created. Type string `pulumi:"type"` } // FileSystemIdentityInput is an input type that accepts FileSystemIdentityArgs and FileSystemIdentityOutput values. // You can construct a concrete instance of `FileSystemIdentityInput` via: // // FileSystemIdentityArgs{...} type FileSystemIdentityInput interface { pulumi.Input ToFileSystemIdentityOutput() FileSystemIdentityOutput ToFileSystemIdentityOutputWithContext(context.Context) FileSystemIdentityOutput } type FileSystemIdentityArgs struct { // A list of User Assigned Managed Identity IDs to be assigned to this Azure Managed Lustre File System. Changing this forces a new resource to be created. IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"` // The type of Managed Service Identity that should be configured on this Azure Managed Lustre File System. Only possible value is `UserAssigned`. Changing this forces a new resource to be created. Type pulumi.StringInput `pulumi:"type"` } func (FileSystemIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*FileSystemIdentity)(nil)).Elem() } func (i FileSystemIdentityArgs) ToFileSystemIdentityOutput() FileSystemIdentityOutput { return i.ToFileSystemIdentityOutputWithContext(context.Background()) } func (i FileSystemIdentityArgs) ToFileSystemIdentityOutputWithContext(ctx context.Context) FileSystemIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemIdentityOutput) } func (i FileSystemIdentityArgs) ToFileSystemIdentityPtrOutput() FileSystemIdentityPtrOutput { return i.ToFileSystemIdentityPtrOutputWithContext(context.Background()) } func (i FileSystemIdentityArgs) ToFileSystemIdentityPtrOutputWithContext(ctx context.Context) FileSystemIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemIdentityOutput).ToFileSystemIdentityPtrOutputWithContext(ctx) } // FileSystemIdentityPtrInput is an input type that accepts FileSystemIdentityArgs, FileSystemIdentityPtr and FileSystemIdentityPtrOutput values. // You can construct a concrete instance of `FileSystemIdentityPtrInput` via: // // FileSystemIdentityArgs{...} // // or: // // nil type FileSystemIdentityPtrInput interface { pulumi.Input ToFileSystemIdentityPtrOutput() FileSystemIdentityPtrOutput ToFileSystemIdentityPtrOutputWithContext(context.Context) FileSystemIdentityPtrOutput } type fileSystemIdentityPtrType FileSystemIdentityArgs func FileSystemIdentityPtr(v *FileSystemIdentityArgs) FileSystemIdentityPtrInput { return (*fileSystemIdentityPtrType)(v) } func (*fileSystemIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FileSystemIdentity)(nil)).Elem() } func (i *fileSystemIdentityPtrType) ToFileSystemIdentityPtrOutput() FileSystemIdentityPtrOutput { return i.ToFileSystemIdentityPtrOutputWithContext(context.Background()) } func (i *fileSystemIdentityPtrType) ToFileSystemIdentityPtrOutputWithContext(ctx context.Context) FileSystemIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemIdentityPtrOutput) } type FileSystemIdentityOutput struct{ *pulumi.OutputState } func (FileSystemIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*FileSystemIdentity)(nil)).Elem() } func (o FileSystemIdentityOutput) ToFileSystemIdentityOutput() FileSystemIdentityOutput { return o } func (o FileSystemIdentityOutput) ToFileSystemIdentityOutputWithContext(ctx context.Context) FileSystemIdentityOutput { return o } func (o FileSystemIdentityOutput) ToFileSystemIdentityPtrOutput() FileSystemIdentityPtrOutput { return o.ToFileSystemIdentityPtrOutputWithContext(context.Background()) } func (o FileSystemIdentityOutput) ToFileSystemIdentityPtrOutputWithContext(ctx context.Context) FileSystemIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FileSystemIdentity) *FileSystemIdentity { return &v }).(FileSystemIdentityPtrOutput) } // A list of User Assigned Managed Identity IDs to be assigned to this Azure Managed Lustre File System. Changing this forces a new resource to be created. func (o FileSystemIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v FileSystemIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } // The type of Managed Service Identity that should be configured on this Azure Managed Lustre File System. Only possible value is `UserAssigned`. Changing this forces a new resource to be created. func (o FileSystemIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v FileSystemIdentity) string { return v.Type }).(pulumi.StringOutput) } type FileSystemIdentityPtrOutput struct{ *pulumi.OutputState } func (FileSystemIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FileSystemIdentity)(nil)).Elem() } func (o FileSystemIdentityPtrOutput) ToFileSystemIdentityPtrOutput() FileSystemIdentityPtrOutput { return o } func (o FileSystemIdentityPtrOutput) ToFileSystemIdentityPtrOutputWithContext(ctx context.Context) FileSystemIdentityPtrOutput { return o } func (o FileSystemIdentityPtrOutput) Elem() FileSystemIdentityOutput { return o.ApplyT(func(v *FileSystemIdentity) FileSystemIdentity { if v != nil { return *v } var ret FileSystemIdentity return ret }).(FileSystemIdentityOutput) } // A list of User Assigned Managed Identity IDs to be assigned to this Azure Managed Lustre File System. Changing this forces a new resource to be created. func (o FileSystemIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *FileSystemIdentity) []string { if v == nil { return nil } return v.IdentityIds }).(pulumi.StringArrayOutput) } // The type of Managed Service Identity that should be configured on this Azure Managed Lustre File System. Only possible value is `UserAssigned`. Changing this forces a new resource to be created. func (o FileSystemIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *FileSystemIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type FileSystemMaintenanceWindow struct { // The day of the week on which the maintenance window will occur. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. DayOfWeek string `pulumi:"dayOfWeek"` // The time of day (in UTC) to start the maintenance window. TimeOfDayInUtc string `pulumi:"timeOfDayInUtc"` } // FileSystemMaintenanceWindowInput is an input type that accepts FileSystemMaintenanceWindowArgs and FileSystemMaintenanceWindowOutput values. // You can construct a concrete instance of `FileSystemMaintenanceWindowInput` via: // // FileSystemMaintenanceWindowArgs{...} type FileSystemMaintenanceWindowInput interface { pulumi.Input ToFileSystemMaintenanceWindowOutput() FileSystemMaintenanceWindowOutput ToFileSystemMaintenanceWindowOutputWithContext(context.Context) FileSystemMaintenanceWindowOutput } type FileSystemMaintenanceWindowArgs struct { // The day of the week on which the maintenance window will occur. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. DayOfWeek pulumi.StringInput `pulumi:"dayOfWeek"` // The time of day (in UTC) to start the maintenance window. TimeOfDayInUtc pulumi.StringInput `pulumi:"timeOfDayInUtc"` } func (FileSystemMaintenanceWindowArgs) ElementType() reflect.Type { return reflect.TypeOf((*FileSystemMaintenanceWindow)(nil)).Elem() } func (i FileSystemMaintenanceWindowArgs) ToFileSystemMaintenanceWindowOutput() FileSystemMaintenanceWindowOutput { return i.ToFileSystemMaintenanceWindowOutputWithContext(context.Background()) } func (i FileSystemMaintenanceWindowArgs) ToFileSystemMaintenanceWindowOutputWithContext(ctx context.Context) FileSystemMaintenanceWindowOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemMaintenanceWindowOutput) } func (i FileSystemMaintenanceWindowArgs) ToFileSystemMaintenanceWindowPtrOutput() FileSystemMaintenanceWindowPtrOutput { return i.ToFileSystemMaintenanceWindowPtrOutputWithContext(context.Background()) } func (i FileSystemMaintenanceWindowArgs) ToFileSystemMaintenanceWindowPtrOutputWithContext(ctx context.Context) FileSystemMaintenanceWindowPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemMaintenanceWindowOutput).ToFileSystemMaintenanceWindowPtrOutputWithContext(ctx) } // FileSystemMaintenanceWindowPtrInput is an input type that accepts FileSystemMaintenanceWindowArgs, FileSystemMaintenanceWindowPtr and FileSystemMaintenanceWindowPtrOutput values. // You can construct a concrete instance of `FileSystemMaintenanceWindowPtrInput` via: // // FileSystemMaintenanceWindowArgs{...} // // or: // // nil type FileSystemMaintenanceWindowPtrInput interface { pulumi.Input ToFileSystemMaintenanceWindowPtrOutput() FileSystemMaintenanceWindowPtrOutput ToFileSystemMaintenanceWindowPtrOutputWithContext(context.Context) FileSystemMaintenanceWindowPtrOutput } type fileSystemMaintenanceWindowPtrType FileSystemMaintenanceWindowArgs func FileSystemMaintenanceWindowPtr(v *FileSystemMaintenanceWindowArgs) FileSystemMaintenanceWindowPtrInput { return (*fileSystemMaintenanceWindowPtrType)(v) } func (*fileSystemMaintenanceWindowPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FileSystemMaintenanceWindow)(nil)).Elem() } func (i *fileSystemMaintenanceWindowPtrType) ToFileSystemMaintenanceWindowPtrOutput() FileSystemMaintenanceWindowPtrOutput { return i.ToFileSystemMaintenanceWindowPtrOutputWithContext(context.Background()) } func (i *fileSystemMaintenanceWindowPtrType) ToFileSystemMaintenanceWindowPtrOutputWithContext(ctx context.Context) FileSystemMaintenanceWindowPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemMaintenanceWindowPtrOutput) } type FileSystemMaintenanceWindowOutput struct{ *pulumi.OutputState } func (FileSystemMaintenanceWindowOutput) ElementType() reflect.Type { return reflect.TypeOf((*FileSystemMaintenanceWindow)(nil)).Elem() } func (o FileSystemMaintenanceWindowOutput) ToFileSystemMaintenanceWindowOutput() FileSystemMaintenanceWindowOutput { return o } func (o FileSystemMaintenanceWindowOutput) ToFileSystemMaintenanceWindowOutputWithContext(ctx context.Context) FileSystemMaintenanceWindowOutput { return o } func (o FileSystemMaintenanceWindowOutput) ToFileSystemMaintenanceWindowPtrOutput() FileSystemMaintenanceWindowPtrOutput { return o.ToFileSystemMaintenanceWindowPtrOutputWithContext(context.Background()) } func (o FileSystemMaintenanceWindowOutput) ToFileSystemMaintenanceWindowPtrOutputWithContext(ctx context.Context) FileSystemMaintenanceWindowPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v FileSystemMaintenanceWindow) *FileSystemMaintenanceWindow { return &v }).(FileSystemMaintenanceWindowPtrOutput) } // The day of the week on which the maintenance window will occur. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. func (o FileSystemMaintenanceWindowOutput) DayOfWeek() pulumi.StringOutput { return o.ApplyT(func(v FileSystemMaintenanceWindow) string { return v.DayOfWeek }).(pulumi.StringOutput) } // The time of day (in UTC) to start the maintenance window. func (o FileSystemMaintenanceWindowOutput) TimeOfDayInUtc() pulumi.StringOutput { return o.ApplyT(func(v FileSystemMaintenanceWindow) string { return v.TimeOfDayInUtc }).(pulumi.StringOutput) } type FileSystemMaintenanceWindowPtrOutput struct{ *pulumi.OutputState } func (FileSystemMaintenanceWindowPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**FileSystemMaintenanceWindow)(nil)).Elem() } func (o FileSystemMaintenanceWindowPtrOutput) ToFileSystemMaintenanceWindowPtrOutput() FileSystemMaintenanceWindowPtrOutput { return o } func (o FileSystemMaintenanceWindowPtrOutput) ToFileSystemMaintenanceWindowPtrOutputWithContext(ctx context.Context) FileSystemMaintenanceWindowPtrOutput { return o } func (o FileSystemMaintenanceWindowPtrOutput) Elem() FileSystemMaintenanceWindowOutput { return o.ApplyT(func(v *FileSystemMaintenanceWindow) FileSystemMaintenanceWindow { if v != nil { return *v } var ret FileSystemMaintenanceWindow return ret }).(FileSystemMaintenanceWindowOutput) } // The day of the week on which the maintenance window will occur. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`. func (o FileSystemMaintenanceWindowPtrOutput) DayOfWeek() pulumi.StringPtrOutput { return o.ApplyT(func(v *FileSystemMaintenanceWindow) *string { if v == nil { return nil } return &v.DayOfWeek }).(pulumi.StringPtrOutput) } // The time of day (in UTC) to start the maintenance window. func (o FileSystemMaintenanceWindowPtrOutput) TimeOfDayInUtc() pulumi.StringPtrOutput { return o.ApplyT(func(v *FileSystemMaintenanceWindow) *string { if v == nil { return nil } return &v.TimeOfDayInUtc }).(pulumi.StringPtrOutput) } type FileSystemRootSquash struct { // Squash mode of the AML file system. Possible values are `RootOnly`, and `All`. Mode string `pulumi:"mode"` // NID IP Address list(s) to be added to the TrustedSystems, separated by semicolons. NoSquashNids string `pulumi:"noSquashNids"` // The GID to be used for the root squash. Defaults to `0`. SquashGid *int `pulumi:"squashGid"` // The UID to be used for the root squash. Defaults to `0`. SquashUid *int `pulumi:"squashUid"` } // FileSystemRootSquashInput is an input type that accepts FileSystemRootSquashArgs and FileSystemRootSquashOutput values. // You can construct a concrete instance of `FileSystemRootSquashInput` via: // // FileSystemRootSquashArgs{...} type FileSystemRootSquashInput interface { pulumi.Input ToFileSystemRootSquashOutput() FileSystemRootSquashOutput ToFileSystemRootSquashOutputWithContext(context.Context) FileSystemRootSquashOutput } type FileSystemRootSquashArgs struct { // Squash mode of the AML file system. Possible values are `RootOnly`, and `All`. Mode pulumi.StringInput `pulumi:"mode"` // NID IP Address list(s) to be added to the TrustedSystems, separated by semicolons. NoSquashNids pulumi.StringInput `pulumi:"noSquashNids"` // The GID to be used for the root squash. Defaults to `0`. SquashGid pulumi.IntPtrInput `pulumi:"squashGid"` // The UID to be used for the root squash. Defaults to `0`. SquashUid pulumi.IntPtrInput `pulumi:"squashUid"` } func (FileSystemRootSquashArgs) ElementType() reflect.Type { return reflect.TypeOf((*FileSystemRootSquash)(nil)).Elem() } func (i FileSystemRootSquashArgs) ToFileSystemRootSquashOutput() FileSystemRootSquashOutput { return i.ToFileSystemRootSquashOutputWithContext(context.Background()) } func (i FileSystemRootSquashArgs) ToFileSystemRootSquashOutputWithContext(ctx context.Context) FileSystemRootSquashOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemRootSquashOutput) } func (i FileSystemRootSquashArgs) ToFileSystemRootSquashPtrOutput() FileSystemRootSquashPtrOutput { return i.ToFileSystemRootSquashPtrOutputWithContext(context.Background()) } func (i FileSystemRootSquashArgs) ToFileSystemRootSquashPtrOutputWithContext(ctx context.Context) FileSystemRootSquashPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemRootSquashOutput).ToFileSystemRootSquashPtrOutputWithContext(ctx) } // FileSystemRootSquashPtrInput is an input type that accepts FileSystemRootSquashArgs, FileSystemRootSquashPtr and FileSystemRootSquashPtrOutput values. // You can construct a concrete instance of `FileSystemRootSquashPtrInput` via: // // FileSystemRootSquashArgs{...} // // or: // // nil type FileSystemRootSquashPtrInput interface { pulumi.Input ToFileSystemRootSquashPtrOutput() FileSystemRootSquashPtrOutput ToFileSystemRootSquashPtrOutputWithContext(context.Context) FileSystemRootSquashPtrOutput } type fileSystemRootSquashPtrType FileSystemRootSquashArgs func FileSystemRootSquashPtr(v *FileSystemRootSquashArgs) FileSystemRootSquashPtrInput { return (*fileSystemRootSquashPtrType)(v) } func (*fileSystemRootSquashPtrType) ElementType() reflect.Type { return reflect.TypeOf((**FileSystemRootSquash)(nil)).Elem() } func (i *fileSystemRootSquashPtrType) ToFileSystemRootSquashPtrOutput() FileSystemRootSquashPtrOutput { return i.ToFileSystemRootSquashPtrOutputWithContext(context.Background()) } func (i *fileSystemRootSquashPtrType) ToFileSystemRootSquashPtrOutputWithContext(ctx context.Context) FileSystemRootSquashPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemRootSquashPtrOutput) }
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/managedlustre/fileSystem.go
sdk/go/azure/managedlustre/fileSystem.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 managedlustre 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 Managed Lustre File System. // // ## 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/managedlustre" // "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-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.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.2.0/24"), // }, // }) // if err != nil { // return err // } // _, err = managedlustre.NewFileSystem(ctx, "example", &managedlustre.FileSystemArgs{ // Name: pulumi.String("example-amlfs"), // ResourceGroupName: example.Name, // Location: example.Location, // SkuName: pulumi.String("AMLFS-Durable-Premium-250"), // SubnetId: exampleSubnet.ID(), // StorageCapacityInTb: pulumi.Int(8), // Zones: pulumi.StringArray{ // pulumi.String("2"), // }, // MaintenanceWindow: &managedlustre.FileSystemMaintenanceWindowArgs{ // DayOfWeek: pulumi.String("Friday"), // TimeOfDayUtc: "22: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.StorageCache` - 2024-07-01 // // ## Import // // Azure Managed Lustre File Systems can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:managedlustre/fileSystem:FileSystem example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.StorageCache/amlFilesystems/amlFilesystem1 // ``` type FileSystem struct { pulumi.CustomResourceState // An `encryptionKey` block as defined below. // // > **Note:** Removing `encryptionKey` forces a new resource to be created. EncryptionKey FileSystemEncryptionKeyPtrOutput `pulumi:"encryptionKey"` // A `hsmSetting` block as defined below. Changing this forces a new resource to be created. HsmSetting FileSystemHsmSettingPtrOutput `pulumi:"hsmSetting"` // An `identity` block as defined below. Changing this forces a new resource to be created. Identity FileSystemIdentityPtrOutput `pulumi:"identity"` // The Azure Region where the Azure Managed Lustre File System should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // A `maintenanceWindow` block as defined below. MaintenanceWindow FileSystemMaintenanceWindowOutput `pulumi:"maintenanceWindow"` // IP Address of Managed Lustre File System Services. MgsAddress pulumi.StringOutput `pulumi:"mgsAddress"` // The name which should be used for this Azure Managed Lustre File System. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Azure Managed Lustre File System should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `rootSquash` block as defined below. RootSquash FileSystemRootSquashPtrOutput `pulumi:"rootSquash"` // The SKU name for the Azure Managed Lustre File System. Possible values are `AMLFS-Durable-Premium-40`, `AMLFS-Durable-Premium-125`, `AMLFS-Durable-Premium-250` and `AMLFS-Durable-Premium-500`. Changing this forces a new resource to be created. SkuName pulumi.StringOutput `pulumi:"skuName"` // The size of the Azure Managed Lustre File System in TiB. The valid values for this field are dependant on which `skuName` has been defined in the configuration file. For more information on the valid values for this field please see the [product documentation](https://learn.microsoft.com/azure/azure-managed-lustre/create-file-system-resource-manager#file-system-type-and-size-options). Changing this forces a new resource to be created. StorageCapacityInTb pulumi.IntOutput `pulumi:"storageCapacityInTb"` // The resource ID of the Subnet that is used for managing the Azure Managed Lustre file system and for client-facing operations. This subnet should have at least a /24 subnet mask within the Virtual Network's address space. Changing this forces a new resource to be created. SubnetId pulumi.StringOutput `pulumi:"subnetId"` // A mapping of tags which should be assigned to the Azure Managed Lustre File System. Tags pulumi.StringMapOutput `pulumi:"tags"` // A list of availability zones for the Azure Managed Lustre File System. Changing this forces a new resource to be created. Zones pulumi.StringArrayOutput `pulumi:"zones"` } // NewFileSystem registers a new resource with the given unique name, arguments, and options. func NewFileSystem(ctx *pulumi.Context, name string, args *FileSystemArgs, opts ...pulumi.ResourceOption) (*FileSystem, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.MaintenanceWindow == nil { return nil, errors.New("invalid value for required argument 'MaintenanceWindow'") } 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.StorageCapacityInTb == nil { return nil, errors.New("invalid value for required argument 'StorageCapacityInTb'") } if args.SubnetId == nil { return nil, errors.New("invalid value for required argument 'SubnetId'") } if args.Zones == nil { return nil, errors.New("invalid value for required argument 'Zones'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FileSystem err := ctx.RegisterResource("azure:managedlustre/fileSystem:FileSystem", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFileSystem gets an existing FileSystem 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 GetFileSystem(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FileSystemState, opts ...pulumi.ResourceOption) (*FileSystem, error) { var resource FileSystem err := ctx.ReadResource("azure:managedlustre/fileSystem:FileSystem", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FileSystem resources. type fileSystemState struct { // An `encryptionKey` block as defined below. // // > **Note:** Removing `encryptionKey` forces a new resource to be created. EncryptionKey *FileSystemEncryptionKey `pulumi:"encryptionKey"` // A `hsmSetting` block as defined below. Changing this forces a new resource to be created. HsmSetting *FileSystemHsmSetting `pulumi:"hsmSetting"` // An `identity` block as defined below. Changing this forces a new resource to be created. Identity *FileSystemIdentity `pulumi:"identity"` // The Azure Region where the Azure Managed Lustre File System should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // A `maintenanceWindow` block as defined below. MaintenanceWindow *FileSystemMaintenanceWindow `pulumi:"maintenanceWindow"` // IP Address of Managed Lustre File System Services. MgsAddress *string `pulumi:"mgsAddress"` // The name which should be used for this Azure Managed Lustre File System. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Azure Managed Lustre File System should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `rootSquash` block as defined below. RootSquash *FileSystemRootSquash `pulumi:"rootSquash"` // The SKU name for the Azure Managed Lustre File System. Possible values are `AMLFS-Durable-Premium-40`, `AMLFS-Durable-Premium-125`, `AMLFS-Durable-Premium-250` and `AMLFS-Durable-Premium-500`. Changing this forces a new resource to be created. SkuName *string `pulumi:"skuName"` // The size of the Azure Managed Lustre File System in TiB. The valid values for this field are dependant on which `skuName` has been defined in the configuration file. For more information on the valid values for this field please see the [product documentation](https://learn.microsoft.com/azure/azure-managed-lustre/create-file-system-resource-manager#file-system-type-and-size-options). Changing this forces a new resource to be created. StorageCapacityInTb *int `pulumi:"storageCapacityInTb"` // The resource ID of the Subnet that is used for managing the Azure Managed Lustre file system and for client-facing operations. This subnet should have at least a /24 subnet mask within the Virtual Network's address space. Changing this forces a new resource to be created. SubnetId *string `pulumi:"subnetId"` // A mapping of tags which should be assigned to the Azure Managed Lustre File System. Tags map[string]string `pulumi:"tags"` // A list of availability zones for the Azure Managed Lustre File System. Changing this forces a new resource to be created. Zones []string `pulumi:"zones"` } type FileSystemState struct { // An `encryptionKey` block as defined below. // // > **Note:** Removing `encryptionKey` forces a new resource to be created. EncryptionKey FileSystemEncryptionKeyPtrInput // A `hsmSetting` block as defined below. Changing this forces a new resource to be created. HsmSetting FileSystemHsmSettingPtrInput // An `identity` block as defined below. Changing this forces a new resource to be created. Identity FileSystemIdentityPtrInput // The Azure Region where the Azure Managed Lustre File System should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // A `maintenanceWindow` block as defined below. MaintenanceWindow FileSystemMaintenanceWindowPtrInput // IP Address of Managed Lustre File System Services. MgsAddress pulumi.StringPtrInput // The name which should be used for this Azure Managed Lustre File System. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Azure Managed Lustre File System should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `rootSquash` block as defined below. RootSquash FileSystemRootSquashPtrInput // The SKU name for the Azure Managed Lustre File System. Possible values are `AMLFS-Durable-Premium-40`, `AMLFS-Durable-Premium-125`, `AMLFS-Durable-Premium-250` and `AMLFS-Durable-Premium-500`. Changing this forces a new resource to be created. SkuName pulumi.StringPtrInput // The size of the Azure Managed Lustre File System in TiB. The valid values for this field are dependant on which `skuName` has been defined in the configuration file. For more information on the valid values for this field please see the [product documentation](https://learn.microsoft.com/azure/azure-managed-lustre/create-file-system-resource-manager#file-system-type-and-size-options). Changing this forces a new resource to be created. StorageCapacityInTb pulumi.IntPtrInput // The resource ID of the Subnet that is used for managing the Azure Managed Lustre file system and for client-facing operations. This subnet should have at least a /24 subnet mask within the Virtual Network's address space. Changing this forces a new resource to be created. SubnetId pulumi.StringPtrInput // A mapping of tags which should be assigned to the Azure Managed Lustre File System. Tags pulumi.StringMapInput // A list of availability zones for the Azure Managed Lustre File System. Changing this forces a new resource to be created. Zones pulumi.StringArrayInput } func (FileSystemState) ElementType() reflect.Type { return reflect.TypeOf((*fileSystemState)(nil)).Elem() } type fileSystemArgs struct { // An `encryptionKey` block as defined below. // // > **Note:** Removing `encryptionKey` forces a new resource to be created. EncryptionKey *FileSystemEncryptionKey `pulumi:"encryptionKey"` // A `hsmSetting` block as defined below. Changing this forces a new resource to be created. HsmSetting *FileSystemHsmSetting `pulumi:"hsmSetting"` // An `identity` block as defined below. Changing this forces a new resource to be created. Identity *FileSystemIdentity `pulumi:"identity"` // The Azure Region where the Azure Managed Lustre File System should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // A `maintenanceWindow` block as defined below. MaintenanceWindow FileSystemMaintenanceWindow `pulumi:"maintenanceWindow"` // The name which should be used for this Azure Managed Lustre File System. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Azure Managed Lustre File System should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `rootSquash` block as defined below. RootSquash *FileSystemRootSquash `pulumi:"rootSquash"` // The SKU name for the Azure Managed Lustre File System. Possible values are `AMLFS-Durable-Premium-40`, `AMLFS-Durable-Premium-125`, `AMLFS-Durable-Premium-250` and `AMLFS-Durable-Premium-500`. Changing this forces a new resource to be created. SkuName string `pulumi:"skuName"` // The size of the Azure Managed Lustre File System in TiB. The valid values for this field are dependant on which `skuName` has been defined in the configuration file. For more information on the valid values for this field please see the [product documentation](https://learn.microsoft.com/azure/azure-managed-lustre/create-file-system-resource-manager#file-system-type-and-size-options). Changing this forces a new resource to be created. StorageCapacityInTb int `pulumi:"storageCapacityInTb"` // The resource ID of the Subnet that is used for managing the Azure Managed Lustre file system and for client-facing operations. This subnet should have at least a /24 subnet mask within the Virtual Network's address space. Changing this forces a new resource to be created. SubnetId string `pulumi:"subnetId"` // A mapping of tags which should be assigned to the Azure Managed Lustre File System. Tags map[string]string `pulumi:"tags"` // A list of availability zones for the Azure Managed Lustre File System. Changing this forces a new resource to be created. Zones []string `pulumi:"zones"` } // The set of arguments for constructing a FileSystem resource. type FileSystemArgs struct { // An `encryptionKey` block as defined below. // // > **Note:** Removing `encryptionKey` forces a new resource to be created. EncryptionKey FileSystemEncryptionKeyPtrInput // A `hsmSetting` block as defined below. Changing this forces a new resource to be created. HsmSetting FileSystemHsmSettingPtrInput // An `identity` block as defined below. Changing this forces a new resource to be created. Identity FileSystemIdentityPtrInput // The Azure Region where the Azure Managed Lustre File System should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // A `maintenanceWindow` block as defined below. MaintenanceWindow FileSystemMaintenanceWindowInput // The name which should be used for this Azure Managed Lustre File System. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Azure Managed Lustre File System should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `rootSquash` block as defined below. RootSquash FileSystemRootSquashPtrInput // The SKU name for the Azure Managed Lustre File System. Possible values are `AMLFS-Durable-Premium-40`, `AMLFS-Durable-Premium-125`, `AMLFS-Durable-Premium-250` and `AMLFS-Durable-Premium-500`. Changing this forces a new resource to be created. SkuName pulumi.StringInput // The size of the Azure Managed Lustre File System in TiB. The valid values for this field are dependant on which `skuName` has been defined in the configuration file. For more information on the valid values for this field please see the [product documentation](https://learn.microsoft.com/azure/azure-managed-lustre/create-file-system-resource-manager#file-system-type-and-size-options). Changing this forces a new resource to be created. StorageCapacityInTb pulumi.IntInput // The resource ID of the Subnet that is used for managing the Azure Managed Lustre file system and for client-facing operations. This subnet should have at least a /24 subnet mask within the Virtual Network's address space. Changing this forces a new resource to be created. SubnetId pulumi.StringInput // A mapping of tags which should be assigned to the Azure Managed Lustre File System. Tags pulumi.StringMapInput // A list of availability zones for the Azure Managed Lustre File System. Changing this forces a new resource to be created. Zones pulumi.StringArrayInput } func (FileSystemArgs) ElementType() reflect.Type { return reflect.TypeOf((*fileSystemArgs)(nil)).Elem() } type FileSystemInput interface { pulumi.Input ToFileSystemOutput() FileSystemOutput ToFileSystemOutputWithContext(ctx context.Context) FileSystemOutput } func (*FileSystem) ElementType() reflect.Type { return reflect.TypeOf((**FileSystem)(nil)).Elem() } func (i *FileSystem) ToFileSystemOutput() FileSystemOutput { return i.ToFileSystemOutputWithContext(context.Background()) } func (i *FileSystem) ToFileSystemOutputWithContext(ctx context.Context) FileSystemOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemOutput) } // FileSystemArrayInput is an input type that accepts FileSystemArray and FileSystemArrayOutput values. // You can construct a concrete instance of `FileSystemArrayInput` via: // // FileSystemArray{ FileSystemArgs{...} } type FileSystemArrayInput interface { pulumi.Input ToFileSystemArrayOutput() FileSystemArrayOutput ToFileSystemArrayOutputWithContext(context.Context) FileSystemArrayOutput } type FileSystemArray []FileSystemInput func (FileSystemArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FileSystem)(nil)).Elem() } func (i FileSystemArray) ToFileSystemArrayOutput() FileSystemArrayOutput { return i.ToFileSystemArrayOutputWithContext(context.Background()) } func (i FileSystemArray) ToFileSystemArrayOutputWithContext(ctx context.Context) FileSystemArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemArrayOutput) } // FileSystemMapInput is an input type that accepts FileSystemMap and FileSystemMapOutput values. // You can construct a concrete instance of `FileSystemMapInput` via: // // FileSystemMap{ "key": FileSystemArgs{...} } type FileSystemMapInput interface { pulumi.Input ToFileSystemMapOutput() FileSystemMapOutput ToFileSystemMapOutputWithContext(context.Context) FileSystemMapOutput } type FileSystemMap map[string]FileSystemInput func (FileSystemMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FileSystem)(nil)).Elem() } func (i FileSystemMap) ToFileSystemMapOutput() FileSystemMapOutput { return i.ToFileSystemMapOutputWithContext(context.Background()) } func (i FileSystemMap) ToFileSystemMapOutputWithContext(ctx context.Context) FileSystemMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FileSystemMapOutput) } type FileSystemOutput struct{ *pulumi.OutputState } func (FileSystemOutput) ElementType() reflect.Type { return reflect.TypeOf((**FileSystem)(nil)).Elem() } func (o FileSystemOutput) ToFileSystemOutput() FileSystemOutput { return o } func (o FileSystemOutput) ToFileSystemOutputWithContext(ctx context.Context) FileSystemOutput { return o } // An `encryptionKey` block as defined below. // // > **Note:** Removing `encryptionKey` forces a new resource to be created. func (o FileSystemOutput) EncryptionKey() FileSystemEncryptionKeyPtrOutput { return o.ApplyT(func(v *FileSystem) FileSystemEncryptionKeyPtrOutput { return v.EncryptionKey }).(FileSystemEncryptionKeyPtrOutput) } // A `hsmSetting` block as defined below. Changing this forces a new resource to be created. func (o FileSystemOutput) HsmSetting() FileSystemHsmSettingPtrOutput { return o.ApplyT(func(v *FileSystem) FileSystemHsmSettingPtrOutput { return v.HsmSetting }).(FileSystemHsmSettingPtrOutput) } // An `identity` block as defined below. Changing this forces a new resource to be created. func (o FileSystemOutput) Identity() FileSystemIdentityPtrOutput { return o.ApplyT(func(v *FileSystem) FileSystemIdentityPtrOutput { return v.Identity }).(FileSystemIdentityPtrOutput) } // The Azure Region where the Azure Managed Lustre File System should exist. Changing this forces a new resource to be created. func (o FileSystemOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *FileSystem) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // A `maintenanceWindow` block as defined below. func (o FileSystemOutput) MaintenanceWindow() FileSystemMaintenanceWindowOutput { return o.ApplyT(func(v *FileSystem) FileSystemMaintenanceWindowOutput { return v.MaintenanceWindow }).(FileSystemMaintenanceWindowOutput) } // IP Address of Managed Lustre File System Services. func (o FileSystemOutput) MgsAddress() pulumi.StringOutput { return o.ApplyT(func(v *FileSystem) pulumi.StringOutput { return v.MgsAddress }).(pulumi.StringOutput) } // The name which should be used for this Azure Managed Lustre File System. Changing this forces a new resource to be created. func (o FileSystemOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FileSystem) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Azure Managed Lustre File System should exist. Changing this forces a new resource to be created. func (o FileSystemOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *FileSystem) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `rootSquash` block as defined below. func (o FileSystemOutput) RootSquash() FileSystemRootSquashPtrOutput { return o.ApplyT(func(v *FileSystem) FileSystemRootSquashPtrOutput { return v.RootSquash }).(FileSystemRootSquashPtrOutput) } // The SKU name for the Azure Managed Lustre File System. Possible values are `AMLFS-Durable-Premium-40`, `AMLFS-Durable-Premium-125`, `AMLFS-Durable-Premium-250` and `AMLFS-Durable-Premium-500`. Changing this forces a new resource to be created. func (o FileSystemOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v *FileSystem) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput) } // The size of the Azure Managed Lustre File System in TiB. The valid values for this field are dependant on which `skuName` has been defined in the configuration file. For more information on the valid values for this field please see the [product documentation](https://learn.microsoft.com/azure/azure-managed-lustre/create-file-system-resource-manager#file-system-type-and-size-options). Changing this forces a new resource to be created. func (o FileSystemOutput) StorageCapacityInTb() pulumi.IntOutput { return o.ApplyT(func(v *FileSystem) pulumi.IntOutput { return v.StorageCapacityInTb }).(pulumi.IntOutput) } // The resource ID of the Subnet that is used for managing the Azure Managed Lustre file system and for client-facing operations. This subnet should have at least a /24 subnet mask within the Virtual Network's address space. Changing this forces a new resource to be created. func (o FileSystemOutput) SubnetId() pulumi.StringOutput { return o.ApplyT(func(v *FileSystem) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Azure Managed Lustre File System. func (o FileSystemOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *FileSystem) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // A list of availability zones for the Azure Managed Lustre File System. Changing this forces a new resource to be created. func (o FileSystemOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v *FileSystem) pulumi.StringArrayOutput { return v.Zones }).(pulumi.StringArrayOutput) } type FileSystemArrayOutput struct{ *pulumi.OutputState } func (FileSystemArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FileSystem)(nil)).Elem() } func (o FileSystemArrayOutput) ToFileSystemArrayOutput() FileSystemArrayOutput { return o } func (o FileSystemArrayOutput) ToFileSystemArrayOutputWithContext(ctx context.Context) FileSystemArrayOutput { return o } func (o FileSystemArrayOutput) Index(i pulumi.IntInput) FileSystemOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FileSystem { return vs[0].([]*FileSystem)[vs[1].(int)] }).(FileSystemOutput) } type FileSystemMapOutput struct{ *pulumi.OutputState } func (FileSystemMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FileSystem)(nil)).Elem() } func (o FileSystemMapOutput) ToFileSystemMapOutput() FileSystemMapOutput { return o } func (o FileSystemMapOutput) ToFileSystemMapOutputWithContext(ctx context.Context) FileSystemMapOutput { return o } func (o FileSystemMapOutput) MapIndex(k pulumi.StringInput) FileSystemOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FileSystem { return vs[0].(map[string]*FileSystem)[vs[1].(string)] }).(FileSystemOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FileSystemInput)(nil)).Elem(), &FileSystem{}) pulumi.RegisterInputType(reflect.TypeOf((*FileSystemArrayInput)(nil)).Elem(), FileSystemArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FileSystemMapInput)(nil)).Elem(), FileSystemMap{}) pulumi.RegisterOutputType(FileSystemOutput{}) pulumi.RegisterOutputType(FileSystemArrayOutput{}) pulumi.RegisterOutputType(FileSystemMapOutput{}) }
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/managementresource/init.go
sdk/go/azure/managementresource/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 managementresource 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:managementresource/manangementLock:ManangementLock": r = &ManangementLock{} 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", "managementresource/manangementLock", &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/managementresource/manangementLock.go
sdk/go/azure/managementresource/manangementLock.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 managementresource import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Management Lock which is scoped to a Subscription, Resource Group or Resource. // // ## Example Usage // // ### Subscription Level Lock) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // _, err = management.NewLock(ctx, "subscription-level", &management.LockArgs{ // Name: pulumi.String("subscription-level"), // Scope: pulumi.String(current.Id), // LockLevel: pulumi.String("CanNotDelete"), // Notes: pulumi.String("Items can't be deleted in this subscription!"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Resource Group Level Lock) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management" // "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("locked-resource-group"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = management.NewLock(ctx, "resource-group-level", &management.LockArgs{ // Name: pulumi.String("resource-group-level"), // Scope: example.ID(), // LockLevel: pulumi.String("ReadOnly"), // Notes: pulumi.String("This Resource Group is Read-Only"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Resource Level Lock) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management" // "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("locked-resource-group"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("locked-publicip"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // IdleTimeoutInMinutes: pulumi.Int(30), // }) // if err != nil { // return err // } // _, err = management.NewLock(ctx, "public-ip", &management.LockArgs{ // Name: pulumi.String("resource-ip"), // Scope: examplePublicIp.ID(), // LockLevel: pulumi.String("CanNotDelete"), // Notes: pulumi.String("Locked because it's needed by a third-party"), // }) // 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.Authorization` - 2020-05-01 // // ## Import // // Management Locks can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:managementresource/manangementLock:ManangementLock lock1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Authorization/locks/lock1 // ``` // // Deprecated: azure.managementresource.ManangementLock has been deprecated in favor of azure.management.Lock type ManangementLock struct { pulumi.CustomResourceState // Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created. // // > **Note:** `CanNotDelete` means authorized users are able to read and modify the resources, but not delete. `ReadOnly` means authorized users can only read from a resource, but they can't modify or delete it. LockLevel pulumi.StringOutput `pulumi:"lockLevel"` // Specifies the name of the Management Lock. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created. Notes pulumi.StringPtrOutput `pulumi:"notes"` // Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created. Scope pulumi.StringOutput `pulumi:"scope"` } // NewManangementLock registers a new resource with the given unique name, arguments, and options. func NewManangementLock(ctx *pulumi.Context, name string, args *ManangementLockArgs, opts ...pulumi.ResourceOption) (*ManangementLock, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LockLevel == nil { return nil, errors.New("invalid value for required argument 'LockLevel'") } if args.Scope == nil { return nil, errors.New("invalid value for required argument 'Scope'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ManangementLock err := ctx.RegisterResource("azure:managementresource/manangementLock:ManangementLock", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetManangementLock gets an existing ManangementLock 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 GetManangementLock(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ManangementLockState, opts ...pulumi.ResourceOption) (*ManangementLock, error) { var resource ManangementLock err := ctx.ReadResource("azure:managementresource/manangementLock:ManangementLock", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ManangementLock resources. type manangementLockState struct { // Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created. // // > **Note:** `CanNotDelete` means authorized users are able to read and modify the resources, but not delete. `ReadOnly` means authorized users can only read from a resource, but they can't modify or delete it. LockLevel *string `pulumi:"lockLevel"` // Specifies the name of the Management Lock. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created. Notes *string `pulumi:"notes"` // Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created. Scope *string `pulumi:"scope"` } type ManangementLockState struct { // Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created. // // > **Note:** `CanNotDelete` means authorized users are able to read and modify the resources, but not delete. `ReadOnly` means authorized users can only read from a resource, but they can't modify or delete it. LockLevel pulumi.StringPtrInput // Specifies the name of the Management Lock. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created. Notes pulumi.StringPtrInput // Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created. Scope pulumi.StringPtrInput } func (ManangementLockState) ElementType() reflect.Type { return reflect.TypeOf((*manangementLockState)(nil)).Elem() } type manangementLockArgs struct { // Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created. // // > **Note:** `CanNotDelete` means authorized users are able to read and modify the resources, but not delete. `ReadOnly` means authorized users can only read from a resource, but they can't modify or delete it. LockLevel string `pulumi:"lockLevel"` // Specifies the name of the Management Lock. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created. Notes *string `pulumi:"notes"` // Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created. Scope string `pulumi:"scope"` } // The set of arguments for constructing a ManangementLock resource. type ManangementLockArgs struct { // Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created. // // > **Note:** `CanNotDelete` means authorized users are able to read and modify the resources, but not delete. `ReadOnly` means authorized users can only read from a resource, but they can't modify or delete it. LockLevel pulumi.StringInput // Specifies the name of the Management Lock. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created. Notes pulumi.StringPtrInput // Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created. Scope pulumi.StringInput } func (ManangementLockArgs) ElementType() reflect.Type { return reflect.TypeOf((*manangementLockArgs)(nil)).Elem() } type ManangementLockInput interface { pulumi.Input ToManangementLockOutput() ManangementLockOutput ToManangementLockOutputWithContext(ctx context.Context) ManangementLockOutput } func (*ManangementLock) ElementType() reflect.Type { return reflect.TypeOf((**ManangementLock)(nil)).Elem() } func (i *ManangementLock) ToManangementLockOutput() ManangementLockOutput { return i.ToManangementLockOutputWithContext(context.Background()) } func (i *ManangementLock) ToManangementLockOutputWithContext(ctx context.Context) ManangementLockOutput { return pulumi.ToOutputWithContext(ctx, i).(ManangementLockOutput) } // ManangementLockArrayInput is an input type that accepts ManangementLockArray and ManangementLockArrayOutput values. // You can construct a concrete instance of `ManangementLockArrayInput` via: // // ManangementLockArray{ ManangementLockArgs{...} } type ManangementLockArrayInput interface { pulumi.Input ToManangementLockArrayOutput() ManangementLockArrayOutput ToManangementLockArrayOutputWithContext(context.Context) ManangementLockArrayOutput } type ManangementLockArray []ManangementLockInput func (ManangementLockArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManangementLock)(nil)).Elem() } func (i ManangementLockArray) ToManangementLockArrayOutput() ManangementLockArrayOutput { return i.ToManangementLockArrayOutputWithContext(context.Background()) } func (i ManangementLockArray) ToManangementLockArrayOutputWithContext(ctx context.Context) ManangementLockArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ManangementLockArrayOutput) } // ManangementLockMapInput is an input type that accepts ManangementLockMap and ManangementLockMapOutput values. // You can construct a concrete instance of `ManangementLockMapInput` via: // // ManangementLockMap{ "key": ManangementLockArgs{...} } type ManangementLockMapInput interface { pulumi.Input ToManangementLockMapOutput() ManangementLockMapOutput ToManangementLockMapOutputWithContext(context.Context) ManangementLockMapOutput } type ManangementLockMap map[string]ManangementLockInput func (ManangementLockMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManangementLock)(nil)).Elem() } func (i ManangementLockMap) ToManangementLockMapOutput() ManangementLockMapOutput { return i.ToManangementLockMapOutputWithContext(context.Background()) } func (i ManangementLockMap) ToManangementLockMapOutputWithContext(ctx context.Context) ManangementLockMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ManangementLockMapOutput) } type ManangementLockOutput struct{ *pulumi.OutputState } func (ManangementLockOutput) ElementType() reflect.Type { return reflect.TypeOf((**ManangementLock)(nil)).Elem() } func (o ManangementLockOutput) ToManangementLockOutput() ManangementLockOutput { return o } func (o ManangementLockOutput) ToManangementLockOutputWithContext(ctx context.Context) ManangementLockOutput { return o } // Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created. // // > **Note:** `CanNotDelete` means authorized users are able to read and modify the resources, but not delete. `ReadOnly` means authorized users can only read from a resource, but they can't modify or delete it. func (o ManangementLockOutput) LockLevel() pulumi.StringOutput { return o.ApplyT(func(v *ManangementLock) pulumi.StringOutput { return v.LockLevel }).(pulumi.StringOutput) } // Specifies the name of the Management Lock. Changing this forces a new resource to be created. func (o ManangementLockOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ManangementLock) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created. func (o ManangementLockOutput) Notes() pulumi.StringPtrOutput { return o.ApplyT(func(v *ManangementLock) pulumi.StringPtrOutput { return v.Notes }).(pulumi.StringPtrOutput) } // Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created. func (o ManangementLockOutput) Scope() pulumi.StringOutput { return o.ApplyT(func(v *ManangementLock) pulumi.StringOutput { return v.Scope }).(pulumi.StringOutput) } type ManangementLockArrayOutput struct{ *pulumi.OutputState } func (ManangementLockArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ManangementLock)(nil)).Elem() } func (o ManangementLockArrayOutput) ToManangementLockArrayOutput() ManangementLockArrayOutput { return o } func (o ManangementLockArrayOutput) ToManangementLockArrayOutputWithContext(ctx context.Context) ManangementLockArrayOutput { return o } func (o ManangementLockArrayOutput) Index(i pulumi.IntInput) ManangementLockOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManangementLock { return vs[0].([]*ManangementLock)[vs[1].(int)] }).(ManangementLockOutput) } type ManangementLockMapOutput struct{ *pulumi.OutputState } func (ManangementLockMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ManangementLock)(nil)).Elem() } func (o ManangementLockMapOutput) ToManangementLockMapOutput() ManangementLockMapOutput { return o } func (o ManangementLockMapOutput) ToManangementLockMapOutputWithContext(ctx context.Context) ManangementLockMapOutput { return o } func (o ManangementLockMapOutput) MapIndex(k pulumi.StringInput) ManangementLockOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManangementLock { return vs[0].(map[string]*ManangementLock)[vs[1].(string)] }).(ManangementLockOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ManangementLockInput)(nil)).Elem(), &ManangementLock{}) pulumi.RegisterInputType(reflect.TypeOf((*ManangementLockArrayInput)(nil)).Elem(), ManangementLockArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ManangementLockMapInput)(nil)).Elem(), ManangementLockMap{}) pulumi.RegisterOutputType(ManangementLockOutput{}) pulumi.RegisterOutputType(ManangementLockArrayOutput{}) pulumi.RegisterOutputType(ManangementLockMapOutput{}) }
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/monitoring/getWorkspace.go
sdk/go/azure/monitoring/getWorkspace.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 monitoring 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 Workspace. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := monitoring.LookupWorkspace(ctx, &monitoring.LookupWorkspaceArgs{ // Name: "example-workspace", // ResourceGroupName: exampleAzurermResourceGroup.Name, // }, nil) // if err != nil { // return err // } // ctx.Export("queryEndpoint", example.QueryEndpoint) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Monitor` - 2023-04-03 func LookupWorkspace(ctx *pulumi.Context, args *LookupWorkspaceArgs, opts ...pulumi.InvokeOption) (*LookupWorkspaceResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupWorkspaceResult err := ctx.Invoke("azure:monitoring/getWorkspace:getWorkspace", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getWorkspace. type LookupWorkspaceArgs struct { // Specifies the name of the Workspace. Name string `pulumi:"name"` // Specifies the name of the resource group the Workspace is located in. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getWorkspace. type LookupWorkspaceResult struct { // The ID of the managed default Data Collection Endpoint created with the Azure Monitor Workspace. DefaultDataCollectionEndpointId string `pulumi:"defaultDataCollectionEndpointId"` // The ID of the managed default Data Collection Rule created with the Azure Monitor Workspace. DefaultDataCollectionRuleId string `pulumi:"defaultDataCollectionRuleId"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region where the Workspace is located. Location string `pulumi:"location"` Name string `pulumi:"name"` // Whether network access from public internet to the Workspace are allowed. PublicNetworkAccessEnabled bool `pulumi:"publicNetworkAccessEnabled"` // The query endpoint for the Azure Monitor Workspace. QueryEndpoint string `pulumi:"queryEndpoint"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags that are assigned to the Workspace. Tags map[string]string `pulumi:"tags"` } func LookupWorkspaceOutput(ctx *pulumi.Context, args LookupWorkspaceOutputArgs, opts ...pulumi.InvokeOption) LookupWorkspaceResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupWorkspaceResultOutput, error) { args := v.(LookupWorkspaceArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:monitoring/getWorkspace:getWorkspace", args, LookupWorkspaceResultOutput{}, options).(LookupWorkspaceResultOutput), nil }).(LookupWorkspaceResultOutput) } // A collection of arguments for invoking getWorkspace. type LookupWorkspaceOutputArgs struct { // Specifies the name of the Workspace. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group the Workspace is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupWorkspaceOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupWorkspaceArgs)(nil)).Elem() } // A collection of values returned by getWorkspace. type LookupWorkspaceResultOutput struct{ *pulumi.OutputState } func (LookupWorkspaceResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupWorkspaceResult)(nil)).Elem() } func (o LookupWorkspaceResultOutput) ToLookupWorkspaceResultOutput() LookupWorkspaceResultOutput { return o } func (o LookupWorkspaceResultOutput) ToLookupWorkspaceResultOutputWithContext(ctx context.Context) LookupWorkspaceResultOutput { return o } // The ID of the managed default Data Collection Endpoint created with the Azure Monitor Workspace. func (o LookupWorkspaceResultOutput) DefaultDataCollectionEndpointId() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.DefaultDataCollectionEndpointId }).(pulumi.StringOutput) } // The ID of the managed default Data Collection Rule created with the Azure Monitor Workspace. func (o LookupWorkspaceResultOutput) DefaultDataCollectionRuleId() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.DefaultDataCollectionRuleId }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupWorkspaceResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region where the Workspace is located. func (o LookupWorkspaceResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupWorkspaceResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Name }).(pulumi.StringOutput) } // Whether network access from public internet to the Workspace are allowed. func (o LookupWorkspaceResultOutput) PublicNetworkAccessEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupWorkspaceResult) bool { return v.PublicNetworkAccessEnabled }).(pulumi.BoolOutput) } // The query endpoint for the Azure Monitor Workspace. func (o LookupWorkspaceResultOutput) QueryEndpoint() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.QueryEndpoint }).(pulumi.StringOutput) } func (o LookupWorkspaceResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupWorkspaceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags that are assigned to the Workspace. func (o LookupWorkspaceResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupWorkspaceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupWorkspaceResultOutput{}) }
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/monitoring/metricAlert.go
sdk/go/azure/monitoring/metricAlert.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 monitoring import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Metric Alert within Azure 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/monitoring" // "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 // } // toMonitor, err := storage.NewAccount(ctx, "to_monitor", &storage.AccountArgs{ // Name: pulumi.String("examplestorageaccount"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // main, err := monitoring.NewActionGroup(ctx, "main", &monitoring.ActionGroupArgs{ // Name: pulumi.String("example-actiongroup"), // ResourceGroupName: example.Name, // ShortName: pulumi.String("exampleact"), // WebhookReceivers: monitoring.ActionGroupWebhookReceiverArray{ // &monitoring.ActionGroupWebhookReceiverArgs{ // Name: pulumi.String("callmyapi"), // ServiceUri: pulumi.String("http://example.com/alert"), // }, // }, // }) // if err != nil { // return err // } // _, err = monitoring.NewMetricAlert(ctx, "example", &monitoring.MetricAlertArgs{ // Name: pulumi.String("example-metricalert"), // ResourceGroupName: example.Name, // Scopes: pulumi.StringArray{ // toMonitor.ID(), // }, // Description: pulumi.String("Action will be triggered when Transactions count is greater than 50."), // Criterias: monitoring.MetricAlertCriteriaArray{ // &monitoring.MetricAlertCriteriaArgs{ // MetricNamespace: pulumi.String("Microsoft.Storage/storageAccounts"), // MetricName: pulumi.String("Transactions"), // Aggregation: pulumi.String("Total"), // Operator: pulumi.String("GreaterThan"), // Threshold: pulumi.Float64(50), // Dimensions: monitoring.MetricAlertCriteriaDimensionArray{ // &monitoring.MetricAlertCriteriaDimensionArgs{ // Name: pulumi.String("ApiName"), // Operator: pulumi.String("Include"), // Values: pulumi.StringArray{ // pulumi.String("*"), // }, // }, // }, // }, // }, // Actions: monitoring.MetricAlertActionArray{ // &monitoring.MetricAlertActionArgs{ // ActionGroupId: main.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.Insights` - 2018-03-01 // // ## Import // // Metric Alerts can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/metricAlert:MetricAlert main /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.Insights/metricAlerts/example-metricalert // ``` type MetricAlert struct { pulumi.CustomResourceState // One or more `action` blocks as defined below. Actions MetricAlertActionArrayOutput `pulumi:"actions"` // A `applicationInsightsWebTestLocationAvailabilityCriteria` block as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. ApplicationInsightsWebTestLocationAvailabilityCriteria MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaPtrOutput `pulumi:"applicationInsightsWebTestLocationAvailabilityCriteria"` // Should the alerts in this Metric Alert be auto resolved? Defaults to `true`. AutoMitigate pulumi.BoolPtrOutput `pulumi:"autoMitigate"` // One or more (static) `criteria` blocks as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. Criterias MetricAlertCriteriaArrayOutput `pulumi:"criterias"` // The description of this Metric Alert. Description pulumi.StringPtrOutput `pulumi:"description"` // A `dynamicCriteria` block as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. DynamicCriteria MetricAlertDynamicCriteriaPtrOutput `pulumi:"dynamicCriteria"` // Should this Metric Alert be enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are `PT1M`, `PT5M`, `PT15M`, `PT30M` and `PT1H`. Defaults to `PT1M`. Frequency pulumi.StringPtrOutput `pulumi:"frequency"` // The name of the Metric Alert. 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 Metric Alert instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A set of strings of resource IDs at which the metric criteria should be applied. Scopes pulumi.StringArrayOutput `pulumi:"scopes"` // The severity of this Metric Alert. Possible values are `0`, `1`, `2`, `3` and `4`. Defaults to `3`. Severity pulumi.IntPtrOutput `pulumi:"severity"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // The location of the target resource. // // > **Note:** This is Required when using a Subscription as scope, a Resource Group as scope or Multiple Scopes. TargetResourceLocation pulumi.StringOutput `pulumi:"targetResourceLocation"` // The resource type (e.g. `Microsoft.Compute/virtualMachines`) of the target resource. // // > **Note:** This is Required when using a Subscription as scope, a Resource Group as scope or Multiple Scopes. TargetResourceType pulumi.StringOutput `pulumi:"targetResourceType"` // The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than `frequency`. Possible values are `PT1M`, `PT5M`, `PT15M`, `PT30M`, `PT1H`, `PT6H`, `PT12H` and `P1D`. Defaults to `PT5M`. WindowSize pulumi.StringPtrOutput `pulumi:"windowSize"` } // NewMetricAlert registers a new resource with the given unique name, arguments, and options. func NewMetricAlert(ctx *pulumi.Context, name string, args *MetricAlertArgs, opts ...pulumi.ResourceOption) (*MetricAlert, 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.Scopes == nil { return nil, errors.New("invalid value for required argument 'Scopes'") } opts = internal.PkgResourceDefaultOpts(opts) var resource MetricAlert err := ctx.RegisterResource("azure:monitoring/metricAlert:MetricAlert", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetMetricAlert gets an existing MetricAlert 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 GetMetricAlert(ctx *pulumi.Context, name string, id pulumi.IDInput, state *MetricAlertState, opts ...pulumi.ResourceOption) (*MetricAlert, error) { var resource MetricAlert err := ctx.ReadResource("azure:monitoring/metricAlert:MetricAlert", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering MetricAlert resources. type metricAlertState struct { // One or more `action` blocks as defined below. Actions []MetricAlertAction `pulumi:"actions"` // A `applicationInsightsWebTestLocationAvailabilityCriteria` block as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. ApplicationInsightsWebTestLocationAvailabilityCriteria *MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteria `pulumi:"applicationInsightsWebTestLocationAvailabilityCriteria"` // Should the alerts in this Metric Alert be auto resolved? Defaults to `true`. AutoMitigate *bool `pulumi:"autoMitigate"` // One or more (static) `criteria` blocks as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. Criterias []MetricAlertCriteria `pulumi:"criterias"` // The description of this Metric Alert. Description *string `pulumi:"description"` // A `dynamicCriteria` block as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. DynamicCriteria *MetricAlertDynamicCriteria `pulumi:"dynamicCriteria"` // Should this Metric Alert be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are `PT1M`, `PT5M`, `PT15M`, `PT30M` and `PT1H`. Defaults to `PT1M`. Frequency *string `pulumi:"frequency"` // The name of the Metric Alert. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Metric Alert instance. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A set of strings of resource IDs at which the metric criteria should be applied. Scopes []string `pulumi:"scopes"` // The severity of this Metric Alert. Possible values are `0`, `1`, `2`, `3` and `4`. Defaults to `3`. Severity *int `pulumi:"severity"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The location of the target resource. // // > **Note:** This is Required when using a Subscription as scope, a Resource Group as scope or Multiple Scopes. TargetResourceLocation *string `pulumi:"targetResourceLocation"` // The resource type (e.g. `Microsoft.Compute/virtualMachines`) of the target resource. // // > **Note:** This is Required when using a Subscription as scope, a Resource Group as scope or Multiple Scopes. TargetResourceType *string `pulumi:"targetResourceType"` // The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than `frequency`. Possible values are `PT1M`, `PT5M`, `PT15M`, `PT30M`, `PT1H`, `PT6H`, `PT12H` and `P1D`. Defaults to `PT5M`. WindowSize *string `pulumi:"windowSize"` } type MetricAlertState struct { // One or more `action` blocks as defined below. Actions MetricAlertActionArrayInput // A `applicationInsightsWebTestLocationAvailabilityCriteria` block as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. ApplicationInsightsWebTestLocationAvailabilityCriteria MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaPtrInput // Should the alerts in this Metric Alert be auto resolved? Defaults to `true`. AutoMitigate pulumi.BoolPtrInput // One or more (static) `criteria` blocks as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. Criterias MetricAlertCriteriaArrayInput // The description of this Metric Alert. Description pulumi.StringPtrInput // A `dynamicCriteria` block as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. DynamicCriteria MetricAlertDynamicCriteriaPtrInput // Should this Metric Alert be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are `PT1M`, `PT5M`, `PT15M`, `PT30M` and `PT1H`. Defaults to `PT1M`. Frequency pulumi.StringPtrInput // The name of the Metric Alert. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Metric Alert instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A set of strings of resource IDs at which the metric criteria should be applied. Scopes pulumi.StringArrayInput // The severity of this Metric Alert. Possible values are `0`, `1`, `2`, `3` and `4`. Defaults to `3`. Severity pulumi.IntPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The location of the target resource. // // > **Note:** This is Required when using a Subscription as scope, a Resource Group as scope or Multiple Scopes. TargetResourceLocation pulumi.StringPtrInput // The resource type (e.g. `Microsoft.Compute/virtualMachines`) of the target resource. // // > **Note:** This is Required when using a Subscription as scope, a Resource Group as scope or Multiple Scopes. TargetResourceType pulumi.StringPtrInput // The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than `frequency`. Possible values are `PT1M`, `PT5M`, `PT15M`, `PT30M`, `PT1H`, `PT6H`, `PT12H` and `P1D`. Defaults to `PT5M`. WindowSize pulumi.StringPtrInput } func (MetricAlertState) ElementType() reflect.Type { return reflect.TypeOf((*metricAlertState)(nil)).Elem() } type metricAlertArgs struct { // One or more `action` blocks as defined below. Actions []MetricAlertAction `pulumi:"actions"` // A `applicationInsightsWebTestLocationAvailabilityCriteria` block as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. ApplicationInsightsWebTestLocationAvailabilityCriteria *MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteria `pulumi:"applicationInsightsWebTestLocationAvailabilityCriteria"` // Should the alerts in this Metric Alert be auto resolved? Defaults to `true`. AutoMitigate *bool `pulumi:"autoMitigate"` // One or more (static) `criteria` blocks as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. Criterias []MetricAlertCriteria `pulumi:"criterias"` // The description of this Metric Alert. Description *string `pulumi:"description"` // A `dynamicCriteria` block as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. DynamicCriteria *MetricAlertDynamicCriteria `pulumi:"dynamicCriteria"` // Should this Metric Alert be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are `PT1M`, `PT5M`, `PT15M`, `PT30M` and `PT1H`. Defaults to `PT1M`. Frequency *string `pulumi:"frequency"` // The name of the Metric Alert. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Metric Alert instance. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A set of strings of resource IDs at which the metric criteria should be applied. Scopes []string `pulumi:"scopes"` // The severity of this Metric Alert. Possible values are `0`, `1`, `2`, `3` and `4`. Defaults to `3`. Severity *int `pulumi:"severity"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The location of the target resource. // // > **Note:** This is Required when using a Subscription as scope, a Resource Group as scope or Multiple Scopes. TargetResourceLocation *string `pulumi:"targetResourceLocation"` // The resource type (e.g. `Microsoft.Compute/virtualMachines`) of the target resource. // // > **Note:** This is Required when using a Subscription as scope, a Resource Group as scope or Multiple Scopes. TargetResourceType *string `pulumi:"targetResourceType"` // The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than `frequency`. Possible values are `PT1M`, `PT5M`, `PT15M`, `PT30M`, `PT1H`, `PT6H`, `PT12H` and `P1D`. Defaults to `PT5M`. WindowSize *string `pulumi:"windowSize"` } // The set of arguments for constructing a MetricAlert resource. type MetricAlertArgs struct { // One or more `action` blocks as defined below. Actions MetricAlertActionArrayInput // A `applicationInsightsWebTestLocationAvailabilityCriteria` block as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. ApplicationInsightsWebTestLocationAvailabilityCriteria MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaPtrInput // Should the alerts in this Metric Alert be auto resolved? Defaults to `true`. AutoMitigate pulumi.BoolPtrInput // One or more (static) `criteria` blocks as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. Criterias MetricAlertCriteriaArrayInput // The description of this Metric Alert. Description pulumi.StringPtrInput // A `dynamicCriteria` block as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. DynamicCriteria MetricAlertDynamicCriteriaPtrInput // Should this Metric Alert be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are `PT1M`, `PT5M`, `PT15M`, `PT30M` and `PT1H`. Defaults to `PT1M`. Frequency pulumi.StringPtrInput // The name of the Metric Alert. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Metric Alert instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A set of strings of resource IDs at which the metric criteria should be applied. Scopes pulumi.StringArrayInput // The severity of this Metric Alert. Possible values are `0`, `1`, `2`, `3` and `4`. Defaults to `3`. Severity pulumi.IntPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The location of the target resource. // // > **Note:** This is Required when using a Subscription as scope, a Resource Group as scope or Multiple Scopes. TargetResourceLocation pulumi.StringPtrInput // The resource type (e.g. `Microsoft.Compute/virtualMachines`) of the target resource. // // > **Note:** This is Required when using a Subscription as scope, a Resource Group as scope or Multiple Scopes. TargetResourceType pulumi.StringPtrInput // The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than `frequency`. Possible values are `PT1M`, `PT5M`, `PT15M`, `PT30M`, `PT1H`, `PT6H`, `PT12H` and `P1D`. Defaults to `PT5M`. WindowSize pulumi.StringPtrInput } func (MetricAlertArgs) ElementType() reflect.Type { return reflect.TypeOf((*metricAlertArgs)(nil)).Elem() } type MetricAlertInput interface { pulumi.Input ToMetricAlertOutput() MetricAlertOutput ToMetricAlertOutputWithContext(ctx context.Context) MetricAlertOutput } func (*MetricAlert) ElementType() reflect.Type { return reflect.TypeOf((**MetricAlert)(nil)).Elem() } func (i *MetricAlert) ToMetricAlertOutput() MetricAlertOutput { return i.ToMetricAlertOutputWithContext(context.Background()) } func (i *MetricAlert) ToMetricAlertOutputWithContext(ctx context.Context) MetricAlertOutput { return pulumi.ToOutputWithContext(ctx, i).(MetricAlertOutput) } // MetricAlertArrayInput is an input type that accepts MetricAlertArray and MetricAlertArrayOutput values. // You can construct a concrete instance of `MetricAlertArrayInput` via: // // MetricAlertArray{ MetricAlertArgs{...} } type MetricAlertArrayInput interface { pulumi.Input ToMetricAlertArrayOutput() MetricAlertArrayOutput ToMetricAlertArrayOutputWithContext(context.Context) MetricAlertArrayOutput } type MetricAlertArray []MetricAlertInput func (MetricAlertArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*MetricAlert)(nil)).Elem() } func (i MetricAlertArray) ToMetricAlertArrayOutput() MetricAlertArrayOutput { return i.ToMetricAlertArrayOutputWithContext(context.Background()) } func (i MetricAlertArray) ToMetricAlertArrayOutputWithContext(ctx context.Context) MetricAlertArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(MetricAlertArrayOutput) } // MetricAlertMapInput is an input type that accepts MetricAlertMap and MetricAlertMapOutput values. // You can construct a concrete instance of `MetricAlertMapInput` via: // // MetricAlertMap{ "key": MetricAlertArgs{...} } type MetricAlertMapInput interface { pulumi.Input ToMetricAlertMapOutput() MetricAlertMapOutput ToMetricAlertMapOutputWithContext(context.Context) MetricAlertMapOutput } type MetricAlertMap map[string]MetricAlertInput func (MetricAlertMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*MetricAlert)(nil)).Elem() } func (i MetricAlertMap) ToMetricAlertMapOutput() MetricAlertMapOutput { return i.ToMetricAlertMapOutputWithContext(context.Background()) } func (i MetricAlertMap) ToMetricAlertMapOutputWithContext(ctx context.Context) MetricAlertMapOutput { return pulumi.ToOutputWithContext(ctx, i).(MetricAlertMapOutput) } type MetricAlertOutput struct{ *pulumi.OutputState } func (MetricAlertOutput) ElementType() reflect.Type { return reflect.TypeOf((**MetricAlert)(nil)).Elem() } func (o MetricAlertOutput) ToMetricAlertOutput() MetricAlertOutput { return o } func (o MetricAlertOutput) ToMetricAlertOutputWithContext(ctx context.Context) MetricAlertOutput { return o } // One or more `action` blocks as defined below. func (o MetricAlertOutput) Actions() MetricAlertActionArrayOutput { return o.ApplyT(func(v *MetricAlert) MetricAlertActionArrayOutput { return v.Actions }).(MetricAlertActionArrayOutput) } // A `applicationInsightsWebTestLocationAvailabilityCriteria` block as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. func (o MetricAlertOutput) ApplicationInsightsWebTestLocationAvailabilityCriteria() MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaPtrOutput { return o.ApplyT(func(v *MetricAlert) MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaPtrOutput { return v.ApplicationInsightsWebTestLocationAvailabilityCriteria }).(MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaPtrOutput) } // Should the alerts in this Metric Alert be auto resolved? Defaults to `true`. func (o MetricAlertOutput) AutoMitigate() pulumi.BoolPtrOutput { return o.ApplyT(func(v *MetricAlert) pulumi.BoolPtrOutput { return v.AutoMitigate }).(pulumi.BoolPtrOutput) } // One or more (static) `criteria` blocks as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. func (o MetricAlertOutput) Criterias() MetricAlertCriteriaArrayOutput { return o.ApplyT(func(v *MetricAlert) MetricAlertCriteriaArrayOutput { return v.Criterias }).(MetricAlertCriteriaArrayOutput) } // The description of this Metric Alert. func (o MetricAlertOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *MetricAlert) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // A `dynamicCriteria` block as defined below. // // > **Note:** One of either `criteria`, `dynamicCriteria` or `applicationInsightsWebTestLocationAvailabilityCriteria` must be specified. func (o MetricAlertOutput) DynamicCriteria() MetricAlertDynamicCriteriaPtrOutput { return o.ApplyT(func(v *MetricAlert) MetricAlertDynamicCriteriaPtrOutput { return v.DynamicCriteria }).(MetricAlertDynamicCriteriaPtrOutput) } // Should this Metric Alert be enabled? Defaults to `true`. func (o MetricAlertOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *MetricAlert) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are `PT1M`, `PT5M`, `PT15M`, `PT30M` and `PT1H`. Defaults to `PT1M`. func (o MetricAlertOutput) Frequency() pulumi.StringPtrOutput { return o.ApplyT(func(v *MetricAlert) pulumi.StringPtrOutput { return v.Frequency }).(pulumi.StringPtrOutput) } // The name of the Metric Alert. Changing this forces a new resource to be created. func (o MetricAlertOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *MetricAlert) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the Metric Alert instance. Changing this forces a new resource to be created. func (o MetricAlertOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *MetricAlert) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A set of strings of resource IDs at which the metric criteria should be applied. func (o MetricAlertOutput) Scopes() pulumi.StringArrayOutput { return o.ApplyT(func(v *MetricAlert) pulumi.StringArrayOutput { return v.Scopes }).(pulumi.StringArrayOutput) } // The severity of this Metric Alert. Possible values are `0`, `1`, `2`, `3` and `4`. Defaults to `3`. func (o MetricAlertOutput) Severity() pulumi.IntPtrOutput { return o.ApplyT(func(v *MetricAlert) pulumi.IntPtrOutput { return v.Severity }).(pulumi.IntPtrOutput) } // A mapping of tags to assign to the resource. func (o MetricAlertOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *MetricAlert) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The location of the target resource. // // > **Note:** This is Required when using a Subscription as scope, a Resource Group as scope or Multiple Scopes. func (o MetricAlertOutput) TargetResourceLocation() pulumi.StringOutput { return o.ApplyT(func(v *MetricAlert) pulumi.StringOutput { return v.TargetResourceLocation }).(pulumi.StringOutput) } // The resource type (e.g. `Microsoft.Compute/virtualMachines`) of the target resource. // // > **Note:** This is Required when using a Subscription as scope, a Resource Group as scope or Multiple Scopes. func (o MetricAlertOutput) TargetResourceType() pulumi.StringOutput { return o.ApplyT(func(v *MetricAlert) pulumi.StringOutput { return v.TargetResourceType }).(pulumi.StringOutput) } // The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than `frequency`. Possible values are `PT1M`, `PT5M`, `PT15M`, `PT30M`, `PT1H`, `PT6H`, `PT12H` and `P1D`. Defaults to `PT5M`. func (o MetricAlertOutput) WindowSize() pulumi.StringPtrOutput { return o.ApplyT(func(v *MetricAlert) pulumi.StringPtrOutput { return v.WindowSize }).(pulumi.StringPtrOutput) } type MetricAlertArrayOutput struct{ *pulumi.OutputState } func (MetricAlertArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*MetricAlert)(nil)).Elem() } func (o MetricAlertArrayOutput) ToMetricAlertArrayOutput() MetricAlertArrayOutput { return o } func (o MetricAlertArrayOutput) ToMetricAlertArrayOutputWithContext(ctx context.Context) MetricAlertArrayOutput { return o } func (o MetricAlertArrayOutput) Index(i pulumi.IntInput) MetricAlertOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MetricAlert { return vs[0].([]*MetricAlert)[vs[1].(int)] }).(MetricAlertOutput) } type MetricAlertMapOutput struct{ *pulumi.OutputState } func (MetricAlertMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*MetricAlert)(nil)).Elem() } func (o MetricAlertMapOutput) ToMetricAlertMapOutput() MetricAlertMapOutput { return o } func (o MetricAlertMapOutput) ToMetricAlertMapOutputWithContext(ctx context.Context) MetricAlertMapOutput { return o } func (o MetricAlertMapOutput) MapIndex(k pulumi.StringInput) MetricAlertOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MetricAlert { return vs[0].(map[string]*MetricAlert)[vs[1].(string)] }).(MetricAlertOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*MetricAlertInput)(nil)).Elem(), &MetricAlert{}) pulumi.RegisterInputType(reflect.TypeOf((*MetricAlertArrayInput)(nil)).Elem(), MetricAlertArray{}) pulumi.RegisterInputType(reflect.TypeOf((*MetricAlertMapInput)(nil)).Elem(), MetricAlertMap{}) pulumi.RegisterOutputType(MetricAlertOutput{}) pulumi.RegisterOutputType(MetricAlertArrayOutput{}) pulumi.RegisterOutputType(MetricAlertMapOutput{}) }
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/monitoring/init.go
sdk/go/azure/monitoring/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 monitoring 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:monitoring/aadDiagnosticSetting:AadDiagnosticSetting": r = &AadDiagnosticSetting{} case "azure:monitoring/actionGroup:ActionGroup": r = &ActionGroup{} case "azure:monitoring/activityLogAlert:ActivityLogAlert": r = &ActivityLogAlert{} case "azure:monitoring/alertProcessingRuleActionGroup:AlertProcessingRuleActionGroup": r = &AlertProcessingRuleActionGroup{} case "azure:monitoring/alertProcessingRuleSuppression:AlertProcessingRuleSuppression": r = &AlertProcessingRuleSuppression{} case "azure:monitoring/alertPrometheusRuleGroup:AlertPrometheusRuleGroup": r = &AlertPrometheusRuleGroup{} case "azure:monitoring/autoscaleSetting:AutoscaleSetting": r = &AutoscaleSetting{} case "azure:monitoring/dataCollectionEndpoint:DataCollectionEndpoint": r = &DataCollectionEndpoint{} case "azure:monitoring/dataCollectionRule:DataCollectionRule": r = &DataCollectionRule{} case "azure:monitoring/dataCollectionRuleAssociation:DataCollectionRuleAssociation": r = &DataCollectionRuleAssociation{} case "azure:monitoring/diagnosticSetting:DiagnosticSetting": r = &DiagnosticSetting{} case "azure:monitoring/metricAlert:MetricAlert": r = &MetricAlert{} case "azure:monitoring/privateLinkScope:PrivateLinkScope": r = &PrivateLinkScope{} case "azure:monitoring/privateLinkScopedService:PrivateLinkScopedService": r = &PrivateLinkScopedService{} case "azure:monitoring/scheduledQueryRulesAlert:ScheduledQueryRulesAlert": r = &ScheduledQueryRulesAlert{} case "azure:monitoring/scheduledQueryRulesAlertV2:ScheduledQueryRulesAlertV2": r = &ScheduledQueryRulesAlertV2{} case "azure:monitoring/scheduledQueryRulesLog:ScheduledQueryRulesLog": r = &ScheduledQueryRulesLog{} case "azure:monitoring/smartDetectorAlertRule:SmartDetectorAlertRule": r = &SmartDetectorAlertRule{} case "azure:monitoring/workspace:Workspace": r = &Workspace{} 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", "monitoring/aadDiagnosticSetting", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/actionGroup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/activityLogAlert", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/alertProcessingRuleActionGroup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/alertProcessingRuleSuppression", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/alertPrometheusRuleGroup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/autoscaleSetting", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/dataCollectionEndpoint", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/dataCollectionRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/dataCollectionRuleAssociation", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/diagnosticSetting", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/metricAlert", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/privateLinkScope", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/privateLinkScopedService", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/scheduledQueryRulesAlert", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/scheduledQueryRulesAlertV2", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/scheduledQueryRulesLog", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/smartDetectorAlertRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "monitoring/workspace", &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/monitoring/getDataCollectionRule.go
sdk/go/azure/monitoring/getDataCollectionRule.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 monitoring 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 Data Collection Rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := monitoring.LookupDataCollectionRule(ctx, &monitoring.LookupDataCollectionRuleArgs{ // Name: "example-rule", // ResourceGroupName: exampleAzurermResourceGroup.Name, // }, nil) // if err != nil { // return err // } // ctx.Export("ruleId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Insights` - 2023-03-11 func LookupDataCollectionRule(ctx *pulumi.Context, args *LookupDataCollectionRuleArgs, opts ...pulumi.InvokeOption) (*LookupDataCollectionRuleResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupDataCollectionRuleResult err := ctx.Invoke("azure:monitoring/getDataCollectionRule:getDataCollectionRule", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getDataCollectionRule. type LookupDataCollectionRuleArgs struct { // Specifies the name of the Data Collection Rule. Name string `pulumi:"name"` // Specifies the name of the resource group the Data Collection Rule is located in. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getDataCollectionRule. type LookupDataCollectionRuleResult struct { // The resource ID of the Data Collection Endpoint that this rule can be used with. DataCollectionEndpointId string `pulumi:"dataCollectionEndpointId"` // One or more `dataFlow` blocks as defined below. DataFlows []GetDataCollectionRuleDataFlow `pulumi:"dataFlows"` // A `dataSources` block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. DataSources []GetDataCollectionRuleDataSource `pulumi:"dataSources"` // The description of the Data Collection Rule. Description string `pulumi:"description"` // Specifies a list of destination names. A `azureMonitorMetrics` data source only allows for stream of kind `Microsoft-InsightsMetrics`. Destinations []GetDataCollectionRuleDestination `pulumi:"destinations"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // An `identity` block as defined below. Identities []GetDataCollectionRuleIdentity `pulumi:"identities"` ImmutableId string `pulumi:"immutableId"` // The kind of the Data Collection Rule. Possible values are `Linux`, `Windows`,and `AgentDirectToStore`. A rule of kind `Linux` does not allow for `windowsEventLog` data sources. And a rule of kind `Windows` does not allow for `syslog` data sources. If kind is not specified, all kinds of data sources are allowed. Kind string `pulumi:"kind"` // The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created. Location string `pulumi:"location"` // The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule. Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A `streamDeclaration` block as defined below. StreamDeclarations []GetDataCollectionRuleStreamDeclaration `pulumi:"streamDeclarations"` // A mapping of tags which should be assigned to the Data Collection Rule. Tags map[string]string `pulumi:"tags"` } func LookupDataCollectionRuleOutput(ctx *pulumi.Context, args LookupDataCollectionRuleOutputArgs, opts ...pulumi.InvokeOption) LookupDataCollectionRuleResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupDataCollectionRuleResultOutput, error) { args := v.(LookupDataCollectionRuleArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:monitoring/getDataCollectionRule:getDataCollectionRule", args, LookupDataCollectionRuleResultOutput{}, options).(LookupDataCollectionRuleResultOutput), nil }).(LookupDataCollectionRuleResultOutput) } // A collection of arguments for invoking getDataCollectionRule. type LookupDataCollectionRuleOutputArgs struct { // Specifies the name of the Data Collection Rule. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group the Data Collection Rule is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupDataCollectionRuleOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupDataCollectionRuleArgs)(nil)).Elem() } // A collection of values returned by getDataCollectionRule. type LookupDataCollectionRuleResultOutput struct{ *pulumi.OutputState } func (LookupDataCollectionRuleResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupDataCollectionRuleResult)(nil)).Elem() } func (o LookupDataCollectionRuleResultOutput) ToLookupDataCollectionRuleResultOutput() LookupDataCollectionRuleResultOutput { return o } func (o LookupDataCollectionRuleResultOutput) ToLookupDataCollectionRuleResultOutputWithContext(ctx context.Context) LookupDataCollectionRuleResultOutput { return o } // The resource ID of the Data Collection Endpoint that this rule can be used with. func (o LookupDataCollectionRuleResultOutput) DataCollectionEndpointId() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionRuleResult) string { return v.DataCollectionEndpointId }).(pulumi.StringOutput) } // One or more `dataFlow` blocks as defined below. func (o LookupDataCollectionRuleResultOutput) DataFlows() GetDataCollectionRuleDataFlowArrayOutput { return o.ApplyT(func(v LookupDataCollectionRuleResult) []GetDataCollectionRuleDataFlow { return v.DataFlows }).(GetDataCollectionRuleDataFlowArrayOutput) } // A `dataSources` block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. func (o LookupDataCollectionRuleResultOutput) DataSources() GetDataCollectionRuleDataSourceArrayOutput { return o.ApplyT(func(v LookupDataCollectionRuleResult) []GetDataCollectionRuleDataSource { return v.DataSources }).(GetDataCollectionRuleDataSourceArrayOutput) } // The description of the Data Collection Rule. func (o LookupDataCollectionRuleResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionRuleResult) string { return v.Description }).(pulumi.StringOutput) } // Specifies a list of destination names. A `azureMonitorMetrics` data source only allows for stream of kind `Microsoft-InsightsMetrics`. func (o LookupDataCollectionRuleResultOutput) Destinations() GetDataCollectionRuleDestinationArrayOutput { return o.ApplyT(func(v LookupDataCollectionRuleResult) []GetDataCollectionRuleDestination { return v.Destinations }).(GetDataCollectionRuleDestinationArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupDataCollectionRuleResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionRuleResult) string { return v.Id }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o LookupDataCollectionRuleResultOutput) Identities() GetDataCollectionRuleIdentityArrayOutput { return o.ApplyT(func(v LookupDataCollectionRuleResult) []GetDataCollectionRuleIdentity { return v.Identities }).(GetDataCollectionRuleIdentityArrayOutput) } func (o LookupDataCollectionRuleResultOutput) ImmutableId() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionRuleResult) string { return v.ImmutableId }).(pulumi.StringOutput) } // The kind of the Data Collection Rule. Possible values are `Linux`, `Windows`,and `AgentDirectToStore`. A rule of kind `Linux` does not allow for `windowsEventLog` data sources. And a rule of kind `Windows` does not allow for `syslog` data sources. If kind is not specified, all kinds of data sources are allowed. func (o LookupDataCollectionRuleResultOutput) Kind() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionRuleResult) string { return v.Kind }).(pulumi.StringOutput) } // The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created. func (o LookupDataCollectionRuleResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionRuleResult) string { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule. func (o LookupDataCollectionRuleResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionRuleResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupDataCollectionRuleResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionRuleResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `streamDeclaration` block as defined below. func (o LookupDataCollectionRuleResultOutput) StreamDeclarations() GetDataCollectionRuleStreamDeclarationArrayOutput { return o.ApplyT(func(v LookupDataCollectionRuleResult) []GetDataCollectionRuleStreamDeclaration { return v.StreamDeclarations }).(GetDataCollectionRuleStreamDeclarationArrayOutput) } // A mapping of tags which should be assigned to the Data Collection Rule. func (o LookupDataCollectionRuleResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupDataCollectionRuleResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupDataCollectionRuleResultOutput{}) }
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/monitoring/pulumiTypes.go
sdk/go/azure/monitoring/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 monitoring 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 AadDiagnosticSettingEnabledLog struct { // The log category for the Azure Active Directory Diagnostic. Category string `pulumi:"category"` // Deprecated: Azure does not support retention for new Azure Active Directory Diagnostic Settings RetentionPolicy *AadDiagnosticSettingEnabledLogRetentionPolicy `pulumi:"retentionPolicy"` } // AadDiagnosticSettingEnabledLogInput is an input type that accepts AadDiagnosticSettingEnabledLogArgs and AadDiagnosticSettingEnabledLogOutput values. // You can construct a concrete instance of `AadDiagnosticSettingEnabledLogInput` via: // // AadDiagnosticSettingEnabledLogArgs{...} type AadDiagnosticSettingEnabledLogInput interface { pulumi.Input ToAadDiagnosticSettingEnabledLogOutput() AadDiagnosticSettingEnabledLogOutput ToAadDiagnosticSettingEnabledLogOutputWithContext(context.Context) AadDiagnosticSettingEnabledLogOutput } type AadDiagnosticSettingEnabledLogArgs struct { // The log category for the Azure Active Directory Diagnostic. Category pulumi.StringInput `pulumi:"category"` // Deprecated: Azure does not support retention for new Azure Active Directory Diagnostic Settings RetentionPolicy AadDiagnosticSettingEnabledLogRetentionPolicyPtrInput `pulumi:"retentionPolicy"` } func (AadDiagnosticSettingEnabledLogArgs) ElementType() reflect.Type { return reflect.TypeOf((*AadDiagnosticSettingEnabledLog)(nil)).Elem() } func (i AadDiagnosticSettingEnabledLogArgs) ToAadDiagnosticSettingEnabledLogOutput() AadDiagnosticSettingEnabledLogOutput { return i.ToAadDiagnosticSettingEnabledLogOutputWithContext(context.Background()) } func (i AadDiagnosticSettingEnabledLogArgs) ToAadDiagnosticSettingEnabledLogOutputWithContext(ctx context.Context) AadDiagnosticSettingEnabledLogOutput { return pulumi.ToOutputWithContext(ctx, i).(AadDiagnosticSettingEnabledLogOutput) } // AadDiagnosticSettingEnabledLogArrayInput is an input type that accepts AadDiagnosticSettingEnabledLogArray and AadDiagnosticSettingEnabledLogArrayOutput values. // You can construct a concrete instance of `AadDiagnosticSettingEnabledLogArrayInput` via: // // AadDiagnosticSettingEnabledLogArray{ AadDiagnosticSettingEnabledLogArgs{...} } type AadDiagnosticSettingEnabledLogArrayInput interface { pulumi.Input ToAadDiagnosticSettingEnabledLogArrayOutput() AadDiagnosticSettingEnabledLogArrayOutput ToAadDiagnosticSettingEnabledLogArrayOutputWithContext(context.Context) AadDiagnosticSettingEnabledLogArrayOutput } type AadDiagnosticSettingEnabledLogArray []AadDiagnosticSettingEnabledLogInput func (AadDiagnosticSettingEnabledLogArray) ElementType() reflect.Type { return reflect.TypeOf((*[]AadDiagnosticSettingEnabledLog)(nil)).Elem() } func (i AadDiagnosticSettingEnabledLogArray) ToAadDiagnosticSettingEnabledLogArrayOutput() AadDiagnosticSettingEnabledLogArrayOutput { return i.ToAadDiagnosticSettingEnabledLogArrayOutputWithContext(context.Background()) } func (i AadDiagnosticSettingEnabledLogArray) ToAadDiagnosticSettingEnabledLogArrayOutputWithContext(ctx context.Context) AadDiagnosticSettingEnabledLogArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AadDiagnosticSettingEnabledLogArrayOutput) } type AadDiagnosticSettingEnabledLogOutput struct{ *pulumi.OutputState } func (AadDiagnosticSettingEnabledLogOutput) ElementType() reflect.Type { return reflect.TypeOf((*AadDiagnosticSettingEnabledLog)(nil)).Elem() } func (o AadDiagnosticSettingEnabledLogOutput) ToAadDiagnosticSettingEnabledLogOutput() AadDiagnosticSettingEnabledLogOutput { return o } func (o AadDiagnosticSettingEnabledLogOutput) ToAadDiagnosticSettingEnabledLogOutputWithContext(ctx context.Context) AadDiagnosticSettingEnabledLogOutput { return o } // The log category for the Azure Active Directory Diagnostic. func (o AadDiagnosticSettingEnabledLogOutput) Category() pulumi.StringOutput { return o.ApplyT(func(v AadDiagnosticSettingEnabledLog) string { return v.Category }).(pulumi.StringOutput) } // Deprecated: Azure does not support retention for new Azure Active Directory Diagnostic Settings func (o AadDiagnosticSettingEnabledLogOutput) RetentionPolicy() AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput { return o.ApplyT(func(v AadDiagnosticSettingEnabledLog) *AadDiagnosticSettingEnabledLogRetentionPolicy { return v.RetentionPolicy }).(AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput) } type AadDiagnosticSettingEnabledLogArrayOutput struct{ *pulumi.OutputState } func (AadDiagnosticSettingEnabledLogArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]AadDiagnosticSettingEnabledLog)(nil)).Elem() } func (o AadDiagnosticSettingEnabledLogArrayOutput) ToAadDiagnosticSettingEnabledLogArrayOutput() AadDiagnosticSettingEnabledLogArrayOutput { return o } func (o AadDiagnosticSettingEnabledLogArrayOutput) ToAadDiagnosticSettingEnabledLogArrayOutputWithContext(ctx context.Context) AadDiagnosticSettingEnabledLogArrayOutput { return o } func (o AadDiagnosticSettingEnabledLogArrayOutput) Index(i pulumi.IntInput) AadDiagnosticSettingEnabledLogOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) AadDiagnosticSettingEnabledLog { return vs[0].([]AadDiagnosticSettingEnabledLog)[vs[1].(int)] }).(AadDiagnosticSettingEnabledLogOutput) } type AadDiagnosticSettingEnabledLogRetentionPolicy struct { Days *int `pulumi:"days"` Enabled *bool `pulumi:"enabled"` } // AadDiagnosticSettingEnabledLogRetentionPolicyInput is an input type that accepts AadDiagnosticSettingEnabledLogRetentionPolicyArgs and AadDiagnosticSettingEnabledLogRetentionPolicyOutput values. // You can construct a concrete instance of `AadDiagnosticSettingEnabledLogRetentionPolicyInput` via: // // AadDiagnosticSettingEnabledLogRetentionPolicyArgs{...} type AadDiagnosticSettingEnabledLogRetentionPolicyInput interface { pulumi.Input ToAadDiagnosticSettingEnabledLogRetentionPolicyOutput() AadDiagnosticSettingEnabledLogRetentionPolicyOutput ToAadDiagnosticSettingEnabledLogRetentionPolicyOutputWithContext(context.Context) AadDiagnosticSettingEnabledLogRetentionPolicyOutput } type AadDiagnosticSettingEnabledLogRetentionPolicyArgs struct { Days pulumi.IntPtrInput `pulumi:"days"` Enabled pulumi.BoolPtrInput `pulumi:"enabled"` } func (AadDiagnosticSettingEnabledLogRetentionPolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*AadDiagnosticSettingEnabledLogRetentionPolicy)(nil)).Elem() } func (i AadDiagnosticSettingEnabledLogRetentionPolicyArgs) ToAadDiagnosticSettingEnabledLogRetentionPolicyOutput() AadDiagnosticSettingEnabledLogRetentionPolicyOutput { return i.ToAadDiagnosticSettingEnabledLogRetentionPolicyOutputWithContext(context.Background()) } func (i AadDiagnosticSettingEnabledLogRetentionPolicyArgs) ToAadDiagnosticSettingEnabledLogRetentionPolicyOutputWithContext(ctx context.Context) AadDiagnosticSettingEnabledLogRetentionPolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(AadDiagnosticSettingEnabledLogRetentionPolicyOutput) } func (i AadDiagnosticSettingEnabledLogRetentionPolicyArgs) ToAadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput() AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput { return i.ToAadDiagnosticSettingEnabledLogRetentionPolicyPtrOutputWithContext(context.Background()) } func (i AadDiagnosticSettingEnabledLogRetentionPolicyArgs) ToAadDiagnosticSettingEnabledLogRetentionPolicyPtrOutputWithContext(ctx context.Context) AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(AadDiagnosticSettingEnabledLogRetentionPolicyOutput).ToAadDiagnosticSettingEnabledLogRetentionPolicyPtrOutputWithContext(ctx) } // AadDiagnosticSettingEnabledLogRetentionPolicyPtrInput is an input type that accepts AadDiagnosticSettingEnabledLogRetentionPolicyArgs, AadDiagnosticSettingEnabledLogRetentionPolicyPtr and AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput values. // You can construct a concrete instance of `AadDiagnosticSettingEnabledLogRetentionPolicyPtrInput` via: // // AadDiagnosticSettingEnabledLogRetentionPolicyArgs{...} // // or: // // nil type AadDiagnosticSettingEnabledLogRetentionPolicyPtrInput interface { pulumi.Input ToAadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput() AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput ToAadDiagnosticSettingEnabledLogRetentionPolicyPtrOutputWithContext(context.Context) AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput } type aadDiagnosticSettingEnabledLogRetentionPolicyPtrType AadDiagnosticSettingEnabledLogRetentionPolicyArgs func AadDiagnosticSettingEnabledLogRetentionPolicyPtr(v *AadDiagnosticSettingEnabledLogRetentionPolicyArgs) AadDiagnosticSettingEnabledLogRetentionPolicyPtrInput { return (*aadDiagnosticSettingEnabledLogRetentionPolicyPtrType)(v) } func (*aadDiagnosticSettingEnabledLogRetentionPolicyPtrType) ElementType() reflect.Type { return reflect.TypeOf((**AadDiagnosticSettingEnabledLogRetentionPolicy)(nil)).Elem() } func (i *aadDiagnosticSettingEnabledLogRetentionPolicyPtrType) ToAadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput() AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput { return i.ToAadDiagnosticSettingEnabledLogRetentionPolicyPtrOutputWithContext(context.Background()) } func (i *aadDiagnosticSettingEnabledLogRetentionPolicyPtrType) ToAadDiagnosticSettingEnabledLogRetentionPolicyPtrOutputWithContext(ctx context.Context) AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput) } type AadDiagnosticSettingEnabledLogRetentionPolicyOutput struct{ *pulumi.OutputState } func (AadDiagnosticSettingEnabledLogRetentionPolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((*AadDiagnosticSettingEnabledLogRetentionPolicy)(nil)).Elem() } func (o AadDiagnosticSettingEnabledLogRetentionPolicyOutput) ToAadDiagnosticSettingEnabledLogRetentionPolicyOutput() AadDiagnosticSettingEnabledLogRetentionPolicyOutput { return o } func (o AadDiagnosticSettingEnabledLogRetentionPolicyOutput) ToAadDiagnosticSettingEnabledLogRetentionPolicyOutputWithContext(ctx context.Context) AadDiagnosticSettingEnabledLogRetentionPolicyOutput { return o } func (o AadDiagnosticSettingEnabledLogRetentionPolicyOutput) ToAadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput() AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput { return o.ToAadDiagnosticSettingEnabledLogRetentionPolicyPtrOutputWithContext(context.Background()) } func (o AadDiagnosticSettingEnabledLogRetentionPolicyOutput) ToAadDiagnosticSettingEnabledLogRetentionPolicyPtrOutputWithContext(ctx context.Context) AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v AadDiagnosticSettingEnabledLogRetentionPolicy) *AadDiagnosticSettingEnabledLogRetentionPolicy { return &v }).(AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput) } func (o AadDiagnosticSettingEnabledLogRetentionPolicyOutput) Days() pulumi.IntPtrOutput { return o.ApplyT(func(v AadDiagnosticSettingEnabledLogRetentionPolicy) *int { return v.Days }).(pulumi.IntPtrOutput) } func (o AadDiagnosticSettingEnabledLogRetentionPolicyOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v AadDiagnosticSettingEnabledLogRetentionPolicy) *bool { return v.Enabled }).(pulumi.BoolPtrOutput) } type AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput struct{ *pulumi.OutputState } func (AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**AadDiagnosticSettingEnabledLogRetentionPolicy)(nil)).Elem() } func (o AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput) ToAadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput() AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput { return o } func (o AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput) ToAadDiagnosticSettingEnabledLogRetentionPolicyPtrOutputWithContext(ctx context.Context) AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput { return o } func (o AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput) Elem() AadDiagnosticSettingEnabledLogRetentionPolicyOutput { return o.ApplyT(func(v *AadDiagnosticSettingEnabledLogRetentionPolicy) AadDiagnosticSettingEnabledLogRetentionPolicy { if v != nil { return *v } var ret AadDiagnosticSettingEnabledLogRetentionPolicy return ret }).(AadDiagnosticSettingEnabledLogRetentionPolicyOutput) } func (o AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput) Days() pulumi.IntPtrOutput { return o.ApplyT(func(v *AadDiagnosticSettingEnabledLogRetentionPolicy) *int { if v == nil { return nil } return v.Days }).(pulumi.IntPtrOutput) } func (o AadDiagnosticSettingEnabledLogRetentionPolicyPtrOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AadDiagnosticSettingEnabledLogRetentionPolicy) *bool { if v == nil { return nil } return v.Enabled }).(pulumi.BoolPtrOutput) } type ActionGroupArmRoleReceiver struct { // The name of the ARM role receiver. Name string `pulumi:"name"` // The arm role id. RoleId string `pulumi:"roleId"` // Enables or disables the common alert schema. UseCommonAlertSchema *bool `pulumi:"useCommonAlertSchema"` } // ActionGroupArmRoleReceiverInput is an input type that accepts ActionGroupArmRoleReceiverArgs and ActionGroupArmRoleReceiverOutput values. // You can construct a concrete instance of `ActionGroupArmRoleReceiverInput` via: // // ActionGroupArmRoleReceiverArgs{...} type ActionGroupArmRoleReceiverInput interface { pulumi.Input ToActionGroupArmRoleReceiverOutput() ActionGroupArmRoleReceiverOutput ToActionGroupArmRoleReceiverOutputWithContext(context.Context) ActionGroupArmRoleReceiverOutput } type ActionGroupArmRoleReceiverArgs struct { // The name of the ARM role receiver. Name pulumi.StringInput `pulumi:"name"` // The arm role id. RoleId pulumi.StringInput `pulumi:"roleId"` // Enables or disables the common alert schema. UseCommonAlertSchema pulumi.BoolPtrInput `pulumi:"useCommonAlertSchema"` } func (ActionGroupArmRoleReceiverArgs) ElementType() reflect.Type { return reflect.TypeOf((*ActionGroupArmRoleReceiver)(nil)).Elem() } func (i ActionGroupArmRoleReceiverArgs) ToActionGroupArmRoleReceiverOutput() ActionGroupArmRoleReceiverOutput { return i.ToActionGroupArmRoleReceiverOutputWithContext(context.Background()) } func (i ActionGroupArmRoleReceiverArgs) ToActionGroupArmRoleReceiverOutputWithContext(ctx context.Context) ActionGroupArmRoleReceiverOutput { return pulumi.ToOutputWithContext(ctx, i).(ActionGroupArmRoleReceiverOutput) } // ActionGroupArmRoleReceiverArrayInput is an input type that accepts ActionGroupArmRoleReceiverArray and ActionGroupArmRoleReceiverArrayOutput values. // You can construct a concrete instance of `ActionGroupArmRoleReceiverArrayInput` via: // // ActionGroupArmRoleReceiverArray{ ActionGroupArmRoleReceiverArgs{...} } type ActionGroupArmRoleReceiverArrayInput interface { pulumi.Input ToActionGroupArmRoleReceiverArrayOutput() ActionGroupArmRoleReceiverArrayOutput ToActionGroupArmRoleReceiverArrayOutputWithContext(context.Context) ActionGroupArmRoleReceiverArrayOutput } type ActionGroupArmRoleReceiverArray []ActionGroupArmRoleReceiverInput func (ActionGroupArmRoleReceiverArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ActionGroupArmRoleReceiver)(nil)).Elem() } func (i ActionGroupArmRoleReceiverArray) ToActionGroupArmRoleReceiverArrayOutput() ActionGroupArmRoleReceiverArrayOutput { return i.ToActionGroupArmRoleReceiverArrayOutputWithContext(context.Background()) } func (i ActionGroupArmRoleReceiverArray) ToActionGroupArmRoleReceiverArrayOutputWithContext(ctx context.Context) ActionGroupArmRoleReceiverArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ActionGroupArmRoleReceiverArrayOutput) } type ActionGroupArmRoleReceiverOutput struct{ *pulumi.OutputState } func (ActionGroupArmRoleReceiverOutput) ElementType() reflect.Type { return reflect.TypeOf((*ActionGroupArmRoleReceiver)(nil)).Elem() } func (o ActionGroupArmRoleReceiverOutput) ToActionGroupArmRoleReceiverOutput() ActionGroupArmRoleReceiverOutput { return o } func (o ActionGroupArmRoleReceiverOutput) ToActionGroupArmRoleReceiverOutputWithContext(ctx context.Context) ActionGroupArmRoleReceiverOutput { return o } // The name of the ARM role receiver. func (o ActionGroupArmRoleReceiverOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v ActionGroupArmRoleReceiver) string { return v.Name }).(pulumi.StringOutput) } // The arm role id. func (o ActionGroupArmRoleReceiverOutput) RoleId() pulumi.StringOutput { return o.ApplyT(func(v ActionGroupArmRoleReceiver) string { return v.RoleId }).(pulumi.StringOutput) } // Enables or disables the common alert schema. func (o ActionGroupArmRoleReceiverOutput) UseCommonAlertSchema() pulumi.BoolPtrOutput { return o.ApplyT(func(v ActionGroupArmRoleReceiver) *bool { return v.UseCommonAlertSchema }).(pulumi.BoolPtrOutput) } type ActionGroupArmRoleReceiverArrayOutput struct{ *pulumi.OutputState } func (ActionGroupArmRoleReceiverArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]ActionGroupArmRoleReceiver)(nil)).Elem() } func (o ActionGroupArmRoleReceiverArrayOutput) ToActionGroupArmRoleReceiverArrayOutput() ActionGroupArmRoleReceiverArrayOutput { return o } func (o ActionGroupArmRoleReceiverArrayOutput) ToActionGroupArmRoleReceiverArrayOutputWithContext(ctx context.Context) ActionGroupArmRoleReceiverArrayOutput { return o } func (o ActionGroupArmRoleReceiverArrayOutput) Index(i pulumi.IntInput) ActionGroupArmRoleReceiverOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) ActionGroupArmRoleReceiver { return vs[0].([]ActionGroupArmRoleReceiver)[vs[1].(int)] }).(ActionGroupArmRoleReceiverOutput) } type ActionGroupAutomationRunbookReceiver struct { // The automation account ID which holds this runbook and authenticates to Azure resources. AutomationAccountId string `pulumi:"automationAccountId"` // Indicates whether this instance is global runbook. IsGlobalRunbook bool `pulumi:"isGlobalRunbook"` // The name of the automation runbook receiver. Name string `pulumi:"name"` // The name for this runbook. RunbookName string `pulumi:"runbookName"` // The URI where webhooks should be sent. ServiceUri string `pulumi:"serviceUri"` // Enables or disables the common alert schema. UseCommonAlertSchema *bool `pulumi:"useCommonAlertSchema"` // The resource id for webhook linked to this runbook. WebhookResourceId string `pulumi:"webhookResourceId"` } // ActionGroupAutomationRunbookReceiverInput is an input type that accepts ActionGroupAutomationRunbookReceiverArgs and ActionGroupAutomationRunbookReceiverOutput values. // You can construct a concrete instance of `ActionGroupAutomationRunbookReceiverInput` via: // // ActionGroupAutomationRunbookReceiverArgs{...} type ActionGroupAutomationRunbookReceiverInput interface { pulumi.Input ToActionGroupAutomationRunbookReceiverOutput() ActionGroupAutomationRunbookReceiverOutput ToActionGroupAutomationRunbookReceiverOutputWithContext(context.Context) ActionGroupAutomationRunbookReceiverOutput } type ActionGroupAutomationRunbookReceiverArgs struct { // The automation account ID which holds this runbook and authenticates to Azure resources. AutomationAccountId pulumi.StringInput `pulumi:"automationAccountId"` // Indicates whether this instance is global runbook. IsGlobalRunbook pulumi.BoolInput `pulumi:"isGlobalRunbook"` // The name of the automation runbook receiver. Name pulumi.StringInput `pulumi:"name"` // The name for this runbook. RunbookName pulumi.StringInput `pulumi:"runbookName"` // The URI where webhooks should be sent. ServiceUri pulumi.StringInput `pulumi:"serviceUri"` // Enables or disables the common alert schema. UseCommonAlertSchema pulumi.BoolPtrInput `pulumi:"useCommonAlertSchema"` // The resource id for webhook linked to this runbook. WebhookResourceId pulumi.StringInput `pulumi:"webhookResourceId"` } func (ActionGroupAutomationRunbookReceiverArgs) ElementType() reflect.Type { return reflect.TypeOf((*ActionGroupAutomationRunbookReceiver)(nil)).Elem() } func (i ActionGroupAutomationRunbookReceiverArgs) ToActionGroupAutomationRunbookReceiverOutput() ActionGroupAutomationRunbookReceiverOutput { return i.ToActionGroupAutomationRunbookReceiverOutputWithContext(context.Background()) } func (i ActionGroupAutomationRunbookReceiverArgs) ToActionGroupAutomationRunbookReceiverOutputWithContext(ctx context.Context) ActionGroupAutomationRunbookReceiverOutput { return pulumi.ToOutputWithContext(ctx, i).(ActionGroupAutomationRunbookReceiverOutput) } // ActionGroupAutomationRunbookReceiverArrayInput is an input type that accepts ActionGroupAutomationRunbookReceiverArray and ActionGroupAutomationRunbookReceiverArrayOutput values. // You can construct a concrete instance of `ActionGroupAutomationRunbookReceiverArrayInput` via: // // ActionGroupAutomationRunbookReceiverArray{ ActionGroupAutomationRunbookReceiverArgs{...} } type ActionGroupAutomationRunbookReceiverArrayInput interface { pulumi.Input ToActionGroupAutomationRunbookReceiverArrayOutput() ActionGroupAutomationRunbookReceiverArrayOutput ToActionGroupAutomationRunbookReceiverArrayOutputWithContext(context.Context) ActionGroupAutomationRunbookReceiverArrayOutput } type ActionGroupAutomationRunbookReceiverArray []ActionGroupAutomationRunbookReceiverInput func (ActionGroupAutomationRunbookReceiverArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ActionGroupAutomationRunbookReceiver)(nil)).Elem() } func (i ActionGroupAutomationRunbookReceiverArray) ToActionGroupAutomationRunbookReceiverArrayOutput() ActionGroupAutomationRunbookReceiverArrayOutput { return i.ToActionGroupAutomationRunbookReceiverArrayOutputWithContext(context.Background()) } func (i ActionGroupAutomationRunbookReceiverArray) ToActionGroupAutomationRunbookReceiverArrayOutputWithContext(ctx context.Context) ActionGroupAutomationRunbookReceiverArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ActionGroupAutomationRunbookReceiverArrayOutput) } type ActionGroupAutomationRunbookReceiverOutput struct{ *pulumi.OutputState } func (ActionGroupAutomationRunbookReceiverOutput) ElementType() reflect.Type { return reflect.TypeOf((*ActionGroupAutomationRunbookReceiver)(nil)).Elem() } func (o ActionGroupAutomationRunbookReceiverOutput) ToActionGroupAutomationRunbookReceiverOutput() ActionGroupAutomationRunbookReceiverOutput { return o } func (o ActionGroupAutomationRunbookReceiverOutput) ToActionGroupAutomationRunbookReceiverOutputWithContext(ctx context.Context) ActionGroupAutomationRunbookReceiverOutput { return o } // The automation account ID which holds this runbook and authenticates to Azure resources. func (o ActionGroupAutomationRunbookReceiverOutput) AutomationAccountId() pulumi.StringOutput { return o.ApplyT(func(v ActionGroupAutomationRunbookReceiver) string { return v.AutomationAccountId }).(pulumi.StringOutput) } // Indicates whether this instance is global runbook. func (o ActionGroupAutomationRunbookReceiverOutput) IsGlobalRunbook() pulumi.BoolOutput { return o.ApplyT(func(v ActionGroupAutomationRunbookReceiver) bool { return v.IsGlobalRunbook }).(pulumi.BoolOutput) } // The name of the automation runbook receiver. func (o ActionGroupAutomationRunbookReceiverOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v ActionGroupAutomationRunbookReceiver) string { return v.Name }).(pulumi.StringOutput) } // The name for this runbook. func (o ActionGroupAutomationRunbookReceiverOutput) RunbookName() pulumi.StringOutput { return o.ApplyT(func(v ActionGroupAutomationRunbookReceiver) string { return v.RunbookName }).(pulumi.StringOutput) } // The URI where webhooks should be sent. func (o ActionGroupAutomationRunbookReceiverOutput) ServiceUri() pulumi.StringOutput { return o.ApplyT(func(v ActionGroupAutomationRunbookReceiver) string { return v.ServiceUri }).(pulumi.StringOutput) } // Enables or disables the common alert schema. func (o ActionGroupAutomationRunbookReceiverOutput) UseCommonAlertSchema() pulumi.BoolPtrOutput { return o.ApplyT(func(v ActionGroupAutomationRunbookReceiver) *bool { return v.UseCommonAlertSchema }).(pulumi.BoolPtrOutput) } // The resource id for webhook linked to this runbook. func (o ActionGroupAutomationRunbookReceiverOutput) WebhookResourceId() pulumi.StringOutput { return o.ApplyT(func(v ActionGroupAutomationRunbookReceiver) string { return v.WebhookResourceId }).(pulumi.StringOutput) } type ActionGroupAutomationRunbookReceiverArrayOutput struct{ *pulumi.OutputState } func (ActionGroupAutomationRunbookReceiverArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]ActionGroupAutomationRunbookReceiver)(nil)).Elem() } func (o ActionGroupAutomationRunbookReceiverArrayOutput) ToActionGroupAutomationRunbookReceiverArrayOutput() ActionGroupAutomationRunbookReceiverArrayOutput { return o } func (o ActionGroupAutomationRunbookReceiverArrayOutput) ToActionGroupAutomationRunbookReceiverArrayOutputWithContext(ctx context.Context) ActionGroupAutomationRunbookReceiverArrayOutput { return o } func (o ActionGroupAutomationRunbookReceiverArrayOutput) Index(i pulumi.IntInput) ActionGroupAutomationRunbookReceiverOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) ActionGroupAutomationRunbookReceiver { return vs[0].([]ActionGroupAutomationRunbookReceiver)[vs[1].(int)] }).(ActionGroupAutomationRunbookReceiverOutput) } type ActionGroupAzureAppPushReceiver struct { // The email address of the user signed into the mobile app who will receive push notifications from this receiver. EmailAddress string `pulumi:"emailAddress"` // The name of the Azure app push receiver. Name string `pulumi:"name"` } // ActionGroupAzureAppPushReceiverInput is an input type that accepts ActionGroupAzureAppPushReceiverArgs and ActionGroupAzureAppPushReceiverOutput values. // You can construct a concrete instance of `ActionGroupAzureAppPushReceiverInput` via: // // ActionGroupAzureAppPushReceiverArgs{...} type ActionGroupAzureAppPushReceiverInput interface { pulumi.Input ToActionGroupAzureAppPushReceiverOutput() ActionGroupAzureAppPushReceiverOutput ToActionGroupAzureAppPushReceiverOutputWithContext(context.Context) ActionGroupAzureAppPushReceiverOutput } type ActionGroupAzureAppPushReceiverArgs struct { // The email address of the user signed into the mobile app who will receive push notifications from this receiver. EmailAddress pulumi.StringInput `pulumi:"emailAddress"` // The name of the Azure app push receiver. Name pulumi.StringInput `pulumi:"name"` } func (ActionGroupAzureAppPushReceiverArgs) ElementType() reflect.Type { return reflect.TypeOf((*ActionGroupAzureAppPushReceiver)(nil)).Elem() } func (i ActionGroupAzureAppPushReceiverArgs) ToActionGroupAzureAppPushReceiverOutput() ActionGroupAzureAppPushReceiverOutput { return i.ToActionGroupAzureAppPushReceiverOutputWithContext(context.Background()) } func (i ActionGroupAzureAppPushReceiverArgs) ToActionGroupAzureAppPushReceiverOutputWithContext(ctx context.Context) ActionGroupAzureAppPushReceiverOutput { return pulumi.ToOutputWithContext(ctx, i).(ActionGroupAzureAppPushReceiverOutput) } // ActionGroupAzureAppPushReceiverArrayInput is an input type that accepts ActionGroupAzureAppPushReceiverArray and ActionGroupAzureAppPushReceiverArrayOutput values. // You can construct a concrete instance of `ActionGroupAzureAppPushReceiverArrayInput` via: // // ActionGroupAzureAppPushReceiverArray{ ActionGroupAzureAppPushReceiverArgs{...} } type ActionGroupAzureAppPushReceiverArrayInput interface { pulumi.Input ToActionGroupAzureAppPushReceiverArrayOutput() ActionGroupAzureAppPushReceiverArrayOutput ToActionGroupAzureAppPushReceiverArrayOutputWithContext(context.Context) ActionGroupAzureAppPushReceiverArrayOutput } type ActionGroupAzureAppPushReceiverArray []ActionGroupAzureAppPushReceiverInput func (ActionGroupAzureAppPushReceiverArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ActionGroupAzureAppPushReceiver)(nil)).Elem() } func (i ActionGroupAzureAppPushReceiverArray) ToActionGroupAzureAppPushReceiverArrayOutput() ActionGroupAzureAppPushReceiverArrayOutput { return i.ToActionGroupAzureAppPushReceiverArrayOutputWithContext(context.Background()) } func (i ActionGroupAzureAppPushReceiverArray) ToActionGroupAzureAppPushReceiverArrayOutputWithContext(ctx context.Context) ActionGroupAzureAppPushReceiverArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ActionGroupAzureAppPushReceiverArrayOutput) } type ActionGroupAzureAppPushReceiverOutput struct{ *pulumi.OutputState } func (ActionGroupAzureAppPushReceiverOutput) ElementType() reflect.Type { return reflect.TypeOf((*ActionGroupAzureAppPushReceiver)(nil)).Elem() } func (o ActionGroupAzureAppPushReceiverOutput) ToActionGroupAzureAppPushReceiverOutput() ActionGroupAzureAppPushReceiverOutput { return o } func (o ActionGroupAzureAppPushReceiverOutput) ToActionGroupAzureAppPushReceiverOutputWithContext(ctx context.Context) ActionGroupAzureAppPushReceiverOutput { return o } // The email address of the user signed into the mobile app who will receive push notifications from this receiver. func (o ActionGroupAzureAppPushReceiverOutput) EmailAddress() pulumi.StringOutput { return o.ApplyT(func(v ActionGroupAzureAppPushReceiver) string { return v.EmailAddress }).(pulumi.StringOutput) } // The name of the Azure app push receiver. func (o ActionGroupAzureAppPushReceiverOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v ActionGroupAzureAppPushReceiver) string { return v.Name }).(pulumi.StringOutput) } type ActionGroupAzureAppPushReceiverArrayOutput struct{ *pulumi.OutputState } func (ActionGroupAzureAppPushReceiverArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]ActionGroupAzureAppPushReceiver)(nil)).Elem() } func (o ActionGroupAzureAppPushReceiverArrayOutput) ToActionGroupAzureAppPushReceiverArrayOutput() ActionGroupAzureAppPushReceiverArrayOutput { return o } func (o ActionGroupAzureAppPushReceiverArrayOutput) ToActionGroupAzureAppPushReceiverArrayOutputWithContext(ctx context.Context) ActionGroupAzureAppPushReceiverArrayOutput { return o } func (o ActionGroupAzureAppPushReceiverArrayOutput) Index(i pulumi.IntInput) ActionGroupAzureAppPushReceiverOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) ActionGroupAzureAppPushReceiver { return vs[0].([]ActionGroupAzureAppPushReceiver)[vs[1].(int)] }).(ActionGroupAzureAppPushReceiverOutput) } type ActionGroupAzureFunctionReceiver struct { // The Azure resource ID of the function app. FunctionAppResourceId string `pulumi:"functionAppResourceId"` // The function name in the function app. FunctionName string `pulumi:"functionName"` // The HTTP trigger url where HTTP request sent to. HttpTriggerUrl string `pulumi:"httpTriggerUrl"` // The name of the Azure Function receiver. Name string `pulumi:"name"` // Enables or disables the common alert schema. UseCommonAlertSchema *bool `pulumi:"useCommonAlertSchema"` } // ActionGroupAzureFunctionReceiverInput is an input type that accepts ActionGroupAzureFunctionReceiverArgs and ActionGroupAzureFunctionReceiverOutput values. // You can construct a concrete instance of `ActionGroupAzureFunctionReceiverInput` via: // // ActionGroupAzureFunctionReceiverArgs{...} type ActionGroupAzureFunctionReceiverInput interface { pulumi.Input ToActionGroupAzureFunctionReceiverOutput() ActionGroupAzureFunctionReceiverOutput ToActionGroupAzureFunctionReceiverOutputWithContext(context.Context) ActionGroupAzureFunctionReceiverOutput } type ActionGroupAzureFunctionReceiverArgs struct { // The Azure resource ID of the function app. FunctionAppResourceId pulumi.StringInput `pulumi:"functionAppResourceId"` // The function name in the function app. FunctionName pulumi.StringInput `pulumi:"functionName"` // The HTTP trigger url where HTTP request sent to. HttpTriggerUrl pulumi.StringInput `pulumi:"httpTriggerUrl"` // The name of the Azure Function receiver. Name pulumi.StringInput `pulumi:"name"` // Enables or disables the common alert schema. UseCommonAlertSchema pulumi.BoolPtrInput `pulumi:"useCommonAlertSchema"` } func (ActionGroupAzureFunctionReceiverArgs) ElementType() reflect.Type {
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/monitoring/scheduledQueryRulesAlert.go
sdk/go/azure/monitoring/scheduledQueryRulesAlert.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 monitoring import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an AlertingAction Scheduled Query Rules resource within Azure Monitor. // // > **Note:** This resource is using an older AzureRM API version which is known to cause problems e.g. with custom webhook properties not included in triggered alerts. This resource is superseded by the monitoring.ScheduledQueryRulesAlertV2 resource using newer API versions. // // ## 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-azure/sdk/v6/go/azure/monitoring" // "github.com/pulumi/pulumi-std/sdk/go/std" // "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("monitoring-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{ // Name: pulumi.String("appinsights"), // Location: example.Location, // ResourceGroupName: example.Name, // ApplicationType: pulumi.String("web"), // }) // if err != nil { // return err // } // example2, err := appinsights.NewInsights(ctx, "example2", &appinsights.InsightsArgs{ // Name: pulumi.String("appinsights2"), // Location: example.Location, // ResourceGroupName: example.Name, // ApplicationType: pulumi.String("web"), // }) // if err != nil { // return err // } // // Example: Alerting Action with result count trigger // _, err = monitoring.NewScheduledQueryRulesAlert(ctx, "example", &monitoring.ScheduledQueryRulesAlertArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // Action: &monitoring.ScheduledQueryRulesAlertActionArgs{ // ActionGroups: pulumi.StringArray{}, // EmailSubject: pulumi.String("Email Header"), // CustomWebhookPayload: pulumi.String("{}"), // }, // DataSourceId: exampleInsights.ID(), // Description: pulumi.String("Alert when total results cross threshold"), // Enabled: pulumi.Bool(true), // Query: pulumi.String("requests\n | where tolong(resultCode) >= 500\n | summarize count() by bin(timestamp, 5m)\n"), // Severity: pulumi.Int(1), // Frequency: pulumi.Int(5), // TimeWindow: pulumi.Int(30), // Trigger: &monitoring.ScheduledQueryRulesAlertTriggerArgs{ // Operator: pulumi.String("GreaterThan"), // Threshold: pulumi.Float64(3), // }, // Tags: pulumi.StringMap{ // "foo": pulumi.String("bar"), // }, // }) // if err != nil { // return err // } // invokeFormat, err := std.Format(ctx, &std.FormatArgs{ // Input: `let a=requests // | where toint(resultCode) >= 500 // | extend fail=1; let b=app('%s').requests // | where toint(resultCode) >= 500 | extend fail=1; a // | join b on fail // // `, // // Args: pulumi.StringArray{ // example2.ID(), // }, // }, nil) // if err != nil { // return err // } // // Example: Alerting Action Cross-Resource // _, err = monitoring.NewScheduledQueryRulesAlert(ctx, "example2", &monitoring.ScheduledQueryRulesAlertArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // AuthorizedResourceIds: pulumi.StringArray{ // example2.ID(), // }, // Action: &monitoring.ScheduledQueryRulesAlertActionArgs{ // ActionGroups: pulumi.StringArray{}, // EmailSubject: pulumi.String("Email Header"), // CustomWebhookPayload: pulumi.String("{}"), // }, // DataSourceId: exampleInsights.ID(), // Description: pulumi.String("Query may access data within multiple resources"), // Enabled: pulumi.Bool(true), // Query: pulumi.String(invokeFormat.Result), // Severity: pulumi.Int(1), // Frequency: pulumi.Int(5), // TimeWindow: pulumi.Int(30), // Trigger: &monitoring.ScheduledQueryRulesAlertTriggerArgs{ // Operator: pulumi.String("GreaterThan"), // Threshold: pulumi.Float64(3), // }, // Tags: pulumi.StringMap{ // "foo": pulumi.String("bar"), // }, // }) // 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` - 2018-04-16 // // ## Import // // Scheduled Query Rule Alerts can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/scheduledQueryRulesAlert:ScheduledQueryRulesAlert example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/scheduledQueryRules/myrulename // ``` type ScheduledQueryRulesAlert struct { pulumi.CustomResourceState // An `action` block as defined below. Action ScheduledQueryRulesAlertActionOutput `pulumi:"action"` // List of Resource IDs referred into query. AuthorizedResourceIds pulumi.StringArrayOutput `pulumi:"authorizedResourceIds"` // Should the alerts in this Metric Alert be auto resolved? Defaults to `false`. // > **Note:** `autoMitigationEnabled` and `throttling` are mutually exclusive and cannot both be set. AutoMitigationEnabled pulumi.BoolPtrOutput `pulumi:"autoMitigationEnabled"` // The resource URI over which log search query is to be run. Changing this forces a new resource to be created. DataSourceId pulumi.StringOutput `pulumi:"dataSourceId"` // The description of the scheduled query rule. Description pulumi.StringPtrOutput `pulumi:"description"` // Whether this scheduled query rule is enabled. Default is `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive). Frequency pulumi.IntOutput `pulumi:"frequency"` // Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the scheduled query rule. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Log search query. Query pulumi.StringOutput `pulumi:"query"` // The type of query results. Possible values are `ResultCount` and `Number`. Default is `ResultCount`. If set to `ResultCount`, `query` must include an `AggregatedValue` column of a numeric type, for example, `Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)`. QueryType pulumi.StringPtrOutput `pulumi:"queryType"` // The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Severity of the alert. Possible values include: 0, 1, 2, 3, or 4. Severity pulumi.IntPtrOutput `pulumi:"severity"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive). Throttling pulumi.IntPtrOutput `pulumi:"throttling"` // Time window for which data needs to be fetched for query (must be greater than or equal to `frequency`). Values must be between 5 and 2880 (inclusive). TimeWindow pulumi.IntOutput `pulumi:"timeWindow"` // A `trigger` block as defined below. Trigger ScheduledQueryRulesAlertTriggerOutput `pulumi:"trigger"` } // NewScheduledQueryRulesAlert registers a new resource with the given unique name, arguments, and options. func NewScheduledQueryRulesAlert(ctx *pulumi.Context, name string, args *ScheduledQueryRulesAlertArgs, opts ...pulumi.ResourceOption) (*ScheduledQueryRulesAlert, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Action == nil { return nil, errors.New("invalid value for required argument 'Action'") } if args.DataSourceId == nil { return nil, errors.New("invalid value for required argument 'DataSourceId'") } if args.Frequency == nil { return nil, errors.New("invalid value for required argument 'Frequency'") } if args.Query == nil { return nil, errors.New("invalid value for required argument 'Query'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.TimeWindow == nil { return nil, errors.New("invalid value for required argument 'TimeWindow'") } if args.Trigger == nil { return nil, errors.New("invalid value for required argument 'Trigger'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ScheduledQueryRulesAlert err := ctx.RegisterResource("azure:monitoring/scheduledQueryRulesAlert:ScheduledQueryRulesAlert", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetScheduledQueryRulesAlert gets an existing ScheduledQueryRulesAlert 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 GetScheduledQueryRulesAlert(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ScheduledQueryRulesAlertState, opts ...pulumi.ResourceOption) (*ScheduledQueryRulesAlert, error) { var resource ScheduledQueryRulesAlert err := ctx.ReadResource("azure:monitoring/scheduledQueryRulesAlert:ScheduledQueryRulesAlert", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ScheduledQueryRulesAlert resources. type scheduledQueryRulesAlertState struct { // An `action` block as defined below. Action *ScheduledQueryRulesAlertAction `pulumi:"action"` // List of Resource IDs referred into query. AuthorizedResourceIds []string `pulumi:"authorizedResourceIds"` // Should the alerts in this Metric Alert be auto resolved? Defaults to `false`. // > **Note:** `autoMitigationEnabled` and `throttling` are mutually exclusive and cannot both be set. AutoMitigationEnabled *bool `pulumi:"autoMitigationEnabled"` // The resource URI over which log search query is to be run. Changing this forces a new resource to be created. DataSourceId *string `pulumi:"dataSourceId"` // The description of the scheduled query rule. Description *string `pulumi:"description"` // Whether this scheduled query rule is enabled. Default is `true`. Enabled *bool `pulumi:"enabled"` // Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive). Frequency *int `pulumi:"frequency"` // Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the scheduled query rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Log search query. Query *string `pulumi:"query"` // The type of query results. Possible values are `ResultCount` and `Number`. Default is `ResultCount`. If set to `ResultCount`, `query` must include an `AggregatedValue` column of a numeric type, for example, `Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)`. QueryType *string `pulumi:"queryType"` // The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Severity of the alert. Possible values include: 0, 1, 2, 3, or 4. Severity *int `pulumi:"severity"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive). Throttling *int `pulumi:"throttling"` // Time window for which data needs to be fetched for query (must be greater than or equal to `frequency`). Values must be between 5 and 2880 (inclusive). TimeWindow *int `pulumi:"timeWindow"` // A `trigger` block as defined below. Trigger *ScheduledQueryRulesAlertTrigger `pulumi:"trigger"` } type ScheduledQueryRulesAlertState struct { // An `action` block as defined below. Action ScheduledQueryRulesAlertActionPtrInput // List of Resource IDs referred into query. AuthorizedResourceIds pulumi.StringArrayInput // Should the alerts in this Metric Alert be auto resolved? Defaults to `false`. // > **Note:** `autoMitigationEnabled` and `throttling` are mutually exclusive and cannot both be set. AutoMitigationEnabled pulumi.BoolPtrInput // The resource URI over which log search query is to be run. Changing this forces a new resource to be created. DataSourceId pulumi.StringPtrInput // The description of the scheduled query rule. Description pulumi.StringPtrInput // Whether this scheduled query rule is enabled. Default is `true`. Enabled pulumi.BoolPtrInput // Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive). Frequency pulumi.IntPtrInput // Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the scheduled query rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Log search query. Query pulumi.StringPtrInput // The type of query results. Possible values are `ResultCount` and `Number`. Default is `ResultCount`. If set to `ResultCount`, `query` must include an `AggregatedValue` column of a numeric type, for example, `Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)`. QueryType pulumi.StringPtrInput // The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Severity of the alert. Possible values include: 0, 1, 2, 3, or 4. Severity pulumi.IntPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive). Throttling pulumi.IntPtrInput // Time window for which data needs to be fetched for query (must be greater than or equal to `frequency`). Values must be between 5 and 2880 (inclusive). TimeWindow pulumi.IntPtrInput // A `trigger` block as defined below. Trigger ScheduledQueryRulesAlertTriggerPtrInput } func (ScheduledQueryRulesAlertState) ElementType() reflect.Type { return reflect.TypeOf((*scheduledQueryRulesAlertState)(nil)).Elem() } type scheduledQueryRulesAlertArgs struct { // An `action` block as defined below. Action ScheduledQueryRulesAlertAction `pulumi:"action"` // List of Resource IDs referred into query. AuthorizedResourceIds []string `pulumi:"authorizedResourceIds"` // Should the alerts in this Metric Alert be auto resolved? Defaults to `false`. // > **Note:** `autoMitigationEnabled` and `throttling` are mutually exclusive and cannot both be set. AutoMitigationEnabled *bool `pulumi:"autoMitigationEnabled"` // The resource URI over which log search query is to be run. Changing this forces a new resource to be created. DataSourceId string `pulumi:"dataSourceId"` // The description of the scheduled query rule. Description *string `pulumi:"description"` // Whether this scheduled query rule is enabled. Default is `true`. Enabled *bool `pulumi:"enabled"` // Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive). Frequency int `pulumi:"frequency"` // Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the scheduled query rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Log search query. Query string `pulumi:"query"` // The type of query results. Possible values are `ResultCount` and `Number`. Default is `ResultCount`. If set to `ResultCount`, `query` must include an `AggregatedValue` column of a numeric type, for example, `Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)`. QueryType *string `pulumi:"queryType"` // The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Severity of the alert. Possible values include: 0, 1, 2, 3, or 4. Severity *int `pulumi:"severity"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive). Throttling *int `pulumi:"throttling"` // Time window for which data needs to be fetched for query (must be greater than or equal to `frequency`). Values must be between 5 and 2880 (inclusive). TimeWindow int `pulumi:"timeWindow"` // A `trigger` block as defined below. Trigger ScheduledQueryRulesAlertTrigger `pulumi:"trigger"` } // The set of arguments for constructing a ScheduledQueryRulesAlert resource. type ScheduledQueryRulesAlertArgs struct { // An `action` block as defined below. Action ScheduledQueryRulesAlertActionInput // List of Resource IDs referred into query. AuthorizedResourceIds pulumi.StringArrayInput // Should the alerts in this Metric Alert be auto resolved? Defaults to `false`. // > **Note:** `autoMitigationEnabled` and `throttling` are mutually exclusive and cannot both be set. AutoMitigationEnabled pulumi.BoolPtrInput // The resource URI over which log search query is to be run. Changing this forces a new resource to be created. DataSourceId pulumi.StringInput // The description of the scheduled query rule. Description pulumi.StringPtrInput // Whether this scheduled query rule is enabled. Default is `true`. Enabled pulumi.BoolPtrInput // Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive). Frequency pulumi.IntInput // Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the scheduled query rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Log search query. Query pulumi.StringInput // The type of query results. Possible values are `ResultCount` and `Number`. Default is `ResultCount`. If set to `ResultCount`, `query` must include an `AggregatedValue` column of a numeric type, for example, `Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)`. QueryType pulumi.StringPtrInput // The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Severity of the alert. Possible values include: 0, 1, 2, 3, or 4. Severity pulumi.IntPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive). Throttling pulumi.IntPtrInput // Time window for which data needs to be fetched for query (must be greater than or equal to `frequency`). Values must be between 5 and 2880 (inclusive). TimeWindow pulumi.IntInput // A `trigger` block as defined below. Trigger ScheduledQueryRulesAlertTriggerInput } func (ScheduledQueryRulesAlertArgs) ElementType() reflect.Type { return reflect.TypeOf((*scheduledQueryRulesAlertArgs)(nil)).Elem() } type ScheduledQueryRulesAlertInput interface { pulumi.Input ToScheduledQueryRulesAlertOutput() ScheduledQueryRulesAlertOutput ToScheduledQueryRulesAlertOutputWithContext(ctx context.Context) ScheduledQueryRulesAlertOutput } func (*ScheduledQueryRulesAlert) ElementType() reflect.Type { return reflect.TypeOf((**ScheduledQueryRulesAlert)(nil)).Elem() } func (i *ScheduledQueryRulesAlert) ToScheduledQueryRulesAlertOutput() ScheduledQueryRulesAlertOutput { return i.ToScheduledQueryRulesAlertOutputWithContext(context.Background()) } func (i *ScheduledQueryRulesAlert) ToScheduledQueryRulesAlertOutputWithContext(ctx context.Context) ScheduledQueryRulesAlertOutput { return pulumi.ToOutputWithContext(ctx, i).(ScheduledQueryRulesAlertOutput) } // ScheduledQueryRulesAlertArrayInput is an input type that accepts ScheduledQueryRulesAlertArray and ScheduledQueryRulesAlertArrayOutput values. // You can construct a concrete instance of `ScheduledQueryRulesAlertArrayInput` via: // // ScheduledQueryRulesAlertArray{ ScheduledQueryRulesAlertArgs{...} } type ScheduledQueryRulesAlertArrayInput interface { pulumi.Input ToScheduledQueryRulesAlertArrayOutput() ScheduledQueryRulesAlertArrayOutput ToScheduledQueryRulesAlertArrayOutputWithContext(context.Context) ScheduledQueryRulesAlertArrayOutput } type ScheduledQueryRulesAlertArray []ScheduledQueryRulesAlertInput func (ScheduledQueryRulesAlertArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ScheduledQueryRulesAlert)(nil)).Elem() } func (i ScheduledQueryRulesAlertArray) ToScheduledQueryRulesAlertArrayOutput() ScheduledQueryRulesAlertArrayOutput { return i.ToScheduledQueryRulesAlertArrayOutputWithContext(context.Background()) } func (i ScheduledQueryRulesAlertArray) ToScheduledQueryRulesAlertArrayOutputWithContext(ctx context.Context) ScheduledQueryRulesAlertArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ScheduledQueryRulesAlertArrayOutput) } // ScheduledQueryRulesAlertMapInput is an input type that accepts ScheduledQueryRulesAlertMap and ScheduledQueryRulesAlertMapOutput values. // You can construct a concrete instance of `ScheduledQueryRulesAlertMapInput` via: // // ScheduledQueryRulesAlertMap{ "key": ScheduledQueryRulesAlertArgs{...} } type ScheduledQueryRulesAlertMapInput interface { pulumi.Input ToScheduledQueryRulesAlertMapOutput() ScheduledQueryRulesAlertMapOutput ToScheduledQueryRulesAlertMapOutputWithContext(context.Context) ScheduledQueryRulesAlertMapOutput } type ScheduledQueryRulesAlertMap map[string]ScheduledQueryRulesAlertInput func (ScheduledQueryRulesAlertMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ScheduledQueryRulesAlert)(nil)).Elem() } func (i ScheduledQueryRulesAlertMap) ToScheduledQueryRulesAlertMapOutput() ScheduledQueryRulesAlertMapOutput { return i.ToScheduledQueryRulesAlertMapOutputWithContext(context.Background()) } func (i ScheduledQueryRulesAlertMap) ToScheduledQueryRulesAlertMapOutputWithContext(ctx context.Context) ScheduledQueryRulesAlertMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ScheduledQueryRulesAlertMapOutput) } type ScheduledQueryRulesAlertOutput struct{ *pulumi.OutputState } func (ScheduledQueryRulesAlertOutput) ElementType() reflect.Type { return reflect.TypeOf((**ScheduledQueryRulesAlert)(nil)).Elem() } func (o ScheduledQueryRulesAlertOutput) ToScheduledQueryRulesAlertOutput() ScheduledQueryRulesAlertOutput { return o } func (o ScheduledQueryRulesAlertOutput) ToScheduledQueryRulesAlertOutputWithContext(ctx context.Context) ScheduledQueryRulesAlertOutput { return o } // An `action` block as defined below. func (o ScheduledQueryRulesAlertOutput) Action() ScheduledQueryRulesAlertActionOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) ScheduledQueryRulesAlertActionOutput { return v.Action }).(ScheduledQueryRulesAlertActionOutput) } // List of Resource IDs referred into query. func (o ScheduledQueryRulesAlertOutput) AuthorizedResourceIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) pulumi.StringArrayOutput { return v.AuthorizedResourceIds }).(pulumi.StringArrayOutput) } // Should the alerts in this Metric Alert be auto resolved? Defaults to `false`. // > **Note:** `autoMitigationEnabled` and `throttling` are mutually exclusive and cannot both be set. func (o ScheduledQueryRulesAlertOutput) AutoMitigationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) pulumi.BoolPtrOutput { return v.AutoMitigationEnabled }).(pulumi.BoolPtrOutput) } // The resource URI over which log search query is to be run. Changing this forces a new resource to be created. func (o ScheduledQueryRulesAlertOutput) DataSourceId() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) pulumi.StringOutput { return v.DataSourceId }).(pulumi.StringOutput) } // The description of the scheduled query rule. func (o ScheduledQueryRulesAlertOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Whether this scheduled query rule is enabled. Default is `true`. func (o ScheduledQueryRulesAlertOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive). func (o ScheduledQueryRulesAlertOutput) Frequency() pulumi.IntOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) pulumi.IntOutput { return v.Frequency }).(pulumi.IntOutput) } // Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created. func (o ScheduledQueryRulesAlertOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the scheduled query rule. Changing this forces a new resource to be created. func (o ScheduledQueryRulesAlertOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Log search query. func (o ScheduledQueryRulesAlertOutput) Query() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) pulumi.StringOutput { return v.Query }).(pulumi.StringOutput) } // The type of query results. Possible values are `ResultCount` and `Number`. Default is `ResultCount`. If set to `ResultCount`, `query` must include an `AggregatedValue` column of a numeric type, for example, `Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)`. func (o ScheduledQueryRulesAlertOutput) QueryType() pulumi.StringPtrOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) pulumi.StringPtrOutput { return v.QueryType }).(pulumi.StringPtrOutput) } // The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created. func (o ScheduledQueryRulesAlertOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Severity of the alert. Possible values include: 0, 1, 2, 3, or 4. func (o ScheduledQueryRulesAlertOutput) Severity() pulumi.IntPtrOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) pulumi.IntPtrOutput { return v.Severity }).(pulumi.IntPtrOutput) } // A mapping of tags to assign to the resource. func (o ScheduledQueryRulesAlertOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive). func (o ScheduledQueryRulesAlertOutput) Throttling() pulumi.IntPtrOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) pulumi.IntPtrOutput { return v.Throttling }).(pulumi.IntPtrOutput) } // Time window for which data needs to be fetched for query (must be greater than or equal to `frequency`). Values must be between 5 and 2880 (inclusive). func (o ScheduledQueryRulesAlertOutput) TimeWindow() pulumi.IntOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) pulumi.IntOutput { return v.TimeWindow }).(pulumi.IntOutput) } // A `trigger` block as defined below. func (o ScheduledQueryRulesAlertOutput) Trigger() ScheduledQueryRulesAlertTriggerOutput { return o.ApplyT(func(v *ScheduledQueryRulesAlert) ScheduledQueryRulesAlertTriggerOutput { return v.Trigger }).(ScheduledQueryRulesAlertTriggerOutput) } type ScheduledQueryRulesAlertArrayOutput struct{ *pulumi.OutputState } func (ScheduledQueryRulesAlertArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ScheduledQueryRulesAlert)(nil)).Elem() } func (o ScheduledQueryRulesAlertArrayOutput) ToScheduledQueryRulesAlertArrayOutput() ScheduledQueryRulesAlertArrayOutput { return o } func (o ScheduledQueryRulesAlertArrayOutput) ToScheduledQueryRulesAlertArrayOutputWithContext(ctx context.Context) ScheduledQueryRulesAlertArrayOutput { return o } func (o ScheduledQueryRulesAlertArrayOutput) Index(i pulumi.IntInput) ScheduledQueryRulesAlertOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ScheduledQueryRulesAlert { return vs[0].([]*ScheduledQueryRulesAlert)[vs[1].(int)] }).(ScheduledQueryRulesAlertOutput) } type ScheduledQueryRulesAlertMapOutput struct{ *pulumi.OutputState } func (ScheduledQueryRulesAlertMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ScheduledQueryRulesAlert)(nil)).Elem() } func (o ScheduledQueryRulesAlertMapOutput) ToScheduledQueryRulesAlertMapOutput() ScheduledQueryRulesAlertMapOutput { return o } func (o ScheduledQueryRulesAlertMapOutput) ToScheduledQueryRulesAlertMapOutputWithContext(ctx context.Context) ScheduledQueryRulesAlertMapOutput { return o } func (o ScheduledQueryRulesAlertMapOutput) MapIndex(k pulumi.StringInput) ScheduledQueryRulesAlertOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ScheduledQueryRulesAlert { return vs[0].(map[string]*ScheduledQueryRulesAlert)[vs[1].(string)] }).(ScheduledQueryRulesAlertOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ScheduledQueryRulesAlertInput)(nil)).Elem(), &ScheduledQueryRulesAlert{}) pulumi.RegisterInputType(reflect.TypeOf((*ScheduledQueryRulesAlertArrayInput)(nil)).Elem(), ScheduledQueryRulesAlertArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ScheduledQueryRulesAlertMapInput)(nil)).Elem(), ScheduledQueryRulesAlertMap{}) pulumi.RegisterOutputType(ScheduledQueryRulesAlertOutput{}) pulumi.RegisterOutputType(ScheduledQueryRulesAlertArrayOutput{}) pulumi.RegisterOutputType(ScheduledQueryRulesAlertMapOutput{}) }
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/monitoring/getDiagnosticCategories.go
sdk/go/azure/monitoring/getDiagnosticCategories.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 monitoring 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 the Monitor Diagnostics Categories supported by an existing Resource. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := keyvault.LookupKeyVault(ctx, &keyvault.LookupKeyVaultArgs{ // Name: exampleAzurermKeyVault.Name, // ResourceGroupName: exampleAzurermKeyVault.ResourceGroupName, // }, nil) // if err != nil { // return err // } // _, err = monitoring.GetDiagnosticCategories(ctx, &monitoring.GetDiagnosticCategoriesArgs{ // ResourceId: example.Id, // }, 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.Insights` - 2021-05-01-preview func GetDiagnosticCategories(ctx *pulumi.Context, args *GetDiagnosticCategoriesArgs, opts ...pulumi.InvokeOption) (*GetDiagnosticCategoriesResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetDiagnosticCategoriesResult err := ctx.Invoke("azure:monitoring/getDiagnosticCategories:getDiagnosticCategories", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getDiagnosticCategories. type GetDiagnosticCategoriesArgs struct { // The ID of an existing Resource which Monitor Diagnostics Categories should be retrieved for. ResourceId string `pulumi:"resourceId"` } // A collection of values returned by getDiagnosticCategories. type GetDiagnosticCategoriesResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // A list of the supported log category groups of this resource to send to the destination. LogCategoryGroups []string `pulumi:"logCategoryGroups"` // A list of the supported log category types of this resource to send to the destination. LogCategoryTypes []string `pulumi:"logCategoryTypes"` // A list of the Metric Categories supported for this Resource. Metrics []string `pulumi:"metrics"` ResourceId string `pulumi:"resourceId"` } func GetDiagnosticCategoriesOutput(ctx *pulumi.Context, args GetDiagnosticCategoriesOutputArgs, opts ...pulumi.InvokeOption) GetDiagnosticCategoriesResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetDiagnosticCategoriesResultOutput, error) { args := v.(GetDiagnosticCategoriesArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:monitoring/getDiagnosticCategories:getDiagnosticCategories", args, GetDiagnosticCategoriesResultOutput{}, options).(GetDiagnosticCategoriesResultOutput), nil }).(GetDiagnosticCategoriesResultOutput) } // A collection of arguments for invoking getDiagnosticCategories. type GetDiagnosticCategoriesOutputArgs struct { // The ID of an existing Resource which Monitor Diagnostics Categories should be retrieved for. ResourceId pulumi.StringInput `pulumi:"resourceId"` } func (GetDiagnosticCategoriesOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetDiagnosticCategoriesArgs)(nil)).Elem() } // A collection of values returned by getDiagnosticCategories. type GetDiagnosticCategoriesResultOutput struct{ *pulumi.OutputState } func (GetDiagnosticCategoriesResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetDiagnosticCategoriesResult)(nil)).Elem() } func (o GetDiagnosticCategoriesResultOutput) ToGetDiagnosticCategoriesResultOutput() GetDiagnosticCategoriesResultOutput { return o } func (o GetDiagnosticCategoriesResultOutput) ToGetDiagnosticCategoriesResultOutputWithContext(ctx context.Context) GetDiagnosticCategoriesResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o GetDiagnosticCategoriesResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetDiagnosticCategoriesResult) string { return v.Id }).(pulumi.StringOutput) } // A list of the supported log category groups of this resource to send to the destination. func (o GetDiagnosticCategoriesResultOutput) LogCategoryGroups() pulumi.StringArrayOutput { return o.ApplyT(func(v GetDiagnosticCategoriesResult) []string { return v.LogCategoryGroups }).(pulumi.StringArrayOutput) } // A list of the supported log category types of this resource to send to the destination. func (o GetDiagnosticCategoriesResultOutput) LogCategoryTypes() pulumi.StringArrayOutput { return o.ApplyT(func(v GetDiagnosticCategoriesResult) []string { return v.LogCategoryTypes }).(pulumi.StringArrayOutput) } // A list of the Metric Categories supported for this Resource. func (o GetDiagnosticCategoriesResultOutput) Metrics() pulumi.StringArrayOutput { return o.ApplyT(func(v GetDiagnosticCategoriesResult) []string { return v.Metrics }).(pulumi.StringArrayOutput) } func (o GetDiagnosticCategoriesResultOutput) ResourceId() pulumi.StringOutput { return o.ApplyT(func(v GetDiagnosticCategoriesResult) string { return v.ResourceId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetDiagnosticCategoriesResultOutput{}) }
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/monitoring/getScheduledQueryRulesAlert.go
sdk/go/azure/monitoring/getScheduledQueryRulesAlert.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 monitoring 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 the properties of an AlertingAction scheduled query rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := monitoring.LookupScheduledQueryRulesAlert(ctx, &monitoring.LookupScheduledQueryRulesAlertArgs{ // ResourceGroupName: "example-rg", // Name: "tfex-queryrule", // }, nil) // if err != nil { // return err // } // ctx.Export("queryRuleId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Insights` - 2018-04-16 func LookupScheduledQueryRulesAlert(ctx *pulumi.Context, args *LookupScheduledQueryRulesAlertArgs, opts ...pulumi.InvokeOption) (*LookupScheduledQueryRulesAlertResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupScheduledQueryRulesAlertResult err := ctx.Invoke("azure:monitoring/getScheduledQueryRulesAlert:getScheduledQueryRulesAlert", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getScheduledQueryRulesAlert. type LookupScheduledQueryRulesAlertArgs struct { // Specifies the name of the scheduled query rule. Name string `pulumi:"name"` // Specifies the name of the resource group where the scheduled query rule is located. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getScheduledQueryRulesAlert. type LookupScheduledQueryRulesAlertResult struct { // supports the following: Actions []GetScheduledQueryRulesAlertAction `pulumi:"actions"` // The list of Resource IDs referred into query. AuthorizedResourceIds []string `pulumi:"authorizedResourceIds"` // The resource URI over which log search query is to be run. DataSourceId string `pulumi:"dataSourceId"` // The description of the scheduled query rule. Description string `pulumi:"description"` // Whether this scheduled query rule is enabled. Enabled bool `pulumi:"enabled"` // Frequency at which rule condition should be evaluated. Frequency int `pulumi:"frequency"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // Specifies the Azure Region where the resource should exist. Location string `pulumi:"location"` Name string `pulumi:"name"` // Log search query. Query string `pulumi:"query"` // The type of query results. QueryType string `pulumi:"queryType"` ResourceGroupName string `pulumi:"resourceGroupName"` // Severity of the alert. Severity int `pulumi:"severity"` Tags map[string]string `pulumi:"tags"` // Time for which alerts should be throttled or suppressed. Throttling int `pulumi:"throttling"` // Time window for which data needs to be fetched for query. TimeWindow int `pulumi:"timeWindow"` // A `trigger` block as defined below. Triggers []GetScheduledQueryRulesAlertTrigger `pulumi:"triggers"` } func LookupScheduledQueryRulesAlertOutput(ctx *pulumi.Context, args LookupScheduledQueryRulesAlertOutputArgs, opts ...pulumi.InvokeOption) LookupScheduledQueryRulesAlertResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupScheduledQueryRulesAlertResultOutput, error) { args := v.(LookupScheduledQueryRulesAlertArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:monitoring/getScheduledQueryRulesAlert:getScheduledQueryRulesAlert", args, LookupScheduledQueryRulesAlertResultOutput{}, options).(LookupScheduledQueryRulesAlertResultOutput), nil }).(LookupScheduledQueryRulesAlertResultOutput) } // A collection of arguments for invoking getScheduledQueryRulesAlert. type LookupScheduledQueryRulesAlertOutputArgs struct { // Specifies the name of the scheduled query rule. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group where the scheduled query rule is located. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupScheduledQueryRulesAlertOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupScheduledQueryRulesAlertArgs)(nil)).Elem() } // A collection of values returned by getScheduledQueryRulesAlert. type LookupScheduledQueryRulesAlertResultOutput struct{ *pulumi.OutputState } func (LookupScheduledQueryRulesAlertResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupScheduledQueryRulesAlertResult)(nil)).Elem() } func (o LookupScheduledQueryRulesAlertResultOutput) ToLookupScheduledQueryRulesAlertResultOutput() LookupScheduledQueryRulesAlertResultOutput { return o } func (o LookupScheduledQueryRulesAlertResultOutput) ToLookupScheduledQueryRulesAlertResultOutputWithContext(ctx context.Context) LookupScheduledQueryRulesAlertResultOutput { return o } // supports the following: func (o LookupScheduledQueryRulesAlertResultOutput) Actions() GetScheduledQueryRulesAlertActionArrayOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) []GetScheduledQueryRulesAlertAction { return v.Actions }).(GetScheduledQueryRulesAlertActionArrayOutput) } // The list of Resource IDs referred into query. func (o LookupScheduledQueryRulesAlertResultOutput) AuthorizedResourceIds() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) []string { return v.AuthorizedResourceIds }).(pulumi.StringArrayOutput) } // The resource URI over which log search query is to be run. func (o LookupScheduledQueryRulesAlertResultOutput) DataSourceId() pulumi.StringOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) string { return v.DataSourceId }).(pulumi.StringOutput) } // The description of the scheduled query rule. func (o LookupScheduledQueryRulesAlertResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) string { return v.Description }).(pulumi.StringOutput) } // Whether this scheduled query rule is enabled. func (o LookupScheduledQueryRulesAlertResultOutput) Enabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) bool { return v.Enabled }).(pulumi.BoolOutput) } // Frequency at which rule condition should be evaluated. func (o LookupScheduledQueryRulesAlertResultOutput) Frequency() pulumi.IntOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) int { return v.Frequency }).(pulumi.IntOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupScheduledQueryRulesAlertResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) string { return v.Id }).(pulumi.StringOutput) } // Specifies the Azure Region where the resource should exist. func (o LookupScheduledQueryRulesAlertResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupScheduledQueryRulesAlertResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) string { return v.Name }).(pulumi.StringOutput) } // Log search query. func (o LookupScheduledQueryRulesAlertResultOutput) Query() pulumi.StringOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) string { return v.Query }).(pulumi.StringOutput) } // The type of query results. func (o LookupScheduledQueryRulesAlertResultOutput) QueryType() pulumi.StringOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) string { return v.QueryType }).(pulumi.StringOutput) } func (o LookupScheduledQueryRulesAlertResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // Severity of the alert. func (o LookupScheduledQueryRulesAlertResultOutput) Severity() pulumi.IntOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) int { return v.Severity }).(pulumi.IntOutput) } func (o LookupScheduledQueryRulesAlertResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // Time for which alerts should be throttled or suppressed. func (o LookupScheduledQueryRulesAlertResultOutput) Throttling() pulumi.IntOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) int { return v.Throttling }).(pulumi.IntOutput) } // Time window for which data needs to be fetched for query. func (o LookupScheduledQueryRulesAlertResultOutput) TimeWindow() pulumi.IntOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) int { return v.TimeWindow }).(pulumi.IntOutput) } // A `trigger` block as defined below. func (o LookupScheduledQueryRulesAlertResultOutput) Triggers() GetScheduledQueryRulesAlertTriggerArrayOutput { return o.ApplyT(func(v LookupScheduledQueryRulesAlertResult) []GetScheduledQueryRulesAlertTrigger { return v.Triggers }).(GetScheduledQueryRulesAlertTriggerArrayOutput) } func init() { pulumi.RegisterOutputType(LookupScheduledQueryRulesAlertResultOutput{}) }
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/monitoring/scheduledQueryRulesLog.go
sdk/go/azure/monitoring/scheduledQueryRulesLog.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 monitoring import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a LogToMetricAction Scheduled Query Rules resource within Azure 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/monitoring" // "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("monitoring-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("loganalytics"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("PerGB2018"), // RetentionInDays: pulumi.Int(30), // }) // if err != nil { // return err // } // exampleActionGroup, err := monitoring.NewActionGroup(ctx, "example", &monitoring.ActionGroupArgs{ // Name: pulumi.String("example-actiongroup"), // ResourceGroupName: example.Name, // ShortName: pulumi.String("exampleact"), // WebhookReceivers: monitoring.ActionGroupWebhookReceiverArray{ // &monitoring.ActionGroupWebhookReceiverArgs{ // Name: pulumi.String("callmyapi"), // ServiceUri: pulumi.String("http://example.com/alert"), // }, // }, // }) // if err != nil { // return err // } // // Example: Creates alert using the new Scheduled Query Rules metric // _, err = monitoring.NewMetricAlert(ctx, "example", &monitoring.MetricAlertArgs{ // Name: pulumi.String("example-metricalert"), // ResourceGroupName: example.Name, // Scopes: pulumi.StringArray{ // exampleAnalyticsWorkspace.ID(), // }, // Description: pulumi.String("Action will be triggered when Average_% Idle Time metric is less than 10."), // Frequency: pulumi.String("PT1M"), // WindowSize: pulumi.String("PT5M"), // Criterias: monitoring.MetricAlertCriteriaArray{ // &monitoring.MetricAlertCriteriaArgs{ // MetricNamespace: pulumi.String("Microsoft.OperationalInsights/workspaces"), // MetricName: pulumi.String("UsedCapacity"), // Aggregation: pulumi.String("Average"), // Operator: pulumi.String("LessThan"), // Threshold: pulumi.Float64(10), // }, // }, // Actions: monitoring.MetricAlertActionArray{ // &monitoring.MetricAlertActionArgs{ // ActionGroupId: exampleActionGroup.ID(), // }, // }, // }) // if err != nil { // return err // } // // Example: LogToMetric Action for the named Computer // _, err = monitoring.NewScheduledQueryRulesLog(ctx, "example", &monitoring.ScheduledQueryRulesLogArgs{ // Name: pulumi.String("example"), // Location: example.Location, // ResourceGroupName: example.Name, // Criteria: &monitoring.ScheduledQueryRulesLogCriteriaArgs{ // MetricName: pulumi.String("Average_% Idle Time"), // Dimensions: monitoring.ScheduledQueryRulesLogCriteriaDimensionArray{ // &monitoring.ScheduledQueryRulesLogCriteriaDimensionArgs{ // Name: pulumi.String("Computer"), // Operator: pulumi.String("Include"), // Values: pulumi.StringArray{ // pulumi.String("targetVM"), // }, // }, // }, // }, // DataSourceId: exampleAnalyticsWorkspace.ID(), // Description: pulumi.String("Scheduled query rule LogToMetric example"), // Enabled: pulumi.Bool(true), // Tags: pulumi.StringMap{ // "foo": pulumi.String("bar"), // }, // }) // 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` - 2018-04-16 // // ## Import // // Scheduled Query Rule Log can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/scheduledQueryRulesLog:ScheduledQueryRulesLog example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/scheduledQueryRules/myrulename // ``` type ScheduledQueryRulesLog struct { pulumi.CustomResourceState // A list of IDs of Resources referred into query. AuthorizedResourceIds pulumi.StringArrayOutput `pulumi:"authorizedResourceIds"` // A `criteria` block as defined below. Criteria ScheduledQueryRulesLogCriteriaOutput `pulumi:"criteria"` // The resource URI over which log search query is to be run. Changing this forces a new resource to be created. DataSourceId pulumi.StringOutput `pulumi:"dataSourceId"` // The description of the scheduled query rule. Description pulumi.StringPtrOutput `pulumi:"description"` // Whether this scheduled query rule is enabled. Default is `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the scheduled query rule. 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 scheduled query rule instance. 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"` } // NewScheduledQueryRulesLog registers a new resource with the given unique name, arguments, and options. func NewScheduledQueryRulesLog(ctx *pulumi.Context, name string, args *ScheduledQueryRulesLogArgs, opts ...pulumi.ResourceOption) (*ScheduledQueryRulesLog, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Criteria == nil { return nil, errors.New("invalid value for required argument 'Criteria'") } if args.DataSourceId == nil { return nil, errors.New("invalid value for required argument 'DataSourceId'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ScheduledQueryRulesLog err := ctx.RegisterResource("azure:monitoring/scheduledQueryRulesLog:ScheduledQueryRulesLog", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetScheduledQueryRulesLog gets an existing ScheduledQueryRulesLog 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 GetScheduledQueryRulesLog(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ScheduledQueryRulesLogState, opts ...pulumi.ResourceOption) (*ScheduledQueryRulesLog, error) { var resource ScheduledQueryRulesLog err := ctx.ReadResource("azure:monitoring/scheduledQueryRulesLog:ScheduledQueryRulesLog", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ScheduledQueryRulesLog resources. type scheduledQueryRulesLogState struct { // A list of IDs of Resources referred into query. AuthorizedResourceIds []string `pulumi:"authorizedResourceIds"` // A `criteria` block as defined below. Criteria *ScheduledQueryRulesLogCriteria `pulumi:"criteria"` // The resource URI over which log search query is to be run. Changing this forces a new resource to be created. DataSourceId *string `pulumi:"dataSourceId"` // The description of the scheduled query rule. Description *string `pulumi:"description"` // Whether this scheduled query rule is enabled. Default is `true`. Enabled *bool `pulumi:"enabled"` // Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the scheduled query rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the scheduled query rule instance. 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"` } type ScheduledQueryRulesLogState struct { // A list of IDs of Resources referred into query. AuthorizedResourceIds pulumi.StringArrayInput // A `criteria` block as defined below. Criteria ScheduledQueryRulesLogCriteriaPtrInput // The resource URI over which log search query is to be run. Changing this forces a new resource to be created. DataSourceId pulumi.StringPtrInput // The description of the scheduled query rule. Description pulumi.StringPtrInput // Whether this scheduled query rule is enabled. Default is `true`. Enabled pulumi.BoolPtrInput // Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the scheduled query rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (ScheduledQueryRulesLogState) ElementType() reflect.Type { return reflect.TypeOf((*scheduledQueryRulesLogState)(nil)).Elem() } type scheduledQueryRulesLogArgs struct { // A list of IDs of Resources referred into query. AuthorizedResourceIds []string `pulumi:"authorizedResourceIds"` // A `criteria` block as defined below. Criteria ScheduledQueryRulesLogCriteria `pulumi:"criteria"` // The resource URI over which log search query is to be run. Changing this forces a new resource to be created. DataSourceId string `pulumi:"dataSourceId"` // The description of the scheduled query rule. Description *string `pulumi:"description"` // Whether this scheduled query rule is enabled. Default is `true`. Enabled *bool `pulumi:"enabled"` // Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the scheduled query rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the scheduled query rule instance. 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"` } // The set of arguments for constructing a ScheduledQueryRulesLog resource. type ScheduledQueryRulesLogArgs struct { // A list of IDs of Resources referred into query. AuthorizedResourceIds pulumi.StringArrayInput // A `criteria` block as defined below. Criteria ScheduledQueryRulesLogCriteriaInput // The resource URI over which log search query is to be run. Changing this forces a new resource to be created. DataSourceId pulumi.StringInput // The description of the scheduled query rule. Description pulumi.StringPtrInput // Whether this scheduled query rule is enabled. Default is `true`. Enabled pulumi.BoolPtrInput // Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the scheduled query rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (ScheduledQueryRulesLogArgs) ElementType() reflect.Type { return reflect.TypeOf((*scheduledQueryRulesLogArgs)(nil)).Elem() } type ScheduledQueryRulesLogInput interface { pulumi.Input ToScheduledQueryRulesLogOutput() ScheduledQueryRulesLogOutput ToScheduledQueryRulesLogOutputWithContext(ctx context.Context) ScheduledQueryRulesLogOutput } func (*ScheduledQueryRulesLog) ElementType() reflect.Type { return reflect.TypeOf((**ScheduledQueryRulesLog)(nil)).Elem() } func (i *ScheduledQueryRulesLog) ToScheduledQueryRulesLogOutput() ScheduledQueryRulesLogOutput { return i.ToScheduledQueryRulesLogOutputWithContext(context.Background()) } func (i *ScheduledQueryRulesLog) ToScheduledQueryRulesLogOutputWithContext(ctx context.Context) ScheduledQueryRulesLogOutput { return pulumi.ToOutputWithContext(ctx, i).(ScheduledQueryRulesLogOutput) } // ScheduledQueryRulesLogArrayInput is an input type that accepts ScheduledQueryRulesLogArray and ScheduledQueryRulesLogArrayOutput values. // You can construct a concrete instance of `ScheduledQueryRulesLogArrayInput` via: // // ScheduledQueryRulesLogArray{ ScheduledQueryRulesLogArgs{...} } type ScheduledQueryRulesLogArrayInput interface { pulumi.Input ToScheduledQueryRulesLogArrayOutput() ScheduledQueryRulesLogArrayOutput ToScheduledQueryRulesLogArrayOutputWithContext(context.Context) ScheduledQueryRulesLogArrayOutput } type ScheduledQueryRulesLogArray []ScheduledQueryRulesLogInput func (ScheduledQueryRulesLogArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ScheduledQueryRulesLog)(nil)).Elem() } func (i ScheduledQueryRulesLogArray) ToScheduledQueryRulesLogArrayOutput() ScheduledQueryRulesLogArrayOutput { return i.ToScheduledQueryRulesLogArrayOutputWithContext(context.Background()) } func (i ScheduledQueryRulesLogArray) ToScheduledQueryRulesLogArrayOutputWithContext(ctx context.Context) ScheduledQueryRulesLogArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ScheduledQueryRulesLogArrayOutput) } // ScheduledQueryRulesLogMapInput is an input type that accepts ScheduledQueryRulesLogMap and ScheduledQueryRulesLogMapOutput values. // You can construct a concrete instance of `ScheduledQueryRulesLogMapInput` via: // // ScheduledQueryRulesLogMap{ "key": ScheduledQueryRulesLogArgs{...} } type ScheduledQueryRulesLogMapInput interface { pulumi.Input ToScheduledQueryRulesLogMapOutput() ScheduledQueryRulesLogMapOutput ToScheduledQueryRulesLogMapOutputWithContext(context.Context) ScheduledQueryRulesLogMapOutput } type ScheduledQueryRulesLogMap map[string]ScheduledQueryRulesLogInput func (ScheduledQueryRulesLogMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ScheduledQueryRulesLog)(nil)).Elem() } func (i ScheduledQueryRulesLogMap) ToScheduledQueryRulesLogMapOutput() ScheduledQueryRulesLogMapOutput { return i.ToScheduledQueryRulesLogMapOutputWithContext(context.Background()) } func (i ScheduledQueryRulesLogMap) ToScheduledQueryRulesLogMapOutputWithContext(ctx context.Context) ScheduledQueryRulesLogMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ScheduledQueryRulesLogMapOutput) } type ScheduledQueryRulesLogOutput struct{ *pulumi.OutputState } func (ScheduledQueryRulesLogOutput) ElementType() reflect.Type { return reflect.TypeOf((**ScheduledQueryRulesLog)(nil)).Elem() } func (o ScheduledQueryRulesLogOutput) ToScheduledQueryRulesLogOutput() ScheduledQueryRulesLogOutput { return o } func (o ScheduledQueryRulesLogOutput) ToScheduledQueryRulesLogOutputWithContext(ctx context.Context) ScheduledQueryRulesLogOutput { return o } // A list of IDs of Resources referred into query. func (o ScheduledQueryRulesLogOutput) AuthorizedResourceIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *ScheduledQueryRulesLog) pulumi.StringArrayOutput { return v.AuthorizedResourceIds }).(pulumi.StringArrayOutput) } // A `criteria` block as defined below. func (o ScheduledQueryRulesLogOutput) Criteria() ScheduledQueryRulesLogCriteriaOutput { return o.ApplyT(func(v *ScheduledQueryRulesLog) ScheduledQueryRulesLogCriteriaOutput { return v.Criteria }).(ScheduledQueryRulesLogCriteriaOutput) } // The resource URI over which log search query is to be run. Changing this forces a new resource to be created. func (o ScheduledQueryRulesLogOutput) DataSourceId() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledQueryRulesLog) pulumi.StringOutput { return v.DataSourceId }).(pulumi.StringOutput) } // The description of the scheduled query rule. func (o ScheduledQueryRulesLogOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *ScheduledQueryRulesLog) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Whether this scheduled query rule is enabled. Default is `true`. func (o ScheduledQueryRulesLogOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ScheduledQueryRulesLog) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created. func (o ScheduledQueryRulesLogOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledQueryRulesLog) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the scheduled query rule. Changing this forces a new resource to be created. func (o ScheduledQueryRulesLogOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledQueryRulesLog) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created. func (o ScheduledQueryRulesLogOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledQueryRulesLog) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o ScheduledQueryRulesLogOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ScheduledQueryRulesLog) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type ScheduledQueryRulesLogArrayOutput struct{ *pulumi.OutputState } func (ScheduledQueryRulesLogArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ScheduledQueryRulesLog)(nil)).Elem() } func (o ScheduledQueryRulesLogArrayOutput) ToScheduledQueryRulesLogArrayOutput() ScheduledQueryRulesLogArrayOutput { return o } func (o ScheduledQueryRulesLogArrayOutput) ToScheduledQueryRulesLogArrayOutputWithContext(ctx context.Context) ScheduledQueryRulesLogArrayOutput { return o } func (o ScheduledQueryRulesLogArrayOutput) Index(i pulumi.IntInput) ScheduledQueryRulesLogOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ScheduledQueryRulesLog { return vs[0].([]*ScheduledQueryRulesLog)[vs[1].(int)] }).(ScheduledQueryRulesLogOutput) } type ScheduledQueryRulesLogMapOutput struct{ *pulumi.OutputState } func (ScheduledQueryRulesLogMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ScheduledQueryRulesLog)(nil)).Elem() } func (o ScheduledQueryRulesLogMapOutput) ToScheduledQueryRulesLogMapOutput() ScheduledQueryRulesLogMapOutput { return o } func (o ScheduledQueryRulesLogMapOutput) ToScheduledQueryRulesLogMapOutputWithContext(ctx context.Context) ScheduledQueryRulesLogMapOutput { return o } func (o ScheduledQueryRulesLogMapOutput) MapIndex(k pulumi.StringInput) ScheduledQueryRulesLogOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ScheduledQueryRulesLog { return vs[0].(map[string]*ScheduledQueryRulesLog)[vs[1].(string)] }).(ScheduledQueryRulesLogOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ScheduledQueryRulesLogInput)(nil)).Elem(), &ScheduledQueryRulesLog{}) pulumi.RegisterInputType(reflect.TypeOf((*ScheduledQueryRulesLogArrayInput)(nil)).Elem(), ScheduledQueryRulesLogArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ScheduledQueryRulesLogMapInput)(nil)).Elem(), ScheduledQueryRulesLogMap{}) pulumi.RegisterOutputType(ScheduledQueryRulesLogOutput{}) pulumi.RegisterOutputType(ScheduledQueryRulesLogArrayOutput{}) pulumi.RegisterOutputType(ScheduledQueryRulesLogMapOutput{}) }
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/monitoring/autoscaleSetting.go
sdk/go/azure/monitoring/autoscaleSetting.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 monitoring import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a AutoScale Setting which can be applied to Virtual Machine Scale Sets, App Services and other scalable resources. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "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("autoscalingTest"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("acctvn"), // 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("acctsub"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleLinuxVirtualMachineScaleSet, err := compute.NewLinuxVirtualMachineScaleSet(ctx, "example", &compute.LinuxVirtualMachineScaleSetArgs{ // Name: pulumi.String("exampleset"), // Location: example.Location, // ResourceGroupName: example.Name, // UpgradeMode: pulumi.String("Manual"), // Sku: pulumi.String("Standard_F2"), // Instances: pulumi.Int(2), // AdminUsername: pulumi.String("myadmin"), // AdminSshKeys: compute.LinuxVirtualMachineScaleSetAdminSshKeyArray{ // &compute.LinuxVirtualMachineScaleSetAdminSshKeyArgs{ // Username: pulumi.String("myadmin"), // PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDCsTcryUl51Q2VSEHqDRNmceUFo55ZtcIwxl2QITbN1RREti5ml/VTytC0yeBOvnZA4x4CFpdw/lCDPk0yrH9Ei5vVkXmOrExdTlT3qI7YaAzj1tUVlBd4S6LX1F7y6VLActvdHuDDuXZXzCDd/97420jrDfWZqJMlUK/EmCE5ParCeHIRIvmBxcEnGfFIsw8xQZl0HphxWOtJil8qsUWSdMyCiJYYQpMoMliO99X40AUc4/AlsyPyT5ddbKk08YrZ+rKDVHF7o29rh4vi5MmHkVgVQHKiKybWlHq+b71gIAUQk9wrJxD+dqt4igrmDSpIjfjwnd+l5UIn5fJSO5DYV4YT/4hwK7OKmuo7OFHD0WyY5YnkYEMtFgzemnRBdE8ulcT60DQpVgRMXFWHvhyCWy0L6sgj1QWDZlLpvsIvNfHsyhKFMG1frLnMt/nP0+YCcfg+v1JYeCKjeoJxB8DWcRBsjzItY0CGmzP8UYZiYKl/2u+2TgFS5r7NWH11bxoUzjKdaa1NLw+ieA8GlBFfCbfWe6YVB9ggUte4VtYFMZGxOjS2bAiYtfgTKFJv+XqORAwExG6+G2eDxIDyo80/OA9IG7Xv/jwQr7D6KDjDuULFcN/iTxuttoKrHeYz1hf5ZQlBdllwJHYx6fK2g8kha6r2JIQKocvsAXiiONqSfw== hello@world.com"), // }, // }, // NetworkInterfaces: compute.LinuxVirtualMachineScaleSetNetworkInterfaceArray{ // &compute.LinuxVirtualMachineScaleSetNetworkInterfaceArgs{ // Name: pulumi.String("TestNetworkProfile"), // Primary: pulumi.Bool(true), // IpConfigurations: compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArray{ // &compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("TestIPConfiguration"), // Primary: pulumi.Bool(true), // SubnetId: exampleSubnet.ID(), // }, // }, // }, // }, // OsDisk: &compute.LinuxVirtualMachineScaleSetOsDiskArgs{ // Caching: pulumi.String("ReadWrite"), // StorageAccountType: pulumi.String("StandardSSD_LRS"), // }, // SourceImageReference: &compute.LinuxVirtualMachineScaleSetSourceImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // }) // if err != nil { // return err // } // _, err = monitoring.NewAutoscaleSetting(ctx, "example", &monitoring.AutoscaleSettingArgs{ // Name: pulumi.String("myAutoscaleSetting"), // ResourceGroupName: example.Name, // Location: example.Location, // TargetResourceId: exampleLinuxVirtualMachineScaleSet.ID(), // Profiles: monitoring.AutoscaleSettingProfileArray{ // &monitoring.AutoscaleSettingProfileArgs{ // Name: pulumi.String("defaultProfile"), // Capacity: &monitoring.AutoscaleSettingProfileCapacityArgs{ // Default: pulumi.Int(1), // Minimum: pulumi.Int(1), // Maximum: pulumi.Int(10), // }, // Rules: monitoring.AutoscaleSettingProfileRuleArray{ // &monitoring.AutoscaleSettingProfileRuleArgs{ // MetricTrigger: &monitoring.AutoscaleSettingProfileRuleMetricTriggerArgs{ // MetricName: pulumi.String("Percentage CPU"), // MetricResourceId: exampleLinuxVirtualMachineScaleSet.ID(), // TimeGrain: pulumi.String("PT1M"), // Statistic: pulumi.String("Average"), // TimeWindow: pulumi.String("PT5M"), // TimeAggregation: pulumi.String("Average"), // Operator: pulumi.String("GreaterThan"), // Threshold: pulumi.Float64(75), // MetricNamespace: pulumi.String("microsoft.compute/virtualmachinescalesets"), // Dimensions: monitoring.AutoscaleSettingProfileRuleMetricTriggerDimensionArray{ // &monitoring.AutoscaleSettingProfileRuleMetricTriggerDimensionArgs{ // Name: pulumi.String("AppName"), // Operator: pulumi.String("Equals"), // Values: pulumi.StringArray{ // pulumi.String("App1"), // }, // }, // }, // }, // ScaleAction: &monitoring.AutoscaleSettingProfileRuleScaleActionArgs{ // Direction: pulumi.String("Increase"), // Type: pulumi.String("ChangeCount"), // Value: pulumi.Int(1), // Cooldown: pulumi.String("PT1M"), // }, // }, // &monitoring.AutoscaleSettingProfileRuleArgs{ // MetricTrigger: &monitoring.AutoscaleSettingProfileRuleMetricTriggerArgs{ // MetricName: pulumi.String("Percentage CPU"), // MetricResourceId: exampleLinuxVirtualMachineScaleSet.ID(), // TimeGrain: pulumi.String("PT1M"), // Statistic: pulumi.String("Average"), // TimeWindow: pulumi.String("PT5M"), // TimeAggregation: pulumi.String("Average"), // Operator: pulumi.String("LessThan"), // Threshold: pulumi.Float64(25), // }, // ScaleAction: &monitoring.AutoscaleSettingProfileRuleScaleActionArgs{ // Direction: pulumi.String("Decrease"), // Type: pulumi.String("ChangeCount"), // Value: pulumi.Int(1), // Cooldown: pulumi.String("PT1M"), // }, // }, // }, // }, // }, // Predictive: &monitoring.AutoscaleSettingPredictiveArgs{ // ScaleMode: pulumi.String("Enabled"), // LookAheadTime: pulumi.String("PT5M"), // }, // Notification: &monitoring.AutoscaleSettingNotificationArgs{ // Email: &monitoring.AutoscaleSettingNotificationEmailArgs{ // SendToSubscriptionAdministrator: pulumi.Bool(true), // SendToSubscriptionCoAdministrator: pulumi.Bool(true), // CustomEmails: pulumi.StringArray{ // pulumi.String("admin@contoso.com"), // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Repeating On Weekends) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "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("autoscalingTest"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("acctvn"), // 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("acctsub"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleLinuxVirtualMachineScaleSet, err := compute.NewLinuxVirtualMachineScaleSet(ctx, "example", &compute.LinuxVirtualMachineScaleSetArgs{ // Name: pulumi.String("exampleset"), // Location: example.Location, // ResourceGroupName: example.Name, // UpgradeMode: pulumi.String("Manual"), // Sku: pulumi.String("Standard_F2"), // Instances: pulumi.Int(2), // AdminUsername: pulumi.String("myadmin"), // AdminSshKeys: compute.LinuxVirtualMachineScaleSetAdminSshKeyArray{ // &compute.LinuxVirtualMachineScaleSetAdminSshKeyArgs{ // Username: pulumi.String("myadmin"), // PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDCsTcryUl51Q2VSEHqDRNmceUFo55ZtcIwxl2QITbN1RREti5ml/VTytC0yeBOvnZA4x4CFpdw/lCDPk0yrH9Ei5vVkXmOrExdTlT3qI7YaAzj1tUVlBd4S6LX1F7y6VLActvdHuDDuXZXzCDd/97420jrDfWZqJMlUK/EmCE5ParCeHIRIvmBxcEnGfFIsw8xQZl0HphxWOtJil8qsUWSdMyCiJYYQpMoMliO99X40AUc4/AlsyPyT5ddbKk08YrZ+rKDVHF7o29rh4vi5MmHkVgVQHKiKybWlHq+b71gIAUQk9wrJxD+dqt4igrmDSpIjfjwnd+l5UIn5fJSO5DYV4YT/4hwK7OKmuo7OFHD0WyY5YnkYEMtFgzemnRBdE8ulcT60DQpVgRMXFWHvhyCWy0L6sgj1QWDZlLpvsIvNfHsyhKFMG1frLnMt/nP0+YCcfg+v1JYeCKjeoJxB8DWcRBsjzItY0CGmzP8UYZiYKl/2u+2TgFS5r7NWH11bxoUzjKdaa1NLw+ieA8GlBFfCbfWe6YVB9ggUte4VtYFMZGxOjS2bAiYtfgTKFJv+XqORAwExG6+G2eDxIDyo80/OA9IG7Xv/jwQr7D6KDjDuULFcN/iTxuttoKrHeYz1hf5ZQlBdllwJHYx6fK2g8kha6r2JIQKocvsAXiiONqSfw== hello@world.com"), // }, // }, // NetworkInterfaces: compute.LinuxVirtualMachineScaleSetNetworkInterfaceArray{ // &compute.LinuxVirtualMachineScaleSetNetworkInterfaceArgs{ // Name: pulumi.String("TestNetworkProfile"), // Primary: pulumi.Bool(true), // IpConfigurations: compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArray{ // &compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("TestIPConfiguration"), // Primary: pulumi.Bool(true), // SubnetId: exampleSubnet.ID(), // }, // }, // }, // }, // OsDisk: &compute.LinuxVirtualMachineScaleSetOsDiskArgs{ // Caching: pulumi.String("ReadWrite"), // StorageAccountType: pulumi.String("StandardSSD_LRS"), // }, // SourceImageReference: &compute.LinuxVirtualMachineScaleSetSourceImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // }) // if err != nil { // return err // } // _, err = monitoring.NewAutoscaleSetting(ctx, "example", &monitoring.AutoscaleSettingArgs{ // Name: pulumi.String("myAutoscaleSetting"), // ResourceGroupName: example.Name, // Location: example.Location, // TargetResourceId: exampleLinuxVirtualMachineScaleSet.ID(), // Profiles: monitoring.AutoscaleSettingProfileArray{ // &monitoring.AutoscaleSettingProfileArgs{ // Name: pulumi.String("Weekends"), // Capacity: &monitoring.AutoscaleSettingProfileCapacityArgs{ // Default: pulumi.Int(1), // Minimum: pulumi.Int(1), // Maximum: pulumi.Int(10), // }, // Rules: monitoring.AutoscaleSettingProfileRuleArray{ // &monitoring.AutoscaleSettingProfileRuleArgs{ // MetricTrigger: &monitoring.AutoscaleSettingProfileRuleMetricTriggerArgs{ // MetricName: pulumi.String("Percentage CPU"), // MetricResourceId: exampleLinuxVirtualMachineScaleSet.ID(), // TimeGrain: pulumi.String("PT1M"), // Statistic: pulumi.String("Average"), // TimeWindow: pulumi.String("PT5M"), // TimeAggregation: pulumi.String("Average"), // Operator: pulumi.String("GreaterThan"), // Threshold: pulumi.Float64(90), // }, // ScaleAction: &monitoring.AutoscaleSettingProfileRuleScaleActionArgs{ // Direction: pulumi.String("Increase"), // Type: pulumi.String("ChangeCount"), // Value: pulumi.Int(2), // Cooldown: pulumi.String("PT1M"), // }, // }, // &monitoring.AutoscaleSettingProfileRuleArgs{ // MetricTrigger: &monitoring.AutoscaleSettingProfileRuleMetricTriggerArgs{ // MetricName: pulumi.String("Percentage CPU"), // MetricResourceId: exampleLinuxVirtualMachineScaleSet.ID(), // TimeGrain: pulumi.String("PT1M"), // Statistic: pulumi.String("Average"), // TimeWindow: pulumi.String("PT5M"), // TimeAggregation: pulumi.String("Average"), // Operator: pulumi.String("LessThan"), // Threshold: pulumi.Float64(10), // }, // ScaleAction: &monitoring.AutoscaleSettingProfileRuleScaleActionArgs{ // Direction: pulumi.String("Decrease"), // Type: pulumi.String("ChangeCount"), // Value: pulumi.Int(2), // Cooldown: pulumi.String("PT1M"), // }, // }, // }, // Recurrence: &monitoring.AutoscaleSettingProfileRecurrenceArgs{ // Timezone: pulumi.String("Pacific Standard Time"), // Days: pulumi.StringArray{ // pulumi.String("Saturday"), // pulumi.String("Sunday"), // }, // Hours: pulumi.Int(12), // Minutes: pulumi.Int(0), // }, // }, // }, // Notification: &monitoring.AutoscaleSettingNotificationArgs{ // Email: &monitoring.AutoscaleSettingNotificationEmailArgs{ // SendToSubscriptionAdministrator: pulumi.Bool(true), // SendToSubscriptionCoAdministrator: pulumi.Bool(true), // CustomEmails: pulumi.StringArray{ // pulumi.String("admin@contoso.com"), // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### For Fixed Dates) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "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("autoscalingTest"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("acctvn"), // 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("acctsub"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleLinuxVirtualMachineScaleSet, err := compute.NewLinuxVirtualMachineScaleSet(ctx, "example", &compute.LinuxVirtualMachineScaleSetArgs{ // Name: pulumi.String("exampleset"), // Location: example.Location, // ResourceGroupName: example.Name, // UpgradeMode: pulumi.String("Manual"), // Sku: pulumi.String("Standard_F2"), // Instances: pulumi.Int(2), // AdminUsername: pulumi.String("myadmin"), // AdminSshKeys: compute.LinuxVirtualMachineScaleSetAdminSshKeyArray{ // &compute.LinuxVirtualMachineScaleSetAdminSshKeyArgs{ // Username: pulumi.String("myadmin"), // PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDCsTcryUl51Q2VSEHqDRNmceUFo55ZtcIwxl2QITbN1RREti5ml/VTytC0yeBOvnZA4x4CFpdw/lCDPk0yrH9Ei5vVkXmOrExdTlT3qI7YaAzj1tUVlBd4S6LX1F7y6VLActvdHuDDuXZXzCDd/97420jrDfWZqJMlUK/EmCE5ParCeHIRIvmBxcEnGfFIsw8xQZl0HphxWOtJil8qsUWSdMyCiJYYQpMoMliO99X40AUc4/AlsyPyT5ddbKk08YrZ+rKDVHF7o29rh4vi5MmHkVgVQHKiKybWlHq+b71gIAUQk9wrJxD+dqt4igrmDSpIjfjwnd+l5UIn5fJSO5DYV4YT/4hwK7OKmuo7OFHD0WyY5YnkYEMtFgzemnRBdE8ulcT60DQpVgRMXFWHvhyCWy0L6sgj1QWDZlLpvsIvNfHsyhKFMG1frLnMt/nP0+YCcfg+v1JYeCKjeoJxB8DWcRBsjzItY0CGmzP8UYZiYKl/2u+2TgFS5r7NWH11bxoUzjKdaa1NLw+ieA8GlBFfCbfWe6YVB9ggUte4VtYFMZGxOjS2bAiYtfgTKFJv+XqORAwExG6+G2eDxIDyo80/OA9IG7Xv/jwQr7D6KDjDuULFcN/iTxuttoKrHeYz1hf5ZQlBdllwJHYx6fK2g8kha6r2JIQKocvsAXiiONqSfw== hello@world.com"), // }, // }, // NetworkInterfaces: compute.LinuxVirtualMachineScaleSetNetworkInterfaceArray{ // &compute.LinuxVirtualMachineScaleSetNetworkInterfaceArgs{ // Name: pulumi.String("TestNetworkProfile"), // Primary: pulumi.Bool(true), // IpConfigurations: compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArray{ // &compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("TestIPConfiguration"), // Primary: pulumi.Bool(true), // SubnetId: exampleSubnet.ID(), // }, // }, // }, // }, // OsDisk: &compute.LinuxVirtualMachineScaleSetOsDiskArgs{ // Caching: pulumi.String("ReadWrite"), // StorageAccountType: pulumi.String("StandardSSD_LRS"), // }, // SourceImageReference: &compute.LinuxVirtualMachineScaleSetSourceImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // }) // if err != nil { // return err // } // _, err = monitoring.NewAutoscaleSetting(ctx, "example", &monitoring.AutoscaleSettingArgs{ // Name: pulumi.String("myAutoscaleSetting"), // Enabled: pulumi.Bool(true), // ResourceGroupName: example.Name, // Location: example.Location, // TargetResourceId: exampleLinuxVirtualMachineScaleSet.ID(), // Profiles: monitoring.AutoscaleSettingProfileArray{ // &monitoring.AutoscaleSettingProfileArgs{ // Name: pulumi.String("forJuly"), // Capacity: &monitoring.AutoscaleSettingProfileCapacityArgs{ // Default: pulumi.Int(1), // Minimum: pulumi.Int(1), // Maximum: pulumi.Int(10), // }, // Rules: monitoring.AutoscaleSettingProfileRuleArray{ // &monitoring.AutoscaleSettingProfileRuleArgs{ // MetricTrigger: &monitoring.AutoscaleSettingProfileRuleMetricTriggerArgs{ // MetricName: pulumi.String("Percentage CPU"), // MetricResourceId: exampleLinuxVirtualMachineScaleSet.ID(), // TimeGrain: pulumi.String("PT1M"), // Statistic: pulumi.String("Average"), // TimeWindow: pulumi.String("PT5M"), // TimeAggregation: pulumi.String("Average"), // Operator: pulumi.String("GreaterThan"), // Threshold: pulumi.Float64(90), // }, // ScaleAction: &monitoring.AutoscaleSettingProfileRuleScaleActionArgs{ // Direction: pulumi.String("Increase"), // Type: pulumi.String("ChangeCount"), // Value: pulumi.Int(2), // Cooldown: pulumi.String("PT1M"), // }, // }, // &monitoring.AutoscaleSettingProfileRuleArgs{ // MetricTrigger: &monitoring.AutoscaleSettingProfileRuleMetricTriggerArgs{ // MetricName: pulumi.String("Percentage CPU"), // MetricResourceId: exampleLinuxVirtualMachineScaleSet.ID(), // TimeGrain: pulumi.String("PT1M"), // Statistic: pulumi.String("Average"), // TimeWindow: pulumi.String("PT5M"), // TimeAggregation: pulumi.String("Average"), // Operator: pulumi.String("LessThan"), // Threshold: pulumi.Float64(10), // }, // ScaleAction: &monitoring.AutoscaleSettingProfileRuleScaleActionArgs{ // Direction: pulumi.String("Decrease"), // Type: pulumi.String("ChangeCount"), // Value: pulumi.Int(2), // Cooldown: pulumi.String("PT1M"), // }, // }, // }, // FixedDate: &monitoring.AutoscaleSettingProfileFixedDateArgs{ // Timezone: pulumi.String("Pacific Standard Time"), // Start: pulumi.String("2020-07-01T00:00:00Z"), // End: pulumi.String("2020-07-31T23:59:59Z"), // }, // }, // }, // Notification: &monitoring.AutoscaleSettingNotificationArgs{ // Email: &monitoring.AutoscaleSettingNotificationEmailArgs{ // SendToSubscriptionAdministrator: pulumi.Bool(true), // SendToSubscriptionCoAdministrator: pulumi.Bool(true), // CustomEmails: pulumi.StringArray{ // pulumi.String("admin@contoso.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-10-01 // // ## Import // // AutoScale Setting can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/autoscaleSetting:AutoscaleSetting example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/autoScaleSettings/setting1 // ``` type AutoscaleSetting struct { pulumi.CustomResourceState // Specifies whether automatic scaling is enabled for the target resource. Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // Specifies the supported Azure location where the AutoScale Setting should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the AutoScale Setting. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies a `notification` block as defined below. Notification AutoscaleSettingNotificationPtrOutput `pulumi:"notification"` // A `predictive` block as defined below. Predictive AutoscaleSettingPredictivePtrOutput `pulumi:"predictive"` // Specifies one or more (up to 20) `profile` blocks as defined below. Profiles AutoscaleSettingProfileArrayOutput `pulumi:"profiles"` // The name of the Resource Group in the AutoScale Setting should be created. 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"` // Specifies the resource ID of the resource that the autoscale setting should be added to. Changing this forces a new resource to be created. TargetResourceId pulumi.StringOutput `pulumi:"targetResourceId"` } // NewAutoscaleSetting registers a new resource with the given unique name, arguments, and options. func NewAutoscaleSetting(ctx *pulumi.Context, name string, args *AutoscaleSettingArgs, opts ...pulumi.ResourceOption) (*AutoscaleSetting, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Profiles == nil { return nil, errors.New("invalid value for required argument 'Profiles'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.TargetResourceId == nil { return nil, errors.New("invalid value for required argument 'TargetResourceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AutoscaleSetting err := ctx.RegisterResource("azure:monitoring/autoscaleSetting:AutoscaleSetting", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAutoscaleSetting gets an existing AutoscaleSetting 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 GetAutoscaleSetting(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AutoscaleSettingState, opts ...pulumi.ResourceOption) (*AutoscaleSetting, error) { var resource AutoscaleSetting err := ctx.ReadResource("azure:monitoring/autoscaleSetting:AutoscaleSetting", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AutoscaleSetting resources. type autoscaleSettingState struct { // Specifies whether automatic scaling is enabled for the target resource. Defaults to `true`. Enabled *bool `pulumi:"enabled"` // Specifies the supported Azure location where the AutoScale Setting should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the AutoScale Setting. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies a `notification` block as defined below. Notification *AutoscaleSettingNotification `pulumi:"notification"` // A `predictive` block as defined below. Predictive *AutoscaleSettingPredictive `pulumi:"predictive"` // Specifies one or more (up to 20) `profile` blocks as defined below. Profiles []AutoscaleSettingProfile `pulumi:"profiles"` // The name of the Resource Group in the AutoScale Setting should be created. 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"` // Specifies the resource ID of the resource that the autoscale setting should be added to. Changing this forces a new resource to be created. TargetResourceId *string `pulumi:"targetResourceId"` } type AutoscaleSettingState struct { // Specifies whether automatic scaling is enabled for the target resource. Defaults to `true`. Enabled pulumi.BoolPtrInput // Specifies the supported Azure location where the AutoScale Setting should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the AutoScale Setting. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies a `notification` block as defined below. Notification AutoscaleSettingNotificationPtrInput // A `predictive` block as defined below. Predictive AutoscaleSettingPredictivePtrInput // Specifies one or more (up to 20) `profile` blocks as defined below. Profiles AutoscaleSettingProfileArrayInput // The name of the Resource Group in the AutoScale Setting should be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the resource ID of the resource that the autoscale setting should be added to. Changing this forces a new resource to be created. TargetResourceId pulumi.StringPtrInput } func (AutoscaleSettingState) ElementType() reflect.Type { return reflect.TypeOf((*autoscaleSettingState)(nil)).Elem() } type autoscaleSettingArgs struct { // Specifies whether automatic scaling is enabled for the target resource. Defaults to `true`. Enabled *bool `pulumi:"enabled"` // Specifies the supported Azure location where the AutoScale Setting should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the AutoScale Setting. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies a `notification` block as defined below. Notification *AutoscaleSettingNotification `pulumi:"notification"` // A `predictive` block as defined below. Predictive *AutoscaleSettingPredictive `pulumi:"predictive"` // Specifies one or more (up to 20) `profile` blocks as defined below. Profiles []AutoscaleSettingProfile `pulumi:"profiles"` // The name of the Resource Group in the AutoScale Setting should be created. 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"` // Specifies the resource ID of the resource that the autoscale setting should be added to. Changing this forces a new resource to be created. TargetResourceId string `pulumi:"targetResourceId"` } // The set of arguments for constructing a AutoscaleSetting resource. type AutoscaleSettingArgs struct { // Specifies whether automatic scaling is enabled for the target resource. Defaults to `true`. Enabled pulumi.BoolPtrInput // Specifies the supported Azure location where the AutoScale Setting should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the AutoScale Setting. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies a `notification` block as defined below. Notification AutoscaleSettingNotificationPtrInput // A `predictive` block as defined below. Predictive AutoscaleSettingPredictivePtrInput // Specifies one or more (up to 20) `profile` blocks as defined below. Profiles AutoscaleSettingProfileArrayInput // The name of the Resource Group in the AutoScale Setting should be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the resource ID of the resource that the autoscale setting should be added to. Changing this forces a new resource to be created. TargetResourceId pulumi.StringInput } func (AutoscaleSettingArgs) ElementType() reflect.Type { return reflect.TypeOf((*autoscaleSettingArgs)(nil)).Elem() } type AutoscaleSettingInput interface { pulumi.Input ToAutoscaleSettingOutput() AutoscaleSettingOutput ToAutoscaleSettingOutputWithContext(ctx context.Context) AutoscaleSettingOutput } func (*AutoscaleSetting) ElementType() reflect.Type { return reflect.TypeOf((**AutoscaleSetting)(nil)).Elem() } func (i *AutoscaleSetting) ToAutoscaleSettingOutput() AutoscaleSettingOutput { return i.ToAutoscaleSettingOutputWithContext(context.Background()) } func (i *AutoscaleSetting) ToAutoscaleSettingOutputWithContext(ctx context.Context) AutoscaleSettingOutput { return pulumi.ToOutputWithContext(ctx, i).(AutoscaleSettingOutput) } // AutoscaleSettingArrayInput is an input type that accepts AutoscaleSettingArray and AutoscaleSettingArrayOutput values. // You can construct a concrete instance of `AutoscaleSettingArrayInput` via: // // AutoscaleSettingArray{ AutoscaleSettingArgs{...} } type AutoscaleSettingArrayInput interface { pulumi.Input ToAutoscaleSettingArrayOutput() AutoscaleSettingArrayOutput ToAutoscaleSettingArrayOutputWithContext(context.Context) AutoscaleSettingArrayOutput } type AutoscaleSettingArray []AutoscaleSettingInput func (AutoscaleSettingArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AutoscaleSetting)(nil)).Elem() } func (i AutoscaleSettingArray) ToAutoscaleSettingArrayOutput() AutoscaleSettingArrayOutput {
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/monitoring/activityLogAlert.go
sdk/go/azure/monitoring/activityLogAlert.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 monitoring import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Activity Log Alert within Azure 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/monitoring" // "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 // } // main, err := monitoring.NewActionGroup(ctx, "main", &monitoring.ActionGroupArgs{ // Name: pulumi.String("example-actiongroup"), // ResourceGroupName: example.Name, // ShortName: pulumi.String("p0action"), // WebhookReceivers: monitoring.ActionGroupWebhookReceiverArray{ // &monitoring.ActionGroupWebhookReceiverArgs{ // Name: pulumi.String("callmyapi"), // ServiceUri: pulumi.String("http://example.com/alert"), // }, // }, // }) // if err != nil { // return err // } // toMonitor, err := storage.NewAccount(ctx, "to_monitor", &storage.AccountArgs{ // Name: pulumi.String("examplesa"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("GRS"), // }) // if err != nil { // return err // } // _, err = monitoring.NewActivityLogAlert(ctx, "main", &monitoring.ActivityLogAlertArgs{ // Name: pulumi.String("example-activitylogalert"), // ResourceGroupName: example.Name, // Location: example.Location, // Scopes: pulumi.StringArray{ // example.ID(), // }, // Description: pulumi.String("This alert will monitor a specific storage account updates."), // Criteria: &monitoring.ActivityLogAlertCriteriaArgs{ // ResourceId: toMonitor.ID(), // OperationName: pulumi.String("Microsoft.Storage/storageAccounts/write"), // Category: pulumi.String("Recommendation"), // }, // Actions: monitoring.ActivityLogAlertActionArray{ // &monitoring.ActivityLogAlertActionArgs{ // ActionGroupId: main.ID(), // WebhookProperties: pulumi.StringMap{ // "from": pulumi.String("source"), // }, // }, // }, // }) // 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-10-01 // // ## Import // // Activity log alerts can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/activityLogAlert:ActivityLogAlert example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/activityLogAlerts/myalertname // ``` type ActivityLogAlert struct { pulumi.CustomResourceState // One or more `action` blocks as defined below. Actions ActivityLogAlertActionArrayOutput `pulumi:"actions"` // A `criteria` block as defined below. Criteria ActivityLogAlertCriteriaOutput `pulumi:"criteria"` // The description of this activity log alert. Description pulumi.StringPtrOutput `pulumi:"description"` // Should this Activity Log Alert be enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // The Azure Region where the activity log alert rule should exist. Possible values are `global`, `westeurope`, `northeurope`, and `eastus2euap`. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the activity log alert. 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 activity log alert instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The Scope at which the Activity Log should be applied. A list of strings which could be a resource group , or a subscription, or a resource ID (such as a Storage Account). Scopes pulumi.StringArrayOutput `pulumi:"scopes"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewActivityLogAlert registers a new resource with the given unique name, arguments, and options. func NewActivityLogAlert(ctx *pulumi.Context, name string, args *ActivityLogAlertArgs, opts ...pulumi.ResourceOption) (*ActivityLogAlert, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Criteria == nil { return nil, errors.New("invalid value for required argument 'Criteria'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Scopes == nil { return nil, errors.New("invalid value for required argument 'Scopes'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ActivityLogAlert err := ctx.RegisterResource("azure:monitoring/activityLogAlert:ActivityLogAlert", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetActivityLogAlert gets an existing ActivityLogAlert 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 GetActivityLogAlert(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ActivityLogAlertState, opts ...pulumi.ResourceOption) (*ActivityLogAlert, error) { var resource ActivityLogAlert err := ctx.ReadResource("azure:monitoring/activityLogAlert:ActivityLogAlert", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ActivityLogAlert resources. type activityLogAlertState struct { // One or more `action` blocks as defined below. Actions []ActivityLogAlertAction `pulumi:"actions"` // A `criteria` block as defined below. Criteria *ActivityLogAlertCriteria `pulumi:"criteria"` // The description of this activity log alert. Description *string `pulumi:"description"` // Should this Activity Log Alert be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The Azure Region where the activity log alert rule should exist. Possible values are `global`, `westeurope`, `northeurope`, and `eastus2euap`. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the activity log alert. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the activity log alert instance. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The Scope at which the Activity Log should be applied. A list of strings which could be a resource group , or a subscription, or a resource ID (such as a Storage Account). Scopes []string `pulumi:"scopes"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } type ActivityLogAlertState struct { // One or more `action` blocks as defined below. Actions ActivityLogAlertActionArrayInput // A `criteria` block as defined below. Criteria ActivityLogAlertCriteriaPtrInput // The description of this activity log alert. Description pulumi.StringPtrInput // Should this Activity Log Alert be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The Azure Region where the activity log alert rule should exist. Possible values are `global`, `westeurope`, `northeurope`, and `eastus2euap`. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the activity log alert. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the activity log alert instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The Scope at which the Activity Log should be applied. A list of strings which could be a resource group , or a subscription, or a resource ID (such as a Storage Account). Scopes pulumi.StringArrayInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (ActivityLogAlertState) ElementType() reflect.Type { return reflect.TypeOf((*activityLogAlertState)(nil)).Elem() } type activityLogAlertArgs struct { // One or more `action` blocks as defined below. Actions []ActivityLogAlertAction `pulumi:"actions"` // A `criteria` block as defined below. Criteria ActivityLogAlertCriteria `pulumi:"criteria"` // The description of this activity log alert. Description *string `pulumi:"description"` // Should this Activity Log Alert be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The Azure Region where the activity log alert rule should exist. Possible values are `global`, `westeurope`, `northeurope`, and `eastus2euap`. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the activity log alert. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the activity log alert instance. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The Scope at which the Activity Log should be applied. A list of strings which could be a resource group , or a subscription, or a resource ID (such as a Storage Account). Scopes []string `pulumi:"scopes"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a ActivityLogAlert resource. type ActivityLogAlertArgs struct { // One or more `action` blocks as defined below. Actions ActivityLogAlertActionArrayInput // A `criteria` block as defined below. Criteria ActivityLogAlertCriteriaInput // The description of this activity log alert. Description pulumi.StringPtrInput // Should this Activity Log Alert be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The Azure Region where the activity log alert rule should exist. Possible values are `global`, `westeurope`, `northeurope`, and `eastus2euap`. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the activity log alert. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the activity log alert instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The Scope at which the Activity Log should be applied. A list of strings which could be a resource group , or a subscription, or a resource ID (such as a Storage Account). Scopes pulumi.StringArrayInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (ActivityLogAlertArgs) ElementType() reflect.Type { return reflect.TypeOf((*activityLogAlertArgs)(nil)).Elem() } type ActivityLogAlertInput interface { pulumi.Input ToActivityLogAlertOutput() ActivityLogAlertOutput ToActivityLogAlertOutputWithContext(ctx context.Context) ActivityLogAlertOutput } func (*ActivityLogAlert) ElementType() reflect.Type { return reflect.TypeOf((**ActivityLogAlert)(nil)).Elem() } func (i *ActivityLogAlert) ToActivityLogAlertOutput() ActivityLogAlertOutput { return i.ToActivityLogAlertOutputWithContext(context.Background()) } func (i *ActivityLogAlert) ToActivityLogAlertOutputWithContext(ctx context.Context) ActivityLogAlertOutput { return pulumi.ToOutputWithContext(ctx, i).(ActivityLogAlertOutput) } // ActivityLogAlertArrayInput is an input type that accepts ActivityLogAlertArray and ActivityLogAlertArrayOutput values. // You can construct a concrete instance of `ActivityLogAlertArrayInput` via: // // ActivityLogAlertArray{ ActivityLogAlertArgs{...} } type ActivityLogAlertArrayInput interface { pulumi.Input ToActivityLogAlertArrayOutput() ActivityLogAlertArrayOutput ToActivityLogAlertArrayOutputWithContext(context.Context) ActivityLogAlertArrayOutput } type ActivityLogAlertArray []ActivityLogAlertInput func (ActivityLogAlertArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ActivityLogAlert)(nil)).Elem() } func (i ActivityLogAlertArray) ToActivityLogAlertArrayOutput() ActivityLogAlertArrayOutput { return i.ToActivityLogAlertArrayOutputWithContext(context.Background()) } func (i ActivityLogAlertArray) ToActivityLogAlertArrayOutputWithContext(ctx context.Context) ActivityLogAlertArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ActivityLogAlertArrayOutput) } // ActivityLogAlertMapInput is an input type that accepts ActivityLogAlertMap and ActivityLogAlertMapOutput values. // You can construct a concrete instance of `ActivityLogAlertMapInput` via: // // ActivityLogAlertMap{ "key": ActivityLogAlertArgs{...} } type ActivityLogAlertMapInput interface { pulumi.Input ToActivityLogAlertMapOutput() ActivityLogAlertMapOutput ToActivityLogAlertMapOutputWithContext(context.Context) ActivityLogAlertMapOutput } type ActivityLogAlertMap map[string]ActivityLogAlertInput func (ActivityLogAlertMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ActivityLogAlert)(nil)).Elem() } func (i ActivityLogAlertMap) ToActivityLogAlertMapOutput() ActivityLogAlertMapOutput { return i.ToActivityLogAlertMapOutputWithContext(context.Background()) } func (i ActivityLogAlertMap) ToActivityLogAlertMapOutputWithContext(ctx context.Context) ActivityLogAlertMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ActivityLogAlertMapOutput) } type ActivityLogAlertOutput struct{ *pulumi.OutputState } func (ActivityLogAlertOutput) ElementType() reflect.Type { return reflect.TypeOf((**ActivityLogAlert)(nil)).Elem() } func (o ActivityLogAlertOutput) ToActivityLogAlertOutput() ActivityLogAlertOutput { return o } func (o ActivityLogAlertOutput) ToActivityLogAlertOutputWithContext(ctx context.Context) ActivityLogAlertOutput { return o } // One or more `action` blocks as defined below. func (o ActivityLogAlertOutput) Actions() ActivityLogAlertActionArrayOutput { return o.ApplyT(func(v *ActivityLogAlert) ActivityLogAlertActionArrayOutput { return v.Actions }).(ActivityLogAlertActionArrayOutput) } // A `criteria` block as defined below. func (o ActivityLogAlertOutput) Criteria() ActivityLogAlertCriteriaOutput { return o.ApplyT(func(v *ActivityLogAlert) ActivityLogAlertCriteriaOutput { return v.Criteria }).(ActivityLogAlertCriteriaOutput) } // The description of this activity log alert. func (o ActivityLogAlertOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *ActivityLogAlert) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Should this Activity Log Alert be enabled? Defaults to `true`. func (o ActivityLogAlertOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ActivityLogAlert) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // The Azure Region where the activity log alert rule should exist. Possible values are `global`, `westeurope`, `northeurope`, and `eastus2euap`. Changing this forces a new resource to be created. func (o ActivityLogAlertOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ActivityLogAlert) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the activity log alert. Changing this forces a new resource to be created. func (o ActivityLogAlertOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ActivityLogAlert) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the activity log alert instance. Changing this forces a new resource to be created. func (o ActivityLogAlertOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ActivityLogAlert) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The Scope at which the Activity Log should be applied. A list of strings which could be a resource group , or a subscription, or a resource ID (such as a Storage Account). func (o ActivityLogAlertOutput) Scopes() pulumi.StringArrayOutput { return o.ApplyT(func(v *ActivityLogAlert) pulumi.StringArrayOutput { return v.Scopes }).(pulumi.StringArrayOutput) } // A mapping of tags to assign to the resource. func (o ActivityLogAlertOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ActivityLogAlert) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type ActivityLogAlertArrayOutput struct{ *pulumi.OutputState } func (ActivityLogAlertArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ActivityLogAlert)(nil)).Elem() } func (o ActivityLogAlertArrayOutput) ToActivityLogAlertArrayOutput() ActivityLogAlertArrayOutput { return o } func (o ActivityLogAlertArrayOutput) ToActivityLogAlertArrayOutputWithContext(ctx context.Context) ActivityLogAlertArrayOutput { return o } func (o ActivityLogAlertArrayOutput) Index(i pulumi.IntInput) ActivityLogAlertOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ActivityLogAlert { return vs[0].([]*ActivityLogAlert)[vs[1].(int)] }).(ActivityLogAlertOutput) } type ActivityLogAlertMapOutput struct{ *pulumi.OutputState } func (ActivityLogAlertMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ActivityLogAlert)(nil)).Elem() } func (o ActivityLogAlertMapOutput) ToActivityLogAlertMapOutput() ActivityLogAlertMapOutput { return o } func (o ActivityLogAlertMapOutput) ToActivityLogAlertMapOutputWithContext(ctx context.Context) ActivityLogAlertMapOutput { return o } func (o ActivityLogAlertMapOutput) MapIndex(k pulumi.StringInput) ActivityLogAlertOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ActivityLogAlert { return vs[0].(map[string]*ActivityLogAlert)[vs[1].(string)] }).(ActivityLogAlertOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ActivityLogAlertInput)(nil)).Elem(), &ActivityLogAlert{}) pulumi.RegisterInputType(reflect.TypeOf((*ActivityLogAlertArrayInput)(nil)).Elem(), ActivityLogAlertArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ActivityLogAlertMapInput)(nil)).Elem(), ActivityLogAlertMap{}) pulumi.RegisterOutputType(ActivityLogAlertOutput{}) pulumi.RegisterOutputType(ActivityLogAlertArrayOutput{}) pulumi.RegisterOutputType(ActivityLogAlertMapOutput{}) }
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/monitoring/actionGroup.go
sdk/go/azure/monitoring/actionGroup.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 monitoring import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Action Group within Azure Monitor. // // ## Example Usage // // ```go // package main // // import ( // // "fmt" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "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("monitoring-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{ // Name: pulumi.String("workspace-01"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = monitoring.NewActionGroup(ctx, "example", &monitoring.ActionGroupArgs{ // Name: pulumi.String("CriticalAlertsAction"), // ResourceGroupName: example.Name, // ShortName: pulumi.String("p0action"), // ArmRoleReceivers: monitoring.ActionGroupArmRoleReceiverArray{ // &monitoring.ActionGroupArmRoleReceiverArgs{ // Name: pulumi.String("armroleaction"), // RoleId: pulumi.String("de139f84-1756-47ae-9be6-808fbbe84772"), // UseCommonAlertSchema: pulumi.Bool(true), // }, // }, // AutomationRunbookReceivers: monitoring.ActionGroupAutomationRunbookReceiverArray{ // &monitoring.ActionGroupAutomationRunbookReceiverArgs{ // Name: pulumi.String("action_name_1"), // AutomationAccountId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-runbooks/providers/Microsoft.Automation/automationAccounts/aaa001"), // RunbookName: pulumi.String("my runbook"), // WebhookResourceId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-runbooks/providers/Microsoft.Automation/automationAccounts/aaa001/webHooks/webhook_alert"), // IsGlobalRunbook: pulumi.Bool(true), // ServiceUri: pulumi.String("https://s13events.azure-automation.net/webhooks?token=randomtoken"), // UseCommonAlertSchema: pulumi.Bool(true), // }, // }, // AzureAppPushReceivers: monitoring.ActionGroupAzureAppPushReceiverArray{ // &monitoring.ActionGroupAzureAppPushReceiverArgs{ // Name: pulumi.String("pushtoadmin"), // EmailAddress: pulumi.String("admin@contoso.com"), // }, // }, // AzureFunctionReceivers: monitoring.ActionGroupAzureFunctionReceiverArray{ // &monitoring.ActionGroupAzureFunctionReceiverArgs{ // Name: pulumi.String("funcaction"), // FunctionAppResourceId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-funcapp/providers/Microsoft.Web/sites/funcapp"), // FunctionName: pulumi.String("myfunc"), // HttpTriggerUrl: pulumi.String("https://example.com/trigger"), // UseCommonAlertSchema: pulumi.Bool(true), // }, // }, // EmailReceivers: monitoring.ActionGroupEmailReceiverArray{ // &monitoring.ActionGroupEmailReceiverArgs{ // Name: pulumi.String("sendtoadmin"), // EmailAddress: pulumi.String("admin@contoso.com"), // }, // &monitoring.ActionGroupEmailReceiverArgs{ // Name: pulumi.String("sendtodevops"), // EmailAddress: pulumi.String("devops@contoso.com"), // UseCommonAlertSchema: pulumi.Bool(true), // }, // }, // EventHubReceivers: monitoring.ActionGroupEventHubReceiverArray{ // &monitoring.ActionGroupEventHubReceiverArgs{ // Name: pulumi.String("sendtoeventhub"), // EventHubNamespace: pulumi.String("eventhubnamespace"), // EventHubName: pulumi.String("eventhub1"), // SubscriptionId: pulumi.String("00000000-0000-0000-0000-000000000000"), // UseCommonAlertSchema: pulumi.Bool(false), // }, // }, // ItsmReceivers: monitoring.ActionGroupItsmReceiverArray{ // &monitoring.ActionGroupItsmReceiverArgs{ // Name: pulumi.String("createorupdateticket"), // WorkspaceId: exampleAnalyticsWorkspace.WorkspaceId.ApplyT(func(workspaceId string) (string, error) { // return fmt.Sprintf("%v|%v", current.SubscriptionId, workspaceId), nil // }).(pulumi.StringOutput), // ConnectionId: pulumi.String("53de6956-42b4-41ba-be3c-b154cdf17b13"), // TicketConfiguration: pulumi.String("{\"PayloadRevision\":0,\"WorkItemType\":\"Incident\",\"UseTemplate\":false,\"WorkItemData\":\"{}\",\"CreateOneWIPerCI\":false}"), // Region: pulumi.String("southcentralus"), // }, // }, // LogicAppReceivers: monitoring.ActionGroupLogicAppReceiverArray{ // &monitoring.ActionGroupLogicAppReceiverArgs{ // Name: pulumi.String("logicappaction"), // ResourceId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-logicapp/providers/Microsoft.Logic/workflows/logicapp"), // CallbackUrl: pulumi.String("https://logicapptriggerurl/..."), // UseCommonAlertSchema: pulumi.Bool(true), // }, // }, // SmsReceivers: monitoring.ActionGroupSmsReceiverArray{ // &monitoring.ActionGroupSmsReceiverArgs{ // Name: pulumi.String("oncallmsg"), // CountryCode: pulumi.String("1"), // PhoneNumber: pulumi.String("1231231234"), // }, // }, // VoiceReceivers: monitoring.ActionGroupVoiceReceiverArray{ // &monitoring.ActionGroupVoiceReceiverArgs{ // Name: pulumi.String("remotesupport"), // CountryCode: pulumi.String("86"), // PhoneNumber: pulumi.String("13888888888"), // }, // }, // WebhookReceivers: monitoring.ActionGroupWebhookReceiverArray{ // &monitoring.ActionGroupWebhookReceiverArgs{ // Name: pulumi.String("callmyapiaswell"), // ServiceUri: pulumi.String("http://example.com/alert"), // UseCommonAlertSchema: 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.Insights` - 2023-01-01 // // ## Import // // Action Groups can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/actionGroup:ActionGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/actionGroups/myagname // ``` type ActionGroup struct { pulumi.CustomResourceState // One or more `armRoleReceiver` blocks as defined below. ArmRoleReceivers ActionGroupArmRoleReceiverArrayOutput `pulumi:"armRoleReceivers"` // One or more `automationRunbookReceiver` blocks as defined below. AutomationRunbookReceivers ActionGroupAutomationRunbookReceiverArrayOutput `pulumi:"automationRunbookReceivers"` // One or more `azureAppPushReceiver` blocks as defined below. AzureAppPushReceivers ActionGroupAzureAppPushReceiverArrayOutput `pulumi:"azureAppPushReceivers"` // One or more `azureFunctionReceiver` blocks as defined below. AzureFunctionReceivers ActionGroupAzureFunctionReceiverArrayOutput `pulumi:"azureFunctionReceivers"` // One or more `emailReceiver` blocks as defined below. EmailReceivers ActionGroupEmailReceiverArrayOutput `pulumi:"emailReceivers"` // Whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // One or more `eventHubReceiver` blocks as defined below. EventHubReceivers ActionGroupEventHubReceiverArrayOutput `pulumi:"eventHubReceivers"` // One or more `itsmReceiver` blocks as defined below. ItsmReceivers ActionGroupItsmReceiverArrayOutput `pulumi:"itsmReceivers"` // The Azure Region where the Action Group should exist. Changing this forces a new Action Group to be created. Defaults to `global`. Location pulumi.StringOutput `pulumi:"location"` // One or more `logicAppReceiver` blocks as defined below. LogicAppReceivers ActionGroupLogicAppReceiverArrayOutput `pulumi:"logicAppReceivers"` // The name of the Action Group. 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 Action Group instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The short name of the action group. This will be used in SMS messages. ShortName pulumi.StringOutput `pulumi:"shortName"` // One or more `smsReceiver` blocks as defined below. SmsReceivers ActionGroupSmsReceiverArrayOutput `pulumi:"smsReceivers"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // One or more `voiceReceiver` blocks as defined below. VoiceReceivers ActionGroupVoiceReceiverArrayOutput `pulumi:"voiceReceivers"` // One or more `webhookReceiver` blocks as defined below. WebhookReceivers ActionGroupWebhookReceiverArrayOutput `pulumi:"webhookReceivers"` } // NewActionGroup registers a new resource with the given unique name, arguments, and options. func NewActionGroup(ctx *pulumi.Context, name string, args *ActionGroupArgs, opts ...pulumi.ResourceOption) (*ActionGroup, 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.ShortName == nil { return nil, errors.New("invalid value for required argument 'ShortName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ActionGroup err := ctx.RegisterResource("azure:monitoring/actionGroup:ActionGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetActionGroup gets an existing ActionGroup 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 GetActionGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ActionGroupState, opts ...pulumi.ResourceOption) (*ActionGroup, error) { var resource ActionGroup err := ctx.ReadResource("azure:monitoring/actionGroup:ActionGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ActionGroup resources. type actionGroupState struct { // One or more `armRoleReceiver` blocks as defined below. ArmRoleReceivers []ActionGroupArmRoleReceiver `pulumi:"armRoleReceivers"` // One or more `automationRunbookReceiver` blocks as defined below. AutomationRunbookReceivers []ActionGroupAutomationRunbookReceiver `pulumi:"automationRunbookReceivers"` // One or more `azureAppPushReceiver` blocks as defined below. AzureAppPushReceivers []ActionGroupAzureAppPushReceiver `pulumi:"azureAppPushReceivers"` // One or more `azureFunctionReceiver` blocks as defined below. AzureFunctionReceivers []ActionGroupAzureFunctionReceiver `pulumi:"azureFunctionReceivers"` // One or more `emailReceiver` blocks as defined below. EmailReceivers []ActionGroupEmailReceiver `pulumi:"emailReceivers"` // Whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. Defaults to `true`. Enabled *bool `pulumi:"enabled"` // One or more `eventHubReceiver` blocks as defined below. EventHubReceivers []ActionGroupEventHubReceiver `pulumi:"eventHubReceivers"` // One or more `itsmReceiver` blocks as defined below. ItsmReceivers []ActionGroupItsmReceiver `pulumi:"itsmReceivers"` // The Azure Region where the Action Group should exist. Changing this forces a new Action Group to be created. Defaults to `global`. Location *string `pulumi:"location"` // One or more `logicAppReceiver` blocks as defined below. LogicAppReceivers []ActionGroupLogicAppReceiver `pulumi:"logicAppReceivers"` // The name of the Action Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Action Group instance. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The short name of the action group. This will be used in SMS messages. ShortName *string `pulumi:"shortName"` // One or more `smsReceiver` blocks as defined below. SmsReceivers []ActionGroupSmsReceiver `pulumi:"smsReceivers"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // One or more `voiceReceiver` blocks as defined below. VoiceReceivers []ActionGroupVoiceReceiver `pulumi:"voiceReceivers"` // One or more `webhookReceiver` blocks as defined below. WebhookReceivers []ActionGroupWebhookReceiver `pulumi:"webhookReceivers"` } type ActionGroupState struct { // One or more `armRoleReceiver` blocks as defined below. ArmRoleReceivers ActionGroupArmRoleReceiverArrayInput // One or more `automationRunbookReceiver` blocks as defined below. AutomationRunbookReceivers ActionGroupAutomationRunbookReceiverArrayInput // One or more `azureAppPushReceiver` blocks as defined below. AzureAppPushReceivers ActionGroupAzureAppPushReceiverArrayInput // One or more `azureFunctionReceiver` blocks as defined below. AzureFunctionReceivers ActionGroupAzureFunctionReceiverArrayInput // One or more `emailReceiver` blocks as defined below. EmailReceivers ActionGroupEmailReceiverArrayInput // Whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. Defaults to `true`. Enabled pulumi.BoolPtrInput // One or more `eventHubReceiver` blocks as defined below. EventHubReceivers ActionGroupEventHubReceiverArrayInput // One or more `itsmReceiver` blocks as defined below. ItsmReceivers ActionGroupItsmReceiverArrayInput // The Azure Region where the Action Group should exist. Changing this forces a new Action Group to be created. Defaults to `global`. Location pulumi.StringPtrInput // One or more `logicAppReceiver` blocks as defined below. LogicAppReceivers ActionGroupLogicAppReceiverArrayInput // The name of the Action Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Action Group instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The short name of the action group. This will be used in SMS messages. ShortName pulumi.StringPtrInput // One or more `smsReceiver` blocks as defined below. SmsReceivers ActionGroupSmsReceiverArrayInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // One or more `voiceReceiver` blocks as defined below. VoiceReceivers ActionGroupVoiceReceiverArrayInput // One or more `webhookReceiver` blocks as defined below. WebhookReceivers ActionGroupWebhookReceiverArrayInput } func (ActionGroupState) ElementType() reflect.Type { return reflect.TypeOf((*actionGroupState)(nil)).Elem() } type actionGroupArgs struct { // One or more `armRoleReceiver` blocks as defined below. ArmRoleReceivers []ActionGroupArmRoleReceiver `pulumi:"armRoleReceivers"` // One or more `automationRunbookReceiver` blocks as defined below. AutomationRunbookReceivers []ActionGroupAutomationRunbookReceiver `pulumi:"automationRunbookReceivers"` // One or more `azureAppPushReceiver` blocks as defined below. AzureAppPushReceivers []ActionGroupAzureAppPushReceiver `pulumi:"azureAppPushReceivers"` // One or more `azureFunctionReceiver` blocks as defined below. AzureFunctionReceivers []ActionGroupAzureFunctionReceiver `pulumi:"azureFunctionReceivers"` // One or more `emailReceiver` blocks as defined below. EmailReceivers []ActionGroupEmailReceiver `pulumi:"emailReceivers"` // Whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. Defaults to `true`. Enabled *bool `pulumi:"enabled"` // One or more `eventHubReceiver` blocks as defined below. EventHubReceivers []ActionGroupEventHubReceiver `pulumi:"eventHubReceivers"` // One or more `itsmReceiver` blocks as defined below. ItsmReceivers []ActionGroupItsmReceiver `pulumi:"itsmReceivers"` // The Azure Region where the Action Group should exist. Changing this forces a new Action Group to be created. Defaults to `global`. Location *string `pulumi:"location"` // One or more `logicAppReceiver` blocks as defined below. LogicAppReceivers []ActionGroupLogicAppReceiver `pulumi:"logicAppReceivers"` // The name of the Action Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Action Group instance. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The short name of the action group. This will be used in SMS messages. ShortName string `pulumi:"shortName"` // One or more `smsReceiver` blocks as defined below. SmsReceivers []ActionGroupSmsReceiver `pulumi:"smsReceivers"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // One or more `voiceReceiver` blocks as defined below. VoiceReceivers []ActionGroupVoiceReceiver `pulumi:"voiceReceivers"` // One or more `webhookReceiver` blocks as defined below. WebhookReceivers []ActionGroupWebhookReceiver `pulumi:"webhookReceivers"` } // The set of arguments for constructing a ActionGroup resource. type ActionGroupArgs struct { // One or more `armRoleReceiver` blocks as defined below. ArmRoleReceivers ActionGroupArmRoleReceiverArrayInput // One or more `automationRunbookReceiver` blocks as defined below. AutomationRunbookReceivers ActionGroupAutomationRunbookReceiverArrayInput // One or more `azureAppPushReceiver` blocks as defined below. AzureAppPushReceivers ActionGroupAzureAppPushReceiverArrayInput // One or more `azureFunctionReceiver` blocks as defined below. AzureFunctionReceivers ActionGroupAzureFunctionReceiverArrayInput // One or more `emailReceiver` blocks as defined below. EmailReceivers ActionGroupEmailReceiverArrayInput // Whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. Defaults to `true`. Enabled pulumi.BoolPtrInput // One or more `eventHubReceiver` blocks as defined below. EventHubReceivers ActionGroupEventHubReceiverArrayInput // One or more `itsmReceiver` blocks as defined below. ItsmReceivers ActionGroupItsmReceiverArrayInput // The Azure Region where the Action Group should exist. Changing this forces a new Action Group to be created. Defaults to `global`. Location pulumi.StringPtrInput // One or more `logicAppReceiver` blocks as defined below. LogicAppReceivers ActionGroupLogicAppReceiverArrayInput // The name of the Action Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Action Group instance. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The short name of the action group. This will be used in SMS messages. ShortName pulumi.StringInput // One or more `smsReceiver` blocks as defined below. SmsReceivers ActionGroupSmsReceiverArrayInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // One or more `voiceReceiver` blocks as defined below. VoiceReceivers ActionGroupVoiceReceiverArrayInput // One or more `webhookReceiver` blocks as defined below. WebhookReceivers ActionGroupWebhookReceiverArrayInput } func (ActionGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*actionGroupArgs)(nil)).Elem() } type ActionGroupInput interface { pulumi.Input ToActionGroupOutput() ActionGroupOutput ToActionGroupOutputWithContext(ctx context.Context) ActionGroupOutput } func (*ActionGroup) ElementType() reflect.Type { return reflect.TypeOf((**ActionGroup)(nil)).Elem() } func (i *ActionGroup) ToActionGroupOutput() ActionGroupOutput { return i.ToActionGroupOutputWithContext(context.Background()) } func (i *ActionGroup) ToActionGroupOutputWithContext(ctx context.Context) ActionGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(ActionGroupOutput) } // ActionGroupArrayInput is an input type that accepts ActionGroupArray and ActionGroupArrayOutput values. // You can construct a concrete instance of `ActionGroupArrayInput` via: // // ActionGroupArray{ ActionGroupArgs{...} } type ActionGroupArrayInput interface { pulumi.Input ToActionGroupArrayOutput() ActionGroupArrayOutput ToActionGroupArrayOutputWithContext(context.Context) ActionGroupArrayOutput } type ActionGroupArray []ActionGroupInput func (ActionGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ActionGroup)(nil)).Elem() } func (i ActionGroupArray) ToActionGroupArrayOutput() ActionGroupArrayOutput { return i.ToActionGroupArrayOutputWithContext(context.Background()) } func (i ActionGroupArray) ToActionGroupArrayOutputWithContext(ctx context.Context) ActionGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ActionGroupArrayOutput) } // ActionGroupMapInput is an input type that accepts ActionGroupMap and ActionGroupMapOutput values. // You can construct a concrete instance of `ActionGroupMapInput` via: // // ActionGroupMap{ "key": ActionGroupArgs{...} } type ActionGroupMapInput interface { pulumi.Input ToActionGroupMapOutput() ActionGroupMapOutput ToActionGroupMapOutputWithContext(context.Context) ActionGroupMapOutput } type ActionGroupMap map[string]ActionGroupInput func (ActionGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ActionGroup)(nil)).Elem() } func (i ActionGroupMap) ToActionGroupMapOutput() ActionGroupMapOutput { return i.ToActionGroupMapOutputWithContext(context.Background()) } func (i ActionGroupMap) ToActionGroupMapOutputWithContext(ctx context.Context) ActionGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ActionGroupMapOutput) } type ActionGroupOutput struct{ *pulumi.OutputState } func (ActionGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**ActionGroup)(nil)).Elem() } func (o ActionGroupOutput) ToActionGroupOutput() ActionGroupOutput { return o } func (o ActionGroupOutput) ToActionGroupOutputWithContext(ctx context.Context) ActionGroupOutput { return o } // One or more `armRoleReceiver` blocks as defined below. func (o ActionGroupOutput) ArmRoleReceivers() ActionGroupArmRoleReceiverArrayOutput { return o.ApplyT(func(v *ActionGroup) ActionGroupArmRoleReceiverArrayOutput { return v.ArmRoleReceivers }).(ActionGroupArmRoleReceiverArrayOutput) } // One or more `automationRunbookReceiver` blocks as defined below. func (o ActionGroupOutput) AutomationRunbookReceivers() ActionGroupAutomationRunbookReceiverArrayOutput { return o.ApplyT(func(v *ActionGroup) ActionGroupAutomationRunbookReceiverArrayOutput { return v.AutomationRunbookReceivers }).(ActionGroupAutomationRunbookReceiverArrayOutput) } // One or more `azureAppPushReceiver` blocks as defined below. func (o ActionGroupOutput) AzureAppPushReceivers() ActionGroupAzureAppPushReceiverArrayOutput { return o.ApplyT(func(v *ActionGroup) ActionGroupAzureAppPushReceiverArrayOutput { return v.AzureAppPushReceivers }).(ActionGroupAzureAppPushReceiverArrayOutput) } // One or more `azureFunctionReceiver` blocks as defined below. func (o ActionGroupOutput) AzureFunctionReceivers() ActionGroupAzureFunctionReceiverArrayOutput { return o.ApplyT(func(v *ActionGroup) ActionGroupAzureFunctionReceiverArrayOutput { return v.AzureFunctionReceivers }).(ActionGroupAzureFunctionReceiverArrayOutput) } // One or more `emailReceiver` blocks as defined below. func (o ActionGroupOutput) EmailReceivers() ActionGroupEmailReceiverArrayOutput { return o.ApplyT(func(v *ActionGroup) ActionGroupEmailReceiverArrayOutput { return v.EmailReceivers }).(ActionGroupEmailReceiverArrayOutput) } // Whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. Defaults to `true`. func (o ActionGroupOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ActionGroup) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // One or more `eventHubReceiver` blocks as defined below. func (o ActionGroupOutput) EventHubReceivers() ActionGroupEventHubReceiverArrayOutput { return o.ApplyT(func(v *ActionGroup) ActionGroupEventHubReceiverArrayOutput { return v.EventHubReceivers }).(ActionGroupEventHubReceiverArrayOutput) } // One or more `itsmReceiver` blocks as defined below. func (o ActionGroupOutput) ItsmReceivers() ActionGroupItsmReceiverArrayOutput { return o.ApplyT(func(v *ActionGroup) ActionGroupItsmReceiverArrayOutput { return v.ItsmReceivers }).(ActionGroupItsmReceiverArrayOutput) } // The Azure Region where the Action Group should exist. Changing this forces a new Action Group to be created. Defaults to `global`. func (o ActionGroupOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ActionGroup) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // One or more `logicAppReceiver` blocks as defined below. func (o ActionGroupOutput) LogicAppReceivers() ActionGroupLogicAppReceiverArrayOutput { return o.ApplyT(func(v *ActionGroup) ActionGroupLogicAppReceiverArrayOutput { return v.LogicAppReceivers }).(ActionGroupLogicAppReceiverArrayOutput) } // The name of the Action Group. Changing this forces a new resource to be created. func (o ActionGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ActionGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the Action Group instance. Changing this forces a new resource to be created. func (o ActionGroupOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ActionGroup) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The short name of the action group. This will be used in SMS messages. func (o ActionGroupOutput) ShortName() pulumi.StringOutput { return o.ApplyT(func(v *ActionGroup) pulumi.StringOutput { return v.ShortName }).(pulumi.StringOutput) } // One or more `smsReceiver` blocks as defined below. func (o ActionGroupOutput) SmsReceivers() ActionGroupSmsReceiverArrayOutput { return o.ApplyT(func(v *ActionGroup) ActionGroupSmsReceiverArrayOutput { return v.SmsReceivers }).(ActionGroupSmsReceiverArrayOutput) } // A mapping of tags to assign to the resource. func (o ActionGroupOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ActionGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // One or more `voiceReceiver` blocks as defined below. func (o ActionGroupOutput) VoiceReceivers() ActionGroupVoiceReceiverArrayOutput { return o.ApplyT(func(v *ActionGroup) ActionGroupVoiceReceiverArrayOutput { return v.VoiceReceivers }).(ActionGroupVoiceReceiverArrayOutput) } // One or more `webhookReceiver` blocks as defined below. func (o ActionGroupOutput) WebhookReceivers() ActionGroupWebhookReceiverArrayOutput { return o.ApplyT(func(v *ActionGroup) ActionGroupWebhookReceiverArrayOutput { return v.WebhookReceivers }).(ActionGroupWebhookReceiverArrayOutput) } type ActionGroupArrayOutput struct{ *pulumi.OutputState } func (ActionGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ActionGroup)(nil)).Elem() } func (o ActionGroupArrayOutput) ToActionGroupArrayOutput() ActionGroupArrayOutput { return o } func (o ActionGroupArrayOutput) ToActionGroupArrayOutputWithContext(ctx context.Context) ActionGroupArrayOutput { return o } func (o ActionGroupArrayOutput) Index(i pulumi.IntInput) ActionGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ActionGroup { return vs[0].([]*ActionGroup)[vs[1].(int)] }).(ActionGroupOutput) } type ActionGroupMapOutput struct{ *pulumi.OutputState } func (ActionGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ActionGroup)(nil)).Elem() } func (o ActionGroupMapOutput) ToActionGroupMapOutput() ActionGroupMapOutput { return o } func (o ActionGroupMapOutput) ToActionGroupMapOutputWithContext(ctx context.Context) ActionGroupMapOutput { return o } func (o ActionGroupMapOutput) MapIndex(k pulumi.StringInput) ActionGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ActionGroup { return vs[0].(map[string]*ActionGroup)[vs[1].(string)] }).(ActionGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ActionGroupInput)(nil)).Elem(), &ActionGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*ActionGroupArrayInput)(nil)).Elem(), ActionGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ActionGroupMapInput)(nil)).Elem(), ActionGroupMap{}) pulumi.RegisterOutputType(ActionGroupOutput{}) pulumi.RegisterOutputType(ActionGroupArrayOutput{}) pulumi.RegisterOutputType(ActionGroupMapOutput{}) }
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/monitoring/getScheduledQueryRulesLog.go
sdk/go/azure/monitoring/getScheduledQueryRulesLog.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 monitoring 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 the properties of a LogToMetricAction scheduled query rule. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := monitoring.LookupScheduledQueryRulesLog(ctx, &monitoring.LookupScheduledQueryRulesLogArgs{ // ResourceGroupName: "example-rg", // Name: "tfex-queryrule", // }, nil) // if err != nil { // return err // } // ctx.Export("queryRuleId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Insights` - 2018-04-16 func LookupScheduledQueryRulesLog(ctx *pulumi.Context, args *LookupScheduledQueryRulesLogArgs, opts ...pulumi.InvokeOption) (*LookupScheduledQueryRulesLogResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupScheduledQueryRulesLogResult err := ctx.Invoke("azure:monitoring/getScheduledQueryRulesLog:getScheduledQueryRulesLog", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getScheduledQueryRulesLog. type LookupScheduledQueryRulesLogArgs struct { // Specifies the name of the scheduled query rule. Name string `pulumi:"name"` // Specifies the name of the resource group where the scheduled query rule is located. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getScheduledQueryRulesLog. type LookupScheduledQueryRulesLogResult struct { // A list of IDs of Resources referred into query. AuthorizedResourceIds []string `pulumi:"authorizedResourceIds"` // A `criteria` block as defined below. Criterias []GetScheduledQueryRulesLogCriteria `pulumi:"criterias"` // The resource URI over which log search query is to be run. DataSourceId string `pulumi:"dataSourceId"` // The description of the scheduled query rule. Description string `pulumi:"description"` // Whether this scheduled query rule is enabled. Enabled bool `pulumi:"enabled"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // Specifies the Azure Region where the resource should exist. Location string `pulumi:"location"` // Name of the dimension. Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` Tags map[string]string `pulumi:"tags"` } func LookupScheduledQueryRulesLogOutput(ctx *pulumi.Context, args LookupScheduledQueryRulesLogOutputArgs, opts ...pulumi.InvokeOption) LookupScheduledQueryRulesLogResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupScheduledQueryRulesLogResultOutput, error) { args := v.(LookupScheduledQueryRulesLogArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:monitoring/getScheduledQueryRulesLog:getScheduledQueryRulesLog", args, LookupScheduledQueryRulesLogResultOutput{}, options).(LookupScheduledQueryRulesLogResultOutput), nil }).(LookupScheduledQueryRulesLogResultOutput) } // A collection of arguments for invoking getScheduledQueryRulesLog. type LookupScheduledQueryRulesLogOutputArgs struct { // Specifies the name of the scheduled query rule. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group where the scheduled query rule is located. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupScheduledQueryRulesLogOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupScheduledQueryRulesLogArgs)(nil)).Elem() } // A collection of values returned by getScheduledQueryRulesLog. type LookupScheduledQueryRulesLogResultOutput struct{ *pulumi.OutputState } func (LookupScheduledQueryRulesLogResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupScheduledQueryRulesLogResult)(nil)).Elem() } func (o LookupScheduledQueryRulesLogResultOutput) ToLookupScheduledQueryRulesLogResultOutput() LookupScheduledQueryRulesLogResultOutput { return o } func (o LookupScheduledQueryRulesLogResultOutput) ToLookupScheduledQueryRulesLogResultOutputWithContext(ctx context.Context) LookupScheduledQueryRulesLogResultOutput { return o } // A list of IDs of Resources referred into query. func (o LookupScheduledQueryRulesLogResultOutput) AuthorizedResourceIds() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupScheduledQueryRulesLogResult) []string { return v.AuthorizedResourceIds }).(pulumi.StringArrayOutput) } // A `criteria` block as defined below. func (o LookupScheduledQueryRulesLogResultOutput) Criterias() GetScheduledQueryRulesLogCriteriaArrayOutput { return o.ApplyT(func(v LookupScheduledQueryRulesLogResult) []GetScheduledQueryRulesLogCriteria { return v.Criterias }).(GetScheduledQueryRulesLogCriteriaArrayOutput) } // The resource URI over which log search query is to be run. func (o LookupScheduledQueryRulesLogResultOutput) DataSourceId() pulumi.StringOutput { return o.ApplyT(func(v LookupScheduledQueryRulesLogResult) string { return v.DataSourceId }).(pulumi.StringOutput) } // The description of the scheduled query rule. func (o LookupScheduledQueryRulesLogResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v LookupScheduledQueryRulesLogResult) string { return v.Description }).(pulumi.StringOutput) } // Whether this scheduled query rule is enabled. func (o LookupScheduledQueryRulesLogResultOutput) Enabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupScheduledQueryRulesLogResult) bool { return v.Enabled }).(pulumi.BoolOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupScheduledQueryRulesLogResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupScheduledQueryRulesLogResult) string { return v.Id }).(pulumi.StringOutput) } // Specifies the Azure Region where the resource should exist. func (o LookupScheduledQueryRulesLogResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupScheduledQueryRulesLogResult) string { return v.Location }).(pulumi.StringOutput) } // Name of the dimension. func (o LookupScheduledQueryRulesLogResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupScheduledQueryRulesLogResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupScheduledQueryRulesLogResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupScheduledQueryRulesLogResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func (o LookupScheduledQueryRulesLogResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupScheduledQueryRulesLogResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupScheduledQueryRulesLogResultOutput{}) }
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/monitoring/getActionGroup.go
sdk/go/azure/monitoring/getActionGroup.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 monitoring 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 the properties of an Action Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := monitoring.LookupActionGroup(ctx, &monitoring.LookupActionGroupArgs{ // ResourceGroupName: "example-rg", // Name: "tfex-actiongroup", // }, nil) // if err != nil { // return err // } // ctx.Export("actionGroupId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Insights` - 2023-01-01 func LookupActionGroup(ctx *pulumi.Context, args *LookupActionGroupArgs, opts ...pulumi.InvokeOption) (*LookupActionGroupResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupActionGroupResult err := ctx.Invoke("azure:monitoring/getActionGroup:getActionGroup", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getActionGroup. type LookupActionGroupArgs struct { // Specifies the name of the Action Group. Name string `pulumi:"name"` // Specifies the name of the resource group the Action Group is located in. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getActionGroup. type LookupActionGroupResult struct { // One or more `armRoleReceiver` blocks as defined below. ArmRoleReceivers []GetActionGroupArmRoleReceiver `pulumi:"armRoleReceivers"` // One or more `automationRunbookReceiver` blocks as defined below. AutomationRunbookReceivers []GetActionGroupAutomationRunbookReceiver `pulumi:"automationRunbookReceivers"` // One or more `azureAppPushReceiver` blocks as defined below. AzureAppPushReceivers []GetActionGroupAzureAppPushReceiver `pulumi:"azureAppPushReceivers"` // One or more `azureFunctionReceiver` blocks as defined below. AzureFunctionReceivers []GetActionGroupAzureFunctionReceiver `pulumi:"azureFunctionReceivers"` // One or more `emailReceiver` blocks as defined below. EmailReceivers []GetActionGroupEmailReceiver `pulumi:"emailReceivers"` // Whether this action group is enabled. Enabled bool `pulumi:"enabled"` // One or more `eventHubReceiver` blocks as defined below. EventHubReceivers []GetActionGroupEventHubReceiver `pulumi:"eventHubReceivers"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // One or more `itsmReceiver` blocks as defined below. ItsmReceivers []GetActionGroupItsmReceiver `pulumi:"itsmReceivers"` // One or more `logicAppReceiver` blocks as defined below. LogicAppReceivers []GetActionGroupLogicAppReceiver `pulumi:"logicAppReceivers"` // The name of the webhook receiver. Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // The short name of the action group. ShortName string `pulumi:"shortName"` // One or more `smsReceiver` blocks as defined below. SmsReceivers []GetActionGroupSmsReceiver `pulumi:"smsReceivers"` // One or more `voiceReceiver` blocks as defined below. VoiceReceivers []GetActionGroupVoiceReceiver `pulumi:"voiceReceivers"` // One or more `webhookReceiver` blocks as defined below. WebhookReceivers []GetActionGroupWebhookReceiver `pulumi:"webhookReceivers"` } func LookupActionGroupOutput(ctx *pulumi.Context, args LookupActionGroupOutputArgs, opts ...pulumi.InvokeOption) LookupActionGroupResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupActionGroupResultOutput, error) { args := v.(LookupActionGroupArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:monitoring/getActionGroup:getActionGroup", args, LookupActionGroupResultOutput{}, options).(LookupActionGroupResultOutput), nil }).(LookupActionGroupResultOutput) } // A collection of arguments for invoking getActionGroup. type LookupActionGroupOutputArgs struct { // Specifies the name of the Action Group. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group the Action Group is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupActionGroupOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupActionGroupArgs)(nil)).Elem() } // A collection of values returned by getActionGroup. type LookupActionGroupResultOutput struct{ *pulumi.OutputState } func (LookupActionGroupResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupActionGroupResult)(nil)).Elem() } func (o LookupActionGroupResultOutput) ToLookupActionGroupResultOutput() LookupActionGroupResultOutput { return o } func (o LookupActionGroupResultOutput) ToLookupActionGroupResultOutputWithContext(ctx context.Context) LookupActionGroupResultOutput { return o } // One or more `armRoleReceiver` blocks as defined below. func (o LookupActionGroupResultOutput) ArmRoleReceivers() GetActionGroupArmRoleReceiverArrayOutput { return o.ApplyT(func(v LookupActionGroupResult) []GetActionGroupArmRoleReceiver { return v.ArmRoleReceivers }).(GetActionGroupArmRoleReceiverArrayOutput) } // One or more `automationRunbookReceiver` blocks as defined below. func (o LookupActionGroupResultOutput) AutomationRunbookReceivers() GetActionGroupAutomationRunbookReceiverArrayOutput { return o.ApplyT(func(v LookupActionGroupResult) []GetActionGroupAutomationRunbookReceiver { return v.AutomationRunbookReceivers }).(GetActionGroupAutomationRunbookReceiverArrayOutput) } // One or more `azureAppPushReceiver` blocks as defined below. func (o LookupActionGroupResultOutput) AzureAppPushReceivers() GetActionGroupAzureAppPushReceiverArrayOutput { return o.ApplyT(func(v LookupActionGroupResult) []GetActionGroupAzureAppPushReceiver { return v.AzureAppPushReceivers }).(GetActionGroupAzureAppPushReceiverArrayOutput) } // One or more `azureFunctionReceiver` blocks as defined below. func (o LookupActionGroupResultOutput) AzureFunctionReceivers() GetActionGroupAzureFunctionReceiverArrayOutput { return o.ApplyT(func(v LookupActionGroupResult) []GetActionGroupAzureFunctionReceiver { return v.AzureFunctionReceivers }).(GetActionGroupAzureFunctionReceiverArrayOutput) } // One or more `emailReceiver` blocks as defined below. func (o LookupActionGroupResultOutput) EmailReceivers() GetActionGroupEmailReceiverArrayOutput { return o.ApplyT(func(v LookupActionGroupResult) []GetActionGroupEmailReceiver { return v.EmailReceivers }).(GetActionGroupEmailReceiverArrayOutput) } // Whether this action group is enabled. func (o LookupActionGroupResultOutput) Enabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupActionGroupResult) bool { return v.Enabled }).(pulumi.BoolOutput) } // One or more `eventHubReceiver` blocks as defined below. func (o LookupActionGroupResultOutput) EventHubReceivers() GetActionGroupEventHubReceiverArrayOutput { return o.ApplyT(func(v LookupActionGroupResult) []GetActionGroupEventHubReceiver { return v.EventHubReceivers }).(GetActionGroupEventHubReceiverArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupActionGroupResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupActionGroupResult) string { return v.Id }).(pulumi.StringOutput) } // One or more `itsmReceiver` blocks as defined below. func (o LookupActionGroupResultOutput) ItsmReceivers() GetActionGroupItsmReceiverArrayOutput { return o.ApplyT(func(v LookupActionGroupResult) []GetActionGroupItsmReceiver { return v.ItsmReceivers }).(GetActionGroupItsmReceiverArrayOutput) } // One or more `logicAppReceiver` blocks as defined below. func (o LookupActionGroupResultOutput) LogicAppReceivers() GetActionGroupLogicAppReceiverArrayOutput { return o.ApplyT(func(v LookupActionGroupResult) []GetActionGroupLogicAppReceiver { return v.LogicAppReceivers }).(GetActionGroupLogicAppReceiverArrayOutput) } // The name of the webhook receiver. func (o LookupActionGroupResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupActionGroupResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupActionGroupResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupActionGroupResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The short name of the action group. func (o LookupActionGroupResultOutput) ShortName() pulumi.StringOutput { return o.ApplyT(func(v LookupActionGroupResult) string { return v.ShortName }).(pulumi.StringOutput) } // One or more `smsReceiver` blocks as defined below. func (o LookupActionGroupResultOutput) SmsReceivers() GetActionGroupSmsReceiverArrayOutput { return o.ApplyT(func(v LookupActionGroupResult) []GetActionGroupSmsReceiver { return v.SmsReceivers }).(GetActionGroupSmsReceiverArrayOutput) } // One or more `voiceReceiver` blocks as defined below. func (o LookupActionGroupResultOutput) VoiceReceivers() GetActionGroupVoiceReceiverArrayOutput { return o.ApplyT(func(v LookupActionGroupResult) []GetActionGroupVoiceReceiver { return v.VoiceReceivers }).(GetActionGroupVoiceReceiverArrayOutput) } // One or more `webhookReceiver` blocks as defined below. func (o LookupActionGroupResultOutput) WebhookReceivers() GetActionGroupWebhookReceiverArrayOutput { return o.ApplyT(func(v LookupActionGroupResult) []GetActionGroupWebhookReceiver { return v.WebhookReceivers }).(GetActionGroupWebhookReceiverArrayOutput) } func init() { pulumi.RegisterOutputType(LookupActionGroupResultOutput{}) }
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/monitoring/diagnosticSetting.go
sdk/go/azure/monitoring/diagnosticSetting.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 monitoring import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Diagnostic Setting for an existing Resource. // // ## 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/monitoring" // "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("storageaccountname"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("examplekeyvault"), // Location: example.Location, // ResourceGroupName: example.Name, // TenantId: pulumi.String(current.TenantId), // SoftDeleteRetentionDays: pulumi.Int(7), // PurgeProtectionEnabled: pulumi.Bool(false), // SkuName: pulumi.String("standard"), // }) // if err != nil { // return err // } // _, err = monitoring.NewDiagnosticSetting(ctx, "example", &monitoring.DiagnosticSettingArgs{ // Name: pulumi.String("example"), // TargetResourceId: exampleKeyVault.ID(), // StorageAccountId: exampleAccount.ID(), // EnabledLogs: monitoring.DiagnosticSettingEnabledLogArray{ // &monitoring.DiagnosticSettingEnabledLogArgs{ // Category: pulumi.String("AuditEvent"), // }, // }, // EnabledMetrics: monitoring.DiagnosticSettingEnabledMetricArray{ // &monitoring.DiagnosticSettingEnabledMetricArgs{ // Category: pulumi.String("AllMetrics"), // }, // }, // }) // 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` - 2021-05-01-preview // // ## Import // // Diagnostic Settings can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/diagnosticSetting:DiagnosticSetting example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.KeyVault/vaults/vault1|logMonitoring1" // ``` type DiagnosticSetting struct { pulumi.CustomResourceState // One or more `enabledLog` blocks as defined below. // // > **Note:** At least one `enabledLog` or `enabledMetric` block must be specified. At least one type of Log or Metric must be enabled. EnabledLogs DiagnosticSettingEnabledLogArrayOutput `pulumi:"enabledLogs"` // One or more `enabledMetric` blocks as defined below. // // > **Note:** At least one `enabledLog` or `enabledMetric` block must be specified. EnabledMetrics DiagnosticSettingEnabledMetricArrayOutput `pulumi:"enabledMetrics"` // Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. // // > **NOTE:** This can be sourced from the `eventhub.EventHubNamespaceAuthorizationRule` resource and is different from a `eventhub.AuthorizationRule` resource. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. EventhubAuthorizationRuleId pulumi.StringPtrOutput `pulumi:"eventhubAuthorizationRuleId"` // Specifies the name of the Event Hub where Diagnostics Data should be sent. // // > **NOTE:** If this isn't specified then the default Event Hub will be used. EventhubName pulumi.StringPtrOutput `pulumi:"eventhubName"` // Possible values are `AzureDiagnostics` and `Dedicated`. When set to `Dedicated`, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy `AzureDiagnostics` table. // // > **NOTE:** This setting will only have an effect if a `logAnalyticsWorkspaceId` is provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see [resource types](https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/azurediagnostics#resource-types) for services that use each method. Please [see the documentation](https://docs.microsoft.com/azure/azure-monitor/platform/diagnostic-logs-stream-log-store#azure-diagnostics-vs-resource-specific) for details on the differences between destination types. LogAnalyticsDestinationType pulumi.StringOutput `pulumi:"logAnalyticsDestinationType"` // Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. LogAnalyticsWorkspaceId pulumi.StringPtrOutput `pulumi:"logAnalyticsWorkspaceId"` // Deprecated: `metric` has been deprecated in favor of the `enabledMetric` property and will be removed in v5.0 of the AzureRM provider Metrics DiagnosticSettingMetricArrayOutput `pulumi:"metrics"` // Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. // // > **NOTE:** If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. Name pulumi.StringOutput `pulumi:"name"` // The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, [click to learn more about partner integration](https://learn.microsoft.com/en-us/azure/partner-solutions/overview). // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. PartnerSolutionId pulumi.StringPtrOutput `pulumi:"partnerSolutionId"` // The ID of the Storage Account where logs should be sent. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. StorageAccountId pulumi.StringPtrOutput `pulumi:"storageAccountId"` // The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created. TargetResourceId pulumi.StringOutput `pulumi:"targetResourceId"` } // NewDiagnosticSetting registers a new resource with the given unique name, arguments, and options. func NewDiagnosticSetting(ctx *pulumi.Context, name string, args *DiagnosticSettingArgs, opts ...pulumi.ResourceOption) (*DiagnosticSetting, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.TargetResourceId == nil { return nil, errors.New("invalid value for required argument 'TargetResourceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DiagnosticSetting err := ctx.RegisterResource("azure:monitoring/diagnosticSetting:DiagnosticSetting", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDiagnosticSetting gets an existing DiagnosticSetting 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 GetDiagnosticSetting(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DiagnosticSettingState, opts ...pulumi.ResourceOption) (*DiagnosticSetting, error) { var resource DiagnosticSetting err := ctx.ReadResource("azure:monitoring/diagnosticSetting:DiagnosticSetting", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DiagnosticSetting resources. type diagnosticSettingState struct { // One or more `enabledLog` blocks as defined below. // // > **Note:** At least one `enabledLog` or `enabledMetric` block must be specified. At least one type of Log or Metric must be enabled. EnabledLogs []DiagnosticSettingEnabledLog `pulumi:"enabledLogs"` // One or more `enabledMetric` blocks as defined below. // // > **Note:** At least one `enabledLog` or `enabledMetric` block must be specified. EnabledMetrics []DiagnosticSettingEnabledMetric `pulumi:"enabledMetrics"` // Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. // // > **NOTE:** This can be sourced from the `eventhub.EventHubNamespaceAuthorizationRule` resource and is different from a `eventhub.AuthorizationRule` resource. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. EventhubAuthorizationRuleId *string `pulumi:"eventhubAuthorizationRuleId"` // Specifies the name of the Event Hub where Diagnostics Data should be sent. // // > **NOTE:** If this isn't specified then the default Event Hub will be used. EventhubName *string `pulumi:"eventhubName"` // Possible values are `AzureDiagnostics` and `Dedicated`. When set to `Dedicated`, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy `AzureDiagnostics` table. // // > **NOTE:** This setting will only have an effect if a `logAnalyticsWorkspaceId` is provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see [resource types](https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/azurediagnostics#resource-types) for services that use each method. Please [see the documentation](https://docs.microsoft.com/azure/azure-monitor/platform/diagnostic-logs-stream-log-store#azure-diagnostics-vs-resource-specific) for details on the differences between destination types. LogAnalyticsDestinationType *string `pulumi:"logAnalyticsDestinationType"` // Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // Deprecated: `metric` has been deprecated in favor of the `enabledMetric` property and will be removed in v5.0 of the AzureRM provider Metrics []DiagnosticSettingMetric `pulumi:"metrics"` // Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. // // > **NOTE:** If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. Name *string `pulumi:"name"` // The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, [click to learn more about partner integration](https://learn.microsoft.com/en-us/azure/partner-solutions/overview). // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. PartnerSolutionId *string `pulumi:"partnerSolutionId"` // The ID of the Storage Account where logs should be sent. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. StorageAccountId *string `pulumi:"storageAccountId"` // The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created. TargetResourceId *string `pulumi:"targetResourceId"` } type DiagnosticSettingState struct { // One or more `enabledLog` blocks as defined below. // // > **Note:** At least one `enabledLog` or `enabledMetric` block must be specified. At least one type of Log or Metric must be enabled. EnabledLogs DiagnosticSettingEnabledLogArrayInput // One or more `enabledMetric` blocks as defined below. // // > **Note:** At least one `enabledLog` or `enabledMetric` block must be specified. EnabledMetrics DiagnosticSettingEnabledMetricArrayInput // Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. // // > **NOTE:** This can be sourced from the `eventhub.EventHubNamespaceAuthorizationRule` resource and is different from a `eventhub.AuthorizationRule` resource. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. EventhubAuthorizationRuleId pulumi.StringPtrInput // Specifies the name of the Event Hub where Diagnostics Data should be sent. // // > **NOTE:** If this isn't specified then the default Event Hub will be used. EventhubName pulumi.StringPtrInput // Possible values are `AzureDiagnostics` and `Dedicated`. When set to `Dedicated`, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy `AzureDiagnostics` table. // // > **NOTE:** This setting will only have an effect if a `logAnalyticsWorkspaceId` is provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see [resource types](https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/azurediagnostics#resource-types) for services that use each method. Please [see the documentation](https://docs.microsoft.com/azure/azure-monitor/platform/diagnostic-logs-stream-log-store#azure-diagnostics-vs-resource-specific) for details on the differences between destination types. LogAnalyticsDestinationType pulumi.StringPtrInput // Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. LogAnalyticsWorkspaceId pulumi.StringPtrInput // Deprecated: `metric` has been deprecated in favor of the `enabledMetric` property and will be removed in v5.0 of the AzureRM provider Metrics DiagnosticSettingMetricArrayInput // Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. // // > **NOTE:** If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. Name pulumi.StringPtrInput // The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, [click to learn more about partner integration](https://learn.microsoft.com/en-us/azure/partner-solutions/overview). // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. PartnerSolutionId pulumi.StringPtrInput // The ID of the Storage Account where logs should be sent. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. StorageAccountId pulumi.StringPtrInput // The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created. TargetResourceId pulumi.StringPtrInput } func (DiagnosticSettingState) ElementType() reflect.Type { return reflect.TypeOf((*diagnosticSettingState)(nil)).Elem() } type diagnosticSettingArgs struct { // One or more `enabledLog` blocks as defined below. // // > **Note:** At least one `enabledLog` or `enabledMetric` block must be specified. At least one type of Log or Metric must be enabled. EnabledLogs []DiagnosticSettingEnabledLog `pulumi:"enabledLogs"` // One or more `enabledMetric` blocks as defined below. // // > **Note:** At least one `enabledLog` or `enabledMetric` block must be specified. EnabledMetrics []DiagnosticSettingEnabledMetric `pulumi:"enabledMetrics"` // Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. // // > **NOTE:** This can be sourced from the `eventhub.EventHubNamespaceAuthorizationRule` resource and is different from a `eventhub.AuthorizationRule` resource. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. EventhubAuthorizationRuleId *string `pulumi:"eventhubAuthorizationRuleId"` // Specifies the name of the Event Hub where Diagnostics Data should be sent. // // > **NOTE:** If this isn't specified then the default Event Hub will be used. EventhubName *string `pulumi:"eventhubName"` // Possible values are `AzureDiagnostics` and `Dedicated`. When set to `Dedicated`, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy `AzureDiagnostics` table. // // > **NOTE:** This setting will only have an effect if a `logAnalyticsWorkspaceId` is provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see [resource types](https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/azurediagnostics#resource-types) for services that use each method. Please [see the documentation](https://docs.microsoft.com/azure/azure-monitor/platform/diagnostic-logs-stream-log-store#azure-diagnostics-vs-resource-specific) for details on the differences between destination types. LogAnalyticsDestinationType *string `pulumi:"logAnalyticsDestinationType"` // Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // Deprecated: `metric` has been deprecated in favor of the `enabledMetric` property and will be removed in v5.0 of the AzureRM provider Metrics []DiagnosticSettingMetric `pulumi:"metrics"` // Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. // // > **NOTE:** If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. Name *string `pulumi:"name"` // The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, [click to learn more about partner integration](https://learn.microsoft.com/en-us/azure/partner-solutions/overview). // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. PartnerSolutionId *string `pulumi:"partnerSolutionId"` // The ID of the Storage Account where logs should be sent. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. StorageAccountId *string `pulumi:"storageAccountId"` // The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created. TargetResourceId string `pulumi:"targetResourceId"` } // The set of arguments for constructing a DiagnosticSetting resource. type DiagnosticSettingArgs struct { // One or more `enabledLog` blocks as defined below. // // > **Note:** At least one `enabledLog` or `enabledMetric` block must be specified. At least one type of Log or Metric must be enabled. EnabledLogs DiagnosticSettingEnabledLogArrayInput // One or more `enabledMetric` blocks as defined below. // // > **Note:** At least one `enabledLog` or `enabledMetric` block must be specified. EnabledMetrics DiagnosticSettingEnabledMetricArrayInput // Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. // // > **NOTE:** This can be sourced from the `eventhub.EventHubNamespaceAuthorizationRule` resource and is different from a `eventhub.AuthorizationRule` resource. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. EventhubAuthorizationRuleId pulumi.StringPtrInput // Specifies the name of the Event Hub where Diagnostics Data should be sent. // // > **NOTE:** If this isn't specified then the default Event Hub will be used. EventhubName pulumi.StringPtrInput // Possible values are `AzureDiagnostics` and `Dedicated`. When set to `Dedicated`, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy `AzureDiagnostics` table. // // > **NOTE:** This setting will only have an effect if a `logAnalyticsWorkspaceId` is provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see [resource types](https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/azurediagnostics#resource-types) for services that use each method. Please [see the documentation](https://docs.microsoft.com/azure/azure-monitor/platform/diagnostic-logs-stream-log-store#azure-diagnostics-vs-resource-specific) for details on the differences between destination types. LogAnalyticsDestinationType pulumi.StringPtrInput // Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. LogAnalyticsWorkspaceId pulumi.StringPtrInput // Deprecated: `metric` has been deprecated in favor of the `enabledMetric` property and will be removed in v5.0 of the AzureRM provider Metrics DiagnosticSettingMetricArrayInput // Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. // // > **NOTE:** If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. Name pulumi.StringPtrInput // The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, [click to learn more about partner integration](https://learn.microsoft.com/en-us/azure/partner-solutions/overview). // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. PartnerSolutionId pulumi.StringPtrInput // The ID of the Storage Account where logs should be sent. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. StorageAccountId pulumi.StringPtrInput // The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created. TargetResourceId pulumi.StringInput } func (DiagnosticSettingArgs) ElementType() reflect.Type { return reflect.TypeOf((*diagnosticSettingArgs)(nil)).Elem() } type DiagnosticSettingInput interface { pulumi.Input ToDiagnosticSettingOutput() DiagnosticSettingOutput ToDiagnosticSettingOutputWithContext(ctx context.Context) DiagnosticSettingOutput } func (*DiagnosticSetting) ElementType() reflect.Type { return reflect.TypeOf((**DiagnosticSetting)(nil)).Elem() } func (i *DiagnosticSetting) ToDiagnosticSettingOutput() DiagnosticSettingOutput { return i.ToDiagnosticSettingOutputWithContext(context.Background()) } func (i *DiagnosticSetting) ToDiagnosticSettingOutputWithContext(ctx context.Context) DiagnosticSettingOutput { return pulumi.ToOutputWithContext(ctx, i).(DiagnosticSettingOutput) } // DiagnosticSettingArrayInput is an input type that accepts DiagnosticSettingArray and DiagnosticSettingArrayOutput values. // You can construct a concrete instance of `DiagnosticSettingArrayInput` via: // // DiagnosticSettingArray{ DiagnosticSettingArgs{...} } type DiagnosticSettingArrayInput interface { pulumi.Input ToDiagnosticSettingArrayOutput() DiagnosticSettingArrayOutput ToDiagnosticSettingArrayOutputWithContext(context.Context) DiagnosticSettingArrayOutput } type DiagnosticSettingArray []DiagnosticSettingInput func (DiagnosticSettingArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DiagnosticSetting)(nil)).Elem() } func (i DiagnosticSettingArray) ToDiagnosticSettingArrayOutput() DiagnosticSettingArrayOutput { return i.ToDiagnosticSettingArrayOutputWithContext(context.Background()) } func (i DiagnosticSettingArray) ToDiagnosticSettingArrayOutputWithContext(ctx context.Context) DiagnosticSettingArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DiagnosticSettingArrayOutput) } // DiagnosticSettingMapInput is an input type that accepts DiagnosticSettingMap and DiagnosticSettingMapOutput values. // You can construct a concrete instance of `DiagnosticSettingMapInput` via: // // DiagnosticSettingMap{ "key": DiagnosticSettingArgs{...} } type DiagnosticSettingMapInput interface { pulumi.Input ToDiagnosticSettingMapOutput() DiagnosticSettingMapOutput ToDiagnosticSettingMapOutputWithContext(context.Context) DiagnosticSettingMapOutput } type DiagnosticSettingMap map[string]DiagnosticSettingInput func (DiagnosticSettingMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DiagnosticSetting)(nil)).Elem() } func (i DiagnosticSettingMap) ToDiagnosticSettingMapOutput() DiagnosticSettingMapOutput { return i.ToDiagnosticSettingMapOutputWithContext(context.Background()) } func (i DiagnosticSettingMap) ToDiagnosticSettingMapOutputWithContext(ctx context.Context) DiagnosticSettingMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DiagnosticSettingMapOutput) } type DiagnosticSettingOutput struct{ *pulumi.OutputState } func (DiagnosticSettingOutput) ElementType() reflect.Type { return reflect.TypeOf((**DiagnosticSetting)(nil)).Elem() } func (o DiagnosticSettingOutput) ToDiagnosticSettingOutput() DiagnosticSettingOutput { return o } func (o DiagnosticSettingOutput) ToDiagnosticSettingOutputWithContext(ctx context.Context) DiagnosticSettingOutput { return o } // One or more `enabledLog` blocks as defined below. // // > **Note:** At least one `enabledLog` or `enabledMetric` block must be specified. At least one type of Log or Metric must be enabled. func (o DiagnosticSettingOutput) EnabledLogs() DiagnosticSettingEnabledLogArrayOutput { return o.ApplyT(func(v *DiagnosticSetting) DiagnosticSettingEnabledLogArrayOutput { return v.EnabledLogs }).(DiagnosticSettingEnabledLogArrayOutput) } // One or more `enabledMetric` blocks as defined below. // // > **Note:** At least one `enabledLog` or `enabledMetric` block must be specified. func (o DiagnosticSettingOutput) EnabledMetrics() DiagnosticSettingEnabledMetricArrayOutput { return o.ApplyT(func(v *DiagnosticSetting) DiagnosticSettingEnabledMetricArrayOutput { return v.EnabledMetrics }).(DiagnosticSettingEnabledMetricArrayOutput) } // Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. // // > **NOTE:** This can be sourced from the `eventhub.EventHubNamespaceAuthorizationRule` resource and is different from a `eventhub.AuthorizationRule` resource. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. func (o DiagnosticSettingOutput) EventhubAuthorizationRuleId() pulumi.StringPtrOutput { return o.ApplyT(func(v *DiagnosticSetting) pulumi.StringPtrOutput { return v.EventhubAuthorizationRuleId }).(pulumi.StringPtrOutput) } // Specifies the name of the Event Hub where Diagnostics Data should be sent. // // > **NOTE:** If this isn't specified then the default Event Hub will be used. func (o DiagnosticSettingOutput) EventhubName() pulumi.StringPtrOutput { return o.ApplyT(func(v *DiagnosticSetting) pulumi.StringPtrOutput { return v.EventhubName }).(pulumi.StringPtrOutput) } // Possible values are `AzureDiagnostics` and `Dedicated`. When set to `Dedicated`, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy `AzureDiagnostics` table. // // > **NOTE:** This setting will only have an effect if a `logAnalyticsWorkspaceId` is provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see [resource types](https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/azurediagnostics#resource-types) for services that use each method. Please [see the documentation](https://docs.microsoft.com/azure/azure-monitor/platform/diagnostic-logs-stream-log-store#azure-diagnostics-vs-resource-specific) for details on the differences between destination types. func (o DiagnosticSettingOutput) LogAnalyticsDestinationType() pulumi.StringOutput { return o.ApplyT(func(v *DiagnosticSetting) pulumi.StringOutput { return v.LogAnalyticsDestinationType }).(pulumi.StringOutput) } // Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. func (o DiagnosticSettingOutput) LogAnalyticsWorkspaceId() pulumi.StringPtrOutput { return o.ApplyT(func(v *DiagnosticSetting) pulumi.StringPtrOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringPtrOutput) } // Deprecated: `metric` has been deprecated in favor of the `enabledMetric` property and will be removed in v5.0 of the AzureRM provider func (o DiagnosticSettingOutput) Metrics() DiagnosticSettingMetricArrayOutput { return o.ApplyT(func(v *DiagnosticSetting) DiagnosticSettingMetricArrayOutput { return v.Metrics }).(DiagnosticSettingMetricArrayOutput) } // Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. // // > **NOTE:** If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. func (o DiagnosticSettingOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DiagnosticSetting) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, [click to learn more about partner integration](https://learn.microsoft.com/en-us/azure/partner-solutions/overview). // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. func (o DiagnosticSettingOutput) PartnerSolutionId() pulumi.StringPtrOutput { return o.ApplyT(func(v *DiagnosticSetting) pulumi.StringPtrOutput { return v.PartnerSolutionId }).(pulumi.StringPtrOutput) } // The ID of the Storage Account where logs should be sent. // // > **NOTE:** At least one of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId`, `partnerSolutionId` and `storageAccountId` must be specified. func (o DiagnosticSettingOutput) StorageAccountId() pulumi.StringPtrOutput { return o.ApplyT(func(v *DiagnosticSetting) pulumi.StringPtrOutput { return v.StorageAccountId }).(pulumi.StringPtrOutput) } // The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created. func (o DiagnosticSettingOutput) TargetResourceId() pulumi.StringOutput { return o.ApplyT(func(v *DiagnosticSetting) pulumi.StringOutput { return v.TargetResourceId }).(pulumi.StringOutput) } type DiagnosticSettingArrayOutput struct{ *pulumi.OutputState } func (DiagnosticSettingArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DiagnosticSetting)(nil)).Elem() } func (o DiagnosticSettingArrayOutput) ToDiagnosticSettingArrayOutput() DiagnosticSettingArrayOutput { return o } func (o DiagnosticSettingArrayOutput) ToDiagnosticSettingArrayOutputWithContext(ctx context.Context) DiagnosticSettingArrayOutput { return o } func (o DiagnosticSettingArrayOutput) Index(i pulumi.IntInput) DiagnosticSettingOutput {
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/monitoring/alertPrometheusRuleGroup.go
sdk/go/azure/monitoring/alertPrometheusRuleGroup.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 monitoring import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Alert Management Prometheus Rule Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/containerservice" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "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 // } // exampleActionGroup, err := monitoring.NewActionGroup(ctx, "example", &monitoring.ActionGroupArgs{ // Name: pulumi.String("example-mag"), // ResourceGroupName: example.Name, // ShortName: pulumi.String("testag"), // }) // if err != nil { // return err // } // exampleWorkspace, err := monitoring.NewWorkspace(ctx, "example", &monitoring.WorkspaceArgs{ // Name: pulumi.String("example-amw"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleKubernetesCluster, err := containerservice.NewKubernetesCluster(ctx, "example", &containerservice.KubernetesClusterArgs{ // Name: pulumi.String("example-cluster"), // Location: example.Location, // ResourceGroupName: example.Name, // DnsPrefix: pulumi.String("example-aks"), // DefaultNodePool: &containerservice.KubernetesClusterDefaultNodePoolArgs{ // Name: pulumi.String("default"), // NodeCount: pulumi.Int(1), // VmSize: pulumi.String("Standard_DS2_v2"), // HostEncryptionEnabled: pulumi.Bool(true), // }, // Identity: &containerservice.KubernetesClusterIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // _, err = monitoring.NewAlertPrometheusRuleGroup(ctx, "example", &monitoring.AlertPrometheusRuleGroupArgs{ // Name: pulumi.String("example-amprg"), // Location: pulumi.String("West Europe"), // ResourceGroupName: example.Name, // ClusterName: exampleKubernetesCluster.Name, // Description: pulumi.String("This is the description of the following rule group"), // RuleGroupEnabled: pulumi.Bool(false), // Interval: pulumi.String("PT1M"), // Scopes: pulumi.StringArray{ // exampleWorkspace.ID(), // }, // Rules: monitoring.AlertPrometheusRuleGroupRuleArray{ // &monitoring.AlertPrometheusRuleGroupRuleArgs{ // Enabled: pulumi.Bool(false), // Expression: pulumi.String("histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\\\"billing-processing\\\"}[5m])) by (job_type))\n"), // Record: pulumi.String("job_type:billing_jobs_duration_seconds:99p5m"), // Labels: pulumi.StringMap{ // "team": pulumi.String("prod"), // }, // }, // &monitoring.AlertPrometheusRuleGroupRuleArgs{ // Alert: pulumi.String("Billing_Processing_Very_Slow"), // Enabled: pulumi.Bool(true), // Expression: pulumi.String("histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\\\"billing-processing\\\"}[5m])) by (job_type))\n"), // For: pulumi.String("PT5M"), // Severity: pulumi.Int(2), // Actions: monitoring.AlertPrometheusRuleGroupRuleActionArray{ // &monitoring.AlertPrometheusRuleGroupRuleActionArgs{ // ActionGroupId: exampleActionGroup.ID(), // }, // }, // AlertResolution: &monitoring.AlertPrometheusRuleGroupRuleAlertResolutionArgs{ // AutoResolved: pulumi.Bool(true), // TimeToResolve: pulumi.String("PT10M"), // }, // Annotations: pulumi.StringMap{ // "annotationName": pulumi.String("annotationValue"), // }, // Labels: pulumi.StringMap{ // "team": pulumi.String("prod"), // }, // }, // }, // 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.AlertsManagement` - 2023-03-01 // // ## Import // // Alert Management Prometheus Rule Group can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/alertPrometheusRuleGroup:AlertPrometheusRuleGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.AlertsManagement/prometheusRuleGroups/ruleGroup1 // ``` type AlertPrometheusRuleGroup struct { pulumi.CustomResourceState // Specifies the name of the Managed Kubernetes Cluster. ClusterName pulumi.StringPtrOutput `pulumi:"clusterName"` // The description of the Alert Management Prometheus Rule Group. Description pulumi.StringPtrOutput `pulumi:"description"` // Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between `PT1M` and `PT15M`. Interval pulumi.StringPtrOutput `pulumi:"interval"` // Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Is this Alert Management Prometheus Rule Group enabled? Possible values are `true` and `false`. RuleGroupEnabled pulumi.BoolPtrOutput `pulumi:"ruleGroupEnabled"` // One or more `rule` blocks as defined below. Rules AlertPrometheusRuleGroupRuleArrayOutput `pulumi:"rules"` // Specifies the resource ID of the Azure Monitor Workspace. Scopes pulumi.StringArrayOutput `pulumi:"scopes"` // A mapping of tags to assign to the Alert Management Prometheus Rule Group. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewAlertPrometheusRuleGroup registers a new resource with the given unique name, arguments, and options. func NewAlertPrometheusRuleGroup(ctx *pulumi.Context, name string, args *AlertPrometheusRuleGroupArgs, opts ...pulumi.ResourceOption) (*AlertPrometheusRuleGroup, 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.Rules == nil { return nil, errors.New("invalid value for required argument 'Rules'") } if args.Scopes == nil { return nil, errors.New("invalid value for required argument 'Scopes'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AlertPrometheusRuleGroup err := ctx.RegisterResource("azure:monitoring/alertPrometheusRuleGroup:AlertPrometheusRuleGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAlertPrometheusRuleGroup gets an existing AlertPrometheusRuleGroup 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 GetAlertPrometheusRuleGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AlertPrometheusRuleGroupState, opts ...pulumi.ResourceOption) (*AlertPrometheusRuleGroup, error) { var resource AlertPrometheusRuleGroup err := ctx.ReadResource("azure:monitoring/alertPrometheusRuleGroup:AlertPrometheusRuleGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AlertPrometheusRuleGroup resources. type alertPrometheusRuleGroupState struct { // Specifies the name of the Managed Kubernetes Cluster. ClusterName *string `pulumi:"clusterName"` // The description of the Alert Management Prometheus Rule Group. Description *string `pulumi:"description"` // Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between `PT1M` and `PT15M`. Interval *string `pulumi:"interval"` // Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Is this Alert Management Prometheus Rule Group enabled? Possible values are `true` and `false`. RuleGroupEnabled *bool `pulumi:"ruleGroupEnabled"` // One or more `rule` blocks as defined below. Rules []AlertPrometheusRuleGroupRule `pulumi:"rules"` // Specifies the resource ID of the Azure Monitor Workspace. Scopes []string `pulumi:"scopes"` // A mapping of tags to assign to the Alert Management Prometheus Rule Group. Tags map[string]string `pulumi:"tags"` } type AlertPrometheusRuleGroupState struct { // Specifies the name of the Managed Kubernetes Cluster. ClusterName pulumi.StringPtrInput // The description of the Alert Management Prometheus Rule Group. Description pulumi.StringPtrInput // Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between `PT1M` and `PT15M`. Interval pulumi.StringPtrInput // Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Is this Alert Management Prometheus Rule Group enabled? Possible values are `true` and `false`. RuleGroupEnabled pulumi.BoolPtrInput // One or more `rule` blocks as defined below. Rules AlertPrometheusRuleGroupRuleArrayInput // Specifies the resource ID of the Azure Monitor Workspace. Scopes pulumi.StringArrayInput // A mapping of tags to assign to the Alert Management Prometheus Rule Group. Tags pulumi.StringMapInput } func (AlertPrometheusRuleGroupState) ElementType() reflect.Type { return reflect.TypeOf((*alertPrometheusRuleGroupState)(nil)).Elem() } type alertPrometheusRuleGroupArgs struct { // Specifies the name of the Managed Kubernetes Cluster. ClusterName *string `pulumi:"clusterName"` // The description of the Alert Management Prometheus Rule Group. Description *string `pulumi:"description"` // Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between `PT1M` and `PT15M`. Interval *string `pulumi:"interval"` // Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Is this Alert Management Prometheus Rule Group enabled? Possible values are `true` and `false`. RuleGroupEnabled *bool `pulumi:"ruleGroupEnabled"` // One or more `rule` blocks as defined below. Rules []AlertPrometheusRuleGroupRule `pulumi:"rules"` // Specifies the resource ID of the Azure Monitor Workspace. Scopes []string `pulumi:"scopes"` // A mapping of tags to assign to the Alert Management Prometheus Rule Group. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a AlertPrometheusRuleGroup resource. type AlertPrometheusRuleGroupArgs struct { // Specifies the name of the Managed Kubernetes Cluster. ClusterName pulumi.StringPtrInput // The description of the Alert Management Prometheus Rule Group. Description pulumi.StringPtrInput // Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between `PT1M` and `PT15M`. Interval pulumi.StringPtrInput // Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Is this Alert Management Prometheus Rule Group enabled? Possible values are `true` and `false`. RuleGroupEnabled pulumi.BoolPtrInput // One or more `rule` blocks as defined below. Rules AlertPrometheusRuleGroupRuleArrayInput // Specifies the resource ID of the Azure Monitor Workspace. Scopes pulumi.StringArrayInput // A mapping of tags to assign to the Alert Management Prometheus Rule Group. Tags pulumi.StringMapInput } func (AlertPrometheusRuleGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*alertPrometheusRuleGroupArgs)(nil)).Elem() } type AlertPrometheusRuleGroupInput interface { pulumi.Input ToAlertPrometheusRuleGroupOutput() AlertPrometheusRuleGroupOutput ToAlertPrometheusRuleGroupOutputWithContext(ctx context.Context) AlertPrometheusRuleGroupOutput } func (*AlertPrometheusRuleGroup) ElementType() reflect.Type { return reflect.TypeOf((**AlertPrometheusRuleGroup)(nil)).Elem() } func (i *AlertPrometheusRuleGroup) ToAlertPrometheusRuleGroupOutput() AlertPrometheusRuleGroupOutput { return i.ToAlertPrometheusRuleGroupOutputWithContext(context.Background()) } func (i *AlertPrometheusRuleGroup) ToAlertPrometheusRuleGroupOutputWithContext(ctx context.Context) AlertPrometheusRuleGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertPrometheusRuleGroupOutput) } // AlertPrometheusRuleGroupArrayInput is an input type that accepts AlertPrometheusRuleGroupArray and AlertPrometheusRuleGroupArrayOutput values. // You can construct a concrete instance of `AlertPrometheusRuleGroupArrayInput` via: // // AlertPrometheusRuleGroupArray{ AlertPrometheusRuleGroupArgs{...} } type AlertPrometheusRuleGroupArrayInput interface { pulumi.Input ToAlertPrometheusRuleGroupArrayOutput() AlertPrometheusRuleGroupArrayOutput ToAlertPrometheusRuleGroupArrayOutputWithContext(context.Context) AlertPrometheusRuleGroupArrayOutput } type AlertPrometheusRuleGroupArray []AlertPrometheusRuleGroupInput func (AlertPrometheusRuleGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertPrometheusRuleGroup)(nil)).Elem() } func (i AlertPrometheusRuleGroupArray) ToAlertPrometheusRuleGroupArrayOutput() AlertPrometheusRuleGroupArrayOutput { return i.ToAlertPrometheusRuleGroupArrayOutputWithContext(context.Background()) } func (i AlertPrometheusRuleGroupArray) ToAlertPrometheusRuleGroupArrayOutputWithContext(ctx context.Context) AlertPrometheusRuleGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertPrometheusRuleGroupArrayOutput) } // AlertPrometheusRuleGroupMapInput is an input type that accepts AlertPrometheusRuleGroupMap and AlertPrometheusRuleGroupMapOutput values. // You can construct a concrete instance of `AlertPrometheusRuleGroupMapInput` via: // // AlertPrometheusRuleGroupMap{ "key": AlertPrometheusRuleGroupArgs{...} } type AlertPrometheusRuleGroupMapInput interface { pulumi.Input ToAlertPrometheusRuleGroupMapOutput() AlertPrometheusRuleGroupMapOutput ToAlertPrometheusRuleGroupMapOutputWithContext(context.Context) AlertPrometheusRuleGroupMapOutput } type AlertPrometheusRuleGroupMap map[string]AlertPrometheusRuleGroupInput func (AlertPrometheusRuleGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertPrometheusRuleGroup)(nil)).Elem() } func (i AlertPrometheusRuleGroupMap) ToAlertPrometheusRuleGroupMapOutput() AlertPrometheusRuleGroupMapOutput { return i.ToAlertPrometheusRuleGroupMapOutputWithContext(context.Background()) } func (i AlertPrometheusRuleGroupMap) ToAlertPrometheusRuleGroupMapOutputWithContext(ctx context.Context) AlertPrometheusRuleGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertPrometheusRuleGroupMapOutput) } type AlertPrometheusRuleGroupOutput struct{ *pulumi.OutputState } func (AlertPrometheusRuleGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**AlertPrometheusRuleGroup)(nil)).Elem() } func (o AlertPrometheusRuleGroupOutput) ToAlertPrometheusRuleGroupOutput() AlertPrometheusRuleGroupOutput { return o } func (o AlertPrometheusRuleGroupOutput) ToAlertPrometheusRuleGroupOutputWithContext(ctx context.Context) AlertPrometheusRuleGroupOutput { return o } // Specifies the name of the Managed Kubernetes Cluster. func (o AlertPrometheusRuleGroupOutput) ClusterName() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertPrometheusRuleGroup) pulumi.StringPtrOutput { return v.ClusterName }).(pulumi.StringPtrOutput) } // The description of the Alert Management Prometheus Rule Group. func (o AlertPrometheusRuleGroupOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertPrometheusRuleGroup) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Specifies the interval in which to run the Alert Management Prometheus Rule Group represented in ISO 8601 duration format. Possible values are between `PT1M` and `PT15M`. func (o AlertPrometheusRuleGroupOutput) Interval() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertPrometheusRuleGroup) pulumi.StringPtrOutput { return v.Interval }).(pulumi.StringPtrOutput) } // Specifies the Azure Region where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. func (o AlertPrometheusRuleGroupOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *AlertPrometheusRuleGroup) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name which should be used for this Alert Management Prometheus Rule Group. Changing this forces a new resource to be created. func (o AlertPrometheusRuleGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AlertPrometheusRuleGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the name of the Resource Group where the Alert Management Prometheus Rule Group should exist. Changing this forces a new resource to be created. func (o AlertPrometheusRuleGroupOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *AlertPrometheusRuleGroup) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Is this Alert Management Prometheus Rule Group enabled? Possible values are `true` and `false`. func (o AlertPrometheusRuleGroupOutput) RuleGroupEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AlertPrometheusRuleGroup) pulumi.BoolPtrOutput { return v.RuleGroupEnabled }).(pulumi.BoolPtrOutput) } // One or more `rule` blocks as defined below. func (o AlertPrometheusRuleGroupOutput) Rules() AlertPrometheusRuleGroupRuleArrayOutput { return o.ApplyT(func(v *AlertPrometheusRuleGroup) AlertPrometheusRuleGroupRuleArrayOutput { return v.Rules }).(AlertPrometheusRuleGroupRuleArrayOutput) } // Specifies the resource ID of the Azure Monitor Workspace. func (o AlertPrometheusRuleGroupOutput) Scopes() pulumi.StringArrayOutput { return o.ApplyT(func(v *AlertPrometheusRuleGroup) pulumi.StringArrayOutput { return v.Scopes }).(pulumi.StringArrayOutput) } // A mapping of tags to assign to the Alert Management Prometheus Rule Group. func (o AlertPrometheusRuleGroupOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *AlertPrometheusRuleGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type AlertPrometheusRuleGroupArrayOutput struct{ *pulumi.OutputState } func (AlertPrometheusRuleGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertPrometheusRuleGroup)(nil)).Elem() } func (o AlertPrometheusRuleGroupArrayOutput) ToAlertPrometheusRuleGroupArrayOutput() AlertPrometheusRuleGroupArrayOutput { return o } func (o AlertPrometheusRuleGroupArrayOutput) ToAlertPrometheusRuleGroupArrayOutputWithContext(ctx context.Context) AlertPrometheusRuleGroupArrayOutput { return o } func (o AlertPrometheusRuleGroupArrayOutput) Index(i pulumi.IntInput) AlertPrometheusRuleGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AlertPrometheusRuleGroup { return vs[0].([]*AlertPrometheusRuleGroup)[vs[1].(int)] }).(AlertPrometheusRuleGroupOutput) } type AlertPrometheusRuleGroupMapOutput struct{ *pulumi.OutputState } func (AlertPrometheusRuleGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertPrometheusRuleGroup)(nil)).Elem() } func (o AlertPrometheusRuleGroupMapOutput) ToAlertPrometheusRuleGroupMapOutput() AlertPrometheusRuleGroupMapOutput { return o } func (o AlertPrometheusRuleGroupMapOutput) ToAlertPrometheusRuleGroupMapOutputWithContext(ctx context.Context) AlertPrometheusRuleGroupMapOutput { return o } func (o AlertPrometheusRuleGroupMapOutput) MapIndex(k pulumi.StringInput) AlertPrometheusRuleGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AlertPrometheusRuleGroup { return vs[0].(map[string]*AlertPrometheusRuleGroup)[vs[1].(string)] }).(AlertPrometheusRuleGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AlertPrometheusRuleGroupInput)(nil)).Elem(), &AlertPrometheusRuleGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertPrometheusRuleGroupArrayInput)(nil)).Elem(), AlertPrometheusRuleGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertPrometheusRuleGroupMapInput)(nil)).Elem(), AlertPrometheusRuleGroupMap{}) pulumi.RegisterOutputType(AlertPrometheusRuleGroupOutput{}) pulumi.RegisterOutputType(AlertPrometheusRuleGroupArrayOutput{}) pulumi.RegisterOutputType(AlertPrometheusRuleGroupMapOutput{}) }
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/monitoring/privateLinkScopedService.go
sdk/go/azure/monitoring/privateLinkScopedService.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 monitoring 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 Monitor Private Link Scoped Service. // // ## 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-azure/sdk/v6/go/azure/monitoring" // "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 // } // exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{ // Name: pulumi.String("example-appinsights"), // Location: example.Location, // ResourceGroupName: example.Name, // ApplicationType: pulumi.String("web"), // }) // if err != nil { // return err // } // examplePrivateLinkScope, err := monitoring.NewPrivateLinkScope(ctx, "example", &monitoring.PrivateLinkScopeArgs{ // Name: pulumi.String("example-ampls"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = monitoring.NewPrivateLinkScopedService(ctx, "example", &monitoring.PrivateLinkScopedServiceArgs{ // Name: pulumi.String("example-amplsservice"), // ResourceGroupName: example.Name, // ScopeName: examplePrivateLinkScope.Name, // LinkedResourceId: exampleInsights.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.Insights` - 2019-10-17-preview // // ## Import // // Azure Monitor Private Link Scoped Services can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/privateLinkScopedService:PrivateLinkScopedService example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/privateLinkScopes/pls1/scopedResources/sr1 // ``` type PrivateLinkScopedService struct { pulumi.CustomResourceState // The ID of the linked resource. It must be the Log Analytics workspace or the Application Insights component or the Data Collection endpoint. Changing this forces a new resource to be created. LinkedResourceId pulumi.StringOutput `pulumi:"linkedResourceId"` // The name of the Azure Monitor Private Link Scoped Service. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Azure Monitor Private Link Scoped Service should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created. ScopeName pulumi.StringOutput `pulumi:"scopeName"` } // NewPrivateLinkScopedService registers a new resource with the given unique name, arguments, and options. func NewPrivateLinkScopedService(ctx *pulumi.Context, name string, args *PrivateLinkScopedServiceArgs, opts ...pulumi.ResourceOption) (*PrivateLinkScopedService, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.LinkedResourceId == nil { return nil, errors.New("invalid value for required argument 'LinkedResourceId'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.ScopeName == nil { return nil, errors.New("invalid value for required argument 'ScopeName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource PrivateLinkScopedService err := ctx.RegisterResource("azure:monitoring/privateLinkScopedService:PrivateLinkScopedService", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPrivateLinkScopedService gets an existing PrivateLinkScopedService 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 GetPrivateLinkScopedService(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PrivateLinkScopedServiceState, opts ...pulumi.ResourceOption) (*PrivateLinkScopedService, error) { var resource PrivateLinkScopedService err := ctx.ReadResource("azure:monitoring/privateLinkScopedService:PrivateLinkScopedService", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering PrivateLinkScopedService resources. type privateLinkScopedServiceState struct { // The ID of the linked resource. It must be the Log Analytics workspace or the Application Insights component or the Data Collection endpoint. Changing this forces a new resource to be created. LinkedResourceId *string `pulumi:"linkedResourceId"` // The name of the Azure Monitor Private Link Scoped Service. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Azure Monitor Private Link Scoped Service should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created. ScopeName *string `pulumi:"scopeName"` } type PrivateLinkScopedServiceState struct { // The ID of the linked resource. It must be the Log Analytics workspace or the Application Insights component or the Data Collection endpoint. Changing this forces a new resource to be created. LinkedResourceId pulumi.StringPtrInput // The name of the Azure Monitor Private Link Scoped Service. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Azure Monitor Private Link Scoped Service should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created. ScopeName pulumi.StringPtrInput } func (PrivateLinkScopedServiceState) ElementType() reflect.Type { return reflect.TypeOf((*privateLinkScopedServiceState)(nil)).Elem() } type privateLinkScopedServiceArgs struct { // The ID of the linked resource. It must be the Log Analytics workspace or the Application Insights component or the Data Collection endpoint. Changing this forces a new resource to be created. LinkedResourceId string `pulumi:"linkedResourceId"` // The name of the Azure Monitor Private Link Scoped Service. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Azure Monitor Private Link Scoped Service should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created. ScopeName string `pulumi:"scopeName"` } // The set of arguments for constructing a PrivateLinkScopedService resource. type PrivateLinkScopedServiceArgs struct { // The ID of the linked resource. It must be the Log Analytics workspace or the Application Insights component or the Data Collection endpoint. Changing this forces a new resource to be created. LinkedResourceId pulumi.StringInput // The name of the Azure Monitor Private Link Scoped Service. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Azure Monitor Private Link Scoped Service should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created. ScopeName pulumi.StringInput } func (PrivateLinkScopedServiceArgs) ElementType() reflect.Type { return reflect.TypeOf((*privateLinkScopedServiceArgs)(nil)).Elem() } type PrivateLinkScopedServiceInput interface { pulumi.Input ToPrivateLinkScopedServiceOutput() PrivateLinkScopedServiceOutput ToPrivateLinkScopedServiceOutputWithContext(ctx context.Context) PrivateLinkScopedServiceOutput } func (*PrivateLinkScopedService) ElementType() reflect.Type { return reflect.TypeOf((**PrivateLinkScopedService)(nil)).Elem() } func (i *PrivateLinkScopedService) ToPrivateLinkScopedServiceOutput() PrivateLinkScopedServiceOutput { return i.ToPrivateLinkScopedServiceOutputWithContext(context.Background()) } func (i *PrivateLinkScopedService) ToPrivateLinkScopedServiceOutputWithContext(ctx context.Context) PrivateLinkScopedServiceOutput { return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkScopedServiceOutput) } // PrivateLinkScopedServiceArrayInput is an input type that accepts PrivateLinkScopedServiceArray and PrivateLinkScopedServiceArrayOutput values. // You can construct a concrete instance of `PrivateLinkScopedServiceArrayInput` via: // // PrivateLinkScopedServiceArray{ PrivateLinkScopedServiceArgs{...} } type PrivateLinkScopedServiceArrayInput interface { pulumi.Input ToPrivateLinkScopedServiceArrayOutput() PrivateLinkScopedServiceArrayOutput ToPrivateLinkScopedServiceArrayOutputWithContext(context.Context) PrivateLinkScopedServiceArrayOutput } type PrivateLinkScopedServiceArray []PrivateLinkScopedServiceInput func (PrivateLinkScopedServiceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*PrivateLinkScopedService)(nil)).Elem() } func (i PrivateLinkScopedServiceArray) ToPrivateLinkScopedServiceArrayOutput() PrivateLinkScopedServiceArrayOutput { return i.ToPrivateLinkScopedServiceArrayOutputWithContext(context.Background()) } func (i PrivateLinkScopedServiceArray) ToPrivateLinkScopedServiceArrayOutputWithContext(ctx context.Context) PrivateLinkScopedServiceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkScopedServiceArrayOutput) } // PrivateLinkScopedServiceMapInput is an input type that accepts PrivateLinkScopedServiceMap and PrivateLinkScopedServiceMapOutput values. // You can construct a concrete instance of `PrivateLinkScopedServiceMapInput` via: // // PrivateLinkScopedServiceMap{ "key": PrivateLinkScopedServiceArgs{...} } type PrivateLinkScopedServiceMapInput interface { pulumi.Input ToPrivateLinkScopedServiceMapOutput() PrivateLinkScopedServiceMapOutput ToPrivateLinkScopedServiceMapOutputWithContext(context.Context) PrivateLinkScopedServiceMapOutput } type PrivateLinkScopedServiceMap map[string]PrivateLinkScopedServiceInput func (PrivateLinkScopedServiceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PrivateLinkScopedService)(nil)).Elem() } func (i PrivateLinkScopedServiceMap) ToPrivateLinkScopedServiceMapOutput() PrivateLinkScopedServiceMapOutput { return i.ToPrivateLinkScopedServiceMapOutputWithContext(context.Background()) } func (i PrivateLinkScopedServiceMap) ToPrivateLinkScopedServiceMapOutputWithContext(ctx context.Context) PrivateLinkScopedServiceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkScopedServiceMapOutput) } type PrivateLinkScopedServiceOutput struct{ *pulumi.OutputState } func (PrivateLinkScopedServiceOutput) ElementType() reflect.Type { return reflect.TypeOf((**PrivateLinkScopedService)(nil)).Elem() } func (o PrivateLinkScopedServiceOutput) ToPrivateLinkScopedServiceOutput() PrivateLinkScopedServiceOutput { return o } func (o PrivateLinkScopedServiceOutput) ToPrivateLinkScopedServiceOutputWithContext(ctx context.Context) PrivateLinkScopedServiceOutput { return o } // The ID of the linked resource. It must be the Log Analytics workspace or the Application Insights component or the Data Collection endpoint. Changing this forces a new resource to be created. func (o PrivateLinkScopedServiceOutput) LinkedResourceId() pulumi.StringOutput { return o.ApplyT(func(v *PrivateLinkScopedService) pulumi.StringOutput { return v.LinkedResourceId }).(pulumi.StringOutput) } // The name of the Azure Monitor Private Link Scoped Service. Changing this forces a new resource to be created. func (o PrivateLinkScopedServiceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *PrivateLinkScopedService) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Azure Monitor Private Link Scoped Service should exist. Changing this forces a new resource to be created. func (o PrivateLinkScopedServiceOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *PrivateLinkScopedService) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created. func (o PrivateLinkScopedServiceOutput) ScopeName() pulumi.StringOutput { return o.ApplyT(func(v *PrivateLinkScopedService) pulumi.StringOutput { return v.ScopeName }).(pulumi.StringOutput) } type PrivateLinkScopedServiceArrayOutput struct{ *pulumi.OutputState } func (PrivateLinkScopedServiceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*PrivateLinkScopedService)(nil)).Elem() } func (o PrivateLinkScopedServiceArrayOutput) ToPrivateLinkScopedServiceArrayOutput() PrivateLinkScopedServiceArrayOutput { return o } func (o PrivateLinkScopedServiceArrayOutput) ToPrivateLinkScopedServiceArrayOutputWithContext(ctx context.Context) PrivateLinkScopedServiceArrayOutput { return o } func (o PrivateLinkScopedServiceArrayOutput) Index(i pulumi.IntInput) PrivateLinkScopedServiceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PrivateLinkScopedService { return vs[0].([]*PrivateLinkScopedService)[vs[1].(int)] }).(PrivateLinkScopedServiceOutput) } type PrivateLinkScopedServiceMapOutput struct{ *pulumi.OutputState } func (PrivateLinkScopedServiceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PrivateLinkScopedService)(nil)).Elem() } func (o PrivateLinkScopedServiceMapOutput) ToPrivateLinkScopedServiceMapOutput() PrivateLinkScopedServiceMapOutput { return o } func (o PrivateLinkScopedServiceMapOutput) ToPrivateLinkScopedServiceMapOutputWithContext(ctx context.Context) PrivateLinkScopedServiceMapOutput { return o } func (o PrivateLinkScopedServiceMapOutput) MapIndex(k pulumi.StringInput) PrivateLinkScopedServiceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PrivateLinkScopedService { return vs[0].(map[string]*PrivateLinkScopedService)[vs[1].(string)] }).(PrivateLinkScopedServiceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkScopedServiceInput)(nil)).Elem(), &PrivateLinkScopedService{}) pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkScopedServiceArrayInput)(nil)).Elem(), PrivateLinkScopedServiceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkScopedServiceMapInput)(nil)).Elem(), PrivateLinkScopedServiceMap{}) pulumi.RegisterOutputType(PrivateLinkScopedServiceOutput{}) pulumi.RegisterOutputType(PrivateLinkScopedServiceArrayOutput{}) pulumi.RegisterOutputType(PrivateLinkScopedServiceMapOutput{}) }
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/monitoring/alertProcessingRuleActionGroup.go
sdk/go/azure/monitoring/alertProcessingRuleActionGroup.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 monitoring import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Alert Processing Rule which apply action 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/monitoring" // "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 // } // exampleActionGroup, err := monitoring.NewActionGroup(ctx, "example", &monitoring.ActionGroupArgs{ // Name: pulumi.String("example-action-group"), // ResourceGroupName: example.Name, // ShortName: pulumi.String("action"), // }) // if err != nil { // return err // } // _, err = monitoring.NewAlertProcessingRuleActionGroup(ctx, "example", &monitoring.AlertProcessingRuleActionGroupArgs{ // Name: pulumi.String("example"), // ResourceGroupName: pulumi.String("example"), // Scopes: pulumi.StringArray{ // example.ID(), // }, // AddActionGroupIds: pulumi.StringArray{ // exampleActionGroup.ID(), // }, // Condition: &monitoring.AlertProcessingRuleActionGroupConditionArgs{ // TargetResourceType: &monitoring.AlertProcessingRuleActionGroupConditionTargetResourceTypeArgs{ // Operator: pulumi.String("Equals"), // Values: pulumi.StringArray{ // pulumi.String("Microsoft.Compute/VirtualMachines"), // }, // }, // Severity: &monitoring.AlertProcessingRuleActionGroupConditionSeverityArgs{ // Operator: pulumi.String("Equals"), // Values: pulumi.StringArray{ // pulumi.String("Sev0"), // pulumi.String("Sev1"), // pulumi.String("Sev2"), // }, // }, // }, // Schedule: &monitoring.AlertProcessingRuleActionGroupScheduleArgs{ // EffectiveFrom: pulumi.String("2022-01-01T01:02:03"), // EffectiveUntil: pulumi.String("2022-02-02T01:02:03"), // TimeZone: pulumi.String("Pacific Standard Time"), // Recurrence: &monitoring.AlertProcessingRuleActionGroupScheduleRecurrenceArgs{ // Dailies: monitoring.AlertProcessingRuleActionGroupScheduleRecurrenceDailyArray{ // &monitoring.AlertProcessingRuleActionGroupScheduleRecurrenceDailyArgs{ // StartTime: pulumi.String("17:00:00"), // EndTime: pulumi.String("09:00:00"), // }, // }, // Weeklies: monitoring.AlertProcessingRuleActionGroupScheduleRecurrenceWeeklyArray{ // &monitoring.AlertProcessingRuleActionGroupScheduleRecurrenceWeeklyArgs{ // DaysOfWeeks: pulumi.StringArray{ // pulumi.String("Saturday"), // pulumi.String("Sunday"), // }, // }, // }, // }, // }, // Tags: pulumi.StringMap{ // "foo": pulumi.String("bar"), // }, // }) // 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.AlertsManagement` - 2021-08-08 // // ## Import // // Alert Processing Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/alertProcessingRuleActionGroup:AlertProcessingRuleActionGroup example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.AlertsManagement/actionRules/actionRule1 // ``` type AlertProcessingRuleActionGroup struct { pulumi.CustomResourceState // Specifies a list of Action Group IDs. AddActionGroupIds pulumi.StringArrayOutput `pulumi:"addActionGroupIds"` // A `condition` block as defined below. Condition AlertProcessingRuleActionGroupConditionPtrOutput `pulumi:"condition"` // Specifies a description for the Alert Processing Rule. Description pulumi.StringPtrOutput `pulumi:"description"` // Should the Alert Processing Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // The name which should be used for this Alert Processing Rule. Changing this forces a new Alert Processing Rule to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Alert Processing Rule should exist. Changing this forces a new Alert Processing Rule to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `schedule` block as defined below. Schedule AlertProcessingRuleActionGroupSchedulePtrOutput `pulumi:"schedule"` // A list of resource IDs which will be the target of alert processing rule. Scopes pulumi.StringArrayOutput `pulumi:"scopes"` // A mapping of tags which should be assigned to the Alert Processing Rule. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewAlertProcessingRuleActionGroup registers a new resource with the given unique name, arguments, and options. func NewAlertProcessingRuleActionGroup(ctx *pulumi.Context, name string, args *AlertProcessingRuleActionGroupArgs, opts ...pulumi.ResourceOption) (*AlertProcessingRuleActionGroup, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.AddActionGroupIds == nil { return nil, errors.New("invalid value for required argument 'AddActionGroupIds'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Scopes == nil { return nil, errors.New("invalid value for required argument 'Scopes'") } aliases := pulumi.Aliases([]pulumi.Alias{ { Type: pulumi.String("azure:monitoring/actionRuleActionGroup:ActionRuleActionGroup"), }, }) opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource AlertProcessingRuleActionGroup err := ctx.RegisterResource("azure:monitoring/alertProcessingRuleActionGroup:AlertProcessingRuleActionGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAlertProcessingRuleActionGroup gets an existing AlertProcessingRuleActionGroup 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 GetAlertProcessingRuleActionGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AlertProcessingRuleActionGroupState, opts ...pulumi.ResourceOption) (*AlertProcessingRuleActionGroup, error) { var resource AlertProcessingRuleActionGroup err := ctx.ReadResource("azure:monitoring/alertProcessingRuleActionGroup:AlertProcessingRuleActionGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AlertProcessingRuleActionGroup resources. type alertProcessingRuleActionGroupState struct { // Specifies a list of Action Group IDs. AddActionGroupIds []string `pulumi:"addActionGroupIds"` // A `condition` block as defined below. Condition *AlertProcessingRuleActionGroupCondition `pulumi:"condition"` // Specifies a description for the Alert Processing Rule. Description *string `pulumi:"description"` // Should the Alert Processing Rule be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The name which should be used for this Alert Processing Rule. Changing this forces a new Alert Processing Rule to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Alert Processing Rule should exist. Changing this forces a new Alert Processing Rule to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `schedule` block as defined below. Schedule *AlertProcessingRuleActionGroupSchedule `pulumi:"schedule"` // A list of resource IDs which will be the target of alert processing rule. Scopes []string `pulumi:"scopes"` // A mapping of tags which should be assigned to the Alert Processing Rule. Tags map[string]string `pulumi:"tags"` } type AlertProcessingRuleActionGroupState struct { // Specifies a list of Action Group IDs. AddActionGroupIds pulumi.StringArrayInput // A `condition` block as defined below. Condition AlertProcessingRuleActionGroupConditionPtrInput // Specifies a description for the Alert Processing Rule. Description pulumi.StringPtrInput // Should the Alert Processing Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The name which should be used for this Alert Processing Rule. Changing this forces a new Alert Processing Rule to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Alert Processing Rule should exist. Changing this forces a new Alert Processing Rule to be created. ResourceGroupName pulumi.StringPtrInput // A `schedule` block as defined below. Schedule AlertProcessingRuleActionGroupSchedulePtrInput // A list of resource IDs which will be the target of alert processing rule. Scopes pulumi.StringArrayInput // A mapping of tags which should be assigned to the Alert Processing Rule. Tags pulumi.StringMapInput } func (AlertProcessingRuleActionGroupState) ElementType() reflect.Type { return reflect.TypeOf((*alertProcessingRuleActionGroupState)(nil)).Elem() } type alertProcessingRuleActionGroupArgs struct { // Specifies a list of Action Group IDs. AddActionGroupIds []string `pulumi:"addActionGroupIds"` // A `condition` block as defined below. Condition *AlertProcessingRuleActionGroupCondition `pulumi:"condition"` // Specifies a description for the Alert Processing Rule. Description *string `pulumi:"description"` // Should the Alert Processing Rule be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The name which should be used for this Alert Processing Rule. Changing this forces a new Alert Processing Rule to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Alert Processing Rule should exist. Changing this forces a new Alert Processing Rule to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `schedule` block as defined below. Schedule *AlertProcessingRuleActionGroupSchedule `pulumi:"schedule"` // A list of resource IDs which will be the target of alert processing rule. Scopes []string `pulumi:"scopes"` // A mapping of tags which should be assigned to the Alert Processing Rule. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a AlertProcessingRuleActionGroup resource. type AlertProcessingRuleActionGroupArgs struct { // Specifies a list of Action Group IDs. AddActionGroupIds pulumi.StringArrayInput // A `condition` block as defined below. Condition AlertProcessingRuleActionGroupConditionPtrInput // Specifies a description for the Alert Processing Rule. Description pulumi.StringPtrInput // Should the Alert Processing Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The name which should be used for this Alert Processing Rule. Changing this forces a new Alert Processing Rule to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Alert Processing Rule should exist. Changing this forces a new Alert Processing Rule to be created. ResourceGroupName pulumi.StringInput // A `schedule` block as defined below. Schedule AlertProcessingRuleActionGroupSchedulePtrInput // A list of resource IDs which will be the target of alert processing rule. Scopes pulumi.StringArrayInput // A mapping of tags which should be assigned to the Alert Processing Rule. Tags pulumi.StringMapInput } func (AlertProcessingRuleActionGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*alertProcessingRuleActionGroupArgs)(nil)).Elem() } type AlertProcessingRuleActionGroupInput interface { pulumi.Input ToAlertProcessingRuleActionGroupOutput() AlertProcessingRuleActionGroupOutput ToAlertProcessingRuleActionGroupOutputWithContext(ctx context.Context) AlertProcessingRuleActionGroupOutput } func (*AlertProcessingRuleActionGroup) ElementType() reflect.Type { return reflect.TypeOf((**AlertProcessingRuleActionGroup)(nil)).Elem() } func (i *AlertProcessingRuleActionGroup) ToAlertProcessingRuleActionGroupOutput() AlertProcessingRuleActionGroupOutput { return i.ToAlertProcessingRuleActionGroupOutputWithContext(context.Background()) } func (i *AlertProcessingRuleActionGroup) ToAlertProcessingRuleActionGroupOutputWithContext(ctx context.Context) AlertProcessingRuleActionGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertProcessingRuleActionGroupOutput) } // AlertProcessingRuleActionGroupArrayInput is an input type that accepts AlertProcessingRuleActionGroupArray and AlertProcessingRuleActionGroupArrayOutput values. // You can construct a concrete instance of `AlertProcessingRuleActionGroupArrayInput` via: // // AlertProcessingRuleActionGroupArray{ AlertProcessingRuleActionGroupArgs{...} } type AlertProcessingRuleActionGroupArrayInput interface { pulumi.Input ToAlertProcessingRuleActionGroupArrayOutput() AlertProcessingRuleActionGroupArrayOutput ToAlertProcessingRuleActionGroupArrayOutputWithContext(context.Context) AlertProcessingRuleActionGroupArrayOutput } type AlertProcessingRuleActionGroupArray []AlertProcessingRuleActionGroupInput func (AlertProcessingRuleActionGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertProcessingRuleActionGroup)(nil)).Elem() } func (i AlertProcessingRuleActionGroupArray) ToAlertProcessingRuleActionGroupArrayOutput() AlertProcessingRuleActionGroupArrayOutput { return i.ToAlertProcessingRuleActionGroupArrayOutputWithContext(context.Background()) } func (i AlertProcessingRuleActionGroupArray) ToAlertProcessingRuleActionGroupArrayOutputWithContext(ctx context.Context) AlertProcessingRuleActionGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertProcessingRuleActionGroupArrayOutput) } // AlertProcessingRuleActionGroupMapInput is an input type that accepts AlertProcessingRuleActionGroupMap and AlertProcessingRuleActionGroupMapOutput values. // You can construct a concrete instance of `AlertProcessingRuleActionGroupMapInput` via: // // AlertProcessingRuleActionGroupMap{ "key": AlertProcessingRuleActionGroupArgs{...} } type AlertProcessingRuleActionGroupMapInput interface { pulumi.Input ToAlertProcessingRuleActionGroupMapOutput() AlertProcessingRuleActionGroupMapOutput ToAlertProcessingRuleActionGroupMapOutputWithContext(context.Context) AlertProcessingRuleActionGroupMapOutput } type AlertProcessingRuleActionGroupMap map[string]AlertProcessingRuleActionGroupInput func (AlertProcessingRuleActionGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertProcessingRuleActionGroup)(nil)).Elem() } func (i AlertProcessingRuleActionGroupMap) ToAlertProcessingRuleActionGroupMapOutput() AlertProcessingRuleActionGroupMapOutput { return i.ToAlertProcessingRuleActionGroupMapOutputWithContext(context.Background()) } func (i AlertProcessingRuleActionGroupMap) ToAlertProcessingRuleActionGroupMapOutputWithContext(ctx context.Context) AlertProcessingRuleActionGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertProcessingRuleActionGroupMapOutput) } type AlertProcessingRuleActionGroupOutput struct{ *pulumi.OutputState } func (AlertProcessingRuleActionGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**AlertProcessingRuleActionGroup)(nil)).Elem() } func (o AlertProcessingRuleActionGroupOutput) ToAlertProcessingRuleActionGroupOutput() AlertProcessingRuleActionGroupOutput { return o } func (o AlertProcessingRuleActionGroupOutput) ToAlertProcessingRuleActionGroupOutputWithContext(ctx context.Context) AlertProcessingRuleActionGroupOutput { return o } // Specifies a list of Action Group IDs. func (o AlertProcessingRuleActionGroupOutput) AddActionGroupIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *AlertProcessingRuleActionGroup) pulumi.StringArrayOutput { return v.AddActionGroupIds }).(pulumi.StringArrayOutput) } // A `condition` block as defined below. func (o AlertProcessingRuleActionGroupOutput) Condition() AlertProcessingRuleActionGroupConditionPtrOutput { return o.ApplyT(func(v *AlertProcessingRuleActionGroup) AlertProcessingRuleActionGroupConditionPtrOutput { return v.Condition }).(AlertProcessingRuleActionGroupConditionPtrOutput) } // Specifies a description for the Alert Processing Rule. func (o AlertProcessingRuleActionGroupOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertProcessingRuleActionGroup) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Should the Alert Processing Rule be enabled? Defaults to `true`. func (o AlertProcessingRuleActionGroupOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AlertProcessingRuleActionGroup) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // The name which should be used for this Alert Processing Rule. Changing this forces a new Alert Processing Rule to be created. func (o AlertProcessingRuleActionGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AlertProcessingRuleActionGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Alert Processing Rule should exist. Changing this forces a new Alert Processing Rule to be created. func (o AlertProcessingRuleActionGroupOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *AlertProcessingRuleActionGroup) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `schedule` block as defined below. func (o AlertProcessingRuleActionGroupOutput) Schedule() AlertProcessingRuleActionGroupSchedulePtrOutput { return o.ApplyT(func(v *AlertProcessingRuleActionGroup) AlertProcessingRuleActionGroupSchedulePtrOutput { return v.Schedule }).(AlertProcessingRuleActionGroupSchedulePtrOutput) } // A list of resource IDs which will be the target of alert processing rule. func (o AlertProcessingRuleActionGroupOutput) Scopes() pulumi.StringArrayOutput { return o.ApplyT(func(v *AlertProcessingRuleActionGroup) pulumi.StringArrayOutput { return v.Scopes }).(pulumi.StringArrayOutput) } // A mapping of tags which should be assigned to the Alert Processing Rule. func (o AlertProcessingRuleActionGroupOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *AlertProcessingRuleActionGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type AlertProcessingRuleActionGroupArrayOutput struct{ *pulumi.OutputState } func (AlertProcessingRuleActionGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertProcessingRuleActionGroup)(nil)).Elem() } func (o AlertProcessingRuleActionGroupArrayOutput) ToAlertProcessingRuleActionGroupArrayOutput() AlertProcessingRuleActionGroupArrayOutput { return o } func (o AlertProcessingRuleActionGroupArrayOutput) ToAlertProcessingRuleActionGroupArrayOutputWithContext(ctx context.Context) AlertProcessingRuleActionGroupArrayOutput { return o } func (o AlertProcessingRuleActionGroupArrayOutput) Index(i pulumi.IntInput) AlertProcessingRuleActionGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AlertProcessingRuleActionGroup { return vs[0].([]*AlertProcessingRuleActionGroup)[vs[1].(int)] }).(AlertProcessingRuleActionGroupOutput) } type AlertProcessingRuleActionGroupMapOutput struct{ *pulumi.OutputState } func (AlertProcessingRuleActionGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertProcessingRuleActionGroup)(nil)).Elem() } func (o AlertProcessingRuleActionGroupMapOutput) ToAlertProcessingRuleActionGroupMapOutput() AlertProcessingRuleActionGroupMapOutput { return o } func (o AlertProcessingRuleActionGroupMapOutput) ToAlertProcessingRuleActionGroupMapOutputWithContext(ctx context.Context) AlertProcessingRuleActionGroupMapOutput { return o } func (o AlertProcessingRuleActionGroupMapOutput) MapIndex(k pulumi.StringInput) AlertProcessingRuleActionGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AlertProcessingRuleActionGroup { return vs[0].(map[string]*AlertProcessingRuleActionGroup)[vs[1].(string)] }).(AlertProcessingRuleActionGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AlertProcessingRuleActionGroupInput)(nil)).Elem(), &AlertProcessingRuleActionGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertProcessingRuleActionGroupArrayInput)(nil)).Elem(), AlertProcessingRuleActionGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertProcessingRuleActionGroupMapInput)(nil)).Elem(), AlertProcessingRuleActionGroupMap{}) pulumi.RegisterOutputType(AlertProcessingRuleActionGroupOutput{}) pulumi.RegisterOutputType(AlertProcessingRuleActionGroupArrayOutput{}) pulumi.RegisterOutputType(AlertProcessingRuleActionGroupMapOutput{}) }
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/monitoring/dataCollectionEndpoint.go
sdk/go/azure/monitoring/dataCollectionEndpoint.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 monitoring import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Data Collection Endpoint. // // ## 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/monitoring" // "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 // } // _, err = monitoring.NewDataCollectionEndpoint(ctx, "example", &monitoring.DataCollectionEndpointArgs{ // Name: pulumi.String("example-mdce"), // ResourceGroupName: example.Name, // Location: example.Location, // Kind: pulumi.String("Windows"), // PublicNetworkAccessEnabled: pulumi.Bool(true), // Description: pulumi.String("monitor_data_collection_endpoint example"), // Tags: pulumi.StringMap{ // "foo": pulumi.String("bar"), // }, // }) // 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` - 2023-03-11 // // ## Import // // Data Collection Endpoints can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/dataCollectionEndpoint:DataCollectionEndpoint example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Insights/dataCollectionEndpoints/endpoint1 // ``` type DataCollectionEndpoint struct { pulumi.CustomResourceState // The endpoint used for accessing configuration, e.g., `https://mydce-abcd.eastus-1.control.monitor.azure.com`. ConfigurationAccessEndpoint pulumi.StringOutput `pulumi:"configurationAccessEndpoint"` // Specifies a description for the Data Collection Endpoint. Description pulumi.StringPtrOutput `pulumi:"description"` // The immutable ID of the Data Collection Endpoint. ImmutableId pulumi.StringOutput `pulumi:"immutableId"` // The kind of the Data Collection Endpoint. Possible values are `Linux` and `Windows`. Kind pulumi.StringPtrOutput `pulumi:"kind"` // The Azure Region where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created. Location pulumi.StringOutput `pulumi:"location"` // The endpoint used for ingesting logs, e.g., `https://mydce-abcd.eastus-1.ingest.monitor.azure.com`. LogsIngestionEndpoint pulumi.StringOutput `pulumi:"logsIngestionEndpoint"` // The endpoint used for ingesting metrics, e.g., `https://mydce-abcd.eastus-1.metrics.ingest.monitor.azure.com`. MetricsIngestionEndpoint pulumi.StringOutput `pulumi:"metricsIngestionEndpoint"` // The name which should be used for this Data Collection Endpoint. Changing this forces a new Data Collection Endpoint to be created. Name pulumi.StringOutput `pulumi:"name"` // Whether network access from public internet to the Data Collection Endpoint are allowed. Possible values are `true` and `false`. Default to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // The name of the Resource Group where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Data Collection Endpoint. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewDataCollectionEndpoint registers a new resource with the given unique name, arguments, and options. func NewDataCollectionEndpoint(ctx *pulumi.Context, name string, args *DataCollectionEndpointArgs, opts ...pulumi.ResourceOption) (*DataCollectionEndpoint, 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 DataCollectionEndpoint err := ctx.RegisterResource("azure:monitoring/dataCollectionEndpoint:DataCollectionEndpoint", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataCollectionEndpoint gets an existing DataCollectionEndpoint 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 GetDataCollectionEndpoint(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataCollectionEndpointState, opts ...pulumi.ResourceOption) (*DataCollectionEndpoint, error) { var resource DataCollectionEndpoint err := ctx.ReadResource("azure:monitoring/dataCollectionEndpoint:DataCollectionEndpoint", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataCollectionEndpoint resources. type dataCollectionEndpointState struct { // The endpoint used for accessing configuration, e.g., `https://mydce-abcd.eastus-1.control.monitor.azure.com`. ConfigurationAccessEndpoint *string `pulumi:"configurationAccessEndpoint"` // Specifies a description for the Data Collection Endpoint. Description *string `pulumi:"description"` // The immutable ID of the Data Collection Endpoint. ImmutableId *string `pulumi:"immutableId"` // The kind of the Data Collection Endpoint. Possible values are `Linux` and `Windows`. Kind *string `pulumi:"kind"` // The Azure Region where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created. Location *string `pulumi:"location"` // The endpoint used for ingesting logs, e.g., `https://mydce-abcd.eastus-1.ingest.monitor.azure.com`. LogsIngestionEndpoint *string `pulumi:"logsIngestionEndpoint"` // The endpoint used for ingesting metrics, e.g., `https://mydce-abcd.eastus-1.metrics.ingest.monitor.azure.com`. MetricsIngestionEndpoint *string `pulumi:"metricsIngestionEndpoint"` // The name which should be used for this Data Collection Endpoint. Changing this forces a new Data Collection Endpoint to be created. Name *string `pulumi:"name"` // Whether network access from public internet to the Data Collection Endpoint are allowed. Possible values are `true` and `false`. Default to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The name of the Resource Group where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Data Collection Endpoint. Tags map[string]string `pulumi:"tags"` } type DataCollectionEndpointState struct { // The endpoint used for accessing configuration, e.g., `https://mydce-abcd.eastus-1.control.monitor.azure.com`. ConfigurationAccessEndpoint pulumi.StringPtrInput // Specifies a description for the Data Collection Endpoint. Description pulumi.StringPtrInput // The immutable ID of the Data Collection Endpoint. ImmutableId pulumi.StringPtrInput // The kind of the Data Collection Endpoint. Possible values are `Linux` and `Windows`. Kind pulumi.StringPtrInput // The Azure Region where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created. Location pulumi.StringPtrInput // The endpoint used for ingesting logs, e.g., `https://mydce-abcd.eastus-1.ingest.monitor.azure.com`. LogsIngestionEndpoint pulumi.StringPtrInput // The endpoint used for ingesting metrics, e.g., `https://mydce-abcd.eastus-1.metrics.ingest.monitor.azure.com`. MetricsIngestionEndpoint pulumi.StringPtrInput // The name which should be used for this Data Collection Endpoint. Changing this forces a new Data Collection Endpoint to be created. Name pulumi.StringPtrInput // Whether network access from public internet to the Data Collection Endpoint are allowed. Possible values are `true` and `false`. Default to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // The name of the Resource Group where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Data Collection Endpoint. Tags pulumi.StringMapInput } func (DataCollectionEndpointState) ElementType() reflect.Type { return reflect.TypeOf((*dataCollectionEndpointState)(nil)).Elem() } type dataCollectionEndpointArgs struct { // Specifies a description for the Data Collection Endpoint. Description *string `pulumi:"description"` // The kind of the Data Collection Endpoint. Possible values are `Linux` and `Windows`. Kind *string `pulumi:"kind"` // The Azure Region where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created. Location *string `pulumi:"location"` // The name which should be used for this Data Collection Endpoint. Changing this forces a new Data Collection Endpoint to be created. Name *string `pulumi:"name"` // Whether network access from public internet to the Data Collection Endpoint are allowed. Possible values are `true` and `false`. Default to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The name of the Resource Group where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Data Collection Endpoint. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a DataCollectionEndpoint resource. type DataCollectionEndpointArgs struct { // Specifies a description for the Data Collection Endpoint. Description pulumi.StringPtrInput // The kind of the Data Collection Endpoint. Possible values are `Linux` and `Windows`. Kind pulumi.StringPtrInput // The Azure Region where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created. Location pulumi.StringPtrInput // The name which should be used for this Data Collection Endpoint. Changing this forces a new Data Collection Endpoint to be created. Name pulumi.StringPtrInput // Whether network access from public internet to the Data Collection Endpoint are allowed. Possible values are `true` and `false`. Default to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // The name of the Resource Group where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created. ResourceGroupName pulumi.StringInput // A mapping of tags which should be assigned to the Data Collection Endpoint. Tags pulumi.StringMapInput } func (DataCollectionEndpointArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataCollectionEndpointArgs)(nil)).Elem() } type DataCollectionEndpointInput interface { pulumi.Input ToDataCollectionEndpointOutput() DataCollectionEndpointOutput ToDataCollectionEndpointOutputWithContext(ctx context.Context) DataCollectionEndpointOutput } func (*DataCollectionEndpoint) ElementType() reflect.Type { return reflect.TypeOf((**DataCollectionEndpoint)(nil)).Elem() } func (i *DataCollectionEndpoint) ToDataCollectionEndpointOutput() DataCollectionEndpointOutput { return i.ToDataCollectionEndpointOutputWithContext(context.Background()) } func (i *DataCollectionEndpoint) ToDataCollectionEndpointOutputWithContext(ctx context.Context) DataCollectionEndpointOutput { return pulumi.ToOutputWithContext(ctx, i).(DataCollectionEndpointOutput) } // DataCollectionEndpointArrayInput is an input type that accepts DataCollectionEndpointArray and DataCollectionEndpointArrayOutput values. // You can construct a concrete instance of `DataCollectionEndpointArrayInput` via: // // DataCollectionEndpointArray{ DataCollectionEndpointArgs{...} } type DataCollectionEndpointArrayInput interface { pulumi.Input ToDataCollectionEndpointArrayOutput() DataCollectionEndpointArrayOutput ToDataCollectionEndpointArrayOutputWithContext(context.Context) DataCollectionEndpointArrayOutput } type DataCollectionEndpointArray []DataCollectionEndpointInput func (DataCollectionEndpointArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataCollectionEndpoint)(nil)).Elem() } func (i DataCollectionEndpointArray) ToDataCollectionEndpointArrayOutput() DataCollectionEndpointArrayOutput { return i.ToDataCollectionEndpointArrayOutputWithContext(context.Background()) } func (i DataCollectionEndpointArray) ToDataCollectionEndpointArrayOutputWithContext(ctx context.Context) DataCollectionEndpointArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataCollectionEndpointArrayOutput) } // DataCollectionEndpointMapInput is an input type that accepts DataCollectionEndpointMap and DataCollectionEndpointMapOutput values. // You can construct a concrete instance of `DataCollectionEndpointMapInput` via: // // DataCollectionEndpointMap{ "key": DataCollectionEndpointArgs{...} } type DataCollectionEndpointMapInput interface { pulumi.Input ToDataCollectionEndpointMapOutput() DataCollectionEndpointMapOutput ToDataCollectionEndpointMapOutputWithContext(context.Context) DataCollectionEndpointMapOutput } type DataCollectionEndpointMap map[string]DataCollectionEndpointInput func (DataCollectionEndpointMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataCollectionEndpoint)(nil)).Elem() } func (i DataCollectionEndpointMap) ToDataCollectionEndpointMapOutput() DataCollectionEndpointMapOutput { return i.ToDataCollectionEndpointMapOutputWithContext(context.Background()) } func (i DataCollectionEndpointMap) ToDataCollectionEndpointMapOutputWithContext(ctx context.Context) DataCollectionEndpointMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataCollectionEndpointMapOutput) } type DataCollectionEndpointOutput struct{ *pulumi.OutputState } func (DataCollectionEndpointOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataCollectionEndpoint)(nil)).Elem() } func (o DataCollectionEndpointOutput) ToDataCollectionEndpointOutput() DataCollectionEndpointOutput { return o } func (o DataCollectionEndpointOutput) ToDataCollectionEndpointOutputWithContext(ctx context.Context) DataCollectionEndpointOutput { return o } // The endpoint used for accessing configuration, e.g., `https://mydce-abcd.eastus-1.control.monitor.azure.com`. func (o DataCollectionEndpointOutput) ConfigurationAccessEndpoint() pulumi.StringOutput { return o.ApplyT(func(v *DataCollectionEndpoint) pulumi.StringOutput { return v.ConfigurationAccessEndpoint }).(pulumi.StringOutput) } // Specifies a description for the Data Collection Endpoint. func (o DataCollectionEndpointOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *DataCollectionEndpoint) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The immutable ID of the Data Collection Endpoint. func (o DataCollectionEndpointOutput) ImmutableId() pulumi.StringOutput { return o.ApplyT(func(v *DataCollectionEndpoint) pulumi.StringOutput { return v.ImmutableId }).(pulumi.StringOutput) } // The kind of the Data Collection Endpoint. Possible values are `Linux` and `Windows`. func (o DataCollectionEndpointOutput) Kind() pulumi.StringPtrOutput { return o.ApplyT(func(v *DataCollectionEndpoint) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) } // The Azure Region where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created. func (o DataCollectionEndpointOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *DataCollectionEndpoint) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The endpoint used for ingesting logs, e.g., `https://mydce-abcd.eastus-1.ingest.monitor.azure.com`. func (o DataCollectionEndpointOutput) LogsIngestionEndpoint() pulumi.StringOutput { return o.ApplyT(func(v *DataCollectionEndpoint) pulumi.StringOutput { return v.LogsIngestionEndpoint }).(pulumi.StringOutput) } // The endpoint used for ingesting metrics, e.g., `https://mydce-abcd.eastus-1.metrics.ingest.monitor.azure.com`. func (o DataCollectionEndpointOutput) MetricsIngestionEndpoint() pulumi.StringOutput { return o.ApplyT(func(v *DataCollectionEndpoint) pulumi.StringOutput { return v.MetricsIngestionEndpoint }).(pulumi.StringOutput) } // The name which should be used for this Data Collection Endpoint. Changing this forces a new Data Collection Endpoint to be created. func (o DataCollectionEndpointOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataCollectionEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Whether network access from public internet to the Data Collection Endpoint are allowed. Possible values are `true` and `false`. Default to `true`. func (o DataCollectionEndpointOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *DataCollectionEndpoint) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput) } // The name of the Resource Group where the Data Collection Endpoint should exist. Changing this forces a new Data Collection Endpoint to be created. func (o DataCollectionEndpointOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *DataCollectionEndpoint) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Data Collection Endpoint. func (o DataCollectionEndpointOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *DataCollectionEndpoint) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type DataCollectionEndpointArrayOutput struct{ *pulumi.OutputState } func (DataCollectionEndpointArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataCollectionEndpoint)(nil)).Elem() } func (o DataCollectionEndpointArrayOutput) ToDataCollectionEndpointArrayOutput() DataCollectionEndpointArrayOutput { return o } func (o DataCollectionEndpointArrayOutput) ToDataCollectionEndpointArrayOutputWithContext(ctx context.Context) DataCollectionEndpointArrayOutput { return o } func (o DataCollectionEndpointArrayOutput) Index(i pulumi.IntInput) DataCollectionEndpointOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataCollectionEndpoint { return vs[0].([]*DataCollectionEndpoint)[vs[1].(int)] }).(DataCollectionEndpointOutput) } type DataCollectionEndpointMapOutput struct{ *pulumi.OutputState } func (DataCollectionEndpointMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataCollectionEndpoint)(nil)).Elem() } func (o DataCollectionEndpointMapOutput) ToDataCollectionEndpointMapOutput() DataCollectionEndpointMapOutput { return o } func (o DataCollectionEndpointMapOutput) ToDataCollectionEndpointMapOutputWithContext(ctx context.Context) DataCollectionEndpointMapOutput { return o } func (o DataCollectionEndpointMapOutput) MapIndex(k pulumi.StringInput) DataCollectionEndpointOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataCollectionEndpoint { return vs[0].(map[string]*DataCollectionEndpoint)[vs[1].(string)] }).(DataCollectionEndpointOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataCollectionEndpointInput)(nil)).Elem(), &DataCollectionEndpoint{}) pulumi.RegisterInputType(reflect.TypeOf((*DataCollectionEndpointArrayInput)(nil)).Elem(), DataCollectionEndpointArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataCollectionEndpointMapInput)(nil)).Elem(), DataCollectionEndpointMap{}) pulumi.RegisterOutputType(DataCollectionEndpointOutput{}) pulumi.RegisterOutputType(DataCollectionEndpointArrayOutput{}) pulumi.RegisterOutputType(DataCollectionEndpointMapOutput{}) }
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/monitoring/dataCollectionRule.go
sdk/go/azure/monitoring/dataCollectionRule.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 monitoring import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Data Collection Rule. // // ## Import // // Data Collection Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/dataCollectionRule:DataCollectionRule example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Insights/dataCollectionRules/rule1 // ``` type DataCollectionRule struct { pulumi.CustomResourceState // The resource ID of the Data Collection Endpoint that this rule can be used with. DataCollectionEndpointId pulumi.StringPtrOutput `pulumi:"dataCollectionEndpointId"` // One or more `dataFlow` blocks as defined below. DataFlows DataCollectionRuleDataFlowArrayOutput `pulumi:"dataFlows"` // A `dataSources` block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. DataSources DataCollectionRuleDataSourcesPtrOutput `pulumi:"dataSources"` // The description of the Data Collection Rule. Description pulumi.StringPtrOutput `pulumi:"description"` // A `destinations` block as defined below. Destinations DataCollectionRuleDestinationsOutput `pulumi:"destinations"` // An `identity` block as defined below. Identity DataCollectionRuleIdentityPtrOutput `pulumi:"identity"` // The immutable ID of the Data Collection Rule. ImmutableId pulumi.StringOutput `pulumi:"immutableId"` // The kind of the Data Collection Rule. Possible values are `Linux`, `Windows`, `AgentDirectToStore` and `WorkspaceTransforms`. A rule of kind `Linux` does not allow for `windowsEventLog` data sources. And a rule of kind `Windows` does not allow for `syslog` data sources. If kind is not specified, all kinds of data sources are allowed. // // > **Note:** Once `kind` has been set, changing it forces a new Data Collection Rule to be created. Kind pulumi.StringPtrOutput `pulumi:"kind"` // The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `streamDeclaration` block as defined below. StreamDeclarations DataCollectionRuleStreamDeclarationArrayOutput `pulumi:"streamDeclarations"` // A mapping of tags which should be assigned to the Data Collection Rule. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewDataCollectionRule registers a new resource with the given unique name, arguments, and options. func NewDataCollectionRule(ctx *pulumi.Context, name string, args *DataCollectionRuleArgs, opts ...pulumi.ResourceOption) (*DataCollectionRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DataFlows == nil { return nil, errors.New("invalid value for required argument 'DataFlows'") } if args.Destinations == nil { return nil, errors.New("invalid value for required argument 'Destinations'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataCollectionRule err := ctx.RegisterResource("azure:monitoring/dataCollectionRule:DataCollectionRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataCollectionRule gets an existing DataCollectionRule 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 GetDataCollectionRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataCollectionRuleState, opts ...pulumi.ResourceOption) (*DataCollectionRule, error) { var resource DataCollectionRule err := ctx.ReadResource("azure:monitoring/dataCollectionRule:DataCollectionRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataCollectionRule resources. type dataCollectionRuleState struct { // The resource ID of the Data Collection Endpoint that this rule can be used with. DataCollectionEndpointId *string `pulumi:"dataCollectionEndpointId"` // One or more `dataFlow` blocks as defined below. DataFlows []DataCollectionRuleDataFlow `pulumi:"dataFlows"` // A `dataSources` block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. DataSources *DataCollectionRuleDataSources `pulumi:"dataSources"` // The description of the Data Collection Rule. Description *string `pulumi:"description"` // A `destinations` block as defined below. Destinations *DataCollectionRuleDestinations `pulumi:"destinations"` // An `identity` block as defined below. Identity *DataCollectionRuleIdentity `pulumi:"identity"` // The immutable ID of the Data Collection Rule. ImmutableId *string `pulumi:"immutableId"` // The kind of the Data Collection Rule. Possible values are `Linux`, `Windows`, `AgentDirectToStore` and `WorkspaceTransforms`. A rule of kind `Linux` does not allow for `windowsEventLog` data sources. And a rule of kind `Windows` does not allow for `syslog` data sources. If kind is not specified, all kinds of data sources are allowed. // // > **Note:** Once `kind` has been set, changing it forces a new Data Collection Rule to be created. Kind *string `pulumi:"kind"` // The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created. Location *string `pulumi:"location"` // The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `streamDeclaration` block as defined below. StreamDeclarations []DataCollectionRuleStreamDeclaration `pulumi:"streamDeclarations"` // A mapping of tags which should be assigned to the Data Collection Rule. Tags map[string]string `pulumi:"tags"` } type DataCollectionRuleState struct { // The resource ID of the Data Collection Endpoint that this rule can be used with. DataCollectionEndpointId pulumi.StringPtrInput // One or more `dataFlow` blocks as defined below. DataFlows DataCollectionRuleDataFlowArrayInput // A `dataSources` block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. DataSources DataCollectionRuleDataSourcesPtrInput // The description of the Data Collection Rule. Description pulumi.StringPtrInput // A `destinations` block as defined below. Destinations DataCollectionRuleDestinationsPtrInput // An `identity` block as defined below. Identity DataCollectionRuleIdentityPtrInput // The immutable ID of the Data Collection Rule. ImmutableId pulumi.StringPtrInput // The kind of the Data Collection Rule. Possible values are `Linux`, `Windows`, `AgentDirectToStore` and `WorkspaceTransforms`. A rule of kind `Linux` does not allow for `windowsEventLog` data sources. And a rule of kind `Windows` does not allow for `syslog` data sources. If kind is not specified, all kinds of data sources are allowed. // // > **Note:** Once `kind` has been set, changing it forces a new Data Collection Rule to be created. Kind pulumi.StringPtrInput // The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created. Location pulumi.StringPtrInput // The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created. ResourceGroupName pulumi.StringPtrInput // A `streamDeclaration` block as defined below. StreamDeclarations DataCollectionRuleStreamDeclarationArrayInput // A mapping of tags which should be assigned to the Data Collection Rule. Tags pulumi.StringMapInput } func (DataCollectionRuleState) ElementType() reflect.Type { return reflect.TypeOf((*dataCollectionRuleState)(nil)).Elem() } type dataCollectionRuleArgs struct { // The resource ID of the Data Collection Endpoint that this rule can be used with. DataCollectionEndpointId *string `pulumi:"dataCollectionEndpointId"` // One or more `dataFlow` blocks as defined below. DataFlows []DataCollectionRuleDataFlow `pulumi:"dataFlows"` // A `dataSources` block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. DataSources *DataCollectionRuleDataSources `pulumi:"dataSources"` // The description of the Data Collection Rule. Description *string `pulumi:"description"` // A `destinations` block as defined below. Destinations DataCollectionRuleDestinations `pulumi:"destinations"` // An `identity` block as defined below. Identity *DataCollectionRuleIdentity `pulumi:"identity"` // The kind of the Data Collection Rule. Possible values are `Linux`, `Windows`, `AgentDirectToStore` and `WorkspaceTransforms`. A rule of kind `Linux` does not allow for `windowsEventLog` data sources. And a rule of kind `Windows` does not allow for `syslog` data sources. If kind is not specified, all kinds of data sources are allowed. // // > **Note:** Once `kind` has been set, changing it forces a new Data Collection Rule to be created. Kind *string `pulumi:"kind"` // The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created. Location *string `pulumi:"location"` // The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `streamDeclaration` block as defined below. StreamDeclarations []DataCollectionRuleStreamDeclaration `pulumi:"streamDeclarations"` // A mapping of tags which should be assigned to the Data Collection Rule. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a DataCollectionRule resource. type DataCollectionRuleArgs struct { // The resource ID of the Data Collection Endpoint that this rule can be used with. DataCollectionEndpointId pulumi.StringPtrInput // One or more `dataFlow` blocks as defined below. DataFlows DataCollectionRuleDataFlowArrayInput // A `dataSources` block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. DataSources DataCollectionRuleDataSourcesPtrInput // The description of the Data Collection Rule. Description pulumi.StringPtrInput // A `destinations` block as defined below. Destinations DataCollectionRuleDestinationsInput // An `identity` block as defined below. Identity DataCollectionRuleIdentityPtrInput // The kind of the Data Collection Rule. Possible values are `Linux`, `Windows`, `AgentDirectToStore` and `WorkspaceTransforms`. A rule of kind `Linux` does not allow for `windowsEventLog` data sources. And a rule of kind `Windows` does not allow for `syslog` data sources. If kind is not specified, all kinds of data sources are allowed. // // > **Note:** Once `kind` has been set, changing it forces a new Data Collection Rule to be created. Kind pulumi.StringPtrInput // The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created. Location pulumi.StringPtrInput // The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created. ResourceGroupName pulumi.StringInput // A `streamDeclaration` block as defined below. StreamDeclarations DataCollectionRuleStreamDeclarationArrayInput // A mapping of tags which should be assigned to the Data Collection Rule. Tags pulumi.StringMapInput } func (DataCollectionRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataCollectionRuleArgs)(nil)).Elem() } type DataCollectionRuleInput interface { pulumi.Input ToDataCollectionRuleOutput() DataCollectionRuleOutput ToDataCollectionRuleOutputWithContext(ctx context.Context) DataCollectionRuleOutput } func (*DataCollectionRule) ElementType() reflect.Type { return reflect.TypeOf((**DataCollectionRule)(nil)).Elem() } func (i *DataCollectionRule) ToDataCollectionRuleOutput() DataCollectionRuleOutput { return i.ToDataCollectionRuleOutputWithContext(context.Background()) } func (i *DataCollectionRule) ToDataCollectionRuleOutputWithContext(ctx context.Context) DataCollectionRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(DataCollectionRuleOutput) } // DataCollectionRuleArrayInput is an input type that accepts DataCollectionRuleArray and DataCollectionRuleArrayOutput values. // You can construct a concrete instance of `DataCollectionRuleArrayInput` via: // // DataCollectionRuleArray{ DataCollectionRuleArgs{...} } type DataCollectionRuleArrayInput interface { pulumi.Input ToDataCollectionRuleArrayOutput() DataCollectionRuleArrayOutput ToDataCollectionRuleArrayOutputWithContext(context.Context) DataCollectionRuleArrayOutput } type DataCollectionRuleArray []DataCollectionRuleInput func (DataCollectionRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataCollectionRule)(nil)).Elem() } func (i DataCollectionRuleArray) ToDataCollectionRuleArrayOutput() DataCollectionRuleArrayOutput { return i.ToDataCollectionRuleArrayOutputWithContext(context.Background()) } func (i DataCollectionRuleArray) ToDataCollectionRuleArrayOutputWithContext(ctx context.Context) DataCollectionRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataCollectionRuleArrayOutput) } // DataCollectionRuleMapInput is an input type that accepts DataCollectionRuleMap and DataCollectionRuleMapOutput values. // You can construct a concrete instance of `DataCollectionRuleMapInput` via: // // DataCollectionRuleMap{ "key": DataCollectionRuleArgs{...} } type DataCollectionRuleMapInput interface { pulumi.Input ToDataCollectionRuleMapOutput() DataCollectionRuleMapOutput ToDataCollectionRuleMapOutputWithContext(context.Context) DataCollectionRuleMapOutput } type DataCollectionRuleMap map[string]DataCollectionRuleInput func (DataCollectionRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataCollectionRule)(nil)).Elem() } func (i DataCollectionRuleMap) ToDataCollectionRuleMapOutput() DataCollectionRuleMapOutput { return i.ToDataCollectionRuleMapOutputWithContext(context.Background()) } func (i DataCollectionRuleMap) ToDataCollectionRuleMapOutputWithContext(ctx context.Context) DataCollectionRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataCollectionRuleMapOutput) } type DataCollectionRuleOutput struct{ *pulumi.OutputState } func (DataCollectionRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataCollectionRule)(nil)).Elem() } func (o DataCollectionRuleOutput) ToDataCollectionRuleOutput() DataCollectionRuleOutput { return o } func (o DataCollectionRuleOutput) ToDataCollectionRuleOutputWithContext(ctx context.Context) DataCollectionRuleOutput { return o } // The resource ID of the Data Collection Endpoint that this rule can be used with. func (o DataCollectionRuleOutput) DataCollectionEndpointId() pulumi.StringPtrOutput { return o.ApplyT(func(v *DataCollectionRule) pulumi.StringPtrOutput { return v.DataCollectionEndpointId }).(pulumi.StringPtrOutput) } // One or more `dataFlow` blocks as defined below. func (o DataCollectionRuleOutput) DataFlows() DataCollectionRuleDataFlowArrayOutput { return o.ApplyT(func(v *DataCollectionRule) DataCollectionRuleDataFlowArrayOutput { return v.DataFlows }).(DataCollectionRuleDataFlowArrayOutput) } // A `dataSources` block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. func (o DataCollectionRuleOutput) DataSources() DataCollectionRuleDataSourcesPtrOutput { return o.ApplyT(func(v *DataCollectionRule) DataCollectionRuleDataSourcesPtrOutput { return v.DataSources }).(DataCollectionRuleDataSourcesPtrOutput) } // The description of the Data Collection Rule. func (o DataCollectionRuleOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *DataCollectionRule) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // A `destinations` block as defined below. func (o DataCollectionRuleOutput) Destinations() DataCollectionRuleDestinationsOutput { return o.ApplyT(func(v *DataCollectionRule) DataCollectionRuleDestinationsOutput { return v.Destinations }).(DataCollectionRuleDestinationsOutput) } // An `identity` block as defined below. func (o DataCollectionRuleOutput) Identity() DataCollectionRuleIdentityPtrOutput { return o.ApplyT(func(v *DataCollectionRule) DataCollectionRuleIdentityPtrOutput { return v.Identity }).(DataCollectionRuleIdentityPtrOutput) } // The immutable ID of the Data Collection Rule. func (o DataCollectionRuleOutput) ImmutableId() pulumi.StringOutput { return o.ApplyT(func(v *DataCollectionRule) pulumi.StringOutput { return v.ImmutableId }).(pulumi.StringOutput) } // The kind of the Data Collection Rule. Possible values are `Linux`, `Windows`, `AgentDirectToStore` and `WorkspaceTransforms`. A rule of kind `Linux` does not allow for `windowsEventLog` data sources. And a rule of kind `Windows` does not allow for `syslog` data sources. If kind is not specified, all kinds of data sources are allowed. // // > **Note:** Once `kind` has been set, changing it forces a new Data Collection Rule to be created. func (o DataCollectionRuleOutput) Kind() pulumi.StringPtrOutput { return o.ApplyT(func(v *DataCollectionRule) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) } // The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created. func (o DataCollectionRuleOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *DataCollectionRule) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created. func (o DataCollectionRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataCollectionRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created. func (o DataCollectionRuleOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *DataCollectionRule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `streamDeclaration` block as defined below. func (o DataCollectionRuleOutput) StreamDeclarations() DataCollectionRuleStreamDeclarationArrayOutput { return o.ApplyT(func(v *DataCollectionRule) DataCollectionRuleStreamDeclarationArrayOutput { return v.StreamDeclarations }).(DataCollectionRuleStreamDeclarationArrayOutput) } // A mapping of tags which should be assigned to the Data Collection Rule. func (o DataCollectionRuleOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *DataCollectionRule) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type DataCollectionRuleArrayOutput struct{ *pulumi.OutputState } func (DataCollectionRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataCollectionRule)(nil)).Elem() } func (o DataCollectionRuleArrayOutput) ToDataCollectionRuleArrayOutput() DataCollectionRuleArrayOutput { return o } func (o DataCollectionRuleArrayOutput) ToDataCollectionRuleArrayOutputWithContext(ctx context.Context) DataCollectionRuleArrayOutput { return o } func (o DataCollectionRuleArrayOutput) Index(i pulumi.IntInput) DataCollectionRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataCollectionRule { return vs[0].([]*DataCollectionRule)[vs[1].(int)] }).(DataCollectionRuleOutput) } type DataCollectionRuleMapOutput struct{ *pulumi.OutputState } func (DataCollectionRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataCollectionRule)(nil)).Elem() } func (o DataCollectionRuleMapOutput) ToDataCollectionRuleMapOutput() DataCollectionRuleMapOutput { return o } func (o DataCollectionRuleMapOutput) ToDataCollectionRuleMapOutputWithContext(ctx context.Context) DataCollectionRuleMapOutput { return o } func (o DataCollectionRuleMapOutput) MapIndex(k pulumi.StringInput) DataCollectionRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataCollectionRule { return vs[0].(map[string]*DataCollectionRule)[vs[1].(string)] }).(DataCollectionRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataCollectionRuleInput)(nil)).Elem(), &DataCollectionRule{}) pulumi.RegisterInputType(reflect.TypeOf((*DataCollectionRuleArrayInput)(nil)).Elem(), DataCollectionRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataCollectionRuleMapInput)(nil)).Elem(), DataCollectionRuleMap{}) pulumi.RegisterOutputType(DataCollectionRuleOutput{}) pulumi.RegisterOutputType(DataCollectionRuleArrayOutput{}) pulumi.RegisterOutputType(DataCollectionRuleMapOutput{}) }
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/monitoring/scheduledQueryRulesAlertV2.go
sdk/go/azure/monitoring/scheduledQueryRulesAlertV2.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 monitoring import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an AlertingAction Scheduled Query Rules Version 2 resource within Azure Monitor // // ## 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/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "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 // } // exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{ // Name: pulumi.String("example-ai"), // Location: example.Location, // ResourceGroupName: example.Name, // ApplicationType: pulumi.String("web"), // }) // if err != nil { // return err // } // exampleActionGroup, err := monitoring.NewActionGroup(ctx, "example", &monitoring.ActionGroupArgs{ // Name: pulumi.String("example-mag"), // ResourceGroupName: example.Name, // ShortName: pulumi.String("test mag"), // }) // if err != nil { // return err // } // exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{ // Name: pulumi.String("example-uai"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleAssignment, err := authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{ // Scope: exampleInsights.ID(), // RoleDefinitionName: pulumi.String("Reader"), // PrincipalId: exampleUserAssignedIdentity.PrincipalId, // }) // if err != nil { // return err // } // _, err = monitoring.NewScheduledQueryRulesAlertV2(ctx, "example", &monitoring.ScheduledQueryRulesAlertV2Args{ // Name: pulumi.String("example-msqrv2"), // ResourceGroupName: example.Name, // Location: example.Location, // EvaluationFrequency: pulumi.String("PT10M"), // WindowDuration: pulumi.String("PT10M"), // Scopes: exampleInsights.ID(), // Severity: pulumi.Int(4), // Criterias: monitoring.ScheduledQueryRulesAlertV2CriteriaArray{ // &monitoring.ScheduledQueryRulesAlertV2CriteriaArgs{ // Query: pulumi.String("requests\n | summarize CountByCountry=count() by client_CountryOrRegion\n"), // TimeAggregationMethod: pulumi.String("Maximum"), // Threshold: pulumi.Float64(17.5), // Operator: pulumi.String("LessThan"), // ResourceIdColumn: pulumi.String("client_CountryOrRegion"), // MetricMeasureColumn: pulumi.String("CountByCountry"), // Dimensions: monitoring.ScheduledQueryRulesAlertV2CriteriaDimensionArray{ // &monitoring.ScheduledQueryRulesAlertV2CriteriaDimensionArgs{ // Name: pulumi.String("client_CountryOrRegion"), // Operator: pulumi.String("Exclude"), // Values: pulumi.StringArray{ // pulumi.String("123"), // }, // }, // }, // FailingPeriods: &monitoring.ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs{ // MinimumFailingPeriodsToTriggerAlert: pulumi.Int(1), // NumberOfEvaluationPeriods: pulumi.Int(1), // }, // }, // }, // AutoMitigationEnabled: pulumi.Bool(true), // WorkspaceAlertsStorageEnabled: pulumi.Bool(false), // Description: pulumi.String("example sqr"), // DisplayName: pulumi.String("example-sqr"), // Enabled: pulumi.Bool(true), // QueryTimeRangeOverride: pulumi.String("PT1H"), // SkipQueryValidation: pulumi.Bool(true), // Action: &monitoring.ScheduledQueryRulesAlertV2ActionArgs{ // ActionGroups: pulumi.StringArray{ // exampleActionGroup.ID(), // }, // CustomProperties: pulumi.StringMap{ // "key": pulumi.String("value"), // "key2": pulumi.String("value2"), // }, // }, // Identity: &monitoring.ScheduledQueryRulesAlertV2IdentityArgs{ // Type: pulumi.String("UserAssigned"), // IdentityIds: pulumi.StringArray{ // exampleUserAssignedIdentity.ID(), // }, // }, // Tags: pulumi.StringMap{ // "key": pulumi.String("value"), // "key2": pulumi.String("value2"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // exampleAssignment, // })) // 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` - 2023-03-15-preview // // ## Import // // Monitor Scheduled Query Rule Alert can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/scheduledQueryRulesAlertV2:ScheduledQueryRulesAlertV2 example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Insights/scheduledQueryRules/rule1 // ``` type ScheduledQueryRulesAlertV2 struct { pulumi.CustomResourceState // An `action` block as defined below. Action ScheduledQueryRulesAlertV2ActionPtrOutput `pulumi:"action"` // Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be `true` or `false`. The default is `false`. AutoMitigationEnabled pulumi.BoolPtrOutput `pulumi:"autoMitigationEnabled"` // The api-version used when creating this alert rule. CreatedWithApiVersion pulumi.StringOutput `pulumi:"createdWithApiVersion"` // A `criteria` block as defined below. Criterias ScheduledQueryRulesAlertV2CriteriaArrayOutput `pulumi:"criterias"` // Specifies the description of the scheduled query rule. Description pulumi.StringPtrOutput `pulumi:"description"` // Specifies the display name of the alert rule. DisplayName pulumi.StringPtrOutput `pulumi:"displayName"` // Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be `true` or `false`. Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are `PT1M`, `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D`. // // > **Note:** `evaluationFrequency` cannot be greater than the query look back which is `windowDuration`*`numberOfEvaluationPeriods`. // // > **Note:** `evaluationFrequency` cannot be greater than the `muteActionsAfterAlertDuration`. EvaluationFrequency pulumi.StringOutput `pulumi:"evaluationFrequency"` // An `identity` block as defined below. Identity ScheduledQueryRulesAlertV2IdentityPtrOutput `pulumi:"identity"` // True if this alert rule is a legacy Log Analytic Rule. IsALegacyLogAnalyticsRule pulumi.BoolOutput `pulumi:"isALegacyLogAnalyticsRule"` // The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage. IsWorkspaceAlertsStorageConfigured pulumi.BoolOutput `pulumi:"isWorkspaceAlertsStorageConfigured"` // Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D` and `P2D`. // // > **Note:** `autoMitigationEnabled` and `muteActionsAfterAlertDuration` are mutually exclusive and cannot both be set. MuteActionsAfterAlertDuration pulumi.StringPtrOutput `pulumi:"muteActionsAfterAlertDuration"` // Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Set this if the alert evaluation period is different from the query time range. If not specified, the value is `windowDuration`*`numberOfEvaluationPeriods`. Possible values are `PT5M`, `PT10M`, `PT15M`, `PT20M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D` and `P2D`. // // > **Note:** `queryTimeRangeOverride` cannot be less than the query look back which is `windowDuration`*`numberOfEvaluationPeriods`. QueryTimeRangeOverride pulumi.StringPtrOutput `pulumi:"queryTimeRangeOverride"` // Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list. Scopes pulumi.StringOutput `pulumi:"scopes"` // Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest. Severity pulumi.IntOutput `pulumi:"severity"` // Specifies the flag which indicates whether the provided query should be validated or not. The default is false. SkipQueryValidation pulumi.BoolPtrOutput `pulumi:"skipQueryValidation"` // A mapping of tags which should be assigned to the Monitor Scheduled Query Rule. Tags pulumi.StringMapOutput `pulumi:"tags"` // List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is `Microsoft.Compute/virtualMachines`, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. TargetResourceTypes pulumi.StringArrayOutput `pulumi:"targetResourceTypes"` // Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If `evaluationFrequency` is `PT1M`, possible values are `PT1M`, `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, and `PT6H`. Otherwise, possible values are `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D`, and `P2D`. WindowDuration pulumi.StringOutput `pulumi:"windowDuration"` // Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be `true` or `false`. The default is `false`. WorkspaceAlertsStorageEnabled pulumi.BoolPtrOutput `pulumi:"workspaceAlertsStorageEnabled"` } // NewScheduledQueryRulesAlertV2 registers a new resource with the given unique name, arguments, and options. func NewScheduledQueryRulesAlertV2(ctx *pulumi.Context, name string, args *ScheduledQueryRulesAlertV2Args, opts ...pulumi.ResourceOption) (*ScheduledQueryRulesAlertV2, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Criterias == nil { return nil, errors.New("invalid value for required argument 'Criterias'") } if args.EvaluationFrequency == nil { return nil, errors.New("invalid value for required argument 'EvaluationFrequency'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Scopes == nil { return nil, errors.New("invalid value for required argument 'Scopes'") } if args.Severity == nil { return nil, errors.New("invalid value for required argument 'Severity'") } if args.WindowDuration == nil { return nil, errors.New("invalid value for required argument 'WindowDuration'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ScheduledQueryRulesAlertV2 err := ctx.RegisterResource("azure:monitoring/scheduledQueryRulesAlertV2:ScheduledQueryRulesAlertV2", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetScheduledQueryRulesAlertV2 gets an existing ScheduledQueryRulesAlertV2 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 GetScheduledQueryRulesAlertV2(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ScheduledQueryRulesAlertV2State, opts ...pulumi.ResourceOption) (*ScheduledQueryRulesAlertV2, error) { var resource ScheduledQueryRulesAlertV2 err := ctx.ReadResource("azure:monitoring/scheduledQueryRulesAlertV2:ScheduledQueryRulesAlertV2", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ScheduledQueryRulesAlertV2 resources. type scheduledQueryRulesAlertV2State struct { // An `action` block as defined below. Action *ScheduledQueryRulesAlertV2Action `pulumi:"action"` // Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be `true` or `false`. The default is `false`. AutoMitigationEnabled *bool `pulumi:"autoMitigationEnabled"` // The api-version used when creating this alert rule. CreatedWithApiVersion *string `pulumi:"createdWithApiVersion"` // A `criteria` block as defined below. Criterias []ScheduledQueryRulesAlertV2Criteria `pulumi:"criterias"` // Specifies the description of the scheduled query rule. Description *string `pulumi:"description"` // Specifies the display name of the alert rule. DisplayName *string `pulumi:"displayName"` // Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be `true` or `false`. Defaults to `true`. Enabled *bool `pulumi:"enabled"` // How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are `PT1M`, `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D`. // // > **Note:** `evaluationFrequency` cannot be greater than the query look back which is `windowDuration`*`numberOfEvaluationPeriods`. // // > **Note:** `evaluationFrequency` cannot be greater than the `muteActionsAfterAlertDuration`. EvaluationFrequency *string `pulumi:"evaluationFrequency"` // An `identity` block as defined below. Identity *ScheduledQueryRulesAlertV2Identity `pulumi:"identity"` // True if this alert rule is a legacy Log Analytic Rule. IsALegacyLogAnalyticsRule *bool `pulumi:"isALegacyLogAnalyticsRule"` // The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage. IsWorkspaceAlertsStorageConfigured *bool `pulumi:"isWorkspaceAlertsStorageConfigured"` // Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D` and `P2D`. // // > **Note:** `autoMitigationEnabled` and `muteActionsAfterAlertDuration` are mutually exclusive and cannot both be set. MuteActionsAfterAlertDuration *string `pulumi:"muteActionsAfterAlertDuration"` // Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Set this if the alert evaluation period is different from the query time range. If not specified, the value is `windowDuration`*`numberOfEvaluationPeriods`. Possible values are `PT5M`, `PT10M`, `PT15M`, `PT20M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D` and `P2D`. // // > **Note:** `queryTimeRangeOverride` cannot be less than the query look back which is `windowDuration`*`numberOfEvaluationPeriods`. QueryTimeRangeOverride *string `pulumi:"queryTimeRangeOverride"` // Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list. Scopes *string `pulumi:"scopes"` // Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest. Severity *int `pulumi:"severity"` // Specifies the flag which indicates whether the provided query should be validated or not. The default is false. SkipQueryValidation *bool `pulumi:"skipQueryValidation"` // A mapping of tags which should be assigned to the Monitor Scheduled Query Rule. Tags map[string]string `pulumi:"tags"` // List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is `Microsoft.Compute/virtualMachines`, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. TargetResourceTypes []string `pulumi:"targetResourceTypes"` // Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If `evaluationFrequency` is `PT1M`, possible values are `PT1M`, `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, and `PT6H`. Otherwise, possible values are `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D`, and `P2D`. WindowDuration *string `pulumi:"windowDuration"` // Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be `true` or `false`. The default is `false`. WorkspaceAlertsStorageEnabled *bool `pulumi:"workspaceAlertsStorageEnabled"` } type ScheduledQueryRulesAlertV2State struct { // An `action` block as defined below. Action ScheduledQueryRulesAlertV2ActionPtrInput // Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be `true` or `false`. The default is `false`. AutoMitigationEnabled pulumi.BoolPtrInput // The api-version used when creating this alert rule. CreatedWithApiVersion pulumi.StringPtrInput // A `criteria` block as defined below. Criterias ScheduledQueryRulesAlertV2CriteriaArrayInput // Specifies the description of the scheduled query rule. Description pulumi.StringPtrInput // Specifies the display name of the alert rule. DisplayName pulumi.StringPtrInput // Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be `true` or `false`. Defaults to `true`. Enabled pulumi.BoolPtrInput // How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are `PT1M`, `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D`. // // > **Note:** `evaluationFrequency` cannot be greater than the query look back which is `windowDuration`*`numberOfEvaluationPeriods`. // // > **Note:** `evaluationFrequency` cannot be greater than the `muteActionsAfterAlertDuration`. EvaluationFrequency pulumi.StringPtrInput // An `identity` block as defined below. Identity ScheduledQueryRulesAlertV2IdentityPtrInput // True if this alert rule is a legacy Log Analytic Rule. IsALegacyLogAnalyticsRule pulumi.BoolPtrInput // The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage. IsWorkspaceAlertsStorageConfigured pulumi.BoolPtrInput // Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D` and `P2D`. // // > **Note:** `autoMitigationEnabled` and `muteActionsAfterAlertDuration` are mutually exclusive and cannot both be set. MuteActionsAfterAlertDuration pulumi.StringPtrInput // Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Set this if the alert evaluation period is different from the query time range. If not specified, the value is `windowDuration`*`numberOfEvaluationPeriods`. Possible values are `PT5M`, `PT10M`, `PT15M`, `PT20M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D` and `P2D`. // // > **Note:** `queryTimeRangeOverride` cannot be less than the query look back which is `windowDuration`*`numberOfEvaluationPeriods`. QueryTimeRangeOverride pulumi.StringPtrInput // Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list. Scopes pulumi.StringPtrInput // Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest. Severity pulumi.IntPtrInput // Specifies the flag which indicates whether the provided query should be validated or not. The default is false. SkipQueryValidation pulumi.BoolPtrInput // A mapping of tags which should be assigned to the Monitor Scheduled Query Rule. Tags pulumi.StringMapInput // List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is `Microsoft.Compute/virtualMachines`, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. TargetResourceTypes pulumi.StringArrayInput // Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If `evaluationFrequency` is `PT1M`, possible values are `PT1M`, `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, and `PT6H`. Otherwise, possible values are `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D`, and `P2D`. WindowDuration pulumi.StringPtrInput // Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be `true` or `false`. The default is `false`. WorkspaceAlertsStorageEnabled pulumi.BoolPtrInput } func (ScheduledQueryRulesAlertV2State) ElementType() reflect.Type { return reflect.TypeOf((*scheduledQueryRulesAlertV2State)(nil)).Elem() } type scheduledQueryRulesAlertV2Args struct { // An `action` block as defined below. Action *ScheduledQueryRulesAlertV2Action `pulumi:"action"` // Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be `true` or `false`. The default is `false`. AutoMitigationEnabled *bool `pulumi:"autoMitigationEnabled"` // A `criteria` block as defined below. Criterias []ScheduledQueryRulesAlertV2Criteria `pulumi:"criterias"` // Specifies the description of the scheduled query rule. Description *string `pulumi:"description"` // Specifies the display name of the alert rule. DisplayName *string `pulumi:"displayName"` // Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be `true` or `false`. Defaults to `true`. Enabled *bool `pulumi:"enabled"` // How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are `PT1M`, `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D`. // // > **Note:** `evaluationFrequency` cannot be greater than the query look back which is `windowDuration`*`numberOfEvaluationPeriods`. // // > **Note:** `evaluationFrequency` cannot be greater than the `muteActionsAfterAlertDuration`. EvaluationFrequency string `pulumi:"evaluationFrequency"` // An `identity` block as defined below. Identity *ScheduledQueryRulesAlertV2Identity `pulumi:"identity"` // Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D` and `P2D`. // // > **Note:** `autoMitigationEnabled` and `muteActionsAfterAlertDuration` are mutually exclusive and cannot both be set. MuteActionsAfterAlertDuration *string `pulumi:"muteActionsAfterAlertDuration"` // Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Set this if the alert evaluation period is different from the query time range. If not specified, the value is `windowDuration`*`numberOfEvaluationPeriods`. Possible values are `PT5M`, `PT10M`, `PT15M`, `PT20M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D` and `P2D`. // // > **Note:** `queryTimeRangeOverride` cannot be less than the query look back which is `windowDuration`*`numberOfEvaluationPeriods`. QueryTimeRangeOverride *string `pulumi:"queryTimeRangeOverride"` // Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list. Scopes string `pulumi:"scopes"` // Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest. Severity int `pulumi:"severity"` // Specifies the flag which indicates whether the provided query should be validated or not. The default is false. SkipQueryValidation *bool `pulumi:"skipQueryValidation"` // A mapping of tags which should be assigned to the Monitor Scheduled Query Rule. Tags map[string]string `pulumi:"tags"` // List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is `Microsoft.Compute/virtualMachines`, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. TargetResourceTypes []string `pulumi:"targetResourceTypes"` // Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If `evaluationFrequency` is `PT1M`, possible values are `PT1M`, `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, and `PT6H`. Otherwise, possible values are `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D`, and `P2D`. WindowDuration string `pulumi:"windowDuration"` // Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be `true` or `false`. The default is `false`. WorkspaceAlertsStorageEnabled *bool `pulumi:"workspaceAlertsStorageEnabled"` } // The set of arguments for constructing a ScheduledQueryRulesAlertV2 resource. type ScheduledQueryRulesAlertV2Args struct { // An `action` block as defined below. Action ScheduledQueryRulesAlertV2ActionPtrInput // Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be `true` or `false`. The default is `false`. AutoMitigationEnabled pulumi.BoolPtrInput // A `criteria` block as defined below. Criterias ScheduledQueryRulesAlertV2CriteriaArrayInput // Specifies the description of the scheduled query rule. Description pulumi.StringPtrInput // Specifies the display name of the alert rule. DisplayName pulumi.StringPtrInput // Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be `true` or `false`. Defaults to `true`. Enabled pulumi.BoolPtrInput // How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are `PT1M`, `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D`. // // > **Note:** `evaluationFrequency` cannot be greater than the query look back which is `windowDuration`*`numberOfEvaluationPeriods`. // // > **Note:** `evaluationFrequency` cannot be greater than the `muteActionsAfterAlertDuration`. EvaluationFrequency pulumi.StringInput // An `identity` block as defined below. Identity ScheduledQueryRulesAlertV2IdentityPtrInput // Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D` and `P2D`. // // > **Note:** `autoMitigationEnabled` and `muteActionsAfterAlertDuration` are mutually exclusive and cannot both be set. MuteActionsAfterAlertDuration pulumi.StringPtrInput // Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Set this if the alert evaluation period is different from the query time range. If not specified, the value is `windowDuration`*`numberOfEvaluationPeriods`. Possible values are `PT5M`, `PT10M`, `PT15M`, `PT20M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D` and `P2D`. // // > **Note:** `queryTimeRangeOverride` cannot be less than the query look back which is `windowDuration`*`numberOfEvaluationPeriods`. QueryTimeRangeOverride pulumi.StringPtrInput // Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list. Scopes pulumi.StringInput // Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest. Severity pulumi.IntInput // Specifies the flag which indicates whether the provided query should be validated or not. The default is false. SkipQueryValidation pulumi.BoolPtrInput // A mapping of tags which should be assigned to the Monitor Scheduled Query Rule. Tags pulumi.StringMapInput // List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is `Microsoft.Compute/virtualMachines`, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. TargetResourceTypes pulumi.StringArrayInput // Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If `evaluationFrequency` is `PT1M`, possible values are `PT1M`, `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, and `PT6H`. Otherwise, possible values are `PT5M`, `PT10M`, `PT15M`, `PT30M`, `PT45M`, `PT1H`, `PT2H`, `PT3H`, `PT4H`, `PT5H`, `PT6H`, `P1D`, and `P2D`. WindowDuration pulumi.StringInput // Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be `true` or `false`. The default is `false`. WorkspaceAlertsStorageEnabled pulumi.BoolPtrInput } func (ScheduledQueryRulesAlertV2Args) ElementType() reflect.Type {
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/monitoring/aadDiagnosticSetting.go
sdk/go/azure/monitoring/aadDiagnosticSetting.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 monitoring import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Azure Active Directory Diagnostic Setting for Azure Monitor. // // !> **Note:** The API for this resource does not support service principal authentication. This resource can only be used with Azure CLI authentication. // // ## 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/monitoring" // "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-rg"), // Location: pulumi.String("west europe"), // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageaccount"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountKind: pulumi.String("StorageV2"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // _, err = monitoring.NewAadDiagnosticSetting(ctx, "example", &monitoring.AadDiagnosticSettingArgs{ // Name: pulumi.String("setting1"), // StorageAccountId: exampleAccount.ID(), // EnabledLogs: monitoring.AadDiagnosticSettingEnabledLogArray{ // &monitoring.AadDiagnosticSettingEnabledLogArgs{ // Category: pulumi.String("SignInLogs"), // }, // &monitoring.AadDiagnosticSettingEnabledLogArgs{ // Category: pulumi.String("AuditLogs"), // }, // &monitoring.AadDiagnosticSettingEnabledLogArgs{ // Category: pulumi.String("NonInteractiveUserSignInLogs"), // }, // &monitoring.AadDiagnosticSettingEnabledLogArgs{ // Category: pulumi.String("ServicePrincipalSignInLogs"), // }, // }, // }) // 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.AADIAM` - 2017-04-01 // // ## Import // // Monitor Azure Active Directory Diagnostic Settings can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/aadDiagnosticSetting:AadDiagnosticSetting example /providers/Microsoft.AADIAM/diagnosticSettings/setting1 // ``` type AadDiagnosticSetting struct { pulumi.CustomResourceState // One or more `enabledLog` blocks as defined below. EnabledLogs AadDiagnosticSettingEnabledLogArrayOutput `pulumi:"enabledLogs"` // Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created. // // > **Note:** This can be sourced from the `eventhub.EventHubNamespaceAuthorizationRule` resource and is different from a `eventhub.AuthorizationRule` resource. EventhubAuthorizationRuleId pulumi.StringPtrOutput `pulumi:"eventhubAuthorizationRuleId"` // Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created. EventhubName pulumi.StringPtrOutput `pulumi:"eventhubName"` // Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. LogAnalyticsWorkspaceId pulumi.StringPtrOutput `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created. // // > **Note:** One of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId` and `storageAccountId` must be specified. StorageAccountId pulumi.StringPtrOutput `pulumi:"storageAccountId"` } // NewAadDiagnosticSetting registers a new resource with the given unique name, arguments, and options. func NewAadDiagnosticSetting(ctx *pulumi.Context, name string, args *AadDiagnosticSettingArgs, opts ...pulumi.ResourceOption) (*AadDiagnosticSetting, error) { if args == nil { args = &AadDiagnosticSettingArgs{} } opts = internal.PkgResourceDefaultOpts(opts) var resource AadDiagnosticSetting err := ctx.RegisterResource("azure:monitoring/aadDiagnosticSetting:AadDiagnosticSetting", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAadDiagnosticSetting gets an existing AadDiagnosticSetting 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 GetAadDiagnosticSetting(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AadDiagnosticSettingState, opts ...pulumi.ResourceOption) (*AadDiagnosticSetting, error) { var resource AadDiagnosticSetting err := ctx.ReadResource("azure:monitoring/aadDiagnosticSetting:AadDiagnosticSetting", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AadDiagnosticSetting resources. type aadDiagnosticSettingState struct { // One or more `enabledLog` blocks as defined below. EnabledLogs []AadDiagnosticSettingEnabledLog `pulumi:"enabledLogs"` // Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created. // // > **Note:** This can be sourced from the `eventhub.EventHubNamespaceAuthorizationRule` resource and is different from a `eventhub.AuthorizationRule` resource. EventhubAuthorizationRuleId *string `pulumi:"eventhubAuthorizationRuleId"` // Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created. EventhubName *string `pulumi:"eventhubName"` // Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created. Name *string `pulumi:"name"` // The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created. // // > **Note:** One of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId` and `storageAccountId` must be specified. StorageAccountId *string `pulumi:"storageAccountId"` } type AadDiagnosticSettingState struct { // One or more `enabledLog` blocks as defined below. EnabledLogs AadDiagnosticSettingEnabledLogArrayInput // Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created. // // > **Note:** This can be sourced from the `eventhub.EventHubNamespaceAuthorizationRule` resource and is different from a `eventhub.AuthorizationRule` resource. EventhubAuthorizationRuleId pulumi.StringPtrInput // Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created. EventhubName pulumi.StringPtrInput // Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created. Name pulumi.StringPtrInput // The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created. // // > **Note:** One of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId` and `storageAccountId` must be specified. StorageAccountId pulumi.StringPtrInput } func (AadDiagnosticSettingState) ElementType() reflect.Type { return reflect.TypeOf((*aadDiagnosticSettingState)(nil)).Elem() } type aadDiagnosticSettingArgs struct { // One or more `enabledLog` blocks as defined below. EnabledLogs []AadDiagnosticSettingEnabledLog `pulumi:"enabledLogs"` // Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created. // // > **Note:** This can be sourced from the `eventhub.EventHubNamespaceAuthorizationRule` resource and is different from a `eventhub.AuthorizationRule` resource. EventhubAuthorizationRuleId *string `pulumi:"eventhubAuthorizationRuleId"` // Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created. EventhubName *string `pulumi:"eventhubName"` // Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"` // The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created. Name *string `pulumi:"name"` // The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created. // // > **Note:** One of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId` and `storageAccountId` must be specified. StorageAccountId *string `pulumi:"storageAccountId"` } // The set of arguments for constructing a AadDiagnosticSetting resource. type AadDiagnosticSettingArgs struct { // One or more `enabledLog` blocks as defined below. EnabledLogs AadDiagnosticSettingEnabledLogArrayInput // Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created. // // > **Note:** This can be sourced from the `eventhub.EventHubNamespaceAuthorizationRule` resource and is different from a `eventhub.AuthorizationRule` resource. EventhubAuthorizationRuleId pulumi.StringPtrInput // Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created. EventhubName pulumi.StringPtrInput // Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. LogAnalyticsWorkspaceId pulumi.StringPtrInput // The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created. Name pulumi.StringPtrInput // The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created. // // > **Note:** One of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId` and `storageAccountId` must be specified. StorageAccountId pulumi.StringPtrInput } func (AadDiagnosticSettingArgs) ElementType() reflect.Type { return reflect.TypeOf((*aadDiagnosticSettingArgs)(nil)).Elem() } type AadDiagnosticSettingInput interface { pulumi.Input ToAadDiagnosticSettingOutput() AadDiagnosticSettingOutput ToAadDiagnosticSettingOutputWithContext(ctx context.Context) AadDiagnosticSettingOutput } func (*AadDiagnosticSetting) ElementType() reflect.Type { return reflect.TypeOf((**AadDiagnosticSetting)(nil)).Elem() } func (i *AadDiagnosticSetting) ToAadDiagnosticSettingOutput() AadDiagnosticSettingOutput { return i.ToAadDiagnosticSettingOutputWithContext(context.Background()) } func (i *AadDiagnosticSetting) ToAadDiagnosticSettingOutputWithContext(ctx context.Context) AadDiagnosticSettingOutput { return pulumi.ToOutputWithContext(ctx, i).(AadDiagnosticSettingOutput) } // AadDiagnosticSettingArrayInput is an input type that accepts AadDiagnosticSettingArray and AadDiagnosticSettingArrayOutput values. // You can construct a concrete instance of `AadDiagnosticSettingArrayInput` via: // // AadDiagnosticSettingArray{ AadDiagnosticSettingArgs{...} } type AadDiagnosticSettingArrayInput interface { pulumi.Input ToAadDiagnosticSettingArrayOutput() AadDiagnosticSettingArrayOutput ToAadDiagnosticSettingArrayOutputWithContext(context.Context) AadDiagnosticSettingArrayOutput } type AadDiagnosticSettingArray []AadDiagnosticSettingInput func (AadDiagnosticSettingArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AadDiagnosticSetting)(nil)).Elem() } func (i AadDiagnosticSettingArray) ToAadDiagnosticSettingArrayOutput() AadDiagnosticSettingArrayOutput { return i.ToAadDiagnosticSettingArrayOutputWithContext(context.Background()) } func (i AadDiagnosticSettingArray) ToAadDiagnosticSettingArrayOutputWithContext(ctx context.Context) AadDiagnosticSettingArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AadDiagnosticSettingArrayOutput) } // AadDiagnosticSettingMapInput is an input type that accepts AadDiagnosticSettingMap and AadDiagnosticSettingMapOutput values. // You can construct a concrete instance of `AadDiagnosticSettingMapInput` via: // // AadDiagnosticSettingMap{ "key": AadDiagnosticSettingArgs{...} } type AadDiagnosticSettingMapInput interface { pulumi.Input ToAadDiagnosticSettingMapOutput() AadDiagnosticSettingMapOutput ToAadDiagnosticSettingMapOutputWithContext(context.Context) AadDiagnosticSettingMapOutput } type AadDiagnosticSettingMap map[string]AadDiagnosticSettingInput func (AadDiagnosticSettingMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AadDiagnosticSetting)(nil)).Elem() } func (i AadDiagnosticSettingMap) ToAadDiagnosticSettingMapOutput() AadDiagnosticSettingMapOutput { return i.ToAadDiagnosticSettingMapOutputWithContext(context.Background()) } func (i AadDiagnosticSettingMap) ToAadDiagnosticSettingMapOutputWithContext(ctx context.Context) AadDiagnosticSettingMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AadDiagnosticSettingMapOutput) } type AadDiagnosticSettingOutput struct{ *pulumi.OutputState } func (AadDiagnosticSettingOutput) ElementType() reflect.Type { return reflect.TypeOf((**AadDiagnosticSetting)(nil)).Elem() } func (o AadDiagnosticSettingOutput) ToAadDiagnosticSettingOutput() AadDiagnosticSettingOutput { return o } func (o AadDiagnosticSettingOutput) ToAadDiagnosticSettingOutputWithContext(ctx context.Context) AadDiagnosticSettingOutput { return o } // One or more `enabledLog` blocks as defined below. func (o AadDiagnosticSettingOutput) EnabledLogs() AadDiagnosticSettingEnabledLogArrayOutput { return o.ApplyT(func(v *AadDiagnosticSetting) AadDiagnosticSettingEnabledLogArrayOutput { return v.EnabledLogs }).(AadDiagnosticSettingEnabledLogArrayOutput) } // Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created. // // > **Note:** This can be sourced from the `eventhub.EventHubNamespaceAuthorizationRule` resource and is different from a `eventhub.AuthorizationRule` resource. func (o AadDiagnosticSettingOutput) EventhubAuthorizationRuleId() pulumi.StringPtrOutput { return o.ApplyT(func(v *AadDiagnosticSetting) pulumi.StringPtrOutput { return v.EventhubAuthorizationRuleId }).(pulumi.StringPtrOutput) } // Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created. func (o AadDiagnosticSettingOutput) EventhubName() pulumi.StringPtrOutput { return o.ApplyT(func(v *AadDiagnosticSetting) pulumi.StringPtrOutput { return v.EventhubName }).(pulumi.StringPtrOutput) } // Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. func (o AadDiagnosticSettingOutput) LogAnalyticsWorkspaceId() pulumi.StringPtrOutput { return o.ApplyT(func(v *AadDiagnosticSetting) pulumi.StringPtrOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringPtrOutput) } // The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created. func (o AadDiagnosticSettingOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AadDiagnosticSetting) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created. // // > **Note:** One of `eventhubAuthorizationRuleId`, `logAnalyticsWorkspaceId` and `storageAccountId` must be specified. func (o AadDiagnosticSettingOutput) StorageAccountId() pulumi.StringPtrOutput { return o.ApplyT(func(v *AadDiagnosticSetting) pulumi.StringPtrOutput { return v.StorageAccountId }).(pulumi.StringPtrOutput) } type AadDiagnosticSettingArrayOutput struct{ *pulumi.OutputState } func (AadDiagnosticSettingArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AadDiagnosticSetting)(nil)).Elem() } func (o AadDiagnosticSettingArrayOutput) ToAadDiagnosticSettingArrayOutput() AadDiagnosticSettingArrayOutput { return o } func (o AadDiagnosticSettingArrayOutput) ToAadDiagnosticSettingArrayOutputWithContext(ctx context.Context) AadDiagnosticSettingArrayOutput { return o } func (o AadDiagnosticSettingArrayOutput) Index(i pulumi.IntInput) AadDiagnosticSettingOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AadDiagnosticSetting { return vs[0].([]*AadDiagnosticSetting)[vs[1].(int)] }).(AadDiagnosticSettingOutput) } type AadDiagnosticSettingMapOutput struct{ *pulumi.OutputState } func (AadDiagnosticSettingMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AadDiagnosticSetting)(nil)).Elem() } func (o AadDiagnosticSettingMapOutput) ToAadDiagnosticSettingMapOutput() AadDiagnosticSettingMapOutput { return o } func (o AadDiagnosticSettingMapOutput) ToAadDiagnosticSettingMapOutputWithContext(ctx context.Context) AadDiagnosticSettingMapOutput { return o } func (o AadDiagnosticSettingMapOutput) MapIndex(k pulumi.StringInput) AadDiagnosticSettingOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AadDiagnosticSetting { return vs[0].(map[string]*AadDiagnosticSetting)[vs[1].(string)] }).(AadDiagnosticSettingOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AadDiagnosticSettingInput)(nil)).Elem(), &AadDiagnosticSetting{}) pulumi.RegisterInputType(reflect.TypeOf((*AadDiagnosticSettingArrayInput)(nil)).Elem(), AadDiagnosticSettingArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AadDiagnosticSettingMapInput)(nil)).Elem(), AadDiagnosticSettingMap{}) pulumi.RegisterOutputType(AadDiagnosticSettingOutput{}) pulumi.RegisterOutputType(AadDiagnosticSettingArrayOutput{}) pulumi.RegisterOutputType(AadDiagnosticSettingMapOutput{}) }
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/monitoring/getDataCollectionEndpoint.go
sdk/go/azure/monitoring/getDataCollectionEndpoint.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 monitoring 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 Data Collection Endpoint. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := monitoring.LookupDataCollectionEndpoint(ctx, &monitoring.LookupDataCollectionEndpointArgs{ // Name: "example-mdce", // ResourceGroupName: exampleAzurermResourceGroup.Name, // }, nil) // if err != nil { // return err // } // ctx.Export("endpointId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Insights` - 2023-03-11 func LookupDataCollectionEndpoint(ctx *pulumi.Context, args *LookupDataCollectionEndpointArgs, opts ...pulumi.InvokeOption) (*LookupDataCollectionEndpointResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupDataCollectionEndpointResult err := ctx.Invoke("azure:monitoring/getDataCollectionEndpoint:getDataCollectionEndpoint", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getDataCollectionEndpoint. type LookupDataCollectionEndpointArgs struct { // Specifies the name of the Data Collection Endpoint. Name string `pulumi:"name"` // Specifies the name of the resource group the Data Collection Endpoint is located in. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getDataCollectionEndpoint. type LookupDataCollectionEndpointResult struct { // The endpoint used for accessing configuration, e.g., `https://mydce-abcd.eastus-1.control.monitor.azure.com`. ConfigurationAccessEndpoint string `pulumi:"configurationAccessEndpoint"` // Specifies a description for the Data Collection Endpoint. Description string `pulumi:"description"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The immutable ID of the Data Collection Endpoint. ImmutableId string `pulumi:"immutableId"` // The kind of the Data Collection Endpoint. Possible values are `Linux` and `Windows`. Kind string `pulumi:"kind"` // The Azure Region where the Data Collection Endpoint should exist. Location string `pulumi:"location"` // The endpoint used for ingesting logs, e.g., `https://mydce-abcd.eastus-1.ingest.monitor.azure.com`. LogsIngestionEndpoint string `pulumi:"logsIngestionEndpoint"` // The endpoint used for ingesting metrics, e.g., `https://mydce-abcd.eastus-1.metrics.ingest.monitor.azure.com`. MetricsIngestionEndpoint string `pulumi:"metricsIngestionEndpoint"` Name string `pulumi:"name"` // Whether network access from public internet to the Data Collection Endpoint are allowed. Possible values are `true` and `false`. PublicNetworkAccessEnabled bool `pulumi:"publicNetworkAccessEnabled"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Data Collection Endpoint. Tags map[string]string `pulumi:"tags"` } func LookupDataCollectionEndpointOutput(ctx *pulumi.Context, args LookupDataCollectionEndpointOutputArgs, opts ...pulumi.InvokeOption) LookupDataCollectionEndpointResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupDataCollectionEndpointResultOutput, error) { args := v.(LookupDataCollectionEndpointArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:monitoring/getDataCollectionEndpoint:getDataCollectionEndpoint", args, LookupDataCollectionEndpointResultOutput{}, options).(LookupDataCollectionEndpointResultOutput), nil }).(LookupDataCollectionEndpointResultOutput) } // A collection of arguments for invoking getDataCollectionEndpoint. type LookupDataCollectionEndpointOutputArgs struct { // Specifies the name of the Data Collection Endpoint. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the resource group the Data Collection Endpoint is located in. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupDataCollectionEndpointOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupDataCollectionEndpointArgs)(nil)).Elem() } // A collection of values returned by getDataCollectionEndpoint. type LookupDataCollectionEndpointResultOutput struct{ *pulumi.OutputState } func (LookupDataCollectionEndpointResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupDataCollectionEndpointResult)(nil)).Elem() } func (o LookupDataCollectionEndpointResultOutput) ToLookupDataCollectionEndpointResultOutput() LookupDataCollectionEndpointResultOutput { return o } func (o LookupDataCollectionEndpointResultOutput) ToLookupDataCollectionEndpointResultOutputWithContext(ctx context.Context) LookupDataCollectionEndpointResultOutput { return o } // The endpoint used for accessing configuration, e.g., `https://mydce-abcd.eastus-1.control.monitor.azure.com`. func (o LookupDataCollectionEndpointResultOutput) ConfigurationAccessEndpoint() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionEndpointResult) string { return v.ConfigurationAccessEndpoint }).(pulumi.StringOutput) } // Specifies a description for the Data Collection Endpoint. func (o LookupDataCollectionEndpointResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionEndpointResult) string { return v.Description }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupDataCollectionEndpointResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionEndpointResult) string { return v.Id }).(pulumi.StringOutput) } // The immutable ID of the Data Collection Endpoint. func (o LookupDataCollectionEndpointResultOutput) ImmutableId() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionEndpointResult) string { return v.ImmutableId }).(pulumi.StringOutput) } // The kind of the Data Collection Endpoint. Possible values are `Linux` and `Windows`. func (o LookupDataCollectionEndpointResultOutput) Kind() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionEndpointResult) string { return v.Kind }).(pulumi.StringOutput) } // The Azure Region where the Data Collection Endpoint should exist. func (o LookupDataCollectionEndpointResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionEndpointResult) string { return v.Location }).(pulumi.StringOutput) } // The endpoint used for ingesting logs, e.g., `https://mydce-abcd.eastus-1.ingest.monitor.azure.com`. func (o LookupDataCollectionEndpointResultOutput) LogsIngestionEndpoint() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionEndpointResult) string { return v.LogsIngestionEndpoint }).(pulumi.StringOutput) } // The endpoint used for ingesting metrics, e.g., `https://mydce-abcd.eastus-1.metrics.ingest.monitor.azure.com`. func (o LookupDataCollectionEndpointResultOutput) MetricsIngestionEndpoint() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionEndpointResult) string { return v.MetricsIngestionEndpoint }).(pulumi.StringOutput) } func (o LookupDataCollectionEndpointResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionEndpointResult) string { return v.Name }).(pulumi.StringOutput) } // Whether network access from public internet to the Data Collection Endpoint are allowed. Possible values are `true` and `false`. func (o LookupDataCollectionEndpointResultOutput) PublicNetworkAccessEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupDataCollectionEndpointResult) bool { return v.PublicNetworkAccessEnabled }).(pulumi.BoolOutput) } func (o LookupDataCollectionEndpointResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupDataCollectionEndpointResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Data Collection Endpoint. func (o LookupDataCollectionEndpointResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupDataCollectionEndpointResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupDataCollectionEndpointResultOutput{}) }
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/monitoring/privateLinkScope.go
sdk/go/azure/monitoring/privateLinkScope.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 monitoring 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 Monitor Private Link Scope. // // ## 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/monitoring" // "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 = monitoring.NewPrivateLinkScope(ctx, "example", &monitoring.PrivateLinkScopeArgs{ // Name: pulumi.String("example-ampls"), // ResourceGroupName: example.Name, // IngestionAccessMode: pulumi.String("PrivateOnly"), // QueryAccessMode: pulumi.String("Open"), // }) // 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` - 2021-07-01-preview // // ## Import // // Azure Monitor Private Link Scopes can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/privateLinkScope:PrivateLinkScope example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/privateLinkScopes/pls1 // ``` type PrivateLinkScope struct { pulumi.CustomResourceState // The default ingestion access mode for the associated private endpoints in scope. Possible values are `Open` and `PrivateOnly`. Defaults to `Open`. IngestionAccessMode pulumi.StringPtrOutput `pulumi:"ingestionAccessMode"` // The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The default query access mode for hte associated private endpoints in scope. Possible values are `Open` and `PrivateOnly`. Defaults to `Open`. QueryAccessMode pulumi.StringPtrOutput `pulumi:"queryAccessMode"` // The name of the Resource Group where the Azure Monitor Private Link Scope should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Azure Monitor Private Link Scope. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewPrivateLinkScope registers a new resource with the given unique name, arguments, and options. func NewPrivateLinkScope(ctx *pulumi.Context, name string, args *PrivateLinkScopeArgs, opts ...pulumi.ResourceOption) (*PrivateLinkScope, 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 PrivateLinkScope err := ctx.RegisterResource("azure:monitoring/privateLinkScope:PrivateLinkScope", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPrivateLinkScope gets an existing PrivateLinkScope 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 GetPrivateLinkScope(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PrivateLinkScopeState, opts ...pulumi.ResourceOption) (*PrivateLinkScope, error) { var resource PrivateLinkScope err := ctx.ReadResource("azure:monitoring/privateLinkScope:PrivateLinkScope", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering PrivateLinkScope resources. type privateLinkScopeState struct { // The default ingestion access mode for the associated private endpoints in scope. Possible values are `Open` and `PrivateOnly`. Defaults to `Open`. IngestionAccessMode *string `pulumi:"ingestionAccessMode"` // The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The default query access mode for hte associated private endpoints in scope. Possible values are `Open` and `PrivateOnly`. Defaults to `Open`. QueryAccessMode *string `pulumi:"queryAccessMode"` // The name of the Resource Group where the Azure Monitor Private Link Scope should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Azure Monitor Private Link Scope. Tags map[string]string `pulumi:"tags"` } type PrivateLinkScopeState struct { // The default ingestion access mode for the associated private endpoints in scope. Possible values are `Open` and `PrivateOnly`. Defaults to `Open`. IngestionAccessMode pulumi.StringPtrInput // The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The default query access mode for hte associated private endpoints in scope. Possible values are `Open` and `PrivateOnly`. Defaults to `Open`. QueryAccessMode pulumi.StringPtrInput // The name of the Resource Group where the Azure Monitor Private Link Scope should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Azure Monitor Private Link Scope. Tags pulumi.StringMapInput } func (PrivateLinkScopeState) ElementType() reflect.Type { return reflect.TypeOf((*privateLinkScopeState)(nil)).Elem() } type privateLinkScopeArgs struct { // The default ingestion access mode for the associated private endpoints in scope. Possible values are `Open` and `PrivateOnly`. Defaults to `Open`. IngestionAccessMode *string `pulumi:"ingestionAccessMode"` // The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The default query access mode for hte associated private endpoints in scope. Possible values are `Open` and `PrivateOnly`. Defaults to `Open`. QueryAccessMode *string `pulumi:"queryAccessMode"` // The name of the Resource Group where the Azure Monitor Private Link Scope should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Azure Monitor Private Link Scope. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a PrivateLinkScope resource. type PrivateLinkScopeArgs struct { // The default ingestion access mode for the associated private endpoints in scope. Possible values are `Open` and `PrivateOnly`. Defaults to `Open`. IngestionAccessMode pulumi.StringPtrInput // The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The default query access mode for hte associated private endpoints in scope. Possible values are `Open` and `PrivateOnly`. Defaults to `Open`. QueryAccessMode pulumi.StringPtrInput // The name of the Resource Group where the Azure Monitor Private Link Scope should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags which should be assigned to the Azure Monitor Private Link Scope. Tags pulumi.StringMapInput } func (PrivateLinkScopeArgs) ElementType() reflect.Type { return reflect.TypeOf((*privateLinkScopeArgs)(nil)).Elem() } type PrivateLinkScopeInput interface { pulumi.Input ToPrivateLinkScopeOutput() PrivateLinkScopeOutput ToPrivateLinkScopeOutputWithContext(ctx context.Context) PrivateLinkScopeOutput } func (*PrivateLinkScope) ElementType() reflect.Type { return reflect.TypeOf((**PrivateLinkScope)(nil)).Elem() } func (i *PrivateLinkScope) ToPrivateLinkScopeOutput() PrivateLinkScopeOutput { return i.ToPrivateLinkScopeOutputWithContext(context.Background()) } func (i *PrivateLinkScope) ToPrivateLinkScopeOutputWithContext(ctx context.Context) PrivateLinkScopeOutput { return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkScopeOutput) } // PrivateLinkScopeArrayInput is an input type that accepts PrivateLinkScopeArray and PrivateLinkScopeArrayOutput values. // You can construct a concrete instance of `PrivateLinkScopeArrayInput` via: // // PrivateLinkScopeArray{ PrivateLinkScopeArgs{...} } type PrivateLinkScopeArrayInput interface { pulumi.Input ToPrivateLinkScopeArrayOutput() PrivateLinkScopeArrayOutput ToPrivateLinkScopeArrayOutputWithContext(context.Context) PrivateLinkScopeArrayOutput } type PrivateLinkScopeArray []PrivateLinkScopeInput func (PrivateLinkScopeArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*PrivateLinkScope)(nil)).Elem() } func (i PrivateLinkScopeArray) ToPrivateLinkScopeArrayOutput() PrivateLinkScopeArrayOutput { return i.ToPrivateLinkScopeArrayOutputWithContext(context.Background()) } func (i PrivateLinkScopeArray) ToPrivateLinkScopeArrayOutputWithContext(ctx context.Context) PrivateLinkScopeArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkScopeArrayOutput) } // PrivateLinkScopeMapInput is an input type that accepts PrivateLinkScopeMap and PrivateLinkScopeMapOutput values. // You can construct a concrete instance of `PrivateLinkScopeMapInput` via: // // PrivateLinkScopeMap{ "key": PrivateLinkScopeArgs{...} } type PrivateLinkScopeMapInput interface { pulumi.Input ToPrivateLinkScopeMapOutput() PrivateLinkScopeMapOutput ToPrivateLinkScopeMapOutputWithContext(context.Context) PrivateLinkScopeMapOutput } type PrivateLinkScopeMap map[string]PrivateLinkScopeInput func (PrivateLinkScopeMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PrivateLinkScope)(nil)).Elem() } func (i PrivateLinkScopeMap) ToPrivateLinkScopeMapOutput() PrivateLinkScopeMapOutput { return i.ToPrivateLinkScopeMapOutputWithContext(context.Background()) } func (i PrivateLinkScopeMap) ToPrivateLinkScopeMapOutputWithContext(ctx context.Context) PrivateLinkScopeMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkScopeMapOutput) } type PrivateLinkScopeOutput struct{ *pulumi.OutputState } func (PrivateLinkScopeOutput) ElementType() reflect.Type { return reflect.TypeOf((**PrivateLinkScope)(nil)).Elem() } func (o PrivateLinkScopeOutput) ToPrivateLinkScopeOutput() PrivateLinkScopeOutput { return o } func (o PrivateLinkScopeOutput) ToPrivateLinkScopeOutputWithContext(ctx context.Context) PrivateLinkScopeOutput { return o } // The default ingestion access mode for the associated private endpoints in scope. Possible values are `Open` and `PrivateOnly`. Defaults to `Open`. func (o PrivateLinkScopeOutput) IngestionAccessMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *PrivateLinkScope) pulumi.StringPtrOutput { return v.IngestionAccessMode }).(pulumi.StringPtrOutput) } // The name of the Azure Monitor Private Link Scope. Changing this forces a new resource to be created. func (o PrivateLinkScopeOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *PrivateLinkScope) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The default query access mode for hte associated private endpoints in scope. Possible values are `Open` and `PrivateOnly`. Defaults to `Open`. func (o PrivateLinkScopeOutput) QueryAccessMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *PrivateLinkScope) pulumi.StringPtrOutput { return v.QueryAccessMode }).(pulumi.StringPtrOutput) } // The name of the Resource Group where the Azure Monitor Private Link Scope should exist. Changing this forces a new resource to be created. func (o PrivateLinkScopeOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *PrivateLinkScope) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Azure Monitor Private Link Scope. func (o PrivateLinkScopeOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *PrivateLinkScope) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type PrivateLinkScopeArrayOutput struct{ *pulumi.OutputState } func (PrivateLinkScopeArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*PrivateLinkScope)(nil)).Elem() } func (o PrivateLinkScopeArrayOutput) ToPrivateLinkScopeArrayOutput() PrivateLinkScopeArrayOutput { return o } func (o PrivateLinkScopeArrayOutput) ToPrivateLinkScopeArrayOutputWithContext(ctx context.Context) PrivateLinkScopeArrayOutput { return o } func (o PrivateLinkScopeArrayOutput) Index(i pulumi.IntInput) PrivateLinkScopeOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PrivateLinkScope { return vs[0].([]*PrivateLinkScope)[vs[1].(int)] }).(PrivateLinkScopeOutput) } type PrivateLinkScopeMapOutput struct{ *pulumi.OutputState } func (PrivateLinkScopeMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PrivateLinkScope)(nil)).Elem() } func (o PrivateLinkScopeMapOutput) ToPrivateLinkScopeMapOutput() PrivateLinkScopeMapOutput { return o } func (o PrivateLinkScopeMapOutput) ToPrivateLinkScopeMapOutputWithContext(ctx context.Context) PrivateLinkScopeMapOutput { return o } func (o PrivateLinkScopeMapOutput) MapIndex(k pulumi.StringInput) PrivateLinkScopeOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PrivateLinkScope { return vs[0].(map[string]*PrivateLinkScope)[vs[1].(string)] }).(PrivateLinkScopeOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkScopeInput)(nil)).Elem(), &PrivateLinkScope{}) pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkScopeArrayInput)(nil)).Elem(), PrivateLinkScopeArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkScopeMapInput)(nil)).Elem(), PrivateLinkScopeMap{}) pulumi.RegisterOutputType(PrivateLinkScopeOutput{}) pulumi.RegisterOutputType(PrivateLinkScopeArrayOutput{}) pulumi.RegisterOutputType(PrivateLinkScopeMapOutput{}) }
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/monitoring/workspace.go
sdk/go/azure/monitoring/workspace.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 monitoring 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 Monitor Workspace. // // ## 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/monitoring" // "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 = monitoring.NewWorkspace(ctx, "example", &monitoring.WorkspaceArgs{ // Name: pulumi.String("example-mamw"), // ResourceGroupName: example.Name, // Location: pulumi.String("West Europe"), // 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.Monitor` - 2023-04-03 // // ## Import // // Azure Monitor Workspace can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/workspace:Workspace example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Monitor/accounts/azureMonitorWorkspace1 // ``` type Workspace struct { pulumi.CustomResourceState // The ID of the managed default Data Collection Endpoint created with the Azure Monitor Workspace. DefaultDataCollectionEndpointId pulumi.StringOutput `pulumi:"defaultDataCollectionEndpointId"` // The ID of the managed default Data Collection Rule created with the Azure Monitor Workspace. DefaultDataCollectionRuleId pulumi.StringOutput `pulumi:"defaultDataCollectionRuleId"` // Specifies the Azure Region where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name which should be used for this Azure Monitor Workspace. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Is public network access enabled? Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // The query endpoint for the Azure Monitor Workspace. QueryEndpoint pulumi.StringOutput `pulumi:"queryEndpoint"` // Specifies the name of the Resource Group where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Azure Monitor Workspace. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewWorkspace registers a new resource with the given unique name, arguments, and options. func NewWorkspace(ctx *pulumi.Context, name string, args *WorkspaceArgs, opts ...pulumi.ResourceOption) (*Workspace, 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 Workspace err := ctx.RegisterResource("azure:monitoring/workspace:Workspace", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetWorkspace gets an existing Workspace 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 GetWorkspace(ctx *pulumi.Context, name string, id pulumi.IDInput, state *WorkspaceState, opts ...pulumi.ResourceOption) (*Workspace, error) { var resource Workspace err := ctx.ReadResource("azure:monitoring/workspace:Workspace", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Workspace resources. type workspaceState struct { // The ID of the managed default Data Collection Endpoint created with the Azure Monitor Workspace. DefaultDataCollectionEndpointId *string `pulumi:"defaultDataCollectionEndpointId"` // The ID of the managed default Data Collection Rule created with the Azure Monitor Workspace. DefaultDataCollectionRuleId *string `pulumi:"defaultDataCollectionRuleId"` // Specifies the Azure Region where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name which should be used for this Azure Monitor Workspace. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Is public network access enabled? Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The query endpoint for the Azure Monitor Workspace. QueryEndpoint *string `pulumi:"queryEndpoint"` // Specifies the name of the Resource Group where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Azure Monitor Workspace. Tags map[string]string `pulumi:"tags"` } type WorkspaceState struct { // The ID of the managed default Data Collection Endpoint created with the Azure Monitor Workspace. DefaultDataCollectionEndpointId pulumi.StringPtrInput // The ID of the managed default Data Collection Rule created with the Azure Monitor Workspace. DefaultDataCollectionRuleId pulumi.StringPtrInput // Specifies the Azure Region where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name which should be used for this Azure Monitor Workspace. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Is public network access enabled? Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // The query endpoint for the Azure Monitor Workspace. QueryEndpoint pulumi.StringPtrInput // Specifies the name of the Resource Group where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Azure Monitor Workspace. Tags pulumi.StringMapInput } func (WorkspaceState) ElementType() reflect.Type { return reflect.TypeOf((*workspaceState)(nil)).Elem() } type workspaceArgs struct { // Specifies the Azure Region where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name which should be used for this Azure Monitor Workspace. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Is public network access enabled? Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // Specifies the name of the Resource Group where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Azure Monitor Workspace. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Workspace resource. type WorkspaceArgs struct { // Specifies the Azure Region where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name which should be used for this Azure Monitor Workspace. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Is public network access enabled? Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // Specifies the name of the Resource Group where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags which should be assigned to the Azure Monitor Workspace. Tags pulumi.StringMapInput } func (WorkspaceArgs) ElementType() reflect.Type { return reflect.TypeOf((*workspaceArgs)(nil)).Elem() } type WorkspaceInput interface { pulumi.Input ToWorkspaceOutput() WorkspaceOutput ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput } func (*Workspace) ElementType() reflect.Type { return reflect.TypeOf((**Workspace)(nil)).Elem() } func (i *Workspace) ToWorkspaceOutput() WorkspaceOutput { return i.ToWorkspaceOutputWithContext(context.Background()) } func (i *Workspace) ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceOutput) } // WorkspaceArrayInput is an input type that accepts WorkspaceArray and WorkspaceArrayOutput values. // You can construct a concrete instance of `WorkspaceArrayInput` via: // // WorkspaceArray{ WorkspaceArgs{...} } type WorkspaceArrayInput interface { pulumi.Input ToWorkspaceArrayOutput() WorkspaceArrayOutput ToWorkspaceArrayOutputWithContext(context.Context) WorkspaceArrayOutput } type WorkspaceArray []WorkspaceInput func (WorkspaceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Workspace)(nil)).Elem() } func (i WorkspaceArray) ToWorkspaceArrayOutput() WorkspaceArrayOutput { return i.ToWorkspaceArrayOutputWithContext(context.Background()) } func (i WorkspaceArray) ToWorkspaceArrayOutputWithContext(ctx context.Context) WorkspaceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceArrayOutput) } // WorkspaceMapInput is an input type that accepts WorkspaceMap and WorkspaceMapOutput values. // You can construct a concrete instance of `WorkspaceMapInput` via: // // WorkspaceMap{ "key": WorkspaceArgs{...} } type WorkspaceMapInput interface { pulumi.Input ToWorkspaceMapOutput() WorkspaceMapOutput ToWorkspaceMapOutputWithContext(context.Context) WorkspaceMapOutput } type WorkspaceMap map[string]WorkspaceInput func (WorkspaceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Workspace)(nil)).Elem() } func (i WorkspaceMap) ToWorkspaceMapOutput() WorkspaceMapOutput { return i.ToWorkspaceMapOutputWithContext(context.Background()) } func (i WorkspaceMap) ToWorkspaceMapOutputWithContext(ctx context.Context) WorkspaceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(WorkspaceMapOutput) } type WorkspaceOutput struct{ *pulumi.OutputState } func (WorkspaceOutput) ElementType() reflect.Type { return reflect.TypeOf((**Workspace)(nil)).Elem() } func (o WorkspaceOutput) ToWorkspaceOutput() WorkspaceOutput { return o } func (o WorkspaceOutput) ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput { return o } // The ID of the managed default Data Collection Endpoint created with the Azure Monitor Workspace. func (o WorkspaceOutput) DefaultDataCollectionEndpointId() pulumi.StringOutput { return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.DefaultDataCollectionEndpointId }).(pulumi.StringOutput) } // The ID of the managed default Data Collection Rule created with the Azure Monitor Workspace. func (o WorkspaceOutput) DefaultDataCollectionRuleId() pulumi.StringOutput { return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.DefaultDataCollectionRuleId }).(pulumi.StringOutput) } // Specifies the Azure Region where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created. func (o WorkspaceOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name which should be used for this Azure Monitor Workspace. Changing this forces a new resource to be created. func (o WorkspaceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Is public network access enabled? Defaults to `true`. func (o WorkspaceOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Workspace) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput) } // The query endpoint for the Azure Monitor Workspace. func (o WorkspaceOutput) QueryEndpoint() pulumi.StringOutput { return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.QueryEndpoint }).(pulumi.StringOutput) } // Specifies the name of the Resource Group where the Azure Monitor Workspace should exist. Changing this forces a new resource to be created. func (o WorkspaceOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Azure Monitor Workspace. func (o WorkspaceOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Workspace) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type WorkspaceArrayOutput struct{ *pulumi.OutputState } func (WorkspaceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Workspace)(nil)).Elem() } func (o WorkspaceArrayOutput) ToWorkspaceArrayOutput() WorkspaceArrayOutput { return o } func (o WorkspaceArrayOutput) ToWorkspaceArrayOutputWithContext(ctx context.Context) WorkspaceArrayOutput { return o } func (o WorkspaceArrayOutput) Index(i pulumi.IntInput) WorkspaceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Workspace { return vs[0].([]*Workspace)[vs[1].(int)] }).(WorkspaceOutput) } type WorkspaceMapOutput struct{ *pulumi.OutputState } func (WorkspaceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Workspace)(nil)).Elem() } func (o WorkspaceMapOutput) ToWorkspaceMapOutput() WorkspaceMapOutput { return o } func (o WorkspaceMapOutput) ToWorkspaceMapOutputWithContext(ctx context.Context) WorkspaceMapOutput { return o } func (o WorkspaceMapOutput) MapIndex(k pulumi.StringInput) WorkspaceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Workspace { return vs[0].(map[string]*Workspace)[vs[1].(string)] }).(WorkspaceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceInput)(nil)).Elem(), &Workspace{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceArrayInput)(nil)).Elem(), WorkspaceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceMapInput)(nil)).Elem(), WorkspaceMap{}) pulumi.RegisterOutputType(WorkspaceOutput{}) pulumi.RegisterOutputType(WorkspaceArrayOutput{}) pulumi.RegisterOutputType(WorkspaceMapOutput{}) }
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/monitoring/smartDetectorAlertRule.go
sdk/go/azure/monitoring/smartDetectorAlertRule.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 monitoring import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Monitor Smart Detector Alert 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-azure/sdk/v6/go/azure/monitoring" // "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 // } // exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{ // Name: pulumi.String("example-appinsights"), // Location: example.Location, // ResourceGroupName: example.Name, // ApplicationType: pulumi.String("web"), // }) // if err != nil { // return err // } // exampleActionGroup, err := monitoring.NewActionGroup(ctx, "example", &monitoring.ActionGroupArgs{ // Name: pulumi.String("example-action-group"), // ResourceGroupName: example.Name, // ShortName: pulumi.String("example"), // }) // if err != nil { // return err // } // _, err = monitoring.NewSmartDetectorAlertRule(ctx, "example", &monitoring.SmartDetectorAlertRuleArgs{ // Name: pulumi.String("example-smart-detector-alert-rule"), // ResourceGroupName: example.Name, // Severity: pulumi.String("Sev0"), // ScopeResourceIds: pulumi.StringArray{ // exampleInsights.ID(), // }, // Frequency: pulumi.String("PT1M"), // DetectorType: pulumi.String("FailureAnomaliesDetector"), // ActionGroup: &monitoring.SmartDetectorAlertRuleActionGroupArgs{ // Ids: pulumi.StringArray{ // exampleActionGroup.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.AlertsManagement` - 2019-06-01 // // ## Import // // Monitor Smart Detector Alert Rule can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/smartDetectorAlertRule:SmartDetectorAlertRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AlertsManagement/smartDetectorAlertRules/rule1 // ``` type SmartDetectorAlertRule struct { pulumi.CustomResourceState // An `actionGroup` block as defined below. ActionGroup SmartDetectorAlertRuleActionGroupOutput `pulumi:"actionGroup"` // Specifies a description for the Smart Detector Alert Rule. Description pulumi.StringPtrOutput `pulumi:"description"` // Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are `FailureAnomaliesDetector`, `RequestPerformanceDegradationDetector`, `DependencyPerformanceDegradationDetector`, `ExceptionVolumeChangedDetector`, `TraceSeverityDetector`, `MemoryLeakDetector`. DetectorType pulumi.StringOutput `pulumi:"detectorType"` // Is the Smart Detector Alert Rule enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format. Frequency pulumi.StringOutput `pulumi:"frequency"` // Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the scopes of this Smart Detector Alert Rule. ScopeResourceIds pulumi.StringArrayOutput `pulumi:"scopeResourceIds"` // Specifies the severity of this Smart Detector Alert Rule. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3` or `Sev4`. Severity pulumi.StringOutput `pulumi:"severity"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again. ThrottlingDuration pulumi.StringPtrOutput `pulumi:"throttlingDuration"` } // NewSmartDetectorAlertRule registers a new resource with the given unique name, arguments, and options. func NewSmartDetectorAlertRule(ctx *pulumi.Context, name string, args *SmartDetectorAlertRuleArgs, opts ...pulumi.ResourceOption) (*SmartDetectorAlertRule, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ActionGroup == nil { return nil, errors.New("invalid value for required argument 'ActionGroup'") } if args.DetectorType == nil { return nil, errors.New("invalid value for required argument 'DetectorType'") } if args.Frequency == nil { return nil, errors.New("invalid value for required argument 'Frequency'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.ScopeResourceIds == nil { return nil, errors.New("invalid value for required argument 'ScopeResourceIds'") } if args.Severity == nil { return nil, errors.New("invalid value for required argument 'Severity'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SmartDetectorAlertRule err := ctx.RegisterResource("azure:monitoring/smartDetectorAlertRule:SmartDetectorAlertRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSmartDetectorAlertRule gets an existing SmartDetectorAlertRule 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 GetSmartDetectorAlertRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SmartDetectorAlertRuleState, opts ...pulumi.ResourceOption) (*SmartDetectorAlertRule, error) { var resource SmartDetectorAlertRule err := ctx.ReadResource("azure:monitoring/smartDetectorAlertRule:SmartDetectorAlertRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SmartDetectorAlertRule resources. type smartDetectorAlertRuleState struct { // An `actionGroup` block as defined below. ActionGroup *SmartDetectorAlertRuleActionGroup `pulumi:"actionGroup"` // Specifies a description for the Smart Detector Alert Rule. Description *string `pulumi:"description"` // Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are `FailureAnomaliesDetector`, `RequestPerformanceDegradationDetector`, `DependencyPerformanceDegradationDetector`, `ExceptionVolumeChangedDetector`, `TraceSeverityDetector`, `MemoryLeakDetector`. DetectorType *string `pulumi:"detectorType"` // Is the Smart Detector Alert Rule enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format. Frequency *string `pulumi:"frequency"` // Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the scopes of this Smart Detector Alert Rule. ScopeResourceIds []string `pulumi:"scopeResourceIds"` // Specifies the severity of this Smart Detector Alert Rule. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3` or `Sev4`. Severity *string `pulumi:"severity"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again. ThrottlingDuration *string `pulumi:"throttlingDuration"` } type SmartDetectorAlertRuleState struct { // An `actionGroup` block as defined below. ActionGroup SmartDetectorAlertRuleActionGroupPtrInput // Specifies a description for the Smart Detector Alert Rule. Description pulumi.StringPtrInput // Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are `FailureAnomaliesDetector`, `RequestPerformanceDegradationDetector`, `DependencyPerformanceDegradationDetector`, `ExceptionVolumeChangedDetector`, `TraceSeverityDetector`, `MemoryLeakDetector`. DetectorType pulumi.StringPtrInput // Is the Smart Detector Alert Rule enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format. Frequency pulumi.StringPtrInput // Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the scopes of this Smart Detector Alert Rule. ScopeResourceIds pulumi.StringArrayInput // Specifies the severity of this Smart Detector Alert Rule. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3` or `Sev4`. Severity pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again. ThrottlingDuration pulumi.StringPtrInput } func (SmartDetectorAlertRuleState) ElementType() reflect.Type { return reflect.TypeOf((*smartDetectorAlertRuleState)(nil)).Elem() } type smartDetectorAlertRuleArgs struct { // An `actionGroup` block as defined below. ActionGroup SmartDetectorAlertRuleActionGroup `pulumi:"actionGroup"` // Specifies a description for the Smart Detector Alert Rule. Description *string `pulumi:"description"` // Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are `FailureAnomaliesDetector`, `RequestPerformanceDegradationDetector`, `DependencyPerformanceDegradationDetector`, `ExceptionVolumeChangedDetector`, `TraceSeverityDetector`, `MemoryLeakDetector`. DetectorType string `pulumi:"detectorType"` // Is the Smart Detector Alert Rule enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format. Frequency string `pulumi:"frequency"` // Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the scopes of this Smart Detector Alert Rule. ScopeResourceIds []string `pulumi:"scopeResourceIds"` // Specifies the severity of this Smart Detector Alert Rule. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3` or `Sev4`. Severity string `pulumi:"severity"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again. ThrottlingDuration *string `pulumi:"throttlingDuration"` } // The set of arguments for constructing a SmartDetectorAlertRule resource. type SmartDetectorAlertRuleArgs struct { // An `actionGroup` block as defined below. ActionGroup SmartDetectorAlertRuleActionGroupInput // Specifies a description for the Smart Detector Alert Rule. Description pulumi.StringPtrInput // Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are `FailureAnomaliesDetector`, `RequestPerformanceDegradationDetector`, `DependencyPerformanceDegradationDetector`, `ExceptionVolumeChangedDetector`, `TraceSeverityDetector`, `MemoryLeakDetector`. DetectorType pulumi.StringInput // Is the Smart Detector Alert Rule enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format. Frequency pulumi.StringInput // Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies the scopes of this Smart Detector Alert Rule. ScopeResourceIds pulumi.StringArrayInput // Specifies the severity of this Smart Detector Alert Rule. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3` or `Sev4`. Severity pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again. ThrottlingDuration pulumi.StringPtrInput } func (SmartDetectorAlertRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*smartDetectorAlertRuleArgs)(nil)).Elem() } type SmartDetectorAlertRuleInput interface { pulumi.Input ToSmartDetectorAlertRuleOutput() SmartDetectorAlertRuleOutput ToSmartDetectorAlertRuleOutputWithContext(ctx context.Context) SmartDetectorAlertRuleOutput } func (*SmartDetectorAlertRule) ElementType() reflect.Type { return reflect.TypeOf((**SmartDetectorAlertRule)(nil)).Elem() } func (i *SmartDetectorAlertRule) ToSmartDetectorAlertRuleOutput() SmartDetectorAlertRuleOutput { return i.ToSmartDetectorAlertRuleOutputWithContext(context.Background()) } func (i *SmartDetectorAlertRule) ToSmartDetectorAlertRuleOutputWithContext(ctx context.Context) SmartDetectorAlertRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(SmartDetectorAlertRuleOutput) } // SmartDetectorAlertRuleArrayInput is an input type that accepts SmartDetectorAlertRuleArray and SmartDetectorAlertRuleArrayOutput values. // You can construct a concrete instance of `SmartDetectorAlertRuleArrayInput` via: // // SmartDetectorAlertRuleArray{ SmartDetectorAlertRuleArgs{...} } type SmartDetectorAlertRuleArrayInput interface { pulumi.Input ToSmartDetectorAlertRuleArrayOutput() SmartDetectorAlertRuleArrayOutput ToSmartDetectorAlertRuleArrayOutputWithContext(context.Context) SmartDetectorAlertRuleArrayOutput } type SmartDetectorAlertRuleArray []SmartDetectorAlertRuleInput func (SmartDetectorAlertRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SmartDetectorAlertRule)(nil)).Elem() } func (i SmartDetectorAlertRuleArray) ToSmartDetectorAlertRuleArrayOutput() SmartDetectorAlertRuleArrayOutput { return i.ToSmartDetectorAlertRuleArrayOutputWithContext(context.Background()) } func (i SmartDetectorAlertRuleArray) ToSmartDetectorAlertRuleArrayOutputWithContext(ctx context.Context) SmartDetectorAlertRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SmartDetectorAlertRuleArrayOutput) } // SmartDetectorAlertRuleMapInput is an input type that accepts SmartDetectorAlertRuleMap and SmartDetectorAlertRuleMapOutput values. // You can construct a concrete instance of `SmartDetectorAlertRuleMapInput` via: // // SmartDetectorAlertRuleMap{ "key": SmartDetectorAlertRuleArgs{...} } type SmartDetectorAlertRuleMapInput interface { pulumi.Input ToSmartDetectorAlertRuleMapOutput() SmartDetectorAlertRuleMapOutput ToSmartDetectorAlertRuleMapOutputWithContext(context.Context) SmartDetectorAlertRuleMapOutput } type SmartDetectorAlertRuleMap map[string]SmartDetectorAlertRuleInput func (SmartDetectorAlertRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SmartDetectorAlertRule)(nil)).Elem() } func (i SmartDetectorAlertRuleMap) ToSmartDetectorAlertRuleMapOutput() SmartDetectorAlertRuleMapOutput { return i.ToSmartDetectorAlertRuleMapOutputWithContext(context.Background()) } func (i SmartDetectorAlertRuleMap) ToSmartDetectorAlertRuleMapOutputWithContext(ctx context.Context) SmartDetectorAlertRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SmartDetectorAlertRuleMapOutput) } type SmartDetectorAlertRuleOutput struct{ *pulumi.OutputState } func (SmartDetectorAlertRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**SmartDetectorAlertRule)(nil)).Elem() } func (o SmartDetectorAlertRuleOutput) ToSmartDetectorAlertRuleOutput() SmartDetectorAlertRuleOutput { return o } func (o SmartDetectorAlertRuleOutput) ToSmartDetectorAlertRuleOutputWithContext(ctx context.Context) SmartDetectorAlertRuleOutput { return o } // An `actionGroup` block as defined below. func (o SmartDetectorAlertRuleOutput) ActionGroup() SmartDetectorAlertRuleActionGroupOutput { return o.ApplyT(func(v *SmartDetectorAlertRule) SmartDetectorAlertRuleActionGroupOutput { return v.ActionGroup }).(SmartDetectorAlertRuleActionGroupOutput) } // Specifies a description for the Smart Detector Alert Rule. func (o SmartDetectorAlertRuleOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *SmartDetectorAlertRule) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are `FailureAnomaliesDetector`, `RequestPerformanceDegradationDetector`, `DependencyPerformanceDegradationDetector`, `ExceptionVolumeChangedDetector`, `TraceSeverityDetector`, `MemoryLeakDetector`. func (o SmartDetectorAlertRuleOutput) DetectorType() pulumi.StringOutput { return o.ApplyT(func(v *SmartDetectorAlertRule) pulumi.StringOutput { return v.DetectorType }).(pulumi.StringOutput) } // Is the Smart Detector Alert Rule enabled? Defaults to `true`. func (o SmartDetectorAlertRuleOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *SmartDetectorAlertRule) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format. func (o SmartDetectorAlertRuleOutput) Frequency() pulumi.StringOutput { return o.ApplyT(func(v *SmartDetectorAlertRule) pulumi.StringOutput { return v.Frequency }).(pulumi.StringOutput) } // Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created. func (o SmartDetectorAlertRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SmartDetectorAlertRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created. func (o SmartDetectorAlertRuleOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *SmartDetectorAlertRule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the scopes of this Smart Detector Alert Rule. func (o SmartDetectorAlertRuleOutput) ScopeResourceIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *SmartDetectorAlertRule) pulumi.StringArrayOutput { return v.ScopeResourceIds }).(pulumi.StringArrayOutput) } // Specifies the severity of this Smart Detector Alert Rule. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3` or `Sev4`. func (o SmartDetectorAlertRuleOutput) Severity() pulumi.StringOutput { return o.ApplyT(func(v *SmartDetectorAlertRule) pulumi.StringOutput { return v.Severity }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o SmartDetectorAlertRuleOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *SmartDetectorAlertRule) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again. func (o SmartDetectorAlertRuleOutput) ThrottlingDuration() pulumi.StringPtrOutput { return o.ApplyT(func(v *SmartDetectorAlertRule) pulumi.StringPtrOutput { return v.ThrottlingDuration }).(pulumi.StringPtrOutput) } type SmartDetectorAlertRuleArrayOutput struct{ *pulumi.OutputState } func (SmartDetectorAlertRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SmartDetectorAlertRule)(nil)).Elem() } func (o SmartDetectorAlertRuleArrayOutput) ToSmartDetectorAlertRuleArrayOutput() SmartDetectorAlertRuleArrayOutput { return o } func (o SmartDetectorAlertRuleArrayOutput) ToSmartDetectorAlertRuleArrayOutputWithContext(ctx context.Context) SmartDetectorAlertRuleArrayOutput { return o } func (o SmartDetectorAlertRuleArrayOutput) Index(i pulumi.IntInput) SmartDetectorAlertRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SmartDetectorAlertRule { return vs[0].([]*SmartDetectorAlertRule)[vs[1].(int)] }).(SmartDetectorAlertRuleOutput) } type SmartDetectorAlertRuleMapOutput struct{ *pulumi.OutputState } func (SmartDetectorAlertRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SmartDetectorAlertRule)(nil)).Elem() } func (o SmartDetectorAlertRuleMapOutput) ToSmartDetectorAlertRuleMapOutput() SmartDetectorAlertRuleMapOutput { return o } func (o SmartDetectorAlertRuleMapOutput) ToSmartDetectorAlertRuleMapOutputWithContext(ctx context.Context) SmartDetectorAlertRuleMapOutput { return o } func (o SmartDetectorAlertRuleMapOutput) MapIndex(k pulumi.StringInput) SmartDetectorAlertRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SmartDetectorAlertRule { return vs[0].(map[string]*SmartDetectorAlertRule)[vs[1].(string)] }).(SmartDetectorAlertRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SmartDetectorAlertRuleInput)(nil)).Elem(), &SmartDetectorAlertRule{}) pulumi.RegisterInputType(reflect.TypeOf((*SmartDetectorAlertRuleArrayInput)(nil)).Elem(), SmartDetectorAlertRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SmartDetectorAlertRuleMapInput)(nil)).Elem(), SmartDetectorAlertRuleMap{}) pulumi.RegisterOutputType(SmartDetectorAlertRuleOutput{}) pulumi.RegisterOutputType(SmartDetectorAlertRuleArrayOutput{}) pulumi.RegisterOutputType(SmartDetectorAlertRuleMapOutput{}) }
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/monitoring/alertProcessingRuleSuppression.go
sdk/go/azure/monitoring/alertProcessingRuleSuppression.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 monitoring import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Alert Processing Rule which suppress notifications. // // ## 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/monitoring" // "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 = monitoring.NewAlertProcessingRuleSuppression(ctx, "example", &monitoring.AlertProcessingRuleSuppressionArgs{ // Name: pulumi.String("example"), // ResourceGroupName: pulumi.String("example"), // Scopes: pulumi.StringArray{ // example.ID(), // }, // Condition: &monitoring.AlertProcessingRuleSuppressionConditionArgs{ // TargetResourceType: &monitoring.AlertProcessingRuleSuppressionConditionTargetResourceTypeArgs{ // Operator: pulumi.String("Equals"), // Values: pulumi.StringArray{ // pulumi.String("Microsoft.Compute/VirtualMachines"), // }, // }, // Severity: &monitoring.AlertProcessingRuleSuppressionConditionSeverityArgs{ // Operator: pulumi.String("Equals"), // Values: pulumi.StringArray{ // pulumi.String("Sev0"), // pulumi.String("Sev1"), // pulumi.String("Sev2"), // }, // }, // }, // Schedule: &monitoring.AlertProcessingRuleSuppressionScheduleArgs{ // EffectiveFrom: pulumi.String("2022-01-01T01:02:03"), // EffectiveUntil: pulumi.String("2022-02-02T01:02:03"), // TimeZone: pulumi.String("Pacific Standard Time"), // Recurrence: &monitoring.AlertProcessingRuleSuppressionScheduleRecurrenceArgs{ // Dailies: monitoring.AlertProcessingRuleSuppressionScheduleRecurrenceDailyArray{ // &monitoring.AlertProcessingRuleSuppressionScheduleRecurrenceDailyArgs{ // StartTime: pulumi.String("17:00:00"), // EndTime: pulumi.String("09:00:00"), // }, // }, // Weeklies: monitoring.AlertProcessingRuleSuppressionScheduleRecurrenceWeeklyArray{ // &monitoring.AlertProcessingRuleSuppressionScheduleRecurrenceWeeklyArgs{ // DaysOfWeeks: pulumi.StringArray{ // pulumi.String("Saturday"), // pulumi.String("Sunday"), // }, // }, // }, // }, // }, // Tags: pulumi.StringMap{ // "foo": pulumi.String("bar"), // }, // }) // 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.AlertsManagement` - 2021-08-08 // // ## Import // // Alert Processing Rules can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/alertProcessingRuleSuppression:AlertProcessingRuleSuppression example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.AlertsManagement/actionRules/actionRule1 // ``` type AlertProcessingRuleSuppression struct { pulumi.CustomResourceState // A `condition` block as defined below. Condition AlertProcessingRuleSuppressionConditionPtrOutput `pulumi:"condition"` // Specifies a description for the Alert Processing Rule. Description pulumi.StringPtrOutput `pulumi:"description"` // Should the Alert Processing Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // The name which should be used for this Alert Processing Rule. Changing this forces a new Alert Processing Rule to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Alert Processing Rule should exist. Changing this forces a new Alert Processing Rule to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `schedule` block as defined below. Schedule AlertProcessingRuleSuppressionSchedulePtrOutput `pulumi:"schedule"` // A list of resource IDs which will be the target of Alert Processing Rule. Scopes pulumi.StringArrayOutput `pulumi:"scopes"` // A mapping of tags which should be assigned to the Alert Processing Rule. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewAlertProcessingRuleSuppression registers a new resource with the given unique name, arguments, and options. func NewAlertProcessingRuleSuppression(ctx *pulumi.Context, name string, args *AlertProcessingRuleSuppressionArgs, opts ...pulumi.ResourceOption) (*AlertProcessingRuleSuppression, 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.Scopes == nil { return nil, errors.New("invalid value for required argument 'Scopes'") } aliases := pulumi.Aliases([]pulumi.Alias{ { Type: pulumi.String("azure:monitoring/actionRuleSuppression:ActionRuleSuppression"), }, }) opts = append(opts, aliases) opts = internal.PkgResourceDefaultOpts(opts) var resource AlertProcessingRuleSuppression err := ctx.RegisterResource("azure:monitoring/alertProcessingRuleSuppression:AlertProcessingRuleSuppression", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAlertProcessingRuleSuppression gets an existing AlertProcessingRuleSuppression 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 GetAlertProcessingRuleSuppression(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AlertProcessingRuleSuppressionState, opts ...pulumi.ResourceOption) (*AlertProcessingRuleSuppression, error) { var resource AlertProcessingRuleSuppression err := ctx.ReadResource("azure:monitoring/alertProcessingRuleSuppression:AlertProcessingRuleSuppression", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AlertProcessingRuleSuppression resources. type alertProcessingRuleSuppressionState struct { // A `condition` block as defined below. Condition *AlertProcessingRuleSuppressionCondition `pulumi:"condition"` // Specifies a description for the Alert Processing Rule. Description *string `pulumi:"description"` // Should the Alert Processing Rule be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The name which should be used for this Alert Processing Rule. Changing this forces a new Alert Processing Rule to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Alert Processing Rule should exist. Changing this forces a new Alert Processing Rule to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `schedule` block as defined below. Schedule *AlertProcessingRuleSuppressionSchedule `pulumi:"schedule"` // A list of resource IDs which will be the target of Alert Processing Rule. Scopes []string `pulumi:"scopes"` // A mapping of tags which should be assigned to the Alert Processing Rule. Tags map[string]string `pulumi:"tags"` } type AlertProcessingRuleSuppressionState struct { // A `condition` block as defined below. Condition AlertProcessingRuleSuppressionConditionPtrInput // Specifies a description for the Alert Processing Rule. Description pulumi.StringPtrInput // Should the Alert Processing Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The name which should be used for this Alert Processing Rule. Changing this forces a new Alert Processing Rule to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Alert Processing Rule should exist. Changing this forces a new Alert Processing Rule to be created. ResourceGroupName pulumi.StringPtrInput // A `schedule` block as defined below. Schedule AlertProcessingRuleSuppressionSchedulePtrInput // A list of resource IDs which will be the target of Alert Processing Rule. Scopes pulumi.StringArrayInput // A mapping of tags which should be assigned to the Alert Processing Rule. Tags pulumi.StringMapInput } func (AlertProcessingRuleSuppressionState) ElementType() reflect.Type { return reflect.TypeOf((*alertProcessingRuleSuppressionState)(nil)).Elem() } type alertProcessingRuleSuppressionArgs struct { // A `condition` block as defined below. Condition *AlertProcessingRuleSuppressionCondition `pulumi:"condition"` // Specifies a description for the Alert Processing Rule. Description *string `pulumi:"description"` // Should the Alert Processing Rule be enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // The name which should be used for this Alert Processing Rule. Changing this forces a new Alert Processing Rule to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Alert Processing Rule should exist. Changing this forces a new Alert Processing Rule to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `schedule` block as defined below. Schedule *AlertProcessingRuleSuppressionSchedule `pulumi:"schedule"` // A list of resource IDs which will be the target of Alert Processing Rule. Scopes []string `pulumi:"scopes"` // A mapping of tags which should be assigned to the Alert Processing Rule. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a AlertProcessingRuleSuppression resource. type AlertProcessingRuleSuppressionArgs struct { // A `condition` block as defined below. Condition AlertProcessingRuleSuppressionConditionPtrInput // Specifies a description for the Alert Processing Rule. Description pulumi.StringPtrInput // Should the Alert Processing Rule be enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // The name which should be used for this Alert Processing Rule. Changing this forces a new Alert Processing Rule to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Alert Processing Rule should exist. Changing this forces a new Alert Processing Rule to be created. ResourceGroupName pulumi.StringInput // A `schedule` block as defined below. Schedule AlertProcessingRuleSuppressionSchedulePtrInput // A list of resource IDs which will be the target of Alert Processing Rule. Scopes pulumi.StringArrayInput // A mapping of tags which should be assigned to the Alert Processing Rule. Tags pulumi.StringMapInput } func (AlertProcessingRuleSuppressionArgs) ElementType() reflect.Type { return reflect.TypeOf((*alertProcessingRuleSuppressionArgs)(nil)).Elem() } type AlertProcessingRuleSuppressionInput interface { pulumi.Input ToAlertProcessingRuleSuppressionOutput() AlertProcessingRuleSuppressionOutput ToAlertProcessingRuleSuppressionOutputWithContext(ctx context.Context) AlertProcessingRuleSuppressionOutput } func (*AlertProcessingRuleSuppression) ElementType() reflect.Type { return reflect.TypeOf((**AlertProcessingRuleSuppression)(nil)).Elem() } func (i *AlertProcessingRuleSuppression) ToAlertProcessingRuleSuppressionOutput() AlertProcessingRuleSuppressionOutput { return i.ToAlertProcessingRuleSuppressionOutputWithContext(context.Background()) } func (i *AlertProcessingRuleSuppression) ToAlertProcessingRuleSuppressionOutputWithContext(ctx context.Context) AlertProcessingRuleSuppressionOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertProcessingRuleSuppressionOutput) } // AlertProcessingRuleSuppressionArrayInput is an input type that accepts AlertProcessingRuleSuppressionArray and AlertProcessingRuleSuppressionArrayOutput values. // You can construct a concrete instance of `AlertProcessingRuleSuppressionArrayInput` via: // // AlertProcessingRuleSuppressionArray{ AlertProcessingRuleSuppressionArgs{...} } type AlertProcessingRuleSuppressionArrayInput interface { pulumi.Input ToAlertProcessingRuleSuppressionArrayOutput() AlertProcessingRuleSuppressionArrayOutput ToAlertProcessingRuleSuppressionArrayOutputWithContext(context.Context) AlertProcessingRuleSuppressionArrayOutput } type AlertProcessingRuleSuppressionArray []AlertProcessingRuleSuppressionInput func (AlertProcessingRuleSuppressionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertProcessingRuleSuppression)(nil)).Elem() } func (i AlertProcessingRuleSuppressionArray) ToAlertProcessingRuleSuppressionArrayOutput() AlertProcessingRuleSuppressionArrayOutput { return i.ToAlertProcessingRuleSuppressionArrayOutputWithContext(context.Background()) } func (i AlertProcessingRuleSuppressionArray) ToAlertProcessingRuleSuppressionArrayOutputWithContext(ctx context.Context) AlertProcessingRuleSuppressionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertProcessingRuleSuppressionArrayOutput) } // AlertProcessingRuleSuppressionMapInput is an input type that accepts AlertProcessingRuleSuppressionMap and AlertProcessingRuleSuppressionMapOutput values. // You can construct a concrete instance of `AlertProcessingRuleSuppressionMapInput` via: // // AlertProcessingRuleSuppressionMap{ "key": AlertProcessingRuleSuppressionArgs{...} } type AlertProcessingRuleSuppressionMapInput interface { pulumi.Input ToAlertProcessingRuleSuppressionMapOutput() AlertProcessingRuleSuppressionMapOutput ToAlertProcessingRuleSuppressionMapOutputWithContext(context.Context) AlertProcessingRuleSuppressionMapOutput } type AlertProcessingRuleSuppressionMap map[string]AlertProcessingRuleSuppressionInput func (AlertProcessingRuleSuppressionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertProcessingRuleSuppression)(nil)).Elem() } func (i AlertProcessingRuleSuppressionMap) ToAlertProcessingRuleSuppressionMapOutput() AlertProcessingRuleSuppressionMapOutput { return i.ToAlertProcessingRuleSuppressionMapOutputWithContext(context.Background()) } func (i AlertProcessingRuleSuppressionMap) ToAlertProcessingRuleSuppressionMapOutputWithContext(ctx context.Context) AlertProcessingRuleSuppressionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AlertProcessingRuleSuppressionMapOutput) } type AlertProcessingRuleSuppressionOutput struct{ *pulumi.OutputState } func (AlertProcessingRuleSuppressionOutput) ElementType() reflect.Type { return reflect.TypeOf((**AlertProcessingRuleSuppression)(nil)).Elem() } func (o AlertProcessingRuleSuppressionOutput) ToAlertProcessingRuleSuppressionOutput() AlertProcessingRuleSuppressionOutput { return o } func (o AlertProcessingRuleSuppressionOutput) ToAlertProcessingRuleSuppressionOutputWithContext(ctx context.Context) AlertProcessingRuleSuppressionOutput { return o } // A `condition` block as defined below. func (o AlertProcessingRuleSuppressionOutput) Condition() AlertProcessingRuleSuppressionConditionPtrOutput { return o.ApplyT(func(v *AlertProcessingRuleSuppression) AlertProcessingRuleSuppressionConditionPtrOutput { return v.Condition }).(AlertProcessingRuleSuppressionConditionPtrOutput) } // Specifies a description for the Alert Processing Rule. func (o AlertProcessingRuleSuppressionOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *AlertProcessingRuleSuppression) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Should the Alert Processing Rule be enabled? Defaults to `true`. func (o AlertProcessingRuleSuppressionOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *AlertProcessingRuleSuppression) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // The name which should be used for this Alert Processing Rule. Changing this forces a new Alert Processing Rule to be created. func (o AlertProcessingRuleSuppressionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AlertProcessingRuleSuppression) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Alert Processing Rule should exist. Changing this forces a new Alert Processing Rule to be created. func (o AlertProcessingRuleSuppressionOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *AlertProcessingRuleSuppression) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `schedule` block as defined below. func (o AlertProcessingRuleSuppressionOutput) Schedule() AlertProcessingRuleSuppressionSchedulePtrOutput { return o.ApplyT(func(v *AlertProcessingRuleSuppression) AlertProcessingRuleSuppressionSchedulePtrOutput { return v.Schedule }).(AlertProcessingRuleSuppressionSchedulePtrOutput) } // A list of resource IDs which will be the target of Alert Processing Rule. func (o AlertProcessingRuleSuppressionOutput) Scopes() pulumi.StringArrayOutput { return o.ApplyT(func(v *AlertProcessingRuleSuppression) pulumi.StringArrayOutput { return v.Scopes }).(pulumi.StringArrayOutput) } // A mapping of tags which should be assigned to the Alert Processing Rule. func (o AlertProcessingRuleSuppressionOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *AlertProcessingRuleSuppression) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type AlertProcessingRuleSuppressionArrayOutput struct{ *pulumi.OutputState } func (AlertProcessingRuleSuppressionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AlertProcessingRuleSuppression)(nil)).Elem() } func (o AlertProcessingRuleSuppressionArrayOutput) ToAlertProcessingRuleSuppressionArrayOutput() AlertProcessingRuleSuppressionArrayOutput { return o } func (o AlertProcessingRuleSuppressionArrayOutput) ToAlertProcessingRuleSuppressionArrayOutputWithContext(ctx context.Context) AlertProcessingRuleSuppressionArrayOutput { return o } func (o AlertProcessingRuleSuppressionArrayOutput) Index(i pulumi.IntInput) AlertProcessingRuleSuppressionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AlertProcessingRuleSuppression { return vs[0].([]*AlertProcessingRuleSuppression)[vs[1].(int)] }).(AlertProcessingRuleSuppressionOutput) } type AlertProcessingRuleSuppressionMapOutput struct{ *pulumi.OutputState } func (AlertProcessingRuleSuppressionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AlertProcessingRuleSuppression)(nil)).Elem() } func (o AlertProcessingRuleSuppressionMapOutput) ToAlertProcessingRuleSuppressionMapOutput() AlertProcessingRuleSuppressionMapOutput { return o } func (o AlertProcessingRuleSuppressionMapOutput) ToAlertProcessingRuleSuppressionMapOutputWithContext(ctx context.Context) AlertProcessingRuleSuppressionMapOutput { return o } func (o AlertProcessingRuleSuppressionMapOutput) MapIndex(k pulumi.StringInput) AlertProcessingRuleSuppressionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AlertProcessingRuleSuppression { return vs[0].(map[string]*AlertProcessingRuleSuppression)[vs[1].(string)] }).(AlertProcessingRuleSuppressionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AlertProcessingRuleSuppressionInput)(nil)).Elem(), &AlertProcessingRuleSuppression{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertProcessingRuleSuppressionArrayInput)(nil)).Elem(), AlertProcessingRuleSuppressionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AlertProcessingRuleSuppressionMapInput)(nil)).Elem(), AlertProcessingRuleSuppressionMap{}) pulumi.RegisterOutputType(AlertProcessingRuleSuppressionOutput{}) pulumi.RegisterOutputType(AlertProcessingRuleSuppressionArrayOutput{}) pulumi.RegisterOutputType(AlertProcessingRuleSuppressionMapOutput{}) }
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/monitoring/dataCollectionRuleAssociation.go
sdk/go/azure/monitoring/dataCollectionRuleAssociation.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 monitoring import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Data Collection Rule Association. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring" // "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-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("virtualnetwork"), // 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("subnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{ // Name: pulumi.String("nic"), // Location: example.Location, // ResourceGroupName: example.Name, // IpConfigurations: network.NetworkInterfaceIpConfigurationArray{ // &network.NetworkInterfaceIpConfigurationArgs{ // Name: pulumi.String("internal"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "example", &compute.LinuxVirtualMachineArgs{ // Name: pulumi.String("machine"), // ResourceGroupName: example.Name, // Location: example.Location, // Size: pulumi.String("Standard_B1ls"), // AdminUsername: pulumi.String("adminuser"), // NetworkInterfaceIds: pulumi.StringArray{ // exampleNetworkInterface.ID(), // }, // AdminPassword: pulumi.String("example-Password@7890"), // DisablePasswordAuthentication: pulumi.Bool(false), // OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{ // Caching: pulumi.String("ReadWrite"), // StorageAccountType: pulumi.String("Standard_LRS"), // }, // SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{ // Publisher: pulumi.String("Canonical"), // Offer: pulumi.String("0001-com-ubuntu-server-jammy"), // Sku: pulumi.String("22_04-lts"), // Version: pulumi.String("latest"), // }, // }) // if err != nil { // return err // } // exampleDataCollectionRule, err := monitoring.NewDataCollectionRule(ctx, "example", &monitoring.DataCollectionRuleArgs{ // Name: pulumi.String("example-dcr"), // ResourceGroupName: example.Name, // Location: example.Location, // Destinations: &monitoring.DataCollectionRuleDestinationsArgs{ // AzureMonitorMetrics: &monitoring.DataCollectionRuleDestinationsAzureMonitorMetricsArgs{ // Name: pulumi.String("example-destination-metrics"), // }, // }, // DataFlows: monitoring.DataCollectionRuleDataFlowArray{ // &monitoring.DataCollectionRuleDataFlowArgs{ // Streams: pulumi.StringArray{ // pulumi.String("Microsoft-InsightsMetrics"), // }, // Destinations: pulumi.StringArray{ // pulumi.String("example-destination-metrics"), // }, // }, // }, // }) // if err != nil { // return err // } // exampleDataCollectionEndpoint, err := monitoring.NewDataCollectionEndpoint(ctx, "example", &monitoring.DataCollectionEndpointArgs{ // Name: pulumi.String("example-dce"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // // associate to a Data Collection Rule // _, err = monitoring.NewDataCollectionRuleAssociation(ctx, "example1", &monitoring.DataCollectionRuleAssociationArgs{ // Name: pulumi.String("example1-dcra"), // TargetResourceId: exampleLinuxVirtualMachine.ID(), // DataCollectionRuleId: exampleDataCollectionRule.ID(), // Description: pulumi.String("example"), // }) // if err != nil { // return err // } // // associate to a Data Collection Endpoint // _, err = monitoring.NewDataCollectionRuleAssociation(ctx, "example2", &monitoring.DataCollectionRuleAssociationArgs{ // TargetResourceId: exampleLinuxVirtualMachine.ID(), // DataCollectionEndpointId: exampleDataCollectionEndpoint.ID(), // Description: pulumi.String("example"), // }) // 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` - 2023-03-11 // // ## Import // // Data Collection Rules Association can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:monitoring/dataCollectionRuleAssociation:DataCollectionRuleAssociation example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Insights/dataCollectionRuleAssociations/dca1 // ``` type DataCollectionRuleAssociation struct { pulumi.CustomResourceState // The ID of the Data Collection Endpoint which will be associated to the target resource. DataCollectionEndpointId pulumi.StringPtrOutput `pulumi:"dataCollectionEndpointId"` // The ID of the Data Collection Rule which will be associated to the target resource. // // > **Note:** Exactly one of `dataCollectionEndpointId` and `dataCollectionRuleId` blocks must be specified. DataCollectionRuleId pulumi.StringPtrOutput `pulumi:"dataCollectionRuleId"` // The description of the Data Collection Rule Association. Description pulumi.StringPtrOutput `pulumi:"description"` // The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to `configurationAccessEndpoint`. // // > **Note:** `name` is required when `dataCollectionRuleId` is specified. And when `dataCollectionEndpointId` is specified, the `name` is populated with `configurationAccessEndpoint`. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created. TargetResourceId pulumi.StringOutput `pulumi:"targetResourceId"` } // NewDataCollectionRuleAssociation registers a new resource with the given unique name, arguments, and options. func NewDataCollectionRuleAssociation(ctx *pulumi.Context, name string, args *DataCollectionRuleAssociationArgs, opts ...pulumi.ResourceOption) (*DataCollectionRuleAssociation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.TargetResourceId == nil { return nil, errors.New("invalid value for required argument 'TargetResourceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource DataCollectionRuleAssociation err := ctx.RegisterResource("azure:monitoring/dataCollectionRuleAssociation:DataCollectionRuleAssociation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDataCollectionRuleAssociation gets an existing DataCollectionRuleAssociation 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 GetDataCollectionRuleAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DataCollectionRuleAssociationState, opts ...pulumi.ResourceOption) (*DataCollectionRuleAssociation, error) { var resource DataCollectionRuleAssociation err := ctx.ReadResource("azure:monitoring/dataCollectionRuleAssociation:DataCollectionRuleAssociation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering DataCollectionRuleAssociation resources. type dataCollectionRuleAssociationState struct { // The ID of the Data Collection Endpoint which will be associated to the target resource. DataCollectionEndpointId *string `pulumi:"dataCollectionEndpointId"` // The ID of the Data Collection Rule which will be associated to the target resource. // // > **Note:** Exactly one of `dataCollectionEndpointId` and `dataCollectionRuleId` blocks must be specified. DataCollectionRuleId *string `pulumi:"dataCollectionRuleId"` // The description of the Data Collection Rule Association. Description *string `pulumi:"description"` // The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to `configurationAccessEndpoint`. // // > **Note:** `name` is required when `dataCollectionRuleId` is specified. And when `dataCollectionEndpointId` is specified, the `name` is populated with `configurationAccessEndpoint`. Name *string `pulumi:"name"` // The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created. TargetResourceId *string `pulumi:"targetResourceId"` } type DataCollectionRuleAssociationState struct { // The ID of the Data Collection Endpoint which will be associated to the target resource. DataCollectionEndpointId pulumi.StringPtrInput // The ID of the Data Collection Rule which will be associated to the target resource. // // > **Note:** Exactly one of `dataCollectionEndpointId` and `dataCollectionRuleId` blocks must be specified. DataCollectionRuleId pulumi.StringPtrInput // The description of the Data Collection Rule Association. Description pulumi.StringPtrInput // The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to `configurationAccessEndpoint`. // // > **Note:** `name` is required when `dataCollectionRuleId` is specified. And when `dataCollectionEndpointId` is specified, the `name` is populated with `configurationAccessEndpoint`. Name pulumi.StringPtrInput // The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created. TargetResourceId pulumi.StringPtrInput } func (DataCollectionRuleAssociationState) ElementType() reflect.Type { return reflect.TypeOf((*dataCollectionRuleAssociationState)(nil)).Elem() } type dataCollectionRuleAssociationArgs struct { // The ID of the Data Collection Endpoint which will be associated to the target resource. DataCollectionEndpointId *string `pulumi:"dataCollectionEndpointId"` // The ID of the Data Collection Rule which will be associated to the target resource. // // > **Note:** Exactly one of `dataCollectionEndpointId` and `dataCollectionRuleId` blocks must be specified. DataCollectionRuleId *string `pulumi:"dataCollectionRuleId"` // The description of the Data Collection Rule Association. Description *string `pulumi:"description"` // The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to `configurationAccessEndpoint`. // // > **Note:** `name` is required when `dataCollectionRuleId` is specified. And when `dataCollectionEndpointId` is specified, the `name` is populated with `configurationAccessEndpoint`. Name *string `pulumi:"name"` // The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created. TargetResourceId string `pulumi:"targetResourceId"` } // The set of arguments for constructing a DataCollectionRuleAssociation resource. type DataCollectionRuleAssociationArgs struct { // The ID of the Data Collection Endpoint which will be associated to the target resource. DataCollectionEndpointId pulumi.StringPtrInput // The ID of the Data Collection Rule which will be associated to the target resource. // // > **Note:** Exactly one of `dataCollectionEndpointId` and `dataCollectionRuleId` blocks must be specified. DataCollectionRuleId pulumi.StringPtrInput // The description of the Data Collection Rule Association. Description pulumi.StringPtrInput // The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to `configurationAccessEndpoint`. // // > **Note:** `name` is required when `dataCollectionRuleId` is specified. And when `dataCollectionEndpointId` is specified, the `name` is populated with `configurationAccessEndpoint`. Name pulumi.StringPtrInput // The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created. TargetResourceId pulumi.StringInput } func (DataCollectionRuleAssociationArgs) ElementType() reflect.Type { return reflect.TypeOf((*dataCollectionRuleAssociationArgs)(nil)).Elem() } type DataCollectionRuleAssociationInput interface { pulumi.Input ToDataCollectionRuleAssociationOutput() DataCollectionRuleAssociationOutput ToDataCollectionRuleAssociationOutputWithContext(ctx context.Context) DataCollectionRuleAssociationOutput } func (*DataCollectionRuleAssociation) ElementType() reflect.Type { return reflect.TypeOf((**DataCollectionRuleAssociation)(nil)).Elem() } func (i *DataCollectionRuleAssociation) ToDataCollectionRuleAssociationOutput() DataCollectionRuleAssociationOutput { return i.ToDataCollectionRuleAssociationOutputWithContext(context.Background()) } func (i *DataCollectionRuleAssociation) ToDataCollectionRuleAssociationOutputWithContext(ctx context.Context) DataCollectionRuleAssociationOutput { return pulumi.ToOutputWithContext(ctx, i).(DataCollectionRuleAssociationOutput) } // DataCollectionRuleAssociationArrayInput is an input type that accepts DataCollectionRuleAssociationArray and DataCollectionRuleAssociationArrayOutput values. // You can construct a concrete instance of `DataCollectionRuleAssociationArrayInput` via: // // DataCollectionRuleAssociationArray{ DataCollectionRuleAssociationArgs{...} } type DataCollectionRuleAssociationArrayInput interface { pulumi.Input ToDataCollectionRuleAssociationArrayOutput() DataCollectionRuleAssociationArrayOutput ToDataCollectionRuleAssociationArrayOutputWithContext(context.Context) DataCollectionRuleAssociationArrayOutput } type DataCollectionRuleAssociationArray []DataCollectionRuleAssociationInput func (DataCollectionRuleAssociationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataCollectionRuleAssociation)(nil)).Elem() } func (i DataCollectionRuleAssociationArray) ToDataCollectionRuleAssociationArrayOutput() DataCollectionRuleAssociationArrayOutput { return i.ToDataCollectionRuleAssociationArrayOutputWithContext(context.Background()) } func (i DataCollectionRuleAssociationArray) ToDataCollectionRuleAssociationArrayOutputWithContext(ctx context.Context) DataCollectionRuleAssociationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DataCollectionRuleAssociationArrayOutput) } // DataCollectionRuleAssociationMapInput is an input type that accepts DataCollectionRuleAssociationMap and DataCollectionRuleAssociationMapOutput values. // You can construct a concrete instance of `DataCollectionRuleAssociationMapInput` via: // // DataCollectionRuleAssociationMap{ "key": DataCollectionRuleAssociationArgs{...} } type DataCollectionRuleAssociationMapInput interface { pulumi.Input ToDataCollectionRuleAssociationMapOutput() DataCollectionRuleAssociationMapOutput ToDataCollectionRuleAssociationMapOutputWithContext(context.Context) DataCollectionRuleAssociationMapOutput } type DataCollectionRuleAssociationMap map[string]DataCollectionRuleAssociationInput func (DataCollectionRuleAssociationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataCollectionRuleAssociation)(nil)).Elem() } func (i DataCollectionRuleAssociationMap) ToDataCollectionRuleAssociationMapOutput() DataCollectionRuleAssociationMapOutput { return i.ToDataCollectionRuleAssociationMapOutputWithContext(context.Background()) } func (i DataCollectionRuleAssociationMap) ToDataCollectionRuleAssociationMapOutputWithContext(ctx context.Context) DataCollectionRuleAssociationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DataCollectionRuleAssociationMapOutput) } type DataCollectionRuleAssociationOutput struct{ *pulumi.OutputState } func (DataCollectionRuleAssociationOutput) ElementType() reflect.Type { return reflect.TypeOf((**DataCollectionRuleAssociation)(nil)).Elem() } func (o DataCollectionRuleAssociationOutput) ToDataCollectionRuleAssociationOutput() DataCollectionRuleAssociationOutput { return o } func (o DataCollectionRuleAssociationOutput) ToDataCollectionRuleAssociationOutputWithContext(ctx context.Context) DataCollectionRuleAssociationOutput { return o } // The ID of the Data Collection Endpoint which will be associated to the target resource. func (o DataCollectionRuleAssociationOutput) DataCollectionEndpointId() pulumi.StringPtrOutput { return o.ApplyT(func(v *DataCollectionRuleAssociation) pulumi.StringPtrOutput { return v.DataCollectionEndpointId }).(pulumi.StringPtrOutput) } // The ID of the Data Collection Rule which will be associated to the target resource. // // > **Note:** Exactly one of `dataCollectionEndpointId` and `dataCollectionRuleId` blocks must be specified. func (o DataCollectionRuleAssociationOutput) DataCollectionRuleId() pulumi.StringPtrOutput { return o.ApplyT(func(v *DataCollectionRuleAssociation) pulumi.StringPtrOutput { return v.DataCollectionRuleId }).(pulumi.StringPtrOutput) } // The description of the Data Collection Rule Association. func (o DataCollectionRuleAssociationOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *DataCollectionRuleAssociation) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The name which should be used for this Data Collection Rule Association. Changing this forces a new Data Collection Rule Association to be created. Defaults to `configurationAccessEndpoint`. // // > **Note:** `name` is required when `dataCollectionRuleId` is specified. And when `dataCollectionEndpointId` is specified, the `name` is populated with `configurationAccessEndpoint`. func (o DataCollectionRuleAssociationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *DataCollectionRuleAssociation) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Azure Resource which to associate to a Data Collection Rule or a Data Collection Endpoint. Changing this forces a new resource to be created. func (o DataCollectionRuleAssociationOutput) TargetResourceId() pulumi.StringOutput { return o.ApplyT(func(v *DataCollectionRuleAssociation) pulumi.StringOutput { return v.TargetResourceId }).(pulumi.StringOutput) } type DataCollectionRuleAssociationArrayOutput struct{ *pulumi.OutputState } func (DataCollectionRuleAssociationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*DataCollectionRuleAssociation)(nil)).Elem() } func (o DataCollectionRuleAssociationArrayOutput) ToDataCollectionRuleAssociationArrayOutput() DataCollectionRuleAssociationArrayOutput { return o } func (o DataCollectionRuleAssociationArrayOutput) ToDataCollectionRuleAssociationArrayOutputWithContext(ctx context.Context) DataCollectionRuleAssociationArrayOutput { return o } func (o DataCollectionRuleAssociationArrayOutput) Index(i pulumi.IntInput) DataCollectionRuleAssociationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataCollectionRuleAssociation { return vs[0].([]*DataCollectionRuleAssociation)[vs[1].(int)] }).(DataCollectionRuleAssociationOutput) } type DataCollectionRuleAssociationMapOutput struct{ *pulumi.OutputState } func (DataCollectionRuleAssociationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*DataCollectionRuleAssociation)(nil)).Elem() } func (o DataCollectionRuleAssociationMapOutput) ToDataCollectionRuleAssociationMapOutput() DataCollectionRuleAssociationMapOutput { return o } func (o DataCollectionRuleAssociationMapOutput) ToDataCollectionRuleAssociationMapOutputWithContext(ctx context.Context) DataCollectionRuleAssociationMapOutput { return o } func (o DataCollectionRuleAssociationMapOutput) MapIndex(k pulumi.StringInput) DataCollectionRuleAssociationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataCollectionRuleAssociation { return vs[0].(map[string]*DataCollectionRuleAssociation)[vs[1].(string)] }).(DataCollectionRuleAssociationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DataCollectionRuleAssociationInput)(nil)).Elem(), &DataCollectionRuleAssociation{}) pulumi.RegisterInputType(reflect.TypeOf((*DataCollectionRuleAssociationArrayInput)(nil)).Elem(), DataCollectionRuleAssociationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DataCollectionRuleAssociationMapInput)(nil)).Elem(), DataCollectionRuleAssociationMap{}) pulumi.RegisterOutputType(DataCollectionRuleAssociationOutput{}) pulumi.RegisterOutputType(DataCollectionRuleAssociationArrayOutput{}) pulumi.RegisterOutputType(DataCollectionRuleAssociationMapOutput{}) }
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/lb/init.go
sdk/go/azure/lb/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 lb 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:lb/backendAddressPool:BackendAddressPool": r = &BackendAddressPool{} case "azure:lb/backendAddressPoolAddress:BackendAddressPoolAddress": r = &BackendAddressPoolAddress{} case "azure:lb/loadBalancer:LoadBalancer": r = &LoadBalancer{} case "azure:lb/natPool:NatPool": r = &NatPool{} case "azure:lb/natRule:NatRule": r = &NatRule{} case "azure:lb/outboundRule:OutboundRule": r = &OutboundRule{} case "azure:lb/probe:Probe": r = &Probe{} case "azure:lb/rule:Rule": r = &Rule{} 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", "lb/backendAddressPool", &module{version}, ) pulumi.RegisterResourceModule( "azure", "lb/backendAddressPoolAddress", &module{version}, ) pulumi.RegisterResourceModule( "azure", "lb/loadBalancer", &module{version}, ) pulumi.RegisterResourceModule( "azure", "lb/natPool", &module{version}, ) pulumi.RegisterResourceModule( "azure", "lb/natRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "lb/outboundRule", &module{version}, ) pulumi.RegisterResourceModule( "azure", "lb/probe", &module{version}, ) pulumi.RegisterResourceModule( "azure", "lb/rule", &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/lb/pulumiTypes.go
sdk/go/azure/lb/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 lb 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 BackendAddressPoolAddressInboundNatRulePortMapping struct { // The Backend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address. BackendPort *int `pulumi:"backendPort"` // The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address. FrontendPort *int `pulumi:"frontendPort"` // The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address. InboundNatRuleName *string `pulumi:"inboundNatRuleName"` } // BackendAddressPoolAddressInboundNatRulePortMappingInput is an input type that accepts BackendAddressPoolAddressInboundNatRulePortMappingArgs and BackendAddressPoolAddressInboundNatRulePortMappingOutput values. // You can construct a concrete instance of `BackendAddressPoolAddressInboundNatRulePortMappingInput` via: // // BackendAddressPoolAddressInboundNatRulePortMappingArgs{...} type BackendAddressPoolAddressInboundNatRulePortMappingInput interface { pulumi.Input ToBackendAddressPoolAddressInboundNatRulePortMappingOutput() BackendAddressPoolAddressInboundNatRulePortMappingOutput ToBackendAddressPoolAddressInboundNatRulePortMappingOutputWithContext(context.Context) BackendAddressPoolAddressInboundNatRulePortMappingOutput } type BackendAddressPoolAddressInboundNatRulePortMappingArgs struct { // The Backend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address. BackendPort pulumi.IntPtrInput `pulumi:"backendPort"` // The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address. FrontendPort pulumi.IntPtrInput `pulumi:"frontendPort"` // The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address. InboundNatRuleName pulumi.StringPtrInput `pulumi:"inboundNatRuleName"` } func (BackendAddressPoolAddressInboundNatRulePortMappingArgs) ElementType() reflect.Type { return reflect.TypeOf((*BackendAddressPoolAddressInboundNatRulePortMapping)(nil)).Elem() } func (i BackendAddressPoolAddressInboundNatRulePortMappingArgs) ToBackendAddressPoolAddressInboundNatRulePortMappingOutput() BackendAddressPoolAddressInboundNatRulePortMappingOutput { return i.ToBackendAddressPoolAddressInboundNatRulePortMappingOutputWithContext(context.Background()) } func (i BackendAddressPoolAddressInboundNatRulePortMappingArgs) ToBackendAddressPoolAddressInboundNatRulePortMappingOutputWithContext(ctx context.Context) BackendAddressPoolAddressInboundNatRulePortMappingOutput { return pulumi.ToOutputWithContext(ctx, i).(BackendAddressPoolAddressInboundNatRulePortMappingOutput) } // BackendAddressPoolAddressInboundNatRulePortMappingArrayInput is an input type that accepts BackendAddressPoolAddressInboundNatRulePortMappingArray and BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput values. // You can construct a concrete instance of `BackendAddressPoolAddressInboundNatRulePortMappingArrayInput` via: // // BackendAddressPoolAddressInboundNatRulePortMappingArray{ BackendAddressPoolAddressInboundNatRulePortMappingArgs{...} } type BackendAddressPoolAddressInboundNatRulePortMappingArrayInput interface { pulumi.Input ToBackendAddressPoolAddressInboundNatRulePortMappingArrayOutput() BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput ToBackendAddressPoolAddressInboundNatRulePortMappingArrayOutputWithContext(context.Context) BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput } type BackendAddressPoolAddressInboundNatRulePortMappingArray []BackendAddressPoolAddressInboundNatRulePortMappingInput func (BackendAddressPoolAddressInboundNatRulePortMappingArray) ElementType() reflect.Type { return reflect.TypeOf((*[]BackendAddressPoolAddressInboundNatRulePortMapping)(nil)).Elem() } func (i BackendAddressPoolAddressInboundNatRulePortMappingArray) ToBackendAddressPoolAddressInboundNatRulePortMappingArrayOutput() BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput { return i.ToBackendAddressPoolAddressInboundNatRulePortMappingArrayOutputWithContext(context.Background()) } func (i BackendAddressPoolAddressInboundNatRulePortMappingArray) ToBackendAddressPoolAddressInboundNatRulePortMappingArrayOutputWithContext(ctx context.Context) BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput) } type BackendAddressPoolAddressInboundNatRulePortMappingOutput struct{ *pulumi.OutputState } func (BackendAddressPoolAddressInboundNatRulePortMappingOutput) ElementType() reflect.Type { return reflect.TypeOf((*BackendAddressPoolAddressInboundNatRulePortMapping)(nil)).Elem() } func (o BackendAddressPoolAddressInboundNatRulePortMappingOutput) ToBackendAddressPoolAddressInboundNatRulePortMappingOutput() BackendAddressPoolAddressInboundNatRulePortMappingOutput { return o } func (o BackendAddressPoolAddressInboundNatRulePortMappingOutput) ToBackendAddressPoolAddressInboundNatRulePortMappingOutputWithContext(ctx context.Context) BackendAddressPoolAddressInboundNatRulePortMappingOutput { return o } // The Backend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address. func (o BackendAddressPoolAddressInboundNatRulePortMappingOutput) BackendPort() pulumi.IntPtrOutput { return o.ApplyT(func(v BackendAddressPoolAddressInboundNatRulePortMapping) *int { return v.BackendPort }).(pulumi.IntPtrOutput) } // The Frontend Port of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address. func (o BackendAddressPoolAddressInboundNatRulePortMappingOutput) FrontendPort() pulumi.IntPtrOutput { return o.ApplyT(func(v BackendAddressPoolAddressInboundNatRulePortMapping) *int { return v.FrontendPort }).(pulumi.IntPtrOutput) } // The name of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool Address. func (o BackendAddressPoolAddressInboundNatRulePortMappingOutput) InboundNatRuleName() pulumi.StringPtrOutput { return o.ApplyT(func(v BackendAddressPoolAddressInboundNatRulePortMapping) *string { return v.InboundNatRuleName }).(pulumi.StringPtrOutput) } type BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput struct{ *pulumi.OutputState } func (BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]BackendAddressPoolAddressInboundNatRulePortMapping)(nil)).Elem() } func (o BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput) ToBackendAddressPoolAddressInboundNatRulePortMappingArrayOutput() BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput { return o } func (o BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput) ToBackendAddressPoolAddressInboundNatRulePortMappingArrayOutputWithContext(ctx context.Context) BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput { return o } func (o BackendAddressPoolAddressInboundNatRulePortMappingArrayOutput) Index(i pulumi.IntInput) BackendAddressPoolAddressInboundNatRulePortMappingOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) BackendAddressPoolAddressInboundNatRulePortMapping { return vs[0].([]BackendAddressPoolAddressInboundNatRulePortMapping)[vs[1].(int)] }).(BackendAddressPoolAddressInboundNatRulePortMappingOutput) } type BackendAddressPoolTunnelInterface struct { // The unique identifier of this Gateway Load Balancer Tunnel Interface. Identifier int `pulumi:"identifier"` // The port number that this Gateway Load Balancer Tunnel Interface listens to. Port int `pulumi:"port"` // The protocol used for this Gateway Load Balancer Tunnel Interface. Possible values are `None`, `Native` and `VXLAN`. Protocol string `pulumi:"protocol"` // The traffic type of this Gateway Load Balancer Tunnel Interface. Possible values are `None`, `Internal` and `External`. Type string `pulumi:"type"` } // BackendAddressPoolTunnelInterfaceInput is an input type that accepts BackendAddressPoolTunnelInterfaceArgs and BackendAddressPoolTunnelInterfaceOutput values. // You can construct a concrete instance of `BackendAddressPoolTunnelInterfaceInput` via: // // BackendAddressPoolTunnelInterfaceArgs{...} type BackendAddressPoolTunnelInterfaceInput interface { pulumi.Input ToBackendAddressPoolTunnelInterfaceOutput() BackendAddressPoolTunnelInterfaceOutput ToBackendAddressPoolTunnelInterfaceOutputWithContext(context.Context) BackendAddressPoolTunnelInterfaceOutput } type BackendAddressPoolTunnelInterfaceArgs struct { // The unique identifier of this Gateway Load Balancer Tunnel Interface. Identifier pulumi.IntInput `pulumi:"identifier"` // The port number that this Gateway Load Balancer Tunnel Interface listens to. Port pulumi.IntInput `pulumi:"port"` // The protocol used for this Gateway Load Balancer Tunnel Interface. Possible values are `None`, `Native` and `VXLAN`. Protocol pulumi.StringInput `pulumi:"protocol"` // The traffic type of this Gateway Load Balancer Tunnel Interface. Possible values are `None`, `Internal` and `External`. Type pulumi.StringInput `pulumi:"type"` } func (BackendAddressPoolTunnelInterfaceArgs) ElementType() reflect.Type { return reflect.TypeOf((*BackendAddressPoolTunnelInterface)(nil)).Elem() } func (i BackendAddressPoolTunnelInterfaceArgs) ToBackendAddressPoolTunnelInterfaceOutput() BackendAddressPoolTunnelInterfaceOutput { return i.ToBackendAddressPoolTunnelInterfaceOutputWithContext(context.Background()) } func (i BackendAddressPoolTunnelInterfaceArgs) ToBackendAddressPoolTunnelInterfaceOutputWithContext(ctx context.Context) BackendAddressPoolTunnelInterfaceOutput { return pulumi.ToOutputWithContext(ctx, i).(BackendAddressPoolTunnelInterfaceOutput) } // BackendAddressPoolTunnelInterfaceArrayInput is an input type that accepts BackendAddressPoolTunnelInterfaceArray and BackendAddressPoolTunnelInterfaceArrayOutput values. // You can construct a concrete instance of `BackendAddressPoolTunnelInterfaceArrayInput` via: // // BackendAddressPoolTunnelInterfaceArray{ BackendAddressPoolTunnelInterfaceArgs{...} } type BackendAddressPoolTunnelInterfaceArrayInput interface { pulumi.Input ToBackendAddressPoolTunnelInterfaceArrayOutput() BackendAddressPoolTunnelInterfaceArrayOutput ToBackendAddressPoolTunnelInterfaceArrayOutputWithContext(context.Context) BackendAddressPoolTunnelInterfaceArrayOutput } type BackendAddressPoolTunnelInterfaceArray []BackendAddressPoolTunnelInterfaceInput func (BackendAddressPoolTunnelInterfaceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]BackendAddressPoolTunnelInterface)(nil)).Elem() } func (i BackendAddressPoolTunnelInterfaceArray) ToBackendAddressPoolTunnelInterfaceArrayOutput() BackendAddressPoolTunnelInterfaceArrayOutput { return i.ToBackendAddressPoolTunnelInterfaceArrayOutputWithContext(context.Background()) } func (i BackendAddressPoolTunnelInterfaceArray) ToBackendAddressPoolTunnelInterfaceArrayOutputWithContext(ctx context.Context) BackendAddressPoolTunnelInterfaceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(BackendAddressPoolTunnelInterfaceArrayOutput) } type BackendAddressPoolTunnelInterfaceOutput struct{ *pulumi.OutputState } func (BackendAddressPoolTunnelInterfaceOutput) ElementType() reflect.Type { return reflect.TypeOf((*BackendAddressPoolTunnelInterface)(nil)).Elem() } func (o BackendAddressPoolTunnelInterfaceOutput) ToBackendAddressPoolTunnelInterfaceOutput() BackendAddressPoolTunnelInterfaceOutput { return o } func (o BackendAddressPoolTunnelInterfaceOutput) ToBackendAddressPoolTunnelInterfaceOutputWithContext(ctx context.Context) BackendAddressPoolTunnelInterfaceOutput { return o } // The unique identifier of this Gateway Load Balancer Tunnel Interface. func (o BackendAddressPoolTunnelInterfaceOutput) Identifier() pulumi.IntOutput { return o.ApplyT(func(v BackendAddressPoolTunnelInterface) int { return v.Identifier }).(pulumi.IntOutput) } // The port number that this Gateway Load Balancer Tunnel Interface listens to. func (o BackendAddressPoolTunnelInterfaceOutput) Port() pulumi.IntOutput { return o.ApplyT(func(v BackendAddressPoolTunnelInterface) int { return v.Port }).(pulumi.IntOutput) } // The protocol used for this Gateway Load Balancer Tunnel Interface. Possible values are `None`, `Native` and `VXLAN`. func (o BackendAddressPoolTunnelInterfaceOutput) Protocol() pulumi.StringOutput { return o.ApplyT(func(v BackendAddressPoolTunnelInterface) string { return v.Protocol }).(pulumi.StringOutput) } // The traffic type of this Gateway Load Balancer Tunnel Interface. Possible values are `None`, `Internal` and `External`. func (o BackendAddressPoolTunnelInterfaceOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v BackendAddressPoolTunnelInterface) string { return v.Type }).(pulumi.StringOutput) } type BackendAddressPoolTunnelInterfaceArrayOutput struct{ *pulumi.OutputState } func (BackendAddressPoolTunnelInterfaceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]BackendAddressPoolTunnelInterface)(nil)).Elem() } func (o BackendAddressPoolTunnelInterfaceArrayOutput) ToBackendAddressPoolTunnelInterfaceArrayOutput() BackendAddressPoolTunnelInterfaceArrayOutput { return o } func (o BackendAddressPoolTunnelInterfaceArrayOutput) ToBackendAddressPoolTunnelInterfaceArrayOutputWithContext(ctx context.Context) BackendAddressPoolTunnelInterfaceArrayOutput { return o } func (o BackendAddressPoolTunnelInterfaceArrayOutput) Index(i pulumi.IntInput) BackendAddressPoolTunnelInterfaceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) BackendAddressPoolTunnelInterface { return vs[0].([]BackendAddressPoolTunnelInterface)[vs[1].(int)] }).(BackendAddressPoolTunnelInterfaceOutput) } type LoadBalancerFrontendIpConfiguration struct { // The Frontend IP Configuration ID of a Gateway SKU Load Balancer. GatewayLoadBalancerFrontendIpConfigurationId *string `pulumi:"gatewayLoadBalancerFrontendIpConfigurationId"` // The id of the Frontend IP Configuration. Id *string `pulumi:"id"` // The list of IDs of inbound rules that use this frontend IP. InboundNatRules []string `pulumi:"inboundNatRules"` // The list of IDs of load balancing rules that use this frontend IP. LoadBalancerRules []string `pulumi:"loadBalancerRules"` // Specifies the name of the frontend IP configuration. Name string `pulumi:"name"` // The list of IDs outbound rules that use this frontend IP. OutboundRules []string `pulumi:"outboundRules"` // Private IP Address to assign to the Load Balancer. The last one and first four IPs in any range are reserved and cannot be manually assigned. PrivateIpAddress *string `pulumi:"privateIpAddress"` // The allocation method for the Private IP Address used by this Load Balancer. Possible values as `Dynamic` and `Static`. PrivateIpAddressAllocation *string `pulumi:"privateIpAddressAllocation"` // The version of IP that the Private IP Address is. Possible values are `IPv4` or `IPv6`. PrivateIpAddressVersion *string `pulumi:"privateIpAddressVersion"` // The ID of a Public IP Address which should be associated with the Load Balancer. PublicIpAddressId *string `pulumi:"publicIpAddressId"` // The ID of a Public IP Prefix which should be associated with the Load Balancer. Public IP Prefix can only be used with outbound rules. PublicIpPrefixId *string `pulumi:"publicIpPrefixId"` // The ID of the Subnet which should be associated with the IP Configuration. SubnetId *string `pulumi:"subnetId"` // Specifies a list of Availability Zones in which the IP Address for this Load Balancer should be located. // // > **Note:** Availability Zones are only supported with a [Standard SKU](https://docs.microsoft.com/azure/load-balancer/load-balancer-standard-availability-zones) and [in select regions](https://docs.microsoft.com/azure/availability-zones/az-overview) at this time. Zones []string `pulumi:"zones"` } // LoadBalancerFrontendIpConfigurationInput is an input type that accepts LoadBalancerFrontendIpConfigurationArgs and LoadBalancerFrontendIpConfigurationOutput values. // You can construct a concrete instance of `LoadBalancerFrontendIpConfigurationInput` via: // // LoadBalancerFrontendIpConfigurationArgs{...} type LoadBalancerFrontendIpConfigurationInput interface { pulumi.Input ToLoadBalancerFrontendIpConfigurationOutput() LoadBalancerFrontendIpConfigurationOutput ToLoadBalancerFrontendIpConfigurationOutputWithContext(context.Context) LoadBalancerFrontendIpConfigurationOutput } type LoadBalancerFrontendIpConfigurationArgs struct { // The Frontend IP Configuration ID of a Gateway SKU Load Balancer. GatewayLoadBalancerFrontendIpConfigurationId pulumi.StringPtrInput `pulumi:"gatewayLoadBalancerFrontendIpConfigurationId"` // The id of the Frontend IP Configuration. Id pulumi.StringPtrInput `pulumi:"id"` // The list of IDs of inbound rules that use this frontend IP. InboundNatRules pulumi.StringArrayInput `pulumi:"inboundNatRules"` // The list of IDs of load balancing rules that use this frontend IP. LoadBalancerRules pulumi.StringArrayInput `pulumi:"loadBalancerRules"` // Specifies the name of the frontend IP configuration. Name pulumi.StringInput `pulumi:"name"` // The list of IDs outbound rules that use this frontend IP. OutboundRules pulumi.StringArrayInput `pulumi:"outboundRules"` // Private IP Address to assign to the Load Balancer. The last one and first four IPs in any range are reserved and cannot be manually assigned. PrivateIpAddress pulumi.StringPtrInput `pulumi:"privateIpAddress"` // The allocation method for the Private IP Address used by this Load Balancer. Possible values as `Dynamic` and `Static`. PrivateIpAddressAllocation pulumi.StringPtrInput `pulumi:"privateIpAddressAllocation"` // The version of IP that the Private IP Address is. Possible values are `IPv4` or `IPv6`. PrivateIpAddressVersion pulumi.StringPtrInput `pulumi:"privateIpAddressVersion"` // The ID of a Public IP Address which should be associated with the Load Balancer. PublicIpAddressId pulumi.StringPtrInput `pulumi:"publicIpAddressId"` // The ID of a Public IP Prefix which should be associated with the Load Balancer. Public IP Prefix can only be used with outbound rules. PublicIpPrefixId pulumi.StringPtrInput `pulumi:"publicIpPrefixId"` // The ID of the Subnet which should be associated with the IP Configuration. SubnetId pulumi.StringPtrInput `pulumi:"subnetId"` // Specifies a list of Availability Zones in which the IP Address for this Load Balancer should be located. // // > **Note:** Availability Zones are only supported with a [Standard SKU](https://docs.microsoft.com/azure/load-balancer/load-balancer-standard-availability-zones) and [in select regions](https://docs.microsoft.com/azure/availability-zones/az-overview) at this time. Zones pulumi.StringArrayInput `pulumi:"zones"` } func (LoadBalancerFrontendIpConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*LoadBalancerFrontendIpConfiguration)(nil)).Elem() } func (i LoadBalancerFrontendIpConfigurationArgs) ToLoadBalancerFrontendIpConfigurationOutput() LoadBalancerFrontendIpConfigurationOutput { return i.ToLoadBalancerFrontendIpConfigurationOutputWithContext(context.Background()) } func (i LoadBalancerFrontendIpConfigurationArgs) ToLoadBalancerFrontendIpConfigurationOutputWithContext(ctx context.Context) LoadBalancerFrontendIpConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerFrontendIpConfigurationOutput) } // LoadBalancerFrontendIpConfigurationArrayInput is an input type that accepts LoadBalancerFrontendIpConfigurationArray and LoadBalancerFrontendIpConfigurationArrayOutput values. // You can construct a concrete instance of `LoadBalancerFrontendIpConfigurationArrayInput` via: // // LoadBalancerFrontendIpConfigurationArray{ LoadBalancerFrontendIpConfigurationArgs{...} } type LoadBalancerFrontendIpConfigurationArrayInput interface { pulumi.Input ToLoadBalancerFrontendIpConfigurationArrayOutput() LoadBalancerFrontendIpConfigurationArrayOutput ToLoadBalancerFrontendIpConfigurationArrayOutputWithContext(context.Context) LoadBalancerFrontendIpConfigurationArrayOutput } type LoadBalancerFrontendIpConfigurationArray []LoadBalancerFrontendIpConfigurationInput func (LoadBalancerFrontendIpConfigurationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]LoadBalancerFrontendIpConfiguration)(nil)).Elem() } func (i LoadBalancerFrontendIpConfigurationArray) ToLoadBalancerFrontendIpConfigurationArrayOutput() LoadBalancerFrontendIpConfigurationArrayOutput { return i.ToLoadBalancerFrontendIpConfigurationArrayOutputWithContext(context.Background()) } func (i LoadBalancerFrontendIpConfigurationArray) ToLoadBalancerFrontendIpConfigurationArrayOutputWithContext(ctx context.Context) LoadBalancerFrontendIpConfigurationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(LoadBalancerFrontendIpConfigurationArrayOutput) } type LoadBalancerFrontendIpConfigurationOutput struct{ *pulumi.OutputState } func (LoadBalancerFrontendIpConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((*LoadBalancerFrontendIpConfiguration)(nil)).Elem() } func (o LoadBalancerFrontendIpConfigurationOutput) ToLoadBalancerFrontendIpConfigurationOutput() LoadBalancerFrontendIpConfigurationOutput { return o } func (o LoadBalancerFrontendIpConfigurationOutput) ToLoadBalancerFrontendIpConfigurationOutputWithContext(ctx context.Context) LoadBalancerFrontendIpConfigurationOutput { return o } // The Frontend IP Configuration ID of a Gateway SKU Load Balancer. func (o LoadBalancerFrontendIpConfigurationOutput) GatewayLoadBalancerFrontendIpConfigurationId() pulumi.StringPtrOutput { return o.ApplyT(func(v LoadBalancerFrontendIpConfiguration) *string { return v.GatewayLoadBalancerFrontendIpConfigurationId }).(pulumi.StringPtrOutput) } // The id of the Frontend IP Configuration. func (o LoadBalancerFrontendIpConfigurationOutput) Id() pulumi.StringPtrOutput { return o.ApplyT(func(v LoadBalancerFrontendIpConfiguration) *string { return v.Id }).(pulumi.StringPtrOutput) } // The list of IDs of inbound rules that use this frontend IP. func (o LoadBalancerFrontendIpConfigurationOutput) InboundNatRules() pulumi.StringArrayOutput { return o.ApplyT(func(v LoadBalancerFrontendIpConfiguration) []string { return v.InboundNatRules }).(pulumi.StringArrayOutput) } // The list of IDs of load balancing rules that use this frontend IP. func (o LoadBalancerFrontendIpConfigurationOutput) LoadBalancerRules() pulumi.StringArrayOutput { return o.ApplyT(func(v LoadBalancerFrontendIpConfiguration) []string { return v.LoadBalancerRules }).(pulumi.StringArrayOutput) } // Specifies the name of the frontend IP configuration. func (o LoadBalancerFrontendIpConfigurationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LoadBalancerFrontendIpConfiguration) string { return v.Name }).(pulumi.StringOutput) } // The list of IDs outbound rules that use this frontend IP. func (o LoadBalancerFrontendIpConfigurationOutput) OutboundRules() pulumi.StringArrayOutput { return o.ApplyT(func(v LoadBalancerFrontendIpConfiguration) []string { return v.OutboundRules }).(pulumi.StringArrayOutput) } // Private IP Address to assign to the Load Balancer. The last one and first four IPs in any range are reserved and cannot be manually assigned. func (o LoadBalancerFrontendIpConfigurationOutput) PrivateIpAddress() pulumi.StringPtrOutput { return o.ApplyT(func(v LoadBalancerFrontendIpConfiguration) *string { return v.PrivateIpAddress }).(pulumi.StringPtrOutput) } // The allocation method for the Private IP Address used by this Load Balancer. Possible values as `Dynamic` and `Static`. func (o LoadBalancerFrontendIpConfigurationOutput) PrivateIpAddressAllocation() pulumi.StringPtrOutput { return o.ApplyT(func(v LoadBalancerFrontendIpConfiguration) *string { return v.PrivateIpAddressAllocation }).(pulumi.StringPtrOutput) } // The version of IP that the Private IP Address is. Possible values are `IPv4` or `IPv6`. func (o LoadBalancerFrontendIpConfigurationOutput) PrivateIpAddressVersion() pulumi.StringPtrOutput { return o.ApplyT(func(v LoadBalancerFrontendIpConfiguration) *string { return v.PrivateIpAddressVersion }).(pulumi.StringPtrOutput) } // The ID of a Public IP Address which should be associated with the Load Balancer. func (o LoadBalancerFrontendIpConfigurationOutput) PublicIpAddressId() pulumi.StringPtrOutput { return o.ApplyT(func(v LoadBalancerFrontendIpConfiguration) *string { return v.PublicIpAddressId }).(pulumi.StringPtrOutput) } // The ID of a Public IP Prefix which should be associated with the Load Balancer. Public IP Prefix can only be used with outbound rules. func (o LoadBalancerFrontendIpConfigurationOutput) PublicIpPrefixId() pulumi.StringPtrOutput { return o.ApplyT(func(v LoadBalancerFrontendIpConfiguration) *string { return v.PublicIpPrefixId }).(pulumi.StringPtrOutput) } // The ID of the Subnet which should be associated with the IP Configuration. func (o LoadBalancerFrontendIpConfigurationOutput) SubnetId() pulumi.StringPtrOutput { return o.ApplyT(func(v LoadBalancerFrontendIpConfiguration) *string { return v.SubnetId }).(pulumi.StringPtrOutput) } // Specifies a list of Availability Zones in which the IP Address for this Load Balancer should be located. // // > **Note:** Availability Zones are only supported with a [Standard SKU](https://docs.microsoft.com/azure/load-balancer/load-balancer-standard-availability-zones) and [in select regions](https://docs.microsoft.com/azure/availability-zones/az-overview) at this time. func (o LoadBalancerFrontendIpConfigurationOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v LoadBalancerFrontendIpConfiguration) []string { return v.Zones }).(pulumi.StringArrayOutput) } type LoadBalancerFrontendIpConfigurationArrayOutput struct{ *pulumi.OutputState } func (LoadBalancerFrontendIpConfigurationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]LoadBalancerFrontendIpConfiguration)(nil)).Elem() } func (o LoadBalancerFrontendIpConfigurationArrayOutput) ToLoadBalancerFrontendIpConfigurationArrayOutput() LoadBalancerFrontendIpConfigurationArrayOutput { return o } func (o LoadBalancerFrontendIpConfigurationArrayOutput) ToLoadBalancerFrontendIpConfigurationArrayOutputWithContext(ctx context.Context) LoadBalancerFrontendIpConfigurationArrayOutput { return o } func (o LoadBalancerFrontendIpConfigurationArrayOutput) Index(i pulumi.IntInput) LoadBalancerFrontendIpConfigurationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) LoadBalancerFrontendIpConfiguration { return vs[0].([]LoadBalancerFrontendIpConfiguration)[vs[1].(int)] }).(LoadBalancerFrontendIpConfigurationOutput) } type OutboundRuleFrontendIpConfiguration struct { // The ID of the Load Balancer Outbound Rule. Id *string `pulumi:"id"` // The name of the Frontend IP Configuration. Name string `pulumi:"name"` } // OutboundRuleFrontendIpConfigurationInput is an input type that accepts OutboundRuleFrontendIpConfigurationArgs and OutboundRuleFrontendIpConfigurationOutput values. // You can construct a concrete instance of `OutboundRuleFrontendIpConfigurationInput` via: // // OutboundRuleFrontendIpConfigurationArgs{...} type OutboundRuleFrontendIpConfigurationInput interface { pulumi.Input ToOutboundRuleFrontendIpConfigurationOutput() OutboundRuleFrontendIpConfigurationOutput ToOutboundRuleFrontendIpConfigurationOutputWithContext(context.Context) OutboundRuleFrontendIpConfigurationOutput } type OutboundRuleFrontendIpConfigurationArgs struct { // The ID of the Load Balancer Outbound Rule. Id pulumi.StringPtrInput `pulumi:"id"` // The name of the Frontend IP Configuration. Name pulumi.StringInput `pulumi:"name"` } func (OutboundRuleFrontendIpConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*OutboundRuleFrontendIpConfiguration)(nil)).Elem() } func (i OutboundRuleFrontendIpConfigurationArgs) ToOutboundRuleFrontendIpConfigurationOutput() OutboundRuleFrontendIpConfigurationOutput { return i.ToOutboundRuleFrontendIpConfigurationOutputWithContext(context.Background()) } func (i OutboundRuleFrontendIpConfigurationArgs) ToOutboundRuleFrontendIpConfigurationOutputWithContext(ctx context.Context) OutboundRuleFrontendIpConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(OutboundRuleFrontendIpConfigurationOutput) } // OutboundRuleFrontendIpConfigurationArrayInput is an input type that accepts OutboundRuleFrontendIpConfigurationArray and OutboundRuleFrontendIpConfigurationArrayOutput values. // You can construct a concrete instance of `OutboundRuleFrontendIpConfigurationArrayInput` via: // // OutboundRuleFrontendIpConfigurationArray{ OutboundRuleFrontendIpConfigurationArgs{...} } type OutboundRuleFrontendIpConfigurationArrayInput interface { pulumi.Input ToOutboundRuleFrontendIpConfigurationArrayOutput() OutboundRuleFrontendIpConfigurationArrayOutput ToOutboundRuleFrontendIpConfigurationArrayOutputWithContext(context.Context) OutboundRuleFrontendIpConfigurationArrayOutput } type OutboundRuleFrontendIpConfigurationArray []OutboundRuleFrontendIpConfigurationInput func (OutboundRuleFrontendIpConfigurationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]OutboundRuleFrontendIpConfiguration)(nil)).Elem() } func (i OutboundRuleFrontendIpConfigurationArray) ToOutboundRuleFrontendIpConfigurationArrayOutput() OutboundRuleFrontendIpConfigurationArrayOutput { return i.ToOutboundRuleFrontendIpConfigurationArrayOutputWithContext(context.Background()) } func (i OutboundRuleFrontendIpConfigurationArray) ToOutboundRuleFrontendIpConfigurationArrayOutputWithContext(ctx context.Context) OutboundRuleFrontendIpConfigurationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(OutboundRuleFrontendIpConfigurationArrayOutput) } type OutboundRuleFrontendIpConfigurationOutput struct{ *pulumi.OutputState } func (OutboundRuleFrontendIpConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((*OutboundRuleFrontendIpConfiguration)(nil)).Elem() } func (o OutboundRuleFrontendIpConfigurationOutput) ToOutboundRuleFrontendIpConfigurationOutput() OutboundRuleFrontendIpConfigurationOutput { return o } func (o OutboundRuleFrontendIpConfigurationOutput) ToOutboundRuleFrontendIpConfigurationOutputWithContext(ctx context.Context) OutboundRuleFrontendIpConfigurationOutput { return o } // The ID of the Load Balancer Outbound Rule. func (o OutboundRuleFrontendIpConfigurationOutput) Id() pulumi.StringPtrOutput { return o.ApplyT(func(v OutboundRuleFrontendIpConfiguration) *string { return v.Id }).(pulumi.StringPtrOutput) } // The name of the Frontend IP Configuration. func (o OutboundRuleFrontendIpConfigurationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v OutboundRuleFrontendIpConfiguration) string { return v.Name }).(pulumi.StringOutput) } type OutboundRuleFrontendIpConfigurationArrayOutput struct{ *pulumi.OutputState } func (OutboundRuleFrontendIpConfigurationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]OutboundRuleFrontendIpConfiguration)(nil)).Elem() } func (o OutboundRuleFrontendIpConfigurationArrayOutput) ToOutboundRuleFrontendIpConfigurationArrayOutput() OutboundRuleFrontendIpConfigurationArrayOutput { return o } func (o OutboundRuleFrontendIpConfigurationArrayOutput) ToOutboundRuleFrontendIpConfigurationArrayOutputWithContext(ctx context.Context) OutboundRuleFrontendIpConfigurationArrayOutput { return o } func (o OutboundRuleFrontendIpConfigurationArrayOutput) Index(i pulumi.IntInput) OutboundRuleFrontendIpConfigurationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) OutboundRuleFrontendIpConfiguration { return vs[0].([]OutboundRuleFrontendIpConfiguration)[vs[1].(int)] }).(OutboundRuleFrontendIpConfigurationOutput) } type GetBackendAddressPoolBackendAddress struct { // A list of `inboundNatRulePortMapping` block as defined below. InboundNatRulePortMappings []GetBackendAddressPoolBackendAddressInboundNatRulePortMapping `pulumi:"inboundNatRulePortMappings"` // The Static IP address for this Load Balancer within the Virtual Network. IpAddress string `pulumi:"ipAddress"` // Specifies the name of the Backend Address Pool. Name string `pulumi:"name"`
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/lb/getBackendAddressPool.go
sdk/go/azure/lb/getBackendAddressPool.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 lb 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 Load Balancer's Backend Address Pool. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/lb" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := lb.GetLB(ctx, &lb.GetLBArgs{ // Name: "example-lb", // ResourceGroupName: "example-resources", // }, nil); // if err != nil { // return err // } // exampleGetBackendAddressPool, err := lb.LookupBackendAddressPool(ctx, &lb.LookupBackendAddressPoolArgs{ // Name: "first", // LoadbalancerId: example.Id, // }, nil); // if err != nil { // return err // } // ctx.Export("backendAddressPoolId", exampleGetBackendAddressPool.Id) // ctx.Export("backendIpConfigurationIds", pulumi.Array(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:15,11-45))) // return nil // }) // } // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2023-09-01 func LookupBackendAddressPool(ctx *pulumi.Context, args *LookupBackendAddressPoolArgs, opts ...pulumi.InvokeOption) (*LookupBackendAddressPoolResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupBackendAddressPoolResult err := ctx.Invoke("azure:lb/getBackendAddressPool:getBackendAddressPool", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getBackendAddressPool. type LookupBackendAddressPoolArgs struct { // The ID of the Load Balancer in which the Backend Address Pool exists. LoadbalancerId string `pulumi:"loadbalancerId"` // Specifies the name of the Backend Address Pool. Name string `pulumi:"name"` } // A collection of values returned by getBackendAddressPool. type LookupBackendAddressPoolResult struct { // A list of `backendAddress` block as defined below. BackendAddresses []GetBackendAddressPoolBackendAddress `pulumi:"backendAddresses"` // A list of references to IP addresses defined in network interfaces. BackendIpConfigurations []GetBackendAddressPoolBackendIpConfiguration `pulumi:"backendIpConfigurations"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // A list of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool. InboundNatRules []string `pulumi:"inboundNatRules"` // A list of the Load Balancing Rules associated with this Backend Address Pool. LoadBalancingRules []string `pulumi:"loadBalancingRules"` LoadbalancerId string `pulumi:"loadbalancerId"` // The name of the Backend Address. Name string `pulumi:"name"` // A list of the Load Balancing Outbound Rules associated with this Backend Address Pool. OutboundRules []string `pulumi:"outboundRules"` } func LookupBackendAddressPoolOutput(ctx *pulumi.Context, args LookupBackendAddressPoolOutputArgs, opts ...pulumi.InvokeOption) LookupBackendAddressPoolResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupBackendAddressPoolResultOutput, error) { args := v.(LookupBackendAddressPoolArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:lb/getBackendAddressPool:getBackendAddressPool", args, LookupBackendAddressPoolResultOutput{}, options).(LookupBackendAddressPoolResultOutput), nil }).(LookupBackendAddressPoolResultOutput) } // A collection of arguments for invoking getBackendAddressPool. type LookupBackendAddressPoolOutputArgs struct { // The ID of the Load Balancer in which the Backend Address Pool exists. LoadbalancerId pulumi.StringInput `pulumi:"loadbalancerId"` // Specifies the name of the Backend Address Pool. Name pulumi.StringInput `pulumi:"name"` } func (LookupBackendAddressPoolOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupBackendAddressPoolArgs)(nil)).Elem() } // A collection of values returned by getBackendAddressPool. type LookupBackendAddressPoolResultOutput struct{ *pulumi.OutputState } func (LookupBackendAddressPoolResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupBackendAddressPoolResult)(nil)).Elem() } func (o LookupBackendAddressPoolResultOutput) ToLookupBackendAddressPoolResultOutput() LookupBackendAddressPoolResultOutput { return o } func (o LookupBackendAddressPoolResultOutput) ToLookupBackendAddressPoolResultOutputWithContext(ctx context.Context) LookupBackendAddressPoolResultOutput { return o } // A list of `backendAddress` block as defined below. func (o LookupBackendAddressPoolResultOutput) BackendAddresses() GetBackendAddressPoolBackendAddressArrayOutput { return o.ApplyT(func(v LookupBackendAddressPoolResult) []GetBackendAddressPoolBackendAddress { return v.BackendAddresses }).(GetBackendAddressPoolBackendAddressArrayOutput) } // A list of references to IP addresses defined in network interfaces. func (o LookupBackendAddressPoolResultOutput) BackendIpConfigurations() GetBackendAddressPoolBackendIpConfigurationArrayOutput { return o.ApplyT(func(v LookupBackendAddressPoolResult) []GetBackendAddressPoolBackendIpConfiguration { return v.BackendIpConfigurations }).(GetBackendAddressPoolBackendIpConfigurationArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupBackendAddressPoolResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupBackendAddressPoolResult) string { return v.Id }).(pulumi.StringOutput) } // A list of the Load Balancing Inbound NAT Rules associated with this Backend Address Pool. func (o LookupBackendAddressPoolResultOutput) InboundNatRules() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupBackendAddressPoolResult) []string { return v.InboundNatRules }).(pulumi.StringArrayOutput) } // A list of the Load Balancing Rules associated with this Backend Address Pool. func (o LookupBackendAddressPoolResultOutput) LoadBalancingRules() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupBackendAddressPoolResult) []string { return v.LoadBalancingRules }).(pulumi.StringArrayOutput) } func (o LookupBackendAddressPoolResultOutput) LoadbalancerId() pulumi.StringOutput { return o.ApplyT(func(v LookupBackendAddressPoolResult) string { return v.LoadbalancerId }).(pulumi.StringOutput) } // The name of the Backend Address. func (o LookupBackendAddressPoolResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupBackendAddressPoolResult) string { return v.Name }).(pulumi.StringOutput) } // A list of the Load Balancing Outbound Rules associated with this Backend Address Pool. func (o LookupBackendAddressPoolResultOutput) OutboundRules() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupBackendAddressPoolResult) []string { return v.OutboundRules }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(LookupBackendAddressPoolResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false