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/iot/ioTHub.go | sdk/go/azure/iot/ioTHub.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 iot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an IotHub
//
// > **Note:** Endpoints can be defined either directly on the `iot.IoTHub` resource, or using the `azurerm_iothub_endpoint_*` resources - but the two ways of defining the endpoints cannot be used together. If both are used against the same IoTHub, spurious changes will occur. Also, defining a `azurerm_iothub_endpoint_*` resource and another endpoint of a different type directly on the `iot.IoTHub` resource is not supported.
//
// > **Note:** Routes can be defined either directly on the `iot.IoTHub` resource, or using the `iot.Route` resource - but the two cannot be used together. If both are used against the same IoTHub, spurious changes will occur.
//
// > **Note:** Enrichments can be defined either directly on the `iot.IoTHub` resource, or using the `iot.Enrichment` resource - but the two cannot be used together. If both are used against the same IoTHub, spurious changes will occur.
//
// > **Note:** Fallback route can be defined either directly on the `iot.IoTHub` resource, or using the `iot.FallbackRoute` resource - but the two cannot be used together. If both are used against the same IoTHub, spurious changes will occur.
//
// > **Note:** File upload can be defined either directly on the `iot.IoTHub` resource, or using the `iot.FileUpload` resource - but the two cannot be used together. If both are used against the same IoTHub, spurious changes will occur.
//
// ## 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/eventhub"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/iot"
// "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("examplestorage"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("examplecontainer"),
// StorageAccountName: exampleAccount.Name,
// ContainerAccessType: pulumi.String("private"),
// })
// if err != nil {
// return err
// }
// exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("example-namespace"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
// Name: pulumi.String("example-eventhub"),
// ResourceGroupName: example.Name,
// NamespaceName: exampleEventHubNamespace.Name,
// PartitionCount: pulumi.Int(2),
// MessageRetention: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// exampleAuthorizationRule, err := eventhub.NewAuthorizationRule(ctx, "example", &eventhub.AuthorizationRuleArgs{
// ResourceGroupName: example.Name,
// NamespaceName: exampleEventHubNamespace.Name,
// EventhubName: exampleEventHub.Name,
// Name: pulumi.String("acctest"),
// Send: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = iot.NewIoTHub(ctx, "example", &iot.IoTHubArgs{
// Name: pulumi.String("Example-IoTHub"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// LocalAuthenticationEnabled: pulumi.Bool(false),
// Sku: &iot.IoTHubSkuArgs{
// Name: pulumi.String("S1"),
// Capacity: pulumi.Int(1),
// },
// Endpoints: iot.IoTHubEndpointArray{
// &iot.IoTHubEndpointArgs{
// Type: pulumi.String("AzureIotHub.StorageContainer"),
// ConnectionString: exampleAccount.PrimaryBlobConnectionString,
// Name: pulumi.String("export"),
// BatchFrequencyInSeconds: pulumi.Int(60),
// MaxChunkSizeInBytes: pulumi.Int(10485760),
// ContainerName: exampleContainer.Name,
// Encoding: pulumi.String("Avro"),
// FileNameFormat: pulumi.String("{iothub}/{partition}_{YYYY}_{MM}_{DD}_{HH}_{mm}"),
// },
// &iot.IoTHubEndpointArgs{
// Type: pulumi.String("AzureIotHub.EventHub"),
// ConnectionString: exampleAuthorizationRule.PrimaryConnectionString,
// Name: pulumi.String("export2"),
// },
// },
// Routes: iot.IoTHubRouteArray{
// &iot.IoTHubRouteArgs{
// Name: pulumi.String("export"),
// Source: pulumi.String("DeviceMessages"),
// Condition: pulumi.String("true"),
// EndpointNames: pulumi.StringArray{
// pulumi.String("export"),
// },
// Enabled: pulumi.Bool(true),
// },
// &iot.IoTHubRouteArgs{
// Name: pulumi.String("export2"),
// Source: pulumi.String("DeviceMessages"),
// Condition: pulumi.String("true"),
// EndpointNames: pulumi.StringArray{
// pulumi.String("export2"),
// },
// Enabled: pulumi.Bool(true),
// },
// },
// Enrichments: iot.IoTHubEnrichmentArray{
// &iot.IoTHubEnrichmentArgs{
// Key: pulumi.String("tenant"),
// Value: pulumi.String("$twin.tags.Tenant"),
// EndpointNames: pulumi.StringArray{
// pulumi.String("export"),
// pulumi.String("export2"),
// },
// },
// },
// CloudToDevice: &iot.IoTHubCloudToDeviceArgs{
// MaxDeliveryCount: pulumi.Int(30),
// DefaultTtl: pulumi.String("PT1H"),
// Feedbacks: iot.IoTHubCloudToDeviceFeedbackArray{
// &iot.IoTHubCloudToDeviceFeedbackArgs{
// TimeToLive: pulumi.String("PT1H10M"),
// MaxDeliveryCount: pulumi.Int(15),
// LockDuration: pulumi.String("PT30S"),
// },
// },
// },
// Tags: pulumi.StringMap{
// "purpose": pulumi.String("testing"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// IoTHubs can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:iot/ioTHub:IoTHub hub1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1
// ```
type IoTHub struct {
pulumi.CustomResourceState
CloudToDevice IoTHubCloudToDeviceOutput `pulumi:"cloudToDevice"`
// An `endpoint` block as defined below.
Endpoints IoTHubEndpointArrayOutput `pulumi:"endpoints"`
Enrichments IoTHubEnrichmentArrayOutput `pulumi:"enrichments"`
// The EventHub compatible endpoint for events data
EventHubEventsEndpoint pulumi.StringOutput `pulumi:"eventHubEventsEndpoint"`
// The EventHub namespace for events data
EventHubEventsNamespace pulumi.StringOutput `pulumi:"eventHubEventsNamespace"`
// The EventHub compatible path for events data
EventHubEventsPath pulumi.StringOutput `pulumi:"eventHubEventsPath"`
// The EventHub compatible endpoint for operational data
EventHubOperationsEndpoint pulumi.StringOutput `pulumi:"eventHubOperationsEndpoint"`
// The EventHub compatible path for operational data
EventHubOperationsPath pulumi.StringOutput `pulumi:"eventHubOperationsPath"`
// The number of device-to-cloud partitions used by backing event hubs. Must be between `2` and `128`. Defaults to `4`.
EventHubPartitionCount pulumi.IntPtrOutput `pulumi:"eventHubPartitionCount"`
// The event hub retention to use in days. Must be between `1` and `7`. Defaults to `1`.
EventHubRetentionInDays pulumi.IntPtrOutput `pulumi:"eventHubRetentionInDays"`
// A `fallbackRoute` block as defined below. If the fallback route is enabled, messages that don't match any of the supplied routes are automatically sent to this route. Defaults to messages/events.
//
// > **Note:** If `fallbackRoute` isn't explicitly specified, the fallback route wouldn't be enabled by default.
FallbackRoute IoTHubFallbackRouteOutput `pulumi:"fallbackRoute"`
// A `fileUpload` block as defined below.
FileUpload IoTHubFileUploadPtrOutput `pulumi:"fileUpload"`
// The hostname of the IotHub Resource.
Hostname pulumi.StringOutput `pulumi:"hostname"`
// An `identity` block as defined below.
Identity IoTHubIdentityPtrOutput `pulumi:"identity"`
// If false, SAS tokens with Iot hub scoped SAS keys cannot be used for authentication. Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrOutput `pulumi:"localAuthenticationEnabled"`
// 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"`
MinTlsVersion pulumi.StringPtrOutput `pulumi:"minTlsVersion"`
// Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkRuleSet` block as defined below.
NetworkRuleSets IoTHubNetworkRuleSetArrayOutput `pulumi:"networkRuleSets"`
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
Routes IoTHubRouteArrayOutput `pulumi:"routes"`
// One or more `sharedAccessPolicy` blocks as defined below.
SharedAccessPolicies IoTHubSharedAccessPolicyArrayOutput `pulumi:"sharedAccessPolicies"`
// A `sku` block as defined below.
Sku IoTHubSkuOutput `pulumi:"sku"`
Tags pulumi.StringMapOutput `pulumi:"tags"`
Type pulumi.StringOutput `pulumi:"type"`
}
// NewIoTHub registers a new resource with the given unique name, arguments, and options.
func NewIoTHub(ctx *pulumi.Context,
name string, args *IoTHubArgs, opts ...pulumi.ResourceOption) (*IoTHub, 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 IoTHub
err := ctx.RegisterResource("azure:iot/ioTHub:IoTHub", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIoTHub gets an existing IoTHub 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 GetIoTHub(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IoTHubState, opts ...pulumi.ResourceOption) (*IoTHub, error) {
var resource IoTHub
err := ctx.ReadResource("azure:iot/ioTHub:IoTHub", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IoTHub resources.
type ioTHubState struct {
CloudToDevice *IoTHubCloudToDevice `pulumi:"cloudToDevice"`
// An `endpoint` block as defined below.
Endpoints []IoTHubEndpoint `pulumi:"endpoints"`
Enrichments []IoTHubEnrichment `pulumi:"enrichments"`
// The EventHub compatible endpoint for events data
EventHubEventsEndpoint *string `pulumi:"eventHubEventsEndpoint"`
// The EventHub namespace for events data
EventHubEventsNamespace *string `pulumi:"eventHubEventsNamespace"`
// The EventHub compatible path for events data
EventHubEventsPath *string `pulumi:"eventHubEventsPath"`
// The EventHub compatible endpoint for operational data
EventHubOperationsEndpoint *string `pulumi:"eventHubOperationsEndpoint"`
// The EventHub compatible path for operational data
EventHubOperationsPath *string `pulumi:"eventHubOperationsPath"`
// The number of device-to-cloud partitions used by backing event hubs. Must be between `2` and `128`. Defaults to `4`.
EventHubPartitionCount *int `pulumi:"eventHubPartitionCount"`
// The event hub retention to use in days. Must be between `1` and `7`. Defaults to `1`.
EventHubRetentionInDays *int `pulumi:"eventHubRetentionInDays"`
// A `fallbackRoute` block as defined below. If the fallback route is enabled, messages that don't match any of the supplied routes are automatically sent to this route. Defaults to messages/events.
//
// > **Note:** If `fallbackRoute` isn't explicitly specified, the fallback route wouldn't be enabled by default.
FallbackRoute *IoTHubFallbackRoute `pulumi:"fallbackRoute"`
// A `fileUpload` block as defined below.
FileUpload *IoTHubFileUpload `pulumi:"fileUpload"`
// The hostname of the IotHub Resource.
Hostname *string `pulumi:"hostname"`
// An `identity` block as defined below.
Identity *IoTHubIdentity `pulumi:"identity"`
// If false, SAS tokens with Iot hub scoped SAS keys cannot be used for authentication. Defaults to `true`.
LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"`
// 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"`
MinTlsVersion *string `pulumi:"minTlsVersion"`
// Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `networkRuleSet` block as defined below.
NetworkRuleSets []IoTHubNetworkRuleSet `pulumi:"networkRuleSets"`
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
Routes []IoTHubRoute `pulumi:"routes"`
// One or more `sharedAccessPolicy` blocks as defined below.
SharedAccessPolicies []IoTHubSharedAccessPolicy `pulumi:"sharedAccessPolicies"`
// A `sku` block as defined below.
Sku *IoTHubSku `pulumi:"sku"`
Tags map[string]string `pulumi:"tags"`
Type *string `pulumi:"type"`
}
type IoTHubState struct {
CloudToDevice IoTHubCloudToDevicePtrInput
// An `endpoint` block as defined below.
Endpoints IoTHubEndpointArrayInput
Enrichments IoTHubEnrichmentArrayInput
// The EventHub compatible endpoint for events data
EventHubEventsEndpoint pulumi.StringPtrInput
// The EventHub namespace for events data
EventHubEventsNamespace pulumi.StringPtrInput
// The EventHub compatible path for events data
EventHubEventsPath pulumi.StringPtrInput
// The EventHub compatible endpoint for operational data
EventHubOperationsEndpoint pulumi.StringPtrInput
// The EventHub compatible path for operational data
EventHubOperationsPath pulumi.StringPtrInput
// The number of device-to-cloud partitions used by backing event hubs. Must be between `2` and `128`. Defaults to `4`.
EventHubPartitionCount pulumi.IntPtrInput
// The event hub retention to use in days. Must be between `1` and `7`. Defaults to `1`.
EventHubRetentionInDays pulumi.IntPtrInput
// A `fallbackRoute` block as defined below. If the fallback route is enabled, messages that don't match any of the supplied routes are automatically sent to this route. Defaults to messages/events.
//
// > **Note:** If `fallbackRoute` isn't explicitly specified, the fallback route wouldn't be enabled by default.
FallbackRoute IoTHubFallbackRoutePtrInput
// A `fileUpload` block as defined below.
FileUpload IoTHubFileUploadPtrInput
// The hostname of the IotHub Resource.
Hostname pulumi.StringPtrInput
// An `identity` block as defined below.
Identity IoTHubIdentityPtrInput
// If false, SAS tokens with Iot hub scoped SAS keys cannot be used for authentication. Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
MinTlsVersion pulumi.StringPtrInput
// Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `networkRuleSet` block as defined below.
NetworkRuleSets IoTHubNetworkRuleSetArrayInput
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
Routes IoTHubRouteArrayInput
// One or more `sharedAccessPolicy` blocks as defined below.
SharedAccessPolicies IoTHubSharedAccessPolicyArrayInput
// A `sku` block as defined below.
Sku IoTHubSkuPtrInput
Tags pulumi.StringMapInput
Type pulumi.StringPtrInput
}
func (IoTHubState) ElementType() reflect.Type {
return reflect.TypeOf((*ioTHubState)(nil)).Elem()
}
type ioTHubArgs struct {
CloudToDevice *IoTHubCloudToDevice `pulumi:"cloudToDevice"`
// An `endpoint` block as defined below.
Endpoints []IoTHubEndpoint `pulumi:"endpoints"`
Enrichments []IoTHubEnrichment `pulumi:"enrichments"`
// The number of device-to-cloud partitions used by backing event hubs. Must be between `2` and `128`. Defaults to `4`.
EventHubPartitionCount *int `pulumi:"eventHubPartitionCount"`
// The event hub retention to use in days. Must be between `1` and `7`. Defaults to `1`.
EventHubRetentionInDays *int `pulumi:"eventHubRetentionInDays"`
// A `fallbackRoute` block as defined below. If the fallback route is enabled, messages that don't match any of the supplied routes are automatically sent to this route. Defaults to messages/events.
//
// > **Note:** If `fallbackRoute` isn't explicitly specified, the fallback route wouldn't be enabled by default.
FallbackRoute *IoTHubFallbackRoute `pulumi:"fallbackRoute"`
// A `fileUpload` block as defined below.
FileUpload *IoTHubFileUpload `pulumi:"fileUpload"`
// An `identity` block as defined below.
Identity *IoTHubIdentity `pulumi:"identity"`
// If false, SAS tokens with Iot hub scoped SAS keys cannot be used for authentication. Defaults to `true`.
LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"`
// 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"`
MinTlsVersion *string `pulumi:"minTlsVersion"`
// Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `networkRuleSet` block as defined below.
NetworkRuleSets []IoTHubNetworkRuleSet `pulumi:"networkRuleSets"`
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
Routes []IoTHubRoute `pulumi:"routes"`
// A `sku` block as defined below.
Sku IoTHubSku `pulumi:"sku"`
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a IoTHub resource.
type IoTHubArgs struct {
CloudToDevice IoTHubCloudToDevicePtrInput
// An `endpoint` block as defined below.
Endpoints IoTHubEndpointArrayInput
Enrichments IoTHubEnrichmentArrayInput
// The number of device-to-cloud partitions used by backing event hubs. Must be between `2` and `128`. Defaults to `4`.
EventHubPartitionCount pulumi.IntPtrInput
// The event hub retention to use in days. Must be between `1` and `7`. Defaults to `1`.
EventHubRetentionInDays pulumi.IntPtrInput
// A `fallbackRoute` block as defined below. If the fallback route is enabled, messages that don't match any of the supplied routes are automatically sent to this route. Defaults to messages/events.
//
// > **Note:** If `fallbackRoute` isn't explicitly specified, the fallback route wouldn't be enabled by default.
FallbackRoute IoTHubFallbackRoutePtrInput
// A `fileUpload` block as defined below.
FileUpload IoTHubFileUploadPtrInput
// An `identity` block as defined below.
Identity IoTHubIdentityPtrInput
// If false, SAS tokens with Iot hub scoped SAS keys cannot be used for authentication. Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
MinTlsVersion pulumi.StringPtrInput
// Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `networkRuleSet` block as defined below.
NetworkRuleSets IoTHubNetworkRuleSetArrayInput
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
Routes IoTHubRouteArrayInput
// A `sku` block as defined below.
Sku IoTHubSkuInput
Tags pulumi.StringMapInput
}
func (IoTHubArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ioTHubArgs)(nil)).Elem()
}
type IoTHubInput interface {
pulumi.Input
ToIoTHubOutput() IoTHubOutput
ToIoTHubOutputWithContext(ctx context.Context) IoTHubOutput
}
func (*IoTHub) ElementType() reflect.Type {
return reflect.TypeOf((**IoTHub)(nil)).Elem()
}
func (i *IoTHub) ToIoTHubOutput() IoTHubOutput {
return i.ToIoTHubOutputWithContext(context.Background())
}
func (i *IoTHub) ToIoTHubOutputWithContext(ctx context.Context) IoTHubOutput {
return pulumi.ToOutputWithContext(ctx, i).(IoTHubOutput)
}
// IoTHubArrayInput is an input type that accepts IoTHubArray and IoTHubArrayOutput values.
// You can construct a concrete instance of `IoTHubArrayInput` via:
//
// IoTHubArray{ IoTHubArgs{...} }
type IoTHubArrayInput interface {
pulumi.Input
ToIoTHubArrayOutput() IoTHubArrayOutput
ToIoTHubArrayOutputWithContext(context.Context) IoTHubArrayOutput
}
type IoTHubArray []IoTHubInput
func (IoTHubArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IoTHub)(nil)).Elem()
}
func (i IoTHubArray) ToIoTHubArrayOutput() IoTHubArrayOutput {
return i.ToIoTHubArrayOutputWithContext(context.Background())
}
func (i IoTHubArray) ToIoTHubArrayOutputWithContext(ctx context.Context) IoTHubArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IoTHubArrayOutput)
}
// IoTHubMapInput is an input type that accepts IoTHubMap and IoTHubMapOutput values.
// You can construct a concrete instance of `IoTHubMapInput` via:
//
// IoTHubMap{ "key": IoTHubArgs{...} }
type IoTHubMapInput interface {
pulumi.Input
ToIoTHubMapOutput() IoTHubMapOutput
ToIoTHubMapOutputWithContext(context.Context) IoTHubMapOutput
}
type IoTHubMap map[string]IoTHubInput
func (IoTHubMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IoTHub)(nil)).Elem()
}
func (i IoTHubMap) ToIoTHubMapOutput() IoTHubMapOutput {
return i.ToIoTHubMapOutputWithContext(context.Background())
}
func (i IoTHubMap) ToIoTHubMapOutputWithContext(ctx context.Context) IoTHubMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IoTHubMapOutput)
}
type IoTHubOutput struct{ *pulumi.OutputState }
func (IoTHubOutput) ElementType() reflect.Type {
return reflect.TypeOf((**IoTHub)(nil)).Elem()
}
func (o IoTHubOutput) ToIoTHubOutput() IoTHubOutput {
return o
}
func (o IoTHubOutput) ToIoTHubOutputWithContext(ctx context.Context) IoTHubOutput {
return o
}
func (o IoTHubOutput) CloudToDevice() IoTHubCloudToDeviceOutput {
return o.ApplyT(func(v *IoTHub) IoTHubCloudToDeviceOutput { return v.CloudToDevice }).(IoTHubCloudToDeviceOutput)
}
// An `endpoint` block as defined below.
func (o IoTHubOutput) Endpoints() IoTHubEndpointArrayOutput {
return o.ApplyT(func(v *IoTHub) IoTHubEndpointArrayOutput { return v.Endpoints }).(IoTHubEndpointArrayOutput)
}
func (o IoTHubOutput) Enrichments() IoTHubEnrichmentArrayOutput {
return o.ApplyT(func(v *IoTHub) IoTHubEnrichmentArrayOutput { return v.Enrichments }).(IoTHubEnrichmentArrayOutput)
}
// The EventHub compatible endpoint for events data
func (o IoTHubOutput) EventHubEventsEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v *IoTHub) pulumi.StringOutput { return v.EventHubEventsEndpoint }).(pulumi.StringOutput)
}
// The EventHub namespace for events data
func (o IoTHubOutput) EventHubEventsNamespace() pulumi.StringOutput {
return o.ApplyT(func(v *IoTHub) pulumi.StringOutput { return v.EventHubEventsNamespace }).(pulumi.StringOutput)
}
// The EventHub compatible path for events data
func (o IoTHubOutput) EventHubEventsPath() pulumi.StringOutput {
return o.ApplyT(func(v *IoTHub) pulumi.StringOutput { return v.EventHubEventsPath }).(pulumi.StringOutput)
}
// The EventHub compatible endpoint for operational data
func (o IoTHubOutput) EventHubOperationsEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v *IoTHub) pulumi.StringOutput { return v.EventHubOperationsEndpoint }).(pulumi.StringOutput)
}
// The EventHub compatible path for operational data
func (o IoTHubOutput) EventHubOperationsPath() pulumi.StringOutput {
return o.ApplyT(func(v *IoTHub) pulumi.StringOutput { return v.EventHubOperationsPath }).(pulumi.StringOutput)
}
// The number of device-to-cloud partitions used by backing event hubs. Must be between `2` and `128`. Defaults to `4`.
func (o IoTHubOutput) EventHubPartitionCount() pulumi.IntPtrOutput {
return o.ApplyT(func(v *IoTHub) pulumi.IntPtrOutput { return v.EventHubPartitionCount }).(pulumi.IntPtrOutput)
}
// The event hub retention to use in days. Must be between `1` and `7`. Defaults to `1`.
func (o IoTHubOutput) EventHubRetentionInDays() pulumi.IntPtrOutput {
return o.ApplyT(func(v *IoTHub) pulumi.IntPtrOutput { return v.EventHubRetentionInDays }).(pulumi.IntPtrOutput)
}
// A `fallbackRoute` block as defined below. If the fallback route is enabled, messages that don't match any of the supplied routes are automatically sent to this route. Defaults to messages/events.
//
// > **Note:** If `fallbackRoute` isn't explicitly specified, the fallback route wouldn't be enabled by default.
func (o IoTHubOutput) FallbackRoute() IoTHubFallbackRouteOutput {
return o.ApplyT(func(v *IoTHub) IoTHubFallbackRouteOutput { return v.FallbackRoute }).(IoTHubFallbackRouteOutput)
}
// A `fileUpload` block as defined below.
func (o IoTHubOutput) FileUpload() IoTHubFileUploadPtrOutput {
return o.ApplyT(func(v *IoTHub) IoTHubFileUploadPtrOutput { return v.FileUpload }).(IoTHubFileUploadPtrOutput)
}
// The hostname of the IotHub Resource.
func (o IoTHubOutput) Hostname() pulumi.StringOutput {
return o.ApplyT(func(v *IoTHub) pulumi.StringOutput { return v.Hostname }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o IoTHubOutput) Identity() IoTHubIdentityPtrOutput {
return o.ApplyT(func(v *IoTHub) IoTHubIdentityPtrOutput { return v.Identity }).(IoTHubIdentityPtrOutput)
}
// If false, SAS tokens with Iot hub scoped SAS keys cannot be used for authentication. Defaults to `true`.
func (o IoTHubOutput) LocalAuthenticationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *IoTHub) pulumi.BoolPtrOutput { return v.LocalAuthenticationEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created.
func (o IoTHubOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *IoTHub) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
func (o IoTHubOutput) MinTlsVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *IoTHub) pulumi.StringPtrOutput { return v.MinTlsVersion }).(pulumi.StringPtrOutput)
}
// Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
func (o IoTHubOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *IoTHub) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `networkRuleSet` block as defined below.
func (o IoTHubOutput) NetworkRuleSets() IoTHubNetworkRuleSetArrayOutput {
return o.ApplyT(func(v *IoTHub) IoTHubNetworkRuleSetArrayOutput { return v.NetworkRuleSets }).(IoTHubNetworkRuleSetArrayOutput)
}
func (o IoTHubOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *IoTHub) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
func (o IoTHubOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *IoTHub) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func (o IoTHubOutput) Routes() IoTHubRouteArrayOutput {
return o.ApplyT(func(v *IoTHub) IoTHubRouteArrayOutput { return v.Routes }).(IoTHubRouteArrayOutput)
}
// One or more `sharedAccessPolicy` blocks as defined below.
func (o IoTHubOutput) SharedAccessPolicies() IoTHubSharedAccessPolicyArrayOutput {
return o.ApplyT(func(v *IoTHub) IoTHubSharedAccessPolicyArrayOutput { return v.SharedAccessPolicies }).(IoTHubSharedAccessPolicyArrayOutput)
}
// A `sku` block as defined below.
func (o IoTHubOutput) Sku() IoTHubSkuOutput {
return o.ApplyT(func(v *IoTHub) IoTHubSkuOutput { return v.Sku }).(IoTHubSkuOutput)
}
func (o IoTHubOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *IoTHub) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
func (o IoTHubOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *IoTHub) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
type IoTHubArrayOutput struct{ *pulumi.OutputState }
func (IoTHubArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IoTHub)(nil)).Elem()
}
func (o IoTHubArrayOutput) ToIoTHubArrayOutput() IoTHubArrayOutput {
return o
}
func (o IoTHubArrayOutput) ToIoTHubArrayOutputWithContext(ctx context.Context) IoTHubArrayOutput {
return o
}
func (o IoTHubArrayOutput) Index(i pulumi.IntInput) IoTHubOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IoTHub {
return vs[0].([]*IoTHub)[vs[1].(int)]
}).(IoTHubOutput)
}
type IoTHubMapOutput struct{ *pulumi.OutputState }
func (IoTHubMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IoTHub)(nil)).Elem()
}
func (o IoTHubMapOutput) ToIoTHubMapOutput() IoTHubMapOutput {
return o
}
func (o IoTHubMapOutput) ToIoTHubMapOutputWithContext(ctx context.Context) IoTHubMapOutput {
return o
}
func (o IoTHubMapOutput) MapIndex(k pulumi.StringInput) IoTHubOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IoTHub {
return vs[0].(map[string]*IoTHub)[vs[1].(string)]
}).(IoTHubOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IoTHubInput)(nil)).Elem(), &IoTHub{})
pulumi.RegisterInputType(reflect.TypeOf((*IoTHubArrayInput)(nil)).Elem(), IoTHubArray{})
pulumi.RegisterInputType(reflect.TypeOf((*IoTHubMapInput)(nil)).Elem(), IoTHubMap{})
pulumi.RegisterOutputType(IoTHubOutput{})
pulumi.RegisterOutputType(IoTHubArrayOutput{})
pulumi.RegisterOutputType(IoTHubMapOutput{})
}
| 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/iot/sharedAccessPolicy.go | sdk/go/azure/iot/sharedAccessPolicy.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 iot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an IotHub Shared Access Policy
//
// ## 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/iot"
// "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
// }
// exampleIoTHub, err := iot.NewIoTHub(ctx, "example", &iot.IoTHubArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: &iot.IoTHubSkuArgs{
// Name: pulumi.String("S1"),
// Capacity: pulumi.Int(1),
// },
// })
// if err != nil {
// return err
// }
// _, err = iot.NewSharedAccessPolicy(ctx, "example", &iot.SharedAccessPolicyArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// IothubName: exampleIoTHub.Name,
// RegistryRead: pulumi.Bool(true),
// RegistryWrite: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// IoTHub Shared Access Policies can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:iot/sharedAccessPolicy:SharedAccessPolicy shared_access_policy1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/iotHubKeys/shared_access_policy1
// ```
type SharedAccessPolicy struct {
pulumi.CustomResourceState
// Adds `DeviceConnect` permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.
//
// > **Note:** At least one of `registryRead`, `registryWrite`, `serviceConnect`, `deviceConnect` permissions must be set to `true`.
DeviceConnect pulumi.BoolPtrOutput `pulumi:"deviceConnect"`
// The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
IothubName pulumi.StringOutput `pulumi:"iothubName"`
// Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The primary connection string of the Shared Access Policy.
PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"`
// The primary key used to create the authentication token.
PrimaryKey pulumi.StringOutput `pulumi:"primaryKey"`
// Adds `RegistryRead` permission to this Shared Access Account. It allows read access to the identity registry.
RegistryRead pulumi.BoolPtrOutput `pulumi:"registryRead"`
// Adds `RegistryWrite` permission to this Shared Access Account. It allows write access to the identity registry.
//
// > **Note:** When `registryWrite` is set to `true`, `registryRead` must also be set to true. This is a limitation of the Azure REST API
RegistryWrite pulumi.BoolPtrOutput `pulumi:"registryWrite"`
// The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The secondary connection string of the Shared Access Policy.
SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"`
// The secondary key used to create the authentication token.
SecondaryKey pulumi.StringOutput `pulumi:"secondaryKey"`
// Adds `ServiceConnect` permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
ServiceConnect pulumi.BoolPtrOutput `pulumi:"serviceConnect"`
}
// NewSharedAccessPolicy registers a new resource with the given unique name, arguments, and options.
func NewSharedAccessPolicy(ctx *pulumi.Context,
name string, args *SharedAccessPolicyArgs, opts ...pulumi.ResourceOption) (*SharedAccessPolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.IothubName == nil {
return nil, errors.New("invalid value for required argument 'IothubName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryConnectionString",
"primaryKey",
"secondaryConnectionString",
"secondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource SharedAccessPolicy
err := ctx.RegisterResource("azure:iot/sharedAccessPolicy:SharedAccessPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSharedAccessPolicy gets an existing SharedAccessPolicy 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 GetSharedAccessPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SharedAccessPolicyState, opts ...pulumi.ResourceOption) (*SharedAccessPolicy, error) {
var resource SharedAccessPolicy
err := ctx.ReadResource("azure:iot/sharedAccessPolicy:SharedAccessPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SharedAccessPolicy resources.
type sharedAccessPolicyState struct {
// Adds `DeviceConnect` permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.
//
// > **Note:** At least one of `registryRead`, `registryWrite`, `serviceConnect`, `deviceConnect` permissions must be set to `true`.
DeviceConnect *bool `pulumi:"deviceConnect"`
// The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
IothubName *string `pulumi:"iothubName"`
// Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The primary connection string of the Shared Access Policy.
PrimaryConnectionString *string `pulumi:"primaryConnectionString"`
// The primary key used to create the authentication token.
PrimaryKey *string `pulumi:"primaryKey"`
// Adds `RegistryRead` permission to this Shared Access Account. It allows read access to the identity registry.
RegistryRead *bool `pulumi:"registryRead"`
// Adds `RegistryWrite` permission to this Shared Access Account. It allows write access to the identity registry.
//
// > **Note:** When `registryWrite` is set to `true`, `registryRead` must also be set to true. This is a limitation of the Azure REST API
RegistryWrite *bool `pulumi:"registryWrite"`
// The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The secondary connection string of the Shared Access Policy.
SecondaryConnectionString *string `pulumi:"secondaryConnectionString"`
// The secondary key used to create the authentication token.
SecondaryKey *string `pulumi:"secondaryKey"`
// Adds `ServiceConnect` permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
ServiceConnect *bool `pulumi:"serviceConnect"`
}
type SharedAccessPolicyState struct {
// Adds `DeviceConnect` permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.
//
// > **Note:** At least one of `registryRead`, `registryWrite`, `serviceConnect`, `deviceConnect` permissions must be set to `true`.
DeviceConnect pulumi.BoolPtrInput
// The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
IothubName pulumi.StringPtrInput
// Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The primary connection string of the Shared Access Policy.
PrimaryConnectionString pulumi.StringPtrInput
// The primary key used to create the authentication token.
PrimaryKey pulumi.StringPtrInput
// Adds `RegistryRead` permission to this Shared Access Account. It allows read access to the identity registry.
RegistryRead pulumi.BoolPtrInput
// Adds `RegistryWrite` permission to this Shared Access Account. It allows write access to the identity registry.
//
// > **Note:** When `registryWrite` is set to `true`, `registryRead` must also be set to true. This is a limitation of the Azure REST API
RegistryWrite pulumi.BoolPtrInput
// The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The secondary connection string of the Shared Access Policy.
SecondaryConnectionString pulumi.StringPtrInput
// The secondary key used to create the authentication token.
SecondaryKey pulumi.StringPtrInput
// Adds `ServiceConnect` permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
ServiceConnect pulumi.BoolPtrInput
}
func (SharedAccessPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*sharedAccessPolicyState)(nil)).Elem()
}
type sharedAccessPolicyArgs struct {
// Adds `DeviceConnect` permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.
//
// > **Note:** At least one of `registryRead`, `registryWrite`, `serviceConnect`, `deviceConnect` permissions must be set to `true`.
DeviceConnect *bool `pulumi:"deviceConnect"`
// The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
IothubName string `pulumi:"iothubName"`
// Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Adds `RegistryRead` permission to this Shared Access Account. It allows read access to the identity registry.
RegistryRead *bool `pulumi:"registryRead"`
// Adds `RegistryWrite` permission to this Shared Access Account. It allows write access to the identity registry.
//
// > **Note:** When `registryWrite` is set to `true`, `registryRead` must also be set to true. This is a limitation of the Azure REST API
RegistryWrite *bool `pulumi:"registryWrite"`
// The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Adds `ServiceConnect` permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
ServiceConnect *bool `pulumi:"serviceConnect"`
}
// The set of arguments for constructing a SharedAccessPolicy resource.
type SharedAccessPolicyArgs struct {
// Adds `DeviceConnect` permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.
//
// > **Note:** At least one of `registryRead`, `registryWrite`, `serviceConnect`, `deviceConnect` permissions must be set to `true`.
DeviceConnect pulumi.BoolPtrInput
// The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
IothubName pulumi.StringInput
// Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Adds `RegistryRead` permission to this Shared Access Account. It allows read access to the identity registry.
RegistryRead pulumi.BoolPtrInput
// Adds `RegistryWrite` permission to this Shared Access Account. It allows write access to the identity registry.
//
// > **Note:** When `registryWrite` is set to `true`, `registryRead` must also be set to true. This is a limitation of the Azure REST API
RegistryWrite pulumi.BoolPtrInput
// The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Adds `ServiceConnect` permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
ServiceConnect pulumi.BoolPtrInput
}
func (SharedAccessPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*sharedAccessPolicyArgs)(nil)).Elem()
}
type SharedAccessPolicyInput interface {
pulumi.Input
ToSharedAccessPolicyOutput() SharedAccessPolicyOutput
ToSharedAccessPolicyOutputWithContext(ctx context.Context) SharedAccessPolicyOutput
}
func (*SharedAccessPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**SharedAccessPolicy)(nil)).Elem()
}
func (i *SharedAccessPolicy) ToSharedAccessPolicyOutput() SharedAccessPolicyOutput {
return i.ToSharedAccessPolicyOutputWithContext(context.Background())
}
func (i *SharedAccessPolicy) ToSharedAccessPolicyOutputWithContext(ctx context.Context) SharedAccessPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(SharedAccessPolicyOutput)
}
// SharedAccessPolicyArrayInput is an input type that accepts SharedAccessPolicyArray and SharedAccessPolicyArrayOutput values.
// You can construct a concrete instance of `SharedAccessPolicyArrayInput` via:
//
// SharedAccessPolicyArray{ SharedAccessPolicyArgs{...} }
type SharedAccessPolicyArrayInput interface {
pulumi.Input
ToSharedAccessPolicyArrayOutput() SharedAccessPolicyArrayOutput
ToSharedAccessPolicyArrayOutputWithContext(context.Context) SharedAccessPolicyArrayOutput
}
type SharedAccessPolicyArray []SharedAccessPolicyInput
func (SharedAccessPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SharedAccessPolicy)(nil)).Elem()
}
func (i SharedAccessPolicyArray) ToSharedAccessPolicyArrayOutput() SharedAccessPolicyArrayOutput {
return i.ToSharedAccessPolicyArrayOutputWithContext(context.Background())
}
func (i SharedAccessPolicyArray) ToSharedAccessPolicyArrayOutputWithContext(ctx context.Context) SharedAccessPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SharedAccessPolicyArrayOutput)
}
// SharedAccessPolicyMapInput is an input type that accepts SharedAccessPolicyMap and SharedAccessPolicyMapOutput values.
// You can construct a concrete instance of `SharedAccessPolicyMapInput` via:
//
// SharedAccessPolicyMap{ "key": SharedAccessPolicyArgs{...} }
type SharedAccessPolicyMapInput interface {
pulumi.Input
ToSharedAccessPolicyMapOutput() SharedAccessPolicyMapOutput
ToSharedAccessPolicyMapOutputWithContext(context.Context) SharedAccessPolicyMapOutput
}
type SharedAccessPolicyMap map[string]SharedAccessPolicyInput
func (SharedAccessPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SharedAccessPolicy)(nil)).Elem()
}
func (i SharedAccessPolicyMap) ToSharedAccessPolicyMapOutput() SharedAccessPolicyMapOutput {
return i.ToSharedAccessPolicyMapOutputWithContext(context.Background())
}
func (i SharedAccessPolicyMap) ToSharedAccessPolicyMapOutputWithContext(ctx context.Context) SharedAccessPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SharedAccessPolicyMapOutput)
}
type SharedAccessPolicyOutput struct{ *pulumi.OutputState }
func (SharedAccessPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SharedAccessPolicy)(nil)).Elem()
}
func (o SharedAccessPolicyOutput) ToSharedAccessPolicyOutput() SharedAccessPolicyOutput {
return o
}
func (o SharedAccessPolicyOutput) ToSharedAccessPolicyOutputWithContext(ctx context.Context) SharedAccessPolicyOutput {
return o
}
// Adds `DeviceConnect` permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.
//
// > **Note:** At least one of `registryRead`, `registryWrite`, `serviceConnect`, `deviceConnect` permissions must be set to `true`.
func (o SharedAccessPolicyOutput) DeviceConnect() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SharedAccessPolicy) pulumi.BoolPtrOutput { return v.DeviceConnect }).(pulumi.BoolPtrOutput)
}
// The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
func (o SharedAccessPolicyOutput) IothubName() pulumi.StringOutput {
return o.ApplyT(func(v *SharedAccessPolicy) pulumi.StringOutput { return v.IothubName }).(pulumi.StringOutput)
}
// Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
func (o SharedAccessPolicyOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SharedAccessPolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The primary connection string of the Shared Access Policy.
func (o SharedAccessPolicyOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *SharedAccessPolicy) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The primary key used to create the authentication token.
func (o SharedAccessPolicyOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *SharedAccessPolicy) pulumi.StringOutput { return v.PrimaryKey }).(pulumi.StringOutput)
}
// Adds `RegistryRead` permission to this Shared Access Account. It allows read access to the identity registry.
func (o SharedAccessPolicyOutput) RegistryRead() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SharedAccessPolicy) pulumi.BoolPtrOutput { return v.RegistryRead }).(pulumi.BoolPtrOutput)
}
// Adds `RegistryWrite` permission to this Shared Access Account. It allows write access to the identity registry.
//
// > **Note:** When `registryWrite` is set to `true`, `registryRead` must also be set to true. This is a limitation of the Azure REST API
func (o SharedAccessPolicyOutput) RegistryWrite() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SharedAccessPolicy) pulumi.BoolPtrOutput { return v.RegistryWrite }).(pulumi.BoolPtrOutput)
}
// The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.
func (o SharedAccessPolicyOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *SharedAccessPolicy) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The secondary connection string of the Shared Access Policy.
func (o SharedAccessPolicyOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *SharedAccessPolicy) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The secondary key used to create the authentication token.
func (o SharedAccessPolicyOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *SharedAccessPolicy) pulumi.StringOutput { return v.SecondaryKey }).(pulumi.StringOutput)
}
// Adds `ServiceConnect` permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
func (o SharedAccessPolicyOutput) ServiceConnect() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SharedAccessPolicy) pulumi.BoolPtrOutput { return v.ServiceConnect }).(pulumi.BoolPtrOutput)
}
type SharedAccessPolicyArrayOutput struct{ *pulumi.OutputState }
func (SharedAccessPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SharedAccessPolicy)(nil)).Elem()
}
func (o SharedAccessPolicyArrayOutput) ToSharedAccessPolicyArrayOutput() SharedAccessPolicyArrayOutput {
return o
}
func (o SharedAccessPolicyArrayOutput) ToSharedAccessPolicyArrayOutputWithContext(ctx context.Context) SharedAccessPolicyArrayOutput {
return o
}
func (o SharedAccessPolicyArrayOutput) Index(i pulumi.IntInput) SharedAccessPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SharedAccessPolicy {
return vs[0].([]*SharedAccessPolicy)[vs[1].(int)]
}).(SharedAccessPolicyOutput)
}
type SharedAccessPolicyMapOutput struct{ *pulumi.OutputState }
func (SharedAccessPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SharedAccessPolicy)(nil)).Elem()
}
func (o SharedAccessPolicyMapOutput) ToSharedAccessPolicyMapOutput() SharedAccessPolicyMapOutput {
return o
}
func (o SharedAccessPolicyMapOutput) ToSharedAccessPolicyMapOutputWithContext(ctx context.Context) SharedAccessPolicyMapOutput {
return o
}
func (o SharedAccessPolicyMapOutput) MapIndex(k pulumi.StringInput) SharedAccessPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SharedAccessPolicy {
return vs[0].(map[string]*SharedAccessPolicy)[vs[1].(string)]
}).(SharedAccessPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SharedAccessPolicyInput)(nil)).Elem(), &SharedAccessPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*SharedAccessPolicyArrayInput)(nil)).Elem(), SharedAccessPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SharedAccessPolicyMapInput)(nil)).Elem(), SharedAccessPolicyMap{})
pulumi.RegisterOutputType(SharedAccessPolicyOutput{})
pulumi.RegisterOutputType(SharedAccessPolicyArrayOutput{})
pulumi.RegisterOutputType(SharedAccessPolicyMapOutput{})
}
| 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/iot/iotHubCertificate.go | sdk/go/azure/iot/iotHubCertificate.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 iot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an IotHub Device Provisioning Service Certificate.
//
// ## 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/iot"
// "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("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleIotHubDps, err := iot.NewIotHubDps(ctx, "example", &iot.IotHubDpsArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: &iot.IotHubDpsSkuArgs{
// Name: pulumi.String("S1"),
// Capacity: pulumi.Int(1),
// },
// })
// if err != nil {
// return err
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "example.cer",
// }, nil)
// if err != nil {
// return err
// }
// _, err = iot.NewIotHubCertificate(ctx, "example", &iot.IotHubCertificateArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// IotDpsName: exampleIotHubDps.Name,
// CertificateContent: pulumi.String(invokeFilebase64.Result),
// })
// 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.Devices` - 2022-02-05
//
// ## Import
//
// IoTHub Device Provisioning Service Certificates can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:iot/iotHubCertificate:IotHubCertificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/provisioningServices/example/certificates/example
// ```
type IotHubCertificate struct {
pulumi.CustomResourceState
// The Base-64 representation of the X509 leaf certificate .cer file or just a .pem file content.
CertificateContent pulumi.StringOutput `pulumi:"certificateContent"`
// The name of the IoT Device Provisioning Service that this certificate will be attached to. Changing this forces a new resource to be created.
IotDpsName pulumi.StringOutput `pulumi:"iotDpsName"`
// Specifies if the certificate is created in verified state. Defaults to `false`. Changing this forces a new resource to be created.
IsVerified pulumi.BoolPtrOutput `pulumi:"isVerified"`
// Specifies the name of the Iot Device Provisioning Service Certificate resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group under which the Iot Device Provisioning Service Certificate resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewIotHubCertificate registers a new resource with the given unique name, arguments, and options.
func NewIotHubCertificate(ctx *pulumi.Context,
name string, args *IotHubCertificateArgs, opts ...pulumi.ResourceOption) (*IotHubCertificate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CertificateContent == nil {
return nil, errors.New("invalid value for required argument 'CertificateContent'")
}
if args.IotDpsName == nil {
return nil, errors.New("invalid value for required argument 'IotDpsName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.CertificateContent != nil {
args.CertificateContent = pulumi.ToSecret(args.CertificateContent).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"certificateContent",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource IotHubCertificate
err := ctx.RegisterResource("azure:iot/iotHubCertificate:IotHubCertificate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIotHubCertificate gets an existing IotHubCertificate 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 GetIotHubCertificate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IotHubCertificateState, opts ...pulumi.ResourceOption) (*IotHubCertificate, error) {
var resource IotHubCertificate
err := ctx.ReadResource("azure:iot/iotHubCertificate:IotHubCertificate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IotHubCertificate resources.
type iotHubCertificateState struct {
// The Base-64 representation of the X509 leaf certificate .cer file or just a .pem file content.
CertificateContent *string `pulumi:"certificateContent"`
// The name of the IoT Device Provisioning Service that this certificate will be attached to. Changing this forces a new resource to be created.
IotDpsName *string `pulumi:"iotDpsName"`
// Specifies if the certificate is created in verified state. Defaults to `false`. Changing this forces a new resource to be created.
IsVerified *bool `pulumi:"isVerified"`
// Specifies the name of the Iot Device Provisioning Service Certificate resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group under which the Iot Device Provisioning Service Certificate resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type IotHubCertificateState struct {
// The Base-64 representation of the X509 leaf certificate .cer file or just a .pem file content.
CertificateContent pulumi.StringPtrInput
// The name of the IoT Device Provisioning Service that this certificate will be attached to. Changing this forces a new resource to be created.
IotDpsName pulumi.StringPtrInput
// Specifies if the certificate is created in verified state. Defaults to `false`. Changing this forces a new resource to be created.
IsVerified pulumi.BoolPtrInput
// Specifies the name of the Iot Device Provisioning Service Certificate resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group under which the Iot Device Provisioning Service Certificate resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (IotHubCertificateState) ElementType() reflect.Type {
return reflect.TypeOf((*iotHubCertificateState)(nil)).Elem()
}
type iotHubCertificateArgs struct {
// The Base-64 representation of the X509 leaf certificate .cer file or just a .pem file content.
CertificateContent string `pulumi:"certificateContent"`
// The name of the IoT Device Provisioning Service that this certificate will be attached to. Changing this forces a new resource to be created.
IotDpsName string `pulumi:"iotDpsName"`
// Specifies if the certificate is created in verified state. Defaults to `false`. Changing this forces a new resource to be created.
IsVerified *bool `pulumi:"isVerified"`
// Specifies the name of the Iot Device Provisioning Service Certificate resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group under which the Iot Device Provisioning Service Certificate resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a IotHubCertificate resource.
type IotHubCertificateArgs struct {
// The Base-64 representation of the X509 leaf certificate .cer file or just a .pem file content.
CertificateContent pulumi.StringInput
// The name of the IoT Device Provisioning Service that this certificate will be attached to. Changing this forces a new resource to be created.
IotDpsName pulumi.StringInput
// Specifies if the certificate is created in verified state. Defaults to `false`. Changing this forces a new resource to be created.
IsVerified pulumi.BoolPtrInput
// Specifies the name of the Iot Device Provisioning Service Certificate resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group under which the Iot Device Provisioning Service Certificate resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (IotHubCertificateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*iotHubCertificateArgs)(nil)).Elem()
}
type IotHubCertificateInput interface {
pulumi.Input
ToIotHubCertificateOutput() IotHubCertificateOutput
ToIotHubCertificateOutputWithContext(ctx context.Context) IotHubCertificateOutput
}
func (*IotHubCertificate) ElementType() reflect.Type {
return reflect.TypeOf((**IotHubCertificate)(nil)).Elem()
}
func (i *IotHubCertificate) ToIotHubCertificateOutput() IotHubCertificateOutput {
return i.ToIotHubCertificateOutputWithContext(context.Background())
}
func (i *IotHubCertificate) ToIotHubCertificateOutputWithContext(ctx context.Context) IotHubCertificateOutput {
return pulumi.ToOutputWithContext(ctx, i).(IotHubCertificateOutput)
}
// IotHubCertificateArrayInput is an input type that accepts IotHubCertificateArray and IotHubCertificateArrayOutput values.
// You can construct a concrete instance of `IotHubCertificateArrayInput` via:
//
// IotHubCertificateArray{ IotHubCertificateArgs{...} }
type IotHubCertificateArrayInput interface {
pulumi.Input
ToIotHubCertificateArrayOutput() IotHubCertificateArrayOutput
ToIotHubCertificateArrayOutputWithContext(context.Context) IotHubCertificateArrayOutput
}
type IotHubCertificateArray []IotHubCertificateInput
func (IotHubCertificateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IotHubCertificate)(nil)).Elem()
}
func (i IotHubCertificateArray) ToIotHubCertificateArrayOutput() IotHubCertificateArrayOutput {
return i.ToIotHubCertificateArrayOutputWithContext(context.Background())
}
func (i IotHubCertificateArray) ToIotHubCertificateArrayOutputWithContext(ctx context.Context) IotHubCertificateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IotHubCertificateArrayOutput)
}
// IotHubCertificateMapInput is an input type that accepts IotHubCertificateMap and IotHubCertificateMapOutput values.
// You can construct a concrete instance of `IotHubCertificateMapInput` via:
//
// IotHubCertificateMap{ "key": IotHubCertificateArgs{...} }
type IotHubCertificateMapInput interface {
pulumi.Input
ToIotHubCertificateMapOutput() IotHubCertificateMapOutput
ToIotHubCertificateMapOutputWithContext(context.Context) IotHubCertificateMapOutput
}
type IotHubCertificateMap map[string]IotHubCertificateInput
func (IotHubCertificateMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IotHubCertificate)(nil)).Elem()
}
func (i IotHubCertificateMap) ToIotHubCertificateMapOutput() IotHubCertificateMapOutput {
return i.ToIotHubCertificateMapOutputWithContext(context.Background())
}
func (i IotHubCertificateMap) ToIotHubCertificateMapOutputWithContext(ctx context.Context) IotHubCertificateMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IotHubCertificateMapOutput)
}
type IotHubCertificateOutput struct{ *pulumi.OutputState }
func (IotHubCertificateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**IotHubCertificate)(nil)).Elem()
}
func (o IotHubCertificateOutput) ToIotHubCertificateOutput() IotHubCertificateOutput {
return o
}
func (o IotHubCertificateOutput) ToIotHubCertificateOutputWithContext(ctx context.Context) IotHubCertificateOutput {
return o
}
// The Base-64 representation of the X509 leaf certificate .cer file or just a .pem file content.
func (o IotHubCertificateOutput) CertificateContent() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubCertificate) pulumi.StringOutput { return v.CertificateContent }).(pulumi.StringOutput)
}
// The name of the IoT Device Provisioning Service that this certificate will be attached to. Changing this forces a new resource to be created.
func (o IotHubCertificateOutput) IotDpsName() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubCertificate) pulumi.StringOutput { return v.IotDpsName }).(pulumi.StringOutput)
}
// Specifies if the certificate is created in verified state. Defaults to `false`. Changing this forces a new resource to be created.
func (o IotHubCertificateOutput) IsVerified() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *IotHubCertificate) pulumi.BoolPtrOutput { return v.IsVerified }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the Iot Device Provisioning Service Certificate resource. Changing this forces a new resource to be created.
func (o IotHubCertificateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubCertificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group under which the Iot Device Provisioning Service Certificate resource has to be created. Changing this forces a new resource to be created.
func (o IotHubCertificateOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubCertificate) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type IotHubCertificateArrayOutput struct{ *pulumi.OutputState }
func (IotHubCertificateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IotHubCertificate)(nil)).Elem()
}
func (o IotHubCertificateArrayOutput) ToIotHubCertificateArrayOutput() IotHubCertificateArrayOutput {
return o
}
func (o IotHubCertificateArrayOutput) ToIotHubCertificateArrayOutputWithContext(ctx context.Context) IotHubCertificateArrayOutput {
return o
}
func (o IotHubCertificateArrayOutput) Index(i pulumi.IntInput) IotHubCertificateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IotHubCertificate {
return vs[0].([]*IotHubCertificate)[vs[1].(int)]
}).(IotHubCertificateOutput)
}
type IotHubCertificateMapOutput struct{ *pulumi.OutputState }
func (IotHubCertificateMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IotHubCertificate)(nil)).Elem()
}
func (o IotHubCertificateMapOutput) ToIotHubCertificateMapOutput() IotHubCertificateMapOutput {
return o
}
func (o IotHubCertificateMapOutput) ToIotHubCertificateMapOutputWithContext(ctx context.Context) IotHubCertificateMapOutput {
return o
}
func (o IotHubCertificateMapOutput) MapIndex(k pulumi.StringInput) IotHubCertificateOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IotHubCertificate {
return vs[0].(map[string]*IotHubCertificate)[vs[1].(string)]
}).(IotHubCertificateOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IotHubCertificateInput)(nil)).Elem(), &IotHubCertificate{})
pulumi.RegisterInputType(reflect.TypeOf((*IotHubCertificateArrayInput)(nil)).Elem(), IotHubCertificateArray{})
pulumi.RegisterInputType(reflect.TypeOf((*IotHubCertificateMapInput)(nil)).Elem(), IotHubCertificateMap{})
pulumi.RegisterOutputType(IotHubCertificateOutput{})
pulumi.RegisterOutputType(IotHubCertificateArrayOutput{})
pulumi.RegisterOutputType(IotHubCertificateMapOutput{})
}
| 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/iot/securitySolution.go | sdk/go/azure/iot/securitySolution.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 iot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an iot security solution.
//
// ## 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/iot"
// "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
// }
// exampleIoTHub, err := iot.NewIoTHub(ctx, "example", &iot.IoTHubArgs{
// Name: pulumi.String("example-IoTHub"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: &iot.IoTHubSkuArgs{
// Name: pulumi.String("S1"),
// Capacity: pulumi.Int(1),
// },
// })
// if err != nil {
// return err
// }
// _, err = iot.NewSecuritySolution(ctx, "example", &iot.SecuritySolutionArgs{
// Name: pulumi.String("example-Iot-Security-Solution"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DisplayName: pulumi.String("Iot Security Solution"),
// IothubIds: pulumi.StringArray{
// exampleIoTHub.ID(),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Iot Security Solution can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:iot/securitySolution:SecuritySolution example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Security/iotSecuritySolutions/solution1
// ```
type SecuritySolution struct {
pulumi.CustomResourceState
// A `additionalWorkspace` block as defined below.
AdditionalWorkspaces SecuritySolutionAdditionalWorkspaceArrayOutput `pulumi:"additionalWorkspaces"`
// A list of disabled data sources for the Iot Security Solution. Possible value is `TwinData`.
DisabledDataSources pulumi.StringArrayOutput `pulumi:"disabledDataSources"`
// Specifies the Display Name for this Iot Security Solution.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// Is the Iot Security Solution enabled? Defaults to `true`.
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
// A list of data which is to exported to analytic workspace. Valid values include `RawEvents`.
EventsToExports pulumi.StringArrayOutput `pulumi:"eventsToExports"`
// Specifies the IoT Hub resource IDs to which this Iot Security Solution is applied.
IothubIds pulumi.StringArrayOutput `pulumi:"iothubIds"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the Log Analytics Workspace ID to which the security data will be sent.
LogAnalyticsWorkspaceId pulumi.StringPtrOutput `pulumi:"logAnalyticsWorkspaceId"`
// Should IP addressed be unmasked in the log? Defaults to `false`.
LogUnmaskedIpsEnabled pulumi.BoolPtrOutput `pulumi:"logUnmaskedIpsEnabled"`
// Specifies the name of the Iot Security Solution. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// An Azure Resource Graph query used to set the resources monitored.
QueryForResources pulumi.StringOutput `pulumi:"queryForResources"`
// A list of subscription Ids on which the user defined resources query should be executed.
QuerySubscriptionIds pulumi.StringArrayOutput `pulumi:"querySubscriptionIds"`
// A `recommendationsEnabled` block of options to enable or disable as defined below.
RecommendationsEnabled SecuritySolutionRecommendationsEnabledOutput `pulumi:"recommendationsEnabled"`
// Specifies the name of the resource group in which to create the Iot Security Solution. 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"`
}
// NewSecuritySolution registers a new resource with the given unique name, arguments, and options.
func NewSecuritySolution(ctx *pulumi.Context,
name string, args *SecuritySolutionArgs, opts ...pulumi.ResourceOption) (*SecuritySolution, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.IothubIds == nil {
return nil, errors.New("invalid value for required argument 'IothubIds'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SecuritySolution
err := ctx.RegisterResource("azure:iot/securitySolution:SecuritySolution", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSecuritySolution gets an existing SecuritySolution 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 GetSecuritySolution(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SecuritySolutionState, opts ...pulumi.ResourceOption) (*SecuritySolution, error) {
var resource SecuritySolution
err := ctx.ReadResource("azure:iot/securitySolution:SecuritySolution", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SecuritySolution resources.
type securitySolutionState struct {
// A `additionalWorkspace` block as defined below.
AdditionalWorkspaces []SecuritySolutionAdditionalWorkspace `pulumi:"additionalWorkspaces"`
// A list of disabled data sources for the Iot Security Solution. Possible value is `TwinData`.
DisabledDataSources []string `pulumi:"disabledDataSources"`
// Specifies the Display Name for this Iot Security Solution.
DisplayName *string `pulumi:"displayName"`
// Is the Iot Security Solution enabled? Defaults to `true`.
Enabled *bool `pulumi:"enabled"`
// A list of data which is to exported to analytic workspace. Valid values include `RawEvents`.
EventsToExports []string `pulumi:"eventsToExports"`
// Specifies the IoT Hub resource IDs to which this Iot Security Solution is applied.
IothubIds []string `pulumi:"iothubIds"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the Log Analytics Workspace ID to which the security data will be sent.
LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"`
// Should IP addressed be unmasked in the log? Defaults to `false`.
LogUnmaskedIpsEnabled *bool `pulumi:"logUnmaskedIpsEnabled"`
// Specifies the name of the Iot Security Solution. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// An Azure Resource Graph query used to set the resources monitored.
QueryForResources *string `pulumi:"queryForResources"`
// A list of subscription Ids on which the user defined resources query should be executed.
QuerySubscriptionIds []string `pulumi:"querySubscriptionIds"`
// A `recommendationsEnabled` block of options to enable or disable as defined below.
RecommendationsEnabled *SecuritySolutionRecommendationsEnabled `pulumi:"recommendationsEnabled"`
// Specifies the name of the resource group in which to create the Iot Security Solution. 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 SecuritySolutionState struct {
// A `additionalWorkspace` block as defined below.
AdditionalWorkspaces SecuritySolutionAdditionalWorkspaceArrayInput
// A list of disabled data sources for the Iot Security Solution. Possible value is `TwinData`.
DisabledDataSources pulumi.StringArrayInput
// Specifies the Display Name for this Iot Security Solution.
DisplayName pulumi.StringPtrInput
// Is the Iot Security Solution enabled? Defaults to `true`.
Enabled pulumi.BoolPtrInput
// A list of data which is to exported to analytic workspace. Valid values include `RawEvents`.
EventsToExports pulumi.StringArrayInput
// Specifies the IoT Hub resource IDs to which this Iot Security Solution is applied.
IothubIds pulumi.StringArrayInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the Log Analytics Workspace ID to which the security data will be sent.
LogAnalyticsWorkspaceId pulumi.StringPtrInput
// Should IP addressed be unmasked in the log? Defaults to `false`.
LogUnmaskedIpsEnabled pulumi.BoolPtrInput
// Specifies the name of the Iot Security Solution. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// An Azure Resource Graph query used to set the resources monitored.
QueryForResources pulumi.StringPtrInput
// A list of subscription Ids on which the user defined resources query should be executed.
QuerySubscriptionIds pulumi.StringArrayInput
// A `recommendationsEnabled` block of options to enable or disable as defined below.
RecommendationsEnabled SecuritySolutionRecommendationsEnabledPtrInput
// Specifies the name of the resource group in which to create the Iot Security Solution. 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 (SecuritySolutionState) ElementType() reflect.Type {
return reflect.TypeOf((*securitySolutionState)(nil)).Elem()
}
type securitySolutionArgs struct {
// A `additionalWorkspace` block as defined below.
AdditionalWorkspaces []SecuritySolutionAdditionalWorkspace `pulumi:"additionalWorkspaces"`
// A list of disabled data sources for the Iot Security Solution. Possible value is `TwinData`.
DisabledDataSources []string `pulumi:"disabledDataSources"`
// Specifies the Display Name for this Iot Security Solution.
DisplayName string `pulumi:"displayName"`
// Is the Iot Security Solution enabled? Defaults to `true`.
Enabled *bool `pulumi:"enabled"`
// A list of data which is to exported to analytic workspace. Valid values include `RawEvents`.
EventsToExports []string `pulumi:"eventsToExports"`
// Specifies the IoT Hub resource IDs to which this Iot Security Solution is applied.
IothubIds []string `pulumi:"iothubIds"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the Log Analytics Workspace ID to which the security data will be sent.
LogAnalyticsWorkspaceId *string `pulumi:"logAnalyticsWorkspaceId"`
// Should IP addressed be unmasked in the log? Defaults to `false`.
LogUnmaskedIpsEnabled *bool `pulumi:"logUnmaskedIpsEnabled"`
// Specifies the name of the Iot Security Solution. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// An Azure Resource Graph query used to set the resources monitored.
QueryForResources *string `pulumi:"queryForResources"`
// A list of subscription Ids on which the user defined resources query should be executed.
QuerySubscriptionIds []string `pulumi:"querySubscriptionIds"`
// A `recommendationsEnabled` block of options to enable or disable as defined below.
RecommendationsEnabled *SecuritySolutionRecommendationsEnabled `pulumi:"recommendationsEnabled"`
// Specifies the name of the resource group in which to create the Iot Security Solution. 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 SecuritySolution resource.
type SecuritySolutionArgs struct {
// A `additionalWorkspace` block as defined below.
AdditionalWorkspaces SecuritySolutionAdditionalWorkspaceArrayInput
// A list of disabled data sources for the Iot Security Solution. Possible value is `TwinData`.
DisabledDataSources pulumi.StringArrayInput
// Specifies the Display Name for this Iot Security Solution.
DisplayName pulumi.StringInput
// Is the Iot Security Solution enabled? Defaults to `true`.
Enabled pulumi.BoolPtrInput
// A list of data which is to exported to analytic workspace. Valid values include `RawEvents`.
EventsToExports pulumi.StringArrayInput
// Specifies the IoT Hub resource IDs to which this Iot Security Solution is applied.
IothubIds pulumi.StringArrayInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the Log Analytics Workspace ID to which the security data will be sent.
LogAnalyticsWorkspaceId pulumi.StringPtrInput
// Should IP addressed be unmasked in the log? Defaults to `false`.
LogUnmaskedIpsEnabled pulumi.BoolPtrInput
// Specifies the name of the Iot Security Solution. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// An Azure Resource Graph query used to set the resources monitored.
QueryForResources pulumi.StringPtrInput
// A list of subscription Ids on which the user defined resources query should be executed.
QuerySubscriptionIds pulumi.StringArrayInput
// A `recommendationsEnabled` block of options to enable or disable as defined below.
RecommendationsEnabled SecuritySolutionRecommendationsEnabledPtrInput
// Specifies the name of the resource group in which to create the Iot Security Solution. 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 (SecuritySolutionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*securitySolutionArgs)(nil)).Elem()
}
type SecuritySolutionInput interface {
pulumi.Input
ToSecuritySolutionOutput() SecuritySolutionOutput
ToSecuritySolutionOutputWithContext(ctx context.Context) SecuritySolutionOutput
}
func (*SecuritySolution) ElementType() reflect.Type {
return reflect.TypeOf((**SecuritySolution)(nil)).Elem()
}
func (i *SecuritySolution) ToSecuritySolutionOutput() SecuritySolutionOutput {
return i.ToSecuritySolutionOutputWithContext(context.Background())
}
func (i *SecuritySolution) ToSecuritySolutionOutputWithContext(ctx context.Context) SecuritySolutionOutput {
return pulumi.ToOutputWithContext(ctx, i).(SecuritySolutionOutput)
}
// SecuritySolutionArrayInput is an input type that accepts SecuritySolutionArray and SecuritySolutionArrayOutput values.
// You can construct a concrete instance of `SecuritySolutionArrayInput` via:
//
// SecuritySolutionArray{ SecuritySolutionArgs{...} }
type SecuritySolutionArrayInput interface {
pulumi.Input
ToSecuritySolutionArrayOutput() SecuritySolutionArrayOutput
ToSecuritySolutionArrayOutputWithContext(context.Context) SecuritySolutionArrayOutput
}
type SecuritySolutionArray []SecuritySolutionInput
func (SecuritySolutionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SecuritySolution)(nil)).Elem()
}
func (i SecuritySolutionArray) ToSecuritySolutionArrayOutput() SecuritySolutionArrayOutput {
return i.ToSecuritySolutionArrayOutputWithContext(context.Background())
}
func (i SecuritySolutionArray) ToSecuritySolutionArrayOutputWithContext(ctx context.Context) SecuritySolutionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SecuritySolutionArrayOutput)
}
// SecuritySolutionMapInput is an input type that accepts SecuritySolutionMap and SecuritySolutionMapOutput values.
// You can construct a concrete instance of `SecuritySolutionMapInput` via:
//
// SecuritySolutionMap{ "key": SecuritySolutionArgs{...} }
type SecuritySolutionMapInput interface {
pulumi.Input
ToSecuritySolutionMapOutput() SecuritySolutionMapOutput
ToSecuritySolutionMapOutputWithContext(context.Context) SecuritySolutionMapOutput
}
type SecuritySolutionMap map[string]SecuritySolutionInput
func (SecuritySolutionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SecuritySolution)(nil)).Elem()
}
func (i SecuritySolutionMap) ToSecuritySolutionMapOutput() SecuritySolutionMapOutput {
return i.ToSecuritySolutionMapOutputWithContext(context.Background())
}
func (i SecuritySolutionMap) ToSecuritySolutionMapOutputWithContext(ctx context.Context) SecuritySolutionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SecuritySolutionMapOutput)
}
type SecuritySolutionOutput struct{ *pulumi.OutputState }
func (SecuritySolutionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SecuritySolution)(nil)).Elem()
}
func (o SecuritySolutionOutput) ToSecuritySolutionOutput() SecuritySolutionOutput {
return o
}
func (o SecuritySolutionOutput) ToSecuritySolutionOutputWithContext(ctx context.Context) SecuritySolutionOutput {
return o
}
// A `additionalWorkspace` block as defined below.
func (o SecuritySolutionOutput) AdditionalWorkspaces() SecuritySolutionAdditionalWorkspaceArrayOutput {
return o.ApplyT(func(v *SecuritySolution) SecuritySolutionAdditionalWorkspaceArrayOutput {
return v.AdditionalWorkspaces
}).(SecuritySolutionAdditionalWorkspaceArrayOutput)
}
// A list of disabled data sources for the Iot Security Solution. Possible value is `TwinData`.
func (o SecuritySolutionOutput) DisabledDataSources() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecuritySolution) pulumi.StringArrayOutput { return v.DisabledDataSources }).(pulumi.StringArrayOutput)
}
// Specifies the Display Name for this Iot Security Solution.
func (o SecuritySolutionOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *SecuritySolution) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// Is the Iot Security Solution enabled? Defaults to `true`.
func (o SecuritySolutionOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecuritySolution) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput)
}
// A list of data which is to exported to analytic workspace. Valid values include `RawEvents`.
func (o SecuritySolutionOutput) EventsToExports() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecuritySolution) pulumi.StringArrayOutput { return v.EventsToExports }).(pulumi.StringArrayOutput)
}
// Specifies the IoT Hub resource IDs to which this Iot Security Solution is applied.
func (o SecuritySolutionOutput) IothubIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecuritySolution) pulumi.StringArrayOutput { return v.IothubIds }).(pulumi.StringArrayOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o SecuritySolutionOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *SecuritySolution) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the Log Analytics Workspace ID to which the security data will be sent.
func (o SecuritySolutionOutput) LogAnalyticsWorkspaceId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SecuritySolution) pulumi.StringPtrOutput { return v.LogAnalyticsWorkspaceId }).(pulumi.StringPtrOutput)
}
// Should IP addressed be unmasked in the log? Defaults to `false`.
func (o SecuritySolutionOutput) LogUnmaskedIpsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SecuritySolution) pulumi.BoolPtrOutput { return v.LogUnmaskedIpsEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the Iot Security Solution. Changing this forces a new resource to be created.
func (o SecuritySolutionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SecuritySolution) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// An Azure Resource Graph query used to set the resources monitored.
func (o SecuritySolutionOutput) QueryForResources() pulumi.StringOutput {
return o.ApplyT(func(v *SecuritySolution) pulumi.StringOutput { return v.QueryForResources }).(pulumi.StringOutput)
}
// A list of subscription Ids on which the user defined resources query should be executed.
func (o SecuritySolutionOutput) QuerySubscriptionIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SecuritySolution) pulumi.StringArrayOutput { return v.QuerySubscriptionIds }).(pulumi.StringArrayOutput)
}
// A `recommendationsEnabled` block of options to enable or disable as defined below.
func (o SecuritySolutionOutput) RecommendationsEnabled() SecuritySolutionRecommendationsEnabledOutput {
return o.ApplyT(func(v *SecuritySolution) SecuritySolutionRecommendationsEnabledOutput {
return v.RecommendationsEnabled
}).(SecuritySolutionRecommendationsEnabledOutput)
}
// Specifies the name of the resource group in which to create the Iot Security Solution. Changing this forces a new resource to be created.
func (o SecuritySolutionOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *SecuritySolution) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o SecuritySolutionOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *SecuritySolution) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type SecuritySolutionArrayOutput struct{ *pulumi.OutputState }
func (SecuritySolutionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SecuritySolution)(nil)).Elem()
}
func (o SecuritySolutionArrayOutput) ToSecuritySolutionArrayOutput() SecuritySolutionArrayOutput {
return o
}
func (o SecuritySolutionArrayOutput) ToSecuritySolutionArrayOutputWithContext(ctx context.Context) SecuritySolutionArrayOutput {
return o
}
func (o SecuritySolutionArrayOutput) Index(i pulumi.IntInput) SecuritySolutionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SecuritySolution {
return vs[0].([]*SecuritySolution)[vs[1].(int)]
}).(SecuritySolutionOutput)
}
type SecuritySolutionMapOutput struct{ *pulumi.OutputState }
func (SecuritySolutionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SecuritySolution)(nil)).Elem()
}
func (o SecuritySolutionMapOutput) ToSecuritySolutionMapOutput() SecuritySolutionMapOutput {
return o
}
func (o SecuritySolutionMapOutput) ToSecuritySolutionMapOutputWithContext(ctx context.Context) SecuritySolutionMapOutput {
return o
}
func (o SecuritySolutionMapOutput) MapIndex(k pulumi.StringInput) SecuritySolutionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SecuritySolution {
return vs[0].(map[string]*SecuritySolution)[vs[1].(string)]
}).(SecuritySolutionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SecuritySolutionInput)(nil)).Elem(), &SecuritySolution{})
pulumi.RegisterInputType(reflect.TypeOf((*SecuritySolutionArrayInput)(nil)).Elem(), SecuritySolutionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SecuritySolutionMapInput)(nil)).Elem(), SecuritySolutionMap{})
pulumi.RegisterOutputType(SecuritySolutionOutput{})
pulumi.RegisterOutputType(SecuritySolutionArrayOutput{})
pulumi.RegisterOutputType(SecuritySolutionMapOutput{})
}
| 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/iot/iotHubDeviceUpdateInstance.go | sdk/go/azure/iot/iotHubDeviceUpdateInstance.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 iot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an IoT Hub Device Update Instance.
//
// ## 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/iot"
// "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("East US"),
// })
// if err != nil {
// return err
// }
// exampleIotHubDeviceUpdateAccount, err := iot.NewIotHubDeviceUpdateAccount(ctx, "example", &iot.IotHubDeviceUpdateAccountArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleIoTHub, err := iot.NewIoTHub(ctx, "example", &iot.IoTHubArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: &iot.IoTHubSkuArgs{
// Name: pulumi.String("S1"),
// Capacity: pulumi.Int(1),
// },
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// _, err = iot.NewIotHubDeviceUpdateInstance(ctx, "example", &iot.IotHubDeviceUpdateInstanceArgs{
// Name: pulumi.String("example"),
// DeviceUpdateAccountId: exampleIotHubDeviceUpdateAccount.ID(),
// IothubId: exampleIoTHub.ID(),
// DiagnosticEnabled: pulumi.Bool(true),
// DiagnosticStorageAccount: &iot.IotHubDeviceUpdateInstanceDiagnosticStorageAccountArgs{
// ConnectionString: exampleAccount.PrimaryConnectionString,
// Id: exampleAccount.ID(),
// },
// 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.DeviceUpdate` - 2022-10-01
//
// ## Import
//
// IoT Hub Device Update Instance can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:iot/iotHubDeviceUpdateInstance:IotHubDeviceUpdateInstance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.DeviceUpdate/accounts/account1/instances/instance1
// ```
type IotHubDeviceUpdateInstance struct {
pulumi.CustomResourceState
// Specifies the ID of the IoT Hub Device Update Account where the IoT Hub Device Update Instance exists. Changing this forces a new resource to be created.
DeviceUpdateAccountId pulumi.StringOutput `pulumi:"deviceUpdateAccountId"`
// Whether the diagnostic log collection is enabled. Possible values are `true` and `false`. Defaults to `false`.
DiagnosticEnabled pulumi.BoolPtrOutput `pulumi:"diagnosticEnabled"`
// A `diagnosticStorageAccount` block as defined below.
DiagnosticStorageAccount IotHubDeviceUpdateInstanceDiagnosticStorageAccountPtrOutput `pulumi:"diagnosticStorageAccount"`
// Specifies the ID of the IoT Hub associated with the IoT Hub Device Update Instance. Changing this forces a new resource to be created.
IothubId pulumi.StringOutput `pulumi:"iothubId"`
// Specifies the name which should be used for this IoT Hub Device Update Instance. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A mapping of tags which should be assigned to the IoT Hub Device Update Instance.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewIotHubDeviceUpdateInstance registers a new resource with the given unique name, arguments, and options.
func NewIotHubDeviceUpdateInstance(ctx *pulumi.Context,
name string, args *IotHubDeviceUpdateInstanceArgs, opts ...pulumi.ResourceOption) (*IotHubDeviceUpdateInstance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DeviceUpdateAccountId == nil {
return nil, errors.New("invalid value for required argument 'DeviceUpdateAccountId'")
}
if args.IothubId == nil {
return nil, errors.New("invalid value for required argument 'IothubId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource IotHubDeviceUpdateInstance
err := ctx.RegisterResource("azure:iot/iotHubDeviceUpdateInstance:IotHubDeviceUpdateInstance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIotHubDeviceUpdateInstance gets an existing IotHubDeviceUpdateInstance 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 GetIotHubDeviceUpdateInstance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IotHubDeviceUpdateInstanceState, opts ...pulumi.ResourceOption) (*IotHubDeviceUpdateInstance, error) {
var resource IotHubDeviceUpdateInstance
err := ctx.ReadResource("azure:iot/iotHubDeviceUpdateInstance:IotHubDeviceUpdateInstance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IotHubDeviceUpdateInstance resources.
type iotHubDeviceUpdateInstanceState struct {
// Specifies the ID of the IoT Hub Device Update Account where the IoT Hub Device Update Instance exists. Changing this forces a new resource to be created.
DeviceUpdateAccountId *string `pulumi:"deviceUpdateAccountId"`
// Whether the diagnostic log collection is enabled. Possible values are `true` and `false`. Defaults to `false`.
DiagnosticEnabled *bool `pulumi:"diagnosticEnabled"`
// A `diagnosticStorageAccount` block as defined below.
DiagnosticStorageAccount *IotHubDeviceUpdateInstanceDiagnosticStorageAccount `pulumi:"diagnosticStorageAccount"`
// Specifies the ID of the IoT Hub associated with the IoT Hub Device Update Instance. Changing this forces a new resource to be created.
IothubId *string `pulumi:"iothubId"`
// Specifies the name which should be used for this IoT Hub Device Update Instance. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A mapping of tags which should be assigned to the IoT Hub Device Update Instance.
Tags map[string]string `pulumi:"tags"`
}
type IotHubDeviceUpdateInstanceState struct {
// Specifies the ID of the IoT Hub Device Update Account where the IoT Hub Device Update Instance exists. Changing this forces a new resource to be created.
DeviceUpdateAccountId pulumi.StringPtrInput
// Whether the diagnostic log collection is enabled. Possible values are `true` and `false`. Defaults to `false`.
DiagnosticEnabled pulumi.BoolPtrInput
// A `diagnosticStorageAccount` block as defined below.
DiagnosticStorageAccount IotHubDeviceUpdateInstanceDiagnosticStorageAccountPtrInput
// Specifies the ID of the IoT Hub associated with the IoT Hub Device Update Instance. Changing this forces a new resource to be created.
IothubId pulumi.StringPtrInput
// Specifies the name which should be used for this IoT Hub Device Update Instance. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A mapping of tags which should be assigned to the IoT Hub Device Update Instance.
Tags pulumi.StringMapInput
}
func (IotHubDeviceUpdateInstanceState) ElementType() reflect.Type {
return reflect.TypeOf((*iotHubDeviceUpdateInstanceState)(nil)).Elem()
}
type iotHubDeviceUpdateInstanceArgs struct {
// Specifies the ID of the IoT Hub Device Update Account where the IoT Hub Device Update Instance exists. Changing this forces a new resource to be created.
DeviceUpdateAccountId string `pulumi:"deviceUpdateAccountId"`
// Whether the diagnostic log collection is enabled. Possible values are `true` and `false`. Defaults to `false`.
DiagnosticEnabled *bool `pulumi:"diagnosticEnabled"`
// A `diagnosticStorageAccount` block as defined below.
DiagnosticStorageAccount *IotHubDeviceUpdateInstanceDiagnosticStorageAccount `pulumi:"diagnosticStorageAccount"`
// Specifies the ID of the IoT Hub associated with the IoT Hub Device Update Instance. Changing this forces a new resource to be created.
IothubId string `pulumi:"iothubId"`
// Specifies the name which should be used for this IoT Hub Device Update Instance. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A mapping of tags which should be assigned to the IoT Hub Device Update Instance.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a IotHubDeviceUpdateInstance resource.
type IotHubDeviceUpdateInstanceArgs struct {
// Specifies the ID of the IoT Hub Device Update Account where the IoT Hub Device Update Instance exists. Changing this forces a new resource to be created.
DeviceUpdateAccountId pulumi.StringInput
// Whether the diagnostic log collection is enabled. Possible values are `true` and `false`. Defaults to `false`.
DiagnosticEnabled pulumi.BoolPtrInput
// A `diagnosticStorageAccount` block as defined below.
DiagnosticStorageAccount IotHubDeviceUpdateInstanceDiagnosticStorageAccountPtrInput
// Specifies the ID of the IoT Hub associated with the IoT Hub Device Update Instance. Changing this forces a new resource to be created.
IothubId pulumi.StringInput
// Specifies the name which should be used for this IoT Hub Device Update Instance. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A mapping of tags which should be assigned to the IoT Hub Device Update Instance.
Tags pulumi.StringMapInput
}
func (IotHubDeviceUpdateInstanceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*iotHubDeviceUpdateInstanceArgs)(nil)).Elem()
}
type IotHubDeviceUpdateInstanceInput interface {
pulumi.Input
ToIotHubDeviceUpdateInstanceOutput() IotHubDeviceUpdateInstanceOutput
ToIotHubDeviceUpdateInstanceOutputWithContext(ctx context.Context) IotHubDeviceUpdateInstanceOutput
}
func (*IotHubDeviceUpdateInstance) ElementType() reflect.Type {
return reflect.TypeOf((**IotHubDeviceUpdateInstance)(nil)).Elem()
}
func (i *IotHubDeviceUpdateInstance) ToIotHubDeviceUpdateInstanceOutput() IotHubDeviceUpdateInstanceOutput {
return i.ToIotHubDeviceUpdateInstanceOutputWithContext(context.Background())
}
func (i *IotHubDeviceUpdateInstance) ToIotHubDeviceUpdateInstanceOutputWithContext(ctx context.Context) IotHubDeviceUpdateInstanceOutput {
return pulumi.ToOutputWithContext(ctx, i).(IotHubDeviceUpdateInstanceOutput)
}
// IotHubDeviceUpdateInstanceArrayInput is an input type that accepts IotHubDeviceUpdateInstanceArray and IotHubDeviceUpdateInstanceArrayOutput values.
// You can construct a concrete instance of `IotHubDeviceUpdateInstanceArrayInput` via:
//
// IotHubDeviceUpdateInstanceArray{ IotHubDeviceUpdateInstanceArgs{...} }
type IotHubDeviceUpdateInstanceArrayInput interface {
pulumi.Input
ToIotHubDeviceUpdateInstanceArrayOutput() IotHubDeviceUpdateInstanceArrayOutput
ToIotHubDeviceUpdateInstanceArrayOutputWithContext(context.Context) IotHubDeviceUpdateInstanceArrayOutput
}
type IotHubDeviceUpdateInstanceArray []IotHubDeviceUpdateInstanceInput
func (IotHubDeviceUpdateInstanceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IotHubDeviceUpdateInstance)(nil)).Elem()
}
func (i IotHubDeviceUpdateInstanceArray) ToIotHubDeviceUpdateInstanceArrayOutput() IotHubDeviceUpdateInstanceArrayOutput {
return i.ToIotHubDeviceUpdateInstanceArrayOutputWithContext(context.Background())
}
func (i IotHubDeviceUpdateInstanceArray) ToIotHubDeviceUpdateInstanceArrayOutputWithContext(ctx context.Context) IotHubDeviceUpdateInstanceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IotHubDeviceUpdateInstanceArrayOutput)
}
// IotHubDeviceUpdateInstanceMapInput is an input type that accepts IotHubDeviceUpdateInstanceMap and IotHubDeviceUpdateInstanceMapOutput values.
// You can construct a concrete instance of `IotHubDeviceUpdateInstanceMapInput` via:
//
// IotHubDeviceUpdateInstanceMap{ "key": IotHubDeviceUpdateInstanceArgs{...} }
type IotHubDeviceUpdateInstanceMapInput interface {
pulumi.Input
ToIotHubDeviceUpdateInstanceMapOutput() IotHubDeviceUpdateInstanceMapOutput
ToIotHubDeviceUpdateInstanceMapOutputWithContext(context.Context) IotHubDeviceUpdateInstanceMapOutput
}
type IotHubDeviceUpdateInstanceMap map[string]IotHubDeviceUpdateInstanceInput
func (IotHubDeviceUpdateInstanceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IotHubDeviceUpdateInstance)(nil)).Elem()
}
func (i IotHubDeviceUpdateInstanceMap) ToIotHubDeviceUpdateInstanceMapOutput() IotHubDeviceUpdateInstanceMapOutput {
return i.ToIotHubDeviceUpdateInstanceMapOutputWithContext(context.Background())
}
func (i IotHubDeviceUpdateInstanceMap) ToIotHubDeviceUpdateInstanceMapOutputWithContext(ctx context.Context) IotHubDeviceUpdateInstanceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IotHubDeviceUpdateInstanceMapOutput)
}
type IotHubDeviceUpdateInstanceOutput struct{ *pulumi.OutputState }
func (IotHubDeviceUpdateInstanceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**IotHubDeviceUpdateInstance)(nil)).Elem()
}
func (o IotHubDeviceUpdateInstanceOutput) ToIotHubDeviceUpdateInstanceOutput() IotHubDeviceUpdateInstanceOutput {
return o
}
func (o IotHubDeviceUpdateInstanceOutput) ToIotHubDeviceUpdateInstanceOutputWithContext(ctx context.Context) IotHubDeviceUpdateInstanceOutput {
return o
}
// Specifies the ID of the IoT Hub Device Update Account where the IoT Hub Device Update Instance exists. Changing this forces a new resource to be created.
func (o IotHubDeviceUpdateInstanceOutput) DeviceUpdateAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubDeviceUpdateInstance) pulumi.StringOutput { return v.DeviceUpdateAccountId }).(pulumi.StringOutput)
}
// Whether the diagnostic log collection is enabled. Possible values are `true` and `false`. Defaults to `false`.
func (o IotHubDeviceUpdateInstanceOutput) DiagnosticEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *IotHubDeviceUpdateInstance) pulumi.BoolPtrOutput { return v.DiagnosticEnabled }).(pulumi.BoolPtrOutput)
}
// A `diagnosticStorageAccount` block as defined below.
func (o IotHubDeviceUpdateInstanceOutput) DiagnosticStorageAccount() IotHubDeviceUpdateInstanceDiagnosticStorageAccountPtrOutput {
return o.ApplyT(func(v *IotHubDeviceUpdateInstance) IotHubDeviceUpdateInstanceDiagnosticStorageAccountPtrOutput {
return v.DiagnosticStorageAccount
}).(IotHubDeviceUpdateInstanceDiagnosticStorageAccountPtrOutput)
}
// Specifies the ID of the IoT Hub associated with the IoT Hub Device Update Instance. Changing this forces a new resource to be created.
func (o IotHubDeviceUpdateInstanceOutput) IothubId() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubDeviceUpdateInstance) pulumi.StringOutput { return v.IothubId }).(pulumi.StringOutput)
}
// Specifies the name which should be used for this IoT Hub Device Update Instance. Changing this forces a new resource to be created.
func (o IotHubDeviceUpdateInstanceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubDeviceUpdateInstance) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the IoT Hub Device Update Instance.
func (o IotHubDeviceUpdateInstanceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *IotHubDeviceUpdateInstance) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type IotHubDeviceUpdateInstanceArrayOutput struct{ *pulumi.OutputState }
func (IotHubDeviceUpdateInstanceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IotHubDeviceUpdateInstance)(nil)).Elem()
}
func (o IotHubDeviceUpdateInstanceArrayOutput) ToIotHubDeviceUpdateInstanceArrayOutput() IotHubDeviceUpdateInstanceArrayOutput {
return o
}
func (o IotHubDeviceUpdateInstanceArrayOutput) ToIotHubDeviceUpdateInstanceArrayOutputWithContext(ctx context.Context) IotHubDeviceUpdateInstanceArrayOutput {
return o
}
func (o IotHubDeviceUpdateInstanceArrayOutput) Index(i pulumi.IntInput) IotHubDeviceUpdateInstanceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IotHubDeviceUpdateInstance {
return vs[0].([]*IotHubDeviceUpdateInstance)[vs[1].(int)]
}).(IotHubDeviceUpdateInstanceOutput)
}
type IotHubDeviceUpdateInstanceMapOutput struct{ *pulumi.OutputState }
func (IotHubDeviceUpdateInstanceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IotHubDeviceUpdateInstance)(nil)).Elem()
}
func (o IotHubDeviceUpdateInstanceMapOutput) ToIotHubDeviceUpdateInstanceMapOutput() IotHubDeviceUpdateInstanceMapOutput {
return o
}
func (o IotHubDeviceUpdateInstanceMapOutput) ToIotHubDeviceUpdateInstanceMapOutputWithContext(ctx context.Context) IotHubDeviceUpdateInstanceMapOutput {
return o
}
func (o IotHubDeviceUpdateInstanceMapOutput) MapIndex(k pulumi.StringInput) IotHubDeviceUpdateInstanceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IotHubDeviceUpdateInstance {
return vs[0].(map[string]*IotHubDeviceUpdateInstance)[vs[1].(string)]
}).(IotHubDeviceUpdateInstanceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IotHubDeviceUpdateInstanceInput)(nil)).Elem(), &IotHubDeviceUpdateInstance{})
pulumi.RegisterInputType(reflect.TypeOf((*IotHubDeviceUpdateInstanceArrayInput)(nil)).Elem(), IotHubDeviceUpdateInstanceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*IotHubDeviceUpdateInstanceMapInput)(nil)).Elem(), IotHubDeviceUpdateInstanceMap{})
pulumi.RegisterOutputType(IotHubDeviceUpdateInstanceOutput{})
pulumi.RegisterOutputType(IotHubDeviceUpdateInstanceArrayOutput{})
pulumi.RegisterOutputType(IotHubDeviceUpdateInstanceMapOutput{})
}
| 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/iot/getIotHub.go | sdk/go/azure/iot/getIotHub.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 iot
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 IoTHub.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/iot"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := iot.GetIotHub(ctx, &iot.GetIotHubArgs{
// Name: "existing",
// ResourceGroupName: "existing",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", example.Id)
// return nil
// })
// }
//
// ```
func GetIotHub(ctx *pulumi.Context, args *GetIotHubArgs, opts ...pulumi.InvokeOption) (*GetIotHubResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetIotHubResult
err := ctx.Invoke("azure:iot/getIotHub:getIotHub", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getIotHub.
type GetIotHubArgs struct {
// The name of this IoTHub.
Name string `pulumi:"name"`
// The name of the Resource Group where the IoTHub exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the IoTHub.
Tags map[string]string `pulumi:"tags"`
}
// A collection of values returned by getIotHub.
type GetIotHubResult struct {
// The Hostname of the IoTHub.
Hostname string `pulumi:"hostname"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A `identity` block as defined below.
Identities []GetIotHubIdentity `pulumi:"identities"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
Tags map[string]string `pulumi:"tags"`
}
func GetIotHubOutput(ctx *pulumi.Context, args GetIotHubOutputArgs, opts ...pulumi.InvokeOption) GetIotHubResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetIotHubResultOutput, error) {
args := v.(GetIotHubArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:iot/getIotHub:getIotHub", args, GetIotHubResultOutput{}, options).(GetIotHubResultOutput), nil
}).(GetIotHubResultOutput)
}
// A collection of arguments for invoking getIotHub.
type GetIotHubOutputArgs struct {
// The name of this IoTHub.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the IoTHub exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the IoTHub.
Tags pulumi.StringMapInput `pulumi:"tags"`
}
func (GetIotHubOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetIotHubArgs)(nil)).Elem()
}
// A collection of values returned by getIotHub.
type GetIotHubResultOutput struct{ *pulumi.OutputState }
func (GetIotHubResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetIotHubResult)(nil)).Elem()
}
func (o GetIotHubResultOutput) ToGetIotHubResultOutput() GetIotHubResultOutput {
return o
}
func (o GetIotHubResultOutput) ToGetIotHubResultOutputWithContext(ctx context.Context) GetIotHubResultOutput {
return o
}
// The Hostname of the IoTHub.
func (o GetIotHubResultOutput) Hostname() pulumi.StringOutput {
return o.ApplyT(func(v GetIotHubResult) string { return v.Hostname }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetIotHubResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetIotHubResult) string { return v.Id }).(pulumi.StringOutput)
}
// A `identity` block as defined below.
func (o GetIotHubResultOutput) Identities() GetIotHubIdentityArrayOutput {
return o.ApplyT(func(v GetIotHubResult) []GetIotHubIdentity { return v.Identities }).(GetIotHubIdentityArrayOutput)
}
func (o GetIotHubResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetIotHubResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o GetIotHubResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetIotHubResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func (o GetIotHubResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v GetIotHubResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(GetIotHubResultOutput{})
}
| 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/iot/enrichment.go | sdk/go/azure/iot/enrichment.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 iot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an IotHub Enrichment
//
// > **Note:** Enrichment can be defined either directly on the `iot.IoTHub` resource, or using the `iot.Enrichment` resources - but the two cannot be used together. If both are used against the same IoTHub, spurious changes will occur.
//
// ## 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/iot"
// "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("examplestorageaccount"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("example"),
// StorageAccountName: exampleAccount.Name,
// ContainerAccessType: pulumi.String("private"),
// })
// if err != nil {
// return err
// }
// exampleIoTHub, err := iot.NewIoTHub(ctx, "example", &iot.IoTHubArgs{
// Name: pulumi.String("exampleIothub"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: &iot.IoTHubSkuArgs{
// Name: pulumi.String("S1"),
// Capacity: pulumi.Int(1),
// },
// Tags: pulumi.StringMap{
// "purpose": pulumi.String("testing"),
// },
// })
// if err != nil {
// return err
// }
// exampleEndpointStorageContainer, err := iot.NewEndpointStorageContainer(ctx, "example", &iot.EndpointStorageContainerArgs{
// ResourceGroupName: example.Name,
// IothubId: exampleIoTHub.ID(),
// Name: pulumi.String("example"),
// ConnectionString: exampleAccount.PrimaryBlobConnectionString,
// BatchFrequencyInSeconds: pulumi.Int(60),
// MaxChunkSizeInBytes: pulumi.Int(10485760),
// ContainerName: exampleContainer.Name,
// Encoding: pulumi.String("Avro"),
// FileNameFormat: pulumi.String("{iothub}/{partition}_{YYYY}_{MM}_{DD}_{HH}_{mm}"),
// })
// if err != nil {
// return err
// }
// _, err = iot.NewRoute(ctx, "example", &iot.RouteArgs{
// ResourceGroupName: example.Name,
// IothubName: exampleIoTHub.Name,
// Name: pulumi.String("example"),
// Source: pulumi.String("DeviceMessages"),
// Condition: pulumi.String("true"),
// EndpointNames: exampleEndpointStorageContainer.Name,
// Enabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = iot.NewEnrichment(ctx, "example", &iot.EnrichmentArgs{
// ResourceGroupName: example.Name,
// IothubName: exampleIoTHub.Name,
// Key: pulumi.String("example"),
// Value: pulumi.String("my value"),
// EndpointNames: pulumi.StringArray{
// exampleEndpointStorageContainer.Name,
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// IoTHub Enrichment can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:iot/enrichment:Enrichment enrichment1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/enrichments/enrichment1
// ```
type Enrichment struct {
pulumi.CustomResourceState
// The list of endpoints which will be enriched.
EndpointNames pulumi.StringArrayOutput `pulumi:"endpointNames"`
// The IoTHub name of the enrichment. Changing this forces a new resource to be created.
IothubName pulumi.StringOutput `pulumi:"iothubName"`
// The key of the enrichment. Changing this forces a new resource to be created.
Key pulumi.StringOutput `pulumi:"key"`
// The name of the resource group under which the IoTHub resource is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The value of the enrichment. Value can be any static string, the name of the IoT hub sending the message (use `$iothubname`) or information from the device twin (ex: `$twin.tags.latitude`)
Value pulumi.StringOutput `pulumi:"value"`
}
// NewEnrichment registers a new resource with the given unique name, arguments, and options.
func NewEnrichment(ctx *pulumi.Context,
name string, args *EnrichmentArgs, opts ...pulumi.ResourceOption) (*Enrichment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.EndpointNames == nil {
return nil, errors.New("invalid value for required argument 'EndpointNames'")
}
if args.IothubName == nil {
return nil, errors.New("invalid value for required argument 'IothubName'")
}
if args.Key == nil {
return nil, errors.New("invalid value for required argument 'Key'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Value == nil {
return nil, errors.New("invalid value for required argument 'Value'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Enrichment
err := ctx.RegisterResource("azure:iot/enrichment:Enrichment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEnrichment gets an existing Enrichment 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 GetEnrichment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EnrichmentState, opts ...pulumi.ResourceOption) (*Enrichment, error) {
var resource Enrichment
err := ctx.ReadResource("azure:iot/enrichment:Enrichment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Enrichment resources.
type enrichmentState struct {
// The list of endpoints which will be enriched.
EndpointNames []string `pulumi:"endpointNames"`
// The IoTHub name of the enrichment. Changing this forces a new resource to be created.
IothubName *string `pulumi:"iothubName"`
// The key of the enrichment. Changing this forces a new resource to be created.
Key *string `pulumi:"key"`
// The name of the resource group under which the IoTHub resource is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The value of the enrichment. Value can be any static string, the name of the IoT hub sending the message (use `$iothubname`) or information from the device twin (ex: `$twin.tags.latitude`)
Value *string `pulumi:"value"`
}
type EnrichmentState struct {
// The list of endpoints which will be enriched.
EndpointNames pulumi.StringArrayInput
// The IoTHub name of the enrichment. Changing this forces a new resource to be created.
IothubName pulumi.StringPtrInput
// The key of the enrichment. Changing this forces a new resource to be created.
Key pulumi.StringPtrInput
// The name of the resource group under which the IoTHub resource is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The value of the enrichment. Value can be any static string, the name of the IoT hub sending the message (use `$iothubname`) or information from the device twin (ex: `$twin.tags.latitude`)
Value pulumi.StringPtrInput
}
func (EnrichmentState) ElementType() reflect.Type {
return reflect.TypeOf((*enrichmentState)(nil)).Elem()
}
type enrichmentArgs struct {
// The list of endpoints which will be enriched.
EndpointNames []string `pulumi:"endpointNames"`
// The IoTHub name of the enrichment. Changing this forces a new resource to be created.
IothubName string `pulumi:"iothubName"`
// The key of the enrichment. Changing this forces a new resource to be created.
Key string `pulumi:"key"`
// The name of the resource group under which the IoTHub resource is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The value of the enrichment. Value can be any static string, the name of the IoT hub sending the message (use `$iothubname`) or information from the device twin (ex: `$twin.tags.latitude`)
Value string `pulumi:"value"`
}
// The set of arguments for constructing a Enrichment resource.
type EnrichmentArgs struct {
// The list of endpoints which will be enriched.
EndpointNames pulumi.StringArrayInput
// The IoTHub name of the enrichment. Changing this forces a new resource to be created.
IothubName pulumi.StringInput
// The key of the enrichment. Changing this forces a new resource to be created.
Key pulumi.StringInput
// The name of the resource group under which the IoTHub resource is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The value of the enrichment. Value can be any static string, the name of the IoT hub sending the message (use `$iothubname`) or information from the device twin (ex: `$twin.tags.latitude`)
Value pulumi.StringInput
}
func (EnrichmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*enrichmentArgs)(nil)).Elem()
}
type EnrichmentInput interface {
pulumi.Input
ToEnrichmentOutput() EnrichmentOutput
ToEnrichmentOutputWithContext(ctx context.Context) EnrichmentOutput
}
func (*Enrichment) ElementType() reflect.Type {
return reflect.TypeOf((**Enrichment)(nil)).Elem()
}
func (i *Enrichment) ToEnrichmentOutput() EnrichmentOutput {
return i.ToEnrichmentOutputWithContext(context.Background())
}
func (i *Enrichment) ToEnrichmentOutputWithContext(ctx context.Context) EnrichmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(EnrichmentOutput)
}
// EnrichmentArrayInput is an input type that accepts EnrichmentArray and EnrichmentArrayOutput values.
// You can construct a concrete instance of `EnrichmentArrayInput` via:
//
// EnrichmentArray{ EnrichmentArgs{...} }
type EnrichmentArrayInput interface {
pulumi.Input
ToEnrichmentArrayOutput() EnrichmentArrayOutput
ToEnrichmentArrayOutputWithContext(context.Context) EnrichmentArrayOutput
}
type EnrichmentArray []EnrichmentInput
func (EnrichmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Enrichment)(nil)).Elem()
}
func (i EnrichmentArray) ToEnrichmentArrayOutput() EnrichmentArrayOutput {
return i.ToEnrichmentArrayOutputWithContext(context.Background())
}
func (i EnrichmentArray) ToEnrichmentArrayOutputWithContext(ctx context.Context) EnrichmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EnrichmentArrayOutput)
}
// EnrichmentMapInput is an input type that accepts EnrichmentMap and EnrichmentMapOutput values.
// You can construct a concrete instance of `EnrichmentMapInput` via:
//
// EnrichmentMap{ "key": EnrichmentArgs{...} }
type EnrichmentMapInput interface {
pulumi.Input
ToEnrichmentMapOutput() EnrichmentMapOutput
ToEnrichmentMapOutputWithContext(context.Context) EnrichmentMapOutput
}
type EnrichmentMap map[string]EnrichmentInput
func (EnrichmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Enrichment)(nil)).Elem()
}
func (i EnrichmentMap) ToEnrichmentMapOutput() EnrichmentMapOutput {
return i.ToEnrichmentMapOutputWithContext(context.Background())
}
func (i EnrichmentMap) ToEnrichmentMapOutputWithContext(ctx context.Context) EnrichmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EnrichmentMapOutput)
}
type EnrichmentOutput struct{ *pulumi.OutputState }
func (EnrichmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Enrichment)(nil)).Elem()
}
func (o EnrichmentOutput) ToEnrichmentOutput() EnrichmentOutput {
return o
}
func (o EnrichmentOutput) ToEnrichmentOutputWithContext(ctx context.Context) EnrichmentOutput {
return o
}
// The list of endpoints which will be enriched.
func (o EnrichmentOutput) EndpointNames() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Enrichment) pulumi.StringArrayOutput { return v.EndpointNames }).(pulumi.StringArrayOutput)
}
// The IoTHub name of the enrichment. Changing this forces a new resource to be created.
func (o EnrichmentOutput) IothubName() pulumi.StringOutput {
return o.ApplyT(func(v *Enrichment) pulumi.StringOutput { return v.IothubName }).(pulumi.StringOutput)
}
// The key of the enrichment. Changing this forces a new resource to be created.
func (o EnrichmentOutput) Key() pulumi.StringOutput {
return o.ApplyT(func(v *Enrichment) pulumi.StringOutput { return v.Key }).(pulumi.StringOutput)
}
// The name of the resource group under which the IoTHub resource is created. Changing this forces a new resource to be created.
func (o EnrichmentOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Enrichment) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The value of the enrichment. Value can be any static string, the name of the IoT hub sending the message (use `$iothubname`) or information from the device twin (ex: `$twin.tags.latitude`)
func (o EnrichmentOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v *Enrichment) pulumi.StringOutput { return v.Value }).(pulumi.StringOutput)
}
type EnrichmentArrayOutput struct{ *pulumi.OutputState }
func (EnrichmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Enrichment)(nil)).Elem()
}
func (o EnrichmentArrayOutput) ToEnrichmentArrayOutput() EnrichmentArrayOutput {
return o
}
func (o EnrichmentArrayOutput) ToEnrichmentArrayOutputWithContext(ctx context.Context) EnrichmentArrayOutput {
return o
}
func (o EnrichmentArrayOutput) Index(i pulumi.IntInput) EnrichmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Enrichment {
return vs[0].([]*Enrichment)[vs[1].(int)]
}).(EnrichmentOutput)
}
type EnrichmentMapOutput struct{ *pulumi.OutputState }
func (EnrichmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Enrichment)(nil)).Elem()
}
func (o EnrichmentMapOutput) ToEnrichmentMapOutput() EnrichmentMapOutput {
return o
}
func (o EnrichmentMapOutput) ToEnrichmentMapOutputWithContext(ctx context.Context) EnrichmentMapOutput {
return o
}
func (o EnrichmentMapOutput) MapIndex(k pulumi.StringInput) EnrichmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Enrichment {
return vs[0].(map[string]*Enrichment)[vs[1].(string)]
}).(EnrichmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EnrichmentInput)(nil)).Elem(), &Enrichment{})
pulumi.RegisterInputType(reflect.TypeOf((*EnrichmentArrayInput)(nil)).Elem(), EnrichmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EnrichmentMapInput)(nil)).Elem(), EnrichmentMap{})
pulumi.RegisterOutputType(EnrichmentOutput{})
pulumi.RegisterOutputType(EnrichmentArrayOutput{})
pulumi.RegisterOutputType(EnrichmentMapOutput{})
}
| 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/iot/certificate.go | sdk/go/azure/iot/certificate.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 iot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an IotHub Certificate.
//
// ## 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/iot"
// "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("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleIoTHub, err := iot.NewIoTHub(ctx, "example", &iot.IoTHubArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: &iot.IoTHubSkuArgs{
// Name: pulumi.String("B1"),
// Capacity: pulumi.Int(1),
// },
// })
// if err != nil {
// return err
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "example.cer",
// }, nil)
// if err != nil {
// return err
// }
// _, err = iot.NewCertificate(ctx, "example", &iot.CertificateArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// IothubName: exampleIoTHub.Name,
// IsVerified: pulumi.Bool(true),
// CertificateContent: pulumi.String(invokeFilebase64.Result),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// IoTHub Certificates can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:iot/certificate:Certificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/example/certificates/example
// ```
type Certificate struct {
pulumi.CustomResourceState
// The Base-64 representation of the X509 leaf certificate .cer file or just a .pem file content.
CertificateContent pulumi.StringOutput `pulumi:"certificateContent"`
// The name of the IoTHub that this certificate will be attached to. Changing this forces a new resource to be created.
IothubName pulumi.StringOutput `pulumi:"iothubName"`
// Is the certificate verified? Defaults to `false`.
IsVerified pulumi.BoolPtrOutput `pulumi:"isVerified"`
// Specifies the name of the IotHub Certificate resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group under which the IotHub Certificate resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewCertificate registers a new resource with the given unique name, arguments, and options.
func NewCertificate(ctx *pulumi.Context,
name string, args *CertificateArgs, opts ...pulumi.ResourceOption) (*Certificate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CertificateContent == nil {
return nil, errors.New("invalid value for required argument 'CertificateContent'")
}
if args.IothubName == nil {
return nil, errors.New("invalid value for required argument 'IothubName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.CertificateContent != nil {
args.CertificateContent = pulumi.ToSecret(args.CertificateContent).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"certificateContent",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Certificate
err := ctx.RegisterResource("azure:iot/certificate:Certificate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCertificate gets an existing Certificate 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 GetCertificate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CertificateState, opts ...pulumi.ResourceOption) (*Certificate, error) {
var resource Certificate
err := ctx.ReadResource("azure:iot/certificate:Certificate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Certificate resources.
type certificateState struct {
// The Base-64 representation of the X509 leaf certificate .cer file or just a .pem file content.
CertificateContent *string `pulumi:"certificateContent"`
// The name of the IoTHub that this certificate will be attached to. Changing this forces a new resource to be created.
IothubName *string `pulumi:"iothubName"`
// Is the certificate verified? Defaults to `false`.
IsVerified *bool `pulumi:"isVerified"`
// Specifies the name of the IotHub Certificate resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group under which the IotHub Certificate resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type CertificateState struct {
// The Base-64 representation of the X509 leaf certificate .cer file or just a .pem file content.
CertificateContent pulumi.StringPtrInput
// The name of the IoTHub that this certificate will be attached to. Changing this forces a new resource to be created.
IothubName pulumi.StringPtrInput
// Is the certificate verified? Defaults to `false`.
IsVerified pulumi.BoolPtrInput
// Specifies the name of the IotHub Certificate resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group under which the IotHub Certificate resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (CertificateState) ElementType() reflect.Type {
return reflect.TypeOf((*certificateState)(nil)).Elem()
}
type certificateArgs struct {
// The Base-64 representation of the X509 leaf certificate .cer file or just a .pem file content.
CertificateContent string `pulumi:"certificateContent"`
// The name of the IoTHub that this certificate will be attached to. Changing this forces a new resource to be created.
IothubName string `pulumi:"iothubName"`
// Is the certificate verified? Defaults to `false`.
IsVerified *bool `pulumi:"isVerified"`
// Specifies the name of the IotHub Certificate resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group under which the IotHub Certificate resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a Certificate resource.
type CertificateArgs struct {
// The Base-64 representation of the X509 leaf certificate .cer file or just a .pem file content.
CertificateContent pulumi.StringInput
// The name of the IoTHub that this certificate will be attached to. Changing this forces a new resource to be created.
IothubName pulumi.StringInput
// Is the certificate verified? Defaults to `false`.
IsVerified pulumi.BoolPtrInput
// Specifies the name of the IotHub Certificate resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group under which the IotHub Certificate resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (CertificateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*certificateArgs)(nil)).Elem()
}
type CertificateInput interface {
pulumi.Input
ToCertificateOutput() CertificateOutput
ToCertificateOutputWithContext(ctx context.Context) CertificateOutput
}
func (*Certificate) ElementType() reflect.Type {
return reflect.TypeOf((**Certificate)(nil)).Elem()
}
func (i *Certificate) ToCertificateOutput() CertificateOutput {
return i.ToCertificateOutputWithContext(context.Background())
}
func (i *Certificate) ToCertificateOutputWithContext(ctx context.Context) CertificateOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateOutput)
}
// CertificateArrayInput is an input type that accepts CertificateArray and CertificateArrayOutput values.
// You can construct a concrete instance of `CertificateArrayInput` via:
//
// CertificateArray{ CertificateArgs{...} }
type CertificateArrayInput interface {
pulumi.Input
ToCertificateArrayOutput() CertificateArrayOutput
ToCertificateArrayOutputWithContext(context.Context) CertificateArrayOutput
}
type CertificateArray []CertificateInput
func (CertificateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Certificate)(nil)).Elem()
}
func (i CertificateArray) ToCertificateArrayOutput() CertificateArrayOutput {
return i.ToCertificateArrayOutputWithContext(context.Background())
}
func (i CertificateArray) ToCertificateArrayOutputWithContext(ctx context.Context) CertificateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateArrayOutput)
}
// CertificateMapInput is an input type that accepts CertificateMap and CertificateMapOutput values.
// You can construct a concrete instance of `CertificateMapInput` via:
//
// CertificateMap{ "key": CertificateArgs{...} }
type CertificateMapInput interface {
pulumi.Input
ToCertificateMapOutput() CertificateMapOutput
ToCertificateMapOutputWithContext(context.Context) CertificateMapOutput
}
type CertificateMap map[string]CertificateInput
func (CertificateMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Certificate)(nil)).Elem()
}
func (i CertificateMap) ToCertificateMapOutput() CertificateMapOutput {
return i.ToCertificateMapOutputWithContext(context.Background())
}
func (i CertificateMap) ToCertificateMapOutputWithContext(ctx context.Context) CertificateMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateMapOutput)
}
type CertificateOutput struct{ *pulumi.OutputState }
func (CertificateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Certificate)(nil)).Elem()
}
func (o CertificateOutput) ToCertificateOutput() CertificateOutput {
return o
}
func (o CertificateOutput) ToCertificateOutputWithContext(ctx context.Context) CertificateOutput {
return o
}
// The Base-64 representation of the X509 leaf certificate .cer file or just a .pem file content.
func (o CertificateOutput) CertificateContent() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.CertificateContent }).(pulumi.StringOutput)
}
// The name of the IoTHub that this certificate will be attached to. Changing this forces a new resource to be created.
func (o CertificateOutput) IothubName() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.IothubName }).(pulumi.StringOutput)
}
// Is the certificate verified? Defaults to `false`.
func (o CertificateOutput) IsVerified() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Certificate) pulumi.BoolPtrOutput { return v.IsVerified }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the IotHub Certificate resource. Changing this forces a new resource to be created.
func (o CertificateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group under which the IotHub Certificate resource has to be created. Changing this forces a new resource to be created.
func (o CertificateOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type CertificateArrayOutput struct{ *pulumi.OutputState }
func (CertificateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Certificate)(nil)).Elem()
}
func (o CertificateArrayOutput) ToCertificateArrayOutput() CertificateArrayOutput {
return o
}
func (o CertificateArrayOutput) ToCertificateArrayOutputWithContext(ctx context.Context) CertificateArrayOutput {
return o
}
func (o CertificateArrayOutput) Index(i pulumi.IntInput) CertificateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Certificate {
return vs[0].([]*Certificate)[vs[1].(int)]
}).(CertificateOutput)
}
type CertificateMapOutput struct{ *pulumi.OutputState }
func (CertificateMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Certificate)(nil)).Elem()
}
func (o CertificateMapOutput) ToCertificateMapOutput() CertificateMapOutput {
return o
}
func (o CertificateMapOutput) ToCertificateMapOutputWithContext(ctx context.Context) CertificateMapOutput {
return o
}
func (o CertificateMapOutput) MapIndex(k pulumi.StringInput) CertificateOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Certificate {
return vs[0].(map[string]*Certificate)[vs[1].(string)]
}).(CertificateOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CertificateInput)(nil)).Elem(), &Certificate{})
pulumi.RegisterInputType(reflect.TypeOf((*CertificateArrayInput)(nil)).Elem(), CertificateArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CertificateMapInput)(nil)).Elem(), CertificateMap{})
pulumi.RegisterOutputType(CertificateOutput{})
pulumi.RegisterOutputType(CertificateArrayOutput{})
pulumi.RegisterOutputType(CertificateMapOutput{})
}
| 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/iot/getDpsSharedAccessPolicy.go | sdk/go/azure/iot/getDpsSharedAccessPolicy.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 iot
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 IotHub Device Provisioning Service Shared Access Policy
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/iot"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := iot.LookupDpsSharedAccessPolicy(ctx, &iot.LookupDpsSharedAccessPolicyArgs{
// Name: "example",
// ResourceGroupName: exampleAzurermResourceGroup.Name,
// IothubDpsName: exampleAzurermIothubDps.Name,
// }, 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.Devices` - 2022-02-05
func LookupDpsSharedAccessPolicy(ctx *pulumi.Context, args *LookupDpsSharedAccessPolicyArgs, opts ...pulumi.InvokeOption) (*LookupDpsSharedAccessPolicyResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDpsSharedAccessPolicyResult
err := ctx.Invoke("azure:iot/getDpsSharedAccessPolicy:getDpsSharedAccessPolicy", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDpsSharedAccessPolicy.
type LookupDpsSharedAccessPolicyArgs struct {
// Specifies the name of the IoT Hub Device Provisioning service to which the Shared Access Policy belongs.
IothubDpsName string `pulumi:"iothubDpsName"`
// Specifies the name of the IotHub Shared Access Policy.
Name string `pulumi:"name"`
// Specifies the name of the resource group under which the IotHub Shared Access Policy resource exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getDpsSharedAccessPolicy.
type LookupDpsSharedAccessPolicyResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
IothubDpsName string `pulumi:"iothubDpsName"`
Name string `pulumi:"name"`
// The primary connection string of the Shared Access Policy.
PrimaryConnectionString string `pulumi:"primaryConnectionString"`
// The primary key used to create the authentication token.
PrimaryKey string `pulumi:"primaryKey"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The secondary connection string of the Shared Access Policy.
SecondaryConnectionString string `pulumi:"secondaryConnectionString"`
// The secondary key used to create the authentication token.
SecondaryKey string `pulumi:"secondaryKey"`
}
func LookupDpsSharedAccessPolicyOutput(ctx *pulumi.Context, args LookupDpsSharedAccessPolicyOutputArgs, opts ...pulumi.InvokeOption) LookupDpsSharedAccessPolicyResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupDpsSharedAccessPolicyResultOutput, error) {
args := v.(LookupDpsSharedAccessPolicyArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:iot/getDpsSharedAccessPolicy:getDpsSharedAccessPolicy", args, LookupDpsSharedAccessPolicyResultOutput{}, options).(LookupDpsSharedAccessPolicyResultOutput), nil
}).(LookupDpsSharedAccessPolicyResultOutput)
}
// A collection of arguments for invoking getDpsSharedAccessPolicy.
type LookupDpsSharedAccessPolicyOutputArgs struct {
// Specifies the name of the IoT Hub Device Provisioning service to which the Shared Access Policy belongs.
IothubDpsName pulumi.StringInput `pulumi:"iothubDpsName"`
// Specifies the name of the IotHub Shared Access Policy.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the name of the resource group under which the IotHub Shared Access Policy resource exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupDpsSharedAccessPolicyOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDpsSharedAccessPolicyArgs)(nil)).Elem()
}
// A collection of values returned by getDpsSharedAccessPolicy.
type LookupDpsSharedAccessPolicyResultOutput struct{ *pulumi.OutputState }
func (LookupDpsSharedAccessPolicyResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDpsSharedAccessPolicyResult)(nil)).Elem()
}
func (o LookupDpsSharedAccessPolicyResultOutput) ToLookupDpsSharedAccessPolicyResultOutput() LookupDpsSharedAccessPolicyResultOutput {
return o
}
func (o LookupDpsSharedAccessPolicyResultOutput) ToLookupDpsSharedAccessPolicyResultOutputWithContext(ctx context.Context) LookupDpsSharedAccessPolicyResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupDpsSharedAccessPolicyResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupDpsSharedAccessPolicyResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupDpsSharedAccessPolicyResultOutput) IothubDpsName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDpsSharedAccessPolicyResult) string { return v.IothubDpsName }).(pulumi.StringOutput)
}
func (o LookupDpsSharedAccessPolicyResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDpsSharedAccessPolicyResult) string { return v.Name }).(pulumi.StringOutput)
}
// The primary connection string of the Shared Access Policy.
func (o LookupDpsSharedAccessPolicyResultOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupDpsSharedAccessPolicyResult) string { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The primary key used to create the authentication token.
func (o LookupDpsSharedAccessPolicyResultOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupDpsSharedAccessPolicyResult) string { return v.PrimaryKey }).(pulumi.StringOutput)
}
func (o LookupDpsSharedAccessPolicyResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDpsSharedAccessPolicyResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The secondary connection string of the Shared Access Policy.
func (o LookupDpsSharedAccessPolicyResultOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupDpsSharedAccessPolicyResult) string { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The secondary key used to create the authentication token.
func (o LookupDpsSharedAccessPolicyResultOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupDpsSharedAccessPolicyResult) string { return v.SecondaryKey }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDpsSharedAccessPolicyResultOutput{})
}
| 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/iot/iotHubDps.go | sdk/go/azure/iot/iotHubDps.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 iot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an IotHub Device Provisioning Service.
//
// ## 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/iot"
// "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 = iot.NewIotHubDps(ctx, "example", &iot.IotHubDpsArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AllocationPolicy: pulumi.String("Hashed"),
// Sku: &iot.IotHubDpsSkuArgs{
// Name: pulumi.String("S1"),
// Capacity: pulumi.Int(1),
// },
// })
// 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.Devices` - 2022-02-05
//
// ## Import
//
// IoT Device Provisioning Service can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:iot/iotHubDps:IotHubDps example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/provisioningServices/example
// ```
type IotHubDps struct {
pulumi.CustomResourceState
// The allocation policy of the IoT Device Provisioning Service (`Hashed`, `GeoLatency` or `Static`). Defaults to `Hashed`.
AllocationPolicy pulumi.StringPtrOutput `pulumi:"allocationPolicy"`
// Specifies if the IoT Device Provisioning Service has data residency enabled, removing the cross geo-pair disaster recovery. Defaults to `false`. Changing this forces a new resource to be created.
DataResidencyEnabled pulumi.BoolPtrOutput `pulumi:"dataResidencyEnabled"`
// The device endpoint of the IoT Device Provisioning Service.
DeviceProvisioningHostName pulumi.StringOutput `pulumi:"deviceProvisioningHostName"`
// The unique identifier of the IoT Device Provisioning Service.
IdScope pulumi.StringOutput `pulumi:"idScope"`
// An `ipFilterRule` block as defined below.
IpFilterRules IotHubDpsIpFilterRuleArrayOutput `pulumi:"ipFilterRules"`
// A `linkedHub` block as defined below.
LinkedHubs IotHubDpsLinkedHubArrayOutput `pulumi:"linkedHubs"`
// 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 Iot Device Provisioning Service resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Whether requests from Public Network are allowed. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group under which the Iot Device Provisioning Service resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The service endpoint of the IoT Device Provisioning Service.
ServiceOperationsHostName pulumi.StringOutput `pulumi:"serviceOperationsHostName"`
// A `sku` block as defined below.
Sku IotHubDpsSkuOutput `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewIotHubDps registers a new resource with the given unique name, arguments, and options.
func NewIotHubDps(ctx *pulumi.Context,
name string, args *IotHubDpsArgs, opts ...pulumi.ResourceOption) (*IotHubDps, 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 IotHubDps
err := ctx.RegisterResource("azure:iot/iotHubDps:IotHubDps", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIotHubDps gets an existing IotHubDps 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 GetIotHubDps(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IotHubDpsState, opts ...pulumi.ResourceOption) (*IotHubDps, error) {
var resource IotHubDps
err := ctx.ReadResource("azure:iot/iotHubDps:IotHubDps", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IotHubDps resources.
type iotHubDpsState struct {
// The allocation policy of the IoT Device Provisioning Service (`Hashed`, `GeoLatency` or `Static`). Defaults to `Hashed`.
AllocationPolicy *string `pulumi:"allocationPolicy"`
// Specifies if the IoT Device Provisioning Service has data residency enabled, removing the cross geo-pair disaster recovery. Defaults to `false`. Changing this forces a new resource to be created.
DataResidencyEnabled *bool `pulumi:"dataResidencyEnabled"`
// The device endpoint of the IoT Device Provisioning Service.
DeviceProvisioningHostName *string `pulumi:"deviceProvisioningHostName"`
// The unique identifier of the IoT Device Provisioning Service.
IdScope *string `pulumi:"idScope"`
// An `ipFilterRule` block as defined below.
IpFilterRules []IotHubDpsIpFilterRule `pulumi:"ipFilterRules"`
// A `linkedHub` block as defined below.
LinkedHubs []IotHubDpsLinkedHub `pulumi:"linkedHubs"`
// 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 Iot Device Provisioning Service resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether requests from Public Network are allowed. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group under which the Iot Device Provisioning Service resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The service endpoint of the IoT Device Provisioning Service.
ServiceOperationsHostName *string `pulumi:"serviceOperationsHostName"`
// A `sku` block as defined below.
Sku *IotHubDpsSku `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type IotHubDpsState struct {
// The allocation policy of the IoT Device Provisioning Service (`Hashed`, `GeoLatency` or `Static`). Defaults to `Hashed`.
AllocationPolicy pulumi.StringPtrInput
// Specifies if the IoT Device Provisioning Service has data residency enabled, removing the cross geo-pair disaster recovery. Defaults to `false`. Changing this forces a new resource to be created.
DataResidencyEnabled pulumi.BoolPtrInput
// The device endpoint of the IoT Device Provisioning Service.
DeviceProvisioningHostName pulumi.StringPtrInput
// The unique identifier of the IoT Device Provisioning Service.
IdScope pulumi.StringPtrInput
// An `ipFilterRule` block as defined below.
IpFilterRules IotHubDpsIpFilterRuleArrayInput
// A `linkedHub` block as defined below.
LinkedHubs IotHubDpsLinkedHubArrayInput
// 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 Iot Device Provisioning Service resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether requests from Public Network are allowed. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group under which the Iot Device Provisioning Service resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The service endpoint of the IoT Device Provisioning Service.
ServiceOperationsHostName pulumi.StringPtrInput
// A `sku` block as defined below.
Sku IotHubDpsSkuPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (IotHubDpsState) ElementType() reflect.Type {
return reflect.TypeOf((*iotHubDpsState)(nil)).Elem()
}
type iotHubDpsArgs struct {
// The allocation policy of the IoT Device Provisioning Service (`Hashed`, `GeoLatency` or `Static`). Defaults to `Hashed`.
AllocationPolicy *string `pulumi:"allocationPolicy"`
// Specifies if the IoT Device Provisioning Service has data residency enabled, removing the cross geo-pair disaster recovery. Defaults to `false`. Changing this forces a new resource to be created.
DataResidencyEnabled *bool `pulumi:"dataResidencyEnabled"`
// An `ipFilterRule` block as defined below.
IpFilterRules []IotHubDpsIpFilterRule `pulumi:"ipFilterRules"`
// A `linkedHub` block as defined below.
LinkedHubs []IotHubDpsLinkedHub `pulumi:"linkedHubs"`
// 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 Iot Device Provisioning Service resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether requests from Public Network are allowed. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group under which the Iot Device Provisioning Service resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `sku` block as defined below.
Sku IotHubDpsSku `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a IotHubDps resource.
type IotHubDpsArgs struct {
// The allocation policy of the IoT Device Provisioning Service (`Hashed`, `GeoLatency` or `Static`). Defaults to `Hashed`.
AllocationPolicy pulumi.StringPtrInput
// Specifies if the IoT Device Provisioning Service has data residency enabled, removing the cross geo-pair disaster recovery. Defaults to `false`. Changing this forces a new resource to be created.
DataResidencyEnabled pulumi.BoolPtrInput
// An `ipFilterRule` block as defined below.
IpFilterRules IotHubDpsIpFilterRuleArrayInput
// A `linkedHub` block as defined below.
LinkedHubs IotHubDpsLinkedHubArrayInput
// 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 Iot Device Provisioning Service resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether requests from Public Network are allowed. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group under which the Iot Device Provisioning Service resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A `sku` block as defined below.
Sku IotHubDpsSkuInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (IotHubDpsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*iotHubDpsArgs)(nil)).Elem()
}
type IotHubDpsInput interface {
pulumi.Input
ToIotHubDpsOutput() IotHubDpsOutput
ToIotHubDpsOutputWithContext(ctx context.Context) IotHubDpsOutput
}
func (*IotHubDps) ElementType() reflect.Type {
return reflect.TypeOf((**IotHubDps)(nil)).Elem()
}
func (i *IotHubDps) ToIotHubDpsOutput() IotHubDpsOutput {
return i.ToIotHubDpsOutputWithContext(context.Background())
}
func (i *IotHubDps) ToIotHubDpsOutputWithContext(ctx context.Context) IotHubDpsOutput {
return pulumi.ToOutputWithContext(ctx, i).(IotHubDpsOutput)
}
// IotHubDpsArrayInput is an input type that accepts IotHubDpsArray and IotHubDpsArrayOutput values.
// You can construct a concrete instance of `IotHubDpsArrayInput` via:
//
// IotHubDpsArray{ IotHubDpsArgs{...} }
type IotHubDpsArrayInput interface {
pulumi.Input
ToIotHubDpsArrayOutput() IotHubDpsArrayOutput
ToIotHubDpsArrayOutputWithContext(context.Context) IotHubDpsArrayOutput
}
type IotHubDpsArray []IotHubDpsInput
func (IotHubDpsArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IotHubDps)(nil)).Elem()
}
func (i IotHubDpsArray) ToIotHubDpsArrayOutput() IotHubDpsArrayOutput {
return i.ToIotHubDpsArrayOutputWithContext(context.Background())
}
func (i IotHubDpsArray) ToIotHubDpsArrayOutputWithContext(ctx context.Context) IotHubDpsArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IotHubDpsArrayOutput)
}
// IotHubDpsMapInput is an input type that accepts IotHubDpsMap and IotHubDpsMapOutput values.
// You can construct a concrete instance of `IotHubDpsMapInput` via:
//
// IotHubDpsMap{ "key": IotHubDpsArgs{...} }
type IotHubDpsMapInput interface {
pulumi.Input
ToIotHubDpsMapOutput() IotHubDpsMapOutput
ToIotHubDpsMapOutputWithContext(context.Context) IotHubDpsMapOutput
}
type IotHubDpsMap map[string]IotHubDpsInput
func (IotHubDpsMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IotHubDps)(nil)).Elem()
}
func (i IotHubDpsMap) ToIotHubDpsMapOutput() IotHubDpsMapOutput {
return i.ToIotHubDpsMapOutputWithContext(context.Background())
}
func (i IotHubDpsMap) ToIotHubDpsMapOutputWithContext(ctx context.Context) IotHubDpsMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IotHubDpsMapOutput)
}
type IotHubDpsOutput struct{ *pulumi.OutputState }
func (IotHubDpsOutput) ElementType() reflect.Type {
return reflect.TypeOf((**IotHubDps)(nil)).Elem()
}
func (o IotHubDpsOutput) ToIotHubDpsOutput() IotHubDpsOutput {
return o
}
func (o IotHubDpsOutput) ToIotHubDpsOutputWithContext(ctx context.Context) IotHubDpsOutput {
return o
}
// The allocation policy of the IoT Device Provisioning Service (`Hashed`, `GeoLatency` or `Static`). Defaults to `Hashed`.
func (o IotHubDpsOutput) AllocationPolicy() pulumi.StringPtrOutput {
return o.ApplyT(func(v *IotHubDps) pulumi.StringPtrOutput { return v.AllocationPolicy }).(pulumi.StringPtrOutput)
}
// Specifies if the IoT Device Provisioning Service has data residency enabled, removing the cross geo-pair disaster recovery. Defaults to `false`. Changing this forces a new resource to be created.
func (o IotHubDpsOutput) DataResidencyEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *IotHubDps) pulumi.BoolPtrOutput { return v.DataResidencyEnabled }).(pulumi.BoolPtrOutput)
}
// The device endpoint of the IoT Device Provisioning Service.
func (o IotHubDpsOutput) DeviceProvisioningHostName() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubDps) pulumi.StringOutput { return v.DeviceProvisioningHostName }).(pulumi.StringOutput)
}
// The unique identifier of the IoT Device Provisioning Service.
func (o IotHubDpsOutput) IdScope() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubDps) pulumi.StringOutput { return v.IdScope }).(pulumi.StringOutput)
}
// An `ipFilterRule` block as defined below.
func (o IotHubDpsOutput) IpFilterRules() IotHubDpsIpFilterRuleArrayOutput {
return o.ApplyT(func(v *IotHubDps) IotHubDpsIpFilterRuleArrayOutput { return v.IpFilterRules }).(IotHubDpsIpFilterRuleArrayOutput)
}
// A `linkedHub` block as defined below.
func (o IotHubDpsOutput) LinkedHubs() IotHubDpsLinkedHubArrayOutput {
return o.ApplyT(func(v *IotHubDps) IotHubDpsLinkedHubArrayOutput { return v.LinkedHubs }).(IotHubDpsLinkedHubArrayOutput)
}
// Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created.
func (o IotHubDpsOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubDps) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the Iot Device Provisioning Service resource. Changing this forces a new resource to be created.
func (o IotHubDpsOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubDps) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Whether requests from Public Network are allowed. Defaults to `true`.
func (o IotHubDpsOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *IotHubDps) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the resource group under which the Iot Device Provisioning Service resource has to be created. Changing this forces a new resource to be created.
func (o IotHubDpsOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubDps) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The service endpoint of the IoT Device Provisioning Service.
func (o IotHubDpsOutput) ServiceOperationsHostName() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubDps) pulumi.StringOutput { return v.ServiceOperationsHostName }).(pulumi.StringOutput)
}
// A `sku` block as defined below.
func (o IotHubDpsOutput) Sku() IotHubDpsSkuOutput {
return o.ApplyT(func(v *IotHubDps) IotHubDpsSkuOutput { return v.Sku }).(IotHubDpsSkuOutput)
}
// A mapping of tags to assign to the resource.
func (o IotHubDpsOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *IotHubDps) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type IotHubDpsArrayOutput struct{ *pulumi.OutputState }
func (IotHubDpsArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IotHubDps)(nil)).Elem()
}
func (o IotHubDpsArrayOutput) ToIotHubDpsArrayOutput() IotHubDpsArrayOutput {
return o
}
func (o IotHubDpsArrayOutput) ToIotHubDpsArrayOutputWithContext(ctx context.Context) IotHubDpsArrayOutput {
return o
}
func (o IotHubDpsArrayOutput) Index(i pulumi.IntInput) IotHubDpsOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IotHubDps {
return vs[0].([]*IotHubDps)[vs[1].(int)]
}).(IotHubDpsOutput)
}
type IotHubDpsMapOutput struct{ *pulumi.OutputState }
func (IotHubDpsMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IotHubDps)(nil)).Elem()
}
func (o IotHubDpsMapOutput) ToIotHubDpsMapOutput() IotHubDpsMapOutput {
return o
}
func (o IotHubDpsMapOutput) ToIotHubDpsMapOutputWithContext(ctx context.Context) IotHubDpsMapOutput {
return o
}
func (o IotHubDpsMapOutput) MapIndex(k pulumi.StringInput) IotHubDpsOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IotHubDps {
return vs[0].(map[string]*IotHubDps)[vs[1].(string)]
}).(IotHubDpsOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IotHubDpsInput)(nil)).Elem(), &IotHubDps{})
pulumi.RegisterInputType(reflect.TypeOf((*IotHubDpsArrayInput)(nil)).Elem(), IotHubDpsArray{})
pulumi.RegisterInputType(reflect.TypeOf((*IotHubDpsMapInput)(nil)).Elem(), IotHubDpsMap{})
pulumi.RegisterOutputType(IotHubDpsOutput{})
pulumi.RegisterOutputType(IotHubDpsArrayOutput{})
pulumi.RegisterOutputType(IotHubDpsMapOutput{})
}
| 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/iot/securityDeviceGroup.go | sdk/go/azure/iot/securityDeviceGroup.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 iot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Iot Security Device 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/iot"
// "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
// }
// exampleIoTHub, err := iot.NewIoTHub(ctx, "example", &iot.IoTHubArgs{
// Name: pulumi.String("example-IoTHub"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: &iot.IoTHubSkuArgs{
// Name: pulumi.String("S1"),
// Capacity: pulumi.Int(1),
// },
// })
// if err != nil {
// return err
// }
// exampleSecuritySolution, err := iot.NewSecuritySolution(ctx, "example", &iot.SecuritySolutionArgs{
// Name: pulumi.String("example-Iot-Security-Solution"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// DisplayName: pulumi.String("Iot Security Solution"),
// IothubIds: pulumi.StringArray{
// exampleIoTHub.ID(),
// },
// })
// if err != nil {
// return err
// }
// _, err = iot.NewSecurityDeviceGroup(ctx, "example", &iot.SecurityDeviceGroupArgs{
// Name: pulumi.String("example-device-security-group"),
// IothubId: exampleIoTHub.ID(),
// AllowRule: &iot.SecurityDeviceGroupAllowRuleArgs{
// ConnectionToIpsNotAlloweds: pulumi.StringArray{
// pulumi.String("10.0.0.0/24"),
// },
// },
// RangeRules: iot.SecurityDeviceGroupRangeRuleArray{
// &iot.SecurityDeviceGroupRangeRuleArgs{
// Type: pulumi.String("ActiveConnectionsNotInAllowedRange"),
// Min: pulumi.Int(0),
// Max: pulumi.Int(30),
// Duration: pulumi.String("PT5M"),
// },
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleSecuritySolution,
// }))
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Iot Security Device Group can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:iot/securityDeviceGroup:SecurityDeviceGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Devices/iotHubs/hub1/providers/Microsoft.Security/deviceSecurityGroups/group1
// ```
type SecurityDeviceGroup struct {
pulumi.CustomResourceState
// an `allowRule` blocks as defined below.
AllowRule SecurityDeviceGroupAllowRulePtrOutput `pulumi:"allowRule"`
// The ID of the IoT Hub which to link the Security Device Group to. Changing this forces a new resource to be created.
IothubId pulumi.StringOutput `pulumi:"iothubId"`
// Specifies the name of the Device Security Group. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// One or more `rangeRule` blocks as defined below.
RangeRules SecurityDeviceGroupRangeRuleArrayOutput `pulumi:"rangeRules"`
}
// NewSecurityDeviceGroup registers a new resource with the given unique name, arguments, and options.
func NewSecurityDeviceGroup(ctx *pulumi.Context,
name string, args *SecurityDeviceGroupArgs, opts ...pulumi.ResourceOption) (*SecurityDeviceGroup, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.IothubId == nil {
return nil, errors.New("invalid value for required argument 'IothubId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SecurityDeviceGroup
err := ctx.RegisterResource("azure:iot/securityDeviceGroup:SecurityDeviceGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSecurityDeviceGroup gets an existing SecurityDeviceGroup 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 GetSecurityDeviceGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SecurityDeviceGroupState, opts ...pulumi.ResourceOption) (*SecurityDeviceGroup, error) {
var resource SecurityDeviceGroup
err := ctx.ReadResource("azure:iot/securityDeviceGroup:SecurityDeviceGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SecurityDeviceGroup resources.
type securityDeviceGroupState struct {
// an `allowRule` blocks as defined below.
AllowRule *SecurityDeviceGroupAllowRule `pulumi:"allowRule"`
// The ID of the IoT Hub which to link the Security Device Group to. Changing this forces a new resource to be created.
IothubId *string `pulumi:"iothubId"`
// Specifies the name of the Device Security Group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// One or more `rangeRule` blocks as defined below.
RangeRules []SecurityDeviceGroupRangeRule `pulumi:"rangeRules"`
}
type SecurityDeviceGroupState struct {
// an `allowRule` blocks as defined below.
AllowRule SecurityDeviceGroupAllowRulePtrInput
// The ID of the IoT Hub which to link the Security Device Group to. Changing this forces a new resource to be created.
IothubId pulumi.StringPtrInput
// Specifies the name of the Device Security Group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// One or more `rangeRule` blocks as defined below.
RangeRules SecurityDeviceGroupRangeRuleArrayInput
}
func (SecurityDeviceGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*securityDeviceGroupState)(nil)).Elem()
}
type securityDeviceGroupArgs struct {
// an `allowRule` blocks as defined below.
AllowRule *SecurityDeviceGroupAllowRule `pulumi:"allowRule"`
// The ID of the IoT Hub which to link the Security Device Group to. Changing this forces a new resource to be created.
IothubId string `pulumi:"iothubId"`
// Specifies the name of the Device Security Group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// One or more `rangeRule` blocks as defined below.
RangeRules []SecurityDeviceGroupRangeRule `pulumi:"rangeRules"`
}
// The set of arguments for constructing a SecurityDeviceGroup resource.
type SecurityDeviceGroupArgs struct {
// an `allowRule` blocks as defined below.
AllowRule SecurityDeviceGroupAllowRulePtrInput
// The ID of the IoT Hub which to link the Security Device Group to. Changing this forces a new resource to be created.
IothubId pulumi.StringInput
// Specifies the name of the Device Security Group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// One or more `rangeRule` blocks as defined below.
RangeRules SecurityDeviceGroupRangeRuleArrayInput
}
func (SecurityDeviceGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*securityDeviceGroupArgs)(nil)).Elem()
}
type SecurityDeviceGroupInput interface {
pulumi.Input
ToSecurityDeviceGroupOutput() SecurityDeviceGroupOutput
ToSecurityDeviceGroupOutputWithContext(ctx context.Context) SecurityDeviceGroupOutput
}
func (*SecurityDeviceGroup) ElementType() reflect.Type {
return reflect.TypeOf((**SecurityDeviceGroup)(nil)).Elem()
}
func (i *SecurityDeviceGroup) ToSecurityDeviceGroupOutput() SecurityDeviceGroupOutput {
return i.ToSecurityDeviceGroupOutputWithContext(context.Background())
}
func (i *SecurityDeviceGroup) ToSecurityDeviceGroupOutputWithContext(ctx context.Context) SecurityDeviceGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(SecurityDeviceGroupOutput)
}
// SecurityDeviceGroupArrayInput is an input type that accepts SecurityDeviceGroupArray and SecurityDeviceGroupArrayOutput values.
// You can construct a concrete instance of `SecurityDeviceGroupArrayInput` via:
//
// SecurityDeviceGroupArray{ SecurityDeviceGroupArgs{...} }
type SecurityDeviceGroupArrayInput interface {
pulumi.Input
ToSecurityDeviceGroupArrayOutput() SecurityDeviceGroupArrayOutput
ToSecurityDeviceGroupArrayOutputWithContext(context.Context) SecurityDeviceGroupArrayOutput
}
type SecurityDeviceGroupArray []SecurityDeviceGroupInput
func (SecurityDeviceGroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SecurityDeviceGroup)(nil)).Elem()
}
func (i SecurityDeviceGroupArray) ToSecurityDeviceGroupArrayOutput() SecurityDeviceGroupArrayOutput {
return i.ToSecurityDeviceGroupArrayOutputWithContext(context.Background())
}
func (i SecurityDeviceGroupArray) ToSecurityDeviceGroupArrayOutputWithContext(ctx context.Context) SecurityDeviceGroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SecurityDeviceGroupArrayOutput)
}
// SecurityDeviceGroupMapInput is an input type that accepts SecurityDeviceGroupMap and SecurityDeviceGroupMapOutput values.
// You can construct a concrete instance of `SecurityDeviceGroupMapInput` via:
//
// SecurityDeviceGroupMap{ "key": SecurityDeviceGroupArgs{...} }
type SecurityDeviceGroupMapInput interface {
pulumi.Input
ToSecurityDeviceGroupMapOutput() SecurityDeviceGroupMapOutput
ToSecurityDeviceGroupMapOutputWithContext(context.Context) SecurityDeviceGroupMapOutput
}
type SecurityDeviceGroupMap map[string]SecurityDeviceGroupInput
func (SecurityDeviceGroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SecurityDeviceGroup)(nil)).Elem()
}
func (i SecurityDeviceGroupMap) ToSecurityDeviceGroupMapOutput() SecurityDeviceGroupMapOutput {
return i.ToSecurityDeviceGroupMapOutputWithContext(context.Background())
}
func (i SecurityDeviceGroupMap) ToSecurityDeviceGroupMapOutputWithContext(ctx context.Context) SecurityDeviceGroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SecurityDeviceGroupMapOutput)
}
type SecurityDeviceGroupOutput struct{ *pulumi.OutputState }
func (SecurityDeviceGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SecurityDeviceGroup)(nil)).Elem()
}
func (o SecurityDeviceGroupOutput) ToSecurityDeviceGroupOutput() SecurityDeviceGroupOutput {
return o
}
func (o SecurityDeviceGroupOutput) ToSecurityDeviceGroupOutputWithContext(ctx context.Context) SecurityDeviceGroupOutput {
return o
}
// an `allowRule` blocks as defined below.
func (o SecurityDeviceGroupOutput) AllowRule() SecurityDeviceGroupAllowRulePtrOutput {
return o.ApplyT(func(v *SecurityDeviceGroup) SecurityDeviceGroupAllowRulePtrOutput { return v.AllowRule }).(SecurityDeviceGroupAllowRulePtrOutput)
}
// The ID of the IoT Hub which to link the Security Device Group to. Changing this forces a new resource to be created.
func (o SecurityDeviceGroupOutput) IothubId() pulumi.StringOutput {
return o.ApplyT(func(v *SecurityDeviceGroup) pulumi.StringOutput { return v.IothubId }).(pulumi.StringOutput)
}
// Specifies the name of the Device Security Group. Changing this forces a new resource to be created.
func (o SecurityDeviceGroupOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SecurityDeviceGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// One or more `rangeRule` blocks as defined below.
func (o SecurityDeviceGroupOutput) RangeRules() SecurityDeviceGroupRangeRuleArrayOutput {
return o.ApplyT(func(v *SecurityDeviceGroup) SecurityDeviceGroupRangeRuleArrayOutput { return v.RangeRules }).(SecurityDeviceGroupRangeRuleArrayOutput)
}
type SecurityDeviceGroupArrayOutput struct{ *pulumi.OutputState }
func (SecurityDeviceGroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SecurityDeviceGroup)(nil)).Elem()
}
func (o SecurityDeviceGroupArrayOutput) ToSecurityDeviceGroupArrayOutput() SecurityDeviceGroupArrayOutput {
return o
}
func (o SecurityDeviceGroupArrayOutput) ToSecurityDeviceGroupArrayOutputWithContext(ctx context.Context) SecurityDeviceGroupArrayOutput {
return o
}
func (o SecurityDeviceGroupArrayOutput) Index(i pulumi.IntInput) SecurityDeviceGroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SecurityDeviceGroup {
return vs[0].([]*SecurityDeviceGroup)[vs[1].(int)]
}).(SecurityDeviceGroupOutput)
}
type SecurityDeviceGroupMapOutput struct{ *pulumi.OutputState }
func (SecurityDeviceGroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SecurityDeviceGroup)(nil)).Elem()
}
func (o SecurityDeviceGroupMapOutput) ToSecurityDeviceGroupMapOutput() SecurityDeviceGroupMapOutput {
return o
}
func (o SecurityDeviceGroupMapOutput) ToSecurityDeviceGroupMapOutputWithContext(ctx context.Context) SecurityDeviceGroupMapOutput {
return o
}
func (o SecurityDeviceGroupMapOutput) MapIndex(k pulumi.StringInput) SecurityDeviceGroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SecurityDeviceGroup {
return vs[0].(map[string]*SecurityDeviceGroup)[vs[1].(string)]
}).(SecurityDeviceGroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SecurityDeviceGroupInput)(nil)).Elem(), &SecurityDeviceGroup{})
pulumi.RegisterInputType(reflect.TypeOf((*SecurityDeviceGroupArrayInput)(nil)).Elem(), SecurityDeviceGroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SecurityDeviceGroupMapInput)(nil)).Elem(), SecurityDeviceGroupMap{})
pulumi.RegisterOutputType(SecurityDeviceGroupOutput{})
pulumi.RegisterOutputType(SecurityDeviceGroupArrayOutput{})
pulumi.RegisterOutputType(SecurityDeviceGroupMapOutput{})
}
| 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/iot/getDps.go | sdk/go/azure/iot/getDps.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 iot
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 IotHub Device Provisioning Service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/iot"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := iot.GetDps(ctx, &iot.GetDpsArgs{
// Name: "iot_hub_dps_test",
// ResourceGroupName: "iothub_dps_rg",
// }, 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.Devices` - 2022-02-05
func GetDps(ctx *pulumi.Context, args *GetDpsArgs, opts ...pulumi.InvokeOption) (*GetDpsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetDpsResult
err := ctx.Invoke("azure:iot/getDps:getDps", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDps.
type GetDpsArgs struct {
// Specifies the name of the Iot Device Provisioning Service resource.
Name string `pulumi:"name"`
// The name of the resource group under which the Iot Device Provisioning Service is located in.
ResourceGroupName string `pulumi:"resourceGroupName"`
Tags map[string]string `pulumi:"tags"`
}
// A collection of values returned by getDps.
type GetDpsResult struct {
// The allocation policy of the IoT Device Provisioning Service.
AllocationPolicy string `pulumi:"allocationPolicy"`
// The device endpoint of the IoT Device Provisioning Service.
DeviceProvisioningHostName string `pulumi:"deviceProvisioningHostName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The unique identifier of the IoT Device Provisioning Service.
IdScope string `pulumi:"idScope"`
// Specifies the supported Azure location where the IoT Device Provisioning Service exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The service endpoint of the IoT Device Provisioning Service.
ServiceOperationsHostName string `pulumi:"serviceOperationsHostName"`
Tags map[string]string `pulumi:"tags"`
}
func GetDpsOutput(ctx *pulumi.Context, args GetDpsOutputArgs, opts ...pulumi.InvokeOption) GetDpsResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetDpsResultOutput, error) {
args := v.(GetDpsArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:iot/getDps:getDps", args, GetDpsResultOutput{}, options).(GetDpsResultOutput), nil
}).(GetDpsResultOutput)
}
// A collection of arguments for invoking getDps.
type GetDpsOutputArgs struct {
// Specifies the name of the Iot Device Provisioning Service resource.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group under which the Iot Device Provisioning Service is located in.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
Tags pulumi.StringMapInput `pulumi:"tags"`
}
func (GetDpsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetDpsArgs)(nil)).Elem()
}
// A collection of values returned by getDps.
type GetDpsResultOutput struct{ *pulumi.OutputState }
func (GetDpsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetDpsResult)(nil)).Elem()
}
func (o GetDpsResultOutput) ToGetDpsResultOutput() GetDpsResultOutput {
return o
}
func (o GetDpsResultOutput) ToGetDpsResultOutputWithContext(ctx context.Context) GetDpsResultOutput {
return o
}
// The allocation policy of the IoT Device Provisioning Service.
func (o GetDpsResultOutput) AllocationPolicy() pulumi.StringOutput {
return o.ApplyT(func(v GetDpsResult) string { return v.AllocationPolicy }).(pulumi.StringOutput)
}
// The device endpoint of the IoT Device Provisioning Service.
func (o GetDpsResultOutput) DeviceProvisioningHostName() pulumi.StringOutput {
return o.ApplyT(func(v GetDpsResult) string { return v.DeviceProvisioningHostName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetDpsResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetDpsResult) string { return v.Id }).(pulumi.StringOutput)
}
// The unique identifier of the IoT Device Provisioning Service.
func (o GetDpsResultOutput) IdScope() pulumi.StringOutput {
return o.ApplyT(func(v GetDpsResult) string { return v.IdScope }).(pulumi.StringOutput)
}
// Specifies the supported Azure location where the IoT Device Provisioning Service exists.
func (o GetDpsResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v GetDpsResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o GetDpsResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetDpsResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o GetDpsResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetDpsResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The service endpoint of the IoT Device Provisioning Service.
func (o GetDpsResultOutput) ServiceOperationsHostName() pulumi.StringOutput {
return o.ApplyT(func(v GetDpsResult) string { return v.ServiceOperationsHostName }).(pulumi.StringOutput)
}
func (o GetDpsResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v GetDpsResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(GetDpsResultOutput{})
}
| 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/iot/getSharedAccessPolicy.go | sdk/go/azure/iot/getSharedAccessPolicy.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 iot
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 IotHub Shared Access Policy
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/iot"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := iot.LookupSharedAccessPolicy(ctx, &iot.LookupSharedAccessPolicyArgs{
// Name: "example",
// ResourceGroupName: exampleAzurermResourceGroup.Name,
// IothubName: exampleAzurermIothub.Name,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupSharedAccessPolicy(ctx *pulumi.Context, args *LookupSharedAccessPolicyArgs, opts ...pulumi.InvokeOption) (*LookupSharedAccessPolicyResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupSharedAccessPolicyResult
err := ctx.Invoke("azure:iot/getSharedAccessPolicy:getSharedAccessPolicy", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSharedAccessPolicy.
type LookupSharedAccessPolicyArgs struct {
// The name of the IoTHub to which this Shared Access Policy belongs.
IothubName string `pulumi:"iothubName"`
// Specifies the name of the IotHub Shared Access Policy resource.
Name string `pulumi:"name"`
// The name of the resource group under which the IotHub Shared Access Policy resource has to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getSharedAccessPolicy.
type LookupSharedAccessPolicyResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
IothubName string `pulumi:"iothubName"`
Name string `pulumi:"name"`
// The primary connection string of the Shared Access Policy.
PrimaryConnectionString string `pulumi:"primaryConnectionString"`
// The primary key used to create the authentication token.
PrimaryKey string `pulumi:"primaryKey"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The secondary connection string of the Shared Access Policy.
SecondaryConnectionString string `pulumi:"secondaryConnectionString"`
// The secondary key used to create the authentication token.
SecondaryKey string `pulumi:"secondaryKey"`
}
func LookupSharedAccessPolicyOutput(ctx *pulumi.Context, args LookupSharedAccessPolicyOutputArgs, opts ...pulumi.InvokeOption) LookupSharedAccessPolicyResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupSharedAccessPolicyResultOutput, error) {
args := v.(LookupSharedAccessPolicyArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:iot/getSharedAccessPolicy:getSharedAccessPolicy", args, LookupSharedAccessPolicyResultOutput{}, options).(LookupSharedAccessPolicyResultOutput), nil
}).(LookupSharedAccessPolicyResultOutput)
}
// A collection of arguments for invoking getSharedAccessPolicy.
type LookupSharedAccessPolicyOutputArgs struct {
// The name of the IoTHub to which this Shared Access Policy belongs.
IothubName pulumi.StringInput `pulumi:"iothubName"`
// Specifies the name of the IotHub Shared Access Policy resource.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group under which the IotHub Shared Access Policy resource has to be created.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupSharedAccessPolicyOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSharedAccessPolicyArgs)(nil)).Elem()
}
// A collection of values returned by getSharedAccessPolicy.
type LookupSharedAccessPolicyResultOutput struct{ *pulumi.OutputState }
func (LookupSharedAccessPolicyResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSharedAccessPolicyResult)(nil)).Elem()
}
func (o LookupSharedAccessPolicyResultOutput) ToLookupSharedAccessPolicyResultOutput() LookupSharedAccessPolicyResultOutput {
return o
}
func (o LookupSharedAccessPolicyResultOutput) ToLookupSharedAccessPolicyResultOutputWithContext(ctx context.Context) LookupSharedAccessPolicyResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupSharedAccessPolicyResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupSharedAccessPolicyResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupSharedAccessPolicyResultOutput) IothubName() pulumi.StringOutput {
return o.ApplyT(func(v LookupSharedAccessPolicyResult) string { return v.IothubName }).(pulumi.StringOutput)
}
func (o LookupSharedAccessPolicyResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupSharedAccessPolicyResult) string { return v.Name }).(pulumi.StringOutput)
}
// The primary connection string of the Shared Access Policy.
func (o LookupSharedAccessPolicyResultOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupSharedAccessPolicyResult) string { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The primary key used to create the authentication token.
func (o LookupSharedAccessPolicyResultOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupSharedAccessPolicyResult) string { return v.PrimaryKey }).(pulumi.StringOutput)
}
func (o LookupSharedAccessPolicyResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupSharedAccessPolicyResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The secondary connection string of the Shared Access Policy.
func (o LookupSharedAccessPolicyResultOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupSharedAccessPolicyResult) string { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The secondary key used to create the authentication token.
func (o LookupSharedAccessPolicyResultOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupSharedAccessPolicyResult) string { return v.SecondaryKey }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupSharedAccessPolicyResultOutput{})
}
| 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/iot/endpointEventhub.go | sdk/go/azure/iot/endpointEventhub.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 iot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an IotHub EventHub Endpoint
//
// > **Note:** Endpoints can be defined either directly on the `iot.IoTHub` resource, or using the `azurerm_iothub_endpoint_*` resources - but the two ways of defining the endpoints cannot be used together. If both are used against the same IoTHub, spurious changes will occur. Also, defining a `azurerm_iothub_endpoint_*` resource and another endpoint of a different type directly on the `iot.IoTHub` resource is not supported.
//
// ## 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/eventhub"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/iot"
// "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
// }
// exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("exampleEventHubNamespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
// Name: pulumi.String("exampleEventHub"),
// NamespaceName: exampleEventHubNamespace.Name,
// ResourceGroupName: example.Name,
// PartitionCount: pulumi.Int(2),
// MessageRetention: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// exampleAuthorizationRule, err := eventhub.NewAuthorizationRule(ctx, "example", &eventhub.AuthorizationRuleArgs{
// Name: pulumi.String("exampleRule"),
// NamespaceName: exampleEventHubNamespace.Name,
// EventhubName: exampleEventHub.Name,
// ResourceGroupName: example.Name,
// Listen: pulumi.Bool(false),
// Send: pulumi.Bool(true),
// Manage: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// exampleIoTHub, err := iot.NewIoTHub(ctx, "example", &iot.IoTHubArgs{
// Name: pulumi.String("exampleIothub"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: &iot.IoTHubSkuArgs{
// Name: pulumi.String("B1"),
// Capacity: pulumi.Int(1),
// },
// Tags: pulumi.StringMap{
// "purpose": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// _, err = iot.NewEndpointEventhub(ctx, "example", &iot.EndpointEventhubArgs{
// ResourceGroupName: example.Name,
// IothubId: exampleIoTHub.ID(),
// Name: pulumi.String("example"),
// ConnectionString: exampleAuthorizationRule.PrimaryConnectionString,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// IoTHub EventHub Endpoint can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:iot/endpointEventhub:EndpointEventhub eventhub1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/endpoints/eventhub_endpoint1
// ```
type EndpointEventhub struct {
pulumi.CustomResourceState
// Type used to authenticate against the Event Hub endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
AuthenticationType pulumi.StringPtrOutput `pulumi:"authenticationType"`
// The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`.
ConnectionString pulumi.StringPtrOutput `pulumi:"connectionString"`
// URI of the Event Hubs Namespace endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EndpointUri pulumi.StringPtrOutput `pulumi:"endpointUri"`
// Name of the Event Hub. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EntityPath pulumi.StringPtrOutput `pulumi:"entityPath"`
// ID of the User Managed Identity used to authenticate against the Event Hub endpoint.
//
// > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the Iot Hub. If not specified when `authenticationType` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
IdentityId pulumi.StringPtrOutput `pulumi:"identityId"`
// The IoTHub ID for the endpoint. Changing this forces a new resource to be created.
IothubId pulumi.StringOutput `pulumi:"iothubId"`
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group under which the Event Hub has been created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The subscription ID for the endpoint.
//
// > **Note:** When `subscriptionId` isn't specified it will be set to the subscription ID of the IoT Hub resource.
SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"`
}
// NewEndpointEventhub registers a new resource with the given unique name, arguments, and options.
func NewEndpointEventhub(ctx *pulumi.Context,
name string, args *EndpointEventhubArgs, opts ...pulumi.ResourceOption) (*EndpointEventhub, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.IothubId == nil {
return nil, errors.New("invalid value for required argument 'IothubId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ConnectionString != nil {
args.ConnectionString = pulumi.ToSecret(args.ConnectionString).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"connectionString",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource EndpointEventhub
err := ctx.RegisterResource("azure:iot/endpointEventhub:EndpointEventhub", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEndpointEventhub gets an existing EndpointEventhub 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 GetEndpointEventhub(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EndpointEventhubState, opts ...pulumi.ResourceOption) (*EndpointEventhub, error) {
var resource EndpointEventhub
err := ctx.ReadResource("azure:iot/endpointEventhub:EndpointEventhub", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EndpointEventhub resources.
type endpointEventhubState struct {
// Type used to authenticate against the Event Hub endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
AuthenticationType *string `pulumi:"authenticationType"`
// The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`.
ConnectionString *string `pulumi:"connectionString"`
// URI of the Event Hubs Namespace endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EndpointUri *string `pulumi:"endpointUri"`
// Name of the Event Hub. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EntityPath *string `pulumi:"entityPath"`
// ID of the User Managed Identity used to authenticate against the Event Hub endpoint.
//
// > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the Iot Hub. If not specified when `authenticationType` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
IdentityId *string `pulumi:"identityId"`
// The IoTHub ID for the endpoint. Changing this forces a new resource to be created.
IothubId *string `pulumi:"iothubId"`
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group under which the Event Hub has been created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The subscription ID for the endpoint.
//
// > **Note:** When `subscriptionId` isn't specified it will be set to the subscription ID of the IoT Hub resource.
SubscriptionId *string `pulumi:"subscriptionId"`
}
type EndpointEventhubState struct {
// Type used to authenticate against the Event Hub endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
AuthenticationType pulumi.StringPtrInput
// The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`.
ConnectionString pulumi.StringPtrInput
// URI of the Event Hubs Namespace endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EndpointUri pulumi.StringPtrInput
// Name of the Event Hub. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EntityPath pulumi.StringPtrInput
// ID of the User Managed Identity used to authenticate against the Event Hub endpoint.
//
// > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the Iot Hub. If not specified when `authenticationType` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
IdentityId pulumi.StringPtrInput
// The IoTHub ID for the endpoint. Changing this forces a new resource to be created.
IothubId pulumi.StringPtrInput
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group under which the Event Hub has been created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The subscription ID for the endpoint.
//
// > **Note:** When `subscriptionId` isn't specified it will be set to the subscription ID of the IoT Hub resource.
SubscriptionId pulumi.StringPtrInput
}
func (EndpointEventhubState) ElementType() reflect.Type {
return reflect.TypeOf((*endpointEventhubState)(nil)).Elem()
}
type endpointEventhubArgs struct {
// Type used to authenticate against the Event Hub endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
AuthenticationType *string `pulumi:"authenticationType"`
// The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`.
ConnectionString *string `pulumi:"connectionString"`
// URI of the Event Hubs Namespace endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EndpointUri *string `pulumi:"endpointUri"`
// Name of the Event Hub. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EntityPath *string `pulumi:"entityPath"`
// ID of the User Managed Identity used to authenticate against the Event Hub endpoint.
//
// > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the Iot Hub. If not specified when `authenticationType` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
IdentityId *string `pulumi:"identityId"`
// The IoTHub ID for the endpoint. Changing this forces a new resource to be created.
IothubId string `pulumi:"iothubId"`
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group under which the Event Hub has been created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The subscription ID for the endpoint.
//
// > **Note:** When `subscriptionId` isn't specified it will be set to the subscription ID of the IoT Hub resource.
SubscriptionId *string `pulumi:"subscriptionId"`
}
// The set of arguments for constructing a EndpointEventhub resource.
type EndpointEventhubArgs struct {
// Type used to authenticate against the Event Hub endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
AuthenticationType pulumi.StringPtrInput
// The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`.
ConnectionString pulumi.StringPtrInput
// URI of the Event Hubs Namespace endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EndpointUri pulumi.StringPtrInput
// Name of the Event Hub. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EntityPath pulumi.StringPtrInput
// ID of the User Managed Identity used to authenticate against the Event Hub endpoint.
//
// > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the Iot Hub. If not specified when `authenticationType` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
IdentityId pulumi.StringPtrInput
// The IoTHub ID for the endpoint. Changing this forces a new resource to be created.
IothubId pulumi.StringInput
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group under which the Event Hub has been created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The subscription ID for the endpoint.
//
// > **Note:** When `subscriptionId` isn't specified it will be set to the subscription ID of the IoT Hub resource.
SubscriptionId pulumi.StringPtrInput
}
func (EndpointEventhubArgs) ElementType() reflect.Type {
return reflect.TypeOf((*endpointEventhubArgs)(nil)).Elem()
}
type EndpointEventhubInput interface {
pulumi.Input
ToEndpointEventhubOutput() EndpointEventhubOutput
ToEndpointEventhubOutputWithContext(ctx context.Context) EndpointEventhubOutput
}
func (*EndpointEventhub) ElementType() reflect.Type {
return reflect.TypeOf((**EndpointEventhub)(nil)).Elem()
}
func (i *EndpointEventhub) ToEndpointEventhubOutput() EndpointEventhubOutput {
return i.ToEndpointEventhubOutputWithContext(context.Background())
}
func (i *EndpointEventhub) ToEndpointEventhubOutputWithContext(ctx context.Context) EndpointEventhubOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointEventhubOutput)
}
// EndpointEventhubArrayInput is an input type that accepts EndpointEventhubArray and EndpointEventhubArrayOutput values.
// You can construct a concrete instance of `EndpointEventhubArrayInput` via:
//
// EndpointEventhubArray{ EndpointEventhubArgs{...} }
type EndpointEventhubArrayInput interface {
pulumi.Input
ToEndpointEventhubArrayOutput() EndpointEventhubArrayOutput
ToEndpointEventhubArrayOutputWithContext(context.Context) EndpointEventhubArrayOutput
}
type EndpointEventhubArray []EndpointEventhubInput
func (EndpointEventhubArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EndpointEventhub)(nil)).Elem()
}
func (i EndpointEventhubArray) ToEndpointEventhubArrayOutput() EndpointEventhubArrayOutput {
return i.ToEndpointEventhubArrayOutputWithContext(context.Background())
}
func (i EndpointEventhubArray) ToEndpointEventhubArrayOutputWithContext(ctx context.Context) EndpointEventhubArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointEventhubArrayOutput)
}
// EndpointEventhubMapInput is an input type that accepts EndpointEventhubMap and EndpointEventhubMapOutput values.
// You can construct a concrete instance of `EndpointEventhubMapInput` via:
//
// EndpointEventhubMap{ "key": EndpointEventhubArgs{...} }
type EndpointEventhubMapInput interface {
pulumi.Input
ToEndpointEventhubMapOutput() EndpointEventhubMapOutput
ToEndpointEventhubMapOutputWithContext(context.Context) EndpointEventhubMapOutput
}
type EndpointEventhubMap map[string]EndpointEventhubInput
func (EndpointEventhubMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EndpointEventhub)(nil)).Elem()
}
func (i EndpointEventhubMap) ToEndpointEventhubMapOutput() EndpointEventhubMapOutput {
return i.ToEndpointEventhubMapOutputWithContext(context.Background())
}
func (i EndpointEventhubMap) ToEndpointEventhubMapOutputWithContext(ctx context.Context) EndpointEventhubMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointEventhubMapOutput)
}
type EndpointEventhubOutput struct{ *pulumi.OutputState }
func (EndpointEventhubOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EndpointEventhub)(nil)).Elem()
}
func (o EndpointEventhubOutput) ToEndpointEventhubOutput() EndpointEventhubOutput {
return o
}
func (o EndpointEventhubOutput) ToEndpointEventhubOutputWithContext(ctx context.Context) EndpointEventhubOutput {
return o
}
// Type used to authenticate against the Event Hub endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
func (o EndpointEventhubOutput) AuthenticationType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EndpointEventhub) pulumi.StringPtrOutput { return v.AuthenticationType }).(pulumi.StringPtrOutput)
}
// The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`.
func (o EndpointEventhubOutput) ConnectionString() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EndpointEventhub) pulumi.StringPtrOutput { return v.ConnectionString }).(pulumi.StringPtrOutput)
}
// URI of the Event Hubs Namespace endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
func (o EndpointEventhubOutput) EndpointUri() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EndpointEventhub) pulumi.StringPtrOutput { return v.EndpointUri }).(pulumi.StringPtrOutput)
}
// Name of the Event Hub. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
func (o EndpointEventhubOutput) EntityPath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EndpointEventhub) pulumi.StringPtrOutput { return v.EntityPath }).(pulumi.StringPtrOutput)
}
// ID of the User Managed Identity used to authenticate against the Event Hub endpoint.
//
// > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the Iot Hub. If not specified when `authenticationType` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
func (o EndpointEventhubOutput) IdentityId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EndpointEventhub) pulumi.StringPtrOutput { return v.IdentityId }).(pulumi.StringPtrOutput)
}
// The IoTHub ID for the endpoint. Changing this forces a new resource to be created.
func (o EndpointEventhubOutput) IothubId() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointEventhub) pulumi.StringOutput { return v.IothubId }).(pulumi.StringOutput)
}
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
func (o EndpointEventhubOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointEventhub) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group under which the Event Hub has been created. Changing this forces a new resource to be created.
func (o EndpointEventhubOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointEventhub) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The subscription ID for the endpoint.
//
// > **Note:** When `subscriptionId` isn't specified it will be set to the subscription ID of the IoT Hub resource.
func (o EndpointEventhubOutput) SubscriptionId() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointEventhub) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput)
}
type EndpointEventhubArrayOutput struct{ *pulumi.OutputState }
func (EndpointEventhubArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EndpointEventhub)(nil)).Elem()
}
func (o EndpointEventhubArrayOutput) ToEndpointEventhubArrayOutput() EndpointEventhubArrayOutput {
return o
}
func (o EndpointEventhubArrayOutput) ToEndpointEventhubArrayOutputWithContext(ctx context.Context) EndpointEventhubArrayOutput {
return o
}
func (o EndpointEventhubArrayOutput) Index(i pulumi.IntInput) EndpointEventhubOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EndpointEventhub {
return vs[0].([]*EndpointEventhub)[vs[1].(int)]
}).(EndpointEventhubOutput)
}
type EndpointEventhubMapOutput struct{ *pulumi.OutputState }
func (EndpointEventhubMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EndpointEventhub)(nil)).Elem()
}
func (o EndpointEventhubMapOutput) ToEndpointEventhubMapOutput() EndpointEventhubMapOutput {
return o
}
func (o EndpointEventhubMapOutput) ToEndpointEventhubMapOutputWithContext(ctx context.Context) EndpointEventhubMapOutput {
return o
}
func (o EndpointEventhubMapOutput) MapIndex(k pulumi.StringInput) EndpointEventhubOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EndpointEventhub {
return vs[0].(map[string]*EndpointEventhub)[vs[1].(string)]
}).(EndpointEventhubOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EndpointEventhubInput)(nil)).Elem(), &EndpointEventhub{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointEventhubArrayInput)(nil)).Elem(), EndpointEventhubArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointEventhubMapInput)(nil)).Elem(), EndpointEventhubMap{})
pulumi.RegisterOutputType(EndpointEventhubOutput{})
pulumi.RegisterOutputType(EndpointEventhubArrayOutput{})
pulumi.RegisterOutputType(EndpointEventhubMapOutput{})
}
| 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/iot/dpsSharedAccessPolicy.go | sdk/go/azure/iot/dpsSharedAccessPolicy.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 iot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an IotHub Device Provisioning Service Shared Access Policy
//
// ## 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/iot"
// "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
// }
// exampleIotHubDps, err := iot.NewIotHubDps(ctx, "example", &iot.IotHubDpsArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: &iot.IotHubDpsSkuArgs{
// Name: pulumi.String("S1"),
// Capacity: pulumi.Int(1),
// },
// })
// if err != nil {
// return err
// }
// _, err = iot.NewDpsSharedAccessPolicy(ctx, "example", &iot.DpsSharedAccessPolicyArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// IothubDpsName: exampleIotHubDps.Name,
// EnrollmentWrite: pulumi.Bool(true),
// EnrollmentRead: 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.Devices` - 2022-02-05
//
// ## Import
//
// IoTHub Device Provisioning Service Shared Access Policies can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:iot/dpsSharedAccessPolicy:DpsSharedAccessPolicy shared_access_policy1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/provisioningServices/dps1/keys/shared_access_policy1
// ```
type DpsSharedAccessPolicy struct {
pulumi.CustomResourceState
// Adds `EnrollmentRead` permission to this Shared Access Account. It allows read access to enrollment data.
//
// > **Note:** When `enrollmentRead` is set to `true`, `registrationRead` must also be set to true. This is a limitation of the Azure REST API
EnrollmentRead pulumi.BoolPtrOutput `pulumi:"enrollmentRead"`
// Adds `EnrollmentWrite` permission to this Shared Access Account. It allows write access to enrollment data.
//
// > **Note:** When `registrationWrite` is set to `true`, `enrollmentRead`, `registrationRead`, and `registrationWrite` must also be set to true. This is a requirement of the Azure API.
EnrollmentWrite pulumi.BoolPtrOutput `pulumi:"enrollmentWrite"`
// The name of the IoT Hub Device Provisioning service to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
IothubDpsName pulumi.StringOutput `pulumi:"iothubDpsName"`
// Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The primary connection string of the Shared Access Policy.
PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"`
// The primary key used to create the authentication token.
PrimaryKey pulumi.StringOutput `pulumi:"primaryKey"`
// Adds `RegistrationStatusRead` permission to this Shared Access Account. It allows read access to device registrations.
RegistrationRead pulumi.BoolPtrOutput `pulumi:"registrationRead"`
// Adds `RegistrationStatusWrite` permission to this Shared Access Account. It allows write access to device registrations.
//
// > **Note:** When `registrationWrite` is set to `true`, `registrationRead` must also be set to true. This is a requirement of the Azure API.
RegistrationWrite pulumi.BoolPtrOutput `pulumi:"registrationWrite"`
// The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The secondary connection string of the Shared Access Policy.
SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"`
// The secondary key used to create the authentication token.
SecondaryKey pulumi.StringOutput `pulumi:"secondaryKey"`
// Adds `ServiceConfig` permission to this Shared Access Account. It allows configuration of the Device Provisioning Service.
//
// > **Note:** At least one of `registrationRead`, `registrationWrite`, `serviceConfig`, `enrollmentRead`, `enrollmentWrite` permissions must be set to `true`.
ServiceConfig pulumi.BoolPtrOutput `pulumi:"serviceConfig"`
}
// NewDpsSharedAccessPolicy registers a new resource with the given unique name, arguments, and options.
func NewDpsSharedAccessPolicy(ctx *pulumi.Context,
name string, args *DpsSharedAccessPolicyArgs, opts ...pulumi.ResourceOption) (*DpsSharedAccessPolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.IothubDpsName == nil {
return nil, errors.New("invalid value for required argument 'IothubDpsName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryConnectionString",
"primaryKey",
"secondaryConnectionString",
"secondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource DpsSharedAccessPolicy
err := ctx.RegisterResource("azure:iot/dpsSharedAccessPolicy:DpsSharedAccessPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDpsSharedAccessPolicy gets an existing DpsSharedAccessPolicy 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 GetDpsSharedAccessPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DpsSharedAccessPolicyState, opts ...pulumi.ResourceOption) (*DpsSharedAccessPolicy, error) {
var resource DpsSharedAccessPolicy
err := ctx.ReadResource("azure:iot/dpsSharedAccessPolicy:DpsSharedAccessPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DpsSharedAccessPolicy resources.
type dpsSharedAccessPolicyState struct {
// Adds `EnrollmentRead` permission to this Shared Access Account. It allows read access to enrollment data.
//
// > **Note:** When `enrollmentRead` is set to `true`, `registrationRead` must also be set to true. This is a limitation of the Azure REST API
EnrollmentRead *bool `pulumi:"enrollmentRead"`
// Adds `EnrollmentWrite` permission to this Shared Access Account. It allows write access to enrollment data.
//
// > **Note:** When `registrationWrite` is set to `true`, `enrollmentRead`, `registrationRead`, and `registrationWrite` must also be set to true. This is a requirement of the Azure API.
EnrollmentWrite *bool `pulumi:"enrollmentWrite"`
// The name of the IoT Hub Device Provisioning service to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
IothubDpsName *string `pulumi:"iothubDpsName"`
// Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The primary connection string of the Shared Access Policy.
PrimaryConnectionString *string `pulumi:"primaryConnectionString"`
// The primary key used to create the authentication token.
PrimaryKey *string `pulumi:"primaryKey"`
// Adds `RegistrationStatusRead` permission to this Shared Access Account. It allows read access to device registrations.
RegistrationRead *bool `pulumi:"registrationRead"`
// Adds `RegistrationStatusWrite` permission to this Shared Access Account. It allows write access to device registrations.
//
// > **Note:** When `registrationWrite` is set to `true`, `registrationRead` must also be set to true. This is a requirement of the Azure API.
RegistrationWrite *bool `pulumi:"registrationWrite"`
// The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The secondary connection string of the Shared Access Policy.
SecondaryConnectionString *string `pulumi:"secondaryConnectionString"`
// The secondary key used to create the authentication token.
SecondaryKey *string `pulumi:"secondaryKey"`
// Adds `ServiceConfig` permission to this Shared Access Account. It allows configuration of the Device Provisioning Service.
//
// > **Note:** At least one of `registrationRead`, `registrationWrite`, `serviceConfig`, `enrollmentRead`, `enrollmentWrite` permissions must be set to `true`.
ServiceConfig *bool `pulumi:"serviceConfig"`
}
type DpsSharedAccessPolicyState struct {
// Adds `EnrollmentRead` permission to this Shared Access Account. It allows read access to enrollment data.
//
// > **Note:** When `enrollmentRead` is set to `true`, `registrationRead` must also be set to true. This is a limitation of the Azure REST API
EnrollmentRead pulumi.BoolPtrInput
// Adds `EnrollmentWrite` permission to this Shared Access Account. It allows write access to enrollment data.
//
// > **Note:** When `registrationWrite` is set to `true`, `enrollmentRead`, `registrationRead`, and `registrationWrite` must also be set to true. This is a requirement of the Azure API.
EnrollmentWrite pulumi.BoolPtrInput
// The name of the IoT Hub Device Provisioning service to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
IothubDpsName pulumi.StringPtrInput
// Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The primary connection string of the Shared Access Policy.
PrimaryConnectionString pulumi.StringPtrInput
// The primary key used to create the authentication token.
PrimaryKey pulumi.StringPtrInput
// Adds `RegistrationStatusRead` permission to this Shared Access Account. It allows read access to device registrations.
RegistrationRead pulumi.BoolPtrInput
// Adds `RegistrationStatusWrite` permission to this Shared Access Account. It allows write access to device registrations.
//
// > **Note:** When `registrationWrite` is set to `true`, `registrationRead` must also be set to true. This is a requirement of the Azure API.
RegistrationWrite pulumi.BoolPtrInput
// The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The secondary connection string of the Shared Access Policy.
SecondaryConnectionString pulumi.StringPtrInput
// The secondary key used to create the authentication token.
SecondaryKey pulumi.StringPtrInput
// Adds `ServiceConfig` permission to this Shared Access Account. It allows configuration of the Device Provisioning Service.
//
// > **Note:** At least one of `registrationRead`, `registrationWrite`, `serviceConfig`, `enrollmentRead`, `enrollmentWrite` permissions must be set to `true`.
ServiceConfig pulumi.BoolPtrInput
}
func (DpsSharedAccessPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*dpsSharedAccessPolicyState)(nil)).Elem()
}
type dpsSharedAccessPolicyArgs struct {
// Adds `EnrollmentRead` permission to this Shared Access Account. It allows read access to enrollment data.
//
// > **Note:** When `enrollmentRead` is set to `true`, `registrationRead` must also be set to true. This is a limitation of the Azure REST API
EnrollmentRead *bool `pulumi:"enrollmentRead"`
// Adds `EnrollmentWrite` permission to this Shared Access Account. It allows write access to enrollment data.
//
// > **Note:** When `registrationWrite` is set to `true`, `enrollmentRead`, `registrationRead`, and `registrationWrite` must also be set to true. This is a requirement of the Azure API.
EnrollmentWrite *bool `pulumi:"enrollmentWrite"`
// The name of the IoT Hub Device Provisioning service to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
IothubDpsName string `pulumi:"iothubDpsName"`
// Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Adds `RegistrationStatusRead` permission to this Shared Access Account. It allows read access to device registrations.
RegistrationRead *bool `pulumi:"registrationRead"`
// Adds `RegistrationStatusWrite` permission to this Shared Access Account. It allows write access to device registrations.
//
// > **Note:** When `registrationWrite` is set to `true`, `registrationRead` must also be set to true. This is a requirement of the Azure API.
RegistrationWrite *bool `pulumi:"registrationWrite"`
// The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Adds `ServiceConfig` permission to this Shared Access Account. It allows configuration of the Device Provisioning Service.
//
// > **Note:** At least one of `registrationRead`, `registrationWrite`, `serviceConfig`, `enrollmentRead`, `enrollmentWrite` permissions must be set to `true`.
ServiceConfig *bool `pulumi:"serviceConfig"`
}
// The set of arguments for constructing a DpsSharedAccessPolicy resource.
type DpsSharedAccessPolicyArgs struct {
// Adds `EnrollmentRead` permission to this Shared Access Account. It allows read access to enrollment data.
//
// > **Note:** When `enrollmentRead` is set to `true`, `registrationRead` must also be set to true. This is a limitation of the Azure REST API
EnrollmentRead pulumi.BoolPtrInput
// Adds `EnrollmentWrite` permission to this Shared Access Account. It allows write access to enrollment data.
//
// > **Note:** When `registrationWrite` is set to `true`, `enrollmentRead`, `registrationRead`, and `registrationWrite` must also be set to true. This is a requirement of the Azure API.
EnrollmentWrite pulumi.BoolPtrInput
// The name of the IoT Hub Device Provisioning service to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
IothubDpsName pulumi.StringInput
// Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Adds `RegistrationStatusRead` permission to this Shared Access Account. It allows read access to device registrations.
RegistrationRead pulumi.BoolPtrInput
// Adds `RegistrationStatusWrite` permission to this Shared Access Account. It allows write access to device registrations.
//
// > **Note:** When `registrationWrite` is set to `true`, `registrationRead` must also be set to true. This is a requirement of the Azure API.
RegistrationWrite pulumi.BoolPtrInput
// The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Adds `ServiceConfig` permission to this Shared Access Account. It allows configuration of the Device Provisioning Service.
//
// > **Note:** At least one of `registrationRead`, `registrationWrite`, `serviceConfig`, `enrollmentRead`, `enrollmentWrite` permissions must be set to `true`.
ServiceConfig pulumi.BoolPtrInput
}
func (DpsSharedAccessPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*dpsSharedAccessPolicyArgs)(nil)).Elem()
}
type DpsSharedAccessPolicyInput interface {
pulumi.Input
ToDpsSharedAccessPolicyOutput() DpsSharedAccessPolicyOutput
ToDpsSharedAccessPolicyOutputWithContext(ctx context.Context) DpsSharedAccessPolicyOutput
}
func (*DpsSharedAccessPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**DpsSharedAccessPolicy)(nil)).Elem()
}
func (i *DpsSharedAccessPolicy) ToDpsSharedAccessPolicyOutput() DpsSharedAccessPolicyOutput {
return i.ToDpsSharedAccessPolicyOutputWithContext(context.Background())
}
func (i *DpsSharedAccessPolicy) ToDpsSharedAccessPolicyOutputWithContext(ctx context.Context) DpsSharedAccessPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(DpsSharedAccessPolicyOutput)
}
// DpsSharedAccessPolicyArrayInput is an input type that accepts DpsSharedAccessPolicyArray and DpsSharedAccessPolicyArrayOutput values.
// You can construct a concrete instance of `DpsSharedAccessPolicyArrayInput` via:
//
// DpsSharedAccessPolicyArray{ DpsSharedAccessPolicyArgs{...} }
type DpsSharedAccessPolicyArrayInput interface {
pulumi.Input
ToDpsSharedAccessPolicyArrayOutput() DpsSharedAccessPolicyArrayOutput
ToDpsSharedAccessPolicyArrayOutputWithContext(context.Context) DpsSharedAccessPolicyArrayOutput
}
type DpsSharedAccessPolicyArray []DpsSharedAccessPolicyInput
func (DpsSharedAccessPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DpsSharedAccessPolicy)(nil)).Elem()
}
func (i DpsSharedAccessPolicyArray) ToDpsSharedAccessPolicyArrayOutput() DpsSharedAccessPolicyArrayOutput {
return i.ToDpsSharedAccessPolicyArrayOutputWithContext(context.Background())
}
func (i DpsSharedAccessPolicyArray) ToDpsSharedAccessPolicyArrayOutputWithContext(ctx context.Context) DpsSharedAccessPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DpsSharedAccessPolicyArrayOutput)
}
// DpsSharedAccessPolicyMapInput is an input type that accepts DpsSharedAccessPolicyMap and DpsSharedAccessPolicyMapOutput values.
// You can construct a concrete instance of `DpsSharedAccessPolicyMapInput` via:
//
// DpsSharedAccessPolicyMap{ "key": DpsSharedAccessPolicyArgs{...} }
type DpsSharedAccessPolicyMapInput interface {
pulumi.Input
ToDpsSharedAccessPolicyMapOutput() DpsSharedAccessPolicyMapOutput
ToDpsSharedAccessPolicyMapOutputWithContext(context.Context) DpsSharedAccessPolicyMapOutput
}
type DpsSharedAccessPolicyMap map[string]DpsSharedAccessPolicyInput
func (DpsSharedAccessPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DpsSharedAccessPolicy)(nil)).Elem()
}
func (i DpsSharedAccessPolicyMap) ToDpsSharedAccessPolicyMapOutput() DpsSharedAccessPolicyMapOutput {
return i.ToDpsSharedAccessPolicyMapOutputWithContext(context.Background())
}
func (i DpsSharedAccessPolicyMap) ToDpsSharedAccessPolicyMapOutputWithContext(ctx context.Context) DpsSharedAccessPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DpsSharedAccessPolicyMapOutput)
}
type DpsSharedAccessPolicyOutput struct{ *pulumi.OutputState }
func (DpsSharedAccessPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DpsSharedAccessPolicy)(nil)).Elem()
}
func (o DpsSharedAccessPolicyOutput) ToDpsSharedAccessPolicyOutput() DpsSharedAccessPolicyOutput {
return o
}
func (o DpsSharedAccessPolicyOutput) ToDpsSharedAccessPolicyOutputWithContext(ctx context.Context) DpsSharedAccessPolicyOutput {
return o
}
// Adds `EnrollmentRead` permission to this Shared Access Account. It allows read access to enrollment data.
//
// > **Note:** When `enrollmentRead` is set to `true`, `registrationRead` must also be set to true. This is a limitation of the Azure REST API
func (o DpsSharedAccessPolicyOutput) EnrollmentRead() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *DpsSharedAccessPolicy) pulumi.BoolPtrOutput { return v.EnrollmentRead }).(pulumi.BoolPtrOutput)
}
// Adds `EnrollmentWrite` permission to this Shared Access Account. It allows write access to enrollment data.
//
// > **Note:** When `registrationWrite` is set to `true`, `enrollmentRead`, `registrationRead`, and `registrationWrite` must also be set to true. This is a requirement of the Azure API.
func (o DpsSharedAccessPolicyOutput) EnrollmentWrite() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *DpsSharedAccessPolicy) pulumi.BoolPtrOutput { return v.EnrollmentWrite }).(pulumi.BoolPtrOutput)
}
// The name of the IoT Hub Device Provisioning service to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
func (o DpsSharedAccessPolicyOutput) IothubDpsName() pulumi.StringOutput {
return o.ApplyT(func(v *DpsSharedAccessPolicy) pulumi.StringOutput { return v.IothubDpsName }).(pulumi.StringOutput)
}
// Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
func (o DpsSharedAccessPolicyOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DpsSharedAccessPolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The primary connection string of the Shared Access Policy.
func (o DpsSharedAccessPolicyOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *DpsSharedAccessPolicy) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The primary key used to create the authentication token.
func (o DpsSharedAccessPolicyOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *DpsSharedAccessPolicy) pulumi.StringOutput { return v.PrimaryKey }).(pulumi.StringOutput)
}
// Adds `RegistrationStatusRead` permission to this Shared Access Account. It allows read access to device registrations.
func (o DpsSharedAccessPolicyOutput) RegistrationRead() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *DpsSharedAccessPolicy) pulumi.BoolPtrOutput { return v.RegistrationRead }).(pulumi.BoolPtrOutput)
}
// Adds `RegistrationStatusWrite` permission to this Shared Access Account. It allows write access to device registrations.
//
// > **Note:** When `registrationWrite` is set to `true`, `registrationRead` must also be set to true. This is a requirement of the Azure API.
func (o DpsSharedAccessPolicyOutput) RegistrationWrite() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *DpsSharedAccessPolicy) pulumi.BoolPtrOutput { return v.RegistrationWrite }).(pulumi.BoolPtrOutput)
}
// The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.
func (o DpsSharedAccessPolicyOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *DpsSharedAccessPolicy) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The secondary connection string of the Shared Access Policy.
func (o DpsSharedAccessPolicyOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *DpsSharedAccessPolicy) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The secondary key used to create the authentication token.
func (o DpsSharedAccessPolicyOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *DpsSharedAccessPolicy) pulumi.StringOutput { return v.SecondaryKey }).(pulumi.StringOutput)
}
// Adds `ServiceConfig` permission to this Shared Access Account. It allows configuration of the Device Provisioning Service.
//
// > **Note:** At least one of `registrationRead`, `registrationWrite`, `serviceConfig`, `enrollmentRead`, `enrollmentWrite` permissions must be set to `true`.
func (o DpsSharedAccessPolicyOutput) ServiceConfig() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *DpsSharedAccessPolicy) pulumi.BoolPtrOutput { return v.ServiceConfig }).(pulumi.BoolPtrOutput)
}
type DpsSharedAccessPolicyArrayOutput struct{ *pulumi.OutputState }
func (DpsSharedAccessPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DpsSharedAccessPolicy)(nil)).Elem()
}
func (o DpsSharedAccessPolicyArrayOutput) ToDpsSharedAccessPolicyArrayOutput() DpsSharedAccessPolicyArrayOutput {
return o
}
func (o DpsSharedAccessPolicyArrayOutput) ToDpsSharedAccessPolicyArrayOutputWithContext(ctx context.Context) DpsSharedAccessPolicyArrayOutput {
return o
}
func (o DpsSharedAccessPolicyArrayOutput) Index(i pulumi.IntInput) DpsSharedAccessPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DpsSharedAccessPolicy {
return vs[0].([]*DpsSharedAccessPolicy)[vs[1].(int)]
}).(DpsSharedAccessPolicyOutput)
}
type DpsSharedAccessPolicyMapOutput struct{ *pulumi.OutputState }
func (DpsSharedAccessPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DpsSharedAccessPolicy)(nil)).Elem()
}
func (o DpsSharedAccessPolicyMapOutput) ToDpsSharedAccessPolicyMapOutput() DpsSharedAccessPolicyMapOutput {
return o
}
func (o DpsSharedAccessPolicyMapOutput) ToDpsSharedAccessPolicyMapOutputWithContext(ctx context.Context) DpsSharedAccessPolicyMapOutput {
return o
}
func (o DpsSharedAccessPolicyMapOutput) MapIndex(k pulumi.StringInput) DpsSharedAccessPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DpsSharedAccessPolicy {
return vs[0].(map[string]*DpsSharedAccessPolicy)[vs[1].(string)]
}).(DpsSharedAccessPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DpsSharedAccessPolicyInput)(nil)).Elem(), &DpsSharedAccessPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*DpsSharedAccessPolicyArrayInput)(nil)).Elem(), DpsSharedAccessPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DpsSharedAccessPolicyMapInput)(nil)).Elem(), DpsSharedAccessPolicyMap{})
pulumi.RegisterOutputType(DpsSharedAccessPolicyOutput{})
pulumi.RegisterOutputType(DpsSharedAccessPolicyArrayOutput{})
pulumi.RegisterOutputType(DpsSharedAccessPolicyMapOutput{})
}
| 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/iot/iotHubDeviceUpdateAccount.go | sdk/go/azure/iot/iotHubDeviceUpdateAccount.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 iot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an IoT Hub Device Update 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/iot"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("East US"),
// })
// if err != nil {
// return err
// }
// _, err = iot.NewIotHubDeviceUpdateAccount(ctx, "example", &iot.IotHubDeviceUpdateAccountArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Identity: &iot.IotHubDeviceUpdateAccountIdentityArgs{
// 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.DeviceUpdate` - 2022-10-01
//
// ## Import
//
// IoT Hub Device Update Account can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:iot/iotHubDeviceUpdateAccount:IotHubDeviceUpdateAccount example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.DeviceUpdate/accounts/account1
// ```
type IotHubDeviceUpdateAccount struct {
pulumi.CustomResourceState
// The API host name of the IoT Hub Device Update Account.
HostName pulumi.StringOutput `pulumi:"hostName"`
// An `identity` block as defined below.
Identity IotHubDeviceUpdateAccountIdentityPtrOutput `pulumi:"identity"`
// Specifies the Azure Region where the IoT Hub Device Update Account 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 IoT Hub Device Update Account. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies whether the public network access is enabled for the IoT Hub Device Update Account. Possible values are `true` and `false`. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// Specifies the name of the Resource Group where the IoT Hub Device Update Account should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Sku of the IoT Hub Device Update Account. Possible values are `Free` and `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created.
Sku pulumi.StringPtrOutput `pulumi:"sku"`
// A mapping of tags which should be assigned to the IoT Hub Device Update Account.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewIotHubDeviceUpdateAccount registers a new resource with the given unique name, arguments, and options.
func NewIotHubDeviceUpdateAccount(ctx *pulumi.Context,
name string, args *IotHubDeviceUpdateAccountArgs, opts ...pulumi.ResourceOption) (*IotHubDeviceUpdateAccount, 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 IotHubDeviceUpdateAccount
err := ctx.RegisterResource("azure:iot/iotHubDeviceUpdateAccount:IotHubDeviceUpdateAccount", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIotHubDeviceUpdateAccount gets an existing IotHubDeviceUpdateAccount 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 GetIotHubDeviceUpdateAccount(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IotHubDeviceUpdateAccountState, opts ...pulumi.ResourceOption) (*IotHubDeviceUpdateAccount, error) {
var resource IotHubDeviceUpdateAccount
err := ctx.ReadResource("azure:iot/iotHubDeviceUpdateAccount:IotHubDeviceUpdateAccount", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IotHubDeviceUpdateAccount resources.
type iotHubDeviceUpdateAccountState struct {
// The API host name of the IoT Hub Device Update Account.
HostName *string `pulumi:"hostName"`
// An `identity` block as defined below.
Identity *IotHubDeviceUpdateAccountIdentity `pulumi:"identity"`
// Specifies the Azure Region where the IoT Hub Device Update Account should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this IoT Hub Device Update Account. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies whether the public network access is enabled for the IoT Hub Device Update Account. Possible values are `true` and `false`. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// Specifies the name of the Resource Group where the IoT Hub Device Update Account should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Sku of the IoT Hub Device Update Account. Possible values are `Free` and `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created.
Sku *string `pulumi:"sku"`
// A mapping of tags which should be assigned to the IoT Hub Device Update Account.
Tags map[string]string `pulumi:"tags"`
}
type IotHubDeviceUpdateAccountState struct {
// The API host name of the IoT Hub Device Update Account.
HostName pulumi.StringPtrInput
// An `identity` block as defined below.
Identity IotHubDeviceUpdateAccountIdentityPtrInput
// Specifies the Azure Region where the IoT Hub Device Update Account should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this IoT Hub Device Update Account. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies whether the public network access is enabled for the IoT Hub Device Update Account. Possible values are `true` and `false`. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// Specifies the name of the Resource Group where the IoT Hub Device Update Account should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Sku of the IoT Hub Device Update Account. Possible values are `Free` and `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created.
Sku pulumi.StringPtrInput
// A mapping of tags which should be assigned to the IoT Hub Device Update Account.
Tags pulumi.StringMapInput
}
func (IotHubDeviceUpdateAccountState) ElementType() reflect.Type {
return reflect.TypeOf((*iotHubDeviceUpdateAccountState)(nil)).Elem()
}
type iotHubDeviceUpdateAccountArgs struct {
// An `identity` block as defined below.
Identity *IotHubDeviceUpdateAccountIdentity `pulumi:"identity"`
// Specifies the Azure Region where the IoT Hub Device Update Account should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this IoT Hub Device Update Account. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies whether the public network access is enabled for the IoT Hub Device Update Account. Possible values are `true` and `false`. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// Specifies the name of the Resource Group where the IoT Hub Device Update Account should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Sku of the IoT Hub Device Update Account. Possible values are `Free` and `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created.
Sku *string `pulumi:"sku"`
// A mapping of tags which should be assigned to the IoT Hub Device Update Account.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a IotHubDeviceUpdateAccount resource.
type IotHubDeviceUpdateAccountArgs struct {
// An `identity` block as defined below.
Identity IotHubDeviceUpdateAccountIdentityPtrInput
// Specifies the Azure Region where the IoT Hub Device Update Account should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this IoT Hub Device Update Account. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies whether the public network access is enabled for the IoT Hub Device Update Account. Possible values are `true` and `false`. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// Specifies the name of the Resource Group where the IoT Hub Device Update Account should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Sku of the IoT Hub Device Update Account. Possible values are `Free` and `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created.
Sku pulumi.StringPtrInput
// A mapping of tags which should be assigned to the IoT Hub Device Update Account.
Tags pulumi.StringMapInput
}
func (IotHubDeviceUpdateAccountArgs) ElementType() reflect.Type {
return reflect.TypeOf((*iotHubDeviceUpdateAccountArgs)(nil)).Elem()
}
type IotHubDeviceUpdateAccountInput interface {
pulumi.Input
ToIotHubDeviceUpdateAccountOutput() IotHubDeviceUpdateAccountOutput
ToIotHubDeviceUpdateAccountOutputWithContext(ctx context.Context) IotHubDeviceUpdateAccountOutput
}
func (*IotHubDeviceUpdateAccount) ElementType() reflect.Type {
return reflect.TypeOf((**IotHubDeviceUpdateAccount)(nil)).Elem()
}
func (i *IotHubDeviceUpdateAccount) ToIotHubDeviceUpdateAccountOutput() IotHubDeviceUpdateAccountOutput {
return i.ToIotHubDeviceUpdateAccountOutputWithContext(context.Background())
}
func (i *IotHubDeviceUpdateAccount) ToIotHubDeviceUpdateAccountOutputWithContext(ctx context.Context) IotHubDeviceUpdateAccountOutput {
return pulumi.ToOutputWithContext(ctx, i).(IotHubDeviceUpdateAccountOutput)
}
// IotHubDeviceUpdateAccountArrayInput is an input type that accepts IotHubDeviceUpdateAccountArray and IotHubDeviceUpdateAccountArrayOutput values.
// You can construct a concrete instance of `IotHubDeviceUpdateAccountArrayInput` via:
//
// IotHubDeviceUpdateAccountArray{ IotHubDeviceUpdateAccountArgs{...} }
type IotHubDeviceUpdateAccountArrayInput interface {
pulumi.Input
ToIotHubDeviceUpdateAccountArrayOutput() IotHubDeviceUpdateAccountArrayOutput
ToIotHubDeviceUpdateAccountArrayOutputWithContext(context.Context) IotHubDeviceUpdateAccountArrayOutput
}
type IotHubDeviceUpdateAccountArray []IotHubDeviceUpdateAccountInput
func (IotHubDeviceUpdateAccountArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IotHubDeviceUpdateAccount)(nil)).Elem()
}
func (i IotHubDeviceUpdateAccountArray) ToIotHubDeviceUpdateAccountArrayOutput() IotHubDeviceUpdateAccountArrayOutput {
return i.ToIotHubDeviceUpdateAccountArrayOutputWithContext(context.Background())
}
func (i IotHubDeviceUpdateAccountArray) ToIotHubDeviceUpdateAccountArrayOutputWithContext(ctx context.Context) IotHubDeviceUpdateAccountArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IotHubDeviceUpdateAccountArrayOutput)
}
// IotHubDeviceUpdateAccountMapInput is an input type that accepts IotHubDeviceUpdateAccountMap and IotHubDeviceUpdateAccountMapOutput values.
// You can construct a concrete instance of `IotHubDeviceUpdateAccountMapInput` via:
//
// IotHubDeviceUpdateAccountMap{ "key": IotHubDeviceUpdateAccountArgs{...} }
type IotHubDeviceUpdateAccountMapInput interface {
pulumi.Input
ToIotHubDeviceUpdateAccountMapOutput() IotHubDeviceUpdateAccountMapOutput
ToIotHubDeviceUpdateAccountMapOutputWithContext(context.Context) IotHubDeviceUpdateAccountMapOutput
}
type IotHubDeviceUpdateAccountMap map[string]IotHubDeviceUpdateAccountInput
func (IotHubDeviceUpdateAccountMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IotHubDeviceUpdateAccount)(nil)).Elem()
}
func (i IotHubDeviceUpdateAccountMap) ToIotHubDeviceUpdateAccountMapOutput() IotHubDeviceUpdateAccountMapOutput {
return i.ToIotHubDeviceUpdateAccountMapOutputWithContext(context.Background())
}
func (i IotHubDeviceUpdateAccountMap) ToIotHubDeviceUpdateAccountMapOutputWithContext(ctx context.Context) IotHubDeviceUpdateAccountMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IotHubDeviceUpdateAccountMapOutput)
}
type IotHubDeviceUpdateAccountOutput struct{ *pulumi.OutputState }
func (IotHubDeviceUpdateAccountOutput) ElementType() reflect.Type {
return reflect.TypeOf((**IotHubDeviceUpdateAccount)(nil)).Elem()
}
func (o IotHubDeviceUpdateAccountOutput) ToIotHubDeviceUpdateAccountOutput() IotHubDeviceUpdateAccountOutput {
return o
}
func (o IotHubDeviceUpdateAccountOutput) ToIotHubDeviceUpdateAccountOutputWithContext(ctx context.Context) IotHubDeviceUpdateAccountOutput {
return o
}
// The API host name of the IoT Hub Device Update Account.
func (o IotHubDeviceUpdateAccountOutput) HostName() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubDeviceUpdateAccount) pulumi.StringOutput { return v.HostName }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o IotHubDeviceUpdateAccountOutput) Identity() IotHubDeviceUpdateAccountIdentityPtrOutput {
return o.ApplyT(func(v *IotHubDeviceUpdateAccount) IotHubDeviceUpdateAccountIdentityPtrOutput { return v.Identity }).(IotHubDeviceUpdateAccountIdentityPtrOutput)
}
// Specifies the Azure Region where the IoT Hub Device Update Account should exist. Changing this forces a new resource to be created.
func (o IotHubDeviceUpdateAccountOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubDeviceUpdateAccount) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name which should be used for this IoT Hub Device Update Account. Changing this forces a new resource to be created.
func (o IotHubDeviceUpdateAccountOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubDeviceUpdateAccount) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies whether the public network access is enabled for the IoT Hub Device Update Account. Possible values are `true` and `false`. Defaults to `true`.
func (o IotHubDeviceUpdateAccountOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *IotHubDeviceUpdateAccount) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the Resource Group where the IoT Hub Device Update Account should exist. Changing this forces a new resource to be created.
func (o IotHubDeviceUpdateAccountOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *IotHubDeviceUpdateAccount) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Sku of the IoT Hub Device Update Account. Possible values are `Free` and `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created.
func (o IotHubDeviceUpdateAccountOutput) Sku() pulumi.StringPtrOutput {
return o.ApplyT(func(v *IotHubDeviceUpdateAccount) pulumi.StringPtrOutput { return v.Sku }).(pulumi.StringPtrOutput)
}
// A mapping of tags which should be assigned to the IoT Hub Device Update Account.
func (o IotHubDeviceUpdateAccountOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *IotHubDeviceUpdateAccount) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type IotHubDeviceUpdateAccountArrayOutput struct{ *pulumi.OutputState }
func (IotHubDeviceUpdateAccountArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IotHubDeviceUpdateAccount)(nil)).Elem()
}
func (o IotHubDeviceUpdateAccountArrayOutput) ToIotHubDeviceUpdateAccountArrayOutput() IotHubDeviceUpdateAccountArrayOutput {
return o
}
func (o IotHubDeviceUpdateAccountArrayOutput) ToIotHubDeviceUpdateAccountArrayOutputWithContext(ctx context.Context) IotHubDeviceUpdateAccountArrayOutput {
return o
}
func (o IotHubDeviceUpdateAccountArrayOutput) Index(i pulumi.IntInput) IotHubDeviceUpdateAccountOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IotHubDeviceUpdateAccount {
return vs[0].([]*IotHubDeviceUpdateAccount)[vs[1].(int)]
}).(IotHubDeviceUpdateAccountOutput)
}
type IotHubDeviceUpdateAccountMapOutput struct{ *pulumi.OutputState }
func (IotHubDeviceUpdateAccountMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IotHubDeviceUpdateAccount)(nil)).Elem()
}
func (o IotHubDeviceUpdateAccountMapOutput) ToIotHubDeviceUpdateAccountMapOutput() IotHubDeviceUpdateAccountMapOutput {
return o
}
func (o IotHubDeviceUpdateAccountMapOutput) ToIotHubDeviceUpdateAccountMapOutputWithContext(ctx context.Context) IotHubDeviceUpdateAccountMapOutput {
return o
}
func (o IotHubDeviceUpdateAccountMapOutput) MapIndex(k pulumi.StringInput) IotHubDeviceUpdateAccountOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IotHubDeviceUpdateAccount {
return vs[0].(map[string]*IotHubDeviceUpdateAccount)[vs[1].(string)]
}).(IotHubDeviceUpdateAccountOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IotHubDeviceUpdateAccountInput)(nil)).Elem(), &IotHubDeviceUpdateAccount{})
pulumi.RegisterInputType(reflect.TypeOf((*IotHubDeviceUpdateAccountArrayInput)(nil)).Elem(), IotHubDeviceUpdateAccountArray{})
pulumi.RegisterInputType(reflect.TypeOf((*IotHubDeviceUpdateAccountMapInput)(nil)).Elem(), IotHubDeviceUpdateAccountMap{})
pulumi.RegisterOutputType(IotHubDeviceUpdateAccountOutput{})
pulumi.RegisterOutputType(IotHubDeviceUpdateAccountArrayOutput{})
pulumi.RegisterOutputType(IotHubDeviceUpdateAccountMapOutput{})
}
| 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/iot/endpointServicebusQueue.go | sdk/go/azure/iot/endpointServicebusQueue.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 iot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an IotHub ServiceBus Queue Endpoint
//
// > **Note:** Endpoints can be defined either directly on the `iot.IoTHub` resource, or using the `azurerm_iothub_endpoint_*` resources - but the two ways of defining the endpoints cannot be used together. If both are used against the same IoTHub, spurious changes will occur. Also, defining a `azurerm_iothub_endpoint_*` resource and another endpoint of a different type directly on the `iot.IoTHub` resource is not supported.
//
// ## 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/iot"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/servicebus"
// "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
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("exampleNamespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// })
// if err != nil {
// return err
// }
// exampleQueue, err := servicebus.NewQueue(ctx, "example", &servicebus.QueueArgs{
// Name: pulumi.String("exampleQueue"),
// NamespaceId: exampleNamespace.ID(),
// EnablePartitioning: true,
// })
// if err != nil {
// return err
// }
// exampleQueueAuthorizationRule, err := servicebus.NewQueueAuthorizationRule(ctx, "example", &servicebus.QueueAuthorizationRuleArgs{
// Name: pulumi.String("exampleRule"),
// QueueId: exampleQueue.ID(),
// Listen: pulumi.Bool(false),
// Send: pulumi.Bool(true),
// Manage: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// exampleIoTHub, err := iot.NewIoTHub(ctx, "example", &iot.IoTHubArgs{
// Name: pulumi.String("exampleIothub"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: &iot.IoTHubSkuArgs{
// Name: pulumi.String("B1"),
// Capacity: pulumi.Int(1),
// },
// Tags: pulumi.StringMap{
// "purpose": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// _, err = iot.NewEndpointServicebusQueue(ctx, "example", &iot.EndpointServicebusQueueArgs{
// ResourceGroupName: example.Name,
// IothubId: exampleIoTHub.ID(),
// Name: pulumi.String("example"),
// ConnectionString: exampleQueueAuthorizationRule.PrimaryConnectionString,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// IoTHub ServiceBus Queue Endpoint can be imported using the `resource id`, e.g.
//
// g
//
// ```sh
// $ pulumi import azure:iot/endpointServicebusQueue:EndpointServicebusQueue servicebus_queue1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/endpoints/servicebusqueue_endpoint1
// ```
type EndpointServicebusQueue struct {
pulumi.CustomResourceState
// Type used to authenticate against the Service Bus Queue endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
AuthenticationType pulumi.StringPtrOutput `pulumi:"authenticationType"`
// The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`.
ConnectionString pulumi.StringPtrOutput `pulumi:"connectionString"`
// URI of the Service Bus endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EndpointUri pulumi.StringPtrOutput `pulumi:"endpointUri"`
// Name of the Service Bus Queue. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EntityPath pulumi.StringPtrOutput `pulumi:"entityPath"`
// ID of the User Managed Identity used to authenticate against the Service Bus Queue endpoint.
//
// > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the Iot Hub. If not specified when `authenticationType` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
IdentityId pulumi.StringPtrOutput `pulumi:"identityId"`
// The IoTHub ID for the endpoint. Changing this forces a new resource to be created.
IothubId pulumi.StringOutput `pulumi:"iothubId"`
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group under which the Service Bus Queue has been created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The subscription ID for the endpoint.
//
// > **Note:** When `subscriptionId` isn't specified it will be set to the subscription ID of the IoT Hub resource.
SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"`
}
// NewEndpointServicebusQueue registers a new resource with the given unique name, arguments, and options.
func NewEndpointServicebusQueue(ctx *pulumi.Context,
name string, args *EndpointServicebusQueueArgs, opts ...pulumi.ResourceOption) (*EndpointServicebusQueue, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.IothubId == nil {
return nil, errors.New("invalid value for required argument 'IothubId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ConnectionString != nil {
args.ConnectionString = pulumi.ToSecret(args.ConnectionString).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"connectionString",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource EndpointServicebusQueue
err := ctx.RegisterResource("azure:iot/endpointServicebusQueue:EndpointServicebusQueue", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEndpointServicebusQueue gets an existing EndpointServicebusQueue 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 GetEndpointServicebusQueue(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EndpointServicebusQueueState, opts ...pulumi.ResourceOption) (*EndpointServicebusQueue, error) {
var resource EndpointServicebusQueue
err := ctx.ReadResource("azure:iot/endpointServicebusQueue:EndpointServicebusQueue", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EndpointServicebusQueue resources.
type endpointServicebusQueueState struct {
// Type used to authenticate against the Service Bus Queue endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
AuthenticationType *string `pulumi:"authenticationType"`
// The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`.
ConnectionString *string `pulumi:"connectionString"`
// URI of the Service Bus endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EndpointUri *string `pulumi:"endpointUri"`
// Name of the Service Bus Queue. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EntityPath *string `pulumi:"entityPath"`
// ID of the User Managed Identity used to authenticate against the Service Bus Queue endpoint.
//
// > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the Iot Hub. If not specified when `authenticationType` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
IdentityId *string `pulumi:"identityId"`
// The IoTHub ID for the endpoint. Changing this forces a new resource to be created.
IothubId *string `pulumi:"iothubId"`
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group under which the Service Bus Queue has been created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The subscription ID for the endpoint.
//
// > **Note:** When `subscriptionId` isn't specified it will be set to the subscription ID of the IoT Hub resource.
SubscriptionId *string `pulumi:"subscriptionId"`
}
type EndpointServicebusQueueState struct {
// Type used to authenticate against the Service Bus Queue endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
AuthenticationType pulumi.StringPtrInput
// The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`.
ConnectionString pulumi.StringPtrInput
// URI of the Service Bus endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EndpointUri pulumi.StringPtrInput
// Name of the Service Bus Queue. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EntityPath pulumi.StringPtrInput
// ID of the User Managed Identity used to authenticate against the Service Bus Queue endpoint.
//
// > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the Iot Hub. If not specified when `authenticationType` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
IdentityId pulumi.StringPtrInput
// The IoTHub ID for the endpoint. Changing this forces a new resource to be created.
IothubId pulumi.StringPtrInput
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group under which the Service Bus Queue has been created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The subscription ID for the endpoint.
//
// > **Note:** When `subscriptionId` isn't specified it will be set to the subscription ID of the IoT Hub resource.
SubscriptionId pulumi.StringPtrInput
}
func (EndpointServicebusQueueState) ElementType() reflect.Type {
return reflect.TypeOf((*endpointServicebusQueueState)(nil)).Elem()
}
type endpointServicebusQueueArgs struct {
// Type used to authenticate against the Service Bus Queue endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
AuthenticationType *string `pulumi:"authenticationType"`
// The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`.
ConnectionString *string `pulumi:"connectionString"`
// URI of the Service Bus endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EndpointUri *string `pulumi:"endpointUri"`
// Name of the Service Bus Queue. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EntityPath *string `pulumi:"entityPath"`
// ID of the User Managed Identity used to authenticate against the Service Bus Queue endpoint.
//
// > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the Iot Hub. If not specified when `authenticationType` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
IdentityId *string `pulumi:"identityId"`
// The IoTHub ID for the endpoint. Changing this forces a new resource to be created.
IothubId string `pulumi:"iothubId"`
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group under which the Service Bus Queue has been created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The subscription ID for the endpoint.
//
// > **Note:** When `subscriptionId` isn't specified it will be set to the subscription ID of the IoT Hub resource.
SubscriptionId *string `pulumi:"subscriptionId"`
}
// The set of arguments for constructing a EndpointServicebusQueue resource.
type EndpointServicebusQueueArgs struct {
// Type used to authenticate against the Service Bus Queue endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
AuthenticationType pulumi.StringPtrInput
// The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`.
ConnectionString pulumi.StringPtrInput
// URI of the Service Bus endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EndpointUri pulumi.StringPtrInput
// Name of the Service Bus Queue. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
EntityPath pulumi.StringPtrInput
// ID of the User Managed Identity used to authenticate against the Service Bus Queue endpoint.
//
// > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the Iot Hub. If not specified when `authenticationType` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
IdentityId pulumi.StringPtrInput
// The IoTHub ID for the endpoint. Changing this forces a new resource to be created.
IothubId pulumi.StringInput
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group under which the Service Bus Queue has been created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The subscription ID for the endpoint.
//
// > **Note:** When `subscriptionId` isn't specified it will be set to the subscription ID of the IoT Hub resource.
SubscriptionId pulumi.StringPtrInput
}
func (EndpointServicebusQueueArgs) ElementType() reflect.Type {
return reflect.TypeOf((*endpointServicebusQueueArgs)(nil)).Elem()
}
type EndpointServicebusQueueInput interface {
pulumi.Input
ToEndpointServicebusQueueOutput() EndpointServicebusQueueOutput
ToEndpointServicebusQueueOutputWithContext(ctx context.Context) EndpointServicebusQueueOutput
}
func (*EndpointServicebusQueue) ElementType() reflect.Type {
return reflect.TypeOf((**EndpointServicebusQueue)(nil)).Elem()
}
func (i *EndpointServicebusQueue) ToEndpointServicebusQueueOutput() EndpointServicebusQueueOutput {
return i.ToEndpointServicebusQueueOutputWithContext(context.Background())
}
func (i *EndpointServicebusQueue) ToEndpointServicebusQueueOutputWithContext(ctx context.Context) EndpointServicebusQueueOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointServicebusQueueOutput)
}
// EndpointServicebusQueueArrayInput is an input type that accepts EndpointServicebusQueueArray and EndpointServicebusQueueArrayOutput values.
// You can construct a concrete instance of `EndpointServicebusQueueArrayInput` via:
//
// EndpointServicebusQueueArray{ EndpointServicebusQueueArgs{...} }
type EndpointServicebusQueueArrayInput interface {
pulumi.Input
ToEndpointServicebusQueueArrayOutput() EndpointServicebusQueueArrayOutput
ToEndpointServicebusQueueArrayOutputWithContext(context.Context) EndpointServicebusQueueArrayOutput
}
type EndpointServicebusQueueArray []EndpointServicebusQueueInput
func (EndpointServicebusQueueArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EndpointServicebusQueue)(nil)).Elem()
}
func (i EndpointServicebusQueueArray) ToEndpointServicebusQueueArrayOutput() EndpointServicebusQueueArrayOutput {
return i.ToEndpointServicebusQueueArrayOutputWithContext(context.Background())
}
func (i EndpointServicebusQueueArray) ToEndpointServicebusQueueArrayOutputWithContext(ctx context.Context) EndpointServicebusQueueArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointServicebusQueueArrayOutput)
}
// EndpointServicebusQueueMapInput is an input type that accepts EndpointServicebusQueueMap and EndpointServicebusQueueMapOutput values.
// You can construct a concrete instance of `EndpointServicebusQueueMapInput` via:
//
// EndpointServicebusQueueMap{ "key": EndpointServicebusQueueArgs{...} }
type EndpointServicebusQueueMapInput interface {
pulumi.Input
ToEndpointServicebusQueueMapOutput() EndpointServicebusQueueMapOutput
ToEndpointServicebusQueueMapOutputWithContext(context.Context) EndpointServicebusQueueMapOutput
}
type EndpointServicebusQueueMap map[string]EndpointServicebusQueueInput
func (EndpointServicebusQueueMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EndpointServicebusQueue)(nil)).Elem()
}
func (i EndpointServicebusQueueMap) ToEndpointServicebusQueueMapOutput() EndpointServicebusQueueMapOutput {
return i.ToEndpointServicebusQueueMapOutputWithContext(context.Background())
}
func (i EndpointServicebusQueueMap) ToEndpointServicebusQueueMapOutputWithContext(ctx context.Context) EndpointServicebusQueueMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EndpointServicebusQueueMapOutput)
}
type EndpointServicebusQueueOutput struct{ *pulumi.OutputState }
func (EndpointServicebusQueueOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EndpointServicebusQueue)(nil)).Elem()
}
func (o EndpointServicebusQueueOutput) ToEndpointServicebusQueueOutput() EndpointServicebusQueueOutput {
return o
}
func (o EndpointServicebusQueueOutput) ToEndpointServicebusQueueOutputWithContext(ctx context.Context) EndpointServicebusQueueOutput {
return o
}
// Type used to authenticate against the Service Bus Queue endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`.
func (o EndpointServicebusQueueOutput) AuthenticationType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EndpointServicebusQueue) pulumi.StringPtrOutput { return v.AuthenticationType }).(pulumi.StringPtrOutput)
}
// The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`.
func (o EndpointServicebusQueueOutput) ConnectionString() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EndpointServicebusQueue) pulumi.StringPtrOutput { return v.ConnectionString }).(pulumi.StringPtrOutput)
}
// URI of the Service Bus endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
func (o EndpointServicebusQueueOutput) EndpointUri() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EndpointServicebusQueue) pulumi.StringPtrOutput { return v.EndpointUri }).(pulumi.StringPtrOutput)
}
// Name of the Service Bus Queue. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`.
func (o EndpointServicebusQueueOutput) EntityPath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EndpointServicebusQueue) pulumi.StringPtrOutput { return v.EntityPath }).(pulumi.StringPtrOutput)
}
// ID of the User Managed Identity used to authenticate against the Service Bus Queue endpoint.
//
// > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the Iot Hub. If not specified when `authenticationType` is `identityBased`, System Assigned Managed Identity of the Iot Hub will be used.
func (o EndpointServicebusQueueOutput) IdentityId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EndpointServicebusQueue) pulumi.StringPtrOutput { return v.IdentityId }).(pulumi.StringPtrOutput)
}
// The IoTHub ID for the endpoint. Changing this forces a new resource to be created.
func (o EndpointServicebusQueueOutput) IothubId() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointServicebusQueue) pulumi.StringOutput { return v.IothubId }).(pulumi.StringOutput)
}
// The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Changing this forces a new resource to be created.
func (o EndpointServicebusQueueOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointServicebusQueue) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group under which the Service Bus Queue has been created. Changing this forces a new resource to be created.
func (o EndpointServicebusQueueOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointServicebusQueue) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The subscription ID for the endpoint.
//
// > **Note:** When `subscriptionId` isn't specified it will be set to the subscription ID of the IoT Hub resource.
func (o EndpointServicebusQueueOutput) SubscriptionId() pulumi.StringOutput {
return o.ApplyT(func(v *EndpointServicebusQueue) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput)
}
type EndpointServicebusQueueArrayOutput struct{ *pulumi.OutputState }
func (EndpointServicebusQueueArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EndpointServicebusQueue)(nil)).Elem()
}
func (o EndpointServicebusQueueArrayOutput) ToEndpointServicebusQueueArrayOutput() EndpointServicebusQueueArrayOutput {
return o
}
func (o EndpointServicebusQueueArrayOutput) ToEndpointServicebusQueueArrayOutputWithContext(ctx context.Context) EndpointServicebusQueueArrayOutput {
return o
}
func (o EndpointServicebusQueueArrayOutput) Index(i pulumi.IntInput) EndpointServicebusQueueOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EndpointServicebusQueue {
return vs[0].([]*EndpointServicebusQueue)[vs[1].(int)]
}).(EndpointServicebusQueueOutput)
}
type EndpointServicebusQueueMapOutput struct{ *pulumi.OutputState }
func (EndpointServicebusQueueMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EndpointServicebusQueue)(nil)).Elem()
}
func (o EndpointServicebusQueueMapOutput) ToEndpointServicebusQueueMapOutput() EndpointServicebusQueueMapOutput {
return o
}
func (o EndpointServicebusQueueMapOutput) ToEndpointServicebusQueueMapOutputWithContext(ctx context.Context) EndpointServicebusQueueMapOutput {
return o
}
func (o EndpointServicebusQueueMapOutput) MapIndex(k pulumi.StringInput) EndpointServicebusQueueOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EndpointServicebusQueue {
return vs[0].(map[string]*EndpointServicebusQueue)[vs[1].(string)]
}).(EndpointServicebusQueueOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EndpointServicebusQueueInput)(nil)).Elem(), &EndpointServicebusQueue{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointServicebusQueueArrayInput)(nil)).Elem(), EndpointServicebusQueueArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EndpointServicebusQueueMapInput)(nil)).Elem(), EndpointServicebusQueueMap{})
pulumi.RegisterOutputType(EndpointServicebusQueueOutput{})
pulumi.RegisterOutputType(EndpointServicebusQueueArrayOutput{})
pulumi.RegisterOutputType(EndpointServicebusQueueMapOutput{})
}
| 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/iot/route.go | sdk/go/azure/iot/route.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 iot
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an IotHub Route
//
// > **Note:** Routes can be defined either directly on the `iot.IoTHub` resource, or using the `iot.Route` resource - but the two cannot be used together. If both are used against the same IoTHub, spurious changes will occur.
//
// ## 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/iot"
// "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("examplestorageaccount"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("example"),
// StorageAccountName: exampleAccount.Name,
// ContainerAccessType: pulumi.String("private"),
// })
// if err != nil {
// return err
// }
// exampleIoTHub, err := iot.NewIoTHub(ctx, "example", &iot.IoTHubArgs{
// Name: pulumi.String("exampleIothub"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: &iot.IoTHubSkuArgs{
// Name: pulumi.String("S1"),
// Capacity: pulumi.Int(1),
// },
// Tags: pulumi.StringMap{
// "purpose": pulumi.String("testing"),
// },
// })
// if err != nil {
// return err
// }
// exampleEndpointStorageContainer, err := iot.NewEndpointStorageContainer(ctx, "example", &iot.EndpointStorageContainerArgs{
// ResourceGroupName: example.Name,
// IothubId: exampleIoTHub.ID(),
// Name: pulumi.String("example"),
// ConnectionString: exampleAccount.PrimaryBlobConnectionString,
// BatchFrequencyInSeconds: pulumi.Int(60),
// MaxChunkSizeInBytes: pulumi.Int(10485760),
// ContainerName: exampleContainer.Name,
// Encoding: pulumi.String("Avro"),
// FileNameFormat: pulumi.String("{iothub}/{partition}_{YYYY}_{MM}_{DD}_{HH}_{mm}"),
// })
// if err != nil {
// return err
// }
// _, err = iot.NewRoute(ctx, "example", &iot.RouteArgs{
// ResourceGroupName: example.Name,
// IothubName: exampleIoTHub.Name,
// Name: pulumi.String("example"),
// Source: pulumi.String("DeviceMessages"),
// Condition: pulumi.String("true"),
// EndpointNames: exampleEndpointStorageContainer.Name,
// Enabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// IoTHub Route can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:iot/route:Route route1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/routes/route1
// ```
type Route struct {
pulumi.CustomResourceState
// The condition that is evaluated to apply the routing rule. For grammar, see: <https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language>. Defaults to `true`.
Condition pulumi.StringPtrOutput `pulumi:"condition"`
// Specifies whether a route is enabled.
Enabled pulumi.BoolOutput `pulumi:"enabled"`
// The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed.
EndpointNames pulumi.StringOutput `pulumi:"endpointNames"`
// The name of the IoTHub to which this Route belongs. Changing this forces a new resource to be created.
IothubName pulumi.StringOutput `pulumi:"iothubName"`
// The name of the route. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group under which the IotHub Route resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The source that the routing rule is to be applied to. Possible values include: `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents`, `DeviceLifecycleEvents`, `DeviceMessages`, `DigitalTwinChangeEvents`, `Invalid`, `TwinChangeEvents`.
Source pulumi.StringOutput `pulumi:"source"`
}
// NewRoute registers a new resource with the given unique name, arguments, and options.
func NewRoute(ctx *pulumi.Context,
name string, args *RouteArgs, opts ...pulumi.ResourceOption) (*Route, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Enabled == nil {
return nil, errors.New("invalid value for required argument 'Enabled'")
}
if args.EndpointNames == nil {
return nil, errors.New("invalid value for required argument 'EndpointNames'")
}
if args.IothubName == nil {
return nil, errors.New("invalid value for required argument 'IothubName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Source == nil {
return nil, errors.New("invalid value for required argument 'Source'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Route
err := ctx.RegisterResource("azure:iot/route:Route", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRoute gets an existing Route 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 GetRoute(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RouteState, opts ...pulumi.ResourceOption) (*Route, error) {
var resource Route
err := ctx.ReadResource("azure:iot/route:Route", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Route resources.
type routeState struct {
// The condition that is evaluated to apply the routing rule. For grammar, see: <https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language>. Defaults to `true`.
Condition *string `pulumi:"condition"`
// Specifies whether a route is enabled.
Enabled *bool `pulumi:"enabled"`
// The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed.
EndpointNames *string `pulumi:"endpointNames"`
// The name of the IoTHub to which this Route belongs. Changing this forces a new resource to be created.
IothubName *string `pulumi:"iothubName"`
// The name of the route. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group under which the IotHub Route resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The source that the routing rule is to be applied to. Possible values include: `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents`, `DeviceLifecycleEvents`, `DeviceMessages`, `DigitalTwinChangeEvents`, `Invalid`, `TwinChangeEvents`.
Source *string `pulumi:"source"`
}
type RouteState struct {
// The condition that is evaluated to apply the routing rule. For grammar, see: <https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language>. Defaults to `true`.
Condition pulumi.StringPtrInput
// Specifies whether a route is enabled.
Enabled pulumi.BoolPtrInput
// The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed.
EndpointNames pulumi.StringPtrInput
// The name of the IoTHub to which this Route belongs. Changing this forces a new resource to be created.
IothubName pulumi.StringPtrInput
// The name of the route. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group under which the IotHub Route resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The source that the routing rule is to be applied to. Possible values include: `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents`, `DeviceLifecycleEvents`, `DeviceMessages`, `DigitalTwinChangeEvents`, `Invalid`, `TwinChangeEvents`.
Source pulumi.StringPtrInput
}
func (RouteState) ElementType() reflect.Type {
return reflect.TypeOf((*routeState)(nil)).Elem()
}
type routeArgs struct {
// The condition that is evaluated to apply the routing rule. For grammar, see: <https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language>. Defaults to `true`.
Condition *string `pulumi:"condition"`
// Specifies whether a route is enabled.
Enabled bool `pulumi:"enabled"`
// The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed.
EndpointNames string `pulumi:"endpointNames"`
// The name of the IoTHub to which this Route belongs. Changing this forces a new resource to be created.
IothubName string `pulumi:"iothubName"`
// The name of the route. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group under which the IotHub Route resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The source that the routing rule is to be applied to. Possible values include: `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents`, `DeviceLifecycleEvents`, `DeviceMessages`, `DigitalTwinChangeEvents`, `Invalid`, `TwinChangeEvents`.
Source string `pulumi:"source"`
}
// The set of arguments for constructing a Route resource.
type RouteArgs struct {
// The condition that is evaluated to apply the routing rule. For grammar, see: <https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language>. Defaults to `true`.
Condition pulumi.StringPtrInput
// Specifies whether a route is enabled.
Enabled pulumi.BoolInput
// The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed.
EndpointNames pulumi.StringInput
// The name of the IoTHub to which this Route belongs. Changing this forces a new resource to be created.
IothubName pulumi.StringInput
// The name of the route. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group under which the IotHub Route resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The source that the routing rule is to be applied to. Possible values include: `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents`, `DeviceLifecycleEvents`, `DeviceMessages`, `DigitalTwinChangeEvents`, `Invalid`, `TwinChangeEvents`.
Source pulumi.StringInput
}
func (RouteArgs) ElementType() reflect.Type {
return reflect.TypeOf((*routeArgs)(nil)).Elem()
}
type RouteInput interface {
pulumi.Input
ToRouteOutput() RouteOutput
ToRouteOutputWithContext(ctx context.Context) RouteOutput
}
func (*Route) ElementType() reflect.Type {
return reflect.TypeOf((**Route)(nil)).Elem()
}
func (i *Route) ToRouteOutput() RouteOutput {
return i.ToRouteOutputWithContext(context.Background())
}
func (i *Route) ToRouteOutputWithContext(ctx context.Context) RouteOutput {
return pulumi.ToOutputWithContext(ctx, i).(RouteOutput)
}
// RouteArrayInput is an input type that accepts RouteArray and RouteArrayOutput values.
// You can construct a concrete instance of `RouteArrayInput` via:
//
// RouteArray{ RouteArgs{...} }
type RouteArrayInput interface {
pulumi.Input
ToRouteArrayOutput() RouteArrayOutput
ToRouteArrayOutputWithContext(context.Context) RouteArrayOutput
}
type RouteArray []RouteInput
func (RouteArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Route)(nil)).Elem()
}
func (i RouteArray) ToRouteArrayOutput() RouteArrayOutput {
return i.ToRouteArrayOutputWithContext(context.Background())
}
func (i RouteArray) ToRouteArrayOutputWithContext(ctx context.Context) RouteArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(RouteArrayOutput)
}
// RouteMapInput is an input type that accepts RouteMap and RouteMapOutput values.
// You can construct a concrete instance of `RouteMapInput` via:
//
// RouteMap{ "key": RouteArgs{...} }
type RouteMapInput interface {
pulumi.Input
ToRouteMapOutput() RouteMapOutput
ToRouteMapOutputWithContext(context.Context) RouteMapOutput
}
type RouteMap map[string]RouteInput
func (RouteMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Route)(nil)).Elem()
}
func (i RouteMap) ToRouteMapOutput() RouteMapOutput {
return i.ToRouteMapOutputWithContext(context.Background())
}
func (i RouteMap) ToRouteMapOutputWithContext(ctx context.Context) RouteMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(RouteMapOutput)
}
type RouteOutput struct{ *pulumi.OutputState }
func (RouteOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Route)(nil)).Elem()
}
func (o RouteOutput) ToRouteOutput() RouteOutput {
return o
}
func (o RouteOutput) ToRouteOutputWithContext(ctx context.Context) RouteOutput {
return o
}
// The condition that is evaluated to apply the routing rule. For grammar, see: <https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language>. Defaults to `true`.
func (o RouteOutput) Condition() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.Condition }).(pulumi.StringPtrOutput)
}
// Specifies whether a route is enabled.
func (o RouteOutput) Enabled() pulumi.BoolOutput {
return o.ApplyT(func(v *Route) pulumi.BoolOutput { return v.Enabled }).(pulumi.BoolOutput)
}
// The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed.
func (o RouteOutput) EndpointNames() pulumi.StringOutput {
return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.EndpointNames }).(pulumi.StringOutput)
}
// The name of the IoTHub to which this Route belongs. Changing this forces a new resource to be created.
func (o RouteOutput) IothubName() pulumi.StringOutput {
return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.IothubName }).(pulumi.StringOutput)
}
// The name of the route. Changing this forces a new resource to be created.
func (o RouteOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group under which the IotHub Route resource has to be created. Changing this forces a new resource to be created.
func (o RouteOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The source that the routing rule is to be applied to. Possible values include: `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents`, `DeviceLifecycleEvents`, `DeviceMessages`, `DigitalTwinChangeEvents`, `Invalid`, `TwinChangeEvents`.
func (o RouteOutput) Source() pulumi.StringOutput {
return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.Source }).(pulumi.StringOutput)
}
type RouteArrayOutput struct{ *pulumi.OutputState }
func (RouteArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Route)(nil)).Elem()
}
func (o RouteArrayOutput) ToRouteArrayOutput() RouteArrayOutput {
return o
}
func (o RouteArrayOutput) ToRouteArrayOutputWithContext(ctx context.Context) RouteArrayOutput {
return o
}
func (o RouteArrayOutput) Index(i pulumi.IntInput) RouteOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Route {
return vs[0].([]*Route)[vs[1].(int)]
}).(RouteOutput)
}
type RouteMapOutput struct{ *pulumi.OutputState }
func (RouteMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Route)(nil)).Elem()
}
func (o RouteMapOutput) ToRouteMapOutput() RouteMapOutput {
return o
}
func (o RouteMapOutput) ToRouteMapOutputWithContext(ctx context.Context) RouteMapOutput {
return o
}
func (o RouteMapOutput) MapIndex(k pulumi.StringInput) RouteOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Route {
return vs[0].(map[string]*Route)[vs[1].(string)]
}).(RouteOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RouteInput)(nil)).Elem(), &Route{})
pulumi.RegisterInputType(reflect.TypeOf((*RouteArrayInput)(nil)).Elem(), RouteArray{})
pulumi.RegisterInputType(reflect.TypeOf((*RouteMapInput)(nil)).Elem(), RouteMap{})
pulumi.RegisterOutputType(RouteOutput{})
pulumi.RegisterOutputType(RouteArrayOutput{})
pulumi.RegisterOutputType(RouteMapOutput{})
}
| 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/paloalto/localRulestackCertificate.go | sdk/go/azure/paloalto/localRulestackCertificate.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 paloalto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Palo Alto Networks Rulestack Certificate.
//
// ## 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/paloalto"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("rg-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleLocalRulestack, err := paloalto.NewLocalRulestack(ctx, "example", &paloalto.LocalRulestackArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// _, err = paloalto.NewLocalRulestackCertificate(ctx, "example", &paloalto.LocalRulestackCertificateArgs{
// Name: pulumi.String("example"),
// RulestackId: exampleLocalRulestack.ID(),
// SelfSigned: 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:
//
// * `PaloAltoNetworks.Cloudngfw` - 2022-08-29
//
// ## Import
//
// Palo Alto Networks Rulestack Certificates can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:paloalto/localRulestackCertificate:LocalRulestackCertificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/myLocalRulestack/certificates/myCertificate
// ```
type LocalRulestackCertificate struct {
pulumi.CustomResourceState
// The comment for Audit purposes.
AuditComment pulumi.StringPtrOutput `pulumi:"auditComment"`
// The description for the Certificate.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The `versionlesId` of the Key Vault Certificate to use. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
KeyVaultCertificateId pulumi.StringPtrOutput `pulumi:"keyVaultCertificateId"`
// The name which should be used for this Palo Alto Networks Rulestack Certificate.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the TODO. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
RulestackId pulumi.StringOutput `pulumi:"rulestackId"`
// Should a Self Signed Certificate be used. Defaults to `false`. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
//
// > **Note:** One and only one of `selfSigned` or `keyVaultCertificateId` must be specified.
SelfSigned pulumi.BoolPtrOutput `pulumi:"selfSigned"`
}
// NewLocalRulestackCertificate registers a new resource with the given unique name, arguments, and options.
func NewLocalRulestackCertificate(ctx *pulumi.Context,
name string, args *LocalRulestackCertificateArgs, opts ...pulumi.ResourceOption) (*LocalRulestackCertificate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.RulestackId == nil {
return nil, errors.New("invalid value for required argument 'RulestackId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource LocalRulestackCertificate
err := ctx.RegisterResource("azure:paloalto/localRulestackCertificate:LocalRulestackCertificate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLocalRulestackCertificate gets an existing LocalRulestackCertificate 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 GetLocalRulestackCertificate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LocalRulestackCertificateState, opts ...pulumi.ResourceOption) (*LocalRulestackCertificate, error) {
var resource LocalRulestackCertificate
err := ctx.ReadResource("azure:paloalto/localRulestackCertificate:LocalRulestackCertificate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LocalRulestackCertificate resources.
type localRulestackCertificateState struct {
// The comment for Audit purposes.
AuditComment *string `pulumi:"auditComment"`
// The description for the Certificate.
Description *string `pulumi:"description"`
// The `versionlesId` of the Key Vault Certificate to use. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
KeyVaultCertificateId *string `pulumi:"keyVaultCertificateId"`
// The name which should be used for this Palo Alto Networks Rulestack Certificate.
Name *string `pulumi:"name"`
// The ID of the TODO. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
RulestackId *string `pulumi:"rulestackId"`
// Should a Self Signed Certificate be used. Defaults to `false`. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
//
// > **Note:** One and only one of `selfSigned` or `keyVaultCertificateId` must be specified.
SelfSigned *bool `pulumi:"selfSigned"`
}
type LocalRulestackCertificateState struct {
// The comment for Audit purposes.
AuditComment pulumi.StringPtrInput
// The description for the Certificate.
Description pulumi.StringPtrInput
// The `versionlesId` of the Key Vault Certificate to use. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
KeyVaultCertificateId pulumi.StringPtrInput
// The name which should be used for this Palo Alto Networks Rulestack Certificate.
Name pulumi.StringPtrInput
// The ID of the TODO. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
RulestackId pulumi.StringPtrInput
// Should a Self Signed Certificate be used. Defaults to `false`. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
//
// > **Note:** One and only one of `selfSigned` or `keyVaultCertificateId` must be specified.
SelfSigned pulumi.BoolPtrInput
}
func (LocalRulestackCertificateState) ElementType() reflect.Type {
return reflect.TypeOf((*localRulestackCertificateState)(nil)).Elem()
}
type localRulestackCertificateArgs struct {
// The comment for Audit purposes.
AuditComment *string `pulumi:"auditComment"`
// The description for the Certificate.
Description *string `pulumi:"description"`
// The `versionlesId` of the Key Vault Certificate to use. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
KeyVaultCertificateId *string `pulumi:"keyVaultCertificateId"`
// The name which should be used for this Palo Alto Networks Rulestack Certificate.
Name *string `pulumi:"name"`
// The ID of the TODO. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
RulestackId string `pulumi:"rulestackId"`
// Should a Self Signed Certificate be used. Defaults to `false`. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
//
// > **Note:** One and only one of `selfSigned` or `keyVaultCertificateId` must be specified.
SelfSigned *bool `pulumi:"selfSigned"`
}
// The set of arguments for constructing a LocalRulestackCertificate resource.
type LocalRulestackCertificateArgs struct {
// The comment for Audit purposes.
AuditComment pulumi.StringPtrInput
// The description for the Certificate.
Description pulumi.StringPtrInput
// The `versionlesId` of the Key Vault Certificate to use. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
KeyVaultCertificateId pulumi.StringPtrInput
// The name which should be used for this Palo Alto Networks Rulestack Certificate.
Name pulumi.StringPtrInput
// The ID of the TODO. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
RulestackId pulumi.StringInput
// Should a Self Signed Certificate be used. Defaults to `false`. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
//
// > **Note:** One and only one of `selfSigned` or `keyVaultCertificateId` must be specified.
SelfSigned pulumi.BoolPtrInput
}
func (LocalRulestackCertificateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*localRulestackCertificateArgs)(nil)).Elem()
}
type LocalRulestackCertificateInput interface {
pulumi.Input
ToLocalRulestackCertificateOutput() LocalRulestackCertificateOutput
ToLocalRulestackCertificateOutputWithContext(ctx context.Context) LocalRulestackCertificateOutput
}
func (*LocalRulestackCertificate) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackCertificate)(nil)).Elem()
}
func (i *LocalRulestackCertificate) ToLocalRulestackCertificateOutput() LocalRulestackCertificateOutput {
return i.ToLocalRulestackCertificateOutputWithContext(context.Background())
}
func (i *LocalRulestackCertificate) ToLocalRulestackCertificateOutputWithContext(ctx context.Context) LocalRulestackCertificateOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackCertificateOutput)
}
// LocalRulestackCertificateArrayInput is an input type that accepts LocalRulestackCertificateArray and LocalRulestackCertificateArrayOutput values.
// You can construct a concrete instance of `LocalRulestackCertificateArrayInput` via:
//
// LocalRulestackCertificateArray{ LocalRulestackCertificateArgs{...} }
type LocalRulestackCertificateArrayInput interface {
pulumi.Input
ToLocalRulestackCertificateArrayOutput() LocalRulestackCertificateArrayOutput
ToLocalRulestackCertificateArrayOutputWithContext(context.Context) LocalRulestackCertificateArrayOutput
}
type LocalRulestackCertificateArray []LocalRulestackCertificateInput
func (LocalRulestackCertificateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalRulestackCertificate)(nil)).Elem()
}
func (i LocalRulestackCertificateArray) ToLocalRulestackCertificateArrayOutput() LocalRulestackCertificateArrayOutput {
return i.ToLocalRulestackCertificateArrayOutputWithContext(context.Background())
}
func (i LocalRulestackCertificateArray) ToLocalRulestackCertificateArrayOutputWithContext(ctx context.Context) LocalRulestackCertificateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackCertificateArrayOutput)
}
// LocalRulestackCertificateMapInput is an input type that accepts LocalRulestackCertificateMap and LocalRulestackCertificateMapOutput values.
// You can construct a concrete instance of `LocalRulestackCertificateMapInput` via:
//
// LocalRulestackCertificateMap{ "key": LocalRulestackCertificateArgs{...} }
type LocalRulestackCertificateMapInput interface {
pulumi.Input
ToLocalRulestackCertificateMapOutput() LocalRulestackCertificateMapOutput
ToLocalRulestackCertificateMapOutputWithContext(context.Context) LocalRulestackCertificateMapOutput
}
type LocalRulestackCertificateMap map[string]LocalRulestackCertificateInput
func (LocalRulestackCertificateMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalRulestackCertificate)(nil)).Elem()
}
func (i LocalRulestackCertificateMap) ToLocalRulestackCertificateMapOutput() LocalRulestackCertificateMapOutput {
return i.ToLocalRulestackCertificateMapOutputWithContext(context.Background())
}
func (i LocalRulestackCertificateMap) ToLocalRulestackCertificateMapOutputWithContext(ctx context.Context) LocalRulestackCertificateMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackCertificateMapOutput)
}
type LocalRulestackCertificateOutput struct{ *pulumi.OutputState }
func (LocalRulestackCertificateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackCertificate)(nil)).Elem()
}
func (o LocalRulestackCertificateOutput) ToLocalRulestackCertificateOutput() LocalRulestackCertificateOutput {
return o
}
func (o LocalRulestackCertificateOutput) ToLocalRulestackCertificateOutputWithContext(ctx context.Context) LocalRulestackCertificateOutput {
return o
}
// The comment for Audit purposes.
func (o LocalRulestackCertificateOutput) AuditComment() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestackCertificate) pulumi.StringPtrOutput { return v.AuditComment }).(pulumi.StringPtrOutput)
}
// The description for the Certificate.
func (o LocalRulestackCertificateOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestackCertificate) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The `versionlesId` of the Key Vault Certificate to use. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
func (o LocalRulestackCertificateOutput) KeyVaultCertificateId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestackCertificate) pulumi.StringPtrOutput { return v.KeyVaultCertificateId }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Palo Alto Networks Rulestack Certificate.
func (o LocalRulestackCertificateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *LocalRulestackCertificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the TODO. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
func (o LocalRulestackCertificateOutput) RulestackId() pulumi.StringOutput {
return o.ApplyT(func(v *LocalRulestackCertificate) pulumi.StringOutput { return v.RulestackId }).(pulumi.StringOutput)
}
// Should a Self Signed Certificate be used. Defaults to `false`. Changing this forces a new Palo Alto Networks Rulestack Certificate to be created.
//
// > **Note:** One and only one of `selfSigned` or `keyVaultCertificateId` must be specified.
func (o LocalRulestackCertificateOutput) SelfSigned() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LocalRulestackCertificate) pulumi.BoolPtrOutput { return v.SelfSigned }).(pulumi.BoolPtrOutput)
}
type LocalRulestackCertificateArrayOutput struct{ *pulumi.OutputState }
func (LocalRulestackCertificateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalRulestackCertificate)(nil)).Elem()
}
func (o LocalRulestackCertificateArrayOutput) ToLocalRulestackCertificateArrayOutput() LocalRulestackCertificateArrayOutput {
return o
}
func (o LocalRulestackCertificateArrayOutput) ToLocalRulestackCertificateArrayOutputWithContext(ctx context.Context) LocalRulestackCertificateArrayOutput {
return o
}
func (o LocalRulestackCertificateArrayOutput) Index(i pulumi.IntInput) LocalRulestackCertificateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LocalRulestackCertificate {
return vs[0].([]*LocalRulestackCertificate)[vs[1].(int)]
}).(LocalRulestackCertificateOutput)
}
type LocalRulestackCertificateMapOutput struct{ *pulumi.OutputState }
func (LocalRulestackCertificateMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalRulestackCertificate)(nil)).Elem()
}
func (o LocalRulestackCertificateMapOutput) ToLocalRulestackCertificateMapOutput() LocalRulestackCertificateMapOutput {
return o
}
func (o LocalRulestackCertificateMapOutput) ToLocalRulestackCertificateMapOutputWithContext(ctx context.Context) LocalRulestackCertificateMapOutput {
return o
}
func (o LocalRulestackCertificateMapOutput) MapIndex(k pulumi.StringInput) LocalRulestackCertificateOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LocalRulestackCertificate {
return vs[0].(map[string]*LocalRulestackCertificate)[vs[1].(string)]
}).(LocalRulestackCertificateOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackCertificateInput)(nil)).Elem(), &LocalRulestackCertificate{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackCertificateArrayInput)(nil)).Elem(), LocalRulestackCertificateArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackCertificateMapInput)(nil)).Elem(), LocalRulestackCertificateMap{})
pulumi.RegisterOutputType(LocalRulestackCertificateOutput{})
pulumi.RegisterOutputType(LocalRulestackCertificateArrayOutput{})
pulumi.RegisterOutputType(LocalRulestackCertificateMapOutput{})
}
| 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/paloalto/init.go | sdk/go/azure/paloalto/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 paloalto
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:paloalto/localRulestack:LocalRulestack":
r = &LocalRulestack{}
case "azure:paloalto/localRulestackCertificate:LocalRulestackCertificate":
r = &LocalRulestackCertificate{}
case "azure:paloalto/localRulestackFqdnList:LocalRulestackFqdnList":
r = &LocalRulestackFqdnList{}
case "azure:paloalto/localRulestackOutboundTrustCertificateAssociation:LocalRulestackOutboundTrustCertificateAssociation":
r = &LocalRulestackOutboundTrustCertificateAssociation{}
case "azure:paloalto/localRulestackOutboundUntrustCertificateAssociation:LocalRulestackOutboundUntrustCertificateAssociation":
r = &LocalRulestackOutboundUntrustCertificateAssociation{}
case "azure:paloalto/localRulestackPrefixList:LocalRulestackPrefixList":
r = &LocalRulestackPrefixList{}
case "azure:paloalto/localRulestackRule:LocalRulestackRule":
r = &LocalRulestackRule{}
case "azure:paloalto/nextGenerationFirewallVirtualHubLocalRulestack:NextGenerationFirewallVirtualHubLocalRulestack":
r = &NextGenerationFirewallVirtualHubLocalRulestack{}
case "azure:paloalto/nextGenerationFirewallVirtualHubPanorama:NextGenerationFirewallVirtualHubPanorama":
r = &NextGenerationFirewallVirtualHubPanorama{}
case "azure:paloalto/nextGenerationFirewallVirtualHubStrataCloudManager:NextGenerationFirewallVirtualHubStrataCloudManager":
r = &NextGenerationFirewallVirtualHubStrataCloudManager{}
case "azure:paloalto/nextGenerationFirewallVirtualNetworkLocalRulestack:NextGenerationFirewallVirtualNetworkLocalRulestack":
r = &NextGenerationFirewallVirtualNetworkLocalRulestack{}
case "azure:paloalto/nextGenerationFirewallVirtualNetworkPanorama:NextGenerationFirewallVirtualNetworkPanorama":
r = &NextGenerationFirewallVirtualNetworkPanorama{}
case "azure:paloalto/nextGenerationFirewallVirtualNetworkStrataCloudManager:NextGenerationFirewallVirtualNetworkStrataCloudManager":
r = &NextGenerationFirewallVirtualNetworkStrataCloudManager{}
case "azure:paloalto/virtualNetworkAppliance:VirtualNetworkAppliance":
r = &VirtualNetworkAppliance{}
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",
"paloalto/localRulestack",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"paloalto/localRulestackCertificate",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"paloalto/localRulestackFqdnList",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"paloalto/localRulestackOutboundTrustCertificateAssociation",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"paloalto/localRulestackOutboundUntrustCertificateAssociation",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"paloalto/localRulestackPrefixList",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"paloalto/localRulestackRule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"paloalto/nextGenerationFirewallVirtualHubLocalRulestack",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"paloalto/nextGenerationFirewallVirtualHubPanorama",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"paloalto/nextGenerationFirewallVirtualHubStrataCloudManager",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"paloalto/nextGenerationFirewallVirtualNetworkLocalRulestack",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"paloalto/nextGenerationFirewallVirtualNetworkPanorama",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"paloalto/nextGenerationFirewallVirtualNetworkStrataCloudManager",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"paloalto/virtualNetworkAppliance",
&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/paloalto/pulumiTypes.go | sdk/go/azure/paloalto/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 paloalto
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 LocalRulestackRuleCategory struct {
// Specifies a list of URL categories to match. Possible values include `abortion`, `abused-drugs`, `adult`, `alcohol-and-tobacco`, `auctions`, `business-and-economy`, `command-and-control`, `computer-and-internet-info`, `content-delivery-networks`, `copyright-infringement`, `cryptocurrency`, `dating`, `dynamic-dns`, `educational-institutions`, `entertainment-and-arts`, `extremism`, `financial-services`, `gambling`, `games`, `government`, `grayware`, `hacking`, `health-and-medicine`, `high-risk`, `home-and-garden`, `hunting-and-fishing`, `insufficient-content`, `internet-communications-and-telephony`, `internet-portals`, `job-search`, `legal`, `low-risk`, `malware`, `medium-risk`, `military`, `motor-vehicles`, `music`, `newly-registered-domain`, `news`, `not-resolved`, `nudity`, `online-storage-and-backup`, `parked`, `peer-to-peer`, `personal-sites-and-blogs`, `philosophy-and-political-advocacy`, `phishing`, `private-ip-addresses`, `proxy-avoidance-and-anonymizers`, `questionable`, `real-estate`, `real-time-detection`, `recreation-and-hobbies`, `reference-and-research`, `religion`, `search-engines`, `sex-education`, `shareware-and-freeware`, `shopping`, `social-networking`, `society`, `sports`, `stock-advice-and-tools`, `streaming-media`, `swimsuits-and-intimate-apparel`, `training-and-tools`, `translation`, `travel`, `unknown`, `weapons`, `web-advertisements`, `web-based-email`, and `web-hosting`.
CustomUrls []string `pulumi:"customUrls"`
// Specifies a list of feeds to match.
Feeds []string `pulumi:"feeds"`
}
// LocalRulestackRuleCategoryInput is an input type that accepts LocalRulestackRuleCategoryArgs and LocalRulestackRuleCategoryOutput values.
// You can construct a concrete instance of `LocalRulestackRuleCategoryInput` via:
//
// LocalRulestackRuleCategoryArgs{...}
type LocalRulestackRuleCategoryInput interface {
pulumi.Input
ToLocalRulestackRuleCategoryOutput() LocalRulestackRuleCategoryOutput
ToLocalRulestackRuleCategoryOutputWithContext(context.Context) LocalRulestackRuleCategoryOutput
}
type LocalRulestackRuleCategoryArgs struct {
// Specifies a list of URL categories to match. Possible values include `abortion`, `abused-drugs`, `adult`, `alcohol-and-tobacco`, `auctions`, `business-and-economy`, `command-and-control`, `computer-and-internet-info`, `content-delivery-networks`, `copyright-infringement`, `cryptocurrency`, `dating`, `dynamic-dns`, `educational-institutions`, `entertainment-and-arts`, `extremism`, `financial-services`, `gambling`, `games`, `government`, `grayware`, `hacking`, `health-and-medicine`, `high-risk`, `home-and-garden`, `hunting-and-fishing`, `insufficient-content`, `internet-communications-and-telephony`, `internet-portals`, `job-search`, `legal`, `low-risk`, `malware`, `medium-risk`, `military`, `motor-vehicles`, `music`, `newly-registered-domain`, `news`, `not-resolved`, `nudity`, `online-storage-and-backup`, `parked`, `peer-to-peer`, `personal-sites-and-blogs`, `philosophy-and-political-advocacy`, `phishing`, `private-ip-addresses`, `proxy-avoidance-and-anonymizers`, `questionable`, `real-estate`, `real-time-detection`, `recreation-and-hobbies`, `reference-and-research`, `religion`, `search-engines`, `sex-education`, `shareware-and-freeware`, `shopping`, `social-networking`, `society`, `sports`, `stock-advice-and-tools`, `streaming-media`, `swimsuits-and-intimate-apparel`, `training-and-tools`, `translation`, `travel`, `unknown`, `weapons`, `web-advertisements`, `web-based-email`, and `web-hosting`.
CustomUrls pulumi.StringArrayInput `pulumi:"customUrls"`
// Specifies a list of feeds to match.
Feeds pulumi.StringArrayInput `pulumi:"feeds"`
}
func (LocalRulestackRuleCategoryArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LocalRulestackRuleCategory)(nil)).Elem()
}
func (i LocalRulestackRuleCategoryArgs) ToLocalRulestackRuleCategoryOutput() LocalRulestackRuleCategoryOutput {
return i.ToLocalRulestackRuleCategoryOutputWithContext(context.Background())
}
func (i LocalRulestackRuleCategoryArgs) ToLocalRulestackRuleCategoryOutputWithContext(ctx context.Context) LocalRulestackRuleCategoryOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackRuleCategoryOutput)
}
func (i LocalRulestackRuleCategoryArgs) ToLocalRulestackRuleCategoryPtrOutput() LocalRulestackRuleCategoryPtrOutput {
return i.ToLocalRulestackRuleCategoryPtrOutputWithContext(context.Background())
}
func (i LocalRulestackRuleCategoryArgs) ToLocalRulestackRuleCategoryPtrOutputWithContext(ctx context.Context) LocalRulestackRuleCategoryPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackRuleCategoryOutput).ToLocalRulestackRuleCategoryPtrOutputWithContext(ctx)
}
// LocalRulestackRuleCategoryPtrInput is an input type that accepts LocalRulestackRuleCategoryArgs, LocalRulestackRuleCategoryPtr and LocalRulestackRuleCategoryPtrOutput values.
// You can construct a concrete instance of `LocalRulestackRuleCategoryPtrInput` via:
//
// LocalRulestackRuleCategoryArgs{...}
//
// or:
//
// nil
type LocalRulestackRuleCategoryPtrInput interface {
pulumi.Input
ToLocalRulestackRuleCategoryPtrOutput() LocalRulestackRuleCategoryPtrOutput
ToLocalRulestackRuleCategoryPtrOutputWithContext(context.Context) LocalRulestackRuleCategoryPtrOutput
}
type localRulestackRuleCategoryPtrType LocalRulestackRuleCategoryArgs
func LocalRulestackRuleCategoryPtr(v *LocalRulestackRuleCategoryArgs) LocalRulestackRuleCategoryPtrInput {
return (*localRulestackRuleCategoryPtrType)(v)
}
func (*localRulestackRuleCategoryPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackRuleCategory)(nil)).Elem()
}
func (i *localRulestackRuleCategoryPtrType) ToLocalRulestackRuleCategoryPtrOutput() LocalRulestackRuleCategoryPtrOutput {
return i.ToLocalRulestackRuleCategoryPtrOutputWithContext(context.Background())
}
func (i *localRulestackRuleCategoryPtrType) ToLocalRulestackRuleCategoryPtrOutputWithContext(ctx context.Context) LocalRulestackRuleCategoryPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackRuleCategoryPtrOutput)
}
type LocalRulestackRuleCategoryOutput struct{ *pulumi.OutputState }
func (LocalRulestackRuleCategoryOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LocalRulestackRuleCategory)(nil)).Elem()
}
func (o LocalRulestackRuleCategoryOutput) ToLocalRulestackRuleCategoryOutput() LocalRulestackRuleCategoryOutput {
return o
}
func (o LocalRulestackRuleCategoryOutput) ToLocalRulestackRuleCategoryOutputWithContext(ctx context.Context) LocalRulestackRuleCategoryOutput {
return o
}
func (o LocalRulestackRuleCategoryOutput) ToLocalRulestackRuleCategoryPtrOutput() LocalRulestackRuleCategoryPtrOutput {
return o.ToLocalRulestackRuleCategoryPtrOutputWithContext(context.Background())
}
func (o LocalRulestackRuleCategoryOutput) ToLocalRulestackRuleCategoryPtrOutputWithContext(ctx context.Context) LocalRulestackRuleCategoryPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v LocalRulestackRuleCategory) *LocalRulestackRuleCategory {
return &v
}).(LocalRulestackRuleCategoryPtrOutput)
}
// Specifies a list of URL categories to match. Possible values include `abortion`, `abused-drugs`, `adult`, `alcohol-and-tobacco`, `auctions`, `business-and-economy`, `command-and-control`, `computer-and-internet-info`, `content-delivery-networks`, `copyright-infringement`, `cryptocurrency`, `dating`, `dynamic-dns`, `educational-institutions`, `entertainment-and-arts`, `extremism`, `financial-services`, `gambling`, `games`, `government`, `grayware`, `hacking`, `health-and-medicine`, `high-risk`, `home-and-garden`, `hunting-and-fishing`, `insufficient-content`, `internet-communications-and-telephony`, `internet-portals`, `job-search`, `legal`, `low-risk`, `malware`, `medium-risk`, `military`, `motor-vehicles`, `music`, `newly-registered-domain`, `news`, `not-resolved`, `nudity`, `online-storage-and-backup`, `parked`, `peer-to-peer`, `personal-sites-and-blogs`, `philosophy-and-political-advocacy`, `phishing`, `private-ip-addresses`, `proxy-avoidance-and-anonymizers`, `questionable`, `real-estate`, `real-time-detection`, `recreation-and-hobbies`, `reference-and-research`, `religion`, `search-engines`, `sex-education`, `shareware-and-freeware`, `shopping`, `social-networking`, `society`, `sports`, `stock-advice-and-tools`, `streaming-media`, `swimsuits-and-intimate-apparel`, `training-and-tools`, `translation`, `travel`, `unknown`, `weapons`, `web-advertisements`, `web-based-email`, and `web-hosting`.
func (o LocalRulestackRuleCategoryOutput) CustomUrls() pulumi.StringArrayOutput {
return o.ApplyT(func(v LocalRulestackRuleCategory) []string { return v.CustomUrls }).(pulumi.StringArrayOutput)
}
// Specifies a list of feeds to match.
func (o LocalRulestackRuleCategoryOutput) Feeds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LocalRulestackRuleCategory) []string { return v.Feeds }).(pulumi.StringArrayOutput)
}
type LocalRulestackRuleCategoryPtrOutput struct{ *pulumi.OutputState }
func (LocalRulestackRuleCategoryPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackRuleCategory)(nil)).Elem()
}
func (o LocalRulestackRuleCategoryPtrOutput) ToLocalRulestackRuleCategoryPtrOutput() LocalRulestackRuleCategoryPtrOutput {
return o
}
func (o LocalRulestackRuleCategoryPtrOutput) ToLocalRulestackRuleCategoryPtrOutputWithContext(ctx context.Context) LocalRulestackRuleCategoryPtrOutput {
return o
}
func (o LocalRulestackRuleCategoryPtrOutput) Elem() LocalRulestackRuleCategoryOutput {
return o.ApplyT(func(v *LocalRulestackRuleCategory) LocalRulestackRuleCategory {
if v != nil {
return *v
}
var ret LocalRulestackRuleCategory
return ret
}).(LocalRulestackRuleCategoryOutput)
}
// Specifies a list of URL categories to match. Possible values include `abortion`, `abused-drugs`, `adult`, `alcohol-and-tobacco`, `auctions`, `business-and-economy`, `command-and-control`, `computer-and-internet-info`, `content-delivery-networks`, `copyright-infringement`, `cryptocurrency`, `dating`, `dynamic-dns`, `educational-institutions`, `entertainment-and-arts`, `extremism`, `financial-services`, `gambling`, `games`, `government`, `grayware`, `hacking`, `health-and-medicine`, `high-risk`, `home-and-garden`, `hunting-and-fishing`, `insufficient-content`, `internet-communications-and-telephony`, `internet-portals`, `job-search`, `legal`, `low-risk`, `malware`, `medium-risk`, `military`, `motor-vehicles`, `music`, `newly-registered-domain`, `news`, `not-resolved`, `nudity`, `online-storage-and-backup`, `parked`, `peer-to-peer`, `personal-sites-and-blogs`, `philosophy-and-political-advocacy`, `phishing`, `private-ip-addresses`, `proxy-avoidance-and-anonymizers`, `questionable`, `real-estate`, `real-time-detection`, `recreation-and-hobbies`, `reference-and-research`, `religion`, `search-engines`, `sex-education`, `shareware-and-freeware`, `shopping`, `social-networking`, `society`, `sports`, `stock-advice-and-tools`, `streaming-media`, `swimsuits-and-intimate-apparel`, `training-and-tools`, `translation`, `travel`, `unknown`, `weapons`, `web-advertisements`, `web-based-email`, and `web-hosting`.
func (o LocalRulestackRuleCategoryPtrOutput) CustomUrls() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LocalRulestackRuleCategory) []string {
if v == nil {
return nil
}
return v.CustomUrls
}).(pulumi.StringArrayOutput)
}
// Specifies a list of feeds to match.
func (o LocalRulestackRuleCategoryPtrOutput) Feeds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LocalRulestackRuleCategory) []string {
if v == nil {
return nil
}
return v.Feeds
}).(pulumi.StringArrayOutput)
}
type LocalRulestackRuleDestination struct {
// Specifies a list of CIDR's.
Cidrs []string `pulumi:"cidrs"`
// Specifies a list of ISO3361-1 Alpha-2 Country codes. Possible values include `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CW`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SZ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`
Countries []string `pulumi:"countries"`
// Specifies a list of Feeds.
Feeds []string `pulumi:"feeds"`
// Specifies a list of FQDN lists.
//
// > **Note:** This is a list of names of FQDN Lists configured on the same Local Rulestack as this Rule is being created.
LocalRulestackFqdnListIds []string `pulumi:"localRulestackFqdnListIds"`
// Specifies a list of Prefix Lists.
//
// > **Note:** This is a list of names of Prefix Lists configured on the same Local Rulestack as this Rule is being created.
LocalRulestackPrefixListIds []string `pulumi:"localRulestackPrefixListIds"`
}
// LocalRulestackRuleDestinationInput is an input type that accepts LocalRulestackRuleDestinationArgs and LocalRulestackRuleDestinationOutput values.
// You can construct a concrete instance of `LocalRulestackRuleDestinationInput` via:
//
// LocalRulestackRuleDestinationArgs{...}
type LocalRulestackRuleDestinationInput interface {
pulumi.Input
ToLocalRulestackRuleDestinationOutput() LocalRulestackRuleDestinationOutput
ToLocalRulestackRuleDestinationOutputWithContext(context.Context) LocalRulestackRuleDestinationOutput
}
type LocalRulestackRuleDestinationArgs struct {
// Specifies a list of CIDR's.
Cidrs pulumi.StringArrayInput `pulumi:"cidrs"`
// Specifies a list of ISO3361-1 Alpha-2 Country codes. Possible values include `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CW`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SZ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`
Countries pulumi.StringArrayInput `pulumi:"countries"`
// Specifies a list of Feeds.
Feeds pulumi.StringArrayInput `pulumi:"feeds"`
// Specifies a list of FQDN lists.
//
// > **Note:** This is a list of names of FQDN Lists configured on the same Local Rulestack as this Rule is being created.
LocalRulestackFqdnListIds pulumi.StringArrayInput `pulumi:"localRulestackFqdnListIds"`
// Specifies a list of Prefix Lists.
//
// > **Note:** This is a list of names of Prefix Lists configured on the same Local Rulestack as this Rule is being created.
LocalRulestackPrefixListIds pulumi.StringArrayInput `pulumi:"localRulestackPrefixListIds"`
}
func (LocalRulestackRuleDestinationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LocalRulestackRuleDestination)(nil)).Elem()
}
func (i LocalRulestackRuleDestinationArgs) ToLocalRulestackRuleDestinationOutput() LocalRulestackRuleDestinationOutput {
return i.ToLocalRulestackRuleDestinationOutputWithContext(context.Background())
}
func (i LocalRulestackRuleDestinationArgs) ToLocalRulestackRuleDestinationOutputWithContext(ctx context.Context) LocalRulestackRuleDestinationOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackRuleDestinationOutput)
}
func (i LocalRulestackRuleDestinationArgs) ToLocalRulestackRuleDestinationPtrOutput() LocalRulestackRuleDestinationPtrOutput {
return i.ToLocalRulestackRuleDestinationPtrOutputWithContext(context.Background())
}
func (i LocalRulestackRuleDestinationArgs) ToLocalRulestackRuleDestinationPtrOutputWithContext(ctx context.Context) LocalRulestackRuleDestinationPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackRuleDestinationOutput).ToLocalRulestackRuleDestinationPtrOutputWithContext(ctx)
}
// LocalRulestackRuleDestinationPtrInput is an input type that accepts LocalRulestackRuleDestinationArgs, LocalRulestackRuleDestinationPtr and LocalRulestackRuleDestinationPtrOutput values.
// You can construct a concrete instance of `LocalRulestackRuleDestinationPtrInput` via:
//
// LocalRulestackRuleDestinationArgs{...}
//
// or:
//
// nil
type LocalRulestackRuleDestinationPtrInput interface {
pulumi.Input
ToLocalRulestackRuleDestinationPtrOutput() LocalRulestackRuleDestinationPtrOutput
ToLocalRulestackRuleDestinationPtrOutputWithContext(context.Context) LocalRulestackRuleDestinationPtrOutput
}
type localRulestackRuleDestinationPtrType LocalRulestackRuleDestinationArgs
func LocalRulestackRuleDestinationPtr(v *LocalRulestackRuleDestinationArgs) LocalRulestackRuleDestinationPtrInput {
return (*localRulestackRuleDestinationPtrType)(v)
}
func (*localRulestackRuleDestinationPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackRuleDestination)(nil)).Elem()
}
func (i *localRulestackRuleDestinationPtrType) ToLocalRulestackRuleDestinationPtrOutput() LocalRulestackRuleDestinationPtrOutput {
return i.ToLocalRulestackRuleDestinationPtrOutputWithContext(context.Background())
}
func (i *localRulestackRuleDestinationPtrType) ToLocalRulestackRuleDestinationPtrOutputWithContext(ctx context.Context) LocalRulestackRuleDestinationPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackRuleDestinationPtrOutput)
}
type LocalRulestackRuleDestinationOutput struct{ *pulumi.OutputState }
func (LocalRulestackRuleDestinationOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LocalRulestackRuleDestination)(nil)).Elem()
}
func (o LocalRulestackRuleDestinationOutput) ToLocalRulestackRuleDestinationOutput() LocalRulestackRuleDestinationOutput {
return o
}
func (o LocalRulestackRuleDestinationOutput) ToLocalRulestackRuleDestinationOutputWithContext(ctx context.Context) LocalRulestackRuleDestinationOutput {
return o
}
func (o LocalRulestackRuleDestinationOutput) ToLocalRulestackRuleDestinationPtrOutput() LocalRulestackRuleDestinationPtrOutput {
return o.ToLocalRulestackRuleDestinationPtrOutputWithContext(context.Background())
}
func (o LocalRulestackRuleDestinationOutput) ToLocalRulestackRuleDestinationPtrOutputWithContext(ctx context.Context) LocalRulestackRuleDestinationPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v LocalRulestackRuleDestination) *LocalRulestackRuleDestination {
return &v
}).(LocalRulestackRuleDestinationPtrOutput)
}
// Specifies a list of CIDR's.
func (o LocalRulestackRuleDestinationOutput) Cidrs() pulumi.StringArrayOutput {
return o.ApplyT(func(v LocalRulestackRuleDestination) []string { return v.Cidrs }).(pulumi.StringArrayOutput)
}
// Specifies a list of ISO3361-1 Alpha-2 Country codes. Possible values include `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CW`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SZ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`
func (o LocalRulestackRuleDestinationOutput) Countries() pulumi.StringArrayOutput {
return o.ApplyT(func(v LocalRulestackRuleDestination) []string { return v.Countries }).(pulumi.StringArrayOutput)
}
// Specifies a list of Feeds.
func (o LocalRulestackRuleDestinationOutput) Feeds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LocalRulestackRuleDestination) []string { return v.Feeds }).(pulumi.StringArrayOutput)
}
// Specifies a list of FQDN lists.
//
// > **Note:** This is a list of names of FQDN Lists configured on the same Local Rulestack as this Rule is being created.
func (o LocalRulestackRuleDestinationOutput) LocalRulestackFqdnListIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LocalRulestackRuleDestination) []string { return v.LocalRulestackFqdnListIds }).(pulumi.StringArrayOutput)
}
// Specifies a list of Prefix Lists.
//
// > **Note:** This is a list of names of Prefix Lists configured on the same Local Rulestack as this Rule is being created.
func (o LocalRulestackRuleDestinationOutput) LocalRulestackPrefixListIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LocalRulestackRuleDestination) []string { return v.LocalRulestackPrefixListIds }).(pulumi.StringArrayOutput)
}
type LocalRulestackRuleDestinationPtrOutput struct{ *pulumi.OutputState }
func (LocalRulestackRuleDestinationPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackRuleDestination)(nil)).Elem()
}
func (o LocalRulestackRuleDestinationPtrOutput) ToLocalRulestackRuleDestinationPtrOutput() LocalRulestackRuleDestinationPtrOutput {
return o
}
func (o LocalRulestackRuleDestinationPtrOutput) ToLocalRulestackRuleDestinationPtrOutputWithContext(ctx context.Context) LocalRulestackRuleDestinationPtrOutput {
return o
}
func (o LocalRulestackRuleDestinationPtrOutput) Elem() LocalRulestackRuleDestinationOutput {
return o.ApplyT(func(v *LocalRulestackRuleDestination) LocalRulestackRuleDestination {
if v != nil {
return *v
}
var ret LocalRulestackRuleDestination
return ret
}).(LocalRulestackRuleDestinationOutput)
}
// Specifies a list of CIDR's.
func (o LocalRulestackRuleDestinationPtrOutput) Cidrs() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LocalRulestackRuleDestination) []string {
if v == nil {
return nil
}
return v.Cidrs
}).(pulumi.StringArrayOutput)
}
// Specifies a list of ISO3361-1 Alpha-2 Country codes. Possible values include `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CW`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SZ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`
func (o LocalRulestackRuleDestinationPtrOutput) Countries() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LocalRulestackRuleDestination) []string {
if v == nil {
return nil
}
return v.Countries
}).(pulumi.StringArrayOutput)
}
// Specifies a list of Feeds.
func (o LocalRulestackRuleDestinationPtrOutput) Feeds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LocalRulestackRuleDestination) []string {
if v == nil {
return nil
}
return v.Feeds
}).(pulumi.StringArrayOutput)
}
// Specifies a list of FQDN lists.
//
// > **Note:** This is a list of names of FQDN Lists configured on the same Local Rulestack as this Rule is being created.
func (o LocalRulestackRuleDestinationPtrOutput) LocalRulestackFqdnListIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LocalRulestackRuleDestination) []string {
if v == nil {
return nil
}
return v.LocalRulestackFqdnListIds
}).(pulumi.StringArrayOutput)
}
// Specifies a list of Prefix Lists.
//
// > **Note:** This is a list of names of Prefix Lists configured on the same Local Rulestack as this Rule is being created.
func (o LocalRulestackRuleDestinationPtrOutput) LocalRulestackPrefixListIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LocalRulestackRuleDestination) []string {
if v == nil {
return nil
}
return v.LocalRulestackPrefixListIds
}).(pulumi.StringArrayOutput)
}
type LocalRulestackRuleSource struct {
// Specifies a list of CIDRs.
Cidrs []string `pulumi:"cidrs"`
// Specifies a list of ISO3361-1 Alpha-2 Country codes. Possible values include `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CW`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SZ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`
Countries []string `pulumi:"countries"`
// Specifies a list of Feeds.
Feeds []string `pulumi:"feeds"`
// Specifies a list of Prefix Lists.
//
// > **Note:** This is a list of names of Prefix Lists configured on the same Local Rulestack as this Rule is being created.
LocalRulestackPrefixListIds []string `pulumi:"localRulestackPrefixListIds"`
}
// LocalRulestackRuleSourceInput is an input type that accepts LocalRulestackRuleSourceArgs and LocalRulestackRuleSourceOutput values.
// You can construct a concrete instance of `LocalRulestackRuleSourceInput` via:
//
// LocalRulestackRuleSourceArgs{...}
type LocalRulestackRuleSourceInput interface {
pulumi.Input
ToLocalRulestackRuleSourceOutput() LocalRulestackRuleSourceOutput
ToLocalRulestackRuleSourceOutputWithContext(context.Context) LocalRulestackRuleSourceOutput
}
type LocalRulestackRuleSourceArgs struct {
// Specifies a list of CIDRs.
Cidrs pulumi.StringArrayInput `pulumi:"cidrs"`
// Specifies a list of ISO3361-1 Alpha-2 Country codes. Possible values include `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BQ`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CW`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MK`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `BL`, `SH`, `KN`, `LC`, `MF`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SX`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `SS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SZ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`
Countries pulumi.StringArrayInput `pulumi:"countries"`
// Specifies a list of Feeds.
Feeds pulumi.StringArrayInput `pulumi:"feeds"`
// Specifies a list of Prefix Lists.
//
// > **Note:** This is a list of names of Prefix Lists configured on the same Local Rulestack as this Rule is being created.
LocalRulestackPrefixListIds pulumi.StringArrayInput `pulumi:"localRulestackPrefixListIds"`
}
func (LocalRulestackRuleSourceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LocalRulestackRuleSource)(nil)).Elem()
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | true |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/paloalto/localRulestackRule.go | sdk/go/azure/paloalto/localRulestackRule.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 paloalto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Palo Alto Local Rulestack Rule.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/paloalto"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("rg-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleLocalRulestack, err := paloalto.NewLocalRulestack(ctx, "example", &paloalto.LocalRulestackArgs{
// Name: pulumi.String("lrs-example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// _, err = paloalto.NewLocalRulestackRule(ctx, "example", &paloalto.LocalRulestackRuleArgs{
// Name: pulumi.String("example-rule"),
// RulestackId: exampleLocalRulestack.ID(),
// Priority: pulumi.Int(1000),
// Action: pulumi.String("Allow"),
// Protocol: pulumi.String("application-default"),
// Applications: pulumi.StringArray{
// pulumi.String("any"),
// },
// Source: &paloalto.LocalRulestackRuleSourceArgs{
// Cidrs: pulumi.StringArray{
// pulumi.String("10.0.0.0/8"),
// },
// },
// Destination: &paloalto.LocalRulestackRuleDestinationArgs{
// Cidrs: pulumi.StringArray{
// pulumi.String("192.168.16.0/24"),
// },
// },
// })
// 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:
//
// * `PaloAltoNetworks.Cloudngfw` - 2022-08-29
//
// ## Import
//
// Palo Alto Local Rulestack Rules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:paloalto/localRulestackRule:LocalRulestackRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/myLocalRulestack/localRules/myRule1
// ```
type LocalRulestackRule struct {
pulumi.CustomResourceState
// The action to take on the rule being triggered. Possible values are `Allow`, `DenyResetBoth`, `DenyResetServer` and `DenySilent`.
Action pulumi.StringOutput `pulumi:"action"`
// Specifies a list of Applications.
Applications pulumi.StringArrayOutput `pulumi:"applications"`
// The comment for Audit purposes.
AuditComment pulumi.StringPtrOutput `pulumi:"auditComment"`
// A `category` block as defined below.
Category LocalRulestackRuleCategoryPtrOutput `pulumi:"category"`
// The type of Decryption to perform on the rule. Possible values include `SSLInboundInspection`, `SSLOutboundInspection`, and `None`. Defaults to `None`.
DecryptionRuleType pulumi.StringPtrOutput `pulumi:"decryptionRuleType"`
// The description for the rule.
Description pulumi.StringPtrOutput `pulumi:"description"`
// One or more `destination` blocks as defined below.
Destination LocalRulestackRuleDestinationOutput `pulumi:"destination"`
// Should this Rule be enabled? Defaults to `true`.
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
// The ID of the certificate for inbound inspection. Only valid when `decryptionRuleType` is set to `SSLInboundInspection`.
InspectionCertificateId pulumi.StringPtrOutput `pulumi:"inspectionCertificateId"`
// Should Logging be enabled? Defaults to `false`.
LoggingEnabled pulumi.BoolPtrOutput `pulumi:"loggingEnabled"`
// The name which should be used for this Palo Alto Local Rulestack Rule.
Name pulumi.StringOutput `pulumi:"name"`
// Should the inverse of the Destination configuration be used. Defaults to `false`.
NegateDestination pulumi.BoolPtrOutput `pulumi:"negateDestination"`
// Should the inverse of the Source configuration be used. Defaults to `false`.
NegateSource pulumi.BoolPtrOutput `pulumi:"negateSource"`
// The Priority of this rule. Rules are executed in numerical order. Possible values are between 1 and 1000000. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
//
// > **Note:** This is the primary identifier of a rule, as such it is not possible to change the Priority of a rule once created.
Priority pulumi.IntOutput `pulumi:"priority"`
// The Protocol and port to use in the form `[protocol]:[portNumber]` e.g. `TCP:8080` or `UDP:53`. Conflicts with `protocolPorts`.
//
// > **Note:** In 4.0 or later versions, the default of `protocol` will no longer be set by provider, exactly one of `protocol` and `protocolPorts` must be specified. You need to explicitly specify `protocol="application-default"` to keep the the current default of the `protocol`.
Protocol pulumi.StringPtrOutput `pulumi:"protocol"`
// Specifies a list of Protocol:Port entries. E.g. `[ "TCP:80", "UDP:5431" ]`. Conflicts with `protocol`.
ProtocolPorts pulumi.StringArrayOutput `pulumi:"protocolPorts"`
// The ID of the Local Rulestack in which to create this Rule. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
RulestackId pulumi.StringOutput `pulumi:"rulestackId"`
// One or more `source` blocks as defined below.
Source LocalRulestackRuleSourceOutput `pulumi:"source"`
// A mapping of tags which should be assigned to the Palo Alto Local Rulestack Rule.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewLocalRulestackRule registers a new resource with the given unique name, arguments, and options.
func NewLocalRulestackRule(ctx *pulumi.Context,
name string, args *LocalRulestackRuleArgs, opts ...pulumi.ResourceOption) (*LocalRulestackRule, 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.Applications == nil {
return nil, errors.New("invalid value for required argument 'Applications'")
}
if args.Destination == nil {
return nil, errors.New("invalid value for required argument 'Destination'")
}
if args.Priority == nil {
return nil, errors.New("invalid value for required argument 'Priority'")
}
if args.RulestackId == nil {
return nil, errors.New("invalid value for required argument 'RulestackId'")
}
if args.Source == nil {
return nil, errors.New("invalid value for required argument 'Source'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource LocalRulestackRule
err := ctx.RegisterResource("azure:paloalto/localRulestackRule:LocalRulestackRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLocalRulestackRule gets an existing LocalRulestackRule 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 GetLocalRulestackRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LocalRulestackRuleState, opts ...pulumi.ResourceOption) (*LocalRulestackRule, error) {
var resource LocalRulestackRule
err := ctx.ReadResource("azure:paloalto/localRulestackRule:LocalRulestackRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LocalRulestackRule resources.
type localRulestackRuleState struct {
// The action to take on the rule being triggered. Possible values are `Allow`, `DenyResetBoth`, `DenyResetServer` and `DenySilent`.
Action *string `pulumi:"action"`
// Specifies a list of Applications.
Applications []string `pulumi:"applications"`
// The comment for Audit purposes.
AuditComment *string `pulumi:"auditComment"`
// A `category` block as defined below.
Category *LocalRulestackRuleCategory `pulumi:"category"`
// The type of Decryption to perform on the rule. Possible values include `SSLInboundInspection`, `SSLOutboundInspection`, and `None`. Defaults to `None`.
DecryptionRuleType *string `pulumi:"decryptionRuleType"`
// The description for the rule.
Description *string `pulumi:"description"`
// One or more `destination` blocks as defined below.
Destination *LocalRulestackRuleDestination `pulumi:"destination"`
// Should this Rule be enabled? Defaults to `true`.
Enabled *bool `pulumi:"enabled"`
// The ID of the certificate for inbound inspection. Only valid when `decryptionRuleType` is set to `SSLInboundInspection`.
InspectionCertificateId *string `pulumi:"inspectionCertificateId"`
// Should Logging be enabled? Defaults to `false`.
LoggingEnabled *bool `pulumi:"loggingEnabled"`
// The name which should be used for this Palo Alto Local Rulestack Rule.
Name *string `pulumi:"name"`
// Should the inverse of the Destination configuration be used. Defaults to `false`.
NegateDestination *bool `pulumi:"negateDestination"`
// Should the inverse of the Source configuration be used. Defaults to `false`.
NegateSource *bool `pulumi:"negateSource"`
// The Priority of this rule. Rules are executed in numerical order. Possible values are between 1 and 1000000. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
//
// > **Note:** This is the primary identifier of a rule, as such it is not possible to change the Priority of a rule once created.
Priority *int `pulumi:"priority"`
// The Protocol and port to use in the form `[protocol]:[portNumber]` e.g. `TCP:8080` or `UDP:53`. Conflicts with `protocolPorts`.
//
// > **Note:** In 4.0 or later versions, the default of `protocol` will no longer be set by provider, exactly one of `protocol` and `protocolPorts` must be specified. You need to explicitly specify `protocol="application-default"` to keep the the current default of the `protocol`.
Protocol *string `pulumi:"protocol"`
// Specifies a list of Protocol:Port entries. E.g. `[ "TCP:80", "UDP:5431" ]`. Conflicts with `protocol`.
ProtocolPorts []string `pulumi:"protocolPorts"`
// The ID of the Local Rulestack in which to create this Rule. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
RulestackId *string `pulumi:"rulestackId"`
// One or more `source` blocks as defined below.
Source *LocalRulestackRuleSource `pulumi:"source"`
// A mapping of tags which should be assigned to the Palo Alto Local Rulestack Rule.
Tags map[string]string `pulumi:"tags"`
}
type LocalRulestackRuleState struct {
// The action to take on the rule being triggered. Possible values are `Allow`, `DenyResetBoth`, `DenyResetServer` and `DenySilent`.
Action pulumi.StringPtrInput
// Specifies a list of Applications.
Applications pulumi.StringArrayInput
// The comment for Audit purposes.
AuditComment pulumi.StringPtrInput
// A `category` block as defined below.
Category LocalRulestackRuleCategoryPtrInput
// The type of Decryption to perform on the rule. Possible values include `SSLInboundInspection`, `SSLOutboundInspection`, and `None`. Defaults to `None`.
DecryptionRuleType pulumi.StringPtrInput
// The description for the rule.
Description pulumi.StringPtrInput
// One or more `destination` blocks as defined below.
Destination LocalRulestackRuleDestinationPtrInput
// Should this Rule be enabled? Defaults to `true`.
Enabled pulumi.BoolPtrInput
// The ID of the certificate for inbound inspection. Only valid when `decryptionRuleType` is set to `SSLInboundInspection`.
InspectionCertificateId pulumi.StringPtrInput
// Should Logging be enabled? Defaults to `false`.
LoggingEnabled pulumi.BoolPtrInput
// The name which should be used for this Palo Alto Local Rulestack Rule.
Name pulumi.StringPtrInput
// Should the inverse of the Destination configuration be used. Defaults to `false`.
NegateDestination pulumi.BoolPtrInput
// Should the inverse of the Source configuration be used. Defaults to `false`.
NegateSource pulumi.BoolPtrInput
// The Priority of this rule. Rules are executed in numerical order. Possible values are between 1 and 1000000. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
//
// > **Note:** This is the primary identifier of a rule, as such it is not possible to change the Priority of a rule once created.
Priority pulumi.IntPtrInput
// The Protocol and port to use in the form `[protocol]:[portNumber]` e.g. `TCP:8080` or `UDP:53`. Conflicts with `protocolPorts`.
//
// > **Note:** In 4.0 or later versions, the default of `protocol` will no longer be set by provider, exactly one of `protocol` and `protocolPorts` must be specified. You need to explicitly specify `protocol="application-default"` to keep the the current default of the `protocol`.
Protocol pulumi.StringPtrInput
// Specifies a list of Protocol:Port entries. E.g. `[ "TCP:80", "UDP:5431" ]`. Conflicts with `protocol`.
ProtocolPorts pulumi.StringArrayInput
// The ID of the Local Rulestack in which to create this Rule. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
RulestackId pulumi.StringPtrInput
// One or more `source` blocks as defined below.
Source LocalRulestackRuleSourcePtrInput
// A mapping of tags which should be assigned to the Palo Alto Local Rulestack Rule.
Tags pulumi.StringMapInput
}
func (LocalRulestackRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*localRulestackRuleState)(nil)).Elem()
}
type localRulestackRuleArgs struct {
// The action to take on the rule being triggered. Possible values are `Allow`, `DenyResetBoth`, `DenyResetServer` and `DenySilent`.
Action string `pulumi:"action"`
// Specifies a list of Applications.
Applications []string `pulumi:"applications"`
// The comment for Audit purposes.
AuditComment *string `pulumi:"auditComment"`
// A `category` block as defined below.
Category *LocalRulestackRuleCategory `pulumi:"category"`
// The type of Decryption to perform on the rule. Possible values include `SSLInboundInspection`, `SSLOutboundInspection`, and `None`. Defaults to `None`.
DecryptionRuleType *string `pulumi:"decryptionRuleType"`
// The description for the rule.
Description *string `pulumi:"description"`
// One or more `destination` blocks as defined below.
Destination LocalRulestackRuleDestination `pulumi:"destination"`
// Should this Rule be enabled? Defaults to `true`.
Enabled *bool `pulumi:"enabled"`
// The ID of the certificate for inbound inspection. Only valid when `decryptionRuleType` is set to `SSLInboundInspection`.
InspectionCertificateId *string `pulumi:"inspectionCertificateId"`
// Should Logging be enabled? Defaults to `false`.
LoggingEnabled *bool `pulumi:"loggingEnabled"`
// The name which should be used for this Palo Alto Local Rulestack Rule.
Name *string `pulumi:"name"`
// Should the inverse of the Destination configuration be used. Defaults to `false`.
NegateDestination *bool `pulumi:"negateDestination"`
// Should the inverse of the Source configuration be used. Defaults to `false`.
NegateSource *bool `pulumi:"negateSource"`
// The Priority of this rule. Rules are executed in numerical order. Possible values are between 1 and 1000000. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
//
// > **Note:** This is the primary identifier of a rule, as such it is not possible to change the Priority of a rule once created.
Priority int `pulumi:"priority"`
// The Protocol and port to use in the form `[protocol]:[portNumber]` e.g. `TCP:8080` or `UDP:53`. Conflicts with `protocolPorts`.
//
// > **Note:** In 4.0 or later versions, the default of `protocol` will no longer be set by provider, exactly one of `protocol` and `protocolPorts` must be specified. You need to explicitly specify `protocol="application-default"` to keep the the current default of the `protocol`.
Protocol *string `pulumi:"protocol"`
// Specifies a list of Protocol:Port entries. E.g. `[ "TCP:80", "UDP:5431" ]`. Conflicts with `protocol`.
ProtocolPorts []string `pulumi:"protocolPorts"`
// The ID of the Local Rulestack in which to create this Rule. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
RulestackId string `pulumi:"rulestackId"`
// One or more `source` blocks as defined below.
Source LocalRulestackRuleSource `pulumi:"source"`
// A mapping of tags which should be assigned to the Palo Alto Local Rulestack Rule.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a LocalRulestackRule resource.
type LocalRulestackRuleArgs struct {
// The action to take on the rule being triggered. Possible values are `Allow`, `DenyResetBoth`, `DenyResetServer` and `DenySilent`.
Action pulumi.StringInput
// Specifies a list of Applications.
Applications pulumi.StringArrayInput
// The comment for Audit purposes.
AuditComment pulumi.StringPtrInput
// A `category` block as defined below.
Category LocalRulestackRuleCategoryPtrInput
// The type of Decryption to perform on the rule. Possible values include `SSLInboundInspection`, `SSLOutboundInspection`, and `None`. Defaults to `None`.
DecryptionRuleType pulumi.StringPtrInput
// The description for the rule.
Description pulumi.StringPtrInput
// One or more `destination` blocks as defined below.
Destination LocalRulestackRuleDestinationInput
// Should this Rule be enabled? Defaults to `true`.
Enabled pulumi.BoolPtrInput
// The ID of the certificate for inbound inspection. Only valid when `decryptionRuleType` is set to `SSLInboundInspection`.
InspectionCertificateId pulumi.StringPtrInput
// Should Logging be enabled? Defaults to `false`.
LoggingEnabled pulumi.BoolPtrInput
// The name which should be used for this Palo Alto Local Rulestack Rule.
Name pulumi.StringPtrInput
// Should the inverse of the Destination configuration be used. Defaults to `false`.
NegateDestination pulumi.BoolPtrInput
// Should the inverse of the Source configuration be used. Defaults to `false`.
NegateSource pulumi.BoolPtrInput
// The Priority of this rule. Rules are executed in numerical order. Possible values are between 1 and 1000000. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
//
// > **Note:** This is the primary identifier of a rule, as such it is not possible to change the Priority of a rule once created.
Priority pulumi.IntInput
// The Protocol and port to use in the form `[protocol]:[portNumber]` e.g. `TCP:8080` or `UDP:53`. Conflicts with `protocolPorts`.
//
// > **Note:** In 4.0 or later versions, the default of `protocol` will no longer be set by provider, exactly one of `protocol` and `protocolPorts` must be specified. You need to explicitly specify `protocol="application-default"` to keep the the current default of the `protocol`.
Protocol pulumi.StringPtrInput
// Specifies a list of Protocol:Port entries. E.g. `[ "TCP:80", "UDP:5431" ]`. Conflicts with `protocol`.
ProtocolPorts pulumi.StringArrayInput
// The ID of the Local Rulestack in which to create this Rule. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
RulestackId pulumi.StringInput
// One or more `source` blocks as defined below.
Source LocalRulestackRuleSourceInput
// A mapping of tags which should be assigned to the Palo Alto Local Rulestack Rule.
Tags pulumi.StringMapInput
}
func (LocalRulestackRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*localRulestackRuleArgs)(nil)).Elem()
}
type LocalRulestackRuleInput interface {
pulumi.Input
ToLocalRulestackRuleOutput() LocalRulestackRuleOutput
ToLocalRulestackRuleOutputWithContext(ctx context.Context) LocalRulestackRuleOutput
}
func (*LocalRulestackRule) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackRule)(nil)).Elem()
}
func (i *LocalRulestackRule) ToLocalRulestackRuleOutput() LocalRulestackRuleOutput {
return i.ToLocalRulestackRuleOutputWithContext(context.Background())
}
func (i *LocalRulestackRule) ToLocalRulestackRuleOutputWithContext(ctx context.Context) LocalRulestackRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackRuleOutput)
}
// LocalRulestackRuleArrayInput is an input type that accepts LocalRulestackRuleArray and LocalRulestackRuleArrayOutput values.
// You can construct a concrete instance of `LocalRulestackRuleArrayInput` via:
//
// LocalRulestackRuleArray{ LocalRulestackRuleArgs{...} }
type LocalRulestackRuleArrayInput interface {
pulumi.Input
ToLocalRulestackRuleArrayOutput() LocalRulestackRuleArrayOutput
ToLocalRulestackRuleArrayOutputWithContext(context.Context) LocalRulestackRuleArrayOutput
}
type LocalRulestackRuleArray []LocalRulestackRuleInput
func (LocalRulestackRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalRulestackRule)(nil)).Elem()
}
func (i LocalRulestackRuleArray) ToLocalRulestackRuleArrayOutput() LocalRulestackRuleArrayOutput {
return i.ToLocalRulestackRuleArrayOutputWithContext(context.Background())
}
func (i LocalRulestackRuleArray) ToLocalRulestackRuleArrayOutputWithContext(ctx context.Context) LocalRulestackRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackRuleArrayOutput)
}
// LocalRulestackRuleMapInput is an input type that accepts LocalRulestackRuleMap and LocalRulestackRuleMapOutput values.
// You can construct a concrete instance of `LocalRulestackRuleMapInput` via:
//
// LocalRulestackRuleMap{ "key": LocalRulestackRuleArgs{...} }
type LocalRulestackRuleMapInput interface {
pulumi.Input
ToLocalRulestackRuleMapOutput() LocalRulestackRuleMapOutput
ToLocalRulestackRuleMapOutputWithContext(context.Context) LocalRulestackRuleMapOutput
}
type LocalRulestackRuleMap map[string]LocalRulestackRuleInput
func (LocalRulestackRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalRulestackRule)(nil)).Elem()
}
func (i LocalRulestackRuleMap) ToLocalRulestackRuleMapOutput() LocalRulestackRuleMapOutput {
return i.ToLocalRulestackRuleMapOutputWithContext(context.Background())
}
func (i LocalRulestackRuleMap) ToLocalRulestackRuleMapOutputWithContext(ctx context.Context) LocalRulestackRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackRuleMapOutput)
}
type LocalRulestackRuleOutput struct{ *pulumi.OutputState }
func (LocalRulestackRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackRule)(nil)).Elem()
}
func (o LocalRulestackRuleOutput) ToLocalRulestackRuleOutput() LocalRulestackRuleOutput {
return o
}
func (o LocalRulestackRuleOutput) ToLocalRulestackRuleOutputWithContext(ctx context.Context) LocalRulestackRuleOutput {
return o
}
// The action to take on the rule being triggered. Possible values are `Allow`, `DenyResetBoth`, `DenyResetServer` and `DenySilent`.
func (o LocalRulestackRuleOutput) Action() pulumi.StringOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.StringOutput { return v.Action }).(pulumi.StringOutput)
}
// Specifies a list of Applications.
func (o LocalRulestackRuleOutput) Applications() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.StringArrayOutput { return v.Applications }).(pulumi.StringArrayOutput)
}
// The comment for Audit purposes.
func (o LocalRulestackRuleOutput) AuditComment() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.StringPtrOutput { return v.AuditComment }).(pulumi.StringPtrOutput)
}
// A `category` block as defined below.
func (o LocalRulestackRuleOutput) Category() LocalRulestackRuleCategoryPtrOutput {
return o.ApplyT(func(v *LocalRulestackRule) LocalRulestackRuleCategoryPtrOutput { return v.Category }).(LocalRulestackRuleCategoryPtrOutput)
}
// The type of Decryption to perform on the rule. Possible values include `SSLInboundInspection`, `SSLOutboundInspection`, and `None`. Defaults to `None`.
func (o LocalRulestackRuleOutput) DecryptionRuleType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.StringPtrOutput { return v.DecryptionRuleType }).(pulumi.StringPtrOutput)
}
// The description for the rule.
func (o LocalRulestackRuleOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// One or more `destination` blocks as defined below.
func (o LocalRulestackRuleOutput) Destination() LocalRulestackRuleDestinationOutput {
return o.ApplyT(func(v *LocalRulestackRule) LocalRulestackRuleDestinationOutput { return v.Destination }).(LocalRulestackRuleDestinationOutput)
}
// Should this Rule be enabled? Defaults to `true`.
func (o LocalRulestackRuleOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput)
}
// The ID of the certificate for inbound inspection. Only valid when `decryptionRuleType` is set to `SSLInboundInspection`.
func (o LocalRulestackRuleOutput) InspectionCertificateId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.StringPtrOutput { return v.InspectionCertificateId }).(pulumi.StringPtrOutput)
}
// Should Logging be enabled? Defaults to `false`.
func (o LocalRulestackRuleOutput) LoggingEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.BoolPtrOutput { return v.LoggingEnabled }).(pulumi.BoolPtrOutput)
}
// The name which should be used for this Palo Alto Local Rulestack Rule.
func (o LocalRulestackRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Should the inverse of the Destination configuration be used. Defaults to `false`.
func (o LocalRulestackRuleOutput) NegateDestination() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.BoolPtrOutput { return v.NegateDestination }).(pulumi.BoolPtrOutput)
}
// Should the inverse of the Source configuration be used. Defaults to `false`.
func (o LocalRulestackRuleOutput) NegateSource() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.BoolPtrOutput { return v.NegateSource }).(pulumi.BoolPtrOutput)
}
// The Priority of this rule. Rules are executed in numerical order. Possible values are between 1 and 1000000. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
//
// > **Note:** This is the primary identifier of a rule, as such it is not possible to change the Priority of a rule once created.
func (o LocalRulestackRuleOutput) Priority() pulumi.IntOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.IntOutput { return v.Priority }).(pulumi.IntOutput)
}
// The Protocol and port to use in the form `[protocol]:[portNumber]` e.g. `TCP:8080` or `UDP:53`. Conflicts with `protocolPorts`.
//
// > **Note:** In 4.0 or later versions, the default of `protocol` will no longer be set by provider, exactly one of `protocol` and `protocolPorts` must be specified. You need to explicitly specify `protocol="application-default"` to keep the the current default of the `protocol`.
func (o LocalRulestackRuleOutput) Protocol() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.StringPtrOutput { return v.Protocol }).(pulumi.StringPtrOutput)
}
// Specifies a list of Protocol:Port entries. E.g. `[ "TCP:80", "UDP:5431" ]`. Conflicts with `protocol`.
func (o LocalRulestackRuleOutput) ProtocolPorts() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.StringArrayOutput { return v.ProtocolPorts }).(pulumi.StringArrayOutput)
}
// The ID of the Local Rulestack in which to create this Rule. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
func (o LocalRulestackRuleOutput) RulestackId() pulumi.StringOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.StringOutput { return v.RulestackId }).(pulumi.StringOutput)
}
// One or more `source` blocks as defined below.
func (o LocalRulestackRuleOutput) Source() LocalRulestackRuleSourceOutput {
return o.ApplyT(func(v *LocalRulestackRule) LocalRulestackRuleSourceOutput { return v.Source }).(LocalRulestackRuleSourceOutput)
}
// A mapping of tags which should be assigned to the Palo Alto Local Rulestack Rule.
func (o LocalRulestackRuleOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *LocalRulestackRule) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type LocalRulestackRuleArrayOutput struct{ *pulumi.OutputState }
func (LocalRulestackRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalRulestackRule)(nil)).Elem()
}
func (o LocalRulestackRuleArrayOutput) ToLocalRulestackRuleArrayOutput() LocalRulestackRuleArrayOutput {
return o
}
func (o LocalRulestackRuleArrayOutput) ToLocalRulestackRuleArrayOutputWithContext(ctx context.Context) LocalRulestackRuleArrayOutput {
return o
}
func (o LocalRulestackRuleArrayOutput) Index(i pulumi.IntInput) LocalRulestackRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LocalRulestackRule {
return vs[0].([]*LocalRulestackRule)[vs[1].(int)]
}).(LocalRulestackRuleOutput)
}
type LocalRulestackRuleMapOutput struct{ *pulumi.OutputState }
func (LocalRulestackRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalRulestackRule)(nil)).Elem()
}
func (o LocalRulestackRuleMapOutput) ToLocalRulestackRuleMapOutput() LocalRulestackRuleMapOutput {
return o
}
func (o LocalRulestackRuleMapOutput) ToLocalRulestackRuleMapOutputWithContext(ctx context.Context) LocalRulestackRuleMapOutput {
return o
}
func (o LocalRulestackRuleMapOutput) MapIndex(k pulumi.StringInput) LocalRulestackRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LocalRulestackRule {
return vs[0].(map[string]*LocalRulestackRule)[vs[1].(string)]
}).(LocalRulestackRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackRuleInput)(nil)).Elem(), &LocalRulestackRule{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackRuleArrayInput)(nil)).Elem(), LocalRulestackRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackRuleMapInput)(nil)).Elem(), LocalRulestackRuleMap{})
pulumi.RegisterOutputType(LocalRulestackRuleOutput{})
pulumi.RegisterOutputType(LocalRulestackRuleArrayOutput{})
pulumi.RegisterOutputType(LocalRulestackRuleMapOutput{})
}
| 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/paloalto/nextGenerationFirewallVirtualNetworkPanorama.go | sdk/go/azure/paloalto/nextGenerationFirewallVirtualNetworkPanorama.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 paloalto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Palo Alto Next Generation Firewall Virtual Network Panorama.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/paloalto"
// "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-resource-group"),
// Location: pulumi.String("westeurope"),
// })
// if err != nil {
// return err
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("example-public-ip"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AllocationMethod: pulumi.String("Static"),
// Sku: pulumi.String("Standard"),
// })
// if err != nil {
// return err
// }
// exampleNetworkSecurityGroup, err := network.NewNetworkSecurityGroup(ctx, "example", &network.NetworkSecurityGroupArgs{
// Name: pulumi.String("example-nsg"),
// Location: pulumi.Any(test.Location),
// ResourceGroupName: pulumi.Any(test.Name),
// })
// 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,
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// trust, err := network.NewSubnet(ctx, "trust", &network.SubnetArgs{
// Name: pulumi.String("example-trust-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.1.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("trusted"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("PaloAltoNetworks.Cloudngfw/firewalls"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = network.NewSubnetNetworkSecurityGroupAssociation(ctx, "trust", &network.SubnetNetworkSecurityGroupAssociationArgs{
// SubnetId: trust.ID(),
// NetworkSecurityGroupId: exampleNetworkSecurityGroup.ID(),
// })
// if err != nil {
// return err
// }
// untrust, err := network.NewSubnet(ctx, "untrust", &network.SubnetArgs{
// Name: pulumi.String("example-untrust-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("untrusted"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("PaloAltoNetworks.Cloudngfw/firewalls"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = network.NewSubnetNetworkSecurityGroupAssociation(ctx, "untrust", &network.SubnetNetworkSecurityGroupAssociationArgs{
// SubnetId: untrust.ID(),
// NetworkSecurityGroupId: exampleNetworkSecurityGroup.ID(),
// })
// if err != nil {
// return err
// }
// _, err = paloalto.NewNextGenerationFirewallVirtualNetworkPanorama(ctx, "example", &paloalto.NextGenerationFirewallVirtualNetworkPanoramaArgs{
// Name: pulumi.String("example-ngfwvh"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// PanoramaBase64Config: pulumi.String("e2RnbmFtZTogY25nZnctYXotZXhhbXBsZSwgdHBsbmFtZTogY25nZnctZXhhbXBsZS10ZW1wbGF0ZS1zdGFjaywgZXhhbXBsZS1wYW5vcmFtYS1zZXJ2ZXI6IDE5Mi4xNjguMC4xLCB2bS1hdXRoLWtleTogMDAwMDAwMDAwMDAwMDAwLCBleHBpcnk6IDIwMjQvMDcvMzF9Cg=="),
// NetworkProfile: &paloalto.NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileArgs{
// PublicIpAddressIds: pulumi.StringArray{
// examplePublicIp.ID(),
// },
// VnetConfiguration: &paloalto.NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileVnetConfigurationArgs{
// VirtualNetworkId: exampleVirtualNetwork.ID(),
// TrustedSubnetId: trust.ID(),
// UntrustedSubnetId: untrust.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:
//
// * `PaloAltoNetworks.Cloudngfw` - 2025-05-23
//
// ## Import
//
// Palo Alto Next Generation Firewall Virtual Network Panoramas can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:paloalto/nextGenerationFirewallVirtualNetworkPanorama:NextGenerationFirewallVirtualNetworkPanorama example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/PaloAltoNetworks.Cloudngfw/firewalls/myVNetPanoramaFW
// ```
type NextGenerationFirewallVirtualNetworkPanorama struct {
pulumi.CustomResourceState
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualNetworkPanoramaDestinationNatArrayOutput `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualNetworkPanoramaDnsSettingsPtrOutput `pulumi:"dnsSettings"`
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Network Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId pulumi.StringPtrOutput `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Panorama. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileOutput `pulumi:"networkProfile"`
// The base64 encoded configuration registration string as defined by your Panorama Server for your Cloud Device Group.
PanoramaBase64Config pulumi.StringOutput `pulumi:"panoramaBase64Config"`
// A `panorama` block as defined below.
Panoramas NextGenerationFirewallVirtualNetworkPanoramaPanoramaArrayOutput `pulumi:"panoramas"`
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId pulumi.StringPtrOutput `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Panorama.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewNextGenerationFirewallVirtualNetworkPanorama registers a new resource with the given unique name, arguments, and options.
func NewNextGenerationFirewallVirtualNetworkPanorama(ctx *pulumi.Context,
name string, args *NextGenerationFirewallVirtualNetworkPanoramaArgs, opts ...pulumi.ResourceOption) (*NextGenerationFirewallVirtualNetworkPanorama, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NetworkProfile == nil {
return nil, errors.New("invalid value for required argument 'NetworkProfile'")
}
if args.PanoramaBase64Config == nil {
return nil, errors.New("invalid value for required argument 'PanoramaBase64Config'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource NextGenerationFirewallVirtualNetworkPanorama
err := ctx.RegisterResource("azure:paloalto/nextGenerationFirewallVirtualNetworkPanorama:NextGenerationFirewallVirtualNetworkPanorama", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNextGenerationFirewallVirtualNetworkPanorama gets an existing NextGenerationFirewallVirtualNetworkPanorama 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 GetNextGenerationFirewallVirtualNetworkPanorama(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NextGenerationFirewallVirtualNetworkPanoramaState, opts ...pulumi.ResourceOption) (*NextGenerationFirewallVirtualNetworkPanorama, error) {
var resource NextGenerationFirewallVirtualNetworkPanorama
err := ctx.ReadResource("azure:paloalto/nextGenerationFirewallVirtualNetworkPanorama:NextGenerationFirewallVirtualNetworkPanorama", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NextGenerationFirewallVirtualNetworkPanorama resources.
type nextGenerationFirewallVirtualNetworkPanoramaState struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats []NextGenerationFirewallVirtualNetworkPanoramaDestinationNat `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings *NextGenerationFirewallVirtualNetworkPanoramaDnsSettings `pulumi:"dnsSettings"`
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Network Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
Location *string `pulumi:"location"`
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId *string `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Panorama. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile *NextGenerationFirewallVirtualNetworkPanoramaNetworkProfile `pulumi:"networkProfile"`
// The base64 encoded configuration registration string as defined by your Panorama Server for your Cloud Device Group.
PanoramaBase64Config *string `pulumi:"panoramaBase64Config"`
// A `panorama` block as defined below.
Panoramas []NextGenerationFirewallVirtualNetworkPanoramaPanorama `pulumi:"panoramas"`
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId *string `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Panorama.
Tags map[string]string `pulumi:"tags"`
}
type NextGenerationFirewallVirtualNetworkPanoramaState struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualNetworkPanoramaDestinationNatArrayInput
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualNetworkPanoramaDnsSettingsPtrInput
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Network Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
Location pulumi.StringPtrInput
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId pulumi.StringPtrInput
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Panorama. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualNetworkPanoramaNetworkProfilePtrInput
// The base64 encoded configuration registration string as defined by your Panorama Server for your Cloud Device Group.
PanoramaBase64Config pulumi.StringPtrInput
// A `panorama` block as defined below.
Panoramas NextGenerationFirewallVirtualNetworkPanoramaPanoramaArrayInput
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId pulumi.StringPtrInput
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Panorama.
Tags pulumi.StringMapInput
}
func (NextGenerationFirewallVirtualNetworkPanoramaState) ElementType() reflect.Type {
return reflect.TypeOf((*nextGenerationFirewallVirtualNetworkPanoramaState)(nil)).Elem()
}
type nextGenerationFirewallVirtualNetworkPanoramaArgs struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats []NextGenerationFirewallVirtualNetworkPanoramaDestinationNat `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings *NextGenerationFirewallVirtualNetworkPanoramaDnsSettings `pulumi:"dnsSettings"`
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Network Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
Location *string `pulumi:"location"`
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId *string `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Panorama. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualNetworkPanoramaNetworkProfile `pulumi:"networkProfile"`
// The base64 encoded configuration registration string as defined by your Panorama Server for your Cloud Device Group.
PanoramaBase64Config string `pulumi:"panoramaBase64Config"`
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId *string `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Panorama.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a NextGenerationFirewallVirtualNetworkPanorama resource.
type NextGenerationFirewallVirtualNetworkPanoramaArgs struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualNetworkPanoramaDestinationNatArrayInput
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualNetworkPanoramaDnsSettingsPtrInput
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Network Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
Location pulumi.StringPtrInput
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId pulumi.StringPtrInput
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Panorama. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileInput
// The base64 encoded configuration registration string as defined by your Panorama Server for your Cloud Device Group.
PanoramaBase64Config pulumi.StringInput
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId pulumi.StringPtrInput
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Panorama.
Tags pulumi.StringMapInput
}
func (NextGenerationFirewallVirtualNetworkPanoramaArgs) ElementType() reflect.Type {
return reflect.TypeOf((*nextGenerationFirewallVirtualNetworkPanoramaArgs)(nil)).Elem()
}
type NextGenerationFirewallVirtualNetworkPanoramaInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualNetworkPanoramaOutput() NextGenerationFirewallVirtualNetworkPanoramaOutput
ToNextGenerationFirewallVirtualNetworkPanoramaOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkPanoramaOutput
}
func (*NextGenerationFirewallVirtualNetworkPanorama) ElementType() reflect.Type {
return reflect.TypeOf((**NextGenerationFirewallVirtualNetworkPanorama)(nil)).Elem()
}
func (i *NextGenerationFirewallVirtualNetworkPanorama) ToNextGenerationFirewallVirtualNetworkPanoramaOutput() NextGenerationFirewallVirtualNetworkPanoramaOutput {
return i.ToNextGenerationFirewallVirtualNetworkPanoramaOutputWithContext(context.Background())
}
func (i *NextGenerationFirewallVirtualNetworkPanorama) ToNextGenerationFirewallVirtualNetworkPanoramaOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkPanoramaOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualNetworkPanoramaOutput)
}
// NextGenerationFirewallVirtualNetworkPanoramaArrayInput is an input type that accepts NextGenerationFirewallVirtualNetworkPanoramaArray and NextGenerationFirewallVirtualNetworkPanoramaArrayOutput values.
// You can construct a concrete instance of `NextGenerationFirewallVirtualNetworkPanoramaArrayInput` via:
//
// NextGenerationFirewallVirtualNetworkPanoramaArray{ NextGenerationFirewallVirtualNetworkPanoramaArgs{...} }
type NextGenerationFirewallVirtualNetworkPanoramaArrayInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualNetworkPanoramaArrayOutput() NextGenerationFirewallVirtualNetworkPanoramaArrayOutput
ToNextGenerationFirewallVirtualNetworkPanoramaArrayOutputWithContext(context.Context) NextGenerationFirewallVirtualNetworkPanoramaArrayOutput
}
type NextGenerationFirewallVirtualNetworkPanoramaArray []NextGenerationFirewallVirtualNetworkPanoramaInput
func (NextGenerationFirewallVirtualNetworkPanoramaArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NextGenerationFirewallVirtualNetworkPanorama)(nil)).Elem()
}
func (i NextGenerationFirewallVirtualNetworkPanoramaArray) ToNextGenerationFirewallVirtualNetworkPanoramaArrayOutput() NextGenerationFirewallVirtualNetworkPanoramaArrayOutput {
return i.ToNextGenerationFirewallVirtualNetworkPanoramaArrayOutputWithContext(context.Background())
}
func (i NextGenerationFirewallVirtualNetworkPanoramaArray) ToNextGenerationFirewallVirtualNetworkPanoramaArrayOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkPanoramaArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualNetworkPanoramaArrayOutput)
}
// NextGenerationFirewallVirtualNetworkPanoramaMapInput is an input type that accepts NextGenerationFirewallVirtualNetworkPanoramaMap and NextGenerationFirewallVirtualNetworkPanoramaMapOutput values.
// You can construct a concrete instance of `NextGenerationFirewallVirtualNetworkPanoramaMapInput` via:
//
// NextGenerationFirewallVirtualNetworkPanoramaMap{ "key": NextGenerationFirewallVirtualNetworkPanoramaArgs{...} }
type NextGenerationFirewallVirtualNetworkPanoramaMapInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualNetworkPanoramaMapOutput() NextGenerationFirewallVirtualNetworkPanoramaMapOutput
ToNextGenerationFirewallVirtualNetworkPanoramaMapOutputWithContext(context.Context) NextGenerationFirewallVirtualNetworkPanoramaMapOutput
}
type NextGenerationFirewallVirtualNetworkPanoramaMap map[string]NextGenerationFirewallVirtualNetworkPanoramaInput
func (NextGenerationFirewallVirtualNetworkPanoramaMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NextGenerationFirewallVirtualNetworkPanorama)(nil)).Elem()
}
func (i NextGenerationFirewallVirtualNetworkPanoramaMap) ToNextGenerationFirewallVirtualNetworkPanoramaMapOutput() NextGenerationFirewallVirtualNetworkPanoramaMapOutput {
return i.ToNextGenerationFirewallVirtualNetworkPanoramaMapOutputWithContext(context.Background())
}
func (i NextGenerationFirewallVirtualNetworkPanoramaMap) ToNextGenerationFirewallVirtualNetworkPanoramaMapOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkPanoramaMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualNetworkPanoramaMapOutput)
}
type NextGenerationFirewallVirtualNetworkPanoramaOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualNetworkPanoramaOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NextGenerationFirewallVirtualNetworkPanorama)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualNetworkPanoramaOutput) ToNextGenerationFirewallVirtualNetworkPanoramaOutput() NextGenerationFirewallVirtualNetworkPanoramaOutput {
return o
}
func (o NextGenerationFirewallVirtualNetworkPanoramaOutput) ToNextGenerationFirewallVirtualNetworkPanoramaOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkPanoramaOutput {
return o
}
// One or more `destinationNat` blocks as defined below.
func (o NextGenerationFirewallVirtualNetworkPanoramaOutput) DestinationNats() NextGenerationFirewallVirtualNetworkPanoramaDestinationNatArrayOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkPanorama) NextGenerationFirewallVirtualNetworkPanoramaDestinationNatArrayOutput {
return v.DestinationNats
}).(NextGenerationFirewallVirtualNetworkPanoramaDestinationNatArrayOutput)
}
// A `dnsSettings` block as defined below.
func (o NextGenerationFirewallVirtualNetworkPanoramaOutput) DnsSettings() NextGenerationFirewallVirtualNetworkPanoramaDnsSettingsPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkPanorama) NextGenerationFirewallVirtualNetworkPanoramaDnsSettingsPtrOutput {
return v.DnsSettings
}).(NextGenerationFirewallVirtualNetworkPanoramaDnsSettingsPtrOutput)
}
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Network Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
func (o NextGenerationFirewallVirtualNetworkPanoramaOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkPanorama) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
func (o NextGenerationFirewallVirtualNetworkPanoramaOutput) MarketplaceOfferId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkPanorama) pulumi.StringPtrOutput {
return v.MarketplaceOfferId
}).(pulumi.StringPtrOutput)
}
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Panorama. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
func (o NextGenerationFirewallVirtualNetworkPanoramaOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkPanorama) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `networkProfile` block as defined below.
func (o NextGenerationFirewallVirtualNetworkPanoramaOutput) NetworkProfile() NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkPanorama) NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileOutput {
return v.NetworkProfile
}).(NextGenerationFirewallVirtualNetworkPanoramaNetworkProfileOutput)
}
// The base64 encoded configuration registration string as defined by your Panorama Server for your Cloud Device Group.
func (o NextGenerationFirewallVirtualNetworkPanoramaOutput) PanoramaBase64Config() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkPanorama) pulumi.StringOutput {
return v.PanoramaBase64Config
}).(pulumi.StringOutput)
}
// A `panorama` block as defined below.
func (o NextGenerationFirewallVirtualNetworkPanoramaOutput) Panoramas() NextGenerationFirewallVirtualNetworkPanoramaPanoramaArrayOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkPanorama) NextGenerationFirewallVirtualNetworkPanoramaPanoramaArrayOutput {
return v.Panoramas
}).(NextGenerationFirewallVirtualNetworkPanoramaPanoramaArrayOutput)
}
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
func (o NextGenerationFirewallVirtualNetworkPanoramaOutput) PlanId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkPanorama) pulumi.StringPtrOutput { return v.PlanId }).(pulumi.StringPtrOutput)
}
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Panorama to be created.
func (o NextGenerationFirewallVirtualNetworkPanoramaOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkPanorama) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Panorama.
func (o NextGenerationFirewallVirtualNetworkPanoramaOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkPanorama) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type NextGenerationFirewallVirtualNetworkPanoramaArrayOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualNetworkPanoramaArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NextGenerationFirewallVirtualNetworkPanorama)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualNetworkPanoramaArrayOutput) ToNextGenerationFirewallVirtualNetworkPanoramaArrayOutput() NextGenerationFirewallVirtualNetworkPanoramaArrayOutput {
return o
}
func (o NextGenerationFirewallVirtualNetworkPanoramaArrayOutput) ToNextGenerationFirewallVirtualNetworkPanoramaArrayOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkPanoramaArrayOutput {
return o
}
func (o NextGenerationFirewallVirtualNetworkPanoramaArrayOutput) Index(i pulumi.IntInput) NextGenerationFirewallVirtualNetworkPanoramaOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NextGenerationFirewallVirtualNetworkPanorama {
return vs[0].([]*NextGenerationFirewallVirtualNetworkPanorama)[vs[1].(int)]
}).(NextGenerationFirewallVirtualNetworkPanoramaOutput)
}
type NextGenerationFirewallVirtualNetworkPanoramaMapOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualNetworkPanoramaMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NextGenerationFirewallVirtualNetworkPanorama)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualNetworkPanoramaMapOutput) ToNextGenerationFirewallVirtualNetworkPanoramaMapOutput() NextGenerationFirewallVirtualNetworkPanoramaMapOutput {
return o
}
func (o NextGenerationFirewallVirtualNetworkPanoramaMapOutput) ToNextGenerationFirewallVirtualNetworkPanoramaMapOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkPanoramaMapOutput {
return o
}
func (o NextGenerationFirewallVirtualNetworkPanoramaMapOutput) MapIndex(k pulumi.StringInput) NextGenerationFirewallVirtualNetworkPanoramaOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NextGenerationFirewallVirtualNetworkPanorama {
return vs[0].(map[string]*NextGenerationFirewallVirtualNetworkPanorama)[vs[1].(string)]
}).(NextGenerationFirewallVirtualNetworkPanoramaOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualNetworkPanoramaInput)(nil)).Elem(), &NextGenerationFirewallVirtualNetworkPanorama{})
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualNetworkPanoramaArrayInput)(nil)).Elem(), NextGenerationFirewallVirtualNetworkPanoramaArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualNetworkPanoramaMapInput)(nil)).Elem(), NextGenerationFirewallVirtualNetworkPanoramaMap{})
pulumi.RegisterOutputType(NextGenerationFirewallVirtualNetworkPanoramaOutput{})
pulumi.RegisterOutputType(NextGenerationFirewallVirtualNetworkPanoramaArrayOutput{})
pulumi.RegisterOutputType(NextGenerationFirewallVirtualNetworkPanoramaMapOutput{})
}
| 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/paloalto/nextGenerationFirewallVirtualHubLocalRulestack.go | sdk/go/azure/paloalto/nextGenerationFirewallVirtualHubLocalRulestack.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 paloalto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Palo Alto Next Generation Firewall VHub Local Rulestack.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/paloalto"
// "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
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("acceptanceTestPublicIp1"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AllocationMethod: pulumi.String("Static"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{
// Name: pulumi.String("example-virtualwan"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{
// Name: pulumi.String("example-virtualhub"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// VirtualWanId: exampleVirtualWan.ID(),
// AddressPrefix: pulumi.String("10.0.0.0/23"),
// Tags: pulumi.StringMap{
// "hubSaaSPreview": pulumi.String("true"),
// },
// })
// if err != nil {
// return err
// }
// exampleVirtualNetworkAppliance, err := paloalto.NewVirtualNetworkAppliance(ctx, "example", &paloalto.VirtualNetworkApplianceArgs{
// Name: pulumi.String("example-appliance"),
// VirtualHubId: exampleVirtualHub.ID(),
// })
// if err != nil {
// return err
// }
// _, err = paloalto.NewNextGenerationFirewallVirtualHubLocalRulestack(ctx, "example", &paloalto.NextGenerationFirewallVirtualHubLocalRulestackArgs{
// Name: pulumi.String("example-ngfwvn"),
// ResourceGroupName: example.Name,
// RulestackId: pulumi.Any(exampleAzurermPaloAltoLocalRulestack.Id),
// NetworkProfile: &paloalto.NextGenerationFirewallVirtualHubLocalRulestackNetworkProfileArgs{
// PublicIpAddressIds: pulumi.StringArray{
// examplePublicIp.ID(),
// },
// VirtualHubId: exampleVirtualHub.ID(),
// NetworkVirtualApplianceId: exampleVirtualNetworkAppliance.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:
//
// * `PaloAltoNetworks.Cloudngfw` - 2025-05-23, 2022-08-29
//
// ## Import
//
// Palo Alto Next Generation Firewall VHub Local Rulestacks can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:paloalto/nextGenerationFirewallVirtualHubLocalRulestack:NextGenerationFirewallVirtualHubLocalRulestack example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/PaloAltoNetworks.Cloudngfw/firewalls/myVhubRulestackFW
// ```
type NextGenerationFirewallVirtualHubLocalRulestack struct {
pulumi.CustomResourceState
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualHubLocalRulestackDestinationNatArrayOutput `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualHubLocalRulestackDnsSettingsPtrOutput `pulumi:"dnsSettings"`
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId pulumi.StringPtrOutput `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall VHub Local Rulestack. Changing this forces a new Palo Alto Next Generation Firewall VHub Local Rulestack to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualHubLocalRulestackNetworkProfileOutput `pulumi:"networkProfile"`
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId pulumi.StringPtrOutput `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall VHub Local Rulestack should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Local Rulestack to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The ID of the Local Rulestack to be used for this Next Generation Firewall.
RulestackId pulumi.StringOutput `pulumi:"rulestackId"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall VHub Local Rulestack.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewNextGenerationFirewallVirtualHubLocalRulestack registers a new resource with the given unique name, arguments, and options.
func NewNextGenerationFirewallVirtualHubLocalRulestack(ctx *pulumi.Context,
name string, args *NextGenerationFirewallVirtualHubLocalRulestackArgs, opts ...pulumi.ResourceOption) (*NextGenerationFirewallVirtualHubLocalRulestack, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NetworkProfile == nil {
return nil, errors.New("invalid value for required argument 'NetworkProfile'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.RulestackId == nil {
return nil, errors.New("invalid value for required argument 'RulestackId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource NextGenerationFirewallVirtualHubLocalRulestack
err := ctx.RegisterResource("azure:paloalto/nextGenerationFirewallVirtualHubLocalRulestack:NextGenerationFirewallVirtualHubLocalRulestack", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNextGenerationFirewallVirtualHubLocalRulestack gets an existing NextGenerationFirewallVirtualHubLocalRulestack 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 GetNextGenerationFirewallVirtualHubLocalRulestack(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NextGenerationFirewallVirtualHubLocalRulestackState, opts ...pulumi.ResourceOption) (*NextGenerationFirewallVirtualHubLocalRulestack, error) {
var resource NextGenerationFirewallVirtualHubLocalRulestack
err := ctx.ReadResource("azure:paloalto/nextGenerationFirewallVirtualHubLocalRulestack:NextGenerationFirewallVirtualHubLocalRulestack", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NextGenerationFirewallVirtualHubLocalRulestack resources.
type nextGenerationFirewallVirtualHubLocalRulestackState struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats []NextGenerationFirewallVirtualHubLocalRulestackDestinationNat `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings *NextGenerationFirewallVirtualHubLocalRulestackDnsSettings `pulumi:"dnsSettings"`
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId *string `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall VHub Local Rulestack. Changing this forces a new Palo Alto Next Generation Firewall VHub Local Rulestack to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile *NextGenerationFirewallVirtualHubLocalRulestackNetworkProfile `pulumi:"networkProfile"`
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId *string `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall VHub Local Rulestack should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Local Rulestack to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The ID of the Local Rulestack to be used for this Next Generation Firewall.
RulestackId *string `pulumi:"rulestackId"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall VHub Local Rulestack.
Tags map[string]string `pulumi:"tags"`
}
type NextGenerationFirewallVirtualHubLocalRulestackState struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualHubLocalRulestackDestinationNatArrayInput
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualHubLocalRulestackDnsSettingsPtrInput
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId pulumi.StringPtrInput
// The name which should be used for this Palo Alto Next Generation Firewall VHub Local Rulestack. Changing this forces a new Palo Alto Next Generation Firewall VHub Local Rulestack to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualHubLocalRulestackNetworkProfilePtrInput
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId pulumi.StringPtrInput
// The name of the Resource Group where the Palo Alto Next Generation Firewall VHub Local Rulestack should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Local Rulestack to be created.
ResourceGroupName pulumi.StringPtrInput
// The ID of the Local Rulestack to be used for this Next Generation Firewall.
RulestackId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall VHub Local Rulestack.
Tags pulumi.StringMapInput
}
func (NextGenerationFirewallVirtualHubLocalRulestackState) ElementType() reflect.Type {
return reflect.TypeOf((*nextGenerationFirewallVirtualHubLocalRulestackState)(nil)).Elem()
}
type nextGenerationFirewallVirtualHubLocalRulestackArgs struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats []NextGenerationFirewallVirtualHubLocalRulestackDestinationNat `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings *NextGenerationFirewallVirtualHubLocalRulestackDnsSettings `pulumi:"dnsSettings"`
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId *string `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall VHub Local Rulestack. Changing this forces a new Palo Alto Next Generation Firewall VHub Local Rulestack to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualHubLocalRulestackNetworkProfile `pulumi:"networkProfile"`
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId *string `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall VHub Local Rulestack should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Local Rulestack to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The ID of the Local Rulestack to be used for this Next Generation Firewall.
RulestackId string `pulumi:"rulestackId"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall VHub Local Rulestack.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a NextGenerationFirewallVirtualHubLocalRulestack resource.
type NextGenerationFirewallVirtualHubLocalRulestackArgs struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualHubLocalRulestackDestinationNatArrayInput
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualHubLocalRulestackDnsSettingsPtrInput
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId pulumi.StringPtrInput
// The name which should be used for this Palo Alto Next Generation Firewall VHub Local Rulestack. Changing this forces a new Palo Alto Next Generation Firewall VHub Local Rulestack to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualHubLocalRulestackNetworkProfileInput
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId pulumi.StringPtrInput
// The name of the Resource Group where the Palo Alto Next Generation Firewall VHub Local Rulestack should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Local Rulestack to be created.
ResourceGroupName pulumi.StringInput
// The ID of the Local Rulestack to be used for this Next Generation Firewall.
RulestackId pulumi.StringInput
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall VHub Local Rulestack.
Tags pulumi.StringMapInput
}
func (NextGenerationFirewallVirtualHubLocalRulestackArgs) ElementType() reflect.Type {
return reflect.TypeOf((*nextGenerationFirewallVirtualHubLocalRulestackArgs)(nil)).Elem()
}
type NextGenerationFirewallVirtualHubLocalRulestackInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualHubLocalRulestackOutput() NextGenerationFirewallVirtualHubLocalRulestackOutput
ToNextGenerationFirewallVirtualHubLocalRulestackOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubLocalRulestackOutput
}
func (*NextGenerationFirewallVirtualHubLocalRulestack) ElementType() reflect.Type {
return reflect.TypeOf((**NextGenerationFirewallVirtualHubLocalRulestack)(nil)).Elem()
}
func (i *NextGenerationFirewallVirtualHubLocalRulestack) ToNextGenerationFirewallVirtualHubLocalRulestackOutput() NextGenerationFirewallVirtualHubLocalRulestackOutput {
return i.ToNextGenerationFirewallVirtualHubLocalRulestackOutputWithContext(context.Background())
}
func (i *NextGenerationFirewallVirtualHubLocalRulestack) ToNextGenerationFirewallVirtualHubLocalRulestackOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubLocalRulestackOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualHubLocalRulestackOutput)
}
// NextGenerationFirewallVirtualHubLocalRulestackArrayInput is an input type that accepts NextGenerationFirewallVirtualHubLocalRulestackArray and NextGenerationFirewallVirtualHubLocalRulestackArrayOutput values.
// You can construct a concrete instance of `NextGenerationFirewallVirtualHubLocalRulestackArrayInput` via:
//
// NextGenerationFirewallVirtualHubLocalRulestackArray{ NextGenerationFirewallVirtualHubLocalRulestackArgs{...} }
type NextGenerationFirewallVirtualHubLocalRulestackArrayInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualHubLocalRulestackArrayOutput() NextGenerationFirewallVirtualHubLocalRulestackArrayOutput
ToNextGenerationFirewallVirtualHubLocalRulestackArrayOutputWithContext(context.Context) NextGenerationFirewallVirtualHubLocalRulestackArrayOutput
}
type NextGenerationFirewallVirtualHubLocalRulestackArray []NextGenerationFirewallVirtualHubLocalRulestackInput
func (NextGenerationFirewallVirtualHubLocalRulestackArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NextGenerationFirewallVirtualHubLocalRulestack)(nil)).Elem()
}
func (i NextGenerationFirewallVirtualHubLocalRulestackArray) ToNextGenerationFirewallVirtualHubLocalRulestackArrayOutput() NextGenerationFirewallVirtualHubLocalRulestackArrayOutput {
return i.ToNextGenerationFirewallVirtualHubLocalRulestackArrayOutputWithContext(context.Background())
}
func (i NextGenerationFirewallVirtualHubLocalRulestackArray) ToNextGenerationFirewallVirtualHubLocalRulestackArrayOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubLocalRulestackArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualHubLocalRulestackArrayOutput)
}
// NextGenerationFirewallVirtualHubLocalRulestackMapInput is an input type that accepts NextGenerationFirewallVirtualHubLocalRulestackMap and NextGenerationFirewallVirtualHubLocalRulestackMapOutput values.
// You can construct a concrete instance of `NextGenerationFirewallVirtualHubLocalRulestackMapInput` via:
//
// NextGenerationFirewallVirtualHubLocalRulestackMap{ "key": NextGenerationFirewallVirtualHubLocalRulestackArgs{...} }
type NextGenerationFirewallVirtualHubLocalRulestackMapInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualHubLocalRulestackMapOutput() NextGenerationFirewallVirtualHubLocalRulestackMapOutput
ToNextGenerationFirewallVirtualHubLocalRulestackMapOutputWithContext(context.Context) NextGenerationFirewallVirtualHubLocalRulestackMapOutput
}
type NextGenerationFirewallVirtualHubLocalRulestackMap map[string]NextGenerationFirewallVirtualHubLocalRulestackInput
func (NextGenerationFirewallVirtualHubLocalRulestackMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NextGenerationFirewallVirtualHubLocalRulestack)(nil)).Elem()
}
func (i NextGenerationFirewallVirtualHubLocalRulestackMap) ToNextGenerationFirewallVirtualHubLocalRulestackMapOutput() NextGenerationFirewallVirtualHubLocalRulestackMapOutput {
return i.ToNextGenerationFirewallVirtualHubLocalRulestackMapOutputWithContext(context.Background())
}
func (i NextGenerationFirewallVirtualHubLocalRulestackMap) ToNextGenerationFirewallVirtualHubLocalRulestackMapOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubLocalRulestackMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualHubLocalRulestackMapOutput)
}
type NextGenerationFirewallVirtualHubLocalRulestackOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualHubLocalRulestackOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NextGenerationFirewallVirtualHubLocalRulestack)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualHubLocalRulestackOutput) ToNextGenerationFirewallVirtualHubLocalRulestackOutput() NextGenerationFirewallVirtualHubLocalRulestackOutput {
return o
}
func (o NextGenerationFirewallVirtualHubLocalRulestackOutput) ToNextGenerationFirewallVirtualHubLocalRulestackOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubLocalRulestackOutput {
return o
}
// One or more `destinationNat` blocks as defined below.
func (o NextGenerationFirewallVirtualHubLocalRulestackOutput) DestinationNats() NextGenerationFirewallVirtualHubLocalRulestackDestinationNatArrayOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubLocalRulestack) NextGenerationFirewallVirtualHubLocalRulestackDestinationNatArrayOutput {
return v.DestinationNats
}).(NextGenerationFirewallVirtualHubLocalRulestackDestinationNatArrayOutput)
}
// A `dnsSettings` block as defined below.
func (o NextGenerationFirewallVirtualHubLocalRulestackOutput) DnsSettings() NextGenerationFirewallVirtualHubLocalRulestackDnsSettingsPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubLocalRulestack) NextGenerationFirewallVirtualHubLocalRulestackDnsSettingsPtrOutput {
return v.DnsSettings
}).(NextGenerationFirewallVirtualHubLocalRulestackDnsSettingsPtrOutput)
}
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
func (o NextGenerationFirewallVirtualHubLocalRulestackOutput) MarketplaceOfferId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubLocalRulestack) pulumi.StringPtrOutput {
return v.MarketplaceOfferId
}).(pulumi.StringPtrOutput)
}
// The name which should be used for this Palo Alto Next Generation Firewall VHub Local Rulestack. Changing this forces a new Palo Alto Next Generation Firewall VHub Local Rulestack to be created.
func (o NextGenerationFirewallVirtualHubLocalRulestackOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubLocalRulestack) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `networkProfile` block as defined below.
func (o NextGenerationFirewallVirtualHubLocalRulestackOutput) NetworkProfile() NextGenerationFirewallVirtualHubLocalRulestackNetworkProfileOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubLocalRulestack) NextGenerationFirewallVirtualHubLocalRulestackNetworkProfileOutput {
return v.NetworkProfile
}).(NextGenerationFirewallVirtualHubLocalRulestackNetworkProfileOutput)
}
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
func (o NextGenerationFirewallVirtualHubLocalRulestackOutput) PlanId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubLocalRulestack) pulumi.StringPtrOutput { return v.PlanId }).(pulumi.StringPtrOutput)
}
// The name of the Resource Group where the Palo Alto Next Generation Firewall VHub Local Rulestack should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Local Rulestack to be created.
func (o NextGenerationFirewallVirtualHubLocalRulestackOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubLocalRulestack) pulumi.StringOutput {
return v.ResourceGroupName
}).(pulumi.StringOutput)
}
// The ID of the Local Rulestack to be used for this Next Generation Firewall.
func (o NextGenerationFirewallVirtualHubLocalRulestackOutput) RulestackId() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubLocalRulestack) pulumi.StringOutput { return v.RulestackId }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall VHub Local Rulestack.
func (o NextGenerationFirewallVirtualHubLocalRulestackOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubLocalRulestack) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type NextGenerationFirewallVirtualHubLocalRulestackArrayOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualHubLocalRulestackArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NextGenerationFirewallVirtualHubLocalRulestack)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualHubLocalRulestackArrayOutput) ToNextGenerationFirewallVirtualHubLocalRulestackArrayOutput() NextGenerationFirewallVirtualHubLocalRulestackArrayOutput {
return o
}
func (o NextGenerationFirewallVirtualHubLocalRulestackArrayOutput) ToNextGenerationFirewallVirtualHubLocalRulestackArrayOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubLocalRulestackArrayOutput {
return o
}
func (o NextGenerationFirewallVirtualHubLocalRulestackArrayOutput) Index(i pulumi.IntInput) NextGenerationFirewallVirtualHubLocalRulestackOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NextGenerationFirewallVirtualHubLocalRulestack {
return vs[0].([]*NextGenerationFirewallVirtualHubLocalRulestack)[vs[1].(int)]
}).(NextGenerationFirewallVirtualHubLocalRulestackOutput)
}
type NextGenerationFirewallVirtualHubLocalRulestackMapOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualHubLocalRulestackMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NextGenerationFirewallVirtualHubLocalRulestack)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualHubLocalRulestackMapOutput) ToNextGenerationFirewallVirtualHubLocalRulestackMapOutput() NextGenerationFirewallVirtualHubLocalRulestackMapOutput {
return o
}
func (o NextGenerationFirewallVirtualHubLocalRulestackMapOutput) ToNextGenerationFirewallVirtualHubLocalRulestackMapOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubLocalRulestackMapOutput {
return o
}
func (o NextGenerationFirewallVirtualHubLocalRulestackMapOutput) MapIndex(k pulumi.StringInput) NextGenerationFirewallVirtualHubLocalRulestackOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NextGenerationFirewallVirtualHubLocalRulestack {
return vs[0].(map[string]*NextGenerationFirewallVirtualHubLocalRulestack)[vs[1].(string)]
}).(NextGenerationFirewallVirtualHubLocalRulestackOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualHubLocalRulestackInput)(nil)).Elem(), &NextGenerationFirewallVirtualHubLocalRulestack{})
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualHubLocalRulestackArrayInput)(nil)).Elem(), NextGenerationFirewallVirtualHubLocalRulestackArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualHubLocalRulestackMapInput)(nil)).Elem(), NextGenerationFirewallVirtualHubLocalRulestackMap{})
pulumi.RegisterOutputType(NextGenerationFirewallVirtualHubLocalRulestackOutput{})
pulumi.RegisterOutputType(NextGenerationFirewallVirtualHubLocalRulestackArrayOutput{})
pulumi.RegisterOutputType(NextGenerationFirewallVirtualHubLocalRulestackMapOutput{})
}
| 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/paloalto/localRulestackOutboundTrustCertificateAssociation.go | sdk/go/azure/paloalto/localRulestackOutboundTrustCertificateAssociation.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 paloalto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Palo Alto Networks Rulestack Outbound Trust Certificate Association.
//
// ## 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/paloalto"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("rg-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleLocalRulestack, err := paloalto.NewLocalRulestack(ctx, "example", &paloalto.LocalRulestackArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleLocalRulestackCertificate, err := paloalto.NewLocalRulestackCertificate(ctx, "example", &paloalto.LocalRulestackCertificateArgs{
// Name: pulumi.String("example"),
// RulestackId: exampleLocalRulestack.ID(),
// SelfSigned: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = paloalto.NewLocalRulestackOutboundTrustCertificateAssociation(ctx, "example", &paloalto.LocalRulestackOutboundTrustCertificateAssociationArgs{
// CertificateId: exampleLocalRulestackCertificate.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:
//
// * `PaloAltoNetworks.Cloudngfw` - 2022-08-29
type LocalRulestackOutboundTrustCertificateAssociation struct {
pulumi.CustomResourceState
// The ID of the Certificate to use as the Outbound Trust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Trust Certificate Association to be created.
CertificateId pulumi.StringOutput `pulumi:"certificateId"`
}
// NewLocalRulestackOutboundTrustCertificateAssociation registers a new resource with the given unique name, arguments, and options.
func NewLocalRulestackOutboundTrustCertificateAssociation(ctx *pulumi.Context,
name string, args *LocalRulestackOutboundTrustCertificateAssociationArgs, opts ...pulumi.ResourceOption) (*LocalRulestackOutboundTrustCertificateAssociation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CertificateId == nil {
return nil, errors.New("invalid value for required argument 'CertificateId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource LocalRulestackOutboundTrustCertificateAssociation
err := ctx.RegisterResource("azure:paloalto/localRulestackOutboundTrustCertificateAssociation:LocalRulestackOutboundTrustCertificateAssociation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLocalRulestackOutboundTrustCertificateAssociation gets an existing LocalRulestackOutboundTrustCertificateAssociation 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 GetLocalRulestackOutboundTrustCertificateAssociation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LocalRulestackOutboundTrustCertificateAssociationState, opts ...pulumi.ResourceOption) (*LocalRulestackOutboundTrustCertificateAssociation, error) {
var resource LocalRulestackOutboundTrustCertificateAssociation
err := ctx.ReadResource("azure:paloalto/localRulestackOutboundTrustCertificateAssociation:LocalRulestackOutboundTrustCertificateAssociation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LocalRulestackOutboundTrustCertificateAssociation resources.
type localRulestackOutboundTrustCertificateAssociationState struct {
// The ID of the Certificate to use as the Outbound Trust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Trust Certificate Association to be created.
CertificateId *string `pulumi:"certificateId"`
}
type LocalRulestackOutboundTrustCertificateAssociationState struct {
// The ID of the Certificate to use as the Outbound Trust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Trust Certificate Association to be created.
CertificateId pulumi.StringPtrInput
}
func (LocalRulestackOutboundTrustCertificateAssociationState) ElementType() reflect.Type {
return reflect.TypeOf((*localRulestackOutboundTrustCertificateAssociationState)(nil)).Elem()
}
type localRulestackOutboundTrustCertificateAssociationArgs struct {
// The ID of the Certificate to use as the Outbound Trust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Trust Certificate Association to be created.
CertificateId string `pulumi:"certificateId"`
}
// The set of arguments for constructing a LocalRulestackOutboundTrustCertificateAssociation resource.
type LocalRulestackOutboundTrustCertificateAssociationArgs struct {
// The ID of the Certificate to use as the Outbound Trust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Trust Certificate Association to be created.
CertificateId pulumi.StringInput
}
func (LocalRulestackOutboundTrustCertificateAssociationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*localRulestackOutboundTrustCertificateAssociationArgs)(nil)).Elem()
}
type LocalRulestackOutboundTrustCertificateAssociationInput interface {
pulumi.Input
ToLocalRulestackOutboundTrustCertificateAssociationOutput() LocalRulestackOutboundTrustCertificateAssociationOutput
ToLocalRulestackOutboundTrustCertificateAssociationOutputWithContext(ctx context.Context) LocalRulestackOutboundTrustCertificateAssociationOutput
}
func (*LocalRulestackOutboundTrustCertificateAssociation) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackOutboundTrustCertificateAssociation)(nil)).Elem()
}
func (i *LocalRulestackOutboundTrustCertificateAssociation) ToLocalRulestackOutboundTrustCertificateAssociationOutput() LocalRulestackOutboundTrustCertificateAssociationOutput {
return i.ToLocalRulestackOutboundTrustCertificateAssociationOutputWithContext(context.Background())
}
func (i *LocalRulestackOutboundTrustCertificateAssociation) ToLocalRulestackOutboundTrustCertificateAssociationOutputWithContext(ctx context.Context) LocalRulestackOutboundTrustCertificateAssociationOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackOutboundTrustCertificateAssociationOutput)
}
// LocalRulestackOutboundTrustCertificateAssociationArrayInput is an input type that accepts LocalRulestackOutboundTrustCertificateAssociationArray and LocalRulestackOutboundTrustCertificateAssociationArrayOutput values.
// You can construct a concrete instance of `LocalRulestackOutboundTrustCertificateAssociationArrayInput` via:
//
// LocalRulestackOutboundTrustCertificateAssociationArray{ LocalRulestackOutboundTrustCertificateAssociationArgs{...} }
type LocalRulestackOutboundTrustCertificateAssociationArrayInput interface {
pulumi.Input
ToLocalRulestackOutboundTrustCertificateAssociationArrayOutput() LocalRulestackOutboundTrustCertificateAssociationArrayOutput
ToLocalRulestackOutboundTrustCertificateAssociationArrayOutputWithContext(context.Context) LocalRulestackOutboundTrustCertificateAssociationArrayOutput
}
type LocalRulestackOutboundTrustCertificateAssociationArray []LocalRulestackOutboundTrustCertificateAssociationInput
func (LocalRulestackOutboundTrustCertificateAssociationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalRulestackOutboundTrustCertificateAssociation)(nil)).Elem()
}
func (i LocalRulestackOutboundTrustCertificateAssociationArray) ToLocalRulestackOutboundTrustCertificateAssociationArrayOutput() LocalRulestackOutboundTrustCertificateAssociationArrayOutput {
return i.ToLocalRulestackOutboundTrustCertificateAssociationArrayOutputWithContext(context.Background())
}
func (i LocalRulestackOutboundTrustCertificateAssociationArray) ToLocalRulestackOutboundTrustCertificateAssociationArrayOutputWithContext(ctx context.Context) LocalRulestackOutboundTrustCertificateAssociationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackOutboundTrustCertificateAssociationArrayOutput)
}
// LocalRulestackOutboundTrustCertificateAssociationMapInput is an input type that accepts LocalRulestackOutboundTrustCertificateAssociationMap and LocalRulestackOutboundTrustCertificateAssociationMapOutput values.
// You can construct a concrete instance of `LocalRulestackOutboundTrustCertificateAssociationMapInput` via:
//
// LocalRulestackOutboundTrustCertificateAssociationMap{ "key": LocalRulestackOutboundTrustCertificateAssociationArgs{...} }
type LocalRulestackOutboundTrustCertificateAssociationMapInput interface {
pulumi.Input
ToLocalRulestackOutboundTrustCertificateAssociationMapOutput() LocalRulestackOutboundTrustCertificateAssociationMapOutput
ToLocalRulestackOutboundTrustCertificateAssociationMapOutputWithContext(context.Context) LocalRulestackOutboundTrustCertificateAssociationMapOutput
}
type LocalRulestackOutboundTrustCertificateAssociationMap map[string]LocalRulestackOutboundTrustCertificateAssociationInput
func (LocalRulestackOutboundTrustCertificateAssociationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalRulestackOutboundTrustCertificateAssociation)(nil)).Elem()
}
func (i LocalRulestackOutboundTrustCertificateAssociationMap) ToLocalRulestackOutboundTrustCertificateAssociationMapOutput() LocalRulestackOutboundTrustCertificateAssociationMapOutput {
return i.ToLocalRulestackOutboundTrustCertificateAssociationMapOutputWithContext(context.Background())
}
func (i LocalRulestackOutboundTrustCertificateAssociationMap) ToLocalRulestackOutboundTrustCertificateAssociationMapOutputWithContext(ctx context.Context) LocalRulestackOutboundTrustCertificateAssociationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackOutboundTrustCertificateAssociationMapOutput)
}
type LocalRulestackOutboundTrustCertificateAssociationOutput struct{ *pulumi.OutputState }
func (LocalRulestackOutboundTrustCertificateAssociationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackOutboundTrustCertificateAssociation)(nil)).Elem()
}
func (o LocalRulestackOutboundTrustCertificateAssociationOutput) ToLocalRulestackOutboundTrustCertificateAssociationOutput() LocalRulestackOutboundTrustCertificateAssociationOutput {
return o
}
func (o LocalRulestackOutboundTrustCertificateAssociationOutput) ToLocalRulestackOutboundTrustCertificateAssociationOutputWithContext(ctx context.Context) LocalRulestackOutboundTrustCertificateAssociationOutput {
return o
}
// The ID of the Certificate to use as the Outbound Trust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Trust Certificate Association to be created.
func (o LocalRulestackOutboundTrustCertificateAssociationOutput) CertificateId() pulumi.StringOutput {
return o.ApplyT(func(v *LocalRulestackOutboundTrustCertificateAssociation) pulumi.StringOutput { return v.CertificateId }).(pulumi.StringOutput)
}
type LocalRulestackOutboundTrustCertificateAssociationArrayOutput struct{ *pulumi.OutputState }
func (LocalRulestackOutboundTrustCertificateAssociationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalRulestackOutboundTrustCertificateAssociation)(nil)).Elem()
}
func (o LocalRulestackOutboundTrustCertificateAssociationArrayOutput) ToLocalRulestackOutboundTrustCertificateAssociationArrayOutput() LocalRulestackOutboundTrustCertificateAssociationArrayOutput {
return o
}
func (o LocalRulestackOutboundTrustCertificateAssociationArrayOutput) ToLocalRulestackOutboundTrustCertificateAssociationArrayOutputWithContext(ctx context.Context) LocalRulestackOutboundTrustCertificateAssociationArrayOutput {
return o
}
func (o LocalRulestackOutboundTrustCertificateAssociationArrayOutput) Index(i pulumi.IntInput) LocalRulestackOutboundTrustCertificateAssociationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LocalRulestackOutboundTrustCertificateAssociation {
return vs[0].([]*LocalRulestackOutboundTrustCertificateAssociation)[vs[1].(int)]
}).(LocalRulestackOutboundTrustCertificateAssociationOutput)
}
type LocalRulestackOutboundTrustCertificateAssociationMapOutput struct{ *pulumi.OutputState }
func (LocalRulestackOutboundTrustCertificateAssociationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalRulestackOutboundTrustCertificateAssociation)(nil)).Elem()
}
func (o LocalRulestackOutboundTrustCertificateAssociationMapOutput) ToLocalRulestackOutboundTrustCertificateAssociationMapOutput() LocalRulestackOutboundTrustCertificateAssociationMapOutput {
return o
}
func (o LocalRulestackOutboundTrustCertificateAssociationMapOutput) ToLocalRulestackOutboundTrustCertificateAssociationMapOutputWithContext(ctx context.Context) LocalRulestackOutboundTrustCertificateAssociationMapOutput {
return o
}
func (o LocalRulestackOutboundTrustCertificateAssociationMapOutput) MapIndex(k pulumi.StringInput) LocalRulestackOutboundTrustCertificateAssociationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LocalRulestackOutboundTrustCertificateAssociation {
return vs[0].(map[string]*LocalRulestackOutboundTrustCertificateAssociation)[vs[1].(string)]
}).(LocalRulestackOutboundTrustCertificateAssociationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackOutboundTrustCertificateAssociationInput)(nil)).Elem(), &LocalRulestackOutboundTrustCertificateAssociation{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackOutboundTrustCertificateAssociationArrayInput)(nil)).Elem(), LocalRulestackOutboundTrustCertificateAssociationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackOutboundTrustCertificateAssociationMapInput)(nil)).Elem(), LocalRulestackOutboundTrustCertificateAssociationMap{})
pulumi.RegisterOutputType(LocalRulestackOutboundTrustCertificateAssociationOutput{})
pulumi.RegisterOutputType(LocalRulestackOutboundTrustCertificateAssociationArrayOutput{})
pulumi.RegisterOutputType(LocalRulestackOutboundTrustCertificateAssociationMapOutput{})
}
| 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/paloalto/nextGenerationFirewallVirtualNetworkLocalRulestack.go | sdk/go/azure/paloalto/nextGenerationFirewallVirtualNetworkLocalRulestack.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 paloalto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Palo Alto Next Generation Firewall Deployed in a Virtual Network and configured via a Local Rulestack.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/paloalto"
// "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-resource-group"),
// Location: pulumi.String("westeurope"),
// })
// if err != nil {
// return err
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("example-public-ip"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AllocationMethod: pulumi.String("Static"),
// Sku: pulumi.String("Standard"),
// })
// if err != nil {
// return err
// }
// exampleNetworkSecurityGroup, err := network.NewNetworkSecurityGroup(ctx, "example", &network.NetworkSecurityGroupArgs{
// Name: pulumi.String("example-nsg"),
// Location: pulumi.Any(test.Location),
// ResourceGroupName: pulumi.Any(test.Name),
// })
// 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,
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// trust, err := network.NewSubnet(ctx, "trust", &network.SubnetArgs{
// Name: pulumi.String("example-trust-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.1.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("trusted"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("PaloAltoNetworks.Cloudngfw/firewalls"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = network.NewSubnetNetworkSecurityGroupAssociation(ctx, "trust", &network.SubnetNetworkSecurityGroupAssociationArgs{
// SubnetId: trust.ID(),
// NetworkSecurityGroupId: exampleNetworkSecurityGroup.ID(),
// })
// if err != nil {
// return err
// }
// untrust, err := network.NewSubnet(ctx, "untrust", &network.SubnetArgs{
// Name: pulumi.String("example-untrust-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("untrusted"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("PaloAltoNetworks.Cloudngfw/firewalls"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = network.NewSubnetNetworkSecurityGroupAssociation(ctx, "untrust", &network.SubnetNetworkSecurityGroupAssociationArgs{
// SubnetId: untrust.ID(),
// NetworkSecurityGroupId: exampleNetworkSecurityGroup.ID(),
// })
// if err != nil {
// return err
// }
// exampleLocalRulestack, err := paloalto.NewLocalRulestack(ctx, "example", &paloalto.LocalRulestackArgs{
// Name: pulumi.String("example-rulestack"),
// ResourceGroupName: example.Name,
// Location: example.Locatio,
// })
// if err != nil {
// return err
// }
// _, err = paloalto.NewLocalRulestackRule(ctx, "example", &paloalto.LocalRulestackRuleArgs{
// Name: pulumi.String("example-rulestack-rule"),
// RulestackId: exampleLocalRulestack.ID(),
// Priority: pulumi.Int(1001),
// Action: pulumi.String("Allow"),
// Applications: pulumi.StringArray{
// pulumi.String("any"),
// },
// Destination: &paloalto.LocalRulestackRuleDestinationArgs{
// Cidrs: pulumi.StringArray{
// pulumi.String("any"),
// },
// },
// Source: &paloalto.LocalRulestackRuleSourceArgs{
// Cidrs: pulumi.StringArray{
// pulumi.String("any"),
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = paloalto.NewNextGenerationFirewallVirtualNetworkLocalRulestack(ctx, "example", &paloalto.NextGenerationFirewallVirtualNetworkLocalRulestackArgs{
// Name: pulumi.String("example-ngfwvn"),
// ResourceGroupName: example.Name,
// RulestackId: exampleLocalRulestack.ID(),
// NetworkProfile: &paloalto.NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileArgs{
// PublicIpAddressIds: pulumi.StringArray{
// examplePublicIp.ID(),
// },
// VnetConfiguration: &paloalto.NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileVnetConfigurationArgs{
// VirtualNetworkId: exampleVirtualNetwork.ID(),
// TrustedSubnetId: trust.ID(),
// UntrustedSubnetId: untrust.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:
//
// * `PaloAltoNetworks.Cloudngfw` - 2025-05-23, 2022-08-29
//
// ## Import
//
// Palo Alto Next Generation Firewall Virtual Network Local Rulestacks can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:paloalto/nextGenerationFirewallVirtualNetworkLocalRulestack:NextGenerationFirewallVirtualNetworkLocalRulestack example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/PaloAltoNetworks.Cloudngfw/firewalls/myVNetRulestackFW
// ```
type NextGenerationFirewallVirtualNetworkLocalRulestack struct {
pulumi.CustomResourceState
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatArrayOutput `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualNetworkLocalRulestackDnsSettingsPtrOutput `pulumi:"dnsSettings"`
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId pulumi.StringPtrOutput `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Local Rulestack. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Local Rulestack to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileOutput `pulumi:"networkProfile"`
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId pulumi.StringPtrOutput `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Local Rulestack should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Local Rulestack to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The ID of the Local Rulestack which will be used to configure this Firewall Resource.
RulestackId pulumi.StringOutput `pulumi:"rulestackId"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Local Rulestack.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewNextGenerationFirewallVirtualNetworkLocalRulestack registers a new resource with the given unique name, arguments, and options.
func NewNextGenerationFirewallVirtualNetworkLocalRulestack(ctx *pulumi.Context,
name string, args *NextGenerationFirewallVirtualNetworkLocalRulestackArgs, opts ...pulumi.ResourceOption) (*NextGenerationFirewallVirtualNetworkLocalRulestack, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NetworkProfile == nil {
return nil, errors.New("invalid value for required argument 'NetworkProfile'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.RulestackId == nil {
return nil, errors.New("invalid value for required argument 'RulestackId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource NextGenerationFirewallVirtualNetworkLocalRulestack
err := ctx.RegisterResource("azure:paloalto/nextGenerationFirewallVirtualNetworkLocalRulestack:NextGenerationFirewallVirtualNetworkLocalRulestack", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNextGenerationFirewallVirtualNetworkLocalRulestack gets an existing NextGenerationFirewallVirtualNetworkLocalRulestack 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 GetNextGenerationFirewallVirtualNetworkLocalRulestack(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NextGenerationFirewallVirtualNetworkLocalRulestackState, opts ...pulumi.ResourceOption) (*NextGenerationFirewallVirtualNetworkLocalRulestack, error) {
var resource NextGenerationFirewallVirtualNetworkLocalRulestack
err := ctx.ReadResource("azure:paloalto/nextGenerationFirewallVirtualNetworkLocalRulestack:NextGenerationFirewallVirtualNetworkLocalRulestack", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NextGenerationFirewallVirtualNetworkLocalRulestack resources.
type nextGenerationFirewallVirtualNetworkLocalRulestackState struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats []NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNat `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings *NextGenerationFirewallVirtualNetworkLocalRulestackDnsSettings `pulumi:"dnsSettings"`
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId *string `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Local Rulestack. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Local Rulestack to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile *NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfile `pulumi:"networkProfile"`
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId *string `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Local Rulestack should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Local Rulestack to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The ID of the Local Rulestack which will be used to configure this Firewall Resource.
RulestackId *string `pulumi:"rulestackId"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Local Rulestack.
Tags map[string]string `pulumi:"tags"`
}
type NextGenerationFirewallVirtualNetworkLocalRulestackState struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatArrayInput
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualNetworkLocalRulestackDnsSettingsPtrInput
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId pulumi.StringPtrInput
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Local Rulestack. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Local Rulestack to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfilePtrInput
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId pulumi.StringPtrInput
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Local Rulestack should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Local Rulestack to be created.
ResourceGroupName pulumi.StringPtrInput
// The ID of the Local Rulestack which will be used to configure this Firewall Resource.
RulestackId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Local Rulestack.
Tags pulumi.StringMapInput
}
func (NextGenerationFirewallVirtualNetworkLocalRulestackState) ElementType() reflect.Type {
return reflect.TypeOf((*nextGenerationFirewallVirtualNetworkLocalRulestackState)(nil)).Elem()
}
type nextGenerationFirewallVirtualNetworkLocalRulestackArgs struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats []NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNat `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings *NextGenerationFirewallVirtualNetworkLocalRulestackDnsSettings `pulumi:"dnsSettings"`
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId *string `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Local Rulestack. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Local Rulestack to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfile `pulumi:"networkProfile"`
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId *string `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Local Rulestack should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Local Rulestack to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The ID of the Local Rulestack which will be used to configure this Firewall Resource.
RulestackId string `pulumi:"rulestackId"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Local Rulestack.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a NextGenerationFirewallVirtualNetworkLocalRulestack resource.
type NextGenerationFirewallVirtualNetworkLocalRulestackArgs struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatArrayInput
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualNetworkLocalRulestackDnsSettingsPtrInput
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId pulumi.StringPtrInput
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Local Rulestack. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Local Rulestack to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileInput
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId pulumi.StringPtrInput
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Local Rulestack should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Local Rulestack to be created.
ResourceGroupName pulumi.StringInput
// The ID of the Local Rulestack which will be used to configure this Firewall Resource.
RulestackId pulumi.StringInput
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Local Rulestack.
Tags pulumi.StringMapInput
}
func (NextGenerationFirewallVirtualNetworkLocalRulestackArgs) ElementType() reflect.Type {
return reflect.TypeOf((*nextGenerationFirewallVirtualNetworkLocalRulestackArgs)(nil)).Elem()
}
type NextGenerationFirewallVirtualNetworkLocalRulestackInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualNetworkLocalRulestackOutput() NextGenerationFirewallVirtualNetworkLocalRulestackOutput
ToNextGenerationFirewallVirtualNetworkLocalRulestackOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkLocalRulestackOutput
}
func (*NextGenerationFirewallVirtualNetworkLocalRulestack) ElementType() reflect.Type {
return reflect.TypeOf((**NextGenerationFirewallVirtualNetworkLocalRulestack)(nil)).Elem()
}
func (i *NextGenerationFirewallVirtualNetworkLocalRulestack) ToNextGenerationFirewallVirtualNetworkLocalRulestackOutput() NextGenerationFirewallVirtualNetworkLocalRulestackOutput {
return i.ToNextGenerationFirewallVirtualNetworkLocalRulestackOutputWithContext(context.Background())
}
func (i *NextGenerationFirewallVirtualNetworkLocalRulestack) ToNextGenerationFirewallVirtualNetworkLocalRulestackOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkLocalRulestackOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualNetworkLocalRulestackOutput)
}
// NextGenerationFirewallVirtualNetworkLocalRulestackArrayInput is an input type that accepts NextGenerationFirewallVirtualNetworkLocalRulestackArray and NextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput values.
// You can construct a concrete instance of `NextGenerationFirewallVirtualNetworkLocalRulestackArrayInput` via:
//
// NextGenerationFirewallVirtualNetworkLocalRulestackArray{ NextGenerationFirewallVirtualNetworkLocalRulestackArgs{...} }
type NextGenerationFirewallVirtualNetworkLocalRulestackArrayInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput() NextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput
ToNextGenerationFirewallVirtualNetworkLocalRulestackArrayOutputWithContext(context.Context) NextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput
}
type NextGenerationFirewallVirtualNetworkLocalRulestackArray []NextGenerationFirewallVirtualNetworkLocalRulestackInput
func (NextGenerationFirewallVirtualNetworkLocalRulestackArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NextGenerationFirewallVirtualNetworkLocalRulestack)(nil)).Elem()
}
func (i NextGenerationFirewallVirtualNetworkLocalRulestackArray) ToNextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput() NextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput {
return i.ToNextGenerationFirewallVirtualNetworkLocalRulestackArrayOutputWithContext(context.Background())
}
func (i NextGenerationFirewallVirtualNetworkLocalRulestackArray) ToNextGenerationFirewallVirtualNetworkLocalRulestackArrayOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput)
}
// NextGenerationFirewallVirtualNetworkLocalRulestackMapInput is an input type that accepts NextGenerationFirewallVirtualNetworkLocalRulestackMap and NextGenerationFirewallVirtualNetworkLocalRulestackMapOutput values.
// You can construct a concrete instance of `NextGenerationFirewallVirtualNetworkLocalRulestackMapInput` via:
//
// NextGenerationFirewallVirtualNetworkLocalRulestackMap{ "key": NextGenerationFirewallVirtualNetworkLocalRulestackArgs{...} }
type NextGenerationFirewallVirtualNetworkLocalRulestackMapInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualNetworkLocalRulestackMapOutput() NextGenerationFirewallVirtualNetworkLocalRulestackMapOutput
ToNextGenerationFirewallVirtualNetworkLocalRulestackMapOutputWithContext(context.Context) NextGenerationFirewallVirtualNetworkLocalRulestackMapOutput
}
type NextGenerationFirewallVirtualNetworkLocalRulestackMap map[string]NextGenerationFirewallVirtualNetworkLocalRulestackInput
func (NextGenerationFirewallVirtualNetworkLocalRulestackMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NextGenerationFirewallVirtualNetworkLocalRulestack)(nil)).Elem()
}
func (i NextGenerationFirewallVirtualNetworkLocalRulestackMap) ToNextGenerationFirewallVirtualNetworkLocalRulestackMapOutput() NextGenerationFirewallVirtualNetworkLocalRulestackMapOutput {
return i.ToNextGenerationFirewallVirtualNetworkLocalRulestackMapOutputWithContext(context.Background())
}
func (i NextGenerationFirewallVirtualNetworkLocalRulestackMap) ToNextGenerationFirewallVirtualNetworkLocalRulestackMapOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkLocalRulestackMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualNetworkLocalRulestackMapOutput)
}
type NextGenerationFirewallVirtualNetworkLocalRulestackOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualNetworkLocalRulestackOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NextGenerationFirewallVirtualNetworkLocalRulestack)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualNetworkLocalRulestackOutput) ToNextGenerationFirewallVirtualNetworkLocalRulestackOutput() NextGenerationFirewallVirtualNetworkLocalRulestackOutput {
return o
}
func (o NextGenerationFirewallVirtualNetworkLocalRulestackOutput) ToNextGenerationFirewallVirtualNetworkLocalRulestackOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkLocalRulestackOutput {
return o
}
// One or more `destinationNat` blocks as defined below.
func (o NextGenerationFirewallVirtualNetworkLocalRulestackOutput) DestinationNats() NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatArrayOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkLocalRulestack) NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatArrayOutput {
return v.DestinationNats
}).(NextGenerationFirewallVirtualNetworkLocalRulestackDestinationNatArrayOutput)
}
// A `dnsSettings` block as defined below.
func (o NextGenerationFirewallVirtualNetworkLocalRulestackOutput) DnsSettings() NextGenerationFirewallVirtualNetworkLocalRulestackDnsSettingsPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkLocalRulestack) NextGenerationFirewallVirtualNetworkLocalRulestackDnsSettingsPtrOutput {
return v.DnsSettings
}).(NextGenerationFirewallVirtualNetworkLocalRulestackDnsSettingsPtrOutput)
}
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
func (o NextGenerationFirewallVirtualNetworkLocalRulestackOutput) MarketplaceOfferId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkLocalRulestack) pulumi.StringPtrOutput {
return v.MarketplaceOfferId
}).(pulumi.StringPtrOutput)
}
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Local Rulestack. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Local Rulestack to be created.
func (o NextGenerationFirewallVirtualNetworkLocalRulestackOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkLocalRulestack) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `networkProfile` block as defined below.
func (o NextGenerationFirewallVirtualNetworkLocalRulestackOutput) NetworkProfile() NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkLocalRulestack) NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileOutput {
return v.NetworkProfile
}).(NextGenerationFirewallVirtualNetworkLocalRulestackNetworkProfileOutput)
}
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
func (o NextGenerationFirewallVirtualNetworkLocalRulestackOutput) PlanId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkLocalRulestack) pulumi.StringPtrOutput { return v.PlanId }).(pulumi.StringPtrOutput)
}
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Local Rulestack should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Local Rulestack to be created.
func (o NextGenerationFirewallVirtualNetworkLocalRulestackOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkLocalRulestack) pulumi.StringOutput {
return v.ResourceGroupName
}).(pulumi.StringOutput)
}
// The ID of the Local Rulestack which will be used to configure this Firewall Resource.
func (o NextGenerationFirewallVirtualNetworkLocalRulestackOutput) RulestackId() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkLocalRulestack) pulumi.StringOutput { return v.RulestackId }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Local Rulestack.
func (o NextGenerationFirewallVirtualNetworkLocalRulestackOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkLocalRulestack) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type NextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NextGenerationFirewallVirtualNetworkLocalRulestack)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput) ToNextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput() NextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput {
return o
}
func (o NextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput) ToNextGenerationFirewallVirtualNetworkLocalRulestackArrayOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput {
return o
}
func (o NextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput) Index(i pulumi.IntInput) NextGenerationFirewallVirtualNetworkLocalRulestackOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NextGenerationFirewallVirtualNetworkLocalRulestack {
return vs[0].([]*NextGenerationFirewallVirtualNetworkLocalRulestack)[vs[1].(int)]
}).(NextGenerationFirewallVirtualNetworkLocalRulestackOutput)
}
type NextGenerationFirewallVirtualNetworkLocalRulestackMapOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualNetworkLocalRulestackMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NextGenerationFirewallVirtualNetworkLocalRulestack)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualNetworkLocalRulestackMapOutput) ToNextGenerationFirewallVirtualNetworkLocalRulestackMapOutput() NextGenerationFirewallVirtualNetworkLocalRulestackMapOutput {
return o
}
func (o NextGenerationFirewallVirtualNetworkLocalRulestackMapOutput) ToNextGenerationFirewallVirtualNetworkLocalRulestackMapOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkLocalRulestackMapOutput {
return o
}
func (o NextGenerationFirewallVirtualNetworkLocalRulestackMapOutput) MapIndex(k pulumi.StringInput) NextGenerationFirewallVirtualNetworkLocalRulestackOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NextGenerationFirewallVirtualNetworkLocalRulestack {
return vs[0].(map[string]*NextGenerationFirewallVirtualNetworkLocalRulestack)[vs[1].(string)]
}).(NextGenerationFirewallVirtualNetworkLocalRulestackOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualNetworkLocalRulestackInput)(nil)).Elem(), &NextGenerationFirewallVirtualNetworkLocalRulestack{})
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualNetworkLocalRulestackArrayInput)(nil)).Elem(), NextGenerationFirewallVirtualNetworkLocalRulestackArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualNetworkLocalRulestackMapInput)(nil)).Elem(), NextGenerationFirewallVirtualNetworkLocalRulestackMap{})
pulumi.RegisterOutputType(NextGenerationFirewallVirtualNetworkLocalRulestackOutput{})
pulumi.RegisterOutputType(NextGenerationFirewallVirtualNetworkLocalRulestackArrayOutput{})
pulumi.RegisterOutputType(NextGenerationFirewallVirtualNetworkLocalRulestackMapOutput{})
}
| 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/paloalto/localRulestackPrefixList.go | sdk/go/azure/paloalto/localRulestackPrefixList.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 paloalto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Palo Alto Local Rulestack Prefix List.
//
// ## 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/paloalto"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("rg-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleLocalRulestack, err := paloalto.NewLocalRulestack(ctx, "example", &paloalto.LocalRulestackArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// _, err = paloalto.NewLocalRulestackPrefixList(ctx, "example", &paloalto.LocalRulestackPrefixListArgs{
// Name: pulumi.String("example"),
// RulestackId: exampleLocalRulestack.ID(),
// PrefixLists: pulumi.StringArray{
// pulumi.String("10.0.1.0/24"),
// },
// })
// 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:
//
// * `PaloAltoNetworks.Cloudngfw` - 2022-08-29
//
// ## Import
//
// Palo Alto Local Rulestack Prefix Lists can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:paloalto/localRulestackPrefixList:LocalRulestackPrefixList example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/myLocalRulestack/prefixLists/myFQDNList1
// ```
type LocalRulestackPrefixList struct {
pulumi.CustomResourceState
// The comment for Audit purposes.
AuditComment pulumi.StringPtrOutput `pulumi:"auditComment"`
// The description for the Prefix List.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The name which should be used for this Palo Alto Local Rulestack Prefix List.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies a list of Prefixes.
PrefixLists pulumi.StringArrayOutput `pulumi:"prefixLists"`
// The ID of the Local Rulestack on which to create this Prefix List. Changing this forces a new Palo Alto Local Rulestack Prefix List to be created.
RulestackId pulumi.StringOutput `pulumi:"rulestackId"`
}
// NewLocalRulestackPrefixList registers a new resource with the given unique name, arguments, and options.
func NewLocalRulestackPrefixList(ctx *pulumi.Context,
name string, args *LocalRulestackPrefixListArgs, opts ...pulumi.ResourceOption) (*LocalRulestackPrefixList, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PrefixLists == nil {
return nil, errors.New("invalid value for required argument 'PrefixLists'")
}
if args.RulestackId == nil {
return nil, errors.New("invalid value for required argument 'RulestackId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource LocalRulestackPrefixList
err := ctx.RegisterResource("azure:paloalto/localRulestackPrefixList:LocalRulestackPrefixList", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLocalRulestackPrefixList gets an existing LocalRulestackPrefixList 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 GetLocalRulestackPrefixList(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LocalRulestackPrefixListState, opts ...pulumi.ResourceOption) (*LocalRulestackPrefixList, error) {
var resource LocalRulestackPrefixList
err := ctx.ReadResource("azure:paloalto/localRulestackPrefixList:LocalRulestackPrefixList", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LocalRulestackPrefixList resources.
type localRulestackPrefixListState struct {
// The comment for Audit purposes.
AuditComment *string `pulumi:"auditComment"`
// The description for the Prefix List.
Description *string `pulumi:"description"`
// The name which should be used for this Palo Alto Local Rulestack Prefix List.
Name *string `pulumi:"name"`
// Specifies a list of Prefixes.
PrefixLists []string `pulumi:"prefixLists"`
// The ID of the Local Rulestack on which to create this Prefix List. Changing this forces a new Palo Alto Local Rulestack Prefix List to be created.
RulestackId *string `pulumi:"rulestackId"`
}
type LocalRulestackPrefixListState struct {
// The comment for Audit purposes.
AuditComment pulumi.StringPtrInput
// The description for the Prefix List.
Description pulumi.StringPtrInput
// The name which should be used for this Palo Alto Local Rulestack Prefix List.
Name pulumi.StringPtrInput
// Specifies a list of Prefixes.
PrefixLists pulumi.StringArrayInput
// The ID of the Local Rulestack on which to create this Prefix List. Changing this forces a new Palo Alto Local Rulestack Prefix List to be created.
RulestackId pulumi.StringPtrInput
}
func (LocalRulestackPrefixListState) ElementType() reflect.Type {
return reflect.TypeOf((*localRulestackPrefixListState)(nil)).Elem()
}
type localRulestackPrefixListArgs struct {
// The comment for Audit purposes.
AuditComment *string `pulumi:"auditComment"`
// The description for the Prefix List.
Description *string `pulumi:"description"`
// The name which should be used for this Palo Alto Local Rulestack Prefix List.
Name *string `pulumi:"name"`
// Specifies a list of Prefixes.
PrefixLists []string `pulumi:"prefixLists"`
// The ID of the Local Rulestack on which to create this Prefix List. Changing this forces a new Palo Alto Local Rulestack Prefix List to be created.
RulestackId string `pulumi:"rulestackId"`
}
// The set of arguments for constructing a LocalRulestackPrefixList resource.
type LocalRulestackPrefixListArgs struct {
// The comment for Audit purposes.
AuditComment pulumi.StringPtrInput
// The description for the Prefix List.
Description pulumi.StringPtrInput
// The name which should be used for this Palo Alto Local Rulestack Prefix List.
Name pulumi.StringPtrInput
// Specifies a list of Prefixes.
PrefixLists pulumi.StringArrayInput
// The ID of the Local Rulestack on which to create this Prefix List. Changing this forces a new Palo Alto Local Rulestack Prefix List to be created.
RulestackId pulumi.StringInput
}
func (LocalRulestackPrefixListArgs) ElementType() reflect.Type {
return reflect.TypeOf((*localRulestackPrefixListArgs)(nil)).Elem()
}
type LocalRulestackPrefixListInput interface {
pulumi.Input
ToLocalRulestackPrefixListOutput() LocalRulestackPrefixListOutput
ToLocalRulestackPrefixListOutputWithContext(ctx context.Context) LocalRulestackPrefixListOutput
}
func (*LocalRulestackPrefixList) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackPrefixList)(nil)).Elem()
}
func (i *LocalRulestackPrefixList) ToLocalRulestackPrefixListOutput() LocalRulestackPrefixListOutput {
return i.ToLocalRulestackPrefixListOutputWithContext(context.Background())
}
func (i *LocalRulestackPrefixList) ToLocalRulestackPrefixListOutputWithContext(ctx context.Context) LocalRulestackPrefixListOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackPrefixListOutput)
}
// LocalRulestackPrefixListArrayInput is an input type that accepts LocalRulestackPrefixListArray and LocalRulestackPrefixListArrayOutput values.
// You can construct a concrete instance of `LocalRulestackPrefixListArrayInput` via:
//
// LocalRulestackPrefixListArray{ LocalRulestackPrefixListArgs{...} }
type LocalRulestackPrefixListArrayInput interface {
pulumi.Input
ToLocalRulestackPrefixListArrayOutput() LocalRulestackPrefixListArrayOutput
ToLocalRulestackPrefixListArrayOutputWithContext(context.Context) LocalRulestackPrefixListArrayOutput
}
type LocalRulestackPrefixListArray []LocalRulestackPrefixListInput
func (LocalRulestackPrefixListArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalRulestackPrefixList)(nil)).Elem()
}
func (i LocalRulestackPrefixListArray) ToLocalRulestackPrefixListArrayOutput() LocalRulestackPrefixListArrayOutput {
return i.ToLocalRulestackPrefixListArrayOutputWithContext(context.Background())
}
func (i LocalRulestackPrefixListArray) ToLocalRulestackPrefixListArrayOutputWithContext(ctx context.Context) LocalRulestackPrefixListArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackPrefixListArrayOutput)
}
// LocalRulestackPrefixListMapInput is an input type that accepts LocalRulestackPrefixListMap and LocalRulestackPrefixListMapOutput values.
// You can construct a concrete instance of `LocalRulestackPrefixListMapInput` via:
//
// LocalRulestackPrefixListMap{ "key": LocalRulestackPrefixListArgs{...} }
type LocalRulestackPrefixListMapInput interface {
pulumi.Input
ToLocalRulestackPrefixListMapOutput() LocalRulestackPrefixListMapOutput
ToLocalRulestackPrefixListMapOutputWithContext(context.Context) LocalRulestackPrefixListMapOutput
}
type LocalRulestackPrefixListMap map[string]LocalRulestackPrefixListInput
func (LocalRulestackPrefixListMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalRulestackPrefixList)(nil)).Elem()
}
func (i LocalRulestackPrefixListMap) ToLocalRulestackPrefixListMapOutput() LocalRulestackPrefixListMapOutput {
return i.ToLocalRulestackPrefixListMapOutputWithContext(context.Background())
}
func (i LocalRulestackPrefixListMap) ToLocalRulestackPrefixListMapOutputWithContext(ctx context.Context) LocalRulestackPrefixListMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackPrefixListMapOutput)
}
type LocalRulestackPrefixListOutput struct{ *pulumi.OutputState }
func (LocalRulestackPrefixListOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackPrefixList)(nil)).Elem()
}
func (o LocalRulestackPrefixListOutput) ToLocalRulestackPrefixListOutput() LocalRulestackPrefixListOutput {
return o
}
func (o LocalRulestackPrefixListOutput) ToLocalRulestackPrefixListOutputWithContext(ctx context.Context) LocalRulestackPrefixListOutput {
return o
}
// The comment for Audit purposes.
func (o LocalRulestackPrefixListOutput) AuditComment() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestackPrefixList) pulumi.StringPtrOutput { return v.AuditComment }).(pulumi.StringPtrOutput)
}
// The description for the Prefix List.
func (o LocalRulestackPrefixListOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestackPrefixList) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Palo Alto Local Rulestack Prefix List.
func (o LocalRulestackPrefixListOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *LocalRulestackPrefixList) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies a list of Prefixes.
func (o LocalRulestackPrefixListOutput) PrefixLists() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LocalRulestackPrefixList) pulumi.StringArrayOutput { return v.PrefixLists }).(pulumi.StringArrayOutput)
}
// The ID of the Local Rulestack on which to create this Prefix List. Changing this forces a new Palo Alto Local Rulestack Prefix List to be created.
func (o LocalRulestackPrefixListOutput) RulestackId() pulumi.StringOutput {
return o.ApplyT(func(v *LocalRulestackPrefixList) pulumi.StringOutput { return v.RulestackId }).(pulumi.StringOutput)
}
type LocalRulestackPrefixListArrayOutput struct{ *pulumi.OutputState }
func (LocalRulestackPrefixListArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalRulestackPrefixList)(nil)).Elem()
}
func (o LocalRulestackPrefixListArrayOutput) ToLocalRulestackPrefixListArrayOutput() LocalRulestackPrefixListArrayOutput {
return o
}
func (o LocalRulestackPrefixListArrayOutput) ToLocalRulestackPrefixListArrayOutputWithContext(ctx context.Context) LocalRulestackPrefixListArrayOutput {
return o
}
func (o LocalRulestackPrefixListArrayOutput) Index(i pulumi.IntInput) LocalRulestackPrefixListOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LocalRulestackPrefixList {
return vs[0].([]*LocalRulestackPrefixList)[vs[1].(int)]
}).(LocalRulestackPrefixListOutput)
}
type LocalRulestackPrefixListMapOutput struct{ *pulumi.OutputState }
func (LocalRulestackPrefixListMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalRulestackPrefixList)(nil)).Elem()
}
func (o LocalRulestackPrefixListMapOutput) ToLocalRulestackPrefixListMapOutput() LocalRulestackPrefixListMapOutput {
return o
}
func (o LocalRulestackPrefixListMapOutput) ToLocalRulestackPrefixListMapOutputWithContext(ctx context.Context) LocalRulestackPrefixListMapOutput {
return o
}
func (o LocalRulestackPrefixListMapOutput) MapIndex(k pulumi.StringInput) LocalRulestackPrefixListOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LocalRulestackPrefixList {
return vs[0].(map[string]*LocalRulestackPrefixList)[vs[1].(string)]
}).(LocalRulestackPrefixListOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackPrefixListInput)(nil)).Elem(), &LocalRulestackPrefixList{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackPrefixListArrayInput)(nil)).Elem(), LocalRulestackPrefixListArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackPrefixListMapInput)(nil)).Elem(), LocalRulestackPrefixListMap{})
pulumi.RegisterOutputType(LocalRulestackPrefixListOutput{})
pulumi.RegisterOutputType(LocalRulestackPrefixListArrayOutput{})
pulumi.RegisterOutputType(LocalRulestackPrefixListMapOutput{})
}
| 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/paloalto/virtualNetworkAppliance.go | sdk/go/azure/paloalto/virtualNetworkAppliance.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 paloalto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Palo Alto Network Virtual Appliance.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/paloalto"
// "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
// }
// exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{
// Name: pulumi.String("example-virtualwan"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{
// Name: pulumi.String("example-virtualhub"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// VirtualWanId: exampleVirtualWan.ID(),
// AddressPrefix: pulumi.String("10.0.0.0/23"),
// Tags: pulumi.StringMap{
// "hubSaaSPreview": pulumi.String("true"),
// },
// })
// if err != nil {
// return err
// }
// _, err = paloalto.NewVirtualNetworkAppliance(ctx, "example", &paloalto.VirtualNetworkApplianceArgs{
// Name: pulumi.String("example-appliance"),
// VirtualHubId: exampleVirtualHub.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` - 2025-01-01
//
// ## Import
//
// Palo Alto Local Network Virtual Appliances can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:paloalto/virtualNetworkAppliance:VirtualNetworkAppliance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkVirtualAppliances/myPANetworkVirtualAppliance
// ```
type VirtualNetworkAppliance struct {
pulumi.CustomResourceState
// The name which should be used for this Palo Alto Local Network Virtual Appliance. Changing this forces a new Palo Alto Local Network Virtual Appliance to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Virtual Hub to deploy this appliance onto. Changing this forces a new Palo Alto Local Network Virtual Appliance to be created.
//
// > **Note:** THe Virtual Hub must be created with the tag `"hubSaaSPreview" = "true"` to be compatible with this resource.
VirtualHubId pulumi.StringOutput `pulumi:"virtualHubId"`
}
// NewVirtualNetworkAppliance registers a new resource with the given unique name, arguments, and options.
func NewVirtualNetworkAppliance(ctx *pulumi.Context,
name string, args *VirtualNetworkApplianceArgs, opts ...pulumi.ResourceOption) (*VirtualNetworkAppliance, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.VirtualHubId == nil {
return nil, errors.New("invalid value for required argument 'VirtualHubId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource VirtualNetworkAppliance
err := ctx.RegisterResource("azure:paloalto/virtualNetworkAppliance:VirtualNetworkAppliance", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetVirtualNetworkAppliance gets an existing VirtualNetworkAppliance 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 GetVirtualNetworkAppliance(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *VirtualNetworkApplianceState, opts ...pulumi.ResourceOption) (*VirtualNetworkAppliance, error) {
var resource VirtualNetworkAppliance
err := ctx.ReadResource("azure:paloalto/virtualNetworkAppliance:VirtualNetworkAppliance", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering VirtualNetworkAppliance resources.
type virtualNetworkApplianceState struct {
// The name which should be used for this Palo Alto Local Network Virtual Appliance. Changing this forces a new Palo Alto Local Network Virtual Appliance to be created.
Name *string `pulumi:"name"`
// The ID of the Virtual Hub to deploy this appliance onto. Changing this forces a new Palo Alto Local Network Virtual Appliance to be created.
//
// > **Note:** THe Virtual Hub must be created with the tag `"hubSaaSPreview" = "true"` to be compatible with this resource.
VirtualHubId *string `pulumi:"virtualHubId"`
}
type VirtualNetworkApplianceState struct {
// The name which should be used for this Palo Alto Local Network Virtual Appliance. Changing this forces a new Palo Alto Local Network Virtual Appliance to be created.
Name pulumi.StringPtrInput
// The ID of the Virtual Hub to deploy this appliance onto. Changing this forces a new Palo Alto Local Network Virtual Appliance to be created.
//
// > **Note:** THe Virtual Hub must be created with the tag `"hubSaaSPreview" = "true"` to be compatible with this resource.
VirtualHubId pulumi.StringPtrInput
}
func (VirtualNetworkApplianceState) ElementType() reflect.Type {
return reflect.TypeOf((*virtualNetworkApplianceState)(nil)).Elem()
}
type virtualNetworkApplianceArgs struct {
// The name which should be used for this Palo Alto Local Network Virtual Appliance. Changing this forces a new Palo Alto Local Network Virtual Appliance to be created.
Name *string `pulumi:"name"`
// The ID of the Virtual Hub to deploy this appliance onto. Changing this forces a new Palo Alto Local Network Virtual Appliance to be created.
//
// > **Note:** THe Virtual Hub must be created with the tag `"hubSaaSPreview" = "true"` to be compatible with this resource.
VirtualHubId string `pulumi:"virtualHubId"`
}
// The set of arguments for constructing a VirtualNetworkAppliance resource.
type VirtualNetworkApplianceArgs struct {
// The name which should be used for this Palo Alto Local Network Virtual Appliance. Changing this forces a new Palo Alto Local Network Virtual Appliance to be created.
Name pulumi.StringPtrInput
// The ID of the Virtual Hub to deploy this appliance onto. Changing this forces a new Palo Alto Local Network Virtual Appliance to be created.
//
// > **Note:** THe Virtual Hub must be created with the tag `"hubSaaSPreview" = "true"` to be compatible with this resource.
VirtualHubId pulumi.StringInput
}
func (VirtualNetworkApplianceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*virtualNetworkApplianceArgs)(nil)).Elem()
}
type VirtualNetworkApplianceInput interface {
pulumi.Input
ToVirtualNetworkApplianceOutput() VirtualNetworkApplianceOutput
ToVirtualNetworkApplianceOutputWithContext(ctx context.Context) VirtualNetworkApplianceOutput
}
func (*VirtualNetworkAppliance) ElementType() reflect.Type {
return reflect.TypeOf((**VirtualNetworkAppliance)(nil)).Elem()
}
func (i *VirtualNetworkAppliance) ToVirtualNetworkApplianceOutput() VirtualNetworkApplianceOutput {
return i.ToVirtualNetworkApplianceOutputWithContext(context.Background())
}
func (i *VirtualNetworkAppliance) ToVirtualNetworkApplianceOutputWithContext(ctx context.Context) VirtualNetworkApplianceOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkApplianceOutput)
}
// VirtualNetworkApplianceArrayInput is an input type that accepts VirtualNetworkApplianceArray and VirtualNetworkApplianceArrayOutput values.
// You can construct a concrete instance of `VirtualNetworkApplianceArrayInput` via:
//
// VirtualNetworkApplianceArray{ VirtualNetworkApplianceArgs{...} }
type VirtualNetworkApplianceArrayInput interface {
pulumi.Input
ToVirtualNetworkApplianceArrayOutput() VirtualNetworkApplianceArrayOutput
ToVirtualNetworkApplianceArrayOutputWithContext(context.Context) VirtualNetworkApplianceArrayOutput
}
type VirtualNetworkApplianceArray []VirtualNetworkApplianceInput
func (VirtualNetworkApplianceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VirtualNetworkAppliance)(nil)).Elem()
}
func (i VirtualNetworkApplianceArray) ToVirtualNetworkApplianceArrayOutput() VirtualNetworkApplianceArrayOutput {
return i.ToVirtualNetworkApplianceArrayOutputWithContext(context.Background())
}
func (i VirtualNetworkApplianceArray) ToVirtualNetworkApplianceArrayOutputWithContext(ctx context.Context) VirtualNetworkApplianceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkApplianceArrayOutput)
}
// VirtualNetworkApplianceMapInput is an input type that accepts VirtualNetworkApplianceMap and VirtualNetworkApplianceMapOutput values.
// You can construct a concrete instance of `VirtualNetworkApplianceMapInput` via:
//
// VirtualNetworkApplianceMap{ "key": VirtualNetworkApplianceArgs{...} }
type VirtualNetworkApplianceMapInput interface {
pulumi.Input
ToVirtualNetworkApplianceMapOutput() VirtualNetworkApplianceMapOutput
ToVirtualNetworkApplianceMapOutputWithContext(context.Context) VirtualNetworkApplianceMapOutput
}
type VirtualNetworkApplianceMap map[string]VirtualNetworkApplianceInput
func (VirtualNetworkApplianceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VirtualNetworkAppliance)(nil)).Elem()
}
func (i VirtualNetworkApplianceMap) ToVirtualNetworkApplianceMapOutput() VirtualNetworkApplianceMapOutput {
return i.ToVirtualNetworkApplianceMapOutputWithContext(context.Background())
}
func (i VirtualNetworkApplianceMap) ToVirtualNetworkApplianceMapOutputWithContext(ctx context.Context) VirtualNetworkApplianceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(VirtualNetworkApplianceMapOutput)
}
type VirtualNetworkApplianceOutput struct{ *pulumi.OutputState }
func (VirtualNetworkApplianceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**VirtualNetworkAppliance)(nil)).Elem()
}
func (o VirtualNetworkApplianceOutput) ToVirtualNetworkApplianceOutput() VirtualNetworkApplianceOutput {
return o
}
func (o VirtualNetworkApplianceOutput) ToVirtualNetworkApplianceOutputWithContext(ctx context.Context) VirtualNetworkApplianceOutput {
return o
}
// The name which should be used for this Palo Alto Local Network Virtual Appliance. Changing this forces a new Palo Alto Local Network Virtual Appliance to be created.
func (o VirtualNetworkApplianceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualNetworkAppliance) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Virtual Hub to deploy this appliance onto. Changing this forces a new Palo Alto Local Network Virtual Appliance to be created.
//
// > **Note:** THe Virtual Hub must be created with the tag `"hubSaaSPreview" = "true"` to be compatible with this resource.
func (o VirtualNetworkApplianceOutput) VirtualHubId() pulumi.StringOutput {
return o.ApplyT(func(v *VirtualNetworkAppliance) pulumi.StringOutput { return v.VirtualHubId }).(pulumi.StringOutput)
}
type VirtualNetworkApplianceArrayOutput struct{ *pulumi.OutputState }
func (VirtualNetworkApplianceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VirtualNetworkAppliance)(nil)).Elem()
}
func (o VirtualNetworkApplianceArrayOutput) ToVirtualNetworkApplianceArrayOutput() VirtualNetworkApplianceArrayOutput {
return o
}
func (o VirtualNetworkApplianceArrayOutput) ToVirtualNetworkApplianceArrayOutputWithContext(ctx context.Context) VirtualNetworkApplianceArrayOutput {
return o
}
func (o VirtualNetworkApplianceArrayOutput) Index(i pulumi.IntInput) VirtualNetworkApplianceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualNetworkAppliance {
return vs[0].([]*VirtualNetworkAppliance)[vs[1].(int)]
}).(VirtualNetworkApplianceOutput)
}
type VirtualNetworkApplianceMapOutput struct{ *pulumi.OutputState }
func (VirtualNetworkApplianceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VirtualNetworkAppliance)(nil)).Elem()
}
func (o VirtualNetworkApplianceMapOutput) ToVirtualNetworkApplianceMapOutput() VirtualNetworkApplianceMapOutput {
return o
}
func (o VirtualNetworkApplianceMapOutput) ToVirtualNetworkApplianceMapOutputWithContext(ctx context.Context) VirtualNetworkApplianceMapOutput {
return o
}
func (o VirtualNetworkApplianceMapOutput) MapIndex(k pulumi.StringInput) VirtualNetworkApplianceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualNetworkAppliance {
return vs[0].(map[string]*VirtualNetworkAppliance)[vs[1].(string)]
}).(VirtualNetworkApplianceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkApplianceInput)(nil)).Elem(), &VirtualNetworkAppliance{})
pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkApplianceArrayInput)(nil)).Elem(), VirtualNetworkApplianceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*VirtualNetworkApplianceMapInput)(nil)).Elem(), VirtualNetworkApplianceMap{})
pulumi.RegisterOutputType(VirtualNetworkApplianceOutput{})
pulumi.RegisterOutputType(VirtualNetworkApplianceArrayOutput{})
pulumi.RegisterOutputType(VirtualNetworkApplianceMapOutput{})
}
| 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/paloalto/getLocalRulestack.go | sdk/go/azure/paloalto/getLocalRulestack.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 paloalto
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 Palo Alto Networks Rulestack.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/paloalto"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := paloalto.LookupLocalRulestack(ctx, &paloalto.LookupLocalRulestackArgs{
// 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:
//
// * `PaloAltoNetworks.Cloudngfw` - 2022-08-29
func LookupLocalRulestack(ctx *pulumi.Context, args *LookupLocalRulestackArgs, opts ...pulumi.InvokeOption) (*LookupLocalRulestackResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupLocalRulestackResult
err := ctx.Invoke("azure:paloalto/getLocalRulestack:getLocalRulestack", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getLocalRulestack.
type LookupLocalRulestackArgs struct {
// The name of this Palo Alto Networks Rulestack.
Name string `pulumi:"name"`
// The name of the Resource Group where the Palo Alto Networks Rulestack exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getLocalRulestack.
type LookupLocalRulestackResult struct {
// The Anti-Spyware setting used by the Palo Alto Networks Rulestack.
AntiSpywareProfile string `pulumi:"antiSpywareProfile"`
// The Anti-Virus setting used by the Palo Alto Networks Rulestack.
AntiVirusProfile string `pulumi:"antiVirusProfile"`
// The description of the Palo Alto Networks Rulestack.
Description string `pulumi:"description"`
// The DNS Subscription setting used by the Palo Alto Networks Rulestack.
DnsSubscription string `pulumi:"dnsSubscription"`
// The File Blocking Profile used by the Palo Alto Networks Rulestack.
FileBlockingProfile string `pulumi:"fileBlockingProfile"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure Region where the Palo Alto Networks Rulestack exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// The trusted egress decryption profile data for the Palo Alto Networks Rulestack.
OutboundTrustCertificate string `pulumi:"outboundTrustCertificate"`
// The untrusted egress decryption profile data for the Palo Alto Networks Rulestack.
OutboundUntrustCertificate string `pulumi:"outboundUntrustCertificate"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The URL Filtering Profile used by the Palo Alto Networks Rulestack.
UrlFilteringProfile string `pulumi:"urlFilteringProfile"`
// The Vulnerability Profile used by the Palo Alto Networks Rulestack.
VulnerabilityProfile string `pulumi:"vulnerabilityProfile"`
}
func LookupLocalRulestackOutput(ctx *pulumi.Context, args LookupLocalRulestackOutputArgs, opts ...pulumi.InvokeOption) LookupLocalRulestackResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupLocalRulestackResultOutput, error) {
args := v.(LookupLocalRulestackArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:paloalto/getLocalRulestack:getLocalRulestack", args, LookupLocalRulestackResultOutput{}, options).(LookupLocalRulestackResultOutput), nil
}).(LookupLocalRulestackResultOutput)
}
// A collection of arguments for invoking getLocalRulestack.
type LookupLocalRulestackOutputArgs struct {
// The name of this Palo Alto Networks Rulestack.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Palo Alto Networks Rulestack exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupLocalRulestackOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupLocalRulestackArgs)(nil)).Elem()
}
// A collection of values returned by getLocalRulestack.
type LookupLocalRulestackResultOutput struct{ *pulumi.OutputState }
func (LookupLocalRulestackResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupLocalRulestackResult)(nil)).Elem()
}
func (o LookupLocalRulestackResultOutput) ToLookupLocalRulestackResultOutput() LookupLocalRulestackResultOutput {
return o
}
func (o LookupLocalRulestackResultOutput) ToLookupLocalRulestackResultOutputWithContext(ctx context.Context) LookupLocalRulestackResultOutput {
return o
}
// The Anti-Spyware setting used by the Palo Alto Networks Rulestack.
func (o LookupLocalRulestackResultOutput) AntiSpywareProfile() pulumi.StringOutput {
return o.ApplyT(func(v LookupLocalRulestackResult) string { return v.AntiSpywareProfile }).(pulumi.StringOutput)
}
// The Anti-Virus setting used by the Palo Alto Networks Rulestack.
func (o LookupLocalRulestackResultOutput) AntiVirusProfile() pulumi.StringOutput {
return o.ApplyT(func(v LookupLocalRulestackResult) string { return v.AntiVirusProfile }).(pulumi.StringOutput)
}
// The description of the Palo Alto Networks Rulestack.
func (o LookupLocalRulestackResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupLocalRulestackResult) string { return v.Description }).(pulumi.StringOutput)
}
// The DNS Subscription setting used by the Palo Alto Networks Rulestack.
func (o LookupLocalRulestackResultOutput) DnsSubscription() pulumi.StringOutput {
return o.ApplyT(func(v LookupLocalRulestackResult) string { return v.DnsSubscription }).(pulumi.StringOutput)
}
// The File Blocking Profile used by the Palo Alto Networks Rulestack.
func (o LookupLocalRulestackResultOutput) FileBlockingProfile() pulumi.StringOutput {
return o.ApplyT(func(v LookupLocalRulestackResult) string { return v.FileBlockingProfile }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupLocalRulestackResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupLocalRulestackResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Azure Region where the Palo Alto Networks Rulestack exists.
func (o LookupLocalRulestackResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupLocalRulestackResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupLocalRulestackResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupLocalRulestackResult) string { return v.Name }).(pulumi.StringOutput)
}
// The trusted egress decryption profile data for the Palo Alto Networks Rulestack.
func (o LookupLocalRulestackResultOutput) OutboundTrustCertificate() pulumi.StringOutput {
return o.ApplyT(func(v LookupLocalRulestackResult) string { return v.OutboundTrustCertificate }).(pulumi.StringOutput)
}
// The untrusted egress decryption profile data for the Palo Alto Networks Rulestack.
func (o LookupLocalRulestackResultOutput) OutboundUntrustCertificate() pulumi.StringOutput {
return o.ApplyT(func(v LookupLocalRulestackResult) string { return v.OutboundUntrustCertificate }).(pulumi.StringOutput)
}
func (o LookupLocalRulestackResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupLocalRulestackResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The URL Filtering Profile used by the Palo Alto Networks Rulestack.
func (o LookupLocalRulestackResultOutput) UrlFilteringProfile() pulumi.StringOutput {
return o.ApplyT(func(v LookupLocalRulestackResult) string { return v.UrlFilteringProfile }).(pulumi.StringOutput)
}
// The Vulnerability Profile used by the Palo Alto Networks Rulestack.
func (o LookupLocalRulestackResultOutput) VulnerabilityProfile() pulumi.StringOutput {
return o.ApplyT(func(v LookupLocalRulestackResult) string { return v.VulnerabilityProfile }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupLocalRulestackResultOutput{})
}
| 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/paloalto/localRulestackOutboundUntrustCertificateAssociation.go | sdk/go/azure/paloalto/localRulestackOutboundUntrustCertificateAssociation.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 paloalto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Palo Alto Networks Rulestack Outbound Untrust Certificate Association.
//
// ## 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/paloalto"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("rg-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleLocalRulestack, err := paloalto.NewLocalRulestack(ctx, "example", &paloalto.LocalRulestackArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleLocalRulestackCertificate, err := paloalto.NewLocalRulestackCertificate(ctx, "example", &paloalto.LocalRulestackCertificateArgs{
// Name: pulumi.String("example"),
// RulestackId: exampleLocalRulestack.ID(),
// SelfSigned: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = paloalto.NewLocalRulestackOutboundUntrustCertificateAssociation(ctx, "example", &paloalto.LocalRulestackOutboundUntrustCertificateAssociationArgs{
// CertificateId: exampleLocalRulestackCertificate.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:
//
// * `PaloAltoNetworks.Cloudngfw` - 2022-08-29
type LocalRulestackOutboundUntrustCertificateAssociation struct {
pulumi.CustomResourceState
// The ID of the Certificate to use as the Outbound Untrust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Untrust Certificate Association to be created.
CertificateId pulumi.StringOutput `pulumi:"certificateId"`
}
// NewLocalRulestackOutboundUntrustCertificateAssociation registers a new resource with the given unique name, arguments, and options.
func NewLocalRulestackOutboundUntrustCertificateAssociation(ctx *pulumi.Context,
name string, args *LocalRulestackOutboundUntrustCertificateAssociationArgs, opts ...pulumi.ResourceOption) (*LocalRulestackOutboundUntrustCertificateAssociation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CertificateId == nil {
return nil, errors.New("invalid value for required argument 'CertificateId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource LocalRulestackOutboundUntrustCertificateAssociation
err := ctx.RegisterResource("azure:paloalto/localRulestackOutboundUntrustCertificateAssociation:LocalRulestackOutboundUntrustCertificateAssociation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLocalRulestackOutboundUntrustCertificateAssociation gets an existing LocalRulestackOutboundUntrustCertificateAssociation 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 GetLocalRulestackOutboundUntrustCertificateAssociation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LocalRulestackOutboundUntrustCertificateAssociationState, opts ...pulumi.ResourceOption) (*LocalRulestackOutboundUntrustCertificateAssociation, error) {
var resource LocalRulestackOutboundUntrustCertificateAssociation
err := ctx.ReadResource("azure:paloalto/localRulestackOutboundUntrustCertificateAssociation:LocalRulestackOutboundUntrustCertificateAssociation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LocalRulestackOutboundUntrustCertificateAssociation resources.
type localRulestackOutboundUntrustCertificateAssociationState struct {
// The ID of the Certificate to use as the Outbound Untrust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Untrust Certificate Association to be created.
CertificateId *string `pulumi:"certificateId"`
}
type LocalRulestackOutboundUntrustCertificateAssociationState struct {
// The ID of the Certificate to use as the Outbound Untrust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Untrust Certificate Association to be created.
CertificateId pulumi.StringPtrInput
}
func (LocalRulestackOutboundUntrustCertificateAssociationState) ElementType() reflect.Type {
return reflect.TypeOf((*localRulestackOutboundUntrustCertificateAssociationState)(nil)).Elem()
}
type localRulestackOutboundUntrustCertificateAssociationArgs struct {
// The ID of the Certificate to use as the Outbound Untrust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Untrust Certificate Association to be created.
CertificateId string `pulumi:"certificateId"`
}
// The set of arguments for constructing a LocalRulestackOutboundUntrustCertificateAssociation resource.
type LocalRulestackOutboundUntrustCertificateAssociationArgs struct {
// The ID of the Certificate to use as the Outbound Untrust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Untrust Certificate Association to be created.
CertificateId pulumi.StringInput
}
func (LocalRulestackOutboundUntrustCertificateAssociationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*localRulestackOutboundUntrustCertificateAssociationArgs)(nil)).Elem()
}
type LocalRulestackOutboundUntrustCertificateAssociationInput interface {
pulumi.Input
ToLocalRulestackOutboundUntrustCertificateAssociationOutput() LocalRulestackOutboundUntrustCertificateAssociationOutput
ToLocalRulestackOutboundUntrustCertificateAssociationOutputWithContext(ctx context.Context) LocalRulestackOutboundUntrustCertificateAssociationOutput
}
func (*LocalRulestackOutboundUntrustCertificateAssociation) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackOutboundUntrustCertificateAssociation)(nil)).Elem()
}
func (i *LocalRulestackOutboundUntrustCertificateAssociation) ToLocalRulestackOutboundUntrustCertificateAssociationOutput() LocalRulestackOutboundUntrustCertificateAssociationOutput {
return i.ToLocalRulestackOutboundUntrustCertificateAssociationOutputWithContext(context.Background())
}
func (i *LocalRulestackOutboundUntrustCertificateAssociation) ToLocalRulestackOutboundUntrustCertificateAssociationOutputWithContext(ctx context.Context) LocalRulestackOutboundUntrustCertificateAssociationOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackOutboundUntrustCertificateAssociationOutput)
}
// LocalRulestackOutboundUntrustCertificateAssociationArrayInput is an input type that accepts LocalRulestackOutboundUntrustCertificateAssociationArray and LocalRulestackOutboundUntrustCertificateAssociationArrayOutput values.
// You can construct a concrete instance of `LocalRulestackOutboundUntrustCertificateAssociationArrayInput` via:
//
// LocalRulestackOutboundUntrustCertificateAssociationArray{ LocalRulestackOutboundUntrustCertificateAssociationArgs{...} }
type LocalRulestackOutboundUntrustCertificateAssociationArrayInput interface {
pulumi.Input
ToLocalRulestackOutboundUntrustCertificateAssociationArrayOutput() LocalRulestackOutboundUntrustCertificateAssociationArrayOutput
ToLocalRulestackOutboundUntrustCertificateAssociationArrayOutputWithContext(context.Context) LocalRulestackOutboundUntrustCertificateAssociationArrayOutput
}
type LocalRulestackOutboundUntrustCertificateAssociationArray []LocalRulestackOutboundUntrustCertificateAssociationInput
func (LocalRulestackOutboundUntrustCertificateAssociationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalRulestackOutboundUntrustCertificateAssociation)(nil)).Elem()
}
func (i LocalRulestackOutboundUntrustCertificateAssociationArray) ToLocalRulestackOutboundUntrustCertificateAssociationArrayOutput() LocalRulestackOutboundUntrustCertificateAssociationArrayOutput {
return i.ToLocalRulestackOutboundUntrustCertificateAssociationArrayOutputWithContext(context.Background())
}
func (i LocalRulestackOutboundUntrustCertificateAssociationArray) ToLocalRulestackOutboundUntrustCertificateAssociationArrayOutputWithContext(ctx context.Context) LocalRulestackOutboundUntrustCertificateAssociationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackOutboundUntrustCertificateAssociationArrayOutput)
}
// LocalRulestackOutboundUntrustCertificateAssociationMapInput is an input type that accepts LocalRulestackOutboundUntrustCertificateAssociationMap and LocalRulestackOutboundUntrustCertificateAssociationMapOutput values.
// You can construct a concrete instance of `LocalRulestackOutboundUntrustCertificateAssociationMapInput` via:
//
// LocalRulestackOutboundUntrustCertificateAssociationMap{ "key": LocalRulestackOutboundUntrustCertificateAssociationArgs{...} }
type LocalRulestackOutboundUntrustCertificateAssociationMapInput interface {
pulumi.Input
ToLocalRulestackOutboundUntrustCertificateAssociationMapOutput() LocalRulestackOutboundUntrustCertificateAssociationMapOutput
ToLocalRulestackOutboundUntrustCertificateAssociationMapOutputWithContext(context.Context) LocalRulestackOutboundUntrustCertificateAssociationMapOutput
}
type LocalRulestackOutboundUntrustCertificateAssociationMap map[string]LocalRulestackOutboundUntrustCertificateAssociationInput
func (LocalRulestackOutboundUntrustCertificateAssociationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalRulestackOutboundUntrustCertificateAssociation)(nil)).Elem()
}
func (i LocalRulestackOutboundUntrustCertificateAssociationMap) ToLocalRulestackOutboundUntrustCertificateAssociationMapOutput() LocalRulestackOutboundUntrustCertificateAssociationMapOutput {
return i.ToLocalRulestackOutboundUntrustCertificateAssociationMapOutputWithContext(context.Background())
}
func (i LocalRulestackOutboundUntrustCertificateAssociationMap) ToLocalRulestackOutboundUntrustCertificateAssociationMapOutputWithContext(ctx context.Context) LocalRulestackOutboundUntrustCertificateAssociationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackOutboundUntrustCertificateAssociationMapOutput)
}
type LocalRulestackOutboundUntrustCertificateAssociationOutput struct{ *pulumi.OutputState }
func (LocalRulestackOutboundUntrustCertificateAssociationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackOutboundUntrustCertificateAssociation)(nil)).Elem()
}
func (o LocalRulestackOutboundUntrustCertificateAssociationOutput) ToLocalRulestackOutboundUntrustCertificateAssociationOutput() LocalRulestackOutboundUntrustCertificateAssociationOutput {
return o
}
func (o LocalRulestackOutboundUntrustCertificateAssociationOutput) ToLocalRulestackOutboundUntrustCertificateAssociationOutputWithContext(ctx context.Context) LocalRulestackOutboundUntrustCertificateAssociationOutput {
return o
}
// The ID of the Certificate to use as the Outbound Untrust Certificate. Changing this forces a new Palo Alto Networks Rulestack Outbound Untrust Certificate Association to be created.
func (o LocalRulestackOutboundUntrustCertificateAssociationOutput) CertificateId() pulumi.StringOutput {
return o.ApplyT(func(v *LocalRulestackOutboundUntrustCertificateAssociation) pulumi.StringOutput {
return v.CertificateId
}).(pulumi.StringOutput)
}
type LocalRulestackOutboundUntrustCertificateAssociationArrayOutput struct{ *pulumi.OutputState }
func (LocalRulestackOutboundUntrustCertificateAssociationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalRulestackOutboundUntrustCertificateAssociation)(nil)).Elem()
}
func (o LocalRulestackOutboundUntrustCertificateAssociationArrayOutput) ToLocalRulestackOutboundUntrustCertificateAssociationArrayOutput() LocalRulestackOutboundUntrustCertificateAssociationArrayOutput {
return o
}
func (o LocalRulestackOutboundUntrustCertificateAssociationArrayOutput) ToLocalRulestackOutboundUntrustCertificateAssociationArrayOutputWithContext(ctx context.Context) LocalRulestackOutboundUntrustCertificateAssociationArrayOutput {
return o
}
func (o LocalRulestackOutboundUntrustCertificateAssociationArrayOutput) Index(i pulumi.IntInput) LocalRulestackOutboundUntrustCertificateAssociationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LocalRulestackOutboundUntrustCertificateAssociation {
return vs[0].([]*LocalRulestackOutboundUntrustCertificateAssociation)[vs[1].(int)]
}).(LocalRulestackOutboundUntrustCertificateAssociationOutput)
}
type LocalRulestackOutboundUntrustCertificateAssociationMapOutput struct{ *pulumi.OutputState }
func (LocalRulestackOutboundUntrustCertificateAssociationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalRulestackOutboundUntrustCertificateAssociation)(nil)).Elem()
}
func (o LocalRulestackOutboundUntrustCertificateAssociationMapOutput) ToLocalRulestackOutboundUntrustCertificateAssociationMapOutput() LocalRulestackOutboundUntrustCertificateAssociationMapOutput {
return o
}
func (o LocalRulestackOutboundUntrustCertificateAssociationMapOutput) ToLocalRulestackOutboundUntrustCertificateAssociationMapOutputWithContext(ctx context.Context) LocalRulestackOutboundUntrustCertificateAssociationMapOutput {
return o
}
func (o LocalRulestackOutboundUntrustCertificateAssociationMapOutput) MapIndex(k pulumi.StringInput) LocalRulestackOutboundUntrustCertificateAssociationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LocalRulestackOutboundUntrustCertificateAssociation {
return vs[0].(map[string]*LocalRulestackOutboundUntrustCertificateAssociation)[vs[1].(string)]
}).(LocalRulestackOutboundUntrustCertificateAssociationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackOutboundUntrustCertificateAssociationInput)(nil)).Elem(), &LocalRulestackOutboundUntrustCertificateAssociation{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackOutboundUntrustCertificateAssociationArrayInput)(nil)).Elem(), LocalRulestackOutboundUntrustCertificateAssociationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackOutboundUntrustCertificateAssociationMapInput)(nil)).Elem(), LocalRulestackOutboundUntrustCertificateAssociationMap{})
pulumi.RegisterOutputType(LocalRulestackOutboundUntrustCertificateAssociationOutput{})
pulumi.RegisterOutputType(LocalRulestackOutboundUntrustCertificateAssociationArrayOutput{})
pulumi.RegisterOutputType(LocalRulestackOutboundUntrustCertificateAssociationMapOutput{})
}
| 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/paloalto/localRulestackFqdnList.go | sdk/go/azure/paloalto/localRulestackFqdnList.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 paloalto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Palo Alto Local Rulestack FQDN List.
//
// ## 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/paloalto"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("rg-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleLocalRulestack, err := paloalto.NewLocalRulestack(ctx, "example", &paloalto.LocalRulestackArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: pulumi.Any(exampleAzurermResrouceGroup.Name),
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// _, err = paloalto.NewLocalRulestackFqdnList(ctx, "example", &paloalto.LocalRulestackFqdnListArgs{
// Name: pulumi.String("example"),
// RulestackId: exampleLocalRulestack.ID(),
// FullyQualifiedDomainNames: pulumi.StringArray{
// pulumi.String("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:
//
// * `PaloAltoNetworks.Cloudngfw` - 2022-08-29
//
// ## Import
//
// Palo Alto Local Rulestack FQDN Lists can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:paloalto/localRulestackFqdnList:LocalRulestackFqdnList example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/myLocalRulestack/fqdnLists/myFQDNList1
// ```
type LocalRulestackFqdnList struct {
pulumi.CustomResourceState
// The comment for Audit purposes.
AuditComment pulumi.StringPtrOutput `pulumi:"auditComment"`
// The description for the FQDN List.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies a list of Fully Qualified Domain Names.
FullyQualifiedDomainNames pulumi.StringArrayOutput `pulumi:"fullyQualifiedDomainNames"`
// The name which should be used for this Palo Alto Local Rulestack FQDN List.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the TODO. Changing this forces a new Palo Alto Local Rulestack FQDN List to be created.
RulestackId pulumi.StringOutput `pulumi:"rulestackId"`
}
// NewLocalRulestackFqdnList registers a new resource with the given unique name, arguments, and options.
func NewLocalRulestackFqdnList(ctx *pulumi.Context,
name string, args *LocalRulestackFqdnListArgs, opts ...pulumi.ResourceOption) (*LocalRulestackFqdnList, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.FullyQualifiedDomainNames == nil {
return nil, errors.New("invalid value for required argument 'FullyQualifiedDomainNames'")
}
if args.RulestackId == nil {
return nil, errors.New("invalid value for required argument 'RulestackId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource LocalRulestackFqdnList
err := ctx.RegisterResource("azure:paloalto/localRulestackFqdnList:LocalRulestackFqdnList", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLocalRulestackFqdnList gets an existing LocalRulestackFqdnList 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 GetLocalRulestackFqdnList(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LocalRulestackFqdnListState, opts ...pulumi.ResourceOption) (*LocalRulestackFqdnList, error) {
var resource LocalRulestackFqdnList
err := ctx.ReadResource("azure:paloalto/localRulestackFqdnList:LocalRulestackFqdnList", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LocalRulestackFqdnList resources.
type localRulestackFqdnListState struct {
// The comment for Audit purposes.
AuditComment *string `pulumi:"auditComment"`
// The description for the FQDN List.
Description *string `pulumi:"description"`
// Specifies a list of Fully Qualified Domain Names.
FullyQualifiedDomainNames []string `pulumi:"fullyQualifiedDomainNames"`
// The name which should be used for this Palo Alto Local Rulestack FQDN List.
Name *string `pulumi:"name"`
// The ID of the TODO. Changing this forces a new Palo Alto Local Rulestack FQDN List to be created.
RulestackId *string `pulumi:"rulestackId"`
}
type LocalRulestackFqdnListState struct {
// The comment for Audit purposes.
AuditComment pulumi.StringPtrInput
// The description for the FQDN List.
Description pulumi.StringPtrInput
// Specifies a list of Fully Qualified Domain Names.
FullyQualifiedDomainNames pulumi.StringArrayInput
// The name which should be used for this Palo Alto Local Rulestack FQDN List.
Name pulumi.StringPtrInput
// The ID of the TODO. Changing this forces a new Palo Alto Local Rulestack FQDN List to be created.
RulestackId pulumi.StringPtrInput
}
func (LocalRulestackFqdnListState) ElementType() reflect.Type {
return reflect.TypeOf((*localRulestackFqdnListState)(nil)).Elem()
}
type localRulestackFqdnListArgs struct {
// The comment for Audit purposes.
AuditComment *string `pulumi:"auditComment"`
// The description for the FQDN List.
Description *string `pulumi:"description"`
// Specifies a list of Fully Qualified Domain Names.
FullyQualifiedDomainNames []string `pulumi:"fullyQualifiedDomainNames"`
// The name which should be used for this Palo Alto Local Rulestack FQDN List.
Name *string `pulumi:"name"`
// The ID of the TODO. Changing this forces a new Palo Alto Local Rulestack FQDN List to be created.
RulestackId string `pulumi:"rulestackId"`
}
// The set of arguments for constructing a LocalRulestackFqdnList resource.
type LocalRulestackFqdnListArgs struct {
// The comment for Audit purposes.
AuditComment pulumi.StringPtrInput
// The description for the FQDN List.
Description pulumi.StringPtrInput
// Specifies a list of Fully Qualified Domain Names.
FullyQualifiedDomainNames pulumi.StringArrayInput
// The name which should be used for this Palo Alto Local Rulestack FQDN List.
Name pulumi.StringPtrInput
// The ID of the TODO. Changing this forces a new Palo Alto Local Rulestack FQDN List to be created.
RulestackId pulumi.StringInput
}
func (LocalRulestackFqdnListArgs) ElementType() reflect.Type {
return reflect.TypeOf((*localRulestackFqdnListArgs)(nil)).Elem()
}
type LocalRulestackFqdnListInput interface {
pulumi.Input
ToLocalRulestackFqdnListOutput() LocalRulestackFqdnListOutput
ToLocalRulestackFqdnListOutputWithContext(ctx context.Context) LocalRulestackFqdnListOutput
}
func (*LocalRulestackFqdnList) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackFqdnList)(nil)).Elem()
}
func (i *LocalRulestackFqdnList) ToLocalRulestackFqdnListOutput() LocalRulestackFqdnListOutput {
return i.ToLocalRulestackFqdnListOutputWithContext(context.Background())
}
func (i *LocalRulestackFqdnList) ToLocalRulestackFqdnListOutputWithContext(ctx context.Context) LocalRulestackFqdnListOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackFqdnListOutput)
}
// LocalRulestackFqdnListArrayInput is an input type that accepts LocalRulestackFqdnListArray and LocalRulestackFqdnListArrayOutput values.
// You can construct a concrete instance of `LocalRulestackFqdnListArrayInput` via:
//
// LocalRulestackFqdnListArray{ LocalRulestackFqdnListArgs{...} }
type LocalRulestackFqdnListArrayInput interface {
pulumi.Input
ToLocalRulestackFqdnListArrayOutput() LocalRulestackFqdnListArrayOutput
ToLocalRulestackFqdnListArrayOutputWithContext(context.Context) LocalRulestackFqdnListArrayOutput
}
type LocalRulestackFqdnListArray []LocalRulestackFqdnListInput
func (LocalRulestackFqdnListArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalRulestackFqdnList)(nil)).Elem()
}
func (i LocalRulestackFqdnListArray) ToLocalRulestackFqdnListArrayOutput() LocalRulestackFqdnListArrayOutput {
return i.ToLocalRulestackFqdnListArrayOutputWithContext(context.Background())
}
func (i LocalRulestackFqdnListArray) ToLocalRulestackFqdnListArrayOutputWithContext(ctx context.Context) LocalRulestackFqdnListArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackFqdnListArrayOutput)
}
// LocalRulestackFqdnListMapInput is an input type that accepts LocalRulestackFqdnListMap and LocalRulestackFqdnListMapOutput values.
// You can construct a concrete instance of `LocalRulestackFqdnListMapInput` via:
//
// LocalRulestackFqdnListMap{ "key": LocalRulestackFqdnListArgs{...} }
type LocalRulestackFqdnListMapInput interface {
pulumi.Input
ToLocalRulestackFqdnListMapOutput() LocalRulestackFqdnListMapOutput
ToLocalRulestackFqdnListMapOutputWithContext(context.Context) LocalRulestackFqdnListMapOutput
}
type LocalRulestackFqdnListMap map[string]LocalRulestackFqdnListInput
func (LocalRulestackFqdnListMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalRulestackFqdnList)(nil)).Elem()
}
func (i LocalRulestackFqdnListMap) ToLocalRulestackFqdnListMapOutput() LocalRulestackFqdnListMapOutput {
return i.ToLocalRulestackFqdnListMapOutputWithContext(context.Background())
}
func (i LocalRulestackFqdnListMap) ToLocalRulestackFqdnListMapOutputWithContext(ctx context.Context) LocalRulestackFqdnListMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackFqdnListMapOutput)
}
type LocalRulestackFqdnListOutput struct{ *pulumi.OutputState }
func (LocalRulestackFqdnListOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestackFqdnList)(nil)).Elem()
}
func (o LocalRulestackFqdnListOutput) ToLocalRulestackFqdnListOutput() LocalRulestackFqdnListOutput {
return o
}
func (o LocalRulestackFqdnListOutput) ToLocalRulestackFqdnListOutputWithContext(ctx context.Context) LocalRulestackFqdnListOutput {
return o
}
// The comment for Audit purposes.
func (o LocalRulestackFqdnListOutput) AuditComment() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestackFqdnList) pulumi.StringPtrOutput { return v.AuditComment }).(pulumi.StringPtrOutput)
}
// The description for the FQDN List.
func (o LocalRulestackFqdnListOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestackFqdnList) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies a list of Fully Qualified Domain Names.
func (o LocalRulestackFqdnListOutput) FullyQualifiedDomainNames() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LocalRulestackFqdnList) pulumi.StringArrayOutput { return v.FullyQualifiedDomainNames }).(pulumi.StringArrayOutput)
}
// The name which should be used for this Palo Alto Local Rulestack FQDN List.
func (o LocalRulestackFqdnListOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *LocalRulestackFqdnList) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the TODO. Changing this forces a new Palo Alto Local Rulestack FQDN List to be created.
func (o LocalRulestackFqdnListOutput) RulestackId() pulumi.StringOutput {
return o.ApplyT(func(v *LocalRulestackFqdnList) pulumi.StringOutput { return v.RulestackId }).(pulumi.StringOutput)
}
type LocalRulestackFqdnListArrayOutput struct{ *pulumi.OutputState }
func (LocalRulestackFqdnListArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalRulestackFqdnList)(nil)).Elem()
}
func (o LocalRulestackFqdnListArrayOutput) ToLocalRulestackFqdnListArrayOutput() LocalRulestackFqdnListArrayOutput {
return o
}
func (o LocalRulestackFqdnListArrayOutput) ToLocalRulestackFqdnListArrayOutputWithContext(ctx context.Context) LocalRulestackFqdnListArrayOutput {
return o
}
func (o LocalRulestackFqdnListArrayOutput) Index(i pulumi.IntInput) LocalRulestackFqdnListOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LocalRulestackFqdnList {
return vs[0].([]*LocalRulestackFqdnList)[vs[1].(int)]
}).(LocalRulestackFqdnListOutput)
}
type LocalRulestackFqdnListMapOutput struct{ *pulumi.OutputState }
func (LocalRulestackFqdnListMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalRulestackFqdnList)(nil)).Elem()
}
func (o LocalRulestackFqdnListMapOutput) ToLocalRulestackFqdnListMapOutput() LocalRulestackFqdnListMapOutput {
return o
}
func (o LocalRulestackFqdnListMapOutput) ToLocalRulestackFqdnListMapOutputWithContext(ctx context.Context) LocalRulestackFqdnListMapOutput {
return o
}
func (o LocalRulestackFqdnListMapOutput) MapIndex(k pulumi.StringInput) LocalRulestackFqdnListOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LocalRulestackFqdnList {
return vs[0].(map[string]*LocalRulestackFqdnList)[vs[1].(string)]
}).(LocalRulestackFqdnListOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackFqdnListInput)(nil)).Elem(), &LocalRulestackFqdnList{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackFqdnListArrayInput)(nil)).Elem(), LocalRulestackFqdnListArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackFqdnListMapInput)(nil)).Elem(), LocalRulestackFqdnListMap{})
pulumi.RegisterOutputType(LocalRulestackFqdnListOutput{})
pulumi.RegisterOutputType(LocalRulestackFqdnListArrayOutput{})
pulumi.RegisterOutputType(LocalRulestackFqdnListMapOutput{})
}
| 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/paloalto/nextGenerationFirewallVirtualHubPanorama.go | sdk/go/azure/paloalto/nextGenerationFirewallVirtualHubPanorama.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 paloalto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Palo Alto Next Generation Firewall VHub Panorama.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/paloalto"
// "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
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("acceptanceTestPublicIp1"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AllocationMethod: pulumi.String("Static"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{
// Name: pulumi.String("example-virtualwan"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{
// Name: pulumi.String("example-virtualhub"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// VirtualWanId: exampleVirtualWan.ID(),
// AddressPrefix: pulumi.String("10.0.0.0/23"),
// Tags: pulumi.StringMap{
// "hubSaaSPreview": pulumi.String("true"),
// },
// })
// if err != nil {
// return err
// }
// exampleVirtualNetworkAppliance, err := paloalto.NewVirtualNetworkAppliance(ctx, "example", &paloalto.VirtualNetworkApplianceArgs{
// Name: pulumi.String("example-appliance"),
// VirtualHubId: exampleVirtualHub.ID(),
// })
// if err != nil {
// return err
// }
// _, err = paloalto.NewNextGenerationFirewallVirtualHubPanorama(ctx, "example", &paloalto.NextGenerationFirewallVirtualHubPanoramaArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// NetworkProfile: &paloalto.NextGenerationFirewallVirtualHubPanoramaNetworkProfileArgs{
// PublicIpAddressIds: pulumi.StringArray{
// examplePublicIp.ID(),
// },
// VirtualHubId: exampleVirtualHub.ID(),
// NetworkVirtualApplianceId: exampleVirtualNetworkAppliance.ID(),
// },
// PanoramaBase64Config: pulumi.String("VGhpcyBpcyBub3QgYSByZWFsIGNvbmZpZywgcGxlYXNlIHVzZSB5b3VyIFBhbm9yYW1hIHNlcnZlciB0byBnZW5lcmF0ZSBhIHJlYWwgdmFsdWUgZm9yIHRoaXMgcHJvcGVydHkhCg=="),
// })
// 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:
//
// * `PaloAltoNetworks.Cloudngfw` - 2025-05-23
//
// ## Import
//
// Palo Alto Next Generation Firewall VHub Panoramas can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:paloalto/nextGenerationFirewallVirtualHubPanorama:NextGenerationFirewallVirtualHubPanorama example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/PaloAltoNetworks.Cloudngfw/firewalls/myVhubPanoramaFW
// ```
type NextGenerationFirewallVirtualHubPanorama struct {
pulumi.CustomResourceState
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualHubPanoramaDestinationNatArrayOutput `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualHubPanoramaDnsSettingsPtrOutput `pulumi:"dnsSettings"`
// The Azure Region where the Palo Alto Next Generation Firewall VHub Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId pulumi.StringPtrOutput `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall VHub Panorama. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualHubPanoramaNetworkProfileOutput `pulumi:"networkProfile"`
// The Base64 Encoded configuration value for connecting to the Panorama Configuration server.
PanoramaBase64Config pulumi.StringOutput `pulumi:"panoramaBase64Config"`
Panoramas NextGenerationFirewallVirtualHubPanoramaPanoramaArrayOutput `pulumi:"panoramas"`
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId pulumi.StringPtrOutput `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall VHub Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall VHub Panorama.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewNextGenerationFirewallVirtualHubPanorama registers a new resource with the given unique name, arguments, and options.
func NewNextGenerationFirewallVirtualHubPanorama(ctx *pulumi.Context,
name string, args *NextGenerationFirewallVirtualHubPanoramaArgs, opts ...pulumi.ResourceOption) (*NextGenerationFirewallVirtualHubPanorama, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NetworkProfile == nil {
return nil, errors.New("invalid value for required argument 'NetworkProfile'")
}
if args.PanoramaBase64Config == nil {
return nil, errors.New("invalid value for required argument 'PanoramaBase64Config'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource NextGenerationFirewallVirtualHubPanorama
err := ctx.RegisterResource("azure:paloalto/nextGenerationFirewallVirtualHubPanorama:NextGenerationFirewallVirtualHubPanorama", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNextGenerationFirewallVirtualHubPanorama gets an existing NextGenerationFirewallVirtualHubPanorama 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 GetNextGenerationFirewallVirtualHubPanorama(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NextGenerationFirewallVirtualHubPanoramaState, opts ...pulumi.ResourceOption) (*NextGenerationFirewallVirtualHubPanorama, error) {
var resource NextGenerationFirewallVirtualHubPanorama
err := ctx.ReadResource("azure:paloalto/nextGenerationFirewallVirtualHubPanorama:NextGenerationFirewallVirtualHubPanorama", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NextGenerationFirewallVirtualHubPanorama resources.
type nextGenerationFirewallVirtualHubPanoramaState struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats []NextGenerationFirewallVirtualHubPanoramaDestinationNat `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings *NextGenerationFirewallVirtualHubPanoramaDnsSettings `pulumi:"dnsSettings"`
// The Azure Region where the Palo Alto Next Generation Firewall VHub Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
Location *string `pulumi:"location"`
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId *string `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall VHub Panorama. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile *NextGenerationFirewallVirtualHubPanoramaNetworkProfile `pulumi:"networkProfile"`
// The Base64 Encoded configuration value for connecting to the Panorama Configuration server.
PanoramaBase64Config *string `pulumi:"panoramaBase64Config"`
Panoramas []NextGenerationFirewallVirtualHubPanoramaPanorama `pulumi:"panoramas"`
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId *string `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall VHub Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall VHub Panorama.
Tags map[string]string `pulumi:"tags"`
}
type NextGenerationFirewallVirtualHubPanoramaState struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualHubPanoramaDestinationNatArrayInput
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualHubPanoramaDnsSettingsPtrInput
// The Azure Region where the Palo Alto Next Generation Firewall VHub Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
Location pulumi.StringPtrInput
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId pulumi.StringPtrInput
// The name which should be used for this Palo Alto Next Generation Firewall VHub Panorama. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualHubPanoramaNetworkProfilePtrInput
// The Base64 Encoded configuration value for connecting to the Panorama Configuration server.
PanoramaBase64Config pulumi.StringPtrInput
Panoramas NextGenerationFirewallVirtualHubPanoramaPanoramaArrayInput
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId pulumi.StringPtrInput
// The name of the Resource Group where the Palo Alto Next Generation Firewall VHub Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall VHub Panorama.
Tags pulumi.StringMapInput
}
func (NextGenerationFirewallVirtualHubPanoramaState) ElementType() reflect.Type {
return reflect.TypeOf((*nextGenerationFirewallVirtualHubPanoramaState)(nil)).Elem()
}
type nextGenerationFirewallVirtualHubPanoramaArgs struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats []NextGenerationFirewallVirtualHubPanoramaDestinationNat `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings *NextGenerationFirewallVirtualHubPanoramaDnsSettings `pulumi:"dnsSettings"`
// The Azure Region where the Palo Alto Next Generation Firewall VHub Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
Location *string `pulumi:"location"`
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId *string `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall VHub Panorama. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualHubPanoramaNetworkProfile `pulumi:"networkProfile"`
// The Base64 Encoded configuration value for connecting to the Panorama Configuration server.
PanoramaBase64Config string `pulumi:"panoramaBase64Config"`
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId *string `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall VHub Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall VHub Panorama.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a NextGenerationFirewallVirtualHubPanorama resource.
type NextGenerationFirewallVirtualHubPanoramaArgs struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualHubPanoramaDestinationNatArrayInput
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualHubPanoramaDnsSettingsPtrInput
// The Azure Region where the Palo Alto Next Generation Firewall VHub Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
Location pulumi.StringPtrInput
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId pulumi.StringPtrInput
// The name which should be used for this Palo Alto Next Generation Firewall VHub Panorama. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualHubPanoramaNetworkProfileInput
// The Base64 Encoded configuration value for connecting to the Panorama Configuration server.
PanoramaBase64Config pulumi.StringInput
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
PlanId pulumi.StringPtrInput
// The name of the Resource Group where the Palo Alto Next Generation Firewall VHub Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall VHub Panorama.
Tags pulumi.StringMapInput
}
func (NextGenerationFirewallVirtualHubPanoramaArgs) ElementType() reflect.Type {
return reflect.TypeOf((*nextGenerationFirewallVirtualHubPanoramaArgs)(nil)).Elem()
}
type NextGenerationFirewallVirtualHubPanoramaInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualHubPanoramaOutput() NextGenerationFirewallVirtualHubPanoramaOutput
ToNextGenerationFirewallVirtualHubPanoramaOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubPanoramaOutput
}
func (*NextGenerationFirewallVirtualHubPanorama) ElementType() reflect.Type {
return reflect.TypeOf((**NextGenerationFirewallVirtualHubPanorama)(nil)).Elem()
}
func (i *NextGenerationFirewallVirtualHubPanorama) ToNextGenerationFirewallVirtualHubPanoramaOutput() NextGenerationFirewallVirtualHubPanoramaOutput {
return i.ToNextGenerationFirewallVirtualHubPanoramaOutputWithContext(context.Background())
}
func (i *NextGenerationFirewallVirtualHubPanorama) ToNextGenerationFirewallVirtualHubPanoramaOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubPanoramaOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualHubPanoramaOutput)
}
// NextGenerationFirewallVirtualHubPanoramaArrayInput is an input type that accepts NextGenerationFirewallVirtualHubPanoramaArray and NextGenerationFirewallVirtualHubPanoramaArrayOutput values.
// You can construct a concrete instance of `NextGenerationFirewallVirtualHubPanoramaArrayInput` via:
//
// NextGenerationFirewallVirtualHubPanoramaArray{ NextGenerationFirewallVirtualHubPanoramaArgs{...} }
type NextGenerationFirewallVirtualHubPanoramaArrayInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualHubPanoramaArrayOutput() NextGenerationFirewallVirtualHubPanoramaArrayOutput
ToNextGenerationFirewallVirtualHubPanoramaArrayOutputWithContext(context.Context) NextGenerationFirewallVirtualHubPanoramaArrayOutput
}
type NextGenerationFirewallVirtualHubPanoramaArray []NextGenerationFirewallVirtualHubPanoramaInput
func (NextGenerationFirewallVirtualHubPanoramaArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NextGenerationFirewallVirtualHubPanorama)(nil)).Elem()
}
func (i NextGenerationFirewallVirtualHubPanoramaArray) ToNextGenerationFirewallVirtualHubPanoramaArrayOutput() NextGenerationFirewallVirtualHubPanoramaArrayOutput {
return i.ToNextGenerationFirewallVirtualHubPanoramaArrayOutputWithContext(context.Background())
}
func (i NextGenerationFirewallVirtualHubPanoramaArray) ToNextGenerationFirewallVirtualHubPanoramaArrayOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubPanoramaArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualHubPanoramaArrayOutput)
}
// NextGenerationFirewallVirtualHubPanoramaMapInput is an input type that accepts NextGenerationFirewallVirtualHubPanoramaMap and NextGenerationFirewallVirtualHubPanoramaMapOutput values.
// You can construct a concrete instance of `NextGenerationFirewallVirtualHubPanoramaMapInput` via:
//
// NextGenerationFirewallVirtualHubPanoramaMap{ "key": NextGenerationFirewallVirtualHubPanoramaArgs{...} }
type NextGenerationFirewallVirtualHubPanoramaMapInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualHubPanoramaMapOutput() NextGenerationFirewallVirtualHubPanoramaMapOutput
ToNextGenerationFirewallVirtualHubPanoramaMapOutputWithContext(context.Context) NextGenerationFirewallVirtualHubPanoramaMapOutput
}
type NextGenerationFirewallVirtualHubPanoramaMap map[string]NextGenerationFirewallVirtualHubPanoramaInput
func (NextGenerationFirewallVirtualHubPanoramaMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NextGenerationFirewallVirtualHubPanorama)(nil)).Elem()
}
func (i NextGenerationFirewallVirtualHubPanoramaMap) ToNextGenerationFirewallVirtualHubPanoramaMapOutput() NextGenerationFirewallVirtualHubPanoramaMapOutput {
return i.ToNextGenerationFirewallVirtualHubPanoramaMapOutputWithContext(context.Background())
}
func (i NextGenerationFirewallVirtualHubPanoramaMap) ToNextGenerationFirewallVirtualHubPanoramaMapOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubPanoramaMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualHubPanoramaMapOutput)
}
type NextGenerationFirewallVirtualHubPanoramaOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualHubPanoramaOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NextGenerationFirewallVirtualHubPanorama)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualHubPanoramaOutput) ToNextGenerationFirewallVirtualHubPanoramaOutput() NextGenerationFirewallVirtualHubPanoramaOutput {
return o
}
func (o NextGenerationFirewallVirtualHubPanoramaOutput) ToNextGenerationFirewallVirtualHubPanoramaOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubPanoramaOutput {
return o
}
// One or more `destinationNat` blocks as defined below.
func (o NextGenerationFirewallVirtualHubPanoramaOutput) DestinationNats() NextGenerationFirewallVirtualHubPanoramaDestinationNatArrayOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubPanorama) NextGenerationFirewallVirtualHubPanoramaDestinationNatArrayOutput {
return v.DestinationNats
}).(NextGenerationFirewallVirtualHubPanoramaDestinationNatArrayOutput)
}
// A `dnsSettings` block as defined below.
func (o NextGenerationFirewallVirtualHubPanoramaOutput) DnsSettings() NextGenerationFirewallVirtualHubPanoramaDnsSettingsPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubPanorama) NextGenerationFirewallVirtualHubPanoramaDnsSettingsPtrOutput {
return v.DnsSettings
}).(NextGenerationFirewallVirtualHubPanoramaDnsSettingsPtrOutput)
}
// The Azure Region where the Palo Alto Next Generation Firewall VHub Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
func (o NextGenerationFirewallVirtualHubPanoramaOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubPanorama) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
func (o NextGenerationFirewallVirtualHubPanoramaOutput) MarketplaceOfferId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubPanorama) pulumi.StringPtrOutput { return v.MarketplaceOfferId }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Palo Alto Next Generation Firewall VHub Panorama. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
func (o NextGenerationFirewallVirtualHubPanoramaOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubPanorama) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `networkProfile` block as defined below.
func (o NextGenerationFirewallVirtualHubPanoramaOutput) NetworkProfile() NextGenerationFirewallVirtualHubPanoramaNetworkProfileOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubPanorama) NextGenerationFirewallVirtualHubPanoramaNetworkProfileOutput {
return v.NetworkProfile
}).(NextGenerationFirewallVirtualHubPanoramaNetworkProfileOutput)
}
// The Base64 Encoded configuration value for connecting to the Panorama Configuration server.
func (o NextGenerationFirewallVirtualHubPanoramaOutput) PanoramaBase64Config() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubPanorama) pulumi.StringOutput { return v.PanoramaBase64Config }).(pulumi.StringOutput)
}
func (o NextGenerationFirewallVirtualHubPanoramaOutput) Panoramas() NextGenerationFirewallVirtualHubPanoramaPanoramaArrayOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubPanorama) NextGenerationFirewallVirtualHubPanoramaPanoramaArrayOutput {
return v.Panoramas
}).(NextGenerationFirewallVirtualHubPanoramaPanoramaArrayOutput)
}
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cloud-ngfw-payg`.
//
// > **Note:** The former `planId` `panw-cloud-ngfw-payg` is defined as stop sell, but has been set as the default to not break any existing resources that were originally provisioned with it. Users need to explicitly set `planId` to `panw-cngfw-payg` when creating new resources.
func (o NextGenerationFirewallVirtualHubPanoramaOutput) PlanId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubPanorama) pulumi.StringPtrOutput { return v.PlanId }).(pulumi.StringPtrOutput)
}
// The name of the Resource Group where the Palo Alto Next Generation Firewall VHub Panorama should exist. Changing this forces a new Palo Alto Next Generation Firewall VHub Panorama to be created.
func (o NextGenerationFirewallVirtualHubPanoramaOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubPanorama) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall VHub Panorama.
func (o NextGenerationFirewallVirtualHubPanoramaOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubPanorama) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type NextGenerationFirewallVirtualHubPanoramaArrayOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualHubPanoramaArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NextGenerationFirewallVirtualHubPanorama)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualHubPanoramaArrayOutput) ToNextGenerationFirewallVirtualHubPanoramaArrayOutput() NextGenerationFirewallVirtualHubPanoramaArrayOutput {
return o
}
func (o NextGenerationFirewallVirtualHubPanoramaArrayOutput) ToNextGenerationFirewallVirtualHubPanoramaArrayOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubPanoramaArrayOutput {
return o
}
func (o NextGenerationFirewallVirtualHubPanoramaArrayOutput) Index(i pulumi.IntInput) NextGenerationFirewallVirtualHubPanoramaOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NextGenerationFirewallVirtualHubPanorama {
return vs[0].([]*NextGenerationFirewallVirtualHubPanorama)[vs[1].(int)]
}).(NextGenerationFirewallVirtualHubPanoramaOutput)
}
type NextGenerationFirewallVirtualHubPanoramaMapOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualHubPanoramaMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NextGenerationFirewallVirtualHubPanorama)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualHubPanoramaMapOutput) ToNextGenerationFirewallVirtualHubPanoramaMapOutput() NextGenerationFirewallVirtualHubPanoramaMapOutput {
return o
}
func (o NextGenerationFirewallVirtualHubPanoramaMapOutput) ToNextGenerationFirewallVirtualHubPanoramaMapOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubPanoramaMapOutput {
return o
}
func (o NextGenerationFirewallVirtualHubPanoramaMapOutput) MapIndex(k pulumi.StringInput) NextGenerationFirewallVirtualHubPanoramaOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NextGenerationFirewallVirtualHubPanorama {
return vs[0].(map[string]*NextGenerationFirewallVirtualHubPanorama)[vs[1].(string)]
}).(NextGenerationFirewallVirtualHubPanoramaOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualHubPanoramaInput)(nil)).Elem(), &NextGenerationFirewallVirtualHubPanorama{})
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualHubPanoramaArrayInput)(nil)).Elem(), NextGenerationFirewallVirtualHubPanoramaArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualHubPanoramaMapInput)(nil)).Elem(), NextGenerationFirewallVirtualHubPanoramaMap{})
pulumi.RegisterOutputType(NextGenerationFirewallVirtualHubPanoramaOutput{})
pulumi.RegisterOutputType(NextGenerationFirewallVirtualHubPanoramaArrayOutput{})
pulumi.RegisterOutputType(NextGenerationFirewallVirtualHubPanoramaMapOutput{})
}
| 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/paloalto/nextGenerationFirewallVirtualHubStrataCloudManager.go | sdk/go/azure/paloalto/nextGenerationFirewallVirtualHubStrataCloudManager.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 paloalto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/paloalto"
// "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
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("example-public-ip"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AllocationMethod: pulumi.String("Static"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{
// Name: pulumi.String("example-virtualwan"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{
// Name: pulumi.String("example-virtualhub"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// VirtualWanId: exampleVirtualWan.ID(),
// AddressPrefix: pulumi.String("10.0.0.0/23"),
// Tags: pulumi.StringMap{
// "hubSaaSPreview": pulumi.String("true"),
// },
// })
// if err != nil {
// return err
// }
// exampleVirtualNetworkAppliance, err := paloalto.NewVirtualNetworkAppliance(ctx, "example", &paloalto.VirtualNetworkApplianceArgs{
// Name: pulumi.String("example-appliance"),
// VirtualHubId: exampleVirtualHub.ID(),
// })
// if err != nil {
// return err
// }
// _, err = paloalto.NewNextGenerationFirewallVirtualHubStrataCloudManager(ctx, "example", &paloalto.NextGenerationFirewallVirtualHubStrataCloudManagerArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// StrataCloudManagerTenantName: pulumi.String("example"),
// NetworkProfile: &paloalto.NextGenerationFirewallVirtualHubStrataCloudManagerNetworkProfileArgs{
// PublicIpAddressIds: pulumi.StringArray{
// examplePublicIp.ID(),
// },
// VirtualHubId: exampleVirtualHub.ID(),
// NetworkVirtualApplianceId: exampleVirtualNetworkAppliance.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:
//
// * `PaloAltoNetworks.Cloudngfw` - 2025-05-23
//
// ## Import
//
// Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Managers can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:paloalto/nextGenerationFirewallVirtualHubStrataCloudManager:NextGenerationFirewallVirtualHubStrataCloudManager example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/PaloAltoNetworks.Cloudngfw/firewalls/myVNetStrataCloudManagerFW
// ```
type NextGenerationFirewallVirtualHubStrataCloudManager struct {
pulumi.CustomResourceState
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualHubStrataCloudManagerDestinationNatArrayOutput `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualHubStrataCloudManagerDnsSettingsPtrOutput `pulumi:"dnsSettings"`
// A `identity` block as defined below.
Identity NextGenerationFirewallVirtualHubStrataCloudManagerIdentityPtrOutput `pulumi:"identity"`
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The ID of the marketplace offer. Defaults to `panSwfwCloudNgfw`. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
MarketplaceOfferId pulumi.StringPtrOutput `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualHubStrataCloudManagerNetworkProfileOutput `pulumi:"networkProfile"`
// The ID of the billing plan. Defaults to `panw-cngfw-payg`.
PlanId pulumi.StringPtrOutput `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Strata Cloud Manager name which is intended to manage the policy for this firewall.
StrataCloudManagerTenantName pulumi.StringOutput `pulumi:"strataCloudManagerTenantName"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewNextGenerationFirewallVirtualHubStrataCloudManager registers a new resource with the given unique name, arguments, and options.
func NewNextGenerationFirewallVirtualHubStrataCloudManager(ctx *pulumi.Context,
name string, args *NextGenerationFirewallVirtualHubStrataCloudManagerArgs, opts ...pulumi.ResourceOption) (*NextGenerationFirewallVirtualHubStrataCloudManager, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NetworkProfile == nil {
return nil, errors.New("invalid value for required argument 'NetworkProfile'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.StrataCloudManagerTenantName == nil {
return nil, errors.New("invalid value for required argument 'StrataCloudManagerTenantName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource NextGenerationFirewallVirtualHubStrataCloudManager
err := ctx.RegisterResource("azure:paloalto/nextGenerationFirewallVirtualHubStrataCloudManager:NextGenerationFirewallVirtualHubStrataCloudManager", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNextGenerationFirewallVirtualHubStrataCloudManager gets an existing NextGenerationFirewallVirtualHubStrataCloudManager 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 GetNextGenerationFirewallVirtualHubStrataCloudManager(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NextGenerationFirewallVirtualHubStrataCloudManagerState, opts ...pulumi.ResourceOption) (*NextGenerationFirewallVirtualHubStrataCloudManager, error) {
var resource NextGenerationFirewallVirtualHubStrataCloudManager
err := ctx.ReadResource("azure:paloalto/nextGenerationFirewallVirtualHubStrataCloudManager:NextGenerationFirewallVirtualHubStrataCloudManager", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NextGenerationFirewallVirtualHubStrataCloudManager resources.
type nextGenerationFirewallVirtualHubStrataCloudManagerState struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats []NextGenerationFirewallVirtualHubStrataCloudManagerDestinationNat `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings *NextGenerationFirewallVirtualHubStrataCloudManagerDnsSettings `pulumi:"dnsSettings"`
// A `identity` block as defined below.
Identity *NextGenerationFirewallVirtualHubStrataCloudManagerIdentity `pulumi:"identity"`
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
Location *string `pulumi:"location"`
// The ID of the marketplace offer. Defaults to `panSwfwCloudNgfw`. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
MarketplaceOfferId *string `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile *NextGenerationFirewallVirtualHubStrataCloudManagerNetworkProfile `pulumi:"networkProfile"`
// The ID of the billing plan. Defaults to `panw-cngfw-payg`.
PlanId *string `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Strata Cloud Manager name which is intended to manage the policy for this firewall.
StrataCloudManagerTenantName *string `pulumi:"strataCloudManagerTenantName"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager.
Tags map[string]string `pulumi:"tags"`
}
type NextGenerationFirewallVirtualHubStrataCloudManagerState struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualHubStrataCloudManagerDestinationNatArrayInput
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualHubStrataCloudManagerDnsSettingsPtrInput
// A `identity` block as defined below.
Identity NextGenerationFirewallVirtualHubStrataCloudManagerIdentityPtrInput
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
Location pulumi.StringPtrInput
// The ID of the marketplace offer. Defaults to `panSwfwCloudNgfw`. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
MarketplaceOfferId pulumi.StringPtrInput
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualHubStrataCloudManagerNetworkProfilePtrInput
// The ID of the billing plan. Defaults to `panw-cngfw-payg`.
PlanId pulumi.StringPtrInput
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
ResourceGroupName pulumi.StringPtrInput
// Strata Cloud Manager name which is intended to manage the policy for this firewall.
StrataCloudManagerTenantName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager.
Tags pulumi.StringMapInput
}
func (NextGenerationFirewallVirtualHubStrataCloudManagerState) ElementType() reflect.Type {
return reflect.TypeOf((*nextGenerationFirewallVirtualHubStrataCloudManagerState)(nil)).Elem()
}
type nextGenerationFirewallVirtualHubStrataCloudManagerArgs struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats []NextGenerationFirewallVirtualHubStrataCloudManagerDestinationNat `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings *NextGenerationFirewallVirtualHubStrataCloudManagerDnsSettings `pulumi:"dnsSettings"`
// A `identity` block as defined below.
Identity *NextGenerationFirewallVirtualHubStrataCloudManagerIdentity `pulumi:"identity"`
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
Location *string `pulumi:"location"`
// The ID of the marketplace offer. Defaults to `panSwfwCloudNgfw`. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
MarketplaceOfferId *string `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualHubStrataCloudManagerNetworkProfile `pulumi:"networkProfile"`
// The ID of the billing plan. Defaults to `panw-cngfw-payg`.
PlanId *string `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Strata Cloud Manager name which is intended to manage the policy for this firewall.
StrataCloudManagerTenantName string `pulumi:"strataCloudManagerTenantName"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a NextGenerationFirewallVirtualHubStrataCloudManager resource.
type NextGenerationFirewallVirtualHubStrataCloudManagerArgs struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualHubStrataCloudManagerDestinationNatArrayInput
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualHubStrataCloudManagerDnsSettingsPtrInput
// A `identity` block as defined below.
Identity NextGenerationFirewallVirtualHubStrataCloudManagerIdentityPtrInput
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
Location pulumi.StringPtrInput
// The ID of the marketplace offer. Defaults to `panSwfwCloudNgfw`. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
MarketplaceOfferId pulumi.StringPtrInput
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualHubStrataCloudManagerNetworkProfileInput
// The ID of the billing plan. Defaults to `panw-cngfw-payg`.
PlanId pulumi.StringPtrInput
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
ResourceGroupName pulumi.StringInput
// Strata Cloud Manager name which is intended to manage the policy for this firewall.
StrataCloudManagerTenantName pulumi.StringInput
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager.
Tags pulumi.StringMapInput
}
func (NextGenerationFirewallVirtualHubStrataCloudManagerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*nextGenerationFirewallVirtualHubStrataCloudManagerArgs)(nil)).Elem()
}
type NextGenerationFirewallVirtualHubStrataCloudManagerInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualHubStrataCloudManagerOutput() NextGenerationFirewallVirtualHubStrataCloudManagerOutput
ToNextGenerationFirewallVirtualHubStrataCloudManagerOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubStrataCloudManagerOutput
}
func (*NextGenerationFirewallVirtualHubStrataCloudManager) ElementType() reflect.Type {
return reflect.TypeOf((**NextGenerationFirewallVirtualHubStrataCloudManager)(nil)).Elem()
}
func (i *NextGenerationFirewallVirtualHubStrataCloudManager) ToNextGenerationFirewallVirtualHubStrataCloudManagerOutput() NextGenerationFirewallVirtualHubStrataCloudManagerOutput {
return i.ToNextGenerationFirewallVirtualHubStrataCloudManagerOutputWithContext(context.Background())
}
func (i *NextGenerationFirewallVirtualHubStrataCloudManager) ToNextGenerationFirewallVirtualHubStrataCloudManagerOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubStrataCloudManagerOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualHubStrataCloudManagerOutput)
}
// NextGenerationFirewallVirtualHubStrataCloudManagerArrayInput is an input type that accepts NextGenerationFirewallVirtualHubStrataCloudManagerArray and NextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput values.
// You can construct a concrete instance of `NextGenerationFirewallVirtualHubStrataCloudManagerArrayInput` via:
//
// NextGenerationFirewallVirtualHubStrataCloudManagerArray{ NextGenerationFirewallVirtualHubStrataCloudManagerArgs{...} }
type NextGenerationFirewallVirtualHubStrataCloudManagerArrayInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput() NextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput
ToNextGenerationFirewallVirtualHubStrataCloudManagerArrayOutputWithContext(context.Context) NextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput
}
type NextGenerationFirewallVirtualHubStrataCloudManagerArray []NextGenerationFirewallVirtualHubStrataCloudManagerInput
func (NextGenerationFirewallVirtualHubStrataCloudManagerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NextGenerationFirewallVirtualHubStrataCloudManager)(nil)).Elem()
}
func (i NextGenerationFirewallVirtualHubStrataCloudManagerArray) ToNextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput() NextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput {
return i.ToNextGenerationFirewallVirtualHubStrataCloudManagerArrayOutputWithContext(context.Background())
}
func (i NextGenerationFirewallVirtualHubStrataCloudManagerArray) ToNextGenerationFirewallVirtualHubStrataCloudManagerArrayOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput)
}
// NextGenerationFirewallVirtualHubStrataCloudManagerMapInput is an input type that accepts NextGenerationFirewallVirtualHubStrataCloudManagerMap and NextGenerationFirewallVirtualHubStrataCloudManagerMapOutput values.
// You can construct a concrete instance of `NextGenerationFirewallVirtualHubStrataCloudManagerMapInput` via:
//
// NextGenerationFirewallVirtualHubStrataCloudManagerMap{ "key": NextGenerationFirewallVirtualHubStrataCloudManagerArgs{...} }
type NextGenerationFirewallVirtualHubStrataCloudManagerMapInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualHubStrataCloudManagerMapOutput() NextGenerationFirewallVirtualHubStrataCloudManagerMapOutput
ToNextGenerationFirewallVirtualHubStrataCloudManagerMapOutputWithContext(context.Context) NextGenerationFirewallVirtualHubStrataCloudManagerMapOutput
}
type NextGenerationFirewallVirtualHubStrataCloudManagerMap map[string]NextGenerationFirewallVirtualHubStrataCloudManagerInput
func (NextGenerationFirewallVirtualHubStrataCloudManagerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NextGenerationFirewallVirtualHubStrataCloudManager)(nil)).Elem()
}
func (i NextGenerationFirewallVirtualHubStrataCloudManagerMap) ToNextGenerationFirewallVirtualHubStrataCloudManagerMapOutput() NextGenerationFirewallVirtualHubStrataCloudManagerMapOutput {
return i.ToNextGenerationFirewallVirtualHubStrataCloudManagerMapOutputWithContext(context.Background())
}
func (i NextGenerationFirewallVirtualHubStrataCloudManagerMap) ToNextGenerationFirewallVirtualHubStrataCloudManagerMapOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubStrataCloudManagerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualHubStrataCloudManagerMapOutput)
}
type NextGenerationFirewallVirtualHubStrataCloudManagerOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualHubStrataCloudManagerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NextGenerationFirewallVirtualHubStrataCloudManager)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualHubStrataCloudManagerOutput) ToNextGenerationFirewallVirtualHubStrataCloudManagerOutput() NextGenerationFirewallVirtualHubStrataCloudManagerOutput {
return o
}
func (o NextGenerationFirewallVirtualHubStrataCloudManagerOutput) ToNextGenerationFirewallVirtualHubStrataCloudManagerOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubStrataCloudManagerOutput {
return o
}
// One or more `destinationNat` blocks as defined below.
func (o NextGenerationFirewallVirtualHubStrataCloudManagerOutput) DestinationNats() NextGenerationFirewallVirtualHubStrataCloudManagerDestinationNatArrayOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubStrataCloudManager) NextGenerationFirewallVirtualHubStrataCloudManagerDestinationNatArrayOutput {
return v.DestinationNats
}).(NextGenerationFirewallVirtualHubStrataCloudManagerDestinationNatArrayOutput)
}
// A `dnsSettings` block as defined below.
func (o NextGenerationFirewallVirtualHubStrataCloudManagerOutput) DnsSettings() NextGenerationFirewallVirtualHubStrataCloudManagerDnsSettingsPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubStrataCloudManager) NextGenerationFirewallVirtualHubStrataCloudManagerDnsSettingsPtrOutput {
return v.DnsSettings
}).(NextGenerationFirewallVirtualHubStrataCloudManagerDnsSettingsPtrOutput)
}
// A `identity` block as defined below.
func (o NextGenerationFirewallVirtualHubStrataCloudManagerOutput) Identity() NextGenerationFirewallVirtualHubStrataCloudManagerIdentityPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubStrataCloudManager) NextGenerationFirewallVirtualHubStrataCloudManagerIdentityPtrOutput {
return v.Identity
}).(NextGenerationFirewallVirtualHubStrataCloudManagerIdentityPtrOutput)
}
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
func (o NextGenerationFirewallVirtualHubStrataCloudManagerOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubStrataCloudManager) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The ID of the marketplace offer. Defaults to `panSwfwCloudNgfw`. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
func (o NextGenerationFirewallVirtualHubStrataCloudManagerOutput) MarketplaceOfferId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubStrataCloudManager) pulumi.StringPtrOutput {
return v.MarketplaceOfferId
}).(pulumi.StringPtrOutput)
}
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
func (o NextGenerationFirewallVirtualHubStrataCloudManagerOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubStrataCloudManager) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `networkProfile` block as defined below.
func (o NextGenerationFirewallVirtualHubStrataCloudManagerOutput) NetworkProfile() NextGenerationFirewallVirtualHubStrataCloudManagerNetworkProfileOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubStrataCloudManager) NextGenerationFirewallVirtualHubStrataCloudManagerNetworkProfileOutput {
return v.NetworkProfile
}).(NextGenerationFirewallVirtualHubStrataCloudManagerNetworkProfileOutput)
}
// The ID of the billing plan. Defaults to `panw-cngfw-payg`.
func (o NextGenerationFirewallVirtualHubStrataCloudManagerOutput) PlanId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubStrataCloudManager) pulumi.StringPtrOutput { return v.PlanId }).(pulumi.StringPtrOutput)
}
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager to be created.
func (o NextGenerationFirewallVirtualHubStrataCloudManagerOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubStrataCloudManager) pulumi.StringOutput {
return v.ResourceGroupName
}).(pulumi.StringOutput)
}
// Strata Cloud Manager name which is intended to manage the policy for this firewall.
func (o NextGenerationFirewallVirtualHubStrataCloudManagerOutput) StrataCloudManagerTenantName() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubStrataCloudManager) pulumi.StringOutput {
return v.StrataCloudManagerTenantName
}).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Hub Strata Cloud Manager.
func (o NextGenerationFirewallVirtualHubStrataCloudManagerOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualHubStrataCloudManager) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type NextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NextGenerationFirewallVirtualHubStrataCloudManager)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput) ToNextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput() NextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput {
return o
}
func (o NextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput) ToNextGenerationFirewallVirtualHubStrataCloudManagerArrayOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput {
return o
}
func (o NextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput) Index(i pulumi.IntInput) NextGenerationFirewallVirtualHubStrataCloudManagerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NextGenerationFirewallVirtualHubStrataCloudManager {
return vs[0].([]*NextGenerationFirewallVirtualHubStrataCloudManager)[vs[1].(int)]
}).(NextGenerationFirewallVirtualHubStrataCloudManagerOutput)
}
type NextGenerationFirewallVirtualHubStrataCloudManagerMapOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualHubStrataCloudManagerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NextGenerationFirewallVirtualHubStrataCloudManager)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualHubStrataCloudManagerMapOutput) ToNextGenerationFirewallVirtualHubStrataCloudManagerMapOutput() NextGenerationFirewallVirtualHubStrataCloudManagerMapOutput {
return o
}
func (o NextGenerationFirewallVirtualHubStrataCloudManagerMapOutput) ToNextGenerationFirewallVirtualHubStrataCloudManagerMapOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualHubStrataCloudManagerMapOutput {
return o
}
func (o NextGenerationFirewallVirtualHubStrataCloudManagerMapOutput) MapIndex(k pulumi.StringInput) NextGenerationFirewallVirtualHubStrataCloudManagerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NextGenerationFirewallVirtualHubStrataCloudManager {
return vs[0].(map[string]*NextGenerationFirewallVirtualHubStrataCloudManager)[vs[1].(string)]
}).(NextGenerationFirewallVirtualHubStrataCloudManagerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualHubStrataCloudManagerInput)(nil)).Elem(), &NextGenerationFirewallVirtualHubStrataCloudManager{})
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualHubStrataCloudManagerArrayInput)(nil)).Elem(), NextGenerationFirewallVirtualHubStrataCloudManagerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualHubStrataCloudManagerMapInput)(nil)).Elem(), NextGenerationFirewallVirtualHubStrataCloudManagerMap{})
pulumi.RegisterOutputType(NextGenerationFirewallVirtualHubStrataCloudManagerOutput{})
pulumi.RegisterOutputType(NextGenerationFirewallVirtualHubStrataCloudManagerArrayOutput{})
pulumi.RegisterOutputType(NextGenerationFirewallVirtualHubStrataCloudManagerMapOutput{})
}
| 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/paloalto/localRulestack.go | sdk/go/azure/paloalto/localRulestack.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 paloalto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Palo Alto Networks Rulestack.
//
// ## 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/paloalto"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("rg-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = paloalto.NewLocalRulestack(ctx, "example", &paloalto.LocalRulestackArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `PaloAltoNetworks.Cloudngfw` - 2022-08-29
//
// ## Import
//
// Palo Alto Networks Rulestacks can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:paloalto/localRulestack:LocalRulestack example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/myLocalRulestack
// ```
type LocalRulestack struct {
pulumi.CustomResourceState
// The setting to use for Anti-Spyware. Possible values include `BestPractice`, and `Custom`.
AntiSpywareProfile pulumi.StringPtrOutput `pulumi:"antiSpywareProfile"`
// The setting to use for Anti-Virus. Possible values include `BestPractice`, and `Custom`.
AntiVirusProfile pulumi.StringPtrOutput `pulumi:"antiVirusProfile"`
// The description for this Local Rulestack.
Description pulumi.StringPtrOutput `pulumi:"description"`
// TThe setting to use for DNS Subscription. Possible values include `BestPractice`, and `Custom`.
DnsSubscription pulumi.StringPtrOutput `pulumi:"dnsSubscription"`
// The setting to use for the File Blocking Profile. Possible values include `BestPractice`, and `Custom`.
FileBlockingProfile pulumi.StringPtrOutput `pulumi:"fileBlockingProfile"`
// The Azure Region where the Palo Alto Networks Rulestack should exist. Changing this forces a new Palo Alto Networks Rulestack to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Palo Alto Networks Rulestack. Changing this forces a new Palo Alto Networks Rulestack to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Palo Alto Networks Rulestack should exist. Changing this forces a new Palo Alto Networks Rulestack to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The setting to use for the URL Filtering Profile. Possible values include `BestPractice`, and `Custom`.
UrlFilteringProfile pulumi.StringPtrOutput `pulumi:"urlFilteringProfile"`
// The setting to use for the Vulnerability Profile. Possible values include `BestPractice`, and `Custom`.
VulnerabilityProfile pulumi.StringPtrOutput `pulumi:"vulnerabilityProfile"`
}
// NewLocalRulestack registers a new resource with the given unique name, arguments, and options.
func NewLocalRulestack(ctx *pulumi.Context,
name string, args *LocalRulestackArgs, opts ...pulumi.ResourceOption) (*LocalRulestack, 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 LocalRulestack
err := ctx.RegisterResource("azure:paloalto/localRulestack:LocalRulestack", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLocalRulestack gets an existing LocalRulestack 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 GetLocalRulestack(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LocalRulestackState, opts ...pulumi.ResourceOption) (*LocalRulestack, error) {
var resource LocalRulestack
err := ctx.ReadResource("azure:paloalto/localRulestack:LocalRulestack", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LocalRulestack resources.
type localRulestackState struct {
// The setting to use for Anti-Spyware. Possible values include `BestPractice`, and `Custom`.
AntiSpywareProfile *string `pulumi:"antiSpywareProfile"`
// The setting to use for Anti-Virus. Possible values include `BestPractice`, and `Custom`.
AntiVirusProfile *string `pulumi:"antiVirusProfile"`
// The description for this Local Rulestack.
Description *string `pulumi:"description"`
// TThe setting to use for DNS Subscription. Possible values include `BestPractice`, and `Custom`.
DnsSubscription *string `pulumi:"dnsSubscription"`
// The setting to use for the File Blocking Profile. Possible values include `BestPractice`, and `Custom`.
FileBlockingProfile *string `pulumi:"fileBlockingProfile"`
// The Azure Region where the Palo Alto Networks Rulestack should exist. Changing this forces a new Palo Alto Networks Rulestack to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Palo Alto Networks Rulestack. Changing this forces a new Palo Alto Networks Rulestack to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Palo Alto Networks Rulestack should exist. Changing this forces a new Palo Alto Networks Rulestack to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The setting to use for the URL Filtering Profile. Possible values include `BestPractice`, and `Custom`.
UrlFilteringProfile *string `pulumi:"urlFilteringProfile"`
// The setting to use for the Vulnerability Profile. Possible values include `BestPractice`, and `Custom`.
VulnerabilityProfile *string `pulumi:"vulnerabilityProfile"`
}
type LocalRulestackState struct {
// The setting to use for Anti-Spyware. Possible values include `BestPractice`, and `Custom`.
AntiSpywareProfile pulumi.StringPtrInput
// The setting to use for Anti-Virus. Possible values include `BestPractice`, and `Custom`.
AntiVirusProfile pulumi.StringPtrInput
// The description for this Local Rulestack.
Description pulumi.StringPtrInput
// TThe setting to use for DNS Subscription. Possible values include `BestPractice`, and `Custom`.
DnsSubscription pulumi.StringPtrInput
// The setting to use for the File Blocking Profile. Possible values include `BestPractice`, and `Custom`.
FileBlockingProfile pulumi.StringPtrInput
// The Azure Region where the Palo Alto Networks Rulestack should exist. Changing this forces a new Palo Alto Networks Rulestack to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Palo Alto Networks Rulestack. Changing this forces a new Palo Alto Networks Rulestack to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Palo Alto Networks Rulestack should exist. Changing this forces a new Palo Alto Networks Rulestack to be created.
ResourceGroupName pulumi.StringPtrInput
// The setting to use for the URL Filtering Profile. Possible values include `BestPractice`, and `Custom`.
UrlFilteringProfile pulumi.StringPtrInput
// The setting to use for the Vulnerability Profile. Possible values include `BestPractice`, and `Custom`.
VulnerabilityProfile pulumi.StringPtrInput
}
func (LocalRulestackState) ElementType() reflect.Type {
return reflect.TypeOf((*localRulestackState)(nil)).Elem()
}
type localRulestackArgs struct {
// The setting to use for Anti-Spyware. Possible values include `BestPractice`, and `Custom`.
AntiSpywareProfile *string `pulumi:"antiSpywareProfile"`
// The setting to use for Anti-Virus. Possible values include `BestPractice`, and `Custom`.
AntiVirusProfile *string `pulumi:"antiVirusProfile"`
// The description for this Local Rulestack.
Description *string `pulumi:"description"`
// TThe setting to use for DNS Subscription. Possible values include `BestPractice`, and `Custom`.
DnsSubscription *string `pulumi:"dnsSubscription"`
// The setting to use for the File Blocking Profile. Possible values include `BestPractice`, and `Custom`.
FileBlockingProfile *string `pulumi:"fileBlockingProfile"`
// The Azure Region where the Palo Alto Networks Rulestack should exist. Changing this forces a new Palo Alto Networks Rulestack to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Palo Alto Networks Rulestack. Changing this forces a new Palo Alto Networks Rulestack to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Palo Alto Networks Rulestack should exist. Changing this forces a new Palo Alto Networks Rulestack to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The setting to use for the URL Filtering Profile. Possible values include `BestPractice`, and `Custom`.
UrlFilteringProfile *string `pulumi:"urlFilteringProfile"`
// The setting to use for the Vulnerability Profile. Possible values include `BestPractice`, and `Custom`.
VulnerabilityProfile *string `pulumi:"vulnerabilityProfile"`
}
// The set of arguments for constructing a LocalRulestack resource.
type LocalRulestackArgs struct {
// The setting to use for Anti-Spyware. Possible values include `BestPractice`, and `Custom`.
AntiSpywareProfile pulumi.StringPtrInput
// The setting to use for Anti-Virus. Possible values include `BestPractice`, and `Custom`.
AntiVirusProfile pulumi.StringPtrInput
// The description for this Local Rulestack.
Description pulumi.StringPtrInput
// TThe setting to use for DNS Subscription. Possible values include `BestPractice`, and `Custom`.
DnsSubscription pulumi.StringPtrInput
// The setting to use for the File Blocking Profile. Possible values include `BestPractice`, and `Custom`.
FileBlockingProfile pulumi.StringPtrInput
// The Azure Region where the Palo Alto Networks Rulestack should exist. Changing this forces a new Palo Alto Networks Rulestack to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Palo Alto Networks Rulestack. Changing this forces a new Palo Alto Networks Rulestack to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Palo Alto Networks Rulestack should exist. Changing this forces a new Palo Alto Networks Rulestack to be created.
ResourceGroupName pulumi.StringInput
// The setting to use for the URL Filtering Profile. Possible values include `BestPractice`, and `Custom`.
UrlFilteringProfile pulumi.StringPtrInput
// The setting to use for the Vulnerability Profile. Possible values include `BestPractice`, and `Custom`.
VulnerabilityProfile pulumi.StringPtrInput
}
func (LocalRulestackArgs) ElementType() reflect.Type {
return reflect.TypeOf((*localRulestackArgs)(nil)).Elem()
}
type LocalRulestackInput interface {
pulumi.Input
ToLocalRulestackOutput() LocalRulestackOutput
ToLocalRulestackOutputWithContext(ctx context.Context) LocalRulestackOutput
}
func (*LocalRulestack) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestack)(nil)).Elem()
}
func (i *LocalRulestack) ToLocalRulestackOutput() LocalRulestackOutput {
return i.ToLocalRulestackOutputWithContext(context.Background())
}
func (i *LocalRulestack) ToLocalRulestackOutputWithContext(ctx context.Context) LocalRulestackOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackOutput)
}
// LocalRulestackArrayInput is an input type that accepts LocalRulestackArray and LocalRulestackArrayOutput values.
// You can construct a concrete instance of `LocalRulestackArrayInput` via:
//
// LocalRulestackArray{ LocalRulestackArgs{...} }
type LocalRulestackArrayInput interface {
pulumi.Input
ToLocalRulestackArrayOutput() LocalRulestackArrayOutput
ToLocalRulestackArrayOutputWithContext(context.Context) LocalRulestackArrayOutput
}
type LocalRulestackArray []LocalRulestackInput
func (LocalRulestackArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalRulestack)(nil)).Elem()
}
func (i LocalRulestackArray) ToLocalRulestackArrayOutput() LocalRulestackArrayOutput {
return i.ToLocalRulestackArrayOutputWithContext(context.Background())
}
func (i LocalRulestackArray) ToLocalRulestackArrayOutputWithContext(ctx context.Context) LocalRulestackArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackArrayOutput)
}
// LocalRulestackMapInput is an input type that accepts LocalRulestackMap and LocalRulestackMapOutput values.
// You can construct a concrete instance of `LocalRulestackMapInput` via:
//
// LocalRulestackMap{ "key": LocalRulestackArgs{...} }
type LocalRulestackMapInput interface {
pulumi.Input
ToLocalRulestackMapOutput() LocalRulestackMapOutput
ToLocalRulestackMapOutputWithContext(context.Context) LocalRulestackMapOutput
}
type LocalRulestackMap map[string]LocalRulestackInput
func (LocalRulestackMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalRulestack)(nil)).Elem()
}
func (i LocalRulestackMap) ToLocalRulestackMapOutput() LocalRulestackMapOutput {
return i.ToLocalRulestackMapOutputWithContext(context.Background())
}
func (i LocalRulestackMap) ToLocalRulestackMapOutputWithContext(ctx context.Context) LocalRulestackMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalRulestackMapOutput)
}
type LocalRulestackOutput struct{ *pulumi.OutputState }
func (LocalRulestackOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LocalRulestack)(nil)).Elem()
}
func (o LocalRulestackOutput) ToLocalRulestackOutput() LocalRulestackOutput {
return o
}
func (o LocalRulestackOutput) ToLocalRulestackOutputWithContext(ctx context.Context) LocalRulestackOutput {
return o
}
// The setting to use for Anti-Spyware. Possible values include `BestPractice`, and `Custom`.
func (o LocalRulestackOutput) AntiSpywareProfile() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestack) pulumi.StringPtrOutput { return v.AntiSpywareProfile }).(pulumi.StringPtrOutput)
}
// The setting to use for Anti-Virus. Possible values include `BestPractice`, and `Custom`.
func (o LocalRulestackOutput) AntiVirusProfile() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestack) pulumi.StringPtrOutput { return v.AntiVirusProfile }).(pulumi.StringPtrOutput)
}
// The description for this Local Rulestack.
func (o LocalRulestackOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestack) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// TThe setting to use for DNS Subscription. Possible values include `BestPractice`, and `Custom`.
func (o LocalRulestackOutput) DnsSubscription() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestack) pulumi.StringPtrOutput { return v.DnsSubscription }).(pulumi.StringPtrOutput)
}
// The setting to use for the File Blocking Profile. Possible values include `BestPractice`, and `Custom`.
func (o LocalRulestackOutput) FileBlockingProfile() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestack) pulumi.StringPtrOutput { return v.FileBlockingProfile }).(pulumi.StringPtrOutput)
}
// The Azure Region where the Palo Alto Networks Rulestack should exist. Changing this forces a new Palo Alto Networks Rulestack to be created.
func (o LocalRulestackOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *LocalRulestack) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Palo Alto Networks Rulestack. Changing this forces a new Palo Alto Networks Rulestack to be created.
func (o LocalRulestackOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *LocalRulestack) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Palo Alto Networks Rulestack should exist. Changing this forces a new Palo Alto Networks Rulestack to be created.
func (o LocalRulestackOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *LocalRulestack) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The setting to use for the URL Filtering Profile. Possible values include `BestPractice`, and `Custom`.
func (o LocalRulestackOutput) UrlFilteringProfile() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestack) pulumi.StringPtrOutput { return v.UrlFilteringProfile }).(pulumi.StringPtrOutput)
}
// The setting to use for the Vulnerability Profile. Possible values include `BestPractice`, and `Custom`.
func (o LocalRulestackOutput) VulnerabilityProfile() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalRulestack) pulumi.StringPtrOutput { return v.VulnerabilityProfile }).(pulumi.StringPtrOutput)
}
type LocalRulestackArrayOutput struct{ *pulumi.OutputState }
func (LocalRulestackArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalRulestack)(nil)).Elem()
}
func (o LocalRulestackArrayOutput) ToLocalRulestackArrayOutput() LocalRulestackArrayOutput {
return o
}
func (o LocalRulestackArrayOutput) ToLocalRulestackArrayOutputWithContext(ctx context.Context) LocalRulestackArrayOutput {
return o
}
func (o LocalRulestackArrayOutput) Index(i pulumi.IntInput) LocalRulestackOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LocalRulestack {
return vs[0].([]*LocalRulestack)[vs[1].(int)]
}).(LocalRulestackOutput)
}
type LocalRulestackMapOutput struct{ *pulumi.OutputState }
func (LocalRulestackMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalRulestack)(nil)).Elem()
}
func (o LocalRulestackMapOutput) ToLocalRulestackMapOutput() LocalRulestackMapOutput {
return o
}
func (o LocalRulestackMapOutput) ToLocalRulestackMapOutputWithContext(ctx context.Context) LocalRulestackMapOutput {
return o
}
func (o LocalRulestackMapOutput) MapIndex(k pulumi.StringInput) LocalRulestackOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LocalRulestack {
return vs[0].(map[string]*LocalRulestack)[vs[1].(string)]
}).(LocalRulestackOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackInput)(nil)).Elem(), &LocalRulestack{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackArrayInput)(nil)).Elem(), LocalRulestackArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalRulestackMapInput)(nil)).Elem(), LocalRulestackMap{})
pulumi.RegisterOutputType(LocalRulestackOutput{})
pulumi.RegisterOutputType(LocalRulestackArrayOutput{})
pulumi.RegisterOutputType(LocalRulestackMapOutput{})
}
| 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/paloalto/nextGenerationFirewallVirtualNetworkStrataCloudManager.go | sdk/go/azure/paloalto/nextGenerationFirewallVirtualNetworkStrataCloudManager.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 paloalto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/paloalto"
// "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-resource-group"),
// Location: pulumi.String("westeurope"),
// })
// if err != nil {
// return err
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("example-public-ip"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AllocationMethod: pulumi.String("Static"),
// Sku: pulumi.String("Standard"),
// })
// if err != nil {
// return err
// }
// exampleNetworkSecurityGroup, err := network.NewNetworkSecurityGroup(ctx, "example", &network.NetworkSecurityGroupArgs{
// Name: pulumi.String("example-nsg"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// 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,
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// trust, err := network.NewSubnet(ctx, "trust", &network.SubnetArgs{
// Name: pulumi.String("example-trust-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.1.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("trusted"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("PaloAltoNetworks.Cloudngfw/firewalls"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = network.NewSubnetNetworkSecurityGroupAssociation(ctx, "trust", &network.SubnetNetworkSecurityGroupAssociationArgs{
// SubnetId: trust.ID(),
// NetworkSecurityGroupId: exampleNetworkSecurityGroup.ID(),
// })
// if err != nil {
// return err
// }
// untrust, err := network.NewSubnet(ctx, "untrust", &network.SubnetArgs{
// Name: pulumi.String("example-untrust-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("untrusted"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Name: pulumi.String("PaloAltoNetworks.Cloudngfw/firewalls"),
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = network.NewSubnetNetworkSecurityGroupAssociation(ctx, "untrust", &network.SubnetNetworkSecurityGroupAssociationArgs{
// SubnetId: untrust.ID(),
// NetworkSecurityGroupId: exampleNetworkSecurityGroup.ID(),
// })
// if err != nil {
// return err
// }
// _, err = paloalto.NewNextGenerationFirewallVirtualNetworkStrataCloudManager(ctx, "example", &paloalto.NextGenerationFirewallVirtualNetworkStrataCloudManagerArgs{
// Name: pulumi.String("example-ngfwvh"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// StrataCloudManagerTenantName: pulumi.String("example-scm-tenant"),
// NetworkProfile: &paloalto.NextGenerationFirewallVirtualNetworkStrataCloudManagerNetworkProfileArgs{
// PublicIpAddressIds: pulumi.StringArray{
// examplePublicIp.ID(),
// },
// VnetConfiguration: &paloalto.NextGenerationFirewallVirtualNetworkStrataCloudManagerNetworkProfileVnetConfigurationArgs{
// VirtualNetworkId: exampleVirtualNetwork.ID(),
// TrustedSubnetId: trust.ID(),
// UntrustedSubnetId: untrust.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:
//
// * `PaloAltoNetworks.Cloudngfw` - 2025-05-23
//
// ## Import
//
// Palo Alto Next Generation Firewall Virtual Network Strata Cloud Managers can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:paloalto/nextGenerationFirewallVirtualNetworkStrataCloudManager:NextGenerationFirewallVirtualNetworkStrataCloudManager example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/PaloAltoNetworks.Cloudngfw/firewalls/myVNetStrataCloudManagerFW
// ```
type NextGenerationFirewallVirtualNetworkStrataCloudManager struct {
pulumi.CustomResourceState
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualNetworkStrataCloudManagerDestinationNatArrayOutput `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualNetworkStrataCloudManagerDnsSettingsPtrOutput `pulumi:"dnsSettings"`
// An `identity` block as defined below.
Identity NextGenerationFirewallVirtualNetworkStrataCloudManagerIdentityPtrOutput `pulumi:"identity"`
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId pulumi.StringPtrOutput `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualNetworkStrataCloudManagerNetworkProfileOutput `pulumi:"networkProfile"`
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cngfw-payg`.
PlanId pulumi.StringPtrOutput `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Strata Cloud Manager name which is intended to manage the policy for this firewall.
StrataCloudManagerTenantName pulumi.StringOutput `pulumi:"strataCloudManagerTenantName"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewNextGenerationFirewallVirtualNetworkStrataCloudManager registers a new resource with the given unique name, arguments, and options.
func NewNextGenerationFirewallVirtualNetworkStrataCloudManager(ctx *pulumi.Context,
name string, args *NextGenerationFirewallVirtualNetworkStrataCloudManagerArgs, opts ...pulumi.ResourceOption) (*NextGenerationFirewallVirtualNetworkStrataCloudManager, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NetworkProfile == nil {
return nil, errors.New("invalid value for required argument 'NetworkProfile'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.StrataCloudManagerTenantName == nil {
return nil, errors.New("invalid value for required argument 'StrataCloudManagerTenantName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource NextGenerationFirewallVirtualNetworkStrataCloudManager
err := ctx.RegisterResource("azure:paloalto/nextGenerationFirewallVirtualNetworkStrataCloudManager:NextGenerationFirewallVirtualNetworkStrataCloudManager", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNextGenerationFirewallVirtualNetworkStrataCloudManager gets an existing NextGenerationFirewallVirtualNetworkStrataCloudManager 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 GetNextGenerationFirewallVirtualNetworkStrataCloudManager(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NextGenerationFirewallVirtualNetworkStrataCloudManagerState, opts ...pulumi.ResourceOption) (*NextGenerationFirewallVirtualNetworkStrataCloudManager, error) {
var resource NextGenerationFirewallVirtualNetworkStrataCloudManager
err := ctx.ReadResource("azure:paloalto/nextGenerationFirewallVirtualNetworkStrataCloudManager:NextGenerationFirewallVirtualNetworkStrataCloudManager", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NextGenerationFirewallVirtualNetworkStrataCloudManager resources.
type nextGenerationFirewallVirtualNetworkStrataCloudManagerState struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats []NextGenerationFirewallVirtualNetworkStrataCloudManagerDestinationNat `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings *NextGenerationFirewallVirtualNetworkStrataCloudManagerDnsSettings `pulumi:"dnsSettings"`
// An `identity` block as defined below.
Identity *NextGenerationFirewallVirtualNetworkStrataCloudManagerIdentity `pulumi:"identity"`
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
Location *string `pulumi:"location"`
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId *string `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile *NextGenerationFirewallVirtualNetworkStrataCloudManagerNetworkProfile `pulumi:"networkProfile"`
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cngfw-payg`.
PlanId *string `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Strata Cloud Manager name which is intended to manage the policy for this firewall.
StrataCloudManagerTenantName *string `pulumi:"strataCloudManagerTenantName"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager.
Tags map[string]string `pulumi:"tags"`
}
type NextGenerationFirewallVirtualNetworkStrataCloudManagerState struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualNetworkStrataCloudManagerDestinationNatArrayInput
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualNetworkStrataCloudManagerDnsSettingsPtrInput
// An `identity` block as defined below.
Identity NextGenerationFirewallVirtualNetworkStrataCloudManagerIdentityPtrInput
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
Location pulumi.StringPtrInput
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId pulumi.StringPtrInput
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualNetworkStrataCloudManagerNetworkProfilePtrInput
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cngfw-payg`.
PlanId pulumi.StringPtrInput
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
ResourceGroupName pulumi.StringPtrInput
// Strata Cloud Manager name which is intended to manage the policy for this firewall.
StrataCloudManagerTenantName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager.
Tags pulumi.StringMapInput
}
func (NextGenerationFirewallVirtualNetworkStrataCloudManagerState) ElementType() reflect.Type {
return reflect.TypeOf((*nextGenerationFirewallVirtualNetworkStrataCloudManagerState)(nil)).Elem()
}
type nextGenerationFirewallVirtualNetworkStrataCloudManagerArgs struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats []NextGenerationFirewallVirtualNetworkStrataCloudManagerDestinationNat `pulumi:"destinationNats"`
// A `dnsSettings` block as defined below.
DnsSettings *NextGenerationFirewallVirtualNetworkStrataCloudManagerDnsSettings `pulumi:"dnsSettings"`
// An `identity` block as defined below.
Identity *NextGenerationFirewallVirtualNetworkStrataCloudManagerIdentity `pulumi:"identity"`
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
Location *string `pulumi:"location"`
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId *string `pulumi:"marketplaceOfferId"`
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualNetworkStrataCloudManagerNetworkProfile `pulumi:"networkProfile"`
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cngfw-payg`.
PlanId *string `pulumi:"planId"`
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Strata Cloud Manager name which is intended to manage the policy for this firewall.
StrataCloudManagerTenantName string `pulumi:"strataCloudManagerTenantName"`
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a NextGenerationFirewallVirtualNetworkStrataCloudManager resource.
type NextGenerationFirewallVirtualNetworkStrataCloudManagerArgs struct {
// One or more `destinationNat` blocks as defined below.
DestinationNats NextGenerationFirewallVirtualNetworkStrataCloudManagerDestinationNatArrayInput
// A `dnsSettings` block as defined below.
DnsSettings NextGenerationFirewallVirtualNetworkStrataCloudManagerDnsSettingsPtrInput
// An `identity` block as defined below.
Identity NextGenerationFirewallVirtualNetworkStrataCloudManagerIdentityPtrInput
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
Location pulumi.StringPtrInput
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
MarketplaceOfferId pulumi.StringPtrInput
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below.
NetworkProfile NextGenerationFirewallVirtualNetworkStrataCloudManagerNetworkProfileInput
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cngfw-payg`.
PlanId pulumi.StringPtrInput
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
ResourceGroupName pulumi.StringInput
// Strata Cloud Manager name which is intended to manage the policy for this firewall.
StrataCloudManagerTenantName pulumi.StringInput
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager.
Tags pulumi.StringMapInput
}
func (NextGenerationFirewallVirtualNetworkStrataCloudManagerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*nextGenerationFirewallVirtualNetworkStrataCloudManagerArgs)(nil)).Elem()
}
type NextGenerationFirewallVirtualNetworkStrataCloudManagerInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualNetworkStrataCloudManagerOutput() NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput
ToNextGenerationFirewallVirtualNetworkStrataCloudManagerOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput
}
func (*NextGenerationFirewallVirtualNetworkStrataCloudManager) ElementType() reflect.Type {
return reflect.TypeOf((**NextGenerationFirewallVirtualNetworkStrataCloudManager)(nil)).Elem()
}
func (i *NextGenerationFirewallVirtualNetworkStrataCloudManager) ToNextGenerationFirewallVirtualNetworkStrataCloudManagerOutput() NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput {
return i.ToNextGenerationFirewallVirtualNetworkStrataCloudManagerOutputWithContext(context.Background())
}
func (i *NextGenerationFirewallVirtualNetworkStrataCloudManager) ToNextGenerationFirewallVirtualNetworkStrataCloudManagerOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput)
}
// NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayInput is an input type that accepts NextGenerationFirewallVirtualNetworkStrataCloudManagerArray and NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput values.
// You can construct a concrete instance of `NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayInput` via:
//
// NextGenerationFirewallVirtualNetworkStrataCloudManagerArray{ NextGenerationFirewallVirtualNetworkStrataCloudManagerArgs{...} }
type NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput() NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput
ToNextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutputWithContext(context.Context) NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput
}
type NextGenerationFirewallVirtualNetworkStrataCloudManagerArray []NextGenerationFirewallVirtualNetworkStrataCloudManagerInput
func (NextGenerationFirewallVirtualNetworkStrataCloudManagerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NextGenerationFirewallVirtualNetworkStrataCloudManager)(nil)).Elem()
}
func (i NextGenerationFirewallVirtualNetworkStrataCloudManagerArray) ToNextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput() NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput {
return i.ToNextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutputWithContext(context.Background())
}
func (i NextGenerationFirewallVirtualNetworkStrataCloudManagerArray) ToNextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput)
}
// NextGenerationFirewallVirtualNetworkStrataCloudManagerMapInput is an input type that accepts NextGenerationFirewallVirtualNetworkStrataCloudManagerMap and NextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput values.
// You can construct a concrete instance of `NextGenerationFirewallVirtualNetworkStrataCloudManagerMapInput` via:
//
// NextGenerationFirewallVirtualNetworkStrataCloudManagerMap{ "key": NextGenerationFirewallVirtualNetworkStrataCloudManagerArgs{...} }
type NextGenerationFirewallVirtualNetworkStrataCloudManagerMapInput interface {
pulumi.Input
ToNextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput() NextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput
ToNextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutputWithContext(context.Context) NextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput
}
type NextGenerationFirewallVirtualNetworkStrataCloudManagerMap map[string]NextGenerationFirewallVirtualNetworkStrataCloudManagerInput
func (NextGenerationFirewallVirtualNetworkStrataCloudManagerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NextGenerationFirewallVirtualNetworkStrataCloudManager)(nil)).Elem()
}
func (i NextGenerationFirewallVirtualNetworkStrataCloudManagerMap) ToNextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput() NextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput {
return i.ToNextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutputWithContext(context.Background())
}
func (i NextGenerationFirewallVirtualNetworkStrataCloudManagerMap) ToNextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput)
}
type NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NextGenerationFirewallVirtualNetworkStrataCloudManager)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput) ToNextGenerationFirewallVirtualNetworkStrataCloudManagerOutput() NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput {
return o
}
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput) ToNextGenerationFirewallVirtualNetworkStrataCloudManagerOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput {
return o
}
// One or more `destinationNat` blocks as defined below.
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput) DestinationNats() NextGenerationFirewallVirtualNetworkStrataCloudManagerDestinationNatArrayOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkStrataCloudManager) NextGenerationFirewallVirtualNetworkStrataCloudManagerDestinationNatArrayOutput {
return v.DestinationNats
}).(NextGenerationFirewallVirtualNetworkStrataCloudManagerDestinationNatArrayOutput)
}
// A `dnsSettings` block as defined below.
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput) DnsSettings() NextGenerationFirewallVirtualNetworkStrataCloudManagerDnsSettingsPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkStrataCloudManager) NextGenerationFirewallVirtualNetworkStrataCloudManagerDnsSettingsPtrOutput {
return v.DnsSettings
}).(NextGenerationFirewallVirtualNetworkStrataCloudManagerDnsSettingsPtrOutput)
}
// An `identity` block as defined below.
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput) Identity() NextGenerationFirewallVirtualNetworkStrataCloudManagerIdentityPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkStrataCloudManager) NextGenerationFirewallVirtualNetworkStrataCloudManagerIdentityPtrOutput {
return v.Identity
}).(NextGenerationFirewallVirtualNetworkStrataCloudManagerIdentityPtrOutput)
}
// The Azure Region where the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkStrataCloudManager) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The marketplace offer ID. Defaults to `panSwfwCloudNgfw`. Changing this forces a new resource to be created.
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput) MarketplaceOfferId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkStrataCloudManager) pulumi.StringPtrOutput {
return v.MarketplaceOfferId
}).(pulumi.StringPtrOutput)
}
// The name which should be used for this Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkStrataCloudManager) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `networkProfile` block as defined below.
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput) NetworkProfile() NextGenerationFirewallVirtualNetworkStrataCloudManagerNetworkProfileOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkStrataCloudManager) NextGenerationFirewallVirtualNetworkStrataCloudManagerNetworkProfileOutput {
return v.NetworkProfile
}).(NextGenerationFirewallVirtualNetworkStrataCloudManagerNetworkProfileOutput)
}
// The billing plan ID as published by Liftr.PAN. Defaults to `panw-cngfw-payg`.
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput) PlanId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkStrataCloudManager) pulumi.StringPtrOutput {
return v.PlanId
}).(pulumi.StringPtrOutput)
}
// The name of the Resource Group where the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager should exist. Changing this forces a new Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager to be created.
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkStrataCloudManager) pulumi.StringOutput {
return v.ResourceGroupName
}).(pulumi.StringOutput)
}
// Strata Cloud Manager name which is intended to manage the policy for this firewall.
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput) StrataCloudManagerTenantName() pulumi.StringOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkStrataCloudManager) pulumi.StringOutput {
return v.StrataCloudManagerTenantName
}).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Palo Alto Next Generation Firewall Virtual Network Strata Cloud Manager.
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *NextGenerationFirewallVirtualNetworkStrataCloudManager) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NextGenerationFirewallVirtualNetworkStrataCloudManager)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput) ToNextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput() NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput {
return o
}
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput) ToNextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput {
return o
}
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayOutput) Index(i pulumi.IntInput) NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NextGenerationFirewallVirtualNetworkStrataCloudManager {
return vs[0].([]*NextGenerationFirewallVirtualNetworkStrataCloudManager)[vs[1].(int)]
}).(NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput)
}
type NextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput struct{ *pulumi.OutputState }
func (NextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NextGenerationFirewallVirtualNetworkStrataCloudManager)(nil)).Elem()
}
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput) ToNextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput() NextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput {
return o
}
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput) ToNextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutputWithContext(ctx context.Context) NextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput {
return o
}
func (o NextGenerationFirewallVirtualNetworkStrataCloudManagerMapOutput) MapIndex(k pulumi.StringInput) NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NextGenerationFirewallVirtualNetworkStrataCloudManager {
return vs[0].(map[string]*NextGenerationFirewallVirtualNetworkStrataCloudManager)[vs[1].(string)]
}).(NextGenerationFirewallVirtualNetworkStrataCloudManagerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualNetworkStrataCloudManagerInput)(nil)).Elem(), &NextGenerationFirewallVirtualNetworkStrataCloudManager{})
pulumi.RegisterInputType(reflect.TypeOf((*NextGenerationFirewallVirtualNetworkStrataCloudManagerArrayInput)(nil)).Elem(), NextGenerationFirewallVirtualNetworkStrataCloudManagerArray{})
| 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/videoindexer/init.go | sdk/go/azure/videoindexer/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 videoindexer
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:videoindexer/account:Account":
r = &Account{}
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",
"videoindexer/account",
&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/videoindexer/pulumiTypes.go | sdk/go/azure/videoindexer/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 videoindexer
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 AccountIdentity struct {
// Specifies a list of user managed identity ids to be assigned. Required if `type` is `UserAssigned`.
IdentityIds []string `pulumi:"identityIds"`
PrincipalId *string `pulumi:"principalId"`
TenantId *string `pulumi:"tenantId"`
// Specifies the identity type of the Video Indexer Account. Possible values are `SystemAssigned` (where Azure will generate a Service Principal for you), `UserAssigned` where you can specify the Service Principal IDs in the `identityIds` field, and `SystemAssigned, UserAssigned` which assigns both a system managed identity as well as the specified user assigned identities.
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 {
// Specifies a list of user managed identity ids to be assigned. Required if `type` is `UserAssigned`.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the identity type of the Video Indexer Account. Possible values are `SystemAssigned` (where Azure will generate a Service Principal for you), `UserAssigned` where you can specify the Service Principal IDs in the `identityIds` field, and `SystemAssigned, UserAssigned` which assigns both a system managed identity as well as the specified user assigned identities.
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)
}
// Specifies a list of user managed identity ids to be assigned. Required if `type` is `UserAssigned`.
func (o AccountIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v AccountIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
func (o AccountIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
func (o AccountIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the identity type of the Video Indexer Account. Possible values are `SystemAssigned` (where Azure will generate a Service Principal for you), `UserAssigned` where you can specify the Service Principal IDs in the `identityIds` field, and `SystemAssigned, UserAssigned` which assigns both a system managed identity as well as the specified user assigned identities.
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)
}
// Specifies a list of user managed identity ids to be assigned. Required if `type` is `UserAssigned`.
func (o AccountIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AccountIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
func (o AccountIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
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 identity type of the Video Indexer Account. Possible values are `SystemAssigned` (where Azure will generate a Service Principal for you), `UserAssigned` where you can specify the Service Principal IDs in the `identityIds` field, and `SystemAssigned, UserAssigned` which assigns both a system managed identity as well as the specified user assigned identities.
func (o AccountIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type AccountStorage struct {
// The ID of the storage account to be associated with the Video Indexer Account. Changing this forces a new Video Indexer Account to be created.
StorageAccountId string `pulumi:"storageAccountId"`
// The reference to the user assigned identity to use to access the Storage Account.
UserAssignedIdentityId *string `pulumi:"userAssignedIdentityId"`
}
// AccountStorageInput is an input type that accepts AccountStorageArgs and AccountStorageOutput values.
// You can construct a concrete instance of `AccountStorageInput` via:
//
// AccountStorageArgs{...}
type AccountStorageInput interface {
pulumi.Input
ToAccountStorageOutput() AccountStorageOutput
ToAccountStorageOutputWithContext(context.Context) AccountStorageOutput
}
type AccountStorageArgs struct {
// The ID of the storage account to be associated with the Video Indexer Account. Changing this forces a new Video Indexer Account to be created.
StorageAccountId pulumi.StringInput `pulumi:"storageAccountId"`
// The reference to the user assigned identity to use to access the Storage Account.
UserAssignedIdentityId pulumi.StringPtrInput `pulumi:"userAssignedIdentityId"`
}
func (AccountStorageArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountStorage)(nil)).Elem()
}
func (i AccountStorageArgs) ToAccountStorageOutput() AccountStorageOutput {
return i.ToAccountStorageOutputWithContext(context.Background())
}
func (i AccountStorageArgs) ToAccountStorageOutputWithContext(ctx context.Context) AccountStorageOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountStorageOutput)
}
func (i AccountStorageArgs) ToAccountStoragePtrOutput() AccountStoragePtrOutput {
return i.ToAccountStoragePtrOutputWithContext(context.Background())
}
func (i AccountStorageArgs) ToAccountStoragePtrOutputWithContext(ctx context.Context) AccountStoragePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountStorageOutput).ToAccountStoragePtrOutputWithContext(ctx)
}
// AccountStoragePtrInput is an input type that accepts AccountStorageArgs, AccountStoragePtr and AccountStoragePtrOutput values.
// You can construct a concrete instance of `AccountStoragePtrInput` via:
//
// AccountStorageArgs{...}
//
// or:
//
// nil
type AccountStoragePtrInput interface {
pulumi.Input
ToAccountStoragePtrOutput() AccountStoragePtrOutput
ToAccountStoragePtrOutputWithContext(context.Context) AccountStoragePtrOutput
}
type accountStoragePtrType AccountStorageArgs
func AccountStoragePtr(v *AccountStorageArgs) AccountStoragePtrInput {
return (*accountStoragePtrType)(v)
}
func (*accountStoragePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AccountStorage)(nil)).Elem()
}
func (i *accountStoragePtrType) ToAccountStoragePtrOutput() AccountStoragePtrOutput {
return i.ToAccountStoragePtrOutputWithContext(context.Background())
}
func (i *accountStoragePtrType) ToAccountStoragePtrOutputWithContext(ctx context.Context) AccountStoragePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountStoragePtrOutput)
}
type AccountStorageOutput struct{ *pulumi.OutputState }
func (AccountStorageOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountStorage)(nil)).Elem()
}
func (o AccountStorageOutput) ToAccountStorageOutput() AccountStorageOutput {
return o
}
func (o AccountStorageOutput) ToAccountStorageOutputWithContext(ctx context.Context) AccountStorageOutput {
return o
}
func (o AccountStorageOutput) ToAccountStoragePtrOutput() AccountStoragePtrOutput {
return o.ToAccountStoragePtrOutputWithContext(context.Background())
}
func (o AccountStorageOutput) ToAccountStoragePtrOutputWithContext(ctx context.Context) AccountStoragePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AccountStorage) *AccountStorage {
return &v
}).(AccountStoragePtrOutput)
}
// The ID of the storage account to be associated with the Video Indexer Account. Changing this forces a new Video Indexer Account to be created.
func (o AccountStorageOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v AccountStorage) string { return v.StorageAccountId }).(pulumi.StringOutput)
}
// The reference to the user assigned identity to use to access the Storage Account.
func (o AccountStorageOutput) UserAssignedIdentityId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountStorage) *string { return v.UserAssignedIdentityId }).(pulumi.StringPtrOutput)
}
type AccountStoragePtrOutput struct{ *pulumi.OutputState }
func (AccountStoragePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountStorage)(nil)).Elem()
}
func (o AccountStoragePtrOutput) ToAccountStoragePtrOutput() AccountStoragePtrOutput {
return o
}
func (o AccountStoragePtrOutput) ToAccountStoragePtrOutputWithContext(ctx context.Context) AccountStoragePtrOutput {
return o
}
func (o AccountStoragePtrOutput) Elem() AccountStorageOutput {
return o.ApplyT(func(v *AccountStorage) AccountStorage {
if v != nil {
return *v
}
var ret AccountStorage
return ret
}).(AccountStorageOutput)
}
// The ID of the storage account to be associated with the Video Indexer Account. Changing this forces a new Video Indexer Account to be created.
func (o AccountStoragePtrOutput) StorageAccountId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountStorage) *string {
if v == nil {
return nil
}
return &v.StorageAccountId
}).(pulumi.StringPtrOutput)
}
// The reference to the user assigned identity to use to access the Storage Account.
func (o AccountStoragePtrOutput) UserAssignedIdentityId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountStorage) *string {
if v == nil {
return nil
}
return v.UserAssignedIdentityId
}).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccountIdentityInput)(nil)).Elem(), AccountIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountIdentityPtrInput)(nil)).Elem(), AccountIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountStorageInput)(nil)).Elem(), AccountStorageArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountStoragePtrInput)(nil)).Elem(), AccountStorageArgs{})
pulumi.RegisterOutputType(AccountIdentityOutput{})
pulumi.RegisterOutputType(AccountIdentityPtrOutput{})
pulumi.RegisterOutputType(AccountStorageOutput{})
pulumi.RegisterOutputType(AccountStoragePtrOutput{})
}
| 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/videoindexer/account.go | sdk/go/azure/videoindexer/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 videoindexer
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Video Indexer 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/storage"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/videoindexer"
// "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"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// _, err = videoindexer.NewAccount(ctx, "example", &videoindexer.AccountArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: pulumi.String("West Europe"),
// Storage: &videoindexer.AccountStorageArgs{
// StorageAccountId: exampleAccount.ID(),
// },
// Identity: &videoindexer.AccountIdentityArgs{
// 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.VideoIndexer` - 2025-04-01
//
// ## Import
//
// Video Indexer Accounts can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:videoindexer/account:Account example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.VideoIndexer/accounts/example-account-name
// ```
type Account struct {
pulumi.CustomResourceState
// An `identity` block as defined below.
Identity AccountIdentityOutput `pulumi:"identity"`
// The Azure location where the Video Indexer Account exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the Video Indexer Account. Changing the name forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The public network access for the Video Indexer Account. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess pulumi.StringPtrOutput `pulumi:"publicNetworkAccess"`
// The name of the Resource Group that the Video Indexer Account will be associated with. Changing the name forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A `storage` block as defined below.
Storage AccountStorageOutput `pulumi:"storage"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// 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.Identity == nil {
return nil, errors.New("invalid value for required argument 'Identity'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Storage == nil {
return nil, errors.New("invalid value for required argument 'Storage'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Account
err := ctx.RegisterResource("azure:videoindexer/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:videoindexer/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 {
// An `identity` block as defined below.
Identity *AccountIdentity `pulumi:"identity"`
// The Azure location where the Video Indexer Account exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Video Indexer Account. Changing the name forces a new resource to be created.
Name *string `pulumi:"name"`
// The public network access for the Video Indexer Account. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess *string `pulumi:"publicNetworkAccess"`
// The name of the Resource Group that the Video Indexer Account will be associated with. Changing the name forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A `storage` block as defined below.
Storage *AccountStorage `pulumi:"storage"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type AccountState struct {
// An `identity` block as defined below.
Identity AccountIdentityPtrInput
// The Azure location where the Video Indexer Account exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Video Indexer Account. Changing the name forces a new resource to be created.
Name pulumi.StringPtrInput
// The public network access for the Video Indexer Account. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess pulumi.StringPtrInput
// The name of the Resource Group that the Video Indexer Account will be associated with. Changing the name forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A `storage` block as defined below.
Storage AccountStoragePtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (AccountState) ElementType() reflect.Type {
return reflect.TypeOf((*accountState)(nil)).Elem()
}
type accountArgs struct {
// An `identity` block as defined below.
Identity AccountIdentity `pulumi:"identity"`
// The Azure location where the Video Indexer Account exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Video Indexer Account. Changing the name forces a new resource to be created.
Name *string `pulumi:"name"`
// The public network access for the Video Indexer Account. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess *string `pulumi:"publicNetworkAccess"`
// The name of the Resource Group that the Video Indexer Account will be associated with. Changing the name forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `storage` block as defined below.
Storage AccountStorage `pulumi:"storage"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Account resource.
type AccountArgs struct {
// An `identity` block as defined below.
Identity AccountIdentityInput
// The Azure location where the Video Indexer Account exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Video Indexer Account. Changing the name forces a new resource to be created.
Name pulumi.StringPtrInput
// The public network access for the Video Indexer Account. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess pulumi.StringPtrInput
// The name of the Resource Group that the Video Indexer Account will be associated with. Changing the name forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A `storage` block as defined below.
Storage AccountStorageInput
// A mapping of tags to assign to the resource.
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
}
// An `identity` block as defined below.
func (o AccountOutput) Identity() AccountIdentityOutput {
return o.ApplyT(func(v *Account) AccountIdentityOutput { return v.Identity }).(AccountIdentityOutput)
}
// The Azure location where the Video Indexer Account exists. 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 Video Indexer Account. Changing the name 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 public network access for the Video Indexer Account. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
func (o AccountOutput) PublicNetworkAccess() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Account) pulumi.StringPtrOutput { return v.PublicNetworkAccess }).(pulumi.StringPtrOutput)
}
// The name of the Resource Group that the Video Indexer Account will be associated with. Changing the name 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)
}
// A `storage` block as defined below.
func (o AccountOutput) Storage() AccountStorageOutput {
return o.ApplyT(func(v *Account) AccountStorageOutput { return v.Storage }).(AccountStorageOutput)
}
// A mapping of tags to assign to the resource.
func (o AccountOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Account) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
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/extendedlocation/init.go | sdk/go/azure/extendedlocation/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 extendedlocation
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:extendedlocation/customLocation:CustomLocation":
r = &CustomLocation{}
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",
"extendedlocation/customLocation",
&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/extendedlocation/pulumiTypes.go | sdk/go/azure/extendedlocation/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 extendedlocation
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 CustomLocationAuthentication struct {
// Specifies the type of authentication.
Type *string `pulumi:"type"`
// Specifies the value of authentication.
Value string `pulumi:"value"`
}
// CustomLocationAuthenticationInput is an input type that accepts CustomLocationAuthenticationArgs and CustomLocationAuthenticationOutput values.
// You can construct a concrete instance of `CustomLocationAuthenticationInput` via:
//
// CustomLocationAuthenticationArgs{...}
type CustomLocationAuthenticationInput interface {
pulumi.Input
ToCustomLocationAuthenticationOutput() CustomLocationAuthenticationOutput
ToCustomLocationAuthenticationOutputWithContext(context.Context) CustomLocationAuthenticationOutput
}
type CustomLocationAuthenticationArgs struct {
// Specifies the type of authentication.
Type pulumi.StringPtrInput `pulumi:"type"`
// Specifies the value of authentication.
Value pulumi.StringInput `pulumi:"value"`
}
func (CustomLocationAuthenticationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*CustomLocationAuthentication)(nil)).Elem()
}
func (i CustomLocationAuthenticationArgs) ToCustomLocationAuthenticationOutput() CustomLocationAuthenticationOutput {
return i.ToCustomLocationAuthenticationOutputWithContext(context.Background())
}
func (i CustomLocationAuthenticationArgs) ToCustomLocationAuthenticationOutputWithContext(ctx context.Context) CustomLocationAuthenticationOutput {
return pulumi.ToOutputWithContext(ctx, i).(CustomLocationAuthenticationOutput)
}
func (i CustomLocationAuthenticationArgs) ToCustomLocationAuthenticationPtrOutput() CustomLocationAuthenticationPtrOutput {
return i.ToCustomLocationAuthenticationPtrOutputWithContext(context.Background())
}
func (i CustomLocationAuthenticationArgs) ToCustomLocationAuthenticationPtrOutputWithContext(ctx context.Context) CustomLocationAuthenticationPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(CustomLocationAuthenticationOutput).ToCustomLocationAuthenticationPtrOutputWithContext(ctx)
}
// CustomLocationAuthenticationPtrInput is an input type that accepts CustomLocationAuthenticationArgs, CustomLocationAuthenticationPtr and CustomLocationAuthenticationPtrOutput values.
// You can construct a concrete instance of `CustomLocationAuthenticationPtrInput` via:
//
// CustomLocationAuthenticationArgs{...}
//
// or:
//
// nil
type CustomLocationAuthenticationPtrInput interface {
pulumi.Input
ToCustomLocationAuthenticationPtrOutput() CustomLocationAuthenticationPtrOutput
ToCustomLocationAuthenticationPtrOutputWithContext(context.Context) CustomLocationAuthenticationPtrOutput
}
type customLocationAuthenticationPtrType CustomLocationAuthenticationArgs
func CustomLocationAuthenticationPtr(v *CustomLocationAuthenticationArgs) CustomLocationAuthenticationPtrInput {
return (*customLocationAuthenticationPtrType)(v)
}
func (*customLocationAuthenticationPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**CustomLocationAuthentication)(nil)).Elem()
}
func (i *customLocationAuthenticationPtrType) ToCustomLocationAuthenticationPtrOutput() CustomLocationAuthenticationPtrOutput {
return i.ToCustomLocationAuthenticationPtrOutputWithContext(context.Background())
}
func (i *customLocationAuthenticationPtrType) ToCustomLocationAuthenticationPtrOutputWithContext(ctx context.Context) CustomLocationAuthenticationPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(CustomLocationAuthenticationPtrOutput)
}
type CustomLocationAuthenticationOutput struct{ *pulumi.OutputState }
func (CustomLocationAuthenticationOutput) ElementType() reflect.Type {
return reflect.TypeOf((*CustomLocationAuthentication)(nil)).Elem()
}
func (o CustomLocationAuthenticationOutput) ToCustomLocationAuthenticationOutput() CustomLocationAuthenticationOutput {
return o
}
func (o CustomLocationAuthenticationOutput) ToCustomLocationAuthenticationOutputWithContext(ctx context.Context) CustomLocationAuthenticationOutput {
return o
}
func (o CustomLocationAuthenticationOutput) ToCustomLocationAuthenticationPtrOutput() CustomLocationAuthenticationPtrOutput {
return o.ToCustomLocationAuthenticationPtrOutputWithContext(context.Background())
}
func (o CustomLocationAuthenticationOutput) ToCustomLocationAuthenticationPtrOutputWithContext(ctx context.Context) CustomLocationAuthenticationPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v CustomLocationAuthentication) *CustomLocationAuthentication {
return &v
}).(CustomLocationAuthenticationPtrOutput)
}
// Specifies the type of authentication.
func (o CustomLocationAuthenticationOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v CustomLocationAuthentication) *string { return v.Type }).(pulumi.StringPtrOutput)
}
// Specifies the value of authentication.
func (o CustomLocationAuthenticationOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v CustomLocationAuthentication) string { return v.Value }).(pulumi.StringOutput)
}
type CustomLocationAuthenticationPtrOutput struct{ *pulumi.OutputState }
func (CustomLocationAuthenticationPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CustomLocationAuthentication)(nil)).Elem()
}
func (o CustomLocationAuthenticationPtrOutput) ToCustomLocationAuthenticationPtrOutput() CustomLocationAuthenticationPtrOutput {
return o
}
func (o CustomLocationAuthenticationPtrOutput) ToCustomLocationAuthenticationPtrOutputWithContext(ctx context.Context) CustomLocationAuthenticationPtrOutput {
return o
}
func (o CustomLocationAuthenticationPtrOutput) Elem() CustomLocationAuthenticationOutput {
return o.ApplyT(func(v *CustomLocationAuthentication) CustomLocationAuthentication {
if v != nil {
return *v
}
var ret CustomLocationAuthentication
return ret
}).(CustomLocationAuthenticationOutput)
}
// Specifies the type of authentication.
func (o CustomLocationAuthenticationPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CustomLocationAuthentication) *string {
if v == nil {
return nil
}
return v.Type
}).(pulumi.StringPtrOutput)
}
// Specifies the value of authentication.
func (o CustomLocationAuthenticationPtrOutput) Value() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CustomLocationAuthentication) *string {
if v == nil {
return nil
}
return &v.Value
}).(pulumi.StringPtrOutput)
}
type GetCustomLocationAuthentication struct {
// The type of authentication.
Type string `pulumi:"type"`
// The value of authentication.
Value string `pulumi:"value"`
}
// GetCustomLocationAuthenticationInput is an input type that accepts GetCustomLocationAuthenticationArgs and GetCustomLocationAuthenticationOutput values.
// You can construct a concrete instance of `GetCustomLocationAuthenticationInput` via:
//
// GetCustomLocationAuthenticationArgs{...}
type GetCustomLocationAuthenticationInput interface {
pulumi.Input
ToGetCustomLocationAuthenticationOutput() GetCustomLocationAuthenticationOutput
ToGetCustomLocationAuthenticationOutputWithContext(context.Context) GetCustomLocationAuthenticationOutput
}
type GetCustomLocationAuthenticationArgs struct {
// The type of authentication.
Type pulumi.StringInput `pulumi:"type"`
// The value of authentication.
Value pulumi.StringInput `pulumi:"value"`
}
func (GetCustomLocationAuthenticationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetCustomLocationAuthentication)(nil)).Elem()
}
func (i GetCustomLocationAuthenticationArgs) ToGetCustomLocationAuthenticationOutput() GetCustomLocationAuthenticationOutput {
return i.ToGetCustomLocationAuthenticationOutputWithContext(context.Background())
}
func (i GetCustomLocationAuthenticationArgs) ToGetCustomLocationAuthenticationOutputWithContext(ctx context.Context) GetCustomLocationAuthenticationOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetCustomLocationAuthenticationOutput)
}
// GetCustomLocationAuthenticationArrayInput is an input type that accepts GetCustomLocationAuthenticationArray and GetCustomLocationAuthenticationArrayOutput values.
// You can construct a concrete instance of `GetCustomLocationAuthenticationArrayInput` via:
//
// GetCustomLocationAuthenticationArray{ GetCustomLocationAuthenticationArgs{...} }
type GetCustomLocationAuthenticationArrayInput interface {
pulumi.Input
ToGetCustomLocationAuthenticationArrayOutput() GetCustomLocationAuthenticationArrayOutput
ToGetCustomLocationAuthenticationArrayOutputWithContext(context.Context) GetCustomLocationAuthenticationArrayOutput
}
type GetCustomLocationAuthenticationArray []GetCustomLocationAuthenticationInput
func (GetCustomLocationAuthenticationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetCustomLocationAuthentication)(nil)).Elem()
}
func (i GetCustomLocationAuthenticationArray) ToGetCustomLocationAuthenticationArrayOutput() GetCustomLocationAuthenticationArrayOutput {
return i.ToGetCustomLocationAuthenticationArrayOutputWithContext(context.Background())
}
func (i GetCustomLocationAuthenticationArray) ToGetCustomLocationAuthenticationArrayOutputWithContext(ctx context.Context) GetCustomLocationAuthenticationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetCustomLocationAuthenticationArrayOutput)
}
type GetCustomLocationAuthenticationOutput struct{ *pulumi.OutputState }
func (GetCustomLocationAuthenticationOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetCustomLocationAuthentication)(nil)).Elem()
}
func (o GetCustomLocationAuthenticationOutput) ToGetCustomLocationAuthenticationOutput() GetCustomLocationAuthenticationOutput {
return o
}
func (o GetCustomLocationAuthenticationOutput) ToGetCustomLocationAuthenticationOutputWithContext(ctx context.Context) GetCustomLocationAuthenticationOutput {
return o
}
// The type of authentication.
func (o GetCustomLocationAuthenticationOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v GetCustomLocationAuthentication) string { return v.Type }).(pulumi.StringOutput)
}
// The value of authentication.
func (o GetCustomLocationAuthenticationOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v GetCustomLocationAuthentication) string { return v.Value }).(pulumi.StringOutput)
}
type GetCustomLocationAuthenticationArrayOutput struct{ *pulumi.OutputState }
func (GetCustomLocationAuthenticationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetCustomLocationAuthentication)(nil)).Elem()
}
func (o GetCustomLocationAuthenticationArrayOutput) ToGetCustomLocationAuthenticationArrayOutput() GetCustomLocationAuthenticationArrayOutput {
return o
}
func (o GetCustomLocationAuthenticationArrayOutput) ToGetCustomLocationAuthenticationArrayOutputWithContext(ctx context.Context) GetCustomLocationAuthenticationArrayOutput {
return o
}
func (o GetCustomLocationAuthenticationArrayOutput) Index(i pulumi.IntInput) GetCustomLocationAuthenticationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetCustomLocationAuthentication {
return vs[0].([]GetCustomLocationAuthentication)[vs[1].(int)]
}).(GetCustomLocationAuthenticationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CustomLocationAuthenticationInput)(nil)).Elem(), CustomLocationAuthenticationArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*CustomLocationAuthenticationPtrInput)(nil)).Elem(), CustomLocationAuthenticationArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*GetCustomLocationAuthenticationInput)(nil)).Elem(), GetCustomLocationAuthenticationArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*GetCustomLocationAuthenticationArrayInput)(nil)).Elem(), GetCustomLocationAuthenticationArray{})
pulumi.RegisterOutputType(CustomLocationAuthenticationOutput{})
pulumi.RegisterOutputType(CustomLocationAuthenticationPtrOutput{})
pulumi.RegisterOutputType(GetCustomLocationAuthenticationOutput{})
pulumi.RegisterOutputType(GetCustomLocationAuthenticationArrayOutput{})
}
| 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/extendedlocation/getCustomLocation.go | sdk/go/azure/extendedlocation/getCustomLocation.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 extendedlocation
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 Custom Location within an Extended Location.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/extendedlocation"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := extendedlocation.LookupCustomLocation(ctx, &extendedlocation.LookupCustomLocationArgs{
// Name: exampleAzurermExtendedLocationCustomLocation.Name,
// ResourceGroupName: exampleAzurermResourceGroup.Name,
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("customLocationId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.ExtendedLocation` - 2021-08-15
func LookupCustomLocation(ctx *pulumi.Context, args *LookupCustomLocationArgs, opts ...pulumi.InvokeOption) (*LookupCustomLocationResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupCustomLocationResult
err := ctx.Invoke("azure:extendedlocation/getCustomLocation:getCustomLocation", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getCustomLocation.
type LookupCustomLocationArgs struct {
// The name of the Custom Location.
Name string `pulumi:"name"`
// The name of the Resource Group where the Custom Location exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getCustomLocation.
type LookupCustomLocationResult struct {
// An `authentication` block as defined below.
Authentications []GetCustomLocationAuthentication `pulumi:"authentications"`
// The list of Cluster Extension IDs.
ClusterExtensionIds []string `pulumi:"clusterExtensionIds"`
// The display name of the Custom Location.
DisplayName string `pulumi:"displayName"`
// The host resource ID.
HostResourceId string `pulumi:"hostResourceId"`
// The host type of the Custom Location.
HostType string `pulumi:"hostType"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure location where the Custom Location exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// The namespace of the Custom Location.
Namespace string `pulumi:"namespace"`
ResourceGroupName string `pulumi:"resourceGroupName"`
}
func LookupCustomLocationOutput(ctx *pulumi.Context, args LookupCustomLocationOutputArgs, opts ...pulumi.InvokeOption) LookupCustomLocationResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupCustomLocationResultOutput, error) {
args := v.(LookupCustomLocationArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:extendedlocation/getCustomLocation:getCustomLocation", args, LookupCustomLocationResultOutput{}, options).(LookupCustomLocationResultOutput), nil
}).(LookupCustomLocationResultOutput)
}
// A collection of arguments for invoking getCustomLocation.
type LookupCustomLocationOutputArgs struct {
// The name of the Custom Location.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Custom Location exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupCustomLocationOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupCustomLocationArgs)(nil)).Elem()
}
// A collection of values returned by getCustomLocation.
type LookupCustomLocationResultOutput struct{ *pulumi.OutputState }
func (LookupCustomLocationResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupCustomLocationResult)(nil)).Elem()
}
func (o LookupCustomLocationResultOutput) ToLookupCustomLocationResultOutput() LookupCustomLocationResultOutput {
return o
}
func (o LookupCustomLocationResultOutput) ToLookupCustomLocationResultOutputWithContext(ctx context.Context) LookupCustomLocationResultOutput {
return o
}
// An `authentication` block as defined below.
func (o LookupCustomLocationResultOutput) Authentications() GetCustomLocationAuthenticationArrayOutput {
return o.ApplyT(func(v LookupCustomLocationResult) []GetCustomLocationAuthentication { return v.Authentications }).(GetCustomLocationAuthenticationArrayOutput)
}
// The list of Cluster Extension IDs.
func (o LookupCustomLocationResultOutput) ClusterExtensionIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupCustomLocationResult) []string { return v.ClusterExtensionIds }).(pulumi.StringArrayOutput)
}
// The display name of the Custom Location.
func (o LookupCustomLocationResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupCustomLocationResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The host resource ID.
func (o LookupCustomLocationResultOutput) HostResourceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupCustomLocationResult) string { return v.HostResourceId }).(pulumi.StringOutput)
}
// The host type of the Custom Location.
func (o LookupCustomLocationResultOutput) HostType() pulumi.StringOutput {
return o.ApplyT(func(v LookupCustomLocationResult) string { return v.HostType }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupCustomLocationResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupCustomLocationResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Azure location where the Custom Location exists.
func (o LookupCustomLocationResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupCustomLocationResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupCustomLocationResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupCustomLocationResult) string { return v.Name }).(pulumi.StringOutput)
}
// The namespace of the Custom Location.
func (o LookupCustomLocationResultOutput) Namespace() pulumi.StringOutput {
return o.ApplyT(func(v LookupCustomLocationResult) string { return v.Namespace }).(pulumi.StringOutput)
}
func (o LookupCustomLocationResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupCustomLocationResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupCustomLocationResultOutput{})
}
| 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/extendedlocation/customLocation.go | sdk/go/azure/extendedlocation/customLocation.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 extendedlocation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Custom Location within an Extended Location.
//
// > **Note:** Installing and configuring the Azure Arc Agent on your Kubernetes Cluster to establish connectivity is outside the scope of this document. For more details refer to [Deploy agents to your cluster](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/conceptual-agent-overview#deploy-agents-to-your-cluster) and [Connect an existing Kubernetes Cluster](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/quickstart-connect-cluster?tabs=azure-cli#connect-an-existing-kubernetes-cluster). If you encounter issues connecting your Kubernetes Cluster to Azure Arc, we'd recommend opening a ticket with Microsoft Support.
//
// ## Import
//
// Custom Locations can be imported using the resource id, e.g.
//
// ```sh
// $ pulumi import azure:extendedlocation/customLocation:CustomLocation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.ExtendedLocation/customLocations/example-custom-location
// ```
type CustomLocation struct {
pulumi.CustomResourceState
// An `authentication` block as defined below.
Authentication CustomLocationAuthenticationPtrOutput `pulumi:"authentication"`
// Specifies the list of Cluster Extension IDs.
ClusterExtensionIds pulumi.StringArrayOutput `pulumi:"clusterExtensionIds"`
// Specifies the display name of the Custom Location.
DisplayName pulumi.StringPtrOutput `pulumi:"displayName"`
// Specifies the host resource ID. Changing this forces a new resource to be created.
HostResourceId pulumi.StringOutput `pulumi:"hostResourceId"`
// Specifies the host type of the Custom Location. The only possible values is `KubernetesCluster`. Changing this forces a new resource to be created.
HostType pulumi.StringPtrOutput `pulumi:"hostType"`
// Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
Namespace pulumi.StringOutput `pulumi:"namespace"`
// Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewCustomLocation registers a new resource with the given unique name, arguments, and options.
func NewCustomLocation(ctx *pulumi.Context,
name string, args *CustomLocationArgs, opts ...pulumi.ResourceOption) (*CustomLocation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ClusterExtensionIds == nil {
return nil, errors.New("invalid value for required argument 'ClusterExtensionIds'")
}
if args.HostResourceId == nil {
return nil, errors.New("invalid value for required argument 'HostResourceId'")
}
if args.Namespace == nil {
return nil, errors.New("invalid value for required argument 'Namespace'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource CustomLocation
err := ctx.RegisterResource("azure:extendedlocation/customLocation:CustomLocation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCustomLocation gets an existing CustomLocation 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 GetCustomLocation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CustomLocationState, opts ...pulumi.ResourceOption) (*CustomLocation, error) {
var resource CustomLocation
err := ctx.ReadResource("azure:extendedlocation/customLocation:CustomLocation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering CustomLocation resources.
type customLocationState struct {
// An `authentication` block as defined below.
Authentication *CustomLocationAuthentication `pulumi:"authentication"`
// Specifies the list of Cluster Extension IDs.
ClusterExtensionIds []string `pulumi:"clusterExtensionIds"`
// Specifies the display name of the Custom Location.
DisplayName *string `pulumi:"displayName"`
// Specifies the host resource ID. Changing this forces a new resource to be created.
HostResourceId *string `pulumi:"hostResourceId"`
// Specifies the host type of the Custom Location. The only possible values is `KubernetesCluster`. Changing this forces a new resource to be created.
HostType *string `pulumi:"hostType"`
// Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
Name *string `pulumi:"name"`
// Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
Namespace *string `pulumi:"namespace"`
// Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type CustomLocationState struct {
// An `authentication` block as defined below.
Authentication CustomLocationAuthenticationPtrInput
// Specifies the list of Cluster Extension IDs.
ClusterExtensionIds pulumi.StringArrayInput
// Specifies the display name of the Custom Location.
DisplayName pulumi.StringPtrInput
// Specifies the host resource ID. Changing this forces a new resource to be created.
HostResourceId pulumi.StringPtrInput
// Specifies the host type of the Custom Location. The only possible values is `KubernetesCluster`. Changing this forces a new resource to be created.
HostType pulumi.StringPtrInput
// Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
Name pulumi.StringPtrInput
// Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
Namespace pulumi.StringPtrInput
// Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (CustomLocationState) ElementType() reflect.Type {
return reflect.TypeOf((*customLocationState)(nil)).Elem()
}
type customLocationArgs struct {
// An `authentication` block as defined below.
Authentication *CustomLocationAuthentication `pulumi:"authentication"`
// Specifies the list of Cluster Extension IDs.
ClusterExtensionIds []string `pulumi:"clusterExtensionIds"`
// Specifies the display name of the Custom Location.
DisplayName *string `pulumi:"displayName"`
// Specifies the host resource ID. Changing this forces a new resource to be created.
HostResourceId string `pulumi:"hostResourceId"`
// Specifies the host type of the Custom Location. The only possible values is `KubernetesCluster`. Changing this forces a new resource to be created.
HostType *string `pulumi:"hostType"`
// Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
Name *string `pulumi:"name"`
// Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
Namespace string `pulumi:"namespace"`
// Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a CustomLocation resource.
type CustomLocationArgs struct {
// An `authentication` block as defined below.
Authentication CustomLocationAuthenticationPtrInput
// Specifies the list of Cluster Extension IDs.
ClusterExtensionIds pulumi.StringArrayInput
// Specifies the display name of the Custom Location.
DisplayName pulumi.StringPtrInput
// Specifies the host resource ID. Changing this forces a new resource to be created.
HostResourceId pulumi.StringInput
// Specifies the host type of the Custom Location. The only possible values is `KubernetesCluster`. Changing this forces a new resource to be created.
HostType pulumi.StringPtrInput
// Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
Name pulumi.StringPtrInput
// Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
Namespace pulumi.StringInput
// Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
ResourceGroupName pulumi.StringInput
}
func (CustomLocationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*customLocationArgs)(nil)).Elem()
}
type CustomLocationInput interface {
pulumi.Input
ToCustomLocationOutput() CustomLocationOutput
ToCustomLocationOutputWithContext(ctx context.Context) CustomLocationOutput
}
func (*CustomLocation) ElementType() reflect.Type {
return reflect.TypeOf((**CustomLocation)(nil)).Elem()
}
func (i *CustomLocation) ToCustomLocationOutput() CustomLocationOutput {
return i.ToCustomLocationOutputWithContext(context.Background())
}
func (i *CustomLocation) ToCustomLocationOutputWithContext(ctx context.Context) CustomLocationOutput {
return pulumi.ToOutputWithContext(ctx, i).(CustomLocationOutput)
}
// CustomLocationArrayInput is an input type that accepts CustomLocationArray and CustomLocationArrayOutput values.
// You can construct a concrete instance of `CustomLocationArrayInput` via:
//
// CustomLocationArray{ CustomLocationArgs{...} }
type CustomLocationArrayInput interface {
pulumi.Input
ToCustomLocationArrayOutput() CustomLocationArrayOutput
ToCustomLocationArrayOutputWithContext(context.Context) CustomLocationArrayOutput
}
type CustomLocationArray []CustomLocationInput
func (CustomLocationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CustomLocation)(nil)).Elem()
}
func (i CustomLocationArray) ToCustomLocationArrayOutput() CustomLocationArrayOutput {
return i.ToCustomLocationArrayOutputWithContext(context.Background())
}
func (i CustomLocationArray) ToCustomLocationArrayOutputWithContext(ctx context.Context) CustomLocationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CustomLocationArrayOutput)
}
// CustomLocationMapInput is an input type that accepts CustomLocationMap and CustomLocationMapOutput values.
// You can construct a concrete instance of `CustomLocationMapInput` via:
//
// CustomLocationMap{ "key": CustomLocationArgs{...} }
type CustomLocationMapInput interface {
pulumi.Input
ToCustomLocationMapOutput() CustomLocationMapOutput
ToCustomLocationMapOutputWithContext(context.Context) CustomLocationMapOutput
}
type CustomLocationMap map[string]CustomLocationInput
func (CustomLocationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CustomLocation)(nil)).Elem()
}
func (i CustomLocationMap) ToCustomLocationMapOutput() CustomLocationMapOutput {
return i.ToCustomLocationMapOutputWithContext(context.Background())
}
func (i CustomLocationMap) ToCustomLocationMapOutputWithContext(ctx context.Context) CustomLocationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CustomLocationMapOutput)
}
type CustomLocationOutput struct{ *pulumi.OutputState }
func (CustomLocationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CustomLocation)(nil)).Elem()
}
func (o CustomLocationOutput) ToCustomLocationOutput() CustomLocationOutput {
return o
}
func (o CustomLocationOutput) ToCustomLocationOutputWithContext(ctx context.Context) CustomLocationOutput {
return o
}
// An `authentication` block as defined below.
func (o CustomLocationOutput) Authentication() CustomLocationAuthenticationPtrOutput {
return o.ApplyT(func(v *CustomLocation) CustomLocationAuthenticationPtrOutput { return v.Authentication }).(CustomLocationAuthenticationPtrOutput)
}
// Specifies the list of Cluster Extension IDs.
func (o CustomLocationOutput) ClusterExtensionIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *CustomLocation) pulumi.StringArrayOutput { return v.ClusterExtensionIds }).(pulumi.StringArrayOutput)
}
// Specifies the display name of the Custom Location.
func (o CustomLocationOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CustomLocation) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput)
}
// Specifies the host resource ID. Changing this forces a new resource to be created.
func (o CustomLocationOutput) HostResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *CustomLocation) pulumi.StringOutput { return v.HostResourceId }).(pulumi.StringOutput)
}
// Specifies the host type of the Custom Location. The only possible values is `KubernetesCluster`. Changing this forces a new resource to be created.
func (o CustomLocationOutput) HostType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CustomLocation) pulumi.StringPtrOutput { return v.HostType }).(pulumi.StringPtrOutput)
}
// Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
func (o CustomLocationOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *CustomLocation) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
func (o CustomLocationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *CustomLocation) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
func (o CustomLocationOutput) Namespace() pulumi.StringOutput {
return o.ApplyT(func(v *CustomLocation) pulumi.StringOutput { return v.Namespace }).(pulumi.StringOutput)
}
// Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
func (o CustomLocationOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *CustomLocation) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type CustomLocationArrayOutput struct{ *pulumi.OutputState }
func (CustomLocationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CustomLocation)(nil)).Elem()
}
func (o CustomLocationArrayOutput) ToCustomLocationArrayOutput() CustomLocationArrayOutput {
return o
}
func (o CustomLocationArrayOutput) ToCustomLocationArrayOutputWithContext(ctx context.Context) CustomLocationArrayOutput {
return o
}
func (o CustomLocationArrayOutput) Index(i pulumi.IntInput) CustomLocationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CustomLocation {
return vs[0].([]*CustomLocation)[vs[1].(int)]
}).(CustomLocationOutput)
}
type CustomLocationMapOutput struct{ *pulumi.OutputState }
func (CustomLocationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CustomLocation)(nil)).Elem()
}
func (o CustomLocationMapOutput) ToCustomLocationMapOutput() CustomLocationMapOutput {
return o
}
func (o CustomLocationMapOutput) ToCustomLocationMapOutputWithContext(ctx context.Context) CustomLocationMapOutput {
return o
}
func (o CustomLocationMapOutput) MapIndex(k pulumi.StringInput) CustomLocationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CustomLocation {
return vs[0].(map[string]*CustomLocation)[vs[1].(string)]
}).(CustomLocationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CustomLocationInput)(nil)).Elem(), &CustomLocation{})
pulumi.RegisterInputType(reflect.TypeOf((*CustomLocationArrayInput)(nil)).Elem(), CustomLocationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CustomLocationMapInput)(nil)).Elem(), CustomLocationMap{})
pulumi.RegisterOutputType(CustomLocationOutput{})
pulumi.RegisterOutputType(CustomLocationArrayOutput{})
pulumi.RegisterOutputType(CustomLocationMapOutput{})
}
| 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/signalr/serviceCustomCertificate.go | sdk/go/azure/signalr/serviceCustomCertificate.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 signalr
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 SignalR Custom Certificate.
//
// ## 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/signalr"
// "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 {
// 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
// }
// exampleService, err := signalr.NewService(ctx, "example", &signalr.ServiceArgs{
// Name: pulumi.String("example-signalr"),
// Location: pulumi.Any(testAzurermResourceGroup.Location),
// ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name),
// Sku: &signalr.ServiceSkuArgs{
// Name: pulumi.String("Premium_P1"),
// Capacity: pulumi.Int(1),
// },
// Identity: &signalr.ServiceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("example-keyvault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("premium"),
// AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.String(current.ObjectId),
// CertificatePermissions: pulumi.StringArray{
// pulumi.String("Create"),
// pulumi.String("Get"),
// pulumi.String("List"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("List"),
// },
// },
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.Any(testAzurermSignalrService.Identity[0].PrincipalId),
// CertificatePermissions: pulumi.StringArray{
// pulumi.String("Create"),
// pulumi.String("Get"),
// pulumi.String("List"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("List"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "certificate-to-import.pfx",
// }, nil)
// if err != nil {
// return err
// }
// exampleCertificate, err := keyvault.NewCertificate(ctx, "example", &keyvault.CertificateArgs{
// Name: pulumi.String("imported-cert"),
// KeyVaultId: exampleKeyVault.ID(),
// Certificate: &keyvault.CertificateCertificateArgs{
// Contents: pulumi.String(invokeFilebase64.Result),
// Password: pulumi.String(""),
// },
// })
// if err != nil {
// return err
// }
// _, err = signalr.NewServiceCustomCertificate(ctx, "test", &signalr.ServiceCustomCertificateArgs{
// Name: pulumi.String("example-cert"),
// SignalrServiceId: exampleService.ID(),
// CustomCertificateId: exampleCertificate.ID(),
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleAzurermKeyVaultAccessPolicy,
// }))
// 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.SignalRService` - 2024-03-01
//
// ## Import
//
// Custom Certificate for a SignalR service can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:signalr/serviceCustomCertificate:ServiceCustomCertificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SignalRService/signalR/signalr1/customCertificates/cert1
// ```
type ServiceCustomCertificate struct {
pulumi.CustomResourceState
// The certificate version of the SignalR Custom Certificate service.
CertificateVersion pulumi.StringOutput `pulumi:"certificateVersion"`
// The certificate id of the SignalR Custom Certificate service. Changing this forces a new resource to be created.
//
// > **Note:** Self assigned certificate is not supported and the provisioning status will fail.
CustomCertificateId pulumi.StringOutput `pulumi:"customCertificateId"`
// The name of the SignalR Custom Certificate. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The SignalR ID of the SignalR Custom Certificate. Changing this forces a new resource to be created.
//
// > **Note:** Custom Certificate is only available for SignalR Premium tier. Please enable managed identity in the corresponding SignalR Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret.
SignalrServiceId pulumi.StringOutput `pulumi:"signalrServiceId"`
}
// NewServiceCustomCertificate registers a new resource with the given unique name, arguments, and options.
func NewServiceCustomCertificate(ctx *pulumi.Context,
name string, args *ServiceCustomCertificateArgs, opts ...pulumi.ResourceOption) (*ServiceCustomCertificate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CustomCertificateId == nil {
return nil, errors.New("invalid value for required argument 'CustomCertificateId'")
}
if args.SignalrServiceId == nil {
return nil, errors.New("invalid value for required argument 'SignalrServiceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServiceCustomCertificate
err := ctx.RegisterResource("azure:signalr/serviceCustomCertificate:ServiceCustomCertificate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServiceCustomCertificate gets an existing ServiceCustomCertificate 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 GetServiceCustomCertificate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServiceCustomCertificateState, opts ...pulumi.ResourceOption) (*ServiceCustomCertificate, error) {
var resource ServiceCustomCertificate
err := ctx.ReadResource("azure:signalr/serviceCustomCertificate:ServiceCustomCertificate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServiceCustomCertificate resources.
type serviceCustomCertificateState struct {
// The certificate version of the SignalR Custom Certificate service.
CertificateVersion *string `pulumi:"certificateVersion"`
// The certificate id of the SignalR Custom Certificate service. Changing this forces a new resource to be created.
//
// > **Note:** Self assigned certificate is not supported and the provisioning status will fail.
CustomCertificateId *string `pulumi:"customCertificateId"`
// The name of the SignalR Custom Certificate. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The SignalR ID of the SignalR Custom Certificate. Changing this forces a new resource to be created.
//
// > **Note:** Custom Certificate is only available for SignalR Premium tier. Please enable managed identity in the corresponding SignalR Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret.
SignalrServiceId *string `pulumi:"signalrServiceId"`
}
type ServiceCustomCertificateState struct {
// The certificate version of the SignalR Custom Certificate service.
CertificateVersion pulumi.StringPtrInput
// The certificate id of the SignalR Custom Certificate service. Changing this forces a new resource to be created.
//
// > **Note:** Self assigned certificate is not supported and the provisioning status will fail.
CustomCertificateId pulumi.StringPtrInput
// The name of the SignalR Custom Certificate. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The SignalR ID of the SignalR Custom Certificate. Changing this forces a new resource to be created.
//
// > **Note:** Custom Certificate is only available for SignalR Premium tier. Please enable managed identity in the corresponding SignalR Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret.
SignalrServiceId pulumi.StringPtrInput
}
func (ServiceCustomCertificateState) ElementType() reflect.Type {
return reflect.TypeOf((*serviceCustomCertificateState)(nil)).Elem()
}
type serviceCustomCertificateArgs struct {
// The certificate id of the SignalR Custom Certificate service. Changing this forces a new resource to be created.
//
// > **Note:** Self assigned certificate is not supported and the provisioning status will fail.
CustomCertificateId string `pulumi:"customCertificateId"`
// The name of the SignalR Custom Certificate. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The SignalR ID of the SignalR Custom Certificate. Changing this forces a new resource to be created.
//
// > **Note:** Custom Certificate is only available for SignalR Premium tier. Please enable managed identity in the corresponding SignalR Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret.
SignalrServiceId string `pulumi:"signalrServiceId"`
}
// The set of arguments for constructing a ServiceCustomCertificate resource.
type ServiceCustomCertificateArgs struct {
// The certificate id of the SignalR Custom Certificate service. Changing this forces a new resource to be created.
//
// > **Note:** Self assigned certificate is not supported and the provisioning status will fail.
CustomCertificateId pulumi.StringInput
// The name of the SignalR Custom Certificate. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The SignalR ID of the SignalR Custom Certificate. Changing this forces a new resource to be created.
//
// > **Note:** Custom Certificate is only available for SignalR Premium tier. Please enable managed identity in the corresponding SignalR Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret.
SignalrServiceId pulumi.StringInput
}
func (ServiceCustomCertificateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serviceCustomCertificateArgs)(nil)).Elem()
}
type ServiceCustomCertificateInput interface {
pulumi.Input
ToServiceCustomCertificateOutput() ServiceCustomCertificateOutput
ToServiceCustomCertificateOutputWithContext(ctx context.Context) ServiceCustomCertificateOutput
}
func (*ServiceCustomCertificate) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceCustomCertificate)(nil)).Elem()
}
func (i *ServiceCustomCertificate) ToServiceCustomCertificateOutput() ServiceCustomCertificateOutput {
return i.ToServiceCustomCertificateOutputWithContext(context.Background())
}
func (i *ServiceCustomCertificate) ToServiceCustomCertificateOutputWithContext(ctx context.Context) ServiceCustomCertificateOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceCustomCertificateOutput)
}
// ServiceCustomCertificateArrayInput is an input type that accepts ServiceCustomCertificateArray and ServiceCustomCertificateArrayOutput values.
// You can construct a concrete instance of `ServiceCustomCertificateArrayInput` via:
//
// ServiceCustomCertificateArray{ ServiceCustomCertificateArgs{...} }
type ServiceCustomCertificateArrayInput interface {
pulumi.Input
ToServiceCustomCertificateArrayOutput() ServiceCustomCertificateArrayOutput
ToServiceCustomCertificateArrayOutputWithContext(context.Context) ServiceCustomCertificateArrayOutput
}
type ServiceCustomCertificateArray []ServiceCustomCertificateInput
func (ServiceCustomCertificateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServiceCustomCertificate)(nil)).Elem()
}
func (i ServiceCustomCertificateArray) ToServiceCustomCertificateArrayOutput() ServiceCustomCertificateArrayOutput {
return i.ToServiceCustomCertificateArrayOutputWithContext(context.Background())
}
func (i ServiceCustomCertificateArray) ToServiceCustomCertificateArrayOutputWithContext(ctx context.Context) ServiceCustomCertificateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceCustomCertificateArrayOutput)
}
// ServiceCustomCertificateMapInput is an input type that accepts ServiceCustomCertificateMap and ServiceCustomCertificateMapOutput values.
// You can construct a concrete instance of `ServiceCustomCertificateMapInput` via:
//
// ServiceCustomCertificateMap{ "key": ServiceCustomCertificateArgs{...} }
type ServiceCustomCertificateMapInput interface {
pulumi.Input
ToServiceCustomCertificateMapOutput() ServiceCustomCertificateMapOutput
ToServiceCustomCertificateMapOutputWithContext(context.Context) ServiceCustomCertificateMapOutput
}
type ServiceCustomCertificateMap map[string]ServiceCustomCertificateInput
func (ServiceCustomCertificateMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServiceCustomCertificate)(nil)).Elem()
}
func (i ServiceCustomCertificateMap) ToServiceCustomCertificateMapOutput() ServiceCustomCertificateMapOutput {
return i.ToServiceCustomCertificateMapOutputWithContext(context.Background())
}
func (i ServiceCustomCertificateMap) ToServiceCustomCertificateMapOutputWithContext(ctx context.Context) ServiceCustomCertificateMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceCustomCertificateMapOutput)
}
type ServiceCustomCertificateOutput struct{ *pulumi.OutputState }
func (ServiceCustomCertificateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceCustomCertificate)(nil)).Elem()
}
func (o ServiceCustomCertificateOutput) ToServiceCustomCertificateOutput() ServiceCustomCertificateOutput {
return o
}
func (o ServiceCustomCertificateOutput) ToServiceCustomCertificateOutputWithContext(ctx context.Context) ServiceCustomCertificateOutput {
return o
}
// The certificate version of the SignalR Custom Certificate service.
func (o ServiceCustomCertificateOutput) CertificateVersion() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceCustomCertificate) pulumi.StringOutput { return v.CertificateVersion }).(pulumi.StringOutput)
}
// The certificate id of the SignalR Custom Certificate service. Changing this forces a new resource to be created.
//
// > **Note:** Self assigned certificate is not supported and the provisioning status will fail.
func (o ServiceCustomCertificateOutput) CustomCertificateId() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceCustomCertificate) pulumi.StringOutput { return v.CustomCertificateId }).(pulumi.StringOutput)
}
// The name of the SignalR Custom Certificate. Changing this forces a new resource to be created.
func (o ServiceCustomCertificateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceCustomCertificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The SignalR ID of the SignalR Custom Certificate. Changing this forces a new resource to be created.
//
// > **Note:** Custom Certificate is only available for SignalR Premium tier. Please enable managed identity in the corresponding SignalR Service and give the managed identity access to the key vault, the required permission is Get Certificate and Secret.
func (o ServiceCustomCertificateOutput) SignalrServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceCustomCertificate) pulumi.StringOutput { return v.SignalrServiceId }).(pulumi.StringOutput)
}
type ServiceCustomCertificateArrayOutput struct{ *pulumi.OutputState }
func (ServiceCustomCertificateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServiceCustomCertificate)(nil)).Elem()
}
func (o ServiceCustomCertificateArrayOutput) ToServiceCustomCertificateArrayOutput() ServiceCustomCertificateArrayOutput {
return o
}
func (o ServiceCustomCertificateArrayOutput) ToServiceCustomCertificateArrayOutputWithContext(ctx context.Context) ServiceCustomCertificateArrayOutput {
return o
}
func (o ServiceCustomCertificateArrayOutput) Index(i pulumi.IntInput) ServiceCustomCertificateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServiceCustomCertificate {
return vs[0].([]*ServiceCustomCertificate)[vs[1].(int)]
}).(ServiceCustomCertificateOutput)
}
type ServiceCustomCertificateMapOutput struct{ *pulumi.OutputState }
func (ServiceCustomCertificateMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServiceCustomCertificate)(nil)).Elem()
}
func (o ServiceCustomCertificateMapOutput) ToServiceCustomCertificateMapOutput() ServiceCustomCertificateMapOutput {
return o
}
func (o ServiceCustomCertificateMapOutput) ToServiceCustomCertificateMapOutputWithContext(ctx context.Context) ServiceCustomCertificateMapOutput {
return o
}
func (o ServiceCustomCertificateMapOutput) MapIndex(k pulumi.StringInput) ServiceCustomCertificateOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServiceCustomCertificate {
return vs[0].(map[string]*ServiceCustomCertificate)[vs[1].(string)]
}).(ServiceCustomCertificateOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServiceCustomCertificateInput)(nil)).Elem(), &ServiceCustomCertificate{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceCustomCertificateArrayInput)(nil)).Elem(), ServiceCustomCertificateArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceCustomCertificateMapInput)(nil)).Elem(), ServiceCustomCertificateMap{})
pulumi.RegisterOutputType(ServiceCustomCertificateOutput{})
pulumi.RegisterOutputType(ServiceCustomCertificateArrayOutput{})
pulumi.RegisterOutputType(ServiceCustomCertificateMapOutput{})
}
| 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/signalr/init.go | sdk/go/azure/signalr/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 signalr
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:signalr/service:Service":
r = &Service{}
case "azure:signalr/serviceCustomCertificate:ServiceCustomCertificate":
r = &ServiceCustomCertificate{}
case "azure:signalr/serviceCustomDomain:ServiceCustomDomain":
r = &ServiceCustomDomain{}
case "azure:signalr/serviceNetworkAcl:ServiceNetworkAcl":
r = &ServiceNetworkAcl{}
case "azure:signalr/sharedPrivateLinkResource:SharedPrivateLinkResource":
r = &SharedPrivateLinkResource{}
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",
"signalr/service",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"signalr/serviceCustomCertificate",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"signalr/serviceCustomDomain",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"signalr/serviceNetworkAcl",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"signalr/sharedPrivateLinkResource",
&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/signalr/serviceNetworkAcl.go | sdk/go/azure/signalr/serviceNetworkAcl.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 signalr
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the Network ACL for a SignalR service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatelink"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/signalr"
// "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
// }
// exampleService, err := signalr.NewService(ctx, "example", &signalr.ServiceArgs{
// Name: pulumi.String("example-signalr"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: &signalr.ServiceSkuArgs{
// Name: pulumi.String("Standard_S1"),
// Capacity: pulumi.Int(1),
// },
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-vnet"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.5.0.0/16"),
// },
// })
// 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.5.2.0/24"),
// },
// EnforcePrivateLinkEndpointNetworkPolicies: true,
// })
// if err != nil {
// return err
// }
// exampleEndpoint, err := privatelink.NewEndpoint(ctx, "example", &privatelink.EndpointArgs{
// Name: pulumi.String("example-privateendpoint"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SubnetId: exampleSubnet.ID(),
// PrivateServiceConnection: &privatelink.EndpointPrivateServiceConnectionArgs{
// Name: pulumi.String("psc-sig-test"),
// IsManualConnection: pulumi.Bool(false),
// PrivateConnectionResourceId: exampleService.ID(),
// SubresourceNames: pulumi.StringArray{
// pulumi.String("signalr"),
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = signalr.NewServiceNetworkAcl(ctx, "example", &signalr.ServiceNetworkAclArgs{
// SignalrServiceId: exampleService.ID(),
// DefaultAction: pulumi.String("Deny"),
// PublicNetwork: &signalr.ServiceNetworkAclPublicNetworkArgs{
// AllowedRequestTypes: pulumi.StringArray{
// pulumi.String("ClientConnection"),
// },
// },
// PrivateEndpoints: signalr.ServiceNetworkAclPrivateEndpointArray{
// &signalr.ServiceNetworkAclPrivateEndpointArgs{
// Id: exampleEndpoint.ID(),
// AllowedRequestTypes: pulumi.StringArray{
// pulumi.String("ServerConnection"),
// },
// },
// },
// })
// 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.SignalRService` - 2024-03-01
//
// ## Import
//
// Network ACLs for a SignalR service can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:signalr/serviceNetworkAcl:ServiceNetworkAcl example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SignalRService/signalR/signalr1
// ```
type ServiceNetworkAcl struct {
pulumi.CustomResourceState
// The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`.
DefaultAction pulumi.StringOutput `pulumi:"defaultAction"`
// A `privateEndpoint` block as defined below.
PrivateEndpoints ServiceNetworkAclPrivateEndpointArrayOutput `pulumi:"privateEndpoints"`
// A `publicNetwork` block as defined below.
PublicNetwork ServiceNetworkAclPublicNetworkOutput `pulumi:"publicNetwork"`
// The ID of the SignalR service. Changing this forces a new resource to be created.
SignalrServiceId pulumi.StringOutput `pulumi:"signalrServiceId"`
}
// NewServiceNetworkAcl registers a new resource with the given unique name, arguments, and options.
func NewServiceNetworkAcl(ctx *pulumi.Context,
name string, args *ServiceNetworkAclArgs, opts ...pulumi.ResourceOption) (*ServiceNetworkAcl, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DefaultAction == nil {
return nil, errors.New("invalid value for required argument 'DefaultAction'")
}
if args.PublicNetwork == nil {
return nil, errors.New("invalid value for required argument 'PublicNetwork'")
}
if args.SignalrServiceId == nil {
return nil, errors.New("invalid value for required argument 'SignalrServiceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServiceNetworkAcl
err := ctx.RegisterResource("azure:signalr/serviceNetworkAcl:ServiceNetworkAcl", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServiceNetworkAcl gets an existing ServiceNetworkAcl 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 GetServiceNetworkAcl(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServiceNetworkAclState, opts ...pulumi.ResourceOption) (*ServiceNetworkAcl, error) {
var resource ServiceNetworkAcl
err := ctx.ReadResource("azure:signalr/serviceNetworkAcl:ServiceNetworkAcl", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServiceNetworkAcl resources.
type serviceNetworkAclState struct {
// The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`.
DefaultAction *string `pulumi:"defaultAction"`
// A `privateEndpoint` block as defined below.
PrivateEndpoints []ServiceNetworkAclPrivateEndpoint `pulumi:"privateEndpoints"`
// A `publicNetwork` block as defined below.
PublicNetwork *ServiceNetworkAclPublicNetwork `pulumi:"publicNetwork"`
// The ID of the SignalR service. Changing this forces a new resource to be created.
SignalrServiceId *string `pulumi:"signalrServiceId"`
}
type ServiceNetworkAclState struct {
// The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`.
DefaultAction pulumi.StringPtrInput
// A `privateEndpoint` block as defined below.
PrivateEndpoints ServiceNetworkAclPrivateEndpointArrayInput
// A `publicNetwork` block as defined below.
PublicNetwork ServiceNetworkAclPublicNetworkPtrInput
// The ID of the SignalR service. Changing this forces a new resource to be created.
SignalrServiceId pulumi.StringPtrInput
}
func (ServiceNetworkAclState) ElementType() reflect.Type {
return reflect.TypeOf((*serviceNetworkAclState)(nil)).Elem()
}
type serviceNetworkAclArgs struct {
// The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`.
DefaultAction string `pulumi:"defaultAction"`
// A `privateEndpoint` block as defined below.
PrivateEndpoints []ServiceNetworkAclPrivateEndpoint `pulumi:"privateEndpoints"`
// A `publicNetwork` block as defined below.
PublicNetwork ServiceNetworkAclPublicNetwork `pulumi:"publicNetwork"`
// The ID of the SignalR service. Changing this forces a new resource to be created.
SignalrServiceId string `pulumi:"signalrServiceId"`
}
// The set of arguments for constructing a ServiceNetworkAcl resource.
type ServiceNetworkAclArgs struct {
// The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`.
DefaultAction pulumi.StringInput
// A `privateEndpoint` block as defined below.
PrivateEndpoints ServiceNetworkAclPrivateEndpointArrayInput
// A `publicNetwork` block as defined below.
PublicNetwork ServiceNetworkAclPublicNetworkInput
// The ID of the SignalR service. Changing this forces a new resource to be created.
SignalrServiceId pulumi.StringInput
}
func (ServiceNetworkAclArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serviceNetworkAclArgs)(nil)).Elem()
}
type ServiceNetworkAclInput interface {
pulumi.Input
ToServiceNetworkAclOutput() ServiceNetworkAclOutput
ToServiceNetworkAclOutputWithContext(ctx context.Context) ServiceNetworkAclOutput
}
func (*ServiceNetworkAcl) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceNetworkAcl)(nil)).Elem()
}
func (i *ServiceNetworkAcl) ToServiceNetworkAclOutput() ServiceNetworkAclOutput {
return i.ToServiceNetworkAclOutputWithContext(context.Background())
}
func (i *ServiceNetworkAcl) ToServiceNetworkAclOutputWithContext(ctx context.Context) ServiceNetworkAclOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceNetworkAclOutput)
}
// ServiceNetworkAclArrayInput is an input type that accepts ServiceNetworkAclArray and ServiceNetworkAclArrayOutput values.
// You can construct a concrete instance of `ServiceNetworkAclArrayInput` via:
//
// ServiceNetworkAclArray{ ServiceNetworkAclArgs{...} }
type ServiceNetworkAclArrayInput interface {
pulumi.Input
ToServiceNetworkAclArrayOutput() ServiceNetworkAclArrayOutput
ToServiceNetworkAclArrayOutputWithContext(context.Context) ServiceNetworkAclArrayOutput
}
type ServiceNetworkAclArray []ServiceNetworkAclInput
func (ServiceNetworkAclArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServiceNetworkAcl)(nil)).Elem()
}
func (i ServiceNetworkAclArray) ToServiceNetworkAclArrayOutput() ServiceNetworkAclArrayOutput {
return i.ToServiceNetworkAclArrayOutputWithContext(context.Background())
}
func (i ServiceNetworkAclArray) ToServiceNetworkAclArrayOutputWithContext(ctx context.Context) ServiceNetworkAclArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceNetworkAclArrayOutput)
}
// ServiceNetworkAclMapInput is an input type that accepts ServiceNetworkAclMap and ServiceNetworkAclMapOutput values.
// You can construct a concrete instance of `ServiceNetworkAclMapInput` via:
//
// ServiceNetworkAclMap{ "key": ServiceNetworkAclArgs{...} }
type ServiceNetworkAclMapInput interface {
pulumi.Input
ToServiceNetworkAclMapOutput() ServiceNetworkAclMapOutput
ToServiceNetworkAclMapOutputWithContext(context.Context) ServiceNetworkAclMapOutput
}
type ServiceNetworkAclMap map[string]ServiceNetworkAclInput
func (ServiceNetworkAclMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServiceNetworkAcl)(nil)).Elem()
}
func (i ServiceNetworkAclMap) ToServiceNetworkAclMapOutput() ServiceNetworkAclMapOutput {
return i.ToServiceNetworkAclMapOutputWithContext(context.Background())
}
func (i ServiceNetworkAclMap) ToServiceNetworkAclMapOutputWithContext(ctx context.Context) ServiceNetworkAclMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceNetworkAclMapOutput)
}
type ServiceNetworkAclOutput struct{ *pulumi.OutputState }
func (ServiceNetworkAclOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceNetworkAcl)(nil)).Elem()
}
func (o ServiceNetworkAclOutput) ToServiceNetworkAclOutput() ServiceNetworkAclOutput {
return o
}
func (o ServiceNetworkAclOutput) ToServiceNetworkAclOutputWithContext(ctx context.Context) ServiceNetworkAclOutput {
return o
}
// The default action to control the network access when no other rule matches. Possible values are `Allow` and `Deny`.
func (o ServiceNetworkAclOutput) DefaultAction() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceNetworkAcl) pulumi.StringOutput { return v.DefaultAction }).(pulumi.StringOutput)
}
// A `privateEndpoint` block as defined below.
func (o ServiceNetworkAclOutput) PrivateEndpoints() ServiceNetworkAclPrivateEndpointArrayOutput {
return o.ApplyT(func(v *ServiceNetworkAcl) ServiceNetworkAclPrivateEndpointArrayOutput { return v.PrivateEndpoints }).(ServiceNetworkAclPrivateEndpointArrayOutput)
}
// A `publicNetwork` block as defined below.
func (o ServiceNetworkAclOutput) PublicNetwork() ServiceNetworkAclPublicNetworkOutput {
return o.ApplyT(func(v *ServiceNetworkAcl) ServiceNetworkAclPublicNetworkOutput { return v.PublicNetwork }).(ServiceNetworkAclPublicNetworkOutput)
}
// The ID of the SignalR service. Changing this forces a new resource to be created.
func (o ServiceNetworkAclOutput) SignalrServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceNetworkAcl) pulumi.StringOutput { return v.SignalrServiceId }).(pulumi.StringOutput)
}
type ServiceNetworkAclArrayOutput struct{ *pulumi.OutputState }
func (ServiceNetworkAclArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServiceNetworkAcl)(nil)).Elem()
}
func (o ServiceNetworkAclArrayOutput) ToServiceNetworkAclArrayOutput() ServiceNetworkAclArrayOutput {
return o
}
func (o ServiceNetworkAclArrayOutput) ToServiceNetworkAclArrayOutputWithContext(ctx context.Context) ServiceNetworkAclArrayOutput {
return o
}
func (o ServiceNetworkAclArrayOutput) Index(i pulumi.IntInput) ServiceNetworkAclOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServiceNetworkAcl {
return vs[0].([]*ServiceNetworkAcl)[vs[1].(int)]
}).(ServiceNetworkAclOutput)
}
type ServiceNetworkAclMapOutput struct{ *pulumi.OutputState }
func (ServiceNetworkAclMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServiceNetworkAcl)(nil)).Elem()
}
func (o ServiceNetworkAclMapOutput) ToServiceNetworkAclMapOutput() ServiceNetworkAclMapOutput {
return o
}
func (o ServiceNetworkAclMapOutput) ToServiceNetworkAclMapOutputWithContext(ctx context.Context) ServiceNetworkAclMapOutput {
return o
}
func (o ServiceNetworkAclMapOutput) MapIndex(k pulumi.StringInput) ServiceNetworkAclOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServiceNetworkAcl {
return vs[0].(map[string]*ServiceNetworkAcl)[vs[1].(string)]
}).(ServiceNetworkAclOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServiceNetworkAclInput)(nil)).Elem(), &ServiceNetworkAcl{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceNetworkAclArrayInput)(nil)).Elem(), ServiceNetworkAclArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceNetworkAclMapInput)(nil)).Elem(), ServiceNetworkAclMap{})
pulumi.RegisterOutputType(ServiceNetworkAclOutput{})
pulumi.RegisterOutputType(ServiceNetworkAclArrayOutput{})
pulumi.RegisterOutputType(ServiceNetworkAclMapOutput{})
}
| 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/signalr/pulumiTypes.go | sdk/go/azure/signalr/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 signalr
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 ServiceCor struct {
// A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls.
AllowedOrigins []string `pulumi:"allowedOrigins"`
}
// ServiceCorInput is an input type that accepts ServiceCorArgs and ServiceCorOutput values.
// You can construct a concrete instance of `ServiceCorInput` via:
//
// ServiceCorArgs{...}
type ServiceCorInput interface {
pulumi.Input
ToServiceCorOutput() ServiceCorOutput
ToServiceCorOutputWithContext(context.Context) ServiceCorOutput
}
type ServiceCorArgs struct {
// A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls.
AllowedOrigins pulumi.StringArrayInput `pulumi:"allowedOrigins"`
}
func (ServiceCorArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceCor)(nil)).Elem()
}
func (i ServiceCorArgs) ToServiceCorOutput() ServiceCorOutput {
return i.ToServiceCorOutputWithContext(context.Background())
}
func (i ServiceCorArgs) ToServiceCorOutputWithContext(ctx context.Context) ServiceCorOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceCorOutput)
}
// ServiceCorArrayInput is an input type that accepts ServiceCorArray and ServiceCorArrayOutput values.
// You can construct a concrete instance of `ServiceCorArrayInput` via:
//
// ServiceCorArray{ ServiceCorArgs{...} }
type ServiceCorArrayInput interface {
pulumi.Input
ToServiceCorArrayOutput() ServiceCorArrayOutput
ToServiceCorArrayOutputWithContext(context.Context) ServiceCorArrayOutput
}
type ServiceCorArray []ServiceCorInput
func (ServiceCorArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ServiceCor)(nil)).Elem()
}
func (i ServiceCorArray) ToServiceCorArrayOutput() ServiceCorArrayOutput {
return i.ToServiceCorArrayOutputWithContext(context.Background())
}
func (i ServiceCorArray) ToServiceCorArrayOutputWithContext(ctx context.Context) ServiceCorArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceCorArrayOutput)
}
type ServiceCorOutput struct{ *pulumi.OutputState }
func (ServiceCorOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceCor)(nil)).Elem()
}
func (o ServiceCorOutput) ToServiceCorOutput() ServiceCorOutput {
return o
}
func (o ServiceCorOutput) ToServiceCorOutputWithContext(ctx context.Context) ServiceCorOutput {
return o
}
// A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls.
func (o ServiceCorOutput) AllowedOrigins() pulumi.StringArrayOutput {
return o.ApplyT(func(v ServiceCor) []string { return v.AllowedOrigins }).(pulumi.StringArrayOutput)
}
type ServiceCorArrayOutput struct{ *pulumi.OutputState }
func (ServiceCorArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ServiceCor)(nil)).Elem()
}
func (o ServiceCorArrayOutput) ToServiceCorArrayOutput() ServiceCorArrayOutput {
return o
}
func (o ServiceCorArrayOutput) ToServiceCorArrayOutputWithContext(ctx context.Context) ServiceCorArrayOutput {
return o
}
func (o ServiceCorArrayOutput) Index(i pulumi.IntInput) ServiceCorOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ServiceCor {
return vs[0].([]ServiceCor)[vs[1].(int)]
}).(ServiceCorOutput)
}
type ServiceIdentity struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this signalR.
//
// > **Note:** This is required when `type` is set to `UserAssigned`
IdentityIds []string `pulumi:"identityIds"`
PrincipalId *string `pulumi:"principalId"`
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this signalR. Possible values are `SystemAssigned`, `UserAssigned`.
Type string `pulumi:"type"`
}
// ServiceIdentityInput is an input type that accepts ServiceIdentityArgs and ServiceIdentityOutput values.
// You can construct a concrete instance of `ServiceIdentityInput` via:
//
// ServiceIdentityArgs{...}
type ServiceIdentityInput interface {
pulumi.Input
ToServiceIdentityOutput() ServiceIdentityOutput
ToServiceIdentityOutputWithContext(context.Context) ServiceIdentityOutput
}
type ServiceIdentityArgs struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this signalR.
//
// > **Note:** This is required when `type` is set to `UserAssigned`
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this signalR. Possible values are `SystemAssigned`, `UserAssigned`.
Type pulumi.StringInput `pulumi:"type"`
}
func (ServiceIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceIdentity)(nil)).Elem()
}
func (i ServiceIdentityArgs) ToServiceIdentityOutput() ServiceIdentityOutput {
return i.ToServiceIdentityOutputWithContext(context.Background())
}
func (i ServiceIdentityArgs) ToServiceIdentityOutputWithContext(ctx context.Context) ServiceIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceIdentityOutput)
}
func (i ServiceIdentityArgs) ToServiceIdentityPtrOutput() ServiceIdentityPtrOutput {
return i.ToServiceIdentityPtrOutputWithContext(context.Background())
}
func (i ServiceIdentityArgs) ToServiceIdentityPtrOutputWithContext(ctx context.Context) ServiceIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceIdentityOutput).ToServiceIdentityPtrOutputWithContext(ctx)
}
// ServiceIdentityPtrInput is an input type that accepts ServiceIdentityArgs, ServiceIdentityPtr and ServiceIdentityPtrOutput values.
// You can construct a concrete instance of `ServiceIdentityPtrInput` via:
//
// ServiceIdentityArgs{...}
//
// or:
//
// nil
type ServiceIdentityPtrInput interface {
pulumi.Input
ToServiceIdentityPtrOutput() ServiceIdentityPtrOutput
ToServiceIdentityPtrOutputWithContext(context.Context) ServiceIdentityPtrOutput
}
type serviceIdentityPtrType ServiceIdentityArgs
func ServiceIdentityPtr(v *ServiceIdentityArgs) ServiceIdentityPtrInput {
return (*serviceIdentityPtrType)(v)
}
func (*serviceIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceIdentity)(nil)).Elem()
}
func (i *serviceIdentityPtrType) ToServiceIdentityPtrOutput() ServiceIdentityPtrOutput {
return i.ToServiceIdentityPtrOutputWithContext(context.Background())
}
func (i *serviceIdentityPtrType) ToServiceIdentityPtrOutputWithContext(ctx context.Context) ServiceIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceIdentityPtrOutput)
}
type ServiceIdentityOutput struct{ *pulumi.OutputState }
func (ServiceIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceIdentity)(nil)).Elem()
}
func (o ServiceIdentityOutput) ToServiceIdentityOutput() ServiceIdentityOutput {
return o
}
func (o ServiceIdentityOutput) ToServiceIdentityOutputWithContext(ctx context.Context) ServiceIdentityOutput {
return o
}
func (o ServiceIdentityOutput) ToServiceIdentityPtrOutput() ServiceIdentityPtrOutput {
return o.ToServiceIdentityPtrOutputWithContext(context.Background())
}
func (o ServiceIdentityOutput) ToServiceIdentityPtrOutputWithContext(ctx context.Context) ServiceIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ServiceIdentity) *ServiceIdentity {
return &v
}).(ServiceIdentityPtrOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this signalR.
//
// > **Note:** This is required when `type` is set to `UserAssigned`
func (o ServiceIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v ServiceIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
func (o ServiceIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ServiceIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
func (o ServiceIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ServiceIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this signalR. Possible values are `SystemAssigned`, `UserAssigned`.
func (o ServiceIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v ServiceIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type ServiceIdentityPtrOutput struct{ *pulumi.OutputState }
func (ServiceIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceIdentity)(nil)).Elem()
}
func (o ServiceIdentityPtrOutput) ToServiceIdentityPtrOutput() ServiceIdentityPtrOutput {
return o
}
func (o ServiceIdentityPtrOutput) ToServiceIdentityPtrOutputWithContext(ctx context.Context) ServiceIdentityPtrOutput {
return o
}
func (o ServiceIdentityPtrOutput) Elem() ServiceIdentityOutput {
return o.ApplyT(func(v *ServiceIdentity) ServiceIdentity {
if v != nil {
return *v
}
var ret ServiceIdentity
return ret
}).(ServiceIdentityOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this signalR.
//
// > **Note:** This is required when `type` is set to `UserAssigned`
func (o ServiceIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ServiceIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
func (o ServiceIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
func (o ServiceIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this signalR. Possible values are `SystemAssigned`, `UserAssigned`.
func (o ServiceIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ServiceIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type ServiceLiveTrace struct {
// Whether the log category `ConnectivityLogs` is enabled? Defaults to `true`
ConnectivityLogsEnabled *bool `pulumi:"connectivityLogsEnabled"`
// Whether the live trace is enabled? Defaults to `true`.
Enabled *bool `pulumi:"enabled"`
// Whether the log category `HttpRequestLogs` is enabled? Defaults to `true`
HttpRequestLogsEnabled *bool `pulumi:"httpRequestLogsEnabled"`
// Whether the log category `MessagingLogs` is enabled? Defaults to `true`
MessagingLogsEnabled *bool `pulumi:"messagingLogsEnabled"`
}
// ServiceLiveTraceInput is an input type that accepts ServiceLiveTraceArgs and ServiceLiveTraceOutput values.
// You can construct a concrete instance of `ServiceLiveTraceInput` via:
//
// ServiceLiveTraceArgs{...}
type ServiceLiveTraceInput interface {
pulumi.Input
ToServiceLiveTraceOutput() ServiceLiveTraceOutput
ToServiceLiveTraceOutputWithContext(context.Context) ServiceLiveTraceOutput
}
type ServiceLiveTraceArgs struct {
// Whether the log category `ConnectivityLogs` is enabled? Defaults to `true`
ConnectivityLogsEnabled pulumi.BoolPtrInput `pulumi:"connectivityLogsEnabled"`
// Whether the live trace is enabled? Defaults to `true`.
Enabled pulumi.BoolPtrInput `pulumi:"enabled"`
// Whether the log category `HttpRequestLogs` is enabled? Defaults to `true`
HttpRequestLogsEnabled pulumi.BoolPtrInput `pulumi:"httpRequestLogsEnabled"`
// Whether the log category `MessagingLogs` is enabled? Defaults to `true`
MessagingLogsEnabled pulumi.BoolPtrInput `pulumi:"messagingLogsEnabled"`
}
func (ServiceLiveTraceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceLiveTrace)(nil)).Elem()
}
func (i ServiceLiveTraceArgs) ToServiceLiveTraceOutput() ServiceLiveTraceOutput {
return i.ToServiceLiveTraceOutputWithContext(context.Background())
}
func (i ServiceLiveTraceArgs) ToServiceLiveTraceOutputWithContext(ctx context.Context) ServiceLiveTraceOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceLiveTraceOutput)
}
func (i ServiceLiveTraceArgs) ToServiceLiveTracePtrOutput() ServiceLiveTracePtrOutput {
return i.ToServiceLiveTracePtrOutputWithContext(context.Background())
}
func (i ServiceLiveTraceArgs) ToServiceLiveTracePtrOutputWithContext(ctx context.Context) ServiceLiveTracePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceLiveTraceOutput).ToServiceLiveTracePtrOutputWithContext(ctx)
}
// ServiceLiveTracePtrInput is an input type that accepts ServiceLiveTraceArgs, ServiceLiveTracePtr and ServiceLiveTracePtrOutput values.
// You can construct a concrete instance of `ServiceLiveTracePtrInput` via:
//
// ServiceLiveTraceArgs{...}
//
// or:
//
// nil
type ServiceLiveTracePtrInput interface {
pulumi.Input
ToServiceLiveTracePtrOutput() ServiceLiveTracePtrOutput
ToServiceLiveTracePtrOutputWithContext(context.Context) ServiceLiveTracePtrOutput
}
type serviceLiveTracePtrType ServiceLiveTraceArgs
func ServiceLiveTracePtr(v *ServiceLiveTraceArgs) ServiceLiveTracePtrInput {
return (*serviceLiveTracePtrType)(v)
}
func (*serviceLiveTracePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceLiveTrace)(nil)).Elem()
}
func (i *serviceLiveTracePtrType) ToServiceLiveTracePtrOutput() ServiceLiveTracePtrOutput {
return i.ToServiceLiveTracePtrOutputWithContext(context.Background())
}
func (i *serviceLiveTracePtrType) ToServiceLiveTracePtrOutputWithContext(ctx context.Context) ServiceLiveTracePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceLiveTracePtrOutput)
}
type ServiceLiveTraceOutput struct{ *pulumi.OutputState }
func (ServiceLiveTraceOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceLiveTrace)(nil)).Elem()
}
func (o ServiceLiveTraceOutput) ToServiceLiveTraceOutput() ServiceLiveTraceOutput {
return o
}
func (o ServiceLiveTraceOutput) ToServiceLiveTraceOutputWithContext(ctx context.Context) ServiceLiveTraceOutput {
return o
}
func (o ServiceLiveTraceOutput) ToServiceLiveTracePtrOutput() ServiceLiveTracePtrOutput {
return o.ToServiceLiveTracePtrOutputWithContext(context.Background())
}
func (o ServiceLiveTraceOutput) ToServiceLiveTracePtrOutputWithContext(ctx context.Context) ServiceLiveTracePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ServiceLiveTrace) *ServiceLiveTrace {
return &v
}).(ServiceLiveTracePtrOutput)
}
// Whether the log category `ConnectivityLogs` is enabled? Defaults to `true`
func (o ServiceLiveTraceOutput) ConnectivityLogsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ServiceLiveTrace) *bool { return v.ConnectivityLogsEnabled }).(pulumi.BoolPtrOutput)
}
// Whether the live trace is enabled? Defaults to `true`.
func (o ServiceLiveTraceOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ServiceLiveTrace) *bool { return v.Enabled }).(pulumi.BoolPtrOutput)
}
// Whether the log category `HttpRequestLogs` is enabled? Defaults to `true`
func (o ServiceLiveTraceOutput) HttpRequestLogsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ServiceLiveTrace) *bool { return v.HttpRequestLogsEnabled }).(pulumi.BoolPtrOutput)
}
// Whether the log category `MessagingLogs` is enabled? Defaults to `true`
func (o ServiceLiveTraceOutput) MessagingLogsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ServiceLiveTrace) *bool { return v.MessagingLogsEnabled }).(pulumi.BoolPtrOutput)
}
type ServiceLiveTracePtrOutput struct{ *pulumi.OutputState }
func (ServiceLiveTracePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceLiveTrace)(nil)).Elem()
}
func (o ServiceLiveTracePtrOutput) ToServiceLiveTracePtrOutput() ServiceLiveTracePtrOutput {
return o
}
func (o ServiceLiveTracePtrOutput) ToServiceLiveTracePtrOutputWithContext(ctx context.Context) ServiceLiveTracePtrOutput {
return o
}
func (o ServiceLiveTracePtrOutput) Elem() ServiceLiveTraceOutput {
return o.ApplyT(func(v *ServiceLiveTrace) ServiceLiveTrace {
if v != nil {
return *v
}
var ret ServiceLiveTrace
return ret
}).(ServiceLiveTraceOutput)
}
// Whether the log category `ConnectivityLogs` is enabled? Defaults to `true`
func (o ServiceLiveTracePtrOutput) ConnectivityLogsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ServiceLiveTrace) *bool {
if v == nil {
return nil
}
return v.ConnectivityLogsEnabled
}).(pulumi.BoolPtrOutput)
}
// Whether the live trace is enabled? Defaults to `true`.
func (o ServiceLiveTracePtrOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ServiceLiveTrace) *bool {
if v == nil {
return nil
}
return v.Enabled
}).(pulumi.BoolPtrOutput)
}
// Whether the log category `HttpRequestLogs` is enabled? Defaults to `true`
func (o ServiceLiveTracePtrOutput) HttpRequestLogsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ServiceLiveTrace) *bool {
if v == nil {
return nil
}
return v.HttpRequestLogsEnabled
}).(pulumi.BoolPtrOutput)
}
// Whether the log category `MessagingLogs` is enabled? Defaults to `true`
func (o ServiceLiveTracePtrOutput) MessagingLogsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ServiceLiveTrace) *bool {
if v == nil {
return nil
}
return v.MessagingLogsEnabled
}).(pulumi.BoolPtrOutput)
}
type ServiceNetworkAclPrivateEndpoint struct {
// The allowed request types for the Private Endpoint Connection. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`.
//
// > **Note:** When `defaultAction` is `Allow`, `allowedRequestTypes`cannot be set.
AllowedRequestTypes []string `pulumi:"allowedRequestTypes"`
// The denied request types for the Private Endpoint Connection. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`.
//
// > **Note:** When `defaultAction` is `Deny`, `deniedRequestTypes`cannot be set.
//
// > **Note:** `allowedRequestTypes` - (Optional) and `deniedRequestTypes` cannot be set together.
DeniedRequestTypes []string `pulumi:"deniedRequestTypes"`
// The ID of the Private Endpoint which is based on the SignalR service.
Id string `pulumi:"id"`
}
// ServiceNetworkAclPrivateEndpointInput is an input type that accepts ServiceNetworkAclPrivateEndpointArgs and ServiceNetworkAclPrivateEndpointOutput values.
// You can construct a concrete instance of `ServiceNetworkAclPrivateEndpointInput` via:
//
// ServiceNetworkAclPrivateEndpointArgs{...}
type ServiceNetworkAclPrivateEndpointInput interface {
pulumi.Input
ToServiceNetworkAclPrivateEndpointOutput() ServiceNetworkAclPrivateEndpointOutput
ToServiceNetworkAclPrivateEndpointOutputWithContext(context.Context) ServiceNetworkAclPrivateEndpointOutput
}
type ServiceNetworkAclPrivateEndpointArgs struct {
// The allowed request types for the Private Endpoint Connection. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`.
//
// > **Note:** When `defaultAction` is `Allow`, `allowedRequestTypes`cannot be set.
AllowedRequestTypes pulumi.StringArrayInput `pulumi:"allowedRequestTypes"`
// The denied request types for the Private Endpoint Connection. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`.
//
// > **Note:** When `defaultAction` is `Deny`, `deniedRequestTypes`cannot be set.
//
// > **Note:** `allowedRequestTypes` - (Optional) and `deniedRequestTypes` cannot be set together.
DeniedRequestTypes pulumi.StringArrayInput `pulumi:"deniedRequestTypes"`
// The ID of the Private Endpoint which is based on the SignalR service.
Id pulumi.StringInput `pulumi:"id"`
}
func (ServiceNetworkAclPrivateEndpointArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceNetworkAclPrivateEndpoint)(nil)).Elem()
}
func (i ServiceNetworkAclPrivateEndpointArgs) ToServiceNetworkAclPrivateEndpointOutput() ServiceNetworkAclPrivateEndpointOutput {
return i.ToServiceNetworkAclPrivateEndpointOutputWithContext(context.Background())
}
func (i ServiceNetworkAclPrivateEndpointArgs) ToServiceNetworkAclPrivateEndpointOutputWithContext(ctx context.Context) ServiceNetworkAclPrivateEndpointOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceNetworkAclPrivateEndpointOutput)
}
// ServiceNetworkAclPrivateEndpointArrayInput is an input type that accepts ServiceNetworkAclPrivateEndpointArray and ServiceNetworkAclPrivateEndpointArrayOutput values.
// You can construct a concrete instance of `ServiceNetworkAclPrivateEndpointArrayInput` via:
//
// ServiceNetworkAclPrivateEndpointArray{ ServiceNetworkAclPrivateEndpointArgs{...} }
type ServiceNetworkAclPrivateEndpointArrayInput interface {
pulumi.Input
ToServiceNetworkAclPrivateEndpointArrayOutput() ServiceNetworkAclPrivateEndpointArrayOutput
ToServiceNetworkAclPrivateEndpointArrayOutputWithContext(context.Context) ServiceNetworkAclPrivateEndpointArrayOutput
}
type ServiceNetworkAclPrivateEndpointArray []ServiceNetworkAclPrivateEndpointInput
func (ServiceNetworkAclPrivateEndpointArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ServiceNetworkAclPrivateEndpoint)(nil)).Elem()
}
func (i ServiceNetworkAclPrivateEndpointArray) ToServiceNetworkAclPrivateEndpointArrayOutput() ServiceNetworkAclPrivateEndpointArrayOutput {
return i.ToServiceNetworkAclPrivateEndpointArrayOutputWithContext(context.Background())
}
func (i ServiceNetworkAclPrivateEndpointArray) ToServiceNetworkAclPrivateEndpointArrayOutputWithContext(ctx context.Context) ServiceNetworkAclPrivateEndpointArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceNetworkAclPrivateEndpointArrayOutput)
}
type ServiceNetworkAclPrivateEndpointOutput struct{ *pulumi.OutputState }
func (ServiceNetworkAclPrivateEndpointOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceNetworkAclPrivateEndpoint)(nil)).Elem()
}
func (o ServiceNetworkAclPrivateEndpointOutput) ToServiceNetworkAclPrivateEndpointOutput() ServiceNetworkAclPrivateEndpointOutput {
return o
}
func (o ServiceNetworkAclPrivateEndpointOutput) ToServiceNetworkAclPrivateEndpointOutputWithContext(ctx context.Context) ServiceNetworkAclPrivateEndpointOutput {
return o
}
// The allowed request types for the Private Endpoint Connection. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`.
//
// > **Note:** When `defaultAction` is `Allow`, `allowedRequestTypes`cannot be set.
func (o ServiceNetworkAclPrivateEndpointOutput) AllowedRequestTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v ServiceNetworkAclPrivateEndpoint) []string { return v.AllowedRequestTypes }).(pulumi.StringArrayOutput)
}
// The denied request types for the Private Endpoint Connection. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`.
//
// > **Note:** When `defaultAction` is `Deny`, `deniedRequestTypes`cannot be set.
//
// > **Note:** `allowedRequestTypes` - (Optional) and `deniedRequestTypes` cannot be set together.
func (o ServiceNetworkAclPrivateEndpointOutput) DeniedRequestTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v ServiceNetworkAclPrivateEndpoint) []string { return v.DeniedRequestTypes }).(pulumi.StringArrayOutput)
}
// The ID of the Private Endpoint which is based on the SignalR service.
func (o ServiceNetworkAclPrivateEndpointOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v ServiceNetworkAclPrivateEndpoint) string { return v.Id }).(pulumi.StringOutput)
}
type ServiceNetworkAclPrivateEndpointArrayOutput struct{ *pulumi.OutputState }
func (ServiceNetworkAclPrivateEndpointArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ServiceNetworkAclPrivateEndpoint)(nil)).Elem()
}
func (o ServiceNetworkAclPrivateEndpointArrayOutput) ToServiceNetworkAclPrivateEndpointArrayOutput() ServiceNetworkAclPrivateEndpointArrayOutput {
return o
}
func (o ServiceNetworkAclPrivateEndpointArrayOutput) ToServiceNetworkAclPrivateEndpointArrayOutputWithContext(ctx context.Context) ServiceNetworkAclPrivateEndpointArrayOutput {
return o
}
func (o ServiceNetworkAclPrivateEndpointArrayOutput) Index(i pulumi.IntInput) ServiceNetworkAclPrivateEndpointOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ServiceNetworkAclPrivateEndpoint {
return vs[0].([]ServiceNetworkAclPrivateEndpoint)[vs[1].(int)]
}).(ServiceNetworkAclPrivateEndpointOutput)
}
type ServiceNetworkAclPublicNetwork struct {
// The allowed request types for the public network. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`.
//
// > **Note:** When `defaultAction` is `Allow`, `allowedRequestTypes`cannot be set.
AllowedRequestTypes []string `pulumi:"allowedRequestTypes"`
// The denied request types for the public network. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`.
//
// > **Note:** When `defaultAction` is `Deny`, `deniedRequestTypes`cannot be set.
//
// > **Note:** `allowedRequestTypes` - (Optional) and `deniedRequestTypes` cannot be set together.
DeniedRequestTypes []string `pulumi:"deniedRequestTypes"`
}
// ServiceNetworkAclPublicNetworkInput is an input type that accepts ServiceNetworkAclPublicNetworkArgs and ServiceNetworkAclPublicNetworkOutput values.
// You can construct a concrete instance of `ServiceNetworkAclPublicNetworkInput` via:
//
// ServiceNetworkAclPublicNetworkArgs{...}
type ServiceNetworkAclPublicNetworkInput interface {
pulumi.Input
ToServiceNetworkAclPublicNetworkOutput() ServiceNetworkAclPublicNetworkOutput
ToServiceNetworkAclPublicNetworkOutputWithContext(context.Context) ServiceNetworkAclPublicNetworkOutput
}
type ServiceNetworkAclPublicNetworkArgs struct {
// The allowed request types for the public network. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`.
//
// > **Note:** When `defaultAction` is `Allow`, `allowedRequestTypes`cannot be set.
AllowedRequestTypes pulumi.StringArrayInput `pulumi:"allowedRequestTypes"`
// The denied request types for the public network. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`.
//
// > **Note:** When `defaultAction` is `Deny`, `deniedRequestTypes`cannot be set.
//
// > **Note:** `allowedRequestTypes` - (Optional) and `deniedRequestTypes` cannot be set together.
DeniedRequestTypes pulumi.StringArrayInput `pulumi:"deniedRequestTypes"`
}
func (ServiceNetworkAclPublicNetworkArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceNetworkAclPublicNetwork)(nil)).Elem()
}
func (i ServiceNetworkAclPublicNetworkArgs) ToServiceNetworkAclPublicNetworkOutput() ServiceNetworkAclPublicNetworkOutput {
return i.ToServiceNetworkAclPublicNetworkOutputWithContext(context.Background())
}
func (i ServiceNetworkAclPublicNetworkArgs) ToServiceNetworkAclPublicNetworkOutputWithContext(ctx context.Context) ServiceNetworkAclPublicNetworkOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceNetworkAclPublicNetworkOutput)
}
func (i ServiceNetworkAclPublicNetworkArgs) ToServiceNetworkAclPublicNetworkPtrOutput() ServiceNetworkAclPublicNetworkPtrOutput {
return i.ToServiceNetworkAclPublicNetworkPtrOutputWithContext(context.Background())
}
func (i ServiceNetworkAclPublicNetworkArgs) ToServiceNetworkAclPublicNetworkPtrOutputWithContext(ctx context.Context) ServiceNetworkAclPublicNetworkPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceNetworkAclPublicNetworkOutput).ToServiceNetworkAclPublicNetworkPtrOutputWithContext(ctx)
}
// ServiceNetworkAclPublicNetworkPtrInput is an input type that accepts ServiceNetworkAclPublicNetworkArgs, ServiceNetworkAclPublicNetworkPtr and ServiceNetworkAclPublicNetworkPtrOutput values.
// You can construct a concrete instance of `ServiceNetworkAclPublicNetworkPtrInput` via:
//
// ServiceNetworkAclPublicNetworkArgs{...}
//
// or:
//
// nil
type ServiceNetworkAclPublicNetworkPtrInput interface {
pulumi.Input
ToServiceNetworkAclPublicNetworkPtrOutput() ServiceNetworkAclPublicNetworkPtrOutput
ToServiceNetworkAclPublicNetworkPtrOutputWithContext(context.Context) ServiceNetworkAclPublicNetworkPtrOutput
}
type serviceNetworkAclPublicNetworkPtrType ServiceNetworkAclPublicNetworkArgs
func ServiceNetworkAclPublicNetworkPtr(v *ServiceNetworkAclPublicNetworkArgs) ServiceNetworkAclPublicNetworkPtrInput {
return (*serviceNetworkAclPublicNetworkPtrType)(v)
}
func (*serviceNetworkAclPublicNetworkPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceNetworkAclPublicNetwork)(nil)).Elem()
}
func (i *serviceNetworkAclPublicNetworkPtrType) ToServiceNetworkAclPublicNetworkPtrOutput() ServiceNetworkAclPublicNetworkPtrOutput {
return i.ToServiceNetworkAclPublicNetworkPtrOutputWithContext(context.Background())
}
func (i *serviceNetworkAclPublicNetworkPtrType) ToServiceNetworkAclPublicNetworkPtrOutputWithContext(ctx context.Context) ServiceNetworkAclPublicNetworkPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceNetworkAclPublicNetworkPtrOutput)
}
type ServiceNetworkAclPublicNetworkOutput struct{ *pulumi.OutputState }
func (ServiceNetworkAclPublicNetworkOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceNetworkAclPublicNetwork)(nil)).Elem()
}
func (o ServiceNetworkAclPublicNetworkOutput) ToServiceNetworkAclPublicNetworkOutput() ServiceNetworkAclPublicNetworkOutput {
return o
}
func (o ServiceNetworkAclPublicNetworkOutput) ToServiceNetworkAclPublicNetworkOutputWithContext(ctx context.Context) ServiceNetworkAclPublicNetworkOutput {
return o
}
func (o ServiceNetworkAclPublicNetworkOutput) ToServiceNetworkAclPublicNetworkPtrOutput() ServiceNetworkAclPublicNetworkPtrOutput {
return o.ToServiceNetworkAclPublicNetworkPtrOutputWithContext(context.Background())
}
func (o ServiceNetworkAclPublicNetworkOutput) ToServiceNetworkAclPublicNetworkPtrOutputWithContext(ctx context.Context) ServiceNetworkAclPublicNetworkPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ServiceNetworkAclPublicNetwork) *ServiceNetworkAclPublicNetwork {
return &v
}).(ServiceNetworkAclPublicNetworkPtrOutput)
}
// The allowed request types for the public network. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`.
//
// > **Note:** When `defaultAction` is `Allow`, `allowedRequestTypes`cannot be set.
func (o ServiceNetworkAclPublicNetworkOutput) AllowedRequestTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v ServiceNetworkAclPublicNetwork) []string { return v.AllowedRequestTypes }).(pulumi.StringArrayOutput)
}
// The denied request types for the public network. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`.
//
// > **Note:** When `defaultAction` is `Deny`, `deniedRequestTypes`cannot be set.
//
// > **Note:** `allowedRequestTypes` - (Optional) and `deniedRequestTypes` cannot be set together.
func (o ServiceNetworkAclPublicNetworkOutput) DeniedRequestTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v ServiceNetworkAclPublicNetwork) []string { return v.DeniedRequestTypes }).(pulumi.StringArrayOutput)
}
type ServiceNetworkAclPublicNetworkPtrOutput struct{ *pulumi.OutputState }
func (ServiceNetworkAclPublicNetworkPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceNetworkAclPublicNetwork)(nil)).Elem()
}
func (o ServiceNetworkAclPublicNetworkPtrOutput) ToServiceNetworkAclPublicNetworkPtrOutput() ServiceNetworkAclPublicNetworkPtrOutput {
return o
}
func (o ServiceNetworkAclPublicNetworkPtrOutput) ToServiceNetworkAclPublicNetworkPtrOutputWithContext(ctx context.Context) ServiceNetworkAclPublicNetworkPtrOutput {
return o
}
func (o ServiceNetworkAclPublicNetworkPtrOutput) Elem() ServiceNetworkAclPublicNetworkOutput {
return o.ApplyT(func(v *ServiceNetworkAclPublicNetwork) ServiceNetworkAclPublicNetwork {
if v != nil {
return *v
}
var ret ServiceNetworkAclPublicNetwork
return ret
}).(ServiceNetworkAclPublicNetworkOutput)
}
// The allowed request types for the public network. Possible values are `ClientConnection`, `ServerConnection`, `RESTAPI` and `Trace`.
//
// > **Note:** When `defaultAction` is `Allow`, `allowedRequestTypes`cannot be set.
func (o ServiceNetworkAclPublicNetworkPtrOutput) AllowedRequestTypes() 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/signalr/sharedPrivateLinkResource.go | sdk/go/azure/signalr/sharedPrivateLinkResource.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 signalr
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the Shared Private Link Resource for a Signalr service.
//
// ## 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/signalr"
// "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("terraform-signalr"),
// Location: pulumi.String("east us"),
// })
// 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("standard"),
// SoftDeleteRetentionDays: pulumi.Int(7),
// AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.String(current.ObjectId),
// CertificatePermissions: pulumi.StringArray{
// pulumi.String("ManageContacts"),
// },
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Create"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Set"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = signalr.NewService(ctx, "test", &signalr.ServiceArgs{
// Name: pulumi.String("tfex-signalr"),
// Location: pulumi.Any(testAzurermResourceGroup.Location),
// ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name),
// Sku: &signalr.ServiceSkuArgs{
// Name: pulumi.String("Standard_S1"),
// Capacity: pulumi.Int(1),
// },
// })
// if err != nil {
// return err
// }
// _, err = signalr.NewSharedPrivateLinkResource(ctx, "example", &signalr.SharedPrivateLinkResourceArgs{
// Name: pulumi.String("tfex-signalr-splr"),
// SignalrServiceId: pulumi.Any(exampleAzurermSignalrService.Id),
// SubResourceName: pulumi.String("vault"),
// TargetResourceId: exampleKeyVault.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.SignalRService` - 2024-03-01
//
// ## Import
//
// Signalr Shared Private Link Resource can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:signalr/sharedPrivateLinkResource:SharedPrivateLinkResource example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SignalRService/signalR/signalr1/sharedPrivateLinkResources/resource1
// ```
type SharedPrivateLinkResource struct {
pulumi.CustomResourceState
// The name of the Signalr Shared Private Link Resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The request message for requesting approval of the Shared Private Link Enabled Remote Resource.
RequestMessage pulumi.StringPtrOutput `pulumi:"requestMessage"`
// The id of the Signalr Service. Changing this forces a new resource to be created.
SignalrServiceId pulumi.StringOutput `pulumi:"signalrServiceId"`
// The status of a private endpoint connection. Possible values are `Pending`, `Approved`, `Rejected` or `Disconnected`.
Status pulumi.StringOutput `pulumi:"status"`
// The sub resource name which the Signalr Private Endpoint can connect to. Possible values are `sites`, `vault`. Changing this forces a new resource to be created.
SubResourceName pulumi.StringOutput `pulumi:"subResourceName"`
// The ID of the Shared Private Link Enabled Remote Resource which this Signalr Private Endpoint should be connected to. Changing this forces a new resource to be created.
//
// > **Note:** The `subResourceName` should match with the type of the `targetResourceId` that's being specified.
TargetResourceId pulumi.StringOutput `pulumi:"targetResourceId"`
}
// NewSharedPrivateLinkResource registers a new resource with the given unique name, arguments, and options.
func NewSharedPrivateLinkResource(ctx *pulumi.Context,
name string, args *SharedPrivateLinkResourceArgs, opts ...pulumi.ResourceOption) (*SharedPrivateLinkResource, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.SignalrServiceId == nil {
return nil, errors.New("invalid value for required argument 'SignalrServiceId'")
}
if args.SubResourceName == nil {
return nil, errors.New("invalid value for required argument 'SubResourceName'")
}
if args.TargetResourceId == nil {
return nil, errors.New("invalid value for required argument 'TargetResourceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SharedPrivateLinkResource
err := ctx.RegisterResource("azure:signalr/sharedPrivateLinkResource:SharedPrivateLinkResource", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSharedPrivateLinkResource gets an existing SharedPrivateLinkResource 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 GetSharedPrivateLinkResource(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SharedPrivateLinkResourceState, opts ...pulumi.ResourceOption) (*SharedPrivateLinkResource, error) {
var resource SharedPrivateLinkResource
err := ctx.ReadResource("azure:signalr/sharedPrivateLinkResource:SharedPrivateLinkResource", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SharedPrivateLinkResource resources.
type sharedPrivateLinkResourceState struct {
// The name of the Signalr Shared Private Link Resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The request message for requesting approval of the Shared Private Link Enabled Remote Resource.
RequestMessage *string `pulumi:"requestMessage"`
// The id of the Signalr Service. Changing this forces a new resource to be created.
SignalrServiceId *string `pulumi:"signalrServiceId"`
// The status of a private endpoint connection. Possible values are `Pending`, `Approved`, `Rejected` or `Disconnected`.
Status *string `pulumi:"status"`
// The sub resource name which the Signalr Private Endpoint can connect to. Possible values are `sites`, `vault`. Changing this forces a new resource to be created.
SubResourceName *string `pulumi:"subResourceName"`
// The ID of the Shared Private Link Enabled Remote Resource which this Signalr Private Endpoint should be connected to. Changing this forces a new resource to be created.
//
// > **Note:** The `subResourceName` should match with the type of the `targetResourceId` that's being specified.
TargetResourceId *string `pulumi:"targetResourceId"`
}
type SharedPrivateLinkResourceState struct {
// The name of the Signalr Shared Private Link Resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The request message for requesting approval of the Shared Private Link Enabled Remote Resource.
RequestMessage pulumi.StringPtrInput
// The id of the Signalr Service. Changing this forces a new resource to be created.
SignalrServiceId pulumi.StringPtrInput
// The status of a private endpoint connection. Possible values are `Pending`, `Approved`, `Rejected` or `Disconnected`.
Status pulumi.StringPtrInput
// The sub resource name which the Signalr Private Endpoint can connect to. Possible values are `sites`, `vault`. Changing this forces a new resource to be created.
SubResourceName pulumi.StringPtrInput
// The ID of the Shared Private Link Enabled Remote Resource which this Signalr Private Endpoint should be connected to. Changing this forces a new resource to be created.
//
// > **Note:** The `subResourceName` should match with the type of the `targetResourceId` that's being specified.
TargetResourceId pulumi.StringPtrInput
}
func (SharedPrivateLinkResourceState) ElementType() reflect.Type {
return reflect.TypeOf((*sharedPrivateLinkResourceState)(nil)).Elem()
}
type sharedPrivateLinkResourceArgs struct {
// The name of the Signalr Shared Private Link Resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The request message for requesting approval of the Shared Private Link Enabled Remote Resource.
RequestMessage *string `pulumi:"requestMessage"`
// The id of the Signalr Service. Changing this forces a new resource to be created.
SignalrServiceId string `pulumi:"signalrServiceId"`
// The sub resource name which the Signalr Private Endpoint can connect to. Possible values are `sites`, `vault`. Changing this forces a new resource to be created.
SubResourceName string `pulumi:"subResourceName"`
// The ID of the Shared Private Link Enabled Remote Resource which this Signalr Private Endpoint should be connected to. Changing this forces a new resource to be created.
//
// > **Note:** The `subResourceName` should match with the type of the `targetResourceId` that's being specified.
TargetResourceId string `pulumi:"targetResourceId"`
}
// The set of arguments for constructing a SharedPrivateLinkResource resource.
type SharedPrivateLinkResourceArgs struct {
// The name of the Signalr Shared Private Link Resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The request message for requesting approval of the Shared Private Link Enabled Remote Resource.
RequestMessage pulumi.StringPtrInput
// The id of the Signalr Service. Changing this forces a new resource to be created.
SignalrServiceId pulumi.StringInput
// The sub resource name which the Signalr Private Endpoint can connect to. Possible values are `sites`, `vault`. Changing this forces a new resource to be created.
SubResourceName pulumi.StringInput
// The ID of the Shared Private Link Enabled Remote Resource which this Signalr Private Endpoint should be connected to. Changing this forces a new resource to be created.
//
// > **Note:** The `subResourceName` should match with the type of the `targetResourceId` that's being specified.
TargetResourceId pulumi.StringInput
}
func (SharedPrivateLinkResourceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*sharedPrivateLinkResourceArgs)(nil)).Elem()
}
type SharedPrivateLinkResourceInput interface {
pulumi.Input
ToSharedPrivateLinkResourceOutput() SharedPrivateLinkResourceOutput
ToSharedPrivateLinkResourceOutputWithContext(ctx context.Context) SharedPrivateLinkResourceOutput
}
func (*SharedPrivateLinkResource) ElementType() reflect.Type {
return reflect.TypeOf((**SharedPrivateLinkResource)(nil)).Elem()
}
func (i *SharedPrivateLinkResource) ToSharedPrivateLinkResourceOutput() SharedPrivateLinkResourceOutput {
return i.ToSharedPrivateLinkResourceOutputWithContext(context.Background())
}
func (i *SharedPrivateLinkResource) ToSharedPrivateLinkResourceOutputWithContext(ctx context.Context) SharedPrivateLinkResourceOutput {
return pulumi.ToOutputWithContext(ctx, i).(SharedPrivateLinkResourceOutput)
}
// SharedPrivateLinkResourceArrayInput is an input type that accepts SharedPrivateLinkResourceArray and SharedPrivateLinkResourceArrayOutput values.
// You can construct a concrete instance of `SharedPrivateLinkResourceArrayInput` via:
//
// SharedPrivateLinkResourceArray{ SharedPrivateLinkResourceArgs{...} }
type SharedPrivateLinkResourceArrayInput interface {
pulumi.Input
ToSharedPrivateLinkResourceArrayOutput() SharedPrivateLinkResourceArrayOutput
ToSharedPrivateLinkResourceArrayOutputWithContext(context.Context) SharedPrivateLinkResourceArrayOutput
}
type SharedPrivateLinkResourceArray []SharedPrivateLinkResourceInput
func (SharedPrivateLinkResourceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SharedPrivateLinkResource)(nil)).Elem()
}
func (i SharedPrivateLinkResourceArray) ToSharedPrivateLinkResourceArrayOutput() SharedPrivateLinkResourceArrayOutput {
return i.ToSharedPrivateLinkResourceArrayOutputWithContext(context.Background())
}
func (i SharedPrivateLinkResourceArray) ToSharedPrivateLinkResourceArrayOutputWithContext(ctx context.Context) SharedPrivateLinkResourceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SharedPrivateLinkResourceArrayOutput)
}
// SharedPrivateLinkResourceMapInput is an input type that accepts SharedPrivateLinkResourceMap and SharedPrivateLinkResourceMapOutput values.
// You can construct a concrete instance of `SharedPrivateLinkResourceMapInput` via:
//
// SharedPrivateLinkResourceMap{ "key": SharedPrivateLinkResourceArgs{...} }
type SharedPrivateLinkResourceMapInput interface {
pulumi.Input
ToSharedPrivateLinkResourceMapOutput() SharedPrivateLinkResourceMapOutput
ToSharedPrivateLinkResourceMapOutputWithContext(context.Context) SharedPrivateLinkResourceMapOutput
}
type SharedPrivateLinkResourceMap map[string]SharedPrivateLinkResourceInput
func (SharedPrivateLinkResourceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SharedPrivateLinkResource)(nil)).Elem()
}
func (i SharedPrivateLinkResourceMap) ToSharedPrivateLinkResourceMapOutput() SharedPrivateLinkResourceMapOutput {
return i.ToSharedPrivateLinkResourceMapOutputWithContext(context.Background())
}
func (i SharedPrivateLinkResourceMap) ToSharedPrivateLinkResourceMapOutputWithContext(ctx context.Context) SharedPrivateLinkResourceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SharedPrivateLinkResourceMapOutput)
}
type SharedPrivateLinkResourceOutput struct{ *pulumi.OutputState }
func (SharedPrivateLinkResourceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SharedPrivateLinkResource)(nil)).Elem()
}
func (o SharedPrivateLinkResourceOutput) ToSharedPrivateLinkResourceOutput() SharedPrivateLinkResourceOutput {
return o
}
func (o SharedPrivateLinkResourceOutput) ToSharedPrivateLinkResourceOutputWithContext(ctx context.Context) SharedPrivateLinkResourceOutput {
return o
}
// The name of the Signalr Shared Private Link Resource. Changing this forces a new resource to be created.
func (o SharedPrivateLinkResourceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SharedPrivateLinkResource) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The request message for requesting approval of the Shared Private Link Enabled Remote Resource.
func (o SharedPrivateLinkResourceOutput) RequestMessage() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SharedPrivateLinkResource) pulumi.StringPtrOutput { return v.RequestMessage }).(pulumi.StringPtrOutput)
}
// The id of the Signalr Service. Changing this forces a new resource to be created.
func (o SharedPrivateLinkResourceOutput) SignalrServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *SharedPrivateLinkResource) pulumi.StringOutput { return v.SignalrServiceId }).(pulumi.StringOutput)
}
// The status of a private endpoint connection. Possible values are `Pending`, `Approved`, `Rejected` or `Disconnected`.
func (o SharedPrivateLinkResourceOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *SharedPrivateLinkResource) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// The sub resource name which the Signalr Private Endpoint can connect to. Possible values are `sites`, `vault`. Changing this forces a new resource to be created.
func (o SharedPrivateLinkResourceOutput) SubResourceName() pulumi.StringOutput {
return o.ApplyT(func(v *SharedPrivateLinkResource) pulumi.StringOutput { return v.SubResourceName }).(pulumi.StringOutput)
}
// The ID of the Shared Private Link Enabled Remote Resource which this Signalr Private Endpoint should be connected to. Changing this forces a new resource to be created.
//
// > **Note:** The `subResourceName` should match with the type of the `targetResourceId` that's being specified.
func (o SharedPrivateLinkResourceOutput) TargetResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *SharedPrivateLinkResource) pulumi.StringOutput { return v.TargetResourceId }).(pulumi.StringOutput)
}
type SharedPrivateLinkResourceArrayOutput struct{ *pulumi.OutputState }
func (SharedPrivateLinkResourceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SharedPrivateLinkResource)(nil)).Elem()
}
func (o SharedPrivateLinkResourceArrayOutput) ToSharedPrivateLinkResourceArrayOutput() SharedPrivateLinkResourceArrayOutput {
return o
}
func (o SharedPrivateLinkResourceArrayOutput) ToSharedPrivateLinkResourceArrayOutputWithContext(ctx context.Context) SharedPrivateLinkResourceArrayOutput {
return o
}
func (o SharedPrivateLinkResourceArrayOutput) Index(i pulumi.IntInput) SharedPrivateLinkResourceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SharedPrivateLinkResource {
return vs[0].([]*SharedPrivateLinkResource)[vs[1].(int)]
}).(SharedPrivateLinkResourceOutput)
}
type SharedPrivateLinkResourceMapOutput struct{ *pulumi.OutputState }
func (SharedPrivateLinkResourceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SharedPrivateLinkResource)(nil)).Elem()
}
func (o SharedPrivateLinkResourceMapOutput) ToSharedPrivateLinkResourceMapOutput() SharedPrivateLinkResourceMapOutput {
return o
}
func (o SharedPrivateLinkResourceMapOutput) ToSharedPrivateLinkResourceMapOutputWithContext(ctx context.Context) SharedPrivateLinkResourceMapOutput {
return o
}
func (o SharedPrivateLinkResourceMapOutput) MapIndex(k pulumi.StringInput) SharedPrivateLinkResourceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SharedPrivateLinkResource {
return vs[0].(map[string]*SharedPrivateLinkResource)[vs[1].(string)]
}).(SharedPrivateLinkResourceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SharedPrivateLinkResourceInput)(nil)).Elem(), &SharedPrivateLinkResource{})
pulumi.RegisterInputType(reflect.TypeOf((*SharedPrivateLinkResourceArrayInput)(nil)).Elem(), SharedPrivateLinkResourceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SharedPrivateLinkResourceMapInput)(nil)).Elem(), SharedPrivateLinkResourceMap{})
pulumi.RegisterOutputType(SharedPrivateLinkResourceOutput{})
pulumi.RegisterOutputType(SharedPrivateLinkResourceArrayOutput{})
pulumi.RegisterOutputType(SharedPrivateLinkResourceMapOutput{})
}
| 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/signalr/service.go | sdk/go/azure/signalr/service.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package signalr
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 SignalR service.
//
// ## 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/signalr"
// "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("my-signalr"),
// Location: pulumi.String("West US"),
// })
// if err != nil {
// return err
// }
// _, err = signalr.NewService(ctx, "example", &signalr.ServiceArgs{
// Name: pulumi.String("tfex-signalr"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: &signalr.ServiceSkuArgs{
// Name: pulumi.String("Free_F1"),
// Capacity: pulumi.Int(1),
// },
// Cors: signalr.ServiceCorArray{
// &signalr.ServiceCorArgs{
// AllowedOrigins: pulumi.StringArray{
// pulumi.String("http://www.example.com"),
// },
// },
// },
// PublicNetworkAccessEnabled: pulumi.Bool(false),
// ConnectivityLogsEnabled: pulumi.Bool(true),
// MessagingLogsEnabled: pulumi.Bool(true),
// ServiceMode: pulumi.String("Default"),
// UpstreamEndpoints: signalr.ServiceUpstreamEndpointArray{
// &signalr.ServiceUpstreamEndpointArgs{
// CategoryPatterns: pulumi.StringArray{
// pulumi.String("connections"),
// pulumi.String("messages"),
// },
// EventPatterns: pulumi.StringArray{
// pulumi.String("*"),
// },
// HubPatterns: pulumi.StringArray{
// pulumi.String("hub1"),
// },
// UrlTemplate: pulumi.String("http://foo.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.SignalRService` - 2024-03-01
//
// ## Import
//
// SignalR services can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:signalr/service:Service example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/terraform-signalr/providers/Microsoft.SignalRService/signalR/tfex-signalr
// ```
type Service struct {
pulumi.CustomResourceState
// Whether to enable AAD auth? Defaults to `true`.
AadAuthEnabled pulumi.BoolPtrOutput `pulumi:"aadAuthEnabled"`
// Specifies if Connectivity Logs are enabled or not. Defaults to `false`.
ConnectivityLogsEnabled pulumi.BoolPtrOutput `pulumi:"connectivityLogsEnabled"`
// A `cors` block as documented below.
Cors ServiceCorArrayOutput `pulumi:"cors"`
// The FQDN of the SignalR service.
Hostname pulumi.StringOutput `pulumi:"hostname"`
// Specifies if Http Request Logs are enabled or not. Defaults to `false`.
HttpRequestLogsEnabled pulumi.BoolPtrOutput `pulumi:"httpRequestLogsEnabled"`
// An `identity` block as defined below.
Identity ServiceIdentityPtrOutput `pulumi:"identity"`
// The publicly accessible IP of the SignalR service.
IpAddress pulumi.StringOutput `pulumi:"ipAddress"`
// A `liveTrace` block as defined below.
LiveTrace ServiceLiveTracePtrOutput `pulumi:"liveTrace"`
// Deprecated: `liveTraceEnabled` has been deprecated in favor of `liveTrace` and will be removed in 4.0.
LiveTraceEnabled pulumi.BoolPtrOutput `pulumi:"liveTraceEnabled"`
// Whether to enable local auth? Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrOutput `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the SignalR service exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies if Messaging Logs are enabled or not. Defaults to `false`.
MessagingLogsEnabled pulumi.BoolPtrOutput `pulumi:"messagingLogsEnabled"`
// The name of the SignalR service. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The primary access key for the SignalR service.
PrimaryAccessKey pulumi.StringOutput `pulumi:"primaryAccessKey"`
// The primary connection string for the SignalR service.
PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"`
// Whether to enable public network access? Defaults to `true`.
//
// > **Note:** `publicNetworkAccessEnabled` cannot be set to `false` in `Free` sku tier.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The publicly accessible port of the SignalR service which is designed for browser/client use.
PublicPort pulumi.IntOutput `pulumi:"publicPort"`
// The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The secondary access key for the SignalR service.
SecondaryAccessKey pulumi.StringOutput `pulumi:"secondaryAccessKey"`
// The secondary connection string for the SignalR service.
SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"`
// The publicly accessible port of the SignalR service which is designed for customer server side use.
ServerPort pulumi.IntOutput `pulumi:"serverPort"`
// Specifies the client connection timeout. Defaults to `30`.
ServerlessConnectionTimeoutInSeconds pulumi.IntPtrOutput `pulumi:"serverlessConnectionTimeoutInSeconds"`
// Specifies the service mode. Possible values are `Classic`, `Default` and `Serverless`. Defaults to `Default`.
ServiceMode pulumi.StringPtrOutput `pulumi:"serviceMode"`
// A `sku` block as documented below.
Sku ServiceSkuOutput `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Whether to request client certificate during TLS handshake? Defaults to `false`.
//
// > **Note:** `tlsClientCertEnabled` cannot be set to `true` in `Free` sku tier.
TlsClientCertEnabled pulumi.BoolPtrOutput `pulumi:"tlsClientCertEnabled"`
// An `upstreamEndpoint` block as documented below. Using this block requires the SignalR service to be Serverless. When creating multiple blocks they will be processed in the order they are defined in.
UpstreamEndpoints ServiceUpstreamEndpointArrayOutput `pulumi:"upstreamEndpoints"`
}
// NewService registers a new resource with the given unique name, arguments, and options.
func NewService(ctx *pulumi.Context,
name string, args *ServiceArgs, opts ...pulumi.ResourceOption) (*Service, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Sku == nil {
return nil, errors.New("invalid value for required argument 'Sku'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryAccessKey",
"primaryConnectionString",
"secondaryAccessKey",
"secondaryConnectionString",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Service
err := ctx.RegisterResource("azure:signalr/service:Service", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetService gets an existing Service resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetService(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServiceState, opts ...pulumi.ResourceOption) (*Service, error) {
var resource Service
err := ctx.ReadResource("azure:signalr/service:Service", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Service resources.
type serviceState struct {
// Whether to enable AAD auth? Defaults to `true`.
AadAuthEnabled *bool `pulumi:"aadAuthEnabled"`
// Specifies if Connectivity Logs are enabled or not. Defaults to `false`.
ConnectivityLogsEnabled *bool `pulumi:"connectivityLogsEnabled"`
// A `cors` block as documented below.
Cors []ServiceCor `pulumi:"cors"`
// The FQDN of the SignalR service.
Hostname *string `pulumi:"hostname"`
// Specifies if Http Request Logs are enabled or not. Defaults to `false`.
HttpRequestLogsEnabled *bool `pulumi:"httpRequestLogsEnabled"`
// An `identity` block as defined below.
Identity *ServiceIdentity `pulumi:"identity"`
// The publicly accessible IP of the SignalR service.
IpAddress *string `pulumi:"ipAddress"`
// A `liveTrace` block as defined below.
LiveTrace *ServiceLiveTrace `pulumi:"liveTrace"`
// Deprecated: `liveTraceEnabled` has been deprecated in favor of `liveTrace` and will be removed in 4.0.
LiveTraceEnabled *bool `pulumi:"liveTraceEnabled"`
// Whether to enable local auth? Defaults to `true`.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the SignalR service exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies if Messaging Logs are enabled or not. Defaults to `false`.
MessagingLogsEnabled *bool `pulumi:"messagingLogsEnabled"`
// The name of the SignalR service. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The primary access key for the SignalR service.
PrimaryAccessKey *string `pulumi:"primaryAccessKey"`
// The primary connection string for the SignalR service.
PrimaryConnectionString *string `pulumi:"primaryConnectionString"`
// Whether to enable public network access? Defaults to `true`.
//
// > **Note:** `publicNetworkAccessEnabled` cannot be set to `false` in `Free` sku tier.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The publicly accessible port of the SignalR service which is designed for browser/client use.
PublicPort *int `pulumi:"publicPort"`
// The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The secondary access key for the SignalR service.
SecondaryAccessKey *string `pulumi:"secondaryAccessKey"`
// The secondary connection string for the SignalR service.
SecondaryConnectionString *string `pulumi:"secondaryConnectionString"`
// The publicly accessible port of the SignalR service which is designed for customer server side use.
ServerPort *int `pulumi:"serverPort"`
// Specifies the client connection timeout. Defaults to `30`.
ServerlessConnectionTimeoutInSeconds *int `pulumi:"serverlessConnectionTimeoutInSeconds"`
// Specifies the service mode. Possible values are `Classic`, `Default` and `Serverless`. Defaults to `Default`.
ServiceMode *string `pulumi:"serviceMode"`
// A `sku` block as documented below.
Sku *ServiceSku `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// Whether to request client certificate during TLS handshake? Defaults to `false`.
//
// > **Note:** `tlsClientCertEnabled` cannot be set to `true` in `Free` sku tier.
TlsClientCertEnabled *bool `pulumi:"tlsClientCertEnabled"`
// An `upstreamEndpoint` block as documented below. Using this block requires the SignalR service to be Serverless. When creating multiple blocks they will be processed in the order they are defined in.
UpstreamEndpoints []ServiceUpstreamEndpoint `pulumi:"upstreamEndpoints"`
}
type ServiceState struct {
// Whether to enable AAD auth? Defaults to `true`.
AadAuthEnabled pulumi.BoolPtrInput
// Specifies if Connectivity Logs are enabled or not. Defaults to `false`.
ConnectivityLogsEnabled pulumi.BoolPtrInput
// A `cors` block as documented below.
Cors ServiceCorArrayInput
// The FQDN of the SignalR service.
Hostname pulumi.StringPtrInput
// Specifies if Http Request Logs are enabled or not. Defaults to `false`.
HttpRequestLogsEnabled pulumi.BoolPtrInput
// An `identity` block as defined below.
Identity ServiceIdentityPtrInput
// The publicly accessible IP of the SignalR service.
IpAddress pulumi.StringPtrInput
// A `liveTrace` block as defined below.
LiveTrace ServiceLiveTracePtrInput
// Deprecated: `liveTraceEnabled` has been deprecated in favor of `liveTrace` and will be removed in 4.0.
LiveTraceEnabled pulumi.BoolPtrInput
// Whether to enable local auth? Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the SignalR service exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies if Messaging Logs are enabled or not. Defaults to `false`.
MessagingLogsEnabled pulumi.BoolPtrInput
// The name of the SignalR service. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The primary access key for the SignalR service.
PrimaryAccessKey pulumi.StringPtrInput
// The primary connection string for the SignalR service.
PrimaryConnectionString pulumi.StringPtrInput
// Whether to enable public network access? Defaults to `true`.
//
// > **Note:** `publicNetworkAccessEnabled` cannot be set to `false` in `Free` sku tier.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The publicly accessible port of the SignalR service which is designed for browser/client use.
PublicPort pulumi.IntPtrInput
// The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The secondary access key for the SignalR service.
SecondaryAccessKey pulumi.StringPtrInput
// The secondary connection string for the SignalR service.
SecondaryConnectionString pulumi.StringPtrInput
// The publicly accessible port of the SignalR service which is designed for customer server side use.
ServerPort pulumi.IntPtrInput
// Specifies the client connection timeout. Defaults to `30`.
ServerlessConnectionTimeoutInSeconds pulumi.IntPtrInput
// Specifies the service mode. Possible values are `Classic`, `Default` and `Serverless`. Defaults to `Default`.
ServiceMode pulumi.StringPtrInput
// A `sku` block as documented below.
Sku ServiceSkuPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// Whether to request client certificate during TLS handshake? Defaults to `false`.
//
// > **Note:** `tlsClientCertEnabled` cannot be set to `true` in `Free` sku tier.
TlsClientCertEnabled pulumi.BoolPtrInput
// An `upstreamEndpoint` block as documented below. Using this block requires the SignalR service to be Serverless. When creating multiple blocks they will be processed in the order they are defined in.
UpstreamEndpoints ServiceUpstreamEndpointArrayInput
}
func (ServiceState) ElementType() reflect.Type {
return reflect.TypeOf((*serviceState)(nil)).Elem()
}
type serviceArgs struct {
// Whether to enable AAD auth? Defaults to `true`.
AadAuthEnabled *bool `pulumi:"aadAuthEnabled"`
// Specifies if Connectivity Logs are enabled or not. Defaults to `false`.
ConnectivityLogsEnabled *bool `pulumi:"connectivityLogsEnabled"`
// A `cors` block as documented below.
Cors []ServiceCor `pulumi:"cors"`
// Specifies if Http Request Logs are enabled or not. Defaults to `false`.
HttpRequestLogsEnabled *bool `pulumi:"httpRequestLogsEnabled"`
// An `identity` block as defined below.
Identity *ServiceIdentity `pulumi:"identity"`
// A `liveTrace` block as defined below.
LiveTrace *ServiceLiveTrace `pulumi:"liveTrace"`
// Deprecated: `liveTraceEnabled` has been deprecated in favor of `liveTrace` and will be removed in 4.0.
LiveTraceEnabled *bool `pulumi:"liveTraceEnabled"`
// Whether to enable local auth? Defaults to `true`.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the SignalR service exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies if Messaging Logs are enabled or not. Defaults to `false`.
MessagingLogsEnabled *bool `pulumi:"messagingLogsEnabled"`
// The name of the SignalR service. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether to enable public network access? Defaults to `true`.
//
// > **Note:** `publicNetworkAccessEnabled` cannot be set to `false` in `Free` sku tier.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the client connection timeout. Defaults to `30`.
ServerlessConnectionTimeoutInSeconds *int `pulumi:"serverlessConnectionTimeoutInSeconds"`
// Specifies the service mode. Possible values are `Classic`, `Default` and `Serverless`. Defaults to `Default`.
ServiceMode *string `pulumi:"serviceMode"`
// A `sku` block as documented below.
Sku ServiceSku `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// Whether to request client certificate during TLS handshake? Defaults to `false`.
//
// > **Note:** `tlsClientCertEnabled` cannot be set to `true` in `Free` sku tier.
TlsClientCertEnabled *bool `pulumi:"tlsClientCertEnabled"`
// An `upstreamEndpoint` block as documented below. Using this block requires the SignalR service to be Serverless. When creating multiple blocks they will be processed in the order they are defined in.
UpstreamEndpoints []ServiceUpstreamEndpoint `pulumi:"upstreamEndpoints"`
}
// The set of arguments for constructing a Service resource.
type ServiceArgs struct {
// Whether to enable AAD auth? Defaults to `true`.
AadAuthEnabled pulumi.BoolPtrInput
// Specifies if Connectivity Logs are enabled or not. Defaults to `false`.
ConnectivityLogsEnabled pulumi.BoolPtrInput
// A `cors` block as documented below.
Cors ServiceCorArrayInput
// Specifies if Http Request Logs are enabled or not. Defaults to `false`.
HttpRequestLogsEnabled pulumi.BoolPtrInput
// An `identity` block as defined below.
Identity ServiceIdentityPtrInput
// A `liveTrace` block as defined below.
LiveTrace ServiceLiveTracePtrInput
// Deprecated: `liveTraceEnabled` has been deprecated in favor of `liveTrace` and will be removed in 4.0.
LiveTraceEnabled pulumi.BoolPtrInput
// Whether to enable local auth? Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the SignalR service exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies if Messaging Logs are enabled or not. Defaults to `false`.
MessagingLogsEnabled pulumi.BoolPtrInput
// The name of the SignalR service. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether to enable public network access? Defaults to `true`.
//
// > **Note:** `publicNetworkAccessEnabled` cannot be set to `false` in `Free` sku tier.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Specifies the client connection timeout. Defaults to `30`.
ServerlessConnectionTimeoutInSeconds pulumi.IntPtrInput
// Specifies the service mode. Possible values are `Classic`, `Default` and `Serverless`. Defaults to `Default`.
ServiceMode pulumi.StringPtrInput
// A `sku` block as documented below.
Sku ServiceSkuInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// Whether to request client certificate during TLS handshake? Defaults to `false`.
//
// > **Note:** `tlsClientCertEnabled` cannot be set to `true` in `Free` sku tier.
TlsClientCertEnabled pulumi.BoolPtrInput
// An `upstreamEndpoint` block as documented below. Using this block requires the SignalR service to be Serverless. When creating multiple blocks they will be processed in the order they are defined in.
UpstreamEndpoints ServiceUpstreamEndpointArrayInput
}
func (ServiceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serviceArgs)(nil)).Elem()
}
type ServiceInput interface {
pulumi.Input
ToServiceOutput() ServiceOutput
ToServiceOutputWithContext(ctx context.Context) ServiceOutput
}
func (*Service) ElementType() reflect.Type {
return reflect.TypeOf((**Service)(nil)).Elem()
}
func (i *Service) ToServiceOutput() ServiceOutput {
return i.ToServiceOutputWithContext(context.Background())
}
func (i *Service) ToServiceOutputWithContext(ctx context.Context) ServiceOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceOutput)
}
// ServiceArrayInput is an input type that accepts ServiceArray and ServiceArrayOutput values.
// You can construct a concrete instance of `ServiceArrayInput` via:
//
// ServiceArray{ ServiceArgs{...} }
type ServiceArrayInput interface {
pulumi.Input
ToServiceArrayOutput() ServiceArrayOutput
ToServiceArrayOutputWithContext(context.Context) ServiceArrayOutput
}
type ServiceArray []ServiceInput
func (ServiceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Service)(nil)).Elem()
}
func (i ServiceArray) ToServiceArrayOutput() ServiceArrayOutput {
return i.ToServiceArrayOutputWithContext(context.Background())
}
func (i ServiceArray) ToServiceArrayOutputWithContext(ctx context.Context) ServiceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceArrayOutput)
}
// ServiceMapInput is an input type that accepts ServiceMap and ServiceMapOutput values.
// You can construct a concrete instance of `ServiceMapInput` via:
//
// ServiceMap{ "key": ServiceArgs{...} }
type ServiceMapInput interface {
pulumi.Input
ToServiceMapOutput() ServiceMapOutput
ToServiceMapOutputWithContext(context.Context) ServiceMapOutput
}
type ServiceMap map[string]ServiceInput
func (ServiceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Service)(nil)).Elem()
}
func (i ServiceMap) ToServiceMapOutput() ServiceMapOutput {
return i.ToServiceMapOutputWithContext(context.Background())
}
func (i ServiceMap) ToServiceMapOutputWithContext(ctx context.Context) ServiceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceMapOutput)
}
type ServiceOutput struct{ *pulumi.OutputState }
func (ServiceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Service)(nil)).Elem()
}
func (o ServiceOutput) ToServiceOutput() ServiceOutput {
return o
}
func (o ServiceOutput) ToServiceOutputWithContext(ctx context.Context) ServiceOutput {
return o
}
// Whether to enable AAD auth? Defaults to `true`.
func (o ServiceOutput) AadAuthEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.AadAuthEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies if Connectivity Logs are enabled or not. Defaults to `false`.
func (o ServiceOutput) ConnectivityLogsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.ConnectivityLogsEnabled }).(pulumi.BoolPtrOutput)
}
// A `cors` block as documented below.
func (o ServiceOutput) Cors() ServiceCorArrayOutput {
return o.ApplyT(func(v *Service) ServiceCorArrayOutput { return v.Cors }).(ServiceCorArrayOutput)
}
// The FQDN of the SignalR service.
func (o ServiceOutput) Hostname() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.Hostname }).(pulumi.StringOutput)
}
// Specifies if Http Request Logs are enabled or not. Defaults to `false`.
func (o ServiceOutput) HttpRequestLogsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.HttpRequestLogsEnabled }).(pulumi.BoolPtrOutput)
}
// An `identity` block as defined below.
func (o ServiceOutput) Identity() ServiceIdentityPtrOutput {
return o.ApplyT(func(v *Service) ServiceIdentityPtrOutput { return v.Identity }).(ServiceIdentityPtrOutput)
}
// The publicly accessible IP of the SignalR service.
func (o ServiceOutput) IpAddress() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.IpAddress }).(pulumi.StringOutput)
}
// A `liveTrace` block as defined below.
func (o ServiceOutput) LiveTrace() ServiceLiveTracePtrOutput {
return o.ApplyT(func(v *Service) ServiceLiveTracePtrOutput { return v.LiveTrace }).(ServiceLiveTracePtrOutput)
}
// Deprecated: `liveTraceEnabled` has been deprecated in favor of `liveTrace` and will be removed in 4.0.
func (o ServiceOutput) LiveTraceEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.LiveTraceEnabled }).(pulumi.BoolPtrOutput)
}
// Whether to enable local auth? Defaults to `true`.
func (o ServiceOutput) LocalAuthEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.LocalAuthEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the supported Azure location where the SignalR service exists. Changing this forces a new resource to be created.
func (o ServiceOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies if Messaging Logs are enabled or not. Defaults to `false`.
func (o ServiceOutput) MessagingLogsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.MessagingLogsEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the SignalR service. Changing this forces a new resource to be created.
func (o ServiceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The primary access key for the SignalR service.
func (o ServiceOutput) PrimaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.PrimaryAccessKey }).(pulumi.StringOutput)
}
// The primary connection string for the SignalR service.
func (o ServiceOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// Whether to enable public network access? Defaults to `true`.
//
// > **Note:** `publicNetworkAccessEnabled` cannot be set to `false` in `Free` sku tier.
func (o ServiceOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The publicly accessible port of the SignalR service which is designed for browser/client use.
func (o ServiceOutput) PublicPort() pulumi.IntOutput {
return o.ApplyT(func(v *Service) pulumi.IntOutput { return v.PublicPort }).(pulumi.IntOutput)
}
// The name of the resource group in which to create the SignalR service. Changing this forces a new resource to be created.
func (o ServiceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The secondary access key for the SignalR service.
func (o ServiceOutput) SecondaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.SecondaryAccessKey }).(pulumi.StringOutput)
}
// The secondary connection string for the SignalR service.
func (o ServiceOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *Service) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The publicly accessible port of the SignalR service which is designed for customer server side use.
func (o ServiceOutput) ServerPort() pulumi.IntOutput {
return o.ApplyT(func(v *Service) pulumi.IntOutput { return v.ServerPort }).(pulumi.IntOutput)
}
// Specifies the client connection timeout. Defaults to `30`.
func (o ServiceOutput) ServerlessConnectionTimeoutInSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Service) pulumi.IntPtrOutput { return v.ServerlessConnectionTimeoutInSeconds }).(pulumi.IntPtrOutput)
}
// Specifies the service mode. Possible values are `Classic`, `Default` and `Serverless`. Defaults to `Default`.
func (o ServiceOutput) ServiceMode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Service) pulumi.StringPtrOutput { return v.ServiceMode }).(pulumi.StringPtrOutput)
}
// A `sku` block as documented below.
func (o ServiceOutput) Sku() ServiceSkuOutput {
return o.ApplyT(func(v *Service) ServiceSkuOutput { return v.Sku }).(ServiceSkuOutput)
}
// A mapping of tags to assign to the resource.
func (o ServiceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Service) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// Whether to request client certificate during TLS handshake? Defaults to `false`.
//
// > **Note:** `tlsClientCertEnabled` cannot be set to `true` in `Free` sku tier.
func (o ServiceOutput) TlsClientCertEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Service) pulumi.BoolPtrOutput { return v.TlsClientCertEnabled }).(pulumi.BoolPtrOutput)
}
// An `upstreamEndpoint` block as documented below. Using this block requires the SignalR service to be Serverless. When creating multiple blocks they will be processed in the order they are defined in.
func (o ServiceOutput) UpstreamEndpoints() ServiceUpstreamEndpointArrayOutput {
return o.ApplyT(func(v *Service) ServiceUpstreamEndpointArrayOutput { return v.UpstreamEndpoints }).(ServiceUpstreamEndpointArrayOutput)
}
type ServiceArrayOutput struct{ *pulumi.OutputState }
func (ServiceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Service)(nil)).Elem()
}
func (o ServiceArrayOutput) ToServiceArrayOutput() ServiceArrayOutput {
return o
}
func (o ServiceArrayOutput) ToServiceArrayOutputWithContext(ctx context.Context) ServiceArrayOutput {
return o
}
func (o ServiceArrayOutput) Index(i pulumi.IntInput) ServiceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Service {
return vs[0].([]*Service)[vs[1].(int)]
}).(ServiceOutput)
}
type ServiceMapOutput struct{ *pulumi.OutputState }
func (ServiceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Service)(nil)).Elem()
}
func (o ServiceMapOutput) ToServiceMapOutput() ServiceMapOutput {
return o
}
func (o ServiceMapOutput) ToServiceMapOutputWithContext(ctx context.Context) ServiceMapOutput {
return o
}
func (o ServiceMapOutput) MapIndex(k pulumi.StringInput) ServiceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Service {
return vs[0].(map[string]*Service)[vs[1].(string)]
}).(ServiceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServiceInput)(nil)).Elem(), &Service{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceArrayInput)(nil)).Elem(), ServiceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceMapInput)(nil)).Elem(), ServiceMap{})
pulumi.RegisterOutputType(ServiceOutput{})
pulumi.RegisterOutputType(ServiceArrayOutput{})
pulumi.RegisterOutputType(ServiceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/signalr/getService.go | sdk/go/azure/signalr/getService.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package signalr
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 SignalR service.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/signalr"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := signalr.LookupService(ctx, &signalr.LookupServiceArgs{
// Name: "test-signalr",
// ResourceGroupName: "signalr-resource-group",
// }, 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.SignalRService` - 2024-03-01
func LookupService(ctx *pulumi.Context, args *LookupServiceArgs, opts ...pulumi.InvokeOption) (*LookupServiceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupServiceResult
err := ctx.Invoke("azure:signalr/getService:getService", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getService.
type LookupServiceArgs struct {
// Specifies the name of the SignalR service.
Name string `pulumi:"name"`
// Specifies the name of the resource group the SignalR service is located in.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getService.
type LookupServiceResult struct {
// Is aad auth enabled for this SignalR service?
AadAuthEnabled bool `pulumi:"aadAuthEnabled"`
// The FQDN of the SignalR service.
Hostname string `pulumi:"hostname"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The publicly accessible IP of the SignalR service.
IpAddress string `pulumi:"ipAddress"`
// Is local auth enable for this SignalR serviced?
LocalAuthEnabled bool `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the SignalR service exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// The primary access key of the SignalR service.
PrimaryAccessKey string `pulumi:"primaryAccessKey"`
// The primary connection string of the SignalR service.
PrimaryConnectionString string `pulumi:"primaryConnectionString"`
// Is public network access enabled for this SignalR service?
PublicNetworkAccessEnabled bool `pulumi:"publicNetworkAccessEnabled"`
// The publicly accessible port of the SignalR service which is designed for browser/client use.
PublicPort int `pulumi:"publicPort"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The secondary access key of the SignalR service.
SecondaryAccessKey string `pulumi:"secondaryAccessKey"`
// The secondary connection string of the SignalR service.
SecondaryConnectionString string `pulumi:"secondaryConnectionString"`
// The publicly accessible port of the SignalR service which is designed for customer server side use.
ServerPort int `pulumi:"serverPort"`
// The serverless connection timeout of this SignalR service.
ServerlessConnectionTimeoutInSeconds int `pulumi:"serverlessConnectionTimeoutInSeconds"`
Tags map[string]string `pulumi:"tags"`
// Is tls client cert enabled for this SignalR service?
TlsClientCertEnabled bool `pulumi:"tlsClientCertEnabled"`
}
func LookupServiceOutput(ctx *pulumi.Context, args LookupServiceOutputArgs, opts ...pulumi.InvokeOption) LookupServiceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupServiceResultOutput, error) {
args := v.(LookupServiceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:signalr/getService:getService", args, LookupServiceResultOutput{}, options).(LookupServiceResultOutput), nil
}).(LookupServiceResultOutput)
}
// A collection of arguments for invoking getService.
type LookupServiceOutputArgs struct {
// Specifies the name of the SignalR service.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the name of the resource group the SignalR service is located in.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupServiceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServiceArgs)(nil)).Elem()
}
// A collection of values returned by getService.
type LookupServiceResultOutput struct{ *pulumi.OutputState }
func (LookupServiceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServiceResult)(nil)).Elem()
}
func (o LookupServiceResultOutput) ToLookupServiceResultOutput() LookupServiceResultOutput {
return o
}
func (o LookupServiceResultOutput) ToLookupServiceResultOutputWithContext(ctx context.Context) LookupServiceResultOutput {
return o
}
// Is aad auth enabled for this SignalR service?
func (o LookupServiceResultOutput) AadAuthEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupServiceResult) bool { return v.AadAuthEnabled }).(pulumi.BoolOutput)
}
// The FQDN of the SignalR service.
func (o LookupServiceResultOutput) Hostname() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Hostname }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupServiceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Id }).(pulumi.StringOutput)
}
// The publicly accessible IP of the SignalR service.
func (o LookupServiceResultOutput) IpAddress() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.IpAddress }).(pulumi.StringOutput)
}
// Is local auth enable for this SignalR serviced?
func (o LookupServiceResultOutput) LocalAuthEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupServiceResult) bool { return v.LocalAuthEnabled }).(pulumi.BoolOutput)
}
// Specifies the supported Azure location where the SignalR service exists.
func (o LookupServiceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupServiceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Name }).(pulumi.StringOutput)
}
// The primary access key of the SignalR service.
func (o LookupServiceResultOutput) PrimaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.PrimaryAccessKey }).(pulumi.StringOutput)
}
// The primary connection string of the SignalR service.
func (o LookupServiceResultOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// Is public network access enabled for this SignalR service?
func (o LookupServiceResultOutput) PublicNetworkAccessEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupServiceResult) bool { return v.PublicNetworkAccessEnabled }).(pulumi.BoolOutput)
}
// The publicly accessible port of the SignalR service which is designed for browser/client use.
func (o LookupServiceResultOutput) PublicPort() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.PublicPort }).(pulumi.IntOutput)
}
func (o LookupServiceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The secondary access key of the SignalR service.
func (o LookupServiceResultOutput) SecondaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.SecondaryAccessKey }).(pulumi.StringOutput)
}
// The secondary connection string of the SignalR service.
func (o LookupServiceResultOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The publicly accessible port of the SignalR service which is designed for customer server side use.
func (o LookupServiceResultOutput) ServerPort() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.ServerPort }).(pulumi.IntOutput)
}
// The serverless connection timeout of this SignalR service.
func (o LookupServiceResultOutput) ServerlessConnectionTimeoutInSeconds() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.ServerlessConnectionTimeoutInSeconds }).(pulumi.IntOutput)
}
func (o LookupServiceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupServiceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// Is tls client cert enabled for this SignalR service?
func (o LookupServiceResultOutput) TlsClientCertEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupServiceResult) bool { return v.TlsClientCertEnabled }).(pulumi.BoolOutput)
}
func init() {
pulumi.RegisterOutputType(LookupServiceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/signalr/serviceCustomDomain.go | sdk/go/azure/signalr/serviceCustomDomain.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 signalr
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 SignalR Custom 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/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/signalr"
// "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 {
// 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
// }
// exampleService, err := signalr.NewService(ctx, "example", &signalr.ServiceArgs{
// Name: pulumi.String("example-signalr"),
// Location: pulumi.Any(testAzurermResourceGroup.Location),
// ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name),
// Sku: &signalr.ServiceSkuArgs{
// Name: pulumi.String("Premium_P1"),
// Capacity: pulumi.Int(1),
// },
// Identity: &signalr.ServiceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("example-keyvault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("premium"),
// AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.String(current.ObjectId),
// CertificatePermissions: pulumi.StringArray{
// pulumi.String("Create"),
// pulumi.String("Get"),
// pulumi.String("List"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("List"),
// },
// },
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.Any(testAzurermSignalrService.Identity[0].PrincipalId),
// CertificatePermissions: pulumi.StringArray{
// pulumi.String("Create"),
// pulumi.String("Get"),
// pulumi.String("List"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("List"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "certificate-to-import.pfx",
// }, nil)
// if err != nil {
// return err
// }
// exampleCertificate, err := keyvault.NewCertificate(ctx, "example", &keyvault.CertificateArgs{
// Name: pulumi.String("imported-cert"),
// KeyVaultId: exampleKeyVault.ID(),
// Certificate: &keyvault.CertificateCertificateArgs{
// Contents: pulumi.String(invokeFilebase64.Result),
// Password: pulumi.String(""),
// },
// })
// if err != nil {
// return err
// }
// test, err := signalr.NewServiceCustomCertificate(ctx, "test", &signalr.ServiceCustomCertificateArgs{
// Name: pulumi.String("example-cert"),
// SignalrServiceId: exampleService.ID(),
// CustomCertificateId: exampleCertificate.ID(),
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleAzurermKeyVaultAccessPolicy,
// }))
// if err != nil {
// return err
// }
// _, err = signalr.NewServiceCustomDomain(ctx, "test", &signalr.ServiceCustomDomainArgs{
// Name: pulumi.String("example-domain"),
// SignalrServiceId: pulumi.Any(testAzurermSignalrService.Id),
// DomainName: pulumi.String("tftest.com"),
// SignalrCustomCertificateId: test.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.SignalRService` - 2024-03-01
//
// ## Import
//
// Custom Domain for a SignalR service can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:signalr/serviceCustomDomain:ServiceCustomDomain example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SignalRService/signalR/signalr1/customDomains/customDomain1
// ```
type ServiceCustomDomain struct {
pulumi.CustomResourceState
// Specifies the custom domain name of the SignalR Custom Domain. Changing this forces a new resource to be created.
//
// > **Note:** Please ensure the custom domain name is included in the Subject Alternative Names of the selected SignalR Custom Certificate.
DomainName pulumi.StringOutput `pulumi:"domainName"`
// Specifies the name of the SignalR Custom Domain. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the SignalR Custom Certificate ID of the SignalR Custom Domain. Changing this forces a new resource to be created.
SignalrCustomCertificateId pulumi.StringOutput `pulumi:"signalrCustomCertificateId"`
// Specifies the SignalR ID of the SignalR Custom Domain. Changing this forces a new resource to be created.
SignalrServiceId pulumi.StringOutput `pulumi:"signalrServiceId"`
}
// NewServiceCustomDomain registers a new resource with the given unique name, arguments, and options.
func NewServiceCustomDomain(ctx *pulumi.Context,
name string, args *ServiceCustomDomainArgs, opts ...pulumi.ResourceOption) (*ServiceCustomDomain, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DomainName == nil {
return nil, errors.New("invalid value for required argument 'DomainName'")
}
if args.SignalrCustomCertificateId == nil {
return nil, errors.New("invalid value for required argument 'SignalrCustomCertificateId'")
}
if args.SignalrServiceId == nil {
return nil, errors.New("invalid value for required argument 'SignalrServiceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServiceCustomDomain
err := ctx.RegisterResource("azure:signalr/serviceCustomDomain:ServiceCustomDomain", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServiceCustomDomain gets an existing ServiceCustomDomain 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 GetServiceCustomDomain(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServiceCustomDomainState, opts ...pulumi.ResourceOption) (*ServiceCustomDomain, error) {
var resource ServiceCustomDomain
err := ctx.ReadResource("azure:signalr/serviceCustomDomain:ServiceCustomDomain", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServiceCustomDomain resources.
type serviceCustomDomainState struct {
// Specifies the custom domain name of the SignalR Custom Domain. Changing this forces a new resource to be created.
//
// > **Note:** Please ensure the custom domain name is included in the Subject Alternative Names of the selected SignalR Custom Certificate.
DomainName *string `pulumi:"domainName"`
// Specifies the name of the SignalR Custom Domain. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the SignalR Custom Certificate ID of the SignalR Custom Domain. Changing this forces a new resource to be created.
SignalrCustomCertificateId *string `pulumi:"signalrCustomCertificateId"`
// Specifies the SignalR ID of the SignalR Custom Domain. Changing this forces a new resource to be created.
SignalrServiceId *string `pulumi:"signalrServiceId"`
}
type ServiceCustomDomainState struct {
// Specifies the custom domain name of the SignalR Custom Domain. Changing this forces a new resource to be created.
//
// > **Note:** Please ensure the custom domain name is included in the Subject Alternative Names of the selected SignalR Custom Certificate.
DomainName pulumi.StringPtrInput
// Specifies the name of the SignalR Custom Domain. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the SignalR Custom Certificate ID of the SignalR Custom Domain. Changing this forces a new resource to be created.
SignalrCustomCertificateId pulumi.StringPtrInput
// Specifies the SignalR ID of the SignalR Custom Domain. Changing this forces a new resource to be created.
SignalrServiceId pulumi.StringPtrInput
}
func (ServiceCustomDomainState) ElementType() reflect.Type {
return reflect.TypeOf((*serviceCustomDomainState)(nil)).Elem()
}
type serviceCustomDomainArgs struct {
// Specifies the custom domain name of the SignalR Custom Domain. Changing this forces a new resource to be created.
//
// > **Note:** Please ensure the custom domain name is included in the Subject Alternative Names of the selected SignalR Custom Certificate.
DomainName string `pulumi:"domainName"`
// Specifies the name of the SignalR Custom Domain. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the SignalR Custom Certificate ID of the SignalR Custom Domain. Changing this forces a new resource to be created.
SignalrCustomCertificateId string `pulumi:"signalrCustomCertificateId"`
// Specifies the SignalR ID of the SignalR Custom Domain. Changing this forces a new resource to be created.
SignalrServiceId string `pulumi:"signalrServiceId"`
}
// The set of arguments for constructing a ServiceCustomDomain resource.
type ServiceCustomDomainArgs struct {
// Specifies the custom domain name of the SignalR Custom Domain. Changing this forces a new resource to be created.
//
// > **Note:** Please ensure the custom domain name is included in the Subject Alternative Names of the selected SignalR Custom Certificate.
DomainName pulumi.StringInput
// Specifies the name of the SignalR Custom Domain. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the SignalR Custom Certificate ID of the SignalR Custom Domain. Changing this forces a new resource to be created.
SignalrCustomCertificateId pulumi.StringInput
// Specifies the SignalR ID of the SignalR Custom Domain. Changing this forces a new resource to be created.
SignalrServiceId pulumi.StringInput
}
func (ServiceCustomDomainArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serviceCustomDomainArgs)(nil)).Elem()
}
type ServiceCustomDomainInput interface {
pulumi.Input
ToServiceCustomDomainOutput() ServiceCustomDomainOutput
ToServiceCustomDomainOutputWithContext(ctx context.Context) ServiceCustomDomainOutput
}
func (*ServiceCustomDomain) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceCustomDomain)(nil)).Elem()
}
func (i *ServiceCustomDomain) ToServiceCustomDomainOutput() ServiceCustomDomainOutput {
return i.ToServiceCustomDomainOutputWithContext(context.Background())
}
func (i *ServiceCustomDomain) ToServiceCustomDomainOutputWithContext(ctx context.Context) ServiceCustomDomainOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceCustomDomainOutput)
}
// ServiceCustomDomainArrayInput is an input type that accepts ServiceCustomDomainArray and ServiceCustomDomainArrayOutput values.
// You can construct a concrete instance of `ServiceCustomDomainArrayInput` via:
//
// ServiceCustomDomainArray{ ServiceCustomDomainArgs{...} }
type ServiceCustomDomainArrayInput interface {
pulumi.Input
ToServiceCustomDomainArrayOutput() ServiceCustomDomainArrayOutput
ToServiceCustomDomainArrayOutputWithContext(context.Context) ServiceCustomDomainArrayOutput
}
type ServiceCustomDomainArray []ServiceCustomDomainInput
func (ServiceCustomDomainArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServiceCustomDomain)(nil)).Elem()
}
func (i ServiceCustomDomainArray) ToServiceCustomDomainArrayOutput() ServiceCustomDomainArrayOutput {
return i.ToServiceCustomDomainArrayOutputWithContext(context.Background())
}
func (i ServiceCustomDomainArray) ToServiceCustomDomainArrayOutputWithContext(ctx context.Context) ServiceCustomDomainArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceCustomDomainArrayOutput)
}
// ServiceCustomDomainMapInput is an input type that accepts ServiceCustomDomainMap and ServiceCustomDomainMapOutput values.
// You can construct a concrete instance of `ServiceCustomDomainMapInput` via:
//
// ServiceCustomDomainMap{ "key": ServiceCustomDomainArgs{...} }
type ServiceCustomDomainMapInput interface {
pulumi.Input
ToServiceCustomDomainMapOutput() ServiceCustomDomainMapOutput
ToServiceCustomDomainMapOutputWithContext(context.Context) ServiceCustomDomainMapOutput
}
type ServiceCustomDomainMap map[string]ServiceCustomDomainInput
func (ServiceCustomDomainMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServiceCustomDomain)(nil)).Elem()
}
func (i ServiceCustomDomainMap) ToServiceCustomDomainMapOutput() ServiceCustomDomainMapOutput {
return i.ToServiceCustomDomainMapOutputWithContext(context.Background())
}
func (i ServiceCustomDomainMap) ToServiceCustomDomainMapOutputWithContext(ctx context.Context) ServiceCustomDomainMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceCustomDomainMapOutput)
}
type ServiceCustomDomainOutput struct{ *pulumi.OutputState }
func (ServiceCustomDomainOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceCustomDomain)(nil)).Elem()
}
func (o ServiceCustomDomainOutput) ToServiceCustomDomainOutput() ServiceCustomDomainOutput {
return o
}
func (o ServiceCustomDomainOutput) ToServiceCustomDomainOutputWithContext(ctx context.Context) ServiceCustomDomainOutput {
return o
}
// Specifies the custom domain name of the SignalR Custom Domain. Changing this forces a new resource to be created.
//
// > **Note:** Please ensure the custom domain name is included in the Subject Alternative Names of the selected SignalR Custom Certificate.
func (o ServiceCustomDomainOutput) DomainName() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceCustomDomain) pulumi.StringOutput { return v.DomainName }).(pulumi.StringOutput)
}
// Specifies the name of the SignalR Custom Domain. Changing this forces a new resource to be created.
func (o ServiceCustomDomainOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceCustomDomain) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the SignalR Custom Certificate ID of the SignalR Custom Domain. Changing this forces a new resource to be created.
func (o ServiceCustomDomainOutput) SignalrCustomCertificateId() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceCustomDomain) pulumi.StringOutput { return v.SignalrCustomCertificateId }).(pulumi.StringOutput)
}
// Specifies the SignalR ID of the SignalR Custom Domain. Changing this forces a new resource to be created.
func (o ServiceCustomDomainOutput) SignalrServiceId() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceCustomDomain) pulumi.StringOutput { return v.SignalrServiceId }).(pulumi.StringOutput)
}
type ServiceCustomDomainArrayOutput struct{ *pulumi.OutputState }
func (ServiceCustomDomainArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServiceCustomDomain)(nil)).Elem()
}
func (o ServiceCustomDomainArrayOutput) ToServiceCustomDomainArrayOutput() ServiceCustomDomainArrayOutput {
return o
}
func (o ServiceCustomDomainArrayOutput) ToServiceCustomDomainArrayOutputWithContext(ctx context.Context) ServiceCustomDomainArrayOutput {
return o
}
func (o ServiceCustomDomainArrayOutput) Index(i pulumi.IntInput) ServiceCustomDomainOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServiceCustomDomain {
return vs[0].([]*ServiceCustomDomain)[vs[1].(int)]
}).(ServiceCustomDomainOutput)
}
type ServiceCustomDomainMapOutput struct{ *pulumi.OutputState }
func (ServiceCustomDomainMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServiceCustomDomain)(nil)).Elem()
}
func (o ServiceCustomDomainMapOutput) ToServiceCustomDomainMapOutput() ServiceCustomDomainMapOutput {
return o
}
func (o ServiceCustomDomainMapOutput) ToServiceCustomDomainMapOutputWithContext(ctx context.Context) ServiceCustomDomainMapOutput {
return o
}
func (o ServiceCustomDomainMapOutput) MapIndex(k pulumi.StringInput) ServiceCustomDomainOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServiceCustomDomain {
return vs[0].(map[string]*ServiceCustomDomain)[vs[1].(string)]
}).(ServiceCustomDomainOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServiceCustomDomainInput)(nil)).Elem(), &ServiceCustomDomain{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceCustomDomainArrayInput)(nil)).Elem(), ServiceCustomDomainArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceCustomDomainMapInput)(nil)).Elem(), ServiceCustomDomainMap{})
pulumi.RegisterOutputType(ServiceCustomDomainOutput{})
pulumi.RegisterOutputType(ServiceCustomDomainArrayOutput{})
pulumi.RegisterOutputType(ServiceCustomDomainMapOutput{})
}
| 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/automation/init.go | sdk/go/azure/automation/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 automation
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:automation/account:Account":
r = &Account{}
case "azure:automation/boolVariable:BoolVariable":
r = &BoolVariable{}
case "azure:automation/certificate:Certificate":
r = &Certificate{}
case "azure:automation/connection:Connection":
r = &Connection{}
case "azure:automation/connectionCertificate:ConnectionCertificate":
r = &ConnectionCertificate{}
case "azure:automation/connectionClassicCertificate:ConnectionClassicCertificate":
r = &ConnectionClassicCertificate{}
case "azure:automation/connectionServicePrincipal:ConnectionServicePrincipal":
r = &ConnectionServicePrincipal{}
case "azure:automation/connectionType:ConnectionType":
r = &ConnectionType{}
case "azure:automation/credential:Credential":
r = &Credential{}
case "azure:automation/dateTimeVariable:DateTimeVariable":
r = &DateTimeVariable{}
case "azure:automation/dscConfiguration:DscConfiguration":
r = &DscConfiguration{}
case "azure:automation/dscNodeConfiguration:DscNodeConfiguration":
r = &DscNodeConfiguration{}
case "azure:automation/hybridRunbookWorker:HybridRunbookWorker":
r = &HybridRunbookWorker{}
case "azure:automation/hybridRunbookWorkerGroup:HybridRunbookWorkerGroup":
r = &HybridRunbookWorkerGroup{}
case "azure:automation/intVariable:IntVariable":
r = &IntVariable{}
case "azure:automation/jobSchedule:JobSchedule":
r = &JobSchedule{}
case "azure:automation/module:Module":
r = &Module{}
case "azure:automation/powershell72Module:Powershell72Module":
r = &Powershell72Module{}
case "azure:automation/python3Package:Python3Package":
r = &Python3Package{}
case "azure:automation/runBook:RunBook":
r = &RunBook{}
case "azure:automation/runtimeEnvironment:RuntimeEnvironment":
r = &RuntimeEnvironment{}
case "azure:automation/schedule:Schedule":
r = &Schedule{}
case "azure:automation/softwareUpdateConfiguration:SoftwareUpdateConfiguration":
r = &SoftwareUpdateConfiguration{}
case "azure:automation/sourceControl:SourceControl":
r = &SourceControl{}
case "azure:automation/stringVariable:StringVariable":
r = &StringVariable{}
case "azure:automation/variableObject:VariableObject":
r = &VariableObject{}
case "azure:automation/watcher:Watcher":
r = &Watcher{}
case "azure:automation/webhook:Webhook":
r = &Webhook{}
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",
"automation/account",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/boolVariable",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/certificate",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/connection",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/connectionCertificate",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/connectionClassicCertificate",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/connectionServicePrincipal",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/connectionType",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/credential",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/dateTimeVariable",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/dscConfiguration",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/dscNodeConfiguration",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/hybridRunbookWorker",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/hybridRunbookWorkerGroup",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/intVariable",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/jobSchedule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/module",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/powershell72Module",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/python3Package",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/runBook",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/runtimeEnvironment",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/schedule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/softwareUpdateConfiguration",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/sourceControl",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/stringVariable",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/variableObject",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/watcher",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"automation/webhook",
&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/automation/pulumiTypes.go | sdk/go/azure/automation/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 automation
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 AccountEncryption struct {
// Deprecated: `encryption.key_source` has been deprecated and will be removed in v5.0 of the AzureRM Provider. To disable encryption, omit the `encryption` block
KeySource *string `pulumi:"keySource"`
// The ID of the Key Vault Key which should be used to Encrypt the data in this Automation Account.
KeyVaultKeyId string `pulumi:"keyVaultKeyId"`
// The User Assigned Managed Identity ID to be used for accessing the Customer Managed Key for encryption.
UserAssignedIdentityId *string `pulumi:"userAssignedIdentityId"`
}
// AccountEncryptionInput is an input type that accepts AccountEncryptionArgs and AccountEncryptionOutput values.
// You can construct a concrete instance of `AccountEncryptionInput` via:
//
// AccountEncryptionArgs{...}
type AccountEncryptionInput interface {
pulumi.Input
ToAccountEncryptionOutput() AccountEncryptionOutput
ToAccountEncryptionOutputWithContext(context.Context) AccountEncryptionOutput
}
type AccountEncryptionArgs struct {
// Deprecated: `encryption.key_source` has been deprecated and will be removed in v5.0 of the AzureRM Provider. To disable encryption, omit the `encryption` block
KeySource pulumi.StringPtrInput `pulumi:"keySource"`
// The ID of the Key Vault Key which should be used to Encrypt the data in this Automation Account.
KeyVaultKeyId pulumi.StringInput `pulumi:"keyVaultKeyId"`
// The User Assigned Managed Identity ID to be used for accessing the Customer Managed Key for encryption.
UserAssignedIdentityId pulumi.StringPtrInput `pulumi:"userAssignedIdentityId"`
}
func (AccountEncryptionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountEncryption)(nil)).Elem()
}
func (i AccountEncryptionArgs) ToAccountEncryptionOutput() AccountEncryptionOutput {
return i.ToAccountEncryptionOutputWithContext(context.Background())
}
func (i AccountEncryptionArgs) ToAccountEncryptionOutputWithContext(ctx context.Context) AccountEncryptionOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountEncryptionOutput)
}
// AccountEncryptionArrayInput is an input type that accepts AccountEncryptionArray and AccountEncryptionArrayOutput values.
// You can construct a concrete instance of `AccountEncryptionArrayInput` via:
//
// AccountEncryptionArray{ AccountEncryptionArgs{...} }
type AccountEncryptionArrayInput interface {
pulumi.Input
ToAccountEncryptionArrayOutput() AccountEncryptionArrayOutput
ToAccountEncryptionArrayOutputWithContext(context.Context) AccountEncryptionArrayOutput
}
type AccountEncryptionArray []AccountEncryptionInput
func (AccountEncryptionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]AccountEncryption)(nil)).Elem()
}
func (i AccountEncryptionArray) ToAccountEncryptionArrayOutput() AccountEncryptionArrayOutput {
return i.ToAccountEncryptionArrayOutputWithContext(context.Background())
}
func (i AccountEncryptionArray) ToAccountEncryptionArrayOutputWithContext(ctx context.Context) AccountEncryptionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountEncryptionArrayOutput)
}
type AccountEncryptionOutput struct{ *pulumi.OutputState }
func (AccountEncryptionOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountEncryption)(nil)).Elem()
}
func (o AccountEncryptionOutput) ToAccountEncryptionOutput() AccountEncryptionOutput {
return o
}
func (o AccountEncryptionOutput) ToAccountEncryptionOutputWithContext(ctx context.Context) AccountEncryptionOutput {
return o
}
// Deprecated: `encryption.key_source` has been deprecated and will be removed in v5.0 of the AzureRM Provider. To disable encryption, omit the `encryption` block
func (o AccountEncryptionOutput) KeySource() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountEncryption) *string { return v.KeySource }).(pulumi.StringPtrOutput)
}
// The ID of the Key Vault Key which should be used to Encrypt the data in this Automation Account.
func (o AccountEncryptionOutput) KeyVaultKeyId() pulumi.StringOutput {
return o.ApplyT(func(v AccountEncryption) string { return v.KeyVaultKeyId }).(pulumi.StringOutput)
}
// The User Assigned Managed Identity ID to be used for accessing the Customer Managed Key for encryption.
func (o AccountEncryptionOutput) UserAssignedIdentityId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountEncryption) *string { return v.UserAssignedIdentityId }).(pulumi.StringPtrOutput)
}
type AccountEncryptionArrayOutput struct{ *pulumi.OutputState }
func (AccountEncryptionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]AccountEncryption)(nil)).Elem()
}
func (o AccountEncryptionArrayOutput) ToAccountEncryptionArrayOutput() AccountEncryptionArrayOutput {
return o
}
func (o AccountEncryptionArrayOutput) ToAccountEncryptionArrayOutputWithContext(ctx context.Context) AccountEncryptionArrayOutput {
return o
}
func (o AccountEncryptionArrayOutput) Index(i pulumi.IntInput) AccountEncryptionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) AccountEncryption {
return vs[0].([]AccountEncryption)[vs[1].(int)]
}).(AccountEncryptionOutput)
}
type AccountIdentity struct {
// The ID of the User Assigned Identity which should be assigned to this Automation Account.
//
// > **Note:** `identityIds` is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
IdentityIds []string `pulumi:"identityIds"`
// The Principal ID associated with this Managed Service Identity.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId *string `pulumi:"tenantId"`
// The type of identity used for this Automation Account. Possible values are `SystemAssigned`, `UserAssigned` and `SystemAssigned, UserAssigned`.
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 {
// The ID of the User Assigned Identity which should be assigned to this Automation Account.
//
// > **Note:** `identityIds` is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// The Principal ID associated with this Managed Service Identity.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// The type of identity used for this Automation Account. Possible values are `SystemAssigned`, `UserAssigned` and `SystemAssigned, UserAssigned`.
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)
}
// The ID of the User Assigned Identity which should be assigned to this Automation Account.
//
// > **Note:** `identityIds` 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)
}
// The type of identity used for this Automation Account. Possible values are `SystemAssigned`, `UserAssigned` and `SystemAssigned, UserAssigned`.
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)
}
// The ID of the User Assigned Identity which should be assigned to this Automation Account.
//
// > **Note:** `identityIds` 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)
}
// The type of identity used for this Automation Account. Possible values are `SystemAssigned`, `UserAssigned` and `SystemAssigned, UserAssigned`.
func (o AccountIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type AccountPrivateEndpointConnection struct {
// The ID of the Automation Account.
Id *string `pulumi:"id"`
// Specifies the name of the Automation Account. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
}
// AccountPrivateEndpointConnectionInput is an input type that accepts AccountPrivateEndpointConnectionArgs and AccountPrivateEndpointConnectionOutput values.
// You can construct a concrete instance of `AccountPrivateEndpointConnectionInput` via:
//
// AccountPrivateEndpointConnectionArgs{...}
type AccountPrivateEndpointConnectionInput interface {
pulumi.Input
ToAccountPrivateEndpointConnectionOutput() AccountPrivateEndpointConnectionOutput
ToAccountPrivateEndpointConnectionOutputWithContext(context.Context) AccountPrivateEndpointConnectionOutput
}
type AccountPrivateEndpointConnectionArgs struct {
// The ID of the Automation Account.
Id pulumi.StringPtrInput `pulumi:"id"`
// Specifies the name of the Automation Account. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput `pulumi:"name"`
}
func (AccountPrivateEndpointConnectionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountPrivateEndpointConnection)(nil)).Elem()
}
func (i AccountPrivateEndpointConnectionArgs) ToAccountPrivateEndpointConnectionOutput() AccountPrivateEndpointConnectionOutput {
return i.ToAccountPrivateEndpointConnectionOutputWithContext(context.Background())
}
func (i AccountPrivateEndpointConnectionArgs) ToAccountPrivateEndpointConnectionOutputWithContext(ctx context.Context) AccountPrivateEndpointConnectionOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountPrivateEndpointConnectionOutput)
}
// AccountPrivateEndpointConnectionArrayInput is an input type that accepts AccountPrivateEndpointConnectionArray and AccountPrivateEndpointConnectionArrayOutput values.
// You can construct a concrete instance of `AccountPrivateEndpointConnectionArrayInput` via:
//
// AccountPrivateEndpointConnectionArray{ AccountPrivateEndpointConnectionArgs{...} }
type AccountPrivateEndpointConnectionArrayInput interface {
pulumi.Input
ToAccountPrivateEndpointConnectionArrayOutput() AccountPrivateEndpointConnectionArrayOutput
ToAccountPrivateEndpointConnectionArrayOutputWithContext(context.Context) AccountPrivateEndpointConnectionArrayOutput
}
type AccountPrivateEndpointConnectionArray []AccountPrivateEndpointConnectionInput
func (AccountPrivateEndpointConnectionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]AccountPrivateEndpointConnection)(nil)).Elem()
}
func (i AccountPrivateEndpointConnectionArray) ToAccountPrivateEndpointConnectionArrayOutput() AccountPrivateEndpointConnectionArrayOutput {
return i.ToAccountPrivateEndpointConnectionArrayOutputWithContext(context.Background())
}
func (i AccountPrivateEndpointConnectionArray) ToAccountPrivateEndpointConnectionArrayOutputWithContext(ctx context.Context) AccountPrivateEndpointConnectionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountPrivateEndpointConnectionArrayOutput)
}
type AccountPrivateEndpointConnectionOutput struct{ *pulumi.OutputState }
func (AccountPrivateEndpointConnectionOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountPrivateEndpointConnection)(nil)).Elem()
}
func (o AccountPrivateEndpointConnectionOutput) ToAccountPrivateEndpointConnectionOutput() AccountPrivateEndpointConnectionOutput {
return o
}
func (o AccountPrivateEndpointConnectionOutput) ToAccountPrivateEndpointConnectionOutputWithContext(ctx context.Context) AccountPrivateEndpointConnectionOutput {
return o
}
// The ID of the Automation Account.
func (o AccountPrivateEndpointConnectionOutput) Id() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountPrivateEndpointConnection) *string { return v.Id }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Automation Account. Changing this forces a new resource to be created.
func (o AccountPrivateEndpointConnectionOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountPrivateEndpointConnection) *string { return v.Name }).(pulumi.StringPtrOutput)
}
type AccountPrivateEndpointConnectionArrayOutput struct{ *pulumi.OutputState }
func (AccountPrivateEndpointConnectionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]AccountPrivateEndpointConnection)(nil)).Elem()
}
func (o AccountPrivateEndpointConnectionArrayOutput) ToAccountPrivateEndpointConnectionArrayOutput() AccountPrivateEndpointConnectionArrayOutput {
return o
}
func (o AccountPrivateEndpointConnectionArrayOutput) ToAccountPrivateEndpointConnectionArrayOutputWithContext(ctx context.Context) AccountPrivateEndpointConnectionArrayOutput {
return o
}
func (o AccountPrivateEndpointConnectionArrayOutput) Index(i pulumi.IntInput) AccountPrivateEndpointConnectionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) AccountPrivateEndpointConnection {
return vs[0].([]AccountPrivateEndpointConnection)[vs[1].(int)]
}).(AccountPrivateEndpointConnectionOutput)
}
type ConnectionTypeField struct {
// Whether to set the isEncrypted flag of the connection field definition.
IsEncrypted *bool `pulumi:"isEncrypted"`
// Whether to set the isOptional flag of the connection field definition.
IsOptional *bool `pulumi:"isOptional"`
// The name which should be used for this connection field definition.
Name string `pulumi:"name"`
// The type of the connection field definition.
Type string `pulumi:"type"`
}
// ConnectionTypeFieldInput is an input type that accepts ConnectionTypeFieldArgs and ConnectionTypeFieldOutput values.
// You can construct a concrete instance of `ConnectionTypeFieldInput` via:
//
// ConnectionTypeFieldArgs{...}
type ConnectionTypeFieldInput interface {
pulumi.Input
ToConnectionTypeFieldOutput() ConnectionTypeFieldOutput
ToConnectionTypeFieldOutputWithContext(context.Context) ConnectionTypeFieldOutput
}
type ConnectionTypeFieldArgs struct {
// Whether to set the isEncrypted flag of the connection field definition.
IsEncrypted pulumi.BoolPtrInput `pulumi:"isEncrypted"`
// Whether to set the isOptional flag of the connection field definition.
IsOptional pulumi.BoolPtrInput `pulumi:"isOptional"`
// The name which should be used for this connection field definition.
Name pulumi.StringInput `pulumi:"name"`
// The type of the connection field definition.
Type pulumi.StringInput `pulumi:"type"`
}
func (ConnectionTypeFieldArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ConnectionTypeField)(nil)).Elem()
}
func (i ConnectionTypeFieldArgs) ToConnectionTypeFieldOutput() ConnectionTypeFieldOutput {
return i.ToConnectionTypeFieldOutputWithContext(context.Background())
}
func (i ConnectionTypeFieldArgs) ToConnectionTypeFieldOutputWithContext(ctx context.Context) ConnectionTypeFieldOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionTypeFieldOutput)
}
// ConnectionTypeFieldArrayInput is an input type that accepts ConnectionTypeFieldArray and ConnectionTypeFieldArrayOutput values.
// You can construct a concrete instance of `ConnectionTypeFieldArrayInput` via:
//
// ConnectionTypeFieldArray{ ConnectionTypeFieldArgs{...} }
type ConnectionTypeFieldArrayInput interface {
pulumi.Input
ToConnectionTypeFieldArrayOutput() ConnectionTypeFieldArrayOutput
ToConnectionTypeFieldArrayOutputWithContext(context.Context) ConnectionTypeFieldArrayOutput
}
type ConnectionTypeFieldArray []ConnectionTypeFieldInput
func (ConnectionTypeFieldArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ConnectionTypeField)(nil)).Elem()
}
func (i ConnectionTypeFieldArray) ToConnectionTypeFieldArrayOutput() ConnectionTypeFieldArrayOutput {
return i.ToConnectionTypeFieldArrayOutputWithContext(context.Background())
}
func (i ConnectionTypeFieldArray) ToConnectionTypeFieldArrayOutputWithContext(ctx context.Context) ConnectionTypeFieldArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionTypeFieldArrayOutput)
}
type ConnectionTypeFieldOutput struct{ *pulumi.OutputState }
func (ConnectionTypeFieldOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ConnectionTypeField)(nil)).Elem()
}
func (o ConnectionTypeFieldOutput) ToConnectionTypeFieldOutput() ConnectionTypeFieldOutput {
return o
}
func (o ConnectionTypeFieldOutput) ToConnectionTypeFieldOutputWithContext(ctx context.Context) ConnectionTypeFieldOutput {
return o
}
// Whether to set the isEncrypted flag of the connection field definition.
func (o ConnectionTypeFieldOutput) IsEncrypted() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ConnectionTypeField) *bool { return v.IsEncrypted }).(pulumi.BoolPtrOutput)
}
// Whether to set the isOptional flag of the connection field definition.
func (o ConnectionTypeFieldOutput) IsOptional() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ConnectionTypeField) *bool { return v.IsOptional }).(pulumi.BoolPtrOutput)
}
// The name which should be used for this connection field definition.
func (o ConnectionTypeFieldOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v ConnectionTypeField) string { return v.Name }).(pulumi.StringOutput)
}
// The type of the connection field definition.
func (o ConnectionTypeFieldOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v ConnectionTypeField) string { return v.Type }).(pulumi.StringOutput)
}
type ConnectionTypeFieldArrayOutput struct{ *pulumi.OutputState }
func (ConnectionTypeFieldArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ConnectionTypeField)(nil)).Elem()
}
func (o ConnectionTypeFieldArrayOutput) ToConnectionTypeFieldArrayOutput() ConnectionTypeFieldArrayOutput {
return o
}
func (o ConnectionTypeFieldArrayOutput) ToConnectionTypeFieldArrayOutputWithContext(ctx context.Context) ConnectionTypeFieldArrayOutput {
return o
}
func (o ConnectionTypeFieldArrayOutput) Index(i pulumi.IntInput) ConnectionTypeFieldOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ConnectionTypeField {
return vs[0].([]ConnectionTypeField)[vs[1].(int)]
}).(ConnectionTypeFieldOutput)
}
type ModuleModuleLink struct {
// A `hash` block as defined below.
Hash *ModuleModuleLinkHash `pulumi:"hash"`
// The URI of the module content (zip or nupkg).
Uri string `pulumi:"uri"`
}
// ModuleModuleLinkInput is an input type that accepts ModuleModuleLinkArgs and ModuleModuleLinkOutput values.
// You can construct a concrete instance of `ModuleModuleLinkInput` via:
//
// ModuleModuleLinkArgs{...}
type ModuleModuleLinkInput interface {
pulumi.Input
ToModuleModuleLinkOutput() ModuleModuleLinkOutput
ToModuleModuleLinkOutputWithContext(context.Context) ModuleModuleLinkOutput
}
type ModuleModuleLinkArgs struct {
// A `hash` block as defined below.
Hash ModuleModuleLinkHashPtrInput `pulumi:"hash"`
// The URI of the module content (zip or nupkg).
Uri pulumi.StringInput `pulumi:"uri"`
}
func (ModuleModuleLinkArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ModuleModuleLink)(nil)).Elem()
}
func (i ModuleModuleLinkArgs) ToModuleModuleLinkOutput() ModuleModuleLinkOutput {
return i.ToModuleModuleLinkOutputWithContext(context.Background())
}
func (i ModuleModuleLinkArgs) ToModuleModuleLinkOutputWithContext(ctx context.Context) ModuleModuleLinkOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleModuleLinkOutput)
}
func (i ModuleModuleLinkArgs) ToModuleModuleLinkPtrOutput() ModuleModuleLinkPtrOutput {
return i.ToModuleModuleLinkPtrOutputWithContext(context.Background())
}
func (i ModuleModuleLinkArgs) ToModuleModuleLinkPtrOutputWithContext(ctx context.Context) ModuleModuleLinkPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleModuleLinkOutput).ToModuleModuleLinkPtrOutputWithContext(ctx)
}
// ModuleModuleLinkPtrInput is an input type that accepts ModuleModuleLinkArgs, ModuleModuleLinkPtr and ModuleModuleLinkPtrOutput values.
// You can construct a concrete instance of `ModuleModuleLinkPtrInput` via:
//
// ModuleModuleLinkArgs{...}
//
// or:
//
// nil
type ModuleModuleLinkPtrInput interface {
pulumi.Input
ToModuleModuleLinkPtrOutput() ModuleModuleLinkPtrOutput
ToModuleModuleLinkPtrOutputWithContext(context.Context) ModuleModuleLinkPtrOutput
}
type moduleModuleLinkPtrType ModuleModuleLinkArgs
func ModuleModuleLinkPtr(v *ModuleModuleLinkArgs) ModuleModuleLinkPtrInput {
return (*moduleModuleLinkPtrType)(v)
}
func (*moduleModuleLinkPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ModuleModuleLink)(nil)).Elem()
}
func (i *moduleModuleLinkPtrType) ToModuleModuleLinkPtrOutput() ModuleModuleLinkPtrOutput {
return i.ToModuleModuleLinkPtrOutputWithContext(context.Background())
}
func (i *moduleModuleLinkPtrType) ToModuleModuleLinkPtrOutputWithContext(ctx context.Context) ModuleModuleLinkPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleModuleLinkPtrOutput)
}
type ModuleModuleLinkOutput struct{ *pulumi.OutputState }
func (ModuleModuleLinkOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ModuleModuleLink)(nil)).Elem()
}
func (o ModuleModuleLinkOutput) ToModuleModuleLinkOutput() ModuleModuleLinkOutput {
return o
}
func (o ModuleModuleLinkOutput) ToModuleModuleLinkOutputWithContext(ctx context.Context) ModuleModuleLinkOutput {
return o
}
func (o ModuleModuleLinkOutput) ToModuleModuleLinkPtrOutput() ModuleModuleLinkPtrOutput {
return o.ToModuleModuleLinkPtrOutputWithContext(context.Background())
}
func (o ModuleModuleLinkOutput) ToModuleModuleLinkPtrOutputWithContext(ctx context.Context) ModuleModuleLinkPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ModuleModuleLink) *ModuleModuleLink {
return &v
}).(ModuleModuleLinkPtrOutput)
}
// A `hash` block as defined below.
func (o ModuleModuleLinkOutput) Hash() ModuleModuleLinkHashPtrOutput {
return o.ApplyT(func(v ModuleModuleLink) *ModuleModuleLinkHash { return v.Hash }).(ModuleModuleLinkHashPtrOutput)
}
// The URI of the module content (zip or nupkg).
func (o ModuleModuleLinkOutput) Uri() pulumi.StringOutput {
return o.ApplyT(func(v ModuleModuleLink) string { return v.Uri }).(pulumi.StringOutput)
}
type ModuleModuleLinkPtrOutput struct{ *pulumi.OutputState }
func (ModuleModuleLinkPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ModuleModuleLink)(nil)).Elem()
}
func (o ModuleModuleLinkPtrOutput) ToModuleModuleLinkPtrOutput() ModuleModuleLinkPtrOutput {
return o
}
func (o ModuleModuleLinkPtrOutput) ToModuleModuleLinkPtrOutputWithContext(ctx context.Context) ModuleModuleLinkPtrOutput {
return o
}
func (o ModuleModuleLinkPtrOutput) Elem() ModuleModuleLinkOutput {
return o.ApplyT(func(v *ModuleModuleLink) ModuleModuleLink {
if v != nil {
return *v
}
var ret ModuleModuleLink
return ret
}).(ModuleModuleLinkOutput)
}
// A `hash` block as defined below.
func (o ModuleModuleLinkPtrOutput) Hash() ModuleModuleLinkHashPtrOutput {
return o.ApplyT(func(v *ModuleModuleLink) *ModuleModuleLinkHash {
if v == nil {
return nil
}
return v.Hash
}).(ModuleModuleLinkHashPtrOutput)
}
// The URI of the module content (zip or nupkg).
func (o ModuleModuleLinkPtrOutput) Uri() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ModuleModuleLink) *string {
if v == nil {
return nil
}
return &v.Uri
}).(pulumi.StringPtrOutput)
}
type ModuleModuleLinkHash struct {
// Specifies the algorithm used for the hash content.
Algorithm string `pulumi:"algorithm"`
// The hash value of the content.
Value string `pulumi:"value"`
}
// ModuleModuleLinkHashInput is an input type that accepts ModuleModuleLinkHashArgs and ModuleModuleLinkHashOutput values.
// You can construct a concrete instance of `ModuleModuleLinkHashInput` via:
//
// ModuleModuleLinkHashArgs{...}
type ModuleModuleLinkHashInput interface {
pulumi.Input
ToModuleModuleLinkHashOutput() ModuleModuleLinkHashOutput
ToModuleModuleLinkHashOutputWithContext(context.Context) ModuleModuleLinkHashOutput
}
type ModuleModuleLinkHashArgs struct {
// Specifies the algorithm used for the hash content.
Algorithm pulumi.StringInput `pulumi:"algorithm"`
// The hash value of the content.
Value pulumi.StringInput `pulumi:"value"`
}
func (ModuleModuleLinkHashArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ModuleModuleLinkHash)(nil)).Elem()
}
func (i ModuleModuleLinkHashArgs) ToModuleModuleLinkHashOutput() ModuleModuleLinkHashOutput {
return i.ToModuleModuleLinkHashOutputWithContext(context.Background())
}
func (i ModuleModuleLinkHashArgs) ToModuleModuleLinkHashOutputWithContext(ctx context.Context) ModuleModuleLinkHashOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleModuleLinkHashOutput)
}
func (i ModuleModuleLinkHashArgs) ToModuleModuleLinkHashPtrOutput() ModuleModuleLinkHashPtrOutput {
return i.ToModuleModuleLinkHashPtrOutputWithContext(context.Background())
}
func (i ModuleModuleLinkHashArgs) ToModuleModuleLinkHashPtrOutputWithContext(ctx context.Context) ModuleModuleLinkHashPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleModuleLinkHashOutput).ToModuleModuleLinkHashPtrOutputWithContext(ctx)
}
// ModuleModuleLinkHashPtrInput is an input type that accepts ModuleModuleLinkHashArgs, ModuleModuleLinkHashPtr and ModuleModuleLinkHashPtrOutput values.
// You can construct a concrete instance of `ModuleModuleLinkHashPtrInput` via:
//
// ModuleModuleLinkHashArgs{...}
//
// or:
//
// nil
type ModuleModuleLinkHashPtrInput interface {
pulumi.Input
ToModuleModuleLinkHashPtrOutput() ModuleModuleLinkHashPtrOutput
ToModuleModuleLinkHashPtrOutputWithContext(context.Context) ModuleModuleLinkHashPtrOutput
}
type moduleModuleLinkHashPtrType ModuleModuleLinkHashArgs
func ModuleModuleLinkHashPtr(v *ModuleModuleLinkHashArgs) ModuleModuleLinkHashPtrInput {
return (*moduleModuleLinkHashPtrType)(v)
}
func (*moduleModuleLinkHashPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ModuleModuleLinkHash)(nil)).Elem()
}
func (i *moduleModuleLinkHashPtrType) ToModuleModuleLinkHashPtrOutput() ModuleModuleLinkHashPtrOutput {
return i.ToModuleModuleLinkHashPtrOutputWithContext(context.Background())
}
func (i *moduleModuleLinkHashPtrType) ToModuleModuleLinkHashPtrOutputWithContext(ctx context.Context) ModuleModuleLinkHashPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleModuleLinkHashPtrOutput)
}
type ModuleModuleLinkHashOutput struct{ *pulumi.OutputState }
func (ModuleModuleLinkHashOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ModuleModuleLinkHash)(nil)).Elem()
}
func (o ModuleModuleLinkHashOutput) ToModuleModuleLinkHashOutput() ModuleModuleLinkHashOutput {
return o
}
func (o ModuleModuleLinkHashOutput) ToModuleModuleLinkHashOutputWithContext(ctx context.Context) ModuleModuleLinkHashOutput {
return o
}
func (o ModuleModuleLinkHashOutput) ToModuleModuleLinkHashPtrOutput() ModuleModuleLinkHashPtrOutput {
return o.ToModuleModuleLinkHashPtrOutputWithContext(context.Background())
}
func (o ModuleModuleLinkHashOutput) ToModuleModuleLinkHashPtrOutputWithContext(ctx context.Context) ModuleModuleLinkHashPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ModuleModuleLinkHash) *ModuleModuleLinkHash {
return &v
}).(ModuleModuleLinkHashPtrOutput)
}
// Specifies the algorithm used for the hash content.
func (o ModuleModuleLinkHashOutput) Algorithm() pulumi.StringOutput {
return o.ApplyT(func(v ModuleModuleLinkHash) string { return v.Algorithm }).(pulumi.StringOutput)
}
// The hash value of the content.
func (o ModuleModuleLinkHashOutput) Value() pulumi.StringOutput {
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | true |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/automation/getIntVariable.go | sdk/go/azure/automation/getIntVariable.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 automation
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 Automation Int Variable.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := automation.LookupIntVariable(ctx, &automation.LookupIntVariableArgs{
// Name: "tfex-example-var",
// ResourceGroupName: "tfex-example-rg",
// AutomationAccountName: "tfex-example-account",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("variableId", example.Id)
// return nil
// })
// }
//
// ```
func LookupIntVariable(ctx *pulumi.Context, args *LookupIntVariableArgs, opts ...pulumi.InvokeOption) (*LookupIntVariableResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupIntVariableResult
err := ctx.Invoke("azure:automation/getIntVariable:getIntVariable", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getIntVariable.
type LookupIntVariableArgs struct {
// The name of the automation account in which the Automation Variable exists.
AutomationAccountName string `pulumi:"automationAccountName"`
// The name of the Automation Variable.
Name string `pulumi:"name"`
// The Name of the Resource Group where the automation account exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getIntVariable.
type LookupIntVariableResult struct {
AutomationAccountName string `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description string `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted bool `pulumi:"encrypted"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a `integer`.
Value int `pulumi:"value"`
}
func LookupIntVariableOutput(ctx *pulumi.Context, args LookupIntVariableOutputArgs, opts ...pulumi.InvokeOption) LookupIntVariableResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupIntVariableResultOutput, error) {
args := v.(LookupIntVariableArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:automation/getIntVariable:getIntVariable", args, LookupIntVariableResultOutput{}, options).(LookupIntVariableResultOutput), nil
}).(LookupIntVariableResultOutput)
}
// A collection of arguments for invoking getIntVariable.
type LookupIntVariableOutputArgs struct {
// The name of the automation account in which the Automation Variable exists.
AutomationAccountName pulumi.StringInput `pulumi:"automationAccountName"`
// The name of the Automation Variable.
Name pulumi.StringInput `pulumi:"name"`
// The Name of the Resource Group where the automation account exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupIntVariableOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupIntVariableArgs)(nil)).Elem()
}
// A collection of values returned by getIntVariable.
type LookupIntVariableResultOutput struct{ *pulumi.OutputState }
func (LookupIntVariableResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupIntVariableResult)(nil)).Elem()
}
func (o LookupIntVariableResultOutput) ToLookupIntVariableResultOutput() LookupIntVariableResultOutput {
return o
}
func (o LookupIntVariableResultOutput) ToLookupIntVariableResultOutputWithContext(ctx context.Context) LookupIntVariableResultOutput {
return o
}
func (o LookupIntVariableResultOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v LookupIntVariableResult) string { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The description of the Automation Variable.
func (o LookupIntVariableResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupIntVariableResult) string { return v.Description }).(pulumi.StringOutput)
}
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
func (o LookupIntVariableResultOutput) Encrypted() pulumi.BoolOutput {
return o.ApplyT(func(v LookupIntVariableResult) bool { return v.Encrypted }).(pulumi.BoolOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupIntVariableResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupIntVariableResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupIntVariableResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupIntVariableResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupIntVariableResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupIntVariableResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The value of the Automation Variable as a `integer`.
func (o LookupIntVariableResultOutput) Value() pulumi.IntOutput {
return o.ApplyT(func(v LookupIntVariableResult) int { return v.Value }).(pulumi.IntOutput)
}
func init() {
pulumi.RegisterOutputType(LookupIntVariableResultOutput{})
}
| 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/automation/hybridRunbookWorker.go | sdk/go/azure/automation/hybridRunbookWorker.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Automation Hybrid Runbook Worker.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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/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
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("example-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// exampleHybridRunbookWorkerGroup, err := automation.NewHybridRunbookWorkerGroup(ctx, "example", &automation.HybridRunbookWorkerGroupArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-vnet"),
// ResourceGroupName: example.Name,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("192.168.1.0/24"),
// },
// Location: example.Location,
// })
// 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("192.168.1.0/24"),
// },
// })
// if err != nil {
// return err
// }
// exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{
// Name: pulumi.String("example-nic"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// IpConfigurations: network.NetworkInterfaceIpConfigurationArray{
// &network.NetworkInterfaceIpConfigurationArgs{
// Name: pulumi.String("vm-example"),
// SubnetId: exampleSubnet.ID(),
// PrivateIpAddressAllocation: pulumi.String("Dynamic"),
// },
// },
// })
// if err != nil {
// return err
// }
// exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "example", &compute.LinuxVirtualMachineArgs{
// Name: pulumi.String("example-vm"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Size: pulumi.String("Standard_B1s"),
// AdminUsername: pulumi.String("testadmin"),
// AdminPassword: pulumi.String("Password1234!"),
// DisablePasswordAuthentication: pulumi.Bool(false),
// 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"),
// },
// OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{
// Caching: pulumi.String("ReadWrite"),
// StorageAccountType: pulumi.String("Standard_LRS"),
// },
// NetworkInterfaceIds: pulumi.StringArray{
// exampleNetworkInterface.ID(),
// },
// })
// if err != nil {
// return err
// }
// _, err = automation.NewHybridRunbookWorker(ctx, "example", &automation.HybridRunbookWorkerArgs{
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// WorkerGroupName: exampleHybridRunbookWorkerGroup.Name,
// VmResourceId: exampleLinuxVirtualMachine.ID(),
// WorkerId: pulumi.String("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.Automation` - 2024-10-23
//
// ## Import
//
// Automations can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/hybridRunbookWorker:HybridRunbookWorker example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/hybridRunbookWorkerGroups/group1/hybridRunbookWorkers/00000000-0000-0000-0000-000000000000
// ```
type HybridRunbookWorker struct {
pulumi.CustomResourceState
// The name of the automation account in which the Hybrid Worker is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// The IP address of assigned machine.
Ip pulumi.StringOutput `pulumi:"ip"`
// Last Heartbeat from the Worker.
LastSeenDateTime pulumi.StringOutput `pulumi:"lastSeenDateTime"`
// The registration time of the worker machine.
RegistrationDateTime pulumi.StringOutput `pulumi:"registrationDateTime"`
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The ID of the virtual machine used for this HybridWorker. Changing this forces a new Automation to be created.
VmResourceId pulumi.StringOutput `pulumi:"vmResourceId"`
// The name of the HybridWorker Group. Changing this forces a new Automation to be created.
WorkerGroupName pulumi.StringOutput `pulumi:"workerGroupName"`
// Specify the ID of this HybridWorker in UUID notation. Changing this forces a new Automation to be created.
WorkerId pulumi.StringOutput `pulumi:"workerId"`
// The name of HybridWorker.
WorkerName pulumi.StringOutput `pulumi:"workerName"`
// The type of the HybridWorker, the possible values are `HybridV1` and `HybridV2`.
WorkerType pulumi.StringOutput `pulumi:"workerType"`
}
// NewHybridRunbookWorker registers a new resource with the given unique name, arguments, and options.
func NewHybridRunbookWorker(ctx *pulumi.Context,
name string, args *HybridRunbookWorkerArgs, opts ...pulumi.ResourceOption) (*HybridRunbookWorker, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.VmResourceId == nil {
return nil, errors.New("invalid value for required argument 'VmResourceId'")
}
if args.WorkerGroupName == nil {
return nil, errors.New("invalid value for required argument 'WorkerGroupName'")
}
if args.WorkerId == nil {
return nil, errors.New("invalid value for required argument 'WorkerId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource HybridRunbookWorker
err := ctx.RegisterResource("azure:automation/hybridRunbookWorker:HybridRunbookWorker", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetHybridRunbookWorker gets an existing HybridRunbookWorker 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 GetHybridRunbookWorker(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *HybridRunbookWorkerState, opts ...pulumi.ResourceOption) (*HybridRunbookWorker, error) {
var resource HybridRunbookWorker
err := ctx.ReadResource("azure:automation/hybridRunbookWorker:HybridRunbookWorker", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering HybridRunbookWorker resources.
type hybridRunbookWorkerState struct {
// The name of the automation account in which the Hybrid Worker is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// The IP address of assigned machine.
Ip *string `pulumi:"ip"`
// Last Heartbeat from the Worker.
LastSeenDateTime *string `pulumi:"lastSeenDateTime"`
// The registration time of the worker machine.
RegistrationDateTime *string `pulumi:"registrationDateTime"`
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The ID of the virtual machine used for this HybridWorker. Changing this forces a new Automation to be created.
VmResourceId *string `pulumi:"vmResourceId"`
// The name of the HybridWorker Group. Changing this forces a new Automation to be created.
WorkerGroupName *string `pulumi:"workerGroupName"`
// Specify the ID of this HybridWorker in UUID notation. Changing this forces a new Automation to be created.
WorkerId *string `pulumi:"workerId"`
// The name of HybridWorker.
WorkerName *string `pulumi:"workerName"`
// The type of the HybridWorker, the possible values are `HybridV1` and `HybridV2`.
WorkerType *string `pulumi:"workerType"`
}
type HybridRunbookWorkerState struct {
// The name of the automation account in which the Hybrid Worker is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// The IP address of assigned machine.
Ip pulumi.StringPtrInput
// Last Heartbeat from the Worker.
LastSeenDateTime pulumi.StringPtrInput
// The registration time of the worker machine.
RegistrationDateTime pulumi.StringPtrInput
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
ResourceGroupName pulumi.StringPtrInput
// The ID of the virtual machine used for this HybridWorker. Changing this forces a new Automation to be created.
VmResourceId pulumi.StringPtrInput
// The name of the HybridWorker Group. Changing this forces a new Automation to be created.
WorkerGroupName pulumi.StringPtrInput
// Specify the ID of this HybridWorker in UUID notation. Changing this forces a new Automation to be created.
WorkerId pulumi.StringPtrInput
// The name of HybridWorker.
WorkerName pulumi.StringPtrInput
// The type of the HybridWorker, the possible values are `HybridV1` and `HybridV2`.
WorkerType pulumi.StringPtrInput
}
func (HybridRunbookWorkerState) ElementType() reflect.Type {
return reflect.TypeOf((*hybridRunbookWorkerState)(nil)).Elem()
}
type hybridRunbookWorkerArgs struct {
// The name of the automation account in which the Hybrid Worker is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The ID of the virtual machine used for this HybridWorker. Changing this forces a new Automation to be created.
VmResourceId string `pulumi:"vmResourceId"`
// The name of the HybridWorker Group. Changing this forces a new Automation to be created.
WorkerGroupName string `pulumi:"workerGroupName"`
// Specify the ID of this HybridWorker in UUID notation. Changing this forces a new Automation to be created.
WorkerId string `pulumi:"workerId"`
}
// The set of arguments for constructing a HybridRunbookWorker resource.
type HybridRunbookWorkerArgs struct {
// The name of the automation account in which the Hybrid Worker is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
ResourceGroupName pulumi.StringInput
// The ID of the virtual machine used for this HybridWorker. Changing this forces a new Automation to be created.
VmResourceId pulumi.StringInput
// The name of the HybridWorker Group. Changing this forces a new Automation to be created.
WorkerGroupName pulumi.StringInput
// Specify the ID of this HybridWorker in UUID notation. Changing this forces a new Automation to be created.
WorkerId pulumi.StringInput
}
func (HybridRunbookWorkerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*hybridRunbookWorkerArgs)(nil)).Elem()
}
type HybridRunbookWorkerInput interface {
pulumi.Input
ToHybridRunbookWorkerOutput() HybridRunbookWorkerOutput
ToHybridRunbookWorkerOutputWithContext(ctx context.Context) HybridRunbookWorkerOutput
}
func (*HybridRunbookWorker) ElementType() reflect.Type {
return reflect.TypeOf((**HybridRunbookWorker)(nil)).Elem()
}
func (i *HybridRunbookWorker) ToHybridRunbookWorkerOutput() HybridRunbookWorkerOutput {
return i.ToHybridRunbookWorkerOutputWithContext(context.Background())
}
func (i *HybridRunbookWorker) ToHybridRunbookWorkerOutputWithContext(ctx context.Context) HybridRunbookWorkerOutput {
return pulumi.ToOutputWithContext(ctx, i).(HybridRunbookWorkerOutput)
}
// HybridRunbookWorkerArrayInput is an input type that accepts HybridRunbookWorkerArray and HybridRunbookWorkerArrayOutput values.
// You can construct a concrete instance of `HybridRunbookWorkerArrayInput` via:
//
// HybridRunbookWorkerArray{ HybridRunbookWorkerArgs{...} }
type HybridRunbookWorkerArrayInput interface {
pulumi.Input
ToHybridRunbookWorkerArrayOutput() HybridRunbookWorkerArrayOutput
ToHybridRunbookWorkerArrayOutputWithContext(context.Context) HybridRunbookWorkerArrayOutput
}
type HybridRunbookWorkerArray []HybridRunbookWorkerInput
func (HybridRunbookWorkerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*HybridRunbookWorker)(nil)).Elem()
}
func (i HybridRunbookWorkerArray) ToHybridRunbookWorkerArrayOutput() HybridRunbookWorkerArrayOutput {
return i.ToHybridRunbookWorkerArrayOutputWithContext(context.Background())
}
func (i HybridRunbookWorkerArray) ToHybridRunbookWorkerArrayOutputWithContext(ctx context.Context) HybridRunbookWorkerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(HybridRunbookWorkerArrayOutput)
}
// HybridRunbookWorkerMapInput is an input type that accepts HybridRunbookWorkerMap and HybridRunbookWorkerMapOutput values.
// You can construct a concrete instance of `HybridRunbookWorkerMapInput` via:
//
// HybridRunbookWorkerMap{ "key": HybridRunbookWorkerArgs{...} }
type HybridRunbookWorkerMapInput interface {
pulumi.Input
ToHybridRunbookWorkerMapOutput() HybridRunbookWorkerMapOutput
ToHybridRunbookWorkerMapOutputWithContext(context.Context) HybridRunbookWorkerMapOutput
}
type HybridRunbookWorkerMap map[string]HybridRunbookWorkerInput
func (HybridRunbookWorkerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*HybridRunbookWorker)(nil)).Elem()
}
func (i HybridRunbookWorkerMap) ToHybridRunbookWorkerMapOutput() HybridRunbookWorkerMapOutput {
return i.ToHybridRunbookWorkerMapOutputWithContext(context.Background())
}
func (i HybridRunbookWorkerMap) ToHybridRunbookWorkerMapOutputWithContext(ctx context.Context) HybridRunbookWorkerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(HybridRunbookWorkerMapOutput)
}
type HybridRunbookWorkerOutput struct{ *pulumi.OutputState }
func (HybridRunbookWorkerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**HybridRunbookWorker)(nil)).Elem()
}
func (o HybridRunbookWorkerOutput) ToHybridRunbookWorkerOutput() HybridRunbookWorkerOutput {
return o
}
func (o HybridRunbookWorkerOutput) ToHybridRunbookWorkerOutputWithContext(ctx context.Context) HybridRunbookWorkerOutput {
return o
}
// The name of the automation account in which the Hybrid Worker is created. Changing this forces a new resource to be created.
func (o HybridRunbookWorkerOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *HybridRunbookWorker) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The IP address of assigned machine.
func (o HybridRunbookWorkerOutput) Ip() pulumi.StringOutput {
return o.ApplyT(func(v *HybridRunbookWorker) pulumi.StringOutput { return v.Ip }).(pulumi.StringOutput)
}
// Last Heartbeat from the Worker.
func (o HybridRunbookWorkerOutput) LastSeenDateTime() pulumi.StringOutput {
return o.ApplyT(func(v *HybridRunbookWorker) pulumi.StringOutput { return v.LastSeenDateTime }).(pulumi.StringOutput)
}
// The registration time of the worker machine.
func (o HybridRunbookWorkerOutput) RegistrationDateTime() pulumi.StringOutput {
return o.ApplyT(func(v *HybridRunbookWorker) pulumi.StringOutput { return v.RegistrationDateTime }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
func (o HybridRunbookWorkerOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *HybridRunbookWorker) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The ID of the virtual machine used for this HybridWorker. Changing this forces a new Automation to be created.
func (o HybridRunbookWorkerOutput) VmResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *HybridRunbookWorker) pulumi.StringOutput { return v.VmResourceId }).(pulumi.StringOutput)
}
// The name of the HybridWorker Group. Changing this forces a new Automation to be created.
func (o HybridRunbookWorkerOutput) WorkerGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *HybridRunbookWorker) pulumi.StringOutput { return v.WorkerGroupName }).(pulumi.StringOutput)
}
// Specify the ID of this HybridWorker in UUID notation. Changing this forces a new Automation to be created.
func (o HybridRunbookWorkerOutput) WorkerId() pulumi.StringOutput {
return o.ApplyT(func(v *HybridRunbookWorker) pulumi.StringOutput { return v.WorkerId }).(pulumi.StringOutput)
}
// The name of HybridWorker.
func (o HybridRunbookWorkerOutput) WorkerName() pulumi.StringOutput {
return o.ApplyT(func(v *HybridRunbookWorker) pulumi.StringOutput { return v.WorkerName }).(pulumi.StringOutput)
}
// The type of the HybridWorker, the possible values are `HybridV1` and `HybridV2`.
func (o HybridRunbookWorkerOutput) WorkerType() pulumi.StringOutput {
return o.ApplyT(func(v *HybridRunbookWorker) pulumi.StringOutput { return v.WorkerType }).(pulumi.StringOutput)
}
type HybridRunbookWorkerArrayOutput struct{ *pulumi.OutputState }
func (HybridRunbookWorkerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*HybridRunbookWorker)(nil)).Elem()
}
func (o HybridRunbookWorkerArrayOutput) ToHybridRunbookWorkerArrayOutput() HybridRunbookWorkerArrayOutput {
return o
}
func (o HybridRunbookWorkerArrayOutput) ToHybridRunbookWorkerArrayOutputWithContext(ctx context.Context) HybridRunbookWorkerArrayOutput {
return o
}
func (o HybridRunbookWorkerArrayOutput) Index(i pulumi.IntInput) HybridRunbookWorkerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *HybridRunbookWorker {
return vs[0].([]*HybridRunbookWorker)[vs[1].(int)]
}).(HybridRunbookWorkerOutput)
}
type HybridRunbookWorkerMapOutput struct{ *pulumi.OutputState }
func (HybridRunbookWorkerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*HybridRunbookWorker)(nil)).Elem()
}
func (o HybridRunbookWorkerMapOutput) ToHybridRunbookWorkerMapOutput() HybridRunbookWorkerMapOutput {
return o
}
func (o HybridRunbookWorkerMapOutput) ToHybridRunbookWorkerMapOutputWithContext(ctx context.Context) HybridRunbookWorkerMapOutput {
return o
}
func (o HybridRunbookWorkerMapOutput) MapIndex(k pulumi.StringInput) HybridRunbookWorkerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *HybridRunbookWorker {
return vs[0].(map[string]*HybridRunbookWorker)[vs[1].(string)]
}).(HybridRunbookWorkerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*HybridRunbookWorkerInput)(nil)).Elem(), &HybridRunbookWorker{})
pulumi.RegisterInputType(reflect.TypeOf((*HybridRunbookWorkerArrayInput)(nil)).Elem(), HybridRunbookWorkerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*HybridRunbookWorkerMapInput)(nil)).Elem(), HybridRunbookWorkerMap{})
pulumi.RegisterOutputType(HybridRunbookWorkerOutput{})
pulumi.RegisterOutputType(HybridRunbookWorkerArrayOutput{})
pulumi.RegisterOutputType(HybridRunbookWorkerMapOutput{})
}
| 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/automation/webhook.go | sdk/go/azure/automation/webhook.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Automation Runbook's Webhook.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("account1"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// exampleRunBook, err := automation.NewRunBook(ctx, "example", &automation.RunBookArgs{
// Name: pulumi.String("Get-AzureVMTutorial"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// LogVerbose: pulumi.Bool(true),
// LogProgress: pulumi.Bool(true),
// Description: pulumi.String("This is an example runbook"),
// RunbookType: pulumi.String("PowerShellWorkflow"),
// PublishContentLink: &automation.RunBookPublishContentLinkArgs{
// Uri: pulumi.String("https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1"),
// },
// })
// if err != nil {
// return err
// }
// _, err = automation.NewWebhook(ctx, "example", &automation.WebhookArgs{
// Name: pulumi.String("TestRunbook_webhook"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// ExpiryTime: pulumi.String("2021-12-31T00:00:00Z"),
// Enabled: pulumi.Bool(true),
// RunbookName: exampleRunBook.Name,
// Parameters: pulumi.StringMap{
// "input": pulumi.String("parameter"),
// },
// })
// 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.Automation` - 2015-10-31
//
// ## Import
//
// Automation Webhooks can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/webhook:Webhook TestRunbook_webhook /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/webHooks/TestRunbook_webhook
// ```
type Webhook struct {
pulumi.CustomResourceState
// The name of the automation account in which the Webhook is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// Controls if Webhook is enabled. Defaults to `true`.
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
// Timestamp when the webhook expires. Changing this forces a new resource to be created.
ExpiryTime pulumi.StringOutput `pulumi:"expiryTime"`
// Specifies the name of the Webhook. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Map of input parameters passed to runbook.
Parameters pulumi.StringMapOutput `pulumi:"parameters"`
// The name of the resource group in which the Webhook is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Name of the hybrid worker group the Webhook job will run on.
RunOnWorkerGroup pulumi.StringPtrOutput `pulumi:"runOnWorkerGroup"`
// Name of the Automation Runbook to execute by Webhook.
RunbookName pulumi.StringOutput `pulumi:"runbookName"`
// URI to initiate the webhook. Can be generated using [Generate URI API](https://docs.microsoft.com/rest/api/automation/webhook/generate-uri). By default, new URI is generated on each new resource creation. Changing this forces a new resource to be created.
Uri pulumi.StringOutput `pulumi:"uri"`
}
// NewWebhook registers a new resource with the given unique name, arguments, and options.
func NewWebhook(ctx *pulumi.Context,
name string, args *WebhookArgs, opts ...pulumi.ResourceOption) (*Webhook, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.ExpiryTime == nil {
return nil, errors.New("invalid value for required argument 'ExpiryTime'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.RunbookName == nil {
return nil, errors.New("invalid value for required argument 'RunbookName'")
}
if args.Uri != nil {
args.Uri = pulumi.ToSecret(args.Uri).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"uri",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Webhook
err := ctx.RegisterResource("azure:automation/webhook:Webhook", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWebhook gets an existing Webhook 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 GetWebhook(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WebhookState, opts ...pulumi.ResourceOption) (*Webhook, error) {
var resource Webhook
err := ctx.ReadResource("azure:automation/webhook:Webhook", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Webhook resources.
type webhookState struct {
// The name of the automation account in which the Webhook is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// Controls if Webhook is enabled. Defaults to `true`.
Enabled *bool `pulumi:"enabled"`
// Timestamp when the webhook expires. Changing this forces a new resource to be created.
ExpiryTime *string `pulumi:"expiryTime"`
// Specifies the name of the Webhook. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Map of input parameters passed to runbook.
Parameters map[string]string `pulumi:"parameters"`
// The name of the resource group in which the Webhook is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Name of the hybrid worker group the Webhook job will run on.
RunOnWorkerGroup *string `pulumi:"runOnWorkerGroup"`
// Name of the Automation Runbook to execute by Webhook.
RunbookName *string `pulumi:"runbookName"`
// URI to initiate the webhook. Can be generated using [Generate URI API](https://docs.microsoft.com/rest/api/automation/webhook/generate-uri). By default, new URI is generated on each new resource creation. Changing this forces a new resource to be created.
Uri *string `pulumi:"uri"`
}
type WebhookState struct {
// The name of the automation account in which the Webhook is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// Controls if Webhook is enabled. Defaults to `true`.
Enabled pulumi.BoolPtrInput
// Timestamp when the webhook expires. Changing this forces a new resource to be created.
ExpiryTime pulumi.StringPtrInput
// Specifies the name of the Webhook. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Map of input parameters passed to runbook.
Parameters pulumi.StringMapInput
// The name of the resource group in which the Webhook is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Name of the hybrid worker group the Webhook job will run on.
RunOnWorkerGroup pulumi.StringPtrInput
// Name of the Automation Runbook to execute by Webhook.
RunbookName pulumi.StringPtrInput
// URI to initiate the webhook. Can be generated using [Generate URI API](https://docs.microsoft.com/rest/api/automation/webhook/generate-uri). By default, new URI is generated on each new resource creation. Changing this forces a new resource to be created.
Uri pulumi.StringPtrInput
}
func (WebhookState) ElementType() reflect.Type {
return reflect.TypeOf((*webhookState)(nil)).Elem()
}
type webhookArgs struct {
// The name of the automation account in which the Webhook is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// Controls if Webhook is enabled. Defaults to `true`.
Enabled *bool `pulumi:"enabled"`
// Timestamp when the webhook expires. Changing this forces a new resource to be created.
ExpiryTime string `pulumi:"expiryTime"`
// Specifies the name of the Webhook. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Map of input parameters passed to runbook.
Parameters map[string]string `pulumi:"parameters"`
// The name of the resource group in which the Webhook is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Name of the hybrid worker group the Webhook job will run on.
RunOnWorkerGroup *string `pulumi:"runOnWorkerGroup"`
// Name of the Automation Runbook to execute by Webhook.
RunbookName string `pulumi:"runbookName"`
// URI to initiate the webhook. Can be generated using [Generate URI API](https://docs.microsoft.com/rest/api/automation/webhook/generate-uri). By default, new URI is generated on each new resource creation. Changing this forces a new resource to be created.
Uri *string `pulumi:"uri"`
}
// The set of arguments for constructing a Webhook resource.
type WebhookArgs struct {
// The name of the automation account in which the Webhook is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// Controls if Webhook is enabled. Defaults to `true`.
Enabled pulumi.BoolPtrInput
// Timestamp when the webhook expires. Changing this forces a new resource to be created.
ExpiryTime pulumi.StringInput
// Specifies the name of the Webhook. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Map of input parameters passed to runbook.
Parameters pulumi.StringMapInput
// The name of the resource group in which the Webhook is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Name of the hybrid worker group the Webhook job will run on.
RunOnWorkerGroup pulumi.StringPtrInput
// Name of the Automation Runbook to execute by Webhook.
RunbookName pulumi.StringInput
// URI to initiate the webhook. Can be generated using [Generate URI API](https://docs.microsoft.com/rest/api/automation/webhook/generate-uri). By default, new URI is generated on each new resource creation. Changing this forces a new resource to be created.
Uri pulumi.StringPtrInput
}
func (WebhookArgs) ElementType() reflect.Type {
return reflect.TypeOf((*webhookArgs)(nil)).Elem()
}
type WebhookInput interface {
pulumi.Input
ToWebhookOutput() WebhookOutput
ToWebhookOutputWithContext(ctx context.Context) WebhookOutput
}
func (*Webhook) ElementType() reflect.Type {
return reflect.TypeOf((**Webhook)(nil)).Elem()
}
func (i *Webhook) ToWebhookOutput() WebhookOutput {
return i.ToWebhookOutputWithContext(context.Background())
}
func (i *Webhook) ToWebhookOutputWithContext(ctx context.Context) WebhookOutput {
return pulumi.ToOutputWithContext(ctx, i).(WebhookOutput)
}
// WebhookArrayInput is an input type that accepts WebhookArray and WebhookArrayOutput values.
// You can construct a concrete instance of `WebhookArrayInput` via:
//
// WebhookArray{ WebhookArgs{...} }
type WebhookArrayInput interface {
pulumi.Input
ToWebhookArrayOutput() WebhookArrayOutput
ToWebhookArrayOutputWithContext(context.Context) WebhookArrayOutput
}
type WebhookArray []WebhookInput
func (WebhookArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Webhook)(nil)).Elem()
}
func (i WebhookArray) ToWebhookArrayOutput() WebhookArrayOutput {
return i.ToWebhookArrayOutputWithContext(context.Background())
}
func (i WebhookArray) ToWebhookArrayOutputWithContext(ctx context.Context) WebhookArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WebhookArrayOutput)
}
// WebhookMapInput is an input type that accepts WebhookMap and WebhookMapOutput values.
// You can construct a concrete instance of `WebhookMapInput` via:
//
// WebhookMap{ "key": WebhookArgs{...} }
type WebhookMapInput interface {
pulumi.Input
ToWebhookMapOutput() WebhookMapOutput
ToWebhookMapOutputWithContext(context.Context) WebhookMapOutput
}
type WebhookMap map[string]WebhookInput
func (WebhookMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Webhook)(nil)).Elem()
}
func (i WebhookMap) ToWebhookMapOutput() WebhookMapOutput {
return i.ToWebhookMapOutputWithContext(context.Background())
}
func (i WebhookMap) ToWebhookMapOutputWithContext(ctx context.Context) WebhookMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WebhookMapOutput)
}
type WebhookOutput struct{ *pulumi.OutputState }
func (WebhookOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Webhook)(nil)).Elem()
}
func (o WebhookOutput) ToWebhookOutput() WebhookOutput {
return o
}
func (o WebhookOutput) ToWebhookOutputWithContext(ctx context.Context) WebhookOutput {
return o
}
// The name of the automation account in which the Webhook is created. Changing this forces a new resource to be created.
func (o WebhookOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *Webhook) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// Controls if Webhook is enabled. Defaults to `true`.
func (o WebhookOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Webhook) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput)
}
// Timestamp when the webhook expires. Changing this forces a new resource to be created.
func (o WebhookOutput) ExpiryTime() pulumi.StringOutput {
return o.ApplyT(func(v *Webhook) pulumi.StringOutput { return v.ExpiryTime }).(pulumi.StringOutput)
}
// Specifies the name of the Webhook. Changing this forces a new resource to be created.
func (o WebhookOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Webhook) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Map of input parameters passed to runbook.
func (o WebhookOutput) Parameters() pulumi.StringMapOutput {
return o.ApplyT(func(v *Webhook) pulumi.StringMapOutput { return v.Parameters }).(pulumi.StringMapOutput)
}
// The name of the resource group in which the Webhook is created. Changing this forces a new resource to be created.
func (o WebhookOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Webhook) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Name of the hybrid worker group the Webhook job will run on.
func (o WebhookOutput) RunOnWorkerGroup() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Webhook) pulumi.StringPtrOutput { return v.RunOnWorkerGroup }).(pulumi.StringPtrOutput)
}
// Name of the Automation Runbook to execute by Webhook.
func (o WebhookOutput) RunbookName() pulumi.StringOutput {
return o.ApplyT(func(v *Webhook) pulumi.StringOutput { return v.RunbookName }).(pulumi.StringOutput)
}
// URI to initiate the webhook. Can be generated using [Generate URI API](https://docs.microsoft.com/rest/api/automation/webhook/generate-uri). By default, new URI is generated on each new resource creation. Changing this forces a new resource to be created.
func (o WebhookOutput) Uri() pulumi.StringOutput {
return o.ApplyT(func(v *Webhook) pulumi.StringOutput { return v.Uri }).(pulumi.StringOutput)
}
type WebhookArrayOutput struct{ *pulumi.OutputState }
func (WebhookArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Webhook)(nil)).Elem()
}
func (o WebhookArrayOutput) ToWebhookArrayOutput() WebhookArrayOutput {
return o
}
func (o WebhookArrayOutput) ToWebhookArrayOutputWithContext(ctx context.Context) WebhookArrayOutput {
return o
}
func (o WebhookArrayOutput) Index(i pulumi.IntInput) WebhookOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Webhook {
return vs[0].([]*Webhook)[vs[1].(int)]
}).(WebhookOutput)
}
type WebhookMapOutput struct{ *pulumi.OutputState }
func (WebhookMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Webhook)(nil)).Elem()
}
func (o WebhookMapOutput) ToWebhookMapOutput() WebhookMapOutput {
return o
}
func (o WebhookMapOutput) ToWebhookMapOutputWithContext(ctx context.Context) WebhookMapOutput {
return o
}
func (o WebhookMapOutput) MapIndex(k pulumi.StringInput) WebhookOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Webhook {
return vs[0].(map[string]*Webhook)[vs[1].(string)]
}).(WebhookOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WebhookInput)(nil)).Elem(), &Webhook{})
pulumi.RegisterInputType(reflect.TypeOf((*WebhookArrayInput)(nil)).Elem(), WebhookArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WebhookMapInput)(nil)).Elem(), WebhookMap{})
pulumi.RegisterOutputType(WebhookOutput{})
pulumi.RegisterOutputType(WebhookArrayOutput{})
pulumi.RegisterOutputType(WebhookMapOutput{})
}
| 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/automation/getRunbook.go | sdk/go/azure/automation/getRunbook.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 automation
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 Automation Runbook.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := automation.GetRunbook(ctx, &automation.GetRunbookArgs{
// Name: "existing-runbook",
// ResourceGroupName: "existing",
// AutomationAccountName: "existing-automation",
// }, 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.Automation` - 2024-10-23
func GetRunbook(ctx *pulumi.Context, args *GetRunbookArgs, opts ...pulumi.InvokeOption) (*GetRunbookResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetRunbookResult
err := ctx.Invoke("azure:automation/getRunbook:getRunbook", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getRunbook.
type GetRunbookArgs struct {
// The name of the Automation Account the runbook belongs to.
AutomationAccountName string `pulumi:"automationAccountName"`
// The name of the Automation Runbook.
Name string `pulumi:"name"`
// The name of the Resource Group where the Automation exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getRunbook.
type GetRunbookResult struct {
AutomationAccountName string `pulumi:"automationAccountName"`
// The content of the Runbook.
Content string `pulumi:"content"`
// The description of the Runbook.
Description string `pulumi:"description"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure Region where the Runbook exists.
Location string `pulumi:"location"`
// The activity-level tracing of the Runbook.
LogActivityTraceLevel int `pulumi:"logActivityTraceLevel"`
// The Progress log option of the Runbook.
LogProgress bool `pulumi:"logProgress"`
// The Verbose log option of the Runbook.
LogVerbose bool `pulumi:"logVerbose"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The type of Runbook.
RunbookType string `pulumi:"runbookType"`
// A mapping of tags assigned to the Runbook.
Tags map[string]string `pulumi:"tags"`
}
func GetRunbookOutput(ctx *pulumi.Context, args GetRunbookOutputArgs, opts ...pulumi.InvokeOption) GetRunbookResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetRunbookResultOutput, error) {
args := v.(GetRunbookArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:automation/getRunbook:getRunbook", args, GetRunbookResultOutput{}, options).(GetRunbookResultOutput), nil
}).(GetRunbookResultOutput)
}
// A collection of arguments for invoking getRunbook.
type GetRunbookOutputArgs struct {
// The name of the Automation Account the runbook belongs to.
AutomationAccountName pulumi.StringInput `pulumi:"automationAccountName"`
// The name of the Automation Runbook.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Automation exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (GetRunbookOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetRunbookArgs)(nil)).Elem()
}
// A collection of values returned by getRunbook.
type GetRunbookResultOutput struct{ *pulumi.OutputState }
func (GetRunbookResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetRunbookResult)(nil)).Elem()
}
func (o GetRunbookResultOutput) ToGetRunbookResultOutput() GetRunbookResultOutput {
return o
}
func (o GetRunbookResultOutput) ToGetRunbookResultOutputWithContext(ctx context.Context) GetRunbookResultOutput {
return o
}
func (o GetRunbookResultOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v GetRunbookResult) string { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The content of the Runbook.
func (o GetRunbookResultOutput) Content() pulumi.StringOutput {
return o.ApplyT(func(v GetRunbookResult) string { return v.Content }).(pulumi.StringOutput)
}
// The description of the Runbook.
func (o GetRunbookResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v GetRunbookResult) string { return v.Description }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetRunbookResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetRunbookResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Azure Region where the Runbook exists.
func (o GetRunbookResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v GetRunbookResult) string { return v.Location }).(pulumi.StringOutput)
}
// The activity-level tracing of the Runbook.
func (o GetRunbookResultOutput) LogActivityTraceLevel() pulumi.IntOutput {
return o.ApplyT(func(v GetRunbookResult) int { return v.LogActivityTraceLevel }).(pulumi.IntOutput)
}
// The Progress log option of the Runbook.
func (o GetRunbookResultOutput) LogProgress() pulumi.BoolOutput {
return o.ApplyT(func(v GetRunbookResult) bool { return v.LogProgress }).(pulumi.BoolOutput)
}
// The Verbose log option of the Runbook.
func (o GetRunbookResultOutput) LogVerbose() pulumi.BoolOutput {
return o.ApplyT(func(v GetRunbookResult) bool { return v.LogVerbose }).(pulumi.BoolOutput)
}
func (o GetRunbookResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetRunbookResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o GetRunbookResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetRunbookResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The type of Runbook.
func (o GetRunbookResultOutput) RunbookType() pulumi.StringOutput {
return o.ApplyT(func(v GetRunbookResult) string { return v.RunbookType }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the Runbook.
func (o GetRunbookResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v GetRunbookResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(GetRunbookResultOutput{})
}
| 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/automation/credential.go | sdk/go/azure/automation/credential.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Automation Credential.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("account1"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewCredential(ctx, "example", &automation.CredentialArgs{
// Name: pulumi.String("credential1"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// Username: pulumi.String("example_user"),
// Password: pulumi.String("example_pwd"),
// Description: pulumi.String("This is an example credential"),
// })
// 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.Automation` - 2024-10-23
//
// ## Import
//
// Automation Credentials can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/credential:Credential credential1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/credentials/credential1
// ```
type Credential struct {
pulumi.CustomResourceState
// The name of the automation account in which the Credential is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// The description associated with this Automation Credential.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the name of the Credential. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The password associated with this Automation Credential.
Password pulumi.StringOutput `pulumi:"password"`
// The name of the resource group in which the Credential is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The username associated with this Automation Credential.
Username pulumi.StringOutput `pulumi:"username"`
}
// NewCredential registers a new resource with the given unique name, arguments, and options.
func NewCredential(ctx *pulumi.Context,
name string, args *CredentialArgs, opts ...pulumi.ResourceOption) (*Credential, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.Password == nil {
return nil, errors.New("invalid value for required argument 'Password'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Username == nil {
return nil, errors.New("invalid value for required argument 'Username'")
}
if args.Password != nil {
args.Password = pulumi.ToSecret(args.Password).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"password",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Credential
err := ctx.RegisterResource("azure:automation/credential:Credential", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCredential gets an existing Credential 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 GetCredential(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CredentialState, opts ...pulumi.ResourceOption) (*Credential, error) {
var resource Credential
err := ctx.ReadResource("azure:automation/credential:Credential", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Credential resources.
type credentialState struct {
// The name of the automation account in which the Credential is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// The description associated with this Automation Credential.
Description *string `pulumi:"description"`
// Specifies the name of the Credential. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The password associated with this Automation Credential.
Password *string `pulumi:"password"`
// The name of the resource group in which the Credential is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The username associated with this Automation Credential.
Username *string `pulumi:"username"`
}
type CredentialState struct {
// The name of the automation account in which the Credential is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// The description associated with this Automation Credential.
Description pulumi.StringPtrInput
// Specifies the name of the Credential. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The password associated with this Automation Credential.
Password pulumi.StringPtrInput
// The name of the resource group in which the Credential is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The username associated with this Automation Credential.
Username pulumi.StringPtrInput
}
func (CredentialState) ElementType() reflect.Type {
return reflect.TypeOf((*credentialState)(nil)).Elem()
}
type credentialArgs struct {
// The name of the automation account in which the Credential is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The description associated with this Automation Credential.
Description *string `pulumi:"description"`
// Specifies the name of the Credential. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The password associated with this Automation Credential.
Password string `pulumi:"password"`
// The name of the resource group in which the Credential is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The username associated with this Automation Credential.
Username string `pulumi:"username"`
}
// The set of arguments for constructing a Credential resource.
type CredentialArgs struct {
// The name of the automation account in which the Credential is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The description associated with this Automation Credential.
Description pulumi.StringPtrInput
// Specifies the name of the Credential. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The password associated with this Automation Credential.
Password pulumi.StringInput
// The name of the resource group in which the Credential is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The username associated with this Automation Credential.
Username pulumi.StringInput
}
func (CredentialArgs) ElementType() reflect.Type {
return reflect.TypeOf((*credentialArgs)(nil)).Elem()
}
type CredentialInput interface {
pulumi.Input
ToCredentialOutput() CredentialOutput
ToCredentialOutputWithContext(ctx context.Context) CredentialOutput
}
func (*Credential) ElementType() reflect.Type {
return reflect.TypeOf((**Credential)(nil)).Elem()
}
func (i *Credential) ToCredentialOutput() CredentialOutput {
return i.ToCredentialOutputWithContext(context.Background())
}
func (i *Credential) ToCredentialOutputWithContext(ctx context.Context) CredentialOutput {
return pulumi.ToOutputWithContext(ctx, i).(CredentialOutput)
}
// CredentialArrayInput is an input type that accepts CredentialArray and CredentialArrayOutput values.
// You can construct a concrete instance of `CredentialArrayInput` via:
//
// CredentialArray{ CredentialArgs{...} }
type CredentialArrayInput interface {
pulumi.Input
ToCredentialArrayOutput() CredentialArrayOutput
ToCredentialArrayOutputWithContext(context.Context) CredentialArrayOutput
}
type CredentialArray []CredentialInput
func (CredentialArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Credential)(nil)).Elem()
}
func (i CredentialArray) ToCredentialArrayOutput() CredentialArrayOutput {
return i.ToCredentialArrayOutputWithContext(context.Background())
}
func (i CredentialArray) ToCredentialArrayOutputWithContext(ctx context.Context) CredentialArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CredentialArrayOutput)
}
// CredentialMapInput is an input type that accepts CredentialMap and CredentialMapOutput values.
// You can construct a concrete instance of `CredentialMapInput` via:
//
// CredentialMap{ "key": CredentialArgs{...} }
type CredentialMapInput interface {
pulumi.Input
ToCredentialMapOutput() CredentialMapOutput
ToCredentialMapOutputWithContext(context.Context) CredentialMapOutput
}
type CredentialMap map[string]CredentialInput
func (CredentialMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Credential)(nil)).Elem()
}
func (i CredentialMap) ToCredentialMapOutput() CredentialMapOutput {
return i.ToCredentialMapOutputWithContext(context.Background())
}
func (i CredentialMap) ToCredentialMapOutputWithContext(ctx context.Context) CredentialMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CredentialMapOutput)
}
type CredentialOutput struct{ *pulumi.OutputState }
func (CredentialOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Credential)(nil)).Elem()
}
func (o CredentialOutput) ToCredentialOutput() CredentialOutput {
return o
}
func (o CredentialOutput) ToCredentialOutputWithContext(ctx context.Context) CredentialOutput {
return o
}
// The name of the automation account in which the Credential is created. Changing this forces a new resource to be created.
func (o CredentialOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *Credential) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The description associated with this Automation Credential.
func (o CredentialOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Credential) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Credential. Changing this forces a new resource to be created.
func (o CredentialOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Credential) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The password associated with this Automation Credential.
func (o CredentialOutput) Password() pulumi.StringOutput {
return o.ApplyT(func(v *Credential) pulumi.StringOutput { return v.Password }).(pulumi.StringOutput)
}
// The name of the resource group in which the Credential is created. Changing this forces a new resource to be created.
func (o CredentialOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Credential) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The username associated with this Automation Credential.
func (o CredentialOutput) Username() pulumi.StringOutput {
return o.ApplyT(func(v *Credential) pulumi.StringOutput { return v.Username }).(pulumi.StringOutput)
}
type CredentialArrayOutput struct{ *pulumi.OutputState }
func (CredentialArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Credential)(nil)).Elem()
}
func (o CredentialArrayOutput) ToCredentialArrayOutput() CredentialArrayOutput {
return o
}
func (o CredentialArrayOutput) ToCredentialArrayOutputWithContext(ctx context.Context) CredentialArrayOutput {
return o
}
func (o CredentialArrayOutput) Index(i pulumi.IntInput) CredentialOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Credential {
return vs[0].([]*Credential)[vs[1].(int)]
}).(CredentialOutput)
}
type CredentialMapOutput struct{ *pulumi.OutputState }
func (CredentialMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Credential)(nil)).Elem()
}
func (o CredentialMapOutput) ToCredentialMapOutput() CredentialMapOutput {
return o
}
func (o CredentialMapOutput) ToCredentialMapOutputWithContext(ctx context.Context) CredentialMapOutput {
return o
}
func (o CredentialMapOutput) MapIndex(k pulumi.StringInput) CredentialOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Credential {
return vs[0].(map[string]*Credential)[vs[1].(string)]
}).(CredentialOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CredentialInput)(nil)).Elem(), &Credential{})
pulumi.RegisterInputType(reflect.TypeOf((*CredentialArrayInput)(nil)).Elem(), CredentialArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CredentialMapInput)(nil)).Elem(), CredentialMap{})
pulumi.RegisterOutputType(CredentialOutput{})
pulumi.RegisterOutputType(CredentialArrayOutput{})
pulumi.RegisterOutputType(CredentialMapOutput{})
}
| 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/automation/powershell72Module.go | sdk/go/azure/automation/powershell72Module.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Automation Powershell 7.2 Module.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("account1"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewPowershell72Module(ctx, "example", &automation.Powershell72ModuleArgs{
// Name: pulumi.String("xActiveDirectory"),
// AutomationAccountId: exampleAccount.ID(),
// ModuleLink: &automation.Powershell72ModuleModuleLinkArgs{
// Uri: pulumi.String("https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg"),
// },
// })
// 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.Automation` - 2023-11-01
//
// ## Import
//
// Automation Modules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/powershell72Module:Powershell72Module module1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/powerShell72Modules/module1
// ```
type Powershell72Module struct {
pulumi.CustomResourceState
// The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
AutomationAccountId pulumi.StringOutput `pulumi:"automationAccountId"`
// A `moduleLink` block as defined below.
ModuleLink Powershell72ModuleModuleLinkOutput `pulumi:"moduleLink"`
// Specifies the name of the Module. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewPowershell72Module registers a new resource with the given unique name, arguments, and options.
func NewPowershell72Module(ctx *pulumi.Context,
name string, args *Powershell72ModuleArgs, opts ...pulumi.ResourceOption) (*Powershell72Module, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountId == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountId'")
}
if args.ModuleLink == nil {
return nil, errors.New("invalid value for required argument 'ModuleLink'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Powershell72Module
err := ctx.RegisterResource("azure:automation/powershell72Module:Powershell72Module", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPowershell72Module gets an existing Powershell72Module 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 GetPowershell72Module(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *Powershell72ModuleState, opts ...pulumi.ResourceOption) (*Powershell72Module, error) {
var resource Powershell72Module
err := ctx.ReadResource("azure:automation/powershell72Module:Powershell72Module", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Powershell72Module resources.
type powershell72ModuleState struct {
// The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
AutomationAccountId *string `pulumi:"automationAccountId"`
// A `moduleLink` block as defined below.
ModuleLink *Powershell72ModuleModuleLink `pulumi:"moduleLink"`
// Specifies the name of the Module. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type Powershell72ModuleState struct {
// The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
AutomationAccountId pulumi.StringPtrInput
// A `moduleLink` block as defined below.
ModuleLink Powershell72ModuleModuleLinkPtrInput
// Specifies the name of the Module. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (Powershell72ModuleState) ElementType() reflect.Type {
return reflect.TypeOf((*powershell72ModuleState)(nil)).Elem()
}
type powershell72ModuleArgs struct {
// The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
AutomationAccountId string `pulumi:"automationAccountId"`
// A `moduleLink` block as defined below.
ModuleLink Powershell72ModuleModuleLink `pulumi:"moduleLink"`
// Specifies the name of the Module. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Powershell72Module resource.
type Powershell72ModuleArgs struct {
// The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
AutomationAccountId pulumi.StringInput
// A `moduleLink` block as defined below.
ModuleLink Powershell72ModuleModuleLinkInput
// Specifies the name of the Module. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (Powershell72ModuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*powershell72ModuleArgs)(nil)).Elem()
}
type Powershell72ModuleInput interface {
pulumi.Input
ToPowershell72ModuleOutput() Powershell72ModuleOutput
ToPowershell72ModuleOutputWithContext(ctx context.Context) Powershell72ModuleOutput
}
func (*Powershell72Module) ElementType() reflect.Type {
return reflect.TypeOf((**Powershell72Module)(nil)).Elem()
}
func (i *Powershell72Module) ToPowershell72ModuleOutput() Powershell72ModuleOutput {
return i.ToPowershell72ModuleOutputWithContext(context.Background())
}
func (i *Powershell72Module) ToPowershell72ModuleOutputWithContext(ctx context.Context) Powershell72ModuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(Powershell72ModuleOutput)
}
// Powershell72ModuleArrayInput is an input type that accepts Powershell72ModuleArray and Powershell72ModuleArrayOutput values.
// You can construct a concrete instance of `Powershell72ModuleArrayInput` via:
//
// Powershell72ModuleArray{ Powershell72ModuleArgs{...} }
type Powershell72ModuleArrayInput interface {
pulumi.Input
ToPowershell72ModuleArrayOutput() Powershell72ModuleArrayOutput
ToPowershell72ModuleArrayOutputWithContext(context.Context) Powershell72ModuleArrayOutput
}
type Powershell72ModuleArray []Powershell72ModuleInput
func (Powershell72ModuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Powershell72Module)(nil)).Elem()
}
func (i Powershell72ModuleArray) ToPowershell72ModuleArrayOutput() Powershell72ModuleArrayOutput {
return i.ToPowershell72ModuleArrayOutputWithContext(context.Background())
}
func (i Powershell72ModuleArray) ToPowershell72ModuleArrayOutputWithContext(ctx context.Context) Powershell72ModuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(Powershell72ModuleArrayOutput)
}
// Powershell72ModuleMapInput is an input type that accepts Powershell72ModuleMap and Powershell72ModuleMapOutput values.
// You can construct a concrete instance of `Powershell72ModuleMapInput` via:
//
// Powershell72ModuleMap{ "key": Powershell72ModuleArgs{...} }
type Powershell72ModuleMapInput interface {
pulumi.Input
ToPowershell72ModuleMapOutput() Powershell72ModuleMapOutput
ToPowershell72ModuleMapOutputWithContext(context.Context) Powershell72ModuleMapOutput
}
type Powershell72ModuleMap map[string]Powershell72ModuleInput
func (Powershell72ModuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Powershell72Module)(nil)).Elem()
}
func (i Powershell72ModuleMap) ToPowershell72ModuleMapOutput() Powershell72ModuleMapOutput {
return i.ToPowershell72ModuleMapOutputWithContext(context.Background())
}
func (i Powershell72ModuleMap) ToPowershell72ModuleMapOutputWithContext(ctx context.Context) Powershell72ModuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(Powershell72ModuleMapOutput)
}
type Powershell72ModuleOutput struct{ *pulumi.OutputState }
func (Powershell72ModuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Powershell72Module)(nil)).Elem()
}
func (o Powershell72ModuleOutput) ToPowershell72ModuleOutput() Powershell72ModuleOutput {
return o
}
func (o Powershell72ModuleOutput) ToPowershell72ModuleOutputWithContext(ctx context.Context) Powershell72ModuleOutput {
return o
}
// The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
func (o Powershell72ModuleOutput) AutomationAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *Powershell72Module) pulumi.StringOutput { return v.AutomationAccountId }).(pulumi.StringOutput)
}
// A `moduleLink` block as defined below.
func (o Powershell72ModuleOutput) ModuleLink() Powershell72ModuleModuleLinkOutput {
return o.ApplyT(func(v *Powershell72Module) Powershell72ModuleModuleLinkOutput { return v.ModuleLink }).(Powershell72ModuleModuleLinkOutput)
}
// Specifies the name of the Module. Changing this forces a new resource to be created.
func (o Powershell72ModuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Powershell72Module) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o Powershell72ModuleOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Powershell72Module) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type Powershell72ModuleArrayOutput struct{ *pulumi.OutputState }
func (Powershell72ModuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Powershell72Module)(nil)).Elem()
}
func (o Powershell72ModuleArrayOutput) ToPowershell72ModuleArrayOutput() Powershell72ModuleArrayOutput {
return o
}
func (o Powershell72ModuleArrayOutput) ToPowershell72ModuleArrayOutputWithContext(ctx context.Context) Powershell72ModuleArrayOutput {
return o
}
func (o Powershell72ModuleArrayOutput) Index(i pulumi.IntInput) Powershell72ModuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Powershell72Module {
return vs[0].([]*Powershell72Module)[vs[1].(int)]
}).(Powershell72ModuleOutput)
}
type Powershell72ModuleMapOutput struct{ *pulumi.OutputState }
func (Powershell72ModuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Powershell72Module)(nil)).Elem()
}
func (o Powershell72ModuleMapOutput) ToPowershell72ModuleMapOutput() Powershell72ModuleMapOutput {
return o
}
func (o Powershell72ModuleMapOutput) ToPowershell72ModuleMapOutputWithContext(ctx context.Context) Powershell72ModuleMapOutput {
return o
}
func (o Powershell72ModuleMapOutput) MapIndex(k pulumi.StringInput) Powershell72ModuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Powershell72Module {
return vs[0].(map[string]*Powershell72Module)[vs[1].(string)]
}).(Powershell72ModuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*Powershell72ModuleInput)(nil)).Elem(), &Powershell72Module{})
pulumi.RegisterInputType(reflect.TypeOf((*Powershell72ModuleArrayInput)(nil)).Elem(), Powershell72ModuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*Powershell72ModuleMapInput)(nil)).Elem(), Powershell72ModuleMap{})
pulumi.RegisterOutputType(Powershell72ModuleOutput{})
pulumi.RegisterOutputType(Powershell72ModuleArrayOutput{})
pulumi.RegisterOutputType(Powershell72ModuleMapOutput{})
}
| 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/automation/connectionCertificate.go | sdk/go/azure/automation/connectionCertificate.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Automation Connection with type `Azure`.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "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 {
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("resourceGroup-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("account-example"),
// Location: exampleResourceGroup.Location,
// ResourceGroupName: exampleResourceGroup.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "certificate.pfx",
// }, nil)
// if err != nil {
// return err
// }
// exampleCertificate, err := automation.NewCertificate(ctx, "example", &automation.CertificateArgs{
// Name: pulumi.String("certificate-example"),
// ResourceGroupName: exampleResourceGroup.Name,
// AutomationAccountName: exampleAccount.Name,
// Base64: pulumi.String(invokeFilebase64.Result),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewConnectionCertificate(ctx, "example", &automation.ConnectionCertificateArgs{
// Name: pulumi.String("connection-example"),
// ResourceGroupName: exampleResourceGroup.Name,
// AutomationAccountName: exampleAccount.Name,
// AutomationCertificateName: exampleCertificate.Name,
// SubscriptionId: pulumi.String(example.SubscriptionId),
// })
// 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.Automation` - 2024-10-23
//
// ## Import
//
// Automation Connection can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/connectionCertificate:ConnectionCertificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/connections/conn1
// ```
type ConnectionCertificate struct {
pulumi.CustomResourceState
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// The name of the automation certificate.
AutomationCertificateName pulumi.StringOutput `pulumi:"automationCertificateName"`
// A description for this Connection.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The id of subscription where the automation certificate exists.
SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"`
}
// NewConnectionCertificate registers a new resource with the given unique name, arguments, and options.
func NewConnectionCertificate(ctx *pulumi.Context,
name string, args *ConnectionCertificateArgs, opts ...pulumi.ResourceOption) (*ConnectionCertificate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.AutomationCertificateName == nil {
return nil, errors.New("invalid value for required argument 'AutomationCertificateName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SubscriptionId == nil {
return nil, errors.New("invalid value for required argument 'SubscriptionId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ConnectionCertificate
err := ctx.RegisterResource("azure:automation/connectionCertificate:ConnectionCertificate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetConnectionCertificate gets an existing ConnectionCertificate 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 GetConnectionCertificate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ConnectionCertificateState, opts ...pulumi.ResourceOption) (*ConnectionCertificate, error) {
var resource ConnectionCertificate
err := ctx.ReadResource("azure:automation/connectionCertificate:ConnectionCertificate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ConnectionCertificate resources.
type connectionCertificateState struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// The name of the automation certificate.
AutomationCertificateName *string `pulumi:"automationCertificateName"`
// A description for this Connection.
Description *string `pulumi:"description"`
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The id of subscription where the automation certificate exists.
SubscriptionId *string `pulumi:"subscriptionId"`
}
type ConnectionCertificateState struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// The name of the automation certificate.
AutomationCertificateName pulumi.StringPtrInput
// A description for this Connection.
Description pulumi.StringPtrInput
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The id of subscription where the automation certificate exists.
SubscriptionId pulumi.StringPtrInput
}
func (ConnectionCertificateState) ElementType() reflect.Type {
return reflect.TypeOf((*connectionCertificateState)(nil)).Elem()
}
type connectionCertificateArgs struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The name of the automation certificate.
AutomationCertificateName string `pulumi:"automationCertificateName"`
// A description for this Connection.
Description *string `pulumi:"description"`
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The id of subscription where the automation certificate exists.
SubscriptionId string `pulumi:"subscriptionId"`
}
// The set of arguments for constructing a ConnectionCertificate resource.
type ConnectionCertificateArgs struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The name of the automation certificate.
AutomationCertificateName pulumi.StringInput
// A description for this Connection.
Description pulumi.StringPtrInput
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The id of subscription where the automation certificate exists.
SubscriptionId pulumi.StringInput
}
func (ConnectionCertificateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*connectionCertificateArgs)(nil)).Elem()
}
type ConnectionCertificateInput interface {
pulumi.Input
ToConnectionCertificateOutput() ConnectionCertificateOutput
ToConnectionCertificateOutputWithContext(ctx context.Context) ConnectionCertificateOutput
}
func (*ConnectionCertificate) ElementType() reflect.Type {
return reflect.TypeOf((**ConnectionCertificate)(nil)).Elem()
}
func (i *ConnectionCertificate) ToConnectionCertificateOutput() ConnectionCertificateOutput {
return i.ToConnectionCertificateOutputWithContext(context.Background())
}
func (i *ConnectionCertificate) ToConnectionCertificateOutputWithContext(ctx context.Context) ConnectionCertificateOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionCertificateOutput)
}
// ConnectionCertificateArrayInput is an input type that accepts ConnectionCertificateArray and ConnectionCertificateArrayOutput values.
// You can construct a concrete instance of `ConnectionCertificateArrayInput` via:
//
// ConnectionCertificateArray{ ConnectionCertificateArgs{...} }
type ConnectionCertificateArrayInput interface {
pulumi.Input
ToConnectionCertificateArrayOutput() ConnectionCertificateArrayOutput
ToConnectionCertificateArrayOutputWithContext(context.Context) ConnectionCertificateArrayOutput
}
type ConnectionCertificateArray []ConnectionCertificateInput
func (ConnectionCertificateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ConnectionCertificate)(nil)).Elem()
}
func (i ConnectionCertificateArray) ToConnectionCertificateArrayOutput() ConnectionCertificateArrayOutput {
return i.ToConnectionCertificateArrayOutputWithContext(context.Background())
}
func (i ConnectionCertificateArray) ToConnectionCertificateArrayOutputWithContext(ctx context.Context) ConnectionCertificateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionCertificateArrayOutput)
}
// ConnectionCertificateMapInput is an input type that accepts ConnectionCertificateMap and ConnectionCertificateMapOutput values.
// You can construct a concrete instance of `ConnectionCertificateMapInput` via:
//
// ConnectionCertificateMap{ "key": ConnectionCertificateArgs{...} }
type ConnectionCertificateMapInput interface {
pulumi.Input
ToConnectionCertificateMapOutput() ConnectionCertificateMapOutput
ToConnectionCertificateMapOutputWithContext(context.Context) ConnectionCertificateMapOutput
}
type ConnectionCertificateMap map[string]ConnectionCertificateInput
func (ConnectionCertificateMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ConnectionCertificate)(nil)).Elem()
}
func (i ConnectionCertificateMap) ToConnectionCertificateMapOutput() ConnectionCertificateMapOutput {
return i.ToConnectionCertificateMapOutputWithContext(context.Background())
}
func (i ConnectionCertificateMap) ToConnectionCertificateMapOutputWithContext(ctx context.Context) ConnectionCertificateMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionCertificateMapOutput)
}
type ConnectionCertificateOutput struct{ *pulumi.OutputState }
func (ConnectionCertificateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ConnectionCertificate)(nil)).Elem()
}
func (o ConnectionCertificateOutput) ToConnectionCertificateOutput() ConnectionCertificateOutput {
return o
}
func (o ConnectionCertificateOutput) ToConnectionCertificateOutputWithContext(ctx context.Context) ConnectionCertificateOutput {
return o
}
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
func (o ConnectionCertificateOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionCertificate) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The name of the automation certificate.
func (o ConnectionCertificateOutput) AutomationCertificateName() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionCertificate) pulumi.StringOutput { return v.AutomationCertificateName }).(pulumi.StringOutput)
}
// A description for this Connection.
func (o ConnectionCertificateOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ConnectionCertificate) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Connection. Changing this forces a new resource to be created.
func (o ConnectionCertificateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionCertificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
func (o ConnectionCertificateOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionCertificate) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The id of subscription where the automation certificate exists.
func (o ConnectionCertificateOutput) SubscriptionId() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionCertificate) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput)
}
type ConnectionCertificateArrayOutput struct{ *pulumi.OutputState }
func (ConnectionCertificateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ConnectionCertificate)(nil)).Elem()
}
func (o ConnectionCertificateArrayOutput) ToConnectionCertificateArrayOutput() ConnectionCertificateArrayOutput {
return o
}
func (o ConnectionCertificateArrayOutput) ToConnectionCertificateArrayOutputWithContext(ctx context.Context) ConnectionCertificateArrayOutput {
return o
}
func (o ConnectionCertificateArrayOutput) Index(i pulumi.IntInput) ConnectionCertificateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ConnectionCertificate {
return vs[0].([]*ConnectionCertificate)[vs[1].(int)]
}).(ConnectionCertificateOutput)
}
type ConnectionCertificateMapOutput struct{ *pulumi.OutputState }
func (ConnectionCertificateMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ConnectionCertificate)(nil)).Elem()
}
func (o ConnectionCertificateMapOutput) ToConnectionCertificateMapOutput() ConnectionCertificateMapOutput {
return o
}
func (o ConnectionCertificateMapOutput) ToConnectionCertificateMapOutputWithContext(ctx context.Context) ConnectionCertificateMapOutput {
return o
}
func (o ConnectionCertificateMapOutput) MapIndex(k pulumi.StringInput) ConnectionCertificateOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ConnectionCertificate {
return vs[0].(map[string]*ConnectionCertificate)[vs[1].(string)]
}).(ConnectionCertificateOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionCertificateInput)(nil)).Elem(), &ConnectionCertificate{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionCertificateArrayInput)(nil)).Elem(), ConnectionCertificateArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionCertificateMapInput)(nil)).Elem(), ConnectionCertificateMap{})
pulumi.RegisterOutputType(ConnectionCertificateOutput{})
pulumi.RegisterOutputType(ConnectionCertificateArrayOutput{})
pulumi.RegisterOutputType(ConnectionCertificateMapOutput{})
}
| 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/automation/dscNodeConfiguration.go | sdk/go/azure/automation/dscNodeConfiguration.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Automation DSC Node Configuration.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("account1"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// exampleDscConfiguration, err := automation.NewDscConfiguration(ctx, "example", &automation.DscConfigurationArgs{
// Name: pulumi.String("test"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// Location: example.Location,
// ContentEmbedded: pulumi.String("configuration test {}"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewDscNodeConfiguration(ctx, "example", &automation.DscNodeConfigurationArgs{
// Name: pulumi.String("test.localhost"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// ContentEmbedded: pulumi.String(`instance of MSFT_FileDirectoryConfiguration as $MSFT_FileDirectoryConfiguration1ref
//
// {
// ResourceID = \"[File]bla\";
// Ensure = \"Present\";
// Contents = \"bogus Content\";
// DestinationPath = \"c:\\\\bogus.txt\";
// ModuleName = \"PSDesiredStateConfiguration\";
// SourceInfo = \"::3::9::file\";
// ModuleVersion = \"1.0\";
// ConfigurationName = \"bla\";
// };
//
// instance of OMI_ConfigurationDocument
//
// {
// Version=\"2.0.0\";
// MinimumCompatibleVersion = \"1.0.0\";
// CompatibleVersionAdditionalProperties= {\"Omi_BaseResource:ConfigurationName\"};
// Author=\"bogusAuthor\";
// GenerationDate=\"06/15/2018 14:06:24\";
// GenerationHost=\"bogusComputer\";
// Name=\"test\";
// };
//
// `),
//
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleDscConfiguration,
// }))
// 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.Automation` - 2024-10-23
//
// ## Import
//
// Automation DSC Node Configuration's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/dscNodeConfiguration:DscNodeConfiguration configuration1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/nodeConfigurations/configuration1
// ```
type DscNodeConfiguration struct {
pulumi.CustomResourceState
// The name of the automation account in which the DSC Node Configuration is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
ConfigurationName pulumi.StringOutput `pulumi:"configurationName"`
// The PowerShell DSC Node Configuration (mof content).
ContentEmbedded pulumi.StringOutput `pulumi:"contentEmbedded"`
// Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewDscNodeConfiguration registers a new resource with the given unique name, arguments, and options.
func NewDscNodeConfiguration(ctx *pulumi.Context,
name string, args *DscNodeConfigurationArgs, opts ...pulumi.ResourceOption) (*DscNodeConfiguration, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.ContentEmbedded == nil {
return nil, errors.New("invalid value for required argument 'ContentEmbedded'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource DscNodeConfiguration
err := ctx.RegisterResource("azure:automation/dscNodeConfiguration:DscNodeConfiguration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDscNodeConfiguration gets an existing DscNodeConfiguration 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 GetDscNodeConfiguration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DscNodeConfigurationState, opts ...pulumi.ResourceOption) (*DscNodeConfiguration, error) {
var resource DscNodeConfiguration
err := ctx.ReadResource("azure:automation/dscNodeConfiguration:DscNodeConfiguration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DscNodeConfiguration resources.
type dscNodeConfigurationState struct {
// The name of the automation account in which the DSC Node Configuration is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
ConfigurationName *string `pulumi:"configurationName"`
// The PowerShell DSC Node Configuration (mof content).
ContentEmbedded *string `pulumi:"contentEmbedded"`
// Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type DscNodeConfigurationState struct {
// The name of the automation account in which the DSC Node Configuration is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
ConfigurationName pulumi.StringPtrInput
// The PowerShell DSC Node Configuration (mof content).
ContentEmbedded pulumi.StringPtrInput
// Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (DscNodeConfigurationState) ElementType() reflect.Type {
return reflect.TypeOf((*dscNodeConfigurationState)(nil)).Elem()
}
type dscNodeConfigurationArgs struct {
// The name of the automation account in which the DSC Node Configuration is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The PowerShell DSC Node Configuration (mof content).
ContentEmbedded string `pulumi:"contentEmbedded"`
// Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a DscNodeConfiguration resource.
type DscNodeConfigurationArgs struct {
// The name of the automation account in which the DSC Node Configuration is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The PowerShell DSC Node Configuration (mof content).
ContentEmbedded pulumi.StringInput
// Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (DscNodeConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*dscNodeConfigurationArgs)(nil)).Elem()
}
type DscNodeConfigurationInput interface {
pulumi.Input
ToDscNodeConfigurationOutput() DscNodeConfigurationOutput
ToDscNodeConfigurationOutputWithContext(ctx context.Context) DscNodeConfigurationOutput
}
func (*DscNodeConfiguration) ElementType() reflect.Type {
return reflect.TypeOf((**DscNodeConfiguration)(nil)).Elem()
}
func (i *DscNodeConfiguration) ToDscNodeConfigurationOutput() DscNodeConfigurationOutput {
return i.ToDscNodeConfigurationOutputWithContext(context.Background())
}
func (i *DscNodeConfiguration) ToDscNodeConfigurationOutputWithContext(ctx context.Context) DscNodeConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(DscNodeConfigurationOutput)
}
// DscNodeConfigurationArrayInput is an input type that accepts DscNodeConfigurationArray and DscNodeConfigurationArrayOutput values.
// You can construct a concrete instance of `DscNodeConfigurationArrayInput` via:
//
// DscNodeConfigurationArray{ DscNodeConfigurationArgs{...} }
type DscNodeConfigurationArrayInput interface {
pulumi.Input
ToDscNodeConfigurationArrayOutput() DscNodeConfigurationArrayOutput
ToDscNodeConfigurationArrayOutputWithContext(context.Context) DscNodeConfigurationArrayOutput
}
type DscNodeConfigurationArray []DscNodeConfigurationInput
func (DscNodeConfigurationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DscNodeConfiguration)(nil)).Elem()
}
func (i DscNodeConfigurationArray) ToDscNodeConfigurationArrayOutput() DscNodeConfigurationArrayOutput {
return i.ToDscNodeConfigurationArrayOutputWithContext(context.Background())
}
func (i DscNodeConfigurationArray) ToDscNodeConfigurationArrayOutputWithContext(ctx context.Context) DscNodeConfigurationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DscNodeConfigurationArrayOutput)
}
// DscNodeConfigurationMapInput is an input type that accepts DscNodeConfigurationMap and DscNodeConfigurationMapOutput values.
// You can construct a concrete instance of `DscNodeConfigurationMapInput` via:
//
// DscNodeConfigurationMap{ "key": DscNodeConfigurationArgs{...} }
type DscNodeConfigurationMapInput interface {
pulumi.Input
ToDscNodeConfigurationMapOutput() DscNodeConfigurationMapOutput
ToDscNodeConfigurationMapOutputWithContext(context.Context) DscNodeConfigurationMapOutput
}
type DscNodeConfigurationMap map[string]DscNodeConfigurationInput
func (DscNodeConfigurationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DscNodeConfiguration)(nil)).Elem()
}
func (i DscNodeConfigurationMap) ToDscNodeConfigurationMapOutput() DscNodeConfigurationMapOutput {
return i.ToDscNodeConfigurationMapOutputWithContext(context.Background())
}
func (i DscNodeConfigurationMap) ToDscNodeConfigurationMapOutputWithContext(ctx context.Context) DscNodeConfigurationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DscNodeConfigurationMapOutput)
}
type DscNodeConfigurationOutput struct{ *pulumi.OutputState }
func (DscNodeConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DscNodeConfiguration)(nil)).Elem()
}
func (o DscNodeConfigurationOutput) ToDscNodeConfigurationOutput() DscNodeConfigurationOutput {
return o
}
func (o DscNodeConfigurationOutput) ToDscNodeConfigurationOutputWithContext(ctx context.Context) DscNodeConfigurationOutput {
return o
}
// The name of the automation account in which the DSC Node Configuration is created. Changing this forces a new resource to be created.
func (o DscNodeConfigurationOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *DscNodeConfiguration) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
func (o DscNodeConfigurationOutput) ConfigurationName() pulumi.StringOutput {
return o.ApplyT(func(v *DscNodeConfiguration) pulumi.StringOutput { return v.ConfigurationName }).(pulumi.StringOutput)
}
// The PowerShell DSC Node Configuration (mof content).
func (o DscNodeConfigurationOutput) ContentEmbedded() pulumi.StringOutput {
return o.ApplyT(func(v *DscNodeConfiguration) pulumi.StringOutput { return v.ContentEmbedded }).(pulumi.StringOutput)
}
// Specifies the name of the DSC Node Configuration. Changing this forces a new resource to be created.
func (o DscNodeConfigurationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DscNodeConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which the DSC Node Configuration is created. Changing this forces a new resource to be created.
func (o DscNodeConfigurationOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *DscNodeConfiguration) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type DscNodeConfigurationArrayOutput struct{ *pulumi.OutputState }
func (DscNodeConfigurationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DscNodeConfiguration)(nil)).Elem()
}
func (o DscNodeConfigurationArrayOutput) ToDscNodeConfigurationArrayOutput() DscNodeConfigurationArrayOutput {
return o
}
func (o DscNodeConfigurationArrayOutput) ToDscNodeConfigurationArrayOutputWithContext(ctx context.Context) DscNodeConfigurationArrayOutput {
return o
}
func (o DscNodeConfigurationArrayOutput) Index(i pulumi.IntInput) DscNodeConfigurationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DscNodeConfiguration {
return vs[0].([]*DscNodeConfiguration)[vs[1].(int)]
}).(DscNodeConfigurationOutput)
}
type DscNodeConfigurationMapOutput struct{ *pulumi.OutputState }
func (DscNodeConfigurationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DscNodeConfiguration)(nil)).Elem()
}
func (o DscNodeConfigurationMapOutput) ToDscNodeConfigurationMapOutput() DscNodeConfigurationMapOutput {
return o
}
func (o DscNodeConfigurationMapOutput) ToDscNodeConfigurationMapOutputWithContext(ctx context.Context) DscNodeConfigurationMapOutput {
return o
}
func (o DscNodeConfigurationMapOutput) MapIndex(k pulumi.StringInput) DscNodeConfigurationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DscNodeConfiguration {
return vs[0].(map[string]*DscNodeConfiguration)[vs[1].(string)]
}).(DscNodeConfigurationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DscNodeConfigurationInput)(nil)).Elem(), &DscNodeConfiguration{})
pulumi.RegisterInputType(reflect.TypeOf((*DscNodeConfigurationArrayInput)(nil)).Elem(), DscNodeConfigurationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DscNodeConfigurationMapInput)(nil)).Elem(), DscNodeConfigurationMap{})
pulumi.RegisterOutputType(DscNodeConfigurationOutput{})
pulumi.RegisterOutputType(DscNodeConfigurationArrayOutput{})
pulumi.RegisterOutputType(DscNodeConfigurationMapOutput{})
}
| 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/automation/connection.go | sdk/go/azure/automation/connection.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Automation Connection.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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 {
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("resourceGroup-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("account-example"),
// Location: exampleResourceGroup.Location,
// ResourceGroupName: exampleResourceGroup.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewConnection(ctx, "example", &automation.ConnectionArgs{
// Name: pulumi.String("connection-example"),
// ResourceGroupName: exampleResourceGroup.Name,
// AutomationAccountName: exampleAccount.Name,
// Type: pulumi.String("AzureServicePrincipal"),
// Values: pulumi.StringMap{
// "ApplicationId": pulumi.String("00000000-0000-0000-0000-000000000000"),
// "TenantId": pulumi.String(example.TenantId),
// "SubscriptionId": pulumi.String(example.SubscriptionId),
// "CertificateThumbprint": pulumi.String("sample-certificate-thumbprint"),
// },
// })
// 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.Automation` - 2024-10-23
//
// ## Import
//
// Automation Connection can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/connection:Connection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/connections/conn1
// ```
type Connection struct {
pulumi.CustomResourceState
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// A description for this Connection.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The type of the Connection - can be either builtin type such as `Azure`, `AzureClassicCertificate`, and `AzureServicePrincipal`, or a user defined types. Changing this forces a new resource to be created.
Type pulumi.StringOutput `pulumi:"type"`
// A mapping of key value pairs passed to the connection. Different `type` needs different parameters in the `values`. Builtin types have required field values as below:
//
// * `Azure`: parameters `AutomationCertificateName` and `SubscriptionID`.
//
// * `AzureClassicCertificate`: parameters `SubscriptionName`, `SubscriptionId` and `CertificateAssetName`.
//
// * `AzureServicePrincipal`: parameters `ApplicationId`, `CertificateThumbprint`, `SubscriptionId` and `TenantId`.
Values pulumi.StringMapOutput `pulumi:"values"`
}
// NewConnection registers a new resource with the given unique name, arguments, and options.
func NewConnection(ctx *pulumi.Context,
name string, args *ConnectionArgs, opts ...pulumi.ResourceOption) (*Connection, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Type == nil {
return nil, errors.New("invalid value for required argument 'Type'")
}
if args.Values == nil {
return nil, errors.New("invalid value for required argument 'Values'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Connection
err := ctx.RegisterResource("azure:automation/connection:Connection", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetConnection gets an existing Connection 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 GetConnection(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ConnectionState, opts ...pulumi.ResourceOption) (*Connection, error) {
var resource Connection
err := ctx.ReadResource("azure:automation/connection:Connection", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Connection resources.
type connectionState struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// A description for this Connection.
Description *string `pulumi:"description"`
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The type of the Connection - can be either builtin type such as `Azure`, `AzureClassicCertificate`, and `AzureServicePrincipal`, or a user defined types. Changing this forces a new resource to be created.
Type *string `pulumi:"type"`
// A mapping of key value pairs passed to the connection. Different `type` needs different parameters in the `values`. Builtin types have required field values as below:
//
// * `Azure`: parameters `AutomationCertificateName` and `SubscriptionID`.
//
// * `AzureClassicCertificate`: parameters `SubscriptionName`, `SubscriptionId` and `CertificateAssetName`.
//
// * `AzureServicePrincipal`: parameters `ApplicationId`, `CertificateThumbprint`, `SubscriptionId` and `TenantId`.
Values map[string]string `pulumi:"values"`
}
type ConnectionState struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// A description for this Connection.
Description pulumi.StringPtrInput
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The type of the Connection - can be either builtin type such as `Azure`, `AzureClassicCertificate`, and `AzureServicePrincipal`, or a user defined types. Changing this forces a new resource to be created.
Type pulumi.StringPtrInput
// A mapping of key value pairs passed to the connection. Different `type` needs different parameters in the `values`. Builtin types have required field values as below:
//
// * `Azure`: parameters `AutomationCertificateName` and `SubscriptionID`.
//
// * `AzureClassicCertificate`: parameters `SubscriptionName`, `SubscriptionId` and `CertificateAssetName`.
//
// * `AzureServicePrincipal`: parameters `ApplicationId`, `CertificateThumbprint`, `SubscriptionId` and `TenantId`.
Values pulumi.StringMapInput
}
func (ConnectionState) ElementType() reflect.Type {
return reflect.TypeOf((*connectionState)(nil)).Elem()
}
type connectionArgs struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// A description for this Connection.
Description *string `pulumi:"description"`
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The type of the Connection - can be either builtin type such as `Azure`, `AzureClassicCertificate`, and `AzureServicePrincipal`, or a user defined types. Changing this forces a new resource to be created.
Type string `pulumi:"type"`
// A mapping of key value pairs passed to the connection. Different `type` needs different parameters in the `values`. Builtin types have required field values as below:
//
// * `Azure`: parameters `AutomationCertificateName` and `SubscriptionID`.
//
// * `AzureClassicCertificate`: parameters `SubscriptionName`, `SubscriptionId` and `CertificateAssetName`.
//
// * `AzureServicePrincipal`: parameters `ApplicationId`, `CertificateThumbprint`, `SubscriptionId` and `TenantId`.
Values map[string]string `pulumi:"values"`
}
// The set of arguments for constructing a Connection resource.
type ConnectionArgs struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// A description for this Connection.
Description pulumi.StringPtrInput
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The type of the Connection - can be either builtin type such as `Azure`, `AzureClassicCertificate`, and `AzureServicePrincipal`, or a user defined types. Changing this forces a new resource to be created.
Type pulumi.StringInput
// A mapping of key value pairs passed to the connection. Different `type` needs different parameters in the `values`. Builtin types have required field values as below:
//
// * `Azure`: parameters `AutomationCertificateName` and `SubscriptionID`.
//
// * `AzureClassicCertificate`: parameters `SubscriptionName`, `SubscriptionId` and `CertificateAssetName`.
//
// * `AzureServicePrincipal`: parameters `ApplicationId`, `CertificateThumbprint`, `SubscriptionId` and `TenantId`.
Values pulumi.StringMapInput
}
func (ConnectionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*connectionArgs)(nil)).Elem()
}
type ConnectionInput interface {
pulumi.Input
ToConnectionOutput() ConnectionOutput
ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput
}
func (*Connection) ElementType() reflect.Type {
return reflect.TypeOf((**Connection)(nil)).Elem()
}
func (i *Connection) ToConnectionOutput() ConnectionOutput {
return i.ToConnectionOutputWithContext(context.Background())
}
func (i *Connection) ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionOutput)
}
// ConnectionArrayInput is an input type that accepts ConnectionArray and ConnectionArrayOutput values.
// You can construct a concrete instance of `ConnectionArrayInput` via:
//
// ConnectionArray{ ConnectionArgs{...} }
type ConnectionArrayInput interface {
pulumi.Input
ToConnectionArrayOutput() ConnectionArrayOutput
ToConnectionArrayOutputWithContext(context.Context) ConnectionArrayOutput
}
type ConnectionArray []ConnectionInput
func (ConnectionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Connection)(nil)).Elem()
}
func (i ConnectionArray) ToConnectionArrayOutput() ConnectionArrayOutput {
return i.ToConnectionArrayOutputWithContext(context.Background())
}
func (i ConnectionArray) ToConnectionArrayOutputWithContext(ctx context.Context) ConnectionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionArrayOutput)
}
// ConnectionMapInput is an input type that accepts ConnectionMap and ConnectionMapOutput values.
// You can construct a concrete instance of `ConnectionMapInput` via:
//
// ConnectionMap{ "key": ConnectionArgs{...} }
type ConnectionMapInput interface {
pulumi.Input
ToConnectionMapOutput() ConnectionMapOutput
ToConnectionMapOutputWithContext(context.Context) ConnectionMapOutput
}
type ConnectionMap map[string]ConnectionInput
func (ConnectionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Connection)(nil)).Elem()
}
func (i ConnectionMap) ToConnectionMapOutput() ConnectionMapOutput {
return i.ToConnectionMapOutputWithContext(context.Background())
}
func (i ConnectionMap) ToConnectionMapOutputWithContext(ctx context.Context) ConnectionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionMapOutput)
}
type ConnectionOutput struct{ *pulumi.OutputState }
func (ConnectionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Connection)(nil)).Elem()
}
func (o ConnectionOutput) ToConnectionOutput() ConnectionOutput {
return o
}
func (o ConnectionOutput) ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput {
return o
}
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
func (o ConnectionOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// A description for this Connection.
func (o ConnectionOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Connection) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Connection. Changing this forces a new resource to be created.
func (o ConnectionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
func (o ConnectionOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The type of the Connection - can be either builtin type such as `Azure`, `AzureClassicCertificate`, and `AzureServicePrincipal`, or a user defined types. Changing this forces a new resource to be created.
func (o ConnectionOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *Connection) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
// A mapping of key value pairs passed to the connection. Different `type` needs different parameters in the `values`. Builtin types have required field values as below:
//
// * `Azure`: parameters `AutomationCertificateName` and `SubscriptionID`.
//
// * `AzureClassicCertificate`: parameters `SubscriptionName`, `SubscriptionId` and `CertificateAssetName`.
//
// * `AzureServicePrincipal`: parameters `ApplicationId`, `CertificateThumbprint`, `SubscriptionId` and `TenantId`.
func (o ConnectionOutput) Values() pulumi.StringMapOutput {
return o.ApplyT(func(v *Connection) pulumi.StringMapOutput { return v.Values }).(pulumi.StringMapOutput)
}
type ConnectionArrayOutput struct{ *pulumi.OutputState }
func (ConnectionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Connection)(nil)).Elem()
}
func (o ConnectionArrayOutput) ToConnectionArrayOutput() ConnectionArrayOutput {
return o
}
func (o ConnectionArrayOutput) ToConnectionArrayOutputWithContext(ctx context.Context) ConnectionArrayOutput {
return o
}
func (o ConnectionArrayOutput) Index(i pulumi.IntInput) ConnectionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Connection {
return vs[0].([]*Connection)[vs[1].(int)]
}).(ConnectionOutput)
}
type ConnectionMapOutput struct{ *pulumi.OutputState }
func (ConnectionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Connection)(nil)).Elem()
}
func (o ConnectionMapOutput) ToConnectionMapOutput() ConnectionMapOutput {
return o
}
func (o ConnectionMapOutput) ToConnectionMapOutputWithContext(ctx context.Context) ConnectionMapOutput {
return o
}
func (o ConnectionMapOutput) MapIndex(k pulumi.StringInput) ConnectionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Connection {
return vs[0].(map[string]*Connection)[vs[1].(string)]
}).(ConnectionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionInput)(nil)).Elem(), &Connection{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionArrayInput)(nil)).Elem(), ConnectionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionMapInput)(nil)).Elem(), ConnectionMap{})
pulumi.RegisterOutputType(ConnectionOutput{})
pulumi.RegisterOutputType(ConnectionArrayOutput{})
pulumi.RegisterOutputType(ConnectionMapOutput{})
}
| 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/automation/schedule.go | sdk/go/azure/automation/schedule.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Automation Schedule.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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("tfex-automation-account"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("tfex-automation-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewSchedule(ctx, "example", &automation.ScheduleArgs{
// Name: pulumi.String("tfex-automation-schedule"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// Frequency: pulumi.String("Week"),
// Interval: pulumi.Int(1),
// Timezone: pulumi.String("Australia/Perth"),
// StartTime: pulumi.String("2014-04-15T18:00:15+02:00"),
// Description: pulumi.String("This is an example schedule"),
// WeekDays: pulumi.StringArray{
// pulumi.String("Friday"),
// },
// })
// 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.Automation` - 2024-10-23
//
// ## Import
//
// Automation Schedule can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/schedule:Schedule schedule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/schedules/schedule1
// ```
type Schedule struct {
pulumi.CustomResourceState
// The name of the automation account in which the Schedule is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// A description for this Schedule.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The end time of the schedule.
ExpiryTime pulumi.StringOutput `pulumi:"expiryTime"`
// The frequency of the schedule. - can be either `OneTime`, `Day`, `Hour`, `Week`, or `Month`.
Frequency pulumi.StringOutput `pulumi:"frequency"`
// The number of `frequency`s between runs. Only valid when frequency is `Day`, `Hour`, `Week`, or `Month` and defaults to `1`.
Interval pulumi.IntOutput `pulumi:"interval"`
// List of days of the month that the job should execute on. Must be between `1` and `31`. `-1` for last day of the month. Only valid when frequency is `Month`.
MonthDays pulumi.IntArrayOutput `pulumi:"monthDays"`
// One `monthlyOccurrence` blocks as defined below to specifies occurrences of days within a month. Only valid when frequency is `Month`. The `monthlyOccurrence` block supports fields documented below.
MonthlyOccurrence ScheduleMonthlyOccurrencePtrOutput `pulumi:"monthlyOccurrence"`
// Specifies the name of the Schedule. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group in which the Schedule is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Start time of the schedule. Must be at least five minutes in the future. Defaults to seven minutes in the future from the time the resource is created.
StartTime pulumi.StringOutput `pulumi:"startTime"`
// The timezone of the start time. Defaults to `Etc/UTC`. For possible values see: <https://docs.microsoft.com/en-us/rest/api/maps/timezone/gettimezoneenumwindows>
Timezone pulumi.StringPtrOutput `pulumi:"timezone"`
// List of days of the week that the job should execute on. Only valid when frequency is `Week`. Possible values are `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`.
WeekDays pulumi.StringArrayOutput `pulumi:"weekDays"`
}
// NewSchedule registers a new resource with the given unique name, arguments, and options.
func NewSchedule(ctx *pulumi.Context,
name string, args *ScheduleArgs, opts ...pulumi.ResourceOption) (*Schedule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
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'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Schedule
err := ctx.RegisterResource("azure:automation/schedule:Schedule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSchedule gets an existing Schedule 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 GetSchedule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ScheduleState, opts ...pulumi.ResourceOption) (*Schedule, error) {
var resource Schedule
err := ctx.ReadResource("azure:automation/schedule:Schedule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Schedule resources.
type scheduleState struct {
// The name of the automation account in which the Schedule is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// A description for this Schedule.
Description *string `pulumi:"description"`
// The end time of the schedule.
ExpiryTime *string `pulumi:"expiryTime"`
// The frequency of the schedule. - can be either `OneTime`, `Day`, `Hour`, `Week`, or `Month`.
Frequency *string `pulumi:"frequency"`
// The number of `frequency`s between runs. Only valid when frequency is `Day`, `Hour`, `Week`, or `Month` and defaults to `1`.
Interval *int `pulumi:"interval"`
// List of days of the month that the job should execute on. Must be between `1` and `31`. `-1` for last day of the month. Only valid when frequency is `Month`.
MonthDays []int `pulumi:"monthDays"`
// One `monthlyOccurrence` blocks as defined below to specifies occurrences of days within a month. Only valid when frequency is `Month`. The `monthlyOccurrence` block supports fields documented below.
MonthlyOccurrence *ScheduleMonthlyOccurrence `pulumi:"monthlyOccurrence"`
// Specifies the name of the Schedule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Schedule is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Start time of the schedule. Must be at least five minutes in the future. Defaults to seven minutes in the future from the time the resource is created.
StartTime *string `pulumi:"startTime"`
// The timezone of the start time. Defaults to `Etc/UTC`. For possible values see: <https://docs.microsoft.com/en-us/rest/api/maps/timezone/gettimezoneenumwindows>
Timezone *string `pulumi:"timezone"`
// List of days of the week that the job should execute on. Only valid when frequency is `Week`. Possible values are `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`.
WeekDays []string `pulumi:"weekDays"`
}
type ScheduleState struct {
// The name of the automation account in which the Schedule is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// A description for this Schedule.
Description pulumi.StringPtrInput
// The end time of the schedule.
ExpiryTime pulumi.StringPtrInput
// The frequency of the schedule. - can be either `OneTime`, `Day`, `Hour`, `Week`, or `Month`.
Frequency pulumi.StringPtrInput
// The number of `frequency`s between runs. Only valid when frequency is `Day`, `Hour`, `Week`, or `Month` and defaults to `1`.
Interval pulumi.IntPtrInput
// List of days of the month that the job should execute on. Must be between `1` and `31`. `-1` for last day of the month. Only valid when frequency is `Month`.
MonthDays pulumi.IntArrayInput
// One `monthlyOccurrence` blocks as defined below to specifies occurrences of days within a month. Only valid when frequency is `Month`. The `monthlyOccurrence` block supports fields documented below.
MonthlyOccurrence ScheduleMonthlyOccurrencePtrInput
// Specifies the name of the Schedule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Schedule is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Start time of the schedule. Must be at least five minutes in the future. Defaults to seven minutes in the future from the time the resource is created.
StartTime pulumi.StringPtrInput
// The timezone of the start time. Defaults to `Etc/UTC`. For possible values see: <https://docs.microsoft.com/en-us/rest/api/maps/timezone/gettimezoneenumwindows>
Timezone pulumi.StringPtrInput
// List of days of the week that the job should execute on. Only valid when frequency is `Week`. Possible values are `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`.
WeekDays pulumi.StringArrayInput
}
func (ScheduleState) ElementType() reflect.Type {
return reflect.TypeOf((*scheduleState)(nil)).Elem()
}
type scheduleArgs struct {
// The name of the automation account in which the Schedule is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// A description for this Schedule.
Description *string `pulumi:"description"`
// The end time of the schedule.
ExpiryTime *string `pulumi:"expiryTime"`
// The frequency of the schedule. - can be either `OneTime`, `Day`, `Hour`, `Week`, or `Month`.
Frequency string `pulumi:"frequency"`
// The number of `frequency`s between runs. Only valid when frequency is `Day`, `Hour`, `Week`, or `Month` and defaults to `1`.
Interval *int `pulumi:"interval"`
// List of days of the month that the job should execute on. Must be between `1` and `31`. `-1` for last day of the month. Only valid when frequency is `Month`.
MonthDays []int `pulumi:"monthDays"`
// One `monthlyOccurrence` blocks as defined below to specifies occurrences of days within a month. Only valid when frequency is `Month`. The `monthlyOccurrence` block supports fields documented below.
MonthlyOccurrence *ScheduleMonthlyOccurrence `pulumi:"monthlyOccurrence"`
// Specifies the name of the Schedule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Schedule is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Start time of the schedule. Must be at least five minutes in the future. Defaults to seven minutes in the future from the time the resource is created.
StartTime *string `pulumi:"startTime"`
// The timezone of the start time. Defaults to `Etc/UTC`. For possible values see: <https://docs.microsoft.com/en-us/rest/api/maps/timezone/gettimezoneenumwindows>
Timezone *string `pulumi:"timezone"`
// List of days of the week that the job should execute on. Only valid when frequency is `Week`. Possible values are `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`.
WeekDays []string `pulumi:"weekDays"`
}
// The set of arguments for constructing a Schedule resource.
type ScheduleArgs struct {
// The name of the automation account in which the Schedule is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// A description for this Schedule.
Description pulumi.StringPtrInput
// The end time of the schedule.
ExpiryTime pulumi.StringPtrInput
// The frequency of the schedule. - can be either `OneTime`, `Day`, `Hour`, `Week`, or `Month`.
Frequency pulumi.StringInput
// The number of `frequency`s between runs. Only valid when frequency is `Day`, `Hour`, `Week`, or `Month` and defaults to `1`.
Interval pulumi.IntPtrInput
// List of days of the month that the job should execute on. Must be between `1` and `31`. `-1` for last day of the month. Only valid when frequency is `Month`.
MonthDays pulumi.IntArrayInput
// One `monthlyOccurrence` blocks as defined below to specifies occurrences of days within a month. Only valid when frequency is `Month`. The `monthlyOccurrence` block supports fields documented below.
MonthlyOccurrence ScheduleMonthlyOccurrencePtrInput
// Specifies the name of the Schedule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Schedule is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Start time of the schedule. Must be at least five minutes in the future. Defaults to seven minutes in the future from the time the resource is created.
StartTime pulumi.StringPtrInput
// The timezone of the start time. Defaults to `Etc/UTC`. For possible values see: <https://docs.microsoft.com/en-us/rest/api/maps/timezone/gettimezoneenumwindows>
Timezone pulumi.StringPtrInput
// List of days of the week that the job should execute on. Only valid when frequency is `Week`. Possible values are `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`.
WeekDays pulumi.StringArrayInput
}
func (ScheduleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*scheduleArgs)(nil)).Elem()
}
type ScheduleInput interface {
pulumi.Input
ToScheduleOutput() ScheduleOutput
ToScheduleOutputWithContext(ctx context.Context) ScheduleOutput
}
func (*Schedule) ElementType() reflect.Type {
return reflect.TypeOf((**Schedule)(nil)).Elem()
}
func (i *Schedule) ToScheduleOutput() ScheduleOutput {
return i.ToScheduleOutputWithContext(context.Background())
}
func (i *Schedule) ToScheduleOutputWithContext(ctx context.Context) ScheduleOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScheduleOutput)
}
// ScheduleArrayInput is an input type that accepts ScheduleArray and ScheduleArrayOutput values.
// You can construct a concrete instance of `ScheduleArrayInput` via:
//
// ScheduleArray{ ScheduleArgs{...} }
type ScheduleArrayInput interface {
pulumi.Input
ToScheduleArrayOutput() ScheduleArrayOutput
ToScheduleArrayOutputWithContext(context.Context) ScheduleArrayOutput
}
type ScheduleArray []ScheduleInput
func (ScheduleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Schedule)(nil)).Elem()
}
func (i ScheduleArray) ToScheduleArrayOutput() ScheduleArrayOutput {
return i.ToScheduleArrayOutputWithContext(context.Background())
}
func (i ScheduleArray) ToScheduleArrayOutputWithContext(ctx context.Context) ScheduleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScheduleArrayOutput)
}
// ScheduleMapInput is an input type that accepts ScheduleMap and ScheduleMapOutput values.
// You can construct a concrete instance of `ScheduleMapInput` via:
//
// ScheduleMap{ "key": ScheduleArgs{...} }
type ScheduleMapInput interface {
pulumi.Input
ToScheduleMapOutput() ScheduleMapOutput
ToScheduleMapOutputWithContext(context.Context) ScheduleMapOutput
}
type ScheduleMap map[string]ScheduleInput
func (ScheduleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Schedule)(nil)).Elem()
}
func (i ScheduleMap) ToScheduleMapOutput() ScheduleMapOutput {
return i.ToScheduleMapOutputWithContext(context.Background())
}
func (i ScheduleMap) ToScheduleMapOutputWithContext(ctx context.Context) ScheduleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScheduleMapOutput)
}
type ScheduleOutput struct{ *pulumi.OutputState }
func (ScheduleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Schedule)(nil)).Elem()
}
func (o ScheduleOutput) ToScheduleOutput() ScheduleOutput {
return o
}
func (o ScheduleOutput) ToScheduleOutputWithContext(ctx context.Context) ScheduleOutput {
return o
}
// The name of the automation account in which the Schedule is created. Changing this forces a new resource to be created.
func (o ScheduleOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// A description for this Schedule.
func (o ScheduleOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The end time of the schedule.
func (o ScheduleOutput) ExpiryTime() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.ExpiryTime }).(pulumi.StringOutput)
}
// The frequency of the schedule. - can be either `OneTime`, `Day`, `Hour`, `Week`, or `Month`.
func (o ScheduleOutput) Frequency() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.Frequency }).(pulumi.StringOutput)
}
// The number of `frequency`s between runs. Only valid when frequency is `Day`, `Hour`, `Week`, or `Month` and defaults to `1`.
func (o ScheduleOutput) Interval() pulumi.IntOutput {
return o.ApplyT(func(v *Schedule) pulumi.IntOutput { return v.Interval }).(pulumi.IntOutput)
}
// List of days of the month that the job should execute on. Must be between `1` and `31`. `-1` for last day of the month. Only valid when frequency is `Month`.
func (o ScheduleOutput) MonthDays() pulumi.IntArrayOutput {
return o.ApplyT(func(v *Schedule) pulumi.IntArrayOutput { return v.MonthDays }).(pulumi.IntArrayOutput)
}
// One `monthlyOccurrence` blocks as defined below to specifies occurrences of days within a month. Only valid when frequency is `Month`. The `monthlyOccurrence` block supports fields documented below.
func (o ScheduleOutput) MonthlyOccurrence() ScheduleMonthlyOccurrencePtrOutput {
return o.ApplyT(func(v *Schedule) ScheduleMonthlyOccurrencePtrOutput { return v.MonthlyOccurrence }).(ScheduleMonthlyOccurrencePtrOutput)
}
// Specifies the name of the Schedule. Changing this forces a new resource to be created.
func (o ScheduleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which the Schedule is created. Changing this forces a new resource to be created.
func (o ScheduleOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Start time of the schedule. Must be at least five minutes in the future. Defaults to seven minutes in the future from the time the resource is created.
func (o ScheduleOutput) StartTime() pulumi.StringOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringOutput { return v.StartTime }).(pulumi.StringOutput)
}
// The timezone of the start time. Defaults to `Etc/UTC`. For possible values see: <https://docs.microsoft.com/en-us/rest/api/maps/timezone/gettimezoneenumwindows>
func (o ScheduleOutput) Timezone() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringPtrOutput { return v.Timezone }).(pulumi.StringPtrOutput)
}
// List of days of the week that the job should execute on. Only valid when frequency is `Week`. Possible values are `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` and `Sunday`.
func (o ScheduleOutput) WeekDays() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Schedule) pulumi.StringArrayOutput { return v.WeekDays }).(pulumi.StringArrayOutput)
}
type ScheduleArrayOutput struct{ *pulumi.OutputState }
func (ScheduleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Schedule)(nil)).Elem()
}
func (o ScheduleArrayOutput) ToScheduleArrayOutput() ScheduleArrayOutput {
return o
}
func (o ScheduleArrayOutput) ToScheduleArrayOutputWithContext(ctx context.Context) ScheduleArrayOutput {
return o
}
func (o ScheduleArrayOutput) Index(i pulumi.IntInput) ScheduleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Schedule {
return vs[0].([]*Schedule)[vs[1].(int)]
}).(ScheduleOutput)
}
type ScheduleMapOutput struct{ *pulumi.OutputState }
func (ScheduleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Schedule)(nil)).Elem()
}
func (o ScheduleMapOutput) ToScheduleMapOutput() ScheduleMapOutput {
return o
}
func (o ScheduleMapOutput) ToScheduleMapOutputWithContext(ctx context.Context) ScheduleMapOutput {
return o
}
func (o ScheduleMapOutput) MapIndex(k pulumi.StringInput) ScheduleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Schedule {
return vs[0].(map[string]*Schedule)[vs[1].(string)]
}).(ScheduleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ScheduleInput)(nil)).Elem(), &Schedule{})
pulumi.RegisterInputType(reflect.TypeOf((*ScheduleArrayInput)(nil)).Elem(), ScheduleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ScheduleMapInput)(nil)).Elem(), ScheduleMap{})
pulumi.RegisterOutputType(ScheduleOutput{})
pulumi.RegisterOutputType(ScheduleArrayOutput{})
pulumi.RegisterOutputType(ScheduleMapOutput{})
}
| 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/automation/connectionType.go | sdk/go/azure/automation/connectionType.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages anAutomation Connection Type.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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 {
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("resourceGroup-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("account-example"),
// Location: exampleResourceGroup.Location,
// ResourceGroupName: exampleResourceGroup.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewConnectionType(ctx, "example", &automation.ConnectionTypeArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: exampleResourceGroup.Name,
// AutomationAccountName: exampleAccount.Name,
// Fields: automation.ConnectionTypeFieldArray{
// &automation.ConnectionTypeFieldArgs{
// Name: pulumi.String("example"),
// Type: pulumi.String("string"),
// },
// },
// })
// 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.Automation` - 2024-10-23
//
// ## Import
//
// Automations can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/connectionType:ConnectionType example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/connectionTypes/type1
// ```
type ConnectionType struct {
pulumi.CustomResourceState
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// One or more `field` blocks as defined below. Changing this forces a new Automation to be created.
Fields ConnectionTypeFieldArrayOutput `pulumi:"fields"`
// Whether the connection type is global. Changing this forces a new Automation to be created.
IsGlobal pulumi.BoolPtrOutput `pulumi:"isGlobal"`
// The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewConnectionType registers a new resource with the given unique name, arguments, and options.
func NewConnectionType(ctx *pulumi.Context,
name string, args *ConnectionTypeArgs, opts ...pulumi.ResourceOption) (*ConnectionType, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.Fields == nil {
return nil, errors.New("invalid value for required argument 'Fields'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ConnectionType
err := ctx.RegisterResource("azure:automation/connectionType:ConnectionType", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetConnectionType gets an existing ConnectionType 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 GetConnectionType(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ConnectionTypeState, opts ...pulumi.ResourceOption) (*ConnectionType, error) {
var resource ConnectionType
err := ctx.ReadResource("azure:automation/connectionType:ConnectionType", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ConnectionType resources.
type connectionTypeState struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// One or more `field` blocks as defined below. Changing this forces a new Automation to be created.
Fields []ConnectionTypeField `pulumi:"fields"`
// Whether the connection type is global. Changing this forces a new Automation to be created.
IsGlobal *bool `pulumi:"isGlobal"`
// The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type ConnectionTypeState struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// One or more `field` blocks as defined below. Changing this forces a new Automation to be created.
Fields ConnectionTypeFieldArrayInput
// Whether the connection type is global. Changing this forces a new Automation to be created.
IsGlobal pulumi.BoolPtrInput
// The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (ConnectionTypeState) ElementType() reflect.Type {
return reflect.TypeOf((*connectionTypeState)(nil)).Elem()
}
type connectionTypeArgs struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// One or more `field` blocks as defined below. Changing this forces a new Automation to be created.
Fields []ConnectionTypeField `pulumi:"fields"`
// Whether the connection type is global. Changing this forces a new Automation to be created.
IsGlobal *bool `pulumi:"isGlobal"`
// The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a ConnectionType resource.
type ConnectionTypeArgs struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// One or more `field` blocks as defined below. Changing this forces a new Automation to be created.
Fields ConnectionTypeFieldArrayInput
// Whether the connection type is global. Changing this forces a new Automation to be created.
IsGlobal pulumi.BoolPtrInput
// The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
ResourceGroupName pulumi.StringInput
}
func (ConnectionTypeArgs) ElementType() reflect.Type {
return reflect.TypeOf((*connectionTypeArgs)(nil)).Elem()
}
type ConnectionTypeInput interface {
pulumi.Input
ToConnectionTypeOutput() ConnectionTypeOutput
ToConnectionTypeOutputWithContext(ctx context.Context) ConnectionTypeOutput
}
func (*ConnectionType) ElementType() reflect.Type {
return reflect.TypeOf((**ConnectionType)(nil)).Elem()
}
func (i *ConnectionType) ToConnectionTypeOutput() ConnectionTypeOutput {
return i.ToConnectionTypeOutputWithContext(context.Background())
}
func (i *ConnectionType) ToConnectionTypeOutputWithContext(ctx context.Context) ConnectionTypeOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionTypeOutput)
}
// ConnectionTypeArrayInput is an input type that accepts ConnectionTypeArray and ConnectionTypeArrayOutput values.
// You can construct a concrete instance of `ConnectionTypeArrayInput` via:
//
// ConnectionTypeArray{ ConnectionTypeArgs{...} }
type ConnectionTypeArrayInput interface {
pulumi.Input
ToConnectionTypeArrayOutput() ConnectionTypeArrayOutput
ToConnectionTypeArrayOutputWithContext(context.Context) ConnectionTypeArrayOutput
}
type ConnectionTypeArray []ConnectionTypeInput
func (ConnectionTypeArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ConnectionType)(nil)).Elem()
}
func (i ConnectionTypeArray) ToConnectionTypeArrayOutput() ConnectionTypeArrayOutput {
return i.ToConnectionTypeArrayOutputWithContext(context.Background())
}
func (i ConnectionTypeArray) ToConnectionTypeArrayOutputWithContext(ctx context.Context) ConnectionTypeArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionTypeArrayOutput)
}
// ConnectionTypeMapInput is an input type that accepts ConnectionTypeMap and ConnectionTypeMapOutput values.
// You can construct a concrete instance of `ConnectionTypeMapInput` via:
//
// ConnectionTypeMap{ "key": ConnectionTypeArgs{...} }
type ConnectionTypeMapInput interface {
pulumi.Input
ToConnectionTypeMapOutput() ConnectionTypeMapOutput
ToConnectionTypeMapOutputWithContext(context.Context) ConnectionTypeMapOutput
}
type ConnectionTypeMap map[string]ConnectionTypeInput
func (ConnectionTypeMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ConnectionType)(nil)).Elem()
}
func (i ConnectionTypeMap) ToConnectionTypeMapOutput() ConnectionTypeMapOutput {
return i.ToConnectionTypeMapOutputWithContext(context.Background())
}
func (i ConnectionTypeMap) ToConnectionTypeMapOutputWithContext(ctx context.Context) ConnectionTypeMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionTypeMapOutput)
}
type ConnectionTypeOutput struct{ *pulumi.OutputState }
func (ConnectionTypeOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ConnectionType)(nil)).Elem()
}
func (o ConnectionTypeOutput) ToConnectionTypeOutput() ConnectionTypeOutput {
return o
}
func (o ConnectionTypeOutput) ToConnectionTypeOutputWithContext(ctx context.Context) ConnectionTypeOutput {
return o
}
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
func (o ConnectionTypeOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionType) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// One or more `field` blocks as defined below. Changing this forces a new Automation to be created.
func (o ConnectionTypeOutput) Fields() ConnectionTypeFieldArrayOutput {
return o.ApplyT(func(v *ConnectionType) ConnectionTypeFieldArrayOutput { return v.Fields }).(ConnectionTypeFieldArrayOutput)
}
// Whether the connection type is global. Changing this forces a new Automation to be created.
func (o ConnectionTypeOutput) IsGlobal() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ConnectionType) pulumi.BoolPtrOutput { return v.IsGlobal }).(pulumi.BoolPtrOutput)
}
// The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
func (o ConnectionTypeOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionType) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
func (o ConnectionTypeOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionType) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type ConnectionTypeArrayOutput struct{ *pulumi.OutputState }
func (ConnectionTypeArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ConnectionType)(nil)).Elem()
}
func (o ConnectionTypeArrayOutput) ToConnectionTypeArrayOutput() ConnectionTypeArrayOutput {
return o
}
func (o ConnectionTypeArrayOutput) ToConnectionTypeArrayOutputWithContext(ctx context.Context) ConnectionTypeArrayOutput {
return o
}
func (o ConnectionTypeArrayOutput) Index(i pulumi.IntInput) ConnectionTypeOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ConnectionType {
return vs[0].([]*ConnectionType)[vs[1].(int)]
}).(ConnectionTypeOutput)
}
type ConnectionTypeMapOutput struct{ *pulumi.OutputState }
func (ConnectionTypeMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ConnectionType)(nil)).Elem()
}
func (o ConnectionTypeMapOutput) ToConnectionTypeMapOutput() ConnectionTypeMapOutput {
return o
}
func (o ConnectionTypeMapOutput) ToConnectionTypeMapOutputWithContext(ctx context.Context) ConnectionTypeMapOutput {
return o
}
func (o ConnectionTypeMapOutput) MapIndex(k pulumi.StringInput) ConnectionTypeOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ConnectionType {
return vs[0].(map[string]*ConnectionType)[vs[1].(string)]
}).(ConnectionTypeOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionTypeInput)(nil)).Elem(), &ConnectionType{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionTypeArrayInput)(nil)).Elem(), ConnectionTypeArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionTypeMapInput)(nil)).Elem(), ConnectionTypeMap{})
pulumi.RegisterOutputType(ConnectionTypeOutput{})
pulumi.RegisterOutputType(ConnectionTypeArrayOutput{})
pulumi.RegisterOutputType(ConnectionTypeMapOutput{})
}
| 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/automation/sourceControl.go | sdk/go/azure/automation/sourceControl.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Automation Source Control.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("example-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewSourceControl(ctx, "example", &automation.SourceControlArgs{
// Name: pulumi.String("example"),
// AutomationAccountId: exampleAccount.ID(),
// FolderPath: pulumi.String("runbook"),
// Security: &automation.SourceControlSecurityArgs{
// Token: pulumi.String("ghp_xxx"),
// TokenType: pulumi.String("PersonalAccessToken"),
// },
// RepositoryUrl: pulumi.String("https://github.com/foo/bat.git"),
// SourceControlType: pulumi.String("GitHub"),
// Branch: pulumi.String("main"),
// })
// 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.Automation` - 2024-10-23
//
// ## Import
//
// Automations can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/sourceControl:SourceControl example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/sourceControls/sc1
// ```
type SourceControl struct {
pulumi.CustomResourceState
// Whether auto async the Source Control.
AutomaticSync pulumi.BoolPtrOutput `pulumi:"automaticSync"`
// The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.
AutomationAccountId pulumi.StringOutput `pulumi:"automationAccountId"`
// Specify the repo branch of the Source Control. Empty value is valid only for `VsoTfvc`.
Branch pulumi.StringPtrOutput `pulumi:"branch"`
// A short description of the Source Control.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The folder path of the source control. This Path must be relative.
FolderPath pulumi.StringOutput `pulumi:"folderPath"`
// The name which should be used for this Automation Source Control. Changing this forces a new Automation Source Control to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Whether auto publish the Source Control. Defaults to `true`.
PublishRunbookEnabled pulumi.BoolPtrOutput `pulumi:"publishRunbookEnabled"`
// The Repository URL of the source control.
RepositoryUrl pulumi.StringOutput `pulumi:"repositoryUrl"`
// A `security` block as defined below.
Security SourceControlSecurityOutput `pulumi:"security"`
// The source type of Source Control, possible vaules are `VsoGit`, `VsoTfvc` and `GitHub`, and the value is case sensitive.
SourceControlType pulumi.StringOutput `pulumi:"sourceControlType"`
}
// NewSourceControl registers a new resource with the given unique name, arguments, and options.
func NewSourceControl(ctx *pulumi.Context,
name string, args *SourceControlArgs, opts ...pulumi.ResourceOption) (*SourceControl, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountId == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountId'")
}
if args.FolderPath == nil {
return nil, errors.New("invalid value for required argument 'FolderPath'")
}
if args.RepositoryUrl == nil {
return nil, errors.New("invalid value for required argument 'RepositoryUrl'")
}
if args.Security == nil {
return nil, errors.New("invalid value for required argument 'Security'")
}
if args.SourceControlType == nil {
return nil, errors.New("invalid value for required argument 'SourceControlType'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SourceControl
err := ctx.RegisterResource("azure:automation/sourceControl:SourceControl", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSourceControl gets an existing SourceControl 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 GetSourceControl(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SourceControlState, opts ...pulumi.ResourceOption) (*SourceControl, error) {
var resource SourceControl
err := ctx.ReadResource("azure:automation/sourceControl:SourceControl", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SourceControl resources.
type sourceControlState struct {
// Whether auto async the Source Control.
AutomaticSync *bool `pulumi:"automaticSync"`
// The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.
AutomationAccountId *string `pulumi:"automationAccountId"`
// Specify the repo branch of the Source Control. Empty value is valid only for `VsoTfvc`.
Branch *string `pulumi:"branch"`
// A short description of the Source Control.
Description *string `pulumi:"description"`
// The folder path of the source control. This Path must be relative.
FolderPath *string `pulumi:"folderPath"`
// The name which should be used for this Automation Source Control. Changing this forces a new Automation Source Control to be created.
Name *string `pulumi:"name"`
// Whether auto publish the Source Control. Defaults to `true`.
PublishRunbookEnabled *bool `pulumi:"publishRunbookEnabled"`
// The Repository URL of the source control.
RepositoryUrl *string `pulumi:"repositoryUrl"`
// A `security` block as defined below.
Security *SourceControlSecurity `pulumi:"security"`
// The source type of Source Control, possible vaules are `VsoGit`, `VsoTfvc` and `GitHub`, and the value is case sensitive.
SourceControlType *string `pulumi:"sourceControlType"`
}
type SourceControlState struct {
// Whether auto async the Source Control.
AutomaticSync pulumi.BoolPtrInput
// The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.
AutomationAccountId pulumi.StringPtrInput
// Specify the repo branch of the Source Control. Empty value is valid only for `VsoTfvc`.
Branch pulumi.StringPtrInput
// A short description of the Source Control.
Description pulumi.StringPtrInput
// The folder path of the source control. This Path must be relative.
FolderPath pulumi.StringPtrInput
// The name which should be used for this Automation Source Control. Changing this forces a new Automation Source Control to be created.
Name pulumi.StringPtrInput
// Whether auto publish the Source Control. Defaults to `true`.
PublishRunbookEnabled pulumi.BoolPtrInput
// The Repository URL of the source control.
RepositoryUrl pulumi.StringPtrInput
// A `security` block as defined below.
Security SourceControlSecurityPtrInput
// The source type of Source Control, possible vaules are `VsoGit`, `VsoTfvc` and `GitHub`, and the value is case sensitive.
SourceControlType pulumi.StringPtrInput
}
func (SourceControlState) ElementType() reflect.Type {
return reflect.TypeOf((*sourceControlState)(nil)).Elem()
}
type sourceControlArgs struct {
// Whether auto async the Source Control.
AutomaticSync *bool `pulumi:"automaticSync"`
// The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.
AutomationAccountId string `pulumi:"automationAccountId"`
// Specify the repo branch of the Source Control. Empty value is valid only for `VsoTfvc`.
Branch *string `pulumi:"branch"`
// A short description of the Source Control.
Description *string `pulumi:"description"`
// The folder path of the source control. This Path must be relative.
FolderPath string `pulumi:"folderPath"`
// The name which should be used for this Automation Source Control. Changing this forces a new Automation Source Control to be created.
Name *string `pulumi:"name"`
// Whether auto publish the Source Control. Defaults to `true`.
PublishRunbookEnabled *bool `pulumi:"publishRunbookEnabled"`
// The Repository URL of the source control.
RepositoryUrl string `pulumi:"repositoryUrl"`
// A `security` block as defined below.
Security SourceControlSecurity `pulumi:"security"`
// The source type of Source Control, possible vaules are `VsoGit`, `VsoTfvc` and `GitHub`, and the value is case sensitive.
SourceControlType string `pulumi:"sourceControlType"`
}
// The set of arguments for constructing a SourceControl resource.
type SourceControlArgs struct {
// Whether auto async the Source Control.
AutomaticSync pulumi.BoolPtrInput
// The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.
AutomationAccountId pulumi.StringInput
// Specify the repo branch of the Source Control. Empty value is valid only for `VsoTfvc`.
Branch pulumi.StringPtrInput
// A short description of the Source Control.
Description pulumi.StringPtrInput
// The folder path of the source control. This Path must be relative.
FolderPath pulumi.StringInput
// The name which should be used for this Automation Source Control. Changing this forces a new Automation Source Control to be created.
Name pulumi.StringPtrInput
// Whether auto publish the Source Control. Defaults to `true`.
PublishRunbookEnabled pulumi.BoolPtrInput
// The Repository URL of the source control.
RepositoryUrl pulumi.StringInput
// A `security` block as defined below.
Security SourceControlSecurityInput
// The source type of Source Control, possible vaules are `VsoGit`, `VsoTfvc` and `GitHub`, and the value is case sensitive.
SourceControlType pulumi.StringInput
}
func (SourceControlArgs) ElementType() reflect.Type {
return reflect.TypeOf((*sourceControlArgs)(nil)).Elem()
}
type SourceControlInput interface {
pulumi.Input
ToSourceControlOutput() SourceControlOutput
ToSourceControlOutputWithContext(ctx context.Context) SourceControlOutput
}
func (*SourceControl) ElementType() reflect.Type {
return reflect.TypeOf((**SourceControl)(nil)).Elem()
}
func (i *SourceControl) ToSourceControlOutput() SourceControlOutput {
return i.ToSourceControlOutputWithContext(context.Background())
}
func (i *SourceControl) ToSourceControlOutputWithContext(ctx context.Context) SourceControlOutput {
return pulumi.ToOutputWithContext(ctx, i).(SourceControlOutput)
}
// SourceControlArrayInput is an input type that accepts SourceControlArray and SourceControlArrayOutput values.
// You can construct a concrete instance of `SourceControlArrayInput` via:
//
// SourceControlArray{ SourceControlArgs{...} }
type SourceControlArrayInput interface {
pulumi.Input
ToSourceControlArrayOutput() SourceControlArrayOutput
ToSourceControlArrayOutputWithContext(context.Context) SourceControlArrayOutput
}
type SourceControlArray []SourceControlInput
func (SourceControlArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SourceControl)(nil)).Elem()
}
func (i SourceControlArray) ToSourceControlArrayOutput() SourceControlArrayOutput {
return i.ToSourceControlArrayOutputWithContext(context.Background())
}
func (i SourceControlArray) ToSourceControlArrayOutputWithContext(ctx context.Context) SourceControlArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SourceControlArrayOutput)
}
// SourceControlMapInput is an input type that accepts SourceControlMap and SourceControlMapOutput values.
// You can construct a concrete instance of `SourceControlMapInput` via:
//
// SourceControlMap{ "key": SourceControlArgs{...} }
type SourceControlMapInput interface {
pulumi.Input
ToSourceControlMapOutput() SourceControlMapOutput
ToSourceControlMapOutputWithContext(context.Context) SourceControlMapOutput
}
type SourceControlMap map[string]SourceControlInput
func (SourceControlMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SourceControl)(nil)).Elem()
}
func (i SourceControlMap) ToSourceControlMapOutput() SourceControlMapOutput {
return i.ToSourceControlMapOutputWithContext(context.Background())
}
func (i SourceControlMap) ToSourceControlMapOutputWithContext(ctx context.Context) SourceControlMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SourceControlMapOutput)
}
type SourceControlOutput struct{ *pulumi.OutputState }
func (SourceControlOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SourceControl)(nil)).Elem()
}
func (o SourceControlOutput) ToSourceControlOutput() SourceControlOutput {
return o
}
func (o SourceControlOutput) ToSourceControlOutputWithContext(ctx context.Context) SourceControlOutput {
return o
}
// Whether auto async the Source Control.
func (o SourceControlOutput) AutomaticSync() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SourceControl) pulumi.BoolPtrOutput { return v.AutomaticSync }).(pulumi.BoolPtrOutput)
}
// The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.
func (o SourceControlOutput) AutomationAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *SourceControl) pulumi.StringOutput { return v.AutomationAccountId }).(pulumi.StringOutput)
}
// Specify the repo branch of the Source Control. Empty value is valid only for `VsoTfvc`.
func (o SourceControlOutput) Branch() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SourceControl) pulumi.StringPtrOutput { return v.Branch }).(pulumi.StringPtrOutput)
}
// A short description of the Source Control.
func (o SourceControlOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SourceControl) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The folder path of the source control. This Path must be relative.
func (o SourceControlOutput) FolderPath() pulumi.StringOutput {
return o.ApplyT(func(v *SourceControl) pulumi.StringOutput { return v.FolderPath }).(pulumi.StringOutput)
}
// The name which should be used for this Automation Source Control. Changing this forces a new Automation Source Control to be created.
func (o SourceControlOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SourceControl) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Whether auto publish the Source Control. Defaults to `true`.
func (o SourceControlOutput) PublishRunbookEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SourceControl) pulumi.BoolPtrOutput { return v.PublishRunbookEnabled }).(pulumi.BoolPtrOutput)
}
// The Repository URL of the source control.
func (o SourceControlOutput) RepositoryUrl() pulumi.StringOutput {
return o.ApplyT(func(v *SourceControl) pulumi.StringOutput { return v.RepositoryUrl }).(pulumi.StringOutput)
}
// A `security` block as defined below.
func (o SourceControlOutput) Security() SourceControlSecurityOutput {
return o.ApplyT(func(v *SourceControl) SourceControlSecurityOutput { return v.Security }).(SourceControlSecurityOutput)
}
// The source type of Source Control, possible vaules are `VsoGit`, `VsoTfvc` and `GitHub`, and the value is case sensitive.
func (o SourceControlOutput) SourceControlType() pulumi.StringOutput {
return o.ApplyT(func(v *SourceControl) pulumi.StringOutput { return v.SourceControlType }).(pulumi.StringOutput)
}
type SourceControlArrayOutput struct{ *pulumi.OutputState }
func (SourceControlArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SourceControl)(nil)).Elem()
}
func (o SourceControlArrayOutput) ToSourceControlArrayOutput() SourceControlArrayOutput {
return o
}
func (o SourceControlArrayOutput) ToSourceControlArrayOutputWithContext(ctx context.Context) SourceControlArrayOutput {
return o
}
func (o SourceControlArrayOutput) Index(i pulumi.IntInput) SourceControlOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SourceControl {
return vs[0].([]*SourceControl)[vs[1].(int)]
}).(SourceControlOutput)
}
type SourceControlMapOutput struct{ *pulumi.OutputState }
func (SourceControlMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SourceControl)(nil)).Elem()
}
func (o SourceControlMapOutput) ToSourceControlMapOutput() SourceControlMapOutput {
return o
}
func (o SourceControlMapOutput) ToSourceControlMapOutputWithContext(ctx context.Context) SourceControlMapOutput {
return o
}
func (o SourceControlMapOutput) MapIndex(k pulumi.StringInput) SourceControlOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SourceControl {
return vs[0].(map[string]*SourceControl)[vs[1].(string)]
}).(SourceControlOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SourceControlInput)(nil)).Elem(), &SourceControl{})
pulumi.RegisterInputType(reflect.TypeOf((*SourceControlArrayInput)(nil)).Elem(), SourceControlArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SourceControlMapInput)(nil)).Elem(), SourceControlMap{})
pulumi.RegisterOutputType(SourceControlOutput{})
pulumi.RegisterOutputType(SourceControlArrayOutput{})
pulumi.RegisterOutputType(SourceControlMapOutput{})
}
| 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/automation/intVariable.go | sdk/go/azure/automation/intVariable.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a integer variable in Azure Automation
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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("tfex-example-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("tfex-example-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewIntVariable(ctx, "example", &automation.IntVariableArgs{
// Name: pulumi.String("tfex-example-var"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// Value: pulumi.Int(1234),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Automation Int Variable can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/intVariable:IntVariable example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tfex-example-rg/providers/Microsoft.Automation/automationAccounts/tfex-example-account/variables/tfex-example-var
// ```
type IntVariable struct {
pulumi.CustomResourceState
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted pulumi.BoolPtrOutput `pulumi:"encrypted"`
// The name of the Automation Variable. 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 Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a `integer`.
Value pulumi.IntPtrOutput `pulumi:"value"`
}
// NewIntVariable registers a new resource with the given unique name, arguments, and options.
func NewIntVariable(ctx *pulumi.Context,
name string, args *IntVariableArgs, opts ...pulumi.ResourceOption) (*IntVariable, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource IntVariable
err := ctx.RegisterResource("azure:automation/intVariable:IntVariable", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIntVariable gets an existing IntVariable 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 GetIntVariable(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IntVariableState, opts ...pulumi.ResourceOption) (*IntVariable, error) {
var resource IntVariable
err := ctx.ReadResource("azure:automation/intVariable:IntVariable", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IntVariable resources.
type intVariableState struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description *string `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted *bool `pulumi:"encrypted"`
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a `integer`.
Value *int `pulumi:"value"`
}
type IntVariableState struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// The description of the Automation Variable.
Description pulumi.StringPtrInput
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted pulumi.BoolPtrInput
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The value of the Automation Variable as a `integer`.
Value pulumi.IntPtrInput
}
func (IntVariableState) ElementType() reflect.Type {
return reflect.TypeOf((*intVariableState)(nil)).Elem()
}
type intVariableArgs struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description *string `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted *bool `pulumi:"encrypted"`
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a `integer`.
Value *int `pulumi:"value"`
}
// The set of arguments for constructing a IntVariable resource.
type IntVariableArgs struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The description of the Automation Variable.
Description pulumi.StringPtrInput
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted pulumi.BoolPtrInput
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The value of the Automation Variable as a `integer`.
Value pulumi.IntPtrInput
}
func (IntVariableArgs) ElementType() reflect.Type {
return reflect.TypeOf((*intVariableArgs)(nil)).Elem()
}
type IntVariableInput interface {
pulumi.Input
ToIntVariableOutput() IntVariableOutput
ToIntVariableOutputWithContext(ctx context.Context) IntVariableOutput
}
func (*IntVariable) ElementType() reflect.Type {
return reflect.TypeOf((**IntVariable)(nil)).Elem()
}
func (i *IntVariable) ToIntVariableOutput() IntVariableOutput {
return i.ToIntVariableOutputWithContext(context.Background())
}
func (i *IntVariable) ToIntVariableOutputWithContext(ctx context.Context) IntVariableOutput {
return pulumi.ToOutputWithContext(ctx, i).(IntVariableOutput)
}
// IntVariableArrayInput is an input type that accepts IntVariableArray and IntVariableArrayOutput values.
// You can construct a concrete instance of `IntVariableArrayInput` via:
//
// IntVariableArray{ IntVariableArgs{...} }
type IntVariableArrayInput interface {
pulumi.Input
ToIntVariableArrayOutput() IntVariableArrayOutput
ToIntVariableArrayOutputWithContext(context.Context) IntVariableArrayOutput
}
type IntVariableArray []IntVariableInput
func (IntVariableArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IntVariable)(nil)).Elem()
}
func (i IntVariableArray) ToIntVariableArrayOutput() IntVariableArrayOutput {
return i.ToIntVariableArrayOutputWithContext(context.Background())
}
func (i IntVariableArray) ToIntVariableArrayOutputWithContext(ctx context.Context) IntVariableArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IntVariableArrayOutput)
}
// IntVariableMapInput is an input type that accepts IntVariableMap and IntVariableMapOutput values.
// You can construct a concrete instance of `IntVariableMapInput` via:
//
// IntVariableMap{ "key": IntVariableArgs{...} }
type IntVariableMapInput interface {
pulumi.Input
ToIntVariableMapOutput() IntVariableMapOutput
ToIntVariableMapOutputWithContext(context.Context) IntVariableMapOutput
}
type IntVariableMap map[string]IntVariableInput
func (IntVariableMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IntVariable)(nil)).Elem()
}
func (i IntVariableMap) ToIntVariableMapOutput() IntVariableMapOutput {
return i.ToIntVariableMapOutputWithContext(context.Background())
}
func (i IntVariableMap) ToIntVariableMapOutputWithContext(ctx context.Context) IntVariableMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IntVariableMapOutput)
}
type IntVariableOutput struct{ *pulumi.OutputState }
func (IntVariableOutput) ElementType() reflect.Type {
return reflect.TypeOf((**IntVariable)(nil)).Elem()
}
func (o IntVariableOutput) ToIntVariableOutput() IntVariableOutput {
return o
}
func (o IntVariableOutput) ToIntVariableOutputWithContext(ctx context.Context) IntVariableOutput {
return o
}
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
func (o IntVariableOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *IntVariable) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The description of the Automation Variable.
func (o IntVariableOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *IntVariable) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
func (o IntVariableOutput) Encrypted() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *IntVariable) pulumi.BoolPtrOutput { return v.Encrypted }).(pulumi.BoolPtrOutput)
}
// The name of the Automation Variable. Changing this forces a new resource to be created.
func (o IntVariableOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *IntVariable) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
func (o IntVariableOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *IntVariable) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The value of the Automation Variable as a `integer`.
func (o IntVariableOutput) Value() pulumi.IntPtrOutput {
return o.ApplyT(func(v *IntVariable) pulumi.IntPtrOutput { return v.Value }).(pulumi.IntPtrOutput)
}
type IntVariableArrayOutput struct{ *pulumi.OutputState }
func (IntVariableArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*IntVariable)(nil)).Elem()
}
func (o IntVariableArrayOutput) ToIntVariableArrayOutput() IntVariableArrayOutput {
return o
}
func (o IntVariableArrayOutput) ToIntVariableArrayOutputWithContext(ctx context.Context) IntVariableArrayOutput {
return o
}
func (o IntVariableArrayOutput) Index(i pulumi.IntInput) IntVariableOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IntVariable {
return vs[0].([]*IntVariable)[vs[1].(int)]
}).(IntVariableOutput)
}
type IntVariableMapOutput struct{ *pulumi.OutputState }
func (IntVariableMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*IntVariable)(nil)).Elem()
}
func (o IntVariableMapOutput) ToIntVariableMapOutput() IntVariableMapOutput {
return o
}
func (o IntVariableMapOutput) ToIntVariableMapOutputWithContext(ctx context.Context) IntVariableMapOutput {
return o
}
func (o IntVariableMapOutput) MapIndex(k pulumi.StringInput) IntVariableOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IntVariable {
return vs[0].(map[string]*IntVariable)[vs[1].(string)]
}).(IntVariableOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*IntVariableInput)(nil)).Elem(), &IntVariable{})
pulumi.RegisterInputType(reflect.TypeOf((*IntVariableArrayInput)(nil)).Elem(), IntVariableArray{})
pulumi.RegisterInputType(reflect.TypeOf((*IntVariableMapInput)(nil)).Elem(), IntVariableMap{})
pulumi.RegisterOutputType(IntVariableOutput{})
pulumi.RegisterOutputType(IntVariableArrayOutput{})
pulumi.RegisterOutputType(IntVariableMapOutput{})
}
| 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/automation/softwareUpdateConfiguration.go | sdk/go/azure/automation/softwareUpdateConfiguration.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Automation Software Update Configuration.
//
// !> **Note:** The `automation.SoftwareUpdateConfiguration` resource has been deprecated because the Azure Automation Update Management was retired on 2024-08-31 and has been shutdown on 2025-02-28. This resource will be removed in v5.0 of the AzureRM Provider. Please migrate to Azure Update Manager, and use the `maintenance.Configuration` resource combined with the appropriate assignment resources instead. See https://techcommunity.microsoft.com/blog/azuregovernanceandmanagementblog/log-analytics-agent-based-azure-management-services-shut-down-starting-28-februa/4381853 for more information.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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-rg"),
// Location: pulumi.String("East US"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// exampleRunBook, err := automation.NewRunBook(ctx, "example", &automation.RunBookArgs{
// Name: pulumi.String("Get-AzureVMTutorial"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// LogVerbose: pulumi.Bool(true),
// LogProgress: pulumi.Bool(true),
// Description: pulumi.String("This is a example runbook for terraform acceptance example"),
// RunbookType: pulumi.String("Python3"),
// Content: pulumi.String("# Some example content\n# for Terraform acceptance example\n"),
// Tags: pulumi.StringMap{
// "ENV": pulumi.String("runbook_test"),
// },
// })
// if err != nil {
// return err
// }
// _, err = automation.NewSoftwareUpdateConfiguration(ctx, "example", &automation.SoftwareUpdateConfigurationArgs{
// Name: pulumi.String("example"),
// AutomationAccountId: exampleAccount.ID(),
// Linux: &automation.SoftwareUpdateConfigurationLinuxArgs{
// ClassificationsIncludeds: pulumi.StringArray("Security"),
// ExcludedPackages: pulumi.StringArray{
// pulumi.String("apt"),
// },
// IncludedPackages: pulumi.StringArray{
// pulumi.String("vim"),
// },
// Reboot: pulumi.String("IfRequired"),
// },
// PreTask: &automation.SoftwareUpdateConfigurationPreTaskArgs{
// Source: exampleRunBook.Name,
// Parameters: pulumi.StringMap{
// "COMPUTER_NAME": pulumi.String("Foo"),
// },
// },
// Duration: pulumi.String("PT2H2M2S"),
// })
// 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.Automation` - 2019-06-01
//
// ## Import
//
// Automations Software Update Configuration can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/softwareUpdateConfiguration:SoftwareUpdateConfiguration example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/softwareUpdateConfigurations/suc1
// ```
type SoftwareUpdateConfiguration struct {
pulumi.CustomResourceState
// The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.
AutomationAccountId pulumi.StringOutput `pulumi:"automationAccountId"`
// Maximum time allowed for the software update configuration run. using format `PT[n]H[n]M[n]S` as per ISO8601. Defaults to `PT2H`.
Duration pulumi.StringPtrOutput `pulumi:"duration"`
// The Error code when failed.
ErrorCode pulumi.StringOutput `pulumi:"errorCode"`
// The Error message indicating why the operation failed.
ErrorMessage pulumi.StringOutput `pulumi:"errorMessage"`
// A `linux` block as defined below.
Linux SoftwareUpdateConfigurationLinuxPtrOutput `pulumi:"linux"`
// The name which should be used for this Automation. Changing this forces a new Automation to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies a list of names of non-Azure machines for the software update configuration.
NonAzureComputerNames pulumi.StringArrayOutput `pulumi:"nonAzureComputerNames"`
// A `postTask` blocks as defined below.
PostTask SoftwareUpdateConfigurationPostTaskPtrOutput `pulumi:"postTask"`
// A `preTask` blocks as defined below.
PreTask SoftwareUpdateConfigurationPreTaskPtrOutput `pulumi:"preTask"`
// A `schedule` blocks as defined below.
Schedule SoftwareUpdateConfigurationScheduleOutput `pulumi:"schedule"`
// A `target` blocks as defined below.
Target SoftwareUpdateConfigurationTargetPtrOutput `pulumi:"target"`
// Specifies a list of Azure Resource IDs of azure virtual machines.
VirtualMachineIds pulumi.StringArrayOutput `pulumi:"virtualMachineIds"`
// A `windows` block as defined below.
//
// > **Note:** One of `linux` or `windows` must be specified.
Windows SoftwareUpdateConfigurationWindowsPtrOutput `pulumi:"windows"`
}
// NewSoftwareUpdateConfiguration registers a new resource with the given unique name, arguments, and options.
func NewSoftwareUpdateConfiguration(ctx *pulumi.Context,
name string, args *SoftwareUpdateConfigurationArgs, opts ...pulumi.ResourceOption) (*SoftwareUpdateConfiguration, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountId == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountId'")
}
if args.Schedule == nil {
return nil, errors.New("invalid value for required argument 'Schedule'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SoftwareUpdateConfiguration
err := ctx.RegisterResource("azure:automation/softwareUpdateConfiguration:SoftwareUpdateConfiguration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSoftwareUpdateConfiguration gets an existing SoftwareUpdateConfiguration 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 GetSoftwareUpdateConfiguration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SoftwareUpdateConfigurationState, opts ...pulumi.ResourceOption) (*SoftwareUpdateConfiguration, error) {
var resource SoftwareUpdateConfiguration
err := ctx.ReadResource("azure:automation/softwareUpdateConfiguration:SoftwareUpdateConfiguration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SoftwareUpdateConfiguration resources.
type softwareUpdateConfigurationState struct {
// The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.
AutomationAccountId *string `pulumi:"automationAccountId"`
// Maximum time allowed for the software update configuration run. using format `PT[n]H[n]M[n]S` as per ISO8601. Defaults to `PT2H`.
Duration *string `pulumi:"duration"`
// The Error code when failed.
ErrorCode *string `pulumi:"errorCode"`
// The Error message indicating why the operation failed.
ErrorMessage *string `pulumi:"errorMessage"`
// A `linux` block as defined below.
Linux *SoftwareUpdateConfigurationLinux `pulumi:"linux"`
// The name which should be used for this Automation. Changing this forces a new Automation to be created.
Name *string `pulumi:"name"`
// Specifies a list of names of non-Azure machines for the software update configuration.
NonAzureComputerNames []string `pulumi:"nonAzureComputerNames"`
// A `postTask` blocks as defined below.
PostTask *SoftwareUpdateConfigurationPostTask `pulumi:"postTask"`
// A `preTask` blocks as defined below.
PreTask *SoftwareUpdateConfigurationPreTask `pulumi:"preTask"`
// A `schedule` blocks as defined below.
Schedule *SoftwareUpdateConfigurationSchedule `pulumi:"schedule"`
// A `target` blocks as defined below.
Target *SoftwareUpdateConfigurationTarget `pulumi:"target"`
// Specifies a list of Azure Resource IDs of azure virtual machines.
VirtualMachineIds []string `pulumi:"virtualMachineIds"`
// A `windows` block as defined below.
//
// > **Note:** One of `linux` or `windows` must be specified.
Windows *SoftwareUpdateConfigurationWindows `pulumi:"windows"`
}
type SoftwareUpdateConfigurationState struct {
// The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.
AutomationAccountId pulumi.StringPtrInput
// Maximum time allowed for the software update configuration run. using format `PT[n]H[n]M[n]S` as per ISO8601. Defaults to `PT2H`.
Duration pulumi.StringPtrInput
// The Error code when failed.
ErrorCode pulumi.StringPtrInput
// The Error message indicating why the operation failed.
ErrorMessage pulumi.StringPtrInput
// A `linux` block as defined below.
Linux SoftwareUpdateConfigurationLinuxPtrInput
// The name which should be used for this Automation. Changing this forces a new Automation to be created.
Name pulumi.StringPtrInput
// Specifies a list of names of non-Azure machines for the software update configuration.
NonAzureComputerNames pulumi.StringArrayInput
// A `postTask` blocks as defined below.
PostTask SoftwareUpdateConfigurationPostTaskPtrInput
// A `preTask` blocks as defined below.
PreTask SoftwareUpdateConfigurationPreTaskPtrInput
// A `schedule` blocks as defined below.
Schedule SoftwareUpdateConfigurationSchedulePtrInput
// A `target` blocks as defined below.
Target SoftwareUpdateConfigurationTargetPtrInput
// Specifies a list of Azure Resource IDs of azure virtual machines.
VirtualMachineIds pulumi.StringArrayInput
// A `windows` block as defined below.
//
// > **Note:** One of `linux` or `windows` must be specified.
Windows SoftwareUpdateConfigurationWindowsPtrInput
}
func (SoftwareUpdateConfigurationState) ElementType() reflect.Type {
return reflect.TypeOf((*softwareUpdateConfigurationState)(nil)).Elem()
}
type softwareUpdateConfigurationArgs struct {
// The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.
AutomationAccountId string `pulumi:"automationAccountId"`
// Maximum time allowed for the software update configuration run. using format `PT[n]H[n]M[n]S` as per ISO8601. Defaults to `PT2H`.
Duration *string `pulumi:"duration"`
// A `linux` block as defined below.
Linux *SoftwareUpdateConfigurationLinux `pulumi:"linux"`
// The name which should be used for this Automation. Changing this forces a new Automation to be created.
Name *string `pulumi:"name"`
// Specifies a list of names of non-Azure machines for the software update configuration.
NonAzureComputerNames []string `pulumi:"nonAzureComputerNames"`
// A `postTask` blocks as defined below.
PostTask *SoftwareUpdateConfigurationPostTask `pulumi:"postTask"`
// A `preTask` blocks as defined below.
PreTask *SoftwareUpdateConfigurationPreTask `pulumi:"preTask"`
// A `schedule` blocks as defined below.
Schedule SoftwareUpdateConfigurationSchedule `pulumi:"schedule"`
// A `target` blocks as defined below.
Target *SoftwareUpdateConfigurationTarget `pulumi:"target"`
// Specifies a list of Azure Resource IDs of azure virtual machines.
VirtualMachineIds []string `pulumi:"virtualMachineIds"`
// A `windows` block as defined below.
//
// > **Note:** One of `linux` or `windows` must be specified.
Windows *SoftwareUpdateConfigurationWindows `pulumi:"windows"`
}
// The set of arguments for constructing a SoftwareUpdateConfiguration resource.
type SoftwareUpdateConfigurationArgs struct {
// The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.
AutomationAccountId pulumi.StringInput
// Maximum time allowed for the software update configuration run. using format `PT[n]H[n]M[n]S` as per ISO8601. Defaults to `PT2H`.
Duration pulumi.StringPtrInput
// A `linux` block as defined below.
Linux SoftwareUpdateConfigurationLinuxPtrInput
// The name which should be used for this Automation. Changing this forces a new Automation to be created.
Name pulumi.StringPtrInput
// Specifies a list of names of non-Azure machines for the software update configuration.
NonAzureComputerNames pulumi.StringArrayInput
// A `postTask` blocks as defined below.
PostTask SoftwareUpdateConfigurationPostTaskPtrInput
// A `preTask` blocks as defined below.
PreTask SoftwareUpdateConfigurationPreTaskPtrInput
// A `schedule` blocks as defined below.
Schedule SoftwareUpdateConfigurationScheduleInput
// A `target` blocks as defined below.
Target SoftwareUpdateConfigurationTargetPtrInput
// Specifies a list of Azure Resource IDs of azure virtual machines.
VirtualMachineIds pulumi.StringArrayInput
// A `windows` block as defined below.
//
// > **Note:** One of `linux` or `windows` must be specified.
Windows SoftwareUpdateConfigurationWindowsPtrInput
}
func (SoftwareUpdateConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*softwareUpdateConfigurationArgs)(nil)).Elem()
}
type SoftwareUpdateConfigurationInput interface {
pulumi.Input
ToSoftwareUpdateConfigurationOutput() SoftwareUpdateConfigurationOutput
ToSoftwareUpdateConfigurationOutputWithContext(ctx context.Context) SoftwareUpdateConfigurationOutput
}
func (*SoftwareUpdateConfiguration) ElementType() reflect.Type {
return reflect.TypeOf((**SoftwareUpdateConfiguration)(nil)).Elem()
}
func (i *SoftwareUpdateConfiguration) ToSoftwareUpdateConfigurationOutput() SoftwareUpdateConfigurationOutput {
return i.ToSoftwareUpdateConfigurationOutputWithContext(context.Background())
}
func (i *SoftwareUpdateConfiguration) ToSoftwareUpdateConfigurationOutputWithContext(ctx context.Context) SoftwareUpdateConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(SoftwareUpdateConfigurationOutput)
}
// SoftwareUpdateConfigurationArrayInput is an input type that accepts SoftwareUpdateConfigurationArray and SoftwareUpdateConfigurationArrayOutput values.
// You can construct a concrete instance of `SoftwareUpdateConfigurationArrayInput` via:
//
// SoftwareUpdateConfigurationArray{ SoftwareUpdateConfigurationArgs{...} }
type SoftwareUpdateConfigurationArrayInput interface {
pulumi.Input
ToSoftwareUpdateConfigurationArrayOutput() SoftwareUpdateConfigurationArrayOutput
ToSoftwareUpdateConfigurationArrayOutputWithContext(context.Context) SoftwareUpdateConfigurationArrayOutput
}
type SoftwareUpdateConfigurationArray []SoftwareUpdateConfigurationInput
func (SoftwareUpdateConfigurationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SoftwareUpdateConfiguration)(nil)).Elem()
}
func (i SoftwareUpdateConfigurationArray) ToSoftwareUpdateConfigurationArrayOutput() SoftwareUpdateConfigurationArrayOutput {
return i.ToSoftwareUpdateConfigurationArrayOutputWithContext(context.Background())
}
func (i SoftwareUpdateConfigurationArray) ToSoftwareUpdateConfigurationArrayOutputWithContext(ctx context.Context) SoftwareUpdateConfigurationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SoftwareUpdateConfigurationArrayOutput)
}
// SoftwareUpdateConfigurationMapInput is an input type that accepts SoftwareUpdateConfigurationMap and SoftwareUpdateConfigurationMapOutput values.
// You can construct a concrete instance of `SoftwareUpdateConfigurationMapInput` via:
//
// SoftwareUpdateConfigurationMap{ "key": SoftwareUpdateConfigurationArgs{...} }
type SoftwareUpdateConfigurationMapInput interface {
pulumi.Input
ToSoftwareUpdateConfigurationMapOutput() SoftwareUpdateConfigurationMapOutput
ToSoftwareUpdateConfigurationMapOutputWithContext(context.Context) SoftwareUpdateConfigurationMapOutput
}
type SoftwareUpdateConfigurationMap map[string]SoftwareUpdateConfigurationInput
func (SoftwareUpdateConfigurationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SoftwareUpdateConfiguration)(nil)).Elem()
}
func (i SoftwareUpdateConfigurationMap) ToSoftwareUpdateConfigurationMapOutput() SoftwareUpdateConfigurationMapOutput {
return i.ToSoftwareUpdateConfigurationMapOutputWithContext(context.Background())
}
func (i SoftwareUpdateConfigurationMap) ToSoftwareUpdateConfigurationMapOutputWithContext(ctx context.Context) SoftwareUpdateConfigurationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SoftwareUpdateConfigurationMapOutput)
}
type SoftwareUpdateConfigurationOutput struct{ *pulumi.OutputState }
func (SoftwareUpdateConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SoftwareUpdateConfiguration)(nil)).Elem()
}
func (o SoftwareUpdateConfigurationOutput) ToSoftwareUpdateConfigurationOutput() SoftwareUpdateConfigurationOutput {
return o
}
func (o SoftwareUpdateConfigurationOutput) ToSoftwareUpdateConfigurationOutputWithContext(ctx context.Context) SoftwareUpdateConfigurationOutput {
return o
}
// The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.
func (o SoftwareUpdateConfigurationOutput) AutomationAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *SoftwareUpdateConfiguration) pulumi.StringOutput { return v.AutomationAccountId }).(pulumi.StringOutput)
}
// Maximum time allowed for the software update configuration run. using format `PT[n]H[n]M[n]S` as per ISO8601. Defaults to `PT2H`.
func (o SoftwareUpdateConfigurationOutput) Duration() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SoftwareUpdateConfiguration) pulumi.StringPtrOutput { return v.Duration }).(pulumi.StringPtrOutput)
}
// The Error code when failed.
func (o SoftwareUpdateConfigurationOutput) ErrorCode() pulumi.StringOutput {
return o.ApplyT(func(v *SoftwareUpdateConfiguration) pulumi.StringOutput { return v.ErrorCode }).(pulumi.StringOutput)
}
// The Error message indicating why the operation failed.
func (o SoftwareUpdateConfigurationOutput) ErrorMessage() pulumi.StringOutput {
return o.ApplyT(func(v *SoftwareUpdateConfiguration) pulumi.StringOutput { return v.ErrorMessage }).(pulumi.StringOutput)
}
// A `linux` block as defined below.
func (o SoftwareUpdateConfigurationOutput) Linux() SoftwareUpdateConfigurationLinuxPtrOutput {
return o.ApplyT(func(v *SoftwareUpdateConfiguration) SoftwareUpdateConfigurationLinuxPtrOutput { return v.Linux }).(SoftwareUpdateConfigurationLinuxPtrOutput)
}
// The name which should be used for this Automation. Changing this forces a new Automation to be created.
func (o SoftwareUpdateConfigurationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SoftwareUpdateConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies a list of names of non-Azure machines for the software update configuration.
func (o SoftwareUpdateConfigurationOutput) NonAzureComputerNames() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SoftwareUpdateConfiguration) pulumi.StringArrayOutput { return v.NonAzureComputerNames }).(pulumi.StringArrayOutput)
}
// A `postTask` blocks as defined below.
func (o SoftwareUpdateConfigurationOutput) PostTask() SoftwareUpdateConfigurationPostTaskPtrOutput {
return o.ApplyT(func(v *SoftwareUpdateConfiguration) SoftwareUpdateConfigurationPostTaskPtrOutput { return v.PostTask }).(SoftwareUpdateConfigurationPostTaskPtrOutput)
}
// A `preTask` blocks as defined below.
func (o SoftwareUpdateConfigurationOutput) PreTask() SoftwareUpdateConfigurationPreTaskPtrOutput {
return o.ApplyT(func(v *SoftwareUpdateConfiguration) SoftwareUpdateConfigurationPreTaskPtrOutput { return v.PreTask }).(SoftwareUpdateConfigurationPreTaskPtrOutput)
}
// A `schedule` blocks as defined below.
func (o SoftwareUpdateConfigurationOutput) Schedule() SoftwareUpdateConfigurationScheduleOutput {
return o.ApplyT(func(v *SoftwareUpdateConfiguration) SoftwareUpdateConfigurationScheduleOutput { return v.Schedule }).(SoftwareUpdateConfigurationScheduleOutput)
}
// A `target` blocks as defined below.
func (o SoftwareUpdateConfigurationOutput) Target() SoftwareUpdateConfigurationTargetPtrOutput {
return o.ApplyT(func(v *SoftwareUpdateConfiguration) SoftwareUpdateConfigurationTargetPtrOutput { return v.Target }).(SoftwareUpdateConfigurationTargetPtrOutput)
}
// Specifies a list of Azure Resource IDs of azure virtual machines.
func (o SoftwareUpdateConfigurationOutput) VirtualMachineIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SoftwareUpdateConfiguration) pulumi.StringArrayOutput { return v.VirtualMachineIds }).(pulumi.StringArrayOutput)
}
// A `windows` block as defined below.
//
// > **Note:** One of `linux` or `windows` must be specified.
func (o SoftwareUpdateConfigurationOutput) Windows() SoftwareUpdateConfigurationWindowsPtrOutput {
return o.ApplyT(func(v *SoftwareUpdateConfiguration) SoftwareUpdateConfigurationWindowsPtrOutput { return v.Windows }).(SoftwareUpdateConfigurationWindowsPtrOutput)
}
type SoftwareUpdateConfigurationArrayOutput struct{ *pulumi.OutputState }
func (SoftwareUpdateConfigurationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SoftwareUpdateConfiguration)(nil)).Elem()
}
func (o SoftwareUpdateConfigurationArrayOutput) ToSoftwareUpdateConfigurationArrayOutput() SoftwareUpdateConfigurationArrayOutput {
return o
}
func (o SoftwareUpdateConfigurationArrayOutput) ToSoftwareUpdateConfigurationArrayOutputWithContext(ctx context.Context) SoftwareUpdateConfigurationArrayOutput {
return o
}
func (o SoftwareUpdateConfigurationArrayOutput) Index(i pulumi.IntInput) SoftwareUpdateConfigurationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SoftwareUpdateConfiguration {
return vs[0].([]*SoftwareUpdateConfiguration)[vs[1].(int)]
}).(SoftwareUpdateConfigurationOutput)
}
type SoftwareUpdateConfigurationMapOutput struct{ *pulumi.OutputState }
func (SoftwareUpdateConfigurationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SoftwareUpdateConfiguration)(nil)).Elem()
}
func (o SoftwareUpdateConfigurationMapOutput) ToSoftwareUpdateConfigurationMapOutput() SoftwareUpdateConfigurationMapOutput {
return o
}
func (o SoftwareUpdateConfigurationMapOutput) ToSoftwareUpdateConfigurationMapOutputWithContext(ctx context.Context) SoftwareUpdateConfigurationMapOutput {
return o
}
func (o SoftwareUpdateConfigurationMapOutput) MapIndex(k pulumi.StringInput) SoftwareUpdateConfigurationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SoftwareUpdateConfiguration {
return vs[0].(map[string]*SoftwareUpdateConfiguration)[vs[1].(string)]
}).(SoftwareUpdateConfigurationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SoftwareUpdateConfigurationInput)(nil)).Elem(), &SoftwareUpdateConfiguration{})
pulumi.RegisterInputType(reflect.TypeOf((*SoftwareUpdateConfigurationArrayInput)(nil)).Elem(), SoftwareUpdateConfigurationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SoftwareUpdateConfigurationMapInput)(nil)).Elem(), SoftwareUpdateConfigurationMap{})
pulumi.RegisterOutputType(SoftwareUpdateConfigurationOutput{})
pulumi.RegisterOutputType(SoftwareUpdateConfigurationArrayOutput{})
pulumi.RegisterOutputType(SoftwareUpdateConfigurationMapOutput{})
}
| 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/automation/stringVariable.go | sdk/go/azure/automation/stringVariable.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a string variable in Azure Automation
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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("tfex-example-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("tfex-example-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewStringVariable(ctx, "example", &automation.StringVariableArgs{
// Name: pulumi.String("tfex-example-var"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// Value: pulumi.String("Hello, Basic Test."),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Automation String Variable can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/stringVariable:StringVariable example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tfex-example-rg/providers/Microsoft.Automation/automationAccounts/tfex-example-account/variables/tfex-example-var
// ```
type StringVariable struct {
pulumi.CustomResourceState
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted pulumi.BoolPtrOutput `pulumi:"encrypted"`
// The name of the Automation Variable. 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 Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a `string`.
Value pulumi.StringPtrOutput `pulumi:"value"`
}
// NewStringVariable registers a new resource with the given unique name, arguments, and options.
func NewStringVariable(ctx *pulumi.Context,
name string, args *StringVariableArgs, opts ...pulumi.ResourceOption) (*StringVariable, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource StringVariable
err := ctx.RegisterResource("azure:automation/stringVariable:StringVariable", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetStringVariable gets an existing StringVariable 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 GetStringVariable(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *StringVariableState, opts ...pulumi.ResourceOption) (*StringVariable, error) {
var resource StringVariable
err := ctx.ReadResource("azure:automation/stringVariable:StringVariable", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering StringVariable resources.
type stringVariableState struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description *string `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted *bool `pulumi:"encrypted"`
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a `string`.
Value *string `pulumi:"value"`
}
type StringVariableState struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// The description of the Automation Variable.
Description pulumi.StringPtrInput
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted pulumi.BoolPtrInput
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The value of the Automation Variable as a `string`.
Value pulumi.StringPtrInput
}
func (StringVariableState) ElementType() reflect.Type {
return reflect.TypeOf((*stringVariableState)(nil)).Elem()
}
type stringVariableArgs struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description *string `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted *bool `pulumi:"encrypted"`
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a `string`.
Value *string `pulumi:"value"`
}
// The set of arguments for constructing a StringVariable resource.
type StringVariableArgs struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The description of the Automation Variable.
Description pulumi.StringPtrInput
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted pulumi.BoolPtrInput
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The value of the Automation Variable as a `string`.
Value pulumi.StringPtrInput
}
func (StringVariableArgs) ElementType() reflect.Type {
return reflect.TypeOf((*stringVariableArgs)(nil)).Elem()
}
type StringVariableInput interface {
pulumi.Input
ToStringVariableOutput() StringVariableOutput
ToStringVariableOutputWithContext(ctx context.Context) StringVariableOutput
}
func (*StringVariable) ElementType() reflect.Type {
return reflect.TypeOf((**StringVariable)(nil)).Elem()
}
func (i *StringVariable) ToStringVariableOutput() StringVariableOutput {
return i.ToStringVariableOutputWithContext(context.Background())
}
func (i *StringVariable) ToStringVariableOutputWithContext(ctx context.Context) StringVariableOutput {
return pulumi.ToOutputWithContext(ctx, i).(StringVariableOutput)
}
// StringVariableArrayInput is an input type that accepts StringVariableArray and StringVariableArrayOutput values.
// You can construct a concrete instance of `StringVariableArrayInput` via:
//
// StringVariableArray{ StringVariableArgs{...} }
type StringVariableArrayInput interface {
pulumi.Input
ToStringVariableArrayOutput() StringVariableArrayOutput
ToStringVariableArrayOutputWithContext(context.Context) StringVariableArrayOutput
}
type StringVariableArray []StringVariableInput
func (StringVariableArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StringVariable)(nil)).Elem()
}
func (i StringVariableArray) ToStringVariableArrayOutput() StringVariableArrayOutput {
return i.ToStringVariableArrayOutputWithContext(context.Background())
}
func (i StringVariableArray) ToStringVariableArrayOutputWithContext(ctx context.Context) StringVariableArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(StringVariableArrayOutput)
}
// StringVariableMapInput is an input type that accepts StringVariableMap and StringVariableMapOutput values.
// You can construct a concrete instance of `StringVariableMapInput` via:
//
// StringVariableMap{ "key": StringVariableArgs{...} }
type StringVariableMapInput interface {
pulumi.Input
ToStringVariableMapOutput() StringVariableMapOutput
ToStringVariableMapOutputWithContext(context.Context) StringVariableMapOutput
}
type StringVariableMap map[string]StringVariableInput
func (StringVariableMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StringVariable)(nil)).Elem()
}
func (i StringVariableMap) ToStringVariableMapOutput() StringVariableMapOutput {
return i.ToStringVariableMapOutputWithContext(context.Background())
}
func (i StringVariableMap) ToStringVariableMapOutputWithContext(ctx context.Context) StringVariableMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(StringVariableMapOutput)
}
type StringVariableOutput struct{ *pulumi.OutputState }
func (StringVariableOutput) ElementType() reflect.Type {
return reflect.TypeOf((**StringVariable)(nil)).Elem()
}
func (o StringVariableOutput) ToStringVariableOutput() StringVariableOutput {
return o
}
func (o StringVariableOutput) ToStringVariableOutputWithContext(ctx context.Context) StringVariableOutput {
return o
}
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
func (o StringVariableOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *StringVariable) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The description of the Automation Variable.
func (o StringVariableOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *StringVariable) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
func (o StringVariableOutput) Encrypted() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *StringVariable) pulumi.BoolPtrOutput { return v.Encrypted }).(pulumi.BoolPtrOutput)
}
// The name of the Automation Variable. Changing this forces a new resource to be created.
func (o StringVariableOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *StringVariable) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
func (o StringVariableOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *StringVariable) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The value of the Automation Variable as a `string`.
func (o StringVariableOutput) Value() pulumi.StringPtrOutput {
return o.ApplyT(func(v *StringVariable) pulumi.StringPtrOutput { return v.Value }).(pulumi.StringPtrOutput)
}
type StringVariableArrayOutput struct{ *pulumi.OutputState }
func (StringVariableArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StringVariable)(nil)).Elem()
}
func (o StringVariableArrayOutput) ToStringVariableArrayOutput() StringVariableArrayOutput {
return o
}
func (o StringVariableArrayOutput) ToStringVariableArrayOutputWithContext(ctx context.Context) StringVariableArrayOutput {
return o
}
func (o StringVariableArrayOutput) Index(i pulumi.IntInput) StringVariableOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StringVariable {
return vs[0].([]*StringVariable)[vs[1].(int)]
}).(StringVariableOutput)
}
type StringVariableMapOutput struct{ *pulumi.OutputState }
func (StringVariableMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StringVariable)(nil)).Elem()
}
func (o StringVariableMapOutput) ToStringVariableMapOutput() StringVariableMapOutput {
return o
}
func (o StringVariableMapOutput) ToStringVariableMapOutputWithContext(ctx context.Context) StringVariableMapOutput {
return o
}
func (o StringVariableMapOutput) MapIndex(k pulumi.StringInput) StringVariableOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StringVariable {
return vs[0].(map[string]*StringVariable)[vs[1].(string)]
}).(StringVariableOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*StringVariableInput)(nil)).Elem(), &StringVariable{})
pulumi.RegisterInputType(reflect.TypeOf((*StringVariableArrayInput)(nil)).Elem(), StringVariableArray{})
pulumi.RegisterInputType(reflect.TypeOf((*StringVariableMapInput)(nil)).Elem(), StringVariableMap{})
pulumi.RegisterOutputType(StringVariableOutput{})
pulumi.RegisterOutputType(StringVariableArrayOutput{})
pulumi.RegisterOutputType(StringVariableMapOutput{})
}
| 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/automation/getAccount.go | sdk/go/azure/automation/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 automation
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 Automation Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := automation.LookupAccount(ctx, &automation.LookupAccountArgs{
// Name: "example-account",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("automationAccountId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Automation` - 2024-10-23, 2019-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:automation/getAccount:getAccount", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAccount.
type LookupAccountArgs struct {
// The name of the Automation Account.
Name string `pulumi:"name"`
// Specifies the name of the Resource Group where the Automation Account exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getAccount.
type LookupAccountResult struct {
// The Endpoint for this Automation Account.
Endpoint string `pulumi:"endpoint"`
// The URL of automation hybrid service which is used for hybrid worker on-boarding With this Automation Account.
HybridServiceUrl string `pulumi:"hybridServiceUrl"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// (Optional) An `identity` block as defined below.
Identities []GetAccountIdentity `pulumi:"identities"`
Name string `pulumi:"name"`
// The Primary Access Key for the Automation Account.
PrimaryKey string `pulumi:"primaryKey"`
PrivateEndpointConnections []GetAccountPrivateEndpointConnection `pulumi:"privateEndpointConnections"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Secondary Access Key for the Automation Account.
SecondaryKey string `pulumi:"secondaryKey"`
}
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:automation/getAccount:getAccount", args, LookupAccountResultOutput{}, options).(LookupAccountResultOutput), nil
}).(LookupAccountResultOutput)
}
// A collection of arguments for invoking getAccount.
type LookupAccountOutputArgs struct {
// The name of the Automation Account.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the name of the Resource Group where the Automation Account exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
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 Endpoint for this Automation Account.
func (o LookupAccountResultOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Endpoint }).(pulumi.StringOutput)
}
// The URL of automation hybrid service which is used for hybrid worker on-boarding With this Automation Account.
func (o LookupAccountResultOutput) HybridServiceUrl() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.HybridServiceUrl }).(pulumi.StringOutput)
}
// 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)
}
// (Optional) An `identity` block as defined below.
func (o LookupAccountResultOutput) Identities() GetAccountIdentityArrayOutput {
return o.ApplyT(func(v LookupAccountResult) []GetAccountIdentity { return v.Identities }).(GetAccountIdentityArrayOutput)
}
func (o LookupAccountResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Name }).(pulumi.StringOutput)
}
// The Primary Access Key for the Automation Account.
func (o LookupAccountResultOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryKey }).(pulumi.StringOutput)
}
func (o LookupAccountResultOutput) PrivateEndpointConnections() GetAccountPrivateEndpointConnectionArrayOutput {
return o.ApplyT(func(v LookupAccountResult) []GetAccountPrivateEndpointConnection { return v.PrivateEndpointConnections }).(GetAccountPrivateEndpointConnectionArrayOutput)
}
func (o LookupAccountResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Secondary Access Key for the Automation Account.
func (o LookupAccountResultOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.SecondaryKey }).(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/automation/getVariables.go | sdk/go/azure/automation/getVariables.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 automation
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 get all variables in an Automation Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := automation.LookupAccount(ctx, &automation.LookupAccountArgs{
// Name: "example-account",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// _, err = automation.GetVariables(ctx, &automation.GetVariablesArgs{
// AutomationAccountId: example.Id,
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("stringVars", exampleAzurermAutomationVariableString.String)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Automation` - 2024-10-23
func GetVariables(ctx *pulumi.Context, args *GetVariablesArgs, opts ...pulumi.InvokeOption) (*GetVariablesResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetVariablesResult
err := ctx.Invoke("azure:automation/getVariables:getVariables", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getVariables.
type GetVariablesArgs struct {
// The resource ID of the automation account.
AutomationAccountId string `pulumi:"automationAccountId"`
}
// A collection of values returned by getVariables.
type GetVariablesResult struct {
AutomationAccountId string `pulumi:"automationAccountId"`
// One or more `variable` blocks as defined below for each boolean variable.
Bools []GetVariablesBool `pulumi:"bools"`
// One or more `variable` blocks as defined below for each datetime variable.
Datetimes []GetVariablesDatetime `pulumi:"datetimes"`
// Specifies if the Automation Variable is encrypted.
Encrypteds []GetVariablesEncrypted `pulumi:"encrypteds"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// One or more `variable` blocks as defined below for each int variable.
Ints []GetVariablesInt `pulumi:"ints"`
// One or more `variable` blocks as defined below for each null variable.
Nulls []GetVariablesNull `pulumi:"nulls"`
Objects []GetVariablesObject `pulumi:"objects"`
// One or more `variable` blocks as defined below for each string variable.
Strings []GetVariablesString `pulumi:"strings"`
}
func GetVariablesOutput(ctx *pulumi.Context, args GetVariablesOutputArgs, opts ...pulumi.InvokeOption) GetVariablesResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetVariablesResultOutput, error) {
args := v.(GetVariablesArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:automation/getVariables:getVariables", args, GetVariablesResultOutput{}, options).(GetVariablesResultOutput), nil
}).(GetVariablesResultOutput)
}
// A collection of arguments for invoking getVariables.
type GetVariablesOutputArgs struct {
// The resource ID of the automation account.
AutomationAccountId pulumi.StringInput `pulumi:"automationAccountId"`
}
func (GetVariablesOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetVariablesArgs)(nil)).Elem()
}
// A collection of values returned by getVariables.
type GetVariablesResultOutput struct{ *pulumi.OutputState }
func (GetVariablesResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetVariablesResult)(nil)).Elem()
}
func (o GetVariablesResultOutput) ToGetVariablesResultOutput() GetVariablesResultOutput {
return o
}
func (o GetVariablesResultOutput) ToGetVariablesResultOutputWithContext(ctx context.Context) GetVariablesResultOutput {
return o
}
func (o GetVariablesResultOutput) AutomationAccountId() pulumi.StringOutput {
return o.ApplyT(func(v GetVariablesResult) string { return v.AutomationAccountId }).(pulumi.StringOutput)
}
// One or more `variable` blocks as defined below for each boolean variable.
func (o GetVariablesResultOutput) Bools() GetVariablesBoolArrayOutput {
return o.ApplyT(func(v GetVariablesResult) []GetVariablesBool { return v.Bools }).(GetVariablesBoolArrayOutput)
}
// One or more `variable` blocks as defined below for each datetime variable.
func (o GetVariablesResultOutput) Datetimes() GetVariablesDatetimeArrayOutput {
return o.ApplyT(func(v GetVariablesResult) []GetVariablesDatetime { return v.Datetimes }).(GetVariablesDatetimeArrayOutput)
}
// Specifies if the Automation Variable is encrypted.
func (o GetVariablesResultOutput) Encrypteds() GetVariablesEncryptedArrayOutput {
return o.ApplyT(func(v GetVariablesResult) []GetVariablesEncrypted { return v.Encrypteds }).(GetVariablesEncryptedArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetVariablesResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetVariablesResult) string { return v.Id }).(pulumi.StringOutput)
}
// One or more `variable` blocks as defined below for each int variable.
func (o GetVariablesResultOutput) Ints() GetVariablesIntArrayOutput {
return o.ApplyT(func(v GetVariablesResult) []GetVariablesInt { return v.Ints }).(GetVariablesIntArrayOutput)
}
// One or more `variable` blocks as defined below for each null variable.
func (o GetVariablesResultOutput) Nulls() GetVariablesNullArrayOutput {
return o.ApplyT(func(v GetVariablesResult) []GetVariablesNull { return v.Nulls }).(GetVariablesNullArrayOutput)
}
func (o GetVariablesResultOutput) Objects() GetVariablesObjectArrayOutput {
return o.ApplyT(func(v GetVariablesResult) []GetVariablesObject { return v.Objects }).(GetVariablesObjectArrayOutput)
}
// One or more `variable` blocks as defined below for each string variable.
func (o GetVariablesResultOutput) Strings() GetVariablesStringArrayOutput {
return o.ApplyT(func(v GetVariablesResult) []GetVariablesString { return v.Strings }).(GetVariablesStringArrayOutput)
}
func init() {
pulumi.RegisterOutputType(GetVariablesResultOutput{})
}
| 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/automation/getDateTimeVariable.go | sdk/go/azure/automation/getDateTimeVariable.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 automation
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 Automation Datetime Variable.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := automation.LookupDateTimeVariable(ctx, &automation.LookupDateTimeVariableArgs{
// Name: "tfex-example-var",
// ResourceGroupName: "tfex-example-rg",
// AutomationAccountName: "tfex-example-account",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("variableId", example.Id)
// return nil
// })
// }
//
// ```
func LookupDateTimeVariable(ctx *pulumi.Context, args *LookupDateTimeVariableArgs, opts ...pulumi.InvokeOption) (*LookupDateTimeVariableResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDateTimeVariableResult
err := ctx.Invoke("azure:automation/getDateTimeVariable:getDateTimeVariable", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDateTimeVariable.
type LookupDateTimeVariableArgs struct {
// The name of the automation account in which the Automation Variable exists.
AutomationAccountName string `pulumi:"automationAccountName"`
// The name of the Automation Variable.
Name string `pulumi:"name"`
// The Name of the Resource Group where the automation account exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getDateTimeVariable.
type LookupDateTimeVariableResult struct {
AutomationAccountName string `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description string `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted bool `pulumi:"encrypted"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The value of the Automation Variable in the [RFC3339 Section 5.6 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6).
Value string `pulumi:"value"`
}
func LookupDateTimeVariableOutput(ctx *pulumi.Context, args LookupDateTimeVariableOutputArgs, opts ...pulumi.InvokeOption) LookupDateTimeVariableResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupDateTimeVariableResultOutput, error) {
args := v.(LookupDateTimeVariableArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:automation/getDateTimeVariable:getDateTimeVariable", args, LookupDateTimeVariableResultOutput{}, options).(LookupDateTimeVariableResultOutput), nil
}).(LookupDateTimeVariableResultOutput)
}
// A collection of arguments for invoking getDateTimeVariable.
type LookupDateTimeVariableOutputArgs struct {
// The name of the automation account in which the Automation Variable exists.
AutomationAccountName pulumi.StringInput `pulumi:"automationAccountName"`
// The name of the Automation Variable.
Name pulumi.StringInput `pulumi:"name"`
// The Name of the Resource Group where the automation account exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupDateTimeVariableOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDateTimeVariableArgs)(nil)).Elem()
}
// A collection of values returned by getDateTimeVariable.
type LookupDateTimeVariableResultOutput struct{ *pulumi.OutputState }
func (LookupDateTimeVariableResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDateTimeVariableResult)(nil)).Elem()
}
func (o LookupDateTimeVariableResultOutput) ToLookupDateTimeVariableResultOutput() LookupDateTimeVariableResultOutput {
return o
}
func (o LookupDateTimeVariableResultOutput) ToLookupDateTimeVariableResultOutputWithContext(ctx context.Context) LookupDateTimeVariableResultOutput {
return o
}
func (o LookupDateTimeVariableResultOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDateTimeVariableResult) string { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The description of the Automation Variable.
func (o LookupDateTimeVariableResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupDateTimeVariableResult) string { return v.Description }).(pulumi.StringOutput)
}
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
func (o LookupDateTimeVariableResultOutput) Encrypted() pulumi.BoolOutput {
return o.ApplyT(func(v LookupDateTimeVariableResult) bool { return v.Encrypted }).(pulumi.BoolOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupDateTimeVariableResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupDateTimeVariableResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupDateTimeVariableResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDateTimeVariableResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupDateTimeVariableResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDateTimeVariableResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The value of the Automation Variable in the [RFC3339 Section 5.6 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6).
func (o LookupDateTimeVariableResultOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v LookupDateTimeVariableResult) string { return v.Value }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDateTimeVariableResultOutput{})
}
| 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/automation/getBoolVariable.go | sdk/go/azure/automation/getBoolVariable.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 automation
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 Automation Bool Variable.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := automation.LookupBoolVariable(ctx, &automation.LookupBoolVariableArgs{
// Name: "tfex-example-var",
// ResourceGroupName: "tfex-example-rg",
// AutomationAccountName: "tfex-example-account",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("variableId", example.Id)
// return nil
// })
// }
//
// ```
func LookupBoolVariable(ctx *pulumi.Context, args *LookupBoolVariableArgs, opts ...pulumi.InvokeOption) (*LookupBoolVariableResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupBoolVariableResult
err := ctx.Invoke("azure:automation/getBoolVariable:getBoolVariable", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getBoolVariable.
type LookupBoolVariableArgs struct {
// The name of the automation account in which the Automation Variable exists.
AutomationAccountName string `pulumi:"automationAccountName"`
// The name of the Automation Variable.
Name string `pulumi:"name"`
// The Name of the Resource Group where the automation account exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getBoolVariable.
type LookupBoolVariableResult struct {
AutomationAccountName string `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description string `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted bool `pulumi:"encrypted"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a `boolean`.
Value bool `pulumi:"value"`
}
func LookupBoolVariableOutput(ctx *pulumi.Context, args LookupBoolVariableOutputArgs, opts ...pulumi.InvokeOption) LookupBoolVariableResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupBoolVariableResultOutput, error) {
args := v.(LookupBoolVariableArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:automation/getBoolVariable:getBoolVariable", args, LookupBoolVariableResultOutput{}, options).(LookupBoolVariableResultOutput), nil
}).(LookupBoolVariableResultOutput)
}
// A collection of arguments for invoking getBoolVariable.
type LookupBoolVariableOutputArgs struct {
// The name of the automation account in which the Automation Variable exists.
AutomationAccountName pulumi.StringInput `pulumi:"automationAccountName"`
// The name of the Automation Variable.
Name pulumi.StringInput `pulumi:"name"`
// The Name of the Resource Group where the automation account exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupBoolVariableOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupBoolVariableArgs)(nil)).Elem()
}
// A collection of values returned by getBoolVariable.
type LookupBoolVariableResultOutput struct{ *pulumi.OutputState }
func (LookupBoolVariableResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupBoolVariableResult)(nil)).Elem()
}
func (o LookupBoolVariableResultOutput) ToLookupBoolVariableResultOutput() LookupBoolVariableResultOutput {
return o
}
func (o LookupBoolVariableResultOutput) ToLookupBoolVariableResultOutputWithContext(ctx context.Context) LookupBoolVariableResultOutput {
return o
}
func (o LookupBoolVariableResultOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v LookupBoolVariableResult) string { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The description of the Automation Variable.
func (o LookupBoolVariableResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupBoolVariableResult) string { return v.Description }).(pulumi.StringOutput)
}
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
func (o LookupBoolVariableResultOutput) Encrypted() pulumi.BoolOutput {
return o.ApplyT(func(v LookupBoolVariableResult) bool { return v.Encrypted }).(pulumi.BoolOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupBoolVariableResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupBoolVariableResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupBoolVariableResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupBoolVariableResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupBoolVariableResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupBoolVariableResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The value of the Automation Variable as a `boolean`.
func (o LookupBoolVariableResultOutput) Value() pulumi.BoolOutput {
return o.ApplyT(func(v LookupBoolVariableResult) bool { return v.Value }).(pulumi.BoolOutput)
}
func init() {
pulumi.RegisterOutputType(LookupBoolVariableResultOutput{})
}
| 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/automation/runBook.go | sdk/go/azure/automation/runBook.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Automation Runbook.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("account1"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewRunBook(ctx, "example", &automation.RunBookArgs{
// Name: pulumi.String("Get-AzureVMTutorial"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// LogVerbose: pulumi.Bool(true),
// LogProgress: pulumi.Bool(true),
// Description: pulumi.String("This is an example runbook"),
// RunbookType: pulumi.String("PowerShellWorkflow"),
// PublishContentLink: &automation.RunBookPublishContentLinkArgs{
// Uri: pulumi.String("https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Automation Runbooks can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/runBook:RunBook Get-AzureVMTutorial /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/runbooks/Get-AzureVMTutorial
// ```
type RunBook struct {
pulumi.CustomResourceState
// The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// The desired content of the runbook.
//
// > **Note:** The Azure API requires a `publishContentLink` to be supplied even when specifying your own `content`.
Content pulumi.StringOutput `pulumi:"content"`
// A description for the runbook.
Description pulumi.StringPtrOutput `pulumi:"description"`
// A `draft` block as defined below.
Draft RunBookDraftPtrOutput `pulumi:"draft"`
// One or more `jobSchedule` block as defined below.
//
// > **Note:** AzureRM provides a stand-alone automation.JobSchedule and this inlined `jobSchedule` property to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
JobSchedules RunBookJobScheduleArrayOutput `pulumi:"jobSchedules"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are `0` for None, `9` for Basic, and `15` for Detailed. Must turn on Verbose logging in order to see the tracing.
LogActivityTraceLevel pulumi.IntPtrOutput `pulumi:"logActivityTraceLevel"`
// Progress log option.
LogProgress pulumi.BoolOutput `pulumi:"logProgress"`
// Verbose log option.
LogVerbose pulumi.BoolOutput `pulumi:"logVerbose"`
// Specifies the name of the Runbook. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// One `publishContentLink` block as defined below.
PublishContentLink RunBookPublishContentLinkPtrOutput `pulumi:"publishContentLink"`
// The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The type of the runbook - can be either `Graph`, `GraphPowerShell`, `GraphPowerShellWorkflow`, `PowerShellWorkflow`, `PowerShell`, `PowerShell72`, `Python3`, `Python2` or `Script`. Changing this forces a new resource to be created.
RunbookType pulumi.StringOutput `pulumi:"runbookType"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewRunBook registers a new resource with the given unique name, arguments, and options.
func NewRunBook(ctx *pulumi.Context,
name string, args *RunBookArgs, opts ...pulumi.ResourceOption) (*RunBook, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.LogProgress == nil {
return nil, errors.New("invalid value for required argument 'LogProgress'")
}
if args.LogVerbose == nil {
return nil, errors.New("invalid value for required argument 'LogVerbose'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.RunbookType == nil {
return nil, errors.New("invalid value for required argument 'RunbookType'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource RunBook
err := ctx.RegisterResource("azure:automation/runBook:RunBook", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRunBook gets an existing RunBook 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 GetRunBook(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RunBookState, opts ...pulumi.ResourceOption) (*RunBook, error) {
var resource RunBook
err := ctx.ReadResource("azure:automation/runBook:RunBook", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RunBook resources.
type runBookState struct {
// The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// The desired content of the runbook.
//
// > **Note:** The Azure API requires a `publishContentLink` to be supplied even when specifying your own `content`.
Content *string `pulumi:"content"`
// A description for the runbook.
Description *string `pulumi:"description"`
// A `draft` block as defined below.
Draft *RunBookDraft `pulumi:"draft"`
// One or more `jobSchedule` block as defined below.
//
// > **Note:** AzureRM provides a stand-alone automation.JobSchedule and this inlined `jobSchedule` property to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
JobSchedules []RunBookJobSchedule `pulumi:"jobSchedules"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are `0` for None, `9` for Basic, and `15` for Detailed. Must turn on Verbose logging in order to see the tracing.
LogActivityTraceLevel *int `pulumi:"logActivityTraceLevel"`
// Progress log option.
LogProgress *bool `pulumi:"logProgress"`
// Verbose log option.
LogVerbose *bool `pulumi:"logVerbose"`
// Specifies the name of the Runbook. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// One `publishContentLink` block as defined below.
PublishContentLink *RunBookPublishContentLink `pulumi:"publishContentLink"`
// The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The type of the runbook - can be either `Graph`, `GraphPowerShell`, `GraphPowerShellWorkflow`, `PowerShellWorkflow`, `PowerShell`, `PowerShell72`, `Python3`, `Python2` or `Script`. Changing this forces a new resource to be created.
RunbookType *string `pulumi:"runbookType"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type RunBookState struct {
// The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// The desired content of the runbook.
//
// > **Note:** The Azure API requires a `publishContentLink` to be supplied even when specifying your own `content`.
Content pulumi.StringPtrInput
// A description for the runbook.
Description pulumi.StringPtrInput
// A `draft` block as defined below.
Draft RunBookDraftPtrInput
// One or more `jobSchedule` block as defined below.
//
// > **Note:** AzureRM provides a stand-alone automation.JobSchedule and this inlined `jobSchedule` property to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
JobSchedules RunBookJobScheduleArrayInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are `0` for None, `9` for Basic, and `15` for Detailed. Must turn on Verbose logging in order to see the tracing.
LogActivityTraceLevel pulumi.IntPtrInput
// Progress log option.
LogProgress pulumi.BoolPtrInput
// Verbose log option.
LogVerbose pulumi.BoolPtrInput
// Specifies the name of the Runbook. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// One `publishContentLink` block as defined below.
PublishContentLink RunBookPublishContentLinkPtrInput
// The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The type of the runbook - can be either `Graph`, `GraphPowerShell`, `GraphPowerShellWorkflow`, `PowerShellWorkflow`, `PowerShell`, `PowerShell72`, `Python3`, `Python2` or `Script`. Changing this forces a new resource to be created.
RunbookType pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (RunBookState) ElementType() reflect.Type {
return reflect.TypeOf((*runBookState)(nil)).Elem()
}
type runBookArgs struct {
// The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The desired content of the runbook.
//
// > **Note:** The Azure API requires a `publishContentLink` to be supplied even when specifying your own `content`.
Content *string `pulumi:"content"`
// A description for the runbook.
Description *string `pulumi:"description"`
// A `draft` block as defined below.
Draft *RunBookDraft `pulumi:"draft"`
// One or more `jobSchedule` block as defined below.
//
// > **Note:** AzureRM provides a stand-alone automation.JobSchedule and this inlined `jobSchedule` property to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
JobSchedules []RunBookJobSchedule `pulumi:"jobSchedules"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are `0` for None, `9` for Basic, and `15` for Detailed. Must turn on Verbose logging in order to see the tracing.
LogActivityTraceLevel *int `pulumi:"logActivityTraceLevel"`
// Progress log option.
LogProgress bool `pulumi:"logProgress"`
// Verbose log option.
LogVerbose bool `pulumi:"logVerbose"`
// Specifies the name of the Runbook. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// One `publishContentLink` block as defined below.
PublishContentLink *RunBookPublishContentLink `pulumi:"publishContentLink"`
// The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The type of the runbook - can be either `Graph`, `GraphPowerShell`, `GraphPowerShellWorkflow`, `PowerShellWorkflow`, `PowerShell`, `PowerShell72`, `Python3`, `Python2` or `Script`. Changing this forces a new resource to be created.
RunbookType string `pulumi:"runbookType"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a RunBook resource.
type RunBookArgs struct {
// The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The desired content of the runbook.
//
// > **Note:** The Azure API requires a `publishContentLink` to be supplied even when specifying your own `content`.
Content pulumi.StringPtrInput
// A description for the runbook.
Description pulumi.StringPtrInput
// A `draft` block as defined below.
Draft RunBookDraftPtrInput
// One or more `jobSchedule` block as defined below.
//
// > **Note:** AzureRM provides a stand-alone automation.JobSchedule and this inlined `jobSchedule` property to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
JobSchedules RunBookJobScheduleArrayInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are `0` for None, `9` for Basic, and `15` for Detailed. Must turn on Verbose logging in order to see the tracing.
LogActivityTraceLevel pulumi.IntPtrInput
// Progress log option.
LogProgress pulumi.BoolInput
// Verbose log option.
LogVerbose pulumi.BoolInput
// Specifies the name of the Runbook. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// One `publishContentLink` block as defined below.
PublishContentLink RunBookPublishContentLinkPtrInput
// The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The type of the runbook - can be either `Graph`, `GraphPowerShell`, `GraphPowerShellWorkflow`, `PowerShellWorkflow`, `PowerShell`, `PowerShell72`, `Python3`, `Python2` or `Script`. Changing this forces a new resource to be created.
RunbookType pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (RunBookArgs) ElementType() reflect.Type {
return reflect.TypeOf((*runBookArgs)(nil)).Elem()
}
type RunBookInput interface {
pulumi.Input
ToRunBookOutput() RunBookOutput
ToRunBookOutputWithContext(ctx context.Context) RunBookOutput
}
func (*RunBook) ElementType() reflect.Type {
return reflect.TypeOf((**RunBook)(nil)).Elem()
}
func (i *RunBook) ToRunBookOutput() RunBookOutput {
return i.ToRunBookOutputWithContext(context.Background())
}
func (i *RunBook) ToRunBookOutputWithContext(ctx context.Context) RunBookOutput {
return pulumi.ToOutputWithContext(ctx, i).(RunBookOutput)
}
// RunBookArrayInput is an input type that accepts RunBookArray and RunBookArrayOutput values.
// You can construct a concrete instance of `RunBookArrayInput` via:
//
// RunBookArray{ RunBookArgs{...} }
type RunBookArrayInput interface {
pulumi.Input
ToRunBookArrayOutput() RunBookArrayOutput
ToRunBookArrayOutputWithContext(context.Context) RunBookArrayOutput
}
type RunBookArray []RunBookInput
func (RunBookArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*RunBook)(nil)).Elem()
}
func (i RunBookArray) ToRunBookArrayOutput() RunBookArrayOutput {
return i.ToRunBookArrayOutputWithContext(context.Background())
}
func (i RunBookArray) ToRunBookArrayOutputWithContext(ctx context.Context) RunBookArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(RunBookArrayOutput)
}
// RunBookMapInput is an input type that accepts RunBookMap and RunBookMapOutput values.
// You can construct a concrete instance of `RunBookMapInput` via:
//
// RunBookMap{ "key": RunBookArgs{...} }
type RunBookMapInput interface {
pulumi.Input
ToRunBookMapOutput() RunBookMapOutput
ToRunBookMapOutputWithContext(context.Context) RunBookMapOutput
}
type RunBookMap map[string]RunBookInput
func (RunBookMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*RunBook)(nil)).Elem()
}
func (i RunBookMap) ToRunBookMapOutput() RunBookMapOutput {
return i.ToRunBookMapOutputWithContext(context.Background())
}
func (i RunBookMap) ToRunBookMapOutputWithContext(ctx context.Context) RunBookMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(RunBookMapOutput)
}
type RunBookOutput struct{ *pulumi.OutputState }
func (RunBookOutput) ElementType() reflect.Type {
return reflect.TypeOf((**RunBook)(nil)).Elem()
}
func (o RunBookOutput) ToRunBookOutput() RunBookOutput {
return o
}
func (o RunBookOutput) ToRunBookOutputWithContext(ctx context.Context) RunBookOutput {
return o
}
// The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
func (o RunBookOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *RunBook) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The desired content of the runbook.
//
// > **Note:** The Azure API requires a `publishContentLink` to be supplied even when specifying your own `content`.
func (o RunBookOutput) Content() pulumi.StringOutput {
return o.ApplyT(func(v *RunBook) pulumi.StringOutput { return v.Content }).(pulumi.StringOutput)
}
// A description for the runbook.
func (o RunBookOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RunBook) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// A `draft` block as defined below.
func (o RunBookOutput) Draft() RunBookDraftPtrOutput {
return o.ApplyT(func(v *RunBook) RunBookDraftPtrOutput { return v.Draft }).(RunBookDraftPtrOutput)
}
// One or more `jobSchedule` block as defined below.
//
// > **Note:** AzureRM provides a stand-alone automation.JobSchedule and this inlined `jobSchedule` property to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
func (o RunBookOutput) JobSchedules() RunBookJobScheduleArrayOutput {
return o.ApplyT(func(v *RunBook) RunBookJobScheduleArrayOutput { return v.JobSchedules }).(RunBookJobScheduleArrayOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o RunBookOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *RunBook) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are `0` for None, `9` for Basic, and `15` for Detailed. Must turn on Verbose logging in order to see the tracing.
func (o RunBookOutput) LogActivityTraceLevel() pulumi.IntPtrOutput {
return o.ApplyT(func(v *RunBook) pulumi.IntPtrOutput { return v.LogActivityTraceLevel }).(pulumi.IntPtrOutput)
}
// Progress log option.
func (o RunBookOutput) LogProgress() pulumi.BoolOutput {
return o.ApplyT(func(v *RunBook) pulumi.BoolOutput { return v.LogProgress }).(pulumi.BoolOutput)
}
// Verbose log option.
func (o RunBookOutput) LogVerbose() pulumi.BoolOutput {
return o.ApplyT(func(v *RunBook) pulumi.BoolOutput { return v.LogVerbose }).(pulumi.BoolOutput)
}
// Specifies the name of the Runbook. Changing this forces a new resource to be created.
func (o RunBookOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *RunBook) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// One `publishContentLink` block as defined below.
func (o RunBookOutput) PublishContentLink() RunBookPublishContentLinkPtrOutput {
return o.ApplyT(func(v *RunBook) RunBookPublishContentLinkPtrOutput { return v.PublishContentLink }).(RunBookPublishContentLinkPtrOutput)
}
// The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
func (o RunBookOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *RunBook) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The type of the runbook - can be either `Graph`, `GraphPowerShell`, `GraphPowerShellWorkflow`, `PowerShellWorkflow`, `PowerShell`, `PowerShell72`, `Python3`, `Python2` or `Script`. Changing this forces a new resource to be created.
func (o RunBookOutput) RunbookType() pulumi.StringOutput {
return o.ApplyT(func(v *RunBook) pulumi.StringOutput { return v.RunbookType }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o RunBookOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *RunBook) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type RunBookArrayOutput struct{ *pulumi.OutputState }
func (RunBookArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*RunBook)(nil)).Elem()
}
func (o RunBookArrayOutput) ToRunBookArrayOutput() RunBookArrayOutput {
return o
}
func (o RunBookArrayOutput) ToRunBookArrayOutputWithContext(ctx context.Context) RunBookArrayOutput {
return o
}
func (o RunBookArrayOutput) Index(i pulumi.IntInput) RunBookOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RunBook {
return vs[0].([]*RunBook)[vs[1].(int)]
}).(RunBookOutput)
}
type RunBookMapOutput struct{ *pulumi.OutputState }
func (RunBookMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*RunBook)(nil)).Elem()
}
func (o RunBookMapOutput) ToRunBookMapOutput() RunBookMapOutput {
return o
}
func (o RunBookMapOutput) ToRunBookMapOutputWithContext(ctx context.Context) RunBookMapOutput {
return o
}
func (o RunBookMapOutput) MapIndex(k pulumi.StringInput) RunBookOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RunBook {
return vs[0].(map[string]*RunBook)[vs[1].(string)]
}).(RunBookOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RunBookInput)(nil)).Elem(), &RunBook{})
pulumi.RegisterInputType(reflect.TypeOf((*RunBookArrayInput)(nil)).Elem(), RunBookArray{})
pulumi.RegisterInputType(reflect.TypeOf((*RunBookMapInput)(nil)).Elem(), RunBookMap{})
pulumi.RegisterOutputType(RunBookOutput{})
pulumi.RegisterOutputType(RunBookArrayOutput{})
pulumi.RegisterOutputType(RunBookMapOutput{})
}
| 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/automation/variableObject.go | sdk/go/azure/automation/variableObject.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an object variable in Azure Automation
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "encoding/json"
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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("tfex-example-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("tfex-example-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// tmpJSON0, err := json.Marshal(map[string]interface{}{
// "greeting": "Hello, Terraform Basic Test.",
// "language": "en",
// })
// if err != nil {
// return err
// }
// json0 := string(tmpJSON0)
// _, err = automation.NewVariableObject(ctx, "example", &automation.VariableObjectArgs{
// Name: pulumi.String("tfex-example-var"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// Value: pulumi.String(json0),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Automation Object Variable can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/variableObject:VariableObject example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tfex-example-rg/providers/Microsoft.Automation/automationAccounts/tfex-example-account/variables/tfex-example-var
// ```
type VariableObject struct {
pulumi.CustomResourceState
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted pulumi.BoolPtrOutput `pulumi:"encrypted"`
// The name of the Automation Variable. 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 Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a `jsonencode()` string.
Value pulumi.StringPtrOutput `pulumi:"value"`
}
// NewVariableObject registers a new resource with the given unique name, arguments, and options.
func NewVariableObject(ctx *pulumi.Context,
name string, args *VariableObjectArgs, opts ...pulumi.ResourceOption) (*VariableObject, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource VariableObject
err := ctx.RegisterResource("azure:automation/variableObject:VariableObject", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetVariableObject gets an existing VariableObject 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 GetVariableObject(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *VariableObjectState, opts ...pulumi.ResourceOption) (*VariableObject, error) {
var resource VariableObject
err := ctx.ReadResource("azure:automation/variableObject:VariableObject", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering VariableObject resources.
type variableObjectState struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description *string `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted *bool `pulumi:"encrypted"`
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a `jsonencode()` string.
Value *string `pulumi:"value"`
}
type VariableObjectState struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// The description of the Automation Variable.
Description pulumi.StringPtrInput
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted pulumi.BoolPtrInput
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The value of the Automation Variable as a `jsonencode()` string.
Value pulumi.StringPtrInput
}
func (VariableObjectState) ElementType() reflect.Type {
return reflect.TypeOf((*variableObjectState)(nil)).Elem()
}
type variableObjectArgs struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description *string `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted *bool `pulumi:"encrypted"`
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a `jsonencode()` string.
Value *string `pulumi:"value"`
}
// The set of arguments for constructing a VariableObject resource.
type VariableObjectArgs struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The description of the Automation Variable.
Description pulumi.StringPtrInput
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted pulumi.BoolPtrInput
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The value of the Automation Variable as a `jsonencode()` string.
Value pulumi.StringPtrInput
}
func (VariableObjectArgs) ElementType() reflect.Type {
return reflect.TypeOf((*variableObjectArgs)(nil)).Elem()
}
type VariableObjectInput interface {
pulumi.Input
ToVariableObjectOutput() VariableObjectOutput
ToVariableObjectOutputWithContext(ctx context.Context) VariableObjectOutput
}
func (*VariableObject) ElementType() reflect.Type {
return reflect.TypeOf((**VariableObject)(nil)).Elem()
}
func (i *VariableObject) ToVariableObjectOutput() VariableObjectOutput {
return i.ToVariableObjectOutputWithContext(context.Background())
}
func (i *VariableObject) ToVariableObjectOutputWithContext(ctx context.Context) VariableObjectOutput {
return pulumi.ToOutputWithContext(ctx, i).(VariableObjectOutput)
}
// VariableObjectArrayInput is an input type that accepts VariableObjectArray and VariableObjectArrayOutput values.
// You can construct a concrete instance of `VariableObjectArrayInput` via:
//
// VariableObjectArray{ VariableObjectArgs{...} }
type VariableObjectArrayInput interface {
pulumi.Input
ToVariableObjectArrayOutput() VariableObjectArrayOutput
ToVariableObjectArrayOutputWithContext(context.Context) VariableObjectArrayOutput
}
type VariableObjectArray []VariableObjectInput
func (VariableObjectArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VariableObject)(nil)).Elem()
}
func (i VariableObjectArray) ToVariableObjectArrayOutput() VariableObjectArrayOutput {
return i.ToVariableObjectArrayOutputWithContext(context.Background())
}
func (i VariableObjectArray) ToVariableObjectArrayOutputWithContext(ctx context.Context) VariableObjectArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(VariableObjectArrayOutput)
}
// VariableObjectMapInput is an input type that accepts VariableObjectMap and VariableObjectMapOutput values.
// You can construct a concrete instance of `VariableObjectMapInput` via:
//
// VariableObjectMap{ "key": VariableObjectArgs{...} }
type VariableObjectMapInput interface {
pulumi.Input
ToVariableObjectMapOutput() VariableObjectMapOutput
ToVariableObjectMapOutputWithContext(context.Context) VariableObjectMapOutput
}
type VariableObjectMap map[string]VariableObjectInput
func (VariableObjectMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VariableObject)(nil)).Elem()
}
func (i VariableObjectMap) ToVariableObjectMapOutput() VariableObjectMapOutput {
return i.ToVariableObjectMapOutputWithContext(context.Background())
}
func (i VariableObjectMap) ToVariableObjectMapOutputWithContext(ctx context.Context) VariableObjectMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(VariableObjectMapOutput)
}
type VariableObjectOutput struct{ *pulumi.OutputState }
func (VariableObjectOutput) ElementType() reflect.Type {
return reflect.TypeOf((**VariableObject)(nil)).Elem()
}
func (o VariableObjectOutput) ToVariableObjectOutput() VariableObjectOutput {
return o
}
func (o VariableObjectOutput) ToVariableObjectOutputWithContext(ctx context.Context) VariableObjectOutput {
return o
}
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
func (o VariableObjectOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *VariableObject) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The description of the Automation Variable.
func (o VariableObjectOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *VariableObject) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
func (o VariableObjectOutput) Encrypted() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *VariableObject) pulumi.BoolPtrOutput { return v.Encrypted }).(pulumi.BoolPtrOutput)
}
// The name of the Automation Variable. Changing this forces a new resource to be created.
func (o VariableObjectOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *VariableObject) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
func (o VariableObjectOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *VariableObject) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The value of the Automation Variable as a `jsonencode()` string.
func (o VariableObjectOutput) Value() pulumi.StringPtrOutput {
return o.ApplyT(func(v *VariableObject) pulumi.StringPtrOutput { return v.Value }).(pulumi.StringPtrOutput)
}
type VariableObjectArrayOutput struct{ *pulumi.OutputState }
func (VariableObjectArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VariableObject)(nil)).Elem()
}
func (o VariableObjectArrayOutput) ToVariableObjectArrayOutput() VariableObjectArrayOutput {
return o
}
func (o VariableObjectArrayOutput) ToVariableObjectArrayOutputWithContext(ctx context.Context) VariableObjectArrayOutput {
return o
}
func (o VariableObjectArrayOutput) Index(i pulumi.IntInput) VariableObjectOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VariableObject {
return vs[0].([]*VariableObject)[vs[1].(int)]
}).(VariableObjectOutput)
}
type VariableObjectMapOutput struct{ *pulumi.OutputState }
func (VariableObjectMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VariableObject)(nil)).Elem()
}
func (o VariableObjectMapOutput) ToVariableObjectMapOutput() VariableObjectMapOutput {
return o
}
func (o VariableObjectMapOutput) ToVariableObjectMapOutputWithContext(ctx context.Context) VariableObjectMapOutput {
return o
}
func (o VariableObjectMapOutput) MapIndex(k pulumi.StringInput) VariableObjectOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VariableObject {
return vs[0].(map[string]*VariableObject)[vs[1].(string)]
}).(VariableObjectOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*VariableObjectInput)(nil)).Elem(), &VariableObject{})
pulumi.RegisterInputType(reflect.TypeOf((*VariableObjectArrayInput)(nil)).Elem(), VariableObjectArray{})
pulumi.RegisterInputType(reflect.TypeOf((*VariableObjectMapInput)(nil)).Elem(), VariableObjectMap{})
pulumi.RegisterOutputType(VariableObjectOutput{})
pulumi.RegisterOutputType(VariableObjectArrayOutput{})
pulumi.RegisterOutputType(VariableObjectMapOutput{})
}
| 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/automation/connectionServicePrincipal.go | sdk/go/azure/automation/connectionServicePrincipal.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Automation Connection with type `AzureServicePrincipal`.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "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 {
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("resourceGroup-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("account-example"),
// Location: exampleResourceGroup.Location,
// ResourceGroupName: exampleResourceGroup.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// invokeFile, err := std.File(ctx, &std.FileArgs{
// Input: "automation_certificate_test.thumb",
// }, nil)
// if err != nil {
// return err
// }
// _, err = automation.NewConnectionServicePrincipal(ctx, "example", &automation.ConnectionServicePrincipalArgs{
// Name: pulumi.String("connection-example"),
// ResourceGroupName: exampleResourceGroup.Name,
// AutomationAccountName: exampleAccount.Name,
// ApplicationId: pulumi.String("00000000-0000-0000-0000-000000000000"),
// TenantId: pulumi.String(example.TenantId),
// SubscriptionId: pulumi.String(example.SubscriptionId),
// CertificateThumbprint: pulumi.String(invokeFile.Result),
// })
// 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.Automation` - 2024-10-23
//
// ## Import
//
// Automation Connection can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/connectionServicePrincipal:ConnectionServicePrincipal conn1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/connections/conn1
// ```
type ConnectionServicePrincipal struct {
pulumi.CustomResourceState
// The (Client) ID of the Service Principal.
ApplicationId pulumi.StringOutput `pulumi:"applicationId"`
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// The thumbprint of the Service Principal Certificate.
CertificateThumbprint pulumi.StringOutput `pulumi:"certificateThumbprint"`
// A description for this Connection.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The subscription GUID.
SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"`
// The ID of the Tenant the Service Principal is assigned in.
TenantId pulumi.StringOutput `pulumi:"tenantId"`
}
// NewConnectionServicePrincipal registers a new resource with the given unique name, arguments, and options.
func NewConnectionServicePrincipal(ctx *pulumi.Context,
name string, args *ConnectionServicePrincipalArgs, opts ...pulumi.ResourceOption) (*ConnectionServicePrincipal, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApplicationId == nil {
return nil, errors.New("invalid value for required argument 'ApplicationId'")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.CertificateThumbprint == nil {
return nil, errors.New("invalid value for required argument 'CertificateThumbprint'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SubscriptionId == nil {
return nil, errors.New("invalid value for required argument 'SubscriptionId'")
}
if args.TenantId == nil {
return nil, errors.New("invalid value for required argument 'TenantId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ConnectionServicePrincipal
err := ctx.RegisterResource("azure:automation/connectionServicePrincipal:ConnectionServicePrincipal", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetConnectionServicePrincipal gets an existing ConnectionServicePrincipal 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 GetConnectionServicePrincipal(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ConnectionServicePrincipalState, opts ...pulumi.ResourceOption) (*ConnectionServicePrincipal, error) {
var resource ConnectionServicePrincipal
err := ctx.ReadResource("azure:automation/connectionServicePrincipal:ConnectionServicePrincipal", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ConnectionServicePrincipal resources.
type connectionServicePrincipalState struct {
// The (Client) ID of the Service Principal.
ApplicationId *string `pulumi:"applicationId"`
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// The thumbprint of the Service Principal Certificate.
CertificateThumbprint *string `pulumi:"certificateThumbprint"`
// A description for this Connection.
Description *string `pulumi:"description"`
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The subscription GUID.
SubscriptionId *string `pulumi:"subscriptionId"`
// The ID of the Tenant the Service Principal is assigned in.
TenantId *string `pulumi:"tenantId"`
}
type ConnectionServicePrincipalState struct {
// The (Client) ID of the Service Principal.
ApplicationId pulumi.StringPtrInput
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// The thumbprint of the Service Principal Certificate.
CertificateThumbprint pulumi.StringPtrInput
// A description for this Connection.
Description pulumi.StringPtrInput
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The subscription GUID.
SubscriptionId pulumi.StringPtrInput
// The ID of the Tenant the Service Principal is assigned in.
TenantId pulumi.StringPtrInput
}
func (ConnectionServicePrincipalState) ElementType() reflect.Type {
return reflect.TypeOf((*connectionServicePrincipalState)(nil)).Elem()
}
type connectionServicePrincipalArgs struct {
// The (Client) ID of the Service Principal.
ApplicationId string `pulumi:"applicationId"`
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The thumbprint of the Service Principal Certificate.
CertificateThumbprint string `pulumi:"certificateThumbprint"`
// A description for this Connection.
Description *string `pulumi:"description"`
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The subscription GUID.
SubscriptionId string `pulumi:"subscriptionId"`
// The ID of the Tenant the Service Principal is assigned in.
TenantId string `pulumi:"tenantId"`
}
// The set of arguments for constructing a ConnectionServicePrincipal resource.
type ConnectionServicePrincipalArgs struct {
// The (Client) ID of the Service Principal.
ApplicationId pulumi.StringInput
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The thumbprint of the Service Principal Certificate.
CertificateThumbprint pulumi.StringInput
// A description for this Connection.
Description pulumi.StringPtrInput
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The subscription GUID.
SubscriptionId pulumi.StringInput
// The ID of the Tenant the Service Principal is assigned in.
TenantId pulumi.StringInput
}
func (ConnectionServicePrincipalArgs) ElementType() reflect.Type {
return reflect.TypeOf((*connectionServicePrincipalArgs)(nil)).Elem()
}
type ConnectionServicePrincipalInput interface {
pulumi.Input
ToConnectionServicePrincipalOutput() ConnectionServicePrincipalOutput
ToConnectionServicePrincipalOutputWithContext(ctx context.Context) ConnectionServicePrincipalOutput
}
func (*ConnectionServicePrincipal) ElementType() reflect.Type {
return reflect.TypeOf((**ConnectionServicePrincipal)(nil)).Elem()
}
func (i *ConnectionServicePrincipal) ToConnectionServicePrincipalOutput() ConnectionServicePrincipalOutput {
return i.ToConnectionServicePrincipalOutputWithContext(context.Background())
}
func (i *ConnectionServicePrincipal) ToConnectionServicePrincipalOutputWithContext(ctx context.Context) ConnectionServicePrincipalOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionServicePrincipalOutput)
}
// ConnectionServicePrincipalArrayInput is an input type that accepts ConnectionServicePrincipalArray and ConnectionServicePrincipalArrayOutput values.
// You can construct a concrete instance of `ConnectionServicePrincipalArrayInput` via:
//
// ConnectionServicePrincipalArray{ ConnectionServicePrincipalArgs{...} }
type ConnectionServicePrincipalArrayInput interface {
pulumi.Input
ToConnectionServicePrincipalArrayOutput() ConnectionServicePrincipalArrayOutput
ToConnectionServicePrincipalArrayOutputWithContext(context.Context) ConnectionServicePrincipalArrayOutput
}
type ConnectionServicePrincipalArray []ConnectionServicePrincipalInput
func (ConnectionServicePrincipalArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ConnectionServicePrincipal)(nil)).Elem()
}
func (i ConnectionServicePrincipalArray) ToConnectionServicePrincipalArrayOutput() ConnectionServicePrincipalArrayOutput {
return i.ToConnectionServicePrincipalArrayOutputWithContext(context.Background())
}
func (i ConnectionServicePrincipalArray) ToConnectionServicePrincipalArrayOutputWithContext(ctx context.Context) ConnectionServicePrincipalArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionServicePrincipalArrayOutput)
}
// ConnectionServicePrincipalMapInput is an input type that accepts ConnectionServicePrincipalMap and ConnectionServicePrincipalMapOutput values.
// You can construct a concrete instance of `ConnectionServicePrincipalMapInput` via:
//
// ConnectionServicePrincipalMap{ "key": ConnectionServicePrincipalArgs{...} }
type ConnectionServicePrincipalMapInput interface {
pulumi.Input
ToConnectionServicePrincipalMapOutput() ConnectionServicePrincipalMapOutput
ToConnectionServicePrincipalMapOutputWithContext(context.Context) ConnectionServicePrincipalMapOutput
}
type ConnectionServicePrincipalMap map[string]ConnectionServicePrincipalInput
func (ConnectionServicePrincipalMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ConnectionServicePrincipal)(nil)).Elem()
}
func (i ConnectionServicePrincipalMap) ToConnectionServicePrincipalMapOutput() ConnectionServicePrincipalMapOutput {
return i.ToConnectionServicePrincipalMapOutputWithContext(context.Background())
}
func (i ConnectionServicePrincipalMap) ToConnectionServicePrincipalMapOutputWithContext(ctx context.Context) ConnectionServicePrincipalMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionServicePrincipalMapOutput)
}
type ConnectionServicePrincipalOutput struct{ *pulumi.OutputState }
func (ConnectionServicePrincipalOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ConnectionServicePrincipal)(nil)).Elem()
}
func (o ConnectionServicePrincipalOutput) ToConnectionServicePrincipalOutput() ConnectionServicePrincipalOutput {
return o
}
func (o ConnectionServicePrincipalOutput) ToConnectionServicePrincipalOutputWithContext(ctx context.Context) ConnectionServicePrincipalOutput {
return o
}
// The (Client) ID of the Service Principal.
func (o ConnectionServicePrincipalOutput) ApplicationId() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionServicePrincipal) pulumi.StringOutput { return v.ApplicationId }).(pulumi.StringOutput)
}
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
func (o ConnectionServicePrincipalOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionServicePrincipal) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The thumbprint of the Service Principal Certificate.
func (o ConnectionServicePrincipalOutput) CertificateThumbprint() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionServicePrincipal) pulumi.StringOutput { return v.CertificateThumbprint }).(pulumi.StringOutput)
}
// A description for this Connection.
func (o ConnectionServicePrincipalOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ConnectionServicePrincipal) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Connection. Changing this forces a new resource to be created.
func (o ConnectionServicePrincipalOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionServicePrincipal) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
func (o ConnectionServicePrincipalOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionServicePrincipal) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The subscription GUID.
func (o ConnectionServicePrincipalOutput) SubscriptionId() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionServicePrincipal) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput)
}
// The ID of the Tenant the Service Principal is assigned in.
func (o ConnectionServicePrincipalOutput) TenantId() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionServicePrincipal) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput)
}
type ConnectionServicePrincipalArrayOutput struct{ *pulumi.OutputState }
func (ConnectionServicePrincipalArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ConnectionServicePrincipal)(nil)).Elem()
}
func (o ConnectionServicePrincipalArrayOutput) ToConnectionServicePrincipalArrayOutput() ConnectionServicePrincipalArrayOutput {
return o
}
func (o ConnectionServicePrincipalArrayOutput) ToConnectionServicePrincipalArrayOutputWithContext(ctx context.Context) ConnectionServicePrincipalArrayOutput {
return o
}
func (o ConnectionServicePrincipalArrayOutput) Index(i pulumi.IntInput) ConnectionServicePrincipalOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ConnectionServicePrincipal {
return vs[0].([]*ConnectionServicePrincipal)[vs[1].(int)]
}).(ConnectionServicePrincipalOutput)
}
type ConnectionServicePrincipalMapOutput struct{ *pulumi.OutputState }
func (ConnectionServicePrincipalMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ConnectionServicePrincipal)(nil)).Elem()
}
func (o ConnectionServicePrincipalMapOutput) ToConnectionServicePrincipalMapOutput() ConnectionServicePrincipalMapOutput {
return o
}
func (o ConnectionServicePrincipalMapOutput) ToConnectionServicePrincipalMapOutputWithContext(ctx context.Context) ConnectionServicePrincipalMapOutput {
return o
}
func (o ConnectionServicePrincipalMapOutput) MapIndex(k pulumi.StringInput) ConnectionServicePrincipalOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ConnectionServicePrincipal {
return vs[0].(map[string]*ConnectionServicePrincipal)[vs[1].(string)]
}).(ConnectionServicePrincipalOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionServicePrincipalInput)(nil)).Elem(), &ConnectionServicePrincipal{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionServicePrincipalArrayInput)(nil)).Elem(), ConnectionServicePrincipalArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionServicePrincipalMapInput)(nil)).Elem(), ConnectionServicePrincipalMap{})
pulumi.RegisterOutputType(ConnectionServicePrincipalOutput{})
pulumi.RegisterOutputType(ConnectionServicePrincipalArrayOutput{})
pulumi.RegisterOutputType(ConnectionServicePrincipalMapOutput{})
}
| 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/automation/hybridRunbookWorkerGroup.go | sdk/go/azure/automation/hybridRunbookWorkerGroup.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Automation Hybrid Runbook Worker Group.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("example-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewHybridRunbookWorkerGroup(ctx, "example", &automation.HybridRunbookWorkerGroupArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.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.Automation` - 2024-10-23
//
// ## Import
//
// Automations can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/hybridRunbookWorkerGroup:HybridRunbookWorkerGroup example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/hybridRunbookWorkerGroups/grp1
// ```
type HybridRunbookWorkerGroup struct {
pulumi.CustomResourceState
// The name of the Automation Account in which the Runbook Worker Group is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// The name of resource type `automation.Credential` to use for hybrid worker.
CredentialName pulumi.StringPtrOutput `pulumi:"credentialName"`
// The name which should be used for this Automation Account Runbook Worker Group. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewHybridRunbookWorkerGroup registers a new resource with the given unique name, arguments, and options.
func NewHybridRunbookWorkerGroup(ctx *pulumi.Context,
name string, args *HybridRunbookWorkerGroupArgs, opts ...pulumi.ResourceOption) (*HybridRunbookWorkerGroup, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource HybridRunbookWorkerGroup
err := ctx.RegisterResource("azure:automation/hybridRunbookWorkerGroup:HybridRunbookWorkerGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetHybridRunbookWorkerGroup gets an existing HybridRunbookWorkerGroup 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 GetHybridRunbookWorkerGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *HybridRunbookWorkerGroupState, opts ...pulumi.ResourceOption) (*HybridRunbookWorkerGroup, error) {
var resource HybridRunbookWorkerGroup
err := ctx.ReadResource("azure:automation/hybridRunbookWorkerGroup:HybridRunbookWorkerGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering HybridRunbookWorkerGroup resources.
type hybridRunbookWorkerGroupState struct {
// The name of the Automation Account in which the Runbook Worker Group is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// The name of resource type `automation.Credential` to use for hybrid worker.
CredentialName *string `pulumi:"credentialName"`
// The name which should be used for this Automation Account Runbook Worker Group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type HybridRunbookWorkerGroupState struct {
// The name of the Automation Account in which the Runbook Worker Group is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// The name of resource type `automation.Credential` to use for hybrid worker.
CredentialName pulumi.StringPtrInput
// The name which should be used for this Automation Account Runbook Worker Group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (HybridRunbookWorkerGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*hybridRunbookWorkerGroupState)(nil)).Elem()
}
type hybridRunbookWorkerGroupArgs struct {
// The name of the Automation Account in which the Runbook Worker Group is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The name of resource type `automation.Credential` to use for hybrid worker.
CredentialName *string `pulumi:"credentialName"`
// The name which should be used for this Automation Account Runbook Worker Group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a HybridRunbookWorkerGroup resource.
type HybridRunbookWorkerGroupArgs struct {
// The name of the Automation Account in which the Runbook Worker Group is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The name of resource type `automation.Credential` to use for hybrid worker.
CredentialName pulumi.StringPtrInput
// The name which should be used for this Automation Account Runbook Worker Group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
ResourceGroupName pulumi.StringInput
}
func (HybridRunbookWorkerGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*hybridRunbookWorkerGroupArgs)(nil)).Elem()
}
type HybridRunbookWorkerGroupInput interface {
pulumi.Input
ToHybridRunbookWorkerGroupOutput() HybridRunbookWorkerGroupOutput
ToHybridRunbookWorkerGroupOutputWithContext(ctx context.Context) HybridRunbookWorkerGroupOutput
}
func (*HybridRunbookWorkerGroup) ElementType() reflect.Type {
return reflect.TypeOf((**HybridRunbookWorkerGroup)(nil)).Elem()
}
func (i *HybridRunbookWorkerGroup) ToHybridRunbookWorkerGroupOutput() HybridRunbookWorkerGroupOutput {
return i.ToHybridRunbookWorkerGroupOutputWithContext(context.Background())
}
func (i *HybridRunbookWorkerGroup) ToHybridRunbookWorkerGroupOutputWithContext(ctx context.Context) HybridRunbookWorkerGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(HybridRunbookWorkerGroupOutput)
}
// HybridRunbookWorkerGroupArrayInput is an input type that accepts HybridRunbookWorkerGroupArray and HybridRunbookWorkerGroupArrayOutput values.
// You can construct a concrete instance of `HybridRunbookWorkerGroupArrayInput` via:
//
// HybridRunbookWorkerGroupArray{ HybridRunbookWorkerGroupArgs{...} }
type HybridRunbookWorkerGroupArrayInput interface {
pulumi.Input
ToHybridRunbookWorkerGroupArrayOutput() HybridRunbookWorkerGroupArrayOutput
ToHybridRunbookWorkerGroupArrayOutputWithContext(context.Context) HybridRunbookWorkerGroupArrayOutput
}
type HybridRunbookWorkerGroupArray []HybridRunbookWorkerGroupInput
func (HybridRunbookWorkerGroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*HybridRunbookWorkerGroup)(nil)).Elem()
}
func (i HybridRunbookWorkerGroupArray) ToHybridRunbookWorkerGroupArrayOutput() HybridRunbookWorkerGroupArrayOutput {
return i.ToHybridRunbookWorkerGroupArrayOutputWithContext(context.Background())
}
func (i HybridRunbookWorkerGroupArray) ToHybridRunbookWorkerGroupArrayOutputWithContext(ctx context.Context) HybridRunbookWorkerGroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(HybridRunbookWorkerGroupArrayOutput)
}
// HybridRunbookWorkerGroupMapInput is an input type that accepts HybridRunbookWorkerGroupMap and HybridRunbookWorkerGroupMapOutput values.
// You can construct a concrete instance of `HybridRunbookWorkerGroupMapInput` via:
//
// HybridRunbookWorkerGroupMap{ "key": HybridRunbookWorkerGroupArgs{...} }
type HybridRunbookWorkerGroupMapInput interface {
pulumi.Input
ToHybridRunbookWorkerGroupMapOutput() HybridRunbookWorkerGroupMapOutput
ToHybridRunbookWorkerGroupMapOutputWithContext(context.Context) HybridRunbookWorkerGroupMapOutput
}
type HybridRunbookWorkerGroupMap map[string]HybridRunbookWorkerGroupInput
func (HybridRunbookWorkerGroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*HybridRunbookWorkerGroup)(nil)).Elem()
}
func (i HybridRunbookWorkerGroupMap) ToHybridRunbookWorkerGroupMapOutput() HybridRunbookWorkerGroupMapOutput {
return i.ToHybridRunbookWorkerGroupMapOutputWithContext(context.Background())
}
func (i HybridRunbookWorkerGroupMap) ToHybridRunbookWorkerGroupMapOutputWithContext(ctx context.Context) HybridRunbookWorkerGroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(HybridRunbookWorkerGroupMapOutput)
}
type HybridRunbookWorkerGroupOutput struct{ *pulumi.OutputState }
func (HybridRunbookWorkerGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**HybridRunbookWorkerGroup)(nil)).Elem()
}
func (o HybridRunbookWorkerGroupOutput) ToHybridRunbookWorkerGroupOutput() HybridRunbookWorkerGroupOutput {
return o
}
func (o HybridRunbookWorkerGroupOutput) ToHybridRunbookWorkerGroupOutputWithContext(ctx context.Context) HybridRunbookWorkerGroupOutput {
return o
}
// The name of the Automation Account in which the Runbook Worker Group is created. Changing this forces a new resource to be created.
func (o HybridRunbookWorkerGroupOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *HybridRunbookWorkerGroup) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The name of resource type `automation.Credential` to use for hybrid worker.
func (o HybridRunbookWorkerGroupOutput) CredentialName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *HybridRunbookWorkerGroup) pulumi.StringPtrOutput { return v.CredentialName }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Automation Account Runbook Worker Group. Changing this forces a new resource to be created.
func (o HybridRunbookWorkerGroupOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *HybridRunbookWorkerGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
func (o HybridRunbookWorkerGroupOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *HybridRunbookWorkerGroup) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type HybridRunbookWorkerGroupArrayOutput struct{ *pulumi.OutputState }
func (HybridRunbookWorkerGroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*HybridRunbookWorkerGroup)(nil)).Elem()
}
func (o HybridRunbookWorkerGroupArrayOutput) ToHybridRunbookWorkerGroupArrayOutput() HybridRunbookWorkerGroupArrayOutput {
return o
}
func (o HybridRunbookWorkerGroupArrayOutput) ToHybridRunbookWorkerGroupArrayOutputWithContext(ctx context.Context) HybridRunbookWorkerGroupArrayOutput {
return o
}
func (o HybridRunbookWorkerGroupArrayOutput) Index(i pulumi.IntInput) HybridRunbookWorkerGroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *HybridRunbookWorkerGroup {
return vs[0].([]*HybridRunbookWorkerGroup)[vs[1].(int)]
}).(HybridRunbookWorkerGroupOutput)
}
type HybridRunbookWorkerGroupMapOutput struct{ *pulumi.OutputState }
func (HybridRunbookWorkerGroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*HybridRunbookWorkerGroup)(nil)).Elem()
}
func (o HybridRunbookWorkerGroupMapOutput) ToHybridRunbookWorkerGroupMapOutput() HybridRunbookWorkerGroupMapOutput {
return o
}
func (o HybridRunbookWorkerGroupMapOutput) ToHybridRunbookWorkerGroupMapOutputWithContext(ctx context.Context) HybridRunbookWorkerGroupMapOutput {
return o
}
func (o HybridRunbookWorkerGroupMapOutput) MapIndex(k pulumi.StringInput) HybridRunbookWorkerGroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *HybridRunbookWorkerGroup {
return vs[0].(map[string]*HybridRunbookWorkerGroup)[vs[1].(string)]
}).(HybridRunbookWorkerGroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*HybridRunbookWorkerGroupInput)(nil)).Elem(), &HybridRunbookWorkerGroup{})
pulumi.RegisterInputType(reflect.TypeOf((*HybridRunbookWorkerGroupArrayInput)(nil)).Elem(), HybridRunbookWorkerGroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*HybridRunbookWorkerGroupMapInput)(nil)).Elem(), HybridRunbookWorkerGroupMap{})
pulumi.RegisterOutputType(HybridRunbookWorkerGroupOutput{})
pulumi.RegisterOutputType(HybridRunbookWorkerGroupArrayOutput{})
pulumi.RegisterOutputType(HybridRunbookWorkerGroupMapOutput{})
}
| 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/automation/connectionClassicCertificate.go | sdk/go/azure/automation/connectionClassicCertificate.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Automation Connection with type `AzureClassicCertificate`.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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 {
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("resourceGroup-example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("account-example"),
// Location: exampleResourceGroup.Location,
// ResourceGroupName: exampleResourceGroup.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewConnectionClassicCertificate(ctx, "example", &automation.ConnectionClassicCertificateArgs{
// Name: pulumi.String("connection-example"),
// ResourceGroupName: exampleResourceGroup.Name,
// AutomationAccountName: exampleAccount.Name,
// CertificateAssetName: pulumi.String("cert1"),
// SubscriptionName: pulumi.String("subs1"),
// SubscriptionId: pulumi.String(example.SubscriptionId),
// })
// 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.Automation` - 2024-10-23
//
// ## Import
//
// Automation Connection can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/connectionClassicCertificate:ConnectionClassicCertificate conn1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/connections/conn1
// ```
type ConnectionClassicCertificate struct {
pulumi.CustomResourceState
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// The name of the certificate asset.
CertificateAssetName pulumi.StringOutput `pulumi:"certificateAssetName"`
// A description for this Connection.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The id of subscription.
SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"`
// The name of subscription.
SubscriptionName pulumi.StringOutput `pulumi:"subscriptionName"`
}
// NewConnectionClassicCertificate registers a new resource with the given unique name, arguments, and options.
func NewConnectionClassicCertificate(ctx *pulumi.Context,
name string, args *ConnectionClassicCertificateArgs, opts ...pulumi.ResourceOption) (*ConnectionClassicCertificate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.CertificateAssetName == nil {
return nil, errors.New("invalid value for required argument 'CertificateAssetName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SubscriptionId == nil {
return nil, errors.New("invalid value for required argument 'SubscriptionId'")
}
if args.SubscriptionName == nil {
return nil, errors.New("invalid value for required argument 'SubscriptionName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ConnectionClassicCertificate
err := ctx.RegisterResource("azure:automation/connectionClassicCertificate:ConnectionClassicCertificate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetConnectionClassicCertificate gets an existing ConnectionClassicCertificate 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 GetConnectionClassicCertificate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ConnectionClassicCertificateState, opts ...pulumi.ResourceOption) (*ConnectionClassicCertificate, error) {
var resource ConnectionClassicCertificate
err := ctx.ReadResource("azure:automation/connectionClassicCertificate:ConnectionClassicCertificate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ConnectionClassicCertificate resources.
type connectionClassicCertificateState struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// The name of the certificate asset.
CertificateAssetName *string `pulumi:"certificateAssetName"`
// A description for this Connection.
Description *string `pulumi:"description"`
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The id of subscription.
SubscriptionId *string `pulumi:"subscriptionId"`
// The name of subscription.
SubscriptionName *string `pulumi:"subscriptionName"`
}
type ConnectionClassicCertificateState struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// The name of the certificate asset.
CertificateAssetName pulumi.StringPtrInput
// A description for this Connection.
Description pulumi.StringPtrInput
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The id of subscription.
SubscriptionId pulumi.StringPtrInput
// The name of subscription.
SubscriptionName pulumi.StringPtrInput
}
func (ConnectionClassicCertificateState) ElementType() reflect.Type {
return reflect.TypeOf((*connectionClassicCertificateState)(nil)).Elem()
}
type connectionClassicCertificateArgs struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The name of the certificate asset.
CertificateAssetName string `pulumi:"certificateAssetName"`
// A description for this Connection.
Description *string `pulumi:"description"`
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The id of subscription.
SubscriptionId string `pulumi:"subscriptionId"`
// The name of subscription.
SubscriptionName string `pulumi:"subscriptionName"`
}
// The set of arguments for constructing a ConnectionClassicCertificate resource.
type ConnectionClassicCertificateArgs struct {
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The name of the certificate asset.
CertificateAssetName pulumi.StringInput
// A description for this Connection.
Description pulumi.StringPtrInput
// Specifies the name of the Connection. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The id of subscription.
SubscriptionId pulumi.StringInput
// The name of subscription.
SubscriptionName pulumi.StringInput
}
func (ConnectionClassicCertificateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*connectionClassicCertificateArgs)(nil)).Elem()
}
type ConnectionClassicCertificateInput interface {
pulumi.Input
ToConnectionClassicCertificateOutput() ConnectionClassicCertificateOutput
ToConnectionClassicCertificateOutputWithContext(ctx context.Context) ConnectionClassicCertificateOutput
}
func (*ConnectionClassicCertificate) ElementType() reflect.Type {
return reflect.TypeOf((**ConnectionClassicCertificate)(nil)).Elem()
}
func (i *ConnectionClassicCertificate) ToConnectionClassicCertificateOutput() ConnectionClassicCertificateOutput {
return i.ToConnectionClassicCertificateOutputWithContext(context.Background())
}
func (i *ConnectionClassicCertificate) ToConnectionClassicCertificateOutputWithContext(ctx context.Context) ConnectionClassicCertificateOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionClassicCertificateOutput)
}
// ConnectionClassicCertificateArrayInput is an input type that accepts ConnectionClassicCertificateArray and ConnectionClassicCertificateArrayOutput values.
// You can construct a concrete instance of `ConnectionClassicCertificateArrayInput` via:
//
// ConnectionClassicCertificateArray{ ConnectionClassicCertificateArgs{...} }
type ConnectionClassicCertificateArrayInput interface {
pulumi.Input
ToConnectionClassicCertificateArrayOutput() ConnectionClassicCertificateArrayOutput
ToConnectionClassicCertificateArrayOutputWithContext(context.Context) ConnectionClassicCertificateArrayOutput
}
type ConnectionClassicCertificateArray []ConnectionClassicCertificateInput
func (ConnectionClassicCertificateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ConnectionClassicCertificate)(nil)).Elem()
}
func (i ConnectionClassicCertificateArray) ToConnectionClassicCertificateArrayOutput() ConnectionClassicCertificateArrayOutput {
return i.ToConnectionClassicCertificateArrayOutputWithContext(context.Background())
}
func (i ConnectionClassicCertificateArray) ToConnectionClassicCertificateArrayOutputWithContext(ctx context.Context) ConnectionClassicCertificateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionClassicCertificateArrayOutput)
}
// ConnectionClassicCertificateMapInput is an input type that accepts ConnectionClassicCertificateMap and ConnectionClassicCertificateMapOutput values.
// You can construct a concrete instance of `ConnectionClassicCertificateMapInput` via:
//
// ConnectionClassicCertificateMap{ "key": ConnectionClassicCertificateArgs{...} }
type ConnectionClassicCertificateMapInput interface {
pulumi.Input
ToConnectionClassicCertificateMapOutput() ConnectionClassicCertificateMapOutput
ToConnectionClassicCertificateMapOutputWithContext(context.Context) ConnectionClassicCertificateMapOutput
}
type ConnectionClassicCertificateMap map[string]ConnectionClassicCertificateInput
func (ConnectionClassicCertificateMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ConnectionClassicCertificate)(nil)).Elem()
}
func (i ConnectionClassicCertificateMap) ToConnectionClassicCertificateMapOutput() ConnectionClassicCertificateMapOutput {
return i.ToConnectionClassicCertificateMapOutputWithContext(context.Background())
}
func (i ConnectionClassicCertificateMap) ToConnectionClassicCertificateMapOutputWithContext(ctx context.Context) ConnectionClassicCertificateMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionClassicCertificateMapOutput)
}
type ConnectionClassicCertificateOutput struct{ *pulumi.OutputState }
func (ConnectionClassicCertificateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ConnectionClassicCertificate)(nil)).Elem()
}
func (o ConnectionClassicCertificateOutput) ToConnectionClassicCertificateOutput() ConnectionClassicCertificateOutput {
return o
}
func (o ConnectionClassicCertificateOutput) ToConnectionClassicCertificateOutputWithContext(ctx context.Context) ConnectionClassicCertificateOutput {
return o
}
// The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
func (o ConnectionClassicCertificateOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionClassicCertificate) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The name of the certificate asset.
func (o ConnectionClassicCertificateOutput) CertificateAssetName() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionClassicCertificate) pulumi.StringOutput { return v.CertificateAssetName }).(pulumi.StringOutput)
}
// A description for this Connection.
func (o ConnectionClassicCertificateOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ConnectionClassicCertificate) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Connection. Changing this forces a new resource to be created.
func (o ConnectionClassicCertificateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionClassicCertificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.
func (o ConnectionClassicCertificateOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionClassicCertificate) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The id of subscription.
func (o ConnectionClassicCertificateOutput) SubscriptionId() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionClassicCertificate) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput)
}
// The name of subscription.
func (o ConnectionClassicCertificateOutput) SubscriptionName() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionClassicCertificate) pulumi.StringOutput { return v.SubscriptionName }).(pulumi.StringOutput)
}
type ConnectionClassicCertificateArrayOutput struct{ *pulumi.OutputState }
func (ConnectionClassicCertificateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ConnectionClassicCertificate)(nil)).Elem()
}
func (o ConnectionClassicCertificateArrayOutput) ToConnectionClassicCertificateArrayOutput() ConnectionClassicCertificateArrayOutput {
return o
}
func (o ConnectionClassicCertificateArrayOutput) ToConnectionClassicCertificateArrayOutputWithContext(ctx context.Context) ConnectionClassicCertificateArrayOutput {
return o
}
func (o ConnectionClassicCertificateArrayOutput) Index(i pulumi.IntInput) ConnectionClassicCertificateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ConnectionClassicCertificate {
return vs[0].([]*ConnectionClassicCertificate)[vs[1].(int)]
}).(ConnectionClassicCertificateOutput)
}
type ConnectionClassicCertificateMapOutput struct{ *pulumi.OutputState }
func (ConnectionClassicCertificateMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ConnectionClassicCertificate)(nil)).Elem()
}
func (o ConnectionClassicCertificateMapOutput) ToConnectionClassicCertificateMapOutput() ConnectionClassicCertificateMapOutput {
return o
}
func (o ConnectionClassicCertificateMapOutput) ToConnectionClassicCertificateMapOutputWithContext(ctx context.Context) ConnectionClassicCertificateMapOutput {
return o
}
func (o ConnectionClassicCertificateMapOutput) MapIndex(k pulumi.StringInput) ConnectionClassicCertificateOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ConnectionClassicCertificate {
return vs[0].(map[string]*ConnectionClassicCertificate)[vs[1].(string)]
}).(ConnectionClassicCertificateOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionClassicCertificateInput)(nil)).Elem(), &ConnectionClassicCertificate{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionClassicCertificateArrayInput)(nil)).Elem(), ConnectionClassicCertificateArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ConnectionClassicCertificateMapInput)(nil)).Elem(), ConnectionClassicCertificateMap{})
pulumi.RegisterOutputType(ConnectionClassicCertificateOutput{})
pulumi.RegisterOutputType(ConnectionClassicCertificateArrayOutput{})
pulumi.RegisterOutputType(ConnectionClassicCertificateMapOutput{})
}
| 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/automation/jobSchedule.go | sdk/go/azure/automation/jobSchedule.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Links an Automation Runbook and Schedule.
//
// > **Note:** AzureRM provides this stand-alone automation.JobSchedule and an inlined `jobSchedule` property in azurermRunbook to manage the job schedules. You can only make use of one of these methods to manage a job schedule.
//
// ## Example Usage
//
// This is an example of just the Job Schedule.
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := automation.NewJobSchedule(ctx, "example", &automation.JobScheduleArgs{
// ResourceGroupName: pulumi.String("tf-rgr-automation"),
// AutomationAccountName: pulumi.String("tf-automation-account"),
// ScheduleName: pulumi.String("hour"),
// RunbookName: pulumi.String("Get-VirtualMachine"),
// Parameters: pulumi.StringMap{
// "resourcegroup": pulumi.String("tf-rgr-vm"),
// "vmname": pulumi.String("TF-VM-01"),
// },
// })
// 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.Automation` - 2024-10-23
//
// ## Import
//
// Automation Job Schedules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/jobSchedule:JobSchedule example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/schedules/schedule1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/runbooks/runbook1"
// ```
type JobSchedule struct {
pulumi.CustomResourceState
// The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// The UUID identifying the Automation Job Schedule. Changing this forces a new resource to be created.
JobScheduleId pulumi.StringOutput `pulumi:"jobScheduleId"`
// A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. Changing this forces a new resource to be created.
//
// > **Note:** The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don't have this limitation.
Parameters pulumi.StringMapOutput `pulumi:"parameters"`
// The name of the resource group in which the Job Schedule is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Resource Manager ID of the Automation Job Schedule.
ResourceManagerId pulumi.StringOutput `pulumi:"resourceManagerId"`
// Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.
RunOn pulumi.StringPtrOutput `pulumi:"runOn"`
// The name of a Runbook to link to a Schedule. It needs to be in the same Automation Account as the Schedule and Job Schedule. Changing this forces a new resource to be created.
RunbookName pulumi.StringOutput `pulumi:"runbookName"`
// The name of the Schedule. Changing this forces a new resource to be created.
ScheduleName pulumi.StringOutput `pulumi:"scheduleName"`
}
// NewJobSchedule registers a new resource with the given unique name, arguments, and options.
func NewJobSchedule(ctx *pulumi.Context,
name string, args *JobScheduleArgs, opts ...pulumi.ResourceOption) (*JobSchedule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.RunbookName == nil {
return nil, errors.New("invalid value for required argument 'RunbookName'")
}
if args.ScheduleName == nil {
return nil, errors.New("invalid value for required argument 'ScheduleName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource JobSchedule
err := ctx.RegisterResource("azure:automation/jobSchedule:JobSchedule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetJobSchedule gets an existing JobSchedule 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 GetJobSchedule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *JobScheduleState, opts ...pulumi.ResourceOption) (*JobSchedule, error) {
var resource JobSchedule
err := ctx.ReadResource("azure:automation/jobSchedule:JobSchedule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering JobSchedule resources.
type jobScheduleState struct {
// The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// The UUID identifying the Automation Job Schedule. Changing this forces a new resource to be created.
JobScheduleId *string `pulumi:"jobScheduleId"`
// A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. Changing this forces a new resource to be created.
//
// > **Note:** The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don't have this limitation.
Parameters map[string]string `pulumi:"parameters"`
// The name of the resource group in which the Job Schedule is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Resource Manager ID of the Automation Job Schedule.
ResourceManagerId *string `pulumi:"resourceManagerId"`
// Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.
RunOn *string `pulumi:"runOn"`
// The name of a Runbook to link to a Schedule. It needs to be in the same Automation Account as the Schedule and Job Schedule. Changing this forces a new resource to be created.
RunbookName *string `pulumi:"runbookName"`
// The name of the Schedule. Changing this forces a new resource to be created.
ScheduleName *string `pulumi:"scheduleName"`
}
type JobScheduleState struct {
// The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// The UUID identifying the Automation Job Schedule. Changing this forces a new resource to be created.
JobScheduleId pulumi.StringPtrInput
// A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. Changing this forces a new resource to be created.
//
// > **Note:** The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don't have this limitation.
Parameters pulumi.StringMapInput
// The name of the resource group in which the Job Schedule is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The Resource Manager ID of the Automation Job Schedule.
ResourceManagerId pulumi.StringPtrInput
// Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.
RunOn pulumi.StringPtrInput
// The name of a Runbook to link to a Schedule. It needs to be in the same Automation Account as the Schedule and Job Schedule. Changing this forces a new resource to be created.
RunbookName pulumi.StringPtrInput
// The name of the Schedule. Changing this forces a new resource to be created.
ScheduleName pulumi.StringPtrInput
}
func (JobScheduleState) ElementType() reflect.Type {
return reflect.TypeOf((*jobScheduleState)(nil)).Elem()
}
type jobScheduleArgs struct {
// The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The UUID identifying the Automation Job Schedule. Changing this forces a new resource to be created.
JobScheduleId *string `pulumi:"jobScheduleId"`
// A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. Changing this forces a new resource to be created.
//
// > **Note:** The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don't have this limitation.
Parameters map[string]string `pulumi:"parameters"`
// The name of the resource group in which the Job Schedule is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.
RunOn *string `pulumi:"runOn"`
// The name of a Runbook to link to a Schedule. It needs to be in the same Automation Account as the Schedule and Job Schedule. Changing this forces a new resource to be created.
RunbookName string `pulumi:"runbookName"`
// The name of the Schedule. Changing this forces a new resource to be created.
ScheduleName string `pulumi:"scheduleName"`
}
// The set of arguments for constructing a JobSchedule resource.
type JobScheduleArgs struct {
// The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The UUID identifying the Automation Job Schedule. Changing this forces a new resource to be created.
JobScheduleId pulumi.StringPtrInput
// A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. Changing this forces a new resource to be created.
//
// > **Note:** The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don't have this limitation.
Parameters pulumi.StringMapInput
// The name of the resource group in which the Job Schedule is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.
RunOn pulumi.StringPtrInput
// The name of a Runbook to link to a Schedule. It needs to be in the same Automation Account as the Schedule and Job Schedule. Changing this forces a new resource to be created.
RunbookName pulumi.StringInput
// The name of the Schedule. Changing this forces a new resource to be created.
ScheduleName pulumi.StringInput
}
func (JobScheduleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*jobScheduleArgs)(nil)).Elem()
}
type JobScheduleInput interface {
pulumi.Input
ToJobScheduleOutput() JobScheduleOutput
ToJobScheduleOutputWithContext(ctx context.Context) JobScheduleOutput
}
func (*JobSchedule) ElementType() reflect.Type {
return reflect.TypeOf((**JobSchedule)(nil)).Elem()
}
func (i *JobSchedule) ToJobScheduleOutput() JobScheduleOutput {
return i.ToJobScheduleOutputWithContext(context.Background())
}
func (i *JobSchedule) ToJobScheduleOutputWithContext(ctx context.Context) JobScheduleOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobScheduleOutput)
}
// JobScheduleArrayInput is an input type that accepts JobScheduleArray and JobScheduleArrayOutput values.
// You can construct a concrete instance of `JobScheduleArrayInput` via:
//
// JobScheduleArray{ JobScheduleArgs{...} }
type JobScheduleArrayInput interface {
pulumi.Input
ToJobScheduleArrayOutput() JobScheduleArrayOutput
ToJobScheduleArrayOutputWithContext(context.Context) JobScheduleArrayOutput
}
type JobScheduleArray []JobScheduleInput
func (JobScheduleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*JobSchedule)(nil)).Elem()
}
func (i JobScheduleArray) ToJobScheduleArrayOutput() JobScheduleArrayOutput {
return i.ToJobScheduleArrayOutputWithContext(context.Background())
}
func (i JobScheduleArray) ToJobScheduleArrayOutputWithContext(ctx context.Context) JobScheduleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobScheduleArrayOutput)
}
// JobScheduleMapInput is an input type that accepts JobScheduleMap and JobScheduleMapOutput values.
// You can construct a concrete instance of `JobScheduleMapInput` via:
//
// JobScheduleMap{ "key": JobScheduleArgs{...} }
type JobScheduleMapInput interface {
pulumi.Input
ToJobScheduleMapOutput() JobScheduleMapOutput
ToJobScheduleMapOutputWithContext(context.Context) JobScheduleMapOutput
}
type JobScheduleMap map[string]JobScheduleInput
func (JobScheduleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*JobSchedule)(nil)).Elem()
}
func (i JobScheduleMap) ToJobScheduleMapOutput() JobScheduleMapOutput {
return i.ToJobScheduleMapOutputWithContext(context.Background())
}
func (i JobScheduleMap) ToJobScheduleMapOutputWithContext(ctx context.Context) JobScheduleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(JobScheduleMapOutput)
}
type JobScheduleOutput struct{ *pulumi.OutputState }
func (JobScheduleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**JobSchedule)(nil)).Elem()
}
func (o JobScheduleOutput) ToJobScheduleOutput() JobScheduleOutput {
return o
}
func (o JobScheduleOutput) ToJobScheduleOutputWithContext(ctx context.Context) JobScheduleOutput {
return o
}
// The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
func (o JobScheduleOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *JobSchedule) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The UUID identifying the Automation Job Schedule. Changing this forces a new resource to be created.
func (o JobScheduleOutput) JobScheduleId() pulumi.StringOutput {
return o.ApplyT(func(v *JobSchedule) pulumi.StringOutput { return v.JobScheduleId }).(pulumi.StringOutput)
}
// A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. Changing this forces a new resource to be created.
//
// > **Note:** The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don't have this limitation.
func (o JobScheduleOutput) Parameters() pulumi.StringMapOutput {
return o.ApplyT(func(v *JobSchedule) pulumi.StringMapOutput { return v.Parameters }).(pulumi.StringMapOutput)
}
// The name of the resource group in which the Job Schedule is created. Changing this forces a new resource to be created.
func (o JobScheduleOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *JobSchedule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Resource Manager ID of the Automation Job Schedule.
func (o JobScheduleOutput) ResourceManagerId() pulumi.StringOutput {
return o.ApplyT(func(v *JobSchedule) pulumi.StringOutput { return v.ResourceManagerId }).(pulumi.StringOutput)
}
// Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.
func (o JobScheduleOutput) RunOn() pulumi.StringPtrOutput {
return o.ApplyT(func(v *JobSchedule) pulumi.StringPtrOutput { return v.RunOn }).(pulumi.StringPtrOutput)
}
// The name of a Runbook to link to a Schedule. It needs to be in the same Automation Account as the Schedule and Job Schedule. Changing this forces a new resource to be created.
func (o JobScheduleOutput) RunbookName() pulumi.StringOutput {
return o.ApplyT(func(v *JobSchedule) pulumi.StringOutput { return v.RunbookName }).(pulumi.StringOutput)
}
// The name of the Schedule. Changing this forces a new resource to be created.
func (o JobScheduleOutput) ScheduleName() pulumi.StringOutput {
return o.ApplyT(func(v *JobSchedule) pulumi.StringOutput { return v.ScheduleName }).(pulumi.StringOutput)
}
type JobScheduleArrayOutput struct{ *pulumi.OutputState }
func (JobScheduleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*JobSchedule)(nil)).Elem()
}
func (o JobScheduleArrayOutput) ToJobScheduleArrayOutput() JobScheduleArrayOutput {
return o
}
func (o JobScheduleArrayOutput) ToJobScheduleArrayOutputWithContext(ctx context.Context) JobScheduleArrayOutput {
return o
}
func (o JobScheduleArrayOutput) Index(i pulumi.IntInput) JobScheduleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *JobSchedule {
return vs[0].([]*JobSchedule)[vs[1].(int)]
}).(JobScheduleOutput)
}
type JobScheduleMapOutput struct{ *pulumi.OutputState }
func (JobScheduleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*JobSchedule)(nil)).Elem()
}
func (o JobScheduleMapOutput) ToJobScheduleMapOutput() JobScheduleMapOutput {
return o
}
func (o JobScheduleMapOutput) ToJobScheduleMapOutputWithContext(ctx context.Context) JobScheduleMapOutput {
return o
}
func (o JobScheduleMapOutput) MapIndex(k pulumi.StringInput) JobScheduleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *JobSchedule {
return vs[0].(map[string]*JobSchedule)[vs[1].(string)]
}).(JobScheduleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*JobScheduleInput)(nil)).Elem(), &JobSchedule{})
pulumi.RegisterInputType(reflect.TypeOf((*JobScheduleArrayInput)(nil)).Elem(), JobScheduleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*JobScheduleMapInput)(nil)).Elem(), JobScheduleMap{})
pulumi.RegisterOutputType(JobScheduleOutput{})
pulumi.RegisterOutputType(JobScheduleArrayOutput{})
pulumi.RegisterOutputType(JobScheduleMapOutput{})
}
| 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/automation/certificate.go | sdk/go/azure/automation/certificate.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Automation Certificate.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "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("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("account1"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "certificate.pfx",
// }, nil)
// if err != nil {
// return err
// }
// _, err = automation.NewCertificate(ctx, "example", &automation.CertificateArgs{
// Name: pulumi.String("certificate1"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// Description: pulumi.String("This is an example certificate"),
// Base64: pulumi.String(invokeFilebase64.Result),
// Exportable: 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.Automation` - 2024-10-23
//
// ## Import
//
// Automation Certificates can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/certificate:Certificate certificate1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/certificates/certificate1
// ```
type Certificate struct {
pulumi.CustomResourceState
// The name of the automation account in which the Certificate is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// Base64 encoded value of the certificate. Changing this forces a new resource to be created.
Base64 pulumi.StringOutput `pulumi:"base64"`
// The description of this Automation Certificate.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The is exportable flag of the certificate.
Exportable pulumi.BoolPtrOutput `pulumi:"exportable"`
// Specifies the name of the Certificate. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group in which the Certificate is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The thumbprint for the certificate.
Thumbprint pulumi.StringOutput `pulumi:"thumbprint"`
}
// NewCertificate registers a new resource with the given unique name, arguments, and options.
func NewCertificate(ctx *pulumi.Context,
name string, args *CertificateArgs, opts ...pulumi.ResourceOption) (*Certificate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.Base64 == nil {
return nil, errors.New("invalid value for required argument 'Base64'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Base64 != nil {
args.Base64 = pulumi.ToSecret(args.Base64).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"base64",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Certificate
err := ctx.RegisterResource("azure:automation/certificate:Certificate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCertificate gets an existing Certificate 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 GetCertificate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CertificateState, opts ...pulumi.ResourceOption) (*Certificate, error) {
var resource Certificate
err := ctx.ReadResource("azure:automation/certificate:Certificate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Certificate resources.
type certificateState struct {
// The name of the automation account in which the Certificate is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// Base64 encoded value of the certificate. Changing this forces a new resource to be created.
Base64 *string `pulumi:"base64"`
// The description of this Automation Certificate.
Description *string `pulumi:"description"`
// The is exportable flag of the certificate.
Exportable *bool `pulumi:"exportable"`
// Specifies the name of the Certificate. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Certificate is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The thumbprint for the certificate.
Thumbprint *string `pulumi:"thumbprint"`
}
type CertificateState struct {
// The name of the automation account in which the Certificate is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// Base64 encoded value of the certificate. Changing this forces a new resource to be created.
Base64 pulumi.StringPtrInput
// The description of this Automation Certificate.
Description pulumi.StringPtrInput
// The is exportable flag of the certificate.
Exportable pulumi.BoolPtrInput
// Specifies the name of the Certificate. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Certificate is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The thumbprint for the certificate.
Thumbprint pulumi.StringPtrInput
}
func (CertificateState) ElementType() reflect.Type {
return reflect.TypeOf((*certificateState)(nil)).Elem()
}
type certificateArgs struct {
// The name of the automation account in which the Certificate is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// Base64 encoded value of the certificate. Changing this forces a new resource to be created.
Base64 string `pulumi:"base64"`
// The description of this Automation Certificate.
Description *string `pulumi:"description"`
// The is exportable flag of the certificate.
Exportable *bool `pulumi:"exportable"`
// Specifies the name of the Certificate. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Certificate is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a Certificate resource.
type CertificateArgs struct {
// The name of the automation account in which the Certificate is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// Base64 encoded value of the certificate. Changing this forces a new resource to be created.
Base64 pulumi.StringInput
// The description of this Automation Certificate.
Description pulumi.StringPtrInput
// The is exportable flag of the certificate.
Exportable pulumi.BoolPtrInput
// Specifies the name of the Certificate. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Certificate is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (CertificateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*certificateArgs)(nil)).Elem()
}
type CertificateInput interface {
pulumi.Input
ToCertificateOutput() CertificateOutput
ToCertificateOutputWithContext(ctx context.Context) CertificateOutput
}
func (*Certificate) ElementType() reflect.Type {
return reflect.TypeOf((**Certificate)(nil)).Elem()
}
func (i *Certificate) ToCertificateOutput() CertificateOutput {
return i.ToCertificateOutputWithContext(context.Background())
}
func (i *Certificate) ToCertificateOutputWithContext(ctx context.Context) CertificateOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateOutput)
}
// CertificateArrayInput is an input type that accepts CertificateArray and CertificateArrayOutput values.
// You can construct a concrete instance of `CertificateArrayInput` via:
//
// CertificateArray{ CertificateArgs{...} }
type CertificateArrayInput interface {
pulumi.Input
ToCertificateArrayOutput() CertificateArrayOutput
ToCertificateArrayOutputWithContext(context.Context) CertificateArrayOutput
}
type CertificateArray []CertificateInput
func (CertificateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Certificate)(nil)).Elem()
}
func (i CertificateArray) ToCertificateArrayOutput() CertificateArrayOutput {
return i.ToCertificateArrayOutputWithContext(context.Background())
}
func (i CertificateArray) ToCertificateArrayOutputWithContext(ctx context.Context) CertificateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateArrayOutput)
}
// CertificateMapInput is an input type that accepts CertificateMap and CertificateMapOutput values.
// You can construct a concrete instance of `CertificateMapInput` via:
//
// CertificateMap{ "key": CertificateArgs{...} }
type CertificateMapInput interface {
pulumi.Input
ToCertificateMapOutput() CertificateMapOutput
ToCertificateMapOutputWithContext(context.Context) CertificateMapOutput
}
type CertificateMap map[string]CertificateInput
func (CertificateMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Certificate)(nil)).Elem()
}
func (i CertificateMap) ToCertificateMapOutput() CertificateMapOutput {
return i.ToCertificateMapOutputWithContext(context.Background())
}
func (i CertificateMap) ToCertificateMapOutputWithContext(ctx context.Context) CertificateMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CertificateMapOutput)
}
type CertificateOutput struct{ *pulumi.OutputState }
func (CertificateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Certificate)(nil)).Elem()
}
func (o CertificateOutput) ToCertificateOutput() CertificateOutput {
return o
}
func (o CertificateOutput) ToCertificateOutputWithContext(ctx context.Context) CertificateOutput {
return o
}
// The name of the automation account in which the Certificate is created. Changing this forces a new resource to be created.
func (o CertificateOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// Base64 encoded value of the certificate. Changing this forces a new resource to be created.
func (o CertificateOutput) Base64() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Base64 }).(pulumi.StringOutput)
}
// The description of this Automation Certificate.
func (o CertificateOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The is exportable flag of the certificate.
func (o CertificateOutput) Exportable() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Certificate) pulumi.BoolPtrOutput { return v.Exportable }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the Certificate. Changing this forces a new resource to be created.
func (o CertificateOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which the Certificate is created. Changing this forces a new resource to be created.
func (o CertificateOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The thumbprint for the certificate.
func (o CertificateOutput) Thumbprint() pulumi.StringOutput {
return o.ApplyT(func(v *Certificate) pulumi.StringOutput { return v.Thumbprint }).(pulumi.StringOutput)
}
type CertificateArrayOutput struct{ *pulumi.OutputState }
func (CertificateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Certificate)(nil)).Elem()
}
func (o CertificateArrayOutput) ToCertificateArrayOutput() CertificateArrayOutput {
return o
}
func (o CertificateArrayOutput) ToCertificateArrayOutputWithContext(ctx context.Context) CertificateArrayOutput {
return o
}
func (o CertificateArrayOutput) Index(i pulumi.IntInput) CertificateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Certificate {
return vs[0].([]*Certificate)[vs[1].(int)]
}).(CertificateOutput)
}
type CertificateMapOutput struct{ *pulumi.OutputState }
func (CertificateMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Certificate)(nil)).Elem()
}
func (o CertificateMapOutput) ToCertificateMapOutput() CertificateMapOutput {
return o
}
func (o CertificateMapOutput) ToCertificateMapOutputWithContext(ctx context.Context) CertificateMapOutput {
return o
}
func (o CertificateMapOutput) MapIndex(k pulumi.StringInput) CertificateOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Certificate {
return vs[0].(map[string]*Certificate)[vs[1].(string)]
}).(CertificateOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CertificateInput)(nil)).Elem(), &Certificate{})
pulumi.RegisterInputType(reflect.TypeOf((*CertificateArrayInput)(nil)).Elem(), CertificateArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CertificateMapInput)(nil)).Elem(), CertificateMap{})
pulumi.RegisterOutputType(CertificateOutput{})
pulumi.RegisterOutputType(CertificateArrayOutput{})
pulumi.RegisterOutputType(CertificateMapOutput{})
}
| 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/automation/module.go | sdk/go/azure/automation/module.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Automation Module.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("account1"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewModule(ctx, "example", &automation.ModuleArgs{
// Name: pulumi.String("xActiveDirectory"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// ModuleLink: &automation.ModuleModuleLinkArgs{
// Uri: pulumi.String("https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg"),
// },
// })
// 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.Automation` - 2024-10-23
//
// ## Import
//
// Automation Modules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/module:Module module1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/modules/module1
// ```
type Module struct {
pulumi.CustomResourceState
// The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// A `moduleLink` block as defined below.
ModuleLink ModuleModuleLinkOutput `pulumi:"moduleLink"`
// Specifies the name of the Module. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewModule registers a new resource with the given unique name, arguments, and options.
func NewModule(ctx *pulumi.Context,
name string, args *ModuleArgs, opts ...pulumi.ResourceOption) (*Module, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.ModuleLink == nil {
return nil, errors.New("invalid value for required argument 'ModuleLink'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Module
err := ctx.RegisterResource("azure:automation/module:Module", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetModule gets an existing Module 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 GetModule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ModuleState, opts ...pulumi.ResourceOption) (*Module, error) {
var resource Module
err := ctx.ReadResource("azure:automation/module:Module", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Module resources.
type moduleState struct {
// The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// A `moduleLink` block as defined below.
ModuleLink *ModuleModuleLink `pulumi:"moduleLink"`
// Specifies the name of the Module. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type ModuleState struct {
// The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// A `moduleLink` block as defined below.
ModuleLink ModuleModuleLinkPtrInput
// Specifies the name of the Module. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (ModuleState) ElementType() reflect.Type {
return reflect.TypeOf((*moduleState)(nil)).Elem()
}
type moduleArgs struct {
// The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// A `moduleLink` block as defined below.
ModuleLink ModuleModuleLink `pulumi:"moduleLink"`
// Specifies the name of the Module. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a Module resource.
type ModuleArgs struct {
// The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// A `moduleLink` block as defined below.
ModuleLink ModuleModuleLinkInput
// Specifies the name of the Module. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (ModuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*moduleArgs)(nil)).Elem()
}
type ModuleInput interface {
pulumi.Input
ToModuleOutput() ModuleOutput
ToModuleOutputWithContext(ctx context.Context) ModuleOutput
}
func (*Module) ElementType() reflect.Type {
return reflect.TypeOf((**Module)(nil)).Elem()
}
func (i *Module) ToModuleOutput() ModuleOutput {
return i.ToModuleOutputWithContext(context.Background())
}
func (i *Module) ToModuleOutputWithContext(ctx context.Context) ModuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleOutput)
}
// ModuleArrayInput is an input type that accepts ModuleArray and ModuleArrayOutput values.
// You can construct a concrete instance of `ModuleArrayInput` via:
//
// ModuleArray{ ModuleArgs{...} }
type ModuleArrayInput interface {
pulumi.Input
ToModuleArrayOutput() ModuleArrayOutput
ToModuleArrayOutputWithContext(context.Context) ModuleArrayOutput
}
type ModuleArray []ModuleInput
func (ModuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Module)(nil)).Elem()
}
func (i ModuleArray) ToModuleArrayOutput() ModuleArrayOutput {
return i.ToModuleArrayOutputWithContext(context.Background())
}
func (i ModuleArray) ToModuleArrayOutputWithContext(ctx context.Context) ModuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleArrayOutput)
}
// ModuleMapInput is an input type that accepts ModuleMap and ModuleMapOutput values.
// You can construct a concrete instance of `ModuleMapInput` via:
//
// ModuleMap{ "key": ModuleArgs{...} }
type ModuleMapInput interface {
pulumi.Input
ToModuleMapOutput() ModuleMapOutput
ToModuleMapOutputWithContext(context.Context) ModuleMapOutput
}
type ModuleMap map[string]ModuleInput
func (ModuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Module)(nil)).Elem()
}
func (i ModuleMap) ToModuleMapOutput() ModuleMapOutput {
return i.ToModuleMapOutputWithContext(context.Background())
}
func (i ModuleMap) ToModuleMapOutputWithContext(ctx context.Context) ModuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ModuleMapOutput)
}
type ModuleOutput struct{ *pulumi.OutputState }
func (ModuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Module)(nil)).Elem()
}
func (o ModuleOutput) ToModuleOutput() ModuleOutput {
return o
}
func (o ModuleOutput) ToModuleOutputWithContext(ctx context.Context) ModuleOutput {
return o
}
// The name of the automation account in which the Module is created. Changing this forces a new resource to be created.
func (o ModuleOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *Module) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// A `moduleLink` block as defined below.
func (o ModuleOutput) ModuleLink() ModuleModuleLinkOutput {
return o.ApplyT(func(v *Module) ModuleModuleLinkOutput { return v.ModuleLink }).(ModuleModuleLinkOutput)
}
// Specifies the name of the Module. Changing this forces a new resource to be created.
func (o ModuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Module) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which the Module is created. Changing this forces a new resource to be created.
func (o ModuleOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Module) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type ModuleArrayOutput struct{ *pulumi.OutputState }
func (ModuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Module)(nil)).Elem()
}
func (o ModuleArrayOutput) ToModuleArrayOutput() ModuleArrayOutput {
return o
}
func (o ModuleArrayOutput) ToModuleArrayOutputWithContext(ctx context.Context) ModuleArrayOutput {
return o
}
func (o ModuleArrayOutput) Index(i pulumi.IntInput) ModuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Module {
return vs[0].([]*Module)[vs[1].(int)]
}).(ModuleOutput)
}
type ModuleMapOutput struct{ *pulumi.OutputState }
func (ModuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Module)(nil)).Elem()
}
func (o ModuleMapOutput) ToModuleMapOutput() ModuleMapOutput {
return o
}
func (o ModuleMapOutput) ToModuleMapOutputWithContext(ctx context.Context) ModuleMapOutput {
return o
}
func (o ModuleMapOutput) MapIndex(k pulumi.StringInput) ModuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Module {
return vs[0].(map[string]*Module)[vs[1].(string)]
}).(ModuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ModuleInput)(nil)).Elem(), &Module{})
pulumi.RegisterInputType(reflect.TypeOf((*ModuleArrayInput)(nil)).Elem(), ModuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ModuleMapInput)(nil)).Elem(), ModuleMap{})
pulumi.RegisterOutputType(ModuleOutput{})
pulumi.RegisterOutputType(ModuleArrayOutput{})
pulumi.RegisterOutputType(ModuleMapOutput{})
}
| 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/automation/watcher.go | sdk/go/azure/automation/watcher.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Automation Wacher.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("example-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// exampleHybridRunbookWorkerGroup, err := automation.NewHybridRunbookWorkerGroup(ctx, "example", &automation.HybridRunbookWorkerGroupArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// })
// if err != nil {
// return err
// }
// exampleRunBook, err := automation.NewRunBook(ctx, "example", &automation.RunBookArgs{
// Name: pulumi.String("Get-AzureVMTutorial"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// LogVerbose: pulumi.Bool(true),
// LogProgress: pulumi.Bool(true),
// Description: pulumi.String("This is an example runbook"),
// RunbookType: pulumi.String("PowerShellWorkflow"),
// PublishContentLink: &automation.RunBookPublishContentLinkArgs{
// Uri: pulumi.String("https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1"),
// },
// })
// if err != nil {
// return err
// }
// _, err = automation.NewWatcher(ctx, "example", &automation.WatcherArgs{
// Name: pulumi.String("example"),
// AutomationAccountId: exampleAccount.ID(),
// Location: pulumi.String("West Europe"),
// ScriptName: exampleRunBook.Name,
// ScriptRunOn: exampleHybridRunbookWorkerGroup.Name,
// Description: pulumi.String("example-watcher desc"),
// ExecutionFrequencyInSeconds: pulumi.Int(42),
// Tags: pulumi.StringMap{
// "foo": pulumi.String("bar"),
// },
// ScriptParameters: 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.Automation` - 2020-01-13-preview
//
// ## Import
//
// Automation Watchers can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/watcher:Watcher example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/watchers/watch1
// ```
type Watcher struct {
pulumi.CustomResourceState
// The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
AutomationAccountId pulumi.StringOutput `pulumi:"automationAccountId"`
// A description of this Automation Watcher.
Description pulumi.StringPtrOutput `pulumi:"description"`
// A string of etag assigned to this Automation Watcher.
Etag pulumi.StringPtrOutput `pulumi:"etag"`
// Specify the frequency at which the watcher is invoked.
ExecutionFrequencyInSeconds pulumi.IntOutput `pulumi:"executionFrequencyInSeconds"`
// The Azure Region where the Automation Watcher should exist. Changing this forces a new Automation Watcher to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Automation Watcher. Changing this forces a new Automation Watcher to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specify the name of an existing runbook this watcher is attached to. Changing this forces a new Automation to be created.
ScriptName pulumi.StringOutput `pulumi:"scriptName"`
// Specifies a list of key-vaule parameters. Changing this forces a new Automation watcher to be created.
ScriptParameters pulumi.StringMapOutput `pulumi:"scriptParameters"`
// Specify the name of the Hybrid work group the watcher will run on.
ScriptRunOn pulumi.StringOutput `pulumi:"scriptRunOn"`
// The current status of the Automation Watcher.
Status pulumi.StringOutput `pulumi:"status"`
// A mapping of tags which should be assigned to the Automation Watcher.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewWatcher registers a new resource with the given unique name, arguments, and options.
func NewWatcher(ctx *pulumi.Context,
name string, args *WatcherArgs, opts ...pulumi.ResourceOption) (*Watcher, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountId == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountId'")
}
if args.ExecutionFrequencyInSeconds == nil {
return nil, errors.New("invalid value for required argument 'ExecutionFrequencyInSeconds'")
}
if args.ScriptName == nil {
return nil, errors.New("invalid value for required argument 'ScriptName'")
}
if args.ScriptRunOn == nil {
return nil, errors.New("invalid value for required argument 'ScriptRunOn'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Watcher
err := ctx.RegisterResource("azure:automation/watcher:Watcher", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWatcher gets an existing Watcher 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 GetWatcher(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WatcherState, opts ...pulumi.ResourceOption) (*Watcher, error) {
var resource Watcher
err := ctx.ReadResource("azure:automation/watcher:Watcher", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Watcher resources.
type watcherState struct {
// The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
AutomationAccountId *string `pulumi:"automationAccountId"`
// A description of this Automation Watcher.
Description *string `pulumi:"description"`
// A string of etag assigned to this Automation Watcher.
Etag *string `pulumi:"etag"`
// Specify the frequency at which the watcher is invoked.
ExecutionFrequencyInSeconds *int `pulumi:"executionFrequencyInSeconds"`
// The Azure Region where the Automation Watcher should exist. Changing this forces a new Automation Watcher to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Automation Watcher. Changing this forces a new Automation Watcher to be created.
Name *string `pulumi:"name"`
// Specify the name of an existing runbook this watcher is attached to. Changing this forces a new Automation to be created.
ScriptName *string `pulumi:"scriptName"`
// Specifies a list of key-vaule parameters. Changing this forces a new Automation watcher to be created.
ScriptParameters map[string]string `pulumi:"scriptParameters"`
// Specify the name of the Hybrid work group the watcher will run on.
ScriptRunOn *string `pulumi:"scriptRunOn"`
// The current status of the Automation Watcher.
Status *string `pulumi:"status"`
// A mapping of tags which should be assigned to the Automation Watcher.
Tags map[string]string `pulumi:"tags"`
}
type WatcherState struct {
// The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
AutomationAccountId pulumi.StringPtrInput
// A description of this Automation Watcher.
Description pulumi.StringPtrInput
// A string of etag assigned to this Automation Watcher.
Etag pulumi.StringPtrInput
// Specify the frequency at which the watcher is invoked.
ExecutionFrequencyInSeconds pulumi.IntPtrInput
// The Azure Region where the Automation Watcher should exist. Changing this forces a new Automation Watcher to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Automation Watcher. Changing this forces a new Automation Watcher to be created.
Name pulumi.StringPtrInput
// Specify the name of an existing runbook this watcher is attached to. Changing this forces a new Automation to be created.
ScriptName pulumi.StringPtrInput
// Specifies a list of key-vaule parameters. Changing this forces a new Automation watcher to be created.
ScriptParameters pulumi.StringMapInput
// Specify the name of the Hybrid work group the watcher will run on.
ScriptRunOn pulumi.StringPtrInput
// The current status of the Automation Watcher.
Status pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Automation Watcher.
Tags pulumi.StringMapInput
}
func (WatcherState) ElementType() reflect.Type {
return reflect.TypeOf((*watcherState)(nil)).Elem()
}
type watcherArgs struct {
// The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
AutomationAccountId string `pulumi:"automationAccountId"`
// A description of this Automation Watcher.
Description *string `pulumi:"description"`
// A string of etag assigned to this Automation Watcher.
Etag *string `pulumi:"etag"`
// Specify the frequency at which the watcher is invoked.
ExecutionFrequencyInSeconds int `pulumi:"executionFrequencyInSeconds"`
// The Azure Region where the Automation Watcher should exist. Changing this forces a new Automation Watcher to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Automation Watcher. Changing this forces a new Automation Watcher to be created.
Name *string `pulumi:"name"`
// Specify the name of an existing runbook this watcher is attached to. Changing this forces a new Automation to be created.
ScriptName string `pulumi:"scriptName"`
// Specifies a list of key-vaule parameters. Changing this forces a new Automation watcher to be created.
ScriptParameters map[string]string `pulumi:"scriptParameters"`
// Specify the name of the Hybrid work group the watcher will run on.
ScriptRunOn string `pulumi:"scriptRunOn"`
// A mapping of tags which should be assigned to the Automation Watcher.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Watcher resource.
type WatcherArgs struct {
// The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
AutomationAccountId pulumi.StringInput
// A description of this Automation Watcher.
Description pulumi.StringPtrInput
// A string of etag assigned to this Automation Watcher.
Etag pulumi.StringPtrInput
// Specify the frequency at which the watcher is invoked.
ExecutionFrequencyInSeconds pulumi.IntInput
// The Azure Region where the Automation Watcher should exist. Changing this forces a new Automation Watcher to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Automation Watcher. Changing this forces a new Automation Watcher to be created.
Name pulumi.StringPtrInput
// Specify the name of an existing runbook this watcher is attached to. Changing this forces a new Automation to be created.
ScriptName pulumi.StringInput
// Specifies a list of key-vaule parameters. Changing this forces a new Automation watcher to be created.
ScriptParameters pulumi.StringMapInput
// Specify the name of the Hybrid work group the watcher will run on.
ScriptRunOn pulumi.StringInput
// A mapping of tags which should be assigned to the Automation Watcher.
Tags pulumi.StringMapInput
}
func (WatcherArgs) ElementType() reflect.Type {
return reflect.TypeOf((*watcherArgs)(nil)).Elem()
}
type WatcherInput interface {
pulumi.Input
ToWatcherOutput() WatcherOutput
ToWatcherOutputWithContext(ctx context.Context) WatcherOutput
}
func (*Watcher) ElementType() reflect.Type {
return reflect.TypeOf((**Watcher)(nil)).Elem()
}
func (i *Watcher) ToWatcherOutput() WatcherOutput {
return i.ToWatcherOutputWithContext(context.Background())
}
func (i *Watcher) ToWatcherOutputWithContext(ctx context.Context) WatcherOutput {
return pulumi.ToOutputWithContext(ctx, i).(WatcherOutput)
}
// WatcherArrayInput is an input type that accepts WatcherArray and WatcherArrayOutput values.
// You can construct a concrete instance of `WatcherArrayInput` via:
//
// WatcherArray{ WatcherArgs{...} }
type WatcherArrayInput interface {
pulumi.Input
ToWatcherArrayOutput() WatcherArrayOutput
ToWatcherArrayOutputWithContext(context.Context) WatcherArrayOutput
}
type WatcherArray []WatcherInput
func (WatcherArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Watcher)(nil)).Elem()
}
func (i WatcherArray) ToWatcherArrayOutput() WatcherArrayOutput {
return i.ToWatcherArrayOutputWithContext(context.Background())
}
func (i WatcherArray) ToWatcherArrayOutputWithContext(ctx context.Context) WatcherArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WatcherArrayOutput)
}
// WatcherMapInput is an input type that accepts WatcherMap and WatcherMapOutput values.
// You can construct a concrete instance of `WatcherMapInput` via:
//
// WatcherMap{ "key": WatcherArgs{...} }
type WatcherMapInput interface {
pulumi.Input
ToWatcherMapOutput() WatcherMapOutput
ToWatcherMapOutputWithContext(context.Context) WatcherMapOutput
}
type WatcherMap map[string]WatcherInput
func (WatcherMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Watcher)(nil)).Elem()
}
func (i WatcherMap) ToWatcherMapOutput() WatcherMapOutput {
return i.ToWatcherMapOutputWithContext(context.Background())
}
func (i WatcherMap) ToWatcherMapOutputWithContext(ctx context.Context) WatcherMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WatcherMapOutput)
}
type WatcherOutput struct{ *pulumi.OutputState }
func (WatcherOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Watcher)(nil)).Elem()
}
func (o WatcherOutput) ToWatcherOutput() WatcherOutput {
return o
}
func (o WatcherOutput) ToWatcherOutputWithContext(ctx context.Context) WatcherOutput {
return o
}
// The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
func (o WatcherOutput) AutomationAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *Watcher) pulumi.StringOutput { return v.AutomationAccountId }).(pulumi.StringOutput)
}
// A description of this Automation Watcher.
func (o WatcherOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Watcher) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// A string of etag assigned to this Automation Watcher.
func (o WatcherOutput) Etag() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Watcher) pulumi.StringPtrOutput { return v.Etag }).(pulumi.StringPtrOutput)
}
// Specify the frequency at which the watcher is invoked.
func (o WatcherOutput) ExecutionFrequencyInSeconds() pulumi.IntOutput {
return o.ApplyT(func(v *Watcher) pulumi.IntOutput { return v.ExecutionFrequencyInSeconds }).(pulumi.IntOutput)
}
// The Azure Region where the Automation Watcher should exist. Changing this forces a new Automation Watcher to be created.
func (o WatcherOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Watcher) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Automation Watcher. Changing this forces a new Automation Watcher to be created.
func (o WatcherOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Watcher) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specify the name of an existing runbook this watcher is attached to. Changing this forces a new Automation to be created.
func (o WatcherOutput) ScriptName() pulumi.StringOutput {
return o.ApplyT(func(v *Watcher) pulumi.StringOutput { return v.ScriptName }).(pulumi.StringOutput)
}
// Specifies a list of key-vaule parameters. Changing this forces a new Automation watcher to be created.
func (o WatcherOutput) ScriptParameters() pulumi.StringMapOutput {
return o.ApplyT(func(v *Watcher) pulumi.StringMapOutput { return v.ScriptParameters }).(pulumi.StringMapOutput)
}
// Specify the name of the Hybrid work group the watcher will run on.
func (o WatcherOutput) ScriptRunOn() pulumi.StringOutput {
return o.ApplyT(func(v *Watcher) pulumi.StringOutput { return v.ScriptRunOn }).(pulumi.StringOutput)
}
// The current status of the Automation Watcher.
func (o WatcherOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *Watcher) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Automation Watcher.
func (o WatcherOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Watcher) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type WatcherArrayOutput struct{ *pulumi.OutputState }
func (WatcherArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Watcher)(nil)).Elem()
}
func (o WatcherArrayOutput) ToWatcherArrayOutput() WatcherArrayOutput {
return o
}
func (o WatcherArrayOutput) ToWatcherArrayOutputWithContext(ctx context.Context) WatcherArrayOutput {
return o
}
func (o WatcherArrayOutput) Index(i pulumi.IntInput) WatcherOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Watcher {
return vs[0].([]*Watcher)[vs[1].(int)]
}).(WatcherOutput)
}
type WatcherMapOutput struct{ *pulumi.OutputState }
func (WatcherMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Watcher)(nil)).Elem()
}
func (o WatcherMapOutput) ToWatcherMapOutput() WatcherMapOutput {
return o
}
func (o WatcherMapOutput) ToWatcherMapOutputWithContext(ctx context.Context) WatcherMapOutput {
return o
}
func (o WatcherMapOutput) MapIndex(k pulumi.StringInput) WatcherOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Watcher {
return vs[0].(map[string]*Watcher)[vs[1].(string)]
}).(WatcherOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WatcherInput)(nil)).Elem(), &Watcher{})
pulumi.RegisterInputType(reflect.TypeOf((*WatcherArrayInput)(nil)).Elem(), WatcherArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WatcherMapInput)(nil)).Elem(), WatcherMap{})
pulumi.RegisterOutputType(WatcherOutput{})
pulumi.RegisterOutputType(WatcherArrayOutput{})
pulumi.RegisterOutputType(WatcherMapOutput{})
}
| 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/automation/getVariableObject.go | sdk/go/azure/automation/getVariableObject.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 automation
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 Automation Object Variable.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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 := automation.LookupVariableObject(ctx, &automation.LookupVariableObjectArgs{
// Name: "tfex-example-var",
// ResourceGroupName: "tfex-example-rg",
// AutomationAccountName: "tfex-example-account",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("variable", pulumi.Any(std.Jsondecode(ctx, &std.JsondecodeArgs{
// Input: example.Value,
// }, nil).Result))
// return nil
// })
// }
//
// ```
func LookupVariableObject(ctx *pulumi.Context, args *LookupVariableObjectArgs, opts ...pulumi.InvokeOption) (*LookupVariableObjectResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupVariableObjectResult
err := ctx.Invoke("azure:automation/getVariableObject:getVariableObject", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getVariableObject.
type LookupVariableObjectArgs struct {
// The name of the automation account in which the Automation Variable exists.
AutomationAccountName string `pulumi:"automationAccountName"`
// The name of the Automation Variable.
Name string `pulumi:"name"`
// The Name of the Resource Group where the automation account exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getVariableObject.
type LookupVariableObjectResult struct {
AutomationAccountName string `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description string `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted bool `pulumi:"encrypted"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a json encoded `string`.
Value string `pulumi:"value"`
}
func LookupVariableObjectOutput(ctx *pulumi.Context, args LookupVariableObjectOutputArgs, opts ...pulumi.InvokeOption) LookupVariableObjectResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupVariableObjectResultOutput, error) {
args := v.(LookupVariableObjectArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:automation/getVariableObject:getVariableObject", args, LookupVariableObjectResultOutput{}, options).(LookupVariableObjectResultOutput), nil
}).(LookupVariableObjectResultOutput)
}
// A collection of arguments for invoking getVariableObject.
type LookupVariableObjectOutputArgs struct {
// The name of the automation account in which the Automation Variable exists.
AutomationAccountName pulumi.StringInput `pulumi:"automationAccountName"`
// The name of the Automation Variable.
Name pulumi.StringInput `pulumi:"name"`
// The Name of the Resource Group where the automation account exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupVariableObjectOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupVariableObjectArgs)(nil)).Elem()
}
// A collection of values returned by getVariableObject.
type LookupVariableObjectResultOutput struct{ *pulumi.OutputState }
func (LookupVariableObjectResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupVariableObjectResult)(nil)).Elem()
}
func (o LookupVariableObjectResultOutput) ToLookupVariableObjectResultOutput() LookupVariableObjectResultOutput {
return o
}
func (o LookupVariableObjectResultOutput) ToLookupVariableObjectResultOutputWithContext(ctx context.Context) LookupVariableObjectResultOutput {
return o
}
func (o LookupVariableObjectResultOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v LookupVariableObjectResult) string { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The description of the Automation Variable.
func (o LookupVariableObjectResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupVariableObjectResult) string { return v.Description }).(pulumi.StringOutput)
}
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
func (o LookupVariableObjectResultOutput) Encrypted() pulumi.BoolOutput {
return o.ApplyT(func(v LookupVariableObjectResult) bool { return v.Encrypted }).(pulumi.BoolOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupVariableObjectResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupVariableObjectResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupVariableObjectResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupVariableObjectResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupVariableObjectResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupVariableObjectResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The value of the Automation Variable as a json encoded `string`.
func (o LookupVariableObjectResultOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v LookupVariableObjectResult) string { return v.Value }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupVariableObjectResultOutput{})
}
| 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/automation/getStringVariable.go | sdk/go/azure/automation/getStringVariable.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 automation
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 Automation String Variable.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := automation.LookupStringVariable(ctx, &automation.LookupStringVariableArgs{
// Name: "tfex-example-var",
// ResourceGroupName: "tfex-example-rg",
// AutomationAccountName: "tfex-example-account",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("variableId", example.Id)
// return nil
// })
// }
//
// ```
func LookupStringVariable(ctx *pulumi.Context, args *LookupStringVariableArgs, opts ...pulumi.InvokeOption) (*LookupStringVariableResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupStringVariableResult
err := ctx.Invoke("azure:automation/getStringVariable:getStringVariable", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getStringVariable.
type LookupStringVariableArgs struct {
// The name of the automation account in which the Automation Variable exists.
AutomationAccountName string `pulumi:"automationAccountName"`
// The name of the Automation Variable.
Name string `pulumi:"name"`
// The Name of the Resource Group where the automation account exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getStringVariable.
type LookupStringVariableResult struct {
AutomationAccountName string `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description string `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted bool `pulumi:"encrypted"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a `string`.
Value string `pulumi:"value"`
}
func LookupStringVariableOutput(ctx *pulumi.Context, args LookupStringVariableOutputArgs, opts ...pulumi.InvokeOption) LookupStringVariableResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupStringVariableResultOutput, error) {
args := v.(LookupStringVariableArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:automation/getStringVariable:getStringVariable", args, LookupStringVariableResultOutput{}, options).(LookupStringVariableResultOutput), nil
}).(LookupStringVariableResultOutput)
}
// A collection of arguments for invoking getStringVariable.
type LookupStringVariableOutputArgs struct {
// The name of the automation account in which the Automation Variable exists.
AutomationAccountName pulumi.StringInput `pulumi:"automationAccountName"`
// The name of the Automation Variable.
Name pulumi.StringInput `pulumi:"name"`
// The Name of the Resource Group where the automation account exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupStringVariableOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupStringVariableArgs)(nil)).Elem()
}
// A collection of values returned by getStringVariable.
type LookupStringVariableResultOutput struct{ *pulumi.OutputState }
func (LookupStringVariableResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupStringVariableResult)(nil)).Elem()
}
func (o LookupStringVariableResultOutput) ToLookupStringVariableResultOutput() LookupStringVariableResultOutput {
return o
}
func (o LookupStringVariableResultOutput) ToLookupStringVariableResultOutputWithContext(ctx context.Context) LookupStringVariableResultOutput {
return o
}
func (o LookupStringVariableResultOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v LookupStringVariableResult) string { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The description of the Automation Variable.
func (o LookupStringVariableResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupStringVariableResult) string { return v.Description }).(pulumi.StringOutput)
}
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
func (o LookupStringVariableResultOutput) Encrypted() pulumi.BoolOutput {
return o.ApplyT(func(v LookupStringVariableResult) bool { return v.Encrypted }).(pulumi.BoolOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupStringVariableResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupStringVariableResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupStringVariableResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupStringVariableResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupStringVariableResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupStringVariableResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The value of the Automation Variable as a `string`.
func (o LookupStringVariableResultOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v LookupStringVariableResult) string { return v.Value }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupStringVariableResultOutput{})
}
| 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/automation/runtimeEnvironment.go | sdk/go/azure/automation/runtimeEnvironment.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Automation Runtime Environment.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("rg-example"),
// Location: pulumi.String("westeurope"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewRuntimeEnvironment(ctx, "example", &automation.RuntimeEnvironmentArgs{
// Name: pulumi.String("powershell_environment_custom_config"),
// AutomationAccountId: exampleAccount.ID(),
// RuntimeLanguage: pulumi.String("PowerShell"),
// RuntimeVersion: pulumi.String("7.2"),
// Location: example.Location,
// Description: pulumi.String("example description"),
// RuntimeDefaultPackages: pulumi.StringMap{
// "az": pulumi.String("11.2.0"),
// "azure cli": pulumi.String("2.56.0"),
// },
// Tags: pulumi.StringMap{
// "key": pulumi.String("foo"),
// },
// })
// 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.Automation` - 2024-10-23
//
// ## Import
//
// Automation Runtime Environments can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/runtimeEnvironment:RuntimeEnvironment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/runtimeEnvironments/env1
// ```
type RuntimeEnvironment struct {
pulumi.CustomResourceState
// The ID of the automation account in which the Automation Runtime Environment is created. Changing this forces a new resource to be created.
AutomationAccountId pulumi.StringOutput `pulumi:"automationAccountId"`
// A description of the Automation Runtime Environment.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The location where the Automation Runtime Environment is created. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name for the Automation Runtime Environment. Changing this forces a new Automation Runtime Environment to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A mapping of default packages to be installed in the Automation Runtime Environment. The default packages can only be used with PowerShell runtime environments. Removing packages will force a new Automation Runtime Environment, adding new packages will update the existing Automation Runtime Environment.
RuntimeDefaultPackages pulumi.StringMapOutput `pulumi:"runtimeDefaultPackages"`
// The programming language used by the Automation Runtime Environment. Possible values are `Python` and `PowerShell`. Changing this forces a new Automation Runtime Environment to be created.
RuntimeLanguage pulumi.StringOutput `pulumi:"runtimeLanguage"`
// The version of the runtime environment. Changing this forces a new Automation Runtime Environment to be created.
RuntimeVersion pulumi.StringOutput `pulumi:"runtimeVersion"`
// A mapping of tags which should be assigned to the Automation Runtime Environment.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewRuntimeEnvironment registers a new resource with the given unique name, arguments, and options.
func NewRuntimeEnvironment(ctx *pulumi.Context,
name string, args *RuntimeEnvironmentArgs, opts ...pulumi.ResourceOption) (*RuntimeEnvironment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountId == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountId'")
}
if args.RuntimeLanguage == nil {
return nil, errors.New("invalid value for required argument 'RuntimeLanguage'")
}
if args.RuntimeVersion == nil {
return nil, errors.New("invalid value for required argument 'RuntimeVersion'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource RuntimeEnvironment
err := ctx.RegisterResource("azure:automation/runtimeEnvironment:RuntimeEnvironment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetRuntimeEnvironment gets an existing RuntimeEnvironment 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 GetRuntimeEnvironment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *RuntimeEnvironmentState, opts ...pulumi.ResourceOption) (*RuntimeEnvironment, error) {
var resource RuntimeEnvironment
err := ctx.ReadResource("azure:automation/runtimeEnvironment:RuntimeEnvironment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering RuntimeEnvironment resources.
type runtimeEnvironmentState struct {
// The ID of the automation account in which the Automation Runtime Environment is created. Changing this forces a new resource to be created.
AutomationAccountId *string `pulumi:"automationAccountId"`
// A description of the Automation Runtime Environment.
Description *string `pulumi:"description"`
// The location where the Automation Runtime Environment is created. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name for the Automation Runtime Environment. Changing this forces a new Automation Runtime Environment to be created.
Name *string `pulumi:"name"`
// A mapping of default packages to be installed in the Automation Runtime Environment. The default packages can only be used with PowerShell runtime environments. Removing packages will force a new Automation Runtime Environment, adding new packages will update the existing Automation Runtime Environment.
RuntimeDefaultPackages map[string]string `pulumi:"runtimeDefaultPackages"`
// The programming language used by the Automation Runtime Environment. Possible values are `Python` and `PowerShell`. Changing this forces a new Automation Runtime Environment to be created.
RuntimeLanguage *string `pulumi:"runtimeLanguage"`
// The version of the runtime environment. Changing this forces a new Automation Runtime Environment to be created.
RuntimeVersion *string `pulumi:"runtimeVersion"`
// A mapping of tags which should be assigned to the Automation Runtime Environment.
Tags map[string]string `pulumi:"tags"`
}
type RuntimeEnvironmentState struct {
// The ID of the automation account in which the Automation Runtime Environment is created. Changing this forces a new resource to be created.
AutomationAccountId pulumi.StringPtrInput
// A description of the Automation Runtime Environment.
Description pulumi.StringPtrInput
// The location where the Automation Runtime Environment is created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name for the Automation Runtime Environment. Changing this forces a new Automation Runtime Environment to be created.
Name pulumi.StringPtrInput
// A mapping of default packages to be installed in the Automation Runtime Environment. The default packages can only be used with PowerShell runtime environments. Removing packages will force a new Automation Runtime Environment, adding new packages will update the existing Automation Runtime Environment.
RuntimeDefaultPackages pulumi.StringMapInput
// The programming language used by the Automation Runtime Environment. Possible values are `Python` and `PowerShell`. Changing this forces a new Automation Runtime Environment to be created.
RuntimeLanguage pulumi.StringPtrInput
// The version of the runtime environment. Changing this forces a new Automation Runtime Environment to be created.
RuntimeVersion pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Automation Runtime Environment.
Tags pulumi.StringMapInput
}
func (RuntimeEnvironmentState) ElementType() reflect.Type {
return reflect.TypeOf((*runtimeEnvironmentState)(nil)).Elem()
}
type runtimeEnvironmentArgs struct {
// The ID of the automation account in which the Automation Runtime Environment is created. Changing this forces a new resource to be created.
AutomationAccountId string `pulumi:"automationAccountId"`
// A description of the Automation Runtime Environment.
Description *string `pulumi:"description"`
// The location where the Automation Runtime Environment is created. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name for the Automation Runtime Environment. Changing this forces a new Automation Runtime Environment to be created.
Name *string `pulumi:"name"`
// A mapping of default packages to be installed in the Automation Runtime Environment. The default packages can only be used with PowerShell runtime environments. Removing packages will force a new Automation Runtime Environment, adding new packages will update the existing Automation Runtime Environment.
RuntimeDefaultPackages map[string]string `pulumi:"runtimeDefaultPackages"`
// The programming language used by the Automation Runtime Environment. Possible values are `Python` and `PowerShell`. Changing this forces a new Automation Runtime Environment to be created.
RuntimeLanguage string `pulumi:"runtimeLanguage"`
// The version of the runtime environment. Changing this forces a new Automation Runtime Environment to be created.
RuntimeVersion string `pulumi:"runtimeVersion"`
// A mapping of tags which should be assigned to the Automation Runtime Environment.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a RuntimeEnvironment resource.
type RuntimeEnvironmentArgs struct {
// The ID of the automation account in which the Automation Runtime Environment is created. Changing this forces a new resource to be created.
AutomationAccountId pulumi.StringInput
// A description of the Automation Runtime Environment.
Description pulumi.StringPtrInput
// The location where the Automation Runtime Environment is created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name for the Automation Runtime Environment. Changing this forces a new Automation Runtime Environment to be created.
Name pulumi.StringPtrInput
// A mapping of default packages to be installed in the Automation Runtime Environment. The default packages can only be used with PowerShell runtime environments. Removing packages will force a new Automation Runtime Environment, adding new packages will update the existing Automation Runtime Environment.
RuntimeDefaultPackages pulumi.StringMapInput
// The programming language used by the Automation Runtime Environment. Possible values are `Python` and `PowerShell`. Changing this forces a new Automation Runtime Environment to be created.
RuntimeLanguage pulumi.StringInput
// The version of the runtime environment. Changing this forces a new Automation Runtime Environment to be created.
RuntimeVersion pulumi.StringInput
// A mapping of tags which should be assigned to the Automation Runtime Environment.
Tags pulumi.StringMapInput
}
func (RuntimeEnvironmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*runtimeEnvironmentArgs)(nil)).Elem()
}
type RuntimeEnvironmentInput interface {
pulumi.Input
ToRuntimeEnvironmentOutput() RuntimeEnvironmentOutput
ToRuntimeEnvironmentOutputWithContext(ctx context.Context) RuntimeEnvironmentOutput
}
func (*RuntimeEnvironment) ElementType() reflect.Type {
return reflect.TypeOf((**RuntimeEnvironment)(nil)).Elem()
}
func (i *RuntimeEnvironment) ToRuntimeEnvironmentOutput() RuntimeEnvironmentOutput {
return i.ToRuntimeEnvironmentOutputWithContext(context.Background())
}
func (i *RuntimeEnvironment) ToRuntimeEnvironmentOutputWithContext(ctx context.Context) RuntimeEnvironmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(RuntimeEnvironmentOutput)
}
// RuntimeEnvironmentArrayInput is an input type that accepts RuntimeEnvironmentArray and RuntimeEnvironmentArrayOutput values.
// You can construct a concrete instance of `RuntimeEnvironmentArrayInput` via:
//
// RuntimeEnvironmentArray{ RuntimeEnvironmentArgs{...} }
type RuntimeEnvironmentArrayInput interface {
pulumi.Input
ToRuntimeEnvironmentArrayOutput() RuntimeEnvironmentArrayOutput
ToRuntimeEnvironmentArrayOutputWithContext(context.Context) RuntimeEnvironmentArrayOutput
}
type RuntimeEnvironmentArray []RuntimeEnvironmentInput
func (RuntimeEnvironmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*RuntimeEnvironment)(nil)).Elem()
}
func (i RuntimeEnvironmentArray) ToRuntimeEnvironmentArrayOutput() RuntimeEnvironmentArrayOutput {
return i.ToRuntimeEnvironmentArrayOutputWithContext(context.Background())
}
func (i RuntimeEnvironmentArray) ToRuntimeEnvironmentArrayOutputWithContext(ctx context.Context) RuntimeEnvironmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(RuntimeEnvironmentArrayOutput)
}
// RuntimeEnvironmentMapInput is an input type that accepts RuntimeEnvironmentMap and RuntimeEnvironmentMapOutput values.
// You can construct a concrete instance of `RuntimeEnvironmentMapInput` via:
//
// RuntimeEnvironmentMap{ "key": RuntimeEnvironmentArgs{...} }
type RuntimeEnvironmentMapInput interface {
pulumi.Input
ToRuntimeEnvironmentMapOutput() RuntimeEnvironmentMapOutput
ToRuntimeEnvironmentMapOutputWithContext(context.Context) RuntimeEnvironmentMapOutput
}
type RuntimeEnvironmentMap map[string]RuntimeEnvironmentInput
func (RuntimeEnvironmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*RuntimeEnvironment)(nil)).Elem()
}
func (i RuntimeEnvironmentMap) ToRuntimeEnvironmentMapOutput() RuntimeEnvironmentMapOutput {
return i.ToRuntimeEnvironmentMapOutputWithContext(context.Background())
}
func (i RuntimeEnvironmentMap) ToRuntimeEnvironmentMapOutputWithContext(ctx context.Context) RuntimeEnvironmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(RuntimeEnvironmentMapOutput)
}
type RuntimeEnvironmentOutput struct{ *pulumi.OutputState }
func (RuntimeEnvironmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**RuntimeEnvironment)(nil)).Elem()
}
func (o RuntimeEnvironmentOutput) ToRuntimeEnvironmentOutput() RuntimeEnvironmentOutput {
return o
}
func (o RuntimeEnvironmentOutput) ToRuntimeEnvironmentOutputWithContext(ctx context.Context) RuntimeEnvironmentOutput {
return o
}
// The ID of the automation account in which the Automation Runtime Environment is created. Changing this forces a new resource to be created.
func (o RuntimeEnvironmentOutput) AutomationAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *RuntimeEnvironment) pulumi.StringOutput { return v.AutomationAccountId }).(pulumi.StringOutput)
}
// A description of the Automation Runtime Environment.
func (o RuntimeEnvironmentOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *RuntimeEnvironment) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The location where the Automation Runtime Environment is created. Changing this forces a new resource to be created.
func (o RuntimeEnvironmentOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *RuntimeEnvironment) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name for the Automation Runtime Environment. Changing this forces a new Automation Runtime Environment to be created.
func (o RuntimeEnvironmentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *RuntimeEnvironment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A mapping of default packages to be installed in the Automation Runtime Environment. The default packages can only be used with PowerShell runtime environments. Removing packages will force a new Automation Runtime Environment, adding new packages will update the existing Automation Runtime Environment.
func (o RuntimeEnvironmentOutput) RuntimeDefaultPackages() pulumi.StringMapOutput {
return o.ApplyT(func(v *RuntimeEnvironment) pulumi.StringMapOutput { return v.RuntimeDefaultPackages }).(pulumi.StringMapOutput)
}
// The programming language used by the Automation Runtime Environment. Possible values are `Python` and `PowerShell`. Changing this forces a new Automation Runtime Environment to be created.
func (o RuntimeEnvironmentOutput) RuntimeLanguage() pulumi.StringOutput {
return o.ApplyT(func(v *RuntimeEnvironment) pulumi.StringOutput { return v.RuntimeLanguage }).(pulumi.StringOutput)
}
// The version of the runtime environment. Changing this forces a new Automation Runtime Environment to be created.
func (o RuntimeEnvironmentOutput) RuntimeVersion() pulumi.StringOutput {
return o.ApplyT(func(v *RuntimeEnvironment) pulumi.StringOutput { return v.RuntimeVersion }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Automation Runtime Environment.
func (o RuntimeEnvironmentOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *RuntimeEnvironment) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type RuntimeEnvironmentArrayOutput struct{ *pulumi.OutputState }
func (RuntimeEnvironmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*RuntimeEnvironment)(nil)).Elem()
}
func (o RuntimeEnvironmentArrayOutput) ToRuntimeEnvironmentArrayOutput() RuntimeEnvironmentArrayOutput {
return o
}
func (o RuntimeEnvironmentArrayOutput) ToRuntimeEnvironmentArrayOutputWithContext(ctx context.Context) RuntimeEnvironmentArrayOutput {
return o
}
func (o RuntimeEnvironmentArrayOutput) Index(i pulumi.IntInput) RuntimeEnvironmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RuntimeEnvironment {
return vs[0].([]*RuntimeEnvironment)[vs[1].(int)]
}).(RuntimeEnvironmentOutput)
}
type RuntimeEnvironmentMapOutput struct{ *pulumi.OutputState }
func (RuntimeEnvironmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*RuntimeEnvironment)(nil)).Elem()
}
func (o RuntimeEnvironmentMapOutput) ToRuntimeEnvironmentMapOutput() RuntimeEnvironmentMapOutput {
return o
}
func (o RuntimeEnvironmentMapOutput) ToRuntimeEnvironmentMapOutputWithContext(ctx context.Context) RuntimeEnvironmentMapOutput {
return o
}
func (o RuntimeEnvironmentMapOutput) MapIndex(k pulumi.StringInput) RuntimeEnvironmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RuntimeEnvironment {
return vs[0].(map[string]*RuntimeEnvironment)[vs[1].(string)]
}).(RuntimeEnvironmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*RuntimeEnvironmentInput)(nil)).Elem(), &RuntimeEnvironment{})
pulumi.RegisterInputType(reflect.TypeOf((*RuntimeEnvironmentArrayInput)(nil)).Elem(), RuntimeEnvironmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*RuntimeEnvironmentMapInput)(nil)).Elem(), RuntimeEnvironmentMap{})
pulumi.RegisterOutputType(RuntimeEnvironmentOutput{})
pulumi.RegisterOutputType(RuntimeEnvironmentArrayOutput{})
pulumi.RegisterOutputType(RuntimeEnvironmentMapOutput{})
}
| 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/automation/account.go | sdk/go/azure/automation/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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Automation Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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 = automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("example-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("development"),
// },
// })
// 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.Automation` - 2024-10-23, 2019-06-01
//
// ## Import
//
// Automation Accounts can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/account:Account account1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1
// ```
type Account struct {
pulumi.CustomResourceState
// The Primary Access Key for the DSC Endpoint associated with this Automation Account.
DscPrimaryAccessKey pulumi.StringOutput `pulumi:"dscPrimaryAccessKey"`
// The Secondary Access Key for the DSC Endpoint associated with this Automation Account.
DscSecondaryAccessKey pulumi.StringOutput `pulumi:"dscSecondaryAccessKey"`
// The DSC Server Endpoint associated with this Automation Account.
DscServerEndpoint pulumi.StringOutput `pulumi:"dscServerEndpoint"`
// An `encryption` block as defined below.
Encryptions AccountEncryptionArrayOutput `pulumi:"encryptions"`
// The URL of automation hybrid service which is used for hybrid worker on-boarding With this Automation Account.
HybridServiceUrl pulumi.StringOutput `pulumi:"hybridServiceUrl"`
// An `identity` block as defined below.
Identity AccountIdentityPtrOutput `pulumi:"identity"`
// Whether requests using non-AAD authentication are blocked. Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrOutput `pulumi:"localAuthenticationEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the Automation Account. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
PrivateEndpointConnections AccountPrivateEndpointConnectionArrayOutput `pulumi:"privateEndpointConnections"`
// Whether public network access is allowed for the automation account. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which the Automation Account is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The SKU of the account. Possible values are `Basic` and `Free`.
SkuName pulumi.StringOutput `pulumi:"skuName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// 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{
"dscPrimaryAccessKey",
"dscSecondaryAccessKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Account
err := ctx.RegisterResource("azure:automation/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:automation/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 {
// The Primary Access Key for the DSC Endpoint associated with this Automation Account.
DscPrimaryAccessKey *string `pulumi:"dscPrimaryAccessKey"`
// The Secondary Access Key for the DSC Endpoint associated with this Automation Account.
DscSecondaryAccessKey *string `pulumi:"dscSecondaryAccessKey"`
// The DSC Server Endpoint associated with this Automation Account.
DscServerEndpoint *string `pulumi:"dscServerEndpoint"`
// An `encryption` block as defined below.
Encryptions []AccountEncryption `pulumi:"encryptions"`
// The URL of automation hybrid service which is used for hybrid worker on-boarding With this Automation Account.
HybridServiceUrl *string `pulumi:"hybridServiceUrl"`
// An `identity` block as defined below.
Identity *AccountIdentity `pulumi:"identity"`
// Whether requests using non-AAD authentication are blocked. Defaults to `true`.
LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Automation Account. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
PrivateEndpointConnections []AccountPrivateEndpointConnection `pulumi:"privateEndpointConnections"`
// Whether public network access is allowed for the automation account. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which the Automation Account is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The SKU of the account. Possible values are `Basic` and `Free`.
SkuName *string `pulumi:"skuName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type AccountState struct {
// The Primary Access Key for the DSC Endpoint associated with this Automation Account.
DscPrimaryAccessKey pulumi.StringPtrInput
// The Secondary Access Key for the DSC Endpoint associated with this Automation Account.
DscSecondaryAccessKey pulumi.StringPtrInput
// The DSC Server Endpoint associated with this Automation Account.
DscServerEndpoint pulumi.StringPtrInput
// An `encryption` block as defined below.
Encryptions AccountEncryptionArrayInput
// The URL of automation hybrid service which is used for hybrid worker on-boarding With this Automation Account.
HybridServiceUrl pulumi.StringPtrInput
// An `identity` block as defined below.
Identity AccountIdentityPtrInput
// Whether requests using non-AAD authentication are blocked. Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Automation Account. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
PrivateEndpointConnections AccountPrivateEndpointConnectionArrayInput
// Whether public network access is allowed for the automation account. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which the Automation Account is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The SKU of the account. Possible values are `Basic` and `Free`.
SkuName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (AccountState) ElementType() reflect.Type {
return reflect.TypeOf((*accountState)(nil)).Elem()
}
type accountArgs struct {
// An `encryption` block as defined below.
Encryptions []AccountEncryption `pulumi:"encryptions"`
// An `identity` block as defined below.
Identity *AccountIdentity `pulumi:"identity"`
// Whether requests using non-AAD authentication are blocked. Defaults to `true`.
LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Automation Account. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether public network access is allowed for the automation account. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which the Automation Account is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The SKU of the account. Possible values are `Basic` and `Free`.
SkuName string `pulumi:"skuName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Account resource.
type AccountArgs struct {
// An `encryption` block as defined below.
Encryptions AccountEncryptionArrayInput
// An `identity` block as defined below.
Identity AccountIdentityPtrInput
// Whether requests using non-AAD authentication are blocked. Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Automation Account. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether public network access is allowed for the automation account. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which the Automation Account is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The SKU of the account. Possible values are `Basic` and `Free`.
SkuName pulumi.StringInput
// A mapping of tags to assign to the resource.
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
}
// The Primary Access Key for the DSC Endpoint associated with this Automation Account.
func (o AccountOutput) DscPrimaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.DscPrimaryAccessKey }).(pulumi.StringOutput)
}
// The Secondary Access Key for the DSC Endpoint associated with this Automation Account.
func (o AccountOutput) DscSecondaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.DscSecondaryAccessKey }).(pulumi.StringOutput)
}
// The DSC Server Endpoint associated with this Automation Account.
func (o AccountOutput) DscServerEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.DscServerEndpoint }).(pulumi.StringOutput)
}
// An `encryption` block as defined below.
func (o AccountOutput) Encryptions() AccountEncryptionArrayOutput {
return o.ApplyT(func(v *Account) AccountEncryptionArrayOutput { return v.Encryptions }).(AccountEncryptionArrayOutput)
}
// The URL of automation hybrid service which is used for hybrid worker on-boarding With this Automation Account.
func (o AccountOutput) HybridServiceUrl() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.HybridServiceUrl }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o AccountOutput) Identity() AccountIdentityPtrOutput {
return o.ApplyT(func(v *Account) AccountIdentityPtrOutput { return v.Identity }).(AccountIdentityPtrOutput)
}
// Whether requests using non-AAD authentication are blocked. Defaults to `true`.
func (o AccountOutput) LocalAuthenticationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Account) pulumi.BoolPtrOutput { return v.LocalAuthenticationEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the supported Azure location where the resource exists. 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)
}
// Specifies the name of the Automation 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)
}
func (o AccountOutput) PrivateEndpointConnections() AccountPrivateEndpointConnectionArrayOutput {
return o.ApplyT(func(v *Account) AccountPrivateEndpointConnectionArrayOutput { return v.PrivateEndpointConnections }).(AccountPrivateEndpointConnectionArrayOutput)
}
// Whether public network access is allowed for the automation account. Defaults to `true`.
func (o AccountOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Account) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the resource group in which the Automation Account is created. 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 SKU of the account. Possible values are `Basic` and `Free`.
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 resource.
func (o AccountOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Account) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
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/automation/dateTimeVariable.go | sdk/go/azure/automation/dateTimeVariable.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a DateTime variable in Azure Automation
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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("tfex-example-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("tfex-example-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewDateTimeVariable(ctx, "example", &automation.DateTimeVariableArgs{
// Name: pulumi.String("tfex-example-var"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// Value: pulumi.String("2019-04-24T21:40:54.074Z"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Automation DateTime Variable can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/dateTimeVariable:DateTimeVariable example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tfex-example-rg/providers/Microsoft.Automation/automationAccounts/tfex-example-account/variables/tfex-example-var
// ```
type DateTimeVariable struct {
pulumi.CustomResourceState
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted pulumi.BoolPtrOutput `pulumi:"encrypted"`
// The name of the Automation Variable. 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 Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The value of the Automation Variable in the [RFC3339 Section 5.6 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6).
Value pulumi.StringPtrOutput `pulumi:"value"`
}
// NewDateTimeVariable registers a new resource with the given unique name, arguments, and options.
func NewDateTimeVariable(ctx *pulumi.Context,
name string, args *DateTimeVariableArgs, opts ...pulumi.ResourceOption) (*DateTimeVariable, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource DateTimeVariable
err := ctx.RegisterResource("azure:automation/dateTimeVariable:DateTimeVariable", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDateTimeVariable gets an existing DateTimeVariable 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 GetDateTimeVariable(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DateTimeVariableState, opts ...pulumi.ResourceOption) (*DateTimeVariable, error) {
var resource DateTimeVariable
err := ctx.ReadResource("azure:automation/dateTimeVariable:DateTimeVariable", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DateTimeVariable resources.
type dateTimeVariableState struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description *string `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted *bool `pulumi:"encrypted"`
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The value of the Automation Variable in the [RFC3339 Section 5.6 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6).
Value *string `pulumi:"value"`
}
type DateTimeVariableState struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// The description of the Automation Variable.
Description pulumi.StringPtrInput
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted pulumi.BoolPtrInput
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The value of the Automation Variable in the [RFC3339 Section 5.6 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6).
Value pulumi.StringPtrInput
}
func (DateTimeVariableState) ElementType() reflect.Type {
return reflect.TypeOf((*dateTimeVariableState)(nil)).Elem()
}
type dateTimeVariableArgs struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description *string `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted *bool `pulumi:"encrypted"`
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The value of the Automation Variable in the [RFC3339 Section 5.6 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6).
Value *string `pulumi:"value"`
}
// The set of arguments for constructing a DateTimeVariable resource.
type DateTimeVariableArgs struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The description of the Automation Variable.
Description pulumi.StringPtrInput
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted pulumi.BoolPtrInput
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The value of the Automation Variable in the [RFC3339 Section 5.6 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6).
Value pulumi.StringPtrInput
}
func (DateTimeVariableArgs) ElementType() reflect.Type {
return reflect.TypeOf((*dateTimeVariableArgs)(nil)).Elem()
}
type DateTimeVariableInput interface {
pulumi.Input
ToDateTimeVariableOutput() DateTimeVariableOutput
ToDateTimeVariableOutputWithContext(ctx context.Context) DateTimeVariableOutput
}
func (*DateTimeVariable) ElementType() reflect.Type {
return reflect.TypeOf((**DateTimeVariable)(nil)).Elem()
}
func (i *DateTimeVariable) ToDateTimeVariableOutput() DateTimeVariableOutput {
return i.ToDateTimeVariableOutputWithContext(context.Background())
}
func (i *DateTimeVariable) ToDateTimeVariableOutputWithContext(ctx context.Context) DateTimeVariableOutput {
return pulumi.ToOutputWithContext(ctx, i).(DateTimeVariableOutput)
}
// DateTimeVariableArrayInput is an input type that accepts DateTimeVariableArray and DateTimeVariableArrayOutput values.
// You can construct a concrete instance of `DateTimeVariableArrayInput` via:
//
// DateTimeVariableArray{ DateTimeVariableArgs{...} }
type DateTimeVariableArrayInput interface {
pulumi.Input
ToDateTimeVariableArrayOutput() DateTimeVariableArrayOutput
ToDateTimeVariableArrayOutputWithContext(context.Context) DateTimeVariableArrayOutput
}
type DateTimeVariableArray []DateTimeVariableInput
func (DateTimeVariableArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DateTimeVariable)(nil)).Elem()
}
func (i DateTimeVariableArray) ToDateTimeVariableArrayOutput() DateTimeVariableArrayOutput {
return i.ToDateTimeVariableArrayOutputWithContext(context.Background())
}
func (i DateTimeVariableArray) ToDateTimeVariableArrayOutputWithContext(ctx context.Context) DateTimeVariableArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DateTimeVariableArrayOutput)
}
// DateTimeVariableMapInput is an input type that accepts DateTimeVariableMap and DateTimeVariableMapOutput values.
// You can construct a concrete instance of `DateTimeVariableMapInput` via:
//
// DateTimeVariableMap{ "key": DateTimeVariableArgs{...} }
type DateTimeVariableMapInput interface {
pulumi.Input
ToDateTimeVariableMapOutput() DateTimeVariableMapOutput
ToDateTimeVariableMapOutputWithContext(context.Context) DateTimeVariableMapOutput
}
type DateTimeVariableMap map[string]DateTimeVariableInput
func (DateTimeVariableMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DateTimeVariable)(nil)).Elem()
}
func (i DateTimeVariableMap) ToDateTimeVariableMapOutput() DateTimeVariableMapOutput {
return i.ToDateTimeVariableMapOutputWithContext(context.Background())
}
func (i DateTimeVariableMap) ToDateTimeVariableMapOutputWithContext(ctx context.Context) DateTimeVariableMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DateTimeVariableMapOutput)
}
type DateTimeVariableOutput struct{ *pulumi.OutputState }
func (DateTimeVariableOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DateTimeVariable)(nil)).Elem()
}
func (o DateTimeVariableOutput) ToDateTimeVariableOutput() DateTimeVariableOutput {
return o
}
func (o DateTimeVariableOutput) ToDateTimeVariableOutputWithContext(ctx context.Context) DateTimeVariableOutput {
return o
}
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
func (o DateTimeVariableOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *DateTimeVariable) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The description of the Automation Variable.
func (o DateTimeVariableOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DateTimeVariable) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
func (o DateTimeVariableOutput) Encrypted() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *DateTimeVariable) pulumi.BoolPtrOutput { return v.Encrypted }).(pulumi.BoolPtrOutput)
}
// The name of the Automation Variable. Changing this forces a new resource to be created.
func (o DateTimeVariableOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DateTimeVariable) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
func (o DateTimeVariableOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *DateTimeVariable) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The value of the Automation Variable in the [RFC3339 Section 5.6 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6).
func (o DateTimeVariableOutput) Value() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DateTimeVariable) pulumi.StringPtrOutput { return v.Value }).(pulumi.StringPtrOutput)
}
type DateTimeVariableArrayOutput struct{ *pulumi.OutputState }
func (DateTimeVariableArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DateTimeVariable)(nil)).Elem()
}
func (o DateTimeVariableArrayOutput) ToDateTimeVariableArrayOutput() DateTimeVariableArrayOutput {
return o
}
func (o DateTimeVariableArrayOutput) ToDateTimeVariableArrayOutputWithContext(ctx context.Context) DateTimeVariableArrayOutput {
return o
}
func (o DateTimeVariableArrayOutput) Index(i pulumi.IntInput) DateTimeVariableOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DateTimeVariable {
return vs[0].([]*DateTimeVariable)[vs[1].(int)]
}).(DateTimeVariableOutput)
}
type DateTimeVariableMapOutput struct{ *pulumi.OutputState }
func (DateTimeVariableMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DateTimeVariable)(nil)).Elem()
}
func (o DateTimeVariableMapOutput) ToDateTimeVariableMapOutput() DateTimeVariableMapOutput {
return o
}
func (o DateTimeVariableMapOutput) ToDateTimeVariableMapOutputWithContext(ctx context.Context) DateTimeVariableMapOutput {
return o
}
func (o DateTimeVariableMapOutput) MapIndex(k pulumi.StringInput) DateTimeVariableOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DateTimeVariable {
return vs[0].(map[string]*DateTimeVariable)[vs[1].(string)]
}).(DateTimeVariableOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DateTimeVariableInput)(nil)).Elem(), &DateTimeVariable{})
pulumi.RegisterInputType(reflect.TypeOf((*DateTimeVariableArrayInput)(nil)).Elem(), DateTimeVariableArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DateTimeVariableMapInput)(nil)).Elem(), DateTimeVariableMap{})
pulumi.RegisterOutputType(DateTimeVariableOutput{})
pulumi.RegisterOutputType(DateTimeVariableArrayOutput{})
pulumi.RegisterOutputType(DateTimeVariableMapOutput{})
}
| 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/automation/boolVariable.go | sdk/go/azure/automation/boolVariable.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a boolean variable in Azure Automation
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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("tfex-example-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("tfex-example-account"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewBoolVariable(ctx, "example", &automation.BoolVariableArgs{
// Name: pulumi.String("tfex-example-var"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// Value: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Automation Bool Variable can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/boolVariable:BoolVariable example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tfex-example-rg/providers/Microsoft.Automation/automationAccounts/tfex-example-account/variables/tfex-example-var
// ```
type BoolVariable struct {
pulumi.CustomResourceState
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted pulumi.BoolPtrOutput `pulumi:"encrypted"`
// The name of the Automation Variable. 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 Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a `boolean`.
Value pulumi.BoolPtrOutput `pulumi:"value"`
}
// NewBoolVariable registers a new resource with the given unique name, arguments, and options.
func NewBoolVariable(ctx *pulumi.Context,
name string, args *BoolVariableArgs, opts ...pulumi.ResourceOption) (*BoolVariable, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BoolVariable
err := ctx.RegisterResource("azure:automation/boolVariable:BoolVariable", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBoolVariable gets an existing BoolVariable 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 GetBoolVariable(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BoolVariableState, opts ...pulumi.ResourceOption) (*BoolVariable, error) {
var resource BoolVariable
err := ctx.ReadResource("azure:automation/boolVariable:BoolVariable", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BoolVariable resources.
type boolVariableState struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description *string `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted *bool `pulumi:"encrypted"`
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a `boolean`.
Value *bool `pulumi:"value"`
}
type BoolVariableState struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// The description of the Automation Variable.
Description pulumi.StringPtrInput
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted pulumi.BoolPtrInput
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The value of the Automation Variable as a `boolean`.
Value pulumi.BoolPtrInput
}
func (BoolVariableState) ElementType() reflect.Type {
return reflect.TypeOf((*boolVariableState)(nil)).Elem()
}
type boolVariableArgs struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The description of the Automation Variable.
Description *string `pulumi:"description"`
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted *bool `pulumi:"encrypted"`
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The value of the Automation Variable as a `boolean`.
Value *bool `pulumi:"value"`
}
// The set of arguments for constructing a BoolVariable resource.
type BoolVariableArgs struct {
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The description of the Automation Variable.
Description pulumi.StringPtrInput
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
Encrypted pulumi.BoolPtrInput
// The name of the Automation Variable. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The value of the Automation Variable as a `boolean`.
Value pulumi.BoolPtrInput
}
func (BoolVariableArgs) ElementType() reflect.Type {
return reflect.TypeOf((*boolVariableArgs)(nil)).Elem()
}
type BoolVariableInput interface {
pulumi.Input
ToBoolVariableOutput() BoolVariableOutput
ToBoolVariableOutputWithContext(ctx context.Context) BoolVariableOutput
}
func (*BoolVariable) ElementType() reflect.Type {
return reflect.TypeOf((**BoolVariable)(nil)).Elem()
}
func (i *BoolVariable) ToBoolVariableOutput() BoolVariableOutput {
return i.ToBoolVariableOutputWithContext(context.Background())
}
func (i *BoolVariable) ToBoolVariableOutputWithContext(ctx context.Context) BoolVariableOutput {
return pulumi.ToOutputWithContext(ctx, i).(BoolVariableOutput)
}
// BoolVariableArrayInput is an input type that accepts BoolVariableArray and BoolVariableArrayOutput values.
// You can construct a concrete instance of `BoolVariableArrayInput` via:
//
// BoolVariableArray{ BoolVariableArgs{...} }
type BoolVariableArrayInput interface {
pulumi.Input
ToBoolVariableArrayOutput() BoolVariableArrayOutput
ToBoolVariableArrayOutputWithContext(context.Context) BoolVariableArrayOutput
}
type BoolVariableArray []BoolVariableInput
func (BoolVariableArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BoolVariable)(nil)).Elem()
}
func (i BoolVariableArray) ToBoolVariableArrayOutput() BoolVariableArrayOutput {
return i.ToBoolVariableArrayOutputWithContext(context.Background())
}
func (i BoolVariableArray) ToBoolVariableArrayOutputWithContext(ctx context.Context) BoolVariableArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BoolVariableArrayOutput)
}
// BoolVariableMapInput is an input type that accepts BoolVariableMap and BoolVariableMapOutput values.
// You can construct a concrete instance of `BoolVariableMapInput` via:
//
// BoolVariableMap{ "key": BoolVariableArgs{...} }
type BoolVariableMapInput interface {
pulumi.Input
ToBoolVariableMapOutput() BoolVariableMapOutput
ToBoolVariableMapOutputWithContext(context.Context) BoolVariableMapOutput
}
type BoolVariableMap map[string]BoolVariableInput
func (BoolVariableMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BoolVariable)(nil)).Elem()
}
func (i BoolVariableMap) ToBoolVariableMapOutput() BoolVariableMapOutput {
return i.ToBoolVariableMapOutputWithContext(context.Background())
}
func (i BoolVariableMap) ToBoolVariableMapOutputWithContext(ctx context.Context) BoolVariableMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BoolVariableMapOutput)
}
type BoolVariableOutput struct{ *pulumi.OutputState }
func (BoolVariableOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BoolVariable)(nil)).Elem()
}
func (o BoolVariableOutput) ToBoolVariableOutput() BoolVariableOutput {
return o
}
func (o BoolVariableOutput) ToBoolVariableOutputWithContext(ctx context.Context) BoolVariableOutput {
return o
}
// The name of the automation account in which the Variable is created. Changing this forces a new resource to be created.
func (o BoolVariableOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *BoolVariable) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The description of the Automation Variable.
func (o BoolVariableOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *BoolVariable) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies if the Automation Variable is encrypted. Defaults to `false`.
func (o BoolVariableOutput) Encrypted() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *BoolVariable) pulumi.BoolPtrOutput { return v.Encrypted }).(pulumi.BoolPtrOutput)
}
// The name of the Automation Variable. Changing this forces a new resource to be created.
func (o BoolVariableOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *BoolVariable) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which to create the Automation Variable. Changing this forces a new resource to be created.
func (o BoolVariableOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *BoolVariable) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The value of the Automation Variable as a `boolean`.
func (o BoolVariableOutput) Value() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *BoolVariable) pulumi.BoolPtrOutput { return v.Value }).(pulumi.BoolPtrOutput)
}
type BoolVariableArrayOutput struct{ *pulumi.OutputState }
func (BoolVariableArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BoolVariable)(nil)).Elem()
}
func (o BoolVariableArrayOutput) ToBoolVariableArrayOutput() BoolVariableArrayOutput {
return o
}
func (o BoolVariableArrayOutput) ToBoolVariableArrayOutputWithContext(ctx context.Context) BoolVariableArrayOutput {
return o
}
func (o BoolVariableArrayOutput) Index(i pulumi.IntInput) BoolVariableOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BoolVariable {
return vs[0].([]*BoolVariable)[vs[1].(int)]
}).(BoolVariableOutput)
}
type BoolVariableMapOutput struct{ *pulumi.OutputState }
func (BoolVariableMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BoolVariable)(nil)).Elem()
}
func (o BoolVariableMapOutput) ToBoolVariableMapOutput() BoolVariableMapOutput {
return o
}
func (o BoolVariableMapOutput) ToBoolVariableMapOutputWithContext(ctx context.Context) BoolVariableMapOutput {
return o
}
func (o BoolVariableMapOutput) MapIndex(k pulumi.StringInput) BoolVariableOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BoolVariable {
return vs[0].(map[string]*BoolVariable)[vs[1].(string)]
}).(BoolVariableOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BoolVariableInput)(nil)).Elem(), &BoolVariable{})
pulumi.RegisterInputType(reflect.TypeOf((*BoolVariableArrayInput)(nil)).Elem(), BoolVariableArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BoolVariableMapInput)(nil)).Elem(), BoolVariableMap{})
pulumi.RegisterOutputType(BoolVariableOutput{})
pulumi.RegisterOutputType(BoolVariableArrayOutput{})
pulumi.RegisterOutputType(BoolVariableMapOutput{})
}
| 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/automation/dscConfiguration.go | sdk/go/azure/automation/dscConfiguration.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Automation DSC Configuration.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "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
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("account1"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewDscConfiguration(ctx, "example", &automation.DscConfigurationArgs{
// Name: pulumi.String("test"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// Location: example.Location,
// ContentEmbedded: pulumi.String("configuration 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.Automation` - 2024-10-23
//
// ## Import
//
// Automation DSC Configuration's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/dscConfiguration:DscConfiguration configuration1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/configurations/configuration1
// ```
type DscConfiguration struct {
pulumi.CustomResourceState
// The name of the automation account in which the DSC Configuration is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// The PowerShell DSC Configuration script.
ContentEmbedded pulumi.StringOutput `pulumi:"contentEmbedded"`
// Description to go with DSC Configuration.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Must be the same location as the Automation Account. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Verbose log option.
LogVerbose pulumi.BoolPtrOutput `pulumi:"logVerbose"`
// Specifies the name of the DSC Configuration. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group in which the DSC Configuration is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
State pulumi.StringOutput `pulumi:"state"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewDscConfiguration registers a new resource with the given unique name, arguments, and options.
func NewDscConfiguration(ctx *pulumi.Context,
name string, args *DscConfigurationArgs, opts ...pulumi.ResourceOption) (*DscConfiguration, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.ContentEmbedded == nil {
return nil, errors.New("invalid value for required argument 'ContentEmbedded'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource DscConfiguration
err := ctx.RegisterResource("azure:automation/dscConfiguration:DscConfiguration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDscConfiguration gets an existing DscConfiguration 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 GetDscConfiguration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DscConfigurationState, opts ...pulumi.ResourceOption) (*DscConfiguration, error) {
var resource DscConfiguration
err := ctx.ReadResource("azure:automation/dscConfiguration:DscConfiguration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DscConfiguration resources.
type dscConfigurationState struct {
// The name of the automation account in which the DSC Configuration is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// The PowerShell DSC Configuration script.
ContentEmbedded *string `pulumi:"contentEmbedded"`
// Description to go with DSC Configuration.
Description *string `pulumi:"description"`
// Must be the same location as the Automation Account. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Verbose log option.
LogVerbose *bool `pulumi:"logVerbose"`
// Specifies the name of the DSC Configuration. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the DSC Configuration is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
State *string `pulumi:"state"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type DscConfigurationState struct {
// The name of the automation account in which the DSC Configuration is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// The PowerShell DSC Configuration script.
ContentEmbedded pulumi.StringPtrInput
// Description to go with DSC Configuration.
Description pulumi.StringPtrInput
// Must be the same location as the Automation Account. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Verbose log option.
LogVerbose pulumi.BoolPtrInput
// Specifies the name of the DSC Configuration. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the DSC Configuration is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
State pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (DscConfigurationState) ElementType() reflect.Type {
return reflect.TypeOf((*dscConfigurationState)(nil)).Elem()
}
type dscConfigurationArgs struct {
// The name of the automation account in which the DSC Configuration is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The PowerShell DSC Configuration script.
ContentEmbedded string `pulumi:"contentEmbedded"`
// Description to go with DSC Configuration.
Description *string `pulumi:"description"`
// Must be the same location as the Automation Account. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Verbose log option.
LogVerbose *bool `pulumi:"logVerbose"`
// Specifies the name of the DSC Configuration. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the DSC Configuration is 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"`
}
// The set of arguments for constructing a DscConfiguration resource.
type DscConfigurationArgs struct {
// The name of the automation account in which the DSC Configuration is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The PowerShell DSC Configuration script.
ContentEmbedded pulumi.StringInput
// Description to go with DSC Configuration.
Description pulumi.StringPtrInput
// Must be the same location as the Automation Account. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Verbose log option.
LogVerbose pulumi.BoolPtrInput
// Specifies the name of the DSC Configuration. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the DSC Configuration is 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
}
func (DscConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*dscConfigurationArgs)(nil)).Elem()
}
type DscConfigurationInput interface {
pulumi.Input
ToDscConfigurationOutput() DscConfigurationOutput
ToDscConfigurationOutputWithContext(ctx context.Context) DscConfigurationOutput
}
func (*DscConfiguration) ElementType() reflect.Type {
return reflect.TypeOf((**DscConfiguration)(nil)).Elem()
}
func (i *DscConfiguration) ToDscConfigurationOutput() DscConfigurationOutput {
return i.ToDscConfigurationOutputWithContext(context.Background())
}
func (i *DscConfiguration) ToDscConfigurationOutputWithContext(ctx context.Context) DscConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(DscConfigurationOutput)
}
// DscConfigurationArrayInput is an input type that accepts DscConfigurationArray and DscConfigurationArrayOutput values.
// You can construct a concrete instance of `DscConfigurationArrayInput` via:
//
// DscConfigurationArray{ DscConfigurationArgs{...} }
type DscConfigurationArrayInput interface {
pulumi.Input
ToDscConfigurationArrayOutput() DscConfigurationArrayOutput
ToDscConfigurationArrayOutputWithContext(context.Context) DscConfigurationArrayOutput
}
type DscConfigurationArray []DscConfigurationInput
func (DscConfigurationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DscConfiguration)(nil)).Elem()
}
func (i DscConfigurationArray) ToDscConfigurationArrayOutput() DscConfigurationArrayOutput {
return i.ToDscConfigurationArrayOutputWithContext(context.Background())
}
func (i DscConfigurationArray) ToDscConfigurationArrayOutputWithContext(ctx context.Context) DscConfigurationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DscConfigurationArrayOutput)
}
// DscConfigurationMapInput is an input type that accepts DscConfigurationMap and DscConfigurationMapOutput values.
// You can construct a concrete instance of `DscConfigurationMapInput` via:
//
// DscConfigurationMap{ "key": DscConfigurationArgs{...} }
type DscConfigurationMapInput interface {
pulumi.Input
ToDscConfigurationMapOutput() DscConfigurationMapOutput
ToDscConfigurationMapOutputWithContext(context.Context) DscConfigurationMapOutput
}
type DscConfigurationMap map[string]DscConfigurationInput
func (DscConfigurationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DscConfiguration)(nil)).Elem()
}
func (i DscConfigurationMap) ToDscConfigurationMapOutput() DscConfigurationMapOutput {
return i.ToDscConfigurationMapOutputWithContext(context.Background())
}
func (i DscConfigurationMap) ToDscConfigurationMapOutputWithContext(ctx context.Context) DscConfigurationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DscConfigurationMapOutput)
}
type DscConfigurationOutput struct{ *pulumi.OutputState }
func (DscConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DscConfiguration)(nil)).Elem()
}
func (o DscConfigurationOutput) ToDscConfigurationOutput() DscConfigurationOutput {
return o
}
func (o DscConfigurationOutput) ToDscConfigurationOutputWithContext(ctx context.Context) DscConfigurationOutput {
return o
}
// The name of the automation account in which the DSC Configuration is created. Changing this forces a new resource to be created.
func (o DscConfigurationOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *DscConfiguration) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The PowerShell DSC Configuration script.
func (o DscConfigurationOutput) ContentEmbedded() pulumi.StringOutput {
return o.ApplyT(func(v *DscConfiguration) pulumi.StringOutput { return v.ContentEmbedded }).(pulumi.StringOutput)
}
// Description to go with DSC Configuration.
func (o DscConfigurationOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DscConfiguration) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Must be the same location as the Automation Account. Changing this forces a new resource to be created.
func (o DscConfigurationOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *DscConfiguration) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Verbose log option.
func (o DscConfigurationOutput) LogVerbose() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *DscConfiguration) pulumi.BoolPtrOutput { return v.LogVerbose }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the DSC Configuration. Changing this forces a new resource to be created.
func (o DscConfigurationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DscConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which the DSC Configuration is created. Changing this forces a new resource to be created.
func (o DscConfigurationOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *DscConfiguration) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func (o DscConfigurationOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v *DscConfiguration) pulumi.StringOutput { return v.State }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o DscConfigurationOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *DscConfiguration) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type DscConfigurationArrayOutput struct{ *pulumi.OutputState }
func (DscConfigurationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DscConfiguration)(nil)).Elem()
}
func (o DscConfigurationArrayOutput) ToDscConfigurationArrayOutput() DscConfigurationArrayOutput {
return o
}
func (o DscConfigurationArrayOutput) ToDscConfigurationArrayOutputWithContext(ctx context.Context) DscConfigurationArrayOutput {
return o
}
func (o DscConfigurationArrayOutput) Index(i pulumi.IntInput) DscConfigurationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DscConfiguration {
return vs[0].([]*DscConfiguration)[vs[1].(int)]
}).(DscConfigurationOutput)
}
type DscConfigurationMapOutput struct{ *pulumi.OutputState }
func (DscConfigurationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DscConfiguration)(nil)).Elem()
}
func (o DscConfigurationMapOutput) ToDscConfigurationMapOutput() DscConfigurationMapOutput {
return o
}
func (o DscConfigurationMapOutput) ToDscConfigurationMapOutputWithContext(ctx context.Context) DscConfigurationMapOutput {
return o
}
func (o DscConfigurationMapOutput) MapIndex(k pulumi.StringInput) DscConfigurationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DscConfiguration {
return vs[0].(map[string]*DscConfiguration)[vs[1].(string)]
}).(DscConfigurationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DscConfigurationInput)(nil)).Elem(), &DscConfiguration{})
pulumi.RegisterInputType(reflect.TypeOf((*DscConfigurationArrayInput)(nil)).Elem(), DscConfigurationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DscConfigurationMapInput)(nil)).Elem(), DscConfigurationMap{})
pulumi.RegisterOutputType(DscConfigurationOutput{})
pulumi.RegisterOutputType(DscConfigurationArrayOutput{})
pulumi.RegisterOutputType(DscConfigurationMapOutput{})
}
| 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/automation/python3Package.go | sdk/go/azure/automation/python3Package.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 automation
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Automation Python3 Package.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("rg-example"),
// Location: pulumi.String("%[2]s"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
// Name: pulumi.String("accexample"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// SkuName: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// _, err = automation.NewPython3Package(ctx, "example", &automation.Python3PackageArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// AutomationAccountName: exampleAccount.Name,
// ContentUri: pulumi.String("https://pypi.org/packages/source/r/requests/requests-2.31.0.tar.gz"),
// ContentVersion: pulumi.String("2.31.0"),
// HashAlgorithm: pulumi.String("sha256"),
// HashValue: pulumi.String("942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"),
// Tags: pulumi.StringMap{
// "key": pulumi.String("foo"),
// },
// })
// 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.Automation` - 2024-10-23
//
// ## Import
//
// Automation Python3 Packages can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:automation/python3Package:Python3Package example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/python3Packages/pkg
// ```
type Python3Package struct {
pulumi.CustomResourceState
// The name of the automation account in which the Python3 Package is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringOutput `pulumi:"automationAccountName"`
// The URL of the python package. Changing this forces a new Automation Python3 Package to be created.
ContentUri pulumi.StringOutput `pulumi:"contentUri"`
// Specify the version of the python3 package. The value should meet the system.version class format like `1.1.1`. Changing this forces a new Automation Python3 Package to be created.
ContentVersion pulumi.StringPtrOutput `pulumi:"contentVersion"`
// Specify the hash algorithm used to hash the content of the python3 package. Changing this forces a new Automation Python3 Package to be created.
HashAlgorithm pulumi.StringPtrOutput `pulumi:"hashAlgorithm"`
// Specity the hash value of the content. Changing this forces a new Automation Python3 Package to be created.
HashValue pulumi.StringPtrOutput `pulumi:"hashValue"`
// The name which should be used for this Automation Python3 Package. Changing this forces a new Automation Python3 Package to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group in which the Python3 Package is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Automation Python3 Package.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewPython3Package registers a new resource with the given unique name, arguments, and options.
func NewPython3Package(ctx *pulumi.Context,
name string, args *Python3PackageArgs, opts ...pulumi.ResourceOption) (*Python3Package, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutomationAccountName == nil {
return nil, errors.New("invalid value for required argument 'AutomationAccountName'")
}
if args.ContentUri == nil {
return nil, errors.New("invalid value for required argument 'ContentUri'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Python3Package
err := ctx.RegisterResource("azure:automation/python3Package:Python3Package", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPython3Package gets an existing Python3Package 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 GetPython3Package(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *Python3PackageState, opts ...pulumi.ResourceOption) (*Python3Package, error) {
var resource Python3Package
err := ctx.ReadResource("azure:automation/python3Package:Python3Package", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Python3Package resources.
type python3PackageState struct {
// The name of the automation account in which the Python3 Package is created. Changing this forces a new resource to be created.
AutomationAccountName *string `pulumi:"automationAccountName"`
// The URL of the python package. Changing this forces a new Automation Python3 Package to be created.
ContentUri *string `pulumi:"contentUri"`
// Specify the version of the python3 package. The value should meet the system.version class format like `1.1.1`. Changing this forces a new Automation Python3 Package to be created.
ContentVersion *string `pulumi:"contentVersion"`
// Specify the hash algorithm used to hash the content of the python3 package. Changing this forces a new Automation Python3 Package to be created.
HashAlgorithm *string `pulumi:"hashAlgorithm"`
// Specity the hash value of the content. Changing this forces a new Automation Python3 Package to be created.
HashValue *string `pulumi:"hashValue"`
// The name which should be used for this Automation Python3 Package. Changing this forces a new Automation Python3 Package to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Python3 Package is created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Automation Python3 Package.
Tags map[string]string `pulumi:"tags"`
}
type Python3PackageState struct {
// The name of the automation account in which the Python3 Package is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringPtrInput
// The URL of the python package. Changing this forces a new Automation Python3 Package to be created.
ContentUri pulumi.StringPtrInput
// Specify the version of the python3 package. The value should meet the system.version class format like `1.1.1`. Changing this forces a new Automation Python3 Package to be created.
ContentVersion pulumi.StringPtrInput
// Specify the hash algorithm used to hash the content of the python3 package. Changing this forces a new Automation Python3 Package to be created.
HashAlgorithm pulumi.StringPtrInput
// Specity the hash value of the content. Changing this forces a new Automation Python3 Package to be created.
HashValue pulumi.StringPtrInput
// The name which should be used for this Automation Python3 Package. Changing this forces a new Automation Python3 Package to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Python3 Package is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Automation Python3 Package.
Tags pulumi.StringMapInput
}
func (Python3PackageState) ElementType() reflect.Type {
return reflect.TypeOf((*python3PackageState)(nil)).Elem()
}
type python3PackageArgs struct {
// The name of the automation account in which the Python3 Package is created. Changing this forces a new resource to be created.
AutomationAccountName string `pulumi:"automationAccountName"`
// The URL of the python package. Changing this forces a new Automation Python3 Package to be created.
ContentUri string `pulumi:"contentUri"`
// Specify the version of the python3 package. The value should meet the system.version class format like `1.1.1`. Changing this forces a new Automation Python3 Package to be created.
ContentVersion *string `pulumi:"contentVersion"`
// Specify the hash algorithm used to hash the content of the python3 package. Changing this forces a new Automation Python3 Package to be created.
HashAlgorithm *string `pulumi:"hashAlgorithm"`
// Specity the hash value of the content. Changing this forces a new Automation Python3 Package to be created.
HashValue *string `pulumi:"hashValue"`
// The name which should be used for this Automation Python3 Package. Changing this forces a new Automation Python3 Package to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the Python3 Package is created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Automation Python3 Package.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Python3Package resource.
type Python3PackageArgs struct {
// The name of the automation account in which the Python3 Package is created. Changing this forces a new resource to be created.
AutomationAccountName pulumi.StringInput
// The URL of the python package. Changing this forces a new Automation Python3 Package to be created.
ContentUri pulumi.StringInput
// Specify the version of the python3 package. The value should meet the system.version class format like `1.1.1`. Changing this forces a new Automation Python3 Package to be created.
ContentVersion pulumi.StringPtrInput
// Specify the hash algorithm used to hash the content of the python3 package. Changing this forces a new Automation Python3 Package to be created.
HashAlgorithm pulumi.StringPtrInput
// Specity the hash value of the content. Changing this forces a new Automation Python3 Package to be created.
HashValue pulumi.StringPtrInput
// The name which should be used for this Automation Python3 Package. Changing this forces a new Automation Python3 Package to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the Python3 Package is created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Automation Python3 Package.
Tags pulumi.StringMapInput
}
func (Python3PackageArgs) ElementType() reflect.Type {
return reflect.TypeOf((*python3PackageArgs)(nil)).Elem()
}
type Python3PackageInput interface {
pulumi.Input
ToPython3PackageOutput() Python3PackageOutput
ToPython3PackageOutputWithContext(ctx context.Context) Python3PackageOutput
}
func (*Python3Package) ElementType() reflect.Type {
return reflect.TypeOf((**Python3Package)(nil)).Elem()
}
func (i *Python3Package) ToPython3PackageOutput() Python3PackageOutput {
return i.ToPython3PackageOutputWithContext(context.Background())
}
func (i *Python3Package) ToPython3PackageOutputWithContext(ctx context.Context) Python3PackageOutput {
return pulumi.ToOutputWithContext(ctx, i).(Python3PackageOutput)
}
// Python3PackageArrayInput is an input type that accepts Python3PackageArray and Python3PackageArrayOutput values.
// You can construct a concrete instance of `Python3PackageArrayInput` via:
//
// Python3PackageArray{ Python3PackageArgs{...} }
type Python3PackageArrayInput interface {
pulumi.Input
ToPython3PackageArrayOutput() Python3PackageArrayOutput
ToPython3PackageArrayOutputWithContext(context.Context) Python3PackageArrayOutput
}
type Python3PackageArray []Python3PackageInput
func (Python3PackageArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Python3Package)(nil)).Elem()
}
func (i Python3PackageArray) ToPython3PackageArrayOutput() Python3PackageArrayOutput {
return i.ToPython3PackageArrayOutputWithContext(context.Background())
}
func (i Python3PackageArray) ToPython3PackageArrayOutputWithContext(ctx context.Context) Python3PackageArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(Python3PackageArrayOutput)
}
// Python3PackageMapInput is an input type that accepts Python3PackageMap and Python3PackageMapOutput values.
// You can construct a concrete instance of `Python3PackageMapInput` via:
//
// Python3PackageMap{ "key": Python3PackageArgs{...} }
type Python3PackageMapInput interface {
pulumi.Input
ToPython3PackageMapOutput() Python3PackageMapOutput
ToPython3PackageMapOutputWithContext(context.Context) Python3PackageMapOutput
}
type Python3PackageMap map[string]Python3PackageInput
func (Python3PackageMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Python3Package)(nil)).Elem()
}
func (i Python3PackageMap) ToPython3PackageMapOutput() Python3PackageMapOutput {
return i.ToPython3PackageMapOutputWithContext(context.Background())
}
func (i Python3PackageMap) ToPython3PackageMapOutputWithContext(ctx context.Context) Python3PackageMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(Python3PackageMapOutput)
}
type Python3PackageOutput struct{ *pulumi.OutputState }
func (Python3PackageOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Python3Package)(nil)).Elem()
}
func (o Python3PackageOutput) ToPython3PackageOutput() Python3PackageOutput {
return o
}
func (o Python3PackageOutput) ToPython3PackageOutputWithContext(ctx context.Context) Python3PackageOutput {
return o
}
// The name of the automation account in which the Python3 Package is created. Changing this forces a new resource to be created.
func (o Python3PackageOutput) AutomationAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *Python3Package) pulumi.StringOutput { return v.AutomationAccountName }).(pulumi.StringOutput)
}
// The URL of the python package. Changing this forces a new Automation Python3 Package to be created.
func (o Python3PackageOutput) ContentUri() pulumi.StringOutput {
return o.ApplyT(func(v *Python3Package) pulumi.StringOutput { return v.ContentUri }).(pulumi.StringOutput)
}
// Specify the version of the python3 package. The value should meet the system.version class format like `1.1.1`. Changing this forces a new Automation Python3 Package to be created.
func (o Python3PackageOutput) ContentVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Python3Package) pulumi.StringPtrOutput { return v.ContentVersion }).(pulumi.StringPtrOutput)
}
// Specify the hash algorithm used to hash the content of the python3 package. Changing this forces a new Automation Python3 Package to be created.
func (o Python3PackageOutput) HashAlgorithm() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Python3Package) pulumi.StringPtrOutput { return v.HashAlgorithm }).(pulumi.StringPtrOutput)
}
// Specity the hash value of the content. Changing this forces a new Automation Python3 Package to be created.
func (o Python3PackageOutput) HashValue() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Python3Package) pulumi.StringPtrOutput { return v.HashValue }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Automation Python3 Package. Changing this forces a new Automation Python3 Package to be created.
func (o Python3PackageOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Python3Package) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which the Python3 Package is created. Changing this forces a new resource to be created.
func (o Python3PackageOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Python3Package) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Automation Python3 Package.
func (o Python3PackageOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Python3Package) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type Python3PackageArrayOutput struct{ *pulumi.OutputState }
func (Python3PackageArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Python3Package)(nil)).Elem()
}
func (o Python3PackageArrayOutput) ToPython3PackageArrayOutput() Python3PackageArrayOutput {
return o
}
func (o Python3PackageArrayOutput) ToPython3PackageArrayOutputWithContext(ctx context.Context) Python3PackageArrayOutput {
return o
}
func (o Python3PackageArrayOutput) Index(i pulumi.IntInput) Python3PackageOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Python3Package {
return vs[0].([]*Python3Package)[vs[1].(int)]
}).(Python3PackageOutput)
}
type Python3PackageMapOutput struct{ *pulumi.OutputState }
func (Python3PackageMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Python3Package)(nil)).Elem()
}
func (o Python3PackageMapOutput) ToPython3PackageMapOutput() Python3PackageMapOutput {
return o
}
func (o Python3PackageMapOutput) ToPython3PackageMapOutputWithContext(ctx context.Context) Python3PackageMapOutput {
return o
}
func (o Python3PackageMapOutput) MapIndex(k pulumi.StringInput) Python3PackageOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Python3Package {
return vs[0].(map[string]*Python3Package)[vs[1].(string)]
}).(Python3PackageOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*Python3PackageInput)(nil)).Elem(), &Python3Package{})
pulumi.RegisterInputType(reflect.TypeOf((*Python3PackageArrayInput)(nil)).Elem(), Python3PackageArray{})
pulumi.RegisterInputType(reflect.TypeOf((*Python3PackageMapInput)(nil)).Elem(), Python3PackageMap{})
pulumi.RegisterOutputType(Python3PackageOutput{})
pulumi.RegisterOutputType(Python3PackageArrayOutput{})
pulumi.RegisterOutputType(Python3PackageMapOutput{})
}
| 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/networkfunction/init.go | sdk/go/azure/networkfunction/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 networkfunction
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:networkfunction/azureTrafficCollector:AzureTrafficCollector":
r = &AzureTrafficCollector{}
case "azure:networkfunction/collectorPolicy:CollectorPolicy":
r = &CollectorPolicy{}
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",
"networkfunction/azureTrafficCollector",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"networkfunction/collectorPolicy",
&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/networkfunction/pulumiTypes.go | sdk/go/azure/networkfunction/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 networkfunction
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 CollectorPolicyIpfxEmission struct {
// A list of emission destination types. The only possible value is `AzureMonitor`. Changing this forces a new Network Function Collector Policy to be created.
//
// > **Note:** Please use the `monitoring.DiagnosticSetting` resource to forward logs to a Log Analytics Workspace.
DestinationTypes string `pulumi:"destinationTypes"`
}
// CollectorPolicyIpfxEmissionInput is an input type that accepts CollectorPolicyIpfxEmissionArgs and CollectorPolicyIpfxEmissionOutput values.
// You can construct a concrete instance of `CollectorPolicyIpfxEmissionInput` via:
//
// CollectorPolicyIpfxEmissionArgs{...}
type CollectorPolicyIpfxEmissionInput interface {
pulumi.Input
ToCollectorPolicyIpfxEmissionOutput() CollectorPolicyIpfxEmissionOutput
ToCollectorPolicyIpfxEmissionOutputWithContext(context.Context) CollectorPolicyIpfxEmissionOutput
}
type CollectorPolicyIpfxEmissionArgs struct {
// A list of emission destination types. The only possible value is `AzureMonitor`. Changing this forces a new Network Function Collector Policy to be created.
//
// > **Note:** Please use the `monitoring.DiagnosticSetting` resource to forward logs to a Log Analytics Workspace.
DestinationTypes pulumi.StringInput `pulumi:"destinationTypes"`
}
func (CollectorPolicyIpfxEmissionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*CollectorPolicyIpfxEmission)(nil)).Elem()
}
func (i CollectorPolicyIpfxEmissionArgs) ToCollectorPolicyIpfxEmissionOutput() CollectorPolicyIpfxEmissionOutput {
return i.ToCollectorPolicyIpfxEmissionOutputWithContext(context.Background())
}
func (i CollectorPolicyIpfxEmissionArgs) ToCollectorPolicyIpfxEmissionOutputWithContext(ctx context.Context) CollectorPolicyIpfxEmissionOutput {
return pulumi.ToOutputWithContext(ctx, i).(CollectorPolicyIpfxEmissionOutput)
}
func (i CollectorPolicyIpfxEmissionArgs) ToCollectorPolicyIpfxEmissionPtrOutput() CollectorPolicyIpfxEmissionPtrOutput {
return i.ToCollectorPolicyIpfxEmissionPtrOutputWithContext(context.Background())
}
func (i CollectorPolicyIpfxEmissionArgs) ToCollectorPolicyIpfxEmissionPtrOutputWithContext(ctx context.Context) CollectorPolicyIpfxEmissionPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(CollectorPolicyIpfxEmissionOutput).ToCollectorPolicyIpfxEmissionPtrOutputWithContext(ctx)
}
// CollectorPolicyIpfxEmissionPtrInput is an input type that accepts CollectorPolicyIpfxEmissionArgs, CollectorPolicyIpfxEmissionPtr and CollectorPolicyIpfxEmissionPtrOutput values.
// You can construct a concrete instance of `CollectorPolicyIpfxEmissionPtrInput` via:
//
// CollectorPolicyIpfxEmissionArgs{...}
//
// or:
//
// nil
type CollectorPolicyIpfxEmissionPtrInput interface {
pulumi.Input
ToCollectorPolicyIpfxEmissionPtrOutput() CollectorPolicyIpfxEmissionPtrOutput
ToCollectorPolicyIpfxEmissionPtrOutputWithContext(context.Context) CollectorPolicyIpfxEmissionPtrOutput
}
type collectorPolicyIpfxEmissionPtrType CollectorPolicyIpfxEmissionArgs
func CollectorPolicyIpfxEmissionPtr(v *CollectorPolicyIpfxEmissionArgs) CollectorPolicyIpfxEmissionPtrInput {
return (*collectorPolicyIpfxEmissionPtrType)(v)
}
func (*collectorPolicyIpfxEmissionPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**CollectorPolicyIpfxEmission)(nil)).Elem()
}
func (i *collectorPolicyIpfxEmissionPtrType) ToCollectorPolicyIpfxEmissionPtrOutput() CollectorPolicyIpfxEmissionPtrOutput {
return i.ToCollectorPolicyIpfxEmissionPtrOutputWithContext(context.Background())
}
func (i *collectorPolicyIpfxEmissionPtrType) ToCollectorPolicyIpfxEmissionPtrOutputWithContext(ctx context.Context) CollectorPolicyIpfxEmissionPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(CollectorPolicyIpfxEmissionPtrOutput)
}
type CollectorPolicyIpfxEmissionOutput struct{ *pulumi.OutputState }
func (CollectorPolicyIpfxEmissionOutput) ElementType() reflect.Type {
return reflect.TypeOf((*CollectorPolicyIpfxEmission)(nil)).Elem()
}
func (o CollectorPolicyIpfxEmissionOutput) ToCollectorPolicyIpfxEmissionOutput() CollectorPolicyIpfxEmissionOutput {
return o
}
func (o CollectorPolicyIpfxEmissionOutput) ToCollectorPolicyIpfxEmissionOutputWithContext(ctx context.Context) CollectorPolicyIpfxEmissionOutput {
return o
}
func (o CollectorPolicyIpfxEmissionOutput) ToCollectorPolicyIpfxEmissionPtrOutput() CollectorPolicyIpfxEmissionPtrOutput {
return o.ToCollectorPolicyIpfxEmissionPtrOutputWithContext(context.Background())
}
func (o CollectorPolicyIpfxEmissionOutput) ToCollectorPolicyIpfxEmissionPtrOutputWithContext(ctx context.Context) CollectorPolicyIpfxEmissionPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v CollectorPolicyIpfxEmission) *CollectorPolicyIpfxEmission {
return &v
}).(CollectorPolicyIpfxEmissionPtrOutput)
}
// A list of emission destination types. The only possible value is `AzureMonitor`. Changing this forces a new Network Function Collector Policy to be created.
//
// > **Note:** Please use the `monitoring.DiagnosticSetting` resource to forward logs to a Log Analytics Workspace.
func (o CollectorPolicyIpfxEmissionOutput) DestinationTypes() pulumi.StringOutput {
return o.ApplyT(func(v CollectorPolicyIpfxEmission) string { return v.DestinationTypes }).(pulumi.StringOutput)
}
type CollectorPolicyIpfxEmissionPtrOutput struct{ *pulumi.OutputState }
func (CollectorPolicyIpfxEmissionPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CollectorPolicyIpfxEmission)(nil)).Elem()
}
func (o CollectorPolicyIpfxEmissionPtrOutput) ToCollectorPolicyIpfxEmissionPtrOutput() CollectorPolicyIpfxEmissionPtrOutput {
return o
}
func (o CollectorPolicyIpfxEmissionPtrOutput) ToCollectorPolicyIpfxEmissionPtrOutputWithContext(ctx context.Context) CollectorPolicyIpfxEmissionPtrOutput {
return o
}
func (o CollectorPolicyIpfxEmissionPtrOutput) Elem() CollectorPolicyIpfxEmissionOutput {
return o.ApplyT(func(v *CollectorPolicyIpfxEmission) CollectorPolicyIpfxEmission {
if v != nil {
return *v
}
var ret CollectorPolicyIpfxEmission
return ret
}).(CollectorPolicyIpfxEmissionOutput)
}
// A list of emission destination types. The only possible value is `AzureMonitor`. Changing this forces a new Network Function Collector Policy to be created.
//
// > **Note:** Please use the `monitoring.DiagnosticSetting` resource to forward logs to a Log Analytics Workspace.
func (o CollectorPolicyIpfxEmissionPtrOutput) DestinationTypes() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CollectorPolicyIpfxEmission) *string {
if v == nil {
return nil
}
return &v.DestinationTypes
}).(pulumi.StringPtrOutput)
}
type CollectorPolicyIpfxIngestion struct {
// A list of ingestion source resource IDs. Changing this forces a new Network Function Collector Policy to be created.
SourceResourceIds []string `pulumi:"sourceResourceIds"`
}
// CollectorPolicyIpfxIngestionInput is an input type that accepts CollectorPolicyIpfxIngestionArgs and CollectorPolicyIpfxIngestionOutput values.
// You can construct a concrete instance of `CollectorPolicyIpfxIngestionInput` via:
//
// CollectorPolicyIpfxIngestionArgs{...}
type CollectorPolicyIpfxIngestionInput interface {
pulumi.Input
ToCollectorPolicyIpfxIngestionOutput() CollectorPolicyIpfxIngestionOutput
ToCollectorPolicyIpfxIngestionOutputWithContext(context.Context) CollectorPolicyIpfxIngestionOutput
}
type CollectorPolicyIpfxIngestionArgs struct {
// A list of ingestion source resource IDs. Changing this forces a new Network Function Collector Policy to be created.
SourceResourceIds pulumi.StringArrayInput `pulumi:"sourceResourceIds"`
}
func (CollectorPolicyIpfxIngestionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*CollectorPolicyIpfxIngestion)(nil)).Elem()
}
func (i CollectorPolicyIpfxIngestionArgs) ToCollectorPolicyIpfxIngestionOutput() CollectorPolicyIpfxIngestionOutput {
return i.ToCollectorPolicyIpfxIngestionOutputWithContext(context.Background())
}
func (i CollectorPolicyIpfxIngestionArgs) ToCollectorPolicyIpfxIngestionOutputWithContext(ctx context.Context) CollectorPolicyIpfxIngestionOutput {
return pulumi.ToOutputWithContext(ctx, i).(CollectorPolicyIpfxIngestionOutput)
}
func (i CollectorPolicyIpfxIngestionArgs) ToCollectorPolicyIpfxIngestionPtrOutput() CollectorPolicyIpfxIngestionPtrOutput {
return i.ToCollectorPolicyIpfxIngestionPtrOutputWithContext(context.Background())
}
func (i CollectorPolicyIpfxIngestionArgs) ToCollectorPolicyIpfxIngestionPtrOutputWithContext(ctx context.Context) CollectorPolicyIpfxIngestionPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(CollectorPolicyIpfxIngestionOutput).ToCollectorPolicyIpfxIngestionPtrOutputWithContext(ctx)
}
// CollectorPolicyIpfxIngestionPtrInput is an input type that accepts CollectorPolicyIpfxIngestionArgs, CollectorPolicyIpfxIngestionPtr and CollectorPolicyIpfxIngestionPtrOutput values.
// You can construct a concrete instance of `CollectorPolicyIpfxIngestionPtrInput` via:
//
// CollectorPolicyIpfxIngestionArgs{...}
//
// or:
//
// nil
type CollectorPolicyIpfxIngestionPtrInput interface {
pulumi.Input
ToCollectorPolicyIpfxIngestionPtrOutput() CollectorPolicyIpfxIngestionPtrOutput
ToCollectorPolicyIpfxIngestionPtrOutputWithContext(context.Context) CollectorPolicyIpfxIngestionPtrOutput
}
type collectorPolicyIpfxIngestionPtrType CollectorPolicyIpfxIngestionArgs
func CollectorPolicyIpfxIngestionPtr(v *CollectorPolicyIpfxIngestionArgs) CollectorPolicyIpfxIngestionPtrInput {
return (*collectorPolicyIpfxIngestionPtrType)(v)
}
func (*collectorPolicyIpfxIngestionPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**CollectorPolicyIpfxIngestion)(nil)).Elem()
}
func (i *collectorPolicyIpfxIngestionPtrType) ToCollectorPolicyIpfxIngestionPtrOutput() CollectorPolicyIpfxIngestionPtrOutput {
return i.ToCollectorPolicyIpfxIngestionPtrOutputWithContext(context.Background())
}
func (i *collectorPolicyIpfxIngestionPtrType) ToCollectorPolicyIpfxIngestionPtrOutputWithContext(ctx context.Context) CollectorPolicyIpfxIngestionPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(CollectorPolicyIpfxIngestionPtrOutput)
}
type CollectorPolicyIpfxIngestionOutput struct{ *pulumi.OutputState }
func (CollectorPolicyIpfxIngestionOutput) ElementType() reflect.Type {
return reflect.TypeOf((*CollectorPolicyIpfxIngestion)(nil)).Elem()
}
func (o CollectorPolicyIpfxIngestionOutput) ToCollectorPolicyIpfxIngestionOutput() CollectorPolicyIpfxIngestionOutput {
return o
}
func (o CollectorPolicyIpfxIngestionOutput) ToCollectorPolicyIpfxIngestionOutputWithContext(ctx context.Context) CollectorPolicyIpfxIngestionOutput {
return o
}
func (o CollectorPolicyIpfxIngestionOutput) ToCollectorPolicyIpfxIngestionPtrOutput() CollectorPolicyIpfxIngestionPtrOutput {
return o.ToCollectorPolicyIpfxIngestionPtrOutputWithContext(context.Background())
}
func (o CollectorPolicyIpfxIngestionOutput) ToCollectorPolicyIpfxIngestionPtrOutputWithContext(ctx context.Context) CollectorPolicyIpfxIngestionPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v CollectorPolicyIpfxIngestion) *CollectorPolicyIpfxIngestion {
return &v
}).(CollectorPolicyIpfxIngestionPtrOutput)
}
// A list of ingestion source resource IDs. Changing this forces a new Network Function Collector Policy to be created.
func (o CollectorPolicyIpfxIngestionOutput) SourceResourceIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v CollectorPolicyIpfxIngestion) []string { return v.SourceResourceIds }).(pulumi.StringArrayOutput)
}
type CollectorPolicyIpfxIngestionPtrOutput struct{ *pulumi.OutputState }
func (CollectorPolicyIpfxIngestionPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CollectorPolicyIpfxIngestion)(nil)).Elem()
}
func (o CollectorPolicyIpfxIngestionPtrOutput) ToCollectorPolicyIpfxIngestionPtrOutput() CollectorPolicyIpfxIngestionPtrOutput {
return o
}
func (o CollectorPolicyIpfxIngestionPtrOutput) ToCollectorPolicyIpfxIngestionPtrOutputWithContext(ctx context.Context) CollectorPolicyIpfxIngestionPtrOutput {
return o
}
func (o CollectorPolicyIpfxIngestionPtrOutput) Elem() CollectorPolicyIpfxIngestionOutput {
return o.ApplyT(func(v *CollectorPolicyIpfxIngestion) CollectorPolicyIpfxIngestion {
if v != nil {
return *v
}
var ret CollectorPolicyIpfxIngestion
return ret
}).(CollectorPolicyIpfxIngestionOutput)
}
// A list of ingestion source resource IDs. Changing this forces a new Network Function Collector Policy to be created.
func (o CollectorPolicyIpfxIngestionPtrOutput) SourceResourceIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *CollectorPolicyIpfxIngestion) []string {
if v == nil {
return nil
}
return v.SourceResourceIds
}).(pulumi.StringArrayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CollectorPolicyIpfxEmissionInput)(nil)).Elem(), CollectorPolicyIpfxEmissionArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*CollectorPolicyIpfxEmissionPtrInput)(nil)).Elem(), CollectorPolicyIpfxEmissionArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*CollectorPolicyIpfxIngestionInput)(nil)).Elem(), CollectorPolicyIpfxIngestionArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*CollectorPolicyIpfxIngestionPtrInput)(nil)).Elem(), CollectorPolicyIpfxIngestionArgs{})
pulumi.RegisterOutputType(CollectorPolicyIpfxEmissionOutput{})
pulumi.RegisterOutputType(CollectorPolicyIpfxEmissionPtrOutput{})
pulumi.RegisterOutputType(CollectorPolicyIpfxIngestionOutput{})
pulumi.RegisterOutputType(CollectorPolicyIpfxIngestionPtrOutput{})
}
| 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/networkfunction/azureTrafficCollector.go | sdk/go/azure/networkfunction/azureTrafficCollector.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 networkfunction
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Network Function Azure Traffic Collector.
//
// ## 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/networkfunction"
// "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 US"),
// })
// if err != nil {
// return err
// }
// _, err = networkfunction.NewAzureTrafficCollector(ctx, "example", &networkfunction.AzureTrafficCollectorArgs{
// Name: pulumi.String("example-nfatc"),
// ResourceGroupName: example.Name,
// Location: pulumi.String("West US"),
// 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.NetworkFunction` - 2022-11-01
//
// ## Import
//
// Network Function Azure Traffic Collector can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:networkfunction/azureTrafficCollector:AzureTrafficCollector example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/azureTrafficCollector1
// ```
type AzureTrafficCollector struct {
pulumi.CustomResourceState
// The list of Resource IDs of collector policies.
CollectorPolicyIds pulumi.StringArrayOutput `pulumi:"collectorPolicyIds"`
// Specifies the Azure Region where the Network Function Azure Traffic Collector should exist. Changing this forces a new Network Function Azure Traffic Collector to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name which should be used for this Network Function Azure Traffic Collector. Changing this forces a new Network Function Azure Traffic Collector to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the name of the Resource Group where the Network Function Azure Traffic Collector should exist. Changing this forces a new Network Function Azure Traffic Collector to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Network Function Azure Traffic Collector.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The Resource ID of virtual hub.
VirtualHubIds pulumi.StringArrayOutput `pulumi:"virtualHubIds"`
}
// NewAzureTrafficCollector registers a new resource with the given unique name, arguments, and options.
func NewAzureTrafficCollector(ctx *pulumi.Context,
name string, args *AzureTrafficCollectorArgs, opts ...pulumi.ResourceOption) (*AzureTrafficCollector, 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 AzureTrafficCollector
err := ctx.RegisterResource("azure:networkfunction/azureTrafficCollector:AzureTrafficCollector", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAzureTrafficCollector gets an existing AzureTrafficCollector 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 GetAzureTrafficCollector(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AzureTrafficCollectorState, opts ...pulumi.ResourceOption) (*AzureTrafficCollector, error) {
var resource AzureTrafficCollector
err := ctx.ReadResource("azure:networkfunction/azureTrafficCollector:AzureTrafficCollector", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AzureTrafficCollector resources.
type azureTrafficCollectorState struct {
// The list of Resource IDs of collector policies.
CollectorPolicyIds []string `pulumi:"collectorPolicyIds"`
// Specifies the Azure Region where the Network Function Azure Traffic Collector should exist. Changing this forces a new Network Function Azure Traffic Collector to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Network Function Azure Traffic Collector. Changing this forces a new Network Function Azure Traffic Collector to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Resource Group where the Network Function Azure Traffic Collector should exist. Changing this forces a new Network Function Azure Traffic Collector to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Network Function Azure Traffic Collector.
Tags map[string]string `pulumi:"tags"`
// The Resource ID of virtual hub.
VirtualHubIds []string `pulumi:"virtualHubIds"`
}
type AzureTrafficCollectorState struct {
// The list of Resource IDs of collector policies.
CollectorPolicyIds pulumi.StringArrayInput
// Specifies the Azure Region where the Network Function Azure Traffic Collector should exist. Changing this forces a new Network Function Azure Traffic Collector to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Network Function Azure Traffic Collector. Changing this forces a new Network Function Azure Traffic Collector to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Resource Group where the Network Function Azure Traffic Collector should exist. Changing this forces a new Network Function Azure Traffic Collector to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Network Function Azure Traffic Collector.
Tags pulumi.StringMapInput
// The Resource ID of virtual hub.
VirtualHubIds pulumi.StringArrayInput
}
func (AzureTrafficCollectorState) ElementType() reflect.Type {
return reflect.TypeOf((*azureTrafficCollectorState)(nil)).Elem()
}
type azureTrafficCollectorArgs struct {
// Specifies the Azure Region where the Network Function Azure Traffic Collector should exist. Changing this forces a new Network Function Azure Traffic Collector to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Network Function Azure Traffic Collector. Changing this forces a new Network Function Azure Traffic Collector to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Resource Group where the Network Function Azure Traffic Collector should exist. Changing this forces a new Network Function Azure Traffic Collector to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Network Function Azure Traffic Collector.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a AzureTrafficCollector resource.
type AzureTrafficCollectorArgs struct {
// Specifies the Azure Region where the Network Function Azure Traffic Collector should exist. Changing this forces a new Network Function Azure Traffic Collector to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Network Function Azure Traffic Collector. Changing this forces a new Network Function Azure Traffic Collector to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Resource Group where the Network Function Azure Traffic Collector should exist. Changing this forces a new Network Function Azure Traffic Collector to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Network Function Azure Traffic Collector.
Tags pulumi.StringMapInput
}
func (AzureTrafficCollectorArgs) ElementType() reflect.Type {
return reflect.TypeOf((*azureTrafficCollectorArgs)(nil)).Elem()
}
type AzureTrafficCollectorInput interface {
pulumi.Input
ToAzureTrafficCollectorOutput() AzureTrafficCollectorOutput
ToAzureTrafficCollectorOutputWithContext(ctx context.Context) AzureTrafficCollectorOutput
}
func (*AzureTrafficCollector) ElementType() reflect.Type {
return reflect.TypeOf((**AzureTrafficCollector)(nil)).Elem()
}
func (i *AzureTrafficCollector) ToAzureTrafficCollectorOutput() AzureTrafficCollectorOutput {
return i.ToAzureTrafficCollectorOutputWithContext(context.Background())
}
func (i *AzureTrafficCollector) ToAzureTrafficCollectorOutputWithContext(ctx context.Context) AzureTrafficCollectorOutput {
return pulumi.ToOutputWithContext(ctx, i).(AzureTrafficCollectorOutput)
}
// AzureTrafficCollectorArrayInput is an input type that accepts AzureTrafficCollectorArray and AzureTrafficCollectorArrayOutput values.
// You can construct a concrete instance of `AzureTrafficCollectorArrayInput` via:
//
// AzureTrafficCollectorArray{ AzureTrafficCollectorArgs{...} }
type AzureTrafficCollectorArrayInput interface {
pulumi.Input
ToAzureTrafficCollectorArrayOutput() AzureTrafficCollectorArrayOutput
ToAzureTrafficCollectorArrayOutputWithContext(context.Context) AzureTrafficCollectorArrayOutput
}
type AzureTrafficCollectorArray []AzureTrafficCollectorInput
func (AzureTrafficCollectorArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AzureTrafficCollector)(nil)).Elem()
}
func (i AzureTrafficCollectorArray) ToAzureTrafficCollectorArrayOutput() AzureTrafficCollectorArrayOutput {
return i.ToAzureTrafficCollectorArrayOutputWithContext(context.Background())
}
func (i AzureTrafficCollectorArray) ToAzureTrafficCollectorArrayOutputWithContext(ctx context.Context) AzureTrafficCollectorArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AzureTrafficCollectorArrayOutput)
}
// AzureTrafficCollectorMapInput is an input type that accepts AzureTrafficCollectorMap and AzureTrafficCollectorMapOutput values.
// You can construct a concrete instance of `AzureTrafficCollectorMapInput` via:
//
// AzureTrafficCollectorMap{ "key": AzureTrafficCollectorArgs{...} }
type AzureTrafficCollectorMapInput interface {
pulumi.Input
ToAzureTrafficCollectorMapOutput() AzureTrafficCollectorMapOutput
ToAzureTrafficCollectorMapOutputWithContext(context.Context) AzureTrafficCollectorMapOutput
}
type AzureTrafficCollectorMap map[string]AzureTrafficCollectorInput
func (AzureTrafficCollectorMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AzureTrafficCollector)(nil)).Elem()
}
func (i AzureTrafficCollectorMap) ToAzureTrafficCollectorMapOutput() AzureTrafficCollectorMapOutput {
return i.ToAzureTrafficCollectorMapOutputWithContext(context.Background())
}
func (i AzureTrafficCollectorMap) ToAzureTrafficCollectorMapOutputWithContext(ctx context.Context) AzureTrafficCollectorMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AzureTrafficCollectorMapOutput)
}
type AzureTrafficCollectorOutput struct{ *pulumi.OutputState }
func (AzureTrafficCollectorOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AzureTrafficCollector)(nil)).Elem()
}
func (o AzureTrafficCollectorOutput) ToAzureTrafficCollectorOutput() AzureTrafficCollectorOutput {
return o
}
func (o AzureTrafficCollectorOutput) ToAzureTrafficCollectorOutputWithContext(ctx context.Context) AzureTrafficCollectorOutput {
return o
}
// The list of Resource IDs of collector policies.
func (o AzureTrafficCollectorOutput) CollectorPolicyIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AzureTrafficCollector) pulumi.StringArrayOutput { return v.CollectorPolicyIds }).(pulumi.StringArrayOutput)
}
// Specifies the Azure Region where the Network Function Azure Traffic Collector should exist. Changing this forces a new Network Function Azure Traffic Collector to be created.
func (o AzureTrafficCollectorOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *AzureTrafficCollector) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name which should be used for this Network Function Azure Traffic Collector. Changing this forces a new Network Function Azure Traffic Collector to be created.
func (o AzureTrafficCollectorOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AzureTrafficCollector) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the name of the Resource Group where the Network Function Azure Traffic Collector should exist. Changing this forces a new Network Function Azure Traffic Collector to be created.
func (o AzureTrafficCollectorOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *AzureTrafficCollector) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Network Function Azure Traffic Collector.
func (o AzureTrafficCollectorOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *AzureTrafficCollector) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The Resource ID of virtual hub.
func (o AzureTrafficCollectorOutput) VirtualHubIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AzureTrafficCollector) pulumi.StringArrayOutput { return v.VirtualHubIds }).(pulumi.StringArrayOutput)
}
type AzureTrafficCollectorArrayOutput struct{ *pulumi.OutputState }
func (AzureTrafficCollectorArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AzureTrafficCollector)(nil)).Elem()
}
func (o AzureTrafficCollectorArrayOutput) ToAzureTrafficCollectorArrayOutput() AzureTrafficCollectorArrayOutput {
return o
}
func (o AzureTrafficCollectorArrayOutput) ToAzureTrafficCollectorArrayOutputWithContext(ctx context.Context) AzureTrafficCollectorArrayOutput {
return o
}
func (o AzureTrafficCollectorArrayOutput) Index(i pulumi.IntInput) AzureTrafficCollectorOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AzureTrafficCollector {
return vs[0].([]*AzureTrafficCollector)[vs[1].(int)]
}).(AzureTrafficCollectorOutput)
}
type AzureTrafficCollectorMapOutput struct{ *pulumi.OutputState }
func (AzureTrafficCollectorMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AzureTrafficCollector)(nil)).Elem()
}
func (o AzureTrafficCollectorMapOutput) ToAzureTrafficCollectorMapOutput() AzureTrafficCollectorMapOutput {
return o
}
func (o AzureTrafficCollectorMapOutput) ToAzureTrafficCollectorMapOutputWithContext(ctx context.Context) AzureTrafficCollectorMapOutput {
return o
}
func (o AzureTrafficCollectorMapOutput) MapIndex(k pulumi.StringInput) AzureTrafficCollectorOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AzureTrafficCollector {
return vs[0].(map[string]*AzureTrafficCollector)[vs[1].(string)]
}).(AzureTrafficCollectorOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AzureTrafficCollectorInput)(nil)).Elem(), &AzureTrafficCollector{})
pulumi.RegisterInputType(reflect.TypeOf((*AzureTrafficCollectorArrayInput)(nil)).Elem(), AzureTrafficCollectorArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AzureTrafficCollectorMapInput)(nil)).Elem(), AzureTrafficCollectorMap{})
pulumi.RegisterOutputType(AzureTrafficCollectorOutput{})
pulumi.RegisterOutputType(AzureTrafficCollectorArrayOutput{})
pulumi.RegisterOutputType(AzureTrafficCollectorMapOutput{})
}
| 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/networkfunction/collectorPolicy.go | sdk/go/azure/networkfunction/collectorPolicy.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 networkfunction
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Network Function Collector Policy.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/networkfunction"
// "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 US 2"),
// })
// if err != nil {
// return err
// }
// exampleExpressRoutePort, err := network.NewExpressRoutePort(ctx, "example", &network.ExpressRoutePortArgs{
// Name: pulumi.String("example-erp"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// PeeringLocation: pulumi.String("Equinix-Seattle-SE2"),
// BandwidthInGbps: pulumi.Int(10),
// Encapsulation: pulumi.String("Dot1Q"),
// })
// if err != nil {
// return err
// }
// exampleExpressRouteCircuit, err := network.NewExpressRouteCircuit(ctx, "example", &network.ExpressRouteCircuitArgs{
// Name: pulumi.String("example-erc"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// ExpressRoutePortId: exampleExpressRoutePort.ID(),
// BandwidthInGbps: pulumi.Float64(1),
// Sku: &network.ExpressRouteCircuitSkuArgs{
// Tier: pulumi.String("Standard"),
// Family: pulumi.String("MeteredData"),
// },
// })
// if err != nil {
// return err
// }
// exampleExpressRouteCircuitPeering, err := network.NewExpressRouteCircuitPeering(ctx, "example", &network.ExpressRouteCircuitPeeringArgs{
// PeeringType: pulumi.String("MicrosoftPeering"),
// ExpressRouteCircuitName: exampleExpressRouteCircuit.Name,
// ResourceGroupName: example.Name,
// PeerAsn: pulumi.Int(100),
// PrimaryPeerAddressPrefix: pulumi.String("192.168.199.0/30"),
// SecondaryPeerAddressPrefix: pulumi.String("192.168.200.0/30"),
// VlanId: pulumi.Int(300),
// MicrosoftPeeringConfig: &network.ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs{
// AdvertisedPublicPrefixes: pulumi.StringArray{
// pulumi.String("123.6.0.0/24"),
// },
// },
// })
// if err != nil {
// return err
// }
// exampleAzureTrafficCollector, err := networkfunction.NewAzureTrafficCollector(ctx, "example", &networkfunction.AzureTrafficCollectorArgs{
// Name: pulumi.String("example-nfatc"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleExpressRouteCircuitPeering,
// }))
// if err != nil {
// return err
// }
// _, err = networkfunction.NewCollectorPolicy(ctx, "example", &networkfunction.CollectorPolicyArgs{
// Name: pulumi.String("example-nfcp"),
// TrafficCollectorId: exampleAzureTrafficCollector.ID(),
// Location: example.Location,
// IpfxEmission: &networkfunction.CollectorPolicyIpfxEmissionArgs{
// DestinationTypes: pulumi.String("AzureMonitor"),
// },
// IpfxIngestion: &networkfunction.CollectorPolicyIpfxIngestionArgs{
// SourceResourceIds: pulumi.StringArray{
// exampleExpressRouteCircuit.ID(),
// },
// },
// 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.NetworkFunction` - 2022-11-01
//
// ## Import
//
// Network Function Collector Policy can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:networkfunction/collectorPolicy:CollectorPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.NetworkFunction/azureTrafficCollectors/azureTrafficCollector1/collectorPolicies/collectorPolicy1
// ```
type CollectorPolicy struct {
pulumi.CustomResourceState
// An `ipfxEmission` block as defined below. Changing this forces a new Network Function Collector Policy to be created.
IpfxEmission CollectorPolicyIpfxEmissionOutput `pulumi:"ipfxEmission"`
// An `ipfxIngestion` block as defined below. Changing this forces a new Network Function Collector Policy to be created.
IpfxIngestion CollectorPolicyIpfxIngestionOutput `pulumi:"ipfxIngestion"`
// Specifies the Azure Region where the Network Function Collector Policy should exist. Changing this forces a new Network Function Collector Policy to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name which should be used for this Network Function Collector Policy. Changing this forces a new Network Function Collector Policy to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A mapping of tags which should be assigned to the Network Function Collector Policy.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Specifies the Azure Traffic Collector ID of the Network Function Collector Policy. Changing this forces a new Network Function Collector Policy to be created.
TrafficCollectorId pulumi.StringOutput `pulumi:"trafficCollectorId"`
}
// NewCollectorPolicy registers a new resource with the given unique name, arguments, and options.
func NewCollectorPolicy(ctx *pulumi.Context,
name string, args *CollectorPolicyArgs, opts ...pulumi.ResourceOption) (*CollectorPolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.IpfxEmission == nil {
return nil, errors.New("invalid value for required argument 'IpfxEmission'")
}
if args.IpfxIngestion == nil {
return nil, errors.New("invalid value for required argument 'IpfxIngestion'")
}
if args.TrafficCollectorId == nil {
return nil, errors.New("invalid value for required argument 'TrafficCollectorId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource CollectorPolicy
err := ctx.RegisterResource("azure:networkfunction/collectorPolicy:CollectorPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCollectorPolicy gets an existing CollectorPolicy 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 GetCollectorPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CollectorPolicyState, opts ...pulumi.ResourceOption) (*CollectorPolicy, error) {
var resource CollectorPolicy
err := ctx.ReadResource("azure:networkfunction/collectorPolicy:CollectorPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering CollectorPolicy resources.
type collectorPolicyState struct {
// An `ipfxEmission` block as defined below. Changing this forces a new Network Function Collector Policy to be created.
IpfxEmission *CollectorPolicyIpfxEmission `pulumi:"ipfxEmission"`
// An `ipfxIngestion` block as defined below. Changing this forces a new Network Function Collector Policy to be created.
IpfxIngestion *CollectorPolicyIpfxIngestion `pulumi:"ipfxIngestion"`
// Specifies the Azure Region where the Network Function Collector Policy should exist. Changing this forces a new Network Function Collector Policy to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Network Function Collector Policy. Changing this forces a new Network Function Collector Policy to be created.
Name *string `pulumi:"name"`
// A mapping of tags which should be assigned to the Network Function Collector Policy.
Tags map[string]string `pulumi:"tags"`
// Specifies the Azure Traffic Collector ID of the Network Function Collector Policy. Changing this forces a new Network Function Collector Policy to be created.
TrafficCollectorId *string `pulumi:"trafficCollectorId"`
}
type CollectorPolicyState struct {
// An `ipfxEmission` block as defined below. Changing this forces a new Network Function Collector Policy to be created.
IpfxEmission CollectorPolicyIpfxEmissionPtrInput
// An `ipfxIngestion` block as defined below. Changing this forces a new Network Function Collector Policy to be created.
IpfxIngestion CollectorPolicyIpfxIngestionPtrInput
// Specifies the Azure Region where the Network Function Collector Policy should exist. Changing this forces a new Network Function Collector Policy to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Network Function Collector Policy. Changing this forces a new Network Function Collector Policy to be created.
Name pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Network Function Collector Policy.
Tags pulumi.StringMapInput
// Specifies the Azure Traffic Collector ID of the Network Function Collector Policy. Changing this forces a new Network Function Collector Policy to be created.
TrafficCollectorId pulumi.StringPtrInput
}
func (CollectorPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*collectorPolicyState)(nil)).Elem()
}
type collectorPolicyArgs struct {
// An `ipfxEmission` block as defined below. Changing this forces a new Network Function Collector Policy to be created.
IpfxEmission CollectorPolicyIpfxEmission `pulumi:"ipfxEmission"`
// An `ipfxIngestion` block as defined below. Changing this forces a new Network Function Collector Policy to be created.
IpfxIngestion CollectorPolicyIpfxIngestion `pulumi:"ipfxIngestion"`
// Specifies the Azure Region where the Network Function Collector Policy should exist. Changing this forces a new Network Function Collector Policy to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Network Function Collector Policy. Changing this forces a new Network Function Collector Policy to be created.
Name *string `pulumi:"name"`
// A mapping of tags which should be assigned to the Network Function Collector Policy.
Tags map[string]string `pulumi:"tags"`
// Specifies the Azure Traffic Collector ID of the Network Function Collector Policy. Changing this forces a new Network Function Collector Policy to be created.
TrafficCollectorId string `pulumi:"trafficCollectorId"`
}
// The set of arguments for constructing a CollectorPolicy resource.
type CollectorPolicyArgs struct {
// An `ipfxEmission` block as defined below. Changing this forces a new Network Function Collector Policy to be created.
IpfxEmission CollectorPolicyIpfxEmissionInput
// An `ipfxIngestion` block as defined below. Changing this forces a new Network Function Collector Policy to be created.
IpfxIngestion CollectorPolicyIpfxIngestionInput
// Specifies the Azure Region where the Network Function Collector Policy should exist. Changing this forces a new Network Function Collector Policy to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Network Function Collector Policy. Changing this forces a new Network Function Collector Policy to be created.
Name pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Network Function Collector Policy.
Tags pulumi.StringMapInput
// Specifies the Azure Traffic Collector ID of the Network Function Collector Policy. Changing this forces a new Network Function Collector Policy to be created.
TrafficCollectorId pulumi.StringInput
}
func (CollectorPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*collectorPolicyArgs)(nil)).Elem()
}
type CollectorPolicyInput interface {
pulumi.Input
ToCollectorPolicyOutput() CollectorPolicyOutput
ToCollectorPolicyOutputWithContext(ctx context.Context) CollectorPolicyOutput
}
func (*CollectorPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**CollectorPolicy)(nil)).Elem()
}
func (i *CollectorPolicy) ToCollectorPolicyOutput() CollectorPolicyOutput {
return i.ToCollectorPolicyOutputWithContext(context.Background())
}
func (i *CollectorPolicy) ToCollectorPolicyOutputWithContext(ctx context.Context) CollectorPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(CollectorPolicyOutput)
}
// CollectorPolicyArrayInput is an input type that accepts CollectorPolicyArray and CollectorPolicyArrayOutput values.
// You can construct a concrete instance of `CollectorPolicyArrayInput` via:
//
// CollectorPolicyArray{ CollectorPolicyArgs{...} }
type CollectorPolicyArrayInput interface {
pulumi.Input
ToCollectorPolicyArrayOutput() CollectorPolicyArrayOutput
ToCollectorPolicyArrayOutputWithContext(context.Context) CollectorPolicyArrayOutput
}
type CollectorPolicyArray []CollectorPolicyInput
func (CollectorPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CollectorPolicy)(nil)).Elem()
}
func (i CollectorPolicyArray) ToCollectorPolicyArrayOutput() CollectorPolicyArrayOutput {
return i.ToCollectorPolicyArrayOutputWithContext(context.Background())
}
func (i CollectorPolicyArray) ToCollectorPolicyArrayOutputWithContext(ctx context.Context) CollectorPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CollectorPolicyArrayOutput)
}
// CollectorPolicyMapInput is an input type that accepts CollectorPolicyMap and CollectorPolicyMapOutput values.
// You can construct a concrete instance of `CollectorPolicyMapInput` via:
//
// CollectorPolicyMap{ "key": CollectorPolicyArgs{...} }
type CollectorPolicyMapInput interface {
pulumi.Input
ToCollectorPolicyMapOutput() CollectorPolicyMapOutput
ToCollectorPolicyMapOutputWithContext(context.Context) CollectorPolicyMapOutput
}
type CollectorPolicyMap map[string]CollectorPolicyInput
func (CollectorPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CollectorPolicy)(nil)).Elem()
}
func (i CollectorPolicyMap) ToCollectorPolicyMapOutput() CollectorPolicyMapOutput {
return i.ToCollectorPolicyMapOutputWithContext(context.Background())
}
func (i CollectorPolicyMap) ToCollectorPolicyMapOutputWithContext(ctx context.Context) CollectorPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CollectorPolicyMapOutput)
}
type CollectorPolicyOutput struct{ *pulumi.OutputState }
func (CollectorPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CollectorPolicy)(nil)).Elem()
}
func (o CollectorPolicyOutput) ToCollectorPolicyOutput() CollectorPolicyOutput {
return o
}
func (o CollectorPolicyOutput) ToCollectorPolicyOutputWithContext(ctx context.Context) CollectorPolicyOutput {
return o
}
// An `ipfxEmission` block as defined below. Changing this forces a new Network Function Collector Policy to be created.
func (o CollectorPolicyOutput) IpfxEmission() CollectorPolicyIpfxEmissionOutput {
return o.ApplyT(func(v *CollectorPolicy) CollectorPolicyIpfxEmissionOutput { return v.IpfxEmission }).(CollectorPolicyIpfxEmissionOutput)
}
// An `ipfxIngestion` block as defined below. Changing this forces a new Network Function Collector Policy to be created.
func (o CollectorPolicyOutput) IpfxIngestion() CollectorPolicyIpfxIngestionOutput {
return o.ApplyT(func(v *CollectorPolicy) CollectorPolicyIpfxIngestionOutput { return v.IpfxIngestion }).(CollectorPolicyIpfxIngestionOutput)
}
// Specifies the Azure Region where the Network Function Collector Policy should exist. Changing this forces a new Network Function Collector Policy to be created.
func (o CollectorPolicyOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *CollectorPolicy) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name which should be used for this Network Function Collector Policy. Changing this forces a new Network Function Collector Policy to be created.
func (o CollectorPolicyOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *CollectorPolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Network Function Collector Policy.
func (o CollectorPolicyOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *CollectorPolicy) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// Specifies the Azure Traffic Collector ID of the Network Function Collector Policy. Changing this forces a new Network Function Collector Policy to be created.
func (o CollectorPolicyOutput) TrafficCollectorId() pulumi.StringOutput {
return o.ApplyT(func(v *CollectorPolicy) pulumi.StringOutput { return v.TrafficCollectorId }).(pulumi.StringOutput)
}
type CollectorPolicyArrayOutput struct{ *pulumi.OutputState }
func (CollectorPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CollectorPolicy)(nil)).Elem()
}
func (o CollectorPolicyArrayOutput) ToCollectorPolicyArrayOutput() CollectorPolicyArrayOutput {
return o
}
func (o CollectorPolicyArrayOutput) ToCollectorPolicyArrayOutputWithContext(ctx context.Context) CollectorPolicyArrayOutput {
return o
}
func (o CollectorPolicyArrayOutput) Index(i pulumi.IntInput) CollectorPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CollectorPolicy {
return vs[0].([]*CollectorPolicy)[vs[1].(int)]
}).(CollectorPolicyOutput)
}
type CollectorPolicyMapOutput struct{ *pulumi.OutputState }
func (CollectorPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CollectorPolicy)(nil)).Elem()
}
func (o CollectorPolicyMapOutput) ToCollectorPolicyMapOutput() CollectorPolicyMapOutput {
return o
}
func (o CollectorPolicyMapOutput) ToCollectorPolicyMapOutputWithContext(ctx context.Context) CollectorPolicyMapOutput {
return o
}
func (o CollectorPolicyMapOutput) MapIndex(k pulumi.StringInput) CollectorPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CollectorPolicy {
return vs[0].(map[string]*CollectorPolicy)[vs[1].(string)]
}).(CollectorPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CollectorPolicyInput)(nil)).Elem(), &CollectorPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*CollectorPolicyArrayInput)(nil)).Elem(), CollectorPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CollectorPolicyMapInput)(nil)).Elem(), CollectorPolicyMap{})
pulumi.RegisterOutputType(CollectorPolicyOutput{})
pulumi.RegisterOutputType(CollectorPolicyArrayOutput{})
pulumi.RegisterOutputType(CollectorPolicyMapOutput{})
}
| 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/recoveryservices/init.go | sdk/go/azure/recoveryservices/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 recoveryservices
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:recoveryservices/vault:Vault":
r = &Vault{}
case "azure:recoveryservices/vaultResourceGuardAssociation:VaultResourceGuardAssociation":
r = &VaultResourceGuardAssociation{}
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",
"recoveryservices/vault",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"recoveryservices/vaultResourceGuardAssociation",
&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/recoveryservices/pulumiTypes.go | sdk/go/azure/recoveryservices/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 recoveryservices
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 VaultEncryption struct {
// Enabling/Disabling the Double Encryption state.
InfrastructureEncryptionEnabled bool `pulumi:"infrastructureEncryptionEnabled"`
// The Key Vault key id used to encrypt this vault. Key managed by Vault Managed Hardware Security Module is also supported.
KeyId string `pulumi:"keyId"`
// Indicate that system assigned identity should be used or not. Defaults to `true`. Must be set to `false` when `userAssignedIdentityId` is set.
//
// !> **Note:** `useSystemAssignedIdentity` only be able to set to `false` for **new** vaults. Any vaults containing existing items registered or attempted to be registered to it are not supported. Details can be found in [the document](https://learn.microsoft.com/en-us/azure/backup/encryption-at-rest-with-cmk?tabs=portal#before-you-start)
//
// !> **Note:** Once `infrastructureEncryptionEnabled` has been set it's not possible to change it.
UseSystemAssignedIdentity *bool `pulumi:"useSystemAssignedIdentity"`
// Specifies the user assigned identity ID to be used.
UserAssignedIdentityId *string `pulumi:"userAssignedIdentityId"`
}
// VaultEncryptionInput is an input type that accepts VaultEncryptionArgs and VaultEncryptionOutput values.
// You can construct a concrete instance of `VaultEncryptionInput` via:
//
// VaultEncryptionArgs{...}
type VaultEncryptionInput interface {
pulumi.Input
ToVaultEncryptionOutput() VaultEncryptionOutput
ToVaultEncryptionOutputWithContext(context.Context) VaultEncryptionOutput
}
type VaultEncryptionArgs struct {
// Enabling/Disabling the Double Encryption state.
InfrastructureEncryptionEnabled pulumi.BoolInput `pulumi:"infrastructureEncryptionEnabled"`
// The Key Vault key id used to encrypt this vault. Key managed by Vault Managed Hardware Security Module is also supported.
KeyId pulumi.StringInput `pulumi:"keyId"`
// Indicate that system assigned identity should be used or not. Defaults to `true`. Must be set to `false` when `userAssignedIdentityId` is set.
//
// !> **Note:** `useSystemAssignedIdentity` only be able to set to `false` for **new** vaults. Any vaults containing existing items registered or attempted to be registered to it are not supported. Details can be found in [the document](https://learn.microsoft.com/en-us/azure/backup/encryption-at-rest-with-cmk?tabs=portal#before-you-start)
//
// !> **Note:** Once `infrastructureEncryptionEnabled` has been set it's not possible to change it.
UseSystemAssignedIdentity pulumi.BoolPtrInput `pulumi:"useSystemAssignedIdentity"`
// Specifies the user assigned identity ID to be used.
UserAssignedIdentityId pulumi.StringPtrInput `pulumi:"userAssignedIdentityId"`
}
func (VaultEncryptionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*VaultEncryption)(nil)).Elem()
}
func (i VaultEncryptionArgs) ToVaultEncryptionOutput() VaultEncryptionOutput {
return i.ToVaultEncryptionOutputWithContext(context.Background())
}
func (i VaultEncryptionArgs) ToVaultEncryptionOutputWithContext(ctx context.Context) VaultEncryptionOutput {
return pulumi.ToOutputWithContext(ctx, i).(VaultEncryptionOutput)
}
func (i VaultEncryptionArgs) ToVaultEncryptionPtrOutput() VaultEncryptionPtrOutput {
return i.ToVaultEncryptionPtrOutputWithContext(context.Background())
}
func (i VaultEncryptionArgs) ToVaultEncryptionPtrOutputWithContext(ctx context.Context) VaultEncryptionPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(VaultEncryptionOutput).ToVaultEncryptionPtrOutputWithContext(ctx)
}
// VaultEncryptionPtrInput is an input type that accepts VaultEncryptionArgs, VaultEncryptionPtr and VaultEncryptionPtrOutput values.
// You can construct a concrete instance of `VaultEncryptionPtrInput` via:
//
// VaultEncryptionArgs{...}
//
// or:
//
// nil
type VaultEncryptionPtrInput interface {
pulumi.Input
ToVaultEncryptionPtrOutput() VaultEncryptionPtrOutput
ToVaultEncryptionPtrOutputWithContext(context.Context) VaultEncryptionPtrOutput
}
type vaultEncryptionPtrType VaultEncryptionArgs
func VaultEncryptionPtr(v *VaultEncryptionArgs) VaultEncryptionPtrInput {
return (*vaultEncryptionPtrType)(v)
}
func (*vaultEncryptionPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**VaultEncryption)(nil)).Elem()
}
func (i *vaultEncryptionPtrType) ToVaultEncryptionPtrOutput() VaultEncryptionPtrOutput {
return i.ToVaultEncryptionPtrOutputWithContext(context.Background())
}
func (i *vaultEncryptionPtrType) ToVaultEncryptionPtrOutputWithContext(ctx context.Context) VaultEncryptionPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(VaultEncryptionPtrOutput)
}
type VaultEncryptionOutput struct{ *pulumi.OutputState }
func (VaultEncryptionOutput) ElementType() reflect.Type {
return reflect.TypeOf((*VaultEncryption)(nil)).Elem()
}
func (o VaultEncryptionOutput) ToVaultEncryptionOutput() VaultEncryptionOutput {
return o
}
func (o VaultEncryptionOutput) ToVaultEncryptionOutputWithContext(ctx context.Context) VaultEncryptionOutput {
return o
}
func (o VaultEncryptionOutput) ToVaultEncryptionPtrOutput() VaultEncryptionPtrOutput {
return o.ToVaultEncryptionPtrOutputWithContext(context.Background())
}
func (o VaultEncryptionOutput) ToVaultEncryptionPtrOutputWithContext(ctx context.Context) VaultEncryptionPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v VaultEncryption) *VaultEncryption {
return &v
}).(VaultEncryptionPtrOutput)
}
// Enabling/Disabling the Double Encryption state.
func (o VaultEncryptionOutput) InfrastructureEncryptionEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v VaultEncryption) bool { return v.InfrastructureEncryptionEnabled }).(pulumi.BoolOutput)
}
// The Key Vault key id used to encrypt this vault. Key managed by Vault Managed Hardware Security Module is also supported.
func (o VaultEncryptionOutput) KeyId() pulumi.StringOutput {
return o.ApplyT(func(v VaultEncryption) string { return v.KeyId }).(pulumi.StringOutput)
}
// Indicate that system assigned identity should be used or not. Defaults to `true`. Must be set to `false` when `userAssignedIdentityId` is set.
//
// !> **Note:** `useSystemAssignedIdentity` only be able to set to `false` for **new** vaults. Any vaults containing existing items registered or attempted to be registered to it are not supported. Details can be found in [the document](https://learn.microsoft.com/en-us/azure/backup/encryption-at-rest-with-cmk?tabs=portal#before-you-start)
//
// !> **Note:** Once `infrastructureEncryptionEnabled` has been set it's not possible to change it.
func (o VaultEncryptionOutput) UseSystemAssignedIdentity() pulumi.BoolPtrOutput {
return o.ApplyT(func(v VaultEncryption) *bool { return v.UseSystemAssignedIdentity }).(pulumi.BoolPtrOutput)
}
// Specifies the user assigned identity ID to be used.
func (o VaultEncryptionOutput) UserAssignedIdentityId() pulumi.StringPtrOutput {
return o.ApplyT(func(v VaultEncryption) *string { return v.UserAssignedIdentityId }).(pulumi.StringPtrOutput)
}
type VaultEncryptionPtrOutput struct{ *pulumi.OutputState }
func (VaultEncryptionPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**VaultEncryption)(nil)).Elem()
}
func (o VaultEncryptionPtrOutput) ToVaultEncryptionPtrOutput() VaultEncryptionPtrOutput {
return o
}
func (o VaultEncryptionPtrOutput) ToVaultEncryptionPtrOutputWithContext(ctx context.Context) VaultEncryptionPtrOutput {
return o
}
func (o VaultEncryptionPtrOutput) Elem() VaultEncryptionOutput {
return o.ApplyT(func(v *VaultEncryption) VaultEncryption {
if v != nil {
return *v
}
var ret VaultEncryption
return ret
}).(VaultEncryptionOutput)
}
// Enabling/Disabling the Double Encryption state.
func (o VaultEncryptionPtrOutput) InfrastructureEncryptionEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *VaultEncryption) *bool {
if v == nil {
return nil
}
return &v.InfrastructureEncryptionEnabled
}).(pulumi.BoolPtrOutput)
}
// The Key Vault key id used to encrypt this vault. Key managed by Vault Managed Hardware Security Module is also supported.
func (o VaultEncryptionPtrOutput) KeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *VaultEncryption) *string {
if v == nil {
return nil
}
return &v.KeyId
}).(pulumi.StringPtrOutput)
}
// Indicate that system assigned identity should be used or not. Defaults to `true`. Must be set to `false` when `userAssignedIdentityId` is set.
//
// !> **Note:** `useSystemAssignedIdentity` only be able to set to `false` for **new** vaults. Any vaults containing existing items registered or attempted to be registered to it are not supported. Details can be found in [the document](https://learn.microsoft.com/en-us/azure/backup/encryption-at-rest-with-cmk?tabs=portal#before-you-start)
//
// !> **Note:** Once `infrastructureEncryptionEnabled` has been set it's not possible to change it.
func (o VaultEncryptionPtrOutput) UseSystemAssignedIdentity() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *VaultEncryption) *bool {
if v == nil {
return nil
}
return v.UseSystemAssignedIdentity
}).(pulumi.BoolPtrOutput)
}
// Specifies the user assigned identity ID to be used.
func (o VaultEncryptionPtrOutput) UserAssignedIdentityId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *VaultEncryption) *string {
if v == nil {
return nil
}
return v.UserAssignedIdentityId
}).(pulumi.StringPtrOutput)
}
type VaultIdentity struct {
// A list of User Assigned Managed Identity IDs to be assigned to this App Configuration.
//
// > **Note:** `identityIds` is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
IdentityIds []string `pulumi:"identityIds"`
// The Principal ID associated with this Managed Service Identity.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Recovery Services Vault. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
Type string `pulumi:"type"`
}
// VaultIdentityInput is an input type that accepts VaultIdentityArgs and VaultIdentityOutput values.
// You can construct a concrete instance of `VaultIdentityInput` via:
//
// VaultIdentityArgs{...}
type VaultIdentityInput interface {
pulumi.Input
ToVaultIdentityOutput() VaultIdentityOutput
ToVaultIdentityOutputWithContext(context.Context) VaultIdentityOutput
}
type VaultIdentityArgs struct {
// A list of User Assigned Managed Identity IDs to be assigned to this App Configuration.
//
// > **Note:** `identityIds` is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// The Principal ID associated with this Managed Service Identity.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Recovery Services Vault. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
Type pulumi.StringInput `pulumi:"type"`
}
func (VaultIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*VaultIdentity)(nil)).Elem()
}
func (i VaultIdentityArgs) ToVaultIdentityOutput() VaultIdentityOutput {
return i.ToVaultIdentityOutputWithContext(context.Background())
}
func (i VaultIdentityArgs) ToVaultIdentityOutputWithContext(ctx context.Context) VaultIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(VaultIdentityOutput)
}
func (i VaultIdentityArgs) ToVaultIdentityPtrOutput() VaultIdentityPtrOutput {
return i.ToVaultIdentityPtrOutputWithContext(context.Background())
}
func (i VaultIdentityArgs) ToVaultIdentityPtrOutputWithContext(ctx context.Context) VaultIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(VaultIdentityOutput).ToVaultIdentityPtrOutputWithContext(ctx)
}
// VaultIdentityPtrInput is an input type that accepts VaultIdentityArgs, VaultIdentityPtr and VaultIdentityPtrOutput values.
// You can construct a concrete instance of `VaultIdentityPtrInput` via:
//
// VaultIdentityArgs{...}
//
// or:
//
// nil
type VaultIdentityPtrInput interface {
pulumi.Input
ToVaultIdentityPtrOutput() VaultIdentityPtrOutput
ToVaultIdentityPtrOutputWithContext(context.Context) VaultIdentityPtrOutput
}
type vaultIdentityPtrType VaultIdentityArgs
func VaultIdentityPtr(v *VaultIdentityArgs) VaultIdentityPtrInput {
return (*vaultIdentityPtrType)(v)
}
func (*vaultIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**VaultIdentity)(nil)).Elem()
}
func (i *vaultIdentityPtrType) ToVaultIdentityPtrOutput() VaultIdentityPtrOutput {
return i.ToVaultIdentityPtrOutputWithContext(context.Background())
}
func (i *vaultIdentityPtrType) ToVaultIdentityPtrOutputWithContext(ctx context.Context) VaultIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(VaultIdentityPtrOutput)
}
type VaultIdentityOutput struct{ *pulumi.OutputState }
func (VaultIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*VaultIdentity)(nil)).Elem()
}
func (o VaultIdentityOutput) ToVaultIdentityOutput() VaultIdentityOutput {
return o
}
func (o VaultIdentityOutput) ToVaultIdentityOutputWithContext(ctx context.Context) VaultIdentityOutput {
return o
}
func (o VaultIdentityOutput) ToVaultIdentityPtrOutput() VaultIdentityPtrOutput {
return o.ToVaultIdentityPtrOutputWithContext(context.Background())
}
func (o VaultIdentityOutput) ToVaultIdentityPtrOutputWithContext(ctx context.Context) VaultIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v VaultIdentity) *VaultIdentity {
return &v
}).(VaultIdentityPtrOutput)
}
// A list of User Assigned Managed Identity IDs to be assigned to this App Configuration.
//
// > **Note:** `identityIds` is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
func (o VaultIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v VaultIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o VaultIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v VaultIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o VaultIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v VaultIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Recovery Services Vault. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
func (o VaultIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v VaultIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type VaultIdentityPtrOutput struct{ *pulumi.OutputState }
func (VaultIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**VaultIdentity)(nil)).Elem()
}
func (o VaultIdentityPtrOutput) ToVaultIdentityPtrOutput() VaultIdentityPtrOutput {
return o
}
func (o VaultIdentityPtrOutput) ToVaultIdentityPtrOutputWithContext(ctx context.Context) VaultIdentityPtrOutput {
return o
}
func (o VaultIdentityPtrOutput) Elem() VaultIdentityOutput {
return o.ApplyT(func(v *VaultIdentity) VaultIdentity {
if v != nil {
return *v
}
var ret VaultIdentity
return ret
}).(VaultIdentityOutput)
}
// A list of User Assigned Managed Identity IDs to be assigned to this App Configuration.
//
// > **Note:** `identityIds` is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
func (o VaultIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *VaultIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o VaultIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *VaultIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o VaultIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *VaultIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Recovery Services Vault. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
func (o VaultIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *VaultIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type VaultMonitoring struct {
// Enabling/Disabling built-in Azure Monitor alerts for security scenarios and job failure scenarios. Defaults to `true`.
AlertsForAllJobFailuresEnabled *bool `pulumi:"alertsForAllJobFailuresEnabled"`
// Enabling/Disabling alerts from the older (classic alerts) solution. Defaults to `true`. More details could be found [here](https://learn.microsoft.com/en-us/azure/backup/monitoring-and-alerts-overview).
AlertsForCriticalOperationFailuresEnabled *bool `pulumi:"alertsForCriticalOperationFailuresEnabled"`
}
// VaultMonitoringInput is an input type that accepts VaultMonitoringArgs and VaultMonitoringOutput values.
// You can construct a concrete instance of `VaultMonitoringInput` via:
//
// VaultMonitoringArgs{...}
type VaultMonitoringInput interface {
pulumi.Input
ToVaultMonitoringOutput() VaultMonitoringOutput
ToVaultMonitoringOutputWithContext(context.Context) VaultMonitoringOutput
}
type VaultMonitoringArgs struct {
// Enabling/Disabling built-in Azure Monitor alerts for security scenarios and job failure scenarios. Defaults to `true`.
AlertsForAllJobFailuresEnabled pulumi.BoolPtrInput `pulumi:"alertsForAllJobFailuresEnabled"`
// Enabling/Disabling alerts from the older (classic alerts) solution. Defaults to `true`. More details could be found [here](https://learn.microsoft.com/en-us/azure/backup/monitoring-and-alerts-overview).
AlertsForCriticalOperationFailuresEnabled pulumi.BoolPtrInput `pulumi:"alertsForCriticalOperationFailuresEnabled"`
}
func (VaultMonitoringArgs) ElementType() reflect.Type {
return reflect.TypeOf((*VaultMonitoring)(nil)).Elem()
}
func (i VaultMonitoringArgs) ToVaultMonitoringOutput() VaultMonitoringOutput {
return i.ToVaultMonitoringOutputWithContext(context.Background())
}
func (i VaultMonitoringArgs) ToVaultMonitoringOutputWithContext(ctx context.Context) VaultMonitoringOutput {
return pulumi.ToOutputWithContext(ctx, i).(VaultMonitoringOutput)
}
func (i VaultMonitoringArgs) ToVaultMonitoringPtrOutput() VaultMonitoringPtrOutput {
return i.ToVaultMonitoringPtrOutputWithContext(context.Background())
}
func (i VaultMonitoringArgs) ToVaultMonitoringPtrOutputWithContext(ctx context.Context) VaultMonitoringPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(VaultMonitoringOutput).ToVaultMonitoringPtrOutputWithContext(ctx)
}
// VaultMonitoringPtrInput is an input type that accepts VaultMonitoringArgs, VaultMonitoringPtr and VaultMonitoringPtrOutput values.
// You can construct a concrete instance of `VaultMonitoringPtrInput` via:
//
// VaultMonitoringArgs{...}
//
// or:
//
// nil
type VaultMonitoringPtrInput interface {
pulumi.Input
ToVaultMonitoringPtrOutput() VaultMonitoringPtrOutput
ToVaultMonitoringPtrOutputWithContext(context.Context) VaultMonitoringPtrOutput
}
type vaultMonitoringPtrType VaultMonitoringArgs
func VaultMonitoringPtr(v *VaultMonitoringArgs) VaultMonitoringPtrInput {
return (*vaultMonitoringPtrType)(v)
}
func (*vaultMonitoringPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**VaultMonitoring)(nil)).Elem()
}
func (i *vaultMonitoringPtrType) ToVaultMonitoringPtrOutput() VaultMonitoringPtrOutput {
return i.ToVaultMonitoringPtrOutputWithContext(context.Background())
}
func (i *vaultMonitoringPtrType) ToVaultMonitoringPtrOutputWithContext(ctx context.Context) VaultMonitoringPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(VaultMonitoringPtrOutput)
}
type VaultMonitoringOutput struct{ *pulumi.OutputState }
func (VaultMonitoringOutput) ElementType() reflect.Type {
return reflect.TypeOf((*VaultMonitoring)(nil)).Elem()
}
func (o VaultMonitoringOutput) ToVaultMonitoringOutput() VaultMonitoringOutput {
return o
}
func (o VaultMonitoringOutput) ToVaultMonitoringOutputWithContext(ctx context.Context) VaultMonitoringOutput {
return o
}
func (o VaultMonitoringOutput) ToVaultMonitoringPtrOutput() VaultMonitoringPtrOutput {
return o.ToVaultMonitoringPtrOutputWithContext(context.Background())
}
func (o VaultMonitoringOutput) ToVaultMonitoringPtrOutputWithContext(ctx context.Context) VaultMonitoringPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v VaultMonitoring) *VaultMonitoring {
return &v
}).(VaultMonitoringPtrOutput)
}
// Enabling/Disabling built-in Azure Monitor alerts for security scenarios and job failure scenarios. Defaults to `true`.
func (o VaultMonitoringOutput) AlertsForAllJobFailuresEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v VaultMonitoring) *bool { return v.AlertsForAllJobFailuresEnabled }).(pulumi.BoolPtrOutput)
}
// Enabling/Disabling alerts from the older (classic alerts) solution. Defaults to `true`. More details could be found [here](https://learn.microsoft.com/en-us/azure/backup/monitoring-and-alerts-overview).
func (o VaultMonitoringOutput) AlertsForCriticalOperationFailuresEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v VaultMonitoring) *bool { return v.AlertsForCriticalOperationFailuresEnabled }).(pulumi.BoolPtrOutput)
}
type VaultMonitoringPtrOutput struct{ *pulumi.OutputState }
func (VaultMonitoringPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**VaultMonitoring)(nil)).Elem()
}
func (o VaultMonitoringPtrOutput) ToVaultMonitoringPtrOutput() VaultMonitoringPtrOutput {
return o
}
func (o VaultMonitoringPtrOutput) ToVaultMonitoringPtrOutputWithContext(ctx context.Context) VaultMonitoringPtrOutput {
return o
}
func (o VaultMonitoringPtrOutput) Elem() VaultMonitoringOutput {
return o.ApplyT(func(v *VaultMonitoring) VaultMonitoring {
if v != nil {
return *v
}
var ret VaultMonitoring
return ret
}).(VaultMonitoringOutput)
}
// Enabling/Disabling built-in Azure Monitor alerts for security scenarios and job failure scenarios. Defaults to `true`.
func (o VaultMonitoringPtrOutput) AlertsForAllJobFailuresEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *VaultMonitoring) *bool {
if v == nil {
return nil
}
return v.AlertsForAllJobFailuresEnabled
}).(pulumi.BoolPtrOutput)
}
// Enabling/Disabling alerts from the older (classic alerts) solution. Defaults to `true`. More details could be found [here](https://learn.microsoft.com/en-us/azure/backup/monitoring-and-alerts-overview).
func (o VaultMonitoringPtrOutput) AlertsForCriticalOperationFailuresEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *VaultMonitoring) *bool {
if v == nil {
return nil
}
return v.AlertsForCriticalOperationFailuresEnabled
}).(pulumi.BoolPtrOutput)
}
type GetVaultIdentity struct {
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"`
// The identity type of this Managed Service Identity.
Type string `pulumi:"type"`
}
// GetVaultIdentityInput is an input type that accepts GetVaultIdentityArgs and GetVaultIdentityOutput values.
// You can construct a concrete instance of `GetVaultIdentityInput` via:
//
// GetVaultIdentityArgs{...}
type GetVaultIdentityInput interface {
pulumi.Input
ToGetVaultIdentityOutput() GetVaultIdentityOutput
ToGetVaultIdentityOutputWithContext(context.Context) GetVaultIdentityOutput
}
type GetVaultIdentityArgs struct {
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// The Principal ID associated with this Managed Service Identity.
PrincipalId pulumi.StringInput `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId pulumi.StringInput `pulumi:"tenantId"`
// The identity type of this Managed Service Identity.
Type pulumi.StringInput `pulumi:"type"`
}
func (GetVaultIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetVaultIdentity)(nil)).Elem()
}
func (i GetVaultIdentityArgs) ToGetVaultIdentityOutput() GetVaultIdentityOutput {
return i.ToGetVaultIdentityOutputWithContext(context.Background())
}
func (i GetVaultIdentityArgs) ToGetVaultIdentityOutputWithContext(ctx context.Context) GetVaultIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetVaultIdentityOutput)
}
// GetVaultIdentityArrayInput is an input type that accepts GetVaultIdentityArray and GetVaultIdentityArrayOutput values.
// You can construct a concrete instance of `GetVaultIdentityArrayInput` via:
//
// GetVaultIdentityArray{ GetVaultIdentityArgs{...} }
type GetVaultIdentityArrayInput interface {
pulumi.Input
ToGetVaultIdentityArrayOutput() GetVaultIdentityArrayOutput
ToGetVaultIdentityArrayOutputWithContext(context.Context) GetVaultIdentityArrayOutput
}
type GetVaultIdentityArray []GetVaultIdentityInput
func (GetVaultIdentityArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetVaultIdentity)(nil)).Elem()
}
func (i GetVaultIdentityArray) ToGetVaultIdentityArrayOutput() GetVaultIdentityArrayOutput {
return i.ToGetVaultIdentityArrayOutputWithContext(context.Background())
}
func (i GetVaultIdentityArray) ToGetVaultIdentityArrayOutputWithContext(ctx context.Context) GetVaultIdentityArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetVaultIdentityArrayOutput)
}
type GetVaultIdentityOutput struct{ *pulumi.OutputState }
func (GetVaultIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetVaultIdentity)(nil)).Elem()
}
func (o GetVaultIdentityOutput) ToGetVaultIdentityOutput() GetVaultIdentityOutput {
return o
}
func (o GetVaultIdentityOutput) ToGetVaultIdentityOutputWithContext(ctx context.Context) GetVaultIdentityOutput {
return o
}
func (o GetVaultIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetVaultIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o GetVaultIdentityOutput) PrincipalId() pulumi.StringOutput {
return o.ApplyT(func(v GetVaultIdentity) string { return v.PrincipalId }).(pulumi.StringOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o GetVaultIdentityOutput) TenantId() pulumi.StringOutput {
return o.ApplyT(func(v GetVaultIdentity) string { return v.TenantId }).(pulumi.StringOutput)
}
// The identity type of this Managed Service Identity.
func (o GetVaultIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v GetVaultIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type GetVaultIdentityArrayOutput struct{ *pulumi.OutputState }
func (GetVaultIdentityArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GetVaultIdentity)(nil)).Elem()
}
func (o GetVaultIdentityArrayOutput) ToGetVaultIdentityArrayOutput() GetVaultIdentityArrayOutput {
return o
}
func (o GetVaultIdentityArrayOutput) ToGetVaultIdentityArrayOutputWithContext(ctx context.Context) GetVaultIdentityArrayOutput {
return o
}
func (o GetVaultIdentityArrayOutput) Index(i pulumi.IntInput) GetVaultIdentityOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetVaultIdentity {
return vs[0].([]GetVaultIdentity)[vs[1].(int)]
}).(GetVaultIdentityOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*VaultEncryptionInput)(nil)).Elem(), VaultEncryptionArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*VaultEncryptionPtrInput)(nil)).Elem(), VaultEncryptionArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*VaultIdentityInput)(nil)).Elem(), VaultIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*VaultIdentityPtrInput)(nil)).Elem(), VaultIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*VaultMonitoringInput)(nil)).Elem(), VaultMonitoringArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*VaultMonitoringPtrInput)(nil)).Elem(), VaultMonitoringArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*GetVaultIdentityInput)(nil)).Elem(), GetVaultIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*GetVaultIdentityArrayInput)(nil)).Elem(), GetVaultIdentityArray{})
pulumi.RegisterOutputType(VaultEncryptionOutput{})
pulumi.RegisterOutputType(VaultEncryptionPtrOutput{})
pulumi.RegisterOutputType(VaultIdentityOutput{})
pulumi.RegisterOutputType(VaultIdentityPtrOutput{})
pulumi.RegisterOutputType(VaultMonitoringOutput{})
pulumi.RegisterOutputType(VaultMonitoringPtrOutput{})
pulumi.RegisterOutputType(GetVaultIdentityOutput{})
pulumi.RegisterOutputType(GetVaultIdentityArrayOutput{})
}
| 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/recoveryservices/getVault.go | sdk/go/azure/recoveryservices/getVault.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 recoveryservices
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 Recovery Services Vault.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/recoveryservices"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := recoveryservices.LookupVault(ctx, &recoveryservices.LookupVaultArgs{
// Name: "tfex-recovery_vault",
// ResourceGroupName: "tfex-resource_group",
// }, 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.RecoveryServices` - 2024-01-01
func LookupVault(ctx *pulumi.Context, args *LookupVaultArgs, opts ...pulumi.InvokeOption) (*LookupVaultResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupVaultResult
err := ctx.Invoke("azure:recoveryservices/getVault:getVault", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getVault.
type LookupVaultArgs struct {
// Specifies the name of the Recovery Services Vault.
Name string `pulumi:"name"`
// The name of the resource group in which the Recovery Services Vault resides.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getVault.
type LookupVaultResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// (Optional) An `identity` block as defined below.
Identities []GetVaultIdentity `pulumi:"identities"`
// The Azure location where the resource resides.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The vault's current SKU.
Sku string `pulumi:"sku"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
}
func LookupVaultOutput(ctx *pulumi.Context, args LookupVaultOutputArgs, opts ...pulumi.InvokeOption) LookupVaultResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupVaultResultOutput, error) {
args := v.(LookupVaultArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:recoveryservices/getVault:getVault", args, LookupVaultResultOutput{}, options).(LookupVaultResultOutput), nil
}).(LookupVaultResultOutput)
}
// A collection of arguments for invoking getVault.
type LookupVaultOutputArgs struct {
// Specifies the name of the Recovery Services Vault.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group in which the Recovery Services Vault resides.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupVaultOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupVaultArgs)(nil)).Elem()
}
// A collection of values returned by getVault.
type LookupVaultResultOutput struct{ *pulumi.OutputState }
func (LookupVaultResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupVaultResult)(nil)).Elem()
}
func (o LookupVaultResultOutput) ToLookupVaultResultOutput() LookupVaultResultOutput {
return o
}
func (o LookupVaultResultOutput) ToLookupVaultResultOutputWithContext(ctx context.Context) LookupVaultResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupVaultResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupVaultResult) string { return v.Id }).(pulumi.StringOutput)
}
// (Optional) An `identity` block as defined below.
func (o LookupVaultResultOutput) Identities() GetVaultIdentityArrayOutput {
return o.ApplyT(func(v LookupVaultResult) []GetVaultIdentity { return v.Identities }).(GetVaultIdentityArrayOutput)
}
// The Azure location where the resource resides.
func (o LookupVaultResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupVaultResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupVaultResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupVaultResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupVaultResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupVaultResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The vault's current SKU.
func (o LookupVaultResultOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v LookupVaultResult) string { return v.Sku }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the resource.
func (o LookupVaultResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupVaultResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupVaultResultOutput{})
}
| 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/recoveryservices/vaultResourceGuardAssociation.go | sdk/go/azure/recoveryservices/vaultResourceGuardAssociation.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 recoveryservices
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an association of a Resource Guard and Recovery Services Vault.
//
// ## 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/dataprotection"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/recoveryservices"
// "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 = dataprotection.NewResourceGuard(ctx, "example", &dataprotection.ResourceGuardArgs{
// Name: pulumi.String("example-resourceguard"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// _, err = recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{
// Name: pulumi.String("example-recovery-vault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// SoftDeleteEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = recoveryservices.NewVaultResourceGuardAssociation(ctx, "test", &recoveryservices.VaultResourceGuardAssociationArgs{
// VaultId: pulumi.Any(testAzurermRecoveryServicesVault.Id),
// ResourceGuardId: pulumi.Any(testAzurermDataProtectionResourceGuard.Id),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Resource Guards can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:recoveryservices/vaultResourceGuardAssociation:VaultResourceGuardAssociation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/vault1/backupResourceGuardProxies/proxy1
// ```
type VaultResourceGuardAssociation struct {
pulumi.CustomResourceState
// ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
ResourceGuardId pulumi.StringOutput `pulumi:"resourceGuardId"`
// ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
VaultId pulumi.StringOutput `pulumi:"vaultId"`
}
// NewVaultResourceGuardAssociation registers a new resource with the given unique name, arguments, and options.
func NewVaultResourceGuardAssociation(ctx *pulumi.Context,
name string, args *VaultResourceGuardAssociationArgs, opts ...pulumi.ResourceOption) (*VaultResourceGuardAssociation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGuardId == nil {
return nil, errors.New("invalid value for required argument 'ResourceGuardId'")
}
if args.VaultId == nil {
return nil, errors.New("invalid value for required argument 'VaultId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource VaultResourceGuardAssociation
err := ctx.RegisterResource("azure:recoveryservices/vaultResourceGuardAssociation:VaultResourceGuardAssociation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetVaultResourceGuardAssociation gets an existing VaultResourceGuardAssociation 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 GetVaultResourceGuardAssociation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *VaultResourceGuardAssociationState, opts ...pulumi.ResourceOption) (*VaultResourceGuardAssociation, error) {
var resource VaultResourceGuardAssociation
err := ctx.ReadResource("azure:recoveryservices/vaultResourceGuardAssociation:VaultResourceGuardAssociation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering VaultResourceGuardAssociation resources.
type vaultResourceGuardAssociationState struct {
// ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
ResourceGuardId *string `pulumi:"resourceGuardId"`
// ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
VaultId *string `pulumi:"vaultId"`
}
type VaultResourceGuardAssociationState struct {
// ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
ResourceGuardId pulumi.StringPtrInput
// ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
VaultId pulumi.StringPtrInput
}
func (VaultResourceGuardAssociationState) ElementType() reflect.Type {
return reflect.TypeOf((*vaultResourceGuardAssociationState)(nil)).Elem()
}
type vaultResourceGuardAssociationArgs struct {
// ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
ResourceGuardId string `pulumi:"resourceGuardId"`
// ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
VaultId string `pulumi:"vaultId"`
}
// The set of arguments for constructing a VaultResourceGuardAssociation resource.
type VaultResourceGuardAssociationArgs struct {
// ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
ResourceGuardId pulumi.StringInput
// ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
VaultId pulumi.StringInput
}
func (VaultResourceGuardAssociationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*vaultResourceGuardAssociationArgs)(nil)).Elem()
}
type VaultResourceGuardAssociationInput interface {
pulumi.Input
ToVaultResourceGuardAssociationOutput() VaultResourceGuardAssociationOutput
ToVaultResourceGuardAssociationOutputWithContext(ctx context.Context) VaultResourceGuardAssociationOutput
}
func (*VaultResourceGuardAssociation) ElementType() reflect.Type {
return reflect.TypeOf((**VaultResourceGuardAssociation)(nil)).Elem()
}
func (i *VaultResourceGuardAssociation) ToVaultResourceGuardAssociationOutput() VaultResourceGuardAssociationOutput {
return i.ToVaultResourceGuardAssociationOutputWithContext(context.Background())
}
func (i *VaultResourceGuardAssociation) ToVaultResourceGuardAssociationOutputWithContext(ctx context.Context) VaultResourceGuardAssociationOutput {
return pulumi.ToOutputWithContext(ctx, i).(VaultResourceGuardAssociationOutput)
}
// VaultResourceGuardAssociationArrayInput is an input type that accepts VaultResourceGuardAssociationArray and VaultResourceGuardAssociationArrayOutput values.
// You can construct a concrete instance of `VaultResourceGuardAssociationArrayInput` via:
//
// VaultResourceGuardAssociationArray{ VaultResourceGuardAssociationArgs{...} }
type VaultResourceGuardAssociationArrayInput interface {
pulumi.Input
ToVaultResourceGuardAssociationArrayOutput() VaultResourceGuardAssociationArrayOutput
ToVaultResourceGuardAssociationArrayOutputWithContext(context.Context) VaultResourceGuardAssociationArrayOutput
}
type VaultResourceGuardAssociationArray []VaultResourceGuardAssociationInput
func (VaultResourceGuardAssociationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VaultResourceGuardAssociation)(nil)).Elem()
}
func (i VaultResourceGuardAssociationArray) ToVaultResourceGuardAssociationArrayOutput() VaultResourceGuardAssociationArrayOutput {
return i.ToVaultResourceGuardAssociationArrayOutputWithContext(context.Background())
}
func (i VaultResourceGuardAssociationArray) ToVaultResourceGuardAssociationArrayOutputWithContext(ctx context.Context) VaultResourceGuardAssociationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(VaultResourceGuardAssociationArrayOutput)
}
// VaultResourceGuardAssociationMapInput is an input type that accepts VaultResourceGuardAssociationMap and VaultResourceGuardAssociationMapOutput values.
// You can construct a concrete instance of `VaultResourceGuardAssociationMapInput` via:
//
// VaultResourceGuardAssociationMap{ "key": VaultResourceGuardAssociationArgs{...} }
type VaultResourceGuardAssociationMapInput interface {
pulumi.Input
ToVaultResourceGuardAssociationMapOutput() VaultResourceGuardAssociationMapOutput
ToVaultResourceGuardAssociationMapOutputWithContext(context.Context) VaultResourceGuardAssociationMapOutput
}
type VaultResourceGuardAssociationMap map[string]VaultResourceGuardAssociationInput
func (VaultResourceGuardAssociationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VaultResourceGuardAssociation)(nil)).Elem()
}
func (i VaultResourceGuardAssociationMap) ToVaultResourceGuardAssociationMapOutput() VaultResourceGuardAssociationMapOutput {
return i.ToVaultResourceGuardAssociationMapOutputWithContext(context.Background())
}
func (i VaultResourceGuardAssociationMap) ToVaultResourceGuardAssociationMapOutputWithContext(ctx context.Context) VaultResourceGuardAssociationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(VaultResourceGuardAssociationMapOutput)
}
type VaultResourceGuardAssociationOutput struct{ *pulumi.OutputState }
func (VaultResourceGuardAssociationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**VaultResourceGuardAssociation)(nil)).Elem()
}
func (o VaultResourceGuardAssociationOutput) ToVaultResourceGuardAssociationOutput() VaultResourceGuardAssociationOutput {
return o
}
func (o VaultResourceGuardAssociationOutput) ToVaultResourceGuardAssociationOutputWithContext(ctx context.Context) VaultResourceGuardAssociationOutput {
return o
}
// ID of the Resource Guard which should be associated with. Changing this forces a new resource to be created.
func (o VaultResourceGuardAssociationOutput) ResourceGuardId() pulumi.StringOutput {
return o.ApplyT(func(v *VaultResourceGuardAssociation) pulumi.StringOutput { return v.ResourceGuardId }).(pulumi.StringOutput)
}
// ID of the Recovery Services Vault which should be associated with. Changing this forces a new resource to be created.
func (o VaultResourceGuardAssociationOutput) VaultId() pulumi.StringOutput {
return o.ApplyT(func(v *VaultResourceGuardAssociation) pulumi.StringOutput { return v.VaultId }).(pulumi.StringOutput)
}
type VaultResourceGuardAssociationArrayOutput struct{ *pulumi.OutputState }
func (VaultResourceGuardAssociationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*VaultResourceGuardAssociation)(nil)).Elem()
}
func (o VaultResourceGuardAssociationArrayOutput) ToVaultResourceGuardAssociationArrayOutput() VaultResourceGuardAssociationArrayOutput {
return o
}
func (o VaultResourceGuardAssociationArrayOutput) ToVaultResourceGuardAssociationArrayOutputWithContext(ctx context.Context) VaultResourceGuardAssociationArrayOutput {
return o
}
func (o VaultResourceGuardAssociationArrayOutput) Index(i pulumi.IntInput) VaultResourceGuardAssociationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VaultResourceGuardAssociation {
return vs[0].([]*VaultResourceGuardAssociation)[vs[1].(int)]
}).(VaultResourceGuardAssociationOutput)
}
type VaultResourceGuardAssociationMapOutput struct{ *pulumi.OutputState }
func (VaultResourceGuardAssociationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*VaultResourceGuardAssociation)(nil)).Elem()
}
func (o VaultResourceGuardAssociationMapOutput) ToVaultResourceGuardAssociationMapOutput() VaultResourceGuardAssociationMapOutput {
return o
}
func (o VaultResourceGuardAssociationMapOutput) ToVaultResourceGuardAssociationMapOutputWithContext(ctx context.Context) VaultResourceGuardAssociationMapOutput {
return o
}
func (o VaultResourceGuardAssociationMapOutput) MapIndex(k pulumi.StringInput) VaultResourceGuardAssociationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VaultResourceGuardAssociation {
return vs[0].(map[string]*VaultResourceGuardAssociation)[vs[1].(string)]
}).(VaultResourceGuardAssociationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*VaultResourceGuardAssociationInput)(nil)).Elem(), &VaultResourceGuardAssociation{})
pulumi.RegisterInputType(reflect.TypeOf((*VaultResourceGuardAssociationArrayInput)(nil)).Elem(), VaultResourceGuardAssociationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*VaultResourceGuardAssociationMapInput)(nil)).Elem(), VaultResourceGuardAssociationMap{})
pulumi.RegisterOutputType(VaultResourceGuardAssociationOutput{})
pulumi.RegisterOutputType(VaultResourceGuardAssociationArrayOutput{})
pulumi.RegisterOutputType(VaultResourceGuardAssociationMapOutput{})
}
| 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/recoveryservices/vault.go | sdk/go/azure/recoveryservices/vault.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 recoveryservices
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Recovery Services Vault.
//
// ## 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/recoveryservices"
// "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("tfex-recovery_vault"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{
// Name: pulumi.String("example-recovery-vault"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// SoftDeleteEnabled: 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.RecoveryServices` - 2024-04-01, 2024-01-01
//
// ## Import
//
// Recovery Services Vaults can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:recoveryservices/vault:Vault vault1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/vault1
// ```
type Vault struct {
pulumi.CustomResourceState
// Whether to enable the Classic experience for VMware replication. If set to `false` VMware machines will be protected using the new stateless ASR replication appliance. Changing this forces a new resource to be created.
ClassicVmwareReplicationEnabled pulumi.BoolPtrOutput `pulumi:"classicVmwareReplicationEnabled"`
// Is cross region restore enabled for this Vault? Only can be `true`, when `storageModeType` is `GeoRedundant`. Defaults to `false`.
//
// > **Note:** Once `crossRegionRestoreEnabled` is set to `true`, changing it back to `false` forces a new Recovery Service Vault to be created.
CrossRegionRestoreEnabled pulumi.BoolPtrOutput `pulumi:"crossRegionRestoreEnabled"`
// An `encryption` block as defined below. Required with `identity`.
//
// !> **Note:** Once Encryption with your own key has been Enabled it's not possible to Disable it.
Encryption VaultEncryptionPtrOutput `pulumi:"encryption"`
// An `identity` block as defined below.
Identity VaultIdentityPtrOutput `pulumi:"identity"`
// Immutability Settings of vault, possible values include: `Locked`, `Unlocked` and `Disabled`.
//
// > **Note:** Once `immutability` is set to `Locked`, changing it to other values forces a new Recovery Services Vault to be created.
Immutability pulumi.StringOutput `pulumi:"immutability"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// A `monitoring` block as defined below.
Monitoring VaultMonitoringPtrOutput `pulumi:"monitoring"`
// Specifies the name of the Recovery Services Vault. Recovery Service Vault name must be 2 - 50 characters long, start with a letter, contain only letters, numbers and hyphens. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Is it enabled to access the vault from public networks. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the Recovery Services Vault. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Sets the vault's SKU. Possible values include: `Standard`, `RS0`.
Sku pulumi.StringOutput `pulumi:"sku"`
// Is soft delete enable for this Vault? Defaults to `true`.
SoftDeleteEnabled pulumi.BoolPtrOutput `pulumi:"softDeleteEnabled"`
// The storage type of the Recovery Services Vault. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Defaults to `GeoRedundant`.
StorageModeType pulumi.StringPtrOutput `pulumi:"storageModeType"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewVault registers a new resource with the given unique name, arguments, and options.
func NewVault(ctx *pulumi.Context,
name string, args *VaultArgs, opts ...pulumi.ResourceOption) (*Vault, 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 Vault
err := ctx.RegisterResource("azure:recoveryservices/vault:Vault", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetVault gets an existing Vault 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 GetVault(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *VaultState, opts ...pulumi.ResourceOption) (*Vault, error) {
var resource Vault
err := ctx.ReadResource("azure:recoveryservices/vault:Vault", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Vault resources.
type vaultState struct {
// Whether to enable the Classic experience for VMware replication. If set to `false` VMware machines will be protected using the new stateless ASR replication appliance. Changing this forces a new resource to be created.
ClassicVmwareReplicationEnabled *bool `pulumi:"classicVmwareReplicationEnabled"`
// Is cross region restore enabled for this Vault? Only can be `true`, when `storageModeType` is `GeoRedundant`. Defaults to `false`.
//
// > **Note:** Once `crossRegionRestoreEnabled` is set to `true`, changing it back to `false` forces a new Recovery Service Vault to be created.
CrossRegionRestoreEnabled *bool `pulumi:"crossRegionRestoreEnabled"`
// An `encryption` block as defined below. Required with `identity`.
//
// !> **Note:** Once Encryption with your own key has been Enabled it's not possible to Disable it.
Encryption *VaultEncryption `pulumi:"encryption"`
// An `identity` block as defined below.
Identity *VaultIdentity `pulumi:"identity"`
// Immutability Settings of vault, possible values include: `Locked`, `Unlocked` and `Disabled`.
//
// > **Note:** Once `immutability` is set to `Locked`, changing it to other values forces a new Recovery Services Vault to be created.
Immutability *string `pulumi:"immutability"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// A `monitoring` block as defined below.
Monitoring *VaultMonitoring `pulumi:"monitoring"`
// Specifies the name of the Recovery Services Vault. Recovery Service Vault name must be 2 - 50 characters long, start with a letter, contain only letters, numbers and hyphens. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Is it enabled to access the vault from public networks. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the Recovery Services Vault. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Sets the vault's SKU. Possible values include: `Standard`, `RS0`.
Sku *string `pulumi:"sku"`
// Is soft delete enable for this Vault? Defaults to `true`.
SoftDeleteEnabled *bool `pulumi:"softDeleteEnabled"`
// The storage type of the Recovery Services Vault. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Defaults to `GeoRedundant`.
StorageModeType *string `pulumi:"storageModeType"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type VaultState struct {
// Whether to enable the Classic experience for VMware replication. If set to `false` VMware machines will be protected using the new stateless ASR replication appliance. Changing this forces a new resource to be created.
ClassicVmwareReplicationEnabled pulumi.BoolPtrInput
// Is cross region restore enabled for this Vault? Only can be `true`, when `storageModeType` is `GeoRedundant`. Defaults to `false`.
//
// > **Note:** Once `crossRegionRestoreEnabled` is set to `true`, changing it back to `false` forces a new Recovery Service Vault to be created.
CrossRegionRestoreEnabled pulumi.BoolPtrInput
// An `encryption` block as defined below. Required with `identity`.
//
// !> **Note:** Once Encryption with your own key has been Enabled it's not possible to Disable it.
Encryption VaultEncryptionPtrInput
// An `identity` block as defined below.
Identity VaultIdentityPtrInput
// Immutability Settings of vault, possible values include: `Locked`, `Unlocked` and `Disabled`.
//
// > **Note:** Once `immutability` is set to `Locked`, changing it to other values forces a new Recovery Services Vault to be created.
Immutability pulumi.StringPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// A `monitoring` block as defined below.
Monitoring VaultMonitoringPtrInput
// Specifies the name of the Recovery Services Vault. Recovery Service Vault name must be 2 - 50 characters long, start with a letter, contain only letters, numbers and hyphens. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Is it enabled to access the vault from public networks. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to create the Recovery Services Vault. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Sets the vault's SKU. Possible values include: `Standard`, `RS0`.
Sku pulumi.StringPtrInput
// Is soft delete enable for this Vault? Defaults to `true`.
SoftDeleteEnabled pulumi.BoolPtrInput
// The storage type of the Recovery Services Vault. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Defaults to `GeoRedundant`.
StorageModeType pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (VaultState) ElementType() reflect.Type {
return reflect.TypeOf((*vaultState)(nil)).Elem()
}
type vaultArgs struct {
// Whether to enable the Classic experience for VMware replication. If set to `false` VMware machines will be protected using the new stateless ASR replication appliance. Changing this forces a new resource to be created.
ClassicVmwareReplicationEnabled *bool `pulumi:"classicVmwareReplicationEnabled"`
// Is cross region restore enabled for this Vault? Only can be `true`, when `storageModeType` is `GeoRedundant`. Defaults to `false`.
//
// > **Note:** Once `crossRegionRestoreEnabled` is set to `true`, changing it back to `false` forces a new Recovery Service Vault to be created.
CrossRegionRestoreEnabled *bool `pulumi:"crossRegionRestoreEnabled"`
// An `encryption` block as defined below. Required with `identity`.
//
// !> **Note:** Once Encryption with your own key has been Enabled it's not possible to Disable it.
Encryption *VaultEncryption `pulumi:"encryption"`
// An `identity` block as defined below.
Identity *VaultIdentity `pulumi:"identity"`
// Immutability Settings of vault, possible values include: `Locked`, `Unlocked` and `Disabled`.
//
// > **Note:** Once `immutability` is set to `Locked`, changing it to other values forces a new Recovery Services Vault to be created.
Immutability *string `pulumi:"immutability"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// A `monitoring` block as defined below.
Monitoring *VaultMonitoring `pulumi:"monitoring"`
// Specifies the name of the Recovery Services Vault. Recovery Service Vault name must be 2 - 50 characters long, start with a letter, contain only letters, numbers and hyphens. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Is it enabled to access the vault from public networks. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the Recovery Services Vault. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Sets the vault's SKU. Possible values include: `Standard`, `RS0`.
Sku string `pulumi:"sku"`
// Is soft delete enable for this Vault? Defaults to `true`.
SoftDeleteEnabled *bool `pulumi:"softDeleteEnabled"`
// The storage type of the Recovery Services Vault. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Defaults to `GeoRedundant`.
StorageModeType *string `pulumi:"storageModeType"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Vault resource.
type VaultArgs struct {
// Whether to enable the Classic experience for VMware replication. If set to `false` VMware machines will be protected using the new stateless ASR replication appliance. Changing this forces a new resource to be created.
ClassicVmwareReplicationEnabled pulumi.BoolPtrInput
// Is cross region restore enabled for this Vault? Only can be `true`, when `storageModeType` is `GeoRedundant`. Defaults to `false`.
//
// > **Note:** Once `crossRegionRestoreEnabled` is set to `true`, changing it back to `false` forces a new Recovery Service Vault to be created.
CrossRegionRestoreEnabled pulumi.BoolPtrInput
// An `encryption` block as defined below. Required with `identity`.
//
// !> **Note:** Once Encryption with your own key has been Enabled it's not possible to Disable it.
Encryption VaultEncryptionPtrInput
// An `identity` block as defined below.
Identity VaultIdentityPtrInput
// Immutability Settings of vault, possible values include: `Locked`, `Unlocked` and `Disabled`.
//
// > **Note:** Once `immutability` is set to `Locked`, changing it to other values forces a new Recovery Services Vault to be created.
Immutability pulumi.StringPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// A `monitoring` block as defined below.
Monitoring VaultMonitoringPtrInput
// Specifies the name of the Recovery Services Vault. Recovery Service Vault name must be 2 - 50 characters long, start with a letter, contain only letters, numbers and hyphens. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Is it enabled to access the vault from public networks. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to create the Recovery Services Vault. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Sets the vault's SKU. Possible values include: `Standard`, `RS0`.
Sku pulumi.StringInput
// Is soft delete enable for this Vault? Defaults to `true`.
SoftDeleteEnabled pulumi.BoolPtrInput
// The storage type of the Recovery Services Vault. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Defaults to `GeoRedundant`.
StorageModeType pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (VaultArgs) ElementType() reflect.Type {
return reflect.TypeOf((*vaultArgs)(nil)).Elem()
}
type VaultInput interface {
pulumi.Input
ToVaultOutput() VaultOutput
ToVaultOutputWithContext(ctx context.Context) VaultOutput
}
func (*Vault) ElementType() reflect.Type {
return reflect.TypeOf((**Vault)(nil)).Elem()
}
func (i *Vault) ToVaultOutput() VaultOutput {
return i.ToVaultOutputWithContext(context.Background())
}
func (i *Vault) ToVaultOutputWithContext(ctx context.Context) VaultOutput {
return pulumi.ToOutputWithContext(ctx, i).(VaultOutput)
}
// VaultArrayInput is an input type that accepts VaultArray and VaultArrayOutput values.
// You can construct a concrete instance of `VaultArrayInput` via:
//
// VaultArray{ VaultArgs{...} }
type VaultArrayInput interface {
pulumi.Input
ToVaultArrayOutput() VaultArrayOutput
ToVaultArrayOutputWithContext(context.Context) VaultArrayOutput
}
type VaultArray []VaultInput
func (VaultArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Vault)(nil)).Elem()
}
func (i VaultArray) ToVaultArrayOutput() VaultArrayOutput {
return i.ToVaultArrayOutputWithContext(context.Background())
}
func (i VaultArray) ToVaultArrayOutputWithContext(ctx context.Context) VaultArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(VaultArrayOutput)
}
// VaultMapInput is an input type that accepts VaultMap and VaultMapOutput values.
// You can construct a concrete instance of `VaultMapInput` via:
//
// VaultMap{ "key": VaultArgs{...} }
type VaultMapInput interface {
pulumi.Input
ToVaultMapOutput() VaultMapOutput
ToVaultMapOutputWithContext(context.Context) VaultMapOutput
}
type VaultMap map[string]VaultInput
func (VaultMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Vault)(nil)).Elem()
}
func (i VaultMap) ToVaultMapOutput() VaultMapOutput {
return i.ToVaultMapOutputWithContext(context.Background())
}
func (i VaultMap) ToVaultMapOutputWithContext(ctx context.Context) VaultMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(VaultMapOutput)
}
type VaultOutput struct{ *pulumi.OutputState }
func (VaultOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Vault)(nil)).Elem()
}
func (o VaultOutput) ToVaultOutput() VaultOutput {
return o
}
func (o VaultOutput) ToVaultOutputWithContext(ctx context.Context) VaultOutput {
return o
}
// Whether to enable the Classic experience for VMware replication. If set to `false` VMware machines will be protected using the new stateless ASR replication appliance. Changing this forces a new resource to be created.
func (o VaultOutput) ClassicVmwareReplicationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Vault) pulumi.BoolPtrOutput { return v.ClassicVmwareReplicationEnabled }).(pulumi.BoolPtrOutput)
}
// Is cross region restore enabled for this Vault? Only can be `true`, when `storageModeType` is `GeoRedundant`. Defaults to `false`.
//
// > **Note:** Once `crossRegionRestoreEnabled` is set to `true`, changing it back to `false` forces a new Recovery Service Vault to be created.
func (o VaultOutput) CrossRegionRestoreEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Vault) pulumi.BoolPtrOutput { return v.CrossRegionRestoreEnabled }).(pulumi.BoolPtrOutput)
}
// An `encryption` block as defined below. Required with `identity`.
//
// !> **Note:** Once Encryption with your own key has been Enabled it's not possible to Disable it.
func (o VaultOutput) Encryption() VaultEncryptionPtrOutput {
return o.ApplyT(func(v *Vault) VaultEncryptionPtrOutput { return v.Encryption }).(VaultEncryptionPtrOutput)
}
// An `identity` block as defined below.
func (o VaultOutput) Identity() VaultIdentityPtrOutput {
return o.ApplyT(func(v *Vault) VaultIdentityPtrOutput { return v.Identity }).(VaultIdentityPtrOutput)
}
// Immutability Settings of vault, possible values include: `Locked`, `Unlocked` and `Disabled`.
//
// > **Note:** Once `immutability` is set to `Locked`, changing it to other values forces a new Recovery Services Vault to be created.
func (o VaultOutput) Immutability() pulumi.StringOutput {
return o.ApplyT(func(v *Vault) pulumi.StringOutput { return v.Immutability }).(pulumi.StringOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o VaultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Vault) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// A `monitoring` block as defined below.
func (o VaultOutput) Monitoring() VaultMonitoringPtrOutput {
return o.ApplyT(func(v *Vault) VaultMonitoringPtrOutput { return v.Monitoring }).(VaultMonitoringPtrOutput)
}
// Specifies the name of the Recovery Services Vault. Recovery Service Vault name must be 2 - 50 characters long, start with a letter, contain only letters, numbers and hyphens. Changing this forces a new resource to be created.
func (o VaultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Vault) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Is it enabled to access the vault from public networks. Defaults to `true`.
func (o VaultOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Vault) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the resource group in which to create the Recovery Services Vault. Changing this forces a new resource to be created.
func (o VaultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Vault) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Sets the vault's SKU. Possible values include: `Standard`, `RS0`.
func (o VaultOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v *Vault) pulumi.StringOutput { return v.Sku }).(pulumi.StringOutput)
}
// Is soft delete enable for this Vault? Defaults to `true`.
func (o VaultOutput) SoftDeleteEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Vault) pulumi.BoolPtrOutput { return v.SoftDeleteEnabled }).(pulumi.BoolPtrOutput)
}
// The storage type of the Recovery Services Vault. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Defaults to `GeoRedundant`.
func (o VaultOutput) StorageModeType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Vault) pulumi.StringPtrOutput { return v.StorageModeType }).(pulumi.StringPtrOutput)
}
// A mapping of tags to assign to the resource.
func (o VaultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Vault) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type VaultArrayOutput struct{ *pulumi.OutputState }
func (VaultArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Vault)(nil)).Elem()
}
func (o VaultArrayOutput) ToVaultArrayOutput() VaultArrayOutput {
return o
}
func (o VaultArrayOutput) ToVaultArrayOutputWithContext(ctx context.Context) VaultArrayOutput {
return o
}
func (o VaultArrayOutput) Index(i pulumi.IntInput) VaultOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Vault {
return vs[0].([]*Vault)[vs[1].(int)]
}).(VaultOutput)
}
type VaultMapOutput struct{ *pulumi.OutputState }
func (VaultMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Vault)(nil)).Elem()
}
func (o VaultMapOutput) ToVaultMapOutput() VaultMapOutput {
return o
}
func (o VaultMapOutput) ToVaultMapOutputWithContext(ctx context.Context) VaultMapOutput {
return o
}
func (o VaultMapOutput) MapIndex(k pulumi.StringInput) VaultOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Vault {
return vs[0].(map[string]*Vault)[vs[1].(string)]
}).(VaultOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*VaultInput)(nil)).Elem(), &Vault{})
pulumi.RegisterInputType(reflect.TypeOf((*VaultArrayInput)(nil)).Elem(), VaultArray{})
pulumi.RegisterInputType(reflect.TypeOf((*VaultMapInput)(nil)).Elem(), VaultMap{})
pulumi.RegisterOutputType(VaultOutput{})
pulumi.RegisterOutputType(VaultArrayOutput{})
pulumi.RegisterOutputType(VaultMapOutput{})
}
| 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/trustedsigning/init.go | sdk/go/azure/trustedsigning/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 trustedsigning
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:trustedsigning/account:Account":
r = &Account{}
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",
"trustedsigning/account",
&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/trustedsigning/getAccount.go | sdk/go/azure/trustedsigning/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 trustedsigning
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 Trusted Signing Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/trustedsigning"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := trustedsigning.LookupAccount(ctx, &trustedsigning.LookupAccountArgs{
// Name: "example-account",
// ResourceGroupName: "example-resource-group",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("trustedSigningAccountId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.CodeSigning` - 2024-09-30-preview
func LookupAccount(ctx *pulumi.Context, args *LookupAccountArgs, opts ...pulumi.InvokeOption) (*LookupAccountResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAccountResult
err := ctx.Invoke("azure:trustedsigning/getAccount:getAccount", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAccount.
type LookupAccountArgs struct {
// The name of the Trusted Signing Account.
Name string `pulumi:"name"`
// The name of the Resource Group where the Trusted Signing Account exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getAccount.
type LookupAccountResult struct {
// The URI of the Trusted Signing Account.
AccountUri string `pulumi:"accountUri"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure Region where the Trusted Signing Account exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The sku name of the Trusted Signing Account.
SkuName string `pulumi:"skuName"`
// A mapping of tags assigned to the Trusted Signing Account.
Tags map[string]string `pulumi:"tags"`
}
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:trustedsigning/getAccount:getAccount", args, LookupAccountResultOutput{}, options).(LookupAccountResultOutput), nil
}).(LookupAccountResultOutput)
}
// A collection of arguments for invoking getAccount.
type LookupAccountOutputArgs struct {
// The name of the Trusted Signing Account.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Trusted Signing Account exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
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 URI of the Trusted Signing Account.
func (o LookupAccountResultOutput) AccountUri() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.AccountUri }).(pulumi.StringOutput)
}
// 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)
}
// The Azure Region where the Trusted Signing Account exists.
func (o LookupAccountResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupAccountResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupAccountResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The sku name of the Trusted Signing Account.
func (o LookupAccountResultOutput) SkuName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.SkuName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the Trusted Signing Account.
func (o LookupAccountResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupAccountResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
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/trustedsigning/account.go | sdk/go/azure/trustedsigning/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 trustedsigning
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Trusted Signing 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/trustedsigning"
// "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"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = trustedsigning.NewAccount(ctx, "example", &trustedsigning.AccountArgs{
// Name: pulumi.String("example-account"),
// ResourceGroupName: example.Name,
// Location: pulumi.String("West Europe"),
// SkuName: pulumi.String("Basic"),
// })
// 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.CodeSigning` - 2024-09-30-preview
//
// ## Import
//
// Trusted Signing Accounts can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:trustedsigning/account:Account example /subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.CodeSigning/codeSigningAccounts/example-account
// ```
type Account struct {
pulumi.CustomResourceState
// The URI of the Trusted Signing Account which is used during signing files.
AccountUri pulumi.StringOutput `pulumi:"accountUri"`
// The Azure Region where the Trusted Signing Account should exist. Changing this forces a new Trusted Signing Account to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Trusted Signing Account. Changing this forces a new Trusted Signing Account to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Trusted Signing Account should exist. Changing this forces a new Trusted Signing Account to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The sku name of this Trusted Signing Account. Possible values are `Basic` and `Premium`.
SkuName pulumi.StringOutput `pulumi:"skuName"`
// A mapping of tags which should be assigned to the Trusted Signing Account.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// 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'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Account
err := ctx.RegisterResource("azure:trustedsigning/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:trustedsigning/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 {
// The URI of the Trusted Signing Account which is used during signing files.
AccountUri *string `pulumi:"accountUri"`
// The Azure Region where the Trusted Signing Account should exist. Changing this forces a new Trusted Signing Account to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Trusted Signing Account. Changing this forces a new Trusted Signing Account to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Trusted Signing Account should exist. Changing this forces a new Trusted Signing Account to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The sku name of this Trusted Signing Account. Possible values are `Basic` and `Premium`.
SkuName *string `pulumi:"skuName"`
// A mapping of tags which should be assigned to the Trusted Signing Account.
Tags map[string]string `pulumi:"tags"`
}
type AccountState struct {
// The URI of the Trusted Signing Account which is used during signing files.
AccountUri pulumi.StringPtrInput
// The Azure Region where the Trusted Signing Account should exist. Changing this forces a new Trusted Signing Account to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Trusted Signing Account. Changing this forces a new Trusted Signing Account to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Trusted Signing Account should exist. Changing this forces a new Trusted Signing Account to be created.
ResourceGroupName pulumi.StringPtrInput
// The sku name of this Trusted Signing Account. Possible values are `Basic` and `Premium`.
SkuName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Trusted Signing Account.
Tags pulumi.StringMapInput
}
func (AccountState) ElementType() reflect.Type {
return reflect.TypeOf((*accountState)(nil)).Elem()
}
type accountArgs struct {
// The Azure Region where the Trusted Signing Account should exist. Changing this forces a new Trusted Signing Account to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Trusted Signing Account. Changing this forces a new Trusted Signing Account to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Trusted Signing Account should exist. Changing this forces a new Trusted Signing Account to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The sku name of this Trusted Signing Account. Possible values are `Basic` and `Premium`.
SkuName string `pulumi:"skuName"`
// A mapping of tags which should be assigned to the Trusted Signing Account.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Account resource.
type AccountArgs struct {
// The Azure Region where the Trusted Signing Account should exist. Changing this forces a new Trusted Signing Account to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Trusted Signing Account. Changing this forces a new Trusted Signing Account to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Trusted Signing Account should exist. Changing this forces a new Trusted Signing Account to be created.
ResourceGroupName pulumi.StringInput
// The sku name of this Trusted Signing Account. Possible values are `Basic` and `Premium`.
SkuName pulumi.StringInput
// A mapping of tags which should be assigned to the Trusted Signing 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
}
// The URI of the Trusted Signing Account which is used during signing files.
func (o AccountOutput) AccountUri() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.AccountUri }).(pulumi.StringOutput)
}
// The Azure Region where the Trusted Signing Account should exist. Changing this forces a new Trusted Signing Account to be created.
func (o AccountOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Trusted Signing Account. Changing this forces a new Trusted Signing Account to be created.
func (o AccountOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Trusted Signing Account should exist. Changing this forces a new Trusted Signing Account to be created.
func (o AccountOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The sku name of this Trusted Signing Account. Possible values are `Basic` and `Premium`.
func (o AccountOutput) SkuName() pulumi.StringOutput {
return o.ApplyT(func(v *Account) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Trusted Signing Account.
func (o AccountOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Account) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.