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/network/networkManagerRoutingConfiguration.go
sdk/go/azure/network/networkManagerRoutingConfiguration.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network 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 Manager Routing Configuration. // // ## 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/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 // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // Location: example.Location, // ResourceGroupName: example.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Routing"), // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerRoutingConfiguration(ctx, "example", &network.NetworkManagerRoutingConfigurationArgs{ // Name: pulumi.String("example-routing-configuration"), // NetworkManagerId: exampleNetworkManager.ID(), // Description: pulumi.String("example routing configuration"), // }) // 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 // // Network Manager Routing Configurations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerRoutingConfiguration:NetworkManagerRoutingConfiguration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/manager1/routingConfigurations/conf1 // ``` type NetworkManagerRoutingConfiguration struct { pulumi.CustomResourceState // The description of the Network Manager Routing Configuration. Description pulumi.StringPtrOutput `pulumi:"description"` // The name which should be used for this Network Manager Routing Configuration. Changing this forces a new Network Manager Routing Configuration to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Network Manager. Changing this forces a new Network Manager Routing Configuration to be created. NetworkManagerId pulumi.StringOutput `pulumi:"networkManagerId"` } // NewNetworkManagerRoutingConfiguration registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerRoutingConfiguration(ctx *pulumi.Context, name string, args *NetworkManagerRoutingConfigurationArgs, opts ...pulumi.ResourceOption) (*NetworkManagerRoutingConfiguration, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NetworkManagerId == nil { return nil, errors.New("invalid value for required argument 'NetworkManagerId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerRoutingConfiguration err := ctx.RegisterResource("azure:network/networkManagerRoutingConfiguration:NetworkManagerRoutingConfiguration", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerRoutingConfiguration gets an existing NetworkManagerRoutingConfiguration 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 GetNetworkManagerRoutingConfiguration(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerRoutingConfigurationState, opts ...pulumi.ResourceOption) (*NetworkManagerRoutingConfiguration, error) { var resource NetworkManagerRoutingConfiguration err := ctx.ReadResource("azure:network/networkManagerRoutingConfiguration:NetworkManagerRoutingConfiguration", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerRoutingConfiguration resources. type networkManagerRoutingConfigurationState struct { // The description of the Network Manager Routing Configuration. Description *string `pulumi:"description"` // The name which should be used for this Network Manager Routing Configuration. Changing this forces a new Network Manager Routing Configuration to be created. Name *string `pulumi:"name"` // The ID of the Network Manager. Changing this forces a new Network Manager Routing Configuration to be created. NetworkManagerId *string `pulumi:"networkManagerId"` } type NetworkManagerRoutingConfigurationState struct { // The description of the Network Manager Routing Configuration. Description pulumi.StringPtrInput // The name which should be used for this Network Manager Routing Configuration. Changing this forces a new Network Manager Routing Configuration to be created. Name pulumi.StringPtrInput // The ID of the Network Manager. Changing this forces a new Network Manager Routing Configuration to be created. NetworkManagerId pulumi.StringPtrInput } func (NetworkManagerRoutingConfigurationState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerRoutingConfigurationState)(nil)).Elem() } type networkManagerRoutingConfigurationArgs struct { // The description of the Network Manager Routing Configuration. Description *string `pulumi:"description"` // The name which should be used for this Network Manager Routing Configuration. Changing this forces a new Network Manager Routing Configuration to be created. Name *string `pulumi:"name"` // The ID of the Network Manager. Changing this forces a new Network Manager Routing Configuration to be created. NetworkManagerId string `pulumi:"networkManagerId"` } // The set of arguments for constructing a NetworkManagerRoutingConfiguration resource. type NetworkManagerRoutingConfigurationArgs struct { // The description of the Network Manager Routing Configuration. Description pulumi.StringPtrInput // The name which should be used for this Network Manager Routing Configuration. Changing this forces a new Network Manager Routing Configuration to be created. Name pulumi.StringPtrInput // The ID of the Network Manager. Changing this forces a new Network Manager Routing Configuration to be created. NetworkManagerId pulumi.StringInput } func (NetworkManagerRoutingConfigurationArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerRoutingConfigurationArgs)(nil)).Elem() } type NetworkManagerRoutingConfigurationInput interface { pulumi.Input ToNetworkManagerRoutingConfigurationOutput() NetworkManagerRoutingConfigurationOutput ToNetworkManagerRoutingConfigurationOutputWithContext(ctx context.Context) NetworkManagerRoutingConfigurationOutput } func (*NetworkManagerRoutingConfiguration) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerRoutingConfiguration)(nil)).Elem() } func (i *NetworkManagerRoutingConfiguration) ToNetworkManagerRoutingConfigurationOutput() NetworkManagerRoutingConfigurationOutput { return i.ToNetworkManagerRoutingConfigurationOutputWithContext(context.Background()) } func (i *NetworkManagerRoutingConfiguration) ToNetworkManagerRoutingConfigurationOutputWithContext(ctx context.Context) NetworkManagerRoutingConfigurationOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerRoutingConfigurationOutput) } // NetworkManagerRoutingConfigurationArrayInput is an input type that accepts NetworkManagerRoutingConfigurationArray and NetworkManagerRoutingConfigurationArrayOutput values. // You can construct a concrete instance of `NetworkManagerRoutingConfigurationArrayInput` via: // // NetworkManagerRoutingConfigurationArray{ NetworkManagerRoutingConfigurationArgs{...} } type NetworkManagerRoutingConfigurationArrayInput interface { pulumi.Input ToNetworkManagerRoutingConfigurationArrayOutput() NetworkManagerRoutingConfigurationArrayOutput ToNetworkManagerRoutingConfigurationArrayOutputWithContext(context.Context) NetworkManagerRoutingConfigurationArrayOutput } type NetworkManagerRoutingConfigurationArray []NetworkManagerRoutingConfigurationInput func (NetworkManagerRoutingConfigurationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerRoutingConfiguration)(nil)).Elem() } func (i NetworkManagerRoutingConfigurationArray) ToNetworkManagerRoutingConfigurationArrayOutput() NetworkManagerRoutingConfigurationArrayOutput { return i.ToNetworkManagerRoutingConfigurationArrayOutputWithContext(context.Background()) } func (i NetworkManagerRoutingConfigurationArray) ToNetworkManagerRoutingConfigurationArrayOutputWithContext(ctx context.Context) NetworkManagerRoutingConfigurationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerRoutingConfigurationArrayOutput) } // NetworkManagerRoutingConfigurationMapInput is an input type that accepts NetworkManagerRoutingConfigurationMap and NetworkManagerRoutingConfigurationMapOutput values. // You can construct a concrete instance of `NetworkManagerRoutingConfigurationMapInput` via: // // NetworkManagerRoutingConfigurationMap{ "key": NetworkManagerRoutingConfigurationArgs{...} } type NetworkManagerRoutingConfigurationMapInput interface { pulumi.Input ToNetworkManagerRoutingConfigurationMapOutput() NetworkManagerRoutingConfigurationMapOutput ToNetworkManagerRoutingConfigurationMapOutputWithContext(context.Context) NetworkManagerRoutingConfigurationMapOutput } type NetworkManagerRoutingConfigurationMap map[string]NetworkManagerRoutingConfigurationInput func (NetworkManagerRoutingConfigurationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerRoutingConfiguration)(nil)).Elem() } func (i NetworkManagerRoutingConfigurationMap) ToNetworkManagerRoutingConfigurationMapOutput() NetworkManagerRoutingConfigurationMapOutput { return i.ToNetworkManagerRoutingConfigurationMapOutputWithContext(context.Background()) } func (i NetworkManagerRoutingConfigurationMap) ToNetworkManagerRoutingConfigurationMapOutputWithContext(ctx context.Context) NetworkManagerRoutingConfigurationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerRoutingConfigurationMapOutput) } type NetworkManagerRoutingConfigurationOutput struct{ *pulumi.OutputState } func (NetworkManagerRoutingConfigurationOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerRoutingConfiguration)(nil)).Elem() } func (o NetworkManagerRoutingConfigurationOutput) ToNetworkManagerRoutingConfigurationOutput() NetworkManagerRoutingConfigurationOutput { return o } func (o NetworkManagerRoutingConfigurationOutput) ToNetworkManagerRoutingConfigurationOutputWithContext(ctx context.Context) NetworkManagerRoutingConfigurationOutput { return o } // The description of the Network Manager Routing Configuration. func (o NetworkManagerRoutingConfigurationOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerRoutingConfiguration) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The name which should be used for this Network Manager Routing Configuration. Changing this forces a new Network Manager Routing Configuration to be created. func (o NetworkManagerRoutingConfigurationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerRoutingConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Network Manager. Changing this forces a new Network Manager Routing Configuration to be created. func (o NetworkManagerRoutingConfigurationOutput) NetworkManagerId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerRoutingConfiguration) pulumi.StringOutput { return v.NetworkManagerId }).(pulumi.StringOutput) } type NetworkManagerRoutingConfigurationArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerRoutingConfigurationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerRoutingConfiguration)(nil)).Elem() } func (o NetworkManagerRoutingConfigurationArrayOutput) ToNetworkManagerRoutingConfigurationArrayOutput() NetworkManagerRoutingConfigurationArrayOutput { return o } func (o NetworkManagerRoutingConfigurationArrayOutput) ToNetworkManagerRoutingConfigurationArrayOutputWithContext(ctx context.Context) NetworkManagerRoutingConfigurationArrayOutput { return o } func (o NetworkManagerRoutingConfigurationArrayOutput) Index(i pulumi.IntInput) NetworkManagerRoutingConfigurationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerRoutingConfiguration { return vs[0].([]*NetworkManagerRoutingConfiguration)[vs[1].(int)] }).(NetworkManagerRoutingConfigurationOutput) } type NetworkManagerRoutingConfigurationMapOutput struct{ *pulumi.OutputState } func (NetworkManagerRoutingConfigurationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerRoutingConfiguration)(nil)).Elem() } func (o NetworkManagerRoutingConfigurationMapOutput) ToNetworkManagerRoutingConfigurationMapOutput() NetworkManagerRoutingConfigurationMapOutput { return o } func (o NetworkManagerRoutingConfigurationMapOutput) ToNetworkManagerRoutingConfigurationMapOutputWithContext(ctx context.Context) NetworkManagerRoutingConfigurationMapOutput { return o } func (o NetworkManagerRoutingConfigurationMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerRoutingConfigurationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerRoutingConfiguration { return vs[0].(map[string]*NetworkManagerRoutingConfiguration)[vs[1].(string)] }).(NetworkManagerRoutingConfigurationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerRoutingConfigurationInput)(nil)).Elem(), &NetworkManagerRoutingConfiguration{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerRoutingConfigurationArrayInput)(nil)).Elem(), NetworkManagerRoutingConfigurationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerRoutingConfigurationMapInput)(nil)).Elem(), NetworkManagerRoutingConfigurationMap{}) pulumi.RegisterOutputType(NetworkManagerRoutingConfigurationOutput{}) pulumi.RegisterOutputType(NetworkManagerRoutingConfigurationArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerRoutingConfigurationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/virtualHubRouteTable.go
sdk/go/azure/network/virtualHubRouteTable.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Virtual Hub Route Table. // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.5.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // 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 // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("examplesubnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.5.1.0/24"), // }, // }) // if err != nil { // return err // } // _, err = network.NewSubnetNetworkSecurityGroupAssociation(ctx, "example", &network.SubnetNetworkSecurityGroupAssociationArgs{ // SubnetId: exampleSubnet.ID(), // NetworkSecurityGroupId: exampleNetworkSecurityGroup.ID(), // }) // if err != nil { // return err // } // exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{ // Name: pulumi.String("example-vwan"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{ // Name: pulumi.String("example-vhub"), // ResourceGroupName: example.Name, // Location: example.Location, // VirtualWanId: exampleVirtualWan.ID(), // AddressPrefix: pulumi.String("10.0.2.0/24"), // }) // if err != nil { // return err // } // exampleVirtualHubConnection, err := network.NewVirtualHubConnection(ctx, "example", &network.VirtualHubConnectionArgs{ // Name: pulumi.String("example-vhubconn"), // VirtualHubId: exampleVirtualHub.ID(), // RemoteVirtualNetworkId: exampleVirtualNetwork.ID(), // }) // if err != nil { // return err // } // _, err = network.NewVirtualHubRouteTable(ctx, "example", &network.VirtualHubRouteTableArgs{ // Name: pulumi.String("example-vhubroutetable"), // VirtualHubId: exampleVirtualHub.ID(), // Labels: pulumi.StringArray{ // pulumi.String("label1"), // }, // Routes: network.VirtualHubRouteTableRouteTypeArray{ // &network.VirtualHubRouteTableRouteTypeArgs{ // Name: pulumi.String("example-route"), // DestinationsType: pulumi.String("CIDR"), // Destinations: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // NextHopType: pulumi.String("ResourceId"), // NextHop: exampleVirtualHubConnection.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 // // Virtual Hub Route Tables can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/virtualHubRouteTable:VirtualHubRouteTable example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/routeTable1 // ``` type VirtualHubRouteTable struct { pulumi.CustomResourceState // List of labels associated with this route table. Labels pulumi.StringArrayOutput `pulumi:"labels"` // The name which should be used for Virtual Hub Route Table. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `route` blocks as defined below. Routes VirtualHubRouteTableRouteTypeArrayOutput `pulumi:"routes"` // The ID of the Virtual Hub within which this route table should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringOutput `pulumi:"virtualHubId"` } // NewVirtualHubRouteTable registers a new resource with the given unique name, arguments, and options. func NewVirtualHubRouteTable(ctx *pulumi.Context, name string, args *VirtualHubRouteTableArgs, opts ...pulumi.ResourceOption) (*VirtualHubRouteTable, 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 VirtualHubRouteTable err := ctx.RegisterResource("azure:network/virtualHubRouteTable:VirtualHubRouteTable", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualHubRouteTable gets an existing VirtualHubRouteTable 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 GetVirtualHubRouteTable(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualHubRouteTableState, opts ...pulumi.ResourceOption) (*VirtualHubRouteTable, error) { var resource VirtualHubRouteTable err := ctx.ReadResource("azure:network/virtualHubRouteTable:VirtualHubRouteTable", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualHubRouteTable resources. type virtualHubRouteTableState struct { // List of labels associated with this route table. Labels []string `pulumi:"labels"` // The name which should be used for Virtual Hub Route Table. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `route` blocks as defined below. Routes []VirtualHubRouteTableRouteType `pulumi:"routes"` // The ID of the Virtual Hub within which this route table should be created. Changing this forces a new resource to be created. VirtualHubId *string `pulumi:"virtualHubId"` } type VirtualHubRouteTableState struct { // List of labels associated with this route table. Labels pulumi.StringArrayInput // The name which should be used for Virtual Hub Route Table. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `route` blocks as defined below. Routes VirtualHubRouteTableRouteTypeArrayInput // The ID of the Virtual Hub within which this route table should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringPtrInput } func (VirtualHubRouteTableState) ElementType() reflect.Type { return reflect.TypeOf((*virtualHubRouteTableState)(nil)).Elem() } type virtualHubRouteTableArgs struct { // List of labels associated with this route table. Labels []string `pulumi:"labels"` // The name which should be used for Virtual Hub Route Table. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `route` blocks as defined below. Routes []VirtualHubRouteTableRouteType `pulumi:"routes"` // The ID of the Virtual Hub within which this route table should be created. Changing this forces a new resource to be created. VirtualHubId string `pulumi:"virtualHubId"` } // The set of arguments for constructing a VirtualHubRouteTable resource. type VirtualHubRouteTableArgs struct { // List of labels associated with this route table. Labels pulumi.StringArrayInput // The name which should be used for Virtual Hub Route Table. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `route` blocks as defined below. Routes VirtualHubRouteTableRouteTypeArrayInput // The ID of the Virtual Hub within which this route table should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringInput } func (VirtualHubRouteTableArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualHubRouteTableArgs)(nil)).Elem() } type VirtualHubRouteTableInput interface { pulumi.Input ToVirtualHubRouteTableOutput() VirtualHubRouteTableOutput ToVirtualHubRouteTableOutputWithContext(ctx context.Context) VirtualHubRouteTableOutput } func (*VirtualHubRouteTable) ElementType() reflect.Type { return reflect.TypeOf((**VirtualHubRouteTable)(nil)).Elem() } func (i *VirtualHubRouteTable) ToVirtualHubRouteTableOutput() VirtualHubRouteTableOutput { return i.ToVirtualHubRouteTableOutputWithContext(context.Background()) } func (i *VirtualHubRouteTable) ToVirtualHubRouteTableOutputWithContext(ctx context.Context) VirtualHubRouteTableOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualHubRouteTableOutput) } // VirtualHubRouteTableArrayInput is an input type that accepts VirtualHubRouteTableArray and VirtualHubRouteTableArrayOutput values. // You can construct a concrete instance of `VirtualHubRouteTableArrayInput` via: // // VirtualHubRouteTableArray{ VirtualHubRouteTableArgs{...} } type VirtualHubRouteTableArrayInput interface { pulumi.Input ToVirtualHubRouteTableArrayOutput() VirtualHubRouteTableArrayOutput ToVirtualHubRouteTableArrayOutputWithContext(context.Context) VirtualHubRouteTableArrayOutput } type VirtualHubRouteTableArray []VirtualHubRouteTableInput func (VirtualHubRouteTableArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualHubRouteTable)(nil)).Elem() } func (i VirtualHubRouteTableArray) ToVirtualHubRouteTableArrayOutput() VirtualHubRouteTableArrayOutput { return i.ToVirtualHubRouteTableArrayOutputWithContext(context.Background()) } func (i VirtualHubRouteTableArray) ToVirtualHubRouteTableArrayOutputWithContext(ctx context.Context) VirtualHubRouteTableArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualHubRouteTableArrayOutput) } // VirtualHubRouteTableMapInput is an input type that accepts VirtualHubRouteTableMap and VirtualHubRouteTableMapOutput values. // You can construct a concrete instance of `VirtualHubRouteTableMapInput` via: // // VirtualHubRouteTableMap{ "key": VirtualHubRouteTableArgs{...} } type VirtualHubRouteTableMapInput interface { pulumi.Input ToVirtualHubRouteTableMapOutput() VirtualHubRouteTableMapOutput ToVirtualHubRouteTableMapOutputWithContext(context.Context) VirtualHubRouteTableMapOutput } type VirtualHubRouteTableMap map[string]VirtualHubRouteTableInput func (VirtualHubRouteTableMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualHubRouteTable)(nil)).Elem() } func (i VirtualHubRouteTableMap) ToVirtualHubRouteTableMapOutput() VirtualHubRouteTableMapOutput { return i.ToVirtualHubRouteTableMapOutputWithContext(context.Background()) } func (i VirtualHubRouteTableMap) ToVirtualHubRouteTableMapOutputWithContext(ctx context.Context) VirtualHubRouteTableMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualHubRouteTableMapOutput) } type VirtualHubRouteTableOutput struct{ *pulumi.OutputState } func (VirtualHubRouteTableOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualHubRouteTable)(nil)).Elem() } func (o VirtualHubRouteTableOutput) ToVirtualHubRouteTableOutput() VirtualHubRouteTableOutput { return o } func (o VirtualHubRouteTableOutput) ToVirtualHubRouteTableOutputWithContext(ctx context.Context) VirtualHubRouteTableOutput { return o } // List of labels associated with this route table. func (o VirtualHubRouteTableOutput) Labels() pulumi.StringArrayOutput { return o.ApplyT(func(v *VirtualHubRouteTable) pulumi.StringArrayOutput { return v.Labels }).(pulumi.StringArrayOutput) } // The name which should be used for Virtual Hub Route Table. Changing this forces a new resource to be created. func (o VirtualHubRouteTableOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHubRouteTable) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `route` blocks as defined below. func (o VirtualHubRouteTableOutput) Routes() VirtualHubRouteTableRouteTypeArrayOutput { return o.ApplyT(func(v *VirtualHubRouteTable) VirtualHubRouteTableRouteTypeArrayOutput { return v.Routes }).(VirtualHubRouteTableRouteTypeArrayOutput) } // The ID of the Virtual Hub within which this route table should be created. Changing this forces a new resource to be created. func (o VirtualHubRouteTableOutput) VirtualHubId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHubRouteTable) pulumi.StringOutput { return v.VirtualHubId }).(pulumi.StringOutput) } type VirtualHubRouteTableArrayOutput struct{ *pulumi.OutputState } func (VirtualHubRouteTableArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualHubRouteTable)(nil)).Elem() } func (o VirtualHubRouteTableArrayOutput) ToVirtualHubRouteTableArrayOutput() VirtualHubRouteTableArrayOutput { return o } func (o VirtualHubRouteTableArrayOutput) ToVirtualHubRouteTableArrayOutputWithContext(ctx context.Context) VirtualHubRouteTableArrayOutput { return o } func (o VirtualHubRouteTableArrayOutput) Index(i pulumi.IntInput) VirtualHubRouteTableOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualHubRouteTable { return vs[0].([]*VirtualHubRouteTable)[vs[1].(int)] }).(VirtualHubRouteTableOutput) } type VirtualHubRouteTableMapOutput struct{ *pulumi.OutputState } func (VirtualHubRouteTableMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualHubRouteTable)(nil)).Elem() } func (o VirtualHubRouteTableMapOutput) ToVirtualHubRouteTableMapOutput() VirtualHubRouteTableMapOutput { return o } func (o VirtualHubRouteTableMapOutput) ToVirtualHubRouteTableMapOutputWithContext(ctx context.Context) VirtualHubRouteTableMapOutput { return o } func (o VirtualHubRouteTableMapOutput) MapIndex(k pulumi.StringInput) VirtualHubRouteTableOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualHubRouteTable { return vs[0].(map[string]*VirtualHubRouteTable)[vs[1].(string)] }).(VirtualHubRouteTableOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualHubRouteTableInput)(nil)).Elem(), &VirtualHubRouteTable{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualHubRouteTableArrayInput)(nil)).Elem(), VirtualHubRouteTableArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualHubRouteTableMapInput)(nil)).Elem(), VirtualHubRouteTableMap{}) pulumi.RegisterOutputType(VirtualHubRouteTableOutput{}) pulumi.RegisterOutputType(VirtualHubRouteTableArrayOutput{}) pulumi.RegisterOutputType(VirtualHubRouteTableMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/firewallApplicationRuleCollection.go
sdk/go/azure/network/firewallApplicationRuleCollection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Application Rule Collection within an Azure Firewall. // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("testvnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("AzureFirewallSubnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("testpip"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // exampleFirewall, err := network.NewFirewall(ctx, "example", &network.FirewallArgs{ // Name: pulumi.String("testfirewall"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("AZFW_VNet"), // SkuTier: pulumi.String("Standard"), // IpConfigurations: network.FirewallIpConfigurationArray{ // &network.FirewallIpConfigurationArgs{ // Name: pulumi.String("configuration"), // SubnetId: exampleSubnet.ID(), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewFirewallApplicationRuleCollection(ctx, "example", &network.FirewallApplicationRuleCollectionArgs{ // Name: pulumi.String("testcollection"), // AzureFirewallName: exampleFirewall.Name, // ResourceGroupName: example.Name, // Priority: pulumi.Int(100), // Action: pulumi.String("Allow"), // Rules: network.FirewallApplicationRuleCollectionRuleArray{ // &network.FirewallApplicationRuleCollectionRuleArgs{ // Name: pulumi.String("testrule"), // SourceAddresses: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // TargetFqdns: pulumi.StringArray{ // pulumi.String("*.google.com"), // }, // Protocols: network.FirewallApplicationRuleCollectionRuleProtocolArray{ // &network.FirewallApplicationRuleCollectionRuleProtocolArgs{ // Port: pulumi.Int(443), // Type: pulumi.String("Https"), // }, // }, // }, // }, // }) // 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 // // Firewall Application Rule Collections can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/firewallApplicationRuleCollection:FirewallApplicationRuleCollection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/azureFirewalls/myfirewall/applicationRuleCollections/mycollection // ``` type FirewallApplicationRuleCollection struct { pulumi.CustomResourceState // Specifies the action the rule will apply to matching traffic. Possible values are `Allow` and `Deny`. Action pulumi.StringOutput `pulumi:"action"` // Specifies the name of the Firewall in which the Application Rule Collection should be created. Changing this forces a new resource to be created. AzureFirewallName pulumi.StringOutput `pulumi:"azureFirewallName"` // Specifies the name of the Application Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. Priority pulumi.IntOutput `pulumi:"priority"` // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // One or more `rule` blocks as defined below. Rules FirewallApplicationRuleCollectionRuleArrayOutput `pulumi:"rules"` } // NewFirewallApplicationRuleCollection registers a new resource with the given unique name, arguments, and options. func NewFirewallApplicationRuleCollection(ctx *pulumi.Context, name string, args *FirewallApplicationRuleCollectionArgs, opts ...pulumi.ResourceOption) (*FirewallApplicationRuleCollection, 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.AzureFirewallName == nil { return nil, errors.New("invalid value for required argument 'AzureFirewallName'") } if args.Priority == nil { return nil, errors.New("invalid value for required argument 'Priority'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Rules == nil { return nil, errors.New("invalid value for required argument 'Rules'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FirewallApplicationRuleCollection err := ctx.RegisterResource("azure:network/firewallApplicationRuleCollection:FirewallApplicationRuleCollection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFirewallApplicationRuleCollection gets an existing FirewallApplicationRuleCollection 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 GetFirewallApplicationRuleCollection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FirewallApplicationRuleCollectionState, opts ...pulumi.ResourceOption) (*FirewallApplicationRuleCollection, error) { var resource FirewallApplicationRuleCollection err := ctx.ReadResource("azure:network/firewallApplicationRuleCollection:FirewallApplicationRuleCollection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FirewallApplicationRuleCollection resources. type firewallApplicationRuleCollectionState struct { // Specifies the action the rule will apply to matching traffic. Possible values are `Allow` and `Deny`. Action *string `pulumi:"action"` // Specifies the name of the Firewall in which the Application Rule Collection should be created. Changing this forces a new resource to be created. AzureFirewallName *string `pulumi:"azureFirewallName"` // Specifies the name of the Application Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. Priority *int `pulumi:"priority"` // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // One or more `rule` blocks as defined below. Rules []FirewallApplicationRuleCollectionRule `pulumi:"rules"` } type FirewallApplicationRuleCollectionState struct { // Specifies the action the rule will apply to matching traffic. Possible values are `Allow` and `Deny`. Action pulumi.StringPtrInput // Specifies the name of the Firewall in which the Application Rule Collection should be created. Changing this forces a new resource to be created. AzureFirewallName pulumi.StringPtrInput // Specifies the name of the Application Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. Priority pulumi.IntPtrInput // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // One or more `rule` blocks as defined below. Rules FirewallApplicationRuleCollectionRuleArrayInput } func (FirewallApplicationRuleCollectionState) ElementType() reflect.Type { return reflect.TypeOf((*firewallApplicationRuleCollectionState)(nil)).Elem() } type firewallApplicationRuleCollectionArgs struct { // Specifies the action the rule will apply to matching traffic. Possible values are `Allow` and `Deny`. Action string `pulumi:"action"` // Specifies the name of the Firewall in which the Application Rule Collection should be created. Changing this forces a new resource to be created. AzureFirewallName string `pulumi:"azureFirewallName"` // Specifies the name of the Application Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. Priority int `pulumi:"priority"` // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // One or more `rule` blocks as defined below. Rules []FirewallApplicationRuleCollectionRule `pulumi:"rules"` } // The set of arguments for constructing a FirewallApplicationRuleCollection resource. type FirewallApplicationRuleCollectionArgs struct { // Specifies the action the rule will apply to matching traffic. Possible values are `Allow` and `Deny`. Action pulumi.StringInput // Specifies the name of the Firewall in which the Application Rule Collection should be created. Changing this forces a new resource to be created. AzureFirewallName pulumi.StringInput // Specifies the name of the Application Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. Priority pulumi.IntInput // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // One or more `rule` blocks as defined below. Rules FirewallApplicationRuleCollectionRuleArrayInput } func (FirewallApplicationRuleCollectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*firewallApplicationRuleCollectionArgs)(nil)).Elem() } type FirewallApplicationRuleCollectionInput interface { pulumi.Input ToFirewallApplicationRuleCollectionOutput() FirewallApplicationRuleCollectionOutput ToFirewallApplicationRuleCollectionOutputWithContext(ctx context.Context) FirewallApplicationRuleCollectionOutput } func (*FirewallApplicationRuleCollection) ElementType() reflect.Type { return reflect.TypeOf((**FirewallApplicationRuleCollection)(nil)).Elem() } func (i *FirewallApplicationRuleCollection) ToFirewallApplicationRuleCollectionOutput() FirewallApplicationRuleCollectionOutput { return i.ToFirewallApplicationRuleCollectionOutputWithContext(context.Background()) } func (i *FirewallApplicationRuleCollection) ToFirewallApplicationRuleCollectionOutputWithContext(ctx context.Context) FirewallApplicationRuleCollectionOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallApplicationRuleCollectionOutput) } // FirewallApplicationRuleCollectionArrayInput is an input type that accepts FirewallApplicationRuleCollectionArray and FirewallApplicationRuleCollectionArrayOutput values. // You can construct a concrete instance of `FirewallApplicationRuleCollectionArrayInput` via: // // FirewallApplicationRuleCollectionArray{ FirewallApplicationRuleCollectionArgs{...} } type FirewallApplicationRuleCollectionArrayInput interface { pulumi.Input ToFirewallApplicationRuleCollectionArrayOutput() FirewallApplicationRuleCollectionArrayOutput ToFirewallApplicationRuleCollectionArrayOutputWithContext(context.Context) FirewallApplicationRuleCollectionArrayOutput } type FirewallApplicationRuleCollectionArray []FirewallApplicationRuleCollectionInput func (FirewallApplicationRuleCollectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallApplicationRuleCollection)(nil)).Elem() } func (i FirewallApplicationRuleCollectionArray) ToFirewallApplicationRuleCollectionArrayOutput() FirewallApplicationRuleCollectionArrayOutput { return i.ToFirewallApplicationRuleCollectionArrayOutputWithContext(context.Background()) } func (i FirewallApplicationRuleCollectionArray) ToFirewallApplicationRuleCollectionArrayOutputWithContext(ctx context.Context) FirewallApplicationRuleCollectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallApplicationRuleCollectionArrayOutput) } // FirewallApplicationRuleCollectionMapInput is an input type that accepts FirewallApplicationRuleCollectionMap and FirewallApplicationRuleCollectionMapOutput values. // You can construct a concrete instance of `FirewallApplicationRuleCollectionMapInput` via: // // FirewallApplicationRuleCollectionMap{ "key": FirewallApplicationRuleCollectionArgs{...} } type FirewallApplicationRuleCollectionMapInput interface { pulumi.Input ToFirewallApplicationRuleCollectionMapOutput() FirewallApplicationRuleCollectionMapOutput ToFirewallApplicationRuleCollectionMapOutputWithContext(context.Context) FirewallApplicationRuleCollectionMapOutput } type FirewallApplicationRuleCollectionMap map[string]FirewallApplicationRuleCollectionInput func (FirewallApplicationRuleCollectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallApplicationRuleCollection)(nil)).Elem() } func (i FirewallApplicationRuleCollectionMap) ToFirewallApplicationRuleCollectionMapOutput() FirewallApplicationRuleCollectionMapOutput { return i.ToFirewallApplicationRuleCollectionMapOutputWithContext(context.Background()) } func (i FirewallApplicationRuleCollectionMap) ToFirewallApplicationRuleCollectionMapOutputWithContext(ctx context.Context) FirewallApplicationRuleCollectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallApplicationRuleCollectionMapOutput) } type FirewallApplicationRuleCollectionOutput struct{ *pulumi.OutputState } func (FirewallApplicationRuleCollectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**FirewallApplicationRuleCollection)(nil)).Elem() } func (o FirewallApplicationRuleCollectionOutput) ToFirewallApplicationRuleCollectionOutput() FirewallApplicationRuleCollectionOutput { return o } func (o FirewallApplicationRuleCollectionOutput) ToFirewallApplicationRuleCollectionOutputWithContext(ctx context.Context) FirewallApplicationRuleCollectionOutput { return o } // Specifies the action the rule will apply to matching traffic. Possible values are `Allow` and `Deny`. func (o FirewallApplicationRuleCollectionOutput) Action() pulumi.StringOutput { return o.ApplyT(func(v *FirewallApplicationRuleCollection) pulumi.StringOutput { return v.Action }).(pulumi.StringOutput) } // Specifies the name of the Firewall in which the Application Rule Collection should be created. Changing this forces a new resource to be created. func (o FirewallApplicationRuleCollectionOutput) AzureFirewallName() pulumi.StringOutput { return o.ApplyT(func(v *FirewallApplicationRuleCollection) pulumi.StringOutput { return v.AzureFirewallName }).(pulumi.StringOutput) } // Specifies the name of the Application Rule Collection which must be unique within the Firewall. Changing this forces a new resource to be created. func (o FirewallApplicationRuleCollectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FirewallApplicationRuleCollection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the priority of the rule collection. Possible values are between `100` - `65000`. func (o FirewallApplicationRuleCollectionOutput) Priority() pulumi.IntOutput { return o.ApplyT(func(v *FirewallApplicationRuleCollection) pulumi.IntOutput { return v.Priority }).(pulumi.IntOutput) } // Specifies the name of the Resource Group in which the Firewall exists. Changing this forces a new resource to be created. func (o FirewallApplicationRuleCollectionOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *FirewallApplicationRuleCollection) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // One or more `rule` blocks as defined below. func (o FirewallApplicationRuleCollectionOutput) Rules() FirewallApplicationRuleCollectionRuleArrayOutput { return o.ApplyT(func(v *FirewallApplicationRuleCollection) FirewallApplicationRuleCollectionRuleArrayOutput { return v.Rules }).(FirewallApplicationRuleCollectionRuleArrayOutput) } type FirewallApplicationRuleCollectionArrayOutput struct{ *pulumi.OutputState } func (FirewallApplicationRuleCollectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallApplicationRuleCollection)(nil)).Elem() } func (o FirewallApplicationRuleCollectionArrayOutput) ToFirewallApplicationRuleCollectionArrayOutput() FirewallApplicationRuleCollectionArrayOutput { return o } func (o FirewallApplicationRuleCollectionArrayOutput) ToFirewallApplicationRuleCollectionArrayOutputWithContext(ctx context.Context) FirewallApplicationRuleCollectionArrayOutput { return o } func (o FirewallApplicationRuleCollectionArrayOutput) Index(i pulumi.IntInput) FirewallApplicationRuleCollectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FirewallApplicationRuleCollection { return vs[0].([]*FirewallApplicationRuleCollection)[vs[1].(int)] }).(FirewallApplicationRuleCollectionOutput) } type FirewallApplicationRuleCollectionMapOutput struct{ *pulumi.OutputState } func (FirewallApplicationRuleCollectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallApplicationRuleCollection)(nil)).Elem() } func (o FirewallApplicationRuleCollectionMapOutput) ToFirewallApplicationRuleCollectionMapOutput() FirewallApplicationRuleCollectionMapOutput { return o } func (o FirewallApplicationRuleCollectionMapOutput) ToFirewallApplicationRuleCollectionMapOutputWithContext(ctx context.Context) FirewallApplicationRuleCollectionMapOutput { return o } func (o FirewallApplicationRuleCollectionMapOutput) MapIndex(k pulumi.StringInput) FirewallApplicationRuleCollectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FirewallApplicationRuleCollection { return vs[0].(map[string]*FirewallApplicationRuleCollection)[vs[1].(string)] }).(FirewallApplicationRuleCollectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FirewallApplicationRuleCollectionInput)(nil)).Elem(), &FirewallApplicationRuleCollection{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallApplicationRuleCollectionArrayInput)(nil)).Elem(), FirewallApplicationRuleCollectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallApplicationRuleCollectionMapInput)(nil)).Elem(), FirewallApplicationRuleCollectionMap{}) pulumi.RegisterOutputType(FirewallApplicationRuleCollectionOutput{}) pulumi.RegisterOutputType(FirewallApplicationRuleCollectionArrayOutput{}) pulumi.RegisterOutputType(FirewallApplicationRuleCollectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getNetworkManagerIpamPool.go
sdk/go/azure/network/getNetworkManagerIpamPool.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network 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 Network Manager IPAM Pool. // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // }) // if err != nil { // return err // } // exampleNetworkManagerIpamPool, err := network.NewNetworkManagerIpamPool(ctx, "example", &network.NetworkManagerIpamPoolArgs{ // Name: pulumi.String("example-ipam-pool"), // Location: pulumi.String("West Europe"), // NetworkManagerId: exampleNetworkManager.ID(), // DisplayName: pulumi.String("example-pool"), // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.0.0/24"), // }, // }) // if err != nil { // return err // } // example := network.LookupNetworkManagerIpamPoolOutput(ctx, network.GetNetworkManagerIpamPoolOutputArgs{ // Name: exampleNetworkManagerIpamPool.Name, // NetworkManagerId: exampleNetworkManager.ID(), // }, nil) // ctx.Export("id", example.ApplyT(func(example network.GetNetworkManagerIpamPoolResult) (*string, error) { // return &example.Id, nil // }).(pulumi.StringPtrOutput)) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupNetworkManagerIpamPool(ctx *pulumi.Context, args *LookupNetworkManagerIpamPoolArgs, opts ...pulumi.InvokeOption) (*LookupNetworkManagerIpamPoolResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupNetworkManagerIpamPoolResult err := ctx.Invoke("azure:network/getNetworkManagerIpamPool:getNetworkManagerIpamPool", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getNetworkManagerIpamPool. type LookupNetworkManagerIpamPoolArgs struct { // The name of this Network Manager IPAM Pool. Name string `pulumi:"name"` // The ID of the parent Network Manager. NetworkManagerId string `pulumi:"networkManagerId"` } // A collection of values returned by getNetworkManagerIpamPool. type LookupNetworkManagerIpamPoolResult struct { // A list of IPv4 or IPv6 IP address prefixes assigned to the Network Manager IPAM Pool. AddressPrefixes []string `pulumi:"addressPrefixes"` // The description of the Network Manager IPAM Pool. Description string `pulumi:"description"` // The display name of the Network Manager IPAM Pool. DisplayName string `pulumi:"displayName"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region where the Network Manager IPAM Pool exists. Location string `pulumi:"location"` Name string `pulumi:"name"` NetworkManagerId string `pulumi:"networkManagerId"` // The name of the parent IPAM Pool. ParentPoolName string `pulumi:"parentPoolName"` // A mapping of tags assigned to the Network Manager IPAM Pool. Tags map[string]string `pulumi:"tags"` } func LookupNetworkManagerIpamPoolOutput(ctx *pulumi.Context, args LookupNetworkManagerIpamPoolOutputArgs, opts ...pulumi.InvokeOption) LookupNetworkManagerIpamPoolResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupNetworkManagerIpamPoolResultOutput, error) { args := v.(LookupNetworkManagerIpamPoolArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getNetworkManagerIpamPool:getNetworkManagerIpamPool", args, LookupNetworkManagerIpamPoolResultOutput{}, options).(LookupNetworkManagerIpamPoolResultOutput), nil }).(LookupNetworkManagerIpamPoolResultOutput) } // A collection of arguments for invoking getNetworkManagerIpamPool. type LookupNetworkManagerIpamPoolOutputArgs struct { // The name of this Network Manager IPAM Pool. Name pulumi.StringInput `pulumi:"name"` // The ID of the parent Network Manager. NetworkManagerId pulumi.StringInput `pulumi:"networkManagerId"` } func (LookupNetworkManagerIpamPoolOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupNetworkManagerIpamPoolArgs)(nil)).Elem() } // A collection of values returned by getNetworkManagerIpamPool. type LookupNetworkManagerIpamPoolResultOutput struct{ *pulumi.OutputState } func (LookupNetworkManagerIpamPoolResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupNetworkManagerIpamPoolResult)(nil)).Elem() } func (o LookupNetworkManagerIpamPoolResultOutput) ToLookupNetworkManagerIpamPoolResultOutput() LookupNetworkManagerIpamPoolResultOutput { return o } func (o LookupNetworkManagerIpamPoolResultOutput) ToLookupNetworkManagerIpamPoolResultOutputWithContext(ctx context.Context) LookupNetworkManagerIpamPoolResultOutput { return o } // A list of IPv4 or IPv6 IP address prefixes assigned to the Network Manager IPAM Pool. func (o LookupNetworkManagerIpamPoolResultOutput) AddressPrefixes() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupNetworkManagerIpamPoolResult) []string { return v.AddressPrefixes }).(pulumi.StringArrayOutput) } // The description of the Network Manager IPAM Pool. func (o LookupNetworkManagerIpamPoolResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerIpamPoolResult) string { return v.Description }).(pulumi.StringOutput) } // The display name of the Network Manager IPAM Pool. func (o LookupNetworkManagerIpamPoolResultOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerIpamPoolResult) string { return v.DisplayName }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupNetworkManagerIpamPoolResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerIpamPoolResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region where the Network Manager IPAM Pool exists. func (o LookupNetworkManagerIpamPoolResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerIpamPoolResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupNetworkManagerIpamPoolResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerIpamPoolResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupNetworkManagerIpamPoolResultOutput) NetworkManagerId() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerIpamPoolResult) string { return v.NetworkManagerId }).(pulumi.StringOutput) } // The name of the parent IPAM Pool. func (o LookupNetworkManagerIpamPoolResultOutput) ParentPoolName() pulumi.StringOutput { return o.ApplyT(func(v LookupNetworkManagerIpamPoolResult) string { return v.ParentPoolName }).(pulumi.StringOutput) } // A mapping of tags assigned to the Network Manager IPAM Pool. func (o LookupNetworkManagerIpamPoolResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupNetworkManagerIpamPoolResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupNetworkManagerIpamPoolResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getLocalNetworkGateway.go
sdk/go/azure/network/getLocalNetworkGateway.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network 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 Local Network Gateway. // // ## Example Usage // // ```go // package main // // import ( // // "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 := network.LookupLocalNetworkGateway(ctx, &network.LookupLocalNetworkGatewayArgs{ // Name: "existing-local-network-gateway", // ResourceGroupName: "existing-resources", // }, 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.Network` - 2025-01-01 func LookupLocalNetworkGateway(ctx *pulumi.Context, args *LookupLocalNetworkGatewayArgs, opts ...pulumi.InvokeOption) (*LookupLocalNetworkGatewayResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupLocalNetworkGatewayResult err := ctx.Invoke("azure:network/getLocalNetworkGateway:getLocalNetworkGateway", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getLocalNetworkGateway. type LookupLocalNetworkGatewayArgs struct { // The name of the Local Network Gateway. Name string `pulumi:"name"` // The name of the Resource Group where the Local Network Gateway exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getLocalNetworkGateway. type LookupLocalNetworkGatewayResult struct { // The list of string CIDRs representing the address spaces the gateway exposes. AddressSpaces []string `pulumi:"addressSpaces"` // A `bgpSettings` block as defined below containing the Local Network Gateway's BGP speaker settings. BgpSettings []GetLocalNetworkGatewayBgpSetting `pulumi:"bgpSettings"` // The gateway IP address the Local Network Gateway uses. GatewayAddress string `pulumi:"gatewayAddress"` // The gateway FQDN the Local Network Gateway uses. GatewayFqdn string `pulumi:"gatewayFqdn"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region where the Local Network Gateway exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the Local Network Gateway. Tags map[string]string `pulumi:"tags"` } func LookupLocalNetworkGatewayOutput(ctx *pulumi.Context, args LookupLocalNetworkGatewayOutputArgs, opts ...pulumi.InvokeOption) LookupLocalNetworkGatewayResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupLocalNetworkGatewayResultOutput, error) { args := v.(LookupLocalNetworkGatewayArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getLocalNetworkGateway:getLocalNetworkGateway", args, LookupLocalNetworkGatewayResultOutput{}, options).(LookupLocalNetworkGatewayResultOutput), nil }).(LookupLocalNetworkGatewayResultOutput) } // A collection of arguments for invoking getLocalNetworkGateway. type LookupLocalNetworkGatewayOutputArgs struct { // The name of the Local Network Gateway. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Local Network Gateway exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupLocalNetworkGatewayOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupLocalNetworkGatewayArgs)(nil)).Elem() } // A collection of values returned by getLocalNetworkGateway. type LookupLocalNetworkGatewayResultOutput struct{ *pulumi.OutputState } func (LookupLocalNetworkGatewayResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupLocalNetworkGatewayResult)(nil)).Elem() } func (o LookupLocalNetworkGatewayResultOutput) ToLookupLocalNetworkGatewayResultOutput() LookupLocalNetworkGatewayResultOutput { return o } func (o LookupLocalNetworkGatewayResultOutput) ToLookupLocalNetworkGatewayResultOutputWithContext(ctx context.Context) LookupLocalNetworkGatewayResultOutput { return o } // The list of string CIDRs representing the address spaces the gateway exposes. func (o LookupLocalNetworkGatewayResultOutput) AddressSpaces() pulumi.StringArrayOutput { return o.ApplyT(func(v LookupLocalNetworkGatewayResult) []string { return v.AddressSpaces }).(pulumi.StringArrayOutput) } // A `bgpSettings` block as defined below containing the Local Network Gateway's BGP speaker settings. func (o LookupLocalNetworkGatewayResultOutput) BgpSettings() GetLocalNetworkGatewayBgpSettingArrayOutput { return o.ApplyT(func(v LookupLocalNetworkGatewayResult) []GetLocalNetworkGatewayBgpSetting { return v.BgpSettings }).(GetLocalNetworkGatewayBgpSettingArrayOutput) } // The gateway IP address the Local Network Gateway uses. func (o LookupLocalNetworkGatewayResultOutput) GatewayAddress() pulumi.StringOutput { return o.ApplyT(func(v LookupLocalNetworkGatewayResult) string { return v.GatewayAddress }).(pulumi.StringOutput) } // The gateway FQDN the Local Network Gateway uses. func (o LookupLocalNetworkGatewayResultOutput) GatewayFqdn() pulumi.StringOutput { return o.ApplyT(func(v LookupLocalNetworkGatewayResult) string { return v.GatewayFqdn }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupLocalNetworkGatewayResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupLocalNetworkGatewayResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region where the Local Network Gateway exists. func (o LookupLocalNetworkGatewayResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupLocalNetworkGatewayResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupLocalNetworkGatewayResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupLocalNetworkGatewayResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupLocalNetworkGatewayResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupLocalNetworkGatewayResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the Local Network Gateway. func (o LookupLocalNetworkGatewayResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupLocalNetworkGatewayResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupLocalNetworkGatewayResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/virtualWan.go
sdk/go/azure/network/virtualWan.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Virtual WAN. // // ## 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/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 = network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{ // Name: pulumi.String("example-vwan"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Virtual WAN can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/virtualWan:VirtualWan example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualWans/testvwan // ``` type VirtualWan struct { pulumi.CustomResourceState // Boolean flag to specify whether branch to branch traffic is allowed. Defaults to `true`. AllowBranchToBranchTraffic pulumi.BoolPtrOutput `pulumi:"allowBranchToBranchTraffic"` // Boolean flag to specify whether VPN encryption is disabled. Defaults to `false`. DisableVpnEncryption pulumi.BoolPtrOutput `pulumi:"disableVpnEncryption"` // 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 Virtual WAN. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the Office365 local breakout category. Possible values include: `Optimize`, `OptimizeAndAllow`, `All`, `None`. Defaults to `None`. Office365LocalBreakoutCategory pulumi.StringPtrOutput `pulumi:"office365LocalBreakoutCategory"` // The name of the resource group in which to create the Virtual WAN. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the Virtual WAN. Tags pulumi.StringMapOutput `pulumi:"tags"` // Specifies the Virtual WAN type. Possible Values include: `Basic` and `Standard`. Defaults to `Standard`. Type pulumi.StringPtrOutput `pulumi:"type"` } // NewVirtualWan registers a new resource with the given unique name, arguments, and options. func NewVirtualWan(ctx *pulumi.Context, name string, args *VirtualWanArgs, opts ...pulumi.ResourceOption) (*VirtualWan, 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 VirtualWan err := ctx.RegisterResource("azure:network/virtualWan:VirtualWan", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualWan gets an existing VirtualWan 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 GetVirtualWan(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualWanState, opts ...pulumi.ResourceOption) (*VirtualWan, error) { var resource VirtualWan err := ctx.ReadResource("azure:network/virtualWan:VirtualWan", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualWan resources. type virtualWanState struct { // Boolean flag to specify whether branch to branch traffic is allowed. Defaults to `true`. AllowBranchToBranchTraffic *bool `pulumi:"allowBranchToBranchTraffic"` // Boolean flag to specify whether VPN encryption is disabled. Defaults to `false`. DisableVpnEncryption *bool `pulumi:"disableVpnEncryption"` // 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 Virtual WAN. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the Office365 local breakout category. Possible values include: `Optimize`, `OptimizeAndAllow`, `All`, `None`. Defaults to `None`. Office365LocalBreakoutCategory *string `pulumi:"office365LocalBreakoutCategory"` // The name of the resource group in which to create the Virtual WAN. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the Virtual WAN. Tags map[string]string `pulumi:"tags"` // Specifies the Virtual WAN type. Possible Values include: `Basic` and `Standard`. Defaults to `Standard`. Type *string `pulumi:"type"` } type VirtualWanState struct { // Boolean flag to specify whether branch to branch traffic is allowed. Defaults to `true`. AllowBranchToBranchTraffic pulumi.BoolPtrInput // Boolean flag to specify whether VPN encryption is disabled. Defaults to `false`. DisableVpnEncryption 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 Virtual WAN. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the Office365 local breakout category. Possible values include: `Optimize`, `OptimizeAndAllow`, `All`, `None`. Defaults to `None`. Office365LocalBreakoutCategory pulumi.StringPtrInput // The name of the resource group in which to create the Virtual WAN. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the Virtual WAN. Tags pulumi.StringMapInput // Specifies the Virtual WAN type. Possible Values include: `Basic` and `Standard`. Defaults to `Standard`. Type pulumi.StringPtrInput } func (VirtualWanState) ElementType() reflect.Type { return reflect.TypeOf((*virtualWanState)(nil)).Elem() } type virtualWanArgs struct { // Boolean flag to specify whether branch to branch traffic is allowed. Defaults to `true`. AllowBranchToBranchTraffic *bool `pulumi:"allowBranchToBranchTraffic"` // Boolean flag to specify whether VPN encryption is disabled. Defaults to `false`. DisableVpnEncryption *bool `pulumi:"disableVpnEncryption"` // 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 Virtual WAN. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the Office365 local breakout category. Possible values include: `Optimize`, `OptimizeAndAllow`, `All`, `None`. Defaults to `None`. Office365LocalBreakoutCategory *string `pulumi:"office365LocalBreakoutCategory"` // The name of the resource group in which to create the Virtual WAN. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the Virtual WAN. Tags map[string]string `pulumi:"tags"` // Specifies the Virtual WAN type. Possible Values include: `Basic` and `Standard`. Defaults to `Standard`. Type *string `pulumi:"type"` } // The set of arguments for constructing a VirtualWan resource. type VirtualWanArgs struct { // Boolean flag to specify whether branch to branch traffic is allowed. Defaults to `true`. AllowBranchToBranchTraffic pulumi.BoolPtrInput // Boolean flag to specify whether VPN encryption is disabled. Defaults to `false`. DisableVpnEncryption 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 Virtual WAN. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the Office365 local breakout category. Possible values include: `Optimize`, `OptimizeAndAllow`, `All`, `None`. Defaults to `None`. Office365LocalBreakoutCategory pulumi.StringPtrInput // The name of the resource group in which to create the Virtual WAN. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the Virtual WAN. Tags pulumi.StringMapInput // Specifies the Virtual WAN type. Possible Values include: `Basic` and `Standard`. Defaults to `Standard`. Type pulumi.StringPtrInput } func (VirtualWanArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualWanArgs)(nil)).Elem() } type VirtualWanInput interface { pulumi.Input ToVirtualWanOutput() VirtualWanOutput ToVirtualWanOutputWithContext(ctx context.Context) VirtualWanOutput } func (*VirtualWan) ElementType() reflect.Type { return reflect.TypeOf((**VirtualWan)(nil)).Elem() } func (i *VirtualWan) ToVirtualWanOutput() VirtualWanOutput { return i.ToVirtualWanOutputWithContext(context.Background()) } func (i *VirtualWan) ToVirtualWanOutputWithContext(ctx context.Context) VirtualWanOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualWanOutput) } // VirtualWanArrayInput is an input type that accepts VirtualWanArray and VirtualWanArrayOutput values. // You can construct a concrete instance of `VirtualWanArrayInput` via: // // VirtualWanArray{ VirtualWanArgs{...} } type VirtualWanArrayInput interface { pulumi.Input ToVirtualWanArrayOutput() VirtualWanArrayOutput ToVirtualWanArrayOutputWithContext(context.Context) VirtualWanArrayOutput } type VirtualWanArray []VirtualWanInput func (VirtualWanArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualWan)(nil)).Elem() } func (i VirtualWanArray) ToVirtualWanArrayOutput() VirtualWanArrayOutput { return i.ToVirtualWanArrayOutputWithContext(context.Background()) } func (i VirtualWanArray) ToVirtualWanArrayOutputWithContext(ctx context.Context) VirtualWanArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualWanArrayOutput) } // VirtualWanMapInput is an input type that accepts VirtualWanMap and VirtualWanMapOutput values. // You can construct a concrete instance of `VirtualWanMapInput` via: // // VirtualWanMap{ "key": VirtualWanArgs{...} } type VirtualWanMapInput interface { pulumi.Input ToVirtualWanMapOutput() VirtualWanMapOutput ToVirtualWanMapOutputWithContext(context.Context) VirtualWanMapOutput } type VirtualWanMap map[string]VirtualWanInput func (VirtualWanMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualWan)(nil)).Elem() } func (i VirtualWanMap) ToVirtualWanMapOutput() VirtualWanMapOutput { return i.ToVirtualWanMapOutputWithContext(context.Background()) } func (i VirtualWanMap) ToVirtualWanMapOutputWithContext(ctx context.Context) VirtualWanMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualWanMapOutput) } type VirtualWanOutput struct{ *pulumi.OutputState } func (VirtualWanOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualWan)(nil)).Elem() } func (o VirtualWanOutput) ToVirtualWanOutput() VirtualWanOutput { return o } func (o VirtualWanOutput) ToVirtualWanOutputWithContext(ctx context.Context) VirtualWanOutput { return o } // Boolean flag to specify whether branch to branch traffic is allowed. Defaults to `true`. func (o VirtualWanOutput) AllowBranchToBranchTraffic() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualWan) pulumi.BoolPtrOutput { return v.AllowBranchToBranchTraffic }).(pulumi.BoolPtrOutput) } // Boolean flag to specify whether VPN encryption is disabled. Defaults to `false`. func (o VirtualWanOutput) DisableVpnEncryption() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualWan) pulumi.BoolPtrOutput { return v.DisableVpnEncryption }).(pulumi.BoolPtrOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o VirtualWanOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *VirtualWan) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the Virtual WAN. Changing this forces a new resource to be created. func (o VirtualWanOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualWan) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the Office365 local breakout category. Possible values include: `Optimize`, `OptimizeAndAllow`, `All`, `None`. Defaults to `None`. func (o VirtualWanOutput) Office365LocalBreakoutCategory() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualWan) pulumi.StringPtrOutput { return v.Office365LocalBreakoutCategory }).(pulumi.StringPtrOutput) } // The name of the resource group in which to create the Virtual WAN. Changing this forces a new resource to be created. func (o VirtualWanOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualWan) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the Virtual WAN. func (o VirtualWanOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *VirtualWan) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Specifies the Virtual WAN type. Possible Values include: `Basic` and `Standard`. Defaults to `Standard`. func (o VirtualWanOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualWan) pulumi.StringPtrOutput { return v.Type }).(pulumi.StringPtrOutput) } type VirtualWanArrayOutput struct{ *pulumi.OutputState } func (VirtualWanArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualWan)(nil)).Elem() } func (o VirtualWanArrayOutput) ToVirtualWanArrayOutput() VirtualWanArrayOutput { return o } func (o VirtualWanArrayOutput) ToVirtualWanArrayOutputWithContext(ctx context.Context) VirtualWanArrayOutput { return o } func (o VirtualWanArrayOutput) Index(i pulumi.IntInput) VirtualWanOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualWan { return vs[0].([]*VirtualWan)[vs[1].(int)] }).(VirtualWanOutput) } type VirtualWanMapOutput struct{ *pulumi.OutputState } func (VirtualWanMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualWan)(nil)).Elem() } func (o VirtualWanMapOutput) ToVirtualWanMapOutput() VirtualWanMapOutput { return o } func (o VirtualWanMapOutput) ToVirtualWanMapOutputWithContext(ctx context.Context) VirtualWanMapOutput { return o } func (o VirtualWanMapOutput) MapIndex(k pulumi.StringInput) VirtualWanOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualWan { return vs[0].(map[string]*VirtualWan)[vs[1].(string)] }).(VirtualWanOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualWanInput)(nil)).Elem(), &VirtualWan{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualWanArrayInput)(nil)).Elem(), VirtualWanArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualWanMapInput)(nil)).Elem(), VirtualWanMap{}) pulumi.RegisterOutputType(VirtualWanOutput{}) pulumi.RegisterOutputType(VirtualWanArrayOutput{}) pulumi.RegisterOutputType(VirtualWanMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkInterfaceApplicationGatewayBackendAddressPoolAssociation.go
sdk/go/azure/network/networkInterfaceApplicationGatewayBackendAddressPoolAssociation.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages the association between a Network Interface and a Application Gateway's Backend Address Pool. // // ## Example Usage // // ```go // package main // // import ( // // "fmt" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // frontend, err := network.NewSubnet(ctx, "frontend", &network.SubnetArgs{ // Name: pulumi.String("frontend"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // }) // if err != nil { // return err // } // backend, err := network.NewSubnet(ctx, "backend", &network.SubnetArgs{ // Name: pulumi.String("backend"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("example-pip"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // }) // if err != nil { // return err // } // backendAddressPoolName := exampleVirtualNetwork.Name.ApplyT(func(name string) (string, error) { // return fmt.Sprintf("%v-beap", name), nil // }).(pulumi.StringOutput) // frontendPortName := exampleVirtualNetwork.Name.ApplyT(func(name string) (string, error) { // return fmt.Sprintf("%v-feport", name), nil // }).(pulumi.StringOutput) // frontendIpConfigurationName := exampleVirtualNetwork.Name.ApplyT(func(name string) (string, error) { // return fmt.Sprintf("%v-feip", name), nil // }).(pulumi.StringOutput) // httpSettingName := exampleVirtualNetwork.Name.ApplyT(func(name string) (string, error) { // return fmt.Sprintf("%v-be-htst", name), nil // }).(pulumi.StringOutput) // listenerName := exampleVirtualNetwork.Name.ApplyT(func(name string) (string, error) { // return fmt.Sprintf("%v-httplstn", name), nil // }).(pulumi.StringOutput) // requestRoutingRuleName := exampleVirtualNetwork.Name.ApplyT(func(name string) (string, error) { // return fmt.Sprintf("%v-rqrt", name), nil // }).(pulumi.StringOutput) // network, err := network.NewApplicationGateway(ctx, "network", &network.ApplicationGatewayArgs{ // Name: pulumi.String("example-appgateway"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: &network.ApplicationGatewaySkuArgs{ // Name: pulumi.String("Standard_v2"), // Tier: pulumi.String("Standard_v2"), // Capacity: pulumi.Int(2), // }, // GatewayIpConfigurations: network.ApplicationGatewayGatewayIpConfigurationArray{ // &network.ApplicationGatewayGatewayIpConfigurationArgs{ // Name: pulumi.String("my-gateway-ip-configuration"), // SubnetId: backend.ID(), // }, // }, // FrontendPorts: network.ApplicationGatewayFrontendPortArray{ // &network.ApplicationGatewayFrontendPortArgs{ // Name: pulumi.String(frontendPortName), // Port: pulumi.Int(80), // }, // }, // FrontendIpConfigurations: network.ApplicationGatewayFrontendIpConfigurationArray{ // &network.ApplicationGatewayFrontendIpConfigurationArgs{ // Name: pulumi.String(frontendIpConfigurationName), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // BackendAddressPools: network.ApplicationGatewayBackendAddressPoolArray{ // &network.ApplicationGatewayBackendAddressPoolArgs{ // Name: pulumi.String(backendAddressPoolName), // }, // }, // BackendHttpSettings: network.ApplicationGatewayBackendHttpSettingArray{ // &network.ApplicationGatewayBackendHttpSettingArgs{ // Name: pulumi.String(httpSettingName), // CookieBasedAffinity: pulumi.String("Disabled"), // Port: pulumi.Int(80), // Protocol: pulumi.String("Http"), // RequestTimeout: pulumi.Int(1), // }, // }, // HttpListeners: network.ApplicationGatewayHttpListenerArray{ // &network.ApplicationGatewayHttpListenerArgs{ // Name: pulumi.String(listenerName), // FrontendIpConfigurationName: pulumi.String(frontendIpConfigurationName), // FrontendPortName: pulumi.String(frontendPortName), // Protocol: pulumi.String("Http"), // }, // }, // RequestRoutingRules: network.ApplicationGatewayRequestRoutingRuleArray{ // &network.ApplicationGatewayRequestRoutingRuleArgs{ // Name: pulumi.String(requestRoutingRuleName), // RuleType: pulumi.String("Basic"), // Priority: pulumi.Int(25), // HttpListenerName: pulumi.String(listenerName), // BackendAddressPoolName: pulumi.String(backendAddressPoolName), // BackendHttpSettingsName: pulumi.String(httpSettingName), // }, // }, // }) // 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("testconfiguration1"), // SubnetId: frontend.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkInterfaceApplicationGatewayBackendAddressPoolAssociation(ctx, "example", &network.NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArgs{ // NetworkInterfaceId: exampleNetworkInterface.ID(), // IpConfigurationName: pulumi.String("testconfiguration1"), // BackendAddressPoolId: pulumi.String(network.BackendAddressPools.ApplyT(func(backendAddressPools []network.ApplicationGatewayBackendAddressPool) (*string, error) { // return &backendAddressPools[0].Id, nil // }).(pulumi.StringPtrOutput)), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Associations between Network Interfaces and Application Gateway Backend Address Pools can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkInterfaceApplicationGatewayBackendAddressPoolAssociation:NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation association1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkInterfaces/nic1/ipConfigurations/example|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/applicationGateways/gateway1/backendAddressPools/pool1 // ``` type NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation struct { pulumi.CustomResourceState // The ID of the Application Gateway's Backend Address Pool which this Network Interface which should be connected to. Changing this forces a new resource to be created. BackendAddressPoolId pulumi.StringOutput `pulumi:"backendAddressPoolId"` // The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. IpConfigurationName pulumi.StringOutput `pulumi:"ipConfigurationName"` // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId pulumi.StringOutput `pulumi:"networkInterfaceId"` } // NewNetworkInterfaceApplicationGatewayBackendAddressPoolAssociation registers a new resource with the given unique name, arguments, and options. func NewNetworkInterfaceApplicationGatewayBackendAddressPoolAssociation(ctx *pulumi.Context, name string, args *NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArgs, opts ...pulumi.ResourceOption) (*NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.BackendAddressPoolId == nil { return nil, errors.New("invalid value for required argument 'BackendAddressPoolId'") } if args.IpConfigurationName == nil { return nil, errors.New("invalid value for required argument 'IpConfigurationName'") } if args.NetworkInterfaceId == nil { return nil, errors.New("invalid value for required argument 'NetworkInterfaceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation err := ctx.RegisterResource("azure:network/networkInterfaceApplicationGatewayBackendAddressPoolAssociation:NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkInterfaceApplicationGatewayBackendAddressPoolAssociation gets an existing NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation 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 GetNetworkInterfaceApplicationGatewayBackendAddressPoolAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationState, opts ...pulumi.ResourceOption) (*NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation, error) { var resource NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation err := ctx.ReadResource("azure:network/networkInterfaceApplicationGatewayBackendAddressPoolAssociation:NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation resources. type networkInterfaceApplicationGatewayBackendAddressPoolAssociationState struct { // The ID of the Application Gateway's Backend Address Pool which this Network Interface which should be connected to. Changing this forces a new resource to be created. BackendAddressPoolId *string `pulumi:"backendAddressPoolId"` // The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. IpConfigurationName *string `pulumi:"ipConfigurationName"` // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId *string `pulumi:"networkInterfaceId"` } type NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationState struct { // The ID of the Application Gateway's Backend Address Pool which this Network Interface which should be connected to. Changing this forces a new resource to be created. BackendAddressPoolId pulumi.StringPtrInput // The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. IpConfigurationName pulumi.StringPtrInput // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId pulumi.StringPtrInput } func (NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationState) ElementType() reflect.Type { return reflect.TypeOf((*networkInterfaceApplicationGatewayBackendAddressPoolAssociationState)(nil)).Elem() } type networkInterfaceApplicationGatewayBackendAddressPoolAssociationArgs struct { // The ID of the Application Gateway's Backend Address Pool which this Network Interface which should be connected to. Changing this forces a new resource to be created. BackendAddressPoolId string `pulumi:"backendAddressPoolId"` // The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. IpConfigurationName string `pulumi:"ipConfigurationName"` // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId string `pulumi:"networkInterfaceId"` } // The set of arguments for constructing a NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation resource. type NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArgs struct { // The ID of the Application Gateway's Backend Address Pool which this Network Interface which should be connected to. Changing this forces a new resource to be created. BackendAddressPoolId pulumi.StringInput // The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. IpConfigurationName pulumi.StringInput // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId pulumi.StringInput } func (NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkInterfaceApplicationGatewayBackendAddressPoolAssociationArgs)(nil)).Elem() } type NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationInput interface { pulumi.Input ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput() NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutputWithContext(ctx context.Context) NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput } func (*NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation) ElementType() reflect.Type { return reflect.TypeOf((**NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation)(nil)).Elem() } func (i *NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation) ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput() NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput { return i.ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutputWithContext(context.Background()) } func (i *NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation) ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutputWithContext(ctx context.Context) NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput) } // NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayInput is an input type that accepts NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArray and NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput values. // You can construct a concrete instance of `NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayInput` via: // // NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArray{ NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArgs{...} } type NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayInput interface { pulumi.Input ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput() NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutputWithContext(context.Context) NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput } type NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArray []NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationInput func (NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation)(nil)).Elem() } func (i NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArray) ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput() NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput { return i.ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutputWithContext(context.Background()) } func (i NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArray) ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutputWithContext(ctx context.Context) NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput) } // NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapInput is an input type that accepts NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMap and NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput values. // You can construct a concrete instance of `NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapInput` via: // // NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMap{ "key": NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArgs{...} } type NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapInput interface { pulumi.Input ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput() NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutputWithContext(context.Context) NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput } type NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMap map[string]NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationInput func (NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation)(nil)).Elem() } func (i NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMap) ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput() NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput { return i.ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutputWithContext(context.Background()) } func (i NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMap) ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutputWithContext(ctx context.Context) NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput) } type NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput struct{ *pulumi.OutputState } func (NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation)(nil)).Elem() } func (o NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput) ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput() NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput { return o } func (o NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput) ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutputWithContext(ctx context.Context) NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput { return o } // The ID of the Application Gateway's Backend Address Pool which this Network Interface which should be connected to. Changing this forces a new resource to be created. func (o NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput) BackendAddressPoolId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation) pulumi.StringOutput { return v.BackendAddressPoolId }).(pulumi.StringOutput) } // The Name of the IP Configuration within the Network Interface which should be connected to the Backend Address Pool. Changing this forces a new resource to be created. func (o NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput) IpConfigurationName() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation) pulumi.StringOutput { return v.IpConfigurationName }).(pulumi.StringOutput) } // The ID of the Network Interface. Changing this forces a new resource to be created. func (o NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput) NetworkInterfaceId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation) pulumi.StringOutput { return v.NetworkInterfaceId }).(pulumi.StringOutput) } type NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput struct{ *pulumi.OutputState } func (NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation)(nil)).Elem() } func (o NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput) ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput() NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput { return o } func (o NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput) ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutputWithContext(ctx context.Context) NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput { return o } func (o NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput) Index(i pulumi.IntInput) NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation { return vs[0].([]*NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation)[vs[1].(int)] }).(NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput) } type NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput struct{ *pulumi.OutputState } func (NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation)(nil)).Elem() } func (o NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput) ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput() NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput { return o } func (o NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput) ToNetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutputWithContext(ctx context.Context) NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput { return o } func (o NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput) MapIndex(k pulumi.StringInput) NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation { return vs[0].(map[string]*NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation)[vs[1].(string)] }).(NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationInput)(nil)).Elem(), &NetworkInterfaceApplicationGatewayBackendAddressPoolAssociation{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayInput)(nil)).Elem(), NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapInput)(nil)).Elem(), NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMap{}) pulumi.RegisterOutputType(NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationOutput{}) pulumi.RegisterOutputType(NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationArrayOutput{}) pulumi.RegisterOutputType(NetworkInterfaceApplicationGatewayBackendAddressPoolAssociationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerRoutingRuleCollection.go
sdk/go/azure/network/networkManagerRoutingRuleCollection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/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 // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // Location: example.Location, // ResourceGroupName: example.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Routing"), // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerNetworkGroup(ctx, "example", &network.NetworkManagerNetworkGroupArgs{ // Name: pulumi.String("example-network-group"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // exampleNetworkManagerRoutingConfiguration, err := network.NewNetworkManagerRoutingConfiguration(ctx, "example", &network.NetworkManagerRoutingConfigurationArgs{ // Name: pulumi.String("example-routing-configuration"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerRoutingRuleCollection(ctx, "example", &network.NetworkManagerRoutingRuleCollectionArgs{ // Name: pulumi.String("example-routing-rule-collection"), // RoutingConfigurationId: exampleNetworkManagerRoutingConfiguration.ID(), // NetworkGroupIds: pulumi.StringArray{ // pulumi.String("azurerm_network_manager_network_group.example.id"), // }, // Description: pulumi.String("example routing rule collection"), // }) // 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 // // Network Manager Routing Rule Collections can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerRoutingRuleCollection:NetworkManagerRoutingRuleCollection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/manager1/routingConfigurations/conf1/ruleCollections/collection1 // ``` type NetworkManagerRoutingRuleCollection struct { pulumi.CustomResourceState // Whether to enable the BGP route propagation. Defaults to `false`. BgpRoutePropagationEnabled pulumi.BoolPtrOutput `pulumi:"bgpRoutePropagationEnabled"` // The description of the Network Manager Routing Rule Collection. Description pulumi.StringPtrOutput `pulumi:"description"` // The name which should be used for this Network Manager Routing Rule Collection. Changing this forces a new Network Manager Routing Rule Collection to be created. Name pulumi.StringOutput `pulumi:"name"` // A list of Network Group IDs which this Network Manager Routing Rule Collection applies to. NetworkGroupIds pulumi.StringArrayOutput `pulumi:"networkGroupIds"` // The ID of the Network Manager Routing Configuration. Changing this forces a new Network Manager Routing Rule Collection to be created. RoutingConfigurationId pulumi.StringOutput `pulumi:"routingConfigurationId"` } // NewNetworkManagerRoutingRuleCollection registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerRoutingRuleCollection(ctx *pulumi.Context, name string, args *NetworkManagerRoutingRuleCollectionArgs, opts ...pulumi.ResourceOption) (*NetworkManagerRoutingRuleCollection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NetworkGroupIds == nil { return nil, errors.New("invalid value for required argument 'NetworkGroupIds'") } if args.RoutingConfigurationId == nil { return nil, errors.New("invalid value for required argument 'RoutingConfigurationId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerRoutingRuleCollection err := ctx.RegisterResource("azure:network/networkManagerRoutingRuleCollection:NetworkManagerRoutingRuleCollection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerRoutingRuleCollection gets an existing NetworkManagerRoutingRuleCollection 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 GetNetworkManagerRoutingRuleCollection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerRoutingRuleCollectionState, opts ...pulumi.ResourceOption) (*NetworkManagerRoutingRuleCollection, error) { var resource NetworkManagerRoutingRuleCollection err := ctx.ReadResource("azure:network/networkManagerRoutingRuleCollection:NetworkManagerRoutingRuleCollection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerRoutingRuleCollection resources. type networkManagerRoutingRuleCollectionState struct { // Whether to enable the BGP route propagation. Defaults to `false`. BgpRoutePropagationEnabled *bool `pulumi:"bgpRoutePropagationEnabled"` // The description of the Network Manager Routing Rule Collection. Description *string `pulumi:"description"` // The name which should be used for this Network Manager Routing Rule Collection. Changing this forces a new Network Manager Routing Rule Collection to be created. Name *string `pulumi:"name"` // A list of Network Group IDs which this Network Manager Routing Rule Collection applies to. NetworkGroupIds []string `pulumi:"networkGroupIds"` // The ID of the Network Manager Routing Configuration. Changing this forces a new Network Manager Routing Rule Collection to be created. RoutingConfigurationId *string `pulumi:"routingConfigurationId"` } type NetworkManagerRoutingRuleCollectionState struct { // Whether to enable the BGP route propagation. Defaults to `false`. BgpRoutePropagationEnabled pulumi.BoolPtrInput // The description of the Network Manager Routing Rule Collection. Description pulumi.StringPtrInput // The name which should be used for this Network Manager Routing Rule Collection. Changing this forces a new Network Manager Routing Rule Collection to be created. Name pulumi.StringPtrInput // A list of Network Group IDs which this Network Manager Routing Rule Collection applies to. NetworkGroupIds pulumi.StringArrayInput // The ID of the Network Manager Routing Configuration. Changing this forces a new Network Manager Routing Rule Collection to be created. RoutingConfigurationId pulumi.StringPtrInput } func (NetworkManagerRoutingRuleCollectionState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerRoutingRuleCollectionState)(nil)).Elem() } type networkManagerRoutingRuleCollectionArgs struct { // Whether to enable the BGP route propagation. Defaults to `false`. BgpRoutePropagationEnabled *bool `pulumi:"bgpRoutePropagationEnabled"` // The description of the Network Manager Routing Rule Collection. Description *string `pulumi:"description"` // The name which should be used for this Network Manager Routing Rule Collection. Changing this forces a new Network Manager Routing Rule Collection to be created. Name *string `pulumi:"name"` // A list of Network Group IDs which this Network Manager Routing Rule Collection applies to. NetworkGroupIds []string `pulumi:"networkGroupIds"` // The ID of the Network Manager Routing Configuration. Changing this forces a new Network Manager Routing Rule Collection to be created. RoutingConfigurationId string `pulumi:"routingConfigurationId"` } // The set of arguments for constructing a NetworkManagerRoutingRuleCollection resource. type NetworkManagerRoutingRuleCollectionArgs struct { // Whether to enable the BGP route propagation. Defaults to `false`. BgpRoutePropagationEnabled pulumi.BoolPtrInput // The description of the Network Manager Routing Rule Collection. Description pulumi.StringPtrInput // The name which should be used for this Network Manager Routing Rule Collection. Changing this forces a new Network Manager Routing Rule Collection to be created. Name pulumi.StringPtrInput // A list of Network Group IDs which this Network Manager Routing Rule Collection applies to. NetworkGroupIds pulumi.StringArrayInput // The ID of the Network Manager Routing Configuration. Changing this forces a new Network Manager Routing Rule Collection to be created. RoutingConfigurationId pulumi.StringInput } func (NetworkManagerRoutingRuleCollectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerRoutingRuleCollectionArgs)(nil)).Elem() } type NetworkManagerRoutingRuleCollectionInput interface { pulumi.Input ToNetworkManagerRoutingRuleCollectionOutput() NetworkManagerRoutingRuleCollectionOutput ToNetworkManagerRoutingRuleCollectionOutputWithContext(ctx context.Context) NetworkManagerRoutingRuleCollectionOutput } func (*NetworkManagerRoutingRuleCollection) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerRoutingRuleCollection)(nil)).Elem() } func (i *NetworkManagerRoutingRuleCollection) ToNetworkManagerRoutingRuleCollectionOutput() NetworkManagerRoutingRuleCollectionOutput { return i.ToNetworkManagerRoutingRuleCollectionOutputWithContext(context.Background()) } func (i *NetworkManagerRoutingRuleCollection) ToNetworkManagerRoutingRuleCollectionOutputWithContext(ctx context.Context) NetworkManagerRoutingRuleCollectionOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerRoutingRuleCollectionOutput) } // NetworkManagerRoutingRuleCollectionArrayInput is an input type that accepts NetworkManagerRoutingRuleCollectionArray and NetworkManagerRoutingRuleCollectionArrayOutput values. // You can construct a concrete instance of `NetworkManagerRoutingRuleCollectionArrayInput` via: // // NetworkManagerRoutingRuleCollectionArray{ NetworkManagerRoutingRuleCollectionArgs{...} } type NetworkManagerRoutingRuleCollectionArrayInput interface { pulumi.Input ToNetworkManagerRoutingRuleCollectionArrayOutput() NetworkManagerRoutingRuleCollectionArrayOutput ToNetworkManagerRoutingRuleCollectionArrayOutputWithContext(context.Context) NetworkManagerRoutingRuleCollectionArrayOutput } type NetworkManagerRoutingRuleCollectionArray []NetworkManagerRoutingRuleCollectionInput func (NetworkManagerRoutingRuleCollectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerRoutingRuleCollection)(nil)).Elem() } func (i NetworkManagerRoutingRuleCollectionArray) ToNetworkManagerRoutingRuleCollectionArrayOutput() NetworkManagerRoutingRuleCollectionArrayOutput { return i.ToNetworkManagerRoutingRuleCollectionArrayOutputWithContext(context.Background()) } func (i NetworkManagerRoutingRuleCollectionArray) ToNetworkManagerRoutingRuleCollectionArrayOutputWithContext(ctx context.Context) NetworkManagerRoutingRuleCollectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerRoutingRuleCollectionArrayOutput) } // NetworkManagerRoutingRuleCollectionMapInput is an input type that accepts NetworkManagerRoutingRuleCollectionMap and NetworkManagerRoutingRuleCollectionMapOutput values. // You can construct a concrete instance of `NetworkManagerRoutingRuleCollectionMapInput` via: // // NetworkManagerRoutingRuleCollectionMap{ "key": NetworkManagerRoutingRuleCollectionArgs{...} } type NetworkManagerRoutingRuleCollectionMapInput interface { pulumi.Input ToNetworkManagerRoutingRuleCollectionMapOutput() NetworkManagerRoutingRuleCollectionMapOutput ToNetworkManagerRoutingRuleCollectionMapOutputWithContext(context.Context) NetworkManagerRoutingRuleCollectionMapOutput } type NetworkManagerRoutingRuleCollectionMap map[string]NetworkManagerRoutingRuleCollectionInput func (NetworkManagerRoutingRuleCollectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerRoutingRuleCollection)(nil)).Elem() } func (i NetworkManagerRoutingRuleCollectionMap) ToNetworkManagerRoutingRuleCollectionMapOutput() NetworkManagerRoutingRuleCollectionMapOutput { return i.ToNetworkManagerRoutingRuleCollectionMapOutputWithContext(context.Background()) } func (i NetworkManagerRoutingRuleCollectionMap) ToNetworkManagerRoutingRuleCollectionMapOutputWithContext(ctx context.Context) NetworkManagerRoutingRuleCollectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerRoutingRuleCollectionMapOutput) } type NetworkManagerRoutingRuleCollectionOutput struct{ *pulumi.OutputState } func (NetworkManagerRoutingRuleCollectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerRoutingRuleCollection)(nil)).Elem() } func (o NetworkManagerRoutingRuleCollectionOutput) ToNetworkManagerRoutingRuleCollectionOutput() NetworkManagerRoutingRuleCollectionOutput { return o } func (o NetworkManagerRoutingRuleCollectionOutput) ToNetworkManagerRoutingRuleCollectionOutputWithContext(ctx context.Context) NetworkManagerRoutingRuleCollectionOutput { return o } // Whether to enable the BGP route propagation. Defaults to `false`. func (o NetworkManagerRoutingRuleCollectionOutput) BgpRoutePropagationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *NetworkManagerRoutingRuleCollection) pulumi.BoolPtrOutput { return v.BgpRoutePropagationEnabled }).(pulumi.BoolPtrOutput) } // The description of the Network Manager Routing Rule Collection. func (o NetworkManagerRoutingRuleCollectionOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerRoutingRuleCollection) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // The name which should be used for this Network Manager Routing Rule Collection. Changing this forces a new Network Manager Routing Rule Collection to be created. func (o NetworkManagerRoutingRuleCollectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerRoutingRuleCollection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A list of Network Group IDs which this Network Manager Routing Rule Collection applies to. func (o NetworkManagerRoutingRuleCollectionOutput) NetworkGroupIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkManagerRoutingRuleCollection) pulumi.StringArrayOutput { return v.NetworkGroupIds }).(pulumi.StringArrayOutput) } // The ID of the Network Manager Routing Configuration. Changing this forces a new Network Manager Routing Rule Collection to be created. func (o NetworkManagerRoutingRuleCollectionOutput) RoutingConfigurationId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerRoutingRuleCollection) pulumi.StringOutput { return v.RoutingConfigurationId }).(pulumi.StringOutput) } type NetworkManagerRoutingRuleCollectionArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerRoutingRuleCollectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerRoutingRuleCollection)(nil)).Elem() } func (o NetworkManagerRoutingRuleCollectionArrayOutput) ToNetworkManagerRoutingRuleCollectionArrayOutput() NetworkManagerRoutingRuleCollectionArrayOutput { return o } func (o NetworkManagerRoutingRuleCollectionArrayOutput) ToNetworkManagerRoutingRuleCollectionArrayOutputWithContext(ctx context.Context) NetworkManagerRoutingRuleCollectionArrayOutput { return o } func (o NetworkManagerRoutingRuleCollectionArrayOutput) Index(i pulumi.IntInput) NetworkManagerRoutingRuleCollectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerRoutingRuleCollection { return vs[0].([]*NetworkManagerRoutingRuleCollection)[vs[1].(int)] }).(NetworkManagerRoutingRuleCollectionOutput) } type NetworkManagerRoutingRuleCollectionMapOutput struct{ *pulumi.OutputState } func (NetworkManagerRoutingRuleCollectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerRoutingRuleCollection)(nil)).Elem() } func (o NetworkManagerRoutingRuleCollectionMapOutput) ToNetworkManagerRoutingRuleCollectionMapOutput() NetworkManagerRoutingRuleCollectionMapOutput { return o } func (o NetworkManagerRoutingRuleCollectionMapOutput) ToNetworkManagerRoutingRuleCollectionMapOutputWithContext(ctx context.Context) NetworkManagerRoutingRuleCollectionMapOutput { return o } func (o NetworkManagerRoutingRuleCollectionMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerRoutingRuleCollectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerRoutingRuleCollection { return vs[0].(map[string]*NetworkManagerRoutingRuleCollection)[vs[1].(string)] }).(NetworkManagerRoutingRuleCollectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerRoutingRuleCollectionInput)(nil)).Elem(), &NetworkManagerRoutingRuleCollection{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerRoutingRuleCollectionArrayInput)(nil)).Elem(), NetworkManagerRoutingRuleCollectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerRoutingRuleCollectionMapInput)(nil)).Elem(), NetworkManagerRoutingRuleCollectionMap{}) pulumi.RegisterOutputType(NetworkManagerRoutingRuleCollectionOutput{}) pulumi.RegisterOutputType(NetworkManagerRoutingRuleCollectionArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerRoutingRuleCollectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/getVpnGateway.go
sdk/go/azure/network/getVpnGateway.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network 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 VPN Gateway within a Virtual Hub. // // ## Example Usage // // ```go // package main // // import ( // // "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 := network.LookupVpnGateway(ctx, &network.LookupVpnGatewayArgs{ // Name: "existing-local-vpn_gateway", // ResourceGroupName: "existing-vpn_gateway", // }, nil) // if err != nil { // return err // } // ctx.Export("azurermVpnGatewayId", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 func LookupVpnGateway(ctx *pulumi.Context, args *LookupVpnGatewayArgs, opts ...pulumi.InvokeOption) (*LookupVpnGatewayResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupVpnGatewayResult err := ctx.Invoke("azure:network/getVpnGateway:getVpnGateway", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getVpnGateway. type LookupVpnGatewayArgs struct { // The Name of the VPN Gateway. Name string `pulumi:"name"` // The name of the Resource Group where the VPN Gateway exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getVpnGateway. type LookupVpnGatewayResult struct { // A `bgpSettings` block as defined below. BgpSettings []GetVpnGatewayBgpSetting `pulumi:"bgpSettings"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // An `ipConfiguration` block as defined below. IpConfigurations []GetVpnGatewayIpConfiguration `pulumi:"ipConfigurations"` // The Azure location where the VPN Gateway exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // The Scale Unit of this VPN Gateway. ScaleUnit int `pulumi:"scaleUnit"` // A mapping of tags assigned to the VPN Gateway. Tags map[string]string `pulumi:"tags"` // The ID of the Virtual Hub within which this VPN Gateway has been created. VirtualHubId string `pulumi:"virtualHubId"` } func LookupVpnGatewayOutput(ctx *pulumi.Context, args LookupVpnGatewayOutputArgs, opts ...pulumi.InvokeOption) LookupVpnGatewayResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupVpnGatewayResultOutput, error) { args := v.(LookupVpnGatewayArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:network/getVpnGateway:getVpnGateway", args, LookupVpnGatewayResultOutput{}, options).(LookupVpnGatewayResultOutput), nil }).(LookupVpnGatewayResultOutput) } // A collection of arguments for invoking getVpnGateway. type LookupVpnGatewayOutputArgs struct { // The Name of the VPN Gateway. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the VPN Gateway exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupVpnGatewayOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupVpnGatewayArgs)(nil)).Elem() } // A collection of values returned by getVpnGateway. type LookupVpnGatewayResultOutput struct{ *pulumi.OutputState } func (LookupVpnGatewayResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupVpnGatewayResult)(nil)).Elem() } func (o LookupVpnGatewayResultOutput) ToLookupVpnGatewayResultOutput() LookupVpnGatewayResultOutput { return o } func (o LookupVpnGatewayResultOutput) ToLookupVpnGatewayResultOutputWithContext(ctx context.Context) LookupVpnGatewayResultOutput { return o } // A `bgpSettings` block as defined below. func (o LookupVpnGatewayResultOutput) BgpSettings() GetVpnGatewayBgpSettingArrayOutput { return o.ApplyT(func(v LookupVpnGatewayResult) []GetVpnGatewayBgpSetting { return v.BgpSettings }).(GetVpnGatewayBgpSettingArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupVpnGatewayResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupVpnGatewayResult) string { return v.Id }).(pulumi.StringOutput) } // An `ipConfiguration` block as defined below. func (o LookupVpnGatewayResultOutput) IpConfigurations() GetVpnGatewayIpConfigurationArrayOutput { return o.ApplyT(func(v LookupVpnGatewayResult) []GetVpnGatewayIpConfiguration { return v.IpConfigurations }).(GetVpnGatewayIpConfigurationArrayOutput) } // The Azure location where the VPN Gateway exists. func (o LookupVpnGatewayResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupVpnGatewayResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupVpnGatewayResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupVpnGatewayResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupVpnGatewayResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupVpnGatewayResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The Scale Unit of this VPN Gateway. func (o LookupVpnGatewayResultOutput) ScaleUnit() pulumi.IntOutput { return o.ApplyT(func(v LookupVpnGatewayResult) int { return v.ScaleUnit }).(pulumi.IntOutput) } // A mapping of tags assigned to the VPN Gateway. func (o LookupVpnGatewayResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupVpnGatewayResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // The ID of the Virtual Hub within which this VPN Gateway has been created. func (o LookupVpnGatewayResultOutput) VirtualHubId() pulumi.StringOutput { return o.ApplyT(func(v LookupVpnGatewayResult) string { return v.VirtualHubId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupVpnGatewayResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/securityPartnerProvider.go
sdk/go/azure/network/securityPartnerProvider.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Security Partner Provider which could be associated to virtual hub. // // ## 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/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-vwan"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{ // Name: pulumi.String("example-vhub"), // ResourceGroupName: example.Name, // Location: example.Location, // VirtualWanId: exampleVirtualWan.ID(), // AddressPrefix: pulumi.String("10.0.2.0/24"), // }) // if err != nil { // return err // } // exampleVpnGateway, err := network.NewVpnGateway(ctx, "example", &network.VpnGatewayArgs{ // Name: pulumi.String("example-vpngw"), // Location: example.Location, // ResourceGroupName: example.Name, // VirtualHubId: exampleVirtualHub.ID(), // }) // if err != nil { // return err // } // _, err = network.NewSecurityPartnerProvider(ctx, "example", &network.SecurityPartnerProviderArgs{ // Name: pulumi.String("example-spp"), // ResourceGroupName: example.Name, // Location: example.Location, // VirtualHubId: exampleVirtualHub.ID(), // SecurityProviderName: pulumi.String("IBoss"), // Tags: pulumi.StringMap{ // "ENV": pulumi.String("Prod"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // exampleVpnGateway, // })) // 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 // // Security Partner Providers can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/securityPartnerProvider:SecurityPartnerProvider example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/securityPartnerProviders/securityPartnerProvider1 // ``` type SecurityPartnerProvider struct { pulumi.CustomResourceState // The Azure Region where the Security Partner Provider should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Security Partner Provider. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Security Partner Provider should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The security provider name. Possible values are `ZScaler`, `IBoss` and `Checkpoint` is allowed. Changing this forces a new resource to be created. SecurityProviderName pulumi.StringOutput `pulumi:"securityProviderName"` // A mapping of tags which should be assigned to the Security Partner Provider. Tags pulumi.StringMapOutput `pulumi:"tags"` // The ID of the Virtual Hub within which this Security Partner Provider should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringPtrOutput `pulumi:"virtualHubId"` } // NewSecurityPartnerProvider registers a new resource with the given unique name, arguments, and options. func NewSecurityPartnerProvider(ctx *pulumi.Context, name string, args *SecurityPartnerProviderArgs, opts ...pulumi.ResourceOption) (*SecurityPartnerProvider, 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.SecurityProviderName == nil { return nil, errors.New("invalid value for required argument 'SecurityProviderName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SecurityPartnerProvider err := ctx.RegisterResource("azure:network/securityPartnerProvider:SecurityPartnerProvider", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSecurityPartnerProvider gets an existing SecurityPartnerProvider 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 GetSecurityPartnerProvider(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SecurityPartnerProviderState, opts ...pulumi.ResourceOption) (*SecurityPartnerProvider, error) { var resource SecurityPartnerProvider err := ctx.ReadResource("azure:network/securityPartnerProvider:SecurityPartnerProvider", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SecurityPartnerProvider resources. type securityPartnerProviderState struct { // The Azure Region where the Security Partner Provider should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for this Security Partner Provider. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Security Partner Provider should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The security provider name. Possible values are `ZScaler`, `IBoss` and `Checkpoint` is allowed. Changing this forces a new resource to be created. SecurityProviderName *string `pulumi:"securityProviderName"` // A mapping of tags which should be assigned to the Security Partner Provider. Tags map[string]string `pulumi:"tags"` // The ID of the Virtual Hub within which this Security Partner Provider should be created. Changing this forces a new resource to be created. VirtualHubId *string `pulumi:"virtualHubId"` } type SecurityPartnerProviderState struct { // The Azure Region where the Security Partner Provider should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for this Security Partner Provider. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Security Partner Provider should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The security provider name. Possible values are `ZScaler`, `IBoss` and `Checkpoint` is allowed. Changing this forces a new resource to be created. SecurityProviderName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Security Partner Provider. Tags pulumi.StringMapInput // The ID of the Virtual Hub within which this Security Partner Provider should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringPtrInput } func (SecurityPartnerProviderState) ElementType() reflect.Type { return reflect.TypeOf((*securityPartnerProviderState)(nil)).Elem() } type securityPartnerProviderArgs struct { // The Azure Region where the Security Partner Provider should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for this Security Partner Provider. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Security Partner Provider should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The security provider name. Possible values are `ZScaler`, `IBoss` and `Checkpoint` is allowed. Changing this forces a new resource to be created. SecurityProviderName string `pulumi:"securityProviderName"` // A mapping of tags which should be assigned to the Security Partner Provider. Tags map[string]string `pulumi:"tags"` // The ID of the Virtual Hub within which this Security Partner Provider should be created. Changing this forces a new resource to be created. VirtualHubId *string `pulumi:"virtualHubId"` } // The set of arguments for constructing a SecurityPartnerProvider resource. type SecurityPartnerProviderArgs struct { // The Azure Region where the Security Partner Provider should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for this Security Partner Provider. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Security Partner Provider should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The security provider name. Possible values are `ZScaler`, `IBoss` and `Checkpoint` is allowed. Changing this forces a new resource to be created. SecurityProviderName pulumi.StringInput // A mapping of tags which should be assigned to the Security Partner Provider. Tags pulumi.StringMapInput // The ID of the Virtual Hub within which this Security Partner Provider should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringPtrInput } func (SecurityPartnerProviderArgs) ElementType() reflect.Type { return reflect.TypeOf((*securityPartnerProviderArgs)(nil)).Elem() } type SecurityPartnerProviderInput interface { pulumi.Input ToSecurityPartnerProviderOutput() SecurityPartnerProviderOutput ToSecurityPartnerProviderOutputWithContext(ctx context.Context) SecurityPartnerProviderOutput } func (*SecurityPartnerProvider) ElementType() reflect.Type { return reflect.TypeOf((**SecurityPartnerProvider)(nil)).Elem() } func (i *SecurityPartnerProvider) ToSecurityPartnerProviderOutput() SecurityPartnerProviderOutput { return i.ToSecurityPartnerProviderOutputWithContext(context.Background()) } func (i *SecurityPartnerProvider) ToSecurityPartnerProviderOutputWithContext(ctx context.Context) SecurityPartnerProviderOutput { return pulumi.ToOutputWithContext(ctx, i).(SecurityPartnerProviderOutput) } // SecurityPartnerProviderArrayInput is an input type that accepts SecurityPartnerProviderArray and SecurityPartnerProviderArrayOutput values. // You can construct a concrete instance of `SecurityPartnerProviderArrayInput` via: // // SecurityPartnerProviderArray{ SecurityPartnerProviderArgs{...} } type SecurityPartnerProviderArrayInput interface { pulumi.Input ToSecurityPartnerProviderArrayOutput() SecurityPartnerProviderArrayOutput ToSecurityPartnerProviderArrayOutputWithContext(context.Context) SecurityPartnerProviderArrayOutput } type SecurityPartnerProviderArray []SecurityPartnerProviderInput func (SecurityPartnerProviderArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SecurityPartnerProvider)(nil)).Elem() } func (i SecurityPartnerProviderArray) ToSecurityPartnerProviderArrayOutput() SecurityPartnerProviderArrayOutput { return i.ToSecurityPartnerProviderArrayOutputWithContext(context.Background()) } func (i SecurityPartnerProviderArray) ToSecurityPartnerProviderArrayOutputWithContext(ctx context.Context) SecurityPartnerProviderArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SecurityPartnerProviderArrayOutput) } // SecurityPartnerProviderMapInput is an input type that accepts SecurityPartnerProviderMap and SecurityPartnerProviderMapOutput values. // You can construct a concrete instance of `SecurityPartnerProviderMapInput` via: // // SecurityPartnerProviderMap{ "key": SecurityPartnerProviderArgs{...} } type SecurityPartnerProviderMapInput interface { pulumi.Input ToSecurityPartnerProviderMapOutput() SecurityPartnerProviderMapOutput ToSecurityPartnerProviderMapOutputWithContext(context.Context) SecurityPartnerProviderMapOutput } type SecurityPartnerProviderMap map[string]SecurityPartnerProviderInput func (SecurityPartnerProviderMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SecurityPartnerProvider)(nil)).Elem() } func (i SecurityPartnerProviderMap) ToSecurityPartnerProviderMapOutput() SecurityPartnerProviderMapOutput { return i.ToSecurityPartnerProviderMapOutputWithContext(context.Background()) } func (i SecurityPartnerProviderMap) ToSecurityPartnerProviderMapOutputWithContext(ctx context.Context) SecurityPartnerProviderMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SecurityPartnerProviderMapOutput) } type SecurityPartnerProviderOutput struct{ *pulumi.OutputState } func (SecurityPartnerProviderOutput) ElementType() reflect.Type { return reflect.TypeOf((**SecurityPartnerProvider)(nil)).Elem() } func (o SecurityPartnerProviderOutput) ToSecurityPartnerProviderOutput() SecurityPartnerProviderOutput { return o } func (o SecurityPartnerProviderOutput) ToSecurityPartnerProviderOutputWithContext(ctx context.Context) SecurityPartnerProviderOutput { return o } // The Azure Region where the Security Partner Provider should exist. Changing this forces a new resource to be created. func (o SecurityPartnerProviderOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *SecurityPartnerProvider) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Security Partner Provider. Changing this forces a new resource to be created. func (o SecurityPartnerProviderOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SecurityPartnerProvider) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Security Partner Provider should exist. Changing this forces a new resource to be created. func (o SecurityPartnerProviderOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *SecurityPartnerProvider) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The security provider name. Possible values are `ZScaler`, `IBoss` and `Checkpoint` is allowed. Changing this forces a new resource to be created. func (o SecurityPartnerProviderOutput) SecurityProviderName() pulumi.StringOutput { return o.ApplyT(func(v *SecurityPartnerProvider) pulumi.StringOutput { return v.SecurityProviderName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Security Partner Provider. func (o SecurityPartnerProviderOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *SecurityPartnerProvider) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The ID of the Virtual Hub within which this Security Partner Provider should be created. Changing this forces a new resource to be created. func (o SecurityPartnerProviderOutput) VirtualHubId() pulumi.StringPtrOutput { return o.ApplyT(func(v *SecurityPartnerProvider) pulumi.StringPtrOutput { return v.VirtualHubId }).(pulumi.StringPtrOutput) } type SecurityPartnerProviderArrayOutput struct{ *pulumi.OutputState } func (SecurityPartnerProviderArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SecurityPartnerProvider)(nil)).Elem() } func (o SecurityPartnerProviderArrayOutput) ToSecurityPartnerProviderArrayOutput() SecurityPartnerProviderArrayOutput { return o } func (o SecurityPartnerProviderArrayOutput) ToSecurityPartnerProviderArrayOutputWithContext(ctx context.Context) SecurityPartnerProviderArrayOutput { return o } func (o SecurityPartnerProviderArrayOutput) Index(i pulumi.IntInput) SecurityPartnerProviderOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SecurityPartnerProvider { return vs[0].([]*SecurityPartnerProvider)[vs[1].(int)] }).(SecurityPartnerProviderOutput) } type SecurityPartnerProviderMapOutput struct{ *pulumi.OutputState } func (SecurityPartnerProviderMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SecurityPartnerProvider)(nil)).Elem() } func (o SecurityPartnerProviderMapOutput) ToSecurityPartnerProviderMapOutput() SecurityPartnerProviderMapOutput { return o } func (o SecurityPartnerProviderMapOutput) ToSecurityPartnerProviderMapOutputWithContext(ctx context.Context) SecurityPartnerProviderMapOutput { return o } func (o SecurityPartnerProviderMapOutput) MapIndex(k pulumi.StringInput) SecurityPartnerProviderOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SecurityPartnerProvider { return vs[0].(map[string]*SecurityPartnerProvider)[vs[1].(string)] }).(SecurityPartnerProviderOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SecurityPartnerProviderInput)(nil)).Elem(), &SecurityPartnerProvider{}) pulumi.RegisterInputType(reflect.TypeOf((*SecurityPartnerProviderArrayInput)(nil)).Elem(), SecurityPartnerProviderArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SecurityPartnerProviderMapInput)(nil)).Elem(), SecurityPartnerProviderMap{}) pulumi.RegisterOutputType(SecurityPartnerProviderOutput{}) pulumi.RegisterOutputType(SecurityPartnerProviderArrayOutput{}) pulumi.RegisterOutputType(SecurityPartnerProviderMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/firewallPolicyRuleCollectionGroup.go
sdk/go/azure/network/firewallPolicyRuleCollectionGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Firewall Policy Rule Collection 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/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 // } // exampleFirewallPolicy, err := network.NewFirewallPolicy(ctx, "example", &network.FirewallPolicyArgs{ // Name: pulumi.String("example-fwpolicy"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // _, err = network.NewFirewallPolicyRuleCollectionGroup(ctx, "example", &network.FirewallPolicyRuleCollectionGroupArgs{ // Name: pulumi.String("example-fwpolicy-rcg"), // FirewallPolicyId: exampleFirewallPolicy.ID(), // Priority: pulumi.Int(500), // ApplicationRuleCollections: network.FirewallPolicyRuleCollectionGroupApplicationRuleCollectionArray{ // &network.FirewallPolicyRuleCollectionGroupApplicationRuleCollectionArgs{ // Name: pulumi.String("app_rule_collection1"), // Priority: pulumi.Int(500), // Action: pulumi.String("Deny"), // Rules: network.FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleArray{ // &network.FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleArgs{ // Name: pulumi.String("app_rule_collection1_rule1"), // Protocols: network.FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleProtocolArray{ // &network.FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleProtocolArgs{ // Type: pulumi.String("Http"), // Port: pulumi.Int(80), // }, // &network.FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleProtocolArgs{ // Type: pulumi.String("Https"), // Port: pulumi.Int(443), // }, // }, // SourceAddresses: pulumi.StringArray{ // pulumi.String("10.0.0.1"), // }, // DestinationFqdns: pulumi.StringArray{ // pulumi.String("*.microsoft.com"), // }, // }, // }, // }, // }, // NetworkRuleCollections: network.FirewallPolicyRuleCollectionGroupNetworkRuleCollectionArray{ // &network.FirewallPolicyRuleCollectionGroupNetworkRuleCollectionArgs{ // Name: pulumi.String("network_rule_collection1"), // Priority: pulumi.Int(400), // Action: pulumi.String("Deny"), // Rules: network.FirewallPolicyRuleCollectionGroupNetworkRuleCollectionRuleArray{ // &network.FirewallPolicyRuleCollectionGroupNetworkRuleCollectionRuleArgs{ // Name: pulumi.String("network_rule_collection1_rule1"), // Protocols: pulumi.StringArray{ // pulumi.String("TCP"), // pulumi.String("UDP"), // }, // SourceAddresses: pulumi.StringArray{ // pulumi.String("10.0.0.1"), // }, // DestinationAddresses: pulumi.StringArray{ // pulumi.String("192.168.1.1"), // pulumi.String("192.168.1.2"), // }, // DestinationPorts: pulumi.StringArray{ // pulumi.String("80"), // pulumi.String("1000-2000"), // }, // }, // }, // }, // }, // NatRuleCollections: network.FirewallPolicyRuleCollectionGroupNatRuleCollectionArray{ // &network.FirewallPolicyRuleCollectionGroupNatRuleCollectionArgs{ // Name: pulumi.String("nat_rule_collection1"), // Priority: pulumi.Int(300), // Action: pulumi.String("Dnat"), // Rules: network.FirewallPolicyRuleCollectionGroupNatRuleCollectionRuleArray{ // &network.FirewallPolicyRuleCollectionGroupNatRuleCollectionRuleArgs{ // Name: pulumi.String("nat_rule_collection1_rule1"), // Protocols: pulumi.StringArray{ // pulumi.String("TCP"), // pulumi.String("UDP"), // }, // SourceAddresses: pulumi.StringArray{ // pulumi.String("10.0.0.1"), // pulumi.String("10.0.0.2"), // }, // DestinationAddress: pulumi.String("192.168.1.1"), // DestinationPorts: pulumi.String("80"), // TranslatedAddress: pulumi.String("192.168.0.1"), // TranslatedPort: pulumi.Int(8080), // }, // }, // }, // }, // }) // 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 // // Firewall Policy Rule Collection Groups can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/firewallPolicyRuleCollectionGroup:FirewallPolicyRuleCollectionGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/firewallPolicies/policy1/ruleCollectionGroups/gruop1 // ``` type FirewallPolicyRuleCollectionGroup struct { pulumi.CustomResourceState // One or more `applicationRuleCollection` blocks as defined below. ApplicationRuleCollections FirewallPolicyRuleCollectionGroupApplicationRuleCollectionArrayOutput `pulumi:"applicationRuleCollections"` // The ID of the Firewall Policy where the Firewall Policy Rule Collection Group should exist. Changing this forces a new Firewall Policy Rule Collection Group to be created. FirewallPolicyId pulumi.StringOutput `pulumi:"firewallPolicyId"` // The name which should be used for this Firewall Policy Rule Collection Group. Changing this forces a new Firewall Policy Rule Collection Group to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `natRuleCollection` blocks as defined below. NatRuleCollections FirewallPolicyRuleCollectionGroupNatRuleCollectionArrayOutput `pulumi:"natRuleCollections"` // One or more `networkRuleCollection` blocks as defined below. NetworkRuleCollections FirewallPolicyRuleCollectionGroupNetworkRuleCollectionArrayOutput `pulumi:"networkRuleCollections"` // The priority of the Firewall Policy Rule Collection Group. The range is 100-65000. Priority pulumi.IntOutput `pulumi:"priority"` } // NewFirewallPolicyRuleCollectionGroup registers a new resource with the given unique name, arguments, and options. func NewFirewallPolicyRuleCollectionGroup(ctx *pulumi.Context, name string, args *FirewallPolicyRuleCollectionGroupArgs, opts ...pulumi.ResourceOption) (*FirewallPolicyRuleCollectionGroup, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.FirewallPolicyId == nil { return nil, errors.New("invalid value for required argument 'FirewallPolicyId'") } if args.Priority == nil { return nil, errors.New("invalid value for required argument 'Priority'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FirewallPolicyRuleCollectionGroup err := ctx.RegisterResource("azure:network/firewallPolicyRuleCollectionGroup:FirewallPolicyRuleCollectionGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFirewallPolicyRuleCollectionGroup gets an existing FirewallPolicyRuleCollectionGroup 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 GetFirewallPolicyRuleCollectionGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FirewallPolicyRuleCollectionGroupState, opts ...pulumi.ResourceOption) (*FirewallPolicyRuleCollectionGroup, error) { var resource FirewallPolicyRuleCollectionGroup err := ctx.ReadResource("azure:network/firewallPolicyRuleCollectionGroup:FirewallPolicyRuleCollectionGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FirewallPolicyRuleCollectionGroup resources. type firewallPolicyRuleCollectionGroupState struct { // One or more `applicationRuleCollection` blocks as defined below. ApplicationRuleCollections []FirewallPolicyRuleCollectionGroupApplicationRuleCollection `pulumi:"applicationRuleCollections"` // The ID of the Firewall Policy where the Firewall Policy Rule Collection Group should exist. Changing this forces a new Firewall Policy Rule Collection Group to be created. FirewallPolicyId *string `pulumi:"firewallPolicyId"` // The name which should be used for this Firewall Policy Rule Collection Group. Changing this forces a new Firewall Policy Rule Collection Group to be created. Name *string `pulumi:"name"` // One or more `natRuleCollection` blocks as defined below. NatRuleCollections []FirewallPolicyRuleCollectionGroupNatRuleCollection `pulumi:"natRuleCollections"` // One or more `networkRuleCollection` blocks as defined below. NetworkRuleCollections []FirewallPolicyRuleCollectionGroupNetworkRuleCollection `pulumi:"networkRuleCollections"` // The priority of the Firewall Policy Rule Collection Group. The range is 100-65000. Priority *int `pulumi:"priority"` } type FirewallPolicyRuleCollectionGroupState struct { // One or more `applicationRuleCollection` blocks as defined below. ApplicationRuleCollections FirewallPolicyRuleCollectionGroupApplicationRuleCollectionArrayInput // The ID of the Firewall Policy where the Firewall Policy Rule Collection Group should exist. Changing this forces a new Firewall Policy Rule Collection Group to be created. FirewallPolicyId pulumi.StringPtrInput // The name which should be used for this Firewall Policy Rule Collection Group. Changing this forces a new Firewall Policy Rule Collection Group to be created. Name pulumi.StringPtrInput // One or more `natRuleCollection` blocks as defined below. NatRuleCollections FirewallPolicyRuleCollectionGroupNatRuleCollectionArrayInput // One or more `networkRuleCollection` blocks as defined below. NetworkRuleCollections FirewallPolicyRuleCollectionGroupNetworkRuleCollectionArrayInput // The priority of the Firewall Policy Rule Collection Group. The range is 100-65000. Priority pulumi.IntPtrInput } func (FirewallPolicyRuleCollectionGroupState) ElementType() reflect.Type { return reflect.TypeOf((*firewallPolicyRuleCollectionGroupState)(nil)).Elem() } type firewallPolicyRuleCollectionGroupArgs struct { // One or more `applicationRuleCollection` blocks as defined below. ApplicationRuleCollections []FirewallPolicyRuleCollectionGroupApplicationRuleCollection `pulumi:"applicationRuleCollections"` // The ID of the Firewall Policy where the Firewall Policy Rule Collection Group should exist. Changing this forces a new Firewall Policy Rule Collection Group to be created. FirewallPolicyId string `pulumi:"firewallPolicyId"` // The name which should be used for this Firewall Policy Rule Collection Group. Changing this forces a new Firewall Policy Rule Collection Group to be created. Name *string `pulumi:"name"` // One or more `natRuleCollection` blocks as defined below. NatRuleCollections []FirewallPolicyRuleCollectionGroupNatRuleCollection `pulumi:"natRuleCollections"` // One or more `networkRuleCollection` blocks as defined below. NetworkRuleCollections []FirewallPolicyRuleCollectionGroupNetworkRuleCollection `pulumi:"networkRuleCollections"` // The priority of the Firewall Policy Rule Collection Group. The range is 100-65000. Priority int `pulumi:"priority"` } // The set of arguments for constructing a FirewallPolicyRuleCollectionGroup resource. type FirewallPolicyRuleCollectionGroupArgs struct { // One or more `applicationRuleCollection` blocks as defined below. ApplicationRuleCollections FirewallPolicyRuleCollectionGroupApplicationRuleCollectionArrayInput // The ID of the Firewall Policy where the Firewall Policy Rule Collection Group should exist. Changing this forces a new Firewall Policy Rule Collection Group to be created. FirewallPolicyId pulumi.StringInput // The name which should be used for this Firewall Policy Rule Collection Group. Changing this forces a new Firewall Policy Rule Collection Group to be created. Name pulumi.StringPtrInput // One or more `natRuleCollection` blocks as defined below. NatRuleCollections FirewallPolicyRuleCollectionGroupNatRuleCollectionArrayInput // One or more `networkRuleCollection` blocks as defined below. NetworkRuleCollections FirewallPolicyRuleCollectionGroupNetworkRuleCollectionArrayInput // The priority of the Firewall Policy Rule Collection Group. The range is 100-65000. Priority pulumi.IntInput } func (FirewallPolicyRuleCollectionGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*firewallPolicyRuleCollectionGroupArgs)(nil)).Elem() } type FirewallPolicyRuleCollectionGroupInput interface { pulumi.Input ToFirewallPolicyRuleCollectionGroupOutput() FirewallPolicyRuleCollectionGroupOutput ToFirewallPolicyRuleCollectionGroupOutputWithContext(ctx context.Context) FirewallPolicyRuleCollectionGroupOutput } func (*FirewallPolicyRuleCollectionGroup) ElementType() reflect.Type { return reflect.TypeOf((**FirewallPolicyRuleCollectionGroup)(nil)).Elem() } func (i *FirewallPolicyRuleCollectionGroup) ToFirewallPolicyRuleCollectionGroupOutput() FirewallPolicyRuleCollectionGroupOutput { return i.ToFirewallPolicyRuleCollectionGroupOutputWithContext(context.Background()) } func (i *FirewallPolicyRuleCollectionGroup) ToFirewallPolicyRuleCollectionGroupOutputWithContext(ctx context.Context) FirewallPolicyRuleCollectionGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallPolicyRuleCollectionGroupOutput) } // FirewallPolicyRuleCollectionGroupArrayInput is an input type that accepts FirewallPolicyRuleCollectionGroupArray and FirewallPolicyRuleCollectionGroupArrayOutput values. // You can construct a concrete instance of `FirewallPolicyRuleCollectionGroupArrayInput` via: // // FirewallPolicyRuleCollectionGroupArray{ FirewallPolicyRuleCollectionGroupArgs{...} } type FirewallPolicyRuleCollectionGroupArrayInput interface { pulumi.Input ToFirewallPolicyRuleCollectionGroupArrayOutput() FirewallPolicyRuleCollectionGroupArrayOutput ToFirewallPolicyRuleCollectionGroupArrayOutputWithContext(context.Context) FirewallPolicyRuleCollectionGroupArrayOutput } type FirewallPolicyRuleCollectionGroupArray []FirewallPolicyRuleCollectionGroupInput func (FirewallPolicyRuleCollectionGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallPolicyRuleCollectionGroup)(nil)).Elem() } func (i FirewallPolicyRuleCollectionGroupArray) ToFirewallPolicyRuleCollectionGroupArrayOutput() FirewallPolicyRuleCollectionGroupArrayOutput { return i.ToFirewallPolicyRuleCollectionGroupArrayOutputWithContext(context.Background()) } func (i FirewallPolicyRuleCollectionGroupArray) ToFirewallPolicyRuleCollectionGroupArrayOutputWithContext(ctx context.Context) FirewallPolicyRuleCollectionGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallPolicyRuleCollectionGroupArrayOutput) } // FirewallPolicyRuleCollectionGroupMapInput is an input type that accepts FirewallPolicyRuleCollectionGroupMap and FirewallPolicyRuleCollectionGroupMapOutput values. // You can construct a concrete instance of `FirewallPolicyRuleCollectionGroupMapInput` via: // // FirewallPolicyRuleCollectionGroupMap{ "key": FirewallPolicyRuleCollectionGroupArgs{...} } type FirewallPolicyRuleCollectionGroupMapInput interface { pulumi.Input ToFirewallPolicyRuleCollectionGroupMapOutput() FirewallPolicyRuleCollectionGroupMapOutput ToFirewallPolicyRuleCollectionGroupMapOutputWithContext(context.Context) FirewallPolicyRuleCollectionGroupMapOutput } type FirewallPolicyRuleCollectionGroupMap map[string]FirewallPolicyRuleCollectionGroupInput func (FirewallPolicyRuleCollectionGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallPolicyRuleCollectionGroup)(nil)).Elem() } func (i FirewallPolicyRuleCollectionGroupMap) ToFirewallPolicyRuleCollectionGroupMapOutput() FirewallPolicyRuleCollectionGroupMapOutput { return i.ToFirewallPolicyRuleCollectionGroupMapOutputWithContext(context.Background()) } func (i FirewallPolicyRuleCollectionGroupMap) ToFirewallPolicyRuleCollectionGroupMapOutputWithContext(ctx context.Context) FirewallPolicyRuleCollectionGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallPolicyRuleCollectionGroupMapOutput) } type FirewallPolicyRuleCollectionGroupOutput struct{ *pulumi.OutputState } func (FirewallPolicyRuleCollectionGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**FirewallPolicyRuleCollectionGroup)(nil)).Elem() } func (o FirewallPolicyRuleCollectionGroupOutput) ToFirewallPolicyRuleCollectionGroupOutput() FirewallPolicyRuleCollectionGroupOutput { return o } func (o FirewallPolicyRuleCollectionGroupOutput) ToFirewallPolicyRuleCollectionGroupOutputWithContext(ctx context.Context) FirewallPolicyRuleCollectionGroupOutput { return o } // One or more `applicationRuleCollection` blocks as defined below. func (o FirewallPolicyRuleCollectionGroupOutput) ApplicationRuleCollections() FirewallPolicyRuleCollectionGroupApplicationRuleCollectionArrayOutput { return o.ApplyT(func(v *FirewallPolicyRuleCollectionGroup) FirewallPolicyRuleCollectionGroupApplicationRuleCollectionArrayOutput { return v.ApplicationRuleCollections }).(FirewallPolicyRuleCollectionGroupApplicationRuleCollectionArrayOutput) } // The ID of the Firewall Policy where the Firewall Policy Rule Collection Group should exist. Changing this forces a new Firewall Policy Rule Collection Group to be created. func (o FirewallPolicyRuleCollectionGroupOutput) FirewallPolicyId() pulumi.StringOutput { return o.ApplyT(func(v *FirewallPolicyRuleCollectionGroup) pulumi.StringOutput { return v.FirewallPolicyId }).(pulumi.StringOutput) } // The name which should be used for this Firewall Policy Rule Collection Group. Changing this forces a new Firewall Policy Rule Collection Group to be created. func (o FirewallPolicyRuleCollectionGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FirewallPolicyRuleCollectionGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `natRuleCollection` blocks as defined below. func (o FirewallPolicyRuleCollectionGroupOutput) NatRuleCollections() FirewallPolicyRuleCollectionGroupNatRuleCollectionArrayOutput { return o.ApplyT(func(v *FirewallPolicyRuleCollectionGroup) FirewallPolicyRuleCollectionGroupNatRuleCollectionArrayOutput { return v.NatRuleCollections }).(FirewallPolicyRuleCollectionGroupNatRuleCollectionArrayOutput) } // One or more `networkRuleCollection` blocks as defined below. func (o FirewallPolicyRuleCollectionGroupOutput) NetworkRuleCollections() FirewallPolicyRuleCollectionGroupNetworkRuleCollectionArrayOutput { return o.ApplyT(func(v *FirewallPolicyRuleCollectionGroup) FirewallPolicyRuleCollectionGroupNetworkRuleCollectionArrayOutput { return v.NetworkRuleCollections }).(FirewallPolicyRuleCollectionGroupNetworkRuleCollectionArrayOutput) } // The priority of the Firewall Policy Rule Collection Group. The range is 100-65000. func (o FirewallPolicyRuleCollectionGroupOutput) Priority() pulumi.IntOutput { return o.ApplyT(func(v *FirewallPolicyRuleCollectionGroup) pulumi.IntOutput { return v.Priority }).(pulumi.IntOutput) } type FirewallPolicyRuleCollectionGroupArrayOutput struct{ *pulumi.OutputState } func (FirewallPolicyRuleCollectionGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallPolicyRuleCollectionGroup)(nil)).Elem() } func (o FirewallPolicyRuleCollectionGroupArrayOutput) ToFirewallPolicyRuleCollectionGroupArrayOutput() FirewallPolicyRuleCollectionGroupArrayOutput { return o } func (o FirewallPolicyRuleCollectionGroupArrayOutput) ToFirewallPolicyRuleCollectionGroupArrayOutputWithContext(ctx context.Context) FirewallPolicyRuleCollectionGroupArrayOutput { return o } func (o FirewallPolicyRuleCollectionGroupArrayOutput) Index(i pulumi.IntInput) FirewallPolicyRuleCollectionGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FirewallPolicyRuleCollectionGroup { return vs[0].([]*FirewallPolicyRuleCollectionGroup)[vs[1].(int)] }).(FirewallPolicyRuleCollectionGroupOutput) } type FirewallPolicyRuleCollectionGroupMapOutput struct{ *pulumi.OutputState } func (FirewallPolicyRuleCollectionGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallPolicyRuleCollectionGroup)(nil)).Elem() } func (o FirewallPolicyRuleCollectionGroupMapOutput) ToFirewallPolicyRuleCollectionGroupMapOutput() FirewallPolicyRuleCollectionGroupMapOutput { return o } func (o FirewallPolicyRuleCollectionGroupMapOutput) ToFirewallPolicyRuleCollectionGroupMapOutputWithContext(ctx context.Context) FirewallPolicyRuleCollectionGroupMapOutput { return o } func (o FirewallPolicyRuleCollectionGroupMapOutput) MapIndex(k pulumi.StringInput) FirewallPolicyRuleCollectionGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FirewallPolicyRuleCollectionGroup { return vs[0].(map[string]*FirewallPolicyRuleCollectionGroup)[vs[1].(string)] }).(FirewallPolicyRuleCollectionGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FirewallPolicyRuleCollectionGroupInput)(nil)).Elem(), &FirewallPolicyRuleCollectionGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallPolicyRuleCollectionGroupArrayInput)(nil)).Elem(), FirewallPolicyRuleCollectionGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallPolicyRuleCollectionGroupMapInput)(nil)).Elem(), FirewallPolicyRuleCollectionGroupMap{}) pulumi.RegisterOutputType(FirewallPolicyRuleCollectionGroupOutput{}) pulumi.RegisterOutputType(FirewallPolicyRuleCollectionGroupArrayOutput{}) pulumi.RegisterOutputType(FirewallPolicyRuleCollectionGroupMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkInterfaceSecurityGroupAssociation.go
sdk/go/azure/network/networkInterfaceSecurityGroupAssociation.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages the association between a Network Interface and a Network Security 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/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("internal"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // 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 // } // 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("testconfiguration1"), // SubnetId: exampleSubnet.ID(), // PrivateIpAddressAllocation: pulumi.String("Dynamic"), // }, // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkInterfaceSecurityGroupAssociation(ctx, "example", &network.NetworkInterfaceSecurityGroupAssociationArgs{ // NetworkInterfaceId: exampleNetworkInterface.ID(), // NetworkSecurityGroupId: exampleNetworkSecurityGroup.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 // // Associations between Network Interfaces and Network Security Group can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkInterfaceSecurityGroupAssociation:NetworkInterfaceSecurityGroupAssociation association1 "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkInterfaces/example|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/networkSecurityGroups/group1" // ``` type NetworkInterfaceSecurityGroupAssociation struct { pulumi.CustomResourceState // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId pulumi.StringOutput `pulumi:"networkInterfaceId"` // The ID of the Network Security Group which should be attached to the Network Interface. Changing this forces a new resource to be created. NetworkSecurityGroupId pulumi.StringOutput `pulumi:"networkSecurityGroupId"` } // NewNetworkInterfaceSecurityGroupAssociation registers a new resource with the given unique name, arguments, and options. func NewNetworkInterfaceSecurityGroupAssociation(ctx *pulumi.Context, name string, args *NetworkInterfaceSecurityGroupAssociationArgs, opts ...pulumi.ResourceOption) (*NetworkInterfaceSecurityGroupAssociation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NetworkInterfaceId == nil { return nil, errors.New("invalid value for required argument 'NetworkInterfaceId'") } if args.NetworkSecurityGroupId == nil { return nil, errors.New("invalid value for required argument 'NetworkSecurityGroupId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkInterfaceSecurityGroupAssociation err := ctx.RegisterResource("azure:network/networkInterfaceSecurityGroupAssociation:NetworkInterfaceSecurityGroupAssociation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkInterfaceSecurityGroupAssociation gets an existing NetworkInterfaceSecurityGroupAssociation 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 GetNetworkInterfaceSecurityGroupAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkInterfaceSecurityGroupAssociationState, opts ...pulumi.ResourceOption) (*NetworkInterfaceSecurityGroupAssociation, error) { var resource NetworkInterfaceSecurityGroupAssociation err := ctx.ReadResource("azure:network/networkInterfaceSecurityGroupAssociation:NetworkInterfaceSecurityGroupAssociation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkInterfaceSecurityGroupAssociation resources. type networkInterfaceSecurityGroupAssociationState struct { // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId *string `pulumi:"networkInterfaceId"` // The ID of the Network Security Group which should be attached to the Network Interface. Changing this forces a new resource to be created. NetworkSecurityGroupId *string `pulumi:"networkSecurityGroupId"` } type NetworkInterfaceSecurityGroupAssociationState struct { // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId pulumi.StringPtrInput // The ID of the Network Security Group which should be attached to the Network Interface. Changing this forces a new resource to be created. NetworkSecurityGroupId pulumi.StringPtrInput } func (NetworkInterfaceSecurityGroupAssociationState) ElementType() reflect.Type { return reflect.TypeOf((*networkInterfaceSecurityGroupAssociationState)(nil)).Elem() } type networkInterfaceSecurityGroupAssociationArgs struct { // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId string `pulumi:"networkInterfaceId"` // The ID of the Network Security Group which should be attached to the Network Interface. Changing this forces a new resource to be created. NetworkSecurityGroupId string `pulumi:"networkSecurityGroupId"` } // The set of arguments for constructing a NetworkInterfaceSecurityGroupAssociation resource. type NetworkInterfaceSecurityGroupAssociationArgs struct { // The ID of the Network Interface. Changing this forces a new resource to be created. NetworkInterfaceId pulumi.StringInput // The ID of the Network Security Group which should be attached to the Network Interface. Changing this forces a new resource to be created. NetworkSecurityGroupId pulumi.StringInput } func (NetworkInterfaceSecurityGroupAssociationArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkInterfaceSecurityGroupAssociationArgs)(nil)).Elem() } type NetworkInterfaceSecurityGroupAssociationInput interface { pulumi.Input ToNetworkInterfaceSecurityGroupAssociationOutput() NetworkInterfaceSecurityGroupAssociationOutput ToNetworkInterfaceSecurityGroupAssociationOutputWithContext(ctx context.Context) NetworkInterfaceSecurityGroupAssociationOutput } func (*NetworkInterfaceSecurityGroupAssociation) ElementType() reflect.Type { return reflect.TypeOf((**NetworkInterfaceSecurityGroupAssociation)(nil)).Elem() } func (i *NetworkInterfaceSecurityGroupAssociation) ToNetworkInterfaceSecurityGroupAssociationOutput() NetworkInterfaceSecurityGroupAssociationOutput { return i.ToNetworkInterfaceSecurityGroupAssociationOutputWithContext(context.Background()) } func (i *NetworkInterfaceSecurityGroupAssociation) ToNetworkInterfaceSecurityGroupAssociationOutputWithContext(ctx context.Context) NetworkInterfaceSecurityGroupAssociationOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceSecurityGroupAssociationOutput) } // NetworkInterfaceSecurityGroupAssociationArrayInput is an input type that accepts NetworkInterfaceSecurityGroupAssociationArray and NetworkInterfaceSecurityGroupAssociationArrayOutput values. // You can construct a concrete instance of `NetworkInterfaceSecurityGroupAssociationArrayInput` via: // // NetworkInterfaceSecurityGroupAssociationArray{ NetworkInterfaceSecurityGroupAssociationArgs{...} } type NetworkInterfaceSecurityGroupAssociationArrayInput interface { pulumi.Input ToNetworkInterfaceSecurityGroupAssociationArrayOutput() NetworkInterfaceSecurityGroupAssociationArrayOutput ToNetworkInterfaceSecurityGroupAssociationArrayOutputWithContext(context.Context) NetworkInterfaceSecurityGroupAssociationArrayOutput } type NetworkInterfaceSecurityGroupAssociationArray []NetworkInterfaceSecurityGroupAssociationInput func (NetworkInterfaceSecurityGroupAssociationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkInterfaceSecurityGroupAssociation)(nil)).Elem() } func (i NetworkInterfaceSecurityGroupAssociationArray) ToNetworkInterfaceSecurityGroupAssociationArrayOutput() NetworkInterfaceSecurityGroupAssociationArrayOutput { return i.ToNetworkInterfaceSecurityGroupAssociationArrayOutputWithContext(context.Background()) } func (i NetworkInterfaceSecurityGroupAssociationArray) ToNetworkInterfaceSecurityGroupAssociationArrayOutputWithContext(ctx context.Context) NetworkInterfaceSecurityGroupAssociationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceSecurityGroupAssociationArrayOutput) } // NetworkInterfaceSecurityGroupAssociationMapInput is an input type that accepts NetworkInterfaceSecurityGroupAssociationMap and NetworkInterfaceSecurityGroupAssociationMapOutput values. // You can construct a concrete instance of `NetworkInterfaceSecurityGroupAssociationMapInput` via: // // NetworkInterfaceSecurityGroupAssociationMap{ "key": NetworkInterfaceSecurityGroupAssociationArgs{...} } type NetworkInterfaceSecurityGroupAssociationMapInput interface { pulumi.Input ToNetworkInterfaceSecurityGroupAssociationMapOutput() NetworkInterfaceSecurityGroupAssociationMapOutput ToNetworkInterfaceSecurityGroupAssociationMapOutputWithContext(context.Context) NetworkInterfaceSecurityGroupAssociationMapOutput } type NetworkInterfaceSecurityGroupAssociationMap map[string]NetworkInterfaceSecurityGroupAssociationInput func (NetworkInterfaceSecurityGroupAssociationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkInterfaceSecurityGroupAssociation)(nil)).Elem() } func (i NetworkInterfaceSecurityGroupAssociationMap) ToNetworkInterfaceSecurityGroupAssociationMapOutput() NetworkInterfaceSecurityGroupAssociationMapOutput { return i.ToNetworkInterfaceSecurityGroupAssociationMapOutputWithContext(context.Background()) } func (i NetworkInterfaceSecurityGroupAssociationMap) ToNetworkInterfaceSecurityGroupAssociationMapOutputWithContext(ctx context.Context) NetworkInterfaceSecurityGroupAssociationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkInterfaceSecurityGroupAssociationMapOutput) } type NetworkInterfaceSecurityGroupAssociationOutput struct{ *pulumi.OutputState } func (NetworkInterfaceSecurityGroupAssociationOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkInterfaceSecurityGroupAssociation)(nil)).Elem() } func (o NetworkInterfaceSecurityGroupAssociationOutput) ToNetworkInterfaceSecurityGroupAssociationOutput() NetworkInterfaceSecurityGroupAssociationOutput { return o } func (o NetworkInterfaceSecurityGroupAssociationOutput) ToNetworkInterfaceSecurityGroupAssociationOutputWithContext(ctx context.Context) NetworkInterfaceSecurityGroupAssociationOutput { return o } // The ID of the Network Interface. Changing this forces a new resource to be created. func (o NetworkInterfaceSecurityGroupAssociationOutput) NetworkInterfaceId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterfaceSecurityGroupAssociation) pulumi.StringOutput { return v.NetworkInterfaceId }).(pulumi.StringOutput) } // The ID of the Network Security Group which should be attached to the Network Interface. Changing this forces a new resource to be created. func (o NetworkInterfaceSecurityGroupAssociationOutput) NetworkSecurityGroupId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkInterfaceSecurityGroupAssociation) pulumi.StringOutput { return v.NetworkSecurityGroupId }).(pulumi.StringOutput) } type NetworkInterfaceSecurityGroupAssociationArrayOutput struct{ *pulumi.OutputState } func (NetworkInterfaceSecurityGroupAssociationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkInterfaceSecurityGroupAssociation)(nil)).Elem() } func (o NetworkInterfaceSecurityGroupAssociationArrayOutput) ToNetworkInterfaceSecurityGroupAssociationArrayOutput() NetworkInterfaceSecurityGroupAssociationArrayOutput { return o } func (o NetworkInterfaceSecurityGroupAssociationArrayOutput) ToNetworkInterfaceSecurityGroupAssociationArrayOutputWithContext(ctx context.Context) NetworkInterfaceSecurityGroupAssociationArrayOutput { return o } func (o NetworkInterfaceSecurityGroupAssociationArrayOutput) Index(i pulumi.IntInput) NetworkInterfaceSecurityGroupAssociationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkInterfaceSecurityGroupAssociation { return vs[0].([]*NetworkInterfaceSecurityGroupAssociation)[vs[1].(int)] }).(NetworkInterfaceSecurityGroupAssociationOutput) } type NetworkInterfaceSecurityGroupAssociationMapOutput struct{ *pulumi.OutputState } func (NetworkInterfaceSecurityGroupAssociationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkInterfaceSecurityGroupAssociation)(nil)).Elem() } func (o NetworkInterfaceSecurityGroupAssociationMapOutput) ToNetworkInterfaceSecurityGroupAssociationMapOutput() NetworkInterfaceSecurityGroupAssociationMapOutput { return o } func (o NetworkInterfaceSecurityGroupAssociationMapOutput) ToNetworkInterfaceSecurityGroupAssociationMapOutputWithContext(ctx context.Context) NetworkInterfaceSecurityGroupAssociationMapOutput { return o } func (o NetworkInterfaceSecurityGroupAssociationMapOutput) MapIndex(k pulumi.StringInput) NetworkInterfaceSecurityGroupAssociationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkInterfaceSecurityGroupAssociation { return vs[0].(map[string]*NetworkInterfaceSecurityGroupAssociation)[vs[1].(string)] }).(NetworkInterfaceSecurityGroupAssociationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceSecurityGroupAssociationInput)(nil)).Elem(), &NetworkInterfaceSecurityGroupAssociation{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceSecurityGroupAssociationArrayInput)(nil)).Elem(), NetworkInterfaceSecurityGroupAssociationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkInterfaceSecurityGroupAssociationMapInput)(nil)).Elem(), NetworkInterfaceSecurityGroupAssociationMap{}) pulumi.RegisterOutputType(NetworkInterfaceSecurityGroupAssociationOutput{}) pulumi.RegisterOutputType(NetworkInterfaceSecurityGroupAssociationArrayOutput{}) pulumi.RegisterOutputType(NetworkInterfaceSecurityGroupAssociationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/vpnGateway.go
sdk/go/azure/network/vpnGateway.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a VPN Gateway within a Virtual Hub, which enables Site-to-Site communication. // // ## 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/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 = network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // Location: example.Location, // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // }) // if err != nil { // return err // } // exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{ // Name: pulumi.String("example-vwan"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{ // Name: pulumi.String("example-hub"), // ResourceGroupName: example.Name, // Location: example.Location, // VirtualWanId: exampleVirtualWan.ID(), // AddressPrefix: pulumi.String("10.0.1.0/24"), // }) // if err != nil { // return err // } // _, err = network.NewVpnGateway(ctx, "example", &network.VpnGatewayArgs{ // Name: pulumi.String("example-vpng"), // Location: example.Location, // ResourceGroupName: example.Name, // 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 // // VPN Gateways can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/vpnGateway:VpnGateway gateway1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/vpnGateways/gateway1 // ``` type VpnGateway struct { pulumi.CustomResourceState // Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to `false`. BgpRouteTranslationForNatEnabled pulumi.BoolPtrOutput `pulumi:"bgpRouteTranslationForNatEnabled"` // A `bgpSettings` block as defined below. BgpSettings VpnGatewayBgpSettingsOutput `pulumi:"bgpSettings"` // An `ipConfiguration` block as defined below. IpConfigurations VpnGatewayIpConfigurationArrayOutput `pulumi:"ipConfigurations"` // The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value, `Microsoft Network`), or via the ISP network (public internet, set to `Internet`). More context of the configuration can be found in the [Microsoft Docs](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-site-to-site-portal#gateway) to create a VPN Gateway. Defaults to `Microsoft Network`. Changing this forces a new resource to be created. RoutingPreference pulumi.StringPtrOutput `pulumi:"routingPreference"` // The Scale Unit for this VPN Gateway. Defaults to `1`. ScaleUnit pulumi.IntPtrOutput `pulumi:"scaleUnit"` // A mapping of tags to assign to the VPN Gateway. Tags pulumi.StringMapOutput `pulumi:"tags"` // The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringOutput `pulumi:"virtualHubId"` } // NewVpnGateway registers a new resource with the given unique name, arguments, and options. func NewVpnGateway(ctx *pulumi.Context, name string, args *VpnGatewayArgs, opts ...pulumi.ResourceOption) (*VpnGateway, 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.VirtualHubId == nil { return nil, errors.New("invalid value for required argument 'VirtualHubId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VpnGateway err := ctx.RegisterResource("azure:network/vpnGateway:VpnGateway", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVpnGateway gets an existing VpnGateway 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 GetVpnGateway(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VpnGatewayState, opts ...pulumi.ResourceOption) (*VpnGateway, error) { var resource VpnGateway err := ctx.ReadResource("azure:network/vpnGateway:VpnGateway", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VpnGateway resources. type vpnGatewayState struct { // Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to `false`. BgpRouteTranslationForNatEnabled *bool `pulumi:"bgpRouteTranslationForNatEnabled"` // A `bgpSettings` block as defined below. BgpSettings *VpnGatewayBgpSettings `pulumi:"bgpSettings"` // An `ipConfiguration` block as defined below. IpConfigurations []VpnGatewayIpConfiguration `pulumi:"ipConfigurations"` // The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value, `Microsoft Network`), or via the ISP network (public internet, set to `Internet`). More context of the configuration can be found in the [Microsoft Docs](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-site-to-site-portal#gateway) to create a VPN Gateway. Defaults to `Microsoft Network`. Changing this forces a new resource to be created. RoutingPreference *string `pulumi:"routingPreference"` // The Scale Unit for this VPN Gateway. Defaults to `1`. ScaleUnit *int `pulumi:"scaleUnit"` // A mapping of tags to assign to the VPN Gateway. Tags map[string]string `pulumi:"tags"` // The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created. VirtualHubId *string `pulumi:"virtualHubId"` } type VpnGatewayState struct { // Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to `false`. BgpRouteTranslationForNatEnabled pulumi.BoolPtrInput // A `bgpSettings` block as defined below. BgpSettings VpnGatewayBgpSettingsPtrInput // An `ipConfiguration` block as defined below. IpConfigurations VpnGatewayIpConfigurationArrayInput // The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value, `Microsoft Network`), or via the ISP network (public internet, set to `Internet`). More context of the configuration can be found in the [Microsoft Docs](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-site-to-site-portal#gateway) to create a VPN Gateway. Defaults to `Microsoft Network`. Changing this forces a new resource to be created. RoutingPreference pulumi.StringPtrInput // The Scale Unit for this VPN Gateway. Defaults to `1`. ScaleUnit pulumi.IntPtrInput // A mapping of tags to assign to the VPN Gateway. Tags pulumi.StringMapInput // The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringPtrInput } func (VpnGatewayState) ElementType() reflect.Type { return reflect.TypeOf((*vpnGatewayState)(nil)).Elem() } type vpnGatewayArgs struct { // Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to `false`. BgpRouteTranslationForNatEnabled *bool `pulumi:"bgpRouteTranslationForNatEnabled"` // A `bgpSettings` block as defined below. BgpSettings *VpnGatewayBgpSettings `pulumi:"bgpSettings"` // The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value, `Microsoft Network`), or via the ISP network (public internet, set to `Internet`). More context of the configuration can be found in the [Microsoft Docs](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-site-to-site-portal#gateway) to create a VPN Gateway. Defaults to `Microsoft Network`. Changing this forces a new resource to be created. RoutingPreference *string `pulumi:"routingPreference"` // The Scale Unit for this VPN Gateway. Defaults to `1`. ScaleUnit *int `pulumi:"scaleUnit"` // A mapping of tags to assign to the VPN Gateway. Tags map[string]string `pulumi:"tags"` // The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created. VirtualHubId string `pulumi:"virtualHubId"` } // The set of arguments for constructing a VpnGateway resource. type VpnGatewayArgs struct { // Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to `false`. BgpRouteTranslationForNatEnabled pulumi.BoolPtrInput // A `bgpSettings` block as defined below. BgpSettings VpnGatewayBgpSettingsPtrInput // The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value, `Microsoft Network`), or via the ISP network (public internet, set to `Internet`). More context of the configuration can be found in the [Microsoft Docs](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-site-to-site-portal#gateway) to create a VPN Gateway. Defaults to `Microsoft Network`. Changing this forces a new resource to be created. RoutingPreference pulumi.StringPtrInput // The Scale Unit for this VPN Gateway. Defaults to `1`. ScaleUnit pulumi.IntPtrInput // A mapping of tags to assign to the VPN Gateway. Tags pulumi.StringMapInput // The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringInput } func (VpnGatewayArgs) ElementType() reflect.Type { return reflect.TypeOf((*vpnGatewayArgs)(nil)).Elem() } type VpnGatewayInput interface { pulumi.Input ToVpnGatewayOutput() VpnGatewayOutput ToVpnGatewayOutputWithContext(ctx context.Context) VpnGatewayOutput } func (*VpnGateway) ElementType() reflect.Type { return reflect.TypeOf((**VpnGateway)(nil)).Elem() } func (i *VpnGateway) ToVpnGatewayOutput() VpnGatewayOutput { return i.ToVpnGatewayOutputWithContext(context.Background()) } func (i *VpnGateway) ToVpnGatewayOutputWithContext(ctx context.Context) VpnGatewayOutput { return pulumi.ToOutputWithContext(ctx, i).(VpnGatewayOutput) } // VpnGatewayArrayInput is an input type that accepts VpnGatewayArray and VpnGatewayArrayOutput values. // You can construct a concrete instance of `VpnGatewayArrayInput` via: // // VpnGatewayArray{ VpnGatewayArgs{...} } type VpnGatewayArrayInput interface { pulumi.Input ToVpnGatewayArrayOutput() VpnGatewayArrayOutput ToVpnGatewayArrayOutputWithContext(context.Context) VpnGatewayArrayOutput } type VpnGatewayArray []VpnGatewayInput func (VpnGatewayArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VpnGateway)(nil)).Elem() } func (i VpnGatewayArray) ToVpnGatewayArrayOutput() VpnGatewayArrayOutput { return i.ToVpnGatewayArrayOutputWithContext(context.Background()) } func (i VpnGatewayArray) ToVpnGatewayArrayOutputWithContext(ctx context.Context) VpnGatewayArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VpnGatewayArrayOutput) } // VpnGatewayMapInput is an input type that accepts VpnGatewayMap and VpnGatewayMapOutput values. // You can construct a concrete instance of `VpnGatewayMapInput` via: // // VpnGatewayMap{ "key": VpnGatewayArgs{...} } type VpnGatewayMapInput interface { pulumi.Input ToVpnGatewayMapOutput() VpnGatewayMapOutput ToVpnGatewayMapOutputWithContext(context.Context) VpnGatewayMapOutput } type VpnGatewayMap map[string]VpnGatewayInput func (VpnGatewayMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VpnGateway)(nil)).Elem() } func (i VpnGatewayMap) ToVpnGatewayMapOutput() VpnGatewayMapOutput { return i.ToVpnGatewayMapOutputWithContext(context.Background()) } func (i VpnGatewayMap) ToVpnGatewayMapOutputWithContext(ctx context.Context) VpnGatewayMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VpnGatewayMapOutput) } type VpnGatewayOutput struct{ *pulumi.OutputState } func (VpnGatewayOutput) ElementType() reflect.Type { return reflect.TypeOf((**VpnGateway)(nil)).Elem() } func (o VpnGatewayOutput) ToVpnGatewayOutput() VpnGatewayOutput { return o } func (o VpnGatewayOutput) ToVpnGatewayOutputWithContext(ctx context.Context) VpnGatewayOutput { return o } // Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to `false`. func (o VpnGatewayOutput) BgpRouteTranslationForNatEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VpnGateway) pulumi.BoolPtrOutput { return v.BgpRouteTranslationForNatEnabled }).(pulumi.BoolPtrOutput) } // A `bgpSettings` block as defined below. func (o VpnGatewayOutput) BgpSettings() VpnGatewayBgpSettingsOutput { return o.ApplyT(func(v *VpnGateway) VpnGatewayBgpSettingsOutput { return v.BgpSettings }).(VpnGatewayBgpSettingsOutput) } // An `ipConfiguration` block as defined below. func (o VpnGatewayOutput) IpConfigurations() VpnGatewayIpConfigurationArrayOutput { return o.ApplyT(func(v *VpnGateway) VpnGatewayIpConfigurationArrayOutput { return v.IpConfigurations }).(VpnGatewayIpConfigurationArrayOutput) } // The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created. func (o VpnGatewayOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *VpnGateway) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created. func (o VpnGatewayOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VpnGateway) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created. func (o VpnGatewayOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *VpnGateway) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value, `Microsoft Network`), or via the ISP network (public internet, set to `Internet`). More context of the configuration can be found in the [Microsoft Docs](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-site-to-site-portal#gateway) to create a VPN Gateway. Defaults to `Microsoft Network`. Changing this forces a new resource to be created. func (o VpnGatewayOutput) RoutingPreference() pulumi.StringPtrOutput { return o.ApplyT(func(v *VpnGateway) pulumi.StringPtrOutput { return v.RoutingPreference }).(pulumi.StringPtrOutput) } // The Scale Unit for this VPN Gateway. Defaults to `1`. func (o VpnGatewayOutput) ScaleUnit() pulumi.IntPtrOutput { return o.ApplyT(func(v *VpnGateway) pulumi.IntPtrOutput { return v.ScaleUnit }).(pulumi.IntPtrOutput) } // A mapping of tags to assign to the VPN Gateway. func (o VpnGatewayOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *VpnGateway) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created. func (o VpnGatewayOutput) VirtualHubId() pulumi.StringOutput { return o.ApplyT(func(v *VpnGateway) pulumi.StringOutput { return v.VirtualHubId }).(pulumi.StringOutput) } type VpnGatewayArrayOutput struct{ *pulumi.OutputState } func (VpnGatewayArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VpnGateway)(nil)).Elem() } func (o VpnGatewayArrayOutput) ToVpnGatewayArrayOutput() VpnGatewayArrayOutput { return o } func (o VpnGatewayArrayOutput) ToVpnGatewayArrayOutputWithContext(ctx context.Context) VpnGatewayArrayOutput { return o } func (o VpnGatewayArrayOutput) Index(i pulumi.IntInput) VpnGatewayOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VpnGateway { return vs[0].([]*VpnGateway)[vs[1].(int)] }).(VpnGatewayOutput) } type VpnGatewayMapOutput struct{ *pulumi.OutputState } func (VpnGatewayMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VpnGateway)(nil)).Elem() } func (o VpnGatewayMapOutput) ToVpnGatewayMapOutput() VpnGatewayMapOutput { return o } func (o VpnGatewayMapOutput) ToVpnGatewayMapOutputWithContext(ctx context.Context) VpnGatewayMapOutput { return o } func (o VpnGatewayMapOutput) MapIndex(k pulumi.StringInput) VpnGatewayOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VpnGateway { return vs[0].(map[string]*VpnGateway)[vs[1].(string)] }).(VpnGatewayOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VpnGatewayInput)(nil)).Elem(), &VpnGateway{}) pulumi.RegisterInputType(reflect.TypeOf((*VpnGatewayArrayInput)(nil)).Elem(), VpnGatewayArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VpnGatewayMapInput)(nil)).Elem(), VpnGatewayMap{}) pulumi.RegisterOutputType(VpnGatewayOutput{}) pulumi.RegisterOutputType(VpnGatewayArrayOutput{}) pulumi.RegisterOutputType(VpnGatewayMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/trafficManagerNestedEndpoint.go
sdk/go/azure/network/trafficManagerNestedEndpoint.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Nested Endpoint within a Traffic Manager Profile. // // ## 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/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 = network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("example-publicip"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // DomainNameLabel: pulumi.String("example-pip"), // }) // if err != nil { // return err // } // parent, err := network.NewTrafficManagerProfile(ctx, "parent", &network.TrafficManagerProfileArgs{ // Name: pulumi.String("parent-profile"), // ResourceGroupName: example.Name, // TrafficRoutingMethod: pulumi.String("Weighted"), // DnsConfig: &network.TrafficManagerProfileDnsConfigArgs{ // RelativeName: pulumi.String("parent-profile"), // Ttl: pulumi.Int(100), // }, // MonitorConfig: &network.TrafficManagerProfileMonitorConfigArgs{ // Protocol: pulumi.String("HTTP"), // Port: pulumi.Int(80), // Path: pulumi.String("/"), // IntervalInSeconds: pulumi.Int(30), // TimeoutInSeconds: pulumi.Int(9), // ToleratedNumberOfFailures: pulumi.Int(3), // }, // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // nested, err := network.NewTrafficManagerProfile(ctx, "nested", &network.TrafficManagerProfileArgs{ // Name: pulumi.String("nested-profile"), // ResourceGroupName: example.Name, // TrafficRoutingMethod: pulumi.String("Priority"), // DnsConfig: &network.TrafficManagerProfileDnsConfigArgs{ // RelativeName: pulumi.String("nested-profile"), // Ttl: pulumi.Int(30), // }, // MonitorConfig: &network.TrafficManagerProfileMonitorConfigArgs{ // Protocol: pulumi.String("HTTP"), // Port: pulumi.Int(443), // Path: pulumi.String("/"), // }, // }) // if err != nil { // return err // } // _, err = network.NewTrafficManagerNestedEndpoint(ctx, "example", &network.TrafficManagerNestedEndpointArgs{ // Name: pulumi.String("example-endpoint"), // TargetResourceId: nested.ID(), // Priority: pulumi.Int(1), // ProfileId: parent.ID(), // MinimumChildEndpoints: pulumi.Int(9), // Weight: pulumi.Int(5), // }) // 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` - 2022-04-01 // // ## Import // // Nested Endpoints can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/trafficManagerNestedEndpoint:TrafficManagerNestedEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.Network/trafficManagerProfiles/example-profile/NestedEndpoints/example-endpoint // ``` type TrafficManagerNestedEndpoint struct { pulumi.CustomResourceState // One or more `customHeader` blocks as defined below. CustomHeaders TrafficManagerNestedEndpointCustomHeaderArrayOutput `pulumi:"customHeaders"` // Is the endpoint enabled? Defaults to `true`. Enabled pulumi.BoolPtrOutput `pulumi:"enabled"` // Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method. EndpointLocation pulumi.StringOutput `pulumi:"endpointLocation"` // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). GeoMappings pulumi.StringArrayOutput `pulumi:"geoMappings"` // This argument specifies the minimum number of endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This value must be larger than `0`. // // > **Note:** If `minChildEndpoints` is less than either `minimumRequiredChildEndpointsIpv4` or `minimumRequiredChildEndpointsIpv6`, then it won't have any effect. MinimumChildEndpoints pulumi.IntOutput `pulumi:"minimumChildEndpoints"` // This argument specifies the minimum number of IPv4 (DNS record type A) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and MinimumRequiredChildEndpointsIpv4 pulumi.IntPtrOutput `pulumi:"minimumRequiredChildEndpointsIpv4"` // This argument specifies the minimum number of IPv6 (DNS record type AAAA) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and MinimumRequiredChildEndpointsIpv6 pulumi.IntPtrOutput `pulumi:"minimumRequiredChildEndpointsIpv6"` // The name of the External Endpoint. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Priority pulumi.IntOutput `pulumi:"priority"` // The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created. ProfileId pulumi.StringOutput `pulumi:"profileId"` // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. Subnets TrafficManagerNestedEndpointSubnetArrayOutput `pulumi:"subnets"` // The resource id of an Azure resource to target. TargetResourceId pulumi.StringOutput `pulumi:"targetResourceId"` // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. Weight pulumi.IntPtrOutput `pulumi:"weight"` } // NewTrafficManagerNestedEndpoint registers a new resource with the given unique name, arguments, and options. func NewTrafficManagerNestedEndpoint(ctx *pulumi.Context, name string, args *TrafficManagerNestedEndpointArgs, opts ...pulumi.ResourceOption) (*TrafficManagerNestedEndpoint, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.MinimumChildEndpoints == nil { return nil, errors.New("invalid value for required argument 'MinimumChildEndpoints'") } if args.ProfileId == nil { return nil, errors.New("invalid value for required argument 'ProfileId'") } if args.TargetResourceId == nil { return nil, errors.New("invalid value for required argument 'TargetResourceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource TrafficManagerNestedEndpoint err := ctx.RegisterResource("azure:network/trafficManagerNestedEndpoint:TrafficManagerNestedEndpoint", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetTrafficManagerNestedEndpoint gets an existing TrafficManagerNestedEndpoint 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 GetTrafficManagerNestedEndpoint(ctx *pulumi.Context, name string, id pulumi.IDInput, state *TrafficManagerNestedEndpointState, opts ...pulumi.ResourceOption) (*TrafficManagerNestedEndpoint, error) { var resource TrafficManagerNestedEndpoint err := ctx.ReadResource("azure:network/trafficManagerNestedEndpoint:TrafficManagerNestedEndpoint", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering TrafficManagerNestedEndpoint resources. type trafficManagerNestedEndpointState struct { // One or more `customHeader` blocks as defined below. CustomHeaders []TrafficManagerNestedEndpointCustomHeader `pulumi:"customHeaders"` // Is the endpoint enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method. EndpointLocation *string `pulumi:"endpointLocation"` // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). GeoMappings []string `pulumi:"geoMappings"` // This argument specifies the minimum number of endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This value must be larger than `0`. // // > **Note:** If `minChildEndpoints` is less than either `minimumRequiredChildEndpointsIpv4` or `minimumRequiredChildEndpointsIpv6`, then it won't have any effect. MinimumChildEndpoints *int `pulumi:"minimumChildEndpoints"` // This argument specifies the minimum number of IPv4 (DNS record type A) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and MinimumRequiredChildEndpointsIpv4 *int `pulumi:"minimumRequiredChildEndpointsIpv4"` // This argument specifies the minimum number of IPv6 (DNS record type AAAA) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and MinimumRequiredChildEndpointsIpv6 *int `pulumi:"minimumRequiredChildEndpointsIpv6"` // The name of the External Endpoint. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Priority *int `pulumi:"priority"` // The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created. ProfileId *string `pulumi:"profileId"` // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. Subnets []TrafficManagerNestedEndpointSubnet `pulumi:"subnets"` // The resource id of an Azure resource to target. TargetResourceId *string `pulumi:"targetResourceId"` // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. Weight *int `pulumi:"weight"` } type TrafficManagerNestedEndpointState struct { // One or more `customHeader` blocks as defined below. CustomHeaders TrafficManagerNestedEndpointCustomHeaderArrayInput // Is the endpoint enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method. EndpointLocation pulumi.StringPtrInput // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). GeoMappings pulumi.StringArrayInput // This argument specifies the minimum number of endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This value must be larger than `0`. // // > **Note:** If `minChildEndpoints` is less than either `minimumRequiredChildEndpointsIpv4` or `minimumRequiredChildEndpointsIpv6`, then it won't have any effect. MinimumChildEndpoints pulumi.IntPtrInput // This argument specifies the minimum number of IPv4 (DNS record type A) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and MinimumRequiredChildEndpointsIpv4 pulumi.IntPtrInput // This argument specifies the minimum number of IPv6 (DNS record type AAAA) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and MinimumRequiredChildEndpointsIpv6 pulumi.IntPtrInput // The name of the External Endpoint. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Priority pulumi.IntPtrInput // The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created. ProfileId pulumi.StringPtrInput // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. Subnets TrafficManagerNestedEndpointSubnetArrayInput // The resource id of an Azure resource to target. TargetResourceId pulumi.StringPtrInput // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. Weight pulumi.IntPtrInput } func (TrafficManagerNestedEndpointState) ElementType() reflect.Type { return reflect.TypeOf((*trafficManagerNestedEndpointState)(nil)).Elem() } type trafficManagerNestedEndpointArgs struct { // One or more `customHeader` blocks as defined below. CustomHeaders []TrafficManagerNestedEndpointCustomHeader `pulumi:"customHeaders"` // Is the endpoint enabled? Defaults to `true`. Enabled *bool `pulumi:"enabled"` // Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method. EndpointLocation *string `pulumi:"endpointLocation"` // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). GeoMappings []string `pulumi:"geoMappings"` // This argument specifies the minimum number of endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This value must be larger than `0`. // // > **Note:** If `minChildEndpoints` is less than either `minimumRequiredChildEndpointsIpv4` or `minimumRequiredChildEndpointsIpv6`, then it won't have any effect. MinimumChildEndpoints int `pulumi:"minimumChildEndpoints"` // This argument specifies the minimum number of IPv4 (DNS record type A) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and MinimumRequiredChildEndpointsIpv4 *int `pulumi:"minimumRequiredChildEndpointsIpv4"` // This argument specifies the minimum number of IPv6 (DNS record type AAAA) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and MinimumRequiredChildEndpointsIpv6 *int `pulumi:"minimumRequiredChildEndpointsIpv6"` // The name of the External Endpoint. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Priority *int `pulumi:"priority"` // The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created. ProfileId string `pulumi:"profileId"` // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. Subnets []TrafficManagerNestedEndpointSubnet `pulumi:"subnets"` // The resource id of an Azure resource to target. TargetResourceId string `pulumi:"targetResourceId"` // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. Weight *int `pulumi:"weight"` } // The set of arguments for constructing a TrafficManagerNestedEndpoint resource. type TrafficManagerNestedEndpointArgs struct { // One or more `customHeader` blocks as defined below. CustomHeaders TrafficManagerNestedEndpointCustomHeaderArrayInput // Is the endpoint enabled? Defaults to `true`. Enabled pulumi.BoolPtrInput // Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method. EndpointLocation pulumi.StringPtrInput // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). GeoMappings pulumi.StringArrayInput // This argument specifies the minimum number of endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This value must be larger than `0`. // // > **Note:** If `minChildEndpoints` is less than either `minimumRequiredChildEndpointsIpv4` or `minimumRequiredChildEndpointsIpv6`, then it won't have any effect. MinimumChildEndpoints pulumi.IntInput // This argument specifies the minimum number of IPv4 (DNS record type A) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and MinimumRequiredChildEndpointsIpv4 pulumi.IntPtrInput // This argument specifies the minimum number of IPv6 (DNS record type AAAA) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and MinimumRequiredChildEndpointsIpv6 pulumi.IntPtrInput // The name of the External Endpoint. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Priority pulumi.IntPtrInput // The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created. ProfileId pulumi.StringInput // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. Subnets TrafficManagerNestedEndpointSubnetArrayInput // The resource id of an Azure resource to target. TargetResourceId pulumi.StringInput // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. Weight pulumi.IntPtrInput } func (TrafficManagerNestedEndpointArgs) ElementType() reflect.Type { return reflect.TypeOf((*trafficManagerNestedEndpointArgs)(nil)).Elem() } type TrafficManagerNestedEndpointInput interface { pulumi.Input ToTrafficManagerNestedEndpointOutput() TrafficManagerNestedEndpointOutput ToTrafficManagerNestedEndpointOutputWithContext(ctx context.Context) TrafficManagerNestedEndpointOutput } func (*TrafficManagerNestedEndpoint) ElementType() reflect.Type { return reflect.TypeOf((**TrafficManagerNestedEndpoint)(nil)).Elem() } func (i *TrafficManagerNestedEndpoint) ToTrafficManagerNestedEndpointOutput() TrafficManagerNestedEndpointOutput { return i.ToTrafficManagerNestedEndpointOutputWithContext(context.Background()) } func (i *TrafficManagerNestedEndpoint) ToTrafficManagerNestedEndpointOutputWithContext(ctx context.Context) TrafficManagerNestedEndpointOutput { return pulumi.ToOutputWithContext(ctx, i).(TrafficManagerNestedEndpointOutput) } // TrafficManagerNestedEndpointArrayInput is an input type that accepts TrafficManagerNestedEndpointArray and TrafficManagerNestedEndpointArrayOutput values. // You can construct a concrete instance of `TrafficManagerNestedEndpointArrayInput` via: // // TrafficManagerNestedEndpointArray{ TrafficManagerNestedEndpointArgs{...} } type TrafficManagerNestedEndpointArrayInput interface { pulumi.Input ToTrafficManagerNestedEndpointArrayOutput() TrafficManagerNestedEndpointArrayOutput ToTrafficManagerNestedEndpointArrayOutputWithContext(context.Context) TrafficManagerNestedEndpointArrayOutput } type TrafficManagerNestedEndpointArray []TrafficManagerNestedEndpointInput func (TrafficManagerNestedEndpointArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*TrafficManagerNestedEndpoint)(nil)).Elem() } func (i TrafficManagerNestedEndpointArray) ToTrafficManagerNestedEndpointArrayOutput() TrafficManagerNestedEndpointArrayOutput { return i.ToTrafficManagerNestedEndpointArrayOutputWithContext(context.Background()) } func (i TrafficManagerNestedEndpointArray) ToTrafficManagerNestedEndpointArrayOutputWithContext(ctx context.Context) TrafficManagerNestedEndpointArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(TrafficManagerNestedEndpointArrayOutput) } // TrafficManagerNestedEndpointMapInput is an input type that accepts TrafficManagerNestedEndpointMap and TrafficManagerNestedEndpointMapOutput values. // You can construct a concrete instance of `TrafficManagerNestedEndpointMapInput` via: // // TrafficManagerNestedEndpointMap{ "key": TrafficManagerNestedEndpointArgs{...} } type TrafficManagerNestedEndpointMapInput interface { pulumi.Input ToTrafficManagerNestedEndpointMapOutput() TrafficManagerNestedEndpointMapOutput ToTrafficManagerNestedEndpointMapOutputWithContext(context.Context) TrafficManagerNestedEndpointMapOutput } type TrafficManagerNestedEndpointMap map[string]TrafficManagerNestedEndpointInput func (TrafficManagerNestedEndpointMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*TrafficManagerNestedEndpoint)(nil)).Elem() } func (i TrafficManagerNestedEndpointMap) ToTrafficManagerNestedEndpointMapOutput() TrafficManagerNestedEndpointMapOutput { return i.ToTrafficManagerNestedEndpointMapOutputWithContext(context.Background()) } func (i TrafficManagerNestedEndpointMap) ToTrafficManagerNestedEndpointMapOutputWithContext(ctx context.Context) TrafficManagerNestedEndpointMapOutput { return pulumi.ToOutputWithContext(ctx, i).(TrafficManagerNestedEndpointMapOutput) } type TrafficManagerNestedEndpointOutput struct{ *pulumi.OutputState } func (TrafficManagerNestedEndpointOutput) ElementType() reflect.Type { return reflect.TypeOf((**TrafficManagerNestedEndpoint)(nil)).Elem() } func (o TrafficManagerNestedEndpointOutput) ToTrafficManagerNestedEndpointOutput() TrafficManagerNestedEndpointOutput { return o } func (o TrafficManagerNestedEndpointOutput) ToTrafficManagerNestedEndpointOutputWithContext(ctx context.Context) TrafficManagerNestedEndpointOutput { return o } // One or more `customHeader` blocks as defined below. func (o TrafficManagerNestedEndpointOutput) CustomHeaders() TrafficManagerNestedEndpointCustomHeaderArrayOutput { return o.ApplyT(func(v *TrafficManagerNestedEndpoint) TrafficManagerNestedEndpointCustomHeaderArrayOutput { return v.CustomHeaders }).(TrafficManagerNestedEndpointCustomHeaderArrayOutput) } // Is the endpoint enabled? Defaults to `true`. func (o TrafficManagerNestedEndpointOutput) Enabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *TrafficManagerNestedEndpoint) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput) } // Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method. func (o TrafficManagerNestedEndpointOutput) EndpointLocation() pulumi.StringOutput { return o.ApplyT(func(v *TrafficManagerNestedEndpoint) pulumi.StringOutput { return v.EndpointLocation }).(pulumi.StringOutput) } // A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). func (o TrafficManagerNestedEndpointOutput) GeoMappings() pulumi.StringArrayOutput { return o.ApplyT(func(v *TrafficManagerNestedEndpoint) pulumi.StringArrayOutput { return v.GeoMappings }).(pulumi.StringArrayOutput) } // This argument specifies the minimum number of endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This value must be larger than `0`. // // > **Note:** If `minChildEndpoints` is less than either `minimumRequiredChildEndpointsIpv4` or `minimumRequiredChildEndpointsIpv6`, then it won't have any effect. func (o TrafficManagerNestedEndpointOutput) MinimumChildEndpoints() pulumi.IntOutput { return o.ApplyT(func(v *TrafficManagerNestedEndpoint) pulumi.IntOutput { return v.MinimumChildEndpoints }).(pulumi.IntOutput) } // This argument specifies the minimum number of IPv4 (DNS record type A) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and func (o TrafficManagerNestedEndpointOutput) MinimumRequiredChildEndpointsIpv4() pulumi.IntPtrOutput { return o.ApplyT(func(v *TrafficManagerNestedEndpoint) pulumi.IntPtrOutput { return v.MinimumRequiredChildEndpointsIpv4 }).(pulumi.IntPtrOutput) } // This argument specifies the minimum number of IPv6 (DNS record type AAAA) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and func (o TrafficManagerNestedEndpointOutput) MinimumRequiredChildEndpointsIpv6() pulumi.IntPtrOutput { return o.ApplyT(func(v *TrafficManagerNestedEndpoint) pulumi.IntPtrOutput { return v.MinimumRequiredChildEndpointsIpv6 }).(pulumi.IntPtrOutput) } // The name of the External Endpoint. Changing this forces a new resource to be created. func (o TrafficManagerNestedEndpointOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *TrafficManagerNestedEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. func (o TrafficManagerNestedEndpointOutput) Priority() pulumi.IntOutput { return o.ApplyT(func(v *TrafficManagerNestedEndpoint) pulumi.IntOutput { return v.Priority }).(pulumi.IntOutput) } // The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created. func (o TrafficManagerNestedEndpointOutput) ProfileId() pulumi.StringOutput { return o.ApplyT(func(v *TrafficManagerNestedEndpoint) pulumi.StringOutput { return v.ProfileId }).(pulumi.StringOutput) } // One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. func (o TrafficManagerNestedEndpointOutput) Subnets() TrafficManagerNestedEndpointSubnetArrayOutput { return o.ApplyT(func(v *TrafficManagerNestedEndpoint) TrafficManagerNestedEndpointSubnetArrayOutput { return v.Subnets }).(TrafficManagerNestedEndpointSubnetArrayOutput) } // The resource id of an Azure resource to target. func (o TrafficManagerNestedEndpointOutput) TargetResourceId() pulumi.StringOutput { return o.ApplyT(func(v *TrafficManagerNestedEndpoint) pulumi.StringOutput { return v.TargetResourceId }).(pulumi.StringOutput) } // Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. func (o TrafficManagerNestedEndpointOutput) Weight() pulumi.IntPtrOutput { return o.ApplyT(func(v *TrafficManagerNestedEndpoint) pulumi.IntPtrOutput { return v.Weight }).(pulumi.IntPtrOutput) } type TrafficManagerNestedEndpointArrayOutput struct{ *pulumi.OutputState } func (TrafficManagerNestedEndpointArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*TrafficManagerNestedEndpoint)(nil)).Elem() } func (o TrafficManagerNestedEndpointArrayOutput) ToTrafficManagerNestedEndpointArrayOutput() TrafficManagerNestedEndpointArrayOutput { return o } func (o TrafficManagerNestedEndpointArrayOutput) ToTrafficManagerNestedEndpointArrayOutputWithContext(ctx context.Context) TrafficManagerNestedEndpointArrayOutput { return o } func (o TrafficManagerNestedEndpointArrayOutput) Index(i pulumi.IntInput) TrafficManagerNestedEndpointOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TrafficManagerNestedEndpoint { return vs[0].([]*TrafficManagerNestedEndpoint)[vs[1].(int)] }).(TrafficManagerNestedEndpointOutput) } type TrafficManagerNestedEndpointMapOutput struct{ *pulumi.OutputState } func (TrafficManagerNestedEndpointMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*TrafficManagerNestedEndpoint)(nil)).Elem() } func (o TrafficManagerNestedEndpointMapOutput) ToTrafficManagerNestedEndpointMapOutput() TrafficManagerNestedEndpointMapOutput { return o } func (o TrafficManagerNestedEndpointMapOutput) ToTrafficManagerNestedEndpointMapOutputWithContext(ctx context.Context) TrafficManagerNestedEndpointMapOutput { return o } func (o TrafficManagerNestedEndpointMapOutput) MapIndex(k pulumi.StringInput) TrafficManagerNestedEndpointOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TrafficManagerNestedEndpoint { return vs[0].(map[string]*TrafficManagerNestedEndpoint)[vs[1].(string)] }).(TrafficManagerNestedEndpointOutput) } func init() {
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/network/virtualHubConnection.go
sdk/go/azure/network/virtualHubConnection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Connection for a Virtual Hub. // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("172.16.0.0/12"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{ // Name: pulumi.String("example-vwan"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{ // Name: pulumi.String("example-hub"), // ResourceGroupName: example.Name, // Location: example.Location, // VirtualWanId: exampleVirtualWan.ID(), // AddressPrefix: pulumi.String("10.0.1.0/24"), // }) // if err != nil { // return err // } // _, err = network.NewVirtualHubConnection(ctx, "example", &network.VirtualHubConnectionArgs{ // Name: pulumi.String("example-vhub"), // VirtualHubId: exampleVirtualHub.ID(), // RemoteVirtualNetworkId: exampleVirtualNetwork.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 // // Virtual Hub Connection's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/virtualHubConnection:VirtualHubConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualHubs/hub1/hubVirtualNetworkConnections/connection1 // ``` type VirtualHubConnection struct { pulumi.CustomResourceState // Should Internet Security be enabled to secure internet traffic? Defaults to `false`. InternetSecurityEnabled pulumi.BoolPtrOutput `pulumi:"internetSecurityEnabled"` // The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created. RemoteVirtualNetworkId pulumi.StringOutput `pulumi:"remoteVirtualNetworkId"` // A `routing` block as defined below. Routing VirtualHubConnectionRoutingOutput `pulumi:"routing"` // The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringOutput `pulumi:"virtualHubId"` } // NewVirtualHubConnection registers a new resource with the given unique name, arguments, and options. func NewVirtualHubConnection(ctx *pulumi.Context, name string, args *VirtualHubConnectionArgs, opts ...pulumi.ResourceOption) (*VirtualHubConnection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RemoteVirtualNetworkId == nil { return nil, errors.New("invalid value for required argument 'RemoteVirtualNetworkId'") } if args.VirtualHubId == nil { return nil, errors.New("invalid value for required argument 'VirtualHubId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualHubConnection err := ctx.RegisterResource("azure:network/virtualHubConnection:VirtualHubConnection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualHubConnection gets an existing VirtualHubConnection 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 GetVirtualHubConnection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualHubConnectionState, opts ...pulumi.ResourceOption) (*VirtualHubConnection, error) { var resource VirtualHubConnection err := ctx.ReadResource("azure:network/virtualHubConnection:VirtualHubConnection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualHubConnection resources. type virtualHubConnectionState struct { // Should Internet Security be enabled to secure internet traffic? Defaults to `false`. InternetSecurityEnabled *bool `pulumi:"internetSecurityEnabled"` // The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created. RemoteVirtualNetworkId *string `pulumi:"remoteVirtualNetworkId"` // A `routing` block as defined below. Routing *VirtualHubConnectionRouting `pulumi:"routing"` // The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created. VirtualHubId *string `pulumi:"virtualHubId"` } type VirtualHubConnectionState struct { // Should Internet Security be enabled to secure internet traffic? Defaults to `false`. InternetSecurityEnabled pulumi.BoolPtrInput // The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created. RemoteVirtualNetworkId pulumi.StringPtrInput // A `routing` block as defined below. Routing VirtualHubConnectionRoutingPtrInput // The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringPtrInput } func (VirtualHubConnectionState) ElementType() reflect.Type { return reflect.TypeOf((*virtualHubConnectionState)(nil)).Elem() } type virtualHubConnectionArgs struct { // Should Internet Security be enabled to secure internet traffic? Defaults to `false`. InternetSecurityEnabled *bool `pulumi:"internetSecurityEnabled"` // The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created. RemoteVirtualNetworkId string `pulumi:"remoteVirtualNetworkId"` // A `routing` block as defined below. Routing *VirtualHubConnectionRouting `pulumi:"routing"` // The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created. VirtualHubId string `pulumi:"virtualHubId"` } // The set of arguments for constructing a VirtualHubConnection resource. type VirtualHubConnectionArgs struct { // Should Internet Security be enabled to secure internet traffic? Defaults to `false`. InternetSecurityEnabled pulumi.BoolPtrInput // The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created. RemoteVirtualNetworkId pulumi.StringInput // A `routing` block as defined below. Routing VirtualHubConnectionRoutingPtrInput // The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringInput } func (VirtualHubConnectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualHubConnectionArgs)(nil)).Elem() } type VirtualHubConnectionInput interface { pulumi.Input ToVirtualHubConnectionOutput() VirtualHubConnectionOutput ToVirtualHubConnectionOutputWithContext(ctx context.Context) VirtualHubConnectionOutput } func (*VirtualHubConnection) ElementType() reflect.Type { return reflect.TypeOf((**VirtualHubConnection)(nil)).Elem() } func (i *VirtualHubConnection) ToVirtualHubConnectionOutput() VirtualHubConnectionOutput { return i.ToVirtualHubConnectionOutputWithContext(context.Background()) } func (i *VirtualHubConnection) ToVirtualHubConnectionOutputWithContext(ctx context.Context) VirtualHubConnectionOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualHubConnectionOutput) } // VirtualHubConnectionArrayInput is an input type that accepts VirtualHubConnectionArray and VirtualHubConnectionArrayOutput values. // You can construct a concrete instance of `VirtualHubConnectionArrayInput` via: // // VirtualHubConnectionArray{ VirtualHubConnectionArgs{...} } type VirtualHubConnectionArrayInput interface { pulumi.Input ToVirtualHubConnectionArrayOutput() VirtualHubConnectionArrayOutput ToVirtualHubConnectionArrayOutputWithContext(context.Context) VirtualHubConnectionArrayOutput } type VirtualHubConnectionArray []VirtualHubConnectionInput func (VirtualHubConnectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualHubConnection)(nil)).Elem() } func (i VirtualHubConnectionArray) ToVirtualHubConnectionArrayOutput() VirtualHubConnectionArrayOutput { return i.ToVirtualHubConnectionArrayOutputWithContext(context.Background()) } func (i VirtualHubConnectionArray) ToVirtualHubConnectionArrayOutputWithContext(ctx context.Context) VirtualHubConnectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualHubConnectionArrayOutput) } // VirtualHubConnectionMapInput is an input type that accepts VirtualHubConnectionMap and VirtualHubConnectionMapOutput values. // You can construct a concrete instance of `VirtualHubConnectionMapInput` via: // // VirtualHubConnectionMap{ "key": VirtualHubConnectionArgs{...} } type VirtualHubConnectionMapInput interface { pulumi.Input ToVirtualHubConnectionMapOutput() VirtualHubConnectionMapOutput ToVirtualHubConnectionMapOutputWithContext(context.Context) VirtualHubConnectionMapOutput } type VirtualHubConnectionMap map[string]VirtualHubConnectionInput func (VirtualHubConnectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualHubConnection)(nil)).Elem() } func (i VirtualHubConnectionMap) ToVirtualHubConnectionMapOutput() VirtualHubConnectionMapOutput { return i.ToVirtualHubConnectionMapOutputWithContext(context.Background()) } func (i VirtualHubConnectionMap) ToVirtualHubConnectionMapOutputWithContext(ctx context.Context) VirtualHubConnectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualHubConnectionMapOutput) } type VirtualHubConnectionOutput struct{ *pulumi.OutputState } func (VirtualHubConnectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualHubConnection)(nil)).Elem() } func (o VirtualHubConnectionOutput) ToVirtualHubConnectionOutput() VirtualHubConnectionOutput { return o } func (o VirtualHubConnectionOutput) ToVirtualHubConnectionOutputWithContext(ctx context.Context) VirtualHubConnectionOutput { return o } // Should Internet Security be enabled to secure internet traffic? Defaults to `false`. func (o VirtualHubConnectionOutput) InternetSecurityEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualHubConnection) pulumi.BoolPtrOutput { return v.InternetSecurityEnabled }).(pulumi.BoolPtrOutput) } // The Name which should be used for this Connection, which must be unique within the Virtual Hub. Changing this forces a new resource to be created. func (o VirtualHubConnectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHubConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The ID of the Virtual Network which the Virtual Hub should be connected to. Changing this forces a new resource to be created. func (o VirtualHubConnectionOutput) RemoteVirtualNetworkId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHubConnection) pulumi.StringOutput { return v.RemoteVirtualNetworkId }).(pulumi.StringOutput) } // A `routing` block as defined below. func (o VirtualHubConnectionOutput) Routing() VirtualHubConnectionRoutingOutput { return o.ApplyT(func(v *VirtualHubConnection) VirtualHubConnectionRoutingOutput { return v.Routing }).(VirtualHubConnectionRoutingOutput) } // The ID of the Virtual Hub within which this connection should be created. Changing this forces a new resource to be created. func (o VirtualHubConnectionOutput) VirtualHubId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHubConnection) pulumi.StringOutput { return v.VirtualHubId }).(pulumi.StringOutput) } type VirtualHubConnectionArrayOutput struct{ *pulumi.OutputState } func (VirtualHubConnectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualHubConnection)(nil)).Elem() } func (o VirtualHubConnectionArrayOutput) ToVirtualHubConnectionArrayOutput() VirtualHubConnectionArrayOutput { return o } func (o VirtualHubConnectionArrayOutput) ToVirtualHubConnectionArrayOutputWithContext(ctx context.Context) VirtualHubConnectionArrayOutput { return o } func (o VirtualHubConnectionArrayOutput) Index(i pulumi.IntInput) VirtualHubConnectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualHubConnection { return vs[0].([]*VirtualHubConnection)[vs[1].(int)] }).(VirtualHubConnectionOutput) } type VirtualHubConnectionMapOutput struct{ *pulumi.OutputState } func (VirtualHubConnectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualHubConnection)(nil)).Elem() } func (o VirtualHubConnectionMapOutput) ToVirtualHubConnectionMapOutput() VirtualHubConnectionMapOutput { return o } func (o VirtualHubConnectionMapOutput) ToVirtualHubConnectionMapOutputWithContext(ctx context.Context) VirtualHubConnectionMapOutput { return o } func (o VirtualHubConnectionMapOutput) MapIndex(k pulumi.StringInput) VirtualHubConnectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualHubConnection { return vs[0].(map[string]*VirtualHubConnection)[vs[1].(string)] }).(VirtualHubConnectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualHubConnectionInput)(nil)).Elem(), &VirtualHubConnection{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualHubConnectionArrayInput)(nil)).Elem(), VirtualHubConnectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualHubConnectionMapInput)(nil)).Elem(), VirtualHubConnectionMap{}) pulumi.RegisterOutputType(VirtualHubConnectionOutput{}) pulumi.RegisterOutputType(VirtualHubConnectionArrayOutput{}) pulumi.RegisterOutputType(VirtualHubConnectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/natGateway.go
sdk/go/azure/network/natGateway.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network 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 NAT Gateway. // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("nat-gateway-example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = network.NewNatGateway(ctx, "example", &network.NatGatewayArgs{ // Name: pulumi.String("nat-gateway"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("Standard"), // IdleTimeoutInMinutes: pulumi.Int(10), // Zones: pulumi.StringArray{ // pulumi.String("1"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // For more complete examples, please see the network.NatGatewayPublicIpAssociation and network.NatGatewayPublicIpPrefixAssociation resources. // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // NAT Gateway can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/natGateway:NatGateway test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/natGateways/gateway1 // ``` type NatGateway struct { pulumi.CustomResourceState // The idle timeout which should be used in minutes. Defaults to `4`. IdleTimeoutInMinutes pulumi.IntPtrOutput `pulumi:"idleTimeoutInMinutes"` // Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of the NAT Gateway. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The resource GUID property of the NAT Gateway. ResourceGuid pulumi.StringOutput `pulumi:"resourceGuid"` // The SKU which should be used. At this time the only supported value is `Standard`. Defaults to `Standard`. SkuName pulumi.StringPtrOutput `pulumi:"skuName"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created. // // > **Note:** Only one Availability Zone can be defined. For more information, please check out the [Azure documentation](https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview#availability-zones) Zones pulumi.StringArrayOutput `pulumi:"zones"` } // NewNatGateway registers a new resource with the given unique name, arguments, and options. func NewNatGateway(ctx *pulumi.Context, name string, args *NatGatewayArgs, opts ...pulumi.ResourceOption) (*NatGateway, 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 NatGateway err := ctx.RegisterResource("azure:network/natGateway:NatGateway", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNatGateway gets an existing NatGateway 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 GetNatGateway(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NatGatewayState, opts ...pulumi.ResourceOption) (*NatGateway, error) { var resource NatGateway err := ctx.ReadResource("azure:network/natGateway:NatGateway", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NatGateway resources. type natGatewayState struct { // The idle timeout which should be used in minutes. Defaults to `4`. IdleTimeoutInMinutes *int `pulumi:"idleTimeoutInMinutes"` // Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the NAT Gateway. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The resource GUID property of the NAT Gateway. ResourceGuid *string `pulumi:"resourceGuid"` // The SKU which should be used. At this time the only supported value is `Standard`. Defaults to `Standard`. SkuName *string `pulumi:"skuName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created. // // > **Note:** Only one Availability Zone can be defined. For more information, please check out the [Azure documentation](https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview#availability-zones) Zones []string `pulumi:"zones"` } type NatGatewayState struct { // The idle timeout which should be used in minutes. Defaults to `4`. IdleTimeoutInMinutes pulumi.IntPtrInput // Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the NAT Gateway. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The resource GUID property of the NAT Gateway. ResourceGuid pulumi.StringPtrInput // The SKU which should be used. At this time the only supported value is `Standard`. Defaults to `Standard`. SkuName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created. // // > **Note:** Only one Availability Zone can be defined. For more information, please check out the [Azure documentation](https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview#availability-zones) Zones pulumi.StringArrayInput } func (NatGatewayState) ElementType() reflect.Type { return reflect.TypeOf((*natGatewayState)(nil)).Elem() } type natGatewayArgs struct { // The idle timeout which should be used in minutes. Defaults to `4`. IdleTimeoutInMinutes *int `pulumi:"idleTimeoutInMinutes"` // Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the NAT Gateway. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU which should be used. At this time the only supported value is `Standard`. Defaults to `Standard`. SkuName *string `pulumi:"skuName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created. // // > **Note:** Only one Availability Zone can be defined. For more information, please check out the [Azure documentation](https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview#availability-zones) Zones []string `pulumi:"zones"` } // The set of arguments for constructing a NatGateway resource. type NatGatewayArgs struct { // The idle timeout which should be used in minutes. Defaults to `4`. IdleTimeoutInMinutes pulumi.IntPtrInput // Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the NAT Gateway. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The SKU which should be used. At this time the only supported value is `Standard`. Defaults to `Standard`. SkuName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created. // // > **Note:** Only one Availability Zone can be defined. For more information, please check out the [Azure documentation](https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview#availability-zones) Zones pulumi.StringArrayInput } func (NatGatewayArgs) ElementType() reflect.Type { return reflect.TypeOf((*natGatewayArgs)(nil)).Elem() } type NatGatewayInput interface { pulumi.Input ToNatGatewayOutput() NatGatewayOutput ToNatGatewayOutputWithContext(ctx context.Context) NatGatewayOutput } func (*NatGateway) ElementType() reflect.Type { return reflect.TypeOf((**NatGateway)(nil)).Elem() } func (i *NatGateway) ToNatGatewayOutput() NatGatewayOutput { return i.ToNatGatewayOutputWithContext(context.Background()) } func (i *NatGateway) ToNatGatewayOutputWithContext(ctx context.Context) NatGatewayOutput { return pulumi.ToOutputWithContext(ctx, i).(NatGatewayOutput) } // NatGatewayArrayInput is an input type that accepts NatGatewayArray and NatGatewayArrayOutput values. // You can construct a concrete instance of `NatGatewayArrayInput` via: // // NatGatewayArray{ NatGatewayArgs{...} } type NatGatewayArrayInput interface { pulumi.Input ToNatGatewayArrayOutput() NatGatewayArrayOutput ToNatGatewayArrayOutputWithContext(context.Context) NatGatewayArrayOutput } type NatGatewayArray []NatGatewayInput func (NatGatewayArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NatGateway)(nil)).Elem() } func (i NatGatewayArray) ToNatGatewayArrayOutput() NatGatewayArrayOutput { return i.ToNatGatewayArrayOutputWithContext(context.Background()) } func (i NatGatewayArray) ToNatGatewayArrayOutputWithContext(ctx context.Context) NatGatewayArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NatGatewayArrayOutput) } // NatGatewayMapInput is an input type that accepts NatGatewayMap and NatGatewayMapOutput values. // You can construct a concrete instance of `NatGatewayMapInput` via: // // NatGatewayMap{ "key": NatGatewayArgs{...} } type NatGatewayMapInput interface { pulumi.Input ToNatGatewayMapOutput() NatGatewayMapOutput ToNatGatewayMapOutputWithContext(context.Context) NatGatewayMapOutput } type NatGatewayMap map[string]NatGatewayInput func (NatGatewayMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NatGateway)(nil)).Elem() } func (i NatGatewayMap) ToNatGatewayMapOutput() NatGatewayMapOutput { return i.ToNatGatewayMapOutputWithContext(context.Background()) } func (i NatGatewayMap) ToNatGatewayMapOutputWithContext(ctx context.Context) NatGatewayMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NatGatewayMapOutput) } type NatGatewayOutput struct{ *pulumi.OutputState } func (NatGatewayOutput) ElementType() reflect.Type { return reflect.TypeOf((**NatGateway)(nil)).Elem() } func (o NatGatewayOutput) ToNatGatewayOutput() NatGatewayOutput { return o } func (o NatGatewayOutput) ToNatGatewayOutputWithContext(ctx context.Context) NatGatewayOutput { return o } // The idle timeout which should be used in minutes. Defaults to `4`. func (o NatGatewayOutput) IdleTimeoutInMinutes() pulumi.IntPtrOutput { return o.ApplyT(func(v *NatGateway) pulumi.IntPtrOutput { return v.IdleTimeoutInMinutes }).(pulumi.IntPtrOutput) } // Specifies the supported Azure location where the NAT Gateway should exist. Changing this forces a new resource to be created. func (o NatGatewayOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *NatGateway) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the NAT Gateway. Changing this forces a new resource to be created. func (o NatGatewayOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NatGateway) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the name of the Resource Group in which the NAT Gateway should exist. Changing this forces a new resource to be created. func (o NatGatewayOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *NatGateway) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The resource GUID property of the NAT Gateway. func (o NatGatewayOutput) ResourceGuid() pulumi.StringOutput { return o.ApplyT(func(v *NatGateway) pulumi.StringOutput { return v.ResourceGuid }).(pulumi.StringOutput) } // The SKU which should be used. At this time the only supported value is `Standard`. Defaults to `Standard`. func (o NatGatewayOutput) SkuName() pulumi.StringPtrOutput { return o.ApplyT(func(v *NatGateway) pulumi.StringPtrOutput { return v.SkuName }).(pulumi.StringPtrOutput) } // A mapping of tags to assign to the resource. func (o NatGatewayOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *NatGateway) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // A list of Availability Zones in which this NAT Gateway should be located. Changing this forces a new NAT Gateway to be created. // // > **Note:** Only one Availability Zone can be defined. For more information, please check out the [Azure documentation](https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview#availability-zones) func (o NatGatewayOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v *NatGateway) pulumi.StringArrayOutput { return v.Zones }).(pulumi.StringArrayOutput) } type NatGatewayArrayOutput struct{ *pulumi.OutputState } func (NatGatewayArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NatGateway)(nil)).Elem() } func (o NatGatewayArrayOutput) ToNatGatewayArrayOutput() NatGatewayArrayOutput { return o } func (o NatGatewayArrayOutput) ToNatGatewayArrayOutputWithContext(ctx context.Context) NatGatewayArrayOutput { return o } func (o NatGatewayArrayOutput) Index(i pulumi.IntInput) NatGatewayOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NatGateway { return vs[0].([]*NatGateway)[vs[1].(int)] }).(NatGatewayOutput) } type NatGatewayMapOutput struct{ *pulumi.OutputState } func (NatGatewayMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NatGateway)(nil)).Elem() } func (o NatGatewayMapOutput) ToNatGatewayMapOutput() NatGatewayMapOutput { return o } func (o NatGatewayMapOutput) ToNatGatewayMapOutputWithContext(ctx context.Context) NatGatewayMapOutput { return o } func (o NatGatewayMapOutput) MapIndex(k pulumi.StringInput) NatGatewayOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NatGateway { return vs[0].(map[string]*NatGateway)[vs[1].(string)] }).(NatGatewayOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NatGatewayInput)(nil)).Elem(), &NatGateway{}) pulumi.RegisterInputType(reflect.TypeOf((*NatGatewayArrayInput)(nil)).Elem(), NatGatewayArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NatGatewayMapInput)(nil)).Elem(), NatGatewayMap{}) pulumi.RegisterOutputType(NatGatewayOutput{}) pulumi.RegisterOutputType(NatGatewayArrayOutput{}) pulumi.RegisterOutputType(NatGatewayMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/expressRouteConnection.go
sdk/go/azure/network/expressRouteConnection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Express Route Connection. // // > **Note:** The provider status of the Express Route Circuit must be set as provisioned while creating the Express Route Connection. See more details [here](https://docs.microsoft.com/azure/expressroute/expressroute-howto-circuit-portal-resource-manager#send-the-service-key-to-your-connectivity-provider-for-provisioning). // // ## 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/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-vwan"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{ // Name: pulumi.String("example-vhub"), // ResourceGroupName: example.Name, // Location: example.Location, // VirtualWanId: exampleVirtualWan.ID(), // AddressPrefix: pulumi.String("10.0.1.0/24"), // }) // if err != nil { // return err // } // exampleExpressRouteGateway, err := network.NewExpressRouteGateway(ctx, "example", &network.ExpressRouteGatewayArgs{ // Name: pulumi.String("example-expressroutegateway"), // ResourceGroupName: example.Name, // Location: example.Location, // VirtualHubId: exampleVirtualHub.ID(), // ScaleUnits: pulumi.Int(1), // }) // 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(5), // 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("AzurePrivatePeering"), // ExpressRouteCircuitName: exampleExpressRouteCircuit.Name, // ResourceGroupName: example.Name, // SharedKey: pulumi.String("ItsASecret"), // PeerAsn: pulumi.Int(100), // PrimaryPeerAddressPrefix: pulumi.String("192.168.1.0/30"), // SecondaryPeerAddressPrefix: pulumi.String("192.168.2.0/30"), // VlanId: pulumi.Int(100), // }) // if err != nil { // return err // } // _, err = network.NewExpressRouteConnection(ctx, "example", &network.ExpressRouteConnectionArgs{ // Name: pulumi.String("example-expressrouteconn"), // ExpressRouteGatewayId: exampleExpressRouteGateway.ID(), // ExpressRouteCircuitPeeringId: exampleExpressRouteCircuitPeering.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 // // Express Route Connections can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/expressRouteConnection:ExpressRouteConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/expressRouteGateways/expressRouteGateway1/expressRouteConnections/connection1 // ``` type ExpressRouteConnection struct { pulumi.CustomResourceState // The authorization key to establish the Express Route Connection. AuthorizationKey pulumi.StringPtrOutput `pulumi:"authorizationKey"` // Is Internet security enabled for this Express Route Connection? EnableInternetSecurity pulumi.BoolPtrOutput `pulumi:"enableInternetSecurity"` // The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created. ExpressRouteCircuitPeeringId pulumi.StringOutput `pulumi:"expressRouteCircuitPeeringId"` // Specified whether Fast Path is enabled for Virtual Wan Firewall Hub. Defaults to `false`. ExpressRouteGatewayBypassEnabled pulumi.BoolPtrOutput `pulumi:"expressRouteGatewayBypassEnabled"` // The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created. ExpressRouteGatewayId pulumi.StringOutput `pulumi:"expressRouteGatewayId"` // The name which should be used for this Express Route Connection. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Deprecated: 'private_link_fast_path_enabled' has been deprecated as it is no longer supported by the resource and will be removed in v5.0 of the AzureRM Provider PrivateLinkFastPathEnabled pulumi.BoolPtrOutput `pulumi:"privateLinkFastPathEnabled"` // A `routing` block as defined below. Routing ExpressRouteConnectionRoutingOutput `pulumi:"routing"` // The routing weight associated to the Express Route Connection. Possible value is between `0` and `32000`. Defaults to `0`. RoutingWeight pulumi.IntPtrOutput `pulumi:"routingWeight"` } // NewExpressRouteConnection registers a new resource with the given unique name, arguments, and options. func NewExpressRouteConnection(ctx *pulumi.Context, name string, args *ExpressRouteConnectionArgs, opts ...pulumi.ResourceOption) (*ExpressRouteConnection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ExpressRouteCircuitPeeringId == nil { return nil, errors.New("invalid value for required argument 'ExpressRouteCircuitPeeringId'") } if args.ExpressRouteGatewayId == nil { return nil, errors.New("invalid value for required argument 'ExpressRouteGatewayId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ExpressRouteConnection err := ctx.RegisterResource("azure:network/expressRouteConnection:ExpressRouteConnection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetExpressRouteConnection gets an existing ExpressRouteConnection 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 GetExpressRouteConnection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ExpressRouteConnectionState, opts ...pulumi.ResourceOption) (*ExpressRouteConnection, error) { var resource ExpressRouteConnection err := ctx.ReadResource("azure:network/expressRouteConnection:ExpressRouteConnection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ExpressRouteConnection resources. type expressRouteConnectionState struct { // The authorization key to establish the Express Route Connection. AuthorizationKey *string `pulumi:"authorizationKey"` // Is Internet security enabled for this Express Route Connection? EnableInternetSecurity *bool `pulumi:"enableInternetSecurity"` // The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created. ExpressRouteCircuitPeeringId *string `pulumi:"expressRouteCircuitPeeringId"` // Specified whether Fast Path is enabled for Virtual Wan Firewall Hub. Defaults to `false`. ExpressRouteGatewayBypassEnabled *bool `pulumi:"expressRouteGatewayBypassEnabled"` // The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created. ExpressRouteGatewayId *string `pulumi:"expressRouteGatewayId"` // The name which should be used for this Express Route Connection. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Deprecated: 'private_link_fast_path_enabled' has been deprecated as it is no longer supported by the resource and will be removed in v5.0 of the AzureRM Provider PrivateLinkFastPathEnabled *bool `pulumi:"privateLinkFastPathEnabled"` // A `routing` block as defined below. Routing *ExpressRouteConnectionRouting `pulumi:"routing"` // The routing weight associated to the Express Route Connection. Possible value is between `0` and `32000`. Defaults to `0`. RoutingWeight *int `pulumi:"routingWeight"` } type ExpressRouteConnectionState struct { // The authorization key to establish the Express Route Connection. AuthorizationKey pulumi.StringPtrInput // Is Internet security enabled for this Express Route Connection? EnableInternetSecurity pulumi.BoolPtrInput // The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created. ExpressRouteCircuitPeeringId pulumi.StringPtrInput // Specified whether Fast Path is enabled for Virtual Wan Firewall Hub. Defaults to `false`. ExpressRouteGatewayBypassEnabled pulumi.BoolPtrInput // The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created. ExpressRouteGatewayId pulumi.StringPtrInput // The name which should be used for this Express Route Connection. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Deprecated: 'private_link_fast_path_enabled' has been deprecated as it is no longer supported by the resource and will be removed in v5.0 of the AzureRM Provider PrivateLinkFastPathEnabled pulumi.BoolPtrInput // A `routing` block as defined below. Routing ExpressRouteConnectionRoutingPtrInput // The routing weight associated to the Express Route Connection. Possible value is between `0` and `32000`. Defaults to `0`. RoutingWeight pulumi.IntPtrInput } func (ExpressRouteConnectionState) ElementType() reflect.Type { return reflect.TypeOf((*expressRouteConnectionState)(nil)).Elem() } type expressRouteConnectionArgs struct { // The authorization key to establish the Express Route Connection. AuthorizationKey *string `pulumi:"authorizationKey"` // Is Internet security enabled for this Express Route Connection? EnableInternetSecurity *bool `pulumi:"enableInternetSecurity"` // The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created. ExpressRouteCircuitPeeringId string `pulumi:"expressRouteCircuitPeeringId"` // Specified whether Fast Path is enabled for Virtual Wan Firewall Hub. Defaults to `false`. ExpressRouteGatewayBypassEnabled *bool `pulumi:"expressRouteGatewayBypassEnabled"` // The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created. ExpressRouteGatewayId string `pulumi:"expressRouteGatewayId"` // The name which should be used for this Express Route Connection. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Deprecated: 'private_link_fast_path_enabled' has been deprecated as it is no longer supported by the resource and will be removed in v5.0 of the AzureRM Provider PrivateLinkFastPathEnabled *bool `pulumi:"privateLinkFastPathEnabled"` // A `routing` block as defined below. Routing *ExpressRouteConnectionRouting `pulumi:"routing"` // The routing weight associated to the Express Route Connection. Possible value is between `0` and `32000`. Defaults to `0`. RoutingWeight *int `pulumi:"routingWeight"` } // The set of arguments for constructing a ExpressRouteConnection resource. type ExpressRouteConnectionArgs struct { // The authorization key to establish the Express Route Connection. AuthorizationKey pulumi.StringPtrInput // Is Internet security enabled for this Express Route Connection? EnableInternetSecurity pulumi.BoolPtrInput // The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created. ExpressRouteCircuitPeeringId pulumi.StringInput // Specified whether Fast Path is enabled for Virtual Wan Firewall Hub. Defaults to `false`. ExpressRouteGatewayBypassEnabled pulumi.BoolPtrInput // The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created. ExpressRouteGatewayId pulumi.StringInput // The name which should be used for this Express Route Connection. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Deprecated: 'private_link_fast_path_enabled' has been deprecated as it is no longer supported by the resource and will be removed in v5.0 of the AzureRM Provider PrivateLinkFastPathEnabled pulumi.BoolPtrInput // A `routing` block as defined below. Routing ExpressRouteConnectionRoutingPtrInput // The routing weight associated to the Express Route Connection. Possible value is between `0` and `32000`. Defaults to `0`. RoutingWeight pulumi.IntPtrInput } func (ExpressRouteConnectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*expressRouteConnectionArgs)(nil)).Elem() } type ExpressRouteConnectionInput interface { pulumi.Input ToExpressRouteConnectionOutput() ExpressRouteConnectionOutput ToExpressRouteConnectionOutputWithContext(ctx context.Context) ExpressRouteConnectionOutput } func (*ExpressRouteConnection) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRouteConnection)(nil)).Elem() } func (i *ExpressRouteConnection) ToExpressRouteConnectionOutput() ExpressRouteConnectionOutput { return i.ToExpressRouteConnectionOutputWithContext(context.Background()) } func (i *ExpressRouteConnection) ToExpressRouteConnectionOutputWithContext(ctx context.Context) ExpressRouteConnectionOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteConnectionOutput) } // ExpressRouteConnectionArrayInput is an input type that accepts ExpressRouteConnectionArray and ExpressRouteConnectionArrayOutput values. // You can construct a concrete instance of `ExpressRouteConnectionArrayInput` via: // // ExpressRouteConnectionArray{ ExpressRouteConnectionArgs{...} } type ExpressRouteConnectionArrayInput interface { pulumi.Input ToExpressRouteConnectionArrayOutput() ExpressRouteConnectionArrayOutput ToExpressRouteConnectionArrayOutputWithContext(context.Context) ExpressRouteConnectionArrayOutput } type ExpressRouteConnectionArray []ExpressRouteConnectionInput func (ExpressRouteConnectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRouteConnection)(nil)).Elem() } func (i ExpressRouteConnectionArray) ToExpressRouteConnectionArrayOutput() ExpressRouteConnectionArrayOutput { return i.ToExpressRouteConnectionArrayOutputWithContext(context.Background()) } func (i ExpressRouteConnectionArray) ToExpressRouteConnectionArrayOutputWithContext(ctx context.Context) ExpressRouteConnectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteConnectionArrayOutput) } // ExpressRouteConnectionMapInput is an input type that accepts ExpressRouteConnectionMap and ExpressRouteConnectionMapOutput values. // You can construct a concrete instance of `ExpressRouteConnectionMapInput` via: // // ExpressRouteConnectionMap{ "key": ExpressRouteConnectionArgs{...} } type ExpressRouteConnectionMapInput interface { pulumi.Input ToExpressRouteConnectionMapOutput() ExpressRouteConnectionMapOutput ToExpressRouteConnectionMapOutputWithContext(context.Context) ExpressRouteConnectionMapOutput } type ExpressRouteConnectionMap map[string]ExpressRouteConnectionInput func (ExpressRouteConnectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRouteConnection)(nil)).Elem() } func (i ExpressRouteConnectionMap) ToExpressRouteConnectionMapOutput() ExpressRouteConnectionMapOutput { return i.ToExpressRouteConnectionMapOutputWithContext(context.Background()) } func (i ExpressRouteConnectionMap) ToExpressRouteConnectionMapOutputWithContext(ctx context.Context) ExpressRouteConnectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRouteConnectionMapOutput) } type ExpressRouteConnectionOutput struct{ *pulumi.OutputState } func (ExpressRouteConnectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRouteConnection)(nil)).Elem() } func (o ExpressRouteConnectionOutput) ToExpressRouteConnectionOutput() ExpressRouteConnectionOutput { return o } func (o ExpressRouteConnectionOutput) ToExpressRouteConnectionOutputWithContext(ctx context.Context) ExpressRouteConnectionOutput { return o } // The authorization key to establish the Express Route Connection. func (o ExpressRouteConnectionOutput) AuthorizationKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *ExpressRouteConnection) pulumi.StringPtrOutput { return v.AuthorizationKey }).(pulumi.StringPtrOutput) } // Is Internet security enabled for this Express Route Connection? func (o ExpressRouteConnectionOutput) EnableInternetSecurity() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ExpressRouteConnection) pulumi.BoolPtrOutput { return v.EnableInternetSecurity }).(pulumi.BoolPtrOutput) } // The ID of the Express Route Circuit Peering that this Express Route Connection connects with. Changing this forces a new resource to be created. func (o ExpressRouteConnectionOutput) ExpressRouteCircuitPeeringId() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteConnection) pulumi.StringOutput { return v.ExpressRouteCircuitPeeringId }).(pulumi.StringOutput) } // Specified whether Fast Path is enabled for Virtual Wan Firewall Hub. Defaults to `false`. func (o ExpressRouteConnectionOutput) ExpressRouteGatewayBypassEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ExpressRouteConnection) pulumi.BoolPtrOutput { return v.ExpressRouteGatewayBypassEnabled }).(pulumi.BoolPtrOutput) } // The ID of the Express Route Gateway that this Express Route Connection connects with. Changing this forces a new resource to be created. func (o ExpressRouteConnectionOutput) ExpressRouteGatewayId() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteConnection) pulumi.StringOutput { return v.ExpressRouteGatewayId }).(pulumi.StringOutput) } // The name which should be used for this Express Route Connection. Changing this forces a new resource to be created. func (o ExpressRouteConnectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRouteConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Deprecated: 'private_link_fast_path_enabled' has been deprecated as it is no longer supported by the resource and will be removed in v5.0 of the AzureRM Provider func (o ExpressRouteConnectionOutput) PrivateLinkFastPathEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *ExpressRouteConnection) pulumi.BoolPtrOutput { return v.PrivateLinkFastPathEnabled }).(pulumi.BoolPtrOutput) } // A `routing` block as defined below. func (o ExpressRouteConnectionOutput) Routing() ExpressRouteConnectionRoutingOutput { return o.ApplyT(func(v *ExpressRouteConnection) ExpressRouteConnectionRoutingOutput { return v.Routing }).(ExpressRouteConnectionRoutingOutput) } // The routing weight associated to the Express Route Connection. Possible value is between `0` and `32000`. Defaults to `0`. func (o ExpressRouteConnectionOutput) RoutingWeight() pulumi.IntPtrOutput { return o.ApplyT(func(v *ExpressRouteConnection) pulumi.IntPtrOutput { return v.RoutingWeight }).(pulumi.IntPtrOutput) } type ExpressRouteConnectionArrayOutput struct{ *pulumi.OutputState } func (ExpressRouteConnectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRouteConnection)(nil)).Elem() } func (o ExpressRouteConnectionArrayOutput) ToExpressRouteConnectionArrayOutput() ExpressRouteConnectionArrayOutput { return o } func (o ExpressRouteConnectionArrayOutput) ToExpressRouteConnectionArrayOutputWithContext(ctx context.Context) ExpressRouteConnectionArrayOutput { return o } func (o ExpressRouteConnectionArrayOutput) Index(i pulumi.IntInput) ExpressRouteConnectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ExpressRouteConnection { return vs[0].([]*ExpressRouteConnection)[vs[1].(int)] }).(ExpressRouteConnectionOutput) } type ExpressRouteConnectionMapOutput struct{ *pulumi.OutputState } func (ExpressRouteConnectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRouteConnection)(nil)).Elem() } func (o ExpressRouteConnectionMapOutput) ToExpressRouteConnectionMapOutput() ExpressRouteConnectionMapOutput { return o } func (o ExpressRouteConnectionMapOutput) ToExpressRouteConnectionMapOutputWithContext(ctx context.Context) ExpressRouteConnectionMapOutput { return o } func (o ExpressRouteConnectionMapOutput) MapIndex(k pulumi.StringInput) ExpressRouteConnectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ExpressRouteConnection { return vs[0].(map[string]*ExpressRouteConnection)[vs[1].(string)] }).(ExpressRouteConnectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteConnectionInput)(nil)).Elem(), &ExpressRouteConnection{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteConnectionArrayInput)(nil)).Elem(), ExpressRouteConnectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRouteConnectionMapInput)(nil)).Elem(), ExpressRouteConnectionMap{}) pulumi.RegisterOutputType(ExpressRouteConnectionOutput{}) pulumi.RegisterOutputType(ExpressRouteConnectionArrayOutput{}) pulumi.RegisterOutputType(ExpressRouteConnectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/virtualHubRouteTableRoute.go
sdk/go/azure/network/virtualHubRouteTableRoute.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Route in a Virtual Hub Route Table. // // > **Note:** Route table routes can managed with this resource, or in-line with the virtualHubRouteTable resource. Using both 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/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.5.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // 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 // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("examplesubnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.5.1.0/24"), // }, // }) // if err != nil { // return err // } // _, err = network.NewSubnetNetworkSecurityGroupAssociation(ctx, "example", &network.SubnetNetworkSecurityGroupAssociationArgs{ // SubnetId: exampleSubnet.ID(), // NetworkSecurityGroupId: exampleNetworkSecurityGroup.ID(), // }) // if err != nil { // return err // } // exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{ // Name: pulumi.String("example-vwan"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{ // Name: pulumi.String("example-vhub"), // ResourceGroupName: example.Name, // Location: example.Location, // VirtualWanId: exampleVirtualWan.ID(), // AddressPrefix: pulumi.String("10.0.2.0/24"), // }) // if err != nil { // return err // } // exampleVirtualHubRouteTable, err := network.NewVirtualHubRouteTable(ctx, "example", &network.VirtualHubRouteTableArgs{ // Name: pulumi.String("example-vhubroutetable"), // VirtualHubId: exampleVirtualHub.ID(), // Labels: pulumi.StringArray{ // pulumi.String("label1"), // }, // }) // if err != nil { // return err // } // exampleVirtualHubConnection, err := network.NewVirtualHubConnection(ctx, "example", &network.VirtualHubConnectionArgs{ // Name: pulumi.String("example-vhubconn"), // VirtualHubId: exampleVirtualHub.ID(), // RemoteVirtualNetworkId: exampleVirtualNetwork.ID(), // Routing: &network.VirtualHubConnectionRoutingArgs{ // AssociatedRouteTableId: exampleVirtualHubRouteTable.ID(), // }, // }) // if err != nil { // return err // } // _, err = network.NewVirtualHubRouteTableRoute(ctx, "example", &network.VirtualHubRouteTableRouteArgs{ // RouteTableId: exampleVirtualHubRouteTable.ID(), // Name: pulumi.String("example-route"), // DestinationsType: pulumi.String("CIDR"), // Destinations: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // NextHopType: pulumi.String("ResourceId"), // NextHop: exampleVirtualHubConnection.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 // // Virtual Hub Route Table Routes can be imported using `<Route Table Resource Id>/routes/<Route Name>`, e.g. // // ```sh // $ pulumi import azure:network/virtualHubRouteTableRoute:VirtualHubRouteTableRoute example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/routeTable1/routes/routeName // ``` type VirtualHubRouteTableRoute struct { pulumi.CustomResourceState // A list of destination addresses for this route. Destinations pulumi.StringArrayOutput `pulumi:"destinations"` // The type of destinations. Possible values are `CIDR`, `ResourceId` and `Service`. DestinationsType pulumi.StringOutput `pulumi:"destinationsType"` // The name which should be used for this route. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The next hop's resource ID. NextHop pulumi.StringOutput `pulumi:"nextHop"` // The type of next hop. Currently the only possible value is `ResourceId`. Defaults to `ResourceId`. NextHopType pulumi.StringPtrOutput `pulumi:"nextHopType"` // The ID of the Virtual Hub Route Table to link this route to. Changing this forces a new resource to be created. RouteTableId pulumi.StringOutput `pulumi:"routeTableId"` } // NewVirtualHubRouteTableRoute registers a new resource with the given unique name, arguments, and options. func NewVirtualHubRouteTableRoute(ctx *pulumi.Context, name string, args *VirtualHubRouteTableRouteArgs, opts ...pulumi.ResourceOption) (*VirtualHubRouteTableRoute, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Destinations == nil { return nil, errors.New("invalid value for required argument 'Destinations'") } if args.DestinationsType == nil { return nil, errors.New("invalid value for required argument 'DestinationsType'") } if args.NextHop == nil { return nil, errors.New("invalid value for required argument 'NextHop'") } if args.RouteTableId == nil { return nil, errors.New("invalid value for required argument 'RouteTableId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualHubRouteTableRoute err := ctx.RegisterResource("azure:network/virtualHubRouteTableRoute:VirtualHubRouteTableRoute", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualHubRouteTableRoute gets an existing VirtualHubRouteTableRoute 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 GetVirtualHubRouteTableRoute(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualHubRouteTableRouteState, opts ...pulumi.ResourceOption) (*VirtualHubRouteTableRoute, error) { var resource VirtualHubRouteTableRoute err := ctx.ReadResource("azure:network/virtualHubRouteTableRoute:VirtualHubRouteTableRoute", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualHubRouteTableRoute resources. type virtualHubRouteTableRouteState struct { // A list of destination addresses for this route. Destinations []string `pulumi:"destinations"` // The type of destinations. Possible values are `CIDR`, `ResourceId` and `Service`. DestinationsType *string `pulumi:"destinationsType"` // The name which should be used for this route. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The next hop's resource ID. NextHop *string `pulumi:"nextHop"` // The type of next hop. Currently the only possible value is `ResourceId`. Defaults to `ResourceId`. NextHopType *string `pulumi:"nextHopType"` // The ID of the Virtual Hub Route Table to link this route to. Changing this forces a new resource to be created. RouteTableId *string `pulumi:"routeTableId"` } type VirtualHubRouteTableRouteState struct { // A list of destination addresses for this route. Destinations pulumi.StringArrayInput // The type of destinations. Possible values are `CIDR`, `ResourceId` and `Service`. DestinationsType pulumi.StringPtrInput // The name which should be used for this route. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The next hop's resource ID. NextHop pulumi.StringPtrInput // The type of next hop. Currently the only possible value is `ResourceId`. Defaults to `ResourceId`. NextHopType pulumi.StringPtrInput // The ID of the Virtual Hub Route Table to link this route to. Changing this forces a new resource to be created. RouteTableId pulumi.StringPtrInput } func (VirtualHubRouteTableRouteState) ElementType() reflect.Type { return reflect.TypeOf((*virtualHubRouteTableRouteState)(nil)).Elem() } type virtualHubRouteTableRouteArgs struct { // A list of destination addresses for this route. Destinations []string `pulumi:"destinations"` // The type of destinations. Possible values are `CIDR`, `ResourceId` and `Service`. DestinationsType string `pulumi:"destinationsType"` // The name which should be used for this route. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The next hop's resource ID. NextHop string `pulumi:"nextHop"` // The type of next hop. Currently the only possible value is `ResourceId`. Defaults to `ResourceId`. NextHopType *string `pulumi:"nextHopType"` // The ID of the Virtual Hub Route Table to link this route to. Changing this forces a new resource to be created. RouteTableId string `pulumi:"routeTableId"` } // The set of arguments for constructing a VirtualHubRouteTableRoute resource. type VirtualHubRouteTableRouteArgs struct { // A list of destination addresses for this route. Destinations pulumi.StringArrayInput // The type of destinations. Possible values are `CIDR`, `ResourceId` and `Service`. DestinationsType pulumi.StringInput // The name which should be used for this route. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The next hop's resource ID. NextHop pulumi.StringInput // The type of next hop. Currently the only possible value is `ResourceId`. Defaults to `ResourceId`. NextHopType pulumi.StringPtrInput // The ID of the Virtual Hub Route Table to link this route to. Changing this forces a new resource to be created. RouteTableId pulumi.StringInput } func (VirtualHubRouteTableRouteArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualHubRouteTableRouteArgs)(nil)).Elem() } type VirtualHubRouteTableRouteInput interface { pulumi.Input ToVirtualHubRouteTableRouteOutput() VirtualHubRouteTableRouteOutput ToVirtualHubRouteTableRouteOutputWithContext(ctx context.Context) VirtualHubRouteTableRouteOutput } func (*VirtualHubRouteTableRoute) ElementType() reflect.Type { return reflect.TypeOf((**VirtualHubRouteTableRoute)(nil)).Elem() } func (i *VirtualHubRouteTableRoute) ToVirtualHubRouteTableRouteOutput() VirtualHubRouteTableRouteOutput { return i.ToVirtualHubRouteTableRouteOutputWithContext(context.Background()) } func (i *VirtualHubRouteTableRoute) ToVirtualHubRouteTableRouteOutputWithContext(ctx context.Context) VirtualHubRouteTableRouteOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualHubRouteTableRouteOutput) } // VirtualHubRouteTableRouteArrayInput is an input type that accepts VirtualHubRouteTableRouteArray and VirtualHubRouteTableRouteArrayOutput values. // You can construct a concrete instance of `VirtualHubRouteTableRouteArrayInput` via: // // VirtualHubRouteTableRouteArray{ VirtualHubRouteTableRouteArgs{...} } type VirtualHubRouteTableRouteArrayInput interface { pulumi.Input ToVirtualHubRouteTableRouteArrayOutput() VirtualHubRouteTableRouteArrayOutput ToVirtualHubRouteTableRouteArrayOutputWithContext(context.Context) VirtualHubRouteTableRouteArrayOutput } type VirtualHubRouteTableRouteArray []VirtualHubRouteTableRouteInput func (VirtualHubRouteTableRouteArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualHubRouteTableRoute)(nil)).Elem() } func (i VirtualHubRouteTableRouteArray) ToVirtualHubRouteTableRouteArrayOutput() VirtualHubRouteTableRouteArrayOutput { return i.ToVirtualHubRouteTableRouteArrayOutputWithContext(context.Background()) } func (i VirtualHubRouteTableRouteArray) ToVirtualHubRouteTableRouteArrayOutputWithContext(ctx context.Context) VirtualHubRouteTableRouteArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualHubRouteTableRouteArrayOutput) } // VirtualHubRouteTableRouteMapInput is an input type that accepts VirtualHubRouteTableRouteMap and VirtualHubRouteTableRouteMapOutput values. // You can construct a concrete instance of `VirtualHubRouteTableRouteMapInput` via: // // VirtualHubRouteTableRouteMap{ "key": VirtualHubRouteTableRouteArgs{...} } type VirtualHubRouteTableRouteMapInput interface { pulumi.Input ToVirtualHubRouteTableRouteMapOutput() VirtualHubRouteTableRouteMapOutput ToVirtualHubRouteTableRouteMapOutputWithContext(context.Context) VirtualHubRouteTableRouteMapOutput } type VirtualHubRouteTableRouteMap map[string]VirtualHubRouteTableRouteInput func (VirtualHubRouteTableRouteMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualHubRouteTableRoute)(nil)).Elem() } func (i VirtualHubRouteTableRouteMap) ToVirtualHubRouteTableRouteMapOutput() VirtualHubRouteTableRouteMapOutput { return i.ToVirtualHubRouteTableRouteMapOutputWithContext(context.Background()) } func (i VirtualHubRouteTableRouteMap) ToVirtualHubRouteTableRouteMapOutputWithContext(ctx context.Context) VirtualHubRouteTableRouteMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualHubRouteTableRouteMapOutput) } type VirtualHubRouteTableRouteOutput struct{ *pulumi.OutputState } func (VirtualHubRouteTableRouteOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualHubRouteTableRoute)(nil)).Elem() } func (o VirtualHubRouteTableRouteOutput) ToVirtualHubRouteTableRouteOutput() VirtualHubRouteTableRouteOutput { return o } func (o VirtualHubRouteTableRouteOutput) ToVirtualHubRouteTableRouteOutputWithContext(ctx context.Context) VirtualHubRouteTableRouteOutput { return o } // A list of destination addresses for this route. func (o VirtualHubRouteTableRouteOutput) Destinations() pulumi.StringArrayOutput { return o.ApplyT(func(v *VirtualHubRouteTableRoute) pulumi.StringArrayOutput { return v.Destinations }).(pulumi.StringArrayOutput) } // The type of destinations. Possible values are `CIDR`, `ResourceId` and `Service`. func (o VirtualHubRouteTableRouteOutput) DestinationsType() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHubRouteTableRoute) pulumi.StringOutput { return v.DestinationsType }).(pulumi.StringOutput) } // The name which should be used for this route. Changing this forces a new resource to be created. func (o VirtualHubRouteTableRouteOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHubRouteTableRoute) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The next hop's resource ID. func (o VirtualHubRouteTableRouteOutput) NextHop() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHubRouteTableRoute) pulumi.StringOutput { return v.NextHop }).(pulumi.StringOutput) } // The type of next hop. Currently the only possible value is `ResourceId`. Defaults to `ResourceId`. func (o VirtualHubRouteTableRouteOutput) NextHopType() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualHubRouteTableRoute) pulumi.StringPtrOutput { return v.NextHopType }).(pulumi.StringPtrOutput) } // The ID of the Virtual Hub Route Table to link this route to. Changing this forces a new resource to be created. func (o VirtualHubRouteTableRouteOutput) RouteTableId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHubRouteTableRoute) pulumi.StringOutput { return v.RouteTableId }).(pulumi.StringOutput) } type VirtualHubRouteTableRouteArrayOutput struct{ *pulumi.OutputState } func (VirtualHubRouteTableRouteArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualHubRouteTableRoute)(nil)).Elem() } func (o VirtualHubRouteTableRouteArrayOutput) ToVirtualHubRouteTableRouteArrayOutput() VirtualHubRouteTableRouteArrayOutput { return o } func (o VirtualHubRouteTableRouteArrayOutput) ToVirtualHubRouteTableRouteArrayOutputWithContext(ctx context.Context) VirtualHubRouteTableRouteArrayOutput { return o } func (o VirtualHubRouteTableRouteArrayOutput) Index(i pulumi.IntInput) VirtualHubRouteTableRouteOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualHubRouteTableRoute { return vs[0].([]*VirtualHubRouteTableRoute)[vs[1].(int)] }).(VirtualHubRouteTableRouteOutput) } type VirtualHubRouteTableRouteMapOutput struct{ *pulumi.OutputState } func (VirtualHubRouteTableRouteMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualHubRouteTableRoute)(nil)).Elem() } func (o VirtualHubRouteTableRouteMapOutput) ToVirtualHubRouteTableRouteMapOutput() VirtualHubRouteTableRouteMapOutput { return o } func (o VirtualHubRouteTableRouteMapOutput) ToVirtualHubRouteTableRouteMapOutputWithContext(ctx context.Context) VirtualHubRouteTableRouteMapOutput { return o } func (o VirtualHubRouteTableRouteMapOutput) MapIndex(k pulumi.StringInput) VirtualHubRouteTableRouteOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualHubRouteTableRoute { return vs[0].(map[string]*VirtualHubRouteTableRoute)[vs[1].(string)] }).(VirtualHubRouteTableRouteOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualHubRouteTableRouteInput)(nil)).Elem(), &VirtualHubRouteTableRoute{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualHubRouteTableRouteArrayInput)(nil)).Elem(), VirtualHubRouteTableRouteArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualHubRouteTableRouteMapInput)(nil)).Elem(), VirtualHubRouteTableRouteMap{}) pulumi.RegisterOutputType(VirtualHubRouteTableRouteOutput{}) pulumi.RegisterOutputType(VirtualHubRouteTableRouteArrayOutput{}) pulumi.RegisterOutputType(VirtualHubRouteTableRouteMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/routeServerBgpConnection.go
sdk/go/azure/network/routeServerBgpConnection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Bgp Connection for a Route Server // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vn"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // ResourceGroupName: example.Name, // Location: example.Location, // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("RouteServerSubnet"), // VirtualNetworkName: exampleVirtualNetwork.Name, // ResourceGroupName: example.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("example-pip"), // ResourceGroupName: example.Name, // Location: example.Location, // AllocationMethod: pulumi.String("Static"), // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // exampleRouteServer, err := network.NewRouteServer(ctx, "example", &network.RouteServerArgs{ // Name: pulumi.String("example-routerserver"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: pulumi.String("Standard"), // PublicIpAddressId: examplePublicIp.ID(), // SubnetId: exampleSubnet.ID(), // BranchToBranchTrafficEnabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // _, err = network.NewRouteServerBgpConnection(ctx, "example", &network.RouteServerBgpConnectionArgs{ // Name: pulumi.String("example-rs-bgpconnection"), // RouteServerId: exampleRouteServer.ID(), // PeerAsn: pulumi.Int(65501), // PeerIp: pulumi.String("169.254.21.5"), // }) // 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 // // Route Server Bgp Connections can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/routeServerBgpConnection:RouteServerBgpConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualHubs/routeServer1/bgpConnections/connection1 // ``` type RouteServerBgpConnection struct { pulumi.CustomResourceState // The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created. PeerAsn pulumi.IntOutput `pulumi:"peerAsn"` // The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created. PeerIp pulumi.StringOutput `pulumi:"peerIp"` // The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created. RouteServerId pulumi.StringOutput `pulumi:"routeServerId"` } // NewRouteServerBgpConnection registers a new resource with the given unique name, arguments, and options. func NewRouteServerBgpConnection(ctx *pulumi.Context, name string, args *RouteServerBgpConnectionArgs, opts ...pulumi.ResourceOption) (*RouteServerBgpConnection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PeerAsn == nil { return nil, errors.New("invalid value for required argument 'PeerAsn'") } if args.PeerIp == nil { return nil, errors.New("invalid value for required argument 'PeerIp'") } if args.RouteServerId == nil { return nil, errors.New("invalid value for required argument 'RouteServerId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource RouteServerBgpConnection err := ctx.RegisterResource("azure:network/routeServerBgpConnection:RouteServerBgpConnection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetRouteServerBgpConnection gets an existing RouteServerBgpConnection 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 GetRouteServerBgpConnection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RouteServerBgpConnectionState, opts ...pulumi.ResourceOption) (*RouteServerBgpConnection, error) { var resource RouteServerBgpConnection err := ctx.ReadResource("azure:network/routeServerBgpConnection:RouteServerBgpConnection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering RouteServerBgpConnection resources. type routeServerBgpConnectionState struct { // The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created. PeerAsn *int `pulumi:"peerAsn"` // The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created. PeerIp *string `pulumi:"peerIp"` // The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created. RouteServerId *string `pulumi:"routeServerId"` } type RouteServerBgpConnectionState struct { // The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created. PeerAsn pulumi.IntPtrInput // The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created. PeerIp pulumi.StringPtrInput // The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created. RouteServerId pulumi.StringPtrInput } func (RouteServerBgpConnectionState) ElementType() reflect.Type { return reflect.TypeOf((*routeServerBgpConnectionState)(nil)).Elem() } type routeServerBgpConnectionArgs struct { // The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created. PeerAsn int `pulumi:"peerAsn"` // The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created. PeerIp string `pulumi:"peerIp"` // The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created. RouteServerId string `pulumi:"routeServerId"` } // The set of arguments for constructing a RouteServerBgpConnection resource. type RouteServerBgpConnectionArgs struct { // The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created. PeerAsn pulumi.IntInput // The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created. PeerIp pulumi.StringInput // The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created. RouteServerId pulumi.StringInput } func (RouteServerBgpConnectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*routeServerBgpConnectionArgs)(nil)).Elem() } type RouteServerBgpConnectionInput interface { pulumi.Input ToRouteServerBgpConnectionOutput() RouteServerBgpConnectionOutput ToRouteServerBgpConnectionOutputWithContext(ctx context.Context) RouteServerBgpConnectionOutput } func (*RouteServerBgpConnection) ElementType() reflect.Type { return reflect.TypeOf((**RouteServerBgpConnection)(nil)).Elem() } func (i *RouteServerBgpConnection) ToRouteServerBgpConnectionOutput() RouteServerBgpConnectionOutput { return i.ToRouteServerBgpConnectionOutputWithContext(context.Background()) } func (i *RouteServerBgpConnection) ToRouteServerBgpConnectionOutputWithContext(ctx context.Context) RouteServerBgpConnectionOutput { return pulumi.ToOutputWithContext(ctx, i).(RouteServerBgpConnectionOutput) } // RouteServerBgpConnectionArrayInput is an input type that accepts RouteServerBgpConnectionArray and RouteServerBgpConnectionArrayOutput values. // You can construct a concrete instance of `RouteServerBgpConnectionArrayInput` via: // // RouteServerBgpConnectionArray{ RouteServerBgpConnectionArgs{...} } type RouteServerBgpConnectionArrayInput interface { pulumi.Input ToRouteServerBgpConnectionArrayOutput() RouteServerBgpConnectionArrayOutput ToRouteServerBgpConnectionArrayOutputWithContext(context.Context) RouteServerBgpConnectionArrayOutput } type RouteServerBgpConnectionArray []RouteServerBgpConnectionInput func (RouteServerBgpConnectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*RouteServerBgpConnection)(nil)).Elem() } func (i RouteServerBgpConnectionArray) ToRouteServerBgpConnectionArrayOutput() RouteServerBgpConnectionArrayOutput { return i.ToRouteServerBgpConnectionArrayOutputWithContext(context.Background()) } func (i RouteServerBgpConnectionArray) ToRouteServerBgpConnectionArrayOutputWithContext(ctx context.Context) RouteServerBgpConnectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(RouteServerBgpConnectionArrayOutput) } // RouteServerBgpConnectionMapInput is an input type that accepts RouteServerBgpConnectionMap and RouteServerBgpConnectionMapOutput values. // You can construct a concrete instance of `RouteServerBgpConnectionMapInput` via: // // RouteServerBgpConnectionMap{ "key": RouteServerBgpConnectionArgs{...} } type RouteServerBgpConnectionMapInput interface { pulumi.Input ToRouteServerBgpConnectionMapOutput() RouteServerBgpConnectionMapOutput ToRouteServerBgpConnectionMapOutputWithContext(context.Context) RouteServerBgpConnectionMapOutput } type RouteServerBgpConnectionMap map[string]RouteServerBgpConnectionInput func (RouteServerBgpConnectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RouteServerBgpConnection)(nil)).Elem() } func (i RouteServerBgpConnectionMap) ToRouteServerBgpConnectionMapOutput() RouteServerBgpConnectionMapOutput { return i.ToRouteServerBgpConnectionMapOutputWithContext(context.Background()) } func (i RouteServerBgpConnectionMap) ToRouteServerBgpConnectionMapOutputWithContext(ctx context.Context) RouteServerBgpConnectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(RouteServerBgpConnectionMapOutput) } type RouteServerBgpConnectionOutput struct{ *pulumi.OutputState } func (RouteServerBgpConnectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**RouteServerBgpConnection)(nil)).Elem() } func (o RouteServerBgpConnectionOutput) ToRouteServerBgpConnectionOutput() RouteServerBgpConnectionOutput { return o } func (o RouteServerBgpConnectionOutput) ToRouteServerBgpConnectionOutputWithContext(ctx context.Context) RouteServerBgpConnectionOutput { return o } // The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created. func (o RouteServerBgpConnectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *RouteServerBgpConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created. func (o RouteServerBgpConnectionOutput) PeerAsn() pulumi.IntOutput { return o.ApplyT(func(v *RouteServerBgpConnection) pulumi.IntOutput { return v.PeerAsn }).(pulumi.IntOutput) } // The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created. func (o RouteServerBgpConnectionOutput) PeerIp() pulumi.StringOutput { return o.ApplyT(func(v *RouteServerBgpConnection) pulumi.StringOutput { return v.PeerIp }).(pulumi.StringOutput) } // The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created. func (o RouteServerBgpConnectionOutput) RouteServerId() pulumi.StringOutput { return o.ApplyT(func(v *RouteServerBgpConnection) pulumi.StringOutput { return v.RouteServerId }).(pulumi.StringOutput) } type RouteServerBgpConnectionArrayOutput struct{ *pulumi.OutputState } func (RouteServerBgpConnectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*RouteServerBgpConnection)(nil)).Elem() } func (o RouteServerBgpConnectionArrayOutput) ToRouteServerBgpConnectionArrayOutput() RouteServerBgpConnectionArrayOutput { return o } func (o RouteServerBgpConnectionArrayOutput) ToRouteServerBgpConnectionArrayOutputWithContext(ctx context.Context) RouteServerBgpConnectionArrayOutput { return o } func (o RouteServerBgpConnectionArrayOutput) Index(i pulumi.IntInput) RouteServerBgpConnectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RouteServerBgpConnection { return vs[0].([]*RouteServerBgpConnection)[vs[1].(int)] }).(RouteServerBgpConnectionOutput) } type RouteServerBgpConnectionMapOutput struct{ *pulumi.OutputState } func (RouteServerBgpConnectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RouteServerBgpConnection)(nil)).Elem() } func (o RouteServerBgpConnectionMapOutput) ToRouteServerBgpConnectionMapOutput() RouteServerBgpConnectionMapOutput { return o } func (o RouteServerBgpConnectionMapOutput) ToRouteServerBgpConnectionMapOutputWithContext(ctx context.Context) RouteServerBgpConnectionMapOutput { return o } func (o RouteServerBgpConnectionMapOutput) MapIndex(k pulumi.StringInput) RouteServerBgpConnectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RouteServerBgpConnection { return vs[0].(map[string]*RouteServerBgpConnection)[vs[1].(string)] }).(RouteServerBgpConnectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*RouteServerBgpConnectionInput)(nil)).Elem(), &RouteServerBgpConnection{}) pulumi.RegisterInputType(reflect.TypeOf((*RouteServerBgpConnectionArrayInput)(nil)).Elem(), RouteServerBgpConnectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*RouteServerBgpConnectionMapInput)(nil)).Elem(), RouteServerBgpConnectionMap{}) pulumi.RegisterOutputType(RouteServerBgpConnectionOutput{}) pulumi.RegisterOutputType(RouteServerBgpConnectionArrayOutput{}) pulumi.RegisterOutputType(RouteServerBgpConnectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerStaticMember.go
sdk/go/azure/network/networkManagerStaticMember.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network 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 Manager Static Member. // // ## 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/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 // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // Location: example.Location, // ResourceGroupName: example.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Connectivity"), // pulumi.String("SecurityAdmin"), // }, // Description: pulumi.String("example network manager"), // }) // if err != nil { // return err // } // exampleNetworkManagerNetworkGroup, err := network.NewNetworkManagerNetworkGroup(ctx, "example", &network.NetworkManagerNetworkGroupArgs{ // Name: pulumi.String("example-group"), // NetworkManagerId: exampleNetworkManager.ID(), // Description: pulumi.String("example network group"), // }) // 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 // } // _, err = network.NewNetworkManagerStaticMember(ctx, "example", &network.NetworkManagerStaticMemberArgs{ // Name: pulumi.String("example-nmsm"), // NetworkGroupId: exampleNetworkManagerNetworkGroup.ID(), // TargetVirtualNetworkId: exampleVirtualNetwork.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 // // Network Manager Static Member can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerStaticMember:NetworkManagerStaticMember example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1/networkGroups/networkGroup1/staticMembers/staticMember1 // ``` type NetworkManagerStaticMember struct { pulumi.CustomResourceState // Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created. NetworkGroupId pulumi.StringOutput `pulumi:"networkGroupId"` // The region of the Network Manager Static Member. Region pulumi.StringOutput `pulumi:"region"` // Specifies the Resource ID of the Virtual Network or Subnet used as the Static Member. Changing this forces a new Network Manager Static Member to be created. // // > **Note:** Subnet is supported only if the Network Manager has added `Routing` to `scopeAccesses` and the Network Group has set `Subnet` as the `memberType` value. TargetVirtualNetworkId pulumi.StringOutput `pulumi:"targetVirtualNetworkId"` } // NewNetworkManagerStaticMember registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerStaticMember(ctx *pulumi.Context, name string, args *NetworkManagerStaticMemberArgs, opts ...pulumi.ResourceOption) (*NetworkManagerStaticMember, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NetworkGroupId == nil { return nil, errors.New("invalid value for required argument 'NetworkGroupId'") } if args.TargetVirtualNetworkId == nil { return nil, errors.New("invalid value for required argument 'TargetVirtualNetworkId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerStaticMember err := ctx.RegisterResource("azure:network/networkManagerStaticMember:NetworkManagerStaticMember", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerStaticMember gets an existing NetworkManagerStaticMember 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 GetNetworkManagerStaticMember(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerStaticMemberState, opts ...pulumi.ResourceOption) (*NetworkManagerStaticMember, error) { var resource NetworkManagerStaticMember err := ctx.ReadResource("azure:network/networkManagerStaticMember:NetworkManagerStaticMember", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerStaticMember resources. type networkManagerStaticMemberState struct { // Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created. Name *string `pulumi:"name"` // Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created. NetworkGroupId *string `pulumi:"networkGroupId"` // The region of the Network Manager Static Member. Region *string `pulumi:"region"` // Specifies the Resource ID of the Virtual Network or Subnet used as the Static Member. Changing this forces a new Network Manager Static Member to be created. // // > **Note:** Subnet is supported only if the Network Manager has added `Routing` to `scopeAccesses` and the Network Group has set `Subnet` as the `memberType` value. TargetVirtualNetworkId *string `pulumi:"targetVirtualNetworkId"` } type NetworkManagerStaticMemberState struct { // Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created. Name pulumi.StringPtrInput // Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created. NetworkGroupId pulumi.StringPtrInput // The region of the Network Manager Static Member. Region pulumi.StringPtrInput // Specifies the Resource ID of the Virtual Network or Subnet used as the Static Member. Changing this forces a new Network Manager Static Member to be created. // // > **Note:** Subnet is supported only if the Network Manager has added `Routing` to `scopeAccesses` and the Network Group has set `Subnet` as the `memberType` value. TargetVirtualNetworkId pulumi.StringPtrInput } func (NetworkManagerStaticMemberState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerStaticMemberState)(nil)).Elem() } type networkManagerStaticMemberArgs struct { // Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created. Name *string `pulumi:"name"` // Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created. NetworkGroupId string `pulumi:"networkGroupId"` // Specifies the Resource ID of the Virtual Network or Subnet used as the Static Member. Changing this forces a new Network Manager Static Member to be created. // // > **Note:** Subnet is supported only if the Network Manager has added `Routing` to `scopeAccesses` and the Network Group has set `Subnet` as the `memberType` value. TargetVirtualNetworkId string `pulumi:"targetVirtualNetworkId"` } // The set of arguments for constructing a NetworkManagerStaticMember resource. type NetworkManagerStaticMemberArgs struct { // Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created. Name pulumi.StringPtrInput // Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created. NetworkGroupId pulumi.StringInput // Specifies the Resource ID of the Virtual Network or Subnet used as the Static Member. Changing this forces a new Network Manager Static Member to be created. // // > **Note:** Subnet is supported only if the Network Manager has added `Routing` to `scopeAccesses` and the Network Group has set `Subnet` as the `memberType` value. TargetVirtualNetworkId pulumi.StringInput } func (NetworkManagerStaticMemberArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerStaticMemberArgs)(nil)).Elem() } type NetworkManagerStaticMemberInput interface { pulumi.Input ToNetworkManagerStaticMemberOutput() NetworkManagerStaticMemberOutput ToNetworkManagerStaticMemberOutputWithContext(ctx context.Context) NetworkManagerStaticMemberOutput } func (*NetworkManagerStaticMember) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerStaticMember)(nil)).Elem() } func (i *NetworkManagerStaticMember) ToNetworkManagerStaticMemberOutput() NetworkManagerStaticMemberOutput { return i.ToNetworkManagerStaticMemberOutputWithContext(context.Background()) } func (i *NetworkManagerStaticMember) ToNetworkManagerStaticMemberOutputWithContext(ctx context.Context) NetworkManagerStaticMemberOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerStaticMemberOutput) } // NetworkManagerStaticMemberArrayInput is an input type that accepts NetworkManagerStaticMemberArray and NetworkManagerStaticMemberArrayOutput values. // You can construct a concrete instance of `NetworkManagerStaticMemberArrayInput` via: // // NetworkManagerStaticMemberArray{ NetworkManagerStaticMemberArgs{...} } type NetworkManagerStaticMemberArrayInput interface { pulumi.Input ToNetworkManagerStaticMemberArrayOutput() NetworkManagerStaticMemberArrayOutput ToNetworkManagerStaticMemberArrayOutputWithContext(context.Context) NetworkManagerStaticMemberArrayOutput } type NetworkManagerStaticMemberArray []NetworkManagerStaticMemberInput func (NetworkManagerStaticMemberArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerStaticMember)(nil)).Elem() } func (i NetworkManagerStaticMemberArray) ToNetworkManagerStaticMemberArrayOutput() NetworkManagerStaticMemberArrayOutput { return i.ToNetworkManagerStaticMemberArrayOutputWithContext(context.Background()) } func (i NetworkManagerStaticMemberArray) ToNetworkManagerStaticMemberArrayOutputWithContext(ctx context.Context) NetworkManagerStaticMemberArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerStaticMemberArrayOutput) } // NetworkManagerStaticMemberMapInput is an input type that accepts NetworkManagerStaticMemberMap and NetworkManagerStaticMemberMapOutput values. // You can construct a concrete instance of `NetworkManagerStaticMemberMapInput` via: // // NetworkManagerStaticMemberMap{ "key": NetworkManagerStaticMemberArgs{...} } type NetworkManagerStaticMemberMapInput interface { pulumi.Input ToNetworkManagerStaticMemberMapOutput() NetworkManagerStaticMemberMapOutput ToNetworkManagerStaticMemberMapOutputWithContext(context.Context) NetworkManagerStaticMemberMapOutput } type NetworkManagerStaticMemberMap map[string]NetworkManagerStaticMemberInput func (NetworkManagerStaticMemberMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerStaticMember)(nil)).Elem() } func (i NetworkManagerStaticMemberMap) ToNetworkManagerStaticMemberMapOutput() NetworkManagerStaticMemberMapOutput { return i.ToNetworkManagerStaticMemberMapOutputWithContext(context.Background()) } func (i NetworkManagerStaticMemberMap) ToNetworkManagerStaticMemberMapOutputWithContext(ctx context.Context) NetworkManagerStaticMemberMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerStaticMemberMapOutput) } type NetworkManagerStaticMemberOutput struct{ *pulumi.OutputState } func (NetworkManagerStaticMemberOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerStaticMember)(nil)).Elem() } func (o NetworkManagerStaticMemberOutput) ToNetworkManagerStaticMemberOutput() NetworkManagerStaticMemberOutput { return o } func (o NetworkManagerStaticMemberOutput) ToNetworkManagerStaticMemberOutputWithContext(ctx context.Context) NetworkManagerStaticMemberOutput { return o } // Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created. func (o NetworkManagerStaticMemberOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerStaticMember) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created. func (o NetworkManagerStaticMemberOutput) NetworkGroupId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerStaticMember) pulumi.StringOutput { return v.NetworkGroupId }).(pulumi.StringOutput) } // The region of the Network Manager Static Member. func (o NetworkManagerStaticMemberOutput) Region() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerStaticMember) pulumi.StringOutput { return v.Region }).(pulumi.StringOutput) } // Specifies the Resource ID of the Virtual Network or Subnet used as the Static Member. Changing this forces a new Network Manager Static Member to be created. // // > **Note:** Subnet is supported only if the Network Manager has added `Routing` to `scopeAccesses` and the Network Group has set `Subnet` as the `memberType` value. func (o NetworkManagerStaticMemberOutput) TargetVirtualNetworkId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerStaticMember) pulumi.StringOutput { return v.TargetVirtualNetworkId }).(pulumi.StringOutput) } type NetworkManagerStaticMemberArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerStaticMemberArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerStaticMember)(nil)).Elem() } func (o NetworkManagerStaticMemberArrayOutput) ToNetworkManagerStaticMemberArrayOutput() NetworkManagerStaticMemberArrayOutput { return o } func (o NetworkManagerStaticMemberArrayOutput) ToNetworkManagerStaticMemberArrayOutputWithContext(ctx context.Context) NetworkManagerStaticMemberArrayOutput { return o } func (o NetworkManagerStaticMemberArrayOutput) Index(i pulumi.IntInput) NetworkManagerStaticMemberOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerStaticMember { return vs[0].([]*NetworkManagerStaticMember)[vs[1].(int)] }).(NetworkManagerStaticMemberOutput) } type NetworkManagerStaticMemberMapOutput struct{ *pulumi.OutputState } func (NetworkManagerStaticMemberMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerStaticMember)(nil)).Elem() } func (o NetworkManagerStaticMemberMapOutput) ToNetworkManagerStaticMemberMapOutput() NetworkManagerStaticMemberMapOutput { return o } func (o NetworkManagerStaticMemberMapOutput) ToNetworkManagerStaticMemberMapOutputWithContext(ctx context.Context) NetworkManagerStaticMemberMapOutput { return o } func (o NetworkManagerStaticMemberMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerStaticMemberOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerStaticMember { return vs[0].(map[string]*NetworkManagerStaticMember)[vs[1].(string)] }).(NetworkManagerStaticMemberOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerStaticMemberInput)(nil)).Elem(), &NetworkManagerStaticMember{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerStaticMemberArrayInput)(nil)).Elem(), NetworkManagerStaticMemberArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerStaticMemberMapInput)(nil)).Elem(), NetworkManagerStaticMemberMap{}) pulumi.RegisterOutputType(NetworkManagerStaticMemberOutput{}) pulumi.RegisterOutputType(NetworkManagerStaticMemberArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerStaticMemberMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/firewall.go
sdk/go/azure/network/firewall.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network 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 Firewall. // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("testvnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("AzureFirewallSubnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("testpip"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // _, err = network.NewFirewall(ctx, "example", &network.FirewallArgs{ // Name: pulumi.String("testfirewall"), // Location: example.Location, // ResourceGroupName: example.Name, // SkuName: pulumi.String("AZFW_VNet"), // SkuTier: pulumi.String("Standard"), // IpConfigurations: network.FirewallIpConfigurationArray{ // &network.FirewallIpConfigurationArgs{ // Name: pulumi.String("configuration"), // SubnetId: exampleSubnet.ID(), // PublicIpAddressId: examplePublicIp.ID(), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Azure Firewalls can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/firewall:Firewall example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/azureFirewalls/testfirewall // ``` type Firewall struct { pulumi.CustomResourceState // Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when set to `true`. It will be set to `true` if `dnsServers` provided with a not empty list. DnsProxyEnabled pulumi.BoolOutput `pulumi:"dnsProxyEnabled"` // A list of DNS servers that the Azure Firewall will direct DNS traffic to the for name resolution. DnsServers pulumi.StringArrayOutput `pulumi:"dnsServers"` // The ID of the Firewall Policy applied to this Firewall. FirewallPolicyId pulumi.StringPtrOutput `pulumi:"firewallPolicyId"` // An `ipConfiguration` block as documented below. IpConfigurations FirewallIpConfigurationArrayOutput `pulumi:"ipConfigurations"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // A `managementIpConfiguration` block as documented below, which allows force-tunnelling of traffic to be performed by the firewall. Adding or removing this block or changing the `subnetId` in an existing block forces a new resource to be created. Changing this forces a new resource to be created. ManagementIpConfiguration FirewallManagementIpConfigurationPtrOutput `pulumi:"managementIpConfiguration"` // Specifies the name of the Firewall. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // A list of SNAT private CIDR IP ranges, or the special string `IANAPrivateRanges`, which indicates Azure Firewall does not SNAT when the destination IP address is a private range per IANA RFC 1918. PrivateIpRanges pulumi.StringArrayOutput `pulumi:"privateIpRanges"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // SKU name of the Firewall. Possible values are `AZFW_Hub` and `AZFW_VNet`. Changing this forces a new resource to be created. SkuName pulumi.StringOutput `pulumi:"skuName"` // SKU tier of the Firewall. Possible values are `Premium`, `Standard` and `Basic`. SkuTier pulumi.StringOutput `pulumi:"skuTier"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // The operation mode for threat intelligence-based filtering. Possible values are: `Off`, `Alert` and `Deny`. Defaults to `Alert`. ThreatIntelMode pulumi.StringOutput `pulumi:"threatIntelMode"` // A `virtualHub` block as documented below. VirtualHub FirewallVirtualHubPtrOutput `pulumi:"virtualHub"` // Specifies a list of Availability Zones in which this Azure Firewall should be located. Changing this forces a new Azure Firewall to be created. // // > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). Zones pulumi.StringArrayOutput `pulumi:"zones"` } // NewFirewall registers a new resource with the given unique name, arguments, and options. func NewFirewall(ctx *pulumi.Context, name string, args *FirewallArgs, opts ...pulumi.ResourceOption) (*Firewall, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SkuName == nil { return nil, errors.New("invalid value for required argument 'SkuName'") } if args.SkuTier == nil { return nil, errors.New("invalid value for required argument 'SkuTier'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Firewall err := ctx.RegisterResource("azure:network/firewall:Firewall", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFirewall gets an existing Firewall 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 GetFirewall(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FirewallState, opts ...pulumi.ResourceOption) (*Firewall, error) { var resource Firewall err := ctx.ReadResource("azure:network/firewall:Firewall", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Firewall resources. type firewallState struct { // Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when set to `true`. It will be set to `true` if `dnsServers` provided with a not empty list. DnsProxyEnabled *bool `pulumi:"dnsProxyEnabled"` // A list of DNS servers that the Azure Firewall will direct DNS traffic to the for name resolution. DnsServers []string `pulumi:"dnsServers"` // The ID of the Firewall Policy applied to this Firewall. FirewallPolicyId *string `pulumi:"firewallPolicyId"` // An `ipConfiguration` block as documented below. IpConfigurations []FirewallIpConfiguration `pulumi:"ipConfigurations"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // A `managementIpConfiguration` block as documented below, which allows force-tunnelling of traffic to be performed by the firewall. Adding or removing this block or changing the `subnetId` in an existing block forces a new resource to be created. Changing this forces a new resource to be created. ManagementIpConfiguration *FirewallManagementIpConfiguration `pulumi:"managementIpConfiguration"` // Specifies the name of the Firewall. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of SNAT private CIDR IP ranges, or the special string `IANAPrivateRanges`, which indicates Azure Firewall does not SNAT when the destination IP address is a private range per IANA RFC 1918. PrivateIpRanges []string `pulumi:"privateIpRanges"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // SKU name of the Firewall. Possible values are `AZFW_Hub` and `AZFW_VNet`. Changing this forces a new resource to be created. SkuName *string `pulumi:"skuName"` // SKU tier of the Firewall. Possible values are `Premium`, `Standard` and `Basic`. SkuTier *string `pulumi:"skuTier"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The operation mode for threat intelligence-based filtering. Possible values are: `Off`, `Alert` and `Deny`. Defaults to `Alert`. ThreatIntelMode *string `pulumi:"threatIntelMode"` // A `virtualHub` block as documented below. VirtualHub *FirewallVirtualHub `pulumi:"virtualHub"` // Specifies a list of Availability Zones in which this Azure Firewall should be located. Changing this forces a new Azure Firewall to be created. // // > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). Zones []string `pulumi:"zones"` } type FirewallState struct { // Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when set to `true`. It will be set to `true` if `dnsServers` provided with a not empty list. DnsProxyEnabled pulumi.BoolPtrInput // A list of DNS servers that the Azure Firewall will direct DNS traffic to the for name resolution. DnsServers pulumi.StringArrayInput // The ID of the Firewall Policy applied to this Firewall. FirewallPolicyId pulumi.StringPtrInput // An `ipConfiguration` block as documented below. IpConfigurations FirewallIpConfigurationArrayInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // A `managementIpConfiguration` block as documented below, which allows force-tunnelling of traffic to be performed by the firewall. Adding or removing this block or changing the `subnetId` in an existing block forces a new resource to be created. Changing this forces a new resource to be created. ManagementIpConfiguration FirewallManagementIpConfigurationPtrInput // Specifies the name of the Firewall. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of SNAT private CIDR IP ranges, or the special string `IANAPrivateRanges`, which indicates Azure Firewall does not SNAT when the destination IP address is a private range per IANA RFC 1918. PrivateIpRanges pulumi.StringArrayInput // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // SKU name of the Firewall. Possible values are `AZFW_Hub` and `AZFW_VNet`. Changing this forces a new resource to be created. SkuName pulumi.StringPtrInput // SKU tier of the Firewall. Possible values are `Premium`, `Standard` and `Basic`. SkuTier pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The operation mode for threat intelligence-based filtering. Possible values are: `Off`, `Alert` and `Deny`. Defaults to `Alert`. ThreatIntelMode pulumi.StringPtrInput // A `virtualHub` block as documented below. VirtualHub FirewallVirtualHubPtrInput // Specifies a list of Availability Zones in which this Azure Firewall should be located. Changing this forces a new Azure Firewall to be created. // // > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). Zones pulumi.StringArrayInput } func (FirewallState) ElementType() reflect.Type { return reflect.TypeOf((*firewallState)(nil)).Elem() } type firewallArgs struct { // Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when set to `true`. It will be set to `true` if `dnsServers` provided with a not empty list. DnsProxyEnabled *bool `pulumi:"dnsProxyEnabled"` // A list of DNS servers that the Azure Firewall will direct DNS traffic to the for name resolution. DnsServers []string `pulumi:"dnsServers"` // The ID of the Firewall Policy applied to this Firewall. FirewallPolicyId *string `pulumi:"firewallPolicyId"` // An `ipConfiguration` block as documented below. IpConfigurations []FirewallIpConfiguration `pulumi:"ipConfigurations"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // A `managementIpConfiguration` block as documented below, which allows force-tunnelling of traffic to be performed by the firewall. Adding or removing this block or changing the `subnetId` in an existing block forces a new resource to be created. Changing this forces a new resource to be created. ManagementIpConfiguration *FirewallManagementIpConfiguration `pulumi:"managementIpConfiguration"` // Specifies the name of the Firewall. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // A list of SNAT private CIDR IP ranges, or the special string `IANAPrivateRanges`, which indicates Azure Firewall does not SNAT when the destination IP address is a private range per IANA RFC 1918. PrivateIpRanges []string `pulumi:"privateIpRanges"` // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // SKU name of the Firewall. Possible values are `AZFW_Hub` and `AZFW_VNet`. Changing this forces a new resource to be created. SkuName string `pulumi:"skuName"` // SKU tier of the Firewall. Possible values are `Premium`, `Standard` and `Basic`. SkuTier string `pulumi:"skuTier"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // The operation mode for threat intelligence-based filtering. Possible values are: `Off`, `Alert` and `Deny`. Defaults to `Alert`. ThreatIntelMode *string `pulumi:"threatIntelMode"` // A `virtualHub` block as documented below. VirtualHub *FirewallVirtualHub `pulumi:"virtualHub"` // Specifies a list of Availability Zones in which this Azure Firewall should be located. Changing this forces a new Azure Firewall to be created. // // > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). Zones []string `pulumi:"zones"` } // The set of arguments for constructing a Firewall resource. type FirewallArgs struct { // Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when set to `true`. It will be set to `true` if `dnsServers` provided with a not empty list. DnsProxyEnabled pulumi.BoolPtrInput // A list of DNS servers that the Azure Firewall will direct DNS traffic to the for name resolution. DnsServers pulumi.StringArrayInput // The ID of the Firewall Policy applied to this Firewall. FirewallPolicyId pulumi.StringPtrInput // An `ipConfiguration` block as documented below. IpConfigurations FirewallIpConfigurationArrayInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // A `managementIpConfiguration` block as documented below, which allows force-tunnelling of traffic to be performed by the firewall. Adding or removing this block or changing the `subnetId` in an existing block forces a new resource to be created. Changing this forces a new resource to be created. ManagementIpConfiguration FirewallManagementIpConfigurationPtrInput // Specifies the name of the Firewall. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // A list of SNAT private CIDR IP ranges, or the special string `IANAPrivateRanges`, which indicates Azure Firewall does not SNAT when the destination IP address is a private range per IANA RFC 1918. PrivateIpRanges pulumi.StringArrayInput // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // SKU name of the Firewall. Possible values are `AZFW_Hub` and `AZFW_VNet`. Changing this forces a new resource to be created. SkuName pulumi.StringInput // SKU tier of the Firewall. Possible values are `Premium`, `Standard` and `Basic`. SkuTier pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // The operation mode for threat intelligence-based filtering. Possible values are: `Off`, `Alert` and `Deny`. Defaults to `Alert`. ThreatIntelMode pulumi.StringPtrInput // A `virtualHub` block as documented below. VirtualHub FirewallVirtualHubPtrInput // Specifies a list of Availability Zones in which this Azure Firewall should be located. Changing this forces a new Azure Firewall to be created. // // > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). Zones pulumi.StringArrayInput } func (FirewallArgs) ElementType() reflect.Type { return reflect.TypeOf((*firewallArgs)(nil)).Elem() } type FirewallInput interface { pulumi.Input ToFirewallOutput() FirewallOutput ToFirewallOutputWithContext(ctx context.Context) FirewallOutput } func (*Firewall) ElementType() reflect.Type { return reflect.TypeOf((**Firewall)(nil)).Elem() } func (i *Firewall) ToFirewallOutput() FirewallOutput { return i.ToFirewallOutputWithContext(context.Background()) } func (i *Firewall) ToFirewallOutputWithContext(ctx context.Context) FirewallOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallOutput) } // FirewallArrayInput is an input type that accepts FirewallArray and FirewallArrayOutput values. // You can construct a concrete instance of `FirewallArrayInput` via: // // FirewallArray{ FirewallArgs{...} } type FirewallArrayInput interface { pulumi.Input ToFirewallArrayOutput() FirewallArrayOutput ToFirewallArrayOutputWithContext(context.Context) FirewallArrayOutput } type FirewallArray []FirewallInput func (FirewallArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Firewall)(nil)).Elem() } func (i FirewallArray) ToFirewallArrayOutput() FirewallArrayOutput { return i.ToFirewallArrayOutputWithContext(context.Background()) } func (i FirewallArray) ToFirewallArrayOutputWithContext(ctx context.Context) FirewallArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallArrayOutput) } // FirewallMapInput is an input type that accepts FirewallMap and FirewallMapOutput values. // You can construct a concrete instance of `FirewallMapInput` via: // // FirewallMap{ "key": FirewallArgs{...} } type FirewallMapInput interface { pulumi.Input ToFirewallMapOutput() FirewallMapOutput ToFirewallMapOutputWithContext(context.Context) FirewallMapOutput } type FirewallMap map[string]FirewallInput func (FirewallMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Firewall)(nil)).Elem() } func (i FirewallMap) ToFirewallMapOutput() FirewallMapOutput { return i.ToFirewallMapOutputWithContext(context.Background()) } func (i FirewallMap) ToFirewallMapOutputWithContext(ctx context.Context) FirewallMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallMapOutput) } type FirewallOutput struct{ *pulumi.OutputState } func (FirewallOutput) ElementType() reflect.Type { return reflect.TypeOf((**Firewall)(nil)).Elem() } func (o FirewallOutput) ToFirewallOutput() FirewallOutput { return o } func (o FirewallOutput) ToFirewallOutputWithContext(ctx context.Context) FirewallOutput { return o } // Whether DNS proxy is enabled. It will forward DNS requests to the DNS servers when set to `true`. It will be set to `true` if `dnsServers` provided with a not empty list. func (o FirewallOutput) DnsProxyEnabled() pulumi.BoolOutput { return o.ApplyT(func(v *Firewall) pulumi.BoolOutput { return v.DnsProxyEnabled }).(pulumi.BoolOutput) } // A list of DNS servers that the Azure Firewall will direct DNS traffic to the for name resolution. func (o FirewallOutput) DnsServers() pulumi.StringArrayOutput { return o.ApplyT(func(v *Firewall) pulumi.StringArrayOutput { return v.DnsServers }).(pulumi.StringArrayOutput) } // The ID of the Firewall Policy applied to this Firewall. func (o FirewallOutput) FirewallPolicyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Firewall) pulumi.StringPtrOutput { return v.FirewallPolicyId }).(pulumi.StringPtrOutput) } // An `ipConfiguration` block as documented below. func (o FirewallOutput) IpConfigurations() FirewallIpConfigurationArrayOutput { return o.ApplyT(func(v *Firewall) FirewallIpConfigurationArrayOutput { return v.IpConfigurations }).(FirewallIpConfigurationArrayOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o FirewallOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Firewall) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // A `managementIpConfiguration` block as documented below, which allows force-tunnelling of traffic to be performed by the firewall. Adding or removing this block or changing the `subnetId` in an existing block forces a new resource to be created. Changing this forces a new resource to be created. func (o FirewallOutput) ManagementIpConfiguration() FirewallManagementIpConfigurationPtrOutput { return o.ApplyT(func(v *Firewall) FirewallManagementIpConfigurationPtrOutput { return v.ManagementIpConfiguration }).(FirewallManagementIpConfigurationPtrOutput) } // Specifies the name of the Firewall. Changing this forces a new resource to be created. func (o FirewallOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Firewall) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A list of SNAT private CIDR IP ranges, or the special string `IANAPrivateRanges`, which indicates Azure Firewall does not SNAT when the destination IP address is a private range per IANA RFC 1918. func (o FirewallOutput) PrivateIpRanges() pulumi.StringArrayOutput { return o.ApplyT(func(v *Firewall) pulumi.StringArrayOutput { return v.PrivateIpRanges }).(pulumi.StringArrayOutput) } // The name of the resource group in which to create the resource. Changing this forces a new resource to be created. func (o FirewallOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Firewall) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // SKU name of the Firewall. Possible values are `AZFW_Hub` and `AZFW_VNet`. Changing this forces a new resource to be created. func (o FirewallOutput) SkuName() pulumi.StringOutput { return o.ApplyT(func(v *Firewall) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput) } // SKU tier of the Firewall. Possible values are `Premium`, `Standard` and `Basic`. func (o FirewallOutput) SkuTier() pulumi.StringOutput { return o.ApplyT(func(v *Firewall) pulumi.StringOutput { return v.SkuTier }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o FirewallOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Firewall) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The operation mode for threat intelligence-based filtering. Possible values are: `Off`, `Alert` and `Deny`. Defaults to `Alert`. func (o FirewallOutput) ThreatIntelMode() pulumi.StringOutput { return o.ApplyT(func(v *Firewall) pulumi.StringOutput { return v.ThreatIntelMode }).(pulumi.StringOutput) } // A `virtualHub` block as documented below. func (o FirewallOutput) VirtualHub() FirewallVirtualHubPtrOutput { return o.ApplyT(func(v *Firewall) FirewallVirtualHubPtrOutput { return v.VirtualHub }).(FirewallVirtualHubPtrOutput) } // Specifies a list of Availability Zones in which this Azure Firewall should be located. Changing this forces a new Azure Firewall to be created. // // > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). func (o FirewallOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v *Firewall) pulumi.StringArrayOutput { return v.Zones }).(pulumi.StringArrayOutput) } type FirewallArrayOutput struct{ *pulumi.OutputState } func (FirewallArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Firewall)(nil)).Elem() } func (o FirewallArrayOutput) ToFirewallArrayOutput() FirewallArrayOutput { return o } func (o FirewallArrayOutput) ToFirewallArrayOutputWithContext(ctx context.Context) FirewallArrayOutput { return o } func (o FirewallArrayOutput) Index(i pulumi.IntInput) FirewallOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Firewall { return vs[0].([]*Firewall)[vs[1].(int)] }).(FirewallOutput) } type FirewallMapOutput struct{ *pulumi.OutputState } func (FirewallMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Firewall)(nil)).Elem() } func (o FirewallMapOutput) ToFirewallMapOutput() FirewallMapOutput { return o } func (o FirewallMapOutput) ToFirewallMapOutputWithContext(ctx context.Context) FirewallMapOutput { return o } func (o FirewallMapOutput) MapIndex(k pulumi.StringInput) FirewallOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Firewall { return vs[0].(map[string]*Firewall)[vs[1].(string)] }).(FirewallOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FirewallInput)(nil)).Elem(), &Firewall{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallArrayInput)(nil)).Elem(), FirewallArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallMapInput)(nil)).Elem(), FirewallMap{}) pulumi.RegisterOutputType(FirewallOutput{}) pulumi.RegisterOutputType(FirewallArrayOutput{}) pulumi.RegisterOutputType(FirewallMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/publicIpPrefix.go
sdk/go/azure/network/publicIpPrefix.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Public IP Prefix. // // ## 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/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 = network.NewPublicIpPrefix(ctx, "example", &network.PublicIpPrefixArgs{ // Name: pulumi.String("acceptanceTestPublicIpPrefix1"), // Location: example.Location, // ResourceGroupName: example.Name, // PrefixLength: pulumi.Int(31), // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Public IP Prefixes can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/publicIpPrefix:PublicIpPrefix myPublicIpPrefix /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/publicIPPrefixes/myPublicIpPrefix1 // ``` type PublicIpPrefix struct { pulumi.CustomResourceState // The Custom IP Prefix ID associated with the Public IP Prefix. Changing this forces a new resource to be created. // // > **Note:** When `ipVersion` is set to `IPv6`, `customIpPrefixId` must reference a regional (child) range rather than a global (parent) range. For more details on creating a Public IP Prefix from a custom IP prefix, see [here](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/manage-custom-ip-address-prefix#create-a-public-ip-prefix-from-a-custom-ip-prefix). CustomIpPrefixId pulumi.StringPtrOutput `pulumi:"customIpPrefixId"` // The IP address prefix value that was allocated. IpPrefix pulumi.StringOutput `pulumi:"ipPrefix"` // The IP Version to use, `IPv6` or `IPv4`. Changing this forces a new resource to be created. Default is `IPv4`. IpVersion pulumi.StringPtrOutput `pulumi:"ipVersion"` // 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 Public IP Prefix resource . Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the number of bits of the prefix. The value can be set between 0 (4,294,967,296 addresses) and 31 (2 addresses). Defaults to `28`(16 addresses). Changing this forces a new resource to be created. // // > **Note:** There may be Public IP address limits on the subscription . [More information available here](https://docs.microsoft.com/azure/azure-subscription-service-limits?toc=%2fazure%2fvirtual-network%2ftoc.json#publicip-address) PrefixLength pulumi.IntPtrOutput `pulumi:"prefixLength"` // The name of the resource group in which to create the Public IP Prefix. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The SKU of the Public IP Prefix. Accepted values are `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note:** Public IP Prefix can only be created with Standard SKUs at this time. Sku pulumi.StringPtrOutput `pulumi:"sku"` // The SKU Tier that should be used for the Public IP. Possible values are `Regional` and `Global`. Defaults to `Regional`. Changing this forces a new resource to be created. SkuTier pulumi.StringPtrOutput `pulumi:"skuTier"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Specifies a list of Availability Zones in which this Public IP Prefix should be located. Changing this forces a new Public IP Prefix to be created. // // > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). Zones pulumi.StringArrayOutput `pulumi:"zones"` } // NewPublicIpPrefix registers a new resource with the given unique name, arguments, and options. func NewPublicIpPrefix(ctx *pulumi.Context, name string, args *PublicIpPrefixArgs, opts ...pulumi.ResourceOption) (*PublicIpPrefix, 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 PublicIpPrefix err := ctx.RegisterResource("azure:network/publicIpPrefix:PublicIpPrefix", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPublicIpPrefix gets an existing PublicIpPrefix 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 GetPublicIpPrefix(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PublicIpPrefixState, opts ...pulumi.ResourceOption) (*PublicIpPrefix, error) { var resource PublicIpPrefix err := ctx.ReadResource("azure:network/publicIpPrefix:PublicIpPrefix", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering PublicIpPrefix resources. type publicIpPrefixState struct { // The Custom IP Prefix ID associated with the Public IP Prefix. Changing this forces a new resource to be created. // // > **Note:** When `ipVersion` is set to `IPv6`, `customIpPrefixId` must reference a regional (child) range rather than a global (parent) range. For more details on creating a Public IP Prefix from a custom IP prefix, see [here](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/manage-custom-ip-address-prefix#create-a-public-ip-prefix-from-a-custom-ip-prefix). CustomIpPrefixId *string `pulumi:"customIpPrefixId"` // The IP address prefix value that was allocated. IpPrefix *string `pulumi:"ipPrefix"` // The IP Version to use, `IPv6` or `IPv4`. Changing this forces a new resource to be created. Default is `IPv4`. IpVersion *string `pulumi:"ipVersion"` // 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 Public IP Prefix resource . Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the number of bits of the prefix. The value can be set between 0 (4,294,967,296 addresses) and 31 (2 addresses). Defaults to `28`(16 addresses). Changing this forces a new resource to be created. // // > **Note:** There may be Public IP address limits on the subscription . [More information available here](https://docs.microsoft.com/azure/azure-subscription-service-limits?toc=%2fazure%2fvirtual-network%2ftoc.json#publicip-address) PrefixLength *int `pulumi:"prefixLength"` // The name of the resource group in which to create the Public IP Prefix. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The SKU of the Public IP Prefix. Accepted values are `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note:** Public IP Prefix can only be created with Standard SKUs at this time. Sku *string `pulumi:"sku"` // The SKU Tier that should be used for the Public IP. Possible values are `Regional` and `Global`. Defaults to `Regional`. Changing this forces a new resource to be created. SkuTier *string `pulumi:"skuTier"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies a list of Availability Zones in which this Public IP Prefix should be located. Changing this forces a new Public IP Prefix to be created. // // > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). Zones []string `pulumi:"zones"` } type PublicIpPrefixState struct { // The Custom IP Prefix ID associated with the Public IP Prefix. Changing this forces a new resource to be created. // // > **Note:** When `ipVersion` is set to `IPv6`, `customIpPrefixId` must reference a regional (child) range rather than a global (parent) range. For more details on creating a Public IP Prefix from a custom IP prefix, see [here](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/manage-custom-ip-address-prefix#create-a-public-ip-prefix-from-a-custom-ip-prefix). CustomIpPrefixId pulumi.StringPtrInput // The IP address prefix value that was allocated. IpPrefix pulumi.StringPtrInput // The IP Version to use, `IPv6` or `IPv4`. Changing this forces a new resource to be created. Default is `IPv4`. IpVersion pulumi.StringPtrInput // 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 Public IP Prefix resource . Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the number of bits of the prefix. The value can be set between 0 (4,294,967,296 addresses) and 31 (2 addresses). Defaults to `28`(16 addresses). Changing this forces a new resource to be created. // // > **Note:** There may be Public IP address limits on the subscription . [More information available here](https://docs.microsoft.com/azure/azure-subscription-service-limits?toc=%2fazure%2fvirtual-network%2ftoc.json#publicip-address) PrefixLength pulumi.IntPtrInput // The name of the resource group in which to create the Public IP Prefix. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The SKU of the Public IP Prefix. Accepted values are `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note:** Public IP Prefix can only be created with Standard SKUs at this time. Sku pulumi.StringPtrInput // The SKU Tier that should be used for the Public IP. Possible values are `Regional` and `Global`. Defaults to `Regional`. Changing this forces a new resource to be created. SkuTier pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies a list of Availability Zones in which this Public IP Prefix should be located. Changing this forces a new Public IP Prefix to be created. // // > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). Zones pulumi.StringArrayInput } func (PublicIpPrefixState) ElementType() reflect.Type { return reflect.TypeOf((*publicIpPrefixState)(nil)).Elem() } type publicIpPrefixArgs struct { // The Custom IP Prefix ID associated with the Public IP Prefix. Changing this forces a new resource to be created. // // > **Note:** When `ipVersion` is set to `IPv6`, `customIpPrefixId` must reference a regional (child) range rather than a global (parent) range. For more details on creating a Public IP Prefix from a custom IP prefix, see [here](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/manage-custom-ip-address-prefix#create-a-public-ip-prefix-from-a-custom-ip-prefix). CustomIpPrefixId *string `pulumi:"customIpPrefixId"` // The IP Version to use, `IPv6` or `IPv4`. Changing this forces a new resource to be created. Default is `IPv4`. IpVersion *string `pulumi:"ipVersion"` // 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 Public IP Prefix resource . Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the number of bits of the prefix. The value can be set between 0 (4,294,967,296 addresses) and 31 (2 addresses). Defaults to `28`(16 addresses). Changing this forces a new resource to be created. // // > **Note:** There may be Public IP address limits on the subscription . [More information available here](https://docs.microsoft.com/azure/azure-subscription-service-limits?toc=%2fazure%2fvirtual-network%2ftoc.json#publicip-address) PrefixLength *int `pulumi:"prefixLength"` // The name of the resource group in which to create the Public IP Prefix. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU of the Public IP Prefix. Accepted values are `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note:** Public IP Prefix can only be created with Standard SKUs at this time. Sku *string `pulumi:"sku"` // The SKU Tier that should be used for the Public IP. Possible values are `Regional` and `Global`. Defaults to `Regional`. Changing this forces a new resource to be created. SkuTier *string `pulumi:"skuTier"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // Specifies a list of Availability Zones in which this Public IP Prefix should be located. Changing this forces a new Public IP Prefix to be created. // // > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). Zones []string `pulumi:"zones"` } // The set of arguments for constructing a PublicIpPrefix resource. type PublicIpPrefixArgs struct { // The Custom IP Prefix ID associated with the Public IP Prefix. Changing this forces a new resource to be created. // // > **Note:** When `ipVersion` is set to `IPv6`, `customIpPrefixId` must reference a regional (child) range rather than a global (parent) range. For more details on creating a Public IP Prefix from a custom IP prefix, see [here](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/manage-custom-ip-address-prefix#create-a-public-ip-prefix-from-a-custom-ip-prefix). CustomIpPrefixId pulumi.StringPtrInput // The IP Version to use, `IPv6` or `IPv4`. Changing this forces a new resource to be created. Default is `IPv4`. IpVersion pulumi.StringPtrInput // 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 Public IP Prefix resource . Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the number of bits of the prefix. The value can be set between 0 (4,294,967,296 addresses) and 31 (2 addresses). Defaults to `28`(16 addresses). Changing this forces a new resource to be created. // // > **Note:** There may be Public IP address limits on the subscription . [More information available here](https://docs.microsoft.com/azure/azure-subscription-service-limits?toc=%2fazure%2fvirtual-network%2ftoc.json#publicip-address) PrefixLength pulumi.IntPtrInput // The name of the resource group in which to create the Public IP Prefix. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The SKU of the Public IP Prefix. Accepted values are `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note:** Public IP Prefix can only be created with Standard SKUs at this time. Sku pulumi.StringPtrInput // The SKU Tier that should be used for the Public IP. Possible values are `Regional` and `Global`. Defaults to `Regional`. Changing this forces a new resource to be created. SkuTier pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // Specifies a list of Availability Zones in which this Public IP Prefix should be located. Changing this forces a new Public IP Prefix to be created. // // > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). Zones pulumi.StringArrayInput } func (PublicIpPrefixArgs) ElementType() reflect.Type { return reflect.TypeOf((*publicIpPrefixArgs)(nil)).Elem() } type PublicIpPrefixInput interface { pulumi.Input ToPublicIpPrefixOutput() PublicIpPrefixOutput ToPublicIpPrefixOutputWithContext(ctx context.Context) PublicIpPrefixOutput } func (*PublicIpPrefix) ElementType() reflect.Type { return reflect.TypeOf((**PublicIpPrefix)(nil)).Elem() } func (i *PublicIpPrefix) ToPublicIpPrefixOutput() PublicIpPrefixOutput { return i.ToPublicIpPrefixOutputWithContext(context.Background()) } func (i *PublicIpPrefix) ToPublicIpPrefixOutputWithContext(ctx context.Context) PublicIpPrefixOutput { return pulumi.ToOutputWithContext(ctx, i).(PublicIpPrefixOutput) } // PublicIpPrefixArrayInput is an input type that accepts PublicIpPrefixArray and PublicIpPrefixArrayOutput values. // You can construct a concrete instance of `PublicIpPrefixArrayInput` via: // // PublicIpPrefixArray{ PublicIpPrefixArgs{...} } type PublicIpPrefixArrayInput interface { pulumi.Input ToPublicIpPrefixArrayOutput() PublicIpPrefixArrayOutput ToPublicIpPrefixArrayOutputWithContext(context.Context) PublicIpPrefixArrayOutput } type PublicIpPrefixArray []PublicIpPrefixInput func (PublicIpPrefixArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*PublicIpPrefix)(nil)).Elem() } func (i PublicIpPrefixArray) ToPublicIpPrefixArrayOutput() PublicIpPrefixArrayOutput { return i.ToPublicIpPrefixArrayOutputWithContext(context.Background()) } func (i PublicIpPrefixArray) ToPublicIpPrefixArrayOutputWithContext(ctx context.Context) PublicIpPrefixArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PublicIpPrefixArrayOutput) } // PublicIpPrefixMapInput is an input type that accepts PublicIpPrefixMap and PublicIpPrefixMapOutput values. // You can construct a concrete instance of `PublicIpPrefixMapInput` via: // // PublicIpPrefixMap{ "key": PublicIpPrefixArgs{...} } type PublicIpPrefixMapInput interface { pulumi.Input ToPublicIpPrefixMapOutput() PublicIpPrefixMapOutput ToPublicIpPrefixMapOutputWithContext(context.Context) PublicIpPrefixMapOutput } type PublicIpPrefixMap map[string]PublicIpPrefixInput func (PublicIpPrefixMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PublicIpPrefix)(nil)).Elem() } func (i PublicIpPrefixMap) ToPublicIpPrefixMapOutput() PublicIpPrefixMapOutput { return i.ToPublicIpPrefixMapOutputWithContext(context.Background()) } func (i PublicIpPrefixMap) ToPublicIpPrefixMapOutputWithContext(ctx context.Context) PublicIpPrefixMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PublicIpPrefixMapOutput) } type PublicIpPrefixOutput struct{ *pulumi.OutputState } func (PublicIpPrefixOutput) ElementType() reflect.Type { return reflect.TypeOf((**PublicIpPrefix)(nil)).Elem() } func (o PublicIpPrefixOutput) ToPublicIpPrefixOutput() PublicIpPrefixOutput { return o } func (o PublicIpPrefixOutput) ToPublicIpPrefixOutputWithContext(ctx context.Context) PublicIpPrefixOutput { return o } // The Custom IP Prefix ID associated with the Public IP Prefix. Changing this forces a new resource to be created. // // > **Note:** When `ipVersion` is set to `IPv6`, `customIpPrefixId` must reference a regional (child) range rather than a global (parent) range. For more details on creating a Public IP Prefix from a custom IP prefix, see [here](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/manage-custom-ip-address-prefix#create-a-public-ip-prefix-from-a-custom-ip-prefix). func (o PublicIpPrefixOutput) CustomIpPrefixId() pulumi.StringPtrOutput { return o.ApplyT(func(v *PublicIpPrefix) pulumi.StringPtrOutput { return v.CustomIpPrefixId }).(pulumi.StringPtrOutput) } // The IP address prefix value that was allocated. func (o PublicIpPrefixOutput) IpPrefix() pulumi.StringOutput { return o.ApplyT(func(v *PublicIpPrefix) pulumi.StringOutput { return v.IpPrefix }).(pulumi.StringOutput) } // The IP Version to use, `IPv6` or `IPv4`. Changing this forces a new resource to be created. Default is `IPv4`. func (o PublicIpPrefixOutput) IpVersion() pulumi.StringPtrOutput { return o.ApplyT(func(v *PublicIpPrefix) pulumi.StringPtrOutput { return v.IpVersion }).(pulumi.StringPtrOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o PublicIpPrefixOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *PublicIpPrefix) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the Public IP Prefix resource . Changing this forces a new resource to be created. func (o PublicIpPrefixOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *PublicIpPrefix) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the number of bits of the prefix. The value can be set between 0 (4,294,967,296 addresses) and 31 (2 addresses). Defaults to `28`(16 addresses). Changing this forces a new resource to be created. // // > **Note:** There may be Public IP address limits on the subscription . [More information available here](https://docs.microsoft.com/azure/azure-subscription-service-limits?toc=%2fazure%2fvirtual-network%2ftoc.json#publicip-address) func (o PublicIpPrefixOutput) PrefixLength() pulumi.IntPtrOutput { return o.ApplyT(func(v *PublicIpPrefix) pulumi.IntPtrOutput { return v.PrefixLength }).(pulumi.IntPtrOutput) } // The name of the resource group in which to create the Public IP Prefix. Changing this forces a new resource to be created. func (o PublicIpPrefixOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *PublicIpPrefix) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The SKU of the Public IP Prefix. Accepted values are `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note:** Public IP Prefix can only be created with Standard SKUs at this time. func (o PublicIpPrefixOutput) Sku() pulumi.StringPtrOutput { return o.ApplyT(func(v *PublicIpPrefix) pulumi.StringPtrOutput { return v.Sku }).(pulumi.StringPtrOutput) } // The SKU Tier that should be used for the Public IP. Possible values are `Regional` and `Global`. Defaults to `Regional`. Changing this forces a new resource to be created. func (o PublicIpPrefixOutput) SkuTier() pulumi.StringPtrOutput { return o.ApplyT(func(v *PublicIpPrefix) pulumi.StringPtrOutput { return v.SkuTier }).(pulumi.StringPtrOutput) } // A mapping of tags to assign to the resource. func (o PublicIpPrefixOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *PublicIpPrefix) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Specifies a list of Availability Zones in which this Public IP Prefix should be located. Changing this forces a new Public IP Prefix to be created. // // > **Note:** Availability Zones are [only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview). func (o PublicIpPrefixOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v *PublicIpPrefix) pulumi.StringArrayOutput { return v.Zones }).(pulumi.StringArrayOutput) } type PublicIpPrefixArrayOutput struct{ *pulumi.OutputState } func (PublicIpPrefixArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*PublicIpPrefix)(nil)).Elem() } func (o PublicIpPrefixArrayOutput) ToPublicIpPrefixArrayOutput() PublicIpPrefixArrayOutput { return o } func (o PublicIpPrefixArrayOutput) ToPublicIpPrefixArrayOutputWithContext(ctx context.Context) PublicIpPrefixArrayOutput { return o } func (o PublicIpPrefixArrayOutput) Index(i pulumi.IntInput) PublicIpPrefixOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PublicIpPrefix { return vs[0].([]*PublicIpPrefix)[vs[1].(int)] }).(PublicIpPrefixOutput) } type PublicIpPrefixMapOutput struct{ *pulumi.OutputState } func (PublicIpPrefixMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PublicIpPrefix)(nil)).Elem() } func (o PublicIpPrefixMapOutput) ToPublicIpPrefixMapOutput() PublicIpPrefixMapOutput { return o } func (o PublicIpPrefixMapOutput) ToPublicIpPrefixMapOutputWithContext(ctx context.Context) PublicIpPrefixMapOutput { return o } func (o PublicIpPrefixMapOutput) MapIndex(k pulumi.StringInput) PublicIpPrefixOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PublicIpPrefix { return vs[0].(map[string]*PublicIpPrefix)[vs[1].(string)] }).(PublicIpPrefixOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PublicIpPrefixInput)(nil)).Elem(), &PublicIpPrefix{}) pulumi.RegisterInputType(reflect.TypeOf((*PublicIpPrefixArrayInput)(nil)).Elem(), PublicIpPrefixArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PublicIpPrefixMapInput)(nil)).Elem(), PublicIpPrefixMap{}) pulumi.RegisterOutputType(PublicIpPrefixOutput{}) pulumi.RegisterOutputType(PublicIpPrefixArrayOutput{}) pulumi.RegisterOutputType(PublicIpPrefixMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/virtualHubIp.go
sdk/go/azure/network/virtualHubIp.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Virtual Hub IP. This resource is also known as a Route Server. // // > **Note:** Virtual Hub IP only supports Standard Virtual Hub without Virtual Wan. // // ## 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/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 // } // exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{ // Name: pulumi.String("example-vhub"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{ // Name: pulumi.String("example-pip"), // Location: example.Location, // ResourceGroupName: example.Name, // AllocationMethod: pulumi.String("Static"), // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.5.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("RouteServerSubnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.5.1.0/24"), // }, // }) // if err != nil { // return err // } // _, err = network.NewVirtualHubIp(ctx, "example", &network.VirtualHubIpArgs{ // Name: pulumi.String("example-vhubipconfig"), // VirtualHubId: exampleVirtualHub.ID(), // PrivateIpAddress: pulumi.String("10.5.1.18"), // PrivateIpAllocationMethod: pulumi.String("Static"), // PublicIpAddressId: examplePublicIp.ID(), // SubnetId: exampleSubnet.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 // // Virtual Hub IPs can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/virtualHubIp:VirtualHubIp example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualHubs/virtualHub1/ipConfigurations/ipConfig1 // ``` type VirtualHubIp struct { pulumi.CustomResourceState // The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The private IP address of the IP configuration. PrivateIpAddress pulumi.StringPtrOutput `pulumi:"privateIpAddress"` // The private IP address allocation method. Possible values are `Static` and `Dynamic` is allowed. Defaults to `Dynamic`. PrivateIpAllocationMethod pulumi.StringPtrOutput `pulumi:"privateIpAllocationMethod"` // The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created. PublicIpAddressId pulumi.StringOutput `pulumi:"publicIpAddressId"` // The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created. SubnetId pulumi.StringOutput `pulumi:"subnetId"` // The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringOutput `pulumi:"virtualHubId"` } // NewVirtualHubIp registers a new resource with the given unique name, arguments, and options. func NewVirtualHubIp(ctx *pulumi.Context, name string, args *VirtualHubIpArgs, opts ...pulumi.ResourceOption) (*VirtualHubIp, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PublicIpAddressId == nil { return nil, errors.New("invalid value for required argument 'PublicIpAddressId'") } if args.SubnetId == nil { return nil, errors.New("invalid value for required argument 'SubnetId'") } if args.VirtualHubId == nil { return nil, errors.New("invalid value for required argument 'VirtualHubId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualHubIp err := ctx.RegisterResource("azure:network/virtualHubIp:VirtualHubIp", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualHubIp gets an existing VirtualHubIp 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 GetVirtualHubIp(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualHubIpState, opts ...pulumi.ResourceOption) (*VirtualHubIp, error) { var resource VirtualHubIp err := ctx.ReadResource("azure:network/virtualHubIp:VirtualHubIp", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualHubIp resources. type virtualHubIpState struct { // The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The private IP address of the IP configuration. PrivateIpAddress *string `pulumi:"privateIpAddress"` // The private IP address allocation method. Possible values are `Static` and `Dynamic` is allowed. Defaults to `Dynamic`. PrivateIpAllocationMethod *string `pulumi:"privateIpAllocationMethod"` // The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created. PublicIpAddressId *string `pulumi:"publicIpAddressId"` // The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created. SubnetId *string `pulumi:"subnetId"` // The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created. VirtualHubId *string `pulumi:"virtualHubId"` } type VirtualHubIpState struct { // The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The private IP address of the IP configuration. PrivateIpAddress pulumi.StringPtrInput // The private IP address allocation method. Possible values are `Static` and `Dynamic` is allowed. Defaults to `Dynamic`. PrivateIpAllocationMethod pulumi.StringPtrInput // The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created. PublicIpAddressId pulumi.StringPtrInput // The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created. SubnetId pulumi.StringPtrInput // The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringPtrInput } func (VirtualHubIpState) ElementType() reflect.Type { return reflect.TypeOf((*virtualHubIpState)(nil)).Elem() } type virtualHubIpArgs struct { // The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The private IP address of the IP configuration. PrivateIpAddress *string `pulumi:"privateIpAddress"` // The private IP address allocation method. Possible values are `Static` and `Dynamic` is allowed. Defaults to `Dynamic`. PrivateIpAllocationMethod *string `pulumi:"privateIpAllocationMethod"` // The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created. PublicIpAddressId string `pulumi:"publicIpAddressId"` // The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created. SubnetId string `pulumi:"subnetId"` // The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created. VirtualHubId string `pulumi:"virtualHubId"` } // The set of arguments for constructing a VirtualHubIp resource. type VirtualHubIpArgs struct { // The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The private IP address of the IP configuration. PrivateIpAddress pulumi.StringPtrInput // The private IP address allocation method. Possible values are `Static` and `Dynamic` is allowed. Defaults to `Dynamic`. PrivateIpAllocationMethod pulumi.StringPtrInput // The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created. PublicIpAddressId pulumi.StringInput // The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created. SubnetId pulumi.StringInput // The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created. VirtualHubId pulumi.StringInput } func (VirtualHubIpArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualHubIpArgs)(nil)).Elem() } type VirtualHubIpInput interface { pulumi.Input ToVirtualHubIpOutput() VirtualHubIpOutput ToVirtualHubIpOutputWithContext(ctx context.Context) VirtualHubIpOutput } func (*VirtualHubIp) ElementType() reflect.Type { return reflect.TypeOf((**VirtualHubIp)(nil)).Elem() } func (i *VirtualHubIp) ToVirtualHubIpOutput() VirtualHubIpOutput { return i.ToVirtualHubIpOutputWithContext(context.Background()) } func (i *VirtualHubIp) ToVirtualHubIpOutputWithContext(ctx context.Context) VirtualHubIpOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualHubIpOutput) } // VirtualHubIpArrayInput is an input type that accepts VirtualHubIpArray and VirtualHubIpArrayOutput values. // You can construct a concrete instance of `VirtualHubIpArrayInput` via: // // VirtualHubIpArray{ VirtualHubIpArgs{...} } type VirtualHubIpArrayInput interface { pulumi.Input ToVirtualHubIpArrayOutput() VirtualHubIpArrayOutput ToVirtualHubIpArrayOutputWithContext(context.Context) VirtualHubIpArrayOutput } type VirtualHubIpArray []VirtualHubIpInput func (VirtualHubIpArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualHubIp)(nil)).Elem() } func (i VirtualHubIpArray) ToVirtualHubIpArrayOutput() VirtualHubIpArrayOutput { return i.ToVirtualHubIpArrayOutputWithContext(context.Background()) } func (i VirtualHubIpArray) ToVirtualHubIpArrayOutputWithContext(ctx context.Context) VirtualHubIpArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualHubIpArrayOutput) } // VirtualHubIpMapInput is an input type that accepts VirtualHubIpMap and VirtualHubIpMapOutput values. // You can construct a concrete instance of `VirtualHubIpMapInput` via: // // VirtualHubIpMap{ "key": VirtualHubIpArgs{...} } type VirtualHubIpMapInput interface { pulumi.Input ToVirtualHubIpMapOutput() VirtualHubIpMapOutput ToVirtualHubIpMapOutputWithContext(context.Context) VirtualHubIpMapOutput } type VirtualHubIpMap map[string]VirtualHubIpInput func (VirtualHubIpMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualHubIp)(nil)).Elem() } func (i VirtualHubIpMap) ToVirtualHubIpMapOutput() VirtualHubIpMapOutput { return i.ToVirtualHubIpMapOutputWithContext(context.Background()) } func (i VirtualHubIpMap) ToVirtualHubIpMapOutputWithContext(ctx context.Context) VirtualHubIpMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualHubIpMapOutput) } type VirtualHubIpOutput struct{ *pulumi.OutputState } func (VirtualHubIpOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualHubIp)(nil)).Elem() } func (o VirtualHubIpOutput) ToVirtualHubIpOutput() VirtualHubIpOutput { return o } func (o VirtualHubIpOutput) ToVirtualHubIpOutputWithContext(ctx context.Context) VirtualHubIpOutput { return o } // The name which should be used for this Virtual Hub IP. Changing this forces a new resource to be created. func (o VirtualHubIpOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHubIp) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The private IP address of the IP configuration. func (o VirtualHubIpOutput) PrivateIpAddress() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualHubIp) pulumi.StringPtrOutput { return v.PrivateIpAddress }).(pulumi.StringPtrOutput) } // The private IP address allocation method. Possible values are `Static` and `Dynamic` is allowed. Defaults to `Dynamic`. func (o VirtualHubIpOutput) PrivateIpAllocationMethod() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualHubIp) pulumi.StringPtrOutput { return v.PrivateIpAllocationMethod }).(pulumi.StringPtrOutput) } // The ID of the Public IP Address. This option is required since September 1st 2021. Changing this forces a new resource to be created. func (o VirtualHubIpOutput) PublicIpAddressId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHubIp) pulumi.StringOutput { return v.PublicIpAddressId }).(pulumi.StringOutput) } // The ID of the Subnet that the IP will reside. Changing this forces a new resource to be created. func (o VirtualHubIpOutput) SubnetId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHubIp) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput) } // The ID of the Virtual Hub within which this IP configuration should be created. Changing this forces a new resource to be created. func (o VirtualHubIpOutput) VirtualHubId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHubIp) pulumi.StringOutput { return v.VirtualHubId }).(pulumi.StringOutput) } type VirtualHubIpArrayOutput struct{ *pulumi.OutputState } func (VirtualHubIpArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualHubIp)(nil)).Elem() } func (o VirtualHubIpArrayOutput) ToVirtualHubIpArrayOutput() VirtualHubIpArrayOutput { return o } func (o VirtualHubIpArrayOutput) ToVirtualHubIpArrayOutputWithContext(ctx context.Context) VirtualHubIpArrayOutput { return o } func (o VirtualHubIpArrayOutput) Index(i pulumi.IntInput) VirtualHubIpOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualHubIp { return vs[0].([]*VirtualHubIp)[vs[1].(int)] }).(VirtualHubIpOutput) } type VirtualHubIpMapOutput struct{ *pulumi.OutputState } func (VirtualHubIpMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualHubIp)(nil)).Elem() } func (o VirtualHubIpMapOutput) ToVirtualHubIpMapOutput() VirtualHubIpMapOutput { return o } func (o VirtualHubIpMapOutput) ToVirtualHubIpMapOutputWithContext(ctx context.Context) VirtualHubIpMapOutput { return o } func (o VirtualHubIpMapOutput) MapIndex(k pulumi.StringInput) VirtualHubIpOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualHubIp { return vs[0].(map[string]*VirtualHubIp)[vs[1].(string)] }).(VirtualHubIpOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualHubIpInput)(nil)).Elem(), &VirtualHubIp{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualHubIpArrayInput)(nil)).Elem(), VirtualHubIpArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualHubIpMapInput)(nil)).Elem(), VirtualHubIpMap{}) pulumi.RegisterOutputType(VirtualHubIpOutput{}) pulumi.RegisterOutputType(VirtualHubIpArrayOutput{}) pulumi.RegisterOutputType(VirtualHubIpMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/subnetNatGatewayAssociation.go
sdk/go/azure/network/subnetNatGatewayAssociation.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Associates a NAT Gateway with a Subnet within a Virtual Network. // // ## 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/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-nat-gateway-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-network"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("example-subnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.2.0/24"), // }, // }) // if err != nil { // return err // } // exampleNatGateway, err := network.NewNatGateway(ctx, "example", &network.NatGatewayArgs{ // Name: pulumi.String("example-natgateway"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = network.NewSubnetNatGatewayAssociation(ctx, "example", &network.SubnetNatGatewayAssociationArgs{ // SubnetId: exampleSubnet.ID(), // NatGatewayId: exampleNatGateway.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 // // Subnet NAT Gateway Associations can be imported using the `resource id` of the Subnet, e.g. // // ```sh // $ pulumi import azure:network/subnetNatGatewayAssociation:SubnetNatGatewayAssociation association1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/virtualNetworks/myvnet1/subnets/mysubnet1 // ``` type SubnetNatGatewayAssociation struct { pulumi.CustomResourceState // The ID of the NAT Gateway which should be associated with the Subnet. Changing this forces a new resource to be created. NatGatewayId pulumi.StringOutput `pulumi:"natGatewayId"` // The ID of the Subnet. Changing this forces a new resource to be created. SubnetId pulumi.StringOutput `pulumi:"subnetId"` } // NewSubnetNatGatewayAssociation registers a new resource with the given unique name, arguments, and options. func NewSubnetNatGatewayAssociation(ctx *pulumi.Context, name string, args *SubnetNatGatewayAssociationArgs, opts ...pulumi.ResourceOption) (*SubnetNatGatewayAssociation, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NatGatewayId == nil { return nil, errors.New("invalid value for required argument 'NatGatewayId'") } if args.SubnetId == nil { return nil, errors.New("invalid value for required argument 'SubnetId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource SubnetNatGatewayAssociation err := ctx.RegisterResource("azure:network/subnetNatGatewayAssociation:SubnetNatGatewayAssociation", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSubnetNatGatewayAssociation gets an existing SubnetNatGatewayAssociation 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 GetSubnetNatGatewayAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SubnetNatGatewayAssociationState, opts ...pulumi.ResourceOption) (*SubnetNatGatewayAssociation, error) { var resource SubnetNatGatewayAssociation err := ctx.ReadResource("azure:network/subnetNatGatewayAssociation:SubnetNatGatewayAssociation", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SubnetNatGatewayAssociation resources. type subnetNatGatewayAssociationState struct { // The ID of the NAT Gateway which should be associated with the Subnet. Changing this forces a new resource to be created. NatGatewayId *string `pulumi:"natGatewayId"` // The ID of the Subnet. Changing this forces a new resource to be created. SubnetId *string `pulumi:"subnetId"` } type SubnetNatGatewayAssociationState struct { // The ID of the NAT Gateway which should be associated with the Subnet. Changing this forces a new resource to be created. NatGatewayId pulumi.StringPtrInput // The ID of the Subnet. Changing this forces a new resource to be created. SubnetId pulumi.StringPtrInput } func (SubnetNatGatewayAssociationState) ElementType() reflect.Type { return reflect.TypeOf((*subnetNatGatewayAssociationState)(nil)).Elem() } type subnetNatGatewayAssociationArgs struct { // The ID of the NAT Gateway which should be associated with the Subnet. Changing this forces a new resource to be created. NatGatewayId string `pulumi:"natGatewayId"` // The ID of the Subnet. Changing this forces a new resource to be created. SubnetId string `pulumi:"subnetId"` } // The set of arguments for constructing a SubnetNatGatewayAssociation resource. type SubnetNatGatewayAssociationArgs struct { // The ID of the NAT Gateway which should be associated with the Subnet. Changing this forces a new resource to be created. NatGatewayId pulumi.StringInput // The ID of the Subnet. Changing this forces a new resource to be created. SubnetId pulumi.StringInput } func (SubnetNatGatewayAssociationArgs) ElementType() reflect.Type { return reflect.TypeOf((*subnetNatGatewayAssociationArgs)(nil)).Elem() } type SubnetNatGatewayAssociationInput interface { pulumi.Input ToSubnetNatGatewayAssociationOutput() SubnetNatGatewayAssociationOutput ToSubnetNatGatewayAssociationOutputWithContext(ctx context.Context) SubnetNatGatewayAssociationOutput } func (*SubnetNatGatewayAssociation) ElementType() reflect.Type { return reflect.TypeOf((**SubnetNatGatewayAssociation)(nil)).Elem() } func (i *SubnetNatGatewayAssociation) ToSubnetNatGatewayAssociationOutput() SubnetNatGatewayAssociationOutput { return i.ToSubnetNatGatewayAssociationOutputWithContext(context.Background()) } func (i *SubnetNatGatewayAssociation) ToSubnetNatGatewayAssociationOutputWithContext(ctx context.Context) SubnetNatGatewayAssociationOutput { return pulumi.ToOutputWithContext(ctx, i).(SubnetNatGatewayAssociationOutput) } // SubnetNatGatewayAssociationArrayInput is an input type that accepts SubnetNatGatewayAssociationArray and SubnetNatGatewayAssociationArrayOutput values. // You can construct a concrete instance of `SubnetNatGatewayAssociationArrayInput` via: // // SubnetNatGatewayAssociationArray{ SubnetNatGatewayAssociationArgs{...} } type SubnetNatGatewayAssociationArrayInput interface { pulumi.Input ToSubnetNatGatewayAssociationArrayOutput() SubnetNatGatewayAssociationArrayOutput ToSubnetNatGatewayAssociationArrayOutputWithContext(context.Context) SubnetNatGatewayAssociationArrayOutput } type SubnetNatGatewayAssociationArray []SubnetNatGatewayAssociationInput func (SubnetNatGatewayAssociationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubnetNatGatewayAssociation)(nil)).Elem() } func (i SubnetNatGatewayAssociationArray) ToSubnetNatGatewayAssociationArrayOutput() SubnetNatGatewayAssociationArrayOutput { return i.ToSubnetNatGatewayAssociationArrayOutputWithContext(context.Background()) } func (i SubnetNatGatewayAssociationArray) ToSubnetNatGatewayAssociationArrayOutputWithContext(ctx context.Context) SubnetNatGatewayAssociationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SubnetNatGatewayAssociationArrayOutput) } // SubnetNatGatewayAssociationMapInput is an input type that accepts SubnetNatGatewayAssociationMap and SubnetNatGatewayAssociationMapOutput values. // You can construct a concrete instance of `SubnetNatGatewayAssociationMapInput` via: // // SubnetNatGatewayAssociationMap{ "key": SubnetNatGatewayAssociationArgs{...} } type SubnetNatGatewayAssociationMapInput interface { pulumi.Input ToSubnetNatGatewayAssociationMapOutput() SubnetNatGatewayAssociationMapOutput ToSubnetNatGatewayAssociationMapOutputWithContext(context.Context) SubnetNatGatewayAssociationMapOutput } type SubnetNatGatewayAssociationMap map[string]SubnetNatGatewayAssociationInput func (SubnetNatGatewayAssociationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubnetNatGatewayAssociation)(nil)).Elem() } func (i SubnetNatGatewayAssociationMap) ToSubnetNatGatewayAssociationMapOutput() SubnetNatGatewayAssociationMapOutput { return i.ToSubnetNatGatewayAssociationMapOutputWithContext(context.Background()) } func (i SubnetNatGatewayAssociationMap) ToSubnetNatGatewayAssociationMapOutputWithContext(ctx context.Context) SubnetNatGatewayAssociationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SubnetNatGatewayAssociationMapOutput) } type SubnetNatGatewayAssociationOutput struct{ *pulumi.OutputState } func (SubnetNatGatewayAssociationOutput) ElementType() reflect.Type { return reflect.TypeOf((**SubnetNatGatewayAssociation)(nil)).Elem() } func (o SubnetNatGatewayAssociationOutput) ToSubnetNatGatewayAssociationOutput() SubnetNatGatewayAssociationOutput { return o } func (o SubnetNatGatewayAssociationOutput) ToSubnetNatGatewayAssociationOutputWithContext(ctx context.Context) SubnetNatGatewayAssociationOutput { return o } // The ID of the NAT Gateway which should be associated with the Subnet. Changing this forces a new resource to be created. func (o SubnetNatGatewayAssociationOutput) NatGatewayId() pulumi.StringOutput { return o.ApplyT(func(v *SubnetNatGatewayAssociation) pulumi.StringOutput { return v.NatGatewayId }).(pulumi.StringOutput) } // The ID of the Subnet. Changing this forces a new resource to be created. func (o SubnetNatGatewayAssociationOutput) SubnetId() pulumi.StringOutput { return o.ApplyT(func(v *SubnetNatGatewayAssociation) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput) } type SubnetNatGatewayAssociationArrayOutput struct{ *pulumi.OutputState } func (SubnetNatGatewayAssociationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubnetNatGatewayAssociation)(nil)).Elem() } func (o SubnetNatGatewayAssociationArrayOutput) ToSubnetNatGatewayAssociationArrayOutput() SubnetNatGatewayAssociationArrayOutput { return o } func (o SubnetNatGatewayAssociationArrayOutput) ToSubnetNatGatewayAssociationArrayOutputWithContext(ctx context.Context) SubnetNatGatewayAssociationArrayOutput { return o } func (o SubnetNatGatewayAssociationArrayOutput) Index(i pulumi.IntInput) SubnetNatGatewayAssociationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SubnetNatGatewayAssociation { return vs[0].([]*SubnetNatGatewayAssociation)[vs[1].(int)] }).(SubnetNatGatewayAssociationOutput) } type SubnetNatGatewayAssociationMapOutput struct{ *pulumi.OutputState } func (SubnetNatGatewayAssociationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubnetNatGatewayAssociation)(nil)).Elem() } func (o SubnetNatGatewayAssociationMapOutput) ToSubnetNatGatewayAssociationMapOutput() SubnetNatGatewayAssociationMapOutput { return o } func (o SubnetNatGatewayAssociationMapOutput) ToSubnetNatGatewayAssociationMapOutputWithContext(ctx context.Context) SubnetNatGatewayAssociationMapOutput { return o } func (o SubnetNatGatewayAssociationMapOutput) MapIndex(k pulumi.StringInput) SubnetNatGatewayAssociationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SubnetNatGatewayAssociation { return vs[0].(map[string]*SubnetNatGatewayAssociation)[vs[1].(string)] }).(SubnetNatGatewayAssociationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SubnetNatGatewayAssociationInput)(nil)).Elem(), &SubnetNatGatewayAssociation{}) pulumi.RegisterInputType(reflect.TypeOf((*SubnetNatGatewayAssociationArrayInput)(nil)).Elem(), SubnetNatGatewayAssociationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SubnetNatGatewayAssociationMapInput)(nil)).Elem(), SubnetNatGatewayAssociationMap{}) pulumi.RegisterOutputType(SubnetNatGatewayAssociationOutput{}) pulumi.RegisterOutputType(SubnetNatGatewayAssociationArrayOutput{}) pulumi.RegisterOutputType(SubnetNatGatewayAssociationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerSubscriptionConnection.go
sdk/go/azure/network/networkManagerSubscriptionConnection.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network 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 Manager Subscription Connection which may cross tenants. // // ## 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/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 // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-networkmanager"), // Location: example.Location, // ResourceGroupName: example.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("SecurityAdmin"), // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerSubscriptionConnection(ctx, "example", &network.NetworkManagerSubscriptionConnectionArgs{ // Name: pulumi.String("example-nsnmc"), // SubscriptionId: pulumi.String(current.Id), // NetworkManagerId: exampleNetworkManager.ID(), // Description: pulumi.String("example"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Subscription Network Manager Connection can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerSubscriptionConnection:NetworkManagerSubscriptionConnection example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/networkManagerConnections/networkManagerConnection1 // ``` type NetworkManagerSubscriptionConnection struct { pulumi.CustomResourceState // The Connection state of the Network Manager Subscription Connection. ConnectionState pulumi.StringOutput `pulumi:"connectionState"` // A description of the Network Manager Subscription Connection. Description pulumi.StringPtrOutput `pulumi:"description"` // Specifies the name which should be used for this Network Subscription Network Manager Connection. Changing this forces a new Network Subscription Network Manager Connection to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the ID of the Network Manager which the Subscription is connected to. NetworkManagerId pulumi.StringOutput `pulumi:"networkManagerId"` // Specifies the ID of the target Subscription. Changing this forces a new resource to be created. SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"` } // NewNetworkManagerSubscriptionConnection registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerSubscriptionConnection(ctx *pulumi.Context, name string, args *NetworkManagerSubscriptionConnectionArgs, opts ...pulumi.ResourceOption) (*NetworkManagerSubscriptionConnection, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.NetworkManagerId == nil { return nil, errors.New("invalid value for required argument 'NetworkManagerId'") } if args.SubscriptionId == nil { return nil, errors.New("invalid value for required argument 'SubscriptionId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerSubscriptionConnection err := ctx.RegisterResource("azure:network/networkManagerSubscriptionConnection:NetworkManagerSubscriptionConnection", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerSubscriptionConnection gets an existing NetworkManagerSubscriptionConnection 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 GetNetworkManagerSubscriptionConnection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerSubscriptionConnectionState, opts ...pulumi.ResourceOption) (*NetworkManagerSubscriptionConnection, error) { var resource NetworkManagerSubscriptionConnection err := ctx.ReadResource("azure:network/networkManagerSubscriptionConnection:NetworkManagerSubscriptionConnection", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerSubscriptionConnection resources. type networkManagerSubscriptionConnectionState struct { // The Connection state of the Network Manager Subscription Connection. ConnectionState *string `pulumi:"connectionState"` // A description of the Network Manager Subscription Connection. Description *string `pulumi:"description"` // Specifies the name which should be used for this Network Subscription Network Manager Connection. Changing this forces a new Network Subscription Network Manager Connection to be created. Name *string `pulumi:"name"` // Specifies the ID of the Network Manager which the Subscription is connected to. NetworkManagerId *string `pulumi:"networkManagerId"` // Specifies the ID of the target Subscription. Changing this forces a new resource to be created. SubscriptionId *string `pulumi:"subscriptionId"` } type NetworkManagerSubscriptionConnectionState struct { // The Connection state of the Network Manager Subscription Connection. ConnectionState pulumi.StringPtrInput // A description of the Network Manager Subscription Connection. Description pulumi.StringPtrInput // Specifies the name which should be used for this Network Subscription Network Manager Connection. Changing this forces a new Network Subscription Network Manager Connection to be created. Name pulumi.StringPtrInput // Specifies the ID of the Network Manager which the Subscription is connected to. NetworkManagerId pulumi.StringPtrInput // Specifies the ID of the target Subscription. Changing this forces a new resource to be created. SubscriptionId pulumi.StringPtrInput } func (NetworkManagerSubscriptionConnectionState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerSubscriptionConnectionState)(nil)).Elem() } type networkManagerSubscriptionConnectionArgs struct { // A description of the Network Manager Subscription Connection. Description *string `pulumi:"description"` // Specifies the name which should be used for this Network Subscription Network Manager Connection. Changing this forces a new Network Subscription Network Manager Connection to be created. Name *string `pulumi:"name"` // Specifies the ID of the Network Manager which the Subscription is connected to. NetworkManagerId string `pulumi:"networkManagerId"` // Specifies the ID of the target Subscription. Changing this forces a new resource to be created. SubscriptionId string `pulumi:"subscriptionId"` } // The set of arguments for constructing a NetworkManagerSubscriptionConnection resource. type NetworkManagerSubscriptionConnectionArgs struct { // A description of the Network Manager Subscription Connection. Description pulumi.StringPtrInput // Specifies the name which should be used for this Network Subscription Network Manager Connection. Changing this forces a new Network Subscription Network Manager Connection to be created. Name pulumi.StringPtrInput // Specifies the ID of the Network Manager which the Subscription is connected to. NetworkManagerId pulumi.StringInput // Specifies the ID of the target Subscription. Changing this forces a new resource to be created. SubscriptionId pulumi.StringInput } func (NetworkManagerSubscriptionConnectionArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerSubscriptionConnectionArgs)(nil)).Elem() } type NetworkManagerSubscriptionConnectionInput interface { pulumi.Input ToNetworkManagerSubscriptionConnectionOutput() NetworkManagerSubscriptionConnectionOutput ToNetworkManagerSubscriptionConnectionOutputWithContext(ctx context.Context) NetworkManagerSubscriptionConnectionOutput } func (*NetworkManagerSubscriptionConnection) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerSubscriptionConnection)(nil)).Elem() } func (i *NetworkManagerSubscriptionConnection) ToNetworkManagerSubscriptionConnectionOutput() NetworkManagerSubscriptionConnectionOutput { return i.ToNetworkManagerSubscriptionConnectionOutputWithContext(context.Background()) } func (i *NetworkManagerSubscriptionConnection) ToNetworkManagerSubscriptionConnectionOutputWithContext(ctx context.Context) NetworkManagerSubscriptionConnectionOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerSubscriptionConnectionOutput) } // NetworkManagerSubscriptionConnectionArrayInput is an input type that accepts NetworkManagerSubscriptionConnectionArray and NetworkManagerSubscriptionConnectionArrayOutput values. // You can construct a concrete instance of `NetworkManagerSubscriptionConnectionArrayInput` via: // // NetworkManagerSubscriptionConnectionArray{ NetworkManagerSubscriptionConnectionArgs{...} } type NetworkManagerSubscriptionConnectionArrayInput interface { pulumi.Input ToNetworkManagerSubscriptionConnectionArrayOutput() NetworkManagerSubscriptionConnectionArrayOutput ToNetworkManagerSubscriptionConnectionArrayOutputWithContext(context.Context) NetworkManagerSubscriptionConnectionArrayOutput } type NetworkManagerSubscriptionConnectionArray []NetworkManagerSubscriptionConnectionInput func (NetworkManagerSubscriptionConnectionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerSubscriptionConnection)(nil)).Elem() } func (i NetworkManagerSubscriptionConnectionArray) ToNetworkManagerSubscriptionConnectionArrayOutput() NetworkManagerSubscriptionConnectionArrayOutput { return i.ToNetworkManagerSubscriptionConnectionArrayOutputWithContext(context.Background()) } func (i NetworkManagerSubscriptionConnectionArray) ToNetworkManagerSubscriptionConnectionArrayOutputWithContext(ctx context.Context) NetworkManagerSubscriptionConnectionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerSubscriptionConnectionArrayOutput) } // NetworkManagerSubscriptionConnectionMapInput is an input type that accepts NetworkManagerSubscriptionConnectionMap and NetworkManagerSubscriptionConnectionMapOutput values. // You can construct a concrete instance of `NetworkManagerSubscriptionConnectionMapInput` via: // // NetworkManagerSubscriptionConnectionMap{ "key": NetworkManagerSubscriptionConnectionArgs{...} } type NetworkManagerSubscriptionConnectionMapInput interface { pulumi.Input ToNetworkManagerSubscriptionConnectionMapOutput() NetworkManagerSubscriptionConnectionMapOutput ToNetworkManagerSubscriptionConnectionMapOutputWithContext(context.Context) NetworkManagerSubscriptionConnectionMapOutput } type NetworkManagerSubscriptionConnectionMap map[string]NetworkManagerSubscriptionConnectionInput func (NetworkManagerSubscriptionConnectionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerSubscriptionConnection)(nil)).Elem() } func (i NetworkManagerSubscriptionConnectionMap) ToNetworkManagerSubscriptionConnectionMapOutput() NetworkManagerSubscriptionConnectionMapOutput { return i.ToNetworkManagerSubscriptionConnectionMapOutputWithContext(context.Background()) } func (i NetworkManagerSubscriptionConnectionMap) ToNetworkManagerSubscriptionConnectionMapOutputWithContext(ctx context.Context) NetworkManagerSubscriptionConnectionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerSubscriptionConnectionMapOutput) } type NetworkManagerSubscriptionConnectionOutput struct{ *pulumi.OutputState } func (NetworkManagerSubscriptionConnectionOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerSubscriptionConnection)(nil)).Elem() } func (o NetworkManagerSubscriptionConnectionOutput) ToNetworkManagerSubscriptionConnectionOutput() NetworkManagerSubscriptionConnectionOutput { return o } func (o NetworkManagerSubscriptionConnectionOutput) ToNetworkManagerSubscriptionConnectionOutputWithContext(ctx context.Context) NetworkManagerSubscriptionConnectionOutput { return o } // The Connection state of the Network Manager Subscription Connection. func (o NetworkManagerSubscriptionConnectionOutput) ConnectionState() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerSubscriptionConnection) pulumi.StringOutput { return v.ConnectionState }).(pulumi.StringOutput) } // A description of the Network Manager Subscription Connection. func (o NetworkManagerSubscriptionConnectionOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerSubscriptionConnection) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Specifies the name which should be used for this Network Subscription Network Manager Connection. Changing this forces a new Network Subscription Network Manager Connection to be created. func (o NetworkManagerSubscriptionConnectionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerSubscriptionConnection) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the ID of the Network Manager which the Subscription is connected to. func (o NetworkManagerSubscriptionConnectionOutput) NetworkManagerId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerSubscriptionConnection) pulumi.StringOutput { return v.NetworkManagerId }).(pulumi.StringOutput) } // Specifies the ID of the target Subscription. Changing this forces a new resource to be created. func (o NetworkManagerSubscriptionConnectionOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerSubscriptionConnection) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput) } type NetworkManagerSubscriptionConnectionArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerSubscriptionConnectionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerSubscriptionConnection)(nil)).Elem() } func (o NetworkManagerSubscriptionConnectionArrayOutput) ToNetworkManagerSubscriptionConnectionArrayOutput() NetworkManagerSubscriptionConnectionArrayOutput { return o } func (o NetworkManagerSubscriptionConnectionArrayOutput) ToNetworkManagerSubscriptionConnectionArrayOutputWithContext(ctx context.Context) NetworkManagerSubscriptionConnectionArrayOutput { return o } func (o NetworkManagerSubscriptionConnectionArrayOutput) Index(i pulumi.IntInput) NetworkManagerSubscriptionConnectionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerSubscriptionConnection { return vs[0].([]*NetworkManagerSubscriptionConnection)[vs[1].(int)] }).(NetworkManagerSubscriptionConnectionOutput) } type NetworkManagerSubscriptionConnectionMapOutput struct{ *pulumi.OutputState } func (NetworkManagerSubscriptionConnectionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerSubscriptionConnection)(nil)).Elem() } func (o NetworkManagerSubscriptionConnectionMapOutput) ToNetworkManagerSubscriptionConnectionMapOutput() NetworkManagerSubscriptionConnectionMapOutput { return o } func (o NetworkManagerSubscriptionConnectionMapOutput) ToNetworkManagerSubscriptionConnectionMapOutputWithContext(ctx context.Context) NetworkManagerSubscriptionConnectionMapOutput { return o } func (o NetworkManagerSubscriptionConnectionMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerSubscriptionConnectionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerSubscriptionConnection { return vs[0].(map[string]*NetworkManagerSubscriptionConnection)[vs[1].(string)] }).(NetworkManagerSubscriptionConnectionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerSubscriptionConnectionInput)(nil)).Elem(), &NetworkManagerSubscriptionConnection{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerSubscriptionConnectionArrayInput)(nil)).Elem(), NetworkManagerSubscriptionConnectionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerSubscriptionConnectionMapInput)(nil)).Elem(), NetworkManagerSubscriptionConnectionMap{}) pulumi.RegisterOutputType(NetworkManagerSubscriptionConnectionOutput{}) pulumi.RegisterOutputType(NetworkManagerSubscriptionConnectionArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerSubscriptionConnectionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/localNetworkGateway.go
sdk/go/azure/network/localNetworkGateway.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a local network gateway connection over which specific connections can be configured. // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("localNetworkGWTest"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = network.NewLocalNetworkGateway(ctx, "home", &network.LocalNetworkGatewayArgs{ // Name: pulumi.String("backHome"), // ResourceGroupName: example.Name, // Location: example.Location, // GatewayAddress: pulumi.String("12.13.14.15"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // }) // 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 // // Local Network Gateways can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/localNetworkGateway:LocalNetworkGateway lng1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/localNetworkGateways/lng1 // ``` type LocalNetworkGateway struct { pulumi.CustomResourceState // The list of string CIDRs representing the address spaces the gateway exposes. AddressSpaces pulumi.StringArrayOutput `pulumi:"addressSpaces"` // A `bgpSettings` block as defined below containing the Local Network Gateway's BGP speaker settings. BgpSettings LocalNetworkGatewayBgpSettingsPtrOutput `pulumi:"bgpSettings"` // The gateway IP address to connect with. GatewayAddress pulumi.StringPtrOutput `pulumi:"gatewayAddress"` // The gateway FQDN to connect with. // // > **Note:** Either `gatewayAddress` or `gatewayFqdn` should be specified. GatewayFqdn pulumi.StringPtrOutput `pulumi:"gatewayFqdn"` // The location/region where the local network gateway is created. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the local network gateway. 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 local network gateway. 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"` } // NewLocalNetworkGateway registers a new resource with the given unique name, arguments, and options. func NewLocalNetworkGateway(ctx *pulumi.Context, name string, args *LocalNetworkGatewayArgs, opts ...pulumi.ResourceOption) (*LocalNetworkGateway, 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 LocalNetworkGateway err := ctx.RegisterResource("azure:network/localNetworkGateway:LocalNetworkGateway", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetLocalNetworkGateway gets an existing LocalNetworkGateway 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 GetLocalNetworkGateway(ctx *pulumi.Context, name string, id pulumi.IDInput, state *LocalNetworkGatewayState, opts ...pulumi.ResourceOption) (*LocalNetworkGateway, error) { var resource LocalNetworkGateway err := ctx.ReadResource("azure:network/localNetworkGateway:LocalNetworkGateway", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering LocalNetworkGateway resources. type localNetworkGatewayState struct { // The list of string CIDRs representing the address spaces the gateway exposes. AddressSpaces []string `pulumi:"addressSpaces"` // A `bgpSettings` block as defined below containing the Local Network Gateway's BGP speaker settings. BgpSettings *LocalNetworkGatewayBgpSettings `pulumi:"bgpSettings"` // The gateway IP address to connect with. GatewayAddress *string `pulumi:"gatewayAddress"` // The gateway FQDN to connect with. // // > **Note:** Either `gatewayAddress` or `gatewayFqdn` should be specified. GatewayFqdn *string `pulumi:"gatewayFqdn"` // The location/region where the local network gateway is created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the local network gateway. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the local network gateway. 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 LocalNetworkGatewayState struct { // The list of string CIDRs representing the address spaces the gateway exposes. AddressSpaces pulumi.StringArrayInput // A `bgpSettings` block as defined below containing the Local Network Gateway's BGP speaker settings. BgpSettings LocalNetworkGatewayBgpSettingsPtrInput // The gateway IP address to connect with. GatewayAddress pulumi.StringPtrInput // The gateway FQDN to connect with. // // > **Note:** Either `gatewayAddress` or `gatewayFqdn` should be specified. GatewayFqdn pulumi.StringPtrInput // The location/region where the local network gateway is created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the local network gateway. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the local network gateway. 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 (LocalNetworkGatewayState) ElementType() reflect.Type { return reflect.TypeOf((*localNetworkGatewayState)(nil)).Elem() } type localNetworkGatewayArgs struct { // The list of string CIDRs representing the address spaces the gateway exposes. AddressSpaces []string `pulumi:"addressSpaces"` // A `bgpSettings` block as defined below containing the Local Network Gateway's BGP speaker settings. BgpSettings *LocalNetworkGatewayBgpSettings `pulumi:"bgpSettings"` // The gateway IP address to connect with. GatewayAddress *string `pulumi:"gatewayAddress"` // The gateway FQDN to connect with. // // > **Note:** Either `gatewayAddress` or `gatewayFqdn` should be specified. GatewayFqdn *string `pulumi:"gatewayFqdn"` // The location/region where the local network gateway is created. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the local network gateway. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the local network gateway. 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 LocalNetworkGateway resource. type LocalNetworkGatewayArgs struct { // The list of string CIDRs representing the address spaces the gateway exposes. AddressSpaces pulumi.StringArrayInput // A `bgpSettings` block as defined below containing the Local Network Gateway's BGP speaker settings. BgpSettings LocalNetworkGatewayBgpSettingsPtrInput // The gateway IP address to connect with. GatewayAddress pulumi.StringPtrInput // The gateway FQDN to connect with. // // > **Note:** Either `gatewayAddress` or `gatewayFqdn` should be specified. GatewayFqdn pulumi.StringPtrInput // The location/region where the local network gateway is created. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the local network gateway. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the local network gateway. 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 (LocalNetworkGatewayArgs) ElementType() reflect.Type { return reflect.TypeOf((*localNetworkGatewayArgs)(nil)).Elem() } type LocalNetworkGatewayInput interface { pulumi.Input ToLocalNetworkGatewayOutput() LocalNetworkGatewayOutput ToLocalNetworkGatewayOutputWithContext(ctx context.Context) LocalNetworkGatewayOutput } func (*LocalNetworkGateway) ElementType() reflect.Type { return reflect.TypeOf((**LocalNetworkGateway)(nil)).Elem() } func (i *LocalNetworkGateway) ToLocalNetworkGatewayOutput() LocalNetworkGatewayOutput { return i.ToLocalNetworkGatewayOutputWithContext(context.Background()) } func (i *LocalNetworkGateway) ToLocalNetworkGatewayOutputWithContext(ctx context.Context) LocalNetworkGatewayOutput { return pulumi.ToOutputWithContext(ctx, i).(LocalNetworkGatewayOutput) } // LocalNetworkGatewayArrayInput is an input type that accepts LocalNetworkGatewayArray and LocalNetworkGatewayArrayOutput values. // You can construct a concrete instance of `LocalNetworkGatewayArrayInput` via: // // LocalNetworkGatewayArray{ LocalNetworkGatewayArgs{...} } type LocalNetworkGatewayArrayInput interface { pulumi.Input ToLocalNetworkGatewayArrayOutput() LocalNetworkGatewayArrayOutput ToLocalNetworkGatewayArrayOutputWithContext(context.Context) LocalNetworkGatewayArrayOutput } type LocalNetworkGatewayArray []LocalNetworkGatewayInput func (LocalNetworkGatewayArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*LocalNetworkGateway)(nil)).Elem() } func (i LocalNetworkGatewayArray) ToLocalNetworkGatewayArrayOutput() LocalNetworkGatewayArrayOutput { return i.ToLocalNetworkGatewayArrayOutputWithContext(context.Background()) } func (i LocalNetworkGatewayArray) ToLocalNetworkGatewayArrayOutputWithContext(ctx context.Context) LocalNetworkGatewayArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(LocalNetworkGatewayArrayOutput) } // LocalNetworkGatewayMapInput is an input type that accepts LocalNetworkGatewayMap and LocalNetworkGatewayMapOutput values. // You can construct a concrete instance of `LocalNetworkGatewayMapInput` via: // // LocalNetworkGatewayMap{ "key": LocalNetworkGatewayArgs{...} } type LocalNetworkGatewayMapInput interface { pulumi.Input ToLocalNetworkGatewayMapOutput() LocalNetworkGatewayMapOutput ToLocalNetworkGatewayMapOutputWithContext(context.Context) LocalNetworkGatewayMapOutput } type LocalNetworkGatewayMap map[string]LocalNetworkGatewayInput func (LocalNetworkGatewayMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LocalNetworkGateway)(nil)).Elem() } func (i LocalNetworkGatewayMap) ToLocalNetworkGatewayMapOutput() LocalNetworkGatewayMapOutput { return i.ToLocalNetworkGatewayMapOutputWithContext(context.Background()) } func (i LocalNetworkGatewayMap) ToLocalNetworkGatewayMapOutputWithContext(ctx context.Context) LocalNetworkGatewayMapOutput { return pulumi.ToOutputWithContext(ctx, i).(LocalNetworkGatewayMapOutput) } type LocalNetworkGatewayOutput struct{ *pulumi.OutputState } func (LocalNetworkGatewayOutput) ElementType() reflect.Type { return reflect.TypeOf((**LocalNetworkGateway)(nil)).Elem() } func (o LocalNetworkGatewayOutput) ToLocalNetworkGatewayOutput() LocalNetworkGatewayOutput { return o } func (o LocalNetworkGatewayOutput) ToLocalNetworkGatewayOutputWithContext(ctx context.Context) LocalNetworkGatewayOutput { return o } // The list of string CIDRs representing the address spaces the gateway exposes. func (o LocalNetworkGatewayOutput) AddressSpaces() pulumi.StringArrayOutput { return o.ApplyT(func(v *LocalNetworkGateway) pulumi.StringArrayOutput { return v.AddressSpaces }).(pulumi.StringArrayOutput) } // A `bgpSettings` block as defined below containing the Local Network Gateway's BGP speaker settings. func (o LocalNetworkGatewayOutput) BgpSettings() LocalNetworkGatewayBgpSettingsPtrOutput { return o.ApplyT(func(v *LocalNetworkGateway) LocalNetworkGatewayBgpSettingsPtrOutput { return v.BgpSettings }).(LocalNetworkGatewayBgpSettingsPtrOutput) } // The gateway IP address to connect with. func (o LocalNetworkGatewayOutput) GatewayAddress() pulumi.StringPtrOutput { return o.ApplyT(func(v *LocalNetworkGateway) pulumi.StringPtrOutput { return v.GatewayAddress }).(pulumi.StringPtrOutput) } // The gateway FQDN to connect with. // // > **Note:** Either `gatewayAddress` or `gatewayFqdn` should be specified. func (o LocalNetworkGatewayOutput) GatewayFqdn() pulumi.StringPtrOutput { return o.ApplyT(func(v *LocalNetworkGateway) pulumi.StringPtrOutput { return v.GatewayFqdn }).(pulumi.StringPtrOutput) } // The location/region where the local network gateway is created. Changing this forces a new resource to be created. func (o LocalNetworkGatewayOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *LocalNetworkGateway) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the local network gateway. Changing this forces a new resource to be created. func (o LocalNetworkGatewayOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *LocalNetworkGateway) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the local network gateway. Changing this forces a new resource to be created. func (o LocalNetworkGatewayOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *LocalNetworkGateway) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o LocalNetworkGatewayOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *LocalNetworkGateway) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type LocalNetworkGatewayArrayOutput struct{ *pulumi.OutputState } func (LocalNetworkGatewayArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*LocalNetworkGateway)(nil)).Elem() } func (o LocalNetworkGatewayArrayOutput) ToLocalNetworkGatewayArrayOutput() LocalNetworkGatewayArrayOutput { return o } func (o LocalNetworkGatewayArrayOutput) ToLocalNetworkGatewayArrayOutputWithContext(ctx context.Context) LocalNetworkGatewayArrayOutput { return o } func (o LocalNetworkGatewayArrayOutput) Index(i pulumi.IntInput) LocalNetworkGatewayOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LocalNetworkGateway { return vs[0].([]*LocalNetworkGateway)[vs[1].(int)] }).(LocalNetworkGatewayOutput) } type LocalNetworkGatewayMapOutput struct{ *pulumi.OutputState } func (LocalNetworkGatewayMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*LocalNetworkGateway)(nil)).Elem() } func (o LocalNetworkGatewayMapOutput) ToLocalNetworkGatewayMapOutput() LocalNetworkGatewayMapOutput { return o } func (o LocalNetworkGatewayMapOutput) ToLocalNetworkGatewayMapOutputWithContext(ctx context.Context) LocalNetworkGatewayMapOutput { return o } func (o LocalNetworkGatewayMapOutput) MapIndex(k pulumi.StringInput) LocalNetworkGatewayOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LocalNetworkGateway { return vs[0].(map[string]*LocalNetworkGateway)[vs[1].(string)] }).(LocalNetworkGatewayOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*LocalNetworkGatewayInput)(nil)).Elem(), &LocalNetworkGateway{}) pulumi.RegisterInputType(reflect.TypeOf((*LocalNetworkGatewayArrayInput)(nil)).Elem(), LocalNetworkGatewayArray{}) pulumi.RegisterInputType(reflect.TypeOf((*LocalNetworkGatewayMapInput)(nil)).Elem(), LocalNetworkGatewayMap{}) pulumi.RegisterOutputType(LocalNetworkGatewayOutput{}) pulumi.RegisterOutputType(LocalNetworkGatewayArrayOutput{}) pulumi.RegisterOutputType(LocalNetworkGatewayMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerAdminRule.go
sdk/go/azure/network/networkManagerAdminRule.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network 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 Manager Admin 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/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 // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // Location: example.Location, // ResourceGroupName: example.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Connectivity"), // pulumi.String("SecurityAdmin"), // }, // Description: pulumi.String("example network manager"), // }) // if err != nil { // return err // } // exampleNetworkManagerNetworkGroup, err := network.NewNetworkManagerNetworkGroup(ctx, "example", &network.NetworkManagerNetworkGroupArgs{ // Name: pulumi.String("example-network-group"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // exampleNetworkManagerSecurityAdminConfiguration, err := network.NewNetworkManagerSecurityAdminConfiguration(ctx, "example", &network.NetworkManagerSecurityAdminConfigurationArgs{ // Name: pulumi.String("example-admin-conf"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // exampleNetworkManagerAdminRuleCollection, err := network.NewNetworkManagerAdminRuleCollection(ctx, "example", &network.NetworkManagerAdminRuleCollectionArgs{ // Name: pulumi.String("example-admin-rule-collection"), // SecurityAdminConfigurationId: exampleNetworkManagerSecurityAdminConfiguration.ID(), // NetworkGroupIds: pulumi.StringArray{ // exampleNetworkManagerNetworkGroup.ID(), // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerAdminRule(ctx, "example", &network.NetworkManagerAdminRuleArgs{ // Name: pulumi.String("example-admin-rule"), // AdminRuleCollectionId: exampleNetworkManagerAdminRuleCollection.ID(), // Action: pulumi.String("Deny"), // Direction: pulumi.String("Outbound"), // Priority: pulumi.Int(1), // Protocol: pulumi.String("Tcp"), // SourcePortRanges: pulumi.StringArray{ // pulumi.String("80"), // pulumi.String("1024-65535"), // }, // DestinationPortRanges: pulumi.StringArray{ // pulumi.String("80"), // }, // Sources: network.NetworkManagerAdminRuleSourceArray{ // &network.NetworkManagerAdminRuleSourceArgs{ // AddressPrefixType: pulumi.String("ServiceTag"), // AddressPrefix: pulumi.String("Internet"), // }, // }, // Destinations: network.NetworkManagerAdminRuleDestinationArray{ // &network.NetworkManagerAdminRuleDestinationArgs{ // AddressPrefixType: pulumi.String("IPPrefix"), // AddressPrefix: pulumi.String("10.1.0.1"), // }, // &network.NetworkManagerAdminRuleDestinationArgs{ // AddressPrefixType: pulumi.String("IPPrefix"), // AddressPrefix: pulumi.String("10.0.0.0/24"), // }, // }, // Description: pulumi.String("example admin rule"), // }) // 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 // // Network Manager Admin Rule can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerAdminRule:NetworkManagerAdminRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1/securityAdminConfigurations/configuration1/ruleCollections/ruleCollection1/rules/rule1 // ``` type NetworkManagerAdminRule struct { pulumi.CustomResourceState // Specifies the action allowed for this Network Manager Admin Rule. Possible values are `Allow`, `AlwaysAllow`, and `Deny`. Action pulumi.StringOutput `pulumi:"action"` // Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created. AdminRuleCollectionId pulumi.StringOutput `pulumi:"adminRuleCollectionId"` // A description of the Network Manager Admin Rule. Description pulumi.StringPtrOutput `pulumi:"description"` // A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. DestinationPortRanges pulumi.StringArrayOutput `pulumi:"destinationPortRanges"` // One or more `destination` blocks as defined below. Destinations NetworkManagerAdminRuleDestinationArrayOutput `pulumi:"destinations"` // Indicates if the traffic matched against the rule in inbound or outbound. Possible values are `Inbound` and `Outbound`. Direction pulumi.StringOutput `pulumi:"direction"` // Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created. Name pulumi.StringOutput `pulumi:"name"` // The priority of the rule. Possible values are integers between `1` and `4096`. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. Priority pulumi.IntOutput `pulumi:"priority"` // Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are `Ah`, `Any`, `Esp`, `Icmp`, `Tcp`, and `Udp`. Protocol pulumi.StringOutput `pulumi:"protocol"` // A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. SourcePortRanges pulumi.StringArrayOutput `pulumi:"sourcePortRanges"` // One or more `source` blocks as defined below. Sources NetworkManagerAdminRuleSourceArrayOutput `pulumi:"sources"` } // NewNetworkManagerAdminRule registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerAdminRule(ctx *pulumi.Context, name string, args *NetworkManagerAdminRuleArgs, opts ...pulumi.ResourceOption) (*NetworkManagerAdminRule, 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.AdminRuleCollectionId == nil { return nil, errors.New("invalid value for required argument 'AdminRuleCollectionId'") } if args.Direction == nil { return nil, errors.New("invalid value for required argument 'Direction'") } if args.Priority == nil { return nil, errors.New("invalid value for required argument 'Priority'") } if args.Protocol == nil { return nil, errors.New("invalid value for required argument 'Protocol'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerAdminRule err := ctx.RegisterResource("azure:network/networkManagerAdminRule:NetworkManagerAdminRule", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerAdminRule gets an existing NetworkManagerAdminRule 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 GetNetworkManagerAdminRule(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerAdminRuleState, opts ...pulumi.ResourceOption) (*NetworkManagerAdminRule, error) { var resource NetworkManagerAdminRule err := ctx.ReadResource("azure:network/networkManagerAdminRule:NetworkManagerAdminRule", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerAdminRule resources. type networkManagerAdminRuleState struct { // Specifies the action allowed for this Network Manager Admin Rule. Possible values are `Allow`, `AlwaysAllow`, and `Deny`. Action *string `pulumi:"action"` // Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created. AdminRuleCollectionId *string `pulumi:"adminRuleCollectionId"` // A description of the Network Manager Admin Rule. Description *string `pulumi:"description"` // A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. DestinationPortRanges []string `pulumi:"destinationPortRanges"` // One or more `destination` blocks as defined below. Destinations []NetworkManagerAdminRuleDestination `pulumi:"destinations"` // Indicates if the traffic matched against the rule in inbound or outbound. Possible values are `Inbound` and `Outbound`. Direction *string `pulumi:"direction"` // Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created. Name *string `pulumi:"name"` // The priority of the rule. Possible values are integers between `1` and `4096`. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. Priority *int `pulumi:"priority"` // Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are `Ah`, `Any`, `Esp`, `Icmp`, `Tcp`, and `Udp`. Protocol *string `pulumi:"protocol"` // A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. SourcePortRanges []string `pulumi:"sourcePortRanges"` // One or more `source` blocks as defined below. Sources []NetworkManagerAdminRuleSource `pulumi:"sources"` } type NetworkManagerAdminRuleState struct { // Specifies the action allowed for this Network Manager Admin Rule. Possible values are `Allow`, `AlwaysAllow`, and `Deny`. Action pulumi.StringPtrInput // Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created. AdminRuleCollectionId pulumi.StringPtrInput // A description of the Network Manager Admin Rule. Description pulumi.StringPtrInput // A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. DestinationPortRanges pulumi.StringArrayInput // One or more `destination` blocks as defined below. Destinations NetworkManagerAdminRuleDestinationArrayInput // Indicates if the traffic matched against the rule in inbound or outbound. Possible values are `Inbound` and `Outbound`. Direction pulumi.StringPtrInput // Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created. Name pulumi.StringPtrInput // The priority of the rule. Possible values are integers between `1` and `4096`. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. Priority pulumi.IntPtrInput // Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are `Ah`, `Any`, `Esp`, `Icmp`, `Tcp`, and `Udp`. Protocol pulumi.StringPtrInput // A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. SourcePortRanges pulumi.StringArrayInput // One or more `source` blocks as defined below. Sources NetworkManagerAdminRuleSourceArrayInput } func (NetworkManagerAdminRuleState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerAdminRuleState)(nil)).Elem() } type networkManagerAdminRuleArgs struct { // Specifies the action allowed for this Network Manager Admin Rule. Possible values are `Allow`, `AlwaysAllow`, and `Deny`. Action string `pulumi:"action"` // Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created. AdminRuleCollectionId string `pulumi:"adminRuleCollectionId"` // A description of the Network Manager Admin Rule. Description *string `pulumi:"description"` // A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. DestinationPortRanges []string `pulumi:"destinationPortRanges"` // One or more `destination` blocks as defined below. Destinations []NetworkManagerAdminRuleDestination `pulumi:"destinations"` // Indicates if the traffic matched against the rule in inbound or outbound. Possible values are `Inbound` and `Outbound`. Direction string `pulumi:"direction"` // Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created. Name *string `pulumi:"name"` // The priority of the rule. Possible values are integers between `1` and `4096`. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. Priority int `pulumi:"priority"` // Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are `Ah`, `Any`, `Esp`, `Icmp`, `Tcp`, and `Udp`. Protocol string `pulumi:"protocol"` // A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. SourcePortRanges []string `pulumi:"sourcePortRanges"` // One or more `source` blocks as defined below. Sources []NetworkManagerAdminRuleSource `pulumi:"sources"` } // The set of arguments for constructing a NetworkManagerAdminRule resource. type NetworkManagerAdminRuleArgs struct { // Specifies the action allowed for this Network Manager Admin Rule. Possible values are `Allow`, `AlwaysAllow`, and `Deny`. Action pulumi.StringInput // Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created. AdminRuleCollectionId pulumi.StringInput // A description of the Network Manager Admin Rule. Description pulumi.StringPtrInput // A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. DestinationPortRanges pulumi.StringArrayInput // One or more `destination` blocks as defined below. Destinations NetworkManagerAdminRuleDestinationArrayInput // Indicates if the traffic matched against the rule in inbound or outbound. Possible values are `Inbound` and `Outbound`. Direction pulumi.StringInput // Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created. Name pulumi.StringPtrInput // The priority of the rule. Possible values are integers between `1` and `4096`. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. Priority pulumi.IntInput // Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are `Ah`, `Any`, `Esp`, `Icmp`, `Tcp`, and `Udp`. Protocol pulumi.StringInput // A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. SourcePortRanges pulumi.StringArrayInput // One or more `source` blocks as defined below. Sources NetworkManagerAdminRuleSourceArrayInput } func (NetworkManagerAdminRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerAdminRuleArgs)(nil)).Elem() } type NetworkManagerAdminRuleInput interface { pulumi.Input ToNetworkManagerAdminRuleOutput() NetworkManagerAdminRuleOutput ToNetworkManagerAdminRuleOutputWithContext(ctx context.Context) NetworkManagerAdminRuleOutput } func (*NetworkManagerAdminRule) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerAdminRule)(nil)).Elem() } func (i *NetworkManagerAdminRule) ToNetworkManagerAdminRuleOutput() NetworkManagerAdminRuleOutput { return i.ToNetworkManagerAdminRuleOutputWithContext(context.Background()) } func (i *NetworkManagerAdminRule) ToNetworkManagerAdminRuleOutputWithContext(ctx context.Context) NetworkManagerAdminRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerAdminRuleOutput) } // NetworkManagerAdminRuleArrayInput is an input type that accepts NetworkManagerAdminRuleArray and NetworkManagerAdminRuleArrayOutput values. // You can construct a concrete instance of `NetworkManagerAdminRuleArrayInput` via: // // NetworkManagerAdminRuleArray{ NetworkManagerAdminRuleArgs{...} } type NetworkManagerAdminRuleArrayInput interface { pulumi.Input ToNetworkManagerAdminRuleArrayOutput() NetworkManagerAdminRuleArrayOutput ToNetworkManagerAdminRuleArrayOutputWithContext(context.Context) NetworkManagerAdminRuleArrayOutput } type NetworkManagerAdminRuleArray []NetworkManagerAdminRuleInput func (NetworkManagerAdminRuleArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerAdminRule)(nil)).Elem() } func (i NetworkManagerAdminRuleArray) ToNetworkManagerAdminRuleArrayOutput() NetworkManagerAdminRuleArrayOutput { return i.ToNetworkManagerAdminRuleArrayOutputWithContext(context.Background()) } func (i NetworkManagerAdminRuleArray) ToNetworkManagerAdminRuleArrayOutputWithContext(ctx context.Context) NetworkManagerAdminRuleArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerAdminRuleArrayOutput) } // NetworkManagerAdminRuleMapInput is an input type that accepts NetworkManagerAdminRuleMap and NetworkManagerAdminRuleMapOutput values. // You can construct a concrete instance of `NetworkManagerAdminRuleMapInput` via: // // NetworkManagerAdminRuleMap{ "key": NetworkManagerAdminRuleArgs{...} } type NetworkManagerAdminRuleMapInput interface { pulumi.Input ToNetworkManagerAdminRuleMapOutput() NetworkManagerAdminRuleMapOutput ToNetworkManagerAdminRuleMapOutputWithContext(context.Context) NetworkManagerAdminRuleMapOutput } type NetworkManagerAdminRuleMap map[string]NetworkManagerAdminRuleInput func (NetworkManagerAdminRuleMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerAdminRule)(nil)).Elem() } func (i NetworkManagerAdminRuleMap) ToNetworkManagerAdminRuleMapOutput() NetworkManagerAdminRuleMapOutput { return i.ToNetworkManagerAdminRuleMapOutputWithContext(context.Background()) } func (i NetworkManagerAdminRuleMap) ToNetworkManagerAdminRuleMapOutputWithContext(ctx context.Context) NetworkManagerAdminRuleMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerAdminRuleMapOutput) } type NetworkManagerAdminRuleOutput struct{ *pulumi.OutputState } func (NetworkManagerAdminRuleOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerAdminRule)(nil)).Elem() } func (o NetworkManagerAdminRuleOutput) ToNetworkManagerAdminRuleOutput() NetworkManagerAdminRuleOutput { return o } func (o NetworkManagerAdminRuleOutput) ToNetworkManagerAdminRuleOutputWithContext(ctx context.Context) NetworkManagerAdminRuleOutput { return o } // Specifies the action allowed for this Network Manager Admin Rule. Possible values are `Allow`, `AlwaysAllow`, and `Deny`. func (o NetworkManagerAdminRuleOutput) Action() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerAdminRule) pulumi.StringOutput { return v.Action }).(pulumi.StringOutput) } // Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created. func (o NetworkManagerAdminRuleOutput) AdminRuleCollectionId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerAdminRule) pulumi.StringOutput { return v.AdminRuleCollectionId }).(pulumi.StringOutput) } // A description of the Network Manager Admin Rule. func (o NetworkManagerAdminRuleOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *NetworkManagerAdminRule) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. func (o NetworkManagerAdminRuleOutput) DestinationPortRanges() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkManagerAdminRule) pulumi.StringArrayOutput { return v.DestinationPortRanges }).(pulumi.StringArrayOutput) } // One or more `destination` blocks as defined below. func (o NetworkManagerAdminRuleOutput) Destinations() NetworkManagerAdminRuleDestinationArrayOutput { return o.ApplyT(func(v *NetworkManagerAdminRule) NetworkManagerAdminRuleDestinationArrayOutput { return v.Destinations }).(NetworkManagerAdminRuleDestinationArrayOutput) } // Indicates if the traffic matched against the rule in inbound or outbound. Possible values are `Inbound` and `Outbound`. func (o NetworkManagerAdminRuleOutput) Direction() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerAdminRule) pulumi.StringOutput { return v.Direction }).(pulumi.StringOutput) } // Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created. func (o NetworkManagerAdminRuleOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerAdminRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The priority of the rule. Possible values are integers between `1` and `4096`. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. func (o NetworkManagerAdminRuleOutput) Priority() pulumi.IntOutput { return o.ApplyT(func(v *NetworkManagerAdminRule) pulumi.IntOutput { return v.Priority }).(pulumi.IntOutput) } // Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are `Ah`, `Any`, `Esp`, `Icmp`, `Tcp`, and `Udp`. func (o NetworkManagerAdminRuleOutput) Protocol() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerAdminRule) pulumi.StringOutput { return v.Protocol }).(pulumi.StringOutput) } // A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. func (o NetworkManagerAdminRuleOutput) SourcePortRanges() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkManagerAdminRule) pulumi.StringArrayOutput { return v.SourcePortRanges }).(pulumi.StringArrayOutput) } // One or more `source` blocks as defined below. func (o NetworkManagerAdminRuleOutput) Sources() NetworkManagerAdminRuleSourceArrayOutput { return o.ApplyT(func(v *NetworkManagerAdminRule) NetworkManagerAdminRuleSourceArrayOutput { return v.Sources }).(NetworkManagerAdminRuleSourceArrayOutput) } type NetworkManagerAdminRuleArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerAdminRuleArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerAdminRule)(nil)).Elem() } func (o NetworkManagerAdminRuleArrayOutput) ToNetworkManagerAdminRuleArrayOutput() NetworkManagerAdminRuleArrayOutput { return o } func (o NetworkManagerAdminRuleArrayOutput) ToNetworkManagerAdminRuleArrayOutputWithContext(ctx context.Context) NetworkManagerAdminRuleArrayOutput { return o } func (o NetworkManagerAdminRuleArrayOutput) Index(i pulumi.IntInput) NetworkManagerAdminRuleOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerAdminRule { return vs[0].([]*NetworkManagerAdminRule)[vs[1].(int)] }).(NetworkManagerAdminRuleOutput) } type NetworkManagerAdminRuleMapOutput struct{ *pulumi.OutputState } func (NetworkManagerAdminRuleMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerAdminRule)(nil)).Elem() } func (o NetworkManagerAdminRuleMapOutput) ToNetworkManagerAdminRuleMapOutput() NetworkManagerAdminRuleMapOutput { return o } func (o NetworkManagerAdminRuleMapOutput) ToNetworkManagerAdminRuleMapOutputWithContext(ctx context.Context) NetworkManagerAdminRuleMapOutput { return o } func (o NetworkManagerAdminRuleMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerAdminRuleOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerAdminRule { return vs[0].(map[string]*NetworkManagerAdminRule)[vs[1].(string)] }).(NetworkManagerAdminRuleOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerAdminRuleInput)(nil)).Elem(), &NetworkManagerAdminRule{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerAdminRuleArrayInput)(nil)).Elem(), NetworkManagerAdminRuleArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerAdminRuleMapInput)(nil)).Elem(), NetworkManagerAdminRuleMap{}) pulumi.RegisterOutputType(NetworkManagerAdminRuleOutput{}) pulumi.RegisterOutputType(NetworkManagerAdminRuleArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerAdminRuleMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/route.go
sdk/go/azure/network/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 network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Route within a Route Table. // // > **NOTE on Route Tables and Routes:** This provider currently // provides both a standalone Route resource, and allows for Routes to be defined in-line within the Route Table resource. // At this time you cannot use a Route Table with in-line Routes in conjunction with any Route resources. Doing so will cause a conflict of Route configurations and will overwrite Routes. // // ## 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/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 // } // exampleRouteTable, err := network.NewRouteTable(ctx, "example", &network.RouteTableArgs{ // Name: pulumi.String("acceptanceTestRouteTable1"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // _, err = network.NewRoute(ctx, "example", &network.RouteArgs{ // Name: pulumi.String("acceptanceTestRoute1"), // ResourceGroupName: example.Name, // RouteTableName: exampleRouteTable.Name, // AddressPrefix: pulumi.String("10.1.0.0/16"), // NextHopType: pulumi.String("VnetLocal"), // }) // 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 // // Routes can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/route:Route exampleRoute /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/routeTables/mytable1/routes/myroute1 // ``` type Route struct { pulumi.CustomResourceState // The destination to which the route applies. Can be CIDR (such as `10.1.0.0/16`) or [Azure Service Tag](https://docs.microsoft.com/azure/virtual-network/service-tags-overview) (such as `ApiManagement`, `AzureBackup` or `AzureMonitor`) format. AddressPrefix pulumi.StringOutput `pulumi:"addressPrefix"` // The name of the route. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is `VirtualAppliance`. NextHopInIpAddress pulumi.StringPtrOutput `pulumi:"nextHopInIpAddress"` // The type of Azure hop the packet should be sent to. Possible values are `VirtualNetworkGateway`, `VnetLocal`, `Internet`, `VirtualAppliance` and `None`. NextHopType pulumi.StringOutput `pulumi:"nextHopType"` // The name of the resource group in which to create the route. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The name of the route table within which create the route. Changing this forces a new resource to be created. RouteTableName pulumi.StringOutput `pulumi:"routeTableName"` } // 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.AddressPrefix == nil { return nil, errors.New("invalid value for required argument 'AddressPrefix'") } if args.NextHopType == nil { return nil, errors.New("invalid value for required argument 'NextHopType'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.RouteTableName == nil { return nil, errors.New("invalid value for required argument 'RouteTableName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Route err := ctx.RegisterResource("azure:network/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:network/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 destination to which the route applies. Can be CIDR (such as `10.1.0.0/16`) or [Azure Service Tag](https://docs.microsoft.com/azure/virtual-network/service-tags-overview) (such as `ApiManagement`, `AzureBackup` or `AzureMonitor`) format. AddressPrefix *string `pulumi:"addressPrefix"` // The name of the route. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is `VirtualAppliance`. NextHopInIpAddress *string `pulumi:"nextHopInIpAddress"` // The type of Azure hop the packet should be sent to. Possible values are `VirtualNetworkGateway`, `VnetLocal`, `Internet`, `VirtualAppliance` and `None`. NextHopType *string `pulumi:"nextHopType"` // The name of the resource group in which to create the route. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The name of the route table within which create the route. Changing this forces a new resource to be created. RouteTableName *string `pulumi:"routeTableName"` } type RouteState struct { // The destination to which the route applies. Can be CIDR (such as `10.1.0.0/16`) or [Azure Service Tag](https://docs.microsoft.com/azure/virtual-network/service-tags-overview) (such as `ApiManagement`, `AzureBackup` or `AzureMonitor`) format. AddressPrefix pulumi.StringPtrInput // The name of the route. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is `VirtualAppliance`. NextHopInIpAddress pulumi.StringPtrInput // The type of Azure hop the packet should be sent to. Possible values are `VirtualNetworkGateway`, `VnetLocal`, `Internet`, `VirtualAppliance` and `None`. NextHopType pulumi.StringPtrInput // The name of the resource group in which to create the route. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The name of the route table within which create the route. Changing this forces a new resource to be created. RouteTableName pulumi.StringPtrInput } func (RouteState) ElementType() reflect.Type { return reflect.TypeOf((*routeState)(nil)).Elem() } type routeArgs struct { // The destination to which the route applies. Can be CIDR (such as `10.1.0.0/16`) or [Azure Service Tag](https://docs.microsoft.com/azure/virtual-network/service-tags-overview) (such as `ApiManagement`, `AzureBackup` or `AzureMonitor`) format. AddressPrefix string `pulumi:"addressPrefix"` // The name of the route. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is `VirtualAppliance`. NextHopInIpAddress *string `pulumi:"nextHopInIpAddress"` // The type of Azure hop the packet should be sent to. Possible values are `VirtualNetworkGateway`, `VnetLocal`, `Internet`, `VirtualAppliance` and `None`. NextHopType string `pulumi:"nextHopType"` // The name of the resource group in which to create the route. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The name of the route table within which create the route. Changing this forces a new resource to be created. RouteTableName string `pulumi:"routeTableName"` } // The set of arguments for constructing a Route resource. type RouteArgs struct { // The destination to which the route applies. Can be CIDR (such as `10.1.0.0/16`) or [Azure Service Tag](https://docs.microsoft.com/azure/virtual-network/service-tags-overview) (such as `ApiManagement`, `AzureBackup` or `AzureMonitor`) format. AddressPrefix pulumi.StringInput // The name of the route. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is `VirtualAppliance`. NextHopInIpAddress pulumi.StringPtrInput // The type of Azure hop the packet should be sent to. Possible values are `VirtualNetworkGateway`, `VnetLocal`, `Internet`, `VirtualAppliance` and `None`. NextHopType pulumi.StringInput // The name of the resource group in which to create the route. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The name of the route table within which create the route. Changing this forces a new resource to be created. RouteTableName 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 destination to which the route applies. Can be CIDR (such as `10.1.0.0/16`) or [Azure Service Tag](https://docs.microsoft.com/azure/virtual-network/service-tags-overview) (such as `ApiManagement`, `AzureBackup` or `AzureMonitor`) format. func (o RouteOutput) AddressPrefix() pulumi.StringOutput { return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.AddressPrefix }).(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) } // Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is `VirtualAppliance`. func (o RouteOutput) NextHopInIpAddress() pulumi.StringPtrOutput { return o.ApplyT(func(v *Route) pulumi.StringPtrOutput { return v.NextHopInIpAddress }).(pulumi.StringPtrOutput) } // The type of Azure hop the packet should be sent to. Possible values are `VirtualNetworkGateway`, `VnetLocal`, `Internet`, `VirtualAppliance` and `None`. func (o RouteOutput) NextHopType() pulumi.StringOutput { return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.NextHopType }).(pulumi.StringOutput) } // The name of the resource group in which to create the route. 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 name of the route table within which create the route. Changing this forces a new resource to be created. func (o RouteOutput) RouteTableName() pulumi.StringOutput { return o.ApplyT(func(v *Route) pulumi.StringOutput { return v.RouteTableName }).(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/network/publicIp.go
sdk/go/azure/network/publicIp.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Public IP Address. // // > **Note** If this resource is to be associated with a resource that requires disassociation before destruction (such as `network.NetworkInterface`) it is recommended to set the `lifecycle` argument `createBeforeDestroy = true`. Otherwise, it can fail to disassociate on destruction. // // ## 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/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 = 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 // } // 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 // // Public IPs can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/publicIp:PublicIp myPublicIp /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/publicIPAddresses/myPublicIpAddress1 // ``` type PublicIp struct { pulumi.CustomResourceState // Defines the allocation method for this IP address. Possible values are `Static` or `Dynamic`. // // > **Note** `Dynamic` Public IP Addresses aren't allocated until they're assigned to a resource (such as a Virtual Machine or a Load Balancer) by design within Azure. See `ipAddress` argument. AllocationMethod pulumi.StringOutput `pulumi:"allocationMethod"` // The DDoS protection mode of the public IP. Possible values are `Disabled`, `Enabled`, and `VirtualNetworkInherited`. Defaults to `VirtualNetworkInherited`. DdosProtectionMode pulumi.StringPtrOutput `pulumi:"ddosProtectionMode"` // The ID of DDoS protection plan associated with the public IP. // // > **Note:** `ddosProtectionPlanId` can only be set when `ddosProtectionMode` is `Enabled`. DdosProtectionPlanId pulumi.StringPtrOutput `pulumi:"ddosProtectionPlanId"` // Label for the Domain Name. Will be used to make up the FQDN. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. DomainNameLabel pulumi.StringPtrOutput `pulumi:"domainNameLabel"` // Scope for the domain name label. If a domain name label scope is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN. Possible values are `NoReuse`, `ResourceGroupReuse`, `SubscriptionReuse` and `TenantReuse`. DomainNameLabelScope pulumi.StringPtrOutput `pulumi:"domainNameLabelScope"` // Specifies the Edge Zone within the Azure Region where this Public IP should exist. Changing this forces a new Public IP to be created. EdgeZone pulumi.StringPtrOutput `pulumi:"edgeZone"` // Fully qualified domain name of the A DNS record associated with the public IP. `domainNameLabel` must be specified to get the `fqdn`. This is the concatenation of the `domainNameLabel` and the regionalized DNS zone Fqdn pulumi.StringOutput `pulumi:"fqdn"` // Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. IdleTimeoutInMinutes pulumi.IntPtrOutput `pulumi:"idleTimeoutInMinutes"` // The IP address value that was allocated. IpAddress pulumi.StringOutput `pulumi:"ipAddress"` // A mapping of IP tags to assign to the public IP. Changing this forces a new resource to be created. // // > **Note** IP Tag `RoutingPreference` requires multiple `zones` and `Standard` SKU to be set. IpTags pulumi.StringMapOutput `pulumi:"ipTags"` // The IP Version to use, IPv6 or IPv4. Changing this forces a new resource to be created. Defaults to `IPv4`. // // > **Note** Only `static` IP address allocation is supported for IPv6. IpVersion pulumi.StringPtrOutput `pulumi:"ipVersion"` // Specifies the supported Azure location where the Public IP should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of the Public IP. Changing this forces a new Public IP to be created. Name pulumi.StringOutput `pulumi:"name"` // If specified then public IP address allocated will be provided from the public IP prefix resource. Changing this forces a new resource to be created. PublicIpPrefixId pulumi.StringPtrOutput `pulumi:"publicIpPrefixId"` // The name of the Resource Group where this Public IP should exist. Changing this forces a new Public IP to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. ReverseFqdn pulumi.StringPtrOutput `pulumi:"reverseFqdn"` // The SKU of the Public IP. Accepted values are `Basic` and `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note** Public IP Standard SKUs require `allocationMethod` to be set to `Static`. Sku pulumi.StringPtrOutput `pulumi:"sku"` // The SKU Tier that should be used for the Public IP. Possible values are `Regional` and `Global`. Defaults to `Regional`. Changing this forces a new resource to be created. // // > **Note** When `skuTier` is set to `Global`, `sku` must be set to `Standard`. SkuTier pulumi.StringPtrOutput `pulumi:"skuTier"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // A collection containing the availability zone to allocate the Public IP in. Changing this forces a new resource to be created. // // > **Note:** Availability Zones are only supported with a [Standard SKU](https://docs.microsoft.com/azure/virtual-network/virtual-network-ip-addresses-overview-arm#standard) and [in select regions](https://docs.microsoft.com/azure/availability-zones/az-overview) at this time. Standard SKU Public IP Addresses that do not specify a zone are **not** zone-redundant by default. Zones pulumi.StringArrayOutput `pulumi:"zones"` } // NewPublicIp registers a new resource with the given unique name, arguments, and options. func NewPublicIp(ctx *pulumi.Context, name string, args *PublicIpArgs, opts ...pulumi.ResourceOption) (*PublicIp, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.AllocationMethod == nil { return nil, errors.New("invalid value for required argument 'AllocationMethod'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource PublicIp err := ctx.RegisterResource("azure:network/publicIp:PublicIp", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPublicIp gets an existing PublicIp 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 GetPublicIp(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PublicIpState, opts ...pulumi.ResourceOption) (*PublicIp, error) { var resource PublicIp err := ctx.ReadResource("azure:network/publicIp:PublicIp", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering PublicIp resources. type publicIpState struct { // Defines the allocation method for this IP address. Possible values are `Static` or `Dynamic`. // // > **Note** `Dynamic` Public IP Addresses aren't allocated until they're assigned to a resource (such as a Virtual Machine or a Load Balancer) by design within Azure. See `ipAddress` argument. AllocationMethod *string `pulumi:"allocationMethod"` // The DDoS protection mode of the public IP. Possible values are `Disabled`, `Enabled`, and `VirtualNetworkInherited`. Defaults to `VirtualNetworkInherited`. DdosProtectionMode *string `pulumi:"ddosProtectionMode"` // The ID of DDoS protection plan associated with the public IP. // // > **Note:** `ddosProtectionPlanId` can only be set when `ddosProtectionMode` is `Enabled`. DdosProtectionPlanId *string `pulumi:"ddosProtectionPlanId"` // Label for the Domain Name. Will be used to make up the FQDN. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. DomainNameLabel *string `pulumi:"domainNameLabel"` // Scope for the domain name label. If a domain name label scope is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN. Possible values are `NoReuse`, `ResourceGroupReuse`, `SubscriptionReuse` and `TenantReuse`. DomainNameLabelScope *string `pulumi:"domainNameLabelScope"` // Specifies the Edge Zone within the Azure Region where this Public IP should exist. Changing this forces a new Public IP to be created. EdgeZone *string `pulumi:"edgeZone"` // Fully qualified domain name of the A DNS record associated with the public IP. `domainNameLabel` must be specified to get the `fqdn`. This is the concatenation of the `domainNameLabel` and the regionalized DNS zone Fqdn *string `pulumi:"fqdn"` // Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. IdleTimeoutInMinutes *int `pulumi:"idleTimeoutInMinutes"` // The IP address value that was allocated. IpAddress *string `pulumi:"ipAddress"` // A mapping of IP tags to assign to the public IP. Changing this forces a new resource to be created. // // > **Note** IP Tag `RoutingPreference` requires multiple `zones` and `Standard` SKU to be set. IpTags map[string]string `pulumi:"ipTags"` // The IP Version to use, IPv6 or IPv4. Changing this forces a new resource to be created. Defaults to `IPv4`. // // > **Note** Only `static` IP address allocation is supported for IPv6. IpVersion *string `pulumi:"ipVersion"` // Specifies the supported Azure location where the Public IP should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Public IP. Changing this forces a new Public IP to be created. Name *string `pulumi:"name"` // If specified then public IP address allocated will be provided from the public IP prefix resource. Changing this forces a new resource to be created. PublicIpPrefixId *string `pulumi:"publicIpPrefixId"` // The name of the Resource Group where this Public IP should exist. Changing this forces a new Public IP to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. ReverseFqdn *string `pulumi:"reverseFqdn"` // The SKU of the Public IP. Accepted values are `Basic` and `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note** Public IP Standard SKUs require `allocationMethod` to be set to `Static`. Sku *string `pulumi:"sku"` // The SKU Tier that should be used for the Public IP. Possible values are `Regional` and `Global`. Defaults to `Regional`. Changing this forces a new resource to be created. // // > **Note** When `skuTier` is set to `Global`, `sku` must be set to `Standard`. SkuTier *string `pulumi:"skuTier"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // A collection containing the availability zone to allocate the Public IP in. Changing this forces a new resource to be created. // // > **Note:** Availability Zones are only supported with a [Standard SKU](https://docs.microsoft.com/azure/virtual-network/virtual-network-ip-addresses-overview-arm#standard) and [in select regions](https://docs.microsoft.com/azure/availability-zones/az-overview) at this time. Standard SKU Public IP Addresses that do not specify a zone are **not** zone-redundant by default. Zones []string `pulumi:"zones"` } type PublicIpState struct { // Defines the allocation method for this IP address. Possible values are `Static` or `Dynamic`. // // > **Note** `Dynamic` Public IP Addresses aren't allocated until they're assigned to a resource (such as a Virtual Machine or a Load Balancer) by design within Azure. See `ipAddress` argument. AllocationMethod pulumi.StringPtrInput // The DDoS protection mode of the public IP. Possible values are `Disabled`, `Enabled`, and `VirtualNetworkInherited`. Defaults to `VirtualNetworkInherited`. DdosProtectionMode pulumi.StringPtrInput // The ID of DDoS protection plan associated with the public IP. // // > **Note:** `ddosProtectionPlanId` can only be set when `ddosProtectionMode` is `Enabled`. DdosProtectionPlanId pulumi.StringPtrInput // Label for the Domain Name. Will be used to make up the FQDN. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. DomainNameLabel pulumi.StringPtrInput // Scope for the domain name label. If a domain name label scope is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN. Possible values are `NoReuse`, `ResourceGroupReuse`, `SubscriptionReuse` and `TenantReuse`. DomainNameLabelScope pulumi.StringPtrInput // Specifies the Edge Zone within the Azure Region where this Public IP should exist. Changing this forces a new Public IP to be created. EdgeZone pulumi.StringPtrInput // Fully qualified domain name of the A DNS record associated with the public IP. `domainNameLabel` must be specified to get the `fqdn`. This is the concatenation of the `domainNameLabel` and the regionalized DNS zone Fqdn pulumi.StringPtrInput // Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. IdleTimeoutInMinutes pulumi.IntPtrInput // The IP address value that was allocated. IpAddress pulumi.StringPtrInput // A mapping of IP tags to assign to the public IP. Changing this forces a new resource to be created. // // > **Note** IP Tag `RoutingPreference` requires multiple `zones` and `Standard` SKU to be set. IpTags pulumi.StringMapInput // The IP Version to use, IPv6 or IPv4. Changing this forces a new resource to be created. Defaults to `IPv4`. // // > **Note** Only `static` IP address allocation is supported for IPv6. IpVersion pulumi.StringPtrInput // Specifies the supported Azure location where the Public IP should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Public IP. Changing this forces a new Public IP to be created. Name pulumi.StringPtrInput // If specified then public IP address allocated will be provided from the public IP prefix resource. Changing this forces a new resource to be created. PublicIpPrefixId pulumi.StringPtrInput // The name of the Resource Group where this Public IP should exist. Changing this forces a new Public IP to be created. ResourceGroupName pulumi.StringPtrInput // A fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. ReverseFqdn pulumi.StringPtrInput // The SKU of the Public IP. Accepted values are `Basic` and `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note** Public IP Standard SKUs require `allocationMethod` to be set to `Static`. Sku pulumi.StringPtrInput // The SKU Tier that should be used for the Public IP. Possible values are `Regional` and `Global`. Defaults to `Regional`. Changing this forces a new resource to be created. // // > **Note** When `skuTier` is set to `Global`, `sku` must be set to `Standard`. SkuTier pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // A collection containing the availability zone to allocate the Public IP in. Changing this forces a new resource to be created. // // > **Note:** Availability Zones are only supported with a [Standard SKU](https://docs.microsoft.com/azure/virtual-network/virtual-network-ip-addresses-overview-arm#standard) and [in select regions](https://docs.microsoft.com/azure/availability-zones/az-overview) at this time. Standard SKU Public IP Addresses that do not specify a zone are **not** zone-redundant by default. Zones pulumi.StringArrayInput } func (PublicIpState) ElementType() reflect.Type { return reflect.TypeOf((*publicIpState)(nil)).Elem() } type publicIpArgs struct { // Defines the allocation method for this IP address. Possible values are `Static` or `Dynamic`. // // > **Note** `Dynamic` Public IP Addresses aren't allocated until they're assigned to a resource (such as a Virtual Machine or a Load Balancer) by design within Azure. See `ipAddress` argument. AllocationMethod string `pulumi:"allocationMethod"` // The DDoS protection mode of the public IP. Possible values are `Disabled`, `Enabled`, and `VirtualNetworkInherited`. Defaults to `VirtualNetworkInherited`. DdosProtectionMode *string `pulumi:"ddosProtectionMode"` // The ID of DDoS protection plan associated with the public IP. // // > **Note:** `ddosProtectionPlanId` can only be set when `ddosProtectionMode` is `Enabled`. DdosProtectionPlanId *string `pulumi:"ddosProtectionPlanId"` // Label for the Domain Name. Will be used to make up the FQDN. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. DomainNameLabel *string `pulumi:"domainNameLabel"` // Scope for the domain name label. If a domain name label scope is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN. Possible values are `NoReuse`, `ResourceGroupReuse`, `SubscriptionReuse` and `TenantReuse`. DomainNameLabelScope *string `pulumi:"domainNameLabelScope"` // Specifies the Edge Zone within the Azure Region where this Public IP should exist. Changing this forces a new Public IP to be created. EdgeZone *string `pulumi:"edgeZone"` // Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. IdleTimeoutInMinutes *int `pulumi:"idleTimeoutInMinutes"` // A mapping of IP tags to assign to the public IP. Changing this forces a new resource to be created. // // > **Note** IP Tag `RoutingPreference` requires multiple `zones` and `Standard` SKU to be set. IpTags map[string]string `pulumi:"ipTags"` // The IP Version to use, IPv6 or IPv4. Changing this forces a new resource to be created. Defaults to `IPv4`. // // > **Note** Only `static` IP address allocation is supported for IPv6. IpVersion *string `pulumi:"ipVersion"` // Specifies the supported Azure location where the Public IP should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Public IP. Changing this forces a new Public IP to be created. Name *string `pulumi:"name"` // If specified then public IP address allocated will be provided from the public IP prefix resource. Changing this forces a new resource to be created. PublicIpPrefixId *string `pulumi:"publicIpPrefixId"` // The name of the Resource Group where this Public IP should exist. Changing this forces a new Public IP to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. ReverseFqdn *string `pulumi:"reverseFqdn"` // The SKU of the Public IP. Accepted values are `Basic` and `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note** Public IP Standard SKUs require `allocationMethod` to be set to `Static`. Sku *string `pulumi:"sku"` // The SKU Tier that should be used for the Public IP. Possible values are `Regional` and `Global`. Defaults to `Regional`. Changing this forces a new resource to be created. // // > **Note** When `skuTier` is set to `Global`, `sku` must be set to `Standard`. SkuTier *string `pulumi:"skuTier"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` // A collection containing the availability zone to allocate the Public IP in. Changing this forces a new resource to be created. // // > **Note:** Availability Zones are only supported with a [Standard SKU](https://docs.microsoft.com/azure/virtual-network/virtual-network-ip-addresses-overview-arm#standard) and [in select regions](https://docs.microsoft.com/azure/availability-zones/az-overview) at this time. Standard SKU Public IP Addresses that do not specify a zone are **not** zone-redundant by default. Zones []string `pulumi:"zones"` } // The set of arguments for constructing a PublicIp resource. type PublicIpArgs struct { // Defines the allocation method for this IP address. Possible values are `Static` or `Dynamic`. // // > **Note** `Dynamic` Public IP Addresses aren't allocated until they're assigned to a resource (such as a Virtual Machine or a Load Balancer) by design within Azure. See `ipAddress` argument. AllocationMethod pulumi.StringInput // The DDoS protection mode of the public IP. Possible values are `Disabled`, `Enabled`, and `VirtualNetworkInherited`. Defaults to `VirtualNetworkInherited`. DdosProtectionMode pulumi.StringPtrInput // The ID of DDoS protection plan associated with the public IP. // // > **Note:** `ddosProtectionPlanId` can only be set when `ddosProtectionMode` is `Enabled`. DdosProtectionPlanId pulumi.StringPtrInput // Label for the Domain Name. Will be used to make up the FQDN. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. DomainNameLabel pulumi.StringPtrInput // Scope for the domain name label. If a domain name label scope is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN. Possible values are `NoReuse`, `ResourceGroupReuse`, `SubscriptionReuse` and `TenantReuse`. DomainNameLabelScope pulumi.StringPtrInput // Specifies the Edge Zone within the Azure Region where this Public IP should exist. Changing this forces a new Public IP to be created. EdgeZone pulumi.StringPtrInput // Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. IdleTimeoutInMinutes pulumi.IntPtrInput // A mapping of IP tags to assign to the public IP. Changing this forces a new resource to be created. // // > **Note** IP Tag `RoutingPreference` requires multiple `zones` and `Standard` SKU to be set. IpTags pulumi.StringMapInput // The IP Version to use, IPv6 or IPv4. Changing this forces a new resource to be created. Defaults to `IPv4`. // // > **Note** Only `static` IP address allocation is supported for IPv6. IpVersion pulumi.StringPtrInput // Specifies the supported Azure location where the Public IP should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Public IP. Changing this forces a new Public IP to be created. Name pulumi.StringPtrInput // If specified then public IP address allocated will be provided from the public IP prefix resource. Changing this forces a new resource to be created. PublicIpPrefixId pulumi.StringPtrInput // The name of the Resource Group where this Public IP should exist. Changing this forces a new Public IP to be created. ResourceGroupName pulumi.StringInput // A fully qualified domain name that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. ReverseFqdn pulumi.StringPtrInput // The SKU of the Public IP. Accepted values are `Basic` and `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created. // // > **Note** Public IP Standard SKUs require `allocationMethod` to be set to `Static`. Sku pulumi.StringPtrInput // The SKU Tier that should be used for the Public IP. Possible values are `Regional` and `Global`. Defaults to `Regional`. Changing this forces a new resource to be created. // // > **Note** When `skuTier` is set to `Global`, `sku` must be set to `Standard`. SkuTier pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput // A collection containing the availability zone to allocate the Public IP in. Changing this forces a new resource to be created. // // > **Note:** Availability Zones are only supported with a [Standard SKU](https://docs.microsoft.com/azure/virtual-network/virtual-network-ip-addresses-overview-arm#standard) and [in select regions](https://docs.microsoft.com/azure/availability-zones/az-overview) at this time. Standard SKU Public IP Addresses that do not specify a zone are **not** zone-redundant by default. Zones pulumi.StringArrayInput } func (PublicIpArgs) ElementType() reflect.Type { return reflect.TypeOf((*publicIpArgs)(nil)).Elem() } type PublicIpInput interface { pulumi.Input ToPublicIpOutput() PublicIpOutput ToPublicIpOutputWithContext(ctx context.Context) PublicIpOutput } func (*PublicIp) ElementType() reflect.Type { return reflect.TypeOf((**PublicIp)(nil)).Elem() } func (i *PublicIp) ToPublicIpOutput() PublicIpOutput { return i.ToPublicIpOutputWithContext(context.Background()) } func (i *PublicIp) ToPublicIpOutputWithContext(ctx context.Context) PublicIpOutput { return pulumi.ToOutputWithContext(ctx, i).(PublicIpOutput) } // PublicIpArrayInput is an input type that accepts PublicIpArray and PublicIpArrayOutput values. // You can construct a concrete instance of `PublicIpArrayInput` via: // // PublicIpArray{ PublicIpArgs{...} } type PublicIpArrayInput interface { pulumi.Input ToPublicIpArrayOutput() PublicIpArrayOutput ToPublicIpArrayOutputWithContext(context.Context) PublicIpArrayOutput } type PublicIpArray []PublicIpInput func (PublicIpArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*PublicIp)(nil)).Elem() } func (i PublicIpArray) ToPublicIpArrayOutput() PublicIpArrayOutput { return i.ToPublicIpArrayOutputWithContext(context.Background()) } func (i PublicIpArray) ToPublicIpArrayOutputWithContext(ctx context.Context) PublicIpArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PublicIpArrayOutput) } // PublicIpMapInput is an input type that accepts PublicIpMap and PublicIpMapOutput values. // You can construct a concrete instance of `PublicIpMapInput` via: // // PublicIpMap{ "key": PublicIpArgs{...} } type PublicIpMapInput interface { pulumi.Input ToPublicIpMapOutput() PublicIpMapOutput ToPublicIpMapOutputWithContext(context.Context) PublicIpMapOutput } type PublicIpMap map[string]PublicIpInput func (PublicIpMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PublicIp)(nil)).Elem() } func (i PublicIpMap) ToPublicIpMapOutput() PublicIpMapOutput { return i.ToPublicIpMapOutputWithContext(context.Background()) } func (i PublicIpMap) ToPublicIpMapOutputWithContext(ctx context.Context) PublicIpMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PublicIpMapOutput) } type PublicIpOutput struct{ *pulumi.OutputState } func (PublicIpOutput) ElementType() reflect.Type { return reflect.TypeOf((**PublicIp)(nil)).Elem() } func (o PublicIpOutput) ToPublicIpOutput() PublicIpOutput { return o } func (o PublicIpOutput) ToPublicIpOutputWithContext(ctx context.Context) PublicIpOutput { return o } // Defines the allocation method for this IP address. Possible values are `Static` or `Dynamic`. // // > **Note** `Dynamic` Public IP Addresses aren't allocated until they're assigned to a resource (such as a Virtual Machine or a Load Balancer) by design within Azure. See `ipAddress` argument. func (o PublicIpOutput) AllocationMethod() pulumi.StringOutput { return o.ApplyT(func(v *PublicIp) pulumi.StringOutput { return v.AllocationMethod }).(pulumi.StringOutput) } // The DDoS protection mode of the public IP. Possible values are `Disabled`, `Enabled`, and `VirtualNetworkInherited`. Defaults to `VirtualNetworkInherited`. func (o PublicIpOutput) DdosProtectionMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *PublicIp) pulumi.StringPtrOutput { return v.DdosProtectionMode }).(pulumi.StringPtrOutput) } // The ID of DDoS protection plan associated with the public IP. // // > **Note:** `ddosProtectionPlanId` can only be set when `ddosProtectionMode` is `Enabled`. func (o PublicIpOutput) DdosProtectionPlanId() pulumi.StringPtrOutput { return o.ApplyT(func(v *PublicIp) pulumi.StringPtrOutput { return v.DdosProtectionPlanId }).(pulumi.StringPtrOutput) } // Label for the Domain Name. Will be used to make up the FQDN. If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. func (o PublicIpOutput) DomainNameLabel() pulumi.StringPtrOutput { return o.ApplyT(func(v *PublicIp) pulumi.StringPtrOutput { return v.DomainNameLabel }).(pulumi.StringPtrOutput) } // Scope for the domain name label. If a domain name label scope is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN. Possible values are `NoReuse`, `ResourceGroupReuse`, `SubscriptionReuse` and `TenantReuse`. func (o PublicIpOutput) DomainNameLabelScope() pulumi.StringPtrOutput { return o.ApplyT(func(v *PublicIp) pulumi.StringPtrOutput { return v.DomainNameLabelScope }).(pulumi.StringPtrOutput) } // Specifies the Edge Zone within the Azure Region where this Public IP should exist. Changing this forces a new Public IP to be created. func (o PublicIpOutput) EdgeZone() pulumi.StringPtrOutput { return o.ApplyT(func(v *PublicIp) pulumi.StringPtrOutput { return v.EdgeZone }).(pulumi.StringPtrOutput) } // Fully qualified domain name of the A DNS record associated with the public IP. `domainNameLabel` must be specified to get the `fqdn`. This is the concatenation of the `domainNameLabel` and the regionalized DNS zone func (o PublicIpOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v *PublicIp) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) } // Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. func (o PublicIpOutput) IdleTimeoutInMinutes() pulumi.IntPtrOutput { return o.ApplyT(func(v *PublicIp) pulumi.IntPtrOutput { return v.IdleTimeoutInMinutes }).(pulumi.IntPtrOutput) } // The IP address value that was allocated. func (o PublicIpOutput) IpAddress() pulumi.StringOutput { return o.ApplyT(func(v *PublicIp) pulumi.StringOutput { return v.IpAddress }).(pulumi.StringOutput) } // A mapping of IP tags to assign to the public IP. Changing this forces a new resource to be created. // // > **Note** IP Tag `RoutingPreference` requires multiple `zones` and `Standard` SKU to be set. func (o PublicIpOutput) IpTags() pulumi.StringMapOutput { return o.ApplyT(func(v *PublicIp) pulumi.StringMapOutput { return v.IpTags }).(pulumi.StringMapOutput) } // The IP Version to use, IPv6 or IPv4. Changing this forces a new resource to be created. Defaults to `IPv4`. // // > **Note** Only `static` IP address allocation is supported for IPv6.
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/network/firewallPolicy.go
sdk/go/azure/network/firewallPolicy.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Firewall 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/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 = network.NewFirewallPolicy(ctx, "example", &network.FirewallPolicyArgs{ // Name: pulumi.String("example-policy"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Firewall Policies can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/firewallPolicy:FirewallPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/firewallPolicies/policy1 // ``` type FirewallPolicy struct { pulumi.CustomResourceState // Whether enable auto learn private ip range. AutoLearnPrivateRangesEnabled pulumi.BoolPtrOutput `pulumi:"autoLearnPrivateRangesEnabled"` // The ID of the base Firewall Policy. BasePolicyId pulumi.StringPtrOutput `pulumi:"basePolicyId"` // A list of reference to child Firewall Policies of this Firewall Policy. ChildPolicies pulumi.StringArrayOutput `pulumi:"childPolicies"` // A `dns` block as defined below. Dns FirewallPolicyDnsPtrOutput `pulumi:"dns"` // A `explicitProxy` block as defined below. ExplicitProxy FirewallPolicyExplicitProxyPtrOutput `pulumi:"explicitProxy"` // A list of references to Azure Firewalls that this Firewall Policy is associated with. Firewalls pulumi.StringArrayOutput `pulumi:"firewalls"` // An `identity` block as defined below. Identity FirewallPolicyIdentityPtrOutput `pulumi:"identity"` // An `insights` block as defined below. Insights FirewallPolicyInsightsPtrOutput `pulumi:"insights"` // A `intrusionDetection` block as defined below. IntrusionDetection FirewallPolicyIntrusionDetectionPtrOutput `pulumi:"intrusionDetection"` // The Azure Region where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Firewall Policy. Changing this forces a new Firewall Policy to be created. Name pulumi.StringOutput `pulumi:"name"` // A list of private IP ranges to which traffic will not be SNAT. PrivateIpRanges pulumi.StringArrayOutput `pulumi:"privateIpRanges"` // The name of the Resource Group where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A list of references to Firewall Policy Rule Collection Groups that belongs to this Firewall Policy. RuleCollectionGroups pulumi.StringArrayOutput `pulumi:"ruleCollectionGroups"` // The SKU Tier of the Firewall Policy. Possible values are `Standard`, `Premium` and `Basic`. Defaults to `Standard`. Changing this forces a new Firewall Policy to be created. Sku pulumi.StringPtrOutput `pulumi:"sku"` // Whether SQL Redirect traffic filtering is allowed. Enabling this flag requires no rule using ports between `11000`-`11999`. SqlRedirectAllowed pulumi.BoolPtrOutput `pulumi:"sqlRedirectAllowed"` // A mapping of tags which should be assigned to the Firewall Policy. Tags pulumi.StringMapOutput `pulumi:"tags"` // A `threatIntelligenceAllowlist` block as defined below. ThreatIntelligenceAllowlist FirewallPolicyThreatIntelligenceAllowlistPtrOutput `pulumi:"threatIntelligenceAllowlist"` // The operation mode for Threat Intelligence. Possible values are `Alert`, `Deny` and `Off`. Defaults to `Alert`. ThreatIntelligenceMode pulumi.StringPtrOutput `pulumi:"threatIntelligenceMode"` // A `tlsCertificate` block as defined below. TlsCertificate FirewallPolicyTlsCertificatePtrOutput `pulumi:"tlsCertificate"` } // NewFirewallPolicy registers a new resource with the given unique name, arguments, and options. func NewFirewallPolicy(ctx *pulumi.Context, name string, args *FirewallPolicyArgs, opts ...pulumi.ResourceOption) (*FirewallPolicy, 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 FirewallPolicy err := ctx.RegisterResource("azure:network/firewallPolicy:FirewallPolicy", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFirewallPolicy gets an existing FirewallPolicy 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 GetFirewallPolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FirewallPolicyState, opts ...pulumi.ResourceOption) (*FirewallPolicy, error) { var resource FirewallPolicy err := ctx.ReadResource("azure:network/firewallPolicy:FirewallPolicy", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FirewallPolicy resources. type firewallPolicyState struct { // Whether enable auto learn private ip range. AutoLearnPrivateRangesEnabled *bool `pulumi:"autoLearnPrivateRangesEnabled"` // The ID of the base Firewall Policy. BasePolicyId *string `pulumi:"basePolicyId"` // A list of reference to child Firewall Policies of this Firewall Policy. ChildPolicies []string `pulumi:"childPolicies"` // A `dns` block as defined below. Dns *FirewallPolicyDns `pulumi:"dns"` // A `explicitProxy` block as defined below. ExplicitProxy *FirewallPolicyExplicitProxy `pulumi:"explicitProxy"` // A list of references to Azure Firewalls that this Firewall Policy is associated with. Firewalls []string `pulumi:"firewalls"` // An `identity` block as defined below. Identity *FirewallPolicyIdentity `pulumi:"identity"` // An `insights` block as defined below. Insights *FirewallPolicyInsights `pulumi:"insights"` // A `intrusionDetection` block as defined below. IntrusionDetection *FirewallPolicyIntrusionDetection `pulumi:"intrusionDetection"` // The Azure Region where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created. Location *string `pulumi:"location"` // The name which should be used for this Firewall Policy. Changing this forces a new Firewall Policy to be created. Name *string `pulumi:"name"` // A list of private IP ranges to which traffic will not be SNAT. PrivateIpRanges []string `pulumi:"privateIpRanges"` // The name of the Resource Group where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A list of references to Firewall Policy Rule Collection Groups that belongs to this Firewall Policy. RuleCollectionGroups []string `pulumi:"ruleCollectionGroups"` // The SKU Tier of the Firewall Policy. Possible values are `Standard`, `Premium` and `Basic`. Defaults to `Standard`. Changing this forces a new Firewall Policy to be created. Sku *string `pulumi:"sku"` // Whether SQL Redirect traffic filtering is allowed. Enabling this flag requires no rule using ports between `11000`-`11999`. SqlRedirectAllowed *bool `pulumi:"sqlRedirectAllowed"` // A mapping of tags which should be assigned to the Firewall Policy. Tags map[string]string `pulumi:"tags"` // A `threatIntelligenceAllowlist` block as defined below. ThreatIntelligenceAllowlist *FirewallPolicyThreatIntelligenceAllowlist `pulumi:"threatIntelligenceAllowlist"` // The operation mode for Threat Intelligence. Possible values are `Alert`, `Deny` and `Off`. Defaults to `Alert`. ThreatIntelligenceMode *string `pulumi:"threatIntelligenceMode"` // A `tlsCertificate` block as defined below. TlsCertificate *FirewallPolicyTlsCertificate `pulumi:"tlsCertificate"` } type FirewallPolicyState struct { // Whether enable auto learn private ip range. AutoLearnPrivateRangesEnabled pulumi.BoolPtrInput // The ID of the base Firewall Policy. BasePolicyId pulumi.StringPtrInput // A list of reference to child Firewall Policies of this Firewall Policy. ChildPolicies pulumi.StringArrayInput // A `dns` block as defined below. Dns FirewallPolicyDnsPtrInput // A `explicitProxy` block as defined below. ExplicitProxy FirewallPolicyExplicitProxyPtrInput // A list of references to Azure Firewalls that this Firewall Policy is associated with. Firewalls pulumi.StringArrayInput // An `identity` block as defined below. Identity FirewallPolicyIdentityPtrInput // An `insights` block as defined below. Insights FirewallPolicyInsightsPtrInput // A `intrusionDetection` block as defined below. IntrusionDetection FirewallPolicyIntrusionDetectionPtrInput // The Azure Region where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created. Location pulumi.StringPtrInput // The name which should be used for this Firewall Policy. Changing this forces a new Firewall Policy to be created. Name pulumi.StringPtrInput // A list of private IP ranges to which traffic will not be SNAT. PrivateIpRanges pulumi.StringArrayInput // The name of the Resource Group where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created. ResourceGroupName pulumi.StringPtrInput // A list of references to Firewall Policy Rule Collection Groups that belongs to this Firewall Policy. RuleCollectionGroups pulumi.StringArrayInput // The SKU Tier of the Firewall Policy. Possible values are `Standard`, `Premium` and `Basic`. Defaults to `Standard`. Changing this forces a new Firewall Policy to be created. Sku pulumi.StringPtrInput // Whether SQL Redirect traffic filtering is allowed. Enabling this flag requires no rule using ports between `11000`-`11999`. SqlRedirectAllowed pulumi.BoolPtrInput // A mapping of tags which should be assigned to the Firewall Policy. Tags pulumi.StringMapInput // A `threatIntelligenceAllowlist` block as defined below. ThreatIntelligenceAllowlist FirewallPolicyThreatIntelligenceAllowlistPtrInput // The operation mode for Threat Intelligence. Possible values are `Alert`, `Deny` and `Off`. Defaults to `Alert`. ThreatIntelligenceMode pulumi.StringPtrInput // A `tlsCertificate` block as defined below. TlsCertificate FirewallPolicyTlsCertificatePtrInput } func (FirewallPolicyState) ElementType() reflect.Type { return reflect.TypeOf((*firewallPolicyState)(nil)).Elem() } type firewallPolicyArgs struct { // Whether enable auto learn private ip range. AutoLearnPrivateRangesEnabled *bool `pulumi:"autoLearnPrivateRangesEnabled"` // The ID of the base Firewall Policy. BasePolicyId *string `pulumi:"basePolicyId"` // A `dns` block as defined below. Dns *FirewallPolicyDns `pulumi:"dns"` // A `explicitProxy` block as defined below. ExplicitProxy *FirewallPolicyExplicitProxy `pulumi:"explicitProxy"` // An `identity` block as defined below. Identity *FirewallPolicyIdentity `pulumi:"identity"` // An `insights` block as defined below. Insights *FirewallPolicyInsights `pulumi:"insights"` // A `intrusionDetection` block as defined below. IntrusionDetection *FirewallPolicyIntrusionDetection `pulumi:"intrusionDetection"` // The Azure Region where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created. Location *string `pulumi:"location"` // The name which should be used for this Firewall Policy. Changing this forces a new Firewall Policy to be created. Name *string `pulumi:"name"` // A list of private IP ranges to which traffic will not be SNAT. PrivateIpRanges []string `pulumi:"privateIpRanges"` // The name of the Resource Group where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The SKU Tier of the Firewall Policy. Possible values are `Standard`, `Premium` and `Basic`. Defaults to `Standard`. Changing this forces a new Firewall Policy to be created. Sku *string `pulumi:"sku"` // Whether SQL Redirect traffic filtering is allowed. Enabling this flag requires no rule using ports between `11000`-`11999`. SqlRedirectAllowed *bool `pulumi:"sqlRedirectAllowed"` // A mapping of tags which should be assigned to the Firewall Policy. Tags map[string]string `pulumi:"tags"` // A `threatIntelligenceAllowlist` block as defined below. ThreatIntelligenceAllowlist *FirewallPolicyThreatIntelligenceAllowlist `pulumi:"threatIntelligenceAllowlist"` // The operation mode for Threat Intelligence. Possible values are `Alert`, `Deny` and `Off`. Defaults to `Alert`. ThreatIntelligenceMode *string `pulumi:"threatIntelligenceMode"` // A `tlsCertificate` block as defined below. TlsCertificate *FirewallPolicyTlsCertificate `pulumi:"tlsCertificate"` } // The set of arguments for constructing a FirewallPolicy resource. type FirewallPolicyArgs struct { // Whether enable auto learn private ip range. AutoLearnPrivateRangesEnabled pulumi.BoolPtrInput // The ID of the base Firewall Policy. BasePolicyId pulumi.StringPtrInput // A `dns` block as defined below. Dns FirewallPolicyDnsPtrInput // A `explicitProxy` block as defined below. ExplicitProxy FirewallPolicyExplicitProxyPtrInput // An `identity` block as defined below. Identity FirewallPolicyIdentityPtrInput // An `insights` block as defined below. Insights FirewallPolicyInsightsPtrInput // A `intrusionDetection` block as defined below. IntrusionDetection FirewallPolicyIntrusionDetectionPtrInput // The Azure Region where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created. Location pulumi.StringPtrInput // The name which should be used for this Firewall Policy. Changing this forces a new Firewall Policy to be created. Name pulumi.StringPtrInput // A list of private IP ranges to which traffic will not be SNAT. PrivateIpRanges pulumi.StringArrayInput // The name of the Resource Group where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created. ResourceGroupName pulumi.StringInput // The SKU Tier of the Firewall Policy. Possible values are `Standard`, `Premium` and `Basic`. Defaults to `Standard`. Changing this forces a new Firewall Policy to be created. Sku pulumi.StringPtrInput // Whether SQL Redirect traffic filtering is allowed. Enabling this flag requires no rule using ports between `11000`-`11999`. SqlRedirectAllowed pulumi.BoolPtrInput // A mapping of tags which should be assigned to the Firewall Policy. Tags pulumi.StringMapInput // A `threatIntelligenceAllowlist` block as defined below. ThreatIntelligenceAllowlist FirewallPolicyThreatIntelligenceAllowlistPtrInput // The operation mode for Threat Intelligence. Possible values are `Alert`, `Deny` and `Off`. Defaults to `Alert`. ThreatIntelligenceMode pulumi.StringPtrInput // A `tlsCertificate` block as defined below. TlsCertificate FirewallPolicyTlsCertificatePtrInput } func (FirewallPolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*firewallPolicyArgs)(nil)).Elem() } type FirewallPolicyInput interface { pulumi.Input ToFirewallPolicyOutput() FirewallPolicyOutput ToFirewallPolicyOutputWithContext(ctx context.Context) FirewallPolicyOutput } func (*FirewallPolicy) ElementType() reflect.Type { return reflect.TypeOf((**FirewallPolicy)(nil)).Elem() } func (i *FirewallPolicy) ToFirewallPolicyOutput() FirewallPolicyOutput { return i.ToFirewallPolicyOutputWithContext(context.Background()) } func (i *FirewallPolicy) ToFirewallPolicyOutputWithContext(ctx context.Context) FirewallPolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallPolicyOutput) } // FirewallPolicyArrayInput is an input type that accepts FirewallPolicyArray and FirewallPolicyArrayOutput values. // You can construct a concrete instance of `FirewallPolicyArrayInput` via: // // FirewallPolicyArray{ FirewallPolicyArgs{...} } type FirewallPolicyArrayInput interface { pulumi.Input ToFirewallPolicyArrayOutput() FirewallPolicyArrayOutput ToFirewallPolicyArrayOutputWithContext(context.Context) FirewallPolicyArrayOutput } type FirewallPolicyArray []FirewallPolicyInput func (FirewallPolicyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallPolicy)(nil)).Elem() } func (i FirewallPolicyArray) ToFirewallPolicyArrayOutput() FirewallPolicyArrayOutput { return i.ToFirewallPolicyArrayOutputWithContext(context.Background()) } func (i FirewallPolicyArray) ToFirewallPolicyArrayOutputWithContext(ctx context.Context) FirewallPolicyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallPolicyArrayOutput) } // FirewallPolicyMapInput is an input type that accepts FirewallPolicyMap and FirewallPolicyMapOutput values. // You can construct a concrete instance of `FirewallPolicyMapInput` via: // // FirewallPolicyMap{ "key": FirewallPolicyArgs{...} } type FirewallPolicyMapInput interface { pulumi.Input ToFirewallPolicyMapOutput() FirewallPolicyMapOutput ToFirewallPolicyMapOutputWithContext(context.Context) FirewallPolicyMapOutput } type FirewallPolicyMap map[string]FirewallPolicyInput func (FirewallPolicyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallPolicy)(nil)).Elem() } func (i FirewallPolicyMap) ToFirewallPolicyMapOutput() FirewallPolicyMapOutput { return i.ToFirewallPolicyMapOutputWithContext(context.Background()) } func (i FirewallPolicyMap) ToFirewallPolicyMapOutputWithContext(ctx context.Context) FirewallPolicyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FirewallPolicyMapOutput) } type FirewallPolicyOutput struct{ *pulumi.OutputState } func (FirewallPolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((**FirewallPolicy)(nil)).Elem() } func (o FirewallPolicyOutput) ToFirewallPolicyOutput() FirewallPolicyOutput { return o } func (o FirewallPolicyOutput) ToFirewallPolicyOutputWithContext(ctx context.Context) FirewallPolicyOutput { return o } // Whether enable auto learn private ip range. func (o FirewallPolicyOutput) AutoLearnPrivateRangesEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *FirewallPolicy) pulumi.BoolPtrOutput { return v.AutoLearnPrivateRangesEnabled }).(pulumi.BoolPtrOutput) } // The ID of the base Firewall Policy. func (o FirewallPolicyOutput) BasePolicyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *FirewallPolicy) pulumi.StringPtrOutput { return v.BasePolicyId }).(pulumi.StringPtrOutput) } // A list of reference to child Firewall Policies of this Firewall Policy. func (o FirewallPolicyOutput) ChildPolicies() pulumi.StringArrayOutput { return o.ApplyT(func(v *FirewallPolicy) pulumi.StringArrayOutput { return v.ChildPolicies }).(pulumi.StringArrayOutput) } // A `dns` block as defined below. func (o FirewallPolicyOutput) Dns() FirewallPolicyDnsPtrOutput { return o.ApplyT(func(v *FirewallPolicy) FirewallPolicyDnsPtrOutput { return v.Dns }).(FirewallPolicyDnsPtrOutput) } // A `explicitProxy` block as defined below. func (o FirewallPolicyOutput) ExplicitProxy() FirewallPolicyExplicitProxyPtrOutput { return o.ApplyT(func(v *FirewallPolicy) FirewallPolicyExplicitProxyPtrOutput { return v.ExplicitProxy }).(FirewallPolicyExplicitProxyPtrOutput) } // A list of references to Azure Firewalls that this Firewall Policy is associated with. func (o FirewallPolicyOutput) Firewalls() pulumi.StringArrayOutput { return o.ApplyT(func(v *FirewallPolicy) pulumi.StringArrayOutput { return v.Firewalls }).(pulumi.StringArrayOutput) } // An `identity` block as defined below. func (o FirewallPolicyOutput) Identity() FirewallPolicyIdentityPtrOutput { return o.ApplyT(func(v *FirewallPolicy) FirewallPolicyIdentityPtrOutput { return v.Identity }).(FirewallPolicyIdentityPtrOutput) } // An `insights` block as defined below. func (o FirewallPolicyOutput) Insights() FirewallPolicyInsightsPtrOutput { return o.ApplyT(func(v *FirewallPolicy) FirewallPolicyInsightsPtrOutput { return v.Insights }).(FirewallPolicyInsightsPtrOutput) } // A `intrusionDetection` block as defined below. func (o FirewallPolicyOutput) IntrusionDetection() FirewallPolicyIntrusionDetectionPtrOutput { return o.ApplyT(func(v *FirewallPolicy) FirewallPolicyIntrusionDetectionPtrOutput { return v.IntrusionDetection }).(FirewallPolicyIntrusionDetectionPtrOutput) } // The Azure Region where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created. func (o FirewallPolicyOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *FirewallPolicy) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Firewall Policy. Changing this forces a new Firewall Policy to be created. func (o FirewallPolicyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *FirewallPolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A list of private IP ranges to which traffic will not be SNAT. func (o FirewallPolicyOutput) PrivateIpRanges() pulumi.StringArrayOutput { return o.ApplyT(func(v *FirewallPolicy) pulumi.StringArrayOutput { return v.PrivateIpRanges }).(pulumi.StringArrayOutput) } // The name of the Resource Group where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created. func (o FirewallPolicyOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *FirewallPolicy) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A list of references to Firewall Policy Rule Collection Groups that belongs to this Firewall Policy. func (o FirewallPolicyOutput) RuleCollectionGroups() pulumi.StringArrayOutput { return o.ApplyT(func(v *FirewallPolicy) pulumi.StringArrayOutput { return v.RuleCollectionGroups }).(pulumi.StringArrayOutput) } // The SKU Tier of the Firewall Policy. Possible values are `Standard`, `Premium` and `Basic`. Defaults to `Standard`. Changing this forces a new Firewall Policy to be created. func (o FirewallPolicyOutput) Sku() pulumi.StringPtrOutput { return o.ApplyT(func(v *FirewallPolicy) pulumi.StringPtrOutput { return v.Sku }).(pulumi.StringPtrOutput) } // Whether SQL Redirect traffic filtering is allowed. Enabling this flag requires no rule using ports between `11000`-`11999`. func (o FirewallPolicyOutput) SqlRedirectAllowed() pulumi.BoolPtrOutput { return o.ApplyT(func(v *FirewallPolicy) pulumi.BoolPtrOutput { return v.SqlRedirectAllowed }).(pulumi.BoolPtrOutput) } // A mapping of tags which should be assigned to the Firewall Policy. func (o FirewallPolicyOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *FirewallPolicy) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // A `threatIntelligenceAllowlist` block as defined below. func (o FirewallPolicyOutput) ThreatIntelligenceAllowlist() FirewallPolicyThreatIntelligenceAllowlistPtrOutput { return o.ApplyT(func(v *FirewallPolicy) FirewallPolicyThreatIntelligenceAllowlistPtrOutput { return v.ThreatIntelligenceAllowlist }).(FirewallPolicyThreatIntelligenceAllowlistPtrOutput) } // The operation mode for Threat Intelligence. Possible values are `Alert`, `Deny` and `Off`. Defaults to `Alert`. func (o FirewallPolicyOutput) ThreatIntelligenceMode() pulumi.StringPtrOutput { return o.ApplyT(func(v *FirewallPolicy) pulumi.StringPtrOutput { return v.ThreatIntelligenceMode }).(pulumi.StringPtrOutput) } // A `tlsCertificate` block as defined below. func (o FirewallPolicyOutput) TlsCertificate() FirewallPolicyTlsCertificatePtrOutput { return o.ApplyT(func(v *FirewallPolicy) FirewallPolicyTlsCertificatePtrOutput { return v.TlsCertificate }).(FirewallPolicyTlsCertificatePtrOutput) } type FirewallPolicyArrayOutput struct{ *pulumi.OutputState } func (FirewallPolicyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FirewallPolicy)(nil)).Elem() } func (o FirewallPolicyArrayOutput) ToFirewallPolicyArrayOutput() FirewallPolicyArrayOutput { return o } func (o FirewallPolicyArrayOutput) ToFirewallPolicyArrayOutputWithContext(ctx context.Context) FirewallPolicyArrayOutput { return o } func (o FirewallPolicyArrayOutput) Index(i pulumi.IntInput) FirewallPolicyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FirewallPolicy { return vs[0].([]*FirewallPolicy)[vs[1].(int)] }).(FirewallPolicyOutput) } type FirewallPolicyMapOutput struct{ *pulumi.OutputState } func (FirewallPolicyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FirewallPolicy)(nil)).Elem() } func (o FirewallPolicyMapOutput) ToFirewallPolicyMapOutput() FirewallPolicyMapOutput { return o } func (o FirewallPolicyMapOutput) ToFirewallPolicyMapOutputWithContext(ctx context.Context) FirewallPolicyMapOutput { return o } func (o FirewallPolicyMapOutput) MapIndex(k pulumi.StringInput) FirewallPolicyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FirewallPolicy { return vs[0].(map[string]*FirewallPolicy)[vs[1].(string)] }).(FirewallPolicyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FirewallPolicyInput)(nil)).Elem(), &FirewallPolicy{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallPolicyArrayInput)(nil)).Elem(), FirewallPolicyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FirewallPolicyMapInput)(nil)).Elem(), FirewallPolicyMap{}) pulumi.RegisterOutputType(FirewallPolicyOutput{}) pulumi.RegisterOutputType(FirewallPolicyArrayOutput{}) pulumi.RegisterOutputType(FirewallPolicyMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/subnetServiceEndpointStoragePolicy.go
sdk/go/azure/network/subnetServiceEndpointStoragePolicy.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Subnet Service Endpoint Storage 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/storage" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{ // Name: pulumi.String("examplestorageacct"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("GRS"), // }) // if err != nil { // return err // } // _, err = network.NewSubnetServiceEndpointStoragePolicy(ctx, "example", &network.SubnetServiceEndpointStoragePolicyArgs{ // Name: pulumi.String("example-policy"), // ResourceGroupName: example.Name, // Location: example.Location, // Definitions: network.SubnetServiceEndpointStoragePolicyDefinitionArray{ // &network.SubnetServiceEndpointStoragePolicyDefinitionArgs{ // Name: pulumi.String("name1"), // Description: pulumi.String("definition1"), // Service: pulumi.String("Microsoft.Storage"), // ServiceResources: pulumi.StringArray{ // example.ID(), // exampleAccount.ID(), // }, // }, // &network.SubnetServiceEndpointStoragePolicyDefinitionArgs{ // Name: pulumi.String("name2"), // Description: pulumi.String("definition2"), // Service: pulumi.String("Global"), // ServiceResources: pulumi.StringArray{ // pulumi.String("/services/Azure"), // pulumi.String("/services/Azure/Batch"), // pulumi.String("/services/Azure/Databricks"), // pulumi.String("/services/Azure/DataFactory"), // pulumi.String("/services/Azure/MachineLearning"), // pulumi.String("/services/Azure/ManagedInstance"), // pulumi.String("/services/Azure/WebPI"), // }, // }, // }, // }) // 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 // // Subnet Service Endpoint Policies can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/subnetServiceEndpointStoragePolicy:SubnetServiceEndpointStoragePolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/serviceEndpointPolicies/policy1 // ``` type SubnetServiceEndpointStoragePolicy struct { pulumi.CustomResourceState // A `definition` block as defined below Definitions SubnetServiceEndpointStoragePolicyDefinitionArrayOutput `pulumi:"definitions"` // The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewSubnetServiceEndpointStoragePolicy registers a new resource with the given unique name, arguments, and options. func NewSubnetServiceEndpointStoragePolicy(ctx *pulumi.Context, name string, args *SubnetServiceEndpointStoragePolicyArgs, opts ...pulumi.ResourceOption) (*SubnetServiceEndpointStoragePolicy, 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 SubnetServiceEndpointStoragePolicy err := ctx.RegisterResource("azure:network/subnetServiceEndpointStoragePolicy:SubnetServiceEndpointStoragePolicy", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSubnetServiceEndpointStoragePolicy gets an existing SubnetServiceEndpointStoragePolicy 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 GetSubnetServiceEndpointStoragePolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SubnetServiceEndpointStoragePolicyState, opts ...pulumi.ResourceOption) (*SubnetServiceEndpointStoragePolicy, error) { var resource SubnetServiceEndpointStoragePolicy err := ctx.ReadResource("azure:network/subnetServiceEndpointStoragePolicy:SubnetServiceEndpointStoragePolicy", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SubnetServiceEndpointStoragePolicy resources. type subnetServiceEndpointStoragePolicyState struct { // A `definition` block as defined below Definitions []SubnetServiceEndpointStoragePolicyDefinition `pulumi:"definitions"` // The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. Location *string `pulumi:"location"` // The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy. Tags map[string]string `pulumi:"tags"` } type SubnetServiceEndpointStoragePolicyState struct { // A `definition` block as defined below Definitions SubnetServiceEndpointStoragePolicyDefinitionArrayInput // The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. Location pulumi.StringPtrInput // The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy. Tags pulumi.StringMapInput } func (SubnetServiceEndpointStoragePolicyState) ElementType() reflect.Type { return reflect.TypeOf((*subnetServiceEndpointStoragePolicyState)(nil)).Elem() } type subnetServiceEndpointStoragePolicyArgs struct { // A `definition` block as defined below Definitions []SubnetServiceEndpointStoragePolicyDefinition `pulumi:"definitions"` // The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. Location *string `pulumi:"location"` // The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a SubnetServiceEndpointStoragePolicy resource. type SubnetServiceEndpointStoragePolicyArgs struct { // A `definition` block as defined below Definitions SubnetServiceEndpointStoragePolicyDefinitionArrayInput // The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. Location pulumi.StringPtrInput // The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. ResourceGroupName pulumi.StringInput // A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy. Tags pulumi.StringMapInput } func (SubnetServiceEndpointStoragePolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*subnetServiceEndpointStoragePolicyArgs)(nil)).Elem() } type SubnetServiceEndpointStoragePolicyInput interface { pulumi.Input ToSubnetServiceEndpointStoragePolicyOutput() SubnetServiceEndpointStoragePolicyOutput ToSubnetServiceEndpointStoragePolicyOutputWithContext(ctx context.Context) SubnetServiceEndpointStoragePolicyOutput } func (*SubnetServiceEndpointStoragePolicy) ElementType() reflect.Type { return reflect.TypeOf((**SubnetServiceEndpointStoragePolicy)(nil)).Elem() } func (i *SubnetServiceEndpointStoragePolicy) ToSubnetServiceEndpointStoragePolicyOutput() SubnetServiceEndpointStoragePolicyOutput { return i.ToSubnetServiceEndpointStoragePolicyOutputWithContext(context.Background()) } func (i *SubnetServiceEndpointStoragePolicy) ToSubnetServiceEndpointStoragePolicyOutputWithContext(ctx context.Context) SubnetServiceEndpointStoragePolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(SubnetServiceEndpointStoragePolicyOutput) } // SubnetServiceEndpointStoragePolicyArrayInput is an input type that accepts SubnetServiceEndpointStoragePolicyArray and SubnetServiceEndpointStoragePolicyArrayOutput values. // You can construct a concrete instance of `SubnetServiceEndpointStoragePolicyArrayInput` via: // // SubnetServiceEndpointStoragePolicyArray{ SubnetServiceEndpointStoragePolicyArgs{...} } type SubnetServiceEndpointStoragePolicyArrayInput interface { pulumi.Input ToSubnetServiceEndpointStoragePolicyArrayOutput() SubnetServiceEndpointStoragePolicyArrayOutput ToSubnetServiceEndpointStoragePolicyArrayOutputWithContext(context.Context) SubnetServiceEndpointStoragePolicyArrayOutput } type SubnetServiceEndpointStoragePolicyArray []SubnetServiceEndpointStoragePolicyInput func (SubnetServiceEndpointStoragePolicyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubnetServiceEndpointStoragePolicy)(nil)).Elem() } func (i SubnetServiceEndpointStoragePolicyArray) ToSubnetServiceEndpointStoragePolicyArrayOutput() SubnetServiceEndpointStoragePolicyArrayOutput { return i.ToSubnetServiceEndpointStoragePolicyArrayOutputWithContext(context.Background()) } func (i SubnetServiceEndpointStoragePolicyArray) ToSubnetServiceEndpointStoragePolicyArrayOutputWithContext(ctx context.Context) SubnetServiceEndpointStoragePolicyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SubnetServiceEndpointStoragePolicyArrayOutput) } // SubnetServiceEndpointStoragePolicyMapInput is an input type that accepts SubnetServiceEndpointStoragePolicyMap and SubnetServiceEndpointStoragePolicyMapOutput values. // You can construct a concrete instance of `SubnetServiceEndpointStoragePolicyMapInput` via: // // SubnetServiceEndpointStoragePolicyMap{ "key": SubnetServiceEndpointStoragePolicyArgs{...} } type SubnetServiceEndpointStoragePolicyMapInput interface { pulumi.Input ToSubnetServiceEndpointStoragePolicyMapOutput() SubnetServiceEndpointStoragePolicyMapOutput ToSubnetServiceEndpointStoragePolicyMapOutputWithContext(context.Context) SubnetServiceEndpointStoragePolicyMapOutput } type SubnetServiceEndpointStoragePolicyMap map[string]SubnetServiceEndpointStoragePolicyInput func (SubnetServiceEndpointStoragePolicyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubnetServiceEndpointStoragePolicy)(nil)).Elem() } func (i SubnetServiceEndpointStoragePolicyMap) ToSubnetServiceEndpointStoragePolicyMapOutput() SubnetServiceEndpointStoragePolicyMapOutput { return i.ToSubnetServiceEndpointStoragePolicyMapOutputWithContext(context.Background()) } func (i SubnetServiceEndpointStoragePolicyMap) ToSubnetServiceEndpointStoragePolicyMapOutputWithContext(ctx context.Context) SubnetServiceEndpointStoragePolicyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SubnetServiceEndpointStoragePolicyMapOutput) } type SubnetServiceEndpointStoragePolicyOutput struct{ *pulumi.OutputState } func (SubnetServiceEndpointStoragePolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((**SubnetServiceEndpointStoragePolicy)(nil)).Elem() } func (o SubnetServiceEndpointStoragePolicyOutput) ToSubnetServiceEndpointStoragePolicyOutput() SubnetServiceEndpointStoragePolicyOutput { return o } func (o SubnetServiceEndpointStoragePolicyOutput) ToSubnetServiceEndpointStoragePolicyOutputWithContext(ctx context.Context) SubnetServiceEndpointStoragePolicyOutput { return o } // A `definition` block as defined below func (o SubnetServiceEndpointStoragePolicyOutput) Definitions() SubnetServiceEndpointStoragePolicyDefinitionArrayOutput { return o.ApplyT(func(v *SubnetServiceEndpointStoragePolicy) SubnetServiceEndpointStoragePolicyDefinitionArrayOutput { return v.Definitions }).(SubnetServiceEndpointStoragePolicyDefinitionArrayOutput) } // The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. func (o SubnetServiceEndpointStoragePolicyOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *SubnetServiceEndpointStoragePolicy) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. func (o SubnetServiceEndpointStoragePolicyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SubnetServiceEndpointStoragePolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created. func (o SubnetServiceEndpointStoragePolicyOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *SubnetServiceEndpointStoragePolicy) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy. func (o SubnetServiceEndpointStoragePolicyOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *SubnetServiceEndpointStoragePolicy) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type SubnetServiceEndpointStoragePolicyArrayOutput struct{ *pulumi.OutputState } func (SubnetServiceEndpointStoragePolicyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SubnetServiceEndpointStoragePolicy)(nil)).Elem() } func (o SubnetServiceEndpointStoragePolicyArrayOutput) ToSubnetServiceEndpointStoragePolicyArrayOutput() SubnetServiceEndpointStoragePolicyArrayOutput { return o } func (o SubnetServiceEndpointStoragePolicyArrayOutput) ToSubnetServiceEndpointStoragePolicyArrayOutputWithContext(ctx context.Context) SubnetServiceEndpointStoragePolicyArrayOutput { return o } func (o SubnetServiceEndpointStoragePolicyArrayOutput) Index(i pulumi.IntInput) SubnetServiceEndpointStoragePolicyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SubnetServiceEndpointStoragePolicy { return vs[0].([]*SubnetServiceEndpointStoragePolicy)[vs[1].(int)] }).(SubnetServiceEndpointStoragePolicyOutput) } type SubnetServiceEndpointStoragePolicyMapOutput struct{ *pulumi.OutputState } func (SubnetServiceEndpointStoragePolicyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SubnetServiceEndpointStoragePolicy)(nil)).Elem() } func (o SubnetServiceEndpointStoragePolicyMapOutput) ToSubnetServiceEndpointStoragePolicyMapOutput() SubnetServiceEndpointStoragePolicyMapOutput { return o } func (o SubnetServiceEndpointStoragePolicyMapOutput) ToSubnetServiceEndpointStoragePolicyMapOutputWithContext(ctx context.Context) SubnetServiceEndpointStoragePolicyMapOutput { return o } func (o SubnetServiceEndpointStoragePolicyMapOutput) MapIndex(k pulumi.StringInput) SubnetServiceEndpointStoragePolicyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SubnetServiceEndpointStoragePolicy { return vs[0].(map[string]*SubnetServiceEndpointStoragePolicy)[vs[1].(string)] }).(SubnetServiceEndpointStoragePolicyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SubnetServiceEndpointStoragePolicyInput)(nil)).Elem(), &SubnetServiceEndpointStoragePolicy{}) pulumi.RegisterInputType(reflect.TypeOf((*SubnetServiceEndpointStoragePolicyArrayInput)(nil)).Elem(), SubnetServiceEndpointStoragePolicyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SubnetServiceEndpointStoragePolicyMapInput)(nil)).Elem(), SubnetServiceEndpointStoragePolicyMap{}) pulumi.RegisterOutputType(SubnetServiceEndpointStoragePolicyOutput{}) pulumi.RegisterOutputType(SubnetServiceEndpointStoragePolicyArrayOutput{}) pulumi.RegisterOutputType(SubnetServiceEndpointStoragePolicyMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkSecurityGroup.go
sdk/go/azure/network/networkSecurityGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network 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 security group that contains a list of network security rules. Network security groups enable inbound or outbound traffic to be enabled or denied. // // > **NOTE on Network Security Groups and Network Security Rules:** This provider currently // provides both a standalone Network Security Rule resource, and allows for Network Security Rules to be defined in-line within the Network Security Group resource. // At this time you cannot use a Network Security Group with in-line Network Security Rules in conjunction with any Network Security Rule resources. Doing so will cause a conflict of rule settings and will overwrite rules. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/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 // } // _, err = network.NewNetworkSecurityGroup(ctx, "example", &network.NetworkSecurityGroupArgs{ // Name: pulumi.String("acceptanceTestSecurityGroup1"), // Location: example.Location, // ResourceGroupName: example.Name, // SecurityRules: network.NetworkSecurityGroupSecurityRuleArray{ // &network.NetworkSecurityGroupSecurityRuleArgs{ // Name: pulumi.String("test123"), // Priority: pulumi.Int(100), // Direction: pulumi.String("Inbound"), // Access: pulumi.String("Allow"), // Protocol: pulumi.String("Tcp"), // SourcePortRange: pulumi.String("*"), // DestinationPortRange: pulumi.String("*"), // SourceAddressPrefix: pulumi.String("*"), // DestinationAddressPrefix: pulumi.String("*"), // }, // }, // Tags: pulumi.StringMap{ // "environment": pulumi.String("Production"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // Network Security Groups can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkSecurityGroup:NetworkSecurityGroup group1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/networkSecurityGroups/mySecurityGroup // ``` type NetworkSecurityGroup struct { pulumi.CustomResourceState // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the security rule. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which to create the network security group. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A list of objects representing security rules, as defined below. // // > **NOTE** Since `securityRule` can be configured both inline and via the separate `network.NetworkSecurityRule` resource, we have to explicitly set it to empty slice (`[]`) to remove it. SecurityRules NetworkSecurityGroupSecurityRuleArrayOutput `pulumi:"securityRules"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewNetworkSecurityGroup registers a new resource with the given unique name, arguments, and options. func NewNetworkSecurityGroup(ctx *pulumi.Context, name string, args *NetworkSecurityGroupArgs, opts ...pulumi.ResourceOption) (*NetworkSecurityGroup, 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 NetworkSecurityGroup err := ctx.RegisterResource("azure:network/networkSecurityGroup:NetworkSecurityGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkSecurityGroup gets an existing NetworkSecurityGroup 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 GetNetworkSecurityGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkSecurityGroupState, opts ...pulumi.ResourceOption) (*NetworkSecurityGroup, error) { var resource NetworkSecurityGroup err := ctx.ReadResource("azure:network/networkSecurityGroup:NetworkSecurityGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkSecurityGroup resources. type networkSecurityGroupState struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the security rule. Name *string `pulumi:"name"` // The name of the resource group in which to create the network security group. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A list of objects representing security rules, as defined below. // // > **NOTE** Since `securityRule` can be configured both inline and via the separate `network.NetworkSecurityRule` resource, we have to explicitly set it to empty slice (`[]`) to remove it. SecurityRules []NetworkSecurityGroupSecurityRule `pulumi:"securityRules"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } type NetworkSecurityGroupState struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the security rule. Name pulumi.StringPtrInput // The name of the resource group in which to create the network security group. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A list of objects representing security rules, as defined below. // // > **NOTE** Since `securityRule` can be configured both inline and via the separate `network.NetworkSecurityRule` resource, we have to explicitly set it to empty slice (`[]`) to remove it. SecurityRules NetworkSecurityGroupSecurityRuleArrayInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (NetworkSecurityGroupState) ElementType() reflect.Type { return reflect.TypeOf((*networkSecurityGroupState)(nil)).Elem() } type networkSecurityGroupArgs struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the security rule. Name *string `pulumi:"name"` // The name of the resource group in which to create the network security group. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A list of objects representing security rules, as defined below. // // > **NOTE** Since `securityRule` can be configured both inline and via the separate `network.NetworkSecurityRule` resource, we have to explicitly set it to empty slice (`[]`) to remove it. SecurityRules []NetworkSecurityGroupSecurityRule `pulumi:"securityRules"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a NetworkSecurityGroup resource. type NetworkSecurityGroupArgs struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the security rule. Name pulumi.StringPtrInput // The name of the resource group in which to create the network security group. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A list of objects representing security rules, as defined below. // // > **NOTE** Since `securityRule` can be configured both inline and via the separate `network.NetworkSecurityRule` resource, we have to explicitly set it to empty slice (`[]`) to remove it. SecurityRules NetworkSecurityGroupSecurityRuleArrayInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (NetworkSecurityGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkSecurityGroupArgs)(nil)).Elem() } type NetworkSecurityGroupInput interface { pulumi.Input ToNetworkSecurityGroupOutput() NetworkSecurityGroupOutput ToNetworkSecurityGroupOutputWithContext(ctx context.Context) NetworkSecurityGroupOutput } func (*NetworkSecurityGroup) ElementType() reflect.Type { return reflect.TypeOf((**NetworkSecurityGroup)(nil)).Elem() } func (i *NetworkSecurityGroup) ToNetworkSecurityGroupOutput() NetworkSecurityGroupOutput { return i.ToNetworkSecurityGroupOutputWithContext(context.Background()) } func (i *NetworkSecurityGroup) ToNetworkSecurityGroupOutputWithContext(ctx context.Context) NetworkSecurityGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkSecurityGroupOutput) } // NetworkSecurityGroupArrayInput is an input type that accepts NetworkSecurityGroupArray and NetworkSecurityGroupArrayOutput values. // You can construct a concrete instance of `NetworkSecurityGroupArrayInput` via: // // NetworkSecurityGroupArray{ NetworkSecurityGroupArgs{...} } type NetworkSecurityGroupArrayInput interface { pulumi.Input ToNetworkSecurityGroupArrayOutput() NetworkSecurityGroupArrayOutput ToNetworkSecurityGroupArrayOutputWithContext(context.Context) NetworkSecurityGroupArrayOutput } type NetworkSecurityGroupArray []NetworkSecurityGroupInput func (NetworkSecurityGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkSecurityGroup)(nil)).Elem() } func (i NetworkSecurityGroupArray) ToNetworkSecurityGroupArrayOutput() NetworkSecurityGroupArrayOutput { return i.ToNetworkSecurityGroupArrayOutputWithContext(context.Background()) } func (i NetworkSecurityGroupArray) ToNetworkSecurityGroupArrayOutputWithContext(ctx context.Context) NetworkSecurityGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkSecurityGroupArrayOutput) } // NetworkSecurityGroupMapInput is an input type that accepts NetworkSecurityGroupMap and NetworkSecurityGroupMapOutput values. // You can construct a concrete instance of `NetworkSecurityGroupMapInput` via: // // NetworkSecurityGroupMap{ "key": NetworkSecurityGroupArgs{...} } type NetworkSecurityGroupMapInput interface { pulumi.Input ToNetworkSecurityGroupMapOutput() NetworkSecurityGroupMapOutput ToNetworkSecurityGroupMapOutputWithContext(context.Context) NetworkSecurityGroupMapOutput } type NetworkSecurityGroupMap map[string]NetworkSecurityGroupInput func (NetworkSecurityGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkSecurityGroup)(nil)).Elem() } func (i NetworkSecurityGroupMap) ToNetworkSecurityGroupMapOutput() NetworkSecurityGroupMapOutput { return i.ToNetworkSecurityGroupMapOutputWithContext(context.Background()) } func (i NetworkSecurityGroupMap) ToNetworkSecurityGroupMapOutputWithContext(ctx context.Context) NetworkSecurityGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkSecurityGroupMapOutput) } type NetworkSecurityGroupOutput struct{ *pulumi.OutputState } func (NetworkSecurityGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkSecurityGroup)(nil)).Elem() } func (o NetworkSecurityGroupOutput) ToNetworkSecurityGroupOutput() NetworkSecurityGroupOutput { return o } func (o NetworkSecurityGroupOutput) ToNetworkSecurityGroupOutputWithContext(ctx context.Context) NetworkSecurityGroupOutput { return o } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o NetworkSecurityGroupOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *NetworkSecurityGroup) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the security rule. func (o NetworkSecurityGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *NetworkSecurityGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the network security group. Changing this forces a new resource to be created. func (o NetworkSecurityGroupOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *NetworkSecurityGroup) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A list of objects representing security rules, as defined below. // // > **NOTE** Since `securityRule` can be configured both inline and via the separate `network.NetworkSecurityRule` resource, we have to explicitly set it to empty slice (`[]`) to remove it. func (o NetworkSecurityGroupOutput) SecurityRules() NetworkSecurityGroupSecurityRuleArrayOutput { return o.ApplyT(func(v *NetworkSecurityGroup) NetworkSecurityGroupSecurityRuleArrayOutput { return v.SecurityRules }).(NetworkSecurityGroupSecurityRuleArrayOutput) } // A mapping of tags to assign to the resource. func (o NetworkSecurityGroupOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *NetworkSecurityGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type NetworkSecurityGroupArrayOutput struct{ *pulumi.OutputState } func (NetworkSecurityGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkSecurityGroup)(nil)).Elem() } func (o NetworkSecurityGroupArrayOutput) ToNetworkSecurityGroupArrayOutput() NetworkSecurityGroupArrayOutput { return o } func (o NetworkSecurityGroupArrayOutput) ToNetworkSecurityGroupArrayOutputWithContext(ctx context.Context) NetworkSecurityGroupArrayOutput { return o } func (o NetworkSecurityGroupArrayOutput) Index(i pulumi.IntInput) NetworkSecurityGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkSecurityGroup { return vs[0].([]*NetworkSecurityGroup)[vs[1].(int)] }).(NetworkSecurityGroupOutput) } type NetworkSecurityGroupMapOutput struct{ *pulumi.OutputState } func (NetworkSecurityGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkSecurityGroup)(nil)).Elem() } func (o NetworkSecurityGroupMapOutput) ToNetworkSecurityGroupMapOutput() NetworkSecurityGroupMapOutput { return o } func (o NetworkSecurityGroupMapOutput) ToNetworkSecurityGroupMapOutputWithContext(ctx context.Context) NetworkSecurityGroupMapOutput { return o } func (o NetworkSecurityGroupMapOutput) MapIndex(k pulumi.StringInput) NetworkSecurityGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkSecurityGroup { return vs[0].(map[string]*NetworkSecurityGroup)[vs[1].(string)] }).(NetworkSecurityGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkSecurityGroupInput)(nil)).Elem(), &NetworkSecurityGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkSecurityGroupArrayInput)(nil)).Elem(), NetworkSecurityGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkSecurityGroupMapInput)(nil)).Elem(), NetworkSecurityGroupMap{}) pulumi.RegisterOutputType(NetworkSecurityGroupOutput{}) pulumi.RegisterOutputType(NetworkSecurityGroupArrayOutput{}) pulumi.RegisterOutputType(NetworkSecurityGroupMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/virtualHub.go
sdk/go/azure/network/virtualHub.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Virtual Hub within a Virtual WAN. // // ## 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/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 // } // _, 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"), // }) // 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 // // Virtual Hub's can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/virtualHub:VirtualHub example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualHubs/hub1 // ``` type VirtualHub struct { pulumi.CustomResourceState // The Address Prefix which should be used for this Virtual Hub. Changing this forces a new resource to be created. [The address prefix subnet cannot be smaller than a `/24`. Azure recommends using a `/23`](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-faq#what-is-the-recommended-hub-address-space-during-hub-creation). AddressPrefix pulumi.StringPtrOutput `pulumi:"addressPrefix"` // Boolean flag to specify whether branch to branch traffic is allowed. Defaults to `false`. BranchToBranchTrafficEnabled pulumi.BoolPtrOutput `pulumi:"branchToBranchTrafficEnabled"` // The ID of the default Route Table in the Virtual Hub. DefaultRouteTableId pulumi.StringOutput `pulumi:"defaultRouteTableId"` // The hub routing preference. Possible values are `ExpressRoute`, `ASPath` and `VpnGateway`. Defaults to `ExpressRoute`. HubRoutingPreference pulumi.StringPtrOutput `pulumi:"hubRoutingPreference"` // Specifies the supported Azure location where the Virtual Hub should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the Virtual Hub. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the name of the Resource Group where the Virtual Hub should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // One or more `route` blocks as defined below. Routes VirtualHubRouteArrayOutput `pulumi:"routes"` // The SKU of the Virtual Hub. Possible values are `Basic` and `Standard`. Changing this forces a new resource to be created. Sku pulumi.StringPtrOutput `pulumi:"sku"` // A mapping of tags to assign to the Virtual Hub. Tags pulumi.StringMapOutput `pulumi:"tags"` // The Autonomous System Number of the Virtual Hub BGP router. VirtualRouterAsn pulumi.IntOutput `pulumi:"virtualRouterAsn"` // Minimum instance capacity for the scaling configuration of the Virtual Hub Router. Defaults to `2`. VirtualRouterAutoScaleMinCapacity pulumi.IntPtrOutput `pulumi:"virtualRouterAutoScaleMinCapacity"` // The IP addresses of the Virtual Hub BGP router. VirtualRouterIps pulumi.StringArrayOutput `pulumi:"virtualRouterIps"` // The ID of a Virtual WAN within which the Virtual Hub should be created. Changing this forces a new resource to be created. VirtualWanId pulumi.StringPtrOutput `pulumi:"virtualWanId"` } // NewVirtualHub registers a new resource with the given unique name, arguments, and options. func NewVirtualHub(ctx *pulumi.Context, name string, args *VirtualHubArgs, opts ...pulumi.ResourceOption) (*VirtualHub, 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 VirtualHub err := ctx.RegisterResource("azure:network/virtualHub:VirtualHub", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualHub gets an existing VirtualHub 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 GetVirtualHub(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualHubState, opts ...pulumi.ResourceOption) (*VirtualHub, error) { var resource VirtualHub err := ctx.ReadResource("azure:network/virtualHub:VirtualHub", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualHub resources. type virtualHubState struct { // The Address Prefix which should be used for this Virtual Hub. Changing this forces a new resource to be created. [The address prefix subnet cannot be smaller than a `/24`. Azure recommends using a `/23`](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-faq#what-is-the-recommended-hub-address-space-during-hub-creation). AddressPrefix *string `pulumi:"addressPrefix"` // Boolean flag to specify whether branch to branch traffic is allowed. Defaults to `false`. BranchToBranchTrafficEnabled *bool `pulumi:"branchToBranchTrafficEnabled"` // The ID of the default Route Table in the Virtual Hub. DefaultRouteTableId *string `pulumi:"defaultRouteTableId"` // The hub routing preference. Possible values are `ExpressRoute`, `ASPath` and `VpnGateway`. Defaults to `ExpressRoute`. HubRoutingPreference *string `pulumi:"hubRoutingPreference"` // Specifies the supported Azure location where the Virtual Hub should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Virtual Hub. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group where the Virtual Hub should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // One or more `route` blocks as defined below. Routes []VirtualHubRoute `pulumi:"routes"` // The SKU of the Virtual Hub. Possible values are `Basic` and `Standard`. Changing this forces a new resource to be created. Sku *string `pulumi:"sku"` // A mapping of tags to assign to the Virtual Hub. Tags map[string]string `pulumi:"tags"` // The Autonomous System Number of the Virtual Hub BGP router. VirtualRouterAsn *int `pulumi:"virtualRouterAsn"` // Minimum instance capacity for the scaling configuration of the Virtual Hub Router. Defaults to `2`. VirtualRouterAutoScaleMinCapacity *int `pulumi:"virtualRouterAutoScaleMinCapacity"` // The IP addresses of the Virtual Hub BGP router. VirtualRouterIps []string `pulumi:"virtualRouterIps"` // The ID of a Virtual WAN within which the Virtual Hub should be created. Changing this forces a new resource to be created. VirtualWanId *string `pulumi:"virtualWanId"` } type VirtualHubState struct { // The Address Prefix which should be used for this Virtual Hub. Changing this forces a new resource to be created. [The address prefix subnet cannot be smaller than a `/24`. Azure recommends using a `/23`](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-faq#what-is-the-recommended-hub-address-space-during-hub-creation). AddressPrefix pulumi.StringPtrInput // Boolean flag to specify whether branch to branch traffic is allowed. Defaults to `false`. BranchToBranchTrafficEnabled pulumi.BoolPtrInput // The ID of the default Route Table in the Virtual Hub. DefaultRouteTableId pulumi.StringPtrInput // The hub routing preference. Possible values are `ExpressRoute`, `ASPath` and `VpnGateway`. Defaults to `ExpressRoute`. HubRoutingPreference pulumi.StringPtrInput // Specifies the supported Azure location where the Virtual Hub should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Virtual Hub. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group where the Virtual Hub should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // One or more `route` blocks as defined below. Routes VirtualHubRouteArrayInput // The SKU of the Virtual Hub. Possible values are `Basic` and `Standard`. Changing this forces a new resource to be created. Sku pulumi.StringPtrInput // A mapping of tags to assign to the Virtual Hub. Tags pulumi.StringMapInput // The Autonomous System Number of the Virtual Hub BGP router. VirtualRouterAsn pulumi.IntPtrInput // Minimum instance capacity for the scaling configuration of the Virtual Hub Router. Defaults to `2`. VirtualRouterAutoScaleMinCapacity pulumi.IntPtrInput // The IP addresses of the Virtual Hub BGP router. VirtualRouterIps pulumi.StringArrayInput // The ID of a Virtual WAN within which the Virtual Hub should be created. Changing this forces a new resource to be created. VirtualWanId pulumi.StringPtrInput } func (VirtualHubState) ElementType() reflect.Type { return reflect.TypeOf((*virtualHubState)(nil)).Elem() } type virtualHubArgs struct { // The Address Prefix which should be used for this Virtual Hub. Changing this forces a new resource to be created. [The address prefix subnet cannot be smaller than a `/24`. Azure recommends using a `/23`](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-faq#what-is-the-recommended-hub-address-space-during-hub-creation). AddressPrefix *string `pulumi:"addressPrefix"` // Boolean flag to specify whether branch to branch traffic is allowed. Defaults to `false`. BranchToBranchTrafficEnabled *bool `pulumi:"branchToBranchTrafficEnabled"` // The hub routing preference. Possible values are `ExpressRoute`, `ASPath` and `VpnGateway`. Defaults to `ExpressRoute`. HubRoutingPreference *string `pulumi:"hubRoutingPreference"` // Specifies the supported Azure location where the Virtual Hub should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the Virtual Hub. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group where the Virtual Hub should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // One or more `route` blocks as defined below. Routes []VirtualHubRoute `pulumi:"routes"` // The SKU of the Virtual Hub. Possible values are `Basic` and `Standard`. Changing this forces a new resource to be created. Sku *string `pulumi:"sku"` // A mapping of tags to assign to the Virtual Hub. Tags map[string]string `pulumi:"tags"` // Minimum instance capacity for the scaling configuration of the Virtual Hub Router. Defaults to `2`. VirtualRouterAutoScaleMinCapacity *int `pulumi:"virtualRouterAutoScaleMinCapacity"` // The ID of a Virtual WAN within which the Virtual Hub should be created. Changing this forces a new resource to be created. VirtualWanId *string `pulumi:"virtualWanId"` } // The set of arguments for constructing a VirtualHub resource. type VirtualHubArgs struct { // The Address Prefix which should be used for this Virtual Hub. Changing this forces a new resource to be created. [The address prefix subnet cannot be smaller than a `/24`. Azure recommends using a `/23`](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-faq#what-is-the-recommended-hub-address-space-during-hub-creation). AddressPrefix pulumi.StringPtrInput // Boolean flag to specify whether branch to branch traffic is allowed. Defaults to `false`. BranchToBranchTrafficEnabled pulumi.BoolPtrInput // The hub routing preference. Possible values are `ExpressRoute`, `ASPath` and `VpnGateway`. Defaults to `ExpressRoute`. HubRoutingPreference pulumi.StringPtrInput // Specifies the supported Azure location where the Virtual Hub should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the Virtual Hub. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group where the Virtual Hub should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // One or more `route` blocks as defined below. Routes VirtualHubRouteArrayInput // The SKU of the Virtual Hub. Possible values are `Basic` and `Standard`. Changing this forces a new resource to be created. Sku pulumi.StringPtrInput // A mapping of tags to assign to the Virtual Hub. Tags pulumi.StringMapInput // Minimum instance capacity for the scaling configuration of the Virtual Hub Router. Defaults to `2`. VirtualRouterAutoScaleMinCapacity pulumi.IntPtrInput // The ID of a Virtual WAN within which the Virtual Hub should be created. Changing this forces a new resource to be created. VirtualWanId pulumi.StringPtrInput } func (VirtualHubArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualHubArgs)(nil)).Elem() } type VirtualHubInput interface { pulumi.Input ToVirtualHubOutput() VirtualHubOutput ToVirtualHubOutputWithContext(ctx context.Context) VirtualHubOutput } func (*VirtualHub) ElementType() reflect.Type { return reflect.TypeOf((**VirtualHub)(nil)).Elem() } func (i *VirtualHub) ToVirtualHubOutput() VirtualHubOutput { return i.ToVirtualHubOutputWithContext(context.Background()) } func (i *VirtualHub) ToVirtualHubOutputWithContext(ctx context.Context) VirtualHubOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualHubOutput) } // VirtualHubArrayInput is an input type that accepts VirtualHubArray and VirtualHubArrayOutput values. // You can construct a concrete instance of `VirtualHubArrayInput` via: // // VirtualHubArray{ VirtualHubArgs{...} } type VirtualHubArrayInput interface { pulumi.Input ToVirtualHubArrayOutput() VirtualHubArrayOutput ToVirtualHubArrayOutputWithContext(context.Context) VirtualHubArrayOutput } type VirtualHubArray []VirtualHubInput func (VirtualHubArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualHub)(nil)).Elem() } func (i VirtualHubArray) ToVirtualHubArrayOutput() VirtualHubArrayOutput { return i.ToVirtualHubArrayOutputWithContext(context.Background()) } func (i VirtualHubArray) ToVirtualHubArrayOutputWithContext(ctx context.Context) VirtualHubArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualHubArrayOutput) } // VirtualHubMapInput is an input type that accepts VirtualHubMap and VirtualHubMapOutput values. // You can construct a concrete instance of `VirtualHubMapInput` via: // // VirtualHubMap{ "key": VirtualHubArgs{...} } type VirtualHubMapInput interface { pulumi.Input ToVirtualHubMapOutput() VirtualHubMapOutput ToVirtualHubMapOutputWithContext(context.Context) VirtualHubMapOutput } type VirtualHubMap map[string]VirtualHubInput func (VirtualHubMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualHub)(nil)).Elem() } func (i VirtualHubMap) ToVirtualHubMapOutput() VirtualHubMapOutput { return i.ToVirtualHubMapOutputWithContext(context.Background()) } func (i VirtualHubMap) ToVirtualHubMapOutputWithContext(ctx context.Context) VirtualHubMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualHubMapOutput) } type VirtualHubOutput struct{ *pulumi.OutputState } func (VirtualHubOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualHub)(nil)).Elem() } func (o VirtualHubOutput) ToVirtualHubOutput() VirtualHubOutput { return o } func (o VirtualHubOutput) ToVirtualHubOutputWithContext(ctx context.Context) VirtualHubOutput { return o } // The Address Prefix which should be used for this Virtual Hub. Changing this forces a new resource to be created. [The address prefix subnet cannot be smaller than a `/24`. Azure recommends using a `/23`](https://docs.microsoft.com/azure/virtual-wan/virtual-wan-faq#what-is-the-recommended-hub-address-space-during-hub-creation). func (o VirtualHubOutput) AddressPrefix() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualHub) pulumi.StringPtrOutput { return v.AddressPrefix }).(pulumi.StringPtrOutput) } // Boolean flag to specify whether branch to branch traffic is allowed. Defaults to `false`. func (o VirtualHubOutput) BranchToBranchTrafficEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualHub) pulumi.BoolPtrOutput { return v.BranchToBranchTrafficEnabled }).(pulumi.BoolPtrOutput) } // The ID of the default Route Table in the Virtual Hub. func (o VirtualHubOutput) DefaultRouteTableId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHub) pulumi.StringOutput { return v.DefaultRouteTableId }).(pulumi.StringOutput) } // The hub routing preference. Possible values are `ExpressRoute`, `ASPath` and `VpnGateway`. Defaults to `ExpressRoute`. func (o VirtualHubOutput) HubRoutingPreference() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualHub) pulumi.StringPtrOutput { return v.HubRoutingPreference }).(pulumi.StringPtrOutput) } // Specifies the supported Azure location where the Virtual Hub should exist. Changing this forces a new resource to be created. func (o VirtualHubOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHub) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the Virtual Hub. Changing this forces a new resource to be created. func (o VirtualHubOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHub) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the name of the Resource Group where the Virtual Hub should exist. Changing this forces a new resource to be created. func (o VirtualHubOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualHub) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // One or more `route` blocks as defined below. func (o VirtualHubOutput) Routes() VirtualHubRouteArrayOutput { return o.ApplyT(func(v *VirtualHub) VirtualHubRouteArrayOutput { return v.Routes }).(VirtualHubRouteArrayOutput) } // The SKU of the Virtual Hub. Possible values are `Basic` and `Standard`. Changing this forces a new resource to be created. func (o VirtualHubOutput) Sku() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualHub) pulumi.StringPtrOutput { return v.Sku }).(pulumi.StringPtrOutput) } // A mapping of tags to assign to the Virtual Hub. func (o VirtualHubOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *VirtualHub) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The Autonomous System Number of the Virtual Hub BGP router. func (o VirtualHubOutput) VirtualRouterAsn() pulumi.IntOutput { return o.ApplyT(func(v *VirtualHub) pulumi.IntOutput { return v.VirtualRouterAsn }).(pulumi.IntOutput) } // Minimum instance capacity for the scaling configuration of the Virtual Hub Router. Defaults to `2`. func (o VirtualHubOutput) VirtualRouterAutoScaleMinCapacity() pulumi.IntPtrOutput { return o.ApplyT(func(v *VirtualHub) pulumi.IntPtrOutput { return v.VirtualRouterAutoScaleMinCapacity }).(pulumi.IntPtrOutput) } // The IP addresses of the Virtual Hub BGP router. func (o VirtualHubOutput) VirtualRouterIps() pulumi.StringArrayOutput { return o.ApplyT(func(v *VirtualHub) pulumi.StringArrayOutput { return v.VirtualRouterIps }).(pulumi.StringArrayOutput) } // The ID of a Virtual WAN within which the Virtual Hub should be created. Changing this forces a new resource to be created. func (o VirtualHubOutput) VirtualWanId() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualHub) pulumi.StringPtrOutput { return v.VirtualWanId }).(pulumi.StringPtrOutput) } type VirtualHubArrayOutput struct{ *pulumi.OutputState } func (VirtualHubArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualHub)(nil)).Elem() } func (o VirtualHubArrayOutput) ToVirtualHubArrayOutput() VirtualHubArrayOutput { return o } func (o VirtualHubArrayOutput) ToVirtualHubArrayOutputWithContext(ctx context.Context) VirtualHubArrayOutput { return o } func (o VirtualHubArrayOutput) Index(i pulumi.IntInput) VirtualHubOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualHub { return vs[0].([]*VirtualHub)[vs[1].(int)] }).(VirtualHubOutput) } type VirtualHubMapOutput struct{ *pulumi.OutputState } func (VirtualHubMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualHub)(nil)).Elem() } func (o VirtualHubMapOutput) ToVirtualHubMapOutput() VirtualHubMapOutput { return o } func (o VirtualHubMapOutput) ToVirtualHubMapOutputWithContext(ctx context.Context) VirtualHubMapOutput { return o } func (o VirtualHubMapOutput) MapIndex(k pulumi.StringInput) VirtualHubOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualHub { return vs[0].(map[string]*VirtualHub)[vs[1].(string)] }).(VirtualHubOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualHubInput)(nil)).Elem(), &VirtualHub{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualHubArrayInput)(nil)).Elem(), VirtualHubArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualHubMapInput)(nil)).Elem(), VirtualHubMap{}) pulumi.RegisterOutputType(VirtualHubOutput{}) pulumi.RegisterOutputType(VirtualHubArrayOutput{}) pulumi.RegisterOutputType(VirtualHubMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/networkManagerDeployment.go
sdk/go/azure/network/networkManagerDeployment.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network 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 Manager Deployment. // // > **Note:** Using Network Manager Deployment to deploy Connectivity Configuration may modify or delete existing Virtual Network Peering. At this time you should not use Network Peering resource in conjunction with Network Manager Deployment. Doing so may cause a conflict of Peering configurations. // // ## 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/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 // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // Location: example.Location, // ResourceGroupName: example.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Connectivity"), // pulumi.String("SecurityAdmin"), // }, // Description: pulumi.String("example network manager"), // }) // if err != nil { // return err // } // exampleNetworkManagerNetworkGroup, err := network.NewNetworkManagerNetworkGroup(ctx, "example", &network.NetworkManagerNetworkGroupArgs{ // Name: pulumi.String("example-group"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-net"), // Location: example.Location, // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // FlowTimeoutInMinutes: pulumi.Int(10), // }) // if err != nil { // return err // } // exampleNetworkManagerConnectivityConfiguration, err := network.NewNetworkManagerConnectivityConfiguration(ctx, "example", &network.NetworkManagerConnectivityConfigurationArgs{ // Name: pulumi.String("example-connectivity-conf"), // NetworkManagerId: exampleNetworkManager.ID(), // ConnectivityTopology: pulumi.String("HubAndSpoke"), // AppliesToGroups: network.NetworkManagerConnectivityConfigurationAppliesToGroupArray{ // &network.NetworkManagerConnectivityConfigurationAppliesToGroupArgs{ // GroupConnectivity: pulumi.String("None"), // NetworkGroupId: exampleNetworkManagerNetworkGroup.ID(), // }, // }, // Hub: &network.NetworkManagerConnectivityConfigurationHubArgs{ // ResourceId: exampleVirtualNetwork.ID(), // ResourceType: pulumi.String("Microsoft.Network/virtualNetworks"), // }, // }) // if err != nil { // return err // } // _, err = network.NewNetworkManagerDeployment(ctx, "example", &network.NetworkManagerDeploymentArgs{ // NetworkManagerId: exampleNetworkManager.ID(), // Location: pulumi.String("eastus"), // ScopeAccess: pulumi.String("Connectivity"), // ConfigurationIds: pulumi.StringArray{ // exampleNetworkManagerConnectivityConfiguration.ID(), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Triggers) // // ```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-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 // } // current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{ // }, nil); // if err != nil { // return err // } // exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{ // Name: pulumi.String("example-network-manager"), // Location: example.Location, // ResourceGroupName: example.Name, // Scope: &network.NetworkManagerScopeArgs{ // SubscriptionIds: pulumi.StringArray{ // pulumi.String(current.Id), // }, // }, // ScopeAccesses: pulumi.StringArray{ // pulumi.String("Connectivity"), // pulumi.String("SecurityAdmin"), // }, // Description: pulumi.String("example network manager"), // }) // if err != nil { // return err // } // exampleNetworkManagerNetworkGroup, err := network.NewNetworkManagerNetworkGroup(ctx, "example", &network.NetworkManagerNetworkGroupArgs{ // Name: pulumi.String("example-group"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // _, err = network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-net"), // Location: example.Location, // ResourceGroupName: example.Name, // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // FlowTimeoutInMinutes: pulumi.Int(10), // }) // if err != nil { // return err // } // exampleNetworkManagerSecurityAdminConfiguration, err := network.NewNetworkManagerSecurityAdminConfiguration(ctx, "example", &network.NetworkManagerSecurityAdminConfigurationArgs{ // Name: pulumi.String("example-nmsac"), // NetworkManagerId: exampleNetworkManager.ID(), // }) // if err != nil { // return err // } // exampleNetworkManagerAdminRuleCollection, err := network.NewNetworkManagerAdminRuleCollection(ctx, "example", &network.NetworkManagerAdminRuleCollectionArgs{ // Name: pulumi.String("example-nmarc"), // SecurityAdminConfigurationId: exampleNetworkManagerSecurityAdminConfiguration.ID(), // NetworkGroupIds: pulumi.StringArray{ // exampleNetworkManagerNetworkGroup.ID(), // }, // }) // if err != nil { // return err // } // exampleNetworkManagerAdminRule, err := network.NewNetworkManagerAdminRule(ctx, "example", &network.NetworkManagerAdminRuleArgs{ // Name: pulumi.String("example-nmar"), // AdminRuleCollectionId: exampleNetworkManagerAdminRuleCollection.ID(), // Action: pulumi.String("Deny"), // Description: pulumi.String("example"), // Direction: pulumi.String("Inbound"), // Priority: pulumi.Int(1), // Protocol: pulumi.String("Tcp"), // SourcePortRanges: pulumi.StringArray{ // pulumi.String("80"), // }, // DestinationPortRanges: pulumi.StringArray{ // pulumi.String("80"), // }, // Sources: network.NetworkManagerAdminRuleSourceArray{ // &network.NetworkManagerAdminRuleSourceArgs{ // AddressPrefixType: pulumi.String("ServiceTag"), // AddressPrefix: pulumi.String("Internet"), // }, // }, // Destinations: network.NetworkManagerAdminRuleDestinationArray{ // &network.NetworkManagerAdminRuleDestinationArgs{ // AddressPrefixType: pulumi.String("IPPrefix"), // AddressPrefix: pulumi.String("*"), // }, // }, // }) // if err != nil { // return err // } // invokeJoin, err := std.Join(ctx, &std.JoinArgs{ // Separator: ",", // Input: sourcePortRanges, // }, nil) // if err != nil { // return err // } // _, err = network.NewNetworkManagerDeployment(ctx, "example", &network.NetworkManagerDeploymentArgs{ // NetworkManagerId: exampleNetworkManager.ID(), // Location: pulumi.String("eastus"), // ScopeAccess: pulumi.String("SecurityAdmin"), // ConfigurationIds: pulumi.StringArray{ // exampleNetworkManagerSecurityAdminConfiguration.ID(), // }, // Triggers: pulumi.StringMap{ // "source_port_ranges": pulumi.String(exampleNetworkManagerAdminRule.SourcePortRanges.ApplyT(func(sourcePortRanges interface{}) (std.JoinResult, error) { // %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)).(std.JoinResultOutput).ApplyT(func(invoke std.JoinResult) (*string, error) { // return invoke.Result, nil // }).(pulumi.StringPtrOutput)), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // exampleNetworkManagerAdminRule, // })) // 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 // // Network Manager Deployment can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/networkManagerDeployment:NetworkManagerDeployment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1/commit|eastus|Connectivity // ``` type NetworkManagerDeployment struct { pulumi.CustomResourceState // A list of Network Manager Configuration IDs which should be aligned with `scopeAccess`. ConfigurationIds pulumi.StringArrayOutput `pulumi:"configurationIds"` // Specifies the location which the configurations will be deployed to. Changing this forces a new Network Manager Deployment to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Deployment to be created. NetworkManagerId pulumi.StringOutput `pulumi:"networkManagerId"` // Specifies the configuration deployment type. Possible values are `Connectivity`, `SecurityAdmin` and `Routing`. Changing this forces a new Network Manager Deployment to be created. ScopeAccess pulumi.StringOutput `pulumi:"scopeAccess"` // A mapping of key values pairs that can be used to keep the deployment up with the Network Manager configurations and rules. Triggers pulumi.StringMapOutput `pulumi:"triggers"` } // NewNetworkManagerDeployment registers a new resource with the given unique name, arguments, and options. func NewNetworkManagerDeployment(ctx *pulumi.Context, name string, args *NetworkManagerDeploymentArgs, opts ...pulumi.ResourceOption) (*NetworkManagerDeployment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ConfigurationIds == nil { return nil, errors.New("invalid value for required argument 'ConfigurationIds'") } if args.NetworkManagerId == nil { return nil, errors.New("invalid value for required argument 'NetworkManagerId'") } if args.ScopeAccess == nil { return nil, errors.New("invalid value for required argument 'ScopeAccess'") } opts = internal.PkgResourceDefaultOpts(opts) var resource NetworkManagerDeployment err := ctx.RegisterResource("azure:network/networkManagerDeployment:NetworkManagerDeployment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetNetworkManagerDeployment gets an existing NetworkManagerDeployment 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 GetNetworkManagerDeployment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *NetworkManagerDeploymentState, opts ...pulumi.ResourceOption) (*NetworkManagerDeployment, error) { var resource NetworkManagerDeployment err := ctx.ReadResource("azure:network/networkManagerDeployment:NetworkManagerDeployment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering NetworkManagerDeployment resources. type networkManagerDeploymentState struct { // A list of Network Manager Configuration IDs which should be aligned with `scopeAccess`. ConfigurationIds []string `pulumi:"configurationIds"` // Specifies the location which the configurations will be deployed to. Changing this forces a new Network Manager Deployment to be created. Location *string `pulumi:"location"` // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Deployment to be created. NetworkManagerId *string `pulumi:"networkManagerId"` // Specifies the configuration deployment type. Possible values are `Connectivity`, `SecurityAdmin` and `Routing`. Changing this forces a new Network Manager Deployment to be created. ScopeAccess *string `pulumi:"scopeAccess"` // A mapping of key values pairs that can be used to keep the deployment up with the Network Manager configurations and rules. Triggers map[string]string `pulumi:"triggers"` } type NetworkManagerDeploymentState struct { // A list of Network Manager Configuration IDs which should be aligned with `scopeAccess`. ConfigurationIds pulumi.StringArrayInput // Specifies the location which the configurations will be deployed to. Changing this forces a new Network Manager Deployment to be created. Location pulumi.StringPtrInput // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Deployment to be created. NetworkManagerId pulumi.StringPtrInput // Specifies the configuration deployment type. Possible values are `Connectivity`, `SecurityAdmin` and `Routing`. Changing this forces a new Network Manager Deployment to be created. ScopeAccess pulumi.StringPtrInput // A mapping of key values pairs that can be used to keep the deployment up with the Network Manager configurations and rules. Triggers pulumi.StringMapInput } func (NetworkManagerDeploymentState) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerDeploymentState)(nil)).Elem() } type networkManagerDeploymentArgs struct { // A list of Network Manager Configuration IDs which should be aligned with `scopeAccess`. ConfigurationIds []string `pulumi:"configurationIds"` // Specifies the location which the configurations will be deployed to. Changing this forces a new Network Manager Deployment to be created. Location *string `pulumi:"location"` // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Deployment to be created. NetworkManagerId string `pulumi:"networkManagerId"` // Specifies the configuration deployment type. Possible values are `Connectivity`, `SecurityAdmin` and `Routing`. Changing this forces a new Network Manager Deployment to be created. ScopeAccess string `pulumi:"scopeAccess"` // A mapping of key values pairs that can be used to keep the deployment up with the Network Manager configurations and rules. Triggers map[string]string `pulumi:"triggers"` } // The set of arguments for constructing a NetworkManagerDeployment resource. type NetworkManagerDeploymentArgs struct { // A list of Network Manager Configuration IDs which should be aligned with `scopeAccess`. ConfigurationIds pulumi.StringArrayInput // Specifies the location which the configurations will be deployed to. Changing this forces a new Network Manager Deployment to be created. Location pulumi.StringPtrInput // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Deployment to be created. NetworkManagerId pulumi.StringInput // Specifies the configuration deployment type. Possible values are `Connectivity`, `SecurityAdmin` and `Routing`. Changing this forces a new Network Manager Deployment to be created. ScopeAccess pulumi.StringInput // A mapping of key values pairs that can be used to keep the deployment up with the Network Manager configurations and rules. Triggers pulumi.StringMapInput } func (NetworkManagerDeploymentArgs) ElementType() reflect.Type { return reflect.TypeOf((*networkManagerDeploymentArgs)(nil)).Elem() } type NetworkManagerDeploymentInput interface { pulumi.Input ToNetworkManagerDeploymentOutput() NetworkManagerDeploymentOutput ToNetworkManagerDeploymentOutputWithContext(ctx context.Context) NetworkManagerDeploymentOutput } func (*NetworkManagerDeployment) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerDeployment)(nil)).Elem() } func (i *NetworkManagerDeployment) ToNetworkManagerDeploymentOutput() NetworkManagerDeploymentOutput { return i.ToNetworkManagerDeploymentOutputWithContext(context.Background()) } func (i *NetworkManagerDeployment) ToNetworkManagerDeploymentOutputWithContext(ctx context.Context) NetworkManagerDeploymentOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerDeploymentOutput) } // NetworkManagerDeploymentArrayInput is an input type that accepts NetworkManagerDeploymentArray and NetworkManagerDeploymentArrayOutput values. // You can construct a concrete instance of `NetworkManagerDeploymentArrayInput` via: // // NetworkManagerDeploymentArray{ NetworkManagerDeploymentArgs{...} } type NetworkManagerDeploymentArrayInput interface { pulumi.Input ToNetworkManagerDeploymentArrayOutput() NetworkManagerDeploymentArrayOutput ToNetworkManagerDeploymentArrayOutputWithContext(context.Context) NetworkManagerDeploymentArrayOutput } type NetworkManagerDeploymentArray []NetworkManagerDeploymentInput func (NetworkManagerDeploymentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerDeployment)(nil)).Elem() } func (i NetworkManagerDeploymentArray) ToNetworkManagerDeploymentArrayOutput() NetworkManagerDeploymentArrayOutput { return i.ToNetworkManagerDeploymentArrayOutputWithContext(context.Background()) } func (i NetworkManagerDeploymentArray) ToNetworkManagerDeploymentArrayOutputWithContext(ctx context.Context) NetworkManagerDeploymentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerDeploymentArrayOutput) } // NetworkManagerDeploymentMapInput is an input type that accepts NetworkManagerDeploymentMap and NetworkManagerDeploymentMapOutput values. // You can construct a concrete instance of `NetworkManagerDeploymentMapInput` via: // // NetworkManagerDeploymentMap{ "key": NetworkManagerDeploymentArgs{...} } type NetworkManagerDeploymentMapInput interface { pulumi.Input ToNetworkManagerDeploymentMapOutput() NetworkManagerDeploymentMapOutput ToNetworkManagerDeploymentMapOutputWithContext(context.Context) NetworkManagerDeploymentMapOutput } type NetworkManagerDeploymentMap map[string]NetworkManagerDeploymentInput func (NetworkManagerDeploymentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerDeployment)(nil)).Elem() } func (i NetworkManagerDeploymentMap) ToNetworkManagerDeploymentMapOutput() NetworkManagerDeploymentMapOutput { return i.ToNetworkManagerDeploymentMapOutputWithContext(context.Background()) } func (i NetworkManagerDeploymentMap) ToNetworkManagerDeploymentMapOutputWithContext(ctx context.Context) NetworkManagerDeploymentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(NetworkManagerDeploymentMapOutput) } type NetworkManagerDeploymentOutput struct{ *pulumi.OutputState } func (NetworkManagerDeploymentOutput) ElementType() reflect.Type { return reflect.TypeOf((**NetworkManagerDeployment)(nil)).Elem() } func (o NetworkManagerDeploymentOutput) ToNetworkManagerDeploymentOutput() NetworkManagerDeploymentOutput { return o } func (o NetworkManagerDeploymentOutput) ToNetworkManagerDeploymentOutputWithContext(ctx context.Context) NetworkManagerDeploymentOutput { return o } // A list of Network Manager Configuration IDs which should be aligned with `scopeAccess`. func (o NetworkManagerDeploymentOutput) ConfigurationIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *NetworkManagerDeployment) pulumi.StringArrayOutput { return v.ConfigurationIds }).(pulumi.StringArrayOutput) } // Specifies the location which the configurations will be deployed to. Changing this forces a new Network Manager Deployment to be created. func (o NetworkManagerDeploymentOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerDeployment) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the ID of the Network Manager. Changing this forces a new Network Manager Deployment to be created. func (o NetworkManagerDeploymentOutput) NetworkManagerId() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerDeployment) pulumi.StringOutput { return v.NetworkManagerId }).(pulumi.StringOutput) } // Specifies the configuration deployment type. Possible values are `Connectivity`, `SecurityAdmin` and `Routing`. Changing this forces a new Network Manager Deployment to be created. func (o NetworkManagerDeploymentOutput) ScopeAccess() pulumi.StringOutput { return o.ApplyT(func(v *NetworkManagerDeployment) pulumi.StringOutput { return v.ScopeAccess }).(pulumi.StringOutput) } // A mapping of key values pairs that can be used to keep the deployment up with the Network Manager configurations and rules. func (o NetworkManagerDeploymentOutput) Triggers() pulumi.StringMapOutput { return o.ApplyT(func(v *NetworkManagerDeployment) pulumi.StringMapOutput { return v.Triggers }).(pulumi.StringMapOutput) } type NetworkManagerDeploymentArrayOutput struct{ *pulumi.OutputState } func (NetworkManagerDeploymentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*NetworkManagerDeployment)(nil)).Elem() } func (o NetworkManagerDeploymentArrayOutput) ToNetworkManagerDeploymentArrayOutput() NetworkManagerDeploymentArrayOutput { return o } func (o NetworkManagerDeploymentArrayOutput) ToNetworkManagerDeploymentArrayOutputWithContext(ctx context.Context) NetworkManagerDeploymentArrayOutput { return o } func (o NetworkManagerDeploymentArrayOutput) Index(i pulumi.IntInput) NetworkManagerDeploymentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NetworkManagerDeployment { return vs[0].([]*NetworkManagerDeployment)[vs[1].(int)] }).(NetworkManagerDeploymentOutput) } type NetworkManagerDeploymentMapOutput struct{ *pulumi.OutputState } func (NetworkManagerDeploymentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*NetworkManagerDeployment)(nil)).Elem() } func (o NetworkManagerDeploymentMapOutput) ToNetworkManagerDeploymentMapOutput() NetworkManagerDeploymentMapOutput { return o } func (o NetworkManagerDeploymentMapOutput) ToNetworkManagerDeploymentMapOutputWithContext(ctx context.Context) NetworkManagerDeploymentMapOutput { return o } func (o NetworkManagerDeploymentMapOutput) MapIndex(k pulumi.StringInput) NetworkManagerDeploymentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NetworkManagerDeployment { return vs[0].(map[string]*NetworkManagerDeployment)[vs[1].(string)] }).(NetworkManagerDeploymentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerDeploymentInput)(nil)).Elem(), &NetworkManagerDeployment{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerDeploymentArrayInput)(nil)).Elem(), NetworkManagerDeploymentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*NetworkManagerDeploymentMapInput)(nil)).Elem(), NetworkManagerDeploymentMap{}) pulumi.RegisterOutputType(NetworkManagerDeploymentOutput{}) pulumi.RegisterOutputType(NetworkManagerDeploymentArrayOutput{}) pulumi.RegisterOutputType(NetworkManagerDeploymentMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/expressRoutePortAuthorization.go
sdk/go/azure/network/expressRoutePortAuthorization.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an ExpressRoute Port Authorization. // // ## 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/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("exprtTest"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleExpressRoutePort, err := network.NewExpressRoutePort(ctx, "example", &network.ExpressRoutePortArgs{ // Name: pulumi.String("port1"), // ResourceGroupName: example.Name, // Location: example.Location, // PeeringLocation: pulumi.String("Airtel-Chennai-CLS"), // BandwidthInGbps: pulumi.Int(10), // Encapsulation: pulumi.String("Dot1Q"), // }) // if err != nil { // return err // } // _, err = network.NewExpressRoutePortAuthorization(ctx, "example", &network.ExpressRoutePortAuthorizationArgs{ // Name: pulumi.String("exampleERCAuth"), // ExpressRoutePortName: exampleExpressRoutePort.Name, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Network` - 2025-01-01 // // ## Import // // ExpressRoute Port Authorizations can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/expressRoutePortAuthorization:ExpressRoutePortAuthorization auth1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/expressRoutePorts/myExpressPort/authorizations/auth1 // ``` type ExpressRoutePortAuthorization struct { pulumi.CustomResourceState // The Authorization Key. AuthorizationKey pulumi.StringOutput `pulumi:"authorizationKey"` // The authorization use status. AuthorizationUseStatus pulumi.StringOutput `pulumi:"authorizationUseStatus"` // The name of the Express Route Port in which to create the Authorization. Changing this forces a new resource to be created. ExpressRoutePortName pulumi.StringOutput `pulumi:"expressRoutePortName"` // The name of the ExpressRoute Port. 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 ExpressRoute Port. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` } // NewExpressRoutePortAuthorization registers a new resource with the given unique name, arguments, and options. func NewExpressRoutePortAuthorization(ctx *pulumi.Context, name string, args *ExpressRoutePortAuthorizationArgs, opts ...pulumi.ResourceOption) (*ExpressRoutePortAuthorization, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ExpressRoutePortName == nil { return nil, errors.New("invalid value for required argument 'ExpressRoutePortName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } secrets := pulumi.AdditionalSecretOutputs([]string{ "authorizationKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource ExpressRoutePortAuthorization err := ctx.RegisterResource("azure:network/expressRoutePortAuthorization:ExpressRoutePortAuthorization", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetExpressRoutePortAuthorization gets an existing ExpressRoutePortAuthorization 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 GetExpressRoutePortAuthorization(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ExpressRoutePortAuthorizationState, opts ...pulumi.ResourceOption) (*ExpressRoutePortAuthorization, error) { var resource ExpressRoutePortAuthorization err := ctx.ReadResource("azure:network/expressRoutePortAuthorization:ExpressRoutePortAuthorization", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ExpressRoutePortAuthorization resources. type expressRoutePortAuthorizationState struct { // The Authorization Key. AuthorizationKey *string `pulumi:"authorizationKey"` // The authorization use status. AuthorizationUseStatus *string `pulumi:"authorizationUseStatus"` // The name of the Express Route Port in which to create the Authorization. Changing this forces a new resource to be created. ExpressRoutePortName *string `pulumi:"expressRoutePortName"` // The name of the ExpressRoute Port. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the ExpressRoute Port. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` } type ExpressRoutePortAuthorizationState struct { // The Authorization Key. AuthorizationKey pulumi.StringPtrInput // The authorization use status. AuthorizationUseStatus pulumi.StringPtrInput // The name of the Express Route Port in which to create the Authorization. Changing this forces a new resource to be created. ExpressRoutePortName pulumi.StringPtrInput // The name of the ExpressRoute Port. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the ExpressRoute Port. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput } func (ExpressRoutePortAuthorizationState) ElementType() reflect.Type { return reflect.TypeOf((*expressRoutePortAuthorizationState)(nil)).Elem() } type expressRoutePortAuthorizationArgs struct { // The name of the Express Route Port in which to create the Authorization. Changing this forces a new resource to be created. ExpressRoutePortName string `pulumi:"expressRoutePortName"` // The name of the ExpressRoute Port. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the ExpressRoute Port. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` } // The set of arguments for constructing a ExpressRoutePortAuthorization resource. type ExpressRoutePortAuthorizationArgs struct { // The name of the Express Route Port in which to create the Authorization. Changing this forces a new resource to be created. ExpressRoutePortName pulumi.StringInput // The name of the ExpressRoute Port. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the ExpressRoute Port. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput } func (ExpressRoutePortAuthorizationArgs) ElementType() reflect.Type { return reflect.TypeOf((*expressRoutePortAuthorizationArgs)(nil)).Elem() } type ExpressRoutePortAuthorizationInput interface { pulumi.Input ToExpressRoutePortAuthorizationOutput() ExpressRoutePortAuthorizationOutput ToExpressRoutePortAuthorizationOutputWithContext(ctx context.Context) ExpressRoutePortAuthorizationOutput } func (*ExpressRoutePortAuthorization) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRoutePortAuthorization)(nil)).Elem() } func (i *ExpressRoutePortAuthorization) ToExpressRoutePortAuthorizationOutput() ExpressRoutePortAuthorizationOutput { return i.ToExpressRoutePortAuthorizationOutputWithContext(context.Background()) } func (i *ExpressRoutePortAuthorization) ToExpressRoutePortAuthorizationOutputWithContext(ctx context.Context) ExpressRoutePortAuthorizationOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRoutePortAuthorizationOutput) } // ExpressRoutePortAuthorizationArrayInput is an input type that accepts ExpressRoutePortAuthorizationArray and ExpressRoutePortAuthorizationArrayOutput values. // You can construct a concrete instance of `ExpressRoutePortAuthorizationArrayInput` via: // // ExpressRoutePortAuthorizationArray{ ExpressRoutePortAuthorizationArgs{...} } type ExpressRoutePortAuthorizationArrayInput interface { pulumi.Input ToExpressRoutePortAuthorizationArrayOutput() ExpressRoutePortAuthorizationArrayOutput ToExpressRoutePortAuthorizationArrayOutputWithContext(context.Context) ExpressRoutePortAuthorizationArrayOutput } type ExpressRoutePortAuthorizationArray []ExpressRoutePortAuthorizationInput func (ExpressRoutePortAuthorizationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRoutePortAuthorization)(nil)).Elem() } func (i ExpressRoutePortAuthorizationArray) ToExpressRoutePortAuthorizationArrayOutput() ExpressRoutePortAuthorizationArrayOutput { return i.ToExpressRoutePortAuthorizationArrayOutputWithContext(context.Background()) } func (i ExpressRoutePortAuthorizationArray) ToExpressRoutePortAuthorizationArrayOutputWithContext(ctx context.Context) ExpressRoutePortAuthorizationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRoutePortAuthorizationArrayOutput) } // ExpressRoutePortAuthorizationMapInput is an input type that accepts ExpressRoutePortAuthorizationMap and ExpressRoutePortAuthorizationMapOutput values. // You can construct a concrete instance of `ExpressRoutePortAuthorizationMapInput` via: // // ExpressRoutePortAuthorizationMap{ "key": ExpressRoutePortAuthorizationArgs{...} } type ExpressRoutePortAuthorizationMapInput interface { pulumi.Input ToExpressRoutePortAuthorizationMapOutput() ExpressRoutePortAuthorizationMapOutput ToExpressRoutePortAuthorizationMapOutputWithContext(context.Context) ExpressRoutePortAuthorizationMapOutput } type ExpressRoutePortAuthorizationMap map[string]ExpressRoutePortAuthorizationInput func (ExpressRoutePortAuthorizationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRoutePortAuthorization)(nil)).Elem() } func (i ExpressRoutePortAuthorizationMap) ToExpressRoutePortAuthorizationMapOutput() ExpressRoutePortAuthorizationMapOutput { return i.ToExpressRoutePortAuthorizationMapOutputWithContext(context.Background()) } func (i ExpressRoutePortAuthorizationMap) ToExpressRoutePortAuthorizationMapOutputWithContext(ctx context.Context) ExpressRoutePortAuthorizationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ExpressRoutePortAuthorizationMapOutput) } type ExpressRoutePortAuthorizationOutput struct{ *pulumi.OutputState } func (ExpressRoutePortAuthorizationOutput) ElementType() reflect.Type { return reflect.TypeOf((**ExpressRoutePortAuthorization)(nil)).Elem() } func (o ExpressRoutePortAuthorizationOutput) ToExpressRoutePortAuthorizationOutput() ExpressRoutePortAuthorizationOutput { return o } func (o ExpressRoutePortAuthorizationOutput) ToExpressRoutePortAuthorizationOutputWithContext(ctx context.Context) ExpressRoutePortAuthorizationOutput { return o } // The Authorization Key. func (o ExpressRoutePortAuthorizationOutput) AuthorizationKey() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRoutePortAuthorization) pulumi.StringOutput { return v.AuthorizationKey }).(pulumi.StringOutput) } // The authorization use status. func (o ExpressRoutePortAuthorizationOutput) AuthorizationUseStatus() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRoutePortAuthorization) pulumi.StringOutput { return v.AuthorizationUseStatus }).(pulumi.StringOutput) } // The name of the Express Route Port in which to create the Authorization. Changing this forces a new resource to be created. func (o ExpressRoutePortAuthorizationOutput) ExpressRoutePortName() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRoutePortAuthorization) pulumi.StringOutput { return v.ExpressRoutePortName }).(pulumi.StringOutput) } // The name of the ExpressRoute Port. Changing this forces a new resource to be created. func (o ExpressRoutePortAuthorizationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRoutePortAuthorization) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the ExpressRoute Port. Changing this forces a new resource to be created. func (o ExpressRoutePortAuthorizationOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ExpressRoutePortAuthorization) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } type ExpressRoutePortAuthorizationArrayOutput struct{ *pulumi.OutputState } func (ExpressRoutePortAuthorizationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ExpressRoutePortAuthorization)(nil)).Elem() } func (o ExpressRoutePortAuthorizationArrayOutput) ToExpressRoutePortAuthorizationArrayOutput() ExpressRoutePortAuthorizationArrayOutput { return o } func (o ExpressRoutePortAuthorizationArrayOutput) ToExpressRoutePortAuthorizationArrayOutputWithContext(ctx context.Context) ExpressRoutePortAuthorizationArrayOutput { return o } func (o ExpressRoutePortAuthorizationArrayOutput) Index(i pulumi.IntInput) ExpressRoutePortAuthorizationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ExpressRoutePortAuthorization { return vs[0].([]*ExpressRoutePortAuthorization)[vs[1].(int)] }).(ExpressRoutePortAuthorizationOutput) } type ExpressRoutePortAuthorizationMapOutput struct{ *pulumi.OutputState } func (ExpressRoutePortAuthorizationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ExpressRoutePortAuthorization)(nil)).Elem() } func (o ExpressRoutePortAuthorizationMapOutput) ToExpressRoutePortAuthorizationMapOutput() ExpressRoutePortAuthorizationMapOutput { return o } func (o ExpressRoutePortAuthorizationMapOutput) ToExpressRoutePortAuthorizationMapOutputWithContext(ctx context.Context) ExpressRoutePortAuthorizationMapOutput { return o } func (o ExpressRoutePortAuthorizationMapOutput) MapIndex(k pulumi.StringInput) ExpressRoutePortAuthorizationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ExpressRoutePortAuthorization { return vs[0].(map[string]*ExpressRoutePortAuthorization)[vs[1].(string)] }).(ExpressRoutePortAuthorizationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ExpressRoutePortAuthorizationInput)(nil)).Elem(), &ExpressRoutePortAuthorization{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRoutePortAuthorizationArrayInput)(nil)).Elem(), ExpressRoutePortAuthorizationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ExpressRoutePortAuthorizationMapInput)(nil)).Elem(), ExpressRoutePortAuthorizationMap{}) pulumi.RegisterOutputType(ExpressRoutePortAuthorizationOutput{}) pulumi.RegisterOutputType(ExpressRoutePortAuthorizationArrayOutput{}) pulumi.RegisterOutputType(ExpressRoutePortAuthorizationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/network/applicationSecurityGroup.go
sdk/go/azure/network/applicationSecurityGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package network import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Application Security 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/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("tf-test"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _, err = network.NewApplicationSecurityGroup(ctx, "example", &network.ApplicationSecurityGroupArgs{ // Name: pulumi.String("tf-appsecuritygroup"), // Location: example.Location, // ResourceGroupName: example.Name, // Tags: pulumi.StringMap{ // "Hello": pulumi.String("World"), // }, // }) // 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 // // Application Security Groups can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:network/applicationSecurityGroup:ApplicationSecurityGroup securitygroup1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/applicationSecurityGroups/securitygroup1 // ``` type ApplicationSecurityGroup struct { pulumi.CustomResourceState // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of the Application Security Group. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group in which to create the Application Security Group. 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"` } // NewApplicationSecurityGroup registers a new resource with the given unique name, arguments, and options. func NewApplicationSecurityGroup(ctx *pulumi.Context, name string, args *ApplicationSecurityGroupArgs, opts ...pulumi.ResourceOption) (*ApplicationSecurityGroup, 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 ApplicationSecurityGroup err := ctx.RegisterResource("azure:network/applicationSecurityGroup:ApplicationSecurityGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetApplicationSecurityGroup gets an existing ApplicationSecurityGroup 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 GetApplicationSecurityGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ApplicationSecurityGroupState, opts ...pulumi.ResourceOption) (*ApplicationSecurityGroup, error) { var resource ApplicationSecurityGroup err := ctx.ReadResource("azure:network/applicationSecurityGroup:ApplicationSecurityGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ApplicationSecurityGroup resources. type applicationSecurityGroupState struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Application Security Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Application Security Group. 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 ApplicationSecurityGroupState struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Application Security Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Application Security Group. 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 (ApplicationSecurityGroupState) ElementType() reflect.Type { return reflect.TypeOf((*applicationSecurityGroupState)(nil)).Elem() } type applicationSecurityGroupArgs struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of the Application Security Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group in which to create the Application Security Group. 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 ApplicationSecurityGroup resource. type ApplicationSecurityGroupArgs struct { // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of the Application Security Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group in which to create the Application Security Group. 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 (ApplicationSecurityGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*applicationSecurityGroupArgs)(nil)).Elem() } type ApplicationSecurityGroupInput interface { pulumi.Input ToApplicationSecurityGroupOutput() ApplicationSecurityGroupOutput ToApplicationSecurityGroupOutputWithContext(ctx context.Context) ApplicationSecurityGroupOutput } func (*ApplicationSecurityGroup) ElementType() reflect.Type { return reflect.TypeOf((**ApplicationSecurityGroup)(nil)).Elem() } func (i *ApplicationSecurityGroup) ToApplicationSecurityGroupOutput() ApplicationSecurityGroupOutput { return i.ToApplicationSecurityGroupOutputWithContext(context.Background()) } func (i *ApplicationSecurityGroup) ToApplicationSecurityGroupOutputWithContext(ctx context.Context) ApplicationSecurityGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationSecurityGroupOutput) } // ApplicationSecurityGroupArrayInput is an input type that accepts ApplicationSecurityGroupArray and ApplicationSecurityGroupArrayOutput values. // You can construct a concrete instance of `ApplicationSecurityGroupArrayInput` via: // // ApplicationSecurityGroupArray{ ApplicationSecurityGroupArgs{...} } type ApplicationSecurityGroupArrayInput interface { pulumi.Input ToApplicationSecurityGroupArrayOutput() ApplicationSecurityGroupArrayOutput ToApplicationSecurityGroupArrayOutputWithContext(context.Context) ApplicationSecurityGroupArrayOutput } type ApplicationSecurityGroupArray []ApplicationSecurityGroupInput func (ApplicationSecurityGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ApplicationSecurityGroup)(nil)).Elem() } func (i ApplicationSecurityGroupArray) ToApplicationSecurityGroupArrayOutput() ApplicationSecurityGroupArrayOutput { return i.ToApplicationSecurityGroupArrayOutputWithContext(context.Background()) } func (i ApplicationSecurityGroupArray) ToApplicationSecurityGroupArrayOutputWithContext(ctx context.Context) ApplicationSecurityGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationSecurityGroupArrayOutput) } // ApplicationSecurityGroupMapInput is an input type that accepts ApplicationSecurityGroupMap and ApplicationSecurityGroupMapOutput values. // You can construct a concrete instance of `ApplicationSecurityGroupMapInput` via: // // ApplicationSecurityGroupMap{ "key": ApplicationSecurityGroupArgs{...} } type ApplicationSecurityGroupMapInput interface { pulumi.Input ToApplicationSecurityGroupMapOutput() ApplicationSecurityGroupMapOutput ToApplicationSecurityGroupMapOutputWithContext(context.Context) ApplicationSecurityGroupMapOutput } type ApplicationSecurityGroupMap map[string]ApplicationSecurityGroupInput func (ApplicationSecurityGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ApplicationSecurityGroup)(nil)).Elem() } func (i ApplicationSecurityGroupMap) ToApplicationSecurityGroupMapOutput() ApplicationSecurityGroupMapOutput { return i.ToApplicationSecurityGroupMapOutputWithContext(context.Background()) } func (i ApplicationSecurityGroupMap) ToApplicationSecurityGroupMapOutputWithContext(ctx context.Context) ApplicationSecurityGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationSecurityGroupMapOutput) } type ApplicationSecurityGroupOutput struct{ *pulumi.OutputState } func (ApplicationSecurityGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**ApplicationSecurityGroup)(nil)).Elem() } func (o ApplicationSecurityGroupOutput) ToApplicationSecurityGroupOutput() ApplicationSecurityGroupOutput { return o } func (o ApplicationSecurityGroupOutput) ToApplicationSecurityGroupOutputWithContext(ctx context.Context) ApplicationSecurityGroupOutput { return o } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o ApplicationSecurityGroupOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ApplicationSecurityGroup) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of the Application Security Group. Changing this forces a new resource to be created. func (o ApplicationSecurityGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ApplicationSecurityGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group in which to create the Application Security Group. Changing this forces a new resource to be created. func (o ApplicationSecurityGroupOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ApplicationSecurityGroup) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o ApplicationSecurityGroupOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ApplicationSecurityGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type ApplicationSecurityGroupArrayOutput struct{ *pulumi.OutputState } func (ApplicationSecurityGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ApplicationSecurityGroup)(nil)).Elem() } func (o ApplicationSecurityGroupArrayOutput) ToApplicationSecurityGroupArrayOutput() ApplicationSecurityGroupArrayOutput { return o } func (o ApplicationSecurityGroupArrayOutput) ToApplicationSecurityGroupArrayOutputWithContext(ctx context.Context) ApplicationSecurityGroupArrayOutput { return o } func (o ApplicationSecurityGroupArrayOutput) Index(i pulumi.IntInput) ApplicationSecurityGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApplicationSecurityGroup { return vs[0].([]*ApplicationSecurityGroup)[vs[1].(int)] }).(ApplicationSecurityGroupOutput) } type ApplicationSecurityGroupMapOutput struct{ *pulumi.OutputState } func (ApplicationSecurityGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ApplicationSecurityGroup)(nil)).Elem() } func (o ApplicationSecurityGroupMapOutput) ToApplicationSecurityGroupMapOutput() ApplicationSecurityGroupMapOutput { return o } func (o ApplicationSecurityGroupMapOutput) ToApplicationSecurityGroupMapOutputWithContext(ctx context.Context) ApplicationSecurityGroupMapOutput { return o } func (o ApplicationSecurityGroupMapOutput) MapIndex(k pulumi.StringInput) ApplicationSecurityGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApplicationSecurityGroup { return vs[0].(map[string]*ApplicationSecurityGroup)[vs[1].(string)] }).(ApplicationSecurityGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ApplicationSecurityGroupInput)(nil)).Elem(), &ApplicationSecurityGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*ApplicationSecurityGroupArrayInput)(nil)).Elem(), ApplicationSecurityGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ApplicationSecurityGroupMapInput)(nil)).Elem(), ApplicationSecurityGroupMap{}) pulumi.RegisterOutputType(ApplicationSecurityGroupOutput{}) pulumi.RegisterOutputType(ApplicationSecurityGroupArrayOutput{}) pulumi.RegisterOutputType(ApplicationSecurityGroupMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/costmanagement/init.go
sdk/go/azure/costmanagement/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 costmanagement 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:costmanagement/anomalyAlert:AnomalyAlert": r = &AnomalyAlert{} case "azure:costmanagement/scheduledAction:ScheduledAction": r = &ScheduledAction{} 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", "costmanagement/anomalyAlert", &module{version}, ) pulumi.RegisterResourceModule( "azure", "costmanagement/scheduledAction", &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/costmanagement/anomalyAlert.go
sdk/go/azure/costmanagement/anomalyAlert.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package costmanagement import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Cost Anomaly Alert. // // > **Note:** Anomaly alerts are sent based on the current access of the rule creator at the time that the email is sent. Learn more [here](https://learn.microsoft.com/en-us/azure/cost-management-billing/understand/analyze-unexpected-charges#create-an-anomaly-alert). // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/costmanagement" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := costmanagement.NewAnomalyAlert(ctx, "example", &costmanagement.AnomalyAlertArgs{ // Name: pulumi.String("alertname"), // DisplayName: pulumi.String("Alert DisplayName"), // SubscriptionId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000"), // EmailSubject: pulumi.String("My Test Anomaly Alert"), // EmailAddresses: pulumi.StringArray{ // pulumi.String("example@test.net"), // }, // }) // 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.CostManagement` - 2023-08-01 // // ## Import // // Cost Anomaly Alerts can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:costmanagement/anomalyAlert:AnomalyAlert example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/dailyanomalybyresourcegroup // ``` type AnomalyAlert struct { pulumi.CustomResourceState // The display name which should be used for this Cost Anomaly Alert. DisplayName pulumi.StringOutput `pulumi:"displayName"` // Specifies a list of email addresses which the Anomaly Alerts are send to. EmailAddresses pulumi.StringArrayOutput `pulumi:"emailAddresses"` // The email subject of the Cost Anomaly Alerts. Maximum length of the subject is 70. EmailSubject pulumi.StringOutput `pulumi:"emailSubject"` // The message of the Cost Anomaly Alert. Maximum length of the message is 250. Message pulumi.StringPtrOutput `pulumi:"message"` // The name which should be used for this Cost Anomaly Alert. Changing this forces a new resource to be created. The name can contain only lowercase letters, numbers and hyphens. Name pulumi.StringOutput `pulumi:"name"` // The email address of the point of contact that should get the unsubscribe requests and notification emails. NotificationEmail pulumi.StringOutput `pulumi:"notificationEmail"` // The ID of the Subscription this Cost Anomaly Alert is scoped to. Changing this forces a new resource to be created. When not supplied this defaults to the subscription configured in the provider. SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"` } // NewAnomalyAlert registers a new resource with the given unique name, arguments, and options. func NewAnomalyAlert(ctx *pulumi.Context, name string, args *AnomalyAlertArgs, opts ...pulumi.ResourceOption) (*AnomalyAlert, 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.EmailAddresses == nil { return nil, errors.New("invalid value for required argument 'EmailAddresses'") } if args.EmailSubject == nil { return nil, errors.New("invalid value for required argument 'EmailSubject'") } opts = internal.PkgResourceDefaultOpts(opts) var resource AnomalyAlert err := ctx.RegisterResource("azure:costmanagement/anomalyAlert:AnomalyAlert", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetAnomalyAlert gets an existing AnomalyAlert 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 GetAnomalyAlert(ctx *pulumi.Context, name string, id pulumi.IDInput, state *AnomalyAlertState, opts ...pulumi.ResourceOption) (*AnomalyAlert, error) { var resource AnomalyAlert err := ctx.ReadResource("azure:costmanagement/anomalyAlert:AnomalyAlert", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering AnomalyAlert resources. type anomalyAlertState struct { // The display name which should be used for this Cost Anomaly Alert. DisplayName *string `pulumi:"displayName"` // Specifies a list of email addresses which the Anomaly Alerts are send to. EmailAddresses []string `pulumi:"emailAddresses"` // The email subject of the Cost Anomaly Alerts. Maximum length of the subject is 70. EmailSubject *string `pulumi:"emailSubject"` // The message of the Cost Anomaly Alert. Maximum length of the message is 250. Message *string `pulumi:"message"` // The name which should be used for this Cost Anomaly Alert. Changing this forces a new resource to be created. The name can contain only lowercase letters, numbers and hyphens. Name *string `pulumi:"name"` // The email address of the point of contact that should get the unsubscribe requests and notification emails. NotificationEmail *string `pulumi:"notificationEmail"` // The ID of the Subscription this Cost Anomaly Alert is scoped to. Changing this forces a new resource to be created. When not supplied this defaults to the subscription configured in the provider. SubscriptionId *string `pulumi:"subscriptionId"` } type AnomalyAlertState struct { // The display name which should be used for this Cost Anomaly Alert. DisplayName pulumi.StringPtrInput // Specifies a list of email addresses which the Anomaly Alerts are send to. EmailAddresses pulumi.StringArrayInput // The email subject of the Cost Anomaly Alerts. Maximum length of the subject is 70. EmailSubject pulumi.StringPtrInput // The message of the Cost Anomaly Alert. Maximum length of the message is 250. Message pulumi.StringPtrInput // The name which should be used for this Cost Anomaly Alert. Changing this forces a new resource to be created. The name can contain only lowercase letters, numbers and hyphens. Name pulumi.StringPtrInput // The email address of the point of contact that should get the unsubscribe requests and notification emails. NotificationEmail pulumi.StringPtrInput // The ID of the Subscription this Cost Anomaly Alert is scoped to. Changing this forces a new resource to be created. When not supplied this defaults to the subscription configured in the provider. SubscriptionId pulumi.StringPtrInput } func (AnomalyAlertState) ElementType() reflect.Type { return reflect.TypeOf((*anomalyAlertState)(nil)).Elem() } type anomalyAlertArgs struct { // The display name which should be used for this Cost Anomaly Alert. DisplayName string `pulumi:"displayName"` // Specifies a list of email addresses which the Anomaly Alerts are send to. EmailAddresses []string `pulumi:"emailAddresses"` // The email subject of the Cost Anomaly Alerts. Maximum length of the subject is 70. EmailSubject string `pulumi:"emailSubject"` // The message of the Cost Anomaly Alert. Maximum length of the message is 250. Message *string `pulumi:"message"` // The name which should be used for this Cost Anomaly Alert. Changing this forces a new resource to be created. The name can contain only lowercase letters, numbers and hyphens. Name *string `pulumi:"name"` // The email address of the point of contact that should get the unsubscribe requests and notification emails. NotificationEmail *string `pulumi:"notificationEmail"` // The ID of the Subscription this Cost Anomaly Alert is scoped to. Changing this forces a new resource to be created. When not supplied this defaults to the subscription configured in the provider. SubscriptionId *string `pulumi:"subscriptionId"` } // The set of arguments for constructing a AnomalyAlert resource. type AnomalyAlertArgs struct { // The display name which should be used for this Cost Anomaly Alert. DisplayName pulumi.StringInput // Specifies a list of email addresses which the Anomaly Alerts are send to. EmailAddresses pulumi.StringArrayInput // The email subject of the Cost Anomaly Alerts. Maximum length of the subject is 70. EmailSubject pulumi.StringInput // The message of the Cost Anomaly Alert. Maximum length of the message is 250. Message pulumi.StringPtrInput // The name which should be used for this Cost Anomaly Alert. Changing this forces a new resource to be created. The name can contain only lowercase letters, numbers and hyphens. Name pulumi.StringPtrInput // The email address of the point of contact that should get the unsubscribe requests and notification emails. NotificationEmail pulumi.StringPtrInput // The ID of the Subscription this Cost Anomaly Alert is scoped to. Changing this forces a new resource to be created. When not supplied this defaults to the subscription configured in the provider. SubscriptionId pulumi.StringPtrInput } func (AnomalyAlertArgs) ElementType() reflect.Type { return reflect.TypeOf((*anomalyAlertArgs)(nil)).Elem() } type AnomalyAlertInput interface { pulumi.Input ToAnomalyAlertOutput() AnomalyAlertOutput ToAnomalyAlertOutputWithContext(ctx context.Context) AnomalyAlertOutput } func (*AnomalyAlert) ElementType() reflect.Type { return reflect.TypeOf((**AnomalyAlert)(nil)).Elem() } func (i *AnomalyAlert) ToAnomalyAlertOutput() AnomalyAlertOutput { return i.ToAnomalyAlertOutputWithContext(context.Background()) } func (i *AnomalyAlert) ToAnomalyAlertOutputWithContext(ctx context.Context) AnomalyAlertOutput { return pulumi.ToOutputWithContext(ctx, i).(AnomalyAlertOutput) } // AnomalyAlertArrayInput is an input type that accepts AnomalyAlertArray and AnomalyAlertArrayOutput values. // You can construct a concrete instance of `AnomalyAlertArrayInput` via: // // AnomalyAlertArray{ AnomalyAlertArgs{...} } type AnomalyAlertArrayInput interface { pulumi.Input ToAnomalyAlertArrayOutput() AnomalyAlertArrayOutput ToAnomalyAlertArrayOutputWithContext(context.Context) AnomalyAlertArrayOutput } type AnomalyAlertArray []AnomalyAlertInput func (AnomalyAlertArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*AnomalyAlert)(nil)).Elem() } func (i AnomalyAlertArray) ToAnomalyAlertArrayOutput() AnomalyAlertArrayOutput { return i.ToAnomalyAlertArrayOutputWithContext(context.Background()) } func (i AnomalyAlertArray) ToAnomalyAlertArrayOutputWithContext(ctx context.Context) AnomalyAlertArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(AnomalyAlertArrayOutput) } // AnomalyAlertMapInput is an input type that accepts AnomalyAlertMap and AnomalyAlertMapOutput values. // You can construct a concrete instance of `AnomalyAlertMapInput` via: // // AnomalyAlertMap{ "key": AnomalyAlertArgs{...} } type AnomalyAlertMapInput interface { pulumi.Input ToAnomalyAlertMapOutput() AnomalyAlertMapOutput ToAnomalyAlertMapOutputWithContext(context.Context) AnomalyAlertMapOutput } type AnomalyAlertMap map[string]AnomalyAlertInput func (AnomalyAlertMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AnomalyAlert)(nil)).Elem() } func (i AnomalyAlertMap) ToAnomalyAlertMapOutput() AnomalyAlertMapOutput { return i.ToAnomalyAlertMapOutputWithContext(context.Background()) } func (i AnomalyAlertMap) ToAnomalyAlertMapOutputWithContext(ctx context.Context) AnomalyAlertMapOutput { return pulumi.ToOutputWithContext(ctx, i).(AnomalyAlertMapOutput) } type AnomalyAlertOutput struct{ *pulumi.OutputState } func (AnomalyAlertOutput) ElementType() reflect.Type { return reflect.TypeOf((**AnomalyAlert)(nil)).Elem() } func (o AnomalyAlertOutput) ToAnomalyAlertOutput() AnomalyAlertOutput { return o } func (o AnomalyAlertOutput) ToAnomalyAlertOutputWithContext(ctx context.Context) AnomalyAlertOutput { return o } // The display name which should be used for this Cost Anomaly Alert. func (o AnomalyAlertOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *AnomalyAlert) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // Specifies a list of email addresses which the Anomaly Alerts are send to. func (o AnomalyAlertOutput) EmailAddresses() pulumi.StringArrayOutput { return o.ApplyT(func(v *AnomalyAlert) pulumi.StringArrayOutput { return v.EmailAddresses }).(pulumi.StringArrayOutput) } // The email subject of the Cost Anomaly Alerts. Maximum length of the subject is 70. func (o AnomalyAlertOutput) EmailSubject() pulumi.StringOutput { return o.ApplyT(func(v *AnomalyAlert) pulumi.StringOutput { return v.EmailSubject }).(pulumi.StringOutput) } // The message of the Cost Anomaly Alert. Maximum length of the message is 250. func (o AnomalyAlertOutput) Message() pulumi.StringPtrOutput { return o.ApplyT(func(v *AnomalyAlert) pulumi.StringPtrOutput { return v.Message }).(pulumi.StringPtrOutput) } // The name which should be used for this Cost Anomaly Alert. Changing this forces a new resource to be created. The name can contain only lowercase letters, numbers and hyphens. func (o AnomalyAlertOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *AnomalyAlert) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The email address of the point of contact that should get the unsubscribe requests and notification emails. func (o AnomalyAlertOutput) NotificationEmail() pulumi.StringOutput { return o.ApplyT(func(v *AnomalyAlert) pulumi.StringOutput { return v.NotificationEmail }).(pulumi.StringOutput) } // The ID of the Subscription this Cost Anomaly Alert is scoped to. Changing this forces a new resource to be created. When not supplied this defaults to the subscription configured in the provider. func (o AnomalyAlertOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v *AnomalyAlert) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput) } type AnomalyAlertArrayOutput struct{ *pulumi.OutputState } func (AnomalyAlertArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*AnomalyAlert)(nil)).Elem() } func (o AnomalyAlertArrayOutput) ToAnomalyAlertArrayOutput() AnomalyAlertArrayOutput { return o } func (o AnomalyAlertArrayOutput) ToAnomalyAlertArrayOutputWithContext(ctx context.Context) AnomalyAlertArrayOutput { return o } func (o AnomalyAlertArrayOutput) Index(i pulumi.IntInput) AnomalyAlertOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AnomalyAlert { return vs[0].([]*AnomalyAlert)[vs[1].(int)] }).(AnomalyAlertOutput) } type AnomalyAlertMapOutput struct{ *pulumi.OutputState } func (AnomalyAlertMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*AnomalyAlert)(nil)).Elem() } func (o AnomalyAlertMapOutput) ToAnomalyAlertMapOutput() AnomalyAlertMapOutput { return o } func (o AnomalyAlertMapOutput) ToAnomalyAlertMapOutputWithContext(ctx context.Context) AnomalyAlertMapOutput { return o } func (o AnomalyAlertMapOutput) MapIndex(k pulumi.StringInput) AnomalyAlertOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AnomalyAlert { return vs[0].(map[string]*AnomalyAlert)[vs[1].(string)] }).(AnomalyAlertOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*AnomalyAlertInput)(nil)).Elem(), &AnomalyAlert{}) pulumi.RegisterInputType(reflect.TypeOf((*AnomalyAlertArrayInput)(nil)).Elem(), AnomalyAlertArray{}) pulumi.RegisterInputType(reflect.TypeOf((*AnomalyAlertMapInput)(nil)).Elem(), AnomalyAlertMap{}) pulumi.RegisterOutputType(AnomalyAlertOutput{}) pulumi.RegisterOutputType(AnomalyAlertArrayOutput{}) pulumi.RegisterOutputType(AnomalyAlertMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/costmanagement/scheduledAction.go
sdk/go/azure/costmanagement/scheduledAction.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package costmanagement 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 Cost Management Scheduled Action. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/costmanagement" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := costmanagement.NewScheduledAction(ctx, "example", &costmanagement.ScheduledActionArgs{ // Name: pulumi.String("examplescheduledaction"), // DisplayName: pulumi.String("Report Last 6 Months"), // ViewId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/views/ms:CostByService"), // EmailAddressSender: pulumi.String("platformteam@test.com"), // EmailSubject: pulumi.String("Cost Management Report"), // EmailAddresses: pulumi.StringArray{ // pulumi.String("example@example.com"), // }, // Message: pulumi.String("Hi all, take a look at last 6 months spending!"), // Frequency: pulumi.String("Daily"), // StartDate: pulumi.String("2023-01-02T00:00:00Z"), // EndDate: pulumi.String("2023-02-02T00:00:00Z"), // }) // 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.CostManagement` - 2023-08-01 // // ## Import // // Azure Cost Management Scheduled Actions can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:costmanagement/scheduledAction:ScheduledAction example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/scheduledActions/scheduledaction1 // ``` type ScheduledAction struct { pulumi.CustomResourceState // UTC day on which cost analysis data will be emailed. Must be between `1` and `31`. This property is applicable when `frequency` is `Monthly`. DayOfMonth pulumi.IntPtrOutput `pulumi:"dayOfMonth"` // Specifies a list of day names on which cost analysis data will be emailed. This property is applicable when frequency is `Weekly` or `Monthly`. Possible values are `Friday`, `Monday`, `Saturday`, `Sunday`, `Thursday`, `Tuesday` and `Wednesday`. DaysOfWeeks pulumi.StringArrayOutput `pulumi:"daysOfWeeks"` // User visible input name of the Cost Management Scheduled Action. DisplayName pulumi.StringOutput `pulumi:"displayName"` // Email address of the point of contact that should get the unsubscribe requests of Scheduled Action notification emails. EmailAddressSender pulumi.StringOutput `pulumi:"emailAddressSender"` // Specifies a list of email addresses that will receive the Scheduled Action. EmailAddresses pulumi.StringArrayOutput `pulumi:"emailAddresses"` // Subject of the email. Length is limited to 70 characters. EmailSubject pulumi.StringOutput `pulumi:"emailSubject"` // The end date and time of the Scheduled Action (UTC). EndDate pulumi.StringOutput `pulumi:"endDate"` // Frequency of the schedule. Possible values are `Daily`, `Monthly` and `Weekly`. Value `Monthly` requires either `weeksOfMonth` and `daysOfWeek` or `dayOfMonth` to be specified. Value `Weekly` requires `daysOfWeek` to be specified. Frequency pulumi.StringOutput `pulumi:"frequency"` // UTC time at which cost analysis data will be emailed. Must be between `0` and `23`. HourOfDay pulumi.IntPtrOutput `pulumi:"hourOfDay"` // Message to be added in the email. Length is limited to 250 characters. Message pulumi.StringPtrOutput `pulumi:"message"` // The name which should be used for this Azure Cost Management Scheduled Action. Changing this forces a new Azure Cost Management Scheduled Action to be created. Name pulumi.StringOutput `pulumi:"name"` // The start date and time of the Scheduled Action (UTC). StartDate pulumi.StringOutput `pulumi:"startDate"` // The ID of the Cost Management View that is used by the Scheduled Action. Changing this forces a new resource to be created. ViewId pulumi.StringOutput `pulumi:"viewId"` // Specifies a list of weeks in which cost analysis data will be emailed. This property is applicable when `frequency` is `Monthly` and used in combination with `daysOfWeek`. Possible values are `First`, `Fourth`, `Last`, `Second` and `Third`. WeeksOfMonths pulumi.StringArrayOutput `pulumi:"weeksOfMonths"` } // NewScheduledAction registers a new resource with the given unique name, arguments, and options. func NewScheduledAction(ctx *pulumi.Context, name string, args *ScheduledActionArgs, opts ...pulumi.ResourceOption) (*ScheduledAction, 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.EmailAddressSender == nil { return nil, errors.New("invalid value for required argument 'EmailAddressSender'") } if args.EmailAddresses == nil { return nil, errors.New("invalid value for required argument 'EmailAddresses'") } if args.EmailSubject == nil { return nil, errors.New("invalid value for required argument 'EmailSubject'") } if args.EndDate == nil { return nil, errors.New("invalid value for required argument 'EndDate'") } if args.Frequency == nil { return nil, errors.New("invalid value for required argument 'Frequency'") } if args.StartDate == nil { return nil, errors.New("invalid value for required argument 'StartDate'") } if args.ViewId == nil { return nil, errors.New("invalid value for required argument 'ViewId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ScheduledAction err := ctx.RegisterResource("azure:costmanagement/scheduledAction:ScheduledAction", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetScheduledAction gets an existing ScheduledAction 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 GetScheduledAction(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ScheduledActionState, opts ...pulumi.ResourceOption) (*ScheduledAction, error) { var resource ScheduledAction err := ctx.ReadResource("azure:costmanagement/scheduledAction:ScheduledAction", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ScheduledAction resources. type scheduledActionState struct { // UTC day on which cost analysis data will be emailed. Must be between `1` and `31`. This property is applicable when `frequency` is `Monthly`. DayOfMonth *int `pulumi:"dayOfMonth"` // Specifies a list of day names on which cost analysis data will be emailed. This property is applicable when frequency is `Weekly` or `Monthly`. Possible values are `Friday`, `Monday`, `Saturday`, `Sunday`, `Thursday`, `Tuesday` and `Wednesday`. DaysOfWeeks []string `pulumi:"daysOfWeeks"` // User visible input name of the Cost Management Scheduled Action. DisplayName *string `pulumi:"displayName"` // Email address of the point of contact that should get the unsubscribe requests of Scheduled Action notification emails. EmailAddressSender *string `pulumi:"emailAddressSender"` // Specifies a list of email addresses that will receive the Scheduled Action. EmailAddresses []string `pulumi:"emailAddresses"` // Subject of the email. Length is limited to 70 characters. EmailSubject *string `pulumi:"emailSubject"` // The end date and time of the Scheduled Action (UTC). EndDate *string `pulumi:"endDate"` // Frequency of the schedule. Possible values are `Daily`, `Monthly` and `Weekly`. Value `Monthly` requires either `weeksOfMonth` and `daysOfWeek` or `dayOfMonth` to be specified. Value `Weekly` requires `daysOfWeek` to be specified. Frequency *string `pulumi:"frequency"` // UTC time at which cost analysis data will be emailed. Must be between `0` and `23`. HourOfDay *int `pulumi:"hourOfDay"` // Message to be added in the email. Length is limited to 250 characters. Message *string `pulumi:"message"` // The name which should be used for this Azure Cost Management Scheduled Action. Changing this forces a new Azure Cost Management Scheduled Action to be created. Name *string `pulumi:"name"` // The start date and time of the Scheduled Action (UTC). StartDate *string `pulumi:"startDate"` // The ID of the Cost Management View that is used by the Scheduled Action. Changing this forces a new resource to be created. ViewId *string `pulumi:"viewId"` // Specifies a list of weeks in which cost analysis data will be emailed. This property is applicable when `frequency` is `Monthly` and used in combination with `daysOfWeek`. Possible values are `First`, `Fourth`, `Last`, `Second` and `Third`. WeeksOfMonths []string `pulumi:"weeksOfMonths"` } type ScheduledActionState struct { // UTC day on which cost analysis data will be emailed. Must be between `1` and `31`. This property is applicable when `frequency` is `Monthly`. DayOfMonth pulumi.IntPtrInput // Specifies a list of day names on which cost analysis data will be emailed. This property is applicable when frequency is `Weekly` or `Monthly`. Possible values are `Friday`, `Monday`, `Saturday`, `Sunday`, `Thursday`, `Tuesday` and `Wednesday`. DaysOfWeeks pulumi.StringArrayInput // User visible input name of the Cost Management Scheduled Action. DisplayName pulumi.StringPtrInput // Email address of the point of contact that should get the unsubscribe requests of Scheduled Action notification emails. EmailAddressSender pulumi.StringPtrInput // Specifies a list of email addresses that will receive the Scheduled Action. EmailAddresses pulumi.StringArrayInput // Subject of the email. Length is limited to 70 characters. EmailSubject pulumi.StringPtrInput // The end date and time of the Scheduled Action (UTC). EndDate pulumi.StringPtrInput // Frequency of the schedule. Possible values are `Daily`, `Monthly` and `Weekly`. Value `Monthly` requires either `weeksOfMonth` and `daysOfWeek` or `dayOfMonth` to be specified. Value `Weekly` requires `daysOfWeek` to be specified. Frequency pulumi.StringPtrInput // UTC time at which cost analysis data will be emailed. Must be between `0` and `23`. HourOfDay pulumi.IntPtrInput // Message to be added in the email. Length is limited to 250 characters. Message pulumi.StringPtrInput // The name which should be used for this Azure Cost Management Scheduled Action. Changing this forces a new Azure Cost Management Scheduled Action to be created. Name pulumi.StringPtrInput // The start date and time of the Scheduled Action (UTC). StartDate pulumi.StringPtrInput // The ID of the Cost Management View that is used by the Scheduled Action. Changing this forces a new resource to be created. ViewId pulumi.StringPtrInput // Specifies a list of weeks in which cost analysis data will be emailed. This property is applicable when `frequency` is `Monthly` and used in combination with `daysOfWeek`. Possible values are `First`, `Fourth`, `Last`, `Second` and `Third`. WeeksOfMonths pulumi.StringArrayInput } func (ScheduledActionState) ElementType() reflect.Type { return reflect.TypeOf((*scheduledActionState)(nil)).Elem() } type scheduledActionArgs struct { // UTC day on which cost analysis data will be emailed. Must be between `1` and `31`. This property is applicable when `frequency` is `Monthly`. DayOfMonth *int `pulumi:"dayOfMonth"` // Specifies a list of day names on which cost analysis data will be emailed. This property is applicable when frequency is `Weekly` or `Monthly`. Possible values are `Friday`, `Monday`, `Saturday`, `Sunday`, `Thursday`, `Tuesday` and `Wednesday`. DaysOfWeeks []string `pulumi:"daysOfWeeks"` // User visible input name of the Cost Management Scheduled Action. DisplayName string `pulumi:"displayName"` // Email address of the point of contact that should get the unsubscribe requests of Scheduled Action notification emails. EmailAddressSender string `pulumi:"emailAddressSender"` // Specifies a list of email addresses that will receive the Scheduled Action. EmailAddresses []string `pulumi:"emailAddresses"` // Subject of the email. Length is limited to 70 characters. EmailSubject string `pulumi:"emailSubject"` // The end date and time of the Scheduled Action (UTC). EndDate string `pulumi:"endDate"` // Frequency of the schedule. Possible values are `Daily`, `Monthly` and `Weekly`. Value `Monthly` requires either `weeksOfMonth` and `daysOfWeek` or `dayOfMonth` to be specified. Value `Weekly` requires `daysOfWeek` to be specified. Frequency string `pulumi:"frequency"` // UTC time at which cost analysis data will be emailed. Must be between `0` and `23`. HourOfDay *int `pulumi:"hourOfDay"` // Message to be added in the email. Length is limited to 250 characters. Message *string `pulumi:"message"` // The name which should be used for this Azure Cost Management Scheduled Action. Changing this forces a new Azure Cost Management Scheduled Action to be created. Name *string `pulumi:"name"` // The start date and time of the Scheduled Action (UTC). StartDate string `pulumi:"startDate"` // The ID of the Cost Management View that is used by the Scheduled Action. Changing this forces a new resource to be created. ViewId string `pulumi:"viewId"` // Specifies a list of weeks in which cost analysis data will be emailed. This property is applicable when `frequency` is `Monthly` and used in combination with `daysOfWeek`. Possible values are `First`, `Fourth`, `Last`, `Second` and `Third`. WeeksOfMonths []string `pulumi:"weeksOfMonths"` } // The set of arguments for constructing a ScheduledAction resource. type ScheduledActionArgs struct { // UTC day on which cost analysis data will be emailed. Must be between `1` and `31`. This property is applicable when `frequency` is `Monthly`. DayOfMonth pulumi.IntPtrInput // Specifies a list of day names on which cost analysis data will be emailed. This property is applicable when frequency is `Weekly` or `Monthly`. Possible values are `Friday`, `Monday`, `Saturday`, `Sunday`, `Thursday`, `Tuesday` and `Wednesday`. DaysOfWeeks pulumi.StringArrayInput // User visible input name of the Cost Management Scheduled Action. DisplayName pulumi.StringInput // Email address of the point of contact that should get the unsubscribe requests of Scheduled Action notification emails. EmailAddressSender pulumi.StringInput // Specifies a list of email addresses that will receive the Scheduled Action. EmailAddresses pulumi.StringArrayInput // Subject of the email. Length is limited to 70 characters. EmailSubject pulumi.StringInput // The end date and time of the Scheduled Action (UTC). EndDate pulumi.StringInput // Frequency of the schedule. Possible values are `Daily`, `Monthly` and `Weekly`. Value `Monthly` requires either `weeksOfMonth` and `daysOfWeek` or `dayOfMonth` to be specified. Value `Weekly` requires `daysOfWeek` to be specified. Frequency pulumi.StringInput // UTC time at which cost analysis data will be emailed. Must be between `0` and `23`. HourOfDay pulumi.IntPtrInput // Message to be added in the email. Length is limited to 250 characters. Message pulumi.StringPtrInput // The name which should be used for this Azure Cost Management Scheduled Action. Changing this forces a new Azure Cost Management Scheduled Action to be created. Name pulumi.StringPtrInput // The start date and time of the Scheduled Action (UTC). StartDate pulumi.StringInput // The ID of the Cost Management View that is used by the Scheduled Action. Changing this forces a new resource to be created. ViewId pulumi.StringInput // Specifies a list of weeks in which cost analysis data will be emailed. This property is applicable when `frequency` is `Monthly` and used in combination with `daysOfWeek`. Possible values are `First`, `Fourth`, `Last`, `Second` and `Third`. WeeksOfMonths pulumi.StringArrayInput } func (ScheduledActionArgs) ElementType() reflect.Type { return reflect.TypeOf((*scheduledActionArgs)(nil)).Elem() } type ScheduledActionInput interface { pulumi.Input ToScheduledActionOutput() ScheduledActionOutput ToScheduledActionOutputWithContext(ctx context.Context) ScheduledActionOutput } func (*ScheduledAction) ElementType() reflect.Type { return reflect.TypeOf((**ScheduledAction)(nil)).Elem() } func (i *ScheduledAction) ToScheduledActionOutput() ScheduledActionOutput { return i.ToScheduledActionOutputWithContext(context.Background()) } func (i *ScheduledAction) ToScheduledActionOutputWithContext(ctx context.Context) ScheduledActionOutput { return pulumi.ToOutputWithContext(ctx, i).(ScheduledActionOutput) } // ScheduledActionArrayInput is an input type that accepts ScheduledActionArray and ScheduledActionArrayOutput values. // You can construct a concrete instance of `ScheduledActionArrayInput` via: // // ScheduledActionArray{ ScheduledActionArgs{...} } type ScheduledActionArrayInput interface { pulumi.Input ToScheduledActionArrayOutput() ScheduledActionArrayOutput ToScheduledActionArrayOutputWithContext(context.Context) ScheduledActionArrayOutput } type ScheduledActionArray []ScheduledActionInput func (ScheduledActionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ScheduledAction)(nil)).Elem() } func (i ScheduledActionArray) ToScheduledActionArrayOutput() ScheduledActionArrayOutput { return i.ToScheduledActionArrayOutputWithContext(context.Background()) } func (i ScheduledActionArray) ToScheduledActionArrayOutputWithContext(ctx context.Context) ScheduledActionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ScheduledActionArrayOutput) } // ScheduledActionMapInput is an input type that accepts ScheduledActionMap and ScheduledActionMapOutput values. // You can construct a concrete instance of `ScheduledActionMapInput` via: // // ScheduledActionMap{ "key": ScheduledActionArgs{...} } type ScheduledActionMapInput interface { pulumi.Input ToScheduledActionMapOutput() ScheduledActionMapOutput ToScheduledActionMapOutputWithContext(context.Context) ScheduledActionMapOutput } type ScheduledActionMap map[string]ScheduledActionInput func (ScheduledActionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ScheduledAction)(nil)).Elem() } func (i ScheduledActionMap) ToScheduledActionMapOutput() ScheduledActionMapOutput { return i.ToScheduledActionMapOutputWithContext(context.Background()) } func (i ScheduledActionMap) ToScheduledActionMapOutputWithContext(ctx context.Context) ScheduledActionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ScheduledActionMapOutput) } type ScheduledActionOutput struct{ *pulumi.OutputState } func (ScheduledActionOutput) ElementType() reflect.Type { return reflect.TypeOf((**ScheduledAction)(nil)).Elem() } func (o ScheduledActionOutput) ToScheduledActionOutput() ScheduledActionOutput { return o } func (o ScheduledActionOutput) ToScheduledActionOutputWithContext(ctx context.Context) ScheduledActionOutput { return o } // UTC day on which cost analysis data will be emailed. Must be between `1` and `31`. This property is applicable when `frequency` is `Monthly`. func (o ScheduledActionOutput) DayOfMonth() pulumi.IntPtrOutput { return o.ApplyT(func(v *ScheduledAction) pulumi.IntPtrOutput { return v.DayOfMonth }).(pulumi.IntPtrOutput) } // Specifies a list of day names on which cost analysis data will be emailed. This property is applicable when frequency is `Weekly` or `Monthly`. Possible values are `Friday`, `Monday`, `Saturday`, `Sunday`, `Thursday`, `Tuesday` and `Wednesday`. func (o ScheduledActionOutput) DaysOfWeeks() pulumi.StringArrayOutput { return o.ApplyT(func(v *ScheduledAction) pulumi.StringArrayOutput { return v.DaysOfWeeks }).(pulumi.StringArrayOutput) } // User visible input name of the Cost Management Scheduled Action. func (o ScheduledActionOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledAction) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // Email address of the point of contact that should get the unsubscribe requests of Scheduled Action notification emails. func (o ScheduledActionOutput) EmailAddressSender() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledAction) pulumi.StringOutput { return v.EmailAddressSender }).(pulumi.StringOutput) } // Specifies a list of email addresses that will receive the Scheduled Action. func (o ScheduledActionOutput) EmailAddresses() pulumi.StringArrayOutput { return o.ApplyT(func(v *ScheduledAction) pulumi.StringArrayOutput { return v.EmailAddresses }).(pulumi.StringArrayOutput) } // Subject of the email. Length is limited to 70 characters. func (o ScheduledActionOutput) EmailSubject() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledAction) pulumi.StringOutput { return v.EmailSubject }).(pulumi.StringOutput) } // The end date and time of the Scheduled Action (UTC). func (o ScheduledActionOutput) EndDate() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledAction) pulumi.StringOutput { return v.EndDate }).(pulumi.StringOutput) } // Frequency of the schedule. Possible values are `Daily`, `Monthly` and `Weekly`. Value `Monthly` requires either `weeksOfMonth` and `daysOfWeek` or `dayOfMonth` to be specified. Value `Weekly` requires `daysOfWeek` to be specified. func (o ScheduledActionOutput) Frequency() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledAction) pulumi.StringOutput { return v.Frequency }).(pulumi.StringOutput) } // UTC time at which cost analysis data will be emailed. Must be between `0` and `23`. func (o ScheduledActionOutput) HourOfDay() pulumi.IntPtrOutput { return o.ApplyT(func(v *ScheduledAction) pulumi.IntPtrOutput { return v.HourOfDay }).(pulumi.IntPtrOutput) } // Message to be added in the email. Length is limited to 250 characters. func (o ScheduledActionOutput) Message() pulumi.StringPtrOutput { return o.ApplyT(func(v *ScheduledAction) pulumi.StringPtrOutput { return v.Message }).(pulumi.StringPtrOutput) } // The name which should be used for this Azure Cost Management Scheduled Action. Changing this forces a new Azure Cost Management Scheduled Action to be created. func (o ScheduledActionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledAction) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The start date and time of the Scheduled Action (UTC). func (o ScheduledActionOutput) StartDate() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledAction) pulumi.StringOutput { return v.StartDate }).(pulumi.StringOutput) } // The ID of the Cost Management View that is used by the Scheduled Action. Changing this forces a new resource to be created. func (o ScheduledActionOutput) ViewId() pulumi.StringOutput { return o.ApplyT(func(v *ScheduledAction) pulumi.StringOutput { return v.ViewId }).(pulumi.StringOutput) } // Specifies a list of weeks in which cost analysis data will be emailed. This property is applicable when `frequency` is `Monthly` and used in combination with `daysOfWeek`. Possible values are `First`, `Fourth`, `Last`, `Second` and `Third`. func (o ScheduledActionOutput) WeeksOfMonths() pulumi.StringArrayOutput { return o.ApplyT(func(v *ScheduledAction) pulumi.StringArrayOutput { return v.WeeksOfMonths }).(pulumi.StringArrayOutput) } type ScheduledActionArrayOutput struct{ *pulumi.OutputState } func (ScheduledActionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ScheduledAction)(nil)).Elem() } func (o ScheduledActionArrayOutput) ToScheduledActionArrayOutput() ScheduledActionArrayOutput { return o } func (o ScheduledActionArrayOutput) ToScheduledActionArrayOutputWithContext(ctx context.Context) ScheduledActionArrayOutput { return o } func (o ScheduledActionArrayOutput) Index(i pulumi.IntInput) ScheduledActionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ScheduledAction { return vs[0].([]*ScheduledAction)[vs[1].(int)] }).(ScheduledActionOutput) } type ScheduledActionMapOutput struct{ *pulumi.OutputState } func (ScheduledActionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ScheduledAction)(nil)).Elem() } func (o ScheduledActionMapOutput) ToScheduledActionMapOutput() ScheduledActionMapOutput { return o } func (o ScheduledActionMapOutput) ToScheduledActionMapOutputWithContext(ctx context.Context) ScheduledActionMapOutput { return o } func (o ScheduledActionMapOutput) MapIndex(k pulumi.StringInput) ScheduledActionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ScheduledAction { return vs[0].(map[string]*ScheduledAction)[vs[1].(string)] }).(ScheduledActionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ScheduledActionInput)(nil)).Elem(), &ScheduledAction{}) pulumi.RegisterInputType(reflect.TypeOf((*ScheduledActionArrayInput)(nil)).Elem(), ScheduledActionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ScheduledActionMapInput)(nil)).Elem(), ScheduledActionMap{}) pulumi.RegisterOutputType(ScheduledActionOutput{}) pulumi.RegisterOutputType(ScheduledActionArrayOutput{}) pulumi.RegisterOutputType(ScheduledActionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/search/init.go
sdk/go/azure/search/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 search 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:search/service:Service": r = &Service{} case "azure:search/sharedPrivateLinkService:SharedPrivateLinkService": r = &SharedPrivateLinkService{} 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", "search/service", &module{version}, ) pulumi.RegisterResourceModule( "azure", "search/sharedPrivateLinkService", &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/search/pulumiTypes.go
sdk/go/azure/search/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 search 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 ServiceIdentity struct { // Specifies the list of User Assigned Managed Service Identity IDs which should be assigned to this Search Service. 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 Search Service. Possible values are `SystemAssigned`, `UserAssigned`, and `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 the list of User Assigned Managed Service Identity IDs which should be assigned to this Search Service. 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 Search Service. Possible values are `SystemAssigned`, `UserAssigned`, and `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 the list of User Assigned Managed Service Identity IDs which should be assigned to this Search Service. func (o ServiceIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v ServiceIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with this Managed Service Identity. func (o ServiceIdentityOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v ServiceIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. 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 Search Service. Possible values are `SystemAssigned`, `UserAssigned`, and `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 the list of User Assigned Managed Service Identity IDs which should be assigned to this Search Service. func (o ServiceIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *ServiceIdentity) []string { if v == nil { return nil } return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with this Managed Service Identity. func (o ServiceIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ServiceIdentity) *string { if v == nil { return nil } return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. 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 Search Service. Possible values are `SystemAssigned`, `UserAssigned`, and `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 ServiceQueryKey struct { // The value of this Query Key. Key *string `pulumi:"key"` // The Name which should be used for this Search Service. Changing this forces a new Search Service to be created. Name *string `pulumi:"name"` } // ServiceQueryKeyInput is an input type that accepts ServiceQueryKeyArgs and ServiceQueryKeyOutput values. // You can construct a concrete instance of `ServiceQueryKeyInput` via: // // ServiceQueryKeyArgs{...} type ServiceQueryKeyInput interface { pulumi.Input ToServiceQueryKeyOutput() ServiceQueryKeyOutput ToServiceQueryKeyOutputWithContext(context.Context) ServiceQueryKeyOutput } type ServiceQueryKeyArgs struct { // The value of this Query Key. Key pulumi.StringPtrInput `pulumi:"key"` // The Name which should be used for this Search Service. Changing this forces a new Search Service to be created. Name pulumi.StringPtrInput `pulumi:"name"` } func (ServiceQueryKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*ServiceQueryKey)(nil)).Elem() } func (i ServiceQueryKeyArgs) ToServiceQueryKeyOutput() ServiceQueryKeyOutput { return i.ToServiceQueryKeyOutputWithContext(context.Background()) } func (i ServiceQueryKeyArgs) ToServiceQueryKeyOutputWithContext(ctx context.Context) ServiceQueryKeyOutput { return pulumi.ToOutputWithContext(ctx, i).(ServiceQueryKeyOutput) } // ServiceQueryKeyArrayInput is an input type that accepts ServiceQueryKeyArray and ServiceQueryKeyArrayOutput values. // You can construct a concrete instance of `ServiceQueryKeyArrayInput` via: // // ServiceQueryKeyArray{ ServiceQueryKeyArgs{...} } type ServiceQueryKeyArrayInput interface { pulumi.Input ToServiceQueryKeyArrayOutput() ServiceQueryKeyArrayOutput ToServiceQueryKeyArrayOutputWithContext(context.Context) ServiceQueryKeyArrayOutput } type ServiceQueryKeyArray []ServiceQueryKeyInput func (ServiceQueryKeyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]ServiceQueryKey)(nil)).Elem() } func (i ServiceQueryKeyArray) ToServiceQueryKeyArrayOutput() ServiceQueryKeyArrayOutput { return i.ToServiceQueryKeyArrayOutputWithContext(context.Background()) } func (i ServiceQueryKeyArray) ToServiceQueryKeyArrayOutputWithContext(ctx context.Context) ServiceQueryKeyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ServiceQueryKeyArrayOutput) } type ServiceQueryKeyOutput struct{ *pulumi.OutputState } func (ServiceQueryKeyOutput) ElementType() reflect.Type { return reflect.TypeOf((*ServiceQueryKey)(nil)).Elem() } func (o ServiceQueryKeyOutput) ToServiceQueryKeyOutput() ServiceQueryKeyOutput { return o } func (o ServiceQueryKeyOutput) ToServiceQueryKeyOutputWithContext(ctx context.Context) ServiceQueryKeyOutput { return o } // The value of this Query Key. func (o ServiceQueryKeyOutput) Key() pulumi.StringPtrOutput { return o.ApplyT(func(v ServiceQueryKey) *string { return v.Key }).(pulumi.StringPtrOutput) } // The Name which should be used for this Search Service. Changing this forces a new Search Service to be created. func (o ServiceQueryKeyOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v ServiceQueryKey) *string { return v.Name }).(pulumi.StringPtrOutput) } type ServiceQueryKeyArrayOutput struct{ *pulumi.OutputState } func (ServiceQueryKeyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]ServiceQueryKey)(nil)).Elem() } func (o ServiceQueryKeyArrayOutput) ToServiceQueryKeyArrayOutput() ServiceQueryKeyArrayOutput { return o } func (o ServiceQueryKeyArrayOutput) ToServiceQueryKeyArrayOutputWithContext(ctx context.Context) ServiceQueryKeyArrayOutput { return o } func (o ServiceQueryKeyArrayOutput) Index(i pulumi.IntInput) ServiceQueryKeyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) ServiceQueryKey { return vs[0].([]ServiceQueryKey)[vs[1].(int)] }).(ServiceQueryKeyOutput) } type GetServiceIdentity struct { // The list of User Assigned Managed Service Identity IDs assigned to this Search Service. 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"` } // GetServiceIdentityInput is an input type that accepts GetServiceIdentityArgs and GetServiceIdentityOutput values. // You can construct a concrete instance of `GetServiceIdentityInput` via: // // GetServiceIdentityArgs{...} type GetServiceIdentityInput interface { pulumi.Input ToGetServiceIdentityOutput() GetServiceIdentityOutput ToGetServiceIdentityOutputWithContext(context.Context) GetServiceIdentityOutput } type GetServiceIdentityArgs struct { // The list of User Assigned Managed Service Identity IDs assigned to this Search Service. 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 (GetServiceIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetServiceIdentity)(nil)).Elem() } func (i GetServiceIdentityArgs) ToGetServiceIdentityOutput() GetServiceIdentityOutput { return i.ToGetServiceIdentityOutputWithContext(context.Background()) } func (i GetServiceIdentityArgs) ToGetServiceIdentityOutputWithContext(ctx context.Context) GetServiceIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(GetServiceIdentityOutput) } // GetServiceIdentityArrayInput is an input type that accepts GetServiceIdentityArray and GetServiceIdentityArrayOutput values. // You can construct a concrete instance of `GetServiceIdentityArrayInput` via: // // GetServiceIdentityArray{ GetServiceIdentityArgs{...} } type GetServiceIdentityArrayInput interface { pulumi.Input ToGetServiceIdentityArrayOutput() GetServiceIdentityArrayOutput ToGetServiceIdentityArrayOutputWithContext(context.Context) GetServiceIdentityArrayOutput } type GetServiceIdentityArray []GetServiceIdentityInput func (GetServiceIdentityArray) ElementType() reflect.Type { return reflect.TypeOf((*[]GetServiceIdentity)(nil)).Elem() } func (i GetServiceIdentityArray) ToGetServiceIdentityArrayOutput() GetServiceIdentityArrayOutput { return i.ToGetServiceIdentityArrayOutputWithContext(context.Background()) } func (i GetServiceIdentityArray) ToGetServiceIdentityArrayOutputWithContext(ctx context.Context) GetServiceIdentityArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GetServiceIdentityArrayOutput) } type GetServiceIdentityOutput struct{ *pulumi.OutputState } func (GetServiceIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetServiceIdentity)(nil)).Elem() } func (o GetServiceIdentityOutput) ToGetServiceIdentityOutput() GetServiceIdentityOutput { return o } func (o GetServiceIdentityOutput) ToGetServiceIdentityOutputWithContext(ctx context.Context) GetServiceIdentityOutput { return o } // The list of User Assigned Managed Service Identity IDs assigned to this Search Service. func (o GetServiceIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v GetServiceIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with this Managed Service Identity. func (o GetServiceIdentityOutput) PrincipalId() pulumi.StringOutput { return o.ApplyT(func(v GetServiceIdentity) string { return v.PrincipalId }).(pulumi.StringOutput) } // The Tenant ID associated with this Managed Service Identity. func (o GetServiceIdentityOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v GetServiceIdentity) string { return v.TenantId }).(pulumi.StringOutput) } // The identity type of this Managed Service Identity. func (o GetServiceIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v GetServiceIdentity) string { return v.Type }).(pulumi.StringOutput) } type GetServiceIdentityArrayOutput struct{ *pulumi.OutputState } func (GetServiceIdentityArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]GetServiceIdentity)(nil)).Elem() } func (o GetServiceIdentityArrayOutput) ToGetServiceIdentityArrayOutput() GetServiceIdentityArrayOutput { return o } func (o GetServiceIdentityArrayOutput) ToGetServiceIdentityArrayOutputWithContext(ctx context.Context) GetServiceIdentityArrayOutput { return o } func (o GetServiceIdentityArrayOutput) Index(i pulumi.IntInput) GetServiceIdentityOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetServiceIdentity { return vs[0].([]GetServiceIdentity)[vs[1].(int)] }).(GetServiceIdentityOutput) } type GetServiceQueryKey struct { // The value of this Query Key. Key string `pulumi:"key"` // The Name of the Search Service. Name string `pulumi:"name"` } // GetServiceQueryKeyInput is an input type that accepts GetServiceQueryKeyArgs and GetServiceQueryKeyOutput values. // You can construct a concrete instance of `GetServiceQueryKeyInput` via: // // GetServiceQueryKeyArgs{...} type GetServiceQueryKeyInput interface { pulumi.Input ToGetServiceQueryKeyOutput() GetServiceQueryKeyOutput ToGetServiceQueryKeyOutputWithContext(context.Context) GetServiceQueryKeyOutput } type GetServiceQueryKeyArgs struct { // The value of this Query Key. Key pulumi.StringInput `pulumi:"key"` // The Name of the Search Service. Name pulumi.StringInput `pulumi:"name"` } func (GetServiceQueryKeyArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetServiceQueryKey)(nil)).Elem() } func (i GetServiceQueryKeyArgs) ToGetServiceQueryKeyOutput() GetServiceQueryKeyOutput { return i.ToGetServiceQueryKeyOutputWithContext(context.Background()) } func (i GetServiceQueryKeyArgs) ToGetServiceQueryKeyOutputWithContext(ctx context.Context) GetServiceQueryKeyOutput { return pulumi.ToOutputWithContext(ctx, i).(GetServiceQueryKeyOutput) } // GetServiceQueryKeyArrayInput is an input type that accepts GetServiceQueryKeyArray and GetServiceQueryKeyArrayOutput values. // You can construct a concrete instance of `GetServiceQueryKeyArrayInput` via: // // GetServiceQueryKeyArray{ GetServiceQueryKeyArgs{...} } type GetServiceQueryKeyArrayInput interface { pulumi.Input ToGetServiceQueryKeyArrayOutput() GetServiceQueryKeyArrayOutput ToGetServiceQueryKeyArrayOutputWithContext(context.Context) GetServiceQueryKeyArrayOutput } type GetServiceQueryKeyArray []GetServiceQueryKeyInput func (GetServiceQueryKeyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]GetServiceQueryKey)(nil)).Elem() } func (i GetServiceQueryKeyArray) ToGetServiceQueryKeyArrayOutput() GetServiceQueryKeyArrayOutput { return i.ToGetServiceQueryKeyArrayOutputWithContext(context.Background()) } func (i GetServiceQueryKeyArray) ToGetServiceQueryKeyArrayOutputWithContext(ctx context.Context) GetServiceQueryKeyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GetServiceQueryKeyArrayOutput) } type GetServiceQueryKeyOutput struct{ *pulumi.OutputState } func (GetServiceQueryKeyOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetServiceQueryKey)(nil)).Elem() } func (o GetServiceQueryKeyOutput) ToGetServiceQueryKeyOutput() GetServiceQueryKeyOutput { return o } func (o GetServiceQueryKeyOutput) ToGetServiceQueryKeyOutputWithContext(ctx context.Context) GetServiceQueryKeyOutput { return o } // The value of this Query Key. func (o GetServiceQueryKeyOutput) Key() pulumi.StringOutput { return o.ApplyT(func(v GetServiceQueryKey) string { return v.Key }).(pulumi.StringOutput) } // The Name of the Search Service. func (o GetServiceQueryKeyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetServiceQueryKey) string { return v.Name }).(pulumi.StringOutput) } type GetServiceQueryKeyArrayOutput struct{ *pulumi.OutputState } func (GetServiceQueryKeyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]GetServiceQueryKey)(nil)).Elem() } func (o GetServiceQueryKeyArrayOutput) ToGetServiceQueryKeyArrayOutput() GetServiceQueryKeyArrayOutput { return o } func (o GetServiceQueryKeyArrayOutput) ToGetServiceQueryKeyArrayOutputWithContext(ctx context.Context) GetServiceQueryKeyArrayOutput { return o } func (o GetServiceQueryKeyArrayOutput) Index(i pulumi.IntInput) GetServiceQueryKeyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetServiceQueryKey { return vs[0].([]GetServiceQueryKey)[vs[1].(int)] }).(GetServiceQueryKeyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ServiceIdentityInput)(nil)).Elem(), ServiceIdentityArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ServiceIdentityPtrInput)(nil)).Elem(), ServiceIdentityArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ServiceQueryKeyInput)(nil)).Elem(), ServiceQueryKeyArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ServiceQueryKeyArrayInput)(nil)).Elem(), ServiceQueryKeyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetServiceIdentityInput)(nil)).Elem(), GetServiceIdentityArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetServiceIdentityArrayInput)(nil)).Elem(), GetServiceIdentityArray{}) pulumi.RegisterInputType(reflect.TypeOf((*GetServiceQueryKeyInput)(nil)).Elem(), GetServiceQueryKeyArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetServiceQueryKeyArrayInput)(nil)).Elem(), GetServiceQueryKeyArray{}) pulumi.RegisterOutputType(ServiceIdentityOutput{}) pulumi.RegisterOutputType(ServiceIdentityPtrOutput{}) pulumi.RegisterOutputType(ServiceQueryKeyOutput{}) pulumi.RegisterOutputType(ServiceQueryKeyArrayOutput{}) pulumi.RegisterOutputType(GetServiceIdentityOutput{}) pulumi.RegisterOutputType(GetServiceIdentityArrayOutput{}) pulumi.RegisterOutputType(GetServiceQueryKeyOutput{}) pulumi.RegisterOutputType(GetServiceQueryKeyArrayOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/search/service.go
sdk/go/azure/search/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 search import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Search Service. // // ## Example Usage // // ### Supporting API Keys) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/search" // "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 = search.NewService(ctx, "example", &search.ServiceArgs{ // Name: pulumi.String("example-resource"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: pulumi.String("standard"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Using Both AzureAD And API Keys) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/search" // "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 = search.NewService(ctx, "example", &search.ServiceArgs{ // Name: pulumi.String("example-resource"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: pulumi.String("standard"), // LocalAuthenticationEnabled: pulumi.Bool(true), // AuthenticationFailureMode: pulumi.String("http403"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Supporting Only AzureAD Authentication) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/search" // "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 = search.NewService(ctx, "example", &search.ServiceArgs{ // Name: pulumi.String("example-resource"), // ResourceGroupName: example.Name, // Location: example.Location, // Sku: pulumi.String("standard"), // LocalAuthenticationEnabled: pulumi.Bool(false), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Search` - 2025-05-01 // // ## Import // // Search Services can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:search/service:Service example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Search/searchServices/service1 // ``` type Service struct { pulumi.CustomResourceState // Specifies a list of inbound IPv4 or CIDRs that are allowed to access the Search Service. If the incoming IP request is from an IP address which is not included in the `allowedIps` it will be blocked by the Search Services firewall. // // > **Note:** The `allowedIps` are only applied if the `publicNetworkAccessEnabled` field has been set to `true`, else all traffic over the public interface will be rejected, even if the `allowedIps` field has been defined. When the `publicNetworkAccessEnabled` field has been set to `false` the private endpoint connections are the only allowed access point to the Search Service. AllowedIps pulumi.StringArrayOutput `pulumi:"allowedIps"` // Specifies the response that the Search Service should return for requests that fail authentication. Possible values include `http401WithBearerChallenge` or `http403`. // // > **Note:** `authenticationFailureMode` can only be configured when using `localAuthenticationEnabled` is set to `true` - which when set together specifies that both API Keys and AzureAD Authentication should be supported. AuthenticationFailureMode pulumi.StringPtrOutput `pulumi:"authenticationFailureMode"` // Describes whether the search service is compliant or not with respect to having non-customer encrypted resources. If a service has more than one non-customer encrypted resource and `Enforcement` is `enabled` then the service will be marked as `NonCompliant`. If all the resources are customer encrypted, then the service will be marked as `Compliant`. CustomerManagedKeyEncryptionComplianceStatus pulumi.StringOutput `pulumi:"customerManagedKeyEncryptionComplianceStatus"` // Specifies whether the Search Service should enforce that non-customer resources are encrypted. Defaults to `false`. CustomerManagedKeyEnforcementEnabled pulumi.BoolPtrOutput `pulumi:"customerManagedKeyEnforcementEnabled"` // Specifies the Hosting Mode, which allows for High Density partitions (that allow for up to 1000 indexes) should be supported. Possible values are `HighDensity` or `Default`. Defaults to `Default`. Changing this forces a new Search Service to be created. // // > **Note:** `hostingMode` can only be configured when `sku` is set to `standard3`. HostingMode pulumi.StringPtrOutput `pulumi:"hostingMode"` // An `identity` block as defined below. Identity ServiceIdentityPtrOutput `pulumi:"identity"` // Specifies whether the Search Service allows authenticating using API Keys? Defaults to `true`. LocalAuthenticationEnabled pulumi.BoolPtrOutput `pulumi:"localAuthenticationEnabled"` // The Azure Region where the Search Service should exist. Changing this forces a new Search Service to be created. Location pulumi.StringOutput `pulumi:"location"` // The Name which should be used for this Search Service. Changing this forces a new Search Service to be created. Name pulumi.StringOutput `pulumi:"name"` // Whether to allow trusted Azure services to access a network restricted Search Service? Possible values are `None` and `AzureServices`. Defaults to `None`. NetworkRuleBypassOption pulumi.StringPtrOutput `pulumi:"networkRuleBypassOption"` // Specifies the number of partitions which should be created. This field cannot be set when using a `free` sku ([see the Microsoft documentation](https://learn.microsoft.com/azure/search/search-sku-tier)). Possible values include `1`, `2`, `3`, `4`, `6`, or `12`. Defaults to `1`. // // > **Note:** when `hostingMode` is set to `highDensity` the maximum number of partitions allowed is `3`. PartitionCount pulumi.IntPtrOutput `pulumi:"partitionCount"` // The Primary Key used for Search Service Administration. PrimaryKey pulumi.StringOutput `pulumi:"primaryKey"` // Specifies whether Public Network Access is allowed for this resource. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // A `queryKeys` block as defined below. QueryKeys ServiceQueryKeyArrayOutput `pulumi:"queryKeys"` // Specifies the number of Replica's which should be created for this Search Service. This field cannot be set when using a `free` sku ([see the Microsoft documentation](https://learn.microsoft.com/azure/search/search-sku-tier)). ReplicaCount pulumi.IntPtrOutput `pulumi:"replicaCount"` // The name of the Resource Group where the Search Service should exist. Changing this forces a new Search Service to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The Secondary Key used for Search Service Administration. SecondaryKey pulumi.StringOutput `pulumi:"secondaryKey"` // Specifies the Semantic Search SKU which should be used for this Search Service. Possible values include `free` and `standard`. // // > **Note:** The `semanticSearchSku` cannot be defined if your Search Services `sku` is set to `free`. The Semantic Search feature is only available in certain regions, please see the [product documentation](https://learn.microsoft.com/azure/search/semantic-search-overview#availability-and-pricing) for more information. SemanticSearchSku pulumi.StringPtrOutput `pulumi:"semanticSearchSku"` // The SKU which should be used for this Search Service. Possible values include `basic`, `free`, `standard`, `standard2`, `standard3`, `storageOptimizedL1` and `storageOptimizedL2`. // // > **Note:** The `basic` and `free` SKUs provision the Search Service in a Shared Cluster - the `standard` SKUs use a Dedicated Cluster. // // > **Note:** The SKUs `standard2`, `standard3`, `storageOptimizedL1` and `storageOptimizedL2` are only available by submitting a quota increase request to Microsoft. Please see the [product documentation](https://learn.microsoft.com/azure/azure-resource-manager/troubleshooting/error-resource-quota?tabs=azure-cli) on how to submit a quota increase request. // // > **Note:** SKU upgrades between Basic and Standard (S1, S2, S3) tiers from a lower tier to a higher tier (e.g., Basic → S1, S1 → S2, S2 → S3) are supported without recreating the resource. And your region must support the higher tier. All other SKU changes (downgrades, changes from/to Free tier, or changes to/from Storage Optimized tiers) will force creation of a new Search Service. Sku pulumi.StringOutput `pulumi:"sku"` // Specifies a mapping of tags which should be assigned to this Search Service. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewService registers a new resource with the given unique name, arguments, and options. func NewService(ctx *pulumi.Context, name string, args *ServiceArgs, opts ...pulumi.ResourceOption) (*Service, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Sku == nil { return nil, errors.New("invalid value for required argument 'Sku'") } secrets := pulumi.AdditionalSecretOutputs([]string{ "primaryKey", "secondaryKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource Service err := ctx.RegisterResource("azure:search/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:search/service:Service", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Service resources. type serviceState struct { // Specifies a list of inbound IPv4 or CIDRs that are allowed to access the Search Service. If the incoming IP request is from an IP address which is not included in the `allowedIps` it will be blocked by the Search Services firewall. // // > **Note:** The `allowedIps` are only applied if the `publicNetworkAccessEnabled` field has been set to `true`, else all traffic over the public interface will be rejected, even if the `allowedIps` field has been defined. When the `publicNetworkAccessEnabled` field has been set to `false` the private endpoint connections are the only allowed access point to the Search Service. AllowedIps []string `pulumi:"allowedIps"` // Specifies the response that the Search Service should return for requests that fail authentication. Possible values include `http401WithBearerChallenge` or `http403`. // // > **Note:** `authenticationFailureMode` can only be configured when using `localAuthenticationEnabled` is set to `true` - which when set together specifies that both API Keys and AzureAD Authentication should be supported. AuthenticationFailureMode *string `pulumi:"authenticationFailureMode"` // Describes whether the search service is compliant or not with respect to having non-customer encrypted resources. If a service has more than one non-customer encrypted resource and `Enforcement` is `enabled` then the service will be marked as `NonCompliant`. If all the resources are customer encrypted, then the service will be marked as `Compliant`. CustomerManagedKeyEncryptionComplianceStatus *string `pulumi:"customerManagedKeyEncryptionComplianceStatus"` // Specifies whether the Search Service should enforce that non-customer resources are encrypted. Defaults to `false`. CustomerManagedKeyEnforcementEnabled *bool `pulumi:"customerManagedKeyEnforcementEnabled"` // Specifies the Hosting Mode, which allows for High Density partitions (that allow for up to 1000 indexes) should be supported. Possible values are `HighDensity` or `Default`. Defaults to `Default`. Changing this forces a new Search Service to be created. // // > **Note:** `hostingMode` can only be configured when `sku` is set to `standard3`. HostingMode *string `pulumi:"hostingMode"` // An `identity` block as defined below. Identity *ServiceIdentity `pulumi:"identity"` // Specifies whether the Search Service allows authenticating using API Keys? Defaults to `true`. LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"` // The Azure Region where the Search Service should exist. Changing this forces a new Search Service to be created. Location *string `pulumi:"location"` // The Name which should be used for this Search Service. Changing this forces a new Search Service to be created. Name *string `pulumi:"name"` // Whether to allow trusted Azure services to access a network restricted Search Service? Possible values are `None` and `AzureServices`. Defaults to `None`. NetworkRuleBypassOption *string `pulumi:"networkRuleBypassOption"` // Specifies the number of partitions which should be created. This field cannot be set when using a `free` sku ([see the Microsoft documentation](https://learn.microsoft.com/azure/search/search-sku-tier)). Possible values include `1`, `2`, `3`, `4`, `6`, or `12`. Defaults to `1`. // // > **Note:** when `hostingMode` is set to `highDensity` the maximum number of partitions allowed is `3`. PartitionCount *int `pulumi:"partitionCount"` // The Primary Key used for Search Service Administration. PrimaryKey *string `pulumi:"primaryKey"` // Specifies whether Public Network Access is allowed for this resource. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // A `queryKeys` block as defined below. QueryKeys []ServiceQueryKey `pulumi:"queryKeys"` // Specifies the number of Replica's which should be created for this Search Service. This field cannot be set when using a `free` sku ([see the Microsoft documentation](https://learn.microsoft.com/azure/search/search-sku-tier)). ReplicaCount *int `pulumi:"replicaCount"` // The name of the Resource Group where the Search Service should exist. Changing this forces a new Search Service to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The Secondary Key used for Search Service Administration. SecondaryKey *string `pulumi:"secondaryKey"` // Specifies the Semantic Search SKU which should be used for this Search Service. Possible values include `free` and `standard`. // // > **Note:** The `semanticSearchSku` cannot be defined if your Search Services `sku` is set to `free`. The Semantic Search feature is only available in certain regions, please see the [product documentation](https://learn.microsoft.com/azure/search/semantic-search-overview#availability-and-pricing) for more information. SemanticSearchSku *string `pulumi:"semanticSearchSku"` // The SKU which should be used for this Search Service. Possible values include `basic`, `free`, `standard`, `standard2`, `standard3`, `storageOptimizedL1` and `storageOptimizedL2`. // // > **Note:** The `basic` and `free` SKUs provision the Search Service in a Shared Cluster - the `standard` SKUs use a Dedicated Cluster. // // > **Note:** The SKUs `standard2`, `standard3`, `storageOptimizedL1` and `storageOptimizedL2` are only available by submitting a quota increase request to Microsoft. Please see the [product documentation](https://learn.microsoft.com/azure/azure-resource-manager/troubleshooting/error-resource-quota?tabs=azure-cli) on how to submit a quota increase request. // // > **Note:** SKU upgrades between Basic and Standard (S1, S2, S3) tiers from a lower tier to a higher tier (e.g., Basic → S1, S1 → S2, S2 → S3) are supported without recreating the resource. And your region must support the higher tier. All other SKU changes (downgrades, changes from/to Free tier, or changes to/from Storage Optimized tiers) will force creation of a new Search Service. Sku *string `pulumi:"sku"` // Specifies a mapping of tags which should be assigned to this Search Service. Tags map[string]string `pulumi:"tags"` } type ServiceState struct { // Specifies a list of inbound IPv4 or CIDRs that are allowed to access the Search Service. If the incoming IP request is from an IP address which is not included in the `allowedIps` it will be blocked by the Search Services firewall. // // > **Note:** The `allowedIps` are only applied if the `publicNetworkAccessEnabled` field has been set to `true`, else all traffic over the public interface will be rejected, even if the `allowedIps` field has been defined. When the `publicNetworkAccessEnabled` field has been set to `false` the private endpoint connections are the only allowed access point to the Search Service. AllowedIps pulumi.StringArrayInput // Specifies the response that the Search Service should return for requests that fail authentication. Possible values include `http401WithBearerChallenge` or `http403`. // // > **Note:** `authenticationFailureMode` can only be configured when using `localAuthenticationEnabled` is set to `true` - which when set together specifies that both API Keys and AzureAD Authentication should be supported. AuthenticationFailureMode pulumi.StringPtrInput // Describes whether the search service is compliant or not with respect to having non-customer encrypted resources. If a service has more than one non-customer encrypted resource and `Enforcement` is `enabled` then the service will be marked as `NonCompliant`. If all the resources are customer encrypted, then the service will be marked as `Compliant`. CustomerManagedKeyEncryptionComplianceStatus pulumi.StringPtrInput // Specifies whether the Search Service should enforce that non-customer resources are encrypted. Defaults to `false`. CustomerManagedKeyEnforcementEnabled pulumi.BoolPtrInput // Specifies the Hosting Mode, which allows for High Density partitions (that allow for up to 1000 indexes) should be supported. Possible values are `HighDensity` or `Default`. Defaults to `Default`. Changing this forces a new Search Service to be created. // // > **Note:** `hostingMode` can only be configured when `sku` is set to `standard3`. HostingMode pulumi.StringPtrInput // An `identity` block as defined below. Identity ServiceIdentityPtrInput // Specifies whether the Search Service allows authenticating using API Keys? Defaults to `true`. LocalAuthenticationEnabled pulumi.BoolPtrInput // The Azure Region where the Search Service should exist. Changing this forces a new Search Service to be created. Location pulumi.StringPtrInput // The Name which should be used for this Search Service. Changing this forces a new Search Service to be created. Name pulumi.StringPtrInput // Whether to allow trusted Azure services to access a network restricted Search Service? Possible values are `None` and `AzureServices`. Defaults to `None`. NetworkRuleBypassOption pulumi.StringPtrInput // Specifies the number of partitions which should be created. This field cannot be set when using a `free` sku ([see the Microsoft documentation](https://learn.microsoft.com/azure/search/search-sku-tier)). Possible values include `1`, `2`, `3`, `4`, `6`, or `12`. Defaults to `1`. // // > **Note:** when `hostingMode` is set to `highDensity` the maximum number of partitions allowed is `3`. PartitionCount pulumi.IntPtrInput // The Primary Key used for Search Service Administration. PrimaryKey pulumi.StringPtrInput // Specifies whether Public Network Access is allowed for this resource. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // A `queryKeys` block as defined below. QueryKeys ServiceQueryKeyArrayInput // Specifies the number of Replica's which should be created for this Search Service. This field cannot be set when using a `free` sku ([see the Microsoft documentation](https://learn.microsoft.com/azure/search/search-sku-tier)). ReplicaCount pulumi.IntPtrInput // The name of the Resource Group where the Search Service should exist. Changing this forces a new Search Service to be created. ResourceGroupName pulumi.StringPtrInput // The Secondary Key used for Search Service Administration. SecondaryKey pulumi.StringPtrInput // Specifies the Semantic Search SKU which should be used for this Search Service. Possible values include `free` and `standard`. // // > **Note:** The `semanticSearchSku` cannot be defined if your Search Services `sku` is set to `free`. The Semantic Search feature is only available in certain regions, please see the [product documentation](https://learn.microsoft.com/azure/search/semantic-search-overview#availability-and-pricing) for more information. SemanticSearchSku pulumi.StringPtrInput // The SKU which should be used for this Search Service. Possible values include `basic`, `free`, `standard`, `standard2`, `standard3`, `storageOptimizedL1` and `storageOptimizedL2`. // // > **Note:** The `basic` and `free` SKUs provision the Search Service in a Shared Cluster - the `standard` SKUs use a Dedicated Cluster. // // > **Note:** The SKUs `standard2`, `standard3`, `storageOptimizedL1` and `storageOptimizedL2` are only available by submitting a quota increase request to Microsoft. Please see the [product documentation](https://learn.microsoft.com/azure/azure-resource-manager/troubleshooting/error-resource-quota?tabs=azure-cli) on how to submit a quota increase request. // // > **Note:** SKU upgrades between Basic and Standard (S1, S2, S3) tiers from a lower tier to a higher tier (e.g., Basic → S1, S1 → S2, S2 → S3) are supported without recreating the resource. And your region must support the higher tier. All other SKU changes (downgrades, changes from/to Free tier, or changes to/from Storage Optimized tiers) will force creation of a new Search Service. Sku pulumi.StringPtrInput // Specifies a mapping of tags which should be assigned to this Search Service. Tags pulumi.StringMapInput } func (ServiceState) ElementType() reflect.Type { return reflect.TypeOf((*serviceState)(nil)).Elem() } type serviceArgs struct { // Specifies a list of inbound IPv4 or CIDRs that are allowed to access the Search Service. If the incoming IP request is from an IP address which is not included in the `allowedIps` it will be blocked by the Search Services firewall. // // > **Note:** The `allowedIps` are only applied if the `publicNetworkAccessEnabled` field has been set to `true`, else all traffic over the public interface will be rejected, even if the `allowedIps` field has been defined. When the `publicNetworkAccessEnabled` field has been set to `false` the private endpoint connections are the only allowed access point to the Search Service. AllowedIps []string `pulumi:"allowedIps"` // Specifies the response that the Search Service should return for requests that fail authentication. Possible values include `http401WithBearerChallenge` or `http403`. // // > **Note:** `authenticationFailureMode` can only be configured when using `localAuthenticationEnabled` is set to `true` - which when set together specifies that both API Keys and AzureAD Authentication should be supported. AuthenticationFailureMode *string `pulumi:"authenticationFailureMode"` // Specifies whether the Search Service should enforce that non-customer resources are encrypted. Defaults to `false`. CustomerManagedKeyEnforcementEnabled *bool `pulumi:"customerManagedKeyEnforcementEnabled"` // Specifies the Hosting Mode, which allows for High Density partitions (that allow for up to 1000 indexes) should be supported. Possible values are `HighDensity` or `Default`. Defaults to `Default`. Changing this forces a new Search Service to be created. // // > **Note:** `hostingMode` can only be configured when `sku` is set to `standard3`. HostingMode *string `pulumi:"hostingMode"` // An `identity` block as defined below. Identity *ServiceIdentity `pulumi:"identity"` // Specifies whether the Search Service allows authenticating using API Keys? Defaults to `true`. LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"` // The Azure Region where the Search Service should exist. Changing this forces a new Search Service to be created. Location *string `pulumi:"location"` // The Name which should be used for this Search Service. Changing this forces a new Search Service to be created. Name *string `pulumi:"name"` // Whether to allow trusted Azure services to access a network restricted Search Service? Possible values are `None` and `AzureServices`. Defaults to `None`. NetworkRuleBypassOption *string `pulumi:"networkRuleBypassOption"` // Specifies the number of partitions which should be created. This field cannot be set when using a `free` sku ([see the Microsoft documentation](https://learn.microsoft.com/azure/search/search-sku-tier)). Possible values include `1`, `2`, `3`, `4`, `6`, or `12`. Defaults to `1`. // // > **Note:** when `hostingMode` is set to `highDensity` the maximum number of partitions allowed is `3`. PartitionCount *int `pulumi:"partitionCount"` // Specifies whether Public Network Access is allowed for this resource. Defaults to `true`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // Specifies the number of Replica's which should be created for this Search Service. This field cannot be set when using a `free` sku ([see the Microsoft documentation](https://learn.microsoft.com/azure/search/search-sku-tier)). ReplicaCount *int `pulumi:"replicaCount"` // The name of the Resource Group where the Search Service should exist. Changing this forces a new Search Service to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the Semantic Search SKU which should be used for this Search Service. Possible values include `free` and `standard`. // // > **Note:** The `semanticSearchSku` cannot be defined if your Search Services `sku` is set to `free`. The Semantic Search feature is only available in certain regions, please see the [product documentation](https://learn.microsoft.com/azure/search/semantic-search-overview#availability-and-pricing) for more information. SemanticSearchSku *string `pulumi:"semanticSearchSku"` // The SKU which should be used for this Search Service. Possible values include `basic`, `free`, `standard`, `standard2`, `standard3`, `storageOptimizedL1` and `storageOptimizedL2`. // // > **Note:** The `basic` and `free` SKUs provision the Search Service in a Shared Cluster - the `standard` SKUs use a Dedicated Cluster. // // > **Note:** The SKUs `standard2`, `standard3`, `storageOptimizedL1` and `storageOptimizedL2` are only available by submitting a quota increase request to Microsoft. Please see the [product documentation](https://learn.microsoft.com/azure/azure-resource-manager/troubleshooting/error-resource-quota?tabs=azure-cli) on how to submit a quota increase request. // // > **Note:** SKU upgrades between Basic and Standard (S1, S2, S3) tiers from a lower tier to a higher tier (e.g., Basic → S1, S1 → S2, S2 → S3) are supported without recreating the resource. And your region must support the higher tier. All other SKU changes (downgrades, changes from/to Free tier, or changes to/from Storage Optimized tiers) will force creation of a new Search Service. Sku string `pulumi:"sku"` // Specifies a mapping of tags which should be assigned to this Search Service. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Service resource. type ServiceArgs struct { // Specifies a list of inbound IPv4 or CIDRs that are allowed to access the Search Service. If the incoming IP request is from an IP address which is not included in the `allowedIps` it will be blocked by the Search Services firewall. // // > **Note:** The `allowedIps` are only applied if the `publicNetworkAccessEnabled` field has been set to `true`, else all traffic over the public interface will be rejected, even if the `allowedIps` field has been defined. When the `publicNetworkAccessEnabled` field has been set to `false` the private endpoint connections are the only allowed access point to the Search Service. AllowedIps pulumi.StringArrayInput // Specifies the response that the Search Service should return for requests that fail authentication. Possible values include `http401WithBearerChallenge` or `http403`. // // > **Note:** `authenticationFailureMode` can only be configured when using `localAuthenticationEnabled` is set to `true` - which when set together specifies that both API Keys and AzureAD Authentication should be supported. AuthenticationFailureMode pulumi.StringPtrInput // Specifies whether the Search Service should enforce that non-customer resources are encrypted. Defaults to `false`. CustomerManagedKeyEnforcementEnabled pulumi.BoolPtrInput // Specifies the Hosting Mode, which allows for High Density partitions (that allow for up to 1000 indexes) should be supported. Possible values are `HighDensity` or `Default`. Defaults to `Default`. Changing this forces a new Search Service to be created. // // > **Note:** `hostingMode` can only be configured when `sku` is set to `standard3`. HostingMode pulumi.StringPtrInput // An `identity` block as defined below. Identity ServiceIdentityPtrInput // Specifies whether the Search Service allows authenticating using API Keys? Defaults to `true`. LocalAuthenticationEnabled pulumi.BoolPtrInput // The Azure Region where the Search Service should exist. Changing this forces a new Search Service to be created. Location pulumi.StringPtrInput // The Name which should be used for this Search Service. Changing this forces a new Search Service to be created. Name pulumi.StringPtrInput // Whether to allow trusted Azure services to access a network restricted Search Service? Possible values are `None` and `AzureServices`. Defaults to `None`. NetworkRuleBypassOption pulumi.StringPtrInput // Specifies the number of partitions which should be created. This field cannot be set when using a `free` sku ([see the Microsoft documentation](https://learn.microsoft.com/azure/search/search-sku-tier)). Possible values include `1`, `2`, `3`, `4`, `6`, or `12`. Defaults to `1`. // // > **Note:** when `hostingMode` is set to `highDensity` the maximum number of partitions allowed is `3`. PartitionCount pulumi.IntPtrInput // Specifies whether Public Network Access is allowed for this resource. Defaults to `true`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // Specifies the number of Replica's which should be created for this Search Service. This field cannot be set when using a `free` sku ([see the Microsoft documentation](https://learn.microsoft.com/azure/search/search-sku-tier)). ReplicaCount pulumi.IntPtrInput // The name of the Resource Group where the Search Service should exist. Changing this forces a new Search Service to be created. ResourceGroupName pulumi.StringInput
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/search/sharedPrivateLinkService.go
sdk/go/azure/search/sharedPrivateLinkService.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package search 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 Service for an Azure Search 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/search" // "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 { // test, err := core.NewResourceGroup(ctx, "test", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resourceGroup"), // Location: pulumi.String("east us"), // }) // if err != nil { // return err // } // testService, err := search.NewService(ctx, "test", &search.ServiceArgs{ // Name: pulumi.String("example-search"), // ResourceGroupName: test.Name, // Location: test.Location, // Sku: pulumi.String("standard"), // }) // if err != nil { // return err // } // testAccount, err := storage.NewAccount(ctx, "test", &storage.AccountArgs{ // Name: pulumi.String("example"), // ResourceGroupName: test.Name, // Location: test.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // _, err = search.NewSharedPrivateLinkService(ctx, "test", &search.SharedPrivateLinkServiceArgs{ // Name: pulumi.String("example-spl"), // SearchServiceId: testService.ID(), // SubresourceName: pulumi.String("blob"), // TargetResourceId: testAccount.ID(), // RequestMessage: pulumi.String("please approve"), // }) // 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.Search` - 2025-05-01 // // ## Import // // Azure Search Shared Private Link Resource can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:search/sharedPrivateLinkService:SharedPrivateLinkService example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Search/searchServices/service1/sharedPrivateLinkResources/resource1 // ``` type SharedPrivateLinkService struct { pulumi.CustomResourceState // Specify the name of the Azure Search Shared Private Link Resource. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specify the request message for requesting approval of the Shared Private Link Enabled Remote Resource. RequestMessage pulumi.StringPtrOutput `pulumi:"requestMessage"` // Specify the id of the Azure Search Service. Changing this forces a new resource to be created. SearchServiceId pulumi.StringOutput `pulumi:"searchServiceId"` // The status of a private endpoint connection. Possible values are Pending, Approved, Rejected or Disconnected. Status pulumi.StringOutput `pulumi:"status"` // Specify the sub resource name which the Azure Search Private Endpoint is able to connect to. Changing this forces a new resource to be created. SubresourceName pulumi.StringOutput `pulumi:"subresourceName"` // Specify the ID of the Shared Private Link Enabled Remote Resource which this Azure Search Private Endpoint should be connected to. Changing this forces a new resource to be created. // // > **Note:** The sub resource name should match with the type of the target resource id that's being specified. TargetResourceId pulumi.StringOutput `pulumi:"targetResourceId"` } // NewSharedPrivateLinkService registers a new resource with the given unique name, arguments, and options. func NewSharedPrivateLinkService(ctx *pulumi.Context, name string, args *SharedPrivateLinkServiceArgs, opts ...pulumi.ResourceOption) (*SharedPrivateLinkService, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.SearchServiceId == nil { return nil, errors.New("invalid value for required argument 'SearchServiceId'") } 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 SharedPrivateLinkService err := ctx.RegisterResource("azure:search/sharedPrivateLinkService:SharedPrivateLinkService", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetSharedPrivateLinkService gets an existing SharedPrivateLinkService 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 GetSharedPrivateLinkService(ctx *pulumi.Context, name string, id pulumi.IDInput, state *SharedPrivateLinkServiceState, opts ...pulumi.ResourceOption) (*SharedPrivateLinkService, error) { var resource SharedPrivateLinkService err := ctx.ReadResource("azure:search/sharedPrivateLinkService:SharedPrivateLinkService", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering SharedPrivateLinkService resources. type sharedPrivateLinkServiceState struct { // Specify the name of the Azure Search Shared Private Link Resource. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specify the request message for requesting approval of the Shared Private Link Enabled Remote Resource. RequestMessage *string `pulumi:"requestMessage"` // Specify the id of the Azure Search Service. Changing this forces a new resource to be created. SearchServiceId *string `pulumi:"searchServiceId"` // The status of a private endpoint connection. Possible values are Pending, Approved, Rejected or Disconnected. Status *string `pulumi:"status"` // Specify the sub resource name which the Azure Search Private Endpoint is able to connect to. Changing this forces a new resource to be created. SubresourceName *string `pulumi:"subresourceName"` // Specify the ID of the Shared Private Link Enabled Remote Resource which this Azure Search Private Endpoint should be connected to. Changing this forces a new resource to be created. // // > **Note:** The sub resource name should match with the type of the target resource id that's being specified. TargetResourceId *string `pulumi:"targetResourceId"` } type SharedPrivateLinkServiceState struct { // Specify the name of the Azure Search Shared Private Link Resource. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specify the request message for requesting approval of the Shared Private Link Enabled Remote Resource. RequestMessage pulumi.StringPtrInput // Specify the id of the Azure Search Service. Changing this forces a new resource to be created. SearchServiceId pulumi.StringPtrInput // The status of a private endpoint connection. Possible values are Pending, Approved, Rejected or Disconnected. Status pulumi.StringPtrInput // Specify the sub resource name which the Azure Search Private Endpoint is able to connect to. Changing this forces a new resource to be created. SubresourceName pulumi.StringPtrInput // Specify the ID of the Shared Private Link Enabled Remote Resource which this Azure Search Private Endpoint should be connected to. Changing this forces a new resource to be created. // // > **Note:** The sub resource name should match with the type of the target resource id that's being specified. TargetResourceId pulumi.StringPtrInput } func (SharedPrivateLinkServiceState) ElementType() reflect.Type { return reflect.TypeOf((*sharedPrivateLinkServiceState)(nil)).Elem() } type sharedPrivateLinkServiceArgs struct { // Specify the name of the Azure Search Shared Private Link Resource. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specify the request message for requesting approval of the Shared Private Link Enabled Remote Resource. RequestMessage *string `pulumi:"requestMessage"` // Specify the id of the Azure Search Service. Changing this forces a new resource to be created. SearchServiceId string `pulumi:"searchServiceId"` // Specify the sub resource name which the Azure Search Private Endpoint is able to connect to. Changing this forces a new resource to be created. SubresourceName string `pulumi:"subresourceName"` // Specify the ID of the Shared Private Link Enabled Remote Resource which this Azure Search Private Endpoint should be connected to. Changing this forces a new resource to be created. // // > **Note:** The sub resource name should match with the type of the target resource id that's being specified. TargetResourceId string `pulumi:"targetResourceId"` } // The set of arguments for constructing a SharedPrivateLinkService resource. type SharedPrivateLinkServiceArgs struct { // Specify the name of the Azure Search Shared Private Link Resource. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specify the request message for requesting approval of the Shared Private Link Enabled Remote Resource. RequestMessage pulumi.StringPtrInput // Specify the id of the Azure Search Service. Changing this forces a new resource to be created. SearchServiceId pulumi.StringInput // Specify the sub resource name which the Azure Search Private Endpoint is able to connect to. Changing this forces a new resource to be created. SubresourceName pulumi.StringInput // Specify the ID of the Shared Private Link Enabled Remote Resource which this Azure Search Private Endpoint should be connected to. Changing this forces a new resource to be created. // // > **Note:** The sub resource name should match with the type of the target resource id that's being specified. TargetResourceId pulumi.StringInput } func (SharedPrivateLinkServiceArgs) ElementType() reflect.Type { return reflect.TypeOf((*sharedPrivateLinkServiceArgs)(nil)).Elem() } type SharedPrivateLinkServiceInput interface { pulumi.Input ToSharedPrivateLinkServiceOutput() SharedPrivateLinkServiceOutput ToSharedPrivateLinkServiceOutputWithContext(ctx context.Context) SharedPrivateLinkServiceOutput } func (*SharedPrivateLinkService) ElementType() reflect.Type { return reflect.TypeOf((**SharedPrivateLinkService)(nil)).Elem() } func (i *SharedPrivateLinkService) ToSharedPrivateLinkServiceOutput() SharedPrivateLinkServiceOutput { return i.ToSharedPrivateLinkServiceOutputWithContext(context.Background()) } func (i *SharedPrivateLinkService) ToSharedPrivateLinkServiceOutputWithContext(ctx context.Context) SharedPrivateLinkServiceOutput { return pulumi.ToOutputWithContext(ctx, i).(SharedPrivateLinkServiceOutput) } // SharedPrivateLinkServiceArrayInput is an input type that accepts SharedPrivateLinkServiceArray and SharedPrivateLinkServiceArrayOutput values. // You can construct a concrete instance of `SharedPrivateLinkServiceArrayInput` via: // // SharedPrivateLinkServiceArray{ SharedPrivateLinkServiceArgs{...} } type SharedPrivateLinkServiceArrayInput interface { pulumi.Input ToSharedPrivateLinkServiceArrayOutput() SharedPrivateLinkServiceArrayOutput ToSharedPrivateLinkServiceArrayOutputWithContext(context.Context) SharedPrivateLinkServiceArrayOutput } type SharedPrivateLinkServiceArray []SharedPrivateLinkServiceInput func (SharedPrivateLinkServiceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*SharedPrivateLinkService)(nil)).Elem() } func (i SharedPrivateLinkServiceArray) ToSharedPrivateLinkServiceArrayOutput() SharedPrivateLinkServiceArrayOutput { return i.ToSharedPrivateLinkServiceArrayOutputWithContext(context.Background()) } func (i SharedPrivateLinkServiceArray) ToSharedPrivateLinkServiceArrayOutputWithContext(ctx context.Context) SharedPrivateLinkServiceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(SharedPrivateLinkServiceArrayOutput) } // SharedPrivateLinkServiceMapInput is an input type that accepts SharedPrivateLinkServiceMap and SharedPrivateLinkServiceMapOutput values. // You can construct a concrete instance of `SharedPrivateLinkServiceMapInput` via: // // SharedPrivateLinkServiceMap{ "key": SharedPrivateLinkServiceArgs{...} } type SharedPrivateLinkServiceMapInput interface { pulumi.Input ToSharedPrivateLinkServiceMapOutput() SharedPrivateLinkServiceMapOutput ToSharedPrivateLinkServiceMapOutputWithContext(context.Context) SharedPrivateLinkServiceMapOutput } type SharedPrivateLinkServiceMap map[string]SharedPrivateLinkServiceInput func (SharedPrivateLinkServiceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SharedPrivateLinkService)(nil)).Elem() } func (i SharedPrivateLinkServiceMap) ToSharedPrivateLinkServiceMapOutput() SharedPrivateLinkServiceMapOutput { return i.ToSharedPrivateLinkServiceMapOutputWithContext(context.Background()) } func (i SharedPrivateLinkServiceMap) ToSharedPrivateLinkServiceMapOutputWithContext(ctx context.Context) SharedPrivateLinkServiceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(SharedPrivateLinkServiceMapOutput) } type SharedPrivateLinkServiceOutput struct{ *pulumi.OutputState } func (SharedPrivateLinkServiceOutput) ElementType() reflect.Type { return reflect.TypeOf((**SharedPrivateLinkService)(nil)).Elem() } func (o SharedPrivateLinkServiceOutput) ToSharedPrivateLinkServiceOutput() SharedPrivateLinkServiceOutput { return o } func (o SharedPrivateLinkServiceOutput) ToSharedPrivateLinkServiceOutputWithContext(ctx context.Context) SharedPrivateLinkServiceOutput { return o } // Specify the name of the Azure Search Shared Private Link Resource. Changing this forces a new resource to be created. func (o SharedPrivateLinkServiceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *SharedPrivateLinkService) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specify the request message for requesting approval of the Shared Private Link Enabled Remote Resource. func (o SharedPrivateLinkServiceOutput) RequestMessage() pulumi.StringPtrOutput { return o.ApplyT(func(v *SharedPrivateLinkService) pulumi.StringPtrOutput { return v.RequestMessage }).(pulumi.StringPtrOutput) } // Specify the id of the Azure Search Service. Changing this forces a new resource to be created. func (o SharedPrivateLinkServiceOutput) SearchServiceId() pulumi.StringOutput { return o.ApplyT(func(v *SharedPrivateLinkService) pulumi.StringOutput { return v.SearchServiceId }).(pulumi.StringOutput) } // The status of a private endpoint connection. Possible values are Pending, Approved, Rejected or Disconnected. func (o SharedPrivateLinkServiceOutput) Status() pulumi.StringOutput { return o.ApplyT(func(v *SharedPrivateLinkService) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput) } // Specify the sub resource name which the Azure Search Private Endpoint is able to connect to. Changing this forces a new resource to be created. func (o SharedPrivateLinkServiceOutput) SubresourceName() pulumi.StringOutput { return o.ApplyT(func(v *SharedPrivateLinkService) pulumi.StringOutput { return v.SubresourceName }).(pulumi.StringOutput) } // Specify the ID of the Shared Private Link Enabled Remote Resource which this Azure Search Private Endpoint should be connected to. Changing this forces a new resource to be created. // // > **Note:** The sub resource name should match with the type of the target resource id that's being specified. func (o SharedPrivateLinkServiceOutput) TargetResourceId() pulumi.StringOutput { return o.ApplyT(func(v *SharedPrivateLinkService) pulumi.StringOutput { return v.TargetResourceId }).(pulumi.StringOutput) } type SharedPrivateLinkServiceArrayOutput struct{ *pulumi.OutputState } func (SharedPrivateLinkServiceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*SharedPrivateLinkService)(nil)).Elem() } func (o SharedPrivateLinkServiceArrayOutput) ToSharedPrivateLinkServiceArrayOutput() SharedPrivateLinkServiceArrayOutput { return o } func (o SharedPrivateLinkServiceArrayOutput) ToSharedPrivateLinkServiceArrayOutputWithContext(ctx context.Context) SharedPrivateLinkServiceArrayOutput { return o } func (o SharedPrivateLinkServiceArrayOutput) Index(i pulumi.IntInput) SharedPrivateLinkServiceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SharedPrivateLinkService { return vs[0].([]*SharedPrivateLinkService)[vs[1].(int)] }).(SharedPrivateLinkServiceOutput) } type SharedPrivateLinkServiceMapOutput struct{ *pulumi.OutputState } func (SharedPrivateLinkServiceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*SharedPrivateLinkService)(nil)).Elem() } func (o SharedPrivateLinkServiceMapOutput) ToSharedPrivateLinkServiceMapOutput() SharedPrivateLinkServiceMapOutput { return o } func (o SharedPrivateLinkServiceMapOutput) ToSharedPrivateLinkServiceMapOutputWithContext(ctx context.Context) SharedPrivateLinkServiceMapOutput { return o } func (o SharedPrivateLinkServiceMapOutput) MapIndex(k pulumi.StringInput) SharedPrivateLinkServiceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SharedPrivateLinkService { return vs[0].(map[string]*SharedPrivateLinkService)[vs[1].(string)] }).(SharedPrivateLinkServiceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*SharedPrivateLinkServiceInput)(nil)).Elem(), &SharedPrivateLinkService{}) pulumi.RegisterInputType(reflect.TypeOf((*SharedPrivateLinkServiceArrayInput)(nil)).Elem(), SharedPrivateLinkServiceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*SharedPrivateLinkServiceMapInput)(nil)).Elem(), SharedPrivateLinkServiceMap{}) pulumi.RegisterOutputType(SharedPrivateLinkServiceOutput{}) pulumi.RegisterOutputType(SharedPrivateLinkServiceArrayOutput{}) pulumi.RegisterOutputType(SharedPrivateLinkServiceMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/search/getService.go
sdk/go/azure/search/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 search import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Search 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/search" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // _ = search.LookupServiceOutput(ctx, search.GetServiceOutputArgs{ // Name: pulumi.String("example-search-service"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Search` - 2025-05-01 func LookupService(ctx *pulumi.Context, args *LookupServiceArgs, opts ...pulumi.InvokeOption) (*LookupServiceResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupServiceResult err := ctx.Invoke("azure:search/getService:getService", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getService. type LookupServiceArgs struct { // The Name of the Search Service. Name string `pulumi:"name"` // The name of the Resource Group where the Search Service exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getService. type LookupServiceResult struct { // Describes whether the search service is compliant or not with respect to having non-customer encrypted resources. If a service has more than one non-customer encrypted resource and `Enforcement` is `enabled` then the service will be marked as `NonCompliant`. If all the resources are customer encrypted, then the service will be marked as `Compliant`. CustomerManagedKeyEncryptionComplianceStatus string `pulumi:"customerManagedKeyEncryptionComplianceStatus"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // An `identity` block as defined below. Identities []GetServiceIdentity `pulumi:"identities"` // The name of this Query Key. Name string `pulumi:"name"` // The number of partitions which have been created. PartitionCount int `pulumi:"partitionCount"` // The Primary Key used for Search Service Administration. PrimaryKey string `pulumi:"primaryKey"` // Whether or not public network access is enabled for this resource. PublicNetworkAccessEnabled bool `pulumi:"publicNetworkAccessEnabled"` // A `queryKeys` block as defined below. QueryKeys []GetServiceQueryKey `pulumi:"queryKeys"` // The number of replica's which have been created. ReplicaCount int `pulumi:"replicaCount"` ResourceGroupName string `pulumi:"resourceGroupName"` // The Secondary Key used for Search Service Administration. SecondaryKey string `pulumi:"secondaryKey"` // A mapping of tags assigned to the resource. Tags map[string]string `pulumi:"tags"` } func LookupServiceOutput(ctx *pulumi.Context, args LookupServiceOutputArgs, opts ...pulumi.InvokeOption) LookupServiceResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupServiceResultOutput, error) { args := v.(LookupServiceArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:search/getService:getService", args, LookupServiceResultOutput{}, options).(LookupServiceResultOutput), nil }).(LookupServiceResultOutput) } // A collection of arguments for invoking getService. type LookupServiceOutputArgs struct { // The Name of the Search Service. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Search Service exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupServiceOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupServiceArgs)(nil)).Elem() } // A collection of values returned by getService. type LookupServiceResultOutput struct{ *pulumi.OutputState } func (LookupServiceResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupServiceResult)(nil)).Elem() } func (o LookupServiceResultOutput) ToLookupServiceResultOutput() LookupServiceResultOutput { return o } func (o LookupServiceResultOutput) ToLookupServiceResultOutputWithContext(ctx context.Context) LookupServiceResultOutput { return o } // Describes whether the search service is compliant or not with respect to having non-customer encrypted resources. If a service has more than one non-customer encrypted resource and `Enforcement` is `enabled` then the service will be marked as `NonCompliant`. If all the resources are customer encrypted, then the service will be marked as `Compliant`. func (o LookupServiceResultOutput) CustomerManagedKeyEncryptionComplianceStatus() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.CustomerManagedKeyEncryptionComplianceStatus }).(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) } // An `identity` block as defined below. func (o LookupServiceResultOutput) Identities() GetServiceIdentityArrayOutput { return o.ApplyT(func(v LookupServiceResult) []GetServiceIdentity { return v.Identities }).(GetServiceIdentityArrayOutput) } // The name of this Query Key. func (o LookupServiceResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.Name }).(pulumi.StringOutput) } // The number of partitions which have been created. func (o LookupServiceResultOutput) PartitionCount() pulumi.IntOutput { return o.ApplyT(func(v LookupServiceResult) int { return v.PartitionCount }).(pulumi.IntOutput) } // The Primary Key used for Search Service Administration. func (o LookupServiceResultOutput) PrimaryKey() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.PrimaryKey }).(pulumi.StringOutput) } // Whether or not public network access is enabled for this resource. func (o LookupServiceResultOutput) PublicNetworkAccessEnabled() pulumi.BoolOutput { return o.ApplyT(func(v LookupServiceResult) bool { return v.PublicNetworkAccessEnabled }).(pulumi.BoolOutput) } // A `queryKeys` block as defined below. func (o LookupServiceResultOutput) QueryKeys() GetServiceQueryKeyArrayOutput { return o.ApplyT(func(v LookupServiceResult) []GetServiceQueryKey { return v.QueryKeys }).(GetServiceQueryKeyArrayOutput) } // The number of replica's which have been created. func (o LookupServiceResultOutput) ReplicaCount() pulumi.IntOutput { return o.ApplyT(func(v LookupServiceResult) int { return v.ReplicaCount }).(pulumi.IntOutput) } func (o LookupServiceResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // The Secondary Key used for Search Service Administration. func (o LookupServiceResultOutput) SecondaryKey() pulumi.StringOutput { return o.ApplyT(func(v LookupServiceResult) string { return v.SecondaryKey }).(pulumi.StringOutput) } // A mapping of tags assigned to the resource. func (o LookupServiceResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupServiceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupServiceResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/backup/init.go
sdk/go/azure/backup/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 backup 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:backup/containerStorageAccount:ContainerStorageAccount": r = &ContainerStorageAccount{} case "azure:backup/policyFileShare:PolicyFileShare": r = &PolicyFileShare{} case "azure:backup/policyVM:PolicyVM": r = &PolicyVM{} case "azure:backup/policyVMWorkload:PolicyVMWorkload": r = &PolicyVMWorkload{} case "azure:backup/protectedFileShare:ProtectedFileShare": r = &ProtectedFileShare{} case "azure:backup/protectedVM:ProtectedVM": r = &ProtectedVM{} 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", "backup/containerStorageAccount", &module{version}, ) pulumi.RegisterResourceModule( "azure", "backup/policyFileShare", &module{version}, ) pulumi.RegisterResourceModule( "azure", "backup/policyVM", &module{version}, ) pulumi.RegisterResourceModule( "azure", "backup/policyVMWorkload", &module{version}, ) pulumi.RegisterResourceModule( "azure", "backup/protectedFileShare", &module{version}, ) pulumi.RegisterResourceModule( "azure", "backup/protectedVM", &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/backup/getPolicyFileshare.go
sdk/go/azure/backup/getPolicyFileshare.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package backup 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 File Share Backup Policy. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/backup" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := backup.GetPolicyFileshare(ctx, &backup.GetPolicyFileshareArgs{ // Name: "policy", // RecoveryVaultName: "recovery_vault", // ResourceGroupName: "resource_group", // }, nil) // if err != nil { // return err // } // return nil // }) // } // // ``` func GetPolicyFileshare(ctx *pulumi.Context, args *GetPolicyFileshareArgs, opts ...pulumi.InvokeOption) (*GetPolicyFileshareResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetPolicyFileshareResult err := ctx.Invoke("azure:backup/getPolicyFileshare:getPolicyFileshare", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getPolicyFileshare. type GetPolicyFileshareArgs struct { // Specifies the name of the File Share Backup Policy. Name string `pulumi:"name"` // Specifies the name of the Recovery Services Vault. RecoveryVaultName string `pulumi:"recoveryVaultName"` // The name of the resource group in which the File Share Backup Policy resides. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getPolicyFileshare. type GetPolicyFileshareResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` RecoveryVaultName string `pulumi:"recoveryVaultName"` ResourceGroupName string `pulumi:"resourceGroupName"` } func GetPolicyFileshareOutput(ctx *pulumi.Context, args GetPolicyFileshareOutputArgs, opts ...pulumi.InvokeOption) GetPolicyFileshareResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetPolicyFileshareResultOutput, error) { args := v.(GetPolicyFileshareArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:backup/getPolicyFileshare:getPolicyFileshare", args, GetPolicyFileshareResultOutput{}, options).(GetPolicyFileshareResultOutput), nil }).(GetPolicyFileshareResultOutput) } // A collection of arguments for invoking getPolicyFileshare. type GetPolicyFileshareOutputArgs struct { // Specifies the name of the File Share Backup Policy. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the Recovery Services Vault. RecoveryVaultName pulumi.StringInput `pulumi:"recoveryVaultName"` // The name of the resource group in which the File Share Backup Policy resides. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetPolicyFileshareOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetPolicyFileshareArgs)(nil)).Elem() } // A collection of values returned by getPolicyFileshare. type GetPolicyFileshareResultOutput struct{ *pulumi.OutputState } func (GetPolicyFileshareResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetPolicyFileshareResult)(nil)).Elem() } func (o GetPolicyFileshareResultOutput) ToGetPolicyFileshareResultOutput() GetPolicyFileshareResultOutput { return o } func (o GetPolicyFileshareResultOutput) ToGetPolicyFileshareResultOutputWithContext(ctx context.Context) GetPolicyFileshareResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o GetPolicyFileshareResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyFileshareResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetPolicyFileshareResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyFileshareResult) string { return v.Name }).(pulumi.StringOutput) } func (o GetPolicyFileshareResultOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyFileshareResult) string { return v.RecoveryVaultName }).(pulumi.StringOutput) } func (o GetPolicyFileshareResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetPolicyFileshareResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetPolicyFileshareResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/backup/pulumiTypes.go
sdk/go/azure/backup/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 backup 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 PolicyFileShareBackup struct { // Sets the backup frequency. Possible values are `Daily` and `Hourly`. // // > **Note:** This argument is made available for consistency with VM backup policies and to allow for potential future support of weekly backups Frequency string `pulumi:"frequency"` // A `hourly` block defined as below. This is required when `frequency` is set to `Hourly`. Hourly *PolicyFileShareBackupHourly `pulumi:"hourly"` // The time of day to perform the backup in 24-hour format. Times must be either on the hour or half hour (e.g. 12:00, 12:30, 13:00, etc.) // // > **Note:** `time` is required when `frequency` is set to `Daily`. Time *string `pulumi:"time"` } // PolicyFileShareBackupInput is an input type that accepts PolicyFileShareBackupArgs and PolicyFileShareBackupOutput values. // You can construct a concrete instance of `PolicyFileShareBackupInput` via: // // PolicyFileShareBackupArgs{...} type PolicyFileShareBackupInput interface { pulumi.Input ToPolicyFileShareBackupOutput() PolicyFileShareBackupOutput ToPolicyFileShareBackupOutputWithContext(context.Context) PolicyFileShareBackupOutput } type PolicyFileShareBackupArgs struct { // Sets the backup frequency. Possible values are `Daily` and `Hourly`. // // > **Note:** This argument is made available for consistency with VM backup policies and to allow for potential future support of weekly backups Frequency pulumi.StringInput `pulumi:"frequency"` // A `hourly` block defined as below. This is required when `frequency` is set to `Hourly`. Hourly PolicyFileShareBackupHourlyPtrInput `pulumi:"hourly"` // The time of day to perform the backup in 24-hour format. Times must be either on the hour or half hour (e.g. 12:00, 12:30, 13:00, etc.) // // > **Note:** `time` is required when `frequency` is set to `Daily`. Time pulumi.StringPtrInput `pulumi:"time"` } func (PolicyFileShareBackupArgs) ElementType() reflect.Type { return reflect.TypeOf((*PolicyFileShareBackup)(nil)).Elem() } func (i PolicyFileShareBackupArgs) ToPolicyFileShareBackupOutput() PolicyFileShareBackupOutput { return i.ToPolicyFileShareBackupOutputWithContext(context.Background()) } func (i PolicyFileShareBackupArgs) ToPolicyFileShareBackupOutputWithContext(ctx context.Context) PolicyFileShareBackupOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyFileShareBackupOutput) } func (i PolicyFileShareBackupArgs) ToPolicyFileShareBackupPtrOutput() PolicyFileShareBackupPtrOutput { return i.ToPolicyFileShareBackupPtrOutputWithContext(context.Background()) } func (i PolicyFileShareBackupArgs) ToPolicyFileShareBackupPtrOutputWithContext(ctx context.Context) PolicyFileShareBackupPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyFileShareBackupOutput).ToPolicyFileShareBackupPtrOutputWithContext(ctx) } // PolicyFileShareBackupPtrInput is an input type that accepts PolicyFileShareBackupArgs, PolicyFileShareBackupPtr and PolicyFileShareBackupPtrOutput values. // You can construct a concrete instance of `PolicyFileShareBackupPtrInput` via: // // PolicyFileShareBackupArgs{...} // // or: // // nil type PolicyFileShareBackupPtrInput interface { pulumi.Input ToPolicyFileShareBackupPtrOutput() PolicyFileShareBackupPtrOutput ToPolicyFileShareBackupPtrOutputWithContext(context.Context) PolicyFileShareBackupPtrOutput } type policyFileShareBackupPtrType PolicyFileShareBackupArgs func PolicyFileShareBackupPtr(v *PolicyFileShareBackupArgs) PolicyFileShareBackupPtrInput { return (*policyFileShareBackupPtrType)(v) } func (*policyFileShareBackupPtrType) ElementType() reflect.Type { return reflect.TypeOf((**PolicyFileShareBackup)(nil)).Elem() } func (i *policyFileShareBackupPtrType) ToPolicyFileShareBackupPtrOutput() PolicyFileShareBackupPtrOutput { return i.ToPolicyFileShareBackupPtrOutputWithContext(context.Background()) } func (i *policyFileShareBackupPtrType) ToPolicyFileShareBackupPtrOutputWithContext(ctx context.Context) PolicyFileShareBackupPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyFileShareBackupPtrOutput) } type PolicyFileShareBackupOutput struct{ *pulumi.OutputState } func (PolicyFileShareBackupOutput) ElementType() reflect.Type { return reflect.TypeOf((*PolicyFileShareBackup)(nil)).Elem() } func (o PolicyFileShareBackupOutput) ToPolicyFileShareBackupOutput() PolicyFileShareBackupOutput { return o } func (o PolicyFileShareBackupOutput) ToPolicyFileShareBackupOutputWithContext(ctx context.Context) PolicyFileShareBackupOutput { return o } func (o PolicyFileShareBackupOutput) ToPolicyFileShareBackupPtrOutput() PolicyFileShareBackupPtrOutput { return o.ToPolicyFileShareBackupPtrOutputWithContext(context.Background()) } func (o PolicyFileShareBackupOutput) ToPolicyFileShareBackupPtrOutputWithContext(ctx context.Context) PolicyFileShareBackupPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v PolicyFileShareBackup) *PolicyFileShareBackup { return &v }).(PolicyFileShareBackupPtrOutput) } // Sets the backup frequency. Possible values are `Daily` and `Hourly`. // // > **Note:** This argument is made available for consistency with VM backup policies and to allow for potential future support of weekly backups func (o PolicyFileShareBackupOutput) Frequency() pulumi.StringOutput { return o.ApplyT(func(v PolicyFileShareBackup) string { return v.Frequency }).(pulumi.StringOutput) } // A `hourly` block defined as below. This is required when `frequency` is set to `Hourly`. func (o PolicyFileShareBackupOutput) Hourly() PolicyFileShareBackupHourlyPtrOutput { return o.ApplyT(func(v PolicyFileShareBackup) *PolicyFileShareBackupHourly { return v.Hourly }).(PolicyFileShareBackupHourlyPtrOutput) } // The time of day to perform the backup in 24-hour format. Times must be either on the hour or half hour (e.g. 12:00, 12:30, 13:00, etc.) // // > **Note:** `time` is required when `frequency` is set to `Daily`. func (o PolicyFileShareBackupOutput) Time() pulumi.StringPtrOutput { return o.ApplyT(func(v PolicyFileShareBackup) *string { return v.Time }).(pulumi.StringPtrOutput) } type PolicyFileShareBackupPtrOutput struct{ *pulumi.OutputState } func (PolicyFileShareBackupPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**PolicyFileShareBackup)(nil)).Elem() } func (o PolicyFileShareBackupPtrOutput) ToPolicyFileShareBackupPtrOutput() PolicyFileShareBackupPtrOutput { return o } func (o PolicyFileShareBackupPtrOutput) ToPolicyFileShareBackupPtrOutputWithContext(ctx context.Context) PolicyFileShareBackupPtrOutput { return o } func (o PolicyFileShareBackupPtrOutput) Elem() PolicyFileShareBackupOutput { return o.ApplyT(func(v *PolicyFileShareBackup) PolicyFileShareBackup { if v != nil { return *v } var ret PolicyFileShareBackup return ret }).(PolicyFileShareBackupOutput) } // Sets the backup frequency. Possible values are `Daily` and `Hourly`. // // > **Note:** This argument is made available for consistency with VM backup policies and to allow for potential future support of weekly backups func (o PolicyFileShareBackupPtrOutput) Frequency() pulumi.StringPtrOutput { return o.ApplyT(func(v *PolicyFileShareBackup) *string { if v == nil { return nil } return &v.Frequency }).(pulumi.StringPtrOutput) } // A `hourly` block defined as below. This is required when `frequency` is set to `Hourly`. func (o PolicyFileShareBackupPtrOutput) Hourly() PolicyFileShareBackupHourlyPtrOutput { return o.ApplyT(func(v *PolicyFileShareBackup) *PolicyFileShareBackupHourly { if v == nil { return nil } return v.Hourly }).(PolicyFileShareBackupHourlyPtrOutput) } // The time of day to perform the backup in 24-hour format. Times must be either on the hour or half hour (e.g. 12:00, 12:30, 13:00, etc.) // // > **Note:** `time` is required when `frequency` is set to `Daily`. func (o PolicyFileShareBackupPtrOutput) Time() pulumi.StringPtrOutput { return o.ApplyT(func(v *PolicyFileShareBackup) *string { if v == nil { return nil } return v.Time }).(pulumi.StringPtrOutput) } type PolicyFileShareBackupHourly struct { // Specifies the interval at which backup needs to be triggered. Possible values are `4`, `6`, `8` and `12`. Interval int `pulumi:"interval"` // Specifies the start time of the hourly backup. The time format should be in 24-hour format. Times must be either on the hour or half hour (e.g. 12:00, 12:30, 13:00, etc.). StartTime string `pulumi:"startTime"` // Species the duration of the backup window in hours. Details could be found [here](https://learn.microsoft.com/en-us/azure/backup/backup-azure-files-faq#what-does-the-duration-attribute-in-azure-files-backup-policy-signify-). WindowDuration int `pulumi:"windowDuration"` } // PolicyFileShareBackupHourlyInput is an input type that accepts PolicyFileShareBackupHourlyArgs and PolicyFileShareBackupHourlyOutput values. // You can construct a concrete instance of `PolicyFileShareBackupHourlyInput` via: // // PolicyFileShareBackupHourlyArgs{...} type PolicyFileShareBackupHourlyInput interface { pulumi.Input ToPolicyFileShareBackupHourlyOutput() PolicyFileShareBackupHourlyOutput ToPolicyFileShareBackupHourlyOutputWithContext(context.Context) PolicyFileShareBackupHourlyOutput } type PolicyFileShareBackupHourlyArgs struct { // Specifies the interval at which backup needs to be triggered. Possible values are `4`, `6`, `8` and `12`. Interval pulumi.IntInput `pulumi:"interval"` // Specifies the start time of the hourly backup. The time format should be in 24-hour format. Times must be either on the hour or half hour (e.g. 12:00, 12:30, 13:00, etc.). StartTime pulumi.StringInput `pulumi:"startTime"` // Species the duration of the backup window in hours. Details could be found [here](https://learn.microsoft.com/en-us/azure/backup/backup-azure-files-faq#what-does-the-duration-attribute-in-azure-files-backup-policy-signify-). WindowDuration pulumi.IntInput `pulumi:"windowDuration"` } func (PolicyFileShareBackupHourlyArgs) ElementType() reflect.Type { return reflect.TypeOf((*PolicyFileShareBackupHourly)(nil)).Elem() } func (i PolicyFileShareBackupHourlyArgs) ToPolicyFileShareBackupHourlyOutput() PolicyFileShareBackupHourlyOutput { return i.ToPolicyFileShareBackupHourlyOutputWithContext(context.Background()) } func (i PolicyFileShareBackupHourlyArgs) ToPolicyFileShareBackupHourlyOutputWithContext(ctx context.Context) PolicyFileShareBackupHourlyOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyFileShareBackupHourlyOutput) } func (i PolicyFileShareBackupHourlyArgs) ToPolicyFileShareBackupHourlyPtrOutput() PolicyFileShareBackupHourlyPtrOutput { return i.ToPolicyFileShareBackupHourlyPtrOutputWithContext(context.Background()) } func (i PolicyFileShareBackupHourlyArgs) ToPolicyFileShareBackupHourlyPtrOutputWithContext(ctx context.Context) PolicyFileShareBackupHourlyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyFileShareBackupHourlyOutput).ToPolicyFileShareBackupHourlyPtrOutputWithContext(ctx) } // PolicyFileShareBackupHourlyPtrInput is an input type that accepts PolicyFileShareBackupHourlyArgs, PolicyFileShareBackupHourlyPtr and PolicyFileShareBackupHourlyPtrOutput values. // You can construct a concrete instance of `PolicyFileShareBackupHourlyPtrInput` via: // // PolicyFileShareBackupHourlyArgs{...} // // or: // // nil type PolicyFileShareBackupHourlyPtrInput interface { pulumi.Input ToPolicyFileShareBackupHourlyPtrOutput() PolicyFileShareBackupHourlyPtrOutput ToPolicyFileShareBackupHourlyPtrOutputWithContext(context.Context) PolicyFileShareBackupHourlyPtrOutput } type policyFileShareBackupHourlyPtrType PolicyFileShareBackupHourlyArgs func PolicyFileShareBackupHourlyPtr(v *PolicyFileShareBackupHourlyArgs) PolicyFileShareBackupHourlyPtrInput { return (*policyFileShareBackupHourlyPtrType)(v) } func (*policyFileShareBackupHourlyPtrType) ElementType() reflect.Type { return reflect.TypeOf((**PolicyFileShareBackupHourly)(nil)).Elem() } func (i *policyFileShareBackupHourlyPtrType) ToPolicyFileShareBackupHourlyPtrOutput() PolicyFileShareBackupHourlyPtrOutput { return i.ToPolicyFileShareBackupHourlyPtrOutputWithContext(context.Background()) } func (i *policyFileShareBackupHourlyPtrType) ToPolicyFileShareBackupHourlyPtrOutputWithContext(ctx context.Context) PolicyFileShareBackupHourlyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyFileShareBackupHourlyPtrOutput) } type PolicyFileShareBackupHourlyOutput struct{ *pulumi.OutputState } func (PolicyFileShareBackupHourlyOutput) ElementType() reflect.Type { return reflect.TypeOf((*PolicyFileShareBackupHourly)(nil)).Elem() } func (o PolicyFileShareBackupHourlyOutput) ToPolicyFileShareBackupHourlyOutput() PolicyFileShareBackupHourlyOutput { return o } func (o PolicyFileShareBackupHourlyOutput) ToPolicyFileShareBackupHourlyOutputWithContext(ctx context.Context) PolicyFileShareBackupHourlyOutput { return o } func (o PolicyFileShareBackupHourlyOutput) ToPolicyFileShareBackupHourlyPtrOutput() PolicyFileShareBackupHourlyPtrOutput { return o.ToPolicyFileShareBackupHourlyPtrOutputWithContext(context.Background()) } func (o PolicyFileShareBackupHourlyOutput) ToPolicyFileShareBackupHourlyPtrOutputWithContext(ctx context.Context) PolicyFileShareBackupHourlyPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v PolicyFileShareBackupHourly) *PolicyFileShareBackupHourly { return &v }).(PolicyFileShareBackupHourlyPtrOutput) } // Specifies the interval at which backup needs to be triggered. Possible values are `4`, `6`, `8` and `12`. func (o PolicyFileShareBackupHourlyOutput) Interval() pulumi.IntOutput { return o.ApplyT(func(v PolicyFileShareBackupHourly) int { return v.Interval }).(pulumi.IntOutput) } // Specifies the start time of the hourly backup. The time format should be in 24-hour format. Times must be either on the hour or half hour (e.g. 12:00, 12:30, 13:00, etc.). func (o PolicyFileShareBackupHourlyOutput) StartTime() pulumi.StringOutput { return o.ApplyT(func(v PolicyFileShareBackupHourly) string { return v.StartTime }).(pulumi.StringOutput) } // Species the duration of the backup window in hours. Details could be found [here](https://learn.microsoft.com/en-us/azure/backup/backup-azure-files-faq#what-does-the-duration-attribute-in-azure-files-backup-policy-signify-). func (o PolicyFileShareBackupHourlyOutput) WindowDuration() pulumi.IntOutput { return o.ApplyT(func(v PolicyFileShareBackupHourly) int { return v.WindowDuration }).(pulumi.IntOutput) } type PolicyFileShareBackupHourlyPtrOutput struct{ *pulumi.OutputState } func (PolicyFileShareBackupHourlyPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**PolicyFileShareBackupHourly)(nil)).Elem() } func (o PolicyFileShareBackupHourlyPtrOutput) ToPolicyFileShareBackupHourlyPtrOutput() PolicyFileShareBackupHourlyPtrOutput { return o } func (o PolicyFileShareBackupHourlyPtrOutput) ToPolicyFileShareBackupHourlyPtrOutputWithContext(ctx context.Context) PolicyFileShareBackupHourlyPtrOutput { return o } func (o PolicyFileShareBackupHourlyPtrOutput) Elem() PolicyFileShareBackupHourlyOutput { return o.ApplyT(func(v *PolicyFileShareBackupHourly) PolicyFileShareBackupHourly { if v != nil { return *v } var ret PolicyFileShareBackupHourly return ret }).(PolicyFileShareBackupHourlyOutput) } // Specifies the interval at which backup needs to be triggered. Possible values are `4`, `6`, `8` and `12`. func (o PolicyFileShareBackupHourlyPtrOutput) Interval() pulumi.IntPtrOutput { return o.ApplyT(func(v *PolicyFileShareBackupHourly) *int { if v == nil { return nil } return &v.Interval }).(pulumi.IntPtrOutput) } // Specifies the start time of the hourly backup. The time format should be in 24-hour format. Times must be either on the hour or half hour (e.g. 12:00, 12:30, 13:00, etc.). func (o PolicyFileShareBackupHourlyPtrOutput) StartTime() pulumi.StringPtrOutput { return o.ApplyT(func(v *PolicyFileShareBackupHourly) *string { if v == nil { return nil } return &v.StartTime }).(pulumi.StringPtrOutput) } // Species the duration of the backup window in hours. Details could be found [here](https://learn.microsoft.com/en-us/azure/backup/backup-azure-files-faq#what-does-the-duration-attribute-in-azure-files-backup-policy-signify-). func (o PolicyFileShareBackupHourlyPtrOutput) WindowDuration() pulumi.IntPtrOutput { return o.ApplyT(func(v *PolicyFileShareBackupHourly) *int { if v == nil { return nil } return &v.WindowDuration }).(pulumi.IntPtrOutput) } type PolicyFileShareRetentionDaily struct { // The number of daily backups to keep. Must be between `1` and `200` (inclusive) Count int `pulumi:"count"` } // PolicyFileShareRetentionDailyInput is an input type that accepts PolicyFileShareRetentionDailyArgs and PolicyFileShareRetentionDailyOutput values. // You can construct a concrete instance of `PolicyFileShareRetentionDailyInput` via: // // PolicyFileShareRetentionDailyArgs{...} type PolicyFileShareRetentionDailyInput interface { pulumi.Input ToPolicyFileShareRetentionDailyOutput() PolicyFileShareRetentionDailyOutput ToPolicyFileShareRetentionDailyOutputWithContext(context.Context) PolicyFileShareRetentionDailyOutput } type PolicyFileShareRetentionDailyArgs struct { // The number of daily backups to keep. Must be between `1` and `200` (inclusive) Count pulumi.IntInput `pulumi:"count"` } func (PolicyFileShareRetentionDailyArgs) ElementType() reflect.Type { return reflect.TypeOf((*PolicyFileShareRetentionDaily)(nil)).Elem() } func (i PolicyFileShareRetentionDailyArgs) ToPolicyFileShareRetentionDailyOutput() PolicyFileShareRetentionDailyOutput { return i.ToPolicyFileShareRetentionDailyOutputWithContext(context.Background()) } func (i PolicyFileShareRetentionDailyArgs) ToPolicyFileShareRetentionDailyOutputWithContext(ctx context.Context) PolicyFileShareRetentionDailyOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyFileShareRetentionDailyOutput) } func (i PolicyFileShareRetentionDailyArgs) ToPolicyFileShareRetentionDailyPtrOutput() PolicyFileShareRetentionDailyPtrOutput { return i.ToPolicyFileShareRetentionDailyPtrOutputWithContext(context.Background()) } func (i PolicyFileShareRetentionDailyArgs) ToPolicyFileShareRetentionDailyPtrOutputWithContext(ctx context.Context) PolicyFileShareRetentionDailyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyFileShareRetentionDailyOutput).ToPolicyFileShareRetentionDailyPtrOutputWithContext(ctx) } // PolicyFileShareRetentionDailyPtrInput is an input type that accepts PolicyFileShareRetentionDailyArgs, PolicyFileShareRetentionDailyPtr and PolicyFileShareRetentionDailyPtrOutput values. // You can construct a concrete instance of `PolicyFileShareRetentionDailyPtrInput` via: // // PolicyFileShareRetentionDailyArgs{...} // // or: // // nil type PolicyFileShareRetentionDailyPtrInput interface { pulumi.Input ToPolicyFileShareRetentionDailyPtrOutput() PolicyFileShareRetentionDailyPtrOutput ToPolicyFileShareRetentionDailyPtrOutputWithContext(context.Context) PolicyFileShareRetentionDailyPtrOutput } type policyFileShareRetentionDailyPtrType PolicyFileShareRetentionDailyArgs func PolicyFileShareRetentionDailyPtr(v *PolicyFileShareRetentionDailyArgs) PolicyFileShareRetentionDailyPtrInput { return (*policyFileShareRetentionDailyPtrType)(v) } func (*policyFileShareRetentionDailyPtrType) ElementType() reflect.Type { return reflect.TypeOf((**PolicyFileShareRetentionDaily)(nil)).Elem() } func (i *policyFileShareRetentionDailyPtrType) ToPolicyFileShareRetentionDailyPtrOutput() PolicyFileShareRetentionDailyPtrOutput { return i.ToPolicyFileShareRetentionDailyPtrOutputWithContext(context.Background()) } func (i *policyFileShareRetentionDailyPtrType) ToPolicyFileShareRetentionDailyPtrOutputWithContext(ctx context.Context) PolicyFileShareRetentionDailyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyFileShareRetentionDailyPtrOutput) } type PolicyFileShareRetentionDailyOutput struct{ *pulumi.OutputState } func (PolicyFileShareRetentionDailyOutput) ElementType() reflect.Type { return reflect.TypeOf((*PolicyFileShareRetentionDaily)(nil)).Elem() } func (o PolicyFileShareRetentionDailyOutput) ToPolicyFileShareRetentionDailyOutput() PolicyFileShareRetentionDailyOutput { return o } func (o PolicyFileShareRetentionDailyOutput) ToPolicyFileShareRetentionDailyOutputWithContext(ctx context.Context) PolicyFileShareRetentionDailyOutput { return o } func (o PolicyFileShareRetentionDailyOutput) ToPolicyFileShareRetentionDailyPtrOutput() PolicyFileShareRetentionDailyPtrOutput { return o.ToPolicyFileShareRetentionDailyPtrOutputWithContext(context.Background()) } func (o PolicyFileShareRetentionDailyOutput) ToPolicyFileShareRetentionDailyPtrOutputWithContext(ctx context.Context) PolicyFileShareRetentionDailyPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v PolicyFileShareRetentionDaily) *PolicyFileShareRetentionDaily { return &v }).(PolicyFileShareRetentionDailyPtrOutput) } // The number of daily backups to keep. Must be between `1` and `200` (inclusive) func (o PolicyFileShareRetentionDailyOutput) Count() pulumi.IntOutput { return o.ApplyT(func(v PolicyFileShareRetentionDaily) int { return v.Count }).(pulumi.IntOutput) } type PolicyFileShareRetentionDailyPtrOutput struct{ *pulumi.OutputState } func (PolicyFileShareRetentionDailyPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**PolicyFileShareRetentionDaily)(nil)).Elem() } func (o PolicyFileShareRetentionDailyPtrOutput) ToPolicyFileShareRetentionDailyPtrOutput() PolicyFileShareRetentionDailyPtrOutput { return o } func (o PolicyFileShareRetentionDailyPtrOutput) ToPolicyFileShareRetentionDailyPtrOutputWithContext(ctx context.Context) PolicyFileShareRetentionDailyPtrOutput { return o } func (o PolicyFileShareRetentionDailyPtrOutput) Elem() PolicyFileShareRetentionDailyOutput { return o.ApplyT(func(v *PolicyFileShareRetentionDaily) PolicyFileShareRetentionDaily { if v != nil { return *v } var ret PolicyFileShareRetentionDaily return ret }).(PolicyFileShareRetentionDailyOutput) } // The number of daily backups to keep. Must be between `1` and `200` (inclusive) func (o PolicyFileShareRetentionDailyPtrOutput) Count() pulumi.IntPtrOutput { return o.ApplyT(func(v *PolicyFileShareRetentionDaily) *int { if v == nil { return nil } return &v.Count }).(pulumi.IntPtrOutput) } type PolicyFileShareRetentionMonthly struct { // The number of monthly backups to keep. Must be between `1` and `120` Count int `pulumi:"count"` // The days of the month to retain backups of. Must be between `1` and `31`. Days []int `pulumi:"days"` // Including the last day of the month, default to `false`. // // > **Note:** Either `weekdays` and `weeks` or `days` and `includeLastDays` must be specified. IncludeLastDays *bool `pulumi:"includeLastDays"` // The weekday backups to retain . Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. Weekdays []string `pulumi:"weekdays"` // The weeks of the month to retain backups of. Must be one of `First`, `Second`, `Third`, `Fourth`, `Last`. Weeks []string `pulumi:"weeks"` } // PolicyFileShareRetentionMonthlyInput is an input type that accepts PolicyFileShareRetentionMonthlyArgs and PolicyFileShareRetentionMonthlyOutput values. // You can construct a concrete instance of `PolicyFileShareRetentionMonthlyInput` via: // // PolicyFileShareRetentionMonthlyArgs{...} type PolicyFileShareRetentionMonthlyInput interface { pulumi.Input ToPolicyFileShareRetentionMonthlyOutput() PolicyFileShareRetentionMonthlyOutput ToPolicyFileShareRetentionMonthlyOutputWithContext(context.Context) PolicyFileShareRetentionMonthlyOutput } type PolicyFileShareRetentionMonthlyArgs struct { // The number of monthly backups to keep. Must be between `1` and `120` Count pulumi.IntInput `pulumi:"count"` // The days of the month to retain backups of. Must be between `1` and `31`. Days pulumi.IntArrayInput `pulumi:"days"` // Including the last day of the month, default to `false`. // // > **Note:** Either `weekdays` and `weeks` or `days` and `includeLastDays` must be specified. IncludeLastDays pulumi.BoolPtrInput `pulumi:"includeLastDays"` // The weekday backups to retain . Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. Weekdays pulumi.StringArrayInput `pulumi:"weekdays"` // The weeks of the month to retain backups of. Must be one of `First`, `Second`, `Third`, `Fourth`, `Last`. Weeks pulumi.StringArrayInput `pulumi:"weeks"` } func (PolicyFileShareRetentionMonthlyArgs) ElementType() reflect.Type { return reflect.TypeOf((*PolicyFileShareRetentionMonthly)(nil)).Elem() } func (i PolicyFileShareRetentionMonthlyArgs) ToPolicyFileShareRetentionMonthlyOutput() PolicyFileShareRetentionMonthlyOutput { return i.ToPolicyFileShareRetentionMonthlyOutputWithContext(context.Background()) } func (i PolicyFileShareRetentionMonthlyArgs) ToPolicyFileShareRetentionMonthlyOutputWithContext(ctx context.Context) PolicyFileShareRetentionMonthlyOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyFileShareRetentionMonthlyOutput) } func (i PolicyFileShareRetentionMonthlyArgs) ToPolicyFileShareRetentionMonthlyPtrOutput() PolicyFileShareRetentionMonthlyPtrOutput { return i.ToPolicyFileShareRetentionMonthlyPtrOutputWithContext(context.Background()) } func (i PolicyFileShareRetentionMonthlyArgs) ToPolicyFileShareRetentionMonthlyPtrOutputWithContext(ctx context.Context) PolicyFileShareRetentionMonthlyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyFileShareRetentionMonthlyOutput).ToPolicyFileShareRetentionMonthlyPtrOutputWithContext(ctx) } // PolicyFileShareRetentionMonthlyPtrInput is an input type that accepts PolicyFileShareRetentionMonthlyArgs, PolicyFileShareRetentionMonthlyPtr and PolicyFileShareRetentionMonthlyPtrOutput values. // You can construct a concrete instance of `PolicyFileShareRetentionMonthlyPtrInput` via: // // PolicyFileShareRetentionMonthlyArgs{...} // // or: // // nil type PolicyFileShareRetentionMonthlyPtrInput interface { pulumi.Input ToPolicyFileShareRetentionMonthlyPtrOutput() PolicyFileShareRetentionMonthlyPtrOutput ToPolicyFileShareRetentionMonthlyPtrOutputWithContext(context.Context) PolicyFileShareRetentionMonthlyPtrOutput } type policyFileShareRetentionMonthlyPtrType PolicyFileShareRetentionMonthlyArgs func PolicyFileShareRetentionMonthlyPtr(v *PolicyFileShareRetentionMonthlyArgs) PolicyFileShareRetentionMonthlyPtrInput { return (*policyFileShareRetentionMonthlyPtrType)(v) } func (*policyFileShareRetentionMonthlyPtrType) ElementType() reflect.Type { return reflect.TypeOf((**PolicyFileShareRetentionMonthly)(nil)).Elem() } func (i *policyFileShareRetentionMonthlyPtrType) ToPolicyFileShareRetentionMonthlyPtrOutput() PolicyFileShareRetentionMonthlyPtrOutput { return i.ToPolicyFileShareRetentionMonthlyPtrOutputWithContext(context.Background()) } func (i *policyFileShareRetentionMonthlyPtrType) ToPolicyFileShareRetentionMonthlyPtrOutputWithContext(ctx context.Context) PolicyFileShareRetentionMonthlyPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyFileShareRetentionMonthlyPtrOutput) } type PolicyFileShareRetentionMonthlyOutput struct{ *pulumi.OutputState } func (PolicyFileShareRetentionMonthlyOutput) ElementType() reflect.Type { return reflect.TypeOf((*PolicyFileShareRetentionMonthly)(nil)).Elem() } func (o PolicyFileShareRetentionMonthlyOutput) ToPolicyFileShareRetentionMonthlyOutput() PolicyFileShareRetentionMonthlyOutput { return o } func (o PolicyFileShareRetentionMonthlyOutput) ToPolicyFileShareRetentionMonthlyOutputWithContext(ctx context.Context) PolicyFileShareRetentionMonthlyOutput { return o } func (o PolicyFileShareRetentionMonthlyOutput) ToPolicyFileShareRetentionMonthlyPtrOutput() PolicyFileShareRetentionMonthlyPtrOutput { return o.ToPolicyFileShareRetentionMonthlyPtrOutputWithContext(context.Background()) } func (o PolicyFileShareRetentionMonthlyOutput) ToPolicyFileShareRetentionMonthlyPtrOutputWithContext(ctx context.Context) PolicyFileShareRetentionMonthlyPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v PolicyFileShareRetentionMonthly) *PolicyFileShareRetentionMonthly { return &v }).(PolicyFileShareRetentionMonthlyPtrOutput) } // The number of monthly backups to keep. Must be between `1` and `120` func (o PolicyFileShareRetentionMonthlyOutput) Count() pulumi.IntOutput { return o.ApplyT(func(v PolicyFileShareRetentionMonthly) int { return v.Count }).(pulumi.IntOutput) } // The days of the month to retain backups of. Must be between `1` and `31`. func (o PolicyFileShareRetentionMonthlyOutput) Days() pulumi.IntArrayOutput { return o.ApplyT(func(v PolicyFileShareRetentionMonthly) []int { return v.Days }).(pulumi.IntArrayOutput) } // Including the last day of the month, default to `false`. // // > **Note:** Either `weekdays` and `weeks` or `days` and `includeLastDays` must be specified. func (o PolicyFileShareRetentionMonthlyOutput) IncludeLastDays() pulumi.BoolPtrOutput { return o.ApplyT(func(v PolicyFileShareRetentionMonthly) *bool { return v.IncludeLastDays }).(pulumi.BoolPtrOutput) } // The weekday backups to retain . Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. func (o PolicyFileShareRetentionMonthlyOutput) Weekdays() pulumi.StringArrayOutput { return o.ApplyT(func(v PolicyFileShareRetentionMonthly) []string { return v.Weekdays }).(pulumi.StringArrayOutput) } // The weeks of the month to retain backups of. Must be one of `First`, `Second`, `Third`, `Fourth`, `Last`. func (o PolicyFileShareRetentionMonthlyOutput) Weeks() pulumi.StringArrayOutput { return o.ApplyT(func(v PolicyFileShareRetentionMonthly) []string { return v.Weeks }).(pulumi.StringArrayOutput) } type PolicyFileShareRetentionMonthlyPtrOutput struct{ *pulumi.OutputState } func (PolicyFileShareRetentionMonthlyPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**PolicyFileShareRetentionMonthly)(nil)).Elem() } func (o PolicyFileShareRetentionMonthlyPtrOutput) ToPolicyFileShareRetentionMonthlyPtrOutput() PolicyFileShareRetentionMonthlyPtrOutput { return o } func (o PolicyFileShareRetentionMonthlyPtrOutput) ToPolicyFileShareRetentionMonthlyPtrOutputWithContext(ctx context.Context) PolicyFileShareRetentionMonthlyPtrOutput { return o } func (o PolicyFileShareRetentionMonthlyPtrOutput) Elem() PolicyFileShareRetentionMonthlyOutput { return o.ApplyT(func(v *PolicyFileShareRetentionMonthly) PolicyFileShareRetentionMonthly { if v != nil { return *v } var ret PolicyFileShareRetentionMonthly return ret }).(PolicyFileShareRetentionMonthlyOutput) } // The number of monthly backups to keep. Must be between `1` and `120` func (o PolicyFileShareRetentionMonthlyPtrOutput) Count() pulumi.IntPtrOutput { return o.ApplyT(func(v *PolicyFileShareRetentionMonthly) *int { if v == nil { return nil } return &v.Count }).(pulumi.IntPtrOutput) } // The days of the month to retain backups of. Must be between `1` and `31`. func (o PolicyFileShareRetentionMonthlyPtrOutput) Days() pulumi.IntArrayOutput { return o.ApplyT(func(v *PolicyFileShareRetentionMonthly) []int { if v == nil { return nil } return v.Days }).(pulumi.IntArrayOutput) } // Including the last day of the month, default to `false`. // // > **Note:** Either `weekdays` and `weeks` or `days` and `includeLastDays` must be specified. func (o PolicyFileShareRetentionMonthlyPtrOutput) IncludeLastDays() pulumi.BoolPtrOutput { return o.ApplyT(func(v *PolicyFileShareRetentionMonthly) *bool { if v == nil { return nil } return v.IncludeLastDays }).(pulumi.BoolPtrOutput) } // The weekday backups to retain . Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. func (o PolicyFileShareRetentionMonthlyPtrOutput) Weekdays() pulumi.StringArrayOutput { return o.ApplyT(func(v *PolicyFileShareRetentionMonthly) []string { if v == nil { return nil } return v.Weekdays }).(pulumi.StringArrayOutput) } // The weeks of the month to retain backups of. Must be one of `First`, `Second`, `Third`, `Fourth`, `Last`.
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/backup/policyVMWorkload.go
sdk/go/azure/backup/policyVMWorkload.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package backup 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 VM Workload Backup Policy within a Recovery Services vault. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/backup" // "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("example-bpvmw"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVault, err := recoveryservices.NewVault(ctx, "example", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-rsv"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard"), // SoftDeleteEnabled: pulumi.Bool(false), // }) // if err != nil { // return err // } // _, err = backup.NewPolicyVMWorkload(ctx, "example", &backup.PolicyVMWorkloadArgs{ // Name: pulumi.String("example-bpvmw"), // ResourceGroupName: example.Name, // RecoveryVaultName: exampleVault.Name, // WorkloadType: pulumi.String("SQLDataBase"), // Settings: &backup.PolicyVMWorkloadSettingsArgs{ // TimeZone: pulumi.String("UTC"), // CompressionEnabled: pulumi.Bool(false), // }, // ProtectionPolicies: backup.PolicyVMWorkloadProtectionPolicyArray{ // &backup.PolicyVMWorkloadProtectionPolicyArgs{ // PolicyType: pulumi.String("Full"), // Backup: &backup.PolicyVMWorkloadProtectionPolicyBackupArgs{ // Frequency: pulumi.String("Daily"), // Time: pulumi.String("15:00"), // }, // RetentionDaily: &backup.PolicyVMWorkloadProtectionPolicyRetentionDailyArgs{ // Count: pulumi.Int(8), // }, // }, // &backup.PolicyVMWorkloadProtectionPolicyArgs{ // PolicyType: pulumi.String("Log"), // Backup: &backup.PolicyVMWorkloadProtectionPolicyBackupArgs{ // FrequencyInMinutes: pulumi.Int(15), // }, // SimpleRetention: &backup.PolicyVMWorkloadProtectionPolicySimpleRetentionArgs{ // Count: pulumi.Int(8), // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Azure VM Workload Backup Policies can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:backup/policyVMWorkload:PolicyVMWorkload policy1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/vault1/backupPolicies/policy1 // ``` type PolicyVMWorkload struct { pulumi.CustomResourceState // The name of the VM Workload Backup Policy. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `protectionPolicy` blocks as defined below. ProtectionPolicies PolicyVMWorkloadProtectionPolicyArrayOutput `pulumi:"protectionPolicies"` // The name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringOutput `pulumi:"recoveryVaultName"` // The name of the resource group in which to create the VM Workload Backup Policy. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `settings` block as defined below. Settings PolicyVMWorkloadSettingsOutput `pulumi:"settings"` // The VM Workload type for the Backup Policy. Possible values are `SQLDataBase` and `SAPHanaDatabase`. Changing this forces a new resource to be created. WorkloadType pulumi.StringOutput `pulumi:"workloadType"` } // NewPolicyVMWorkload registers a new resource with the given unique name, arguments, and options. func NewPolicyVMWorkload(ctx *pulumi.Context, name string, args *PolicyVMWorkloadArgs, opts ...pulumi.ResourceOption) (*PolicyVMWorkload, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ProtectionPolicies == nil { return nil, errors.New("invalid value for required argument 'ProtectionPolicies'") } if args.RecoveryVaultName == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.Settings == nil { return nil, errors.New("invalid value for required argument 'Settings'") } if args.WorkloadType == nil { return nil, errors.New("invalid value for required argument 'WorkloadType'") } opts = internal.PkgResourceDefaultOpts(opts) var resource PolicyVMWorkload err := ctx.RegisterResource("azure:backup/policyVMWorkload:PolicyVMWorkload", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPolicyVMWorkload gets an existing PolicyVMWorkload 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 GetPolicyVMWorkload(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PolicyVMWorkloadState, opts ...pulumi.ResourceOption) (*PolicyVMWorkload, error) { var resource PolicyVMWorkload err := ctx.ReadResource("azure:backup/policyVMWorkload:PolicyVMWorkload", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering PolicyVMWorkload resources. type policyVMWorkloadState struct { // The name of the VM Workload Backup Policy. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `protectionPolicy` blocks as defined below. ProtectionPolicies []PolicyVMWorkloadProtectionPolicy `pulumi:"protectionPolicies"` // The name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName *string `pulumi:"recoveryVaultName"` // The name of the resource group in which to create the VM Workload Backup Policy. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `settings` block as defined below. Settings *PolicyVMWorkloadSettings `pulumi:"settings"` // The VM Workload type for the Backup Policy. Possible values are `SQLDataBase` and `SAPHanaDatabase`. Changing this forces a new resource to be created. WorkloadType *string `pulumi:"workloadType"` } type PolicyVMWorkloadState struct { // The name of the VM Workload Backup Policy. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `protectionPolicy` blocks as defined below. ProtectionPolicies PolicyVMWorkloadProtectionPolicyArrayInput // The name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringPtrInput // The name of the resource group in which to create the VM Workload Backup Policy. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `settings` block as defined below. Settings PolicyVMWorkloadSettingsPtrInput // The VM Workload type for the Backup Policy. Possible values are `SQLDataBase` and `SAPHanaDatabase`. Changing this forces a new resource to be created. WorkloadType pulumi.StringPtrInput } func (PolicyVMWorkloadState) ElementType() reflect.Type { return reflect.TypeOf((*policyVMWorkloadState)(nil)).Elem() } type policyVMWorkloadArgs struct { // The name of the VM Workload Backup Policy. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `protectionPolicy` blocks as defined below. ProtectionPolicies []PolicyVMWorkloadProtectionPolicy `pulumi:"protectionPolicies"` // The name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName string `pulumi:"recoveryVaultName"` // The name of the resource group in which to create the VM Workload Backup Policy. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `settings` block as defined below. Settings PolicyVMWorkloadSettings `pulumi:"settings"` // The VM Workload type for the Backup Policy. Possible values are `SQLDataBase` and `SAPHanaDatabase`. Changing this forces a new resource to be created. WorkloadType string `pulumi:"workloadType"` } // The set of arguments for constructing a PolicyVMWorkload resource. type PolicyVMWorkloadArgs struct { // The name of the VM Workload Backup Policy. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `protectionPolicy` blocks as defined below. ProtectionPolicies PolicyVMWorkloadProtectionPolicyArrayInput // The name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringInput // The name of the resource group in which to create the VM Workload Backup Policy. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `settings` block as defined below. Settings PolicyVMWorkloadSettingsInput // The VM Workload type for the Backup Policy. Possible values are `SQLDataBase` and `SAPHanaDatabase`. Changing this forces a new resource to be created. WorkloadType pulumi.StringInput } func (PolicyVMWorkloadArgs) ElementType() reflect.Type { return reflect.TypeOf((*policyVMWorkloadArgs)(nil)).Elem() } type PolicyVMWorkloadInput interface { pulumi.Input ToPolicyVMWorkloadOutput() PolicyVMWorkloadOutput ToPolicyVMWorkloadOutputWithContext(ctx context.Context) PolicyVMWorkloadOutput } func (*PolicyVMWorkload) ElementType() reflect.Type { return reflect.TypeOf((**PolicyVMWorkload)(nil)).Elem() } func (i *PolicyVMWorkload) ToPolicyVMWorkloadOutput() PolicyVMWorkloadOutput { return i.ToPolicyVMWorkloadOutputWithContext(context.Background()) } func (i *PolicyVMWorkload) ToPolicyVMWorkloadOutputWithContext(ctx context.Context) PolicyVMWorkloadOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyVMWorkloadOutput) } // PolicyVMWorkloadArrayInput is an input type that accepts PolicyVMWorkloadArray and PolicyVMWorkloadArrayOutput values. // You can construct a concrete instance of `PolicyVMWorkloadArrayInput` via: // // PolicyVMWorkloadArray{ PolicyVMWorkloadArgs{...} } type PolicyVMWorkloadArrayInput interface { pulumi.Input ToPolicyVMWorkloadArrayOutput() PolicyVMWorkloadArrayOutput ToPolicyVMWorkloadArrayOutputWithContext(context.Context) PolicyVMWorkloadArrayOutput } type PolicyVMWorkloadArray []PolicyVMWorkloadInput func (PolicyVMWorkloadArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*PolicyVMWorkload)(nil)).Elem() } func (i PolicyVMWorkloadArray) ToPolicyVMWorkloadArrayOutput() PolicyVMWorkloadArrayOutput { return i.ToPolicyVMWorkloadArrayOutputWithContext(context.Background()) } func (i PolicyVMWorkloadArray) ToPolicyVMWorkloadArrayOutputWithContext(ctx context.Context) PolicyVMWorkloadArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyVMWorkloadArrayOutput) } // PolicyVMWorkloadMapInput is an input type that accepts PolicyVMWorkloadMap and PolicyVMWorkloadMapOutput values. // You can construct a concrete instance of `PolicyVMWorkloadMapInput` via: // // PolicyVMWorkloadMap{ "key": PolicyVMWorkloadArgs{...} } type PolicyVMWorkloadMapInput interface { pulumi.Input ToPolicyVMWorkloadMapOutput() PolicyVMWorkloadMapOutput ToPolicyVMWorkloadMapOutputWithContext(context.Context) PolicyVMWorkloadMapOutput } type PolicyVMWorkloadMap map[string]PolicyVMWorkloadInput func (PolicyVMWorkloadMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PolicyVMWorkload)(nil)).Elem() } func (i PolicyVMWorkloadMap) ToPolicyVMWorkloadMapOutput() PolicyVMWorkloadMapOutput { return i.ToPolicyVMWorkloadMapOutputWithContext(context.Background()) } func (i PolicyVMWorkloadMap) ToPolicyVMWorkloadMapOutputWithContext(ctx context.Context) PolicyVMWorkloadMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyVMWorkloadMapOutput) } type PolicyVMWorkloadOutput struct{ *pulumi.OutputState } func (PolicyVMWorkloadOutput) ElementType() reflect.Type { return reflect.TypeOf((**PolicyVMWorkload)(nil)).Elem() } func (o PolicyVMWorkloadOutput) ToPolicyVMWorkloadOutput() PolicyVMWorkloadOutput { return o } func (o PolicyVMWorkloadOutput) ToPolicyVMWorkloadOutputWithContext(ctx context.Context) PolicyVMWorkloadOutput { return o } // The name of the VM Workload Backup Policy. Changing this forces a new resource to be created. func (o PolicyVMWorkloadOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *PolicyVMWorkload) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `protectionPolicy` blocks as defined below. func (o PolicyVMWorkloadOutput) ProtectionPolicies() PolicyVMWorkloadProtectionPolicyArrayOutput { return o.ApplyT(func(v *PolicyVMWorkload) PolicyVMWorkloadProtectionPolicyArrayOutput { return v.ProtectionPolicies }).(PolicyVMWorkloadProtectionPolicyArrayOutput) } // The name of the Recovery Services Vault to use. Changing this forces a new resource to be created. func (o PolicyVMWorkloadOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v *PolicyVMWorkload) pulumi.StringOutput { return v.RecoveryVaultName }).(pulumi.StringOutput) } // The name of the resource group in which to create the VM Workload Backup Policy. Changing this forces a new resource to be created. func (o PolicyVMWorkloadOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *PolicyVMWorkload) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `settings` block as defined below. func (o PolicyVMWorkloadOutput) Settings() PolicyVMWorkloadSettingsOutput { return o.ApplyT(func(v *PolicyVMWorkload) PolicyVMWorkloadSettingsOutput { return v.Settings }).(PolicyVMWorkloadSettingsOutput) } // The VM Workload type for the Backup Policy. Possible values are `SQLDataBase` and `SAPHanaDatabase`. Changing this forces a new resource to be created. func (o PolicyVMWorkloadOutput) WorkloadType() pulumi.StringOutput { return o.ApplyT(func(v *PolicyVMWorkload) pulumi.StringOutput { return v.WorkloadType }).(pulumi.StringOutput) } type PolicyVMWorkloadArrayOutput struct{ *pulumi.OutputState } func (PolicyVMWorkloadArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*PolicyVMWorkload)(nil)).Elem() } func (o PolicyVMWorkloadArrayOutput) ToPolicyVMWorkloadArrayOutput() PolicyVMWorkloadArrayOutput { return o } func (o PolicyVMWorkloadArrayOutput) ToPolicyVMWorkloadArrayOutputWithContext(ctx context.Context) PolicyVMWorkloadArrayOutput { return o } func (o PolicyVMWorkloadArrayOutput) Index(i pulumi.IntInput) PolicyVMWorkloadOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PolicyVMWorkload { return vs[0].([]*PolicyVMWorkload)[vs[1].(int)] }).(PolicyVMWorkloadOutput) } type PolicyVMWorkloadMapOutput struct{ *pulumi.OutputState } func (PolicyVMWorkloadMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PolicyVMWorkload)(nil)).Elem() } func (o PolicyVMWorkloadMapOutput) ToPolicyVMWorkloadMapOutput() PolicyVMWorkloadMapOutput { return o } func (o PolicyVMWorkloadMapOutput) ToPolicyVMWorkloadMapOutputWithContext(ctx context.Context) PolicyVMWorkloadMapOutput { return o } func (o PolicyVMWorkloadMapOutput) MapIndex(k pulumi.StringInput) PolicyVMWorkloadOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PolicyVMWorkload { return vs[0].(map[string]*PolicyVMWorkload)[vs[1].(string)] }).(PolicyVMWorkloadOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PolicyVMWorkloadInput)(nil)).Elem(), &PolicyVMWorkload{}) pulumi.RegisterInputType(reflect.TypeOf((*PolicyVMWorkloadArrayInput)(nil)).Elem(), PolicyVMWorkloadArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PolicyVMWorkloadMapInput)(nil)).Elem(), PolicyVMWorkloadMap{}) pulumi.RegisterOutputType(PolicyVMWorkloadOutput{}) pulumi.RegisterOutputType(PolicyVMWorkloadArrayOutput{}) pulumi.RegisterOutputType(PolicyVMWorkloadMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/backup/protectedVM.go
sdk/go/azure/backup/protectedVM.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package backup 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 Backup Protected Virtual Machine. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/backup" // "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/recoveryservices" // "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("tfex-recovery_vault"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVault, err := recoveryservices.NewVault(ctx, "example", &recoveryservices.VaultArgs{ // Name: pulumi.String("tfex-recovery-vault"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // examplePolicyVM, err := backup.NewPolicyVM(ctx, "example", &backup.PolicyVMArgs{ // Name: pulumi.String("tfex-recovery-vault-policy"), // ResourceGroupName: exampleResourceGroup.Name, // RecoveryVaultName: exampleVault.Name, // Backup: &backup.PolicyVMBackupArgs{ // Frequency: pulumi.String("Daily"), // Time: pulumi.String("23:00"), // }, // RetentionDaily: &backup.PolicyVMRetentionDailyArgs{ // Count: pulumi.Int(10), // }, // }) // if err != nil { // return err // } // example := compute.LookupVirtualMachineOutput(ctx, compute.GetVirtualMachineOutputArgs{ // Name: pulumi.String("example-vm"), // ResourceGroupName: exampleResourceGroup.Name, // }, nil) // _, err = backup.NewProtectedVM(ctx, "vm1", &backup.ProtectedVMArgs{ // ResourceGroupName: exampleResourceGroup.Name, // RecoveryVaultName: exampleVault.Name, // SourceVmId: pulumi.String(example.ApplyT(func(example compute.GetVirtualMachineResult) (*string, error) { // return &example.Id, nil // }).(pulumi.StringPtrOutput)), // BackupPolicyId: examplePolicyVM.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.RecoveryServices` - 2024-01-01 // // ## Import // // Backup Protected Virtual Machines can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:backup/protectedVM:ProtectedVM item1 "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/example-recovery-vault/backupFabrics/Azure/protectionContainers/iaasvmcontainer;iaasvmcontainerv2;group1;vm1/protectedItems/vm;iaasvmcontainerv2;group1;vm1" // ``` type ProtectedVM struct { pulumi.CustomResourceState BackupPolicyId pulumi.StringPtrOutput `pulumi:"backupPolicyId"` // A list of Disks' Logical Unit Numbers (LUN) to be excluded for VM Protection. ExcludeDiskLuns pulumi.IntArrayOutput `pulumi:"excludeDiskLuns"` // A list of Disks' Logical Unit Numbers (LUN) to be included for VM Protection. IncludeDiskLuns pulumi.IntArrayOutput `pulumi:"includeDiskLuns"` // Specifies Protection state of the backup. Possible values are `Protected`, `BackupsSuspended`, and `ProtectionStopped`. // // > **Note:** `protectionState` cannot be set to `BackupsSuspended` unless the `recoveryservices.Vault` has `immutability` set to `Unlocked` or `Locked`. ProtectionState pulumi.StringOutput `pulumi:"protectionState"` // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringOutput `pulumi:"recoveryVaultName"` // Specifies the name of the Resource Group **associated with** the Recovery Services Vault to use. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the ID of the virtual machine to back up. Changing this forces a new resource to be created. // // > **Note:** After creation, the `sourceVmId` property can be removed without forcing a new resource to be created; however, setting it to a different ID will create a new resource. This allows the source virtual machine to be deleted without having to remove the backup. SourceVmId pulumi.StringOutput `pulumi:"sourceVmId"` } // NewProtectedVM registers a new resource with the given unique name, arguments, and options. func NewProtectedVM(ctx *pulumi.Context, name string, args *ProtectedVMArgs, opts ...pulumi.ResourceOption) (*ProtectedVM, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RecoveryVaultName == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ProtectedVM err := ctx.RegisterResource("azure:backup/protectedVM:ProtectedVM", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetProtectedVM gets an existing ProtectedVM 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 GetProtectedVM(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ProtectedVMState, opts ...pulumi.ResourceOption) (*ProtectedVM, error) { var resource ProtectedVM err := ctx.ReadResource("azure:backup/protectedVM:ProtectedVM", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ProtectedVM resources. type protectedVMState struct { BackupPolicyId *string `pulumi:"backupPolicyId"` // A list of Disks' Logical Unit Numbers (LUN) to be excluded for VM Protection. ExcludeDiskLuns []int `pulumi:"excludeDiskLuns"` // A list of Disks' Logical Unit Numbers (LUN) to be included for VM Protection. IncludeDiskLuns []int `pulumi:"includeDiskLuns"` // Specifies Protection state of the backup. Possible values are `Protected`, `BackupsSuspended`, and `ProtectionStopped`. // // > **Note:** `protectionState` cannot be set to `BackupsSuspended` unless the `recoveryservices.Vault` has `immutability` set to `Unlocked` or `Locked`. ProtectionState *string `pulumi:"protectionState"` // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName *string `pulumi:"recoveryVaultName"` // Specifies the name of the Resource Group **associated with** the Recovery Services Vault to use. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the ID of the virtual machine to back up. Changing this forces a new resource to be created. // // > **Note:** After creation, the `sourceVmId` property can be removed without forcing a new resource to be created; however, setting it to a different ID will create a new resource. This allows the source virtual machine to be deleted without having to remove the backup. SourceVmId *string `pulumi:"sourceVmId"` } type ProtectedVMState struct { BackupPolicyId pulumi.StringPtrInput // A list of Disks' Logical Unit Numbers (LUN) to be excluded for VM Protection. ExcludeDiskLuns pulumi.IntArrayInput // A list of Disks' Logical Unit Numbers (LUN) to be included for VM Protection. IncludeDiskLuns pulumi.IntArrayInput // Specifies Protection state of the backup. Possible values are `Protected`, `BackupsSuspended`, and `ProtectionStopped`. // // > **Note:** `protectionState` cannot be set to `BackupsSuspended` unless the `recoveryservices.Vault` has `immutability` set to `Unlocked` or `Locked`. ProtectionState pulumi.StringPtrInput // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringPtrInput // Specifies the name of the Resource Group **associated with** the Recovery Services Vault to use. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the ID of the virtual machine to back up. Changing this forces a new resource to be created. // // > **Note:** After creation, the `sourceVmId` property can be removed without forcing a new resource to be created; however, setting it to a different ID will create a new resource. This allows the source virtual machine to be deleted without having to remove the backup. SourceVmId pulumi.StringPtrInput } func (ProtectedVMState) ElementType() reflect.Type { return reflect.TypeOf((*protectedVMState)(nil)).Elem() } type protectedVMArgs struct { BackupPolicyId *string `pulumi:"backupPolicyId"` // A list of Disks' Logical Unit Numbers (LUN) to be excluded for VM Protection. ExcludeDiskLuns []int `pulumi:"excludeDiskLuns"` // A list of Disks' Logical Unit Numbers (LUN) to be included for VM Protection. IncludeDiskLuns []int `pulumi:"includeDiskLuns"` // Specifies Protection state of the backup. Possible values are `Protected`, `BackupsSuspended`, and `ProtectionStopped`. // // > **Note:** `protectionState` cannot be set to `BackupsSuspended` unless the `recoveryservices.Vault` has `immutability` set to `Unlocked` or `Locked`. ProtectionState *string `pulumi:"protectionState"` // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName string `pulumi:"recoveryVaultName"` // Specifies the name of the Resource Group **associated with** the Recovery Services Vault to use. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the ID of the virtual machine to back up. Changing this forces a new resource to be created. // // > **Note:** After creation, the `sourceVmId` property can be removed without forcing a new resource to be created; however, setting it to a different ID will create a new resource. This allows the source virtual machine to be deleted without having to remove the backup. SourceVmId *string `pulumi:"sourceVmId"` } // The set of arguments for constructing a ProtectedVM resource. type ProtectedVMArgs struct { BackupPolicyId pulumi.StringPtrInput // A list of Disks' Logical Unit Numbers (LUN) to be excluded for VM Protection. ExcludeDiskLuns pulumi.IntArrayInput // A list of Disks' Logical Unit Numbers (LUN) to be included for VM Protection. IncludeDiskLuns pulumi.IntArrayInput // Specifies Protection state of the backup. Possible values are `Protected`, `BackupsSuspended`, and `ProtectionStopped`. // // > **Note:** `protectionState` cannot be set to `BackupsSuspended` unless the `recoveryservices.Vault` has `immutability` set to `Unlocked` or `Locked`. ProtectionState pulumi.StringPtrInput // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringInput // Specifies the name of the Resource Group **associated with** the Recovery Services Vault to use. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies the ID of the virtual machine to back up. Changing this forces a new resource to be created. // // > **Note:** After creation, the `sourceVmId` property can be removed without forcing a new resource to be created; however, setting it to a different ID will create a new resource. This allows the source virtual machine to be deleted without having to remove the backup. SourceVmId pulumi.StringPtrInput } func (ProtectedVMArgs) ElementType() reflect.Type { return reflect.TypeOf((*protectedVMArgs)(nil)).Elem() } type ProtectedVMInput interface { pulumi.Input ToProtectedVMOutput() ProtectedVMOutput ToProtectedVMOutputWithContext(ctx context.Context) ProtectedVMOutput } func (*ProtectedVM) ElementType() reflect.Type { return reflect.TypeOf((**ProtectedVM)(nil)).Elem() } func (i *ProtectedVM) ToProtectedVMOutput() ProtectedVMOutput { return i.ToProtectedVMOutputWithContext(context.Background()) } func (i *ProtectedVM) ToProtectedVMOutputWithContext(ctx context.Context) ProtectedVMOutput { return pulumi.ToOutputWithContext(ctx, i).(ProtectedVMOutput) } // ProtectedVMArrayInput is an input type that accepts ProtectedVMArray and ProtectedVMArrayOutput values. // You can construct a concrete instance of `ProtectedVMArrayInput` via: // // ProtectedVMArray{ ProtectedVMArgs{...} } type ProtectedVMArrayInput interface { pulumi.Input ToProtectedVMArrayOutput() ProtectedVMArrayOutput ToProtectedVMArrayOutputWithContext(context.Context) ProtectedVMArrayOutput } type ProtectedVMArray []ProtectedVMInput func (ProtectedVMArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ProtectedVM)(nil)).Elem() } func (i ProtectedVMArray) ToProtectedVMArrayOutput() ProtectedVMArrayOutput { return i.ToProtectedVMArrayOutputWithContext(context.Background()) } func (i ProtectedVMArray) ToProtectedVMArrayOutputWithContext(ctx context.Context) ProtectedVMArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ProtectedVMArrayOutput) } // ProtectedVMMapInput is an input type that accepts ProtectedVMMap and ProtectedVMMapOutput values. // You can construct a concrete instance of `ProtectedVMMapInput` via: // // ProtectedVMMap{ "key": ProtectedVMArgs{...} } type ProtectedVMMapInput interface { pulumi.Input ToProtectedVMMapOutput() ProtectedVMMapOutput ToProtectedVMMapOutputWithContext(context.Context) ProtectedVMMapOutput } type ProtectedVMMap map[string]ProtectedVMInput func (ProtectedVMMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ProtectedVM)(nil)).Elem() } func (i ProtectedVMMap) ToProtectedVMMapOutput() ProtectedVMMapOutput { return i.ToProtectedVMMapOutputWithContext(context.Background()) } func (i ProtectedVMMap) ToProtectedVMMapOutputWithContext(ctx context.Context) ProtectedVMMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ProtectedVMMapOutput) } type ProtectedVMOutput struct{ *pulumi.OutputState } func (ProtectedVMOutput) ElementType() reflect.Type { return reflect.TypeOf((**ProtectedVM)(nil)).Elem() } func (o ProtectedVMOutput) ToProtectedVMOutput() ProtectedVMOutput { return o } func (o ProtectedVMOutput) ToProtectedVMOutputWithContext(ctx context.Context) ProtectedVMOutput { return o } func (o ProtectedVMOutput) BackupPolicyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ProtectedVM) pulumi.StringPtrOutput { return v.BackupPolicyId }).(pulumi.StringPtrOutput) } // A list of Disks' Logical Unit Numbers (LUN) to be excluded for VM Protection. func (o ProtectedVMOutput) ExcludeDiskLuns() pulumi.IntArrayOutput { return o.ApplyT(func(v *ProtectedVM) pulumi.IntArrayOutput { return v.ExcludeDiskLuns }).(pulumi.IntArrayOutput) } // A list of Disks' Logical Unit Numbers (LUN) to be included for VM Protection. func (o ProtectedVMOutput) IncludeDiskLuns() pulumi.IntArrayOutput { return o.ApplyT(func(v *ProtectedVM) pulumi.IntArrayOutput { return v.IncludeDiskLuns }).(pulumi.IntArrayOutput) } // Specifies Protection state of the backup. Possible values are `Protected`, `BackupsSuspended`, and `ProtectionStopped`. // // > **Note:** `protectionState` cannot be set to `BackupsSuspended` unless the `recoveryservices.Vault` has `immutability` set to `Unlocked` or `Locked`. func (o ProtectedVMOutput) ProtectionState() pulumi.StringOutput { return o.ApplyT(func(v *ProtectedVM) pulumi.StringOutput { return v.ProtectionState }).(pulumi.StringOutput) } // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. func (o ProtectedVMOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v *ProtectedVM) pulumi.StringOutput { return v.RecoveryVaultName }).(pulumi.StringOutput) } // Specifies the name of the Resource Group **associated with** the Recovery Services Vault to use. Changing this forces a new resource to be created. func (o ProtectedVMOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ProtectedVM) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the ID of the virtual machine to back up. Changing this forces a new resource to be created. // // > **Note:** After creation, the `sourceVmId` property can be removed without forcing a new resource to be created; however, setting it to a different ID will create a new resource. This allows the source virtual machine to be deleted without having to remove the backup. func (o ProtectedVMOutput) SourceVmId() pulumi.StringOutput { return o.ApplyT(func(v *ProtectedVM) pulumi.StringOutput { return v.SourceVmId }).(pulumi.StringOutput) } type ProtectedVMArrayOutput struct{ *pulumi.OutputState } func (ProtectedVMArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ProtectedVM)(nil)).Elem() } func (o ProtectedVMArrayOutput) ToProtectedVMArrayOutput() ProtectedVMArrayOutput { return o } func (o ProtectedVMArrayOutput) ToProtectedVMArrayOutputWithContext(ctx context.Context) ProtectedVMArrayOutput { return o } func (o ProtectedVMArrayOutput) Index(i pulumi.IntInput) ProtectedVMOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ProtectedVM { return vs[0].([]*ProtectedVM)[vs[1].(int)] }).(ProtectedVMOutput) } type ProtectedVMMapOutput struct{ *pulumi.OutputState } func (ProtectedVMMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ProtectedVM)(nil)).Elem() } func (o ProtectedVMMapOutput) ToProtectedVMMapOutput() ProtectedVMMapOutput { return o } func (o ProtectedVMMapOutput) ToProtectedVMMapOutputWithContext(ctx context.Context) ProtectedVMMapOutput { return o } func (o ProtectedVMMapOutput) MapIndex(k pulumi.StringInput) ProtectedVMOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ProtectedVM { return vs[0].(map[string]*ProtectedVM)[vs[1].(string)] }).(ProtectedVMOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ProtectedVMInput)(nil)).Elem(), &ProtectedVM{}) pulumi.RegisterInputType(reflect.TypeOf((*ProtectedVMArrayInput)(nil)).Elem(), ProtectedVMArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ProtectedVMMapInput)(nil)).Elem(), ProtectedVMMap{}) pulumi.RegisterOutputType(ProtectedVMOutput{}) pulumi.RegisterOutputType(ProtectedVMArrayOutput{}) pulumi.RegisterOutputType(ProtectedVMMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/backup/protectedFileShare.go
sdk/go/azure/backup/protectedFileShare.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package backup 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 Backup Protected File Share to enable backups for file shares within an Azure Storage Account // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/backup" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/recoveryservices" // "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("tfex-recovery_vault"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{ // Name: pulumi.String("tfex-recovery-vault"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // sa, err := storage.NewAccount(ctx, "sa", &storage.AccountArgs{ // Name: pulumi.String("examplesa"), // Location: example.Location, // ResourceGroupName: example.Name, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // exampleShare, err := storage.NewShare(ctx, "example", &storage.ShareArgs{ // Name: pulumi.String("example-share"), // StorageAccountName: sa.Name, // Quota: pulumi.Int(1), // }) // if err != nil { // return err // } // protection_container, err := backup.NewContainerStorageAccount(ctx, "protection-container", &backup.ContainerStorageAccountArgs{ // ResourceGroupName: example.Name, // RecoveryVaultName: vault.Name, // StorageAccountId: sa.ID(), // }) // if err != nil { // return err // } // examplePolicyFileShare, err := backup.NewPolicyFileShare(ctx, "example", &backup.PolicyFileShareArgs{ // Name: pulumi.String("tfex-recovery-vault-policy"), // ResourceGroupName: example.Name, // RecoveryVaultName: vault.Name, // Backup: &backup.PolicyFileShareBackupArgs{ // Frequency: pulumi.String("Daily"), // Time: pulumi.String("23:00"), // }, // RetentionDaily: &backup.PolicyFileShareRetentionDailyArgs{ // Count: pulumi.Int(10), // }, // }) // if err != nil { // return err // } // _, err = backup.NewProtectedFileShare(ctx, "share1", &backup.ProtectedFileShareArgs{ // ResourceGroupName: example.Name, // RecoveryVaultName: vault.Name, // SourceStorageAccountId: protection_container.StorageAccountId, // SourceFileShareName: exampleShare.Name, // BackupPolicyId: examplePolicyFileShare.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Azure Backup Protected File Shares can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:backup/protectedFileShare:ProtectedFileShare item1 "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/example-recovery-vault/backupFabrics/Azure/protectionContainers/StorageContainer;storage;group2;example-storage-account/protectedItems/AzureFileShare;3f6e3108a45793581bcbd1c61c87a3b2ceeb4ff4bc02a95ce9d1022b23722935" // ``` type ProtectedFileShare struct { pulumi.CustomResourceState // Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported. BackupPolicyId pulumi.StringOutput `pulumi:"backupPolicyId"` // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringOutput `pulumi:"recoveryVaultName"` // The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the name of the file share to backup. Changing this forces a new resource to be created. SourceFileShareName pulumi.StringOutput `pulumi:"sourceFileShareName"` // Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created. // // > **Note:** The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the `backup.ContainerStorageAccount` resource or the [Register-AzRecoveryServicesBackupContainer PowerShell cmdlet](https://docs.microsoft.com/powershell/module/az.recoveryservices/register-azrecoveryservicesbackupcontainer?view=azps-3.2.0) to register a storage account with a vault. When using the `backup.ContainerStorageAccount` resource to register, you can use `dependsOn` to explicitly declare the dependency. It will make sure that the registration is completed before creating the `backup.ProtectedFileShare` resource. SourceStorageAccountId pulumi.StringOutput `pulumi:"sourceStorageAccountId"` } // NewProtectedFileShare registers a new resource with the given unique name, arguments, and options. func NewProtectedFileShare(ctx *pulumi.Context, name string, args *ProtectedFileShareArgs, opts ...pulumi.ResourceOption) (*ProtectedFileShare, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.BackupPolicyId == nil { return nil, errors.New("invalid value for required argument 'BackupPolicyId'") } if args.RecoveryVaultName == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SourceFileShareName == nil { return nil, errors.New("invalid value for required argument 'SourceFileShareName'") } if args.SourceStorageAccountId == nil { return nil, errors.New("invalid value for required argument 'SourceStorageAccountId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ProtectedFileShare err := ctx.RegisterResource("azure:backup/protectedFileShare:ProtectedFileShare", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetProtectedFileShare gets an existing ProtectedFileShare 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 GetProtectedFileShare(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ProtectedFileShareState, opts ...pulumi.ResourceOption) (*ProtectedFileShare, error) { var resource ProtectedFileShare err := ctx.ReadResource("azure:backup/protectedFileShare:ProtectedFileShare", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ProtectedFileShare resources. type protectedFileShareState struct { // Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported. BackupPolicyId *string `pulumi:"backupPolicyId"` // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName *string `pulumi:"recoveryVaultName"` // The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the name of the file share to backup. Changing this forces a new resource to be created. SourceFileShareName *string `pulumi:"sourceFileShareName"` // Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created. // // > **Note:** The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the `backup.ContainerStorageAccount` resource or the [Register-AzRecoveryServicesBackupContainer PowerShell cmdlet](https://docs.microsoft.com/powershell/module/az.recoveryservices/register-azrecoveryservicesbackupcontainer?view=azps-3.2.0) to register a storage account with a vault. When using the `backup.ContainerStorageAccount` resource to register, you can use `dependsOn` to explicitly declare the dependency. It will make sure that the registration is completed before creating the `backup.ProtectedFileShare` resource. SourceStorageAccountId *string `pulumi:"sourceStorageAccountId"` } type ProtectedFileShareState struct { // Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported. BackupPolicyId pulumi.StringPtrInput // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringPtrInput // The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the name of the file share to backup. Changing this forces a new resource to be created. SourceFileShareName pulumi.StringPtrInput // Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created. // // > **Note:** The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the `backup.ContainerStorageAccount` resource or the [Register-AzRecoveryServicesBackupContainer PowerShell cmdlet](https://docs.microsoft.com/powershell/module/az.recoveryservices/register-azrecoveryservicesbackupcontainer?view=azps-3.2.0) to register a storage account with a vault. When using the `backup.ContainerStorageAccount` resource to register, you can use `dependsOn` to explicitly declare the dependency. It will make sure that the registration is completed before creating the `backup.ProtectedFileShare` resource. SourceStorageAccountId pulumi.StringPtrInput } func (ProtectedFileShareState) ElementType() reflect.Type { return reflect.TypeOf((*protectedFileShareState)(nil)).Elem() } type protectedFileShareArgs struct { // Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported. BackupPolicyId string `pulumi:"backupPolicyId"` // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName string `pulumi:"recoveryVaultName"` // The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the name of the file share to backup. Changing this forces a new resource to be created. SourceFileShareName string `pulumi:"sourceFileShareName"` // Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created. // // > **Note:** The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the `backup.ContainerStorageAccount` resource or the [Register-AzRecoveryServicesBackupContainer PowerShell cmdlet](https://docs.microsoft.com/powershell/module/az.recoveryservices/register-azrecoveryservicesbackupcontainer?view=azps-3.2.0) to register a storage account with a vault. When using the `backup.ContainerStorageAccount` resource to register, you can use `dependsOn` to explicitly declare the dependency. It will make sure that the registration is completed before creating the `backup.ProtectedFileShare` resource. SourceStorageAccountId string `pulumi:"sourceStorageAccountId"` } // The set of arguments for constructing a ProtectedFileShare resource. type ProtectedFileShareArgs struct { // Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported. BackupPolicyId pulumi.StringInput // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringInput // The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies the name of the file share to backup. Changing this forces a new resource to be created. SourceFileShareName pulumi.StringInput // Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created. // // > **Note:** The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the `backup.ContainerStorageAccount` resource or the [Register-AzRecoveryServicesBackupContainer PowerShell cmdlet](https://docs.microsoft.com/powershell/module/az.recoveryservices/register-azrecoveryservicesbackupcontainer?view=azps-3.2.0) to register a storage account with a vault. When using the `backup.ContainerStorageAccount` resource to register, you can use `dependsOn` to explicitly declare the dependency. It will make sure that the registration is completed before creating the `backup.ProtectedFileShare` resource. SourceStorageAccountId pulumi.StringInput } func (ProtectedFileShareArgs) ElementType() reflect.Type { return reflect.TypeOf((*protectedFileShareArgs)(nil)).Elem() } type ProtectedFileShareInput interface { pulumi.Input ToProtectedFileShareOutput() ProtectedFileShareOutput ToProtectedFileShareOutputWithContext(ctx context.Context) ProtectedFileShareOutput } func (*ProtectedFileShare) ElementType() reflect.Type { return reflect.TypeOf((**ProtectedFileShare)(nil)).Elem() } func (i *ProtectedFileShare) ToProtectedFileShareOutput() ProtectedFileShareOutput { return i.ToProtectedFileShareOutputWithContext(context.Background()) } func (i *ProtectedFileShare) ToProtectedFileShareOutputWithContext(ctx context.Context) ProtectedFileShareOutput { return pulumi.ToOutputWithContext(ctx, i).(ProtectedFileShareOutput) } // ProtectedFileShareArrayInput is an input type that accepts ProtectedFileShareArray and ProtectedFileShareArrayOutput values. // You can construct a concrete instance of `ProtectedFileShareArrayInput` via: // // ProtectedFileShareArray{ ProtectedFileShareArgs{...} } type ProtectedFileShareArrayInput interface { pulumi.Input ToProtectedFileShareArrayOutput() ProtectedFileShareArrayOutput ToProtectedFileShareArrayOutputWithContext(context.Context) ProtectedFileShareArrayOutput } type ProtectedFileShareArray []ProtectedFileShareInput func (ProtectedFileShareArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ProtectedFileShare)(nil)).Elem() } func (i ProtectedFileShareArray) ToProtectedFileShareArrayOutput() ProtectedFileShareArrayOutput { return i.ToProtectedFileShareArrayOutputWithContext(context.Background()) } func (i ProtectedFileShareArray) ToProtectedFileShareArrayOutputWithContext(ctx context.Context) ProtectedFileShareArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ProtectedFileShareArrayOutput) } // ProtectedFileShareMapInput is an input type that accepts ProtectedFileShareMap and ProtectedFileShareMapOutput values. // You can construct a concrete instance of `ProtectedFileShareMapInput` via: // // ProtectedFileShareMap{ "key": ProtectedFileShareArgs{...} } type ProtectedFileShareMapInput interface { pulumi.Input ToProtectedFileShareMapOutput() ProtectedFileShareMapOutput ToProtectedFileShareMapOutputWithContext(context.Context) ProtectedFileShareMapOutput } type ProtectedFileShareMap map[string]ProtectedFileShareInput func (ProtectedFileShareMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ProtectedFileShare)(nil)).Elem() } func (i ProtectedFileShareMap) ToProtectedFileShareMapOutput() ProtectedFileShareMapOutput { return i.ToProtectedFileShareMapOutputWithContext(context.Background()) } func (i ProtectedFileShareMap) ToProtectedFileShareMapOutputWithContext(ctx context.Context) ProtectedFileShareMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ProtectedFileShareMapOutput) } type ProtectedFileShareOutput struct{ *pulumi.OutputState } func (ProtectedFileShareOutput) ElementType() reflect.Type { return reflect.TypeOf((**ProtectedFileShare)(nil)).Elem() } func (o ProtectedFileShareOutput) ToProtectedFileShareOutput() ProtectedFileShareOutput { return o } func (o ProtectedFileShareOutput) ToProtectedFileShareOutputWithContext(ctx context.Context) ProtectedFileShareOutput { return o } // Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported. func (o ProtectedFileShareOutput) BackupPolicyId() pulumi.StringOutput { return o.ApplyT(func(v *ProtectedFileShare) pulumi.StringOutput { return v.BackupPolicyId }).(pulumi.StringOutput) } // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. func (o ProtectedFileShareOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v *ProtectedFileShare) pulumi.StringOutput { return v.RecoveryVaultName }).(pulumi.StringOutput) } // The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created. func (o ProtectedFileShareOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ProtectedFileShare) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the name of the file share to backup. Changing this forces a new resource to be created. func (o ProtectedFileShareOutput) SourceFileShareName() pulumi.StringOutput { return o.ApplyT(func(v *ProtectedFileShare) pulumi.StringOutput { return v.SourceFileShareName }).(pulumi.StringOutput) } // Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created. // // > **Note:** The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the `backup.ContainerStorageAccount` resource or the [Register-AzRecoveryServicesBackupContainer PowerShell cmdlet](https://docs.microsoft.com/powershell/module/az.recoveryservices/register-azrecoveryservicesbackupcontainer?view=azps-3.2.0) to register a storage account with a vault. When using the `backup.ContainerStorageAccount` resource to register, you can use `dependsOn` to explicitly declare the dependency. It will make sure that the registration is completed before creating the `backup.ProtectedFileShare` resource. func (o ProtectedFileShareOutput) SourceStorageAccountId() pulumi.StringOutput { return o.ApplyT(func(v *ProtectedFileShare) pulumi.StringOutput { return v.SourceStorageAccountId }).(pulumi.StringOutput) } type ProtectedFileShareArrayOutput struct{ *pulumi.OutputState } func (ProtectedFileShareArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ProtectedFileShare)(nil)).Elem() } func (o ProtectedFileShareArrayOutput) ToProtectedFileShareArrayOutput() ProtectedFileShareArrayOutput { return o } func (o ProtectedFileShareArrayOutput) ToProtectedFileShareArrayOutputWithContext(ctx context.Context) ProtectedFileShareArrayOutput { return o } func (o ProtectedFileShareArrayOutput) Index(i pulumi.IntInput) ProtectedFileShareOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ProtectedFileShare { return vs[0].([]*ProtectedFileShare)[vs[1].(int)] }).(ProtectedFileShareOutput) } type ProtectedFileShareMapOutput struct{ *pulumi.OutputState } func (ProtectedFileShareMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ProtectedFileShare)(nil)).Elem() } func (o ProtectedFileShareMapOutput) ToProtectedFileShareMapOutput() ProtectedFileShareMapOutput { return o } func (o ProtectedFileShareMapOutput) ToProtectedFileShareMapOutputWithContext(ctx context.Context) ProtectedFileShareMapOutput { return o } func (o ProtectedFileShareMapOutput) MapIndex(k pulumi.StringInput) ProtectedFileShareOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ProtectedFileShare { return vs[0].(map[string]*ProtectedFileShare)[vs[1].(string)] }).(ProtectedFileShareOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ProtectedFileShareInput)(nil)).Elem(), &ProtectedFileShare{}) pulumi.RegisterInputType(reflect.TypeOf((*ProtectedFileShareArrayInput)(nil)).Elem(), ProtectedFileShareArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ProtectedFileShareMapInput)(nil)).Elem(), ProtectedFileShareMap{}) pulumi.RegisterOutputType(ProtectedFileShareOutput{}) pulumi.RegisterOutputType(ProtectedFileShareArrayOutput{}) pulumi.RegisterOutputType(ProtectedFileShareMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/backup/containerStorageAccount.go
sdk/go/azure/backup/containerStorageAccount.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package backup import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages registration of a storage account with Azure Backup. Storage accounts must be registered with an Azure Recovery Vault in order to backup file shares within the storage account. Registering a storage account with a vault creates what is known as a protection container within Azure Recovery Services. Once the container is created, Azure file shares within the storage account can be backed up using the `backup.ProtectedFileShare` resource. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/backup" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/recoveryservices" // "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("tfex-network-mapping-primary"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{ // Name: pulumi.String("example-recovery-vault"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // sa, err := storage.NewAccount(ctx, "sa", &storage.AccountArgs{ // Name: pulumi.String("examplesa"), // Location: example.Location, // ResourceGroupName: example.Name, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // _, err = backup.NewContainerStorageAccount(ctx, "container", &backup.ContainerStorageAccountArgs{ // ResourceGroupName: example.Name, // RecoveryVaultName: vault.Name, // StorageAccountId: sa.ID(), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Backup Storage Account Containers can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:backup/containerStorageAccount:ContainerStorageAccount mycontainer "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/backupFabrics/Azure/protectionContainers/StorageContainer;storage;storage-rg-name;storage-account" // ``` // // Note the ID requires quoting as there are semicolons type ContainerStorageAccount struct { pulumi.CustomResourceState // The name of the vault where the storage account will be registered. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringOutput `pulumi:"recoveryVaultName"` // Name of the resource group where the vault is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The ID of the Storage Account to be registered Changing this forces a new resource to be created. // // > **Note:** Azure Backup places a Resource Lock on the storage account that will cause deletion to fail until the account is unregistered from Azure Backup StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"` } // NewContainerStorageAccount registers a new resource with the given unique name, arguments, and options. func NewContainerStorageAccount(ctx *pulumi.Context, name string, args *ContainerStorageAccountArgs, opts ...pulumi.ResourceOption) (*ContainerStorageAccount, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RecoveryVaultName == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.StorageAccountId == nil { return nil, errors.New("invalid value for required argument 'StorageAccountId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ContainerStorageAccount err := ctx.RegisterResource("azure:backup/containerStorageAccount:ContainerStorageAccount", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetContainerStorageAccount gets an existing ContainerStorageAccount 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 GetContainerStorageAccount(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ContainerStorageAccountState, opts ...pulumi.ResourceOption) (*ContainerStorageAccount, error) { var resource ContainerStorageAccount err := ctx.ReadResource("azure:backup/containerStorageAccount:ContainerStorageAccount", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ContainerStorageAccount resources. type containerStorageAccountState struct { // The name of the vault where the storage account will be registered. Changing this forces a new resource to be created. RecoveryVaultName *string `pulumi:"recoveryVaultName"` // Name of the resource group where the vault is located. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The ID of the Storage Account to be registered Changing this forces a new resource to be created. // // > **Note:** Azure Backup places a Resource Lock on the storage account that will cause deletion to fail until the account is unregistered from Azure Backup StorageAccountId *string `pulumi:"storageAccountId"` } type ContainerStorageAccountState struct { // The name of the vault where the storage account will be registered. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringPtrInput // Name of the resource group where the vault is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The ID of the Storage Account to be registered Changing this forces a new resource to be created. // // > **Note:** Azure Backup places a Resource Lock on the storage account that will cause deletion to fail until the account is unregistered from Azure Backup StorageAccountId pulumi.StringPtrInput } func (ContainerStorageAccountState) ElementType() reflect.Type { return reflect.TypeOf((*containerStorageAccountState)(nil)).Elem() } type containerStorageAccountArgs struct { // The name of the vault where the storage account will be registered. Changing this forces a new resource to be created. RecoveryVaultName string `pulumi:"recoveryVaultName"` // Name of the resource group where the vault is located. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The ID of the Storage Account to be registered Changing this forces a new resource to be created. // // > **Note:** Azure Backup places a Resource Lock on the storage account that will cause deletion to fail until the account is unregistered from Azure Backup StorageAccountId string `pulumi:"storageAccountId"` } // The set of arguments for constructing a ContainerStorageAccount resource. type ContainerStorageAccountArgs struct { // The name of the vault where the storage account will be registered. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringInput // Name of the resource group where the vault is located. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The ID of the Storage Account to be registered Changing this forces a new resource to be created. // // > **Note:** Azure Backup places a Resource Lock on the storage account that will cause deletion to fail until the account is unregistered from Azure Backup StorageAccountId pulumi.StringInput } func (ContainerStorageAccountArgs) ElementType() reflect.Type { return reflect.TypeOf((*containerStorageAccountArgs)(nil)).Elem() } type ContainerStorageAccountInput interface { pulumi.Input ToContainerStorageAccountOutput() ContainerStorageAccountOutput ToContainerStorageAccountOutputWithContext(ctx context.Context) ContainerStorageAccountOutput } func (*ContainerStorageAccount) ElementType() reflect.Type { return reflect.TypeOf((**ContainerStorageAccount)(nil)).Elem() } func (i *ContainerStorageAccount) ToContainerStorageAccountOutput() ContainerStorageAccountOutput { return i.ToContainerStorageAccountOutputWithContext(context.Background()) } func (i *ContainerStorageAccount) ToContainerStorageAccountOutputWithContext(ctx context.Context) ContainerStorageAccountOutput { return pulumi.ToOutputWithContext(ctx, i).(ContainerStorageAccountOutput) } // ContainerStorageAccountArrayInput is an input type that accepts ContainerStorageAccountArray and ContainerStorageAccountArrayOutput values. // You can construct a concrete instance of `ContainerStorageAccountArrayInput` via: // // ContainerStorageAccountArray{ ContainerStorageAccountArgs{...} } type ContainerStorageAccountArrayInput interface { pulumi.Input ToContainerStorageAccountArrayOutput() ContainerStorageAccountArrayOutput ToContainerStorageAccountArrayOutputWithContext(context.Context) ContainerStorageAccountArrayOutput } type ContainerStorageAccountArray []ContainerStorageAccountInput func (ContainerStorageAccountArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ContainerStorageAccount)(nil)).Elem() } func (i ContainerStorageAccountArray) ToContainerStorageAccountArrayOutput() ContainerStorageAccountArrayOutput { return i.ToContainerStorageAccountArrayOutputWithContext(context.Background()) } func (i ContainerStorageAccountArray) ToContainerStorageAccountArrayOutputWithContext(ctx context.Context) ContainerStorageAccountArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ContainerStorageAccountArrayOutput) } // ContainerStorageAccountMapInput is an input type that accepts ContainerStorageAccountMap and ContainerStorageAccountMapOutput values. // You can construct a concrete instance of `ContainerStorageAccountMapInput` via: // // ContainerStorageAccountMap{ "key": ContainerStorageAccountArgs{...} } type ContainerStorageAccountMapInput interface { pulumi.Input ToContainerStorageAccountMapOutput() ContainerStorageAccountMapOutput ToContainerStorageAccountMapOutputWithContext(context.Context) ContainerStorageAccountMapOutput } type ContainerStorageAccountMap map[string]ContainerStorageAccountInput func (ContainerStorageAccountMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ContainerStorageAccount)(nil)).Elem() } func (i ContainerStorageAccountMap) ToContainerStorageAccountMapOutput() ContainerStorageAccountMapOutput { return i.ToContainerStorageAccountMapOutputWithContext(context.Background()) } func (i ContainerStorageAccountMap) ToContainerStorageAccountMapOutputWithContext(ctx context.Context) ContainerStorageAccountMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ContainerStorageAccountMapOutput) } type ContainerStorageAccountOutput struct{ *pulumi.OutputState } func (ContainerStorageAccountOutput) ElementType() reflect.Type { return reflect.TypeOf((**ContainerStorageAccount)(nil)).Elem() } func (o ContainerStorageAccountOutput) ToContainerStorageAccountOutput() ContainerStorageAccountOutput { return o } func (o ContainerStorageAccountOutput) ToContainerStorageAccountOutputWithContext(ctx context.Context) ContainerStorageAccountOutput { return o } // The name of the vault where the storage account will be registered. Changing this forces a new resource to be created. func (o ContainerStorageAccountOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v *ContainerStorageAccount) pulumi.StringOutput { return v.RecoveryVaultName }).(pulumi.StringOutput) } // Name of the resource group where the vault is located. Changing this forces a new resource to be created. func (o ContainerStorageAccountOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ContainerStorageAccount) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The ID of the Storage Account to be registered Changing this forces a new resource to be created. // // > **Note:** Azure Backup places a Resource Lock on the storage account that will cause deletion to fail until the account is unregistered from Azure Backup func (o ContainerStorageAccountOutput) StorageAccountId() pulumi.StringOutput { return o.ApplyT(func(v *ContainerStorageAccount) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput) } type ContainerStorageAccountArrayOutput struct{ *pulumi.OutputState } func (ContainerStorageAccountArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ContainerStorageAccount)(nil)).Elem() } func (o ContainerStorageAccountArrayOutput) ToContainerStorageAccountArrayOutput() ContainerStorageAccountArrayOutput { return o } func (o ContainerStorageAccountArrayOutput) ToContainerStorageAccountArrayOutputWithContext(ctx context.Context) ContainerStorageAccountArrayOutput { return o } func (o ContainerStorageAccountArrayOutput) Index(i pulumi.IntInput) ContainerStorageAccountOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ContainerStorageAccount { return vs[0].([]*ContainerStorageAccount)[vs[1].(int)] }).(ContainerStorageAccountOutput) } type ContainerStorageAccountMapOutput struct{ *pulumi.OutputState } func (ContainerStorageAccountMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ContainerStorageAccount)(nil)).Elem() } func (o ContainerStorageAccountMapOutput) ToContainerStorageAccountMapOutput() ContainerStorageAccountMapOutput { return o } func (o ContainerStorageAccountMapOutput) ToContainerStorageAccountMapOutputWithContext(ctx context.Context) ContainerStorageAccountMapOutput { return o } func (o ContainerStorageAccountMapOutput) MapIndex(k pulumi.StringInput) ContainerStorageAccountOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ContainerStorageAccount { return vs[0].(map[string]*ContainerStorageAccount)[vs[1].(string)] }).(ContainerStorageAccountOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ContainerStorageAccountInput)(nil)).Elem(), &ContainerStorageAccount{}) pulumi.RegisterInputType(reflect.TypeOf((*ContainerStorageAccountArrayInput)(nil)).Elem(), ContainerStorageAccountArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ContainerStorageAccountMapInput)(nil)).Elem(), ContainerStorageAccountMap{}) pulumi.RegisterOutputType(ContainerStorageAccountOutput{}) pulumi.RegisterOutputType(ContainerStorageAccountArrayOutput{}) pulumi.RegisterOutputType(ContainerStorageAccountMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/backup/policyVM.go
sdk/go/azure/backup/policyVM.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package backup 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 Backup VM Backup Policy. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/backup" // "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 // } // exampleVault, err := recoveryservices.NewVault(ctx, "example", &recoveryservices.VaultArgs{ // Name: pulumi.String("tfex-recovery-vault"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // _, err = backup.NewPolicyVM(ctx, "example", &backup.PolicyVMArgs{ // Name: pulumi.String("tfex-recovery-vault-policy"), // ResourceGroupName: example.Name, // RecoveryVaultName: exampleVault.Name, // Timezone: pulumi.String("UTC"), // Backup: &backup.PolicyVMBackupArgs{ // Frequency: pulumi.String("Daily"), // Time: pulumi.String("23:00"), // }, // RetentionDaily: &backup.PolicyVMRetentionDailyArgs{ // Count: pulumi.Int(10), // }, // RetentionWeekly: &backup.PolicyVMRetentionWeeklyArgs{ // Count: pulumi.Int(42), // Weekdays: pulumi.StringArray{ // pulumi.String("Sunday"), // pulumi.String("Wednesday"), // pulumi.String("Friday"), // pulumi.String("Saturday"), // }, // }, // RetentionMonthly: &backup.PolicyVMRetentionMonthlyArgs{ // Count: pulumi.Int(7), // Weekdays: pulumi.StringArray{ // pulumi.String("Sunday"), // pulumi.String("Wednesday"), // }, // Weeks: pulumi.StringArray{ // pulumi.String("First"), // pulumi.String("Last"), // }, // }, // RetentionYearly: &backup.PolicyVMRetentionYearlyArgs{ // Count: pulumi.Int(77), // Weekdays: pulumi.StringArray{ // pulumi.String("Sunday"), // }, // Weeks: pulumi.StringArray{ // pulumi.String("Last"), // }, // Months: pulumi.StringArray{ // pulumi.String("January"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // VM Backup Policies can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:backup/policyVM:PolicyVM policy1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/example-recovery-vault/backupPolicies/policy1 // ``` type PolicyVM struct { pulumi.CustomResourceState // Configures the Policy backup frequency, times & days as documented in the `backup` block below. Backup PolicyVMBackupOutput `pulumi:"backup"` // Specifies the instant restore resource group name as documented in the `instantRestoreResourceGroup` block below. InstantRestoreResourceGroup PolicyVMInstantRestoreResourceGroupPtrOutput `pulumi:"instantRestoreResourceGroup"` // Specifies the instant restore retention range in days. Possible values are between `1` and `5` when `policyType` is `V1`, and `1` to `30` when `policyType` is `V2`. // // > **Note:** `instantRestoreRetentionDays` **must** be set to `5` if the backup frequency is set to `Weekly`. InstantRestoreRetentionDays pulumi.IntOutput `pulumi:"instantRestoreRetentionDays"` // Specifies the name of the Backup Policy. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Type of the Backup Policy. Possible values are `V1` and `V2` where `V2` stands for the Enhanced Policy. Defaults to `V1`. Changing this forces a new resource to be created. PolicyType pulumi.StringPtrOutput `pulumi:"policyType"` // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringOutput `pulumi:"recoveryVaultName"` // The name of the resource group in which to create the policy. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Configures the policy daily retention as documented in the `retentionDaily` block below. Required when backup frequency is `Daily`. RetentionDaily PolicyVMRetentionDailyPtrOutput `pulumi:"retentionDaily"` // Configures the policy monthly retention as documented in the `retentionMonthly` block below. RetentionMonthly PolicyVMRetentionMonthlyPtrOutput `pulumi:"retentionMonthly"` // Configures the policy weekly retention as documented in the `retentionWeekly` block below. Required when backup frequency is `Weekly`. RetentionWeekly PolicyVMRetentionWeeklyPtrOutput `pulumi:"retentionWeekly"` // Configures the policy yearly retention as documented in the `retentionYearly` block below. RetentionYearly PolicyVMRetentionYearlyPtrOutput `pulumi:"retentionYearly"` // A `tieringPolicy` block as defined below. TieringPolicy PolicyVMTieringPolicyPtrOutput `pulumi:"tieringPolicy"` // Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC` Timezone pulumi.StringPtrOutput `pulumi:"timezone"` } // NewPolicyVM registers a new resource with the given unique name, arguments, and options. func NewPolicyVM(ctx *pulumi.Context, name string, args *PolicyVMArgs, opts ...pulumi.ResourceOption) (*PolicyVM, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Backup == nil { return nil, errors.New("invalid value for required argument 'Backup'") } if args.RecoveryVaultName == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource PolicyVM err := ctx.RegisterResource("azure:backup/policyVM:PolicyVM", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPolicyVM gets an existing PolicyVM 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 GetPolicyVM(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PolicyVMState, opts ...pulumi.ResourceOption) (*PolicyVM, error) { var resource PolicyVM err := ctx.ReadResource("azure:backup/policyVM:PolicyVM", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering PolicyVM resources. type policyVMState struct { // Configures the Policy backup frequency, times & days as documented in the `backup` block below. Backup *PolicyVMBackup `pulumi:"backup"` // Specifies the instant restore resource group name as documented in the `instantRestoreResourceGroup` block below. InstantRestoreResourceGroup *PolicyVMInstantRestoreResourceGroup `pulumi:"instantRestoreResourceGroup"` // Specifies the instant restore retention range in days. Possible values are between `1` and `5` when `policyType` is `V1`, and `1` to `30` when `policyType` is `V2`. // // > **Note:** `instantRestoreRetentionDays` **must** be set to `5` if the backup frequency is set to `Weekly`. InstantRestoreRetentionDays *int `pulumi:"instantRestoreRetentionDays"` // Specifies the name of the Backup Policy. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Type of the Backup Policy. Possible values are `V1` and `V2` where `V2` stands for the Enhanced Policy. Defaults to `V1`. Changing this forces a new resource to be created. PolicyType *string `pulumi:"policyType"` // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName *string `pulumi:"recoveryVaultName"` // The name of the resource group in which to create the policy. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Configures the policy daily retention as documented in the `retentionDaily` block below. Required when backup frequency is `Daily`. RetentionDaily *PolicyVMRetentionDaily `pulumi:"retentionDaily"` // Configures the policy monthly retention as documented in the `retentionMonthly` block below. RetentionMonthly *PolicyVMRetentionMonthly `pulumi:"retentionMonthly"` // Configures the policy weekly retention as documented in the `retentionWeekly` block below. Required when backup frequency is `Weekly`. RetentionWeekly *PolicyVMRetentionWeekly `pulumi:"retentionWeekly"` // Configures the policy yearly retention as documented in the `retentionYearly` block below. RetentionYearly *PolicyVMRetentionYearly `pulumi:"retentionYearly"` // A `tieringPolicy` block as defined below. TieringPolicy *PolicyVMTieringPolicy `pulumi:"tieringPolicy"` // Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC` Timezone *string `pulumi:"timezone"` } type PolicyVMState struct { // Configures the Policy backup frequency, times & days as documented in the `backup` block below. Backup PolicyVMBackupPtrInput // Specifies the instant restore resource group name as documented in the `instantRestoreResourceGroup` block below. InstantRestoreResourceGroup PolicyVMInstantRestoreResourceGroupPtrInput // Specifies the instant restore retention range in days. Possible values are between `1` and `5` when `policyType` is `V1`, and `1` to `30` when `policyType` is `V2`. // // > **Note:** `instantRestoreRetentionDays` **must** be set to `5` if the backup frequency is set to `Weekly`. InstantRestoreRetentionDays pulumi.IntPtrInput // Specifies the name of the Backup Policy. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Type of the Backup Policy. Possible values are `V1` and `V2` where `V2` stands for the Enhanced Policy. Defaults to `V1`. Changing this forces a new resource to be created. PolicyType pulumi.StringPtrInput // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringPtrInput // The name of the resource group in which to create the policy. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Configures the policy daily retention as documented in the `retentionDaily` block below. Required when backup frequency is `Daily`. RetentionDaily PolicyVMRetentionDailyPtrInput // Configures the policy monthly retention as documented in the `retentionMonthly` block below. RetentionMonthly PolicyVMRetentionMonthlyPtrInput // Configures the policy weekly retention as documented in the `retentionWeekly` block below. Required when backup frequency is `Weekly`. RetentionWeekly PolicyVMRetentionWeeklyPtrInput // Configures the policy yearly retention as documented in the `retentionYearly` block below. RetentionYearly PolicyVMRetentionYearlyPtrInput // A `tieringPolicy` block as defined below. TieringPolicy PolicyVMTieringPolicyPtrInput // Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC` Timezone pulumi.StringPtrInput } func (PolicyVMState) ElementType() reflect.Type { return reflect.TypeOf((*policyVMState)(nil)).Elem() } type policyVMArgs struct { // Configures the Policy backup frequency, times & days as documented in the `backup` block below. Backup PolicyVMBackup `pulumi:"backup"` // Specifies the instant restore resource group name as documented in the `instantRestoreResourceGroup` block below. InstantRestoreResourceGroup *PolicyVMInstantRestoreResourceGroup `pulumi:"instantRestoreResourceGroup"` // Specifies the instant restore retention range in days. Possible values are between `1` and `5` when `policyType` is `V1`, and `1` to `30` when `policyType` is `V2`. // // > **Note:** `instantRestoreRetentionDays` **must** be set to `5` if the backup frequency is set to `Weekly`. InstantRestoreRetentionDays *int `pulumi:"instantRestoreRetentionDays"` // Specifies the name of the Backup Policy. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Type of the Backup Policy. Possible values are `V1` and `V2` where `V2` stands for the Enhanced Policy. Defaults to `V1`. Changing this forces a new resource to be created. PolicyType *string `pulumi:"policyType"` // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName string `pulumi:"recoveryVaultName"` // The name of the resource group in which to create the policy. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Configures the policy daily retention as documented in the `retentionDaily` block below. Required when backup frequency is `Daily`. RetentionDaily *PolicyVMRetentionDaily `pulumi:"retentionDaily"` // Configures the policy monthly retention as documented in the `retentionMonthly` block below. RetentionMonthly *PolicyVMRetentionMonthly `pulumi:"retentionMonthly"` // Configures the policy weekly retention as documented in the `retentionWeekly` block below. Required when backup frequency is `Weekly`. RetentionWeekly *PolicyVMRetentionWeekly `pulumi:"retentionWeekly"` // Configures the policy yearly retention as documented in the `retentionYearly` block below. RetentionYearly *PolicyVMRetentionYearly `pulumi:"retentionYearly"` // A `tieringPolicy` block as defined below. TieringPolicy *PolicyVMTieringPolicy `pulumi:"tieringPolicy"` // Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC` Timezone *string `pulumi:"timezone"` } // The set of arguments for constructing a PolicyVM resource. type PolicyVMArgs struct { // Configures the Policy backup frequency, times & days as documented in the `backup` block below. Backup PolicyVMBackupInput // Specifies the instant restore resource group name as documented in the `instantRestoreResourceGroup` block below. InstantRestoreResourceGroup PolicyVMInstantRestoreResourceGroupPtrInput // Specifies the instant restore retention range in days. Possible values are between `1` and `5` when `policyType` is `V1`, and `1` to `30` when `policyType` is `V2`. // // > **Note:** `instantRestoreRetentionDays` **must** be set to `5` if the backup frequency is set to `Weekly`. InstantRestoreRetentionDays pulumi.IntPtrInput // Specifies the name of the Backup Policy. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Type of the Backup Policy. Possible values are `V1` and `V2` where `V2` stands for the Enhanced Policy. Defaults to `V1`. Changing this forces a new resource to be created. PolicyType pulumi.StringPtrInput // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringInput // The name of the resource group in which to create the policy. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Configures the policy daily retention as documented in the `retentionDaily` block below. Required when backup frequency is `Daily`. RetentionDaily PolicyVMRetentionDailyPtrInput // Configures the policy monthly retention as documented in the `retentionMonthly` block below. RetentionMonthly PolicyVMRetentionMonthlyPtrInput // Configures the policy weekly retention as documented in the `retentionWeekly` block below. Required when backup frequency is `Weekly`. RetentionWeekly PolicyVMRetentionWeeklyPtrInput // Configures the policy yearly retention as documented in the `retentionYearly` block below. RetentionYearly PolicyVMRetentionYearlyPtrInput // A `tieringPolicy` block as defined below. TieringPolicy PolicyVMTieringPolicyPtrInput // Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC` Timezone pulumi.StringPtrInput } func (PolicyVMArgs) ElementType() reflect.Type { return reflect.TypeOf((*policyVMArgs)(nil)).Elem() } type PolicyVMInput interface { pulumi.Input ToPolicyVMOutput() PolicyVMOutput ToPolicyVMOutputWithContext(ctx context.Context) PolicyVMOutput } func (*PolicyVM) ElementType() reflect.Type { return reflect.TypeOf((**PolicyVM)(nil)).Elem() } func (i *PolicyVM) ToPolicyVMOutput() PolicyVMOutput { return i.ToPolicyVMOutputWithContext(context.Background()) } func (i *PolicyVM) ToPolicyVMOutputWithContext(ctx context.Context) PolicyVMOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyVMOutput) } // PolicyVMArrayInput is an input type that accepts PolicyVMArray and PolicyVMArrayOutput values. // You can construct a concrete instance of `PolicyVMArrayInput` via: // // PolicyVMArray{ PolicyVMArgs{...} } type PolicyVMArrayInput interface { pulumi.Input ToPolicyVMArrayOutput() PolicyVMArrayOutput ToPolicyVMArrayOutputWithContext(context.Context) PolicyVMArrayOutput } type PolicyVMArray []PolicyVMInput func (PolicyVMArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*PolicyVM)(nil)).Elem() } func (i PolicyVMArray) ToPolicyVMArrayOutput() PolicyVMArrayOutput { return i.ToPolicyVMArrayOutputWithContext(context.Background()) } func (i PolicyVMArray) ToPolicyVMArrayOutputWithContext(ctx context.Context) PolicyVMArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyVMArrayOutput) } // PolicyVMMapInput is an input type that accepts PolicyVMMap and PolicyVMMapOutput values. // You can construct a concrete instance of `PolicyVMMapInput` via: // // PolicyVMMap{ "key": PolicyVMArgs{...} } type PolicyVMMapInput interface { pulumi.Input ToPolicyVMMapOutput() PolicyVMMapOutput ToPolicyVMMapOutputWithContext(context.Context) PolicyVMMapOutput } type PolicyVMMap map[string]PolicyVMInput func (PolicyVMMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PolicyVM)(nil)).Elem() } func (i PolicyVMMap) ToPolicyVMMapOutput() PolicyVMMapOutput { return i.ToPolicyVMMapOutputWithContext(context.Background()) } func (i PolicyVMMap) ToPolicyVMMapOutputWithContext(ctx context.Context) PolicyVMMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyVMMapOutput) } type PolicyVMOutput struct{ *pulumi.OutputState } func (PolicyVMOutput) ElementType() reflect.Type { return reflect.TypeOf((**PolicyVM)(nil)).Elem() } func (o PolicyVMOutput) ToPolicyVMOutput() PolicyVMOutput { return o } func (o PolicyVMOutput) ToPolicyVMOutputWithContext(ctx context.Context) PolicyVMOutput { return o } // Configures the Policy backup frequency, times & days as documented in the `backup` block below. func (o PolicyVMOutput) Backup() PolicyVMBackupOutput { return o.ApplyT(func(v *PolicyVM) PolicyVMBackupOutput { return v.Backup }).(PolicyVMBackupOutput) } // Specifies the instant restore resource group name as documented in the `instantRestoreResourceGroup` block below. func (o PolicyVMOutput) InstantRestoreResourceGroup() PolicyVMInstantRestoreResourceGroupPtrOutput { return o.ApplyT(func(v *PolicyVM) PolicyVMInstantRestoreResourceGroupPtrOutput { return v.InstantRestoreResourceGroup }).(PolicyVMInstantRestoreResourceGroupPtrOutput) } // Specifies the instant restore retention range in days. Possible values are between `1` and `5` when `policyType` is `V1`, and `1` to `30` when `policyType` is `V2`. // // > **Note:** `instantRestoreRetentionDays` **must** be set to `5` if the backup frequency is set to `Weekly`. func (o PolicyVMOutput) InstantRestoreRetentionDays() pulumi.IntOutput { return o.ApplyT(func(v *PolicyVM) pulumi.IntOutput { return v.InstantRestoreRetentionDays }).(pulumi.IntOutput) } // Specifies the name of the Backup Policy. Changing this forces a new resource to be created. func (o PolicyVMOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *PolicyVM) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Type of the Backup Policy. Possible values are `V1` and `V2` where `V2` stands for the Enhanced Policy. Defaults to `V1`. Changing this forces a new resource to be created. func (o PolicyVMOutput) PolicyType() pulumi.StringPtrOutput { return o.ApplyT(func(v *PolicyVM) pulumi.StringPtrOutput { return v.PolicyType }).(pulumi.StringPtrOutput) } // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. func (o PolicyVMOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v *PolicyVM) pulumi.StringOutput { return v.RecoveryVaultName }).(pulumi.StringOutput) } // The name of the resource group in which to create the policy. Changing this forces a new resource to be created. func (o PolicyVMOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *PolicyVM) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Configures the policy daily retention as documented in the `retentionDaily` block below. Required when backup frequency is `Daily`. func (o PolicyVMOutput) RetentionDaily() PolicyVMRetentionDailyPtrOutput { return o.ApplyT(func(v *PolicyVM) PolicyVMRetentionDailyPtrOutput { return v.RetentionDaily }).(PolicyVMRetentionDailyPtrOutput) } // Configures the policy monthly retention as documented in the `retentionMonthly` block below. func (o PolicyVMOutput) RetentionMonthly() PolicyVMRetentionMonthlyPtrOutput { return o.ApplyT(func(v *PolicyVM) PolicyVMRetentionMonthlyPtrOutput { return v.RetentionMonthly }).(PolicyVMRetentionMonthlyPtrOutput) } // Configures the policy weekly retention as documented in the `retentionWeekly` block below. Required when backup frequency is `Weekly`. func (o PolicyVMOutput) RetentionWeekly() PolicyVMRetentionWeeklyPtrOutput { return o.ApplyT(func(v *PolicyVM) PolicyVMRetentionWeeklyPtrOutput { return v.RetentionWeekly }).(PolicyVMRetentionWeeklyPtrOutput) } // Configures the policy yearly retention as documented in the `retentionYearly` block below. func (o PolicyVMOutput) RetentionYearly() PolicyVMRetentionYearlyPtrOutput { return o.ApplyT(func(v *PolicyVM) PolicyVMRetentionYearlyPtrOutput { return v.RetentionYearly }).(PolicyVMRetentionYearlyPtrOutput) } // A `tieringPolicy` block as defined below. func (o PolicyVMOutput) TieringPolicy() PolicyVMTieringPolicyPtrOutput { return o.ApplyT(func(v *PolicyVM) PolicyVMTieringPolicyPtrOutput { return v.TieringPolicy }).(PolicyVMTieringPolicyPtrOutput) } // Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC` func (o PolicyVMOutput) Timezone() pulumi.StringPtrOutput { return o.ApplyT(func(v *PolicyVM) pulumi.StringPtrOutput { return v.Timezone }).(pulumi.StringPtrOutput) } type PolicyVMArrayOutput struct{ *pulumi.OutputState } func (PolicyVMArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*PolicyVM)(nil)).Elem() } func (o PolicyVMArrayOutput) ToPolicyVMArrayOutput() PolicyVMArrayOutput { return o } func (o PolicyVMArrayOutput) ToPolicyVMArrayOutputWithContext(ctx context.Context) PolicyVMArrayOutput { return o } func (o PolicyVMArrayOutput) Index(i pulumi.IntInput) PolicyVMOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PolicyVM { return vs[0].([]*PolicyVM)[vs[1].(int)] }).(PolicyVMOutput) } type PolicyVMMapOutput struct{ *pulumi.OutputState } func (PolicyVMMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PolicyVM)(nil)).Elem() } func (o PolicyVMMapOutput) ToPolicyVMMapOutput() PolicyVMMapOutput { return o } func (o PolicyVMMapOutput) ToPolicyVMMapOutputWithContext(ctx context.Context) PolicyVMMapOutput { return o } func (o PolicyVMMapOutput) MapIndex(k pulumi.StringInput) PolicyVMOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PolicyVM { return vs[0].(map[string]*PolicyVM)[vs[1].(string)] }).(PolicyVMOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PolicyVMInput)(nil)).Elem(), &PolicyVM{}) pulumi.RegisterInputType(reflect.TypeOf((*PolicyVMArrayInput)(nil)).Elem(), PolicyVMArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PolicyVMMapInput)(nil)).Elem(), PolicyVMMap{}) pulumi.RegisterOutputType(PolicyVMOutput{}) pulumi.RegisterOutputType(PolicyVMArrayOutput{}) pulumi.RegisterOutputType(PolicyVMMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/backup/policyFileShare.go
sdk/go/azure/backup/policyFileShare.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package backup 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 File Share Backup Policy within a Recovery Services vault. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/backup" // "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 // } // exampleVault, err := recoveryservices.NewVault(ctx, "example", &recoveryservices.VaultArgs{ // Name: pulumi.String("tfex-recovery-vault"), // Location: example.Location, // ResourceGroupName: example.Name, // Sku: pulumi.String("Standard"), // }) // if err != nil { // return err // } // _, err = backup.NewPolicyFileShare(ctx, "policy", &backup.PolicyFileShareArgs{ // Name: pulumi.String("tfex-recovery-vault-policy"), // ResourceGroupName: example.Name, // RecoveryVaultName: exampleVault.Name, // Timezone: pulumi.String("UTC"), // Backup: &backup.PolicyFileShareBackupArgs{ // Frequency: pulumi.String("Daily"), // Time: pulumi.String("23:00"), // }, // RetentionDaily: &backup.PolicyFileShareRetentionDailyArgs{ // Count: pulumi.Int(10), // }, // RetentionWeekly: &backup.PolicyFileShareRetentionWeeklyArgs{ // Count: pulumi.Int(7), // Weekdays: pulumi.StringArray{ // pulumi.String("Sunday"), // pulumi.String("Wednesday"), // pulumi.String("Friday"), // pulumi.String("Saturday"), // }, // }, // RetentionMonthly: &backup.PolicyFileShareRetentionMonthlyArgs{ // Count: pulumi.Int(7), // Weekdays: pulumi.StringArray{ // pulumi.String("Sunday"), // pulumi.String("Wednesday"), // }, // Weeks: pulumi.StringArray{ // pulumi.String("First"), // pulumi.String("Last"), // }, // }, // RetentionYearly: &backup.PolicyFileShareRetentionYearlyArgs{ // Count: pulumi.Int(7), // Weekdays: pulumi.StringArray{ // pulumi.String("Sunday"), // }, // Weeks: pulumi.StringArray{ // pulumi.String("Last"), // }, // Months: pulumi.StringArray{ // pulumi.String("January"), // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // Azure File Share Backup Policies can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:backup/policyFileShare:PolicyFileShare policy1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/example-recovery-vault/backupPolicies/policy1 // ``` type PolicyFileShare struct { pulumi.CustomResourceState // Configures the Policy backup frequency and times as documented in the `backup` block below. Backup PolicyFileShareBackupOutput `pulumi:"backup"` // Specifies the name of the policy. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringOutput `pulumi:"recoveryVaultName"` // The name of the resource group in which to create the policy. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Configures the policy daily retention as documented in the `retentionDaily` block below. RetentionDaily PolicyFileShareRetentionDailyOutput `pulumi:"retentionDaily"` // Configures the policy monthly retention as documented in the `retentionMonthly` block below. RetentionMonthly PolicyFileShareRetentionMonthlyPtrOutput `pulumi:"retentionMonthly"` // Configures the policy weekly retention as documented in the `retentionWeekly` block below. RetentionWeekly PolicyFileShareRetentionWeeklyPtrOutput `pulumi:"retentionWeekly"` // Configures the policy yearly retention as documented in the `retentionYearly` block below. RetentionYearly PolicyFileShareRetentionYearlyPtrOutput `pulumi:"retentionYearly"` // Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC` // // > **Note:** The maximum number of snapshots that Azure Files can retain is 200. If your combined snapshot count exceeds 200 based on your retention policies, it will result in an error. See [this](https://docs.microsoft.com/azure/backup/backup-azure-files-faq#what-is-the-maximum-retention-i-can-configure-for-backups) article for more information. Timezone pulumi.StringPtrOutput `pulumi:"timezone"` } // NewPolicyFileShare registers a new resource with the given unique name, arguments, and options. func NewPolicyFileShare(ctx *pulumi.Context, name string, args *PolicyFileShareArgs, opts ...pulumi.ResourceOption) (*PolicyFileShare, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Backup == nil { return nil, errors.New("invalid value for required argument 'Backup'") } if args.RecoveryVaultName == nil { return nil, errors.New("invalid value for required argument 'RecoveryVaultName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.RetentionDaily == nil { return nil, errors.New("invalid value for required argument 'RetentionDaily'") } opts = internal.PkgResourceDefaultOpts(opts) var resource PolicyFileShare err := ctx.RegisterResource("azure:backup/policyFileShare:PolicyFileShare", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPolicyFileShare gets an existing PolicyFileShare 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 GetPolicyFileShare(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PolicyFileShareState, opts ...pulumi.ResourceOption) (*PolicyFileShare, error) { var resource PolicyFileShare err := ctx.ReadResource("azure:backup/policyFileShare:PolicyFileShare", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering PolicyFileShare resources. type policyFileShareState struct { // Configures the Policy backup frequency and times as documented in the `backup` block below. Backup *PolicyFileShareBackup `pulumi:"backup"` // Specifies the name of the policy. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName *string `pulumi:"recoveryVaultName"` // The name of the resource group in which to create the policy. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Configures the policy daily retention as documented in the `retentionDaily` block below. RetentionDaily *PolicyFileShareRetentionDaily `pulumi:"retentionDaily"` // Configures the policy monthly retention as documented in the `retentionMonthly` block below. RetentionMonthly *PolicyFileShareRetentionMonthly `pulumi:"retentionMonthly"` // Configures the policy weekly retention as documented in the `retentionWeekly` block below. RetentionWeekly *PolicyFileShareRetentionWeekly `pulumi:"retentionWeekly"` // Configures the policy yearly retention as documented in the `retentionYearly` block below. RetentionYearly *PolicyFileShareRetentionYearly `pulumi:"retentionYearly"` // Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC` // // > **Note:** The maximum number of snapshots that Azure Files can retain is 200. If your combined snapshot count exceeds 200 based on your retention policies, it will result in an error. See [this](https://docs.microsoft.com/azure/backup/backup-azure-files-faq#what-is-the-maximum-retention-i-can-configure-for-backups) article for more information. Timezone *string `pulumi:"timezone"` } type PolicyFileShareState struct { // Configures the Policy backup frequency and times as documented in the `backup` block below. Backup PolicyFileShareBackupPtrInput // Specifies the name of the policy. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringPtrInput // The name of the resource group in which to create the policy. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Configures the policy daily retention as documented in the `retentionDaily` block below. RetentionDaily PolicyFileShareRetentionDailyPtrInput // Configures the policy monthly retention as documented in the `retentionMonthly` block below. RetentionMonthly PolicyFileShareRetentionMonthlyPtrInput // Configures the policy weekly retention as documented in the `retentionWeekly` block below. RetentionWeekly PolicyFileShareRetentionWeeklyPtrInput // Configures the policy yearly retention as documented in the `retentionYearly` block below. RetentionYearly PolicyFileShareRetentionYearlyPtrInput // Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC` // // > **Note:** The maximum number of snapshots that Azure Files can retain is 200. If your combined snapshot count exceeds 200 based on your retention policies, it will result in an error. See [this](https://docs.microsoft.com/azure/backup/backup-azure-files-faq#what-is-the-maximum-retention-i-can-configure-for-backups) article for more information. Timezone pulumi.StringPtrInput } func (PolicyFileShareState) ElementType() reflect.Type { return reflect.TypeOf((*policyFileShareState)(nil)).Elem() } type policyFileShareArgs struct { // Configures the Policy backup frequency and times as documented in the `backup` block below. Backup PolicyFileShareBackup `pulumi:"backup"` // Specifies the name of the policy. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName string `pulumi:"recoveryVaultName"` // The name of the resource group in which to create the policy. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Configures the policy daily retention as documented in the `retentionDaily` block below. RetentionDaily PolicyFileShareRetentionDaily `pulumi:"retentionDaily"` // Configures the policy monthly retention as documented in the `retentionMonthly` block below. RetentionMonthly *PolicyFileShareRetentionMonthly `pulumi:"retentionMonthly"` // Configures the policy weekly retention as documented in the `retentionWeekly` block below. RetentionWeekly *PolicyFileShareRetentionWeekly `pulumi:"retentionWeekly"` // Configures the policy yearly retention as documented in the `retentionYearly` block below. RetentionYearly *PolicyFileShareRetentionYearly `pulumi:"retentionYearly"` // Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC` // // > **Note:** The maximum number of snapshots that Azure Files can retain is 200. If your combined snapshot count exceeds 200 based on your retention policies, it will result in an error. See [this](https://docs.microsoft.com/azure/backup/backup-azure-files-faq#what-is-the-maximum-retention-i-can-configure-for-backups) article for more information. Timezone *string `pulumi:"timezone"` } // The set of arguments for constructing a PolicyFileShare resource. type PolicyFileShareArgs struct { // Configures the Policy backup frequency and times as documented in the `backup` block below. Backup PolicyFileShareBackupInput // Specifies the name of the policy. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. RecoveryVaultName pulumi.StringInput // The name of the resource group in which to create the policy. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Configures the policy daily retention as documented in the `retentionDaily` block below. RetentionDaily PolicyFileShareRetentionDailyInput // Configures the policy monthly retention as documented in the `retentionMonthly` block below. RetentionMonthly PolicyFileShareRetentionMonthlyPtrInput // Configures the policy weekly retention as documented in the `retentionWeekly` block below. RetentionWeekly PolicyFileShareRetentionWeeklyPtrInput // Configures the policy yearly retention as documented in the `retentionYearly` block below. RetentionYearly PolicyFileShareRetentionYearlyPtrInput // Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC` // // > **Note:** The maximum number of snapshots that Azure Files can retain is 200. If your combined snapshot count exceeds 200 based on your retention policies, it will result in an error. See [this](https://docs.microsoft.com/azure/backup/backup-azure-files-faq#what-is-the-maximum-retention-i-can-configure-for-backups) article for more information. Timezone pulumi.StringPtrInput } func (PolicyFileShareArgs) ElementType() reflect.Type { return reflect.TypeOf((*policyFileShareArgs)(nil)).Elem() } type PolicyFileShareInput interface { pulumi.Input ToPolicyFileShareOutput() PolicyFileShareOutput ToPolicyFileShareOutputWithContext(ctx context.Context) PolicyFileShareOutput } func (*PolicyFileShare) ElementType() reflect.Type { return reflect.TypeOf((**PolicyFileShare)(nil)).Elem() } func (i *PolicyFileShare) ToPolicyFileShareOutput() PolicyFileShareOutput { return i.ToPolicyFileShareOutputWithContext(context.Background()) } func (i *PolicyFileShare) ToPolicyFileShareOutputWithContext(ctx context.Context) PolicyFileShareOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyFileShareOutput) } // PolicyFileShareArrayInput is an input type that accepts PolicyFileShareArray and PolicyFileShareArrayOutput values. // You can construct a concrete instance of `PolicyFileShareArrayInput` via: // // PolicyFileShareArray{ PolicyFileShareArgs{...} } type PolicyFileShareArrayInput interface { pulumi.Input ToPolicyFileShareArrayOutput() PolicyFileShareArrayOutput ToPolicyFileShareArrayOutputWithContext(context.Context) PolicyFileShareArrayOutput } type PolicyFileShareArray []PolicyFileShareInput func (PolicyFileShareArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*PolicyFileShare)(nil)).Elem() } func (i PolicyFileShareArray) ToPolicyFileShareArrayOutput() PolicyFileShareArrayOutput { return i.ToPolicyFileShareArrayOutputWithContext(context.Background()) } func (i PolicyFileShareArray) ToPolicyFileShareArrayOutputWithContext(ctx context.Context) PolicyFileShareArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyFileShareArrayOutput) } // PolicyFileShareMapInput is an input type that accepts PolicyFileShareMap and PolicyFileShareMapOutput values. // You can construct a concrete instance of `PolicyFileShareMapInput` via: // // PolicyFileShareMap{ "key": PolicyFileShareArgs{...} } type PolicyFileShareMapInput interface { pulumi.Input ToPolicyFileShareMapOutput() PolicyFileShareMapOutput ToPolicyFileShareMapOutputWithContext(context.Context) PolicyFileShareMapOutput } type PolicyFileShareMap map[string]PolicyFileShareInput func (PolicyFileShareMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PolicyFileShare)(nil)).Elem() } func (i PolicyFileShareMap) ToPolicyFileShareMapOutput() PolicyFileShareMapOutput { return i.ToPolicyFileShareMapOutputWithContext(context.Background()) } func (i PolicyFileShareMap) ToPolicyFileShareMapOutputWithContext(ctx context.Context) PolicyFileShareMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PolicyFileShareMapOutput) } type PolicyFileShareOutput struct{ *pulumi.OutputState } func (PolicyFileShareOutput) ElementType() reflect.Type { return reflect.TypeOf((**PolicyFileShare)(nil)).Elem() } func (o PolicyFileShareOutput) ToPolicyFileShareOutput() PolicyFileShareOutput { return o } func (o PolicyFileShareOutput) ToPolicyFileShareOutputWithContext(ctx context.Context) PolicyFileShareOutput { return o } // Configures the Policy backup frequency and times as documented in the `backup` block below. func (o PolicyFileShareOutput) Backup() PolicyFileShareBackupOutput { return o.ApplyT(func(v *PolicyFileShare) PolicyFileShareBackupOutput { return v.Backup }).(PolicyFileShareBackupOutput) } // Specifies the name of the policy. Changing this forces a new resource to be created. func (o PolicyFileShareOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *PolicyFileShare) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created. func (o PolicyFileShareOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v *PolicyFileShare) pulumi.StringOutput { return v.RecoveryVaultName }).(pulumi.StringOutput) } // The name of the resource group in which to create the policy. Changing this forces a new resource to be created. func (o PolicyFileShareOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *PolicyFileShare) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Configures the policy daily retention as documented in the `retentionDaily` block below. func (o PolicyFileShareOutput) RetentionDaily() PolicyFileShareRetentionDailyOutput { return o.ApplyT(func(v *PolicyFileShare) PolicyFileShareRetentionDailyOutput { return v.RetentionDaily }).(PolicyFileShareRetentionDailyOutput) } // Configures the policy monthly retention as documented in the `retentionMonthly` block below. func (o PolicyFileShareOutput) RetentionMonthly() PolicyFileShareRetentionMonthlyPtrOutput { return o.ApplyT(func(v *PolicyFileShare) PolicyFileShareRetentionMonthlyPtrOutput { return v.RetentionMonthly }).(PolicyFileShareRetentionMonthlyPtrOutput) } // Configures the policy weekly retention as documented in the `retentionWeekly` block below. func (o PolicyFileShareOutput) RetentionWeekly() PolicyFileShareRetentionWeeklyPtrOutput { return o.ApplyT(func(v *PolicyFileShare) PolicyFileShareRetentionWeeklyPtrOutput { return v.RetentionWeekly }).(PolicyFileShareRetentionWeeklyPtrOutput) } // Configures the policy yearly retention as documented in the `retentionYearly` block below. func (o PolicyFileShareOutput) RetentionYearly() PolicyFileShareRetentionYearlyPtrOutput { return o.ApplyT(func(v *PolicyFileShare) PolicyFileShareRetentionYearlyPtrOutput { return v.RetentionYearly }).(PolicyFileShareRetentionYearlyPtrOutput) } // Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC` // // > **Note:** The maximum number of snapshots that Azure Files can retain is 200. If your combined snapshot count exceeds 200 based on your retention policies, it will result in an error. See [this](https://docs.microsoft.com/azure/backup/backup-azure-files-faq#what-is-the-maximum-retention-i-can-configure-for-backups) article for more information. func (o PolicyFileShareOutput) Timezone() pulumi.StringPtrOutput { return o.ApplyT(func(v *PolicyFileShare) pulumi.StringPtrOutput { return v.Timezone }).(pulumi.StringPtrOutput) } type PolicyFileShareArrayOutput struct{ *pulumi.OutputState } func (PolicyFileShareArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*PolicyFileShare)(nil)).Elem() } func (o PolicyFileShareArrayOutput) ToPolicyFileShareArrayOutput() PolicyFileShareArrayOutput { return o } func (o PolicyFileShareArrayOutput) ToPolicyFileShareArrayOutputWithContext(ctx context.Context) PolicyFileShareArrayOutput { return o } func (o PolicyFileShareArrayOutput) Index(i pulumi.IntInput) PolicyFileShareOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PolicyFileShare { return vs[0].([]*PolicyFileShare)[vs[1].(int)] }).(PolicyFileShareOutput) } type PolicyFileShareMapOutput struct{ *pulumi.OutputState } func (PolicyFileShareMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PolicyFileShare)(nil)).Elem() } func (o PolicyFileShareMapOutput) ToPolicyFileShareMapOutput() PolicyFileShareMapOutput { return o } func (o PolicyFileShareMapOutput) ToPolicyFileShareMapOutputWithContext(ctx context.Context) PolicyFileShareMapOutput { return o } func (o PolicyFileShareMapOutput) MapIndex(k pulumi.StringInput) PolicyFileShareOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PolicyFileShare { return vs[0].(map[string]*PolicyFileShare)[vs[1].(string)] }).(PolicyFileShareOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PolicyFileShareInput)(nil)).Elem(), &PolicyFileShare{}) pulumi.RegisterInputType(reflect.TypeOf((*PolicyFileShareArrayInput)(nil)).Elem(), PolicyFileShareArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PolicyFileShareMapInput)(nil)).Elem(), PolicyFileShareMap{}) pulumi.RegisterOutputType(PolicyFileShareOutput{}) pulumi.RegisterOutputType(PolicyFileShareArrayOutput{}) pulumi.RegisterOutputType(PolicyFileShareMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/backup/getPolicyVM.go
sdk/go/azure/backup/getPolicyVM.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package backup 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 VM Backup Policy. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/backup" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := backup.LookupPolicyVM(ctx, &backup.LookupPolicyVMArgs{ // Name: "policy", // RecoveryVaultName: "recovery_vault", // ResourceGroupName: "resource_group", // }, nil) // if err != nil { // return err // } // return nil // }) // } // // ``` func LookupPolicyVM(ctx *pulumi.Context, args *LookupPolicyVMArgs, opts ...pulumi.InvokeOption) (*LookupPolicyVMResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupPolicyVMResult err := ctx.Invoke("azure:backup/getPolicyVM:getPolicyVM", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getPolicyVM. type LookupPolicyVMArgs struct { // Specifies the name of the VM Backup Policy. Name string `pulumi:"name"` // Specifies the name of the Recovery Services Vault. RecoveryVaultName string `pulumi:"recoveryVaultName"` // The name of the resource group in which the VM Backup Policy resides. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getPolicyVM. type LookupPolicyVMResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` RecoveryVaultName string `pulumi:"recoveryVaultName"` ResourceGroupName string `pulumi:"resourceGroupName"` } func LookupPolicyVMOutput(ctx *pulumi.Context, args LookupPolicyVMOutputArgs, opts ...pulumi.InvokeOption) LookupPolicyVMResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupPolicyVMResultOutput, error) { args := v.(LookupPolicyVMArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:backup/getPolicyVM:getPolicyVM", args, LookupPolicyVMResultOutput{}, options).(LookupPolicyVMResultOutput), nil }).(LookupPolicyVMResultOutput) } // A collection of arguments for invoking getPolicyVM. type LookupPolicyVMOutputArgs struct { // Specifies the name of the VM Backup Policy. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the Recovery Services Vault. RecoveryVaultName pulumi.StringInput `pulumi:"recoveryVaultName"` // The name of the resource group in which the VM Backup Policy resides. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupPolicyVMOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupPolicyVMArgs)(nil)).Elem() } // A collection of values returned by getPolicyVM. type LookupPolicyVMResultOutput struct{ *pulumi.OutputState } func (LookupPolicyVMResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupPolicyVMResult)(nil)).Elem() } func (o LookupPolicyVMResultOutput) ToLookupPolicyVMResultOutput() LookupPolicyVMResultOutput { return o } func (o LookupPolicyVMResultOutput) ToLookupPolicyVMResultOutputWithContext(ctx context.Context) LookupPolicyVMResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupPolicyVMResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupPolicyVMResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupPolicyVMResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupPolicyVMResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupPolicyVMResultOutput) RecoveryVaultName() pulumi.StringOutput { return o.ApplyT(func(v LookupPolicyVMResult) string { return v.RecoveryVaultName }).(pulumi.StringOutput) } func (o LookupPolicyVMResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupPolicyVMResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupPolicyVMResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/pim/init.go
sdk/go/azure/pim/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 pim 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:pim/activeRoleAssignment:ActiveRoleAssignment": r = &ActiveRoleAssignment{} case "azure:pim/eligibleRoleAssignment:EligibleRoleAssignment": r = &EligibleRoleAssignment{} case "azure:pim/roleManagementPolicy:RoleManagementPolicy": r = &RoleManagementPolicy{} 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", "pim/activeRoleAssignment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "pim/eligibleRoleAssignment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "pim/roleManagementPolicy", &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/pim/pulumiTypes.go
sdk/go/azure/pim/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 pim 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 ActiveRoleAssignmentSchedule struct { // An `expiration` block as defined above. Expiration *ActiveRoleAssignmentScheduleExpiration `pulumi:"expiration"` // The start date/time of the role assignment. Changing this forces a new resource to be created. StartDateTime *string `pulumi:"startDateTime"` } // ActiveRoleAssignmentScheduleInput is an input type that accepts ActiveRoleAssignmentScheduleArgs and ActiveRoleAssignmentScheduleOutput values. // You can construct a concrete instance of `ActiveRoleAssignmentScheduleInput` via: // // ActiveRoleAssignmentScheduleArgs{...} type ActiveRoleAssignmentScheduleInput interface { pulumi.Input ToActiveRoleAssignmentScheduleOutput() ActiveRoleAssignmentScheduleOutput ToActiveRoleAssignmentScheduleOutputWithContext(context.Context) ActiveRoleAssignmentScheduleOutput } type ActiveRoleAssignmentScheduleArgs struct { // An `expiration` block as defined above. Expiration ActiveRoleAssignmentScheduleExpirationPtrInput `pulumi:"expiration"` // The start date/time of the role assignment. Changing this forces a new resource to be created. StartDateTime pulumi.StringPtrInput `pulumi:"startDateTime"` } func (ActiveRoleAssignmentScheduleArgs) ElementType() reflect.Type { return reflect.TypeOf((*ActiveRoleAssignmentSchedule)(nil)).Elem() } func (i ActiveRoleAssignmentScheduleArgs) ToActiveRoleAssignmentScheduleOutput() ActiveRoleAssignmentScheduleOutput { return i.ToActiveRoleAssignmentScheduleOutputWithContext(context.Background()) } func (i ActiveRoleAssignmentScheduleArgs) ToActiveRoleAssignmentScheduleOutputWithContext(ctx context.Context) ActiveRoleAssignmentScheduleOutput { return pulumi.ToOutputWithContext(ctx, i).(ActiveRoleAssignmentScheduleOutput) } func (i ActiveRoleAssignmentScheduleArgs) ToActiveRoleAssignmentSchedulePtrOutput() ActiveRoleAssignmentSchedulePtrOutput { return i.ToActiveRoleAssignmentSchedulePtrOutputWithContext(context.Background()) } func (i ActiveRoleAssignmentScheduleArgs) ToActiveRoleAssignmentSchedulePtrOutputWithContext(ctx context.Context) ActiveRoleAssignmentSchedulePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ActiveRoleAssignmentScheduleOutput).ToActiveRoleAssignmentSchedulePtrOutputWithContext(ctx) } // ActiveRoleAssignmentSchedulePtrInput is an input type that accepts ActiveRoleAssignmentScheduleArgs, ActiveRoleAssignmentSchedulePtr and ActiveRoleAssignmentSchedulePtrOutput values. // You can construct a concrete instance of `ActiveRoleAssignmentSchedulePtrInput` via: // // ActiveRoleAssignmentScheduleArgs{...} // // or: // // nil type ActiveRoleAssignmentSchedulePtrInput interface { pulumi.Input ToActiveRoleAssignmentSchedulePtrOutput() ActiveRoleAssignmentSchedulePtrOutput ToActiveRoleAssignmentSchedulePtrOutputWithContext(context.Context) ActiveRoleAssignmentSchedulePtrOutput } type activeRoleAssignmentSchedulePtrType ActiveRoleAssignmentScheduleArgs func ActiveRoleAssignmentSchedulePtr(v *ActiveRoleAssignmentScheduleArgs) ActiveRoleAssignmentSchedulePtrInput { return (*activeRoleAssignmentSchedulePtrType)(v) } func (*activeRoleAssignmentSchedulePtrType) ElementType() reflect.Type { return reflect.TypeOf((**ActiveRoleAssignmentSchedule)(nil)).Elem() } func (i *activeRoleAssignmentSchedulePtrType) ToActiveRoleAssignmentSchedulePtrOutput() ActiveRoleAssignmentSchedulePtrOutput { return i.ToActiveRoleAssignmentSchedulePtrOutputWithContext(context.Background()) } func (i *activeRoleAssignmentSchedulePtrType) ToActiveRoleAssignmentSchedulePtrOutputWithContext(ctx context.Context) ActiveRoleAssignmentSchedulePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ActiveRoleAssignmentSchedulePtrOutput) } type ActiveRoleAssignmentScheduleOutput struct{ *pulumi.OutputState } func (ActiveRoleAssignmentScheduleOutput) ElementType() reflect.Type { return reflect.TypeOf((*ActiveRoleAssignmentSchedule)(nil)).Elem() } func (o ActiveRoleAssignmentScheduleOutput) ToActiveRoleAssignmentScheduleOutput() ActiveRoleAssignmentScheduleOutput { return o } func (o ActiveRoleAssignmentScheduleOutput) ToActiveRoleAssignmentScheduleOutputWithContext(ctx context.Context) ActiveRoleAssignmentScheduleOutput { return o } func (o ActiveRoleAssignmentScheduleOutput) ToActiveRoleAssignmentSchedulePtrOutput() ActiveRoleAssignmentSchedulePtrOutput { return o.ToActiveRoleAssignmentSchedulePtrOutputWithContext(context.Background()) } func (o ActiveRoleAssignmentScheduleOutput) ToActiveRoleAssignmentSchedulePtrOutputWithContext(ctx context.Context) ActiveRoleAssignmentSchedulePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ActiveRoleAssignmentSchedule) *ActiveRoleAssignmentSchedule { return &v }).(ActiveRoleAssignmentSchedulePtrOutput) } // An `expiration` block as defined above. func (o ActiveRoleAssignmentScheduleOutput) Expiration() ActiveRoleAssignmentScheduleExpirationPtrOutput { return o.ApplyT(func(v ActiveRoleAssignmentSchedule) *ActiveRoleAssignmentScheduleExpiration { return v.Expiration }).(ActiveRoleAssignmentScheduleExpirationPtrOutput) } // The start date/time of the role assignment. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentScheduleOutput) StartDateTime() pulumi.StringPtrOutput { return o.ApplyT(func(v ActiveRoleAssignmentSchedule) *string { return v.StartDateTime }).(pulumi.StringPtrOutput) } type ActiveRoleAssignmentSchedulePtrOutput struct{ *pulumi.OutputState } func (ActiveRoleAssignmentSchedulePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ActiveRoleAssignmentSchedule)(nil)).Elem() } func (o ActiveRoleAssignmentSchedulePtrOutput) ToActiveRoleAssignmentSchedulePtrOutput() ActiveRoleAssignmentSchedulePtrOutput { return o } func (o ActiveRoleAssignmentSchedulePtrOutput) ToActiveRoleAssignmentSchedulePtrOutputWithContext(ctx context.Context) ActiveRoleAssignmentSchedulePtrOutput { return o } func (o ActiveRoleAssignmentSchedulePtrOutput) Elem() ActiveRoleAssignmentScheduleOutput { return o.ApplyT(func(v *ActiveRoleAssignmentSchedule) ActiveRoleAssignmentSchedule { if v != nil { return *v } var ret ActiveRoleAssignmentSchedule return ret }).(ActiveRoleAssignmentScheduleOutput) } // An `expiration` block as defined above. func (o ActiveRoleAssignmentSchedulePtrOutput) Expiration() ActiveRoleAssignmentScheduleExpirationPtrOutput { return o.ApplyT(func(v *ActiveRoleAssignmentSchedule) *ActiveRoleAssignmentScheduleExpiration { if v == nil { return nil } return v.Expiration }).(ActiveRoleAssignmentScheduleExpirationPtrOutput) } // The start date/time of the role assignment. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentSchedulePtrOutput) StartDateTime() pulumi.StringPtrOutput { return o.ApplyT(func(v *ActiveRoleAssignmentSchedule) *string { if v == nil { return nil } return v.StartDateTime }).(pulumi.StringPtrOutput) } type ActiveRoleAssignmentScheduleExpiration struct { // The duration of the role assignment in days. Changing this forces a new resource to be created. DurationDays *int `pulumi:"durationDays"` // The duration of the role assignment in hours. Changing this forces a new resource to be created. DurationHours *int `pulumi:"durationHours"` // The end date/time of the role assignment. Changing this forces a new resource to be created. // // > **Note:** Only one of `durationDays`, `durationHours` or `endDateTime` should be specified. EndDateTime *string `pulumi:"endDateTime"` } // ActiveRoleAssignmentScheduleExpirationInput is an input type that accepts ActiveRoleAssignmentScheduleExpirationArgs and ActiveRoleAssignmentScheduleExpirationOutput values. // You can construct a concrete instance of `ActiveRoleAssignmentScheduleExpirationInput` via: // // ActiveRoleAssignmentScheduleExpirationArgs{...} type ActiveRoleAssignmentScheduleExpirationInput interface { pulumi.Input ToActiveRoleAssignmentScheduleExpirationOutput() ActiveRoleAssignmentScheduleExpirationOutput ToActiveRoleAssignmentScheduleExpirationOutputWithContext(context.Context) ActiveRoleAssignmentScheduleExpirationOutput } type ActiveRoleAssignmentScheduleExpirationArgs struct { // The duration of the role assignment in days. Changing this forces a new resource to be created. DurationDays pulumi.IntPtrInput `pulumi:"durationDays"` // The duration of the role assignment in hours. Changing this forces a new resource to be created. DurationHours pulumi.IntPtrInput `pulumi:"durationHours"` // The end date/time of the role assignment. Changing this forces a new resource to be created. // // > **Note:** Only one of `durationDays`, `durationHours` or `endDateTime` should be specified. EndDateTime pulumi.StringPtrInput `pulumi:"endDateTime"` } func (ActiveRoleAssignmentScheduleExpirationArgs) ElementType() reflect.Type { return reflect.TypeOf((*ActiveRoleAssignmentScheduleExpiration)(nil)).Elem() } func (i ActiveRoleAssignmentScheduleExpirationArgs) ToActiveRoleAssignmentScheduleExpirationOutput() ActiveRoleAssignmentScheduleExpirationOutput { return i.ToActiveRoleAssignmentScheduleExpirationOutputWithContext(context.Background()) } func (i ActiveRoleAssignmentScheduleExpirationArgs) ToActiveRoleAssignmentScheduleExpirationOutputWithContext(ctx context.Context) ActiveRoleAssignmentScheduleExpirationOutput { return pulumi.ToOutputWithContext(ctx, i).(ActiveRoleAssignmentScheduleExpirationOutput) } func (i ActiveRoleAssignmentScheduleExpirationArgs) ToActiveRoleAssignmentScheduleExpirationPtrOutput() ActiveRoleAssignmentScheduleExpirationPtrOutput { return i.ToActiveRoleAssignmentScheduleExpirationPtrOutputWithContext(context.Background()) } func (i ActiveRoleAssignmentScheduleExpirationArgs) ToActiveRoleAssignmentScheduleExpirationPtrOutputWithContext(ctx context.Context) ActiveRoleAssignmentScheduleExpirationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ActiveRoleAssignmentScheduleExpirationOutput).ToActiveRoleAssignmentScheduleExpirationPtrOutputWithContext(ctx) } // ActiveRoleAssignmentScheduleExpirationPtrInput is an input type that accepts ActiveRoleAssignmentScheduleExpirationArgs, ActiveRoleAssignmentScheduleExpirationPtr and ActiveRoleAssignmentScheduleExpirationPtrOutput values. // You can construct a concrete instance of `ActiveRoleAssignmentScheduleExpirationPtrInput` via: // // ActiveRoleAssignmentScheduleExpirationArgs{...} // // or: // // nil type ActiveRoleAssignmentScheduleExpirationPtrInput interface { pulumi.Input ToActiveRoleAssignmentScheduleExpirationPtrOutput() ActiveRoleAssignmentScheduleExpirationPtrOutput ToActiveRoleAssignmentScheduleExpirationPtrOutputWithContext(context.Context) ActiveRoleAssignmentScheduleExpirationPtrOutput } type activeRoleAssignmentScheduleExpirationPtrType ActiveRoleAssignmentScheduleExpirationArgs func ActiveRoleAssignmentScheduleExpirationPtr(v *ActiveRoleAssignmentScheduleExpirationArgs) ActiveRoleAssignmentScheduleExpirationPtrInput { return (*activeRoleAssignmentScheduleExpirationPtrType)(v) } func (*activeRoleAssignmentScheduleExpirationPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ActiveRoleAssignmentScheduleExpiration)(nil)).Elem() } func (i *activeRoleAssignmentScheduleExpirationPtrType) ToActiveRoleAssignmentScheduleExpirationPtrOutput() ActiveRoleAssignmentScheduleExpirationPtrOutput { return i.ToActiveRoleAssignmentScheduleExpirationPtrOutputWithContext(context.Background()) } func (i *activeRoleAssignmentScheduleExpirationPtrType) ToActiveRoleAssignmentScheduleExpirationPtrOutputWithContext(ctx context.Context) ActiveRoleAssignmentScheduleExpirationPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ActiveRoleAssignmentScheduleExpirationPtrOutput) } type ActiveRoleAssignmentScheduleExpirationOutput struct{ *pulumi.OutputState } func (ActiveRoleAssignmentScheduleExpirationOutput) ElementType() reflect.Type { return reflect.TypeOf((*ActiveRoleAssignmentScheduleExpiration)(nil)).Elem() } func (o ActiveRoleAssignmentScheduleExpirationOutput) ToActiveRoleAssignmentScheduleExpirationOutput() ActiveRoleAssignmentScheduleExpirationOutput { return o } func (o ActiveRoleAssignmentScheduleExpirationOutput) ToActiveRoleAssignmentScheduleExpirationOutputWithContext(ctx context.Context) ActiveRoleAssignmentScheduleExpirationOutput { return o } func (o ActiveRoleAssignmentScheduleExpirationOutput) ToActiveRoleAssignmentScheduleExpirationPtrOutput() ActiveRoleAssignmentScheduleExpirationPtrOutput { return o.ToActiveRoleAssignmentScheduleExpirationPtrOutputWithContext(context.Background()) } func (o ActiveRoleAssignmentScheduleExpirationOutput) ToActiveRoleAssignmentScheduleExpirationPtrOutputWithContext(ctx context.Context) ActiveRoleAssignmentScheduleExpirationPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ActiveRoleAssignmentScheduleExpiration) *ActiveRoleAssignmentScheduleExpiration { return &v }).(ActiveRoleAssignmentScheduleExpirationPtrOutput) } // The duration of the role assignment in days. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentScheduleExpirationOutput) DurationDays() pulumi.IntPtrOutput { return o.ApplyT(func(v ActiveRoleAssignmentScheduleExpiration) *int { return v.DurationDays }).(pulumi.IntPtrOutput) } // The duration of the role assignment in hours. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentScheduleExpirationOutput) DurationHours() pulumi.IntPtrOutput { return o.ApplyT(func(v ActiveRoleAssignmentScheduleExpiration) *int { return v.DurationHours }).(pulumi.IntPtrOutput) } // The end date/time of the role assignment. Changing this forces a new resource to be created. // // > **Note:** Only one of `durationDays`, `durationHours` or `endDateTime` should be specified. func (o ActiveRoleAssignmentScheduleExpirationOutput) EndDateTime() pulumi.StringPtrOutput { return o.ApplyT(func(v ActiveRoleAssignmentScheduleExpiration) *string { return v.EndDateTime }).(pulumi.StringPtrOutput) } type ActiveRoleAssignmentScheduleExpirationPtrOutput struct{ *pulumi.OutputState } func (ActiveRoleAssignmentScheduleExpirationPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ActiveRoleAssignmentScheduleExpiration)(nil)).Elem() } func (o ActiveRoleAssignmentScheduleExpirationPtrOutput) ToActiveRoleAssignmentScheduleExpirationPtrOutput() ActiveRoleAssignmentScheduleExpirationPtrOutput { return o } func (o ActiveRoleAssignmentScheduleExpirationPtrOutput) ToActiveRoleAssignmentScheduleExpirationPtrOutputWithContext(ctx context.Context) ActiveRoleAssignmentScheduleExpirationPtrOutput { return o } func (o ActiveRoleAssignmentScheduleExpirationPtrOutput) Elem() ActiveRoleAssignmentScheduleExpirationOutput { return o.ApplyT(func(v *ActiveRoleAssignmentScheduleExpiration) ActiveRoleAssignmentScheduleExpiration { if v != nil { return *v } var ret ActiveRoleAssignmentScheduleExpiration return ret }).(ActiveRoleAssignmentScheduleExpirationOutput) } // The duration of the role assignment in days. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentScheduleExpirationPtrOutput) DurationDays() pulumi.IntPtrOutput { return o.ApplyT(func(v *ActiveRoleAssignmentScheduleExpiration) *int { if v == nil { return nil } return v.DurationDays }).(pulumi.IntPtrOutput) } // The duration of the role assignment in hours. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentScheduleExpirationPtrOutput) DurationHours() pulumi.IntPtrOutput { return o.ApplyT(func(v *ActiveRoleAssignmentScheduleExpiration) *int { if v == nil { return nil } return v.DurationHours }).(pulumi.IntPtrOutput) } // The end date/time of the role assignment. Changing this forces a new resource to be created. // // > **Note:** Only one of `durationDays`, `durationHours` or `endDateTime` should be specified. func (o ActiveRoleAssignmentScheduleExpirationPtrOutput) EndDateTime() pulumi.StringPtrOutput { return o.ApplyT(func(v *ActiveRoleAssignmentScheduleExpiration) *string { if v == nil { return nil } return v.EndDateTime }).(pulumi.StringPtrOutput) } type ActiveRoleAssignmentTicket struct { // User-supplied ticket number to be included with the request. Changing this forces a new resource to be created. Number *string `pulumi:"number"` // User-supplied ticket system name to be included with the request. Changing this forces a new resource to be created. System *string `pulumi:"system"` } // ActiveRoleAssignmentTicketInput is an input type that accepts ActiveRoleAssignmentTicketArgs and ActiveRoleAssignmentTicketOutput values. // You can construct a concrete instance of `ActiveRoleAssignmentTicketInput` via: // // ActiveRoleAssignmentTicketArgs{...} type ActiveRoleAssignmentTicketInput interface { pulumi.Input ToActiveRoleAssignmentTicketOutput() ActiveRoleAssignmentTicketOutput ToActiveRoleAssignmentTicketOutputWithContext(context.Context) ActiveRoleAssignmentTicketOutput } type ActiveRoleAssignmentTicketArgs struct { // User-supplied ticket number to be included with the request. Changing this forces a new resource to be created. Number pulumi.StringPtrInput `pulumi:"number"` // User-supplied ticket system name to be included with the request. Changing this forces a new resource to be created. System pulumi.StringPtrInput `pulumi:"system"` } func (ActiveRoleAssignmentTicketArgs) ElementType() reflect.Type { return reflect.TypeOf((*ActiveRoleAssignmentTicket)(nil)).Elem() } func (i ActiveRoleAssignmentTicketArgs) ToActiveRoleAssignmentTicketOutput() ActiveRoleAssignmentTicketOutput { return i.ToActiveRoleAssignmentTicketOutputWithContext(context.Background()) } func (i ActiveRoleAssignmentTicketArgs) ToActiveRoleAssignmentTicketOutputWithContext(ctx context.Context) ActiveRoleAssignmentTicketOutput { return pulumi.ToOutputWithContext(ctx, i).(ActiveRoleAssignmentTicketOutput) } func (i ActiveRoleAssignmentTicketArgs) ToActiveRoleAssignmentTicketPtrOutput() ActiveRoleAssignmentTicketPtrOutput { return i.ToActiveRoleAssignmentTicketPtrOutputWithContext(context.Background()) } func (i ActiveRoleAssignmentTicketArgs) ToActiveRoleAssignmentTicketPtrOutputWithContext(ctx context.Context) ActiveRoleAssignmentTicketPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ActiveRoleAssignmentTicketOutput).ToActiveRoleAssignmentTicketPtrOutputWithContext(ctx) } // ActiveRoleAssignmentTicketPtrInput is an input type that accepts ActiveRoleAssignmentTicketArgs, ActiveRoleAssignmentTicketPtr and ActiveRoleAssignmentTicketPtrOutput values. // You can construct a concrete instance of `ActiveRoleAssignmentTicketPtrInput` via: // // ActiveRoleAssignmentTicketArgs{...} // // or: // // nil type ActiveRoleAssignmentTicketPtrInput interface { pulumi.Input ToActiveRoleAssignmentTicketPtrOutput() ActiveRoleAssignmentTicketPtrOutput ToActiveRoleAssignmentTicketPtrOutputWithContext(context.Context) ActiveRoleAssignmentTicketPtrOutput } type activeRoleAssignmentTicketPtrType ActiveRoleAssignmentTicketArgs func ActiveRoleAssignmentTicketPtr(v *ActiveRoleAssignmentTicketArgs) ActiveRoleAssignmentTicketPtrInput { return (*activeRoleAssignmentTicketPtrType)(v) } func (*activeRoleAssignmentTicketPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ActiveRoleAssignmentTicket)(nil)).Elem() } func (i *activeRoleAssignmentTicketPtrType) ToActiveRoleAssignmentTicketPtrOutput() ActiveRoleAssignmentTicketPtrOutput { return i.ToActiveRoleAssignmentTicketPtrOutputWithContext(context.Background()) } func (i *activeRoleAssignmentTicketPtrType) ToActiveRoleAssignmentTicketPtrOutputWithContext(ctx context.Context) ActiveRoleAssignmentTicketPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ActiveRoleAssignmentTicketPtrOutput) } type ActiveRoleAssignmentTicketOutput struct{ *pulumi.OutputState } func (ActiveRoleAssignmentTicketOutput) ElementType() reflect.Type { return reflect.TypeOf((*ActiveRoleAssignmentTicket)(nil)).Elem() } func (o ActiveRoleAssignmentTicketOutput) ToActiveRoleAssignmentTicketOutput() ActiveRoleAssignmentTicketOutput { return o } func (o ActiveRoleAssignmentTicketOutput) ToActiveRoleAssignmentTicketOutputWithContext(ctx context.Context) ActiveRoleAssignmentTicketOutput { return o } func (o ActiveRoleAssignmentTicketOutput) ToActiveRoleAssignmentTicketPtrOutput() ActiveRoleAssignmentTicketPtrOutput { return o.ToActiveRoleAssignmentTicketPtrOutputWithContext(context.Background()) } func (o ActiveRoleAssignmentTicketOutput) ToActiveRoleAssignmentTicketPtrOutputWithContext(ctx context.Context) ActiveRoleAssignmentTicketPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ActiveRoleAssignmentTicket) *ActiveRoleAssignmentTicket { return &v }).(ActiveRoleAssignmentTicketPtrOutput) } // User-supplied ticket number to be included with the request. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentTicketOutput) Number() pulumi.StringPtrOutput { return o.ApplyT(func(v ActiveRoleAssignmentTicket) *string { return v.Number }).(pulumi.StringPtrOutput) } // User-supplied ticket system name to be included with the request. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentTicketOutput) System() pulumi.StringPtrOutput { return o.ApplyT(func(v ActiveRoleAssignmentTicket) *string { return v.System }).(pulumi.StringPtrOutput) } type ActiveRoleAssignmentTicketPtrOutput struct{ *pulumi.OutputState } func (ActiveRoleAssignmentTicketPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ActiveRoleAssignmentTicket)(nil)).Elem() } func (o ActiveRoleAssignmentTicketPtrOutput) ToActiveRoleAssignmentTicketPtrOutput() ActiveRoleAssignmentTicketPtrOutput { return o } func (o ActiveRoleAssignmentTicketPtrOutput) ToActiveRoleAssignmentTicketPtrOutputWithContext(ctx context.Context) ActiveRoleAssignmentTicketPtrOutput { return o } func (o ActiveRoleAssignmentTicketPtrOutput) Elem() ActiveRoleAssignmentTicketOutput { return o.ApplyT(func(v *ActiveRoleAssignmentTicket) ActiveRoleAssignmentTicket { if v != nil { return *v } var ret ActiveRoleAssignmentTicket return ret }).(ActiveRoleAssignmentTicketOutput) } // User-supplied ticket number to be included with the request. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentTicketPtrOutput) Number() pulumi.StringPtrOutput { return o.ApplyT(func(v *ActiveRoleAssignmentTicket) *string { if v == nil { return nil } return v.Number }).(pulumi.StringPtrOutput) } // User-supplied ticket system name to be included with the request. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentTicketPtrOutput) System() pulumi.StringPtrOutput { return o.ApplyT(func(v *ActiveRoleAssignmentTicket) *string { if v == nil { return nil } return v.System }).(pulumi.StringPtrOutput) } type EligibleRoleAssignmentSchedule struct { // An `expiration` block as defined above. Expiration *EligibleRoleAssignmentScheduleExpiration `pulumi:"expiration"` // The start date/time of the role assignment. Changing this forces a new resource to be created. StartDateTime *string `pulumi:"startDateTime"` } // EligibleRoleAssignmentScheduleInput is an input type that accepts EligibleRoleAssignmentScheduleArgs and EligibleRoleAssignmentScheduleOutput values. // You can construct a concrete instance of `EligibleRoleAssignmentScheduleInput` via: // // EligibleRoleAssignmentScheduleArgs{...} type EligibleRoleAssignmentScheduleInput interface { pulumi.Input ToEligibleRoleAssignmentScheduleOutput() EligibleRoleAssignmentScheduleOutput ToEligibleRoleAssignmentScheduleOutputWithContext(context.Context) EligibleRoleAssignmentScheduleOutput } type EligibleRoleAssignmentScheduleArgs struct { // An `expiration` block as defined above. Expiration EligibleRoleAssignmentScheduleExpirationPtrInput `pulumi:"expiration"` // The start date/time of the role assignment. Changing this forces a new resource to be created. StartDateTime pulumi.StringPtrInput `pulumi:"startDateTime"` } func (EligibleRoleAssignmentScheduleArgs) ElementType() reflect.Type { return reflect.TypeOf((*EligibleRoleAssignmentSchedule)(nil)).Elem() } func (i EligibleRoleAssignmentScheduleArgs) ToEligibleRoleAssignmentScheduleOutput() EligibleRoleAssignmentScheduleOutput { return i.ToEligibleRoleAssignmentScheduleOutputWithContext(context.Background()) } func (i EligibleRoleAssignmentScheduleArgs) ToEligibleRoleAssignmentScheduleOutputWithContext(ctx context.Context) EligibleRoleAssignmentScheduleOutput { return pulumi.ToOutputWithContext(ctx, i).(EligibleRoleAssignmentScheduleOutput) } func (i EligibleRoleAssignmentScheduleArgs) ToEligibleRoleAssignmentSchedulePtrOutput() EligibleRoleAssignmentSchedulePtrOutput { return i.ToEligibleRoleAssignmentSchedulePtrOutputWithContext(context.Background()) } func (i EligibleRoleAssignmentScheduleArgs) ToEligibleRoleAssignmentSchedulePtrOutputWithContext(ctx context.Context) EligibleRoleAssignmentSchedulePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(EligibleRoleAssignmentScheduleOutput).ToEligibleRoleAssignmentSchedulePtrOutputWithContext(ctx) } // EligibleRoleAssignmentSchedulePtrInput is an input type that accepts EligibleRoleAssignmentScheduleArgs, EligibleRoleAssignmentSchedulePtr and EligibleRoleAssignmentSchedulePtrOutput values. // You can construct a concrete instance of `EligibleRoleAssignmentSchedulePtrInput` via: // // EligibleRoleAssignmentScheduleArgs{...} // // or: // // nil type EligibleRoleAssignmentSchedulePtrInput interface { pulumi.Input ToEligibleRoleAssignmentSchedulePtrOutput() EligibleRoleAssignmentSchedulePtrOutput ToEligibleRoleAssignmentSchedulePtrOutputWithContext(context.Context) EligibleRoleAssignmentSchedulePtrOutput } type eligibleRoleAssignmentSchedulePtrType EligibleRoleAssignmentScheduleArgs func EligibleRoleAssignmentSchedulePtr(v *EligibleRoleAssignmentScheduleArgs) EligibleRoleAssignmentSchedulePtrInput { return (*eligibleRoleAssignmentSchedulePtrType)(v) } func (*eligibleRoleAssignmentSchedulePtrType) ElementType() reflect.Type { return reflect.TypeOf((**EligibleRoleAssignmentSchedule)(nil)).Elem() } func (i *eligibleRoleAssignmentSchedulePtrType) ToEligibleRoleAssignmentSchedulePtrOutput() EligibleRoleAssignmentSchedulePtrOutput { return i.ToEligibleRoleAssignmentSchedulePtrOutputWithContext(context.Background()) } func (i *eligibleRoleAssignmentSchedulePtrType) ToEligibleRoleAssignmentSchedulePtrOutputWithContext(ctx context.Context) EligibleRoleAssignmentSchedulePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(EligibleRoleAssignmentSchedulePtrOutput) } type EligibleRoleAssignmentScheduleOutput struct{ *pulumi.OutputState } func (EligibleRoleAssignmentScheduleOutput) ElementType() reflect.Type { return reflect.TypeOf((*EligibleRoleAssignmentSchedule)(nil)).Elem() } func (o EligibleRoleAssignmentScheduleOutput) ToEligibleRoleAssignmentScheduleOutput() EligibleRoleAssignmentScheduleOutput { return o } func (o EligibleRoleAssignmentScheduleOutput) ToEligibleRoleAssignmentScheduleOutputWithContext(ctx context.Context) EligibleRoleAssignmentScheduleOutput { return o } func (o EligibleRoleAssignmentScheduleOutput) ToEligibleRoleAssignmentSchedulePtrOutput() EligibleRoleAssignmentSchedulePtrOutput { return o.ToEligibleRoleAssignmentSchedulePtrOutputWithContext(context.Background()) } func (o EligibleRoleAssignmentScheduleOutput) ToEligibleRoleAssignmentSchedulePtrOutputWithContext(ctx context.Context) EligibleRoleAssignmentSchedulePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v EligibleRoleAssignmentSchedule) *EligibleRoleAssignmentSchedule { return &v }).(EligibleRoleAssignmentSchedulePtrOutput) } // An `expiration` block as defined above. func (o EligibleRoleAssignmentScheduleOutput) Expiration() EligibleRoleAssignmentScheduleExpirationPtrOutput { return o.ApplyT(func(v EligibleRoleAssignmentSchedule) *EligibleRoleAssignmentScheduleExpiration { return v.Expiration }).(EligibleRoleAssignmentScheduleExpirationPtrOutput) } // The start date/time of the role assignment. Changing this forces a new resource to be created. func (o EligibleRoleAssignmentScheduleOutput) StartDateTime() pulumi.StringPtrOutput { return o.ApplyT(func(v EligibleRoleAssignmentSchedule) *string { return v.StartDateTime }).(pulumi.StringPtrOutput) } type EligibleRoleAssignmentSchedulePtrOutput struct{ *pulumi.OutputState } func (EligibleRoleAssignmentSchedulePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**EligibleRoleAssignmentSchedule)(nil)).Elem() } func (o EligibleRoleAssignmentSchedulePtrOutput) ToEligibleRoleAssignmentSchedulePtrOutput() EligibleRoleAssignmentSchedulePtrOutput { return o } func (o EligibleRoleAssignmentSchedulePtrOutput) ToEligibleRoleAssignmentSchedulePtrOutputWithContext(ctx context.Context) EligibleRoleAssignmentSchedulePtrOutput { return o } func (o EligibleRoleAssignmentSchedulePtrOutput) Elem() EligibleRoleAssignmentScheduleOutput { return o.ApplyT(func(v *EligibleRoleAssignmentSchedule) EligibleRoleAssignmentSchedule { if v != nil { return *v } var ret EligibleRoleAssignmentSchedule return ret }).(EligibleRoleAssignmentScheduleOutput) } // An `expiration` block as defined above. func (o EligibleRoleAssignmentSchedulePtrOutput) Expiration() EligibleRoleAssignmentScheduleExpirationPtrOutput { return o.ApplyT(func(v *EligibleRoleAssignmentSchedule) *EligibleRoleAssignmentScheduleExpiration { if v == nil { return nil } return v.Expiration }).(EligibleRoleAssignmentScheduleExpirationPtrOutput) } // The start date/time of the role assignment. Changing this forces a new resource to be created. func (o EligibleRoleAssignmentSchedulePtrOutput) StartDateTime() pulumi.StringPtrOutput { return o.ApplyT(func(v *EligibleRoleAssignmentSchedule) *string { if v == nil { return nil } return v.StartDateTime }).(pulumi.StringPtrOutput) } type EligibleRoleAssignmentScheduleExpiration struct { // The duration of the role assignment in days. Changing this forces a new resource to be created. DurationDays *int `pulumi:"durationDays"` // The duration of the role assignment in hours. Changing this forces a new resource to be created. DurationHours *int `pulumi:"durationHours"` // The end date/time of the role assignment. Changing this forces a new resource to be created. // // > **Note:** Only one of `durationDays`, `durationHours` or `endDateTime` should be specified. EndDateTime *string `pulumi:"endDateTime"` } // EligibleRoleAssignmentScheduleExpirationInput is an input type that accepts EligibleRoleAssignmentScheduleExpirationArgs and EligibleRoleAssignmentScheduleExpirationOutput values. // You can construct a concrete instance of `EligibleRoleAssignmentScheduleExpirationInput` via: // // EligibleRoleAssignmentScheduleExpirationArgs{...} type EligibleRoleAssignmentScheduleExpirationInput interface { pulumi.Input ToEligibleRoleAssignmentScheduleExpirationOutput() EligibleRoleAssignmentScheduleExpirationOutput ToEligibleRoleAssignmentScheduleExpirationOutputWithContext(context.Context) EligibleRoleAssignmentScheduleExpirationOutput } type EligibleRoleAssignmentScheduleExpirationArgs struct { // The duration of the role assignment in days. Changing this forces a new resource to be created. DurationDays pulumi.IntPtrInput `pulumi:"durationDays"` // The duration of the role assignment in hours. Changing this forces a new resource to be created. DurationHours pulumi.IntPtrInput `pulumi:"durationHours"` // The end date/time of the role assignment. Changing this forces a new resource to be created. // // > **Note:** Only one of `durationDays`, `durationHours` or `endDateTime` should be specified. EndDateTime pulumi.StringPtrInput `pulumi:"endDateTime"` } func (EligibleRoleAssignmentScheduleExpirationArgs) ElementType() reflect.Type { return reflect.TypeOf((*EligibleRoleAssignmentScheduleExpiration)(nil)).Elem() } func (i EligibleRoleAssignmentScheduleExpirationArgs) ToEligibleRoleAssignmentScheduleExpirationOutput() EligibleRoleAssignmentScheduleExpirationOutput { return i.ToEligibleRoleAssignmentScheduleExpirationOutputWithContext(context.Background()) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
true
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/pim/getRoleManagementPolicy.go
sdk/go/azure/pim/getRoleManagementPolicy.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package pim 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 information on a role policy for an Azure Management Group, Subscription, Resource Group or resource. // // ## Example Usage // // ### Resource Group // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/pim" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.LookupResourceGroup(ctx, &core.LookupResourceGroupArgs{ // Name: "example-rg", // }, nil) // if err != nil { // return err // } // _, err = authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{ // Name: pulumi.StringRef("Contributor"), // Scope: pulumi.StringRef(example.Id), // }, nil) // if err != nil { // return err // } // _, err = pim.LookupRoleManagementPolicy(ctx, &pim.LookupRoleManagementPolicyArgs{ // Scope: test.Id, // RoleDefinitionId: contributor.Id, // }, nil) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Management Group // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/pim" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := management.LookupGroup(ctx, &management.LookupGroupArgs{ // Name: pulumi.StringRef("example-group"), // }, nil) // if err != nil { // return err // } // mgContributor, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{ // Name: pulumi.StringRef("Contributor"), // Scope: pulumi.StringRef(exampleAzurermManagementGroup.Id), // }, nil) // if err != nil { // return err // } // _, err = pim.LookupRoleManagementPolicy(ctx, &pim.LookupRoleManagementPolicyArgs{ // Scope: example.Id, // RoleDefinitionId: mgContributor.Id, // }, nil) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Authorization` - 2020-10-01 func LookupRoleManagementPolicy(ctx *pulumi.Context, args *LookupRoleManagementPolicyArgs, opts ...pulumi.InvokeOption) (*LookupRoleManagementPolicyResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupRoleManagementPolicyResult err := ctx.Invoke("azure:pim/getRoleManagementPolicy:getRoleManagementPolicy", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getRoleManagementPolicy. type LookupRoleManagementPolicyArgs struct { // The scoped Role Definition ID of the role for which this policy applies. RoleDefinitionId string `pulumi:"roleDefinitionId"` // The scope to which this Role Management Policy applies. Can refer to a management group, a subscription, a resource group or a resource. Scope string `pulumi:"scope"` } // A collection of values returned by getRoleManagementPolicy. type LookupRoleManagementPolicyResult struct { // An `activationRules` block as defined below. ActivationRules []GetRoleManagementPolicyActivationRule `pulumi:"activationRules"` // An `activeAssignmentRules` block as defined below. ActiveAssignmentRules []GetRoleManagementPolicyActiveAssignmentRule `pulumi:"activeAssignmentRules"` // (String) The description of this policy. Description string `pulumi:"description"` // An `eligibleAssignmentRules` block as defined below. EligibleAssignmentRules []GetRoleManagementPolicyEligibleAssignmentRule `pulumi:"eligibleAssignmentRules"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // (String) The name of this policy, which is typically a UUID and may change over time. Name string `pulumi:"name"` // A `notificationRules` block as defined below. NotificationRules []GetRoleManagementPolicyNotificationRule `pulumi:"notificationRules"` RoleDefinitionId string `pulumi:"roleDefinitionId"` Scope string `pulumi:"scope"` } func LookupRoleManagementPolicyOutput(ctx *pulumi.Context, args LookupRoleManagementPolicyOutputArgs, opts ...pulumi.InvokeOption) LookupRoleManagementPolicyResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupRoleManagementPolicyResultOutput, error) { args := v.(LookupRoleManagementPolicyArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:pim/getRoleManagementPolicy:getRoleManagementPolicy", args, LookupRoleManagementPolicyResultOutput{}, options).(LookupRoleManagementPolicyResultOutput), nil }).(LookupRoleManagementPolicyResultOutput) } // A collection of arguments for invoking getRoleManagementPolicy. type LookupRoleManagementPolicyOutputArgs struct { // The scoped Role Definition ID of the role for which this policy applies. RoleDefinitionId pulumi.StringInput `pulumi:"roleDefinitionId"` // The scope to which this Role Management Policy applies. Can refer to a management group, a subscription, a resource group or a resource. Scope pulumi.StringInput `pulumi:"scope"` } func (LookupRoleManagementPolicyOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupRoleManagementPolicyArgs)(nil)).Elem() } // A collection of values returned by getRoleManagementPolicy. type LookupRoleManagementPolicyResultOutput struct{ *pulumi.OutputState } func (LookupRoleManagementPolicyResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupRoleManagementPolicyResult)(nil)).Elem() } func (o LookupRoleManagementPolicyResultOutput) ToLookupRoleManagementPolicyResultOutput() LookupRoleManagementPolicyResultOutput { return o } func (o LookupRoleManagementPolicyResultOutput) ToLookupRoleManagementPolicyResultOutputWithContext(ctx context.Context) LookupRoleManagementPolicyResultOutput { return o } // An `activationRules` block as defined below. func (o LookupRoleManagementPolicyResultOutput) ActivationRules() GetRoleManagementPolicyActivationRuleArrayOutput { return o.ApplyT(func(v LookupRoleManagementPolicyResult) []GetRoleManagementPolicyActivationRule { return v.ActivationRules }).(GetRoleManagementPolicyActivationRuleArrayOutput) } // An `activeAssignmentRules` block as defined below. func (o LookupRoleManagementPolicyResultOutput) ActiveAssignmentRules() GetRoleManagementPolicyActiveAssignmentRuleArrayOutput { return o.ApplyT(func(v LookupRoleManagementPolicyResult) []GetRoleManagementPolicyActiveAssignmentRule { return v.ActiveAssignmentRules }).(GetRoleManagementPolicyActiveAssignmentRuleArrayOutput) } // (String) The description of this policy. func (o LookupRoleManagementPolicyResultOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v LookupRoleManagementPolicyResult) string { return v.Description }).(pulumi.StringOutput) } // An `eligibleAssignmentRules` block as defined below. func (o LookupRoleManagementPolicyResultOutput) EligibleAssignmentRules() GetRoleManagementPolicyEligibleAssignmentRuleArrayOutput { return o.ApplyT(func(v LookupRoleManagementPolicyResult) []GetRoleManagementPolicyEligibleAssignmentRule { return v.EligibleAssignmentRules }).(GetRoleManagementPolicyEligibleAssignmentRuleArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupRoleManagementPolicyResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupRoleManagementPolicyResult) string { return v.Id }).(pulumi.StringOutput) } // (String) The name of this policy, which is typically a UUID and may change over time. func (o LookupRoleManagementPolicyResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupRoleManagementPolicyResult) string { return v.Name }).(pulumi.StringOutput) } // A `notificationRules` block as defined below. func (o LookupRoleManagementPolicyResultOutput) NotificationRules() GetRoleManagementPolicyNotificationRuleArrayOutput { return o.ApplyT(func(v LookupRoleManagementPolicyResult) []GetRoleManagementPolicyNotificationRule { return v.NotificationRules }).(GetRoleManagementPolicyNotificationRuleArrayOutput) } func (o LookupRoleManagementPolicyResultOutput) RoleDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v LookupRoleManagementPolicyResult) string { return v.RoleDefinitionId }).(pulumi.StringOutput) } func (o LookupRoleManagementPolicyResultOutput) Scope() pulumi.StringOutput { return o.ApplyT(func(v LookupRoleManagementPolicyResult) string { return v.Scope }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupRoleManagementPolicyResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/pim/getRoleAssignments.go
sdk/go/azure/pim/getRoleAssignments.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package pim 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 existing Role Assignments. // // ## 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/pim" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // example := pim.GetRoleAssignmentsOutput(ctx, pim.GetRoleAssignmentsOutputArgs{ // Scope: exampleResourceGroup.ID(), // }, nil) // ctx.Export("id", example.ApplyT(func(example pim.GetRoleAssignmentsResult) ([]pim.GetRoleAssignmentsRoleAssignment, error) { // return []pim.GetRoleAssignmentsRoleAssignment(example.RoleAssignments), nil // }).([]pim.GetRoleAssignmentsRoleAssignmentOutput)) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.Authorization` - 2022-04-01 func GetRoleAssignments(ctx *pulumi.Context, args *GetRoleAssignmentsArgs, opts ...pulumi.InvokeOption) (*GetRoleAssignmentsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetRoleAssignmentsResult err := ctx.Invoke("azure:pim/getRoleAssignments:getRoleAssignments", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getRoleAssignments. type GetRoleAssignmentsArgs struct { // Whether to limit the result exactly at the specified scope and not above or below it. Defaults to `false`. LimitAtScope *bool `pulumi:"limitAtScope"` // The principal ID to filter the list of Role Assignments against. PrincipalId *string `pulumi:"principalId"` // The scope at which to list Role Assignments. Scope string `pulumi:"scope"` // The tenant ID for cross-tenant requests. TenantId *string `pulumi:"tenantId"` } // A collection of values returned by getRoleAssignments. type GetRoleAssignmentsResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` LimitAtScope *bool `pulumi:"limitAtScope"` // The principal ID. PrincipalId *string `pulumi:"principalId"` // A `roleAssignments` block as defined below. RoleAssignments []GetRoleAssignmentsRoleAssignment `pulumi:"roleAssignments"` Scope string `pulumi:"scope"` TenantId *string `pulumi:"tenantId"` } func GetRoleAssignmentsOutput(ctx *pulumi.Context, args GetRoleAssignmentsOutputArgs, opts ...pulumi.InvokeOption) GetRoleAssignmentsResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetRoleAssignmentsResultOutput, error) { args := v.(GetRoleAssignmentsArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:pim/getRoleAssignments:getRoleAssignments", args, GetRoleAssignmentsResultOutput{}, options).(GetRoleAssignmentsResultOutput), nil }).(GetRoleAssignmentsResultOutput) } // A collection of arguments for invoking getRoleAssignments. type GetRoleAssignmentsOutputArgs struct { // Whether to limit the result exactly at the specified scope and not above or below it. Defaults to `false`. LimitAtScope pulumi.BoolPtrInput `pulumi:"limitAtScope"` // The principal ID to filter the list of Role Assignments against. PrincipalId pulumi.StringPtrInput `pulumi:"principalId"` // The scope at which to list Role Assignments. Scope pulumi.StringInput `pulumi:"scope"` // The tenant ID for cross-tenant requests. TenantId pulumi.StringPtrInput `pulumi:"tenantId"` } func (GetRoleAssignmentsOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetRoleAssignmentsArgs)(nil)).Elem() } // A collection of values returned by getRoleAssignments. type GetRoleAssignmentsResultOutput struct{ *pulumi.OutputState } func (GetRoleAssignmentsResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetRoleAssignmentsResult)(nil)).Elem() } func (o GetRoleAssignmentsResultOutput) ToGetRoleAssignmentsResultOutput() GetRoleAssignmentsResultOutput { return o } func (o GetRoleAssignmentsResultOutput) ToGetRoleAssignmentsResultOutputWithContext(ctx context.Context) GetRoleAssignmentsResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o GetRoleAssignmentsResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetRoleAssignmentsResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetRoleAssignmentsResultOutput) LimitAtScope() pulumi.BoolPtrOutput { return o.ApplyT(func(v GetRoleAssignmentsResult) *bool { return v.LimitAtScope }).(pulumi.BoolPtrOutput) } // The principal ID. func (o GetRoleAssignmentsResultOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v GetRoleAssignmentsResult) *string { return v.PrincipalId }).(pulumi.StringPtrOutput) } // A `roleAssignments` block as defined below. func (o GetRoleAssignmentsResultOutput) RoleAssignments() GetRoleAssignmentsRoleAssignmentArrayOutput { return o.ApplyT(func(v GetRoleAssignmentsResult) []GetRoleAssignmentsRoleAssignment { return v.RoleAssignments }).(GetRoleAssignmentsRoleAssignmentArrayOutput) } func (o GetRoleAssignmentsResultOutput) Scope() pulumi.StringOutput { return o.ApplyT(func(v GetRoleAssignmentsResult) string { return v.Scope }).(pulumi.StringOutput) } func (o GetRoleAssignmentsResultOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v GetRoleAssignmentsResult) *string { return v.TenantId }).(pulumi.StringPtrOutput) } func init() { pulumi.RegisterOutputType(GetRoleAssignmentsResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/pim/roleManagementPolicy.go
sdk/go/azure/pim/roleManagementPolicy.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package pim import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manage a role policy for an Azure Management Group, Subscription, Resource Group or resource. // // ## Example Usage // // ### Management Group // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/pim" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := management.NewGroup(ctx, "example", &management.GroupArgs{ // Name: pulumi.String("example-group"), // }) // if err != nil { // return err // } // mgContributor := authorization.LookupRoleDefinitionOutput(ctx, authorization.GetRoleDefinitionOutputArgs{ // Name: pulumi.String("Contributor"), // Scope: example.ID(), // }, nil) // _, err = pim.NewRoleManagementPolicy(ctx, "example", &pim.RoleManagementPolicyArgs{ // Scope: example.ID(), // RoleDefinitionId: pulumi.String(mgContributor.ApplyT(func(mgContributor authorization.GetRoleDefinitionResult) (*string, error) { // return &mgContributor.Id, nil // }).(pulumi.StringPtrOutput)), // EligibleAssignmentRules: &pim.RoleManagementPolicyEligibleAssignmentRulesArgs{ // ExpirationRequired: pulumi.Bool(false), // }, // ActiveAssignmentRules: &pim.RoleManagementPolicyActiveAssignmentRulesArgs{ // ExpireAfter: pulumi.String("P90D"), // }, // ActivationRules: &pim.RoleManagementPolicyActivationRulesArgs{ // MaximumDuration: pulumi.String("PT1H"), // RequireApproval: pulumi.Bool(true), // }, // NotificationRules: &pim.RoleManagementPolicyNotificationRulesArgs{ // ActiveAssignments: &pim.RoleManagementPolicyNotificationRulesActiveAssignmentsArgs{ // AdminNotifications: &pim.RoleManagementPolicyNotificationRulesActiveAssignmentsAdminNotificationsArgs{ // NotificationLevel: pulumi.String("Critical"), // DefaultRecipients: pulumi.Bool(false), // AdditionalRecipients: pulumi.StringArray{ // pulumi.String("someone@example.com"), // }, // }, // }, // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Authorization` - 2020-10-01 // // ## Import // // Because these policies are created automatically by Azure, they will auto-import on first use. They can be imported using the `resource id` of the role definition, combined with the scope id, e.g. // // ```sh // $ pulumi import azure:pim/roleManagementPolicy:RoleManagementPolicy example "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/00000000-0000-0000-0000-000000000000|<scope>" // ``` type RoleManagementPolicy struct { pulumi.CustomResourceState // An `activationRules` block as defined below. ActivationRules RoleManagementPolicyActivationRulesOutput `pulumi:"activationRules"` // An `activeAssignmentRules` block as defined below. ActiveAssignmentRules RoleManagementPolicyActiveAssignmentRulesOutput `pulumi:"activeAssignmentRules"` // (String) The description of this policy. Description pulumi.StringOutput `pulumi:"description"` // An `eligibleAssignmentRules` block as defined below. EligibleAssignmentRules RoleManagementPolicyEligibleAssignmentRulesOutput `pulumi:"eligibleAssignmentRules"` // (String) The name of this policy, which is typically a UUID and may change over time. Name pulumi.StringOutput `pulumi:"name"` // A `notificationRules` block as defined below. NotificationRules RoleManagementPolicyNotificationRulesOutput `pulumi:"notificationRules"` // The scoped Role Definition ID of the role for which this policy will apply. Changing this forces a new resource to be created. RoleDefinitionId pulumi.StringOutput `pulumi:"roleDefinitionId"` // The scope to which this Role Management Policy will apply. Can refer to a management group, a subscription, a resource group or a resource. Changing this forces a new resource to be created. Scope pulumi.StringOutput `pulumi:"scope"` } // NewRoleManagementPolicy registers a new resource with the given unique name, arguments, and options. func NewRoleManagementPolicy(ctx *pulumi.Context, name string, args *RoleManagementPolicyArgs, opts ...pulumi.ResourceOption) (*RoleManagementPolicy, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.RoleDefinitionId == nil { return nil, errors.New("invalid value for required argument 'RoleDefinitionId'") } if args.Scope == nil { return nil, errors.New("invalid value for required argument 'Scope'") } opts = internal.PkgResourceDefaultOpts(opts) var resource RoleManagementPolicy err := ctx.RegisterResource("azure:pim/roleManagementPolicy:RoleManagementPolicy", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetRoleManagementPolicy gets an existing RoleManagementPolicy 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 GetRoleManagementPolicy(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RoleManagementPolicyState, opts ...pulumi.ResourceOption) (*RoleManagementPolicy, error) { var resource RoleManagementPolicy err := ctx.ReadResource("azure:pim/roleManagementPolicy:RoleManagementPolicy", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering RoleManagementPolicy resources. type roleManagementPolicyState struct { // An `activationRules` block as defined below. ActivationRules *RoleManagementPolicyActivationRules `pulumi:"activationRules"` // An `activeAssignmentRules` block as defined below. ActiveAssignmentRules *RoleManagementPolicyActiveAssignmentRules `pulumi:"activeAssignmentRules"` // (String) The description of this policy. Description *string `pulumi:"description"` // An `eligibleAssignmentRules` block as defined below. EligibleAssignmentRules *RoleManagementPolicyEligibleAssignmentRules `pulumi:"eligibleAssignmentRules"` // (String) The name of this policy, which is typically a UUID and may change over time. Name *string `pulumi:"name"` // A `notificationRules` block as defined below. NotificationRules *RoleManagementPolicyNotificationRules `pulumi:"notificationRules"` // The scoped Role Definition ID of the role for which this policy will apply. Changing this forces a new resource to be created. RoleDefinitionId *string `pulumi:"roleDefinitionId"` // The scope to which this Role Management Policy will apply. Can refer to a management group, a subscription, a resource group or a resource. Changing this forces a new resource to be created. Scope *string `pulumi:"scope"` } type RoleManagementPolicyState struct { // An `activationRules` block as defined below. ActivationRules RoleManagementPolicyActivationRulesPtrInput // An `activeAssignmentRules` block as defined below. ActiveAssignmentRules RoleManagementPolicyActiveAssignmentRulesPtrInput // (String) The description of this policy. Description pulumi.StringPtrInput // An `eligibleAssignmentRules` block as defined below. EligibleAssignmentRules RoleManagementPolicyEligibleAssignmentRulesPtrInput // (String) The name of this policy, which is typically a UUID and may change over time. Name pulumi.StringPtrInput // A `notificationRules` block as defined below. NotificationRules RoleManagementPolicyNotificationRulesPtrInput // The scoped Role Definition ID of the role for which this policy will apply. Changing this forces a new resource to be created. RoleDefinitionId pulumi.StringPtrInput // The scope to which this Role Management Policy will apply. Can refer to a management group, a subscription, a resource group or a resource. Changing this forces a new resource to be created. Scope pulumi.StringPtrInput } func (RoleManagementPolicyState) ElementType() reflect.Type { return reflect.TypeOf((*roleManagementPolicyState)(nil)).Elem() } type roleManagementPolicyArgs struct { // An `activationRules` block as defined below. ActivationRules *RoleManagementPolicyActivationRules `pulumi:"activationRules"` // An `activeAssignmentRules` block as defined below. ActiveAssignmentRules *RoleManagementPolicyActiveAssignmentRules `pulumi:"activeAssignmentRules"` // An `eligibleAssignmentRules` block as defined below. EligibleAssignmentRules *RoleManagementPolicyEligibleAssignmentRules `pulumi:"eligibleAssignmentRules"` // A `notificationRules` block as defined below. NotificationRules *RoleManagementPolicyNotificationRules `pulumi:"notificationRules"` // The scoped Role Definition ID of the role for which this policy will apply. Changing this forces a new resource to be created. RoleDefinitionId string `pulumi:"roleDefinitionId"` // The scope to which this Role Management Policy will apply. Can refer to a management group, a subscription, a resource group or a resource. Changing this forces a new resource to be created. Scope string `pulumi:"scope"` } // The set of arguments for constructing a RoleManagementPolicy resource. type RoleManagementPolicyArgs struct { // An `activationRules` block as defined below. ActivationRules RoleManagementPolicyActivationRulesPtrInput // An `activeAssignmentRules` block as defined below. ActiveAssignmentRules RoleManagementPolicyActiveAssignmentRulesPtrInput // An `eligibleAssignmentRules` block as defined below. EligibleAssignmentRules RoleManagementPolicyEligibleAssignmentRulesPtrInput // A `notificationRules` block as defined below. NotificationRules RoleManagementPolicyNotificationRulesPtrInput // The scoped Role Definition ID of the role for which this policy will apply. Changing this forces a new resource to be created. RoleDefinitionId pulumi.StringInput // The scope to which this Role Management Policy will apply. Can refer to a management group, a subscription, a resource group or a resource. Changing this forces a new resource to be created. Scope pulumi.StringInput } func (RoleManagementPolicyArgs) ElementType() reflect.Type { return reflect.TypeOf((*roleManagementPolicyArgs)(nil)).Elem() } type RoleManagementPolicyInput interface { pulumi.Input ToRoleManagementPolicyOutput() RoleManagementPolicyOutput ToRoleManagementPolicyOutputWithContext(ctx context.Context) RoleManagementPolicyOutput } func (*RoleManagementPolicy) ElementType() reflect.Type { return reflect.TypeOf((**RoleManagementPolicy)(nil)).Elem() } func (i *RoleManagementPolicy) ToRoleManagementPolicyOutput() RoleManagementPolicyOutput { return i.ToRoleManagementPolicyOutputWithContext(context.Background()) } func (i *RoleManagementPolicy) ToRoleManagementPolicyOutputWithContext(ctx context.Context) RoleManagementPolicyOutput { return pulumi.ToOutputWithContext(ctx, i).(RoleManagementPolicyOutput) } // RoleManagementPolicyArrayInput is an input type that accepts RoleManagementPolicyArray and RoleManagementPolicyArrayOutput values. // You can construct a concrete instance of `RoleManagementPolicyArrayInput` via: // // RoleManagementPolicyArray{ RoleManagementPolicyArgs{...} } type RoleManagementPolicyArrayInput interface { pulumi.Input ToRoleManagementPolicyArrayOutput() RoleManagementPolicyArrayOutput ToRoleManagementPolicyArrayOutputWithContext(context.Context) RoleManagementPolicyArrayOutput } type RoleManagementPolicyArray []RoleManagementPolicyInput func (RoleManagementPolicyArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*RoleManagementPolicy)(nil)).Elem() } func (i RoleManagementPolicyArray) ToRoleManagementPolicyArrayOutput() RoleManagementPolicyArrayOutput { return i.ToRoleManagementPolicyArrayOutputWithContext(context.Background()) } func (i RoleManagementPolicyArray) ToRoleManagementPolicyArrayOutputWithContext(ctx context.Context) RoleManagementPolicyArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(RoleManagementPolicyArrayOutput) } // RoleManagementPolicyMapInput is an input type that accepts RoleManagementPolicyMap and RoleManagementPolicyMapOutput values. // You can construct a concrete instance of `RoleManagementPolicyMapInput` via: // // RoleManagementPolicyMap{ "key": RoleManagementPolicyArgs{...} } type RoleManagementPolicyMapInput interface { pulumi.Input ToRoleManagementPolicyMapOutput() RoleManagementPolicyMapOutput ToRoleManagementPolicyMapOutputWithContext(context.Context) RoleManagementPolicyMapOutput } type RoleManagementPolicyMap map[string]RoleManagementPolicyInput func (RoleManagementPolicyMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RoleManagementPolicy)(nil)).Elem() } func (i RoleManagementPolicyMap) ToRoleManagementPolicyMapOutput() RoleManagementPolicyMapOutput { return i.ToRoleManagementPolicyMapOutputWithContext(context.Background()) } func (i RoleManagementPolicyMap) ToRoleManagementPolicyMapOutputWithContext(ctx context.Context) RoleManagementPolicyMapOutput { return pulumi.ToOutputWithContext(ctx, i).(RoleManagementPolicyMapOutput) } type RoleManagementPolicyOutput struct{ *pulumi.OutputState } func (RoleManagementPolicyOutput) ElementType() reflect.Type { return reflect.TypeOf((**RoleManagementPolicy)(nil)).Elem() } func (o RoleManagementPolicyOutput) ToRoleManagementPolicyOutput() RoleManagementPolicyOutput { return o } func (o RoleManagementPolicyOutput) ToRoleManagementPolicyOutputWithContext(ctx context.Context) RoleManagementPolicyOutput { return o } // An `activationRules` block as defined below. func (o RoleManagementPolicyOutput) ActivationRules() RoleManagementPolicyActivationRulesOutput { return o.ApplyT(func(v *RoleManagementPolicy) RoleManagementPolicyActivationRulesOutput { return v.ActivationRules }).(RoleManagementPolicyActivationRulesOutput) } // An `activeAssignmentRules` block as defined below. func (o RoleManagementPolicyOutput) ActiveAssignmentRules() RoleManagementPolicyActiveAssignmentRulesOutput { return o.ApplyT(func(v *RoleManagementPolicy) RoleManagementPolicyActiveAssignmentRulesOutput { return v.ActiveAssignmentRules }).(RoleManagementPolicyActiveAssignmentRulesOutput) } // (String) The description of this policy. func (o RoleManagementPolicyOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v *RoleManagementPolicy) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput) } // An `eligibleAssignmentRules` block as defined below. func (o RoleManagementPolicyOutput) EligibleAssignmentRules() RoleManagementPolicyEligibleAssignmentRulesOutput { return o.ApplyT(func(v *RoleManagementPolicy) RoleManagementPolicyEligibleAssignmentRulesOutput { return v.EligibleAssignmentRules }).(RoleManagementPolicyEligibleAssignmentRulesOutput) } // (String) The name of this policy, which is typically a UUID and may change over time. func (o RoleManagementPolicyOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *RoleManagementPolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // A `notificationRules` block as defined below. func (o RoleManagementPolicyOutput) NotificationRules() RoleManagementPolicyNotificationRulesOutput { return o.ApplyT(func(v *RoleManagementPolicy) RoleManagementPolicyNotificationRulesOutput { return v.NotificationRules }).(RoleManagementPolicyNotificationRulesOutput) } // The scoped Role Definition ID of the role for which this policy will apply. Changing this forces a new resource to be created. func (o RoleManagementPolicyOutput) RoleDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v *RoleManagementPolicy) pulumi.StringOutput { return v.RoleDefinitionId }).(pulumi.StringOutput) } // The scope to which this Role Management Policy will apply. Can refer to a management group, a subscription, a resource group or a resource. Changing this forces a new resource to be created. func (o RoleManagementPolicyOutput) Scope() pulumi.StringOutput { return o.ApplyT(func(v *RoleManagementPolicy) pulumi.StringOutput { return v.Scope }).(pulumi.StringOutput) } type RoleManagementPolicyArrayOutput struct{ *pulumi.OutputState } func (RoleManagementPolicyArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*RoleManagementPolicy)(nil)).Elem() } func (o RoleManagementPolicyArrayOutput) ToRoleManagementPolicyArrayOutput() RoleManagementPolicyArrayOutput { return o } func (o RoleManagementPolicyArrayOutput) ToRoleManagementPolicyArrayOutputWithContext(ctx context.Context) RoleManagementPolicyArrayOutput { return o } func (o RoleManagementPolicyArrayOutput) Index(i pulumi.IntInput) RoleManagementPolicyOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RoleManagementPolicy { return vs[0].([]*RoleManagementPolicy)[vs[1].(int)] }).(RoleManagementPolicyOutput) } type RoleManagementPolicyMapOutput struct{ *pulumi.OutputState } func (RoleManagementPolicyMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*RoleManagementPolicy)(nil)).Elem() } func (o RoleManagementPolicyMapOutput) ToRoleManagementPolicyMapOutput() RoleManagementPolicyMapOutput { return o } func (o RoleManagementPolicyMapOutput) ToRoleManagementPolicyMapOutputWithContext(ctx context.Context) RoleManagementPolicyMapOutput { return o } func (o RoleManagementPolicyMapOutput) MapIndex(k pulumi.StringInput) RoleManagementPolicyOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RoleManagementPolicy { return vs[0].(map[string]*RoleManagementPolicy)[vs[1].(string)] }).(RoleManagementPolicyOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*RoleManagementPolicyInput)(nil)).Elem(), &RoleManagementPolicy{}) pulumi.RegisterInputType(reflect.TypeOf((*RoleManagementPolicyArrayInput)(nil)).Elem(), RoleManagementPolicyArray{}) pulumi.RegisterInputType(reflect.TypeOf((*RoleManagementPolicyMapInput)(nil)).Elem(), RoleManagementPolicyMap{}) pulumi.RegisterOutputType(RoleManagementPolicyOutput{}) pulumi.RegisterOutputType(RoleManagementPolicyArrayOutput{}) pulumi.RegisterOutputType(RoleManagementPolicyMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/pim/eligibleRoleAssignment.go
sdk/go/azure/pim/eligibleRoleAssignment.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package pim import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a PIM Eligible Role Assignment. // // ## Example Usage // // ### Subscription) // // ```go // package main // // import ( // // "fmt" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/pim" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // "github.com/pulumiverse/pulumi-time/sdk/go/time" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // primary, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // exampleGetRoleDefinition, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{ // Name: pulumi.StringRef("Reader"), // }, nil) // if err != nil { // return err // } // exampleStatic, err := time.NewStatic(ctx, "example", nil) // if err != nil { // return err // } // _, err = pim.NewEligibleRoleAssignment(ctx, "example", &pim.EligibleRoleAssignmentArgs{ // Scope: pulumi.String(primary.Id), // RoleDefinitionId: pulumi.Sprintf("%v%v", primary.Id, exampleGetRoleDefinition.Id), // PrincipalId: pulumi.String(example.ObjectId), // Schedule: &pim.EligibleRoleAssignmentScheduleArgs{ // StartDateTime: exampleStatic.Rfc3339, // Expiration: &pim.EligibleRoleAssignmentScheduleExpirationArgs{ // DurationHours: pulumi.Int(8), // }, // }, // Justification: pulumi.String("Expiration Duration Set"), // Ticket: &pim.EligibleRoleAssignmentTicketArgs{ // Number: pulumi.String("1"), // System: pulumi.String("example ticket system"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Management Group) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/pim" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // "github.com/pulumiverse/pulumi-time/sdk/go/time" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // exampleGetRoleDefinition, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{ // Name: pulumi.StringRef("Reader"), // }, nil) // if err != nil { // return err // } // exampleGroup, err := management.NewGroup(ctx, "example", &management.GroupArgs{ // Name: pulumi.String("Example-Management-Group"), // }) // if err != nil { // return err // } // exampleStatic, err := time.NewStatic(ctx, "example", nil) // if err != nil { // return err // } // _, err = pim.NewEligibleRoleAssignment(ctx, "example", &pim.EligibleRoleAssignmentArgs{ // Scope: exampleGroup.ID(), // RoleDefinitionId: pulumi.String(exampleGetRoleDefinition.Id), // PrincipalId: pulumi.String(example.ObjectId), // Schedule: &pim.EligibleRoleAssignmentScheduleArgs{ // StartDateTime: exampleStatic.Rfc3339, // Expiration: &pim.EligibleRoleAssignmentScheduleExpirationArgs{ // DurationHours: pulumi.Int(8), // }, // }, // Justification: pulumi.String("Expiration Duration Set"), // Ticket: &pim.EligibleRoleAssignmentTicketArgs{ // Number: pulumi.String("1"), // System: pulumi.String("example ticket system"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Authorization` - 2020-10-01 // // ## Import // // PIM Eligible Role Assignments can be imported using the following composite resource ID, e.g. // // ```sh // $ pulumi import azure:pim/eligibleRoleAssignment:EligibleRoleAssignment example /subscriptions/00000000-0000-0000-0000-000000000000|/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/00000000-0000-0000-0000-000000000000|00000000-0000-0000-0000-000000000000 // ``` type EligibleRoleAssignment struct { pulumi.CustomResourceState // The condition that limits the resources that the role can be assigned to. See the [official conditions documentation](https://learn.microsoft.com/en-us/azure/role-based-access-control/conditions-overview#what-are-role-assignment-conditions) for details. Changing this forces a new resource to be created. Condition pulumi.StringPtrOutput `pulumi:"condition"` // The version of the condition. Supported values include `2.0`. Changing this forces a new resource to be created. // // > **Note:** `conditionVersion` is required when specifying `condition` and vice versa. ConditionVersion pulumi.StringPtrOutput `pulumi:"conditionVersion"` // The justification of the role assignment. Changing this forces a new resource to be created. Justification pulumi.StringOutput `pulumi:"justification"` // Object ID of the principal for this eligible role assignment. Changing this forces a new resource to be created. PrincipalId pulumi.StringOutput `pulumi:"principalId"` // Type of principal to which the role will be assigned. PrincipalType pulumi.StringOutput `pulumi:"principalType"` // The role definition ID for this eligible role assignment. Changing this forces a new resource to be created. RoleDefinitionId pulumi.StringOutput `pulumi:"roleDefinitionId"` // A `schedule` block as defined below. Changing this forces a new resource to be created. Schedule EligibleRoleAssignmentScheduleOutput `pulumi:"schedule"` // The scope for this eligible role assignment, should be a valid resource ID. Changing this forces a new resource to be created. Scope pulumi.StringOutput `pulumi:"scope"` // A `ticket` block as defined below. Changing this forces a new resource to be created. Ticket EligibleRoleAssignmentTicketOutput `pulumi:"ticket"` } // NewEligibleRoleAssignment registers a new resource with the given unique name, arguments, and options. func NewEligibleRoleAssignment(ctx *pulumi.Context, name string, args *EligibleRoleAssignmentArgs, opts ...pulumi.ResourceOption) (*EligibleRoleAssignment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PrincipalId == nil { return nil, errors.New("invalid value for required argument 'PrincipalId'") } if args.RoleDefinitionId == nil { return nil, errors.New("invalid value for required argument 'RoleDefinitionId'") } if args.Scope == nil { return nil, errors.New("invalid value for required argument 'Scope'") } opts = internal.PkgResourceDefaultOpts(opts) var resource EligibleRoleAssignment err := ctx.RegisterResource("azure:pim/eligibleRoleAssignment:EligibleRoleAssignment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetEligibleRoleAssignment gets an existing EligibleRoleAssignment 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 GetEligibleRoleAssignment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *EligibleRoleAssignmentState, opts ...pulumi.ResourceOption) (*EligibleRoleAssignment, error) { var resource EligibleRoleAssignment err := ctx.ReadResource("azure:pim/eligibleRoleAssignment:EligibleRoleAssignment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering EligibleRoleAssignment resources. type eligibleRoleAssignmentState struct { // The condition that limits the resources that the role can be assigned to. See the [official conditions documentation](https://learn.microsoft.com/en-us/azure/role-based-access-control/conditions-overview#what-are-role-assignment-conditions) for details. Changing this forces a new resource to be created. Condition *string `pulumi:"condition"` // The version of the condition. Supported values include `2.0`. Changing this forces a new resource to be created. // // > **Note:** `conditionVersion` is required when specifying `condition` and vice versa. ConditionVersion *string `pulumi:"conditionVersion"` // The justification of the role assignment. Changing this forces a new resource to be created. Justification *string `pulumi:"justification"` // Object ID of the principal for this eligible role assignment. Changing this forces a new resource to be created. PrincipalId *string `pulumi:"principalId"` // Type of principal to which the role will be assigned. PrincipalType *string `pulumi:"principalType"` // The role definition ID for this eligible role assignment. Changing this forces a new resource to be created. RoleDefinitionId *string `pulumi:"roleDefinitionId"` // A `schedule` block as defined below. Changing this forces a new resource to be created. Schedule *EligibleRoleAssignmentSchedule `pulumi:"schedule"` // The scope for this eligible role assignment, should be a valid resource ID. Changing this forces a new resource to be created. Scope *string `pulumi:"scope"` // A `ticket` block as defined below. Changing this forces a new resource to be created. Ticket *EligibleRoleAssignmentTicket `pulumi:"ticket"` } type EligibleRoleAssignmentState struct { // The condition that limits the resources that the role can be assigned to. See the [official conditions documentation](https://learn.microsoft.com/en-us/azure/role-based-access-control/conditions-overview#what-are-role-assignment-conditions) for details. Changing this forces a new resource to be created. Condition pulumi.StringPtrInput // The version of the condition. Supported values include `2.0`. Changing this forces a new resource to be created. // // > **Note:** `conditionVersion` is required when specifying `condition` and vice versa. ConditionVersion pulumi.StringPtrInput // The justification of the role assignment. Changing this forces a new resource to be created. Justification pulumi.StringPtrInput // Object ID of the principal for this eligible role assignment. Changing this forces a new resource to be created. PrincipalId pulumi.StringPtrInput // Type of principal to which the role will be assigned. PrincipalType pulumi.StringPtrInput // The role definition ID for this eligible role assignment. Changing this forces a new resource to be created. RoleDefinitionId pulumi.StringPtrInput // A `schedule` block as defined below. Changing this forces a new resource to be created. Schedule EligibleRoleAssignmentSchedulePtrInput // The scope for this eligible role assignment, should be a valid resource ID. Changing this forces a new resource to be created. Scope pulumi.StringPtrInput // A `ticket` block as defined below. Changing this forces a new resource to be created. Ticket EligibleRoleAssignmentTicketPtrInput } func (EligibleRoleAssignmentState) ElementType() reflect.Type { return reflect.TypeOf((*eligibleRoleAssignmentState)(nil)).Elem() } type eligibleRoleAssignmentArgs struct { // The condition that limits the resources that the role can be assigned to. See the [official conditions documentation](https://learn.microsoft.com/en-us/azure/role-based-access-control/conditions-overview#what-are-role-assignment-conditions) for details. Changing this forces a new resource to be created. Condition *string `pulumi:"condition"` // The version of the condition. Supported values include `2.0`. Changing this forces a new resource to be created. // // > **Note:** `conditionVersion` is required when specifying `condition` and vice versa. ConditionVersion *string `pulumi:"conditionVersion"` // The justification of the role assignment. Changing this forces a new resource to be created. Justification *string `pulumi:"justification"` // Object ID of the principal for this eligible role assignment. Changing this forces a new resource to be created. PrincipalId string `pulumi:"principalId"` // The role definition ID for this eligible role assignment. Changing this forces a new resource to be created. RoleDefinitionId string `pulumi:"roleDefinitionId"` // A `schedule` block as defined below. Changing this forces a new resource to be created. Schedule *EligibleRoleAssignmentSchedule `pulumi:"schedule"` // The scope for this eligible role assignment, should be a valid resource ID. Changing this forces a new resource to be created. Scope string `pulumi:"scope"` // A `ticket` block as defined below. Changing this forces a new resource to be created. Ticket *EligibleRoleAssignmentTicket `pulumi:"ticket"` } // The set of arguments for constructing a EligibleRoleAssignment resource. type EligibleRoleAssignmentArgs struct { // The condition that limits the resources that the role can be assigned to. See the [official conditions documentation](https://learn.microsoft.com/en-us/azure/role-based-access-control/conditions-overview#what-are-role-assignment-conditions) for details. Changing this forces a new resource to be created. Condition pulumi.StringPtrInput // The version of the condition. Supported values include `2.0`. Changing this forces a new resource to be created. // // > **Note:** `conditionVersion` is required when specifying `condition` and vice versa. ConditionVersion pulumi.StringPtrInput // The justification of the role assignment. Changing this forces a new resource to be created. Justification pulumi.StringPtrInput // Object ID of the principal for this eligible role assignment. Changing this forces a new resource to be created. PrincipalId pulumi.StringInput // The role definition ID for this eligible role assignment. Changing this forces a new resource to be created. RoleDefinitionId pulumi.StringInput // A `schedule` block as defined below. Changing this forces a new resource to be created. Schedule EligibleRoleAssignmentSchedulePtrInput // The scope for this eligible role assignment, should be a valid resource ID. Changing this forces a new resource to be created. Scope pulumi.StringInput // A `ticket` block as defined below. Changing this forces a new resource to be created. Ticket EligibleRoleAssignmentTicketPtrInput } func (EligibleRoleAssignmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*eligibleRoleAssignmentArgs)(nil)).Elem() } type EligibleRoleAssignmentInput interface { pulumi.Input ToEligibleRoleAssignmentOutput() EligibleRoleAssignmentOutput ToEligibleRoleAssignmentOutputWithContext(ctx context.Context) EligibleRoleAssignmentOutput } func (*EligibleRoleAssignment) ElementType() reflect.Type { return reflect.TypeOf((**EligibleRoleAssignment)(nil)).Elem() } func (i *EligibleRoleAssignment) ToEligibleRoleAssignmentOutput() EligibleRoleAssignmentOutput { return i.ToEligibleRoleAssignmentOutputWithContext(context.Background()) } func (i *EligibleRoleAssignment) ToEligibleRoleAssignmentOutputWithContext(ctx context.Context) EligibleRoleAssignmentOutput { return pulumi.ToOutputWithContext(ctx, i).(EligibleRoleAssignmentOutput) } // EligibleRoleAssignmentArrayInput is an input type that accepts EligibleRoleAssignmentArray and EligibleRoleAssignmentArrayOutput values. // You can construct a concrete instance of `EligibleRoleAssignmentArrayInput` via: // // EligibleRoleAssignmentArray{ EligibleRoleAssignmentArgs{...} } type EligibleRoleAssignmentArrayInput interface { pulumi.Input ToEligibleRoleAssignmentArrayOutput() EligibleRoleAssignmentArrayOutput ToEligibleRoleAssignmentArrayOutputWithContext(context.Context) EligibleRoleAssignmentArrayOutput } type EligibleRoleAssignmentArray []EligibleRoleAssignmentInput func (EligibleRoleAssignmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*EligibleRoleAssignment)(nil)).Elem() } func (i EligibleRoleAssignmentArray) ToEligibleRoleAssignmentArrayOutput() EligibleRoleAssignmentArrayOutput { return i.ToEligibleRoleAssignmentArrayOutputWithContext(context.Background()) } func (i EligibleRoleAssignmentArray) ToEligibleRoleAssignmentArrayOutputWithContext(ctx context.Context) EligibleRoleAssignmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(EligibleRoleAssignmentArrayOutput) } // EligibleRoleAssignmentMapInput is an input type that accepts EligibleRoleAssignmentMap and EligibleRoleAssignmentMapOutput values. // You can construct a concrete instance of `EligibleRoleAssignmentMapInput` via: // // EligibleRoleAssignmentMap{ "key": EligibleRoleAssignmentArgs{...} } type EligibleRoleAssignmentMapInput interface { pulumi.Input ToEligibleRoleAssignmentMapOutput() EligibleRoleAssignmentMapOutput ToEligibleRoleAssignmentMapOutputWithContext(context.Context) EligibleRoleAssignmentMapOutput } type EligibleRoleAssignmentMap map[string]EligibleRoleAssignmentInput func (EligibleRoleAssignmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*EligibleRoleAssignment)(nil)).Elem() } func (i EligibleRoleAssignmentMap) ToEligibleRoleAssignmentMapOutput() EligibleRoleAssignmentMapOutput { return i.ToEligibleRoleAssignmentMapOutputWithContext(context.Background()) } func (i EligibleRoleAssignmentMap) ToEligibleRoleAssignmentMapOutputWithContext(ctx context.Context) EligibleRoleAssignmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(EligibleRoleAssignmentMapOutput) } type EligibleRoleAssignmentOutput struct{ *pulumi.OutputState } func (EligibleRoleAssignmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**EligibleRoleAssignment)(nil)).Elem() } func (o EligibleRoleAssignmentOutput) ToEligibleRoleAssignmentOutput() EligibleRoleAssignmentOutput { return o } func (o EligibleRoleAssignmentOutput) ToEligibleRoleAssignmentOutputWithContext(ctx context.Context) EligibleRoleAssignmentOutput { return o } // The condition that limits the resources that the role can be assigned to. See the [official conditions documentation](https://learn.microsoft.com/en-us/azure/role-based-access-control/conditions-overview#what-are-role-assignment-conditions) for details. Changing this forces a new resource to be created. func (o EligibleRoleAssignmentOutput) Condition() pulumi.StringPtrOutput { return o.ApplyT(func(v *EligibleRoleAssignment) pulumi.StringPtrOutput { return v.Condition }).(pulumi.StringPtrOutput) } // The version of the condition. Supported values include `2.0`. Changing this forces a new resource to be created. // // > **Note:** `conditionVersion` is required when specifying `condition` and vice versa. func (o EligibleRoleAssignmentOutput) ConditionVersion() pulumi.StringPtrOutput { return o.ApplyT(func(v *EligibleRoleAssignment) pulumi.StringPtrOutput { return v.ConditionVersion }).(pulumi.StringPtrOutput) } // The justification of the role assignment. Changing this forces a new resource to be created. func (o EligibleRoleAssignmentOutput) Justification() pulumi.StringOutput { return o.ApplyT(func(v *EligibleRoleAssignment) pulumi.StringOutput { return v.Justification }).(pulumi.StringOutput) } // Object ID of the principal for this eligible role assignment. Changing this forces a new resource to be created. func (o EligibleRoleAssignmentOutput) PrincipalId() pulumi.StringOutput { return o.ApplyT(func(v *EligibleRoleAssignment) pulumi.StringOutput { return v.PrincipalId }).(pulumi.StringOutput) } // Type of principal to which the role will be assigned. func (o EligibleRoleAssignmentOutput) PrincipalType() pulumi.StringOutput { return o.ApplyT(func(v *EligibleRoleAssignment) pulumi.StringOutput { return v.PrincipalType }).(pulumi.StringOutput) } // The role definition ID for this eligible role assignment. Changing this forces a new resource to be created. func (o EligibleRoleAssignmentOutput) RoleDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v *EligibleRoleAssignment) pulumi.StringOutput { return v.RoleDefinitionId }).(pulumi.StringOutput) } // A `schedule` block as defined below. Changing this forces a new resource to be created. func (o EligibleRoleAssignmentOutput) Schedule() EligibleRoleAssignmentScheduleOutput { return o.ApplyT(func(v *EligibleRoleAssignment) EligibleRoleAssignmentScheduleOutput { return v.Schedule }).(EligibleRoleAssignmentScheduleOutput) } // The scope for this eligible role assignment, should be a valid resource ID. Changing this forces a new resource to be created. func (o EligibleRoleAssignmentOutput) Scope() pulumi.StringOutput { return o.ApplyT(func(v *EligibleRoleAssignment) pulumi.StringOutput { return v.Scope }).(pulumi.StringOutput) } // A `ticket` block as defined below. Changing this forces a new resource to be created. func (o EligibleRoleAssignmentOutput) Ticket() EligibleRoleAssignmentTicketOutput { return o.ApplyT(func(v *EligibleRoleAssignment) EligibleRoleAssignmentTicketOutput { return v.Ticket }).(EligibleRoleAssignmentTicketOutput) } type EligibleRoleAssignmentArrayOutput struct{ *pulumi.OutputState } func (EligibleRoleAssignmentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*EligibleRoleAssignment)(nil)).Elem() } func (o EligibleRoleAssignmentArrayOutput) ToEligibleRoleAssignmentArrayOutput() EligibleRoleAssignmentArrayOutput { return o } func (o EligibleRoleAssignmentArrayOutput) ToEligibleRoleAssignmentArrayOutputWithContext(ctx context.Context) EligibleRoleAssignmentArrayOutput { return o } func (o EligibleRoleAssignmentArrayOutput) Index(i pulumi.IntInput) EligibleRoleAssignmentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EligibleRoleAssignment { return vs[0].([]*EligibleRoleAssignment)[vs[1].(int)] }).(EligibleRoleAssignmentOutput) } type EligibleRoleAssignmentMapOutput struct{ *pulumi.OutputState } func (EligibleRoleAssignmentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*EligibleRoleAssignment)(nil)).Elem() } func (o EligibleRoleAssignmentMapOutput) ToEligibleRoleAssignmentMapOutput() EligibleRoleAssignmentMapOutput { return o } func (o EligibleRoleAssignmentMapOutput) ToEligibleRoleAssignmentMapOutputWithContext(ctx context.Context) EligibleRoleAssignmentMapOutput { return o } func (o EligibleRoleAssignmentMapOutput) MapIndex(k pulumi.StringInput) EligibleRoleAssignmentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EligibleRoleAssignment { return vs[0].(map[string]*EligibleRoleAssignment)[vs[1].(string)] }).(EligibleRoleAssignmentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*EligibleRoleAssignmentInput)(nil)).Elem(), &EligibleRoleAssignment{}) pulumi.RegisterInputType(reflect.TypeOf((*EligibleRoleAssignmentArrayInput)(nil)).Elem(), EligibleRoleAssignmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*EligibleRoleAssignmentMapInput)(nil)).Elem(), EligibleRoleAssignmentMap{}) pulumi.RegisterOutputType(EligibleRoleAssignmentOutput{}) pulumi.RegisterOutputType(EligibleRoleAssignmentArrayOutput{}) pulumi.RegisterOutputType(EligibleRoleAssignmentMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/pim/activeRoleAssignment.go
sdk/go/azure/pim/activeRoleAssignment.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package pim import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a PIM Active Role Assignment. // // ## Example Usage // // ### Subscription) // // ```go // package main // // import ( // // "fmt" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/pim" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // "github.com/pulumiverse/pulumi-time/sdk/go/time" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // primary, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil) // if err != nil { // return err // } // example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // exampleGetRoleDefinition, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{ // Name: pulumi.StringRef("Reader"), // }, nil) // if err != nil { // return err // } // exampleStatic, err := time.NewStatic(ctx, "example", nil) // if err != nil { // return err // } // _, err = pim.NewActiveRoleAssignment(ctx, "example", &pim.ActiveRoleAssignmentArgs{ // Scope: pulumi.String(primary.Id), // RoleDefinitionId: pulumi.Sprintf("%v%v", primary.Id, exampleGetRoleDefinition.Id), // PrincipalId: pulumi.String(example.ObjectId), // Schedule: &pim.ActiveRoleAssignmentScheduleArgs{ // StartDateTime: exampleStatic.Rfc3339, // Expiration: &pim.ActiveRoleAssignmentScheduleExpirationArgs{ // DurationHours: pulumi.Int(8), // }, // }, // Justification: pulumi.String("Expiration Duration Set"), // Ticket: &pim.ActiveRoleAssignmentTicketArgs{ // Number: pulumi.String("1"), // System: pulumi.String("example ticket system"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ### Management Group) // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/pim" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // "github.com/pulumiverse/pulumi-time/sdk/go/time" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // exampleGetRoleDefinition, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{ // Name: pulumi.StringRef("Reader"), // }, nil) // if err != nil { // return err // } // exampleGroup, err := management.NewGroup(ctx, "example", &management.GroupArgs{ // Name: pulumi.String("Example-Management-Group"), // }) // if err != nil { // return err // } // exampleStatic, err := time.NewStatic(ctx, "example", nil) // if err != nil { // return err // } // _, err = pim.NewActiveRoleAssignment(ctx, "example", &pim.ActiveRoleAssignmentArgs{ // Scope: exampleGroup.ID(), // RoleDefinitionId: pulumi.String(exampleGetRoleDefinition.Id), // PrincipalId: pulumi.String(example.ObjectId), // Schedule: &pim.ActiveRoleAssignmentScheduleArgs{ // StartDateTime: exampleStatic.Rfc3339, // Expiration: &pim.ActiveRoleAssignmentScheduleExpirationArgs{ // DurationHours: pulumi.Int(8), // }, // }, // Justification: pulumi.String("Expiration Duration Set"), // Ticket: &pim.ActiveRoleAssignmentTicketArgs{ // Number: pulumi.String("1"), // System: pulumi.String("example ticket system"), // }, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.Authorization` - 2020-10-01 // // ## Import // // PIM Active Role Assignments can be imported using the following composite resource ID, e.g. // // ```sh // $ pulumi import azure:pim/activeRoleAssignment:ActiveRoleAssignment example /subscriptions/00000000-0000-0000-0000-000000000000|/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/00000000-0000-0000-0000-000000000000|00000000-0000-0000-0000-000000000000 // ``` type ActiveRoleAssignment struct { pulumi.CustomResourceState // The justification for the role assignment. Changing this forces a new resource to be created. Justification pulumi.StringOutput `pulumi:"justification"` // Object ID of the principal for this role assignment. Changing this forces a new resource to be created. PrincipalId pulumi.StringOutput `pulumi:"principalId"` // Type of principal to which the role will be assigned. PrincipalType pulumi.StringOutput `pulumi:"principalType"` // The role definition ID for this role assignment. Changing this forces a new resource to be created. RoleDefinitionId pulumi.StringOutput `pulumi:"roleDefinitionId"` // A `schedule` block as defined below. Changing this forces a new resource to be created. Schedule ActiveRoleAssignmentScheduleOutput `pulumi:"schedule"` // The scope for this role assignment, should be a valid resource ID. Changing this forces a new resource to be created. Scope pulumi.StringOutput `pulumi:"scope"` // A `ticket` block as defined below. Changing this forces a new resource to be created. Ticket ActiveRoleAssignmentTicketOutput `pulumi:"ticket"` } // NewActiveRoleAssignment registers a new resource with the given unique name, arguments, and options. func NewActiveRoleAssignment(ctx *pulumi.Context, name string, args *ActiveRoleAssignmentArgs, opts ...pulumi.ResourceOption) (*ActiveRoleAssignment, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.PrincipalId == nil { return nil, errors.New("invalid value for required argument 'PrincipalId'") } if args.RoleDefinitionId == nil { return nil, errors.New("invalid value for required argument 'RoleDefinitionId'") } if args.Scope == nil { return nil, errors.New("invalid value for required argument 'Scope'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ActiveRoleAssignment err := ctx.RegisterResource("azure:pim/activeRoleAssignment:ActiveRoleAssignment", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetActiveRoleAssignment gets an existing ActiveRoleAssignment 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 GetActiveRoleAssignment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ActiveRoleAssignmentState, opts ...pulumi.ResourceOption) (*ActiveRoleAssignment, error) { var resource ActiveRoleAssignment err := ctx.ReadResource("azure:pim/activeRoleAssignment:ActiveRoleAssignment", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ActiveRoleAssignment resources. type activeRoleAssignmentState struct { // The justification for the role assignment. Changing this forces a new resource to be created. Justification *string `pulumi:"justification"` // Object ID of the principal for this role assignment. Changing this forces a new resource to be created. PrincipalId *string `pulumi:"principalId"` // Type of principal to which the role will be assigned. PrincipalType *string `pulumi:"principalType"` // The role definition ID for this role assignment. Changing this forces a new resource to be created. RoleDefinitionId *string `pulumi:"roleDefinitionId"` // A `schedule` block as defined below. Changing this forces a new resource to be created. Schedule *ActiveRoleAssignmentSchedule `pulumi:"schedule"` // The scope for this role assignment, should be a valid resource ID. Changing this forces a new resource to be created. Scope *string `pulumi:"scope"` // A `ticket` block as defined below. Changing this forces a new resource to be created. Ticket *ActiveRoleAssignmentTicket `pulumi:"ticket"` } type ActiveRoleAssignmentState struct { // The justification for the role assignment. Changing this forces a new resource to be created. Justification pulumi.StringPtrInput // Object ID of the principal for this role assignment. Changing this forces a new resource to be created. PrincipalId pulumi.StringPtrInput // Type of principal to which the role will be assigned. PrincipalType pulumi.StringPtrInput // The role definition ID for this role assignment. Changing this forces a new resource to be created. RoleDefinitionId pulumi.StringPtrInput // A `schedule` block as defined below. Changing this forces a new resource to be created. Schedule ActiveRoleAssignmentSchedulePtrInput // The scope for this role assignment, should be a valid resource ID. Changing this forces a new resource to be created. Scope pulumi.StringPtrInput // A `ticket` block as defined below. Changing this forces a new resource to be created. Ticket ActiveRoleAssignmentTicketPtrInput } func (ActiveRoleAssignmentState) ElementType() reflect.Type { return reflect.TypeOf((*activeRoleAssignmentState)(nil)).Elem() } type activeRoleAssignmentArgs struct { // The justification for the role assignment. Changing this forces a new resource to be created. Justification *string `pulumi:"justification"` // Object ID of the principal for this role assignment. Changing this forces a new resource to be created. PrincipalId string `pulumi:"principalId"` // The role definition ID for this role assignment. Changing this forces a new resource to be created. RoleDefinitionId string `pulumi:"roleDefinitionId"` // A `schedule` block as defined below. Changing this forces a new resource to be created. Schedule *ActiveRoleAssignmentSchedule `pulumi:"schedule"` // The scope for this role assignment, should be a valid resource ID. Changing this forces a new resource to be created. Scope string `pulumi:"scope"` // A `ticket` block as defined below. Changing this forces a new resource to be created. Ticket *ActiveRoleAssignmentTicket `pulumi:"ticket"` } // The set of arguments for constructing a ActiveRoleAssignment resource. type ActiveRoleAssignmentArgs struct { // The justification for the role assignment. Changing this forces a new resource to be created. Justification pulumi.StringPtrInput // Object ID of the principal for this role assignment. Changing this forces a new resource to be created. PrincipalId pulumi.StringInput // The role definition ID for this role assignment. Changing this forces a new resource to be created. RoleDefinitionId pulumi.StringInput // A `schedule` block as defined below. Changing this forces a new resource to be created. Schedule ActiveRoleAssignmentSchedulePtrInput // The scope for this role assignment, should be a valid resource ID. Changing this forces a new resource to be created. Scope pulumi.StringInput // A `ticket` block as defined below. Changing this forces a new resource to be created. Ticket ActiveRoleAssignmentTicketPtrInput } func (ActiveRoleAssignmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*activeRoleAssignmentArgs)(nil)).Elem() } type ActiveRoleAssignmentInput interface { pulumi.Input ToActiveRoleAssignmentOutput() ActiveRoleAssignmentOutput ToActiveRoleAssignmentOutputWithContext(ctx context.Context) ActiveRoleAssignmentOutput } func (*ActiveRoleAssignment) ElementType() reflect.Type { return reflect.TypeOf((**ActiveRoleAssignment)(nil)).Elem() } func (i *ActiveRoleAssignment) ToActiveRoleAssignmentOutput() ActiveRoleAssignmentOutput { return i.ToActiveRoleAssignmentOutputWithContext(context.Background()) } func (i *ActiveRoleAssignment) ToActiveRoleAssignmentOutputWithContext(ctx context.Context) ActiveRoleAssignmentOutput { return pulumi.ToOutputWithContext(ctx, i).(ActiveRoleAssignmentOutput) } // ActiveRoleAssignmentArrayInput is an input type that accepts ActiveRoleAssignmentArray and ActiveRoleAssignmentArrayOutput values. // You can construct a concrete instance of `ActiveRoleAssignmentArrayInput` via: // // ActiveRoleAssignmentArray{ ActiveRoleAssignmentArgs{...} } type ActiveRoleAssignmentArrayInput interface { pulumi.Input ToActiveRoleAssignmentArrayOutput() ActiveRoleAssignmentArrayOutput ToActiveRoleAssignmentArrayOutputWithContext(context.Context) ActiveRoleAssignmentArrayOutput } type ActiveRoleAssignmentArray []ActiveRoleAssignmentInput func (ActiveRoleAssignmentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ActiveRoleAssignment)(nil)).Elem() } func (i ActiveRoleAssignmentArray) ToActiveRoleAssignmentArrayOutput() ActiveRoleAssignmentArrayOutput { return i.ToActiveRoleAssignmentArrayOutputWithContext(context.Background()) } func (i ActiveRoleAssignmentArray) ToActiveRoleAssignmentArrayOutputWithContext(ctx context.Context) ActiveRoleAssignmentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ActiveRoleAssignmentArrayOutput) } // ActiveRoleAssignmentMapInput is an input type that accepts ActiveRoleAssignmentMap and ActiveRoleAssignmentMapOutput values. // You can construct a concrete instance of `ActiveRoleAssignmentMapInput` via: // // ActiveRoleAssignmentMap{ "key": ActiveRoleAssignmentArgs{...} } type ActiveRoleAssignmentMapInput interface { pulumi.Input ToActiveRoleAssignmentMapOutput() ActiveRoleAssignmentMapOutput ToActiveRoleAssignmentMapOutputWithContext(context.Context) ActiveRoleAssignmentMapOutput } type ActiveRoleAssignmentMap map[string]ActiveRoleAssignmentInput func (ActiveRoleAssignmentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ActiveRoleAssignment)(nil)).Elem() } func (i ActiveRoleAssignmentMap) ToActiveRoleAssignmentMapOutput() ActiveRoleAssignmentMapOutput { return i.ToActiveRoleAssignmentMapOutputWithContext(context.Background()) } func (i ActiveRoleAssignmentMap) ToActiveRoleAssignmentMapOutputWithContext(ctx context.Context) ActiveRoleAssignmentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ActiveRoleAssignmentMapOutput) } type ActiveRoleAssignmentOutput struct{ *pulumi.OutputState } func (ActiveRoleAssignmentOutput) ElementType() reflect.Type { return reflect.TypeOf((**ActiveRoleAssignment)(nil)).Elem() } func (o ActiveRoleAssignmentOutput) ToActiveRoleAssignmentOutput() ActiveRoleAssignmentOutput { return o } func (o ActiveRoleAssignmentOutput) ToActiveRoleAssignmentOutputWithContext(ctx context.Context) ActiveRoleAssignmentOutput { return o } // The justification for the role assignment. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentOutput) Justification() pulumi.StringOutput { return o.ApplyT(func(v *ActiveRoleAssignment) pulumi.StringOutput { return v.Justification }).(pulumi.StringOutput) } // Object ID of the principal for this role assignment. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentOutput) PrincipalId() pulumi.StringOutput { return o.ApplyT(func(v *ActiveRoleAssignment) pulumi.StringOutput { return v.PrincipalId }).(pulumi.StringOutput) } // Type of principal to which the role will be assigned. func (o ActiveRoleAssignmentOutput) PrincipalType() pulumi.StringOutput { return o.ApplyT(func(v *ActiveRoleAssignment) pulumi.StringOutput { return v.PrincipalType }).(pulumi.StringOutput) } // The role definition ID for this role assignment. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentOutput) RoleDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v *ActiveRoleAssignment) pulumi.StringOutput { return v.RoleDefinitionId }).(pulumi.StringOutput) } // A `schedule` block as defined below. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentOutput) Schedule() ActiveRoleAssignmentScheduleOutput { return o.ApplyT(func(v *ActiveRoleAssignment) ActiveRoleAssignmentScheduleOutput { return v.Schedule }).(ActiveRoleAssignmentScheduleOutput) } // The scope for this role assignment, should be a valid resource ID. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentOutput) Scope() pulumi.StringOutput { return o.ApplyT(func(v *ActiveRoleAssignment) pulumi.StringOutput { return v.Scope }).(pulumi.StringOutput) } // A `ticket` block as defined below. Changing this forces a new resource to be created. func (o ActiveRoleAssignmentOutput) Ticket() ActiveRoleAssignmentTicketOutput { return o.ApplyT(func(v *ActiveRoleAssignment) ActiveRoleAssignmentTicketOutput { return v.Ticket }).(ActiveRoleAssignmentTicketOutput) } type ActiveRoleAssignmentArrayOutput struct{ *pulumi.OutputState } func (ActiveRoleAssignmentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ActiveRoleAssignment)(nil)).Elem() } func (o ActiveRoleAssignmentArrayOutput) ToActiveRoleAssignmentArrayOutput() ActiveRoleAssignmentArrayOutput { return o } func (o ActiveRoleAssignmentArrayOutput) ToActiveRoleAssignmentArrayOutputWithContext(ctx context.Context) ActiveRoleAssignmentArrayOutput { return o } func (o ActiveRoleAssignmentArrayOutput) Index(i pulumi.IntInput) ActiveRoleAssignmentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ActiveRoleAssignment { return vs[0].([]*ActiveRoleAssignment)[vs[1].(int)] }).(ActiveRoleAssignmentOutput) } type ActiveRoleAssignmentMapOutput struct{ *pulumi.OutputState } func (ActiveRoleAssignmentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ActiveRoleAssignment)(nil)).Elem() } func (o ActiveRoleAssignmentMapOutput) ToActiveRoleAssignmentMapOutput() ActiveRoleAssignmentMapOutput { return o } func (o ActiveRoleAssignmentMapOutput) ToActiveRoleAssignmentMapOutputWithContext(ctx context.Context) ActiveRoleAssignmentMapOutput { return o } func (o ActiveRoleAssignmentMapOutput) MapIndex(k pulumi.StringInput) ActiveRoleAssignmentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ActiveRoleAssignment { return vs[0].(map[string]*ActiveRoleAssignment)[vs[1].(string)] }).(ActiveRoleAssignmentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ActiveRoleAssignmentInput)(nil)).Elem(), &ActiveRoleAssignment{}) pulumi.RegisterInputType(reflect.TypeOf((*ActiveRoleAssignmentArrayInput)(nil)).Elem(), ActiveRoleAssignmentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ActiveRoleAssignmentMapInput)(nil)).Elem(), ActiveRoleAssignmentMap{}) pulumi.RegisterOutputType(ActiveRoleAssignmentOutput{}) pulumi.RegisterOutputType(ActiveRoleAssignmentArrayOutput{}) pulumi.RegisterOutputType(ActiveRoleAssignmentMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/arc/init.go
sdk/go/azure/arc/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 arc 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:arc/privateLinkScope:PrivateLinkScope": r = &PrivateLinkScope{} case "azure:arc/resourceBridgeAppliance:ResourceBridgeAppliance": r = &ResourceBridgeAppliance{} 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", "arc/privateLinkScope", &module{version}, ) pulumi.RegisterResourceModule( "azure", "arc/resourceBridgeAppliance", &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/arc/pulumiTypes.go
sdk/go/azure/arc/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 arc 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 ResourceBridgeApplianceIdentity struct { // 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 Arc Resource Bridge Appliance. The only possible value is `SystemAssigned`. Changing this forces a new resource to be created. Type string `pulumi:"type"` } // ResourceBridgeApplianceIdentityInput is an input type that accepts ResourceBridgeApplianceIdentityArgs and ResourceBridgeApplianceIdentityOutput values. // You can construct a concrete instance of `ResourceBridgeApplianceIdentityInput` via: // // ResourceBridgeApplianceIdentityArgs{...} type ResourceBridgeApplianceIdentityInput interface { pulumi.Input ToResourceBridgeApplianceIdentityOutput() ResourceBridgeApplianceIdentityOutput ToResourceBridgeApplianceIdentityOutputWithContext(context.Context) ResourceBridgeApplianceIdentityOutput } type ResourceBridgeApplianceIdentityArgs struct { // 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 Arc Resource Bridge Appliance. The only possible value is `SystemAssigned`. Changing this forces a new resource to be created. Type pulumi.StringInput `pulumi:"type"` } func (ResourceBridgeApplianceIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*ResourceBridgeApplianceIdentity)(nil)).Elem() } func (i ResourceBridgeApplianceIdentityArgs) ToResourceBridgeApplianceIdentityOutput() ResourceBridgeApplianceIdentityOutput { return i.ToResourceBridgeApplianceIdentityOutputWithContext(context.Background()) } func (i ResourceBridgeApplianceIdentityArgs) ToResourceBridgeApplianceIdentityOutputWithContext(ctx context.Context) ResourceBridgeApplianceIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceBridgeApplianceIdentityOutput) } func (i ResourceBridgeApplianceIdentityArgs) ToResourceBridgeApplianceIdentityPtrOutput() ResourceBridgeApplianceIdentityPtrOutput { return i.ToResourceBridgeApplianceIdentityPtrOutputWithContext(context.Background()) } func (i ResourceBridgeApplianceIdentityArgs) ToResourceBridgeApplianceIdentityPtrOutputWithContext(ctx context.Context) ResourceBridgeApplianceIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceBridgeApplianceIdentityOutput).ToResourceBridgeApplianceIdentityPtrOutputWithContext(ctx) } // ResourceBridgeApplianceIdentityPtrInput is an input type that accepts ResourceBridgeApplianceIdentityArgs, ResourceBridgeApplianceIdentityPtr and ResourceBridgeApplianceIdentityPtrOutput values. // You can construct a concrete instance of `ResourceBridgeApplianceIdentityPtrInput` via: // // ResourceBridgeApplianceIdentityArgs{...} // // or: // // nil type ResourceBridgeApplianceIdentityPtrInput interface { pulumi.Input ToResourceBridgeApplianceIdentityPtrOutput() ResourceBridgeApplianceIdentityPtrOutput ToResourceBridgeApplianceIdentityPtrOutputWithContext(context.Context) ResourceBridgeApplianceIdentityPtrOutput } type resourceBridgeApplianceIdentityPtrType ResourceBridgeApplianceIdentityArgs func ResourceBridgeApplianceIdentityPtr(v *ResourceBridgeApplianceIdentityArgs) ResourceBridgeApplianceIdentityPtrInput { return (*resourceBridgeApplianceIdentityPtrType)(v) } func (*resourceBridgeApplianceIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ResourceBridgeApplianceIdentity)(nil)).Elem() } func (i *resourceBridgeApplianceIdentityPtrType) ToResourceBridgeApplianceIdentityPtrOutput() ResourceBridgeApplianceIdentityPtrOutput { return i.ToResourceBridgeApplianceIdentityPtrOutputWithContext(context.Background()) } func (i *resourceBridgeApplianceIdentityPtrType) ToResourceBridgeApplianceIdentityPtrOutputWithContext(ctx context.Context) ResourceBridgeApplianceIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceBridgeApplianceIdentityPtrOutput) } type ResourceBridgeApplianceIdentityOutput struct{ *pulumi.OutputState } func (ResourceBridgeApplianceIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*ResourceBridgeApplianceIdentity)(nil)).Elem() } func (o ResourceBridgeApplianceIdentityOutput) ToResourceBridgeApplianceIdentityOutput() ResourceBridgeApplianceIdentityOutput { return o } func (o ResourceBridgeApplianceIdentityOutput) ToResourceBridgeApplianceIdentityOutputWithContext(ctx context.Context) ResourceBridgeApplianceIdentityOutput { return o } func (o ResourceBridgeApplianceIdentityOutput) ToResourceBridgeApplianceIdentityPtrOutput() ResourceBridgeApplianceIdentityPtrOutput { return o.ToResourceBridgeApplianceIdentityPtrOutputWithContext(context.Background()) } func (o ResourceBridgeApplianceIdentityOutput) ToResourceBridgeApplianceIdentityPtrOutputWithContext(ctx context.Context) ResourceBridgeApplianceIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ResourceBridgeApplianceIdentity) *ResourceBridgeApplianceIdentity { return &v }).(ResourceBridgeApplianceIdentityPtrOutput) } // The Principal ID associated with this Managed Service Identity. func (o ResourceBridgeApplianceIdentityOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v ResourceBridgeApplianceIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. func (o ResourceBridgeApplianceIdentityOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v ResourceBridgeApplianceIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity that should be configured on this Arc Resource Bridge Appliance. The only possible value is `SystemAssigned`. Changing this forces a new resource to be created. func (o ResourceBridgeApplianceIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v ResourceBridgeApplianceIdentity) string { return v.Type }).(pulumi.StringOutput) } type ResourceBridgeApplianceIdentityPtrOutput struct{ *pulumi.OutputState } func (ResourceBridgeApplianceIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourceBridgeApplianceIdentity)(nil)).Elem() } func (o ResourceBridgeApplianceIdentityPtrOutput) ToResourceBridgeApplianceIdentityPtrOutput() ResourceBridgeApplianceIdentityPtrOutput { return o } func (o ResourceBridgeApplianceIdentityPtrOutput) ToResourceBridgeApplianceIdentityPtrOutputWithContext(ctx context.Context) ResourceBridgeApplianceIdentityPtrOutput { return o } func (o ResourceBridgeApplianceIdentityPtrOutput) Elem() ResourceBridgeApplianceIdentityOutput { return o.ApplyT(func(v *ResourceBridgeApplianceIdentity) ResourceBridgeApplianceIdentity { if v != nil { return *v } var ret ResourceBridgeApplianceIdentity return ret }).(ResourceBridgeApplianceIdentityOutput) } // The Principal ID associated with this Managed Service Identity. func (o ResourceBridgeApplianceIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceBridgeApplianceIdentity) *string { if v == nil { return nil } return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity. func (o ResourceBridgeApplianceIdentityPtrOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceBridgeApplianceIdentity) *string { if v == nil { return nil } return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Service Identity that should be configured on this Arc Resource Bridge Appliance. The only possible value is `SystemAssigned`. Changing this forces a new resource to be created. func (o ResourceBridgeApplianceIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceBridgeApplianceIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type GetResourceBridgeApplianceIdentity struct { // 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 this Managed Service Identity. Type string `pulumi:"type"` } // GetResourceBridgeApplianceIdentityInput is an input type that accepts GetResourceBridgeApplianceIdentityArgs and GetResourceBridgeApplianceIdentityOutput values. // You can construct a concrete instance of `GetResourceBridgeApplianceIdentityInput` via: // // GetResourceBridgeApplianceIdentityArgs{...} type GetResourceBridgeApplianceIdentityInput interface { pulumi.Input ToGetResourceBridgeApplianceIdentityOutput() GetResourceBridgeApplianceIdentityOutput ToGetResourceBridgeApplianceIdentityOutputWithContext(context.Context) GetResourceBridgeApplianceIdentityOutput } type GetResourceBridgeApplianceIdentityArgs struct { // 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 type of this Managed Service Identity. Type pulumi.StringInput `pulumi:"type"` } func (GetResourceBridgeApplianceIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetResourceBridgeApplianceIdentity)(nil)).Elem() } func (i GetResourceBridgeApplianceIdentityArgs) ToGetResourceBridgeApplianceIdentityOutput() GetResourceBridgeApplianceIdentityOutput { return i.ToGetResourceBridgeApplianceIdentityOutputWithContext(context.Background()) } func (i GetResourceBridgeApplianceIdentityArgs) ToGetResourceBridgeApplianceIdentityOutputWithContext(ctx context.Context) GetResourceBridgeApplianceIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(GetResourceBridgeApplianceIdentityOutput) } // GetResourceBridgeApplianceIdentityArrayInput is an input type that accepts GetResourceBridgeApplianceIdentityArray and GetResourceBridgeApplianceIdentityArrayOutput values. // You can construct a concrete instance of `GetResourceBridgeApplianceIdentityArrayInput` via: // // GetResourceBridgeApplianceIdentityArray{ GetResourceBridgeApplianceIdentityArgs{...} } type GetResourceBridgeApplianceIdentityArrayInput interface { pulumi.Input ToGetResourceBridgeApplianceIdentityArrayOutput() GetResourceBridgeApplianceIdentityArrayOutput ToGetResourceBridgeApplianceIdentityArrayOutputWithContext(context.Context) GetResourceBridgeApplianceIdentityArrayOutput } type GetResourceBridgeApplianceIdentityArray []GetResourceBridgeApplianceIdentityInput func (GetResourceBridgeApplianceIdentityArray) ElementType() reflect.Type { return reflect.TypeOf((*[]GetResourceBridgeApplianceIdentity)(nil)).Elem() } func (i GetResourceBridgeApplianceIdentityArray) ToGetResourceBridgeApplianceIdentityArrayOutput() GetResourceBridgeApplianceIdentityArrayOutput { return i.ToGetResourceBridgeApplianceIdentityArrayOutputWithContext(context.Background()) } func (i GetResourceBridgeApplianceIdentityArray) ToGetResourceBridgeApplianceIdentityArrayOutputWithContext(ctx context.Context) GetResourceBridgeApplianceIdentityArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(GetResourceBridgeApplianceIdentityArrayOutput) } type GetResourceBridgeApplianceIdentityOutput struct{ *pulumi.OutputState } func (GetResourceBridgeApplianceIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetResourceBridgeApplianceIdentity)(nil)).Elem() } func (o GetResourceBridgeApplianceIdentityOutput) ToGetResourceBridgeApplianceIdentityOutput() GetResourceBridgeApplianceIdentityOutput { return o } func (o GetResourceBridgeApplianceIdentityOutput) ToGetResourceBridgeApplianceIdentityOutputWithContext(ctx context.Context) GetResourceBridgeApplianceIdentityOutput { return o } // The Principal ID associated with this Managed Service Identity. func (o GetResourceBridgeApplianceIdentityOutput) PrincipalId() pulumi.StringOutput { return o.ApplyT(func(v GetResourceBridgeApplianceIdentity) string { return v.PrincipalId }).(pulumi.StringOutput) } // The Tenant ID associated with this Managed Service Identity. func (o GetResourceBridgeApplianceIdentityOutput) TenantId() pulumi.StringOutput { return o.ApplyT(func(v GetResourceBridgeApplianceIdentity) string { return v.TenantId }).(pulumi.StringOutput) } // The type of this Managed Service Identity. func (o GetResourceBridgeApplianceIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v GetResourceBridgeApplianceIdentity) string { return v.Type }).(pulumi.StringOutput) } type GetResourceBridgeApplianceIdentityArrayOutput struct{ *pulumi.OutputState } func (GetResourceBridgeApplianceIdentityArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]GetResourceBridgeApplianceIdentity)(nil)).Elem() } func (o GetResourceBridgeApplianceIdentityArrayOutput) ToGetResourceBridgeApplianceIdentityArrayOutput() GetResourceBridgeApplianceIdentityArrayOutput { return o } func (o GetResourceBridgeApplianceIdentityArrayOutput) ToGetResourceBridgeApplianceIdentityArrayOutputWithContext(ctx context.Context) GetResourceBridgeApplianceIdentityArrayOutput { return o } func (o GetResourceBridgeApplianceIdentityArrayOutput) Index(i pulumi.IntInput) GetResourceBridgeApplianceIdentityOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) GetResourceBridgeApplianceIdentity { return vs[0].([]GetResourceBridgeApplianceIdentity)[vs[1].(int)] }).(GetResourceBridgeApplianceIdentityOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ResourceBridgeApplianceIdentityInput)(nil)).Elem(), ResourceBridgeApplianceIdentityArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceBridgeApplianceIdentityPtrInput)(nil)).Elem(), ResourceBridgeApplianceIdentityArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetResourceBridgeApplianceIdentityInput)(nil)).Elem(), GetResourceBridgeApplianceIdentityArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*GetResourceBridgeApplianceIdentityArrayInput)(nil)).Elem(), GetResourceBridgeApplianceIdentityArray{}) pulumi.RegisterOutputType(ResourceBridgeApplianceIdentityOutput{}) pulumi.RegisterOutputType(ResourceBridgeApplianceIdentityPtrOutput{}) pulumi.RegisterOutputType(GetResourceBridgeApplianceIdentityOutput{}) pulumi.RegisterOutputType(GetResourceBridgeApplianceIdentityArrayOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/arc/resourceBridgeAppliance.go
sdk/go/azure/arc/resourceBridgeAppliance.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package arc import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Arc Resource Bridge Appliance. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/arc" // "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 = arc.NewResourceBridgeAppliance(ctx, "example", &arc.ResourceBridgeApplianceArgs{ // Name: pulumi.String("example-appliance"), // Location: example.Location, // ResourceGroupName: example.Name, // Distro: pulumi.String("AKSEdge"), // InfrastructureProvider: pulumi.String("VMWare"), // Identity: &arc.ResourceBridgeApplianceIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // Tags: pulumi.StringMap{ // "hello": pulumi.String("world"), // }, // }) // 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.ResourceConnector` - 2022-10-27 // // ## Import // // Arc Resource Bridge Appliance can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:arc/resourceBridgeAppliance:ResourceBridgeAppliance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ResourceConnector/appliances/appliancesExample // ``` type ResourceBridgeAppliance struct { pulumi.CustomResourceState // Specifies a supported Fabric/Infrastructure for this Arc Resource Bridge Appliance. The possible value is `AKSEdge`. Distro pulumi.StringOutput `pulumi:"distro"` // An `identity` block as defined below. Changing this forces a new resource to be created. Identity ResourceBridgeApplianceIdentityOutput `pulumi:"identity"` // The infrastructure provider about the connected Arc Resource Bridge Appliance. Possible values are `HCI`,`SCVMM` and `VMWare`. Changing this forces a new resource to be created. InfrastructureProvider pulumi.StringOutput `pulumi:"infrastructureProvider"` // The Azure Region where the Arc Resource Bridge Appliance should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The Name which should be used for this Arc Resource Bridge Appliance. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The `publicKeyBase64` is an RSA public key in PKCS1 format encoded in base64. Changing this forces a new resource to be created. PublicKeyBase64 pulumi.StringPtrOutput `pulumi:"publicKeyBase64"` // Specifies the resource group where the Arc Resource Bridge Appliance exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Arc Resource Bridge Appliance. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewResourceBridgeAppliance registers a new resource with the given unique name, arguments, and options. func NewResourceBridgeAppliance(ctx *pulumi.Context, name string, args *ResourceBridgeApplianceArgs, opts ...pulumi.ResourceOption) (*ResourceBridgeAppliance, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Distro == nil { return nil, errors.New("invalid value for required argument 'Distro'") } if args.Identity == nil { return nil, errors.New("invalid value for required argument 'Identity'") } if args.InfrastructureProvider == nil { return nil, errors.New("invalid value for required argument 'InfrastructureProvider'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ResourceBridgeAppliance err := ctx.RegisterResource("azure:arc/resourceBridgeAppliance:ResourceBridgeAppliance", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetResourceBridgeAppliance gets an existing ResourceBridgeAppliance 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 GetResourceBridgeAppliance(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ResourceBridgeApplianceState, opts ...pulumi.ResourceOption) (*ResourceBridgeAppliance, error) { var resource ResourceBridgeAppliance err := ctx.ReadResource("azure:arc/resourceBridgeAppliance:ResourceBridgeAppliance", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ResourceBridgeAppliance resources. type resourceBridgeApplianceState struct { // Specifies a supported Fabric/Infrastructure for this Arc Resource Bridge Appliance. The possible value is `AKSEdge`. Distro *string `pulumi:"distro"` // An `identity` block as defined below. Changing this forces a new resource to be created. Identity *ResourceBridgeApplianceIdentity `pulumi:"identity"` // The infrastructure provider about the connected Arc Resource Bridge Appliance. Possible values are `HCI`,`SCVMM` and `VMWare`. Changing this forces a new resource to be created. InfrastructureProvider *string `pulumi:"infrastructureProvider"` // The Azure Region where the Arc Resource Bridge Appliance should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The Name which should be used for this Arc Resource Bridge Appliance. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The `publicKeyBase64` is an RSA public key in PKCS1 format encoded in base64. Changing this forces a new resource to be created. PublicKeyBase64 *string `pulumi:"publicKeyBase64"` // Specifies the resource group where the Arc Resource Bridge Appliance exists. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Arc Resource Bridge Appliance. Tags map[string]string `pulumi:"tags"` } type ResourceBridgeApplianceState struct { // Specifies a supported Fabric/Infrastructure for this Arc Resource Bridge Appliance. The possible value is `AKSEdge`. Distro pulumi.StringPtrInput // An `identity` block as defined below. Changing this forces a new resource to be created. Identity ResourceBridgeApplianceIdentityPtrInput // The infrastructure provider about the connected Arc Resource Bridge Appliance. Possible values are `HCI`,`SCVMM` and `VMWare`. Changing this forces a new resource to be created. InfrastructureProvider pulumi.StringPtrInput // The Azure Region where the Arc Resource Bridge Appliance should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The Name which should be used for this Arc Resource Bridge Appliance. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The `publicKeyBase64` is an RSA public key in PKCS1 format encoded in base64. Changing this forces a new resource to be created. PublicKeyBase64 pulumi.StringPtrInput // Specifies the resource group where the Arc Resource Bridge Appliance exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Arc Resource Bridge Appliance. Tags pulumi.StringMapInput } func (ResourceBridgeApplianceState) ElementType() reflect.Type { return reflect.TypeOf((*resourceBridgeApplianceState)(nil)).Elem() } type resourceBridgeApplianceArgs struct { // Specifies a supported Fabric/Infrastructure for this Arc Resource Bridge Appliance. The possible value is `AKSEdge`. Distro string `pulumi:"distro"` // An `identity` block as defined below. Changing this forces a new resource to be created. Identity ResourceBridgeApplianceIdentity `pulumi:"identity"` // The infrastructure provider about the connected Arc Resource Bridge Appliance. Possible values are `HCI`,`SCVMM` and `VMWare`. Changing this forces a new resource to be created. InfrastructureProvider string `pulumi:"infrastructureProvider"` // The Azure Region where the Arc Resource Bridge Appliance should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The Name which should be used for this Arc Resource Bridge Appliance. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The `publicKeyBase64` is an RSA public key in PKCS1 format encoded in base64. Changing this forces a new resource to be created. PublicKeyBase64 *string `pulumi:"publicKeyBase64"` // Specifies the resource group where the Arc Resource Bridge Appliance exists. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Arc Resource Bridge Appliance. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a ResourceBridgeAppliance resource. type ResourceBridgeApplianceArgs struct { // Specifies a supported Fabric/Infrastructure for this Arc Resource Bridge Appliance. The possible value is `AKSEdge`. Distro pulumi.StringInput // An `identity` block as defined below. Changing this forces a new resource to be created. Identity ResourceBridgeApplianceIdentityInput // The infrastructure provider about the connected Arc Resource Bridge Appliance. Possible values are `HCI`,`SCVMM` and `VMWare`. Changing this forces a new resource to be created. InfrastructureProvider pulumi.StringInput // The Azure Region where the Arc Resource Bridge Appliance should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The Name which should be used for this Arc Resource Bridge Appliance. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The `publicKeyBase64` is an RSA public key in PKCS1 format encoded in base64. Changing this forces a new resource to be created. PublicKeyBase64 pulumi.StringPtrInput // Specifies the resource group where the Arc Resource Bridge Appliance exists. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags which should be assigned to the Arc Resource Bridge Appliance. Tags pulumi.StringMapInput } func (ResourceBridgeApplianceArgs) ElementType() reflect.Type { return reflect.TypeOf((*resourceBridgeApplianceArgs)(nil)).Elem() } type ResourceBridgeApplianceInput interface { pulumi.Input ToResourceBridgeApplianceOutput() ResourceBridgeApplianceOutput ToResourceBridgeApplianceOutputWithContext(ctx context.Context) ResourceBridgeApplianceOutput } func (*ResourceBridgeAppliance) ElementType() reflect.Type { return reflect.TypeOf((**ResourceBridgeAppliance)(nil)).Elem() } func (i *ResourceBridgeAppliance) ToResourceBridgeApplianceOutput() ResourceBridgeApplianceOutput { return i.ToResourceBridgeApplianceOutputWithContext(context.Background()) } func (i *ResourceBridgeAppliance) ToResourceBridgeApplianceOutputWithContext(ctx context.Context) ResourceBridgeApplianceOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceBridgeApplianceOutput) } // ResourceBridgeApplianceArrayInput is an input type that accepts ResourceBridgeApplianceArray and ResourceBridgeApplianceArrayOutput values. // You can construct a concrete instance of `ResourceBridgeApplianceArrayInput` via: // // ResourceBridgeApplianceArray{ ResourceBridgeApplianceArgs{...} } type ResourceBridgeApplianceArrayInput interface { pulumi.Input ToResourceBridgeApplianceArrayOutput() ResourceBridgeApplianceArrayOutput ToResourceBridgeApplianceArrayOutputWithContext(context.Context) ResourceBridgeApplianceArrayOutput } type ResourceBridgeApplianceArray []ResourceBridgeApplianceInput func (ResourceBridgeApplianceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceBridgeAppliance)(nil)).Elem() } func (i ResourceBridgeApplianceArray) ToResourceBridgeApplianceArrayOutput() ResourceBridgeApplianceArrayOutput { return i.ToResourceBridgeApplianceArrayOutputWithContext(context.Background()) } func (i ResourceBridgeApplianceArray) ToResourceBridgeApplianceArrayOutputWithContext(ctx context.Context) ResourceBridgeApplianceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceBridgeApplianceArrayOutput) } // ResourceBridgeApplianceMapInput is an input type that accepts ResourceBridgeApplianceMap and ResourceBridgeApplianceMapOutput values. // You can construct a concrete instance of `ResourceBridgeApplianceMapInput` via: // // ResourceBridgeApplianceMap{ "key": ResourceBridgeApplianceArgs{...} } type ResourceBridgeApplianceMapInput interface { pulumi.Input ToResourceBridgeApplianceMapOutput() ResourceBridgeApplianceMapOutput ToResourceBridgeApplianceMapOutputWithContext(context.Context) ResourceBridgeApplianceMapOutput } type ResourceBridgeApplianceMap map[string]ResourceBridgeApplianceInput func (ResourceBridgeApplianceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceBridgeAppliance)(nil)).Elem() } func (i ResourceBridgeApplianceMap) ToResourceBridgeApplianceMapOutput() ResourceBridgeApplianceMapOutput { return i.ToResourceBridgeApplianceMapOutputWithContext(context.Background()) } func (i ResourceBridgeApplianceMap) ToResourceBridgeApplianceMapOutputWithContext(ctx context.Context) ResourceBridgeApplianceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ResourceBridgeApplianceMapOutput) } type ResourceBridgeApplianceOutput struct{ *pulumi.OutputState } func (ResourceBridgeApplianceOutput) ElementType() reflect.Type { return reflect.TypeOf((**ResourceBridgeAppliance)(nil)).Elem() } func (o ResourceBridgeApplianceOutput) ToResourceBridgeApplianceOutput() ResourceBridgeApplianceOutput { return o } func (o ResourceBridgeApplianceOutput) ToResourceBridgeApplianceOutputWithContext(ctx context.Context) ResourceBridgeApplianceOutput { return o } // Specifies a supported Fabric/Infrastructure for this Arc Resource Bridge Appliance. The possible value is `AKSEdge`. func (o ResourceBridgeApplianceOutput) Distro() pulumi.StringOutput { return o.ApplyT(func(v *ResourceBridgeAppliance) pulumi.StringOutput { return v.Distro }).(pulumi.StringOutput) } // An `identity` block as defined below. Changing this forces a new resource to be created. func (o ResourceBridgeApplianceOutput) Identity() ResourceBridgeApplianceIdentityOutput { return o.ApplyT(func(v *ResourceBridgeAppliance) ResourceBridgeApplianceIdentityOutput { return v.Identity }).(ResourceBridgeApplianceIdentityOutput) } // The infrastructure provider about the connected Arc Resource Bridge Appliance. Possible values are `HCI`,`SCVMM` and `VMWare`. Changing this forces a new resource to be created. func (o ResourceBridgeApplianceOutput) InfrastructureProvider() pulumi.StringOutput { return o.ApplyT(func(v *ResourceBridgeAppliance) pulumi.StringOutput { return v.InfrastructureProvider }).(pulumi.StringOutput) } // The Azure Region where the Arc Resource Bridge Appliance should exist. Changing this forces a new resource to be created. func (o ResourceBridgeApplianceOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ResourceBridgeAppliance) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The Name which should be used for this Arc Resource Bridge Appliance. Changing this forces a new resource to be created. func (o ResourceBridgeApplianceOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ResourceBridgeAppliance) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The `publicKeyBase64` is an RSA public key in PKCS1 format encoded in base64. Changing this forces a new resource to be created. func (o ResourceBridgeApplianceOutput) PublicKeyBase64() pulumi.StringPtrOutput { return o.ApplyT(func(v *ResourceBridgeAppliance) pulumi.StringPtrOutput { return v.PublicKeyBase64 }).(pulumi.StringPtrOutput) } // Specifies the resource group where the Arc Resource Bridge Appliance exists. Changing this forces a new resource to be created. func (o ResourceBridgeApplianceOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ResourceBridgeAppliance) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Arc Resource Bridge Appliance. func (o ResourceBridgeApplianceOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ResourceBridgeAppliance) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type ResourceBridgeApplianceArrayOutput struct{ *pulumi.OutputState } func (ResourceBridgeApplianceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ResourceBridgeAppliance)(nil)).Elem() } func (o ResourceBridgeApplianceArrayOutput) ToResourceBridgeApplianceArrayOutput() ResourceBridgeApplianceArrayOutput { return o } func (o ResourceBridgeApplianceArrayOutput) ToResourceBridgeApplianceArrayOutputWithContext(ctx context.Context) ResourceBridgeApplianceArrayOutput { return o } func (o ResourceBridgeApplianceArrayOutput) Index(i pulumi.IntInput) ResourceBridgeApplianceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourceBridgeAppliance { return vs[0].([]*ResourceBridgeAppliance)[vs[1].(int)] }).(ResourceBridgeApplianceOutput) } type ResourceBridgeApplianceMapOutput struct{ *pulumi.OutputState } func (ResourceBridgeApplianceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ResourceBridgeAppliance)(nil)).Elem() } func (o ResourceBridgeApplianceMapOutput) ToResourceBridgeApplianceMapOutput() ResourceBridgeApplianceMapOutput { return o } func (o ResourceBridgeApplianceMapOutput) ToResourceBridgeApplianceMapOutputWithContext(ctx context.Context) ResourceBridgeApplianceMapOutput { return o } func (o ResourceBridgeApplianceMapOutput) MapIndex(k pulumi.StringInput) ResourceBridgeApplianceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourceBridgeAppliance { return vs[0].(map[string]*ResourceBridgeAppliance)[vs[1].(string)] }).(ResourceBridgeApplianceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ResourceBridgeApplianceInput)(nil)).Elem(), &ResourceBridgeAppliance{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceBridgeApplianceArrayInput)(nil)).Elem(), ResourceBridgeApplianceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ResourceBridgeApplianceMapInput)(nil)).Elem(), ResourceBridgeApplianceMap{}) pulumi.RegisterOutputType(ResourceBridgeApplianceOutput{}) pulumi.RegisterOutputType(ResourceBridgeApplianceArrayOutput{}) pulumi.RegisterOutputType(ResourceBridgeApplianceMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/arc/privateLinkScope.go
sdk/go/azure/arc/privateLinkScope.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package arc 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 Arc Private Link Scope. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/arc" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("rg-example"), // Location: pulumi.String("west europe"), // }) // if err != nil { // return err // } // _, err = arc.NewPrivateLinkScope(ctx, "example", &arc.PrivateLinkScopeArgs{ // Name: pulumi.String("plsexample"), // ResourceGroupName: example.Name, // Location: example.Location, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.HybridCompute` - 2022-11-10 // // ## Import // // Azure Arc Private Link Scope can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:arc/privateLinkScope:PrivateLinkScope example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScope1 // ``` type PrivateLinkScope struct { pulumi.CustomResourceState // The Azure Region where the Arc Private Link Scope should exist. Changing this forces a new Azure Arc Private Link Scope to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for the Azure Arc Private Link Scope. Changing this forces a new Azure Arc Private Link Scope to be created. Name pulumi.StringOutput `pulumi:"name"` // Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. Defaults to `false`. Possible values are `true` and `false`. PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"` // The name of the Resource Group where the Azure Arc Private Link Scope should exist. Changing this forces a new Azure Arc Private Link Scope to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Azure Arc Private Link Scope. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewPrivateLinkScope registers a new resource with the given unique name, arguments, and options. func NewPrivateLinkScope(ctx *pulumi.Context, name string, args *PrivateLinkScopeArgs, opts ...pulumi.ResourceOption) (*PrivateLinkScope, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource PrivateLinkScope err := ctx.RegisterResource("azure:arc/privateLinkScope:PrivateLinkScope", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetPrivateLinkScope gets an existing PrivateLinkScope resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetPrivateLinkScope(ctx *pulumi.Context, name string, id pulumi.IDInput, state *PrivateLinkScopeState, opts ...pulumi.ResourceOption) (*PrivateLinkScope, error) { var resource PrivateLinkScope err := ctx.ReadResource("azure:arc/privateLinkScope:PrivateLinkScope", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering PrivateLinkScope resources. type privateLinkScopeState struct { // The Azure Region where the Arc Private Link Scope should exist. Changing this forces a new Azure Arc Private Link Scope to be created. Location *string `pulumi:"location"` // The name which should be used for the Azure Arc Private Link Scope. Changing this forces a new Azure Arc Private Link Scope to be created. Name *string `pulumi:"name"` // Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. Defaults to `false`. Possible values are `true` and `false`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The name of the Resource Group where the Azure Arc Private Link Scope should exist. Changing this forces a new Azure Arc Private Link Scope to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Azure Arc Private Link Scope. Tags map[string]string `pulumi:"tags"` } type PrivateLinkScopeState struct { // The Azure Region where the Arc Private Link Scope should exist. Changing this forces a new Azure Arc Private Link Scope to be created. Location pulumi.StringPtrInput // The name which should be used for the Azure Arc Private Link Scope. Changing this forces a new Azure Arc Private Link Scope to be created. Name pulumi.StringPtrInput // Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. Defaults to `false`. Possible values are `true` and `false`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // The name of the Resource Group where the Azure Arc Private Link Scope should exist. Changing this forces a new Azure Arc Private Link Scope to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags which should be assigned to the Azure Arc Private Link Scope. Tags pulumi.StringMapInput } func (PrivateLinkScopeState) ElementType() reflect.Type { return reflect.TypeOf((*privateLinkScopeState)(nil)).Elem() } type privateLinkScopeArgs struct { // The Azure Region where the Arc Private Link Scope should exist. Changing this forces a new Azure Arc Private Link Scope to be created. Location *string `pulumi:"location"` // The name which should be used for the Azure Arc Private Link Scope. Changing this forces a new Azure Arc Private Link Scope to be created. Name *string `pulumi:"name"` // Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. Defaults to `false`. Possible values are `true` and `false`. PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"` // The name of the Resource Group where the Azure Arc Private Link Scope should exist. Changing this forces a new Azure Arc Private Link Scope to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the Azure Arc Private Link Scope. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a PrivateLinkScope resource. type PrivateLinkScopeArgs struct { // The Azure Region where the Arc Private Link Scope should exist. Changing this forces a new Azure Arc Private Link Scope to be created. Location pulumi.StringPtrInput // The name which should be used for the Azure Arc Private Link Scope. Changing this forces a new Azure Arc Private Link Scope to be created. Name pulumi.StringPtrInput // Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. Defaults to `false`. Possible values are `true` and `false`. PublicNetworkAccessEnabled pulumi.BoolPtrInput // The name of the Resource Group where the Azure Arc Private Link Scope should exist. Changing this forces a new Azure Arc Private Link Scope to be created. ResourceGroupName pulumi.StringInput // A mapping of tags which should be assigned to the Azure Arc Private Link Scope. Tags pulumi.StringMapInput } func (PrivateLinkScopeArgs) ElementType() reflect.Type { return reflect.TypeOf((*privateLinkScopeArgs)(nil)).Elem() } type PrivateLinkScopeInput interface { pulumi.Input ToPrivateLinkScopeOutput() PrivateLinkScopeOutput ToPrivateLinkScopeOutputWithContext(ctx context.Context) PrivateLinkScopeOutput } func (*PrivateLinkScope) ElementType() reflect.Type { return reflect.TypeOf((**PrivateLinkScope)(nil)).Elem() } func (i *PrivateLinkScope) ToPrivateLinkScopeOutput() PrivateLinkScopeOutput { return i.ToPrivateLinkScopeOutputWithContext(context.Background()) } func (i *PrivateLinkScope) ToPrivateLinkScopeOutputWithContext(ctx context.Context) PrivateLinkScopeOutput { return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkScopeOutput) } // PrivateLinkScopeArrayInput is an input type that accepts PrivateLinkScopeArray and PrivateLinkScopeArrayOutput values. // You can construct a concrete instance of `PrivateLinkScopeArrayInput` via: // // PrivateLinkScopeArray{ PrivateLinkScopeArgs{...} } type PrivateLinkScopeArrayInput interface { pulumi.Input ToPrivateLinkScopeArrayOutput() PrivateLinkScopeArrayOutput ToPrivateLinkScopeArrayOutputWithContext(context.Context) PrivateLinkScopeArrayOutput } type PrivateLinkScopeArray []PrivateLinkScopeInput func (PrivateLinkScopeArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*PrivateLinkScope)(nil)).Elem() } func (i PrivateLinkScopeArray) ToPrivateLinkScopeArrayOutput() PrivateLinkScopeArrayOutput { return i.ToPrivateLinkScopeArrayOutputWithContext(context.Background()) } func (i PrivateLinkScopeArray) ToPrivateLinkScopeArrayOutputWithContext(ctx context.Context) PrivateLinkScopeArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkScopeArrayOutput) } // PrivateLinkScopeMapInput is an input type that accepts PrivateLinkScopeMap and PrivateLinkScopeMapOutput values. // You can construct a concrete instance of `PrivateLinkScopeMapInput` via: // // PrivateLinkScopeMap{ "key": PrivateLinkScopeArgs{...} } type PrivateLinkScopeMapInput interface { pulumi.Input ToPrivateLinkScopeMapOutput() PrivateLinkScopeMapOutput ToPrivateLinkScopeMapOutputWithContext(context.Context) PrivateLinkScopeMapOutput } type PrivateLinkScopeMap map[string]PrivateLinkScopeInput func (PrivateLinkScopeMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PrivateLinkScope)(nil)).Elem() } func (i PrivateLinkScopeMap) ToPrivateLinkScopeMapOutput() PrivateLinkScopeMapOutput { return i.ToPrivateLinkScopeMapOutputWithContext(context.Background()) } func (i PrivateLinkScopeMap) ToPrivateLinkScopeMapOutputWithContext(ctx context.Context) PrivateLinkScopeMapOutput { return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkScopeMapOutput) } type PrivateLinkScopeOutput struct{ *pulumi.OutputState } func (PrivateLinkScopeOutput) ElementType() reflect.Type { return reflect.TypeOf((**PrivateLinkScope)(nil)).Elem() } func (o PrivateLinkScopeOutput) ToPrivateLinkScopeOutput() PrivateLinkScopeOutput { return o } func (o PrivateLinkScopeOutput) ToPrivateLinkScopeOutputWithContext(ctx context.Context) PrivateLinkScopeOutput { return o } // The Azure Region where the Arc Private Link Scope should exist. Changing this forces a new Azure Arc Private Link Scope to be created. func (o PrivateLinkScopeOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *PrivateLinkScope) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for the Azure Arc Private Link Scope. Changing this forces a new Azure Arc Private Link Scope to be created. func (o PrivateLinkScopeOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *PrivateLinkScope) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. Defaults to `false`. Possible values are `true` and `false`. func (o PrivateLinkScopeOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *PrivateLinkScope) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput) } // The name of the Resource Group where the Azure Arc Private Link Scope should exist. Changing this forces a new Azure Arc Private Link Scope to be created. func (o PrivateLinkScopeOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *PrivateLinkScope) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the Azure Arc Private Link Scope. func (o PrivateLinkScopeOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *PrivateLinkScope) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type PrivateLinkScopeArrayOutput struct{ *pulumi.OutputState } func (PrivateLinkScopeArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*PrivateLinkScope)(nil)).Elem() } func (o PrivateLinkScopeArrayOutput) ToPrivateLinkScopeArrayOutput() PrivateLinkScopeArrayOutput { return o } func (o PrivateLinkScopeArrayOutput) ToPrivateLinkScopeArrayOutputWithContext(ctx context.Context) PrivateLinkScopeArrayOutput { return o } func (o PrivateLinkScopeArrayOutput) Index(i pulumi.IntInput) PrivateLinkScopeOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PrivateLinkScope { return vs[0].([]*PrivateLinkScope)[vs[1].(int)] }).(PrivateLinkScopeOutput) } type PrivateLinkScopeMapOutput struct{ *pulumi.OutputState } func (PrivateLinkScopeMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*PrivateLinkScope)(nil)).Elem() } func (o PrivateLinkScopeMapOutput) ToPrivateLinkScopeMapOutput() PrivateLinkScopeMapOutput { return o } func (o PrivateLinkScopeMapOutput) ToPrivateLinkScopeMapOutputWithContext(ctx context.Context) PrivateLinkScopeMapOutput { return o } func (o PrivateLinkScopeMapOutput) MapIndex(k pulumi.StringInput) PrivateLinkScopeOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PrivateLinkScope { return vs[0].(map[string]*PrivateLinkScope)[vs[1].(string)] }).(PrivateLinkScopeOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkScopeInput)(nil)).Elem(), &PrivateLinkScope{}) pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkScopeArrayInput)(nil)).Elem(), PrivateLinkScopeArray{}) pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkScopeMapInput)(nil)).Elem(), PrivateLinkScopeMap{}) pulumi.RegisterOutputType(PrivateLinkScopeOutput{}) pulumi.RegisterOutputType(PrivateLinkScopeArrayOutput{}) pulumi.RegisterOutputType(PrivateLinkScopeMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/arc/getResourceBridgeAppliance.go
sdk/go/azure/arc/getResourceBridgeAppliance.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package arc 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 Arc Resource Bridge Appliance. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/arc" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := arc.LookupResourceBridgeAppliance(ctx, &arc.LookupResourceBridgeApplianceArgs{ // Name: "existing", // ResourceGroupName: "existing", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.ResourceConnector` - 2022-10-27 func LookupResourceBridgeAppliance(ctx *pulumi.Context, args *LookupResourceBridgeApplianceArgs, opts ...pulumi.InvokeOption) (*LookupResourceBridgeApplianceResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupResourceBridgeApplianceResult err := ctx.Invoke("azure:arc/getResourceBridgeAppliance:getResourceBridgeAppliance", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getResourceBridgeAppliance. type LookupResourceBridgeApplianceArgs struct { // The name of this Arc Resource Bridge Appliance. Name string `pulumi:"name"` // The name of the Resource Group where the Arc Resource Bridge Appliance exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getResourceBridgeAppliance. type LookupResourceBridgeApplianceResult struct { // Fabric/Infrastructure for this Arc Resource Bridge Appliance. Distro string `pulumi:"distro"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // An `identity` block as defined below. Identities []GetResourceBridgeApplianceIdentity `pulumi:"identities"` // The infrastructure provider about the connected Arc Resource Bridge Appliance. InfrastructureProvider string `pulumi:"infrastructureProvider"` // The Azure Region where the Arc Resource Bridge Appliance exists. Location string `pulumi:"location"` Name string `pulumi:"name"` // RSA public key in PKCS1 format encoded in base64. PublicKeyBase64 string `pulumi:"publicKeyBase64"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the Arc Resource Bridge Appliance. Tags map[string]string `pulumi:"tags"` } func LookupResourceBridgeApplianceOutput(ctx *pulumi.Context, args LookupResourceBridgeApplianceOutputArgs, opts ...pulumi.InvokeOption) LookupResourceBridgeApplianceResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupResourceBridgeApplianceResultOutput, error) { args := v.(LookupResourceBridgeApplianceArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:arc/getResourceBridgeAppliance:getResourceBridgeAppliance", args, LookupResourceBridgeApplianceResultOutput{}, options).(LookupResourceBridgeApplianceResultOutput), nil }).(LookupResourceBridgeApplianceResultOutput) } // A collection of arguments for invoking getResourceBridgeAppliance. type LookupResourceBridgeApplianceOutputArgs struct { // The name of this Arc Resource Bridge Appliance. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Arc Resource Bridge Appliance exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupResourceBridgeApplianceOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupResourceBridgeApplianceArgs)(nil)).Elem() } // A collection of values returned by getResourceBridgeAppliance. type LookupResourceBridgeApplianceResultOutput struct{ *pulumi.OutputState } func (LookupResourceBridgeApplianceResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupResourceBridgeApplianceResult)(nil)).Elem() } func (o LookupResourceBridgeApplianceResultOutput) ToLookupResourceBridgeApplianceResultOutput() LookupResourceBridgeApplianceResultOutput { return o } func (o LookupResourceBridgeApplianceResultOutput) ToLookupResourceBridgeApplianceResultOutputWithContext(ctx context.Context) LookupResourceBridgeApplianceResultOutput { return o } // Fabric/Infrastructure for this Arc Resource Bridge Appliance. func (o LookupResourceBridgeApplianceResultOutput) Distro() pulumi.StringOutput { return o.ApplyT(func(v LookupResourceBridgeApplianceResult) string { return v.Distro }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupResourceBridgeApplianceResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupResourceBridgeApplianceResult) string { return v.Id }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o LookupResourceBridgeApplianceResultOutput) Identities() GetResourceBridgeApplianceIdentityArrayOutput { return o.ApplyT(func(v LookupResourceBridgeApplianceResult) []GetResourceBridgeApplianceIdentity { return v.Identities }).(GetResourceBridgeApplianceIdentityArrayOutput) } // The infrastructure provider about the connected Arc Resource Bridge Appliance. func (o LookupResourceBridgeApplianceResultOutput) InfrastructureProvider() pulumi.StringOutput { return o.ApplyT(func(v LookupResourceBridgeApplianceResult) string { return v.InfrastructureProvider }).(pulumi.StringOutput) } // The Azure Region where the Arc Resource Bridge Appliance exists. func (o LookupResourceBridgeApplianceResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupResourceBridgeApplianceResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupResourceBridgeApplianceResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupResourceBridgeApplianceResult) string { return v.Name }).(pulumi.StringOutput) } // RSA public key in PKCS1 format encoded in base64. func (o LookupResourceBridgeApplianceResultOutput) PublicKeyBase64() pulumi.StringOutput { return o.ApplyT(func(v LookupResourceBridgeApplianceResult) string { return v.PublicKeyBase64 }).(pulumi.StringOutput) } func (o LookupResourceBridgeApplianceResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupResourceBridgeApplianceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the Arc Resource Bridge Appliance. func (o LookupResourceBridgeApplianceResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupResourceBridgeApplianceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } func init() { pulumi.RegisterOutputType(LookupResourceBridgeApplianceResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/systemcenter/getVirtualMachineManagerInventoryItems.go
sdk/go/azure/systemcenter/getVirtualMachineManagerInventoryItems.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package systemcenter 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 existing System Center Virtual Machine Manager Inventory Items. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/systemcenter" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // _, err := systemcenter.GetVirtualMachineManagerInventoryItems(ctx, &systemcenter.GetVirtualMachineManagerInventoryItemsArgs{ // InventoryType: "Cloud", // SystemCenterVirtualMachineManagerServerId: exampleAzurermSystemCenterVirtualMachineManagerServer.Id, // }, nil) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.ScVmm` - 2023-10-07 func GetVirtualMachineManagerInventoryItems(ctx *pulumi.Context, args *GetVirtualMachineManagerInventoryItemsArgs, opts ...pulumi.InvokeOption) (*GetVirtualMachineManagerInventoryItemsResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetVirtualMachineManagerInventoryItemsResult err := ctx.Invoke("azure:systemcenter/getVirtualMachineManagerInventoryItems:getVirtualMachineManagerInventoryItems", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getVirtualMachineManagerInventoryItems. type GetVirtualMachineManagerInventoryItemsArgs struct { // The inventory type of the System Center Virtual Machine Manager Inventory Item. Possible values are `Cloud`, `VirtualMachine`, `VirtualMachineTemplate` and `VirtualNetwork`. InventoryType string `pulumi:"inventoryType"` // The ID of the System Center Virtual Machine Manager Server. SystemCenterVirtualMachineManagerServerId string `pulumi:"systemCenterVirtualMachineManagerServerId"` } // A collection of values returned by getVirtualMachineManagerInventoryItems. type GetVirtualMachineManagerInventoryItemsResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // One or more `inventoryItems` blocks as defined below. InventoryItems []GetVirtualMachineManagerInventoryItemsInventoryItem `pulumi:"inventoryItems"` InventoryType string `pulumi:"inventoryType"` SystemCenterVirtualMachineManagerServerId string `pulumi:"systemCenterVirtualMachineManagerServerId"` } func GetVirtualMachineManagerInventoryItemsOutput(ctx *pulumi.Context, args GetVirtualMachineManagerInventoryItemsOutputArgs, opts ...pulumi.InvokeOption) GetVirtualMachineManagerInventoryItemsResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetVirtualMachineManagerInventoryItemsResultOutput, error) { args := v.(GetVirtualMachineManagerInventoryItemsArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:systemcenter/getVirtualMachineManagerInventoryItems:getVirtualMachineManagerInventoryItems", args, GetVirtualMachineManagerInventoryItemsResultOutput{}, options).(GetVirtualMachineManagerInventoryItemsResultOutput), nil }).(GetVirtualMachineManagerInventoryItemsResultOutput) } // A collection of arguments for invoking getVirtualMachineManagerInventoryItems. type GetVirtualMachineManagerInventoryItemsOutputArgs struct { // The inventory type of the System Center Virtual Machine Manager Inventory Item. Possible values are `Cloud`, `VirtualMachine`, `VirtualMachineTemplate` and `VirtualNetwork`. InventoryType pulumi.StringInput `pulumi:"inventoryType"` // The ID of the System Center Virtual Machine Manager Server. SystemCenterVirtualMachineManagerServerId pulumi.StringInput `pulumi:"systemCenterVirtualMachineManagerServerId"` } func (GetVirtualMachineManagerInventoryItemsOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetVirtualMachineManagerInventoryItemsArgs)(nil)).Elem() } // A collection of values returned by getVirtualMachineManagerInventoryItems. type GetVirtualMachineManagerInventoryItemsResultOutput struct{ *pulumi.OutputState } func (GetVirtualMachineManagerInventoryItemsResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetVirtualMachineManagerInventoryItemsResult)(nil)).Elem() } func (o GetVirtualMachineManagerInventoryItemsResultOutput) ToGetVirtualMachineManagerInventoryItemsResultOutput() GetVirtualMachineManagerInventoryItemsResultOutput { return o } func (o GetVirtualMachineManagerInventoryItemsResultOutput) ToGetVirtualMachineManagerInventoryItemsResultOutputWithContext(ctx context.Context) GetVirtualMachineManagerInventoryItemsResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o GetVirtualMachineManagerInventoryItemsResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetVirtualMachineManagerInventoryItemsResult) string { return v.Id }).(pulumi.StringOutput) } // One or more `inventoryItems` blocks as defined below. func (o GetVirtualMachineManagerInventoryItemsResultOutput) InventoryItems() GetVirtualMachineManagerInventoryItemsInventoryItemArrayOutput { return o.ApplyT(func(v GetVirtualMachineManagerInventoryItemsResult) []GetVirtualMachineManagerInventoryItemsInventoryItem { return v.InventoryItems }).(GetVirtualMachineManagerInventoryItemsInventoryItemArrayOutput) } func (o GetVirtualMachineManagerInventoryItemsResultOutput) InventoryType() pulumi.StringOutput { return o.ApplyT(func(v GetVirtualMachineManagerInventoryItemsResult) string { return v.InventoryType }).(pulumi.StringOutput) } func (o GetVirtualMachineManagerInventoryItemsResultOutput) SystemCenterVirtualMachineManagerServerId() pulumi.StringOutput { return o.ApplyT(func(v GetVirtualMachineManagerInventoryItemsResult) string { return v.SystemCenterVirtualMachineManagerServerId }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetVirtualMachineManagerInventoryItemsResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/systemcenter/init.go
sdk/go/azure/systemcenter/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 systemcenter 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:systemcenter/virtualMachineManagerAvailabilitySet:VirtualMachineManagerAvailabilitySet": r = &VirtualMachineManagerAvailabilitySet{} case "azure:systemcenter/virtualMachineManagerCloud:VirtualMachineManagerCloud": r = &VirtualMachineManagerCloud{} case "azure:systemcenter/virtualMachineManagerServer:VirtualMachineManagerServer": r = &VirtualMachineManagerServer{} case "azure:systemcenter/virtualMachineManagerVirtualMachineInstance:VirtualMachineManagerVirtualMachineInstance": r = &VirtualMachineManagerVirtualMachineInstance{} case "azure:systemcenter/virtualMachineManagerVirtualMachineInstanceGuestAgent:VirtualMachineManagerVirtualMachineInstanceGuestAgent": r = &VirtualMachineManagerVirtualMachineInstanceGuestAgent{} case "azure:systemcenter/virtualMachineManagerVirtualMachineTemplate:VirtualMachineManagerVirtualMachineTemplate": r = &VirtualMachineManagerVirtualMachineTemplate{} case "azure:systemcenter/virtualMachineManagerVirtualNetwork:VirtualMachineManagerVirtualNetwork": r = &VirtualMachineManagerVirtualNetwork{} 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", "systemcenter/virtualMachineManagerAvailabilitySet", &module{version}, ) pulumi.RegisterResourceModule( "azure", "systemcenter/virtualMachineManagerCloud", &module{version}, ) pulumi.RegisterResourceModule( "azure", "systemcenter/virtualMachineManagerServer", &module{version}, ) pulumi.RegisterResourceModule( "azure", "systemcenter/virtualMachineManagerVirtualMachineInstance", &module{version}, ) pulumi.RegisterResourceModule( "azure", "systemcenter/virtualMachineManagerVirtualMachineInstanceGuestAgent", &module{version}, ) pulumi.RegisterResourceModule( "azure", "systemcenter/virtualMachineManagerVirtualMachineTemplate", &module{version}, ) pulumi.RegisterResourceModule( "azure", "systemcenter/virtualMachineManagerVirtualNetwork", &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/systemcenter/pulumiTypes.go
sdk/go/azure/systemcenter/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 systemcenter 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 VirtualMachineManagerVirtualMachineInstanceHardware struct { // The number of vCPUs for the Virtual Machine. Possible values are between `1` and `64`. CpuCount *int `pulumi:"cpuCount"` // The max dynamic memory for the Virtual Machine. Possible values are between `32` and `1048576`. DynamicMemoryMaxInMb *int `pulumi:"dynamicMemoryMaxInMb"` // The min dynamic memory for the Virtual Machine. Possible values are between `32` and `1048576`. DynamicMemoryMinInMb *int `pulumi:"dynamicMemoryMinInMb"` // Whether processor compatibility mode for live migration of Virtual Machines is enabled. LimitCpuForMigrationEnabled *bool `pulumi:"limitCpuForMigrationEnabled"` // The size of a Virtual Machine's memory. Possible values are between `32` and `1048576`. MemoryInMb *int `pulumi:"memoryInMb"` } // VirtualMachineManagerVirtualMachineInstanceHardwareInput is an input type that accepts VirtualMachineManagerVirtualMachineInstanceHardwareArgs and VirtualMachineManagerVirtualMachineInstanceHardwareOutput values. // You can construct a concrete instance of `VirtualMachineManagerVirtualMachineInstanceHardwareInput` via: // // VirtualMachineManagerVirtualMachineInstanceHardwareArgs{...} type VirtualMachineManagerVirtualMachineInstanceHardwareInput interface { pulumi.Input ToVirtualMachineManagerVirtualMachineInstanceHardwareOutput() VirtualMachineManagerVirtualMachineInstanceHardwareOutput ToVirtualMachineManagerVirtualMachineInstanceHardwareOutputWithContext(context.Context) VirtualMachineManagerVirtualMachineInstanceHardwareOutput } type VirtualMachineManagerVirtualMachineInstanceHardwareArgs struct { // The number of vCPUs for the Virtual Machine. Possible values are between `1` and `64`. CpuCount pulumi.IntPtrInput `pulumi:"cpuCount"` // The max dynamic memory for the Virtual Machine. Possible values are between `32` and `1048576`. DynamicMemoryMaxInMb pulumi.IntPtrInput `pulumi:"dynamicMemoryMaxInMb"` // The min dynamic memory for the Virtual Machine. Possible values are between `32` and `1048576`. DynamicMemoryMinInMb pulumi.IntPtrInput `pulumi:"dynamicMemoryMinInMb"` // Whether processor compatibility mode for live migration of Virtual Machines is enabled. LimitCpuForMigrationEnabled pulumi.BoolPtrInput `pulumi:"limitCpuForMigrationEnabled"` // The size of a Virtual Machine's memory. Possible values are between `32` and `1048576`. MemoryInMb pulumi.IntPtrInput `pulumi:"memoryInMb"` } func (VirtualMachineManagerVirtualMachineInstanceHardwareArgs) ElementType() reflect.Type { return reflect.TypeOf((*VirtualMachineManagerVirtualMachineInstanceHardware)(nil)).Elem() } func (i VirtualMachineManagerVirtualMachineInstanceHardwareArgs) ToVirtualMachineManagerVirtualMachineInstanceHardwareOutput() VirtualMachineManagerVirtualMachineInstanceHardwareOutput { return i.ToVirtualMachineManagerVirtualMachineInstanceHardwareOutputWithContext(context.Background()) } func (i VirtualMachineManagerVirtualMachineInstanceHardwareArgs) ToVirtualMachineManagerVirtualMachineInstanceHardwareOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceHardwareOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineInstanceHardwareOutput) } func (i VirtualMachineManagerVirtualMachineInstanceHardwareArgs) ToVirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput() VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput { return i.ToVirtualMachineManagerVirtualMachineInstanceHardwarePtrOutputWithContext(context.Background()) } func (i VirtualMachineManagerVirtualMachineInstanceHardwareArgs) ToVirtualMachineManagerVirtualMachineInstanceHardwarePtrOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineInstanceHardwareOutput).ToVirtualMachineManagerVirtualMachineInstanceHardwarePtrOutputWithContext(ctx) } // VirtualMachineManagerVirtualMachineInstanceHardwarePtrInput is an input type that accepts VirtualMachineManagerVirtualMachineInstanceHardwareArgs, VirtualMachineManagerVirtualMachineInstanceHardwarePtr and VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput values. // You can construct a concrete instance of `VirtualMachineManagerVirtualMachineInstanceHardwarePtrInput` via: // // VirtualMachineManagerVirtualMachineInstanceHardwareArgs{...} // // or: // // nil type VirtualMachineManagerVirtualMachineInstanceHardwarePtrInput interface { pulumi.Input ToVirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput() VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput ToVirtualMachineManagerVirtualMachineInstanceHardwarePtrOutputWithContext(context.Context) VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput } type virtualMachineManagerVirtualMachineInstanceHardwarePtrType VirtualMachineManagerVirtualMachineInstanceHardwareArgs func VirtualMachineManagerVirtualMachineInstanceHardwarePtr(v *VirtualMachineManagerVirtualMachineInstanceHardwareArgs) VirtualMachineManagerVirtualMachineInstanceHardwarePtrInput { return (*virtualMachineManagerVirtualMachineInstanceHardwarePtrType)(v) } func (*virtualMachineManagerVirtualMachineInstanceHardwarePtrType) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerVirtualMachineInstanceHardware)(nil)).Elem() } func (i *virtualMachineManagerVirtualMachineInstanceHardwarePtrType) ToVirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput() VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput { return i.ToVirtualMachineManagerVirtualMachineInstanceHardwarePtrOutputWithContext(context.Background()) } func (i *virtualMachineManagerVirtualMachineInstanceHardwarePtrType) ToVirtualMachineManagerVirtualMachineInstanceHardwarePtrOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput) } type VirtualMachineManagerVirtualMachineInstanceHardwareOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualMachineInstanceHardwareOutput) ElementType() reflect.Type { return reflect.TypeOf((*VirtualMachineManagerVirtualMachineInstanceHardware)(nil)).Elem() } func (o VirtualMachineManagerVirtualMachineInstanceHardwareOutput) ToVirtualMachineManagerVirtualMachineInstanceHardwareOutput() VirtualMachineManagerVirtualMachineInstanceHardwareOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceHardwareOutput) ToVirtualMachineManagerVirtualMachineInstanceHardwareOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceHardwareOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceHardwareOutput) ToVirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput() VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput { return o.ToVirtualMachineManagerVirtualMachineInstanceHardwarePtrOutputWithContext(context.Background()) } func (o VirtualMachineManagerVirtualMachineInstanceHardwareOutput) ToVirtualMachineManagerVirtualMachineInstanceHardwarePtrOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v VirtualMachineManagerVirtualMachineInstanceHardware) *VirtualMachineManagerVirtualMachineInstanceHardware { return &v }).(VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput) } // The number of vCPUs for the Virtual Machine. Possible values are between `1` and `64`. func (o VirtualMachineManagerVirtualMachineInstanceHardwareOutput) CpuCount() pulumi.IntPtrOutput { return o.ApplyT(func(v VirtualMachineManagerVirtualMachineInstanceHardware) *int { return v.CpuCount }).(pulumi.IntPtrOutput) } // The max dynamic memory for the Virtual Machine. Possible values are between `32` and `1048576`. func (o VirtualMachineManagerVirtualMachineInstanceHardwareOutput) DynamicMemoryMaxInMb() pulumi.IntPtrOutput { return o.ApplyT(func(v VirtualMachineManagerVirtualMachineInstanceHardware) *int { return v.DynamicMemoryMaxInMb }).(pulumi.IntPtrOutput) } // The min dynamic memory for the Virtual Machine. Possible values are between `32` and `1048576`. func (o VirtualMachineManagerVirtualMachineInstanceHardwareOutput) DynamicMemoryMinInMb() pulumi.IntPtrOutput { return o.ApplyT(func(v VirtualMachineManagerVirtualMachineInstanceHardware) *int { return v.DynamicMemoryMinInMb }).(pulumi.IntPtrOutput) } // Whether processor compatibility mode for live migration of Virtual Machines is enabled. func (o VirtualMachineManagerVirtualMachineInstanceHardwareOutput) LimitCpuForMigrationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v VirtualMachineManagerVirtualMachineInstanceHardware) *bool { return v.LimitCpuForMigrationEnabled }).(pulumi.BoolPtrOutput) } // The size of a Virtual Machine's memory. Possible values are between `32` and `1048576`. func (o VirtualMachineManagerVirtualMachineInstanceHardwareOutput) MemoryInMb() pulumi.IntPtrOutput { return o.ApplyT(func(v VirtualMachineManagerVirtualMachineInstanceHardware) *int { return v.MemoryInMb }).(pulumi.IntPtrOutput) } type VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerVirtualMachineInstanceHardware)(nil)).Elem() } func (o VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput) ToVirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput() VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput) ToVirtualMachineManagerVirtualMachineInstanceHardwarePtrOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput) Elem() VirtualMachineManagerVirtualMachineInstanceHardwareOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceHardware) VirtualMachineManagerVirtualMachineInstanceHardware { if v != nil { return *v } var ret VirtualMachineManagerVirtualMachineInstanceHardware return ret }).(VirtualMachineManagerVirtualMachineInstanceHardwareOutput) } // The number of vCPUs for the Virtual Machine. Possible values are between `1` and `64`. func (o VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput) CpuCount() pulumi.IntPtrOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceHardware) *int { if v == nil { return nil } return v.CpuCount }).(pulumi.IntPtrOutput) } // The max dynamic memory for the Virtual Machine. Possible values are between `32` and `1048576`. func (o VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput) DynamicMemoryMaxInMb() pulumi.IntPtrOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceHardware) *int { if v == nil { return nil } return v.DynamicMemoryMaxInMb }).(pulumi.IntPtrOutput) } // The min dynamic memory for the Virtual Machine. Possible values are between `32` and `1048576`. func (o VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput) DynamicMemoryMinInMb() pulumi.IntPtrOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceHardware) *int { if v == nil { return nil } return v.DynamicMemoryMinInMb }).(pulumi.IntPtrOutput) } // Whether processor compatibility mode for live migration of Virtual Machines is enabled. func (o VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput) LimitCpuForMigrationEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceHardware) *bool { if v == nil { return nil } return v.LimitCpuForMigrationEnabled }).(pulumi.BoolPtrOutput) } // The size of a Virtual Machine's memory. Possible values are between `32` and `1048576`. func (o VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput) MemoryInMb() pulumi.IntPtrOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceHardware) *int { if v == nil { return nil } return v.MemoryInMb }).(pulumi.IntPtrOutput) } type VirtualMachineManagerVirtualMachineInstanceInfrastructure struct { // The type of checkpoint supported for the Virtual Machine. Possible values are `Disabled`, `Production`, `ProductionOnly` and `Standard`. CheckpointType *string `pulumi:"checkpointType"` // The ID of the System Center Virtual Machine Manager Cloud resource to use for deploying the Virtual Machine. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerCloudId *string `pulumi:"systemCenterVirtualMachineManagerCloudId"` // The ID of the System Center Virtual Machine Manager Inventory Item for System Center Virtual Machine Manager Virtual Machine Instance. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerInventoryItemId *string `pulumi:"systemCenterVirtualMachineManagerInventoryItemId"` // The ID of the System Center Virtual Machine Manager Virtual Machine Template to use for deploying the Virtual Machine. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerTemplateId *string `pulumi:"systemCenterVirtualMachineManagerTemplateId"` // The ID of the System Center Virtual Machine Manager Virtual Machine. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerVirtualMachineServerId *string `pulumi:"systemCenterVirtualMachineManagerVirtualMachineServerId"` } // VirtualMachineManagerVirtualMachineInstanceInfrastructureInput is an input type that accepts VirtualMachineManagerVirtualMachineInstanceInfrastructureArgs and VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput values. // You can construct a concrete instance of `VirtualMachineManagerVirtualMachineInstanceInfrastructureInput` via: // // VirtualMachineManagerVirtualMachineInstanceInfrastructureArgs{...} type VirtualMachineManagerVirtualMachineInstanceInfrastructureInput interface { pulumi.Input ToVirtualMachineManagerVirtualMachineInstanceInfrastructureOutput() VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput ToVirtualMachineManagerVirtualMachineInstanceInfrastructureOutputWithContext(context.Context) VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput } type VirtualMachineManagerVirtualMachineInstanceInfrastructureArgs struct { // The type of checkpoint supported for the Virtual Machine. Possible values are `Disabled`, `Production`, `ProductionOnly` and `Standard`. CheckpointType pulumi.StringPtrInput `pulumi:"checkpointType"` // The ID of the System Center Virtual Machine Manager Cloud resource to use for deploying the Virtual Machine. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerCloudId pulumi.StringPtrInput `pulumi:"systemCenterVirtualMachineManagerCloudId"` // The ID of the System Center Virtual Machine Manager Inventory Item for System Center Virtual Machine Manager Virtual Machine Instance. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerInventoryItemId pulumi.StringPtrInput `pulumi:"systemCenterVirtualMachineManagerInventoryItemId"` // The ID of the System Center Virtual Machine Manager Virtual Machine Template to use for deploying the Virtual Machine. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerTemplateId pulumi.StringPtrInput `pulumi:"systemCenterVirtualMachineManagerTemplateId"` // The ID of the System Center Virtual Machine Manager Virtual Machine. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerVirtualMachineServerId pulumi.StringPtrInput `pulumi:"systemCenterVirtualMachineManagerVirtualMachineServerId"` } func (VirtualMachineManagerVirtualMachineInstanceInfrastructureArgs) ElementType() reflect.Type { return reflect.TypeOf((*VirtualMachineManagerVirtualMachineInstanceInfrastructure)(nil)).Elem() } func (i VirtualMachineManagerVirtualMachineInstanceInfrastructureArgs) ToVirtualMachineManagerVirtualMachineInstanceInfrastructureOutput() VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput { return i.ToVirtualMachineManagerVirtualMachineInstanceInfrastructureOutputWithContext(context.Background()) } func (i VirtualMachineManagerVirtualMachineInstanceInfrastructureArgs) ToVirtualMachineManagerVirtualMachineInstanceInfrastructureOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput) } func (i VirtualMachineManagerVirtualMachineInstanceInfrastructureArgs) ToVirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput() VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput { return i.ToVirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutputWithContext(context.Background()) } func (i VirtualMachineManagerVirtualMachineInstanceInfrastructureArgs) ToVirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput).ToVirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutputWithContext(ctx) } // VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrInput is an input type that accepts VirtualMachineManagerVirtualMachineInstanceInfrastructureArgs, VirtualMachineManagerVirtualMachineInstanceInfrastructurePtr and VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput values. // You can construct a concrete instance of `VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrInput` via: // // VirtualMachineManagerVirtualMachineInstanceInfrastructureArgs{...} // // or: // // nil type VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrInput interface { pulumi.Input ToVirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput() VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput ToVirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutputWithContext(context.Context) VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput } type virtualMachineManagerVirtualMachineInstanceInfrastructurePtrType VirtualMachineManagerVirtualMachineInstanceInfrastructureArgs func VirtualMachineManagerVirtualMachineInstanceInfrastructurePtr(v *VirtualMachineManagerVirtualMachineInstanceInfrastructureArgs) VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrInput { return (*virtualMachineManagerVirtualMachineInstanceInfrastructurePtrType)(v) } func (*virtualMachineManagerVirtualMachineInstanceInfrastructurePtrType) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerVirtualMachineInstanceInfrastructure)(nil)).Elem() } func (i *virtualMachineManagerVirtualMachineInstanceInfrastructurePtrType) ToVirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput() VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput { return i.ToVirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutputWithContext(context.Background()) } func (i *virtualMachineManagerVirtualMachineInstanceInfrastructurePtrType) ToVirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput) } type VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput) ElementType() reflect.Type { return reflect.TypeOf((*VirtualMachineManagerVirtualMachineInstanceInfrastructure)(nil)).Elem() } func (o VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput) ToVirtualMachineManagerVirtualMachineInstanceInfrastructureOutput() VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput) ToVirtualMachineManagerVirtualMachineInstanceInfrastructureOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput) ToVirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput() VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput { return o.ToVirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutputWithContext(context.Background()) } func (o VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput) ToVirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v VirtualMachineManagerVirtualMachineInstanceInfrastructure) *VirtualMachineManagerVirtualMachineInstanceInfrastructure { return &v }).(VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput) } // The type of checkpoint supported for the Virtual Machine. Possible values are `Disabled`, `Production`, `ProductionOnly` and `Standard`. func (o VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput) CheckpointType() pulumi.StringPtrOutput { return o.ApplyT(func(v VirtualMachineManagerVirtualMachineInstanceInfrastructure) *string { return v.CheckpointType }).(pulumi.StringPtrOutput) } // The ID of the System Center Virtual Machine Manager Cloud resource to use for deploying the Virtual Machine. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput) SystemCenterVirtualMachineManagerCloudId() pulumi.StringPtrOutput { return o.ApplyT(func(v VirtualMachineManagerVirtualMachineInstanceInfrastructure) *string { return v.SystemCenterVirtualMachineManagerCloudId }).(pulumi.StringPtrOutput) } // The ID of the System Center Virtual Machine Manager Inventory Item for System Center Virtual Machine Manager Virtual Machine Instance. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput) SystemCenterVirtualMachineManagerInventoryItemId() pulumi.StringPtrOutput { return o.ApplyT(func(v VirtualMachineManagerVirtualMachineInstanceInfrastructure) *string { return v.SystemCenterVirtualMachineManagerInventoryItemId }).(pulumi.StringPtrOutput) } // The ID of the System Center Virtual Machine Manager Virtual Machine Template to use for deploying the Virtual Machine. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput) SystemCenterVirtualMachineManagerTemplateId() pulumi.StringPtrOutput { return o.ApplyT(func(v VirtualMachineManagerVirtualMachineInstanceInfrastructure) *string { return v.SystemCenterVirtualMachineManagerTemplateId }).(pulumi.StringPtrOutput) } // The ID of the System Center Virtual Machine Manager Virtual Machine. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput) SystemCenterVirtualMachineManagerVirtualMachineServerId() pulumi.StringPtrOutput { return o.ApplyT(func(v VirtualMachineManagerVirtualMachineInstanceInfrastructure) *string { return v.SystemCenterVirtualMachineManagerVirtualMachineServerId }).(pulumi.StringPtrOutput) } type VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerVirtualMachineInstanceInfrastructure)(nil)).Elem() } func (o VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput) ToVirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput() VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput) ToVirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput) Elem() VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceInfrastructure) VirtualMachineManagerVirtualMachineInstanceInfrastructure { if v != nil { return *v } var ret VirtualMachineManagerVirtualMachineInstanceInfrastructure return ret }).(VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput) } // The type of checkpoint supported for the Virtual Machine. Possible values are `Disabled`, `Production`, `ProductionOnly` and `Standard`. func (o VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput) CheckpointType() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceInfrastructure) *string { if v == nil { return nil } return v.CheckpointType }).(pulumi.StringPtrOutput) } // The ID of the System Center Virtual Machine Manager Cloud resource to use for deploying the Virtual Machine. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput) SystemCenterVirtualMachineManagerCloudId() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceInfrastructure) *string { if v == nil { return nil } return v.SystemCenterVirtualMachineManagerCloudId }).(pulumi.StringPtrOutput) } // The ID of the System Center Virtual Machine Manager Inventory Item for System Center Virtual Machine Manager Virtual Machine Instance. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput) SystemCenterVirtualMachineManagerInventoryItemId() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceInfrastructure) *string { if v == nil { return nil } return v.SystemCenterVirtualMachineManagerInventoryItemId }).(pulumi.StringPtrOutput) } // The ID of the System Center Virtual Machine Manager Virtual Machine Template to use for deploying the Virtual Machine. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput) SystemCenterVirtualMachineManagerTemplateId() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceInfrastructure) *string { if v == nil { return nil } return v.SystemCenterVirtualMachineManagerTemplateId }).(pulumi.StringPtrOutput) } // The ID of the System Center Virtual Machine Manager Virtual Machine. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrOutput) SystemCenterVirtualMachineManagerVirtualMachineServerId() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceInfrastructure) *string { if v == nil { return nil } return v.SystemCenterVirtualMachineManagerVirtualMachineServerId }).(pulumi.StringPtrOutput) } type VirtualMachineManagerVirtualMachineInstanceNetworkInterface struct { // The IPv4 address type. Possible values are `Dynamic` and `Static`. Ipv4AddressType *string `pulumi:"ipv4AddressType"` // The IPv6 address type. Possible values are `Dynamic` and `Static`. Ipv6AddressType *string `pulumi:"ipv6AddressType"` // The MAC address type. Possible values are `Dynamic` and `Static`. MacAddressType *string `pulumi:"macAddressType"` // The name of the Virtual Network in System Center Virtual Machine Manager Server that the Network Interface is connected to. Name string `pulumi:"name"` // The ID of the System Center Virtual Machine Manager Virtual Network to connect the Network Interface. VirtualNetworkId *string `pulumi:"virtualNetworkId"` } // VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceInput is an input type that accepts VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArgs and VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceOutput values. // You can construct a concrete instance of `VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceInput` via: // // VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArgs{...} type VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceInput interface { pulumi.Input ToVirtualMachineManagerVirtualMachineInstanceNetworkInterfaceOutput() VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceOutput ToVirtualMachineManagerVirtualMachineInstanceNetworkInterfaceOutputWithContext(context.Context) VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceOutput } type VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArgs struct { // The IPv4 address type. Possible values are `Dynamic` and `Static`. Ipv4AddressType pulumi.StringPtrInput `pulumi:"ipv4AddressType"` // The IPv6 address type. Possible values are `Dynamic` and `Static`. Ipv6AddressType pulumi.StringPtrInput `pulumi:"ipv6AddressType"` // The MAC address type. Possible values are `Dynamic` and `Static`. MacAddressType pulumi.StringPtrInput `pulumi:"macAddressType"` // The name of the Virtual Network in System Center Virtual Machine Manager Server that the Network Interface is connected to. Name pulumi.StringInput `pulumi:"name"` // The ID of the System Center Virtual Machine Manager Virtual Network to connect the Network Interface. VirtualNetworkId pulumi.StringPtrInput `pulumi:"virtualNetworkId"` } func (VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArgs) ElementType() reflect.Type { return reflect.TypeOf((*VirtualMachineManagerVirtualMachineInstanceNetworkInterface)(nil)).Elem() } func (i VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArgs) ToVirtualMachineManagerVirtualMachineInstanceNetworkInterfaceOutput() VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceOutput { return i.ToVirtualMachineManagerVirtualMachineInstanceNetworkInterfaceOutputWithContext(context.Background()) } func (i VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArgs) ToVirtualMachineManagerVirtualMachineInstanceNetworkInterfaceOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceOutput) } // VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArrayInput is an input type that accepts VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArray and VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArrayOutput values. // You can construct a concrete instance of `VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArrayInput` via: // // VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArray{ VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArgs{...} } type VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArrayInput interface { pulumi.Input ToVirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArrayOutput() VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArrayOutput ToVirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArrayOutputWithContext(context.Context) VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArrayOutput } type VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArray []VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceInput func (VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]VirtualMachineManagerVirtualMachineInstanceNetworkInterface)(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/systemcenter/virtualMachineManagerVirtualMachineInstanceGuestAgent.go
sdk/go/azure/systemcenter/virtualMachineManagerVirtualMachineInstanceGuestAgent.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package systemcenter import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. // // > **Note:** By request of the service team the provider is no longer automatically registering the `Microsoft.ScVmm` Resource Provider for this resource. To register it you can run `az provider register --namespace Microsoft.ScVmm`. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/arcmachine" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/systemcenter" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleArcMachine, err := arcmachine.NewArcMachine(ctx, "example", &arcmachine.ArcMachineArgs{ // Name: pulumi.String("example-arcmachine"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // Kind: pulumi.String("SCVMM"), // Identity: &arcmachine.ArcMachineIdentityArgs{ // Type: pulumi.String("SystemAssigned"), // }, // }) // if err != nil { // return err // } // exampleVirtualMachineManagerServer, err := systemcenter.NewVirtualMachineManagerServer(ctx, "example", &systemcenter.VirtualMachineManagerServerArgs{ // Name: pulumi.String("example-scvmmms"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // CustomLocationId: pulumi.String("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.ExtendedLocation/customLocations/customLocation1"), // Fqdn: pulumi.String("example.labtest"), // Username: pulumi.String("testUser"), // Password: pulumi.String("H@Sh1CoR3!"), // }) // if err != nil { // return err // } // example := systemcenter.GetVirtualMachineManagerInventoryItemsOutput(ctx, systemcenter.GetVirtualMachineManagerInventoryItemsOutputArgs{ // InventoryType: pulumi.String("Cloud"), // SystemCenterVirtualMachineManagerServerId: exampleVirtualMachineManagerServer.ID(), // }, nil) // exampleVirtualMachineManagerCloud, err := systemcenter.NewVirtualMachineManagerCloud(ctx, "example", &systemcenter.VirtualMachineManagerCloudArgs{ // Name: pulumi.String("example-scvmmc"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // CustomLocationId: exampleVirtualMachineManagerServer.CustomLocationId, // SystemCenterVirtualMachineManagerServerInventoryItemId: pulumi.String(example.ApplyT(func(example systemcenter.GetVirtualMachineManagerInventoryItemsResult) (*string, error) { // return &example.InventoryItems[0].Id, nil // }).(pulumi.StringPtrOutput)), // }) // if err != nil { // return err // } // example2 := systemcenter.GetVirtualMachineManagerInventoryItemsOutput(ctx, systemcenter.GetVirtualMachineManagerInventoryItemsOutputArgs{ // InventoryType: pulumi.String("VirtualMachineTemplate"), // SystemCenterVirtualMachineManagerServerId: exampleVirtualMachineManagerServer.ID(), // }, nil) // exampleVirtualMachineManagerVirtualMachineTemplate, err := systemcenter.NewVirtualMachineManagerVirtualMachineTemplate(ctx, "example", &systemcenter.VirtualMachineManagerVirtualMachineTemplateArgs{ // Name: pulumi.String("example-scvmmvmt"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // CustomLocationId: exampleVirtualMachineManagerServer.CustomLocationId, // SystemCenterVirtualMachineManagerServerInventoryItemId: pulumi.String(example2.ApplyT(func(example2 systemcenter.GetVirtualMachineManagerInventoryItemsResult) (*string, error) { // return &example2.InventoryItems[0].Id, nil // }).(pulumi.StringPtrOutput)), // }) // if err != nil { // return err // } // exampleVirtualMachineManagerVirtualMachineInstance, err := systemcenter.NewVirtualMachineManagerVirtualMachineInstance(ctx, "example", &systemcenter.VirtualMachineManagerVirtualMachineInstanceArgs{ // ScopedResourceId: exampleArcMachine.ID(), // CustomLocationId: exampleVirtualMachineManagerServer.CustomLocationId, // Infrastructure: &systemcenter.VirtualMachineManagerVirtualMachineInstanceInfrastructureArgs{ // CheckpointType: pulumi.String("Standard"), // SystemCenterVirtualMachineManagerCloudId: exampleVirtualMachineManagerCloud.ID(), // SystemCenterVirtualMachineManagerTemplateId: exampleVirtualMachineManagerVirtualMachineTemplate.ID(), // SystemCenterVirtualMachineManagerVirtualMachineServerId: exampleVirtualMachineManagerServer.ID(), // }, // OperatingSystem: &systemcenter.VirtualMachineManagerVirtualMachineInstanceOperatingSystemArgs{ // AdminPassword: pulumi.String("AdminPassword123!"), // }, // }) // if err != nil { // return err // } // _, err = systemcenter.NewVirtualMachineManagerVirtualMachineInstanceGuestAgent(ctx, "example", &systemcenter.VirtualMachineManagerVirtualMachineInstanceGuestAgentArgs{ // ScopedResourceId: exampleArcMachine.ID(), // Username: pulumi.String("Administrator"), // Password: pulumi.String("AdminPassword123!"), // }, pulumi.DependsOn([]pulumi.Resource{ // exampleVirtualMachineManagerVirtualMachineInstance, // })) // 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.ScVmm` - 2023-10-07 // // ## Import // // System Center Virtual Machine Manager Virtual Machine Instance Guest Agents can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:systemcenter/virtualMachineManagerVirtualMachineInstanceGuestAgent:VirtualMachineManagerVirtualMachineInstanceGuestAgent example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.HybridCompute/machines/machine1/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default // ``` type VirtualMachineManagerVirtualMachineInstanceGuestAgent struct { pulumi.CustomResourceState // The password that is used to connect to the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Changing this forces a new resource to be created. Password pulumi.StringOutput `pulumi:"password"` // The provisioning action that is used to define the different types of operations for the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Possible values are `install`, `repair` and `uninstall`. Defaults to `install`. Changing this forces a new resource to be created. ProvisioningAction pulumi.StringPtrOutput `pulumi:"provisioningAction"` // The ID of the Hybrid Compute Machine where this System Center Virtual Machine Manager Virtual Machine Instance Guest Agent is stored. Changing this forces a new resource to be created. ScopedResourceId pulumi.StringOutput `pulumi:"scopedResourceId"` // The username that is used to connect to the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Changing this forces a new resource to be created. Username pulumi.StringOutput `pulumi:"username"` } // NewVirtualMachineManagerVirtualMachineInstanceGuestAgent registers a new resource with the given unique name, arguments, and options. func NewVirtualMachineManagerVirtualMachineInstanceGuestAgent(ctx *pulumi.Context, name string, args *VirtualMachineManagerVirtualMachineInstanceGuestAgentArgs, opts ...pulumi.ResourceOption) (*VirtualMachineManagerVirtualMachineInstanceGuestAgent, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Password == nil { return nil, errors.New("invalid value for required argument 'Password'") } if args.ScopedResourceId == nil { return nil, errors.New("invalid value for required argument 'ScopedResourceId'") } 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 VirtualMachineManagerVirtualMachineInstanceGuestAgent err := ctx.RegisterResource("azure:systemcenter/virtualMachineManagerVirtualMachineInstanceGuestAgent:VirtualMachineManagerVirtualMachineInstanceGuestAgent", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualMachineManagerVirtualMachineInstanceGuestAgent gets an existing VirtualMachineManagerVirtualMachineInstanceGuestAgent 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 GetVirtualMachineManagerVirtualMachineInstanceGuestAgent(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualMachineManagerVirtualMachineInstanceGuestAgentState, opts ...pulumi.ResourceOption) (*VirtualMachineManagerVirtualMachineInstanceGuestAgent, error) { var resource VirtualMachineManagerVirtualMachineInstanceGuestAgent err := ctx.ReadResource("azure:systemcenter/virtualMachineManagerVirtualMachineInstanceGuestAgent:VirtualMachineManagerVirtualMachineInstanceGuestAgent", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualMachineManagerVirtualMachineInstanceGuestAgent resources. type virtualMachineManagerVirtualMachineInstanceGuestAgentState struct { // The password that is used to connect to the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Changing this forces a new resource to be created. Password *string `pulumi:"password"` // The provisioning action that is used to define the different types of operations for the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Possible values are `install`, `repair` and `uninstall`. Defaults to `install`. Changing this forces a new resource to be created. ProvisioningAction *string `pulumi:"provisioningAction"` // The ID of the Hybrid Compute Machine where this System Center Virtual Machine Manager Virtual Machine Instance Guest Agent is stored. Changing this forces a new resource to be created. ScopedResourceId *string `pulumi:"scopedResourceId"` // The username that is used to connect to the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Changing this forces a new resource to be created. Username *string `pulumi:"username"` } type VirtualMachineManagerVirtualMachineInstanceGuestAgentState struct { // The password that is used to connect to the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Changing this forces a new resource to be created. Password pulumi.StringPtrInput // The provisioning action that is used to define the different types of operations for the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Possible values are `install`, `repair` and `uninstall`. Defaults to `install`. Changing this forces a new resource to be created. ProvisioningAction pulumi.StringPtrInput // The ID of the Hybrid Compute Machine where this System Center Virtual Machine Manager Virtual Machine Instance Guest Agent is stored. Changing this forces a new resource to be created. ScopedResourceId pulumi.StringPtrInput // The username that is used to connect to the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Changing this forces a new resource to be created. Username pulumi.StringPtrInput } func (VirtualMachineManagerVirtualMachineInstanceGuestAgentState) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineManagerVirtualMachineInstanceGuestAgentState)(nil)).Elem() } type virtualMachineManagerVirtualMachineInstanceGuestAgentArgs struct { // The password that is used to connect to the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Changing this forces a new resource to be created. Password string `pulumi:"password"` // The provisioning action that is used to define the different types of operations for the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Possible values are `install`, `repair` and `uninstall`. Defaults to `install`. Changing this forces a new resource to be created. ProvisioningAction *string `pulumi:"provisioningAction"` // The ID of the Hybrid Compute Machine where this System Center Virtual Machine Manager Virtual Machine Instance Guest Agent is stored. Changing this forces a new resource to be created. ScopedResourceId string `pulumi:"scopedResourceId"` // The username that is used to connect to the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Changing this forces a new resource to be created. Username string `pulumi:"username"` } // The set of arguments for constructing a VirtualMachineManagerVirtualMachineInstanceGuestAgent resource. type VirtualMachineManagerVirtualMachineInstanceGuestAgentArgs struct { // The password that is used to connect to the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Changing this forces a new resource to be created. Password pulumi.StringInput // The provisioning action that is used to define the different types of operations for the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Possible values are `install`, `repair` and `uninstall`. Defaults to `install`. Changing this forces a new resource to be created. ProvisioningAction pulumi.StringPtrInput // The ID of the Hybrid Compute Machine where this System Center Virtual Machine Manager Virtual Machine Instance Guest Agent is stored. Changing this forces a new resource to be created. ScopedResourceId pulumi.StringInput // The username that is used to connect to the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Changing this forces a new resource to be created. Username pulumi.StringInput } func (VirtualMachineManagerVirtualMachineInstanceGuestAgentArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineManagerVirtualMachineInstanceGuestAgentArgs)(nil)).Elem() } type VirtualMachineManagerVirtualMachineInstanceGuestAgentInput interface { pulumi.Input ToVirtualMachineManagerVirtualMachineInstanceGuestAgentOutput() VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput ToVirtualMachineManagerVirtualMachineInstanceGuestAgentOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput } func (*VirtualMachineManagerVirtualMachineInstanceGuestAgent) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerVirtualMachineInstanceGuestAgent)(nil)).Elem() } func (i *VirtualMachineManagerVirtualMachineInstanceGuestAgent) ToVirtualMachineManagerVirtualMachineInstanceGuestAgentOutput() VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput { return i.ToVirtualMachineManagerVirtualMachineInstanceGuestAgentOutputWithContext(context.Background()) } func (i *VirtualMachineManagerVirtualMachineInstanceGuestAgent) ToVirtualMachineManagerVirtualMachineInstanceGuestAgentOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput) } // VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayInput is an input type that accepts VirtualMachineManagerVirtualMachineInstanceGuestAgentArray and VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput values. // You can construct a concrete instance of `VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayInput` via: // // VirtualMachineManagerVirtualMachineInstanceGuestAgentArray{ VirtualMachineManagerVirtualMachineInstanceGuestAgentArgs{...} } type VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayInput interface { pulumi.Input ToVirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput() VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput ToVirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutputWithContext(context.Context) VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput } type VirtualMachineManagerVirtualMachineInstanceGuestAgentArray []VirtualMachineManagerVirtualMachineInstanceGuestAgentInput func (VirtualMachineManagerVirtualMachineInstanceGuestAgentArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineManagerVirtualMachineInstanceGuestAgent)(nil)).Elem() } func (i VirtualMachineManagerVirtualMachineInstanceGuestAgentArray) ToVirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput() VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput { return i.ToVirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutputWithContext(context.Background()) } func (i VirtualMachineManagerVirtualMachineInstanceGuestAgentArray) ToVirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput) } // VirtualMachineManagerVirtualMachineInstanceGuestAgentMapInput is an input type that accepts VirtualMachineManagerVirtualMachineInstanceGuestAgentMap and VirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput values. // You can construct a concrete instance of `VirtualMachineManagerVirtualMachineInstanceGuestAgentMapInput` via: // // VirtualMachineManagerVirtualMachineInstanceGuestAgentMap{ "key": VirtualMachineManagerVirtualMachineInstanceGuestAgentArgs{...} } type VirtualMachineManagerVirtualMachineInstanceGuestAgentMapInput interface { pulumi.Input ToVirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput() VirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput ToVirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutputWithContext(context.Context) VirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput } type VirtualMachineManagerVirtualMachineInstanceGuestAgentMap map[string]VirtualMachineManagerVirtualMachineInstanceGuestAgentInput func (VirtualMachineManagerVirtualMachineInstanceGuestAgentMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineManagerVirtualMachineInstanceGuestAgent)(nil)).Elem() } func (i VirtualMachineManagerVirtualMachineInstanceGuestAgentMap) ToVirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput() VirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput { return i.ToVirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutputWithContext(context.Background()) } func (i VirtualMachineManagerVirtualMachineInstanceGuestAgentMap) ToVirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput) } type VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerVirtualMachineInstanceGuestAgent)(nil)).Elem() } func (o VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput) ToVirtualMachineManagerVirtualMachineInstanceGuestAgentOutput() VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput) ToVirtualMachineManagerVirtualMachineInstanceGuestAgentOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput { return o } // The password that is used to connect to the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput) Password() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceGuestAgent) pulumi.StringOutput { return v.Password }).(pulumi.StringOutput) } // The provisioning action that is used to define the different types of operations for the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Possible values are `install`, `repair` and `uninstall`. Defaults to `install`. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput) ProvisioningAction() pulumi.StringPtrOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceGuestAgent) pulumi.StringPtrOutput { return v.ProvisioningAction }).(pulumi.StringPtrOutput) } // The ID of the Hybrid Compute Machine where this System Center Virtual Machine Manager Virtual Machine Instance Guest Agent is stored. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput) ScopedResourceId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceGuestAgent) pulumi.StringOutput { return v.ScopedResourceId }).(pulumi.StringOutput) } // The username that is used to connect to the System Center Virtual Machine Manager Virtual Machine Instance Guest Agent. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput) Username() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstanceGuestAgent) pulumi.StringOutput { return v.Username }).(pulumi.StringOutput) } type VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineManagerVirtualMachineInstanceGuestAgent)(nil)).Elem() } func (o VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput) ToVirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput() VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput) ToVirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput) Index(i pulumi.IntInput) VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualMachineManagerVirtualMachineInstanceGuestAgent { return vs[0].([]*VirtualMachineManagerVirtualMachineInstanceGuestAgent)[vs[1].(int)] }).(VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput) } type VirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineManagerVirtualMachineInstanceGuestAgent)(nil)).Elem() } func (o VirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput) ToVirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput() VirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput) ToVirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput) MapIndex(k pulumi.StringInput) VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualMachineManagerVirtualMachineInstanceGuestAgent { return vs[0].(map[string]*VirtualMachineManagerVirtualMachineInstanceGuestAgent)[vs[1].(string)] }).(VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerVirtualMachineInstanceGuestAgentInput)(nil)).Elem(), &VirtualMachineManagerVirtualMachineInstanceGuestAgent{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayInput)(nil)).Elem(), VirtualMachineManagerVirtualMachineInstanceGuestAgentArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerVirtualMachineInstanceGuestAgentMapInput)(nil)).Elem(), VirtualMachineManagerVirtualMachineInstanceGuestAgentMap{}) pulumi.RegisterOutputType(VirtualMachineManagerVirtualMachineInstanceGuestAgentOutput{}) pulumi.RegisterOutputType(VirtualMachineManagerVirtualMachineInstanceGuestAgentArrayOutput{}) pulumi.RegisterOutputType(VirtualMachineManagerVirtualMachineInstanceGuestAgentMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/systemcenter/virtualMachineManagerCloud.go
sdk/go/azure/systemcenter/virtualMachineManagerCloud.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package systemcenter import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a System Center Virtual Machine Manager Cloud. // // ## 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/systemcenter" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualMachineManagerServer, err := systemcenter.NewVirtualMachineManagerServer(ctx, "example", &systemcenter.VirtualMachineManagerServerArgs{ // Name: pulumi.String("example-scvmmms"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // CustomLocationId: pulumi.String("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.ExtendedLocation/customLocations/customLocation1"), // Fqdn: pulumi.String("example.labtest"), // Username: pulumi.String("testUser"), // Password: pulumi.String("H@Sh1CoR3!"), // }) // if err != nil { // return err // } // example := systemcenter.GetVirtualMachineManagerInventoryItemsOutput(ctx, systemcenter.GetVirtualMachineManagerInventoryItemsOutputArgs{ // InventoryType: pulumi.String("Cloud"), // SystemCenterVirtualMachineManagerServerId: exampleVirtualMachineManagerServer.ID(), // }, nil) // _, err = systemcenter.NewVirtualMachineManagerCloud(ctx, "example", &systemcenter.VirtualMachineManagerCloudArgs{ // Name: pulumi.String("example-scvmmcloud"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // CustomLocationId: exampleVirtualMachineManagerServer.CustomLocationId, // SystemCenterVirtualMachineManagerServerInventoryItemId: pulumi.String(example.ApplyT(func(example systemcenter.GetVirtualMachineManagerInventoryItemsResult) (*string, error) { // return &example.InventoryItems[0].Id, nil // }).(pulumi.StringPtrOutput)), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.ScVmm` - 2023-10-07 // // ## Import // // System Center Virtual Machine Manager Clouds can be imported into Pulumi using the `resource id`, e.g. // // ```sh // $ pulumi import azure:systemcenter/virtualMachineManagerCloud:VirtualMachineManagerCloud example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.ScVmm/clouds/cloud1 // ``` type VirtualMachineManagerCloud struct { pulumi.CustomResourceState // The ID of the Custom Location for the System Center Virtual Machine Manager Cloud. Changing this forces a new resource to be created. CustomLocationId pulumi.StringOutput `pulumi:"customLocationId"` // The Azure Region where the System Center Virtual Machine Manager Cloud should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the System Center Virtual Machine Manager Cloud. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the System Center Virtual Machine Cloud should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerInventoryItemId pulumi.StringOutput `pulumi:"systemCenterVirtualMachineManagerServerInventoryItemId"` // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Cloud. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewVirtualMachineManagerCloud registers a new resource with the given unique name, arguments, and options. func NewVirtualMachineManagerCloud(ctx *pulumi.Context, name string, args *VirtualMachineManagerCloudArgs, opts ...pulumi.ResourceOption) (*VirtualMachineManagerCloud, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.CustomLocationId == nil { return nil, errors.New("invalid value for required argument 'CustomLocationId'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SystemCenterVirtualMachineManagerServerInventoryItemId == nil { return nil, errors.New("invalid value for required argument 'SystemCenterVirtualMachineManagerServerInventoryItemId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualMachineManagerCloud err := ctx.RegisterResource("azure:systemcenter/virtualMachineManagerCloud:VirtualMachineManagerCloud", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualMachineManagerCloud gets an existing VirtualMachineManagerCloud 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 GetVirtualMachineManagerCloud(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualMachineManagerCloudState, opts ...pulumi.ResourceOption) (*VirtualMachineManagerCloud, error) { var resource VirtualMachineManagerCloud err := ctx.ReadResource("azure:systemcenter/virtualMachineManagerCloud:VirtualMachineManagerCloud", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualMachineManagerCloud resources. type virtualMachineManagerCloudState struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Cloud. Changing this forces a new resource to be created. CustomLocationId *string `pulumi:"customLocationId"` // The Azure Region where the System Center Virtual Machine Manager Cloud should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the System Center Virtual Machine Manager Cloud. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the System Center Virtual Machine Cloud should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerInventoryItemId *string `pulumi:"systemCenterVirtualMachineManagerServerInventoryItemId"` // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Cloud. Tags map[string]string `pulumi:"tags"` } type VirtualMachineManagerCloudState struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Cloud. Changing this forces a new resource to be created. CustomLocationId pulumi.StringPtrInput // The Azure Region where the System Center Virtual Machine Manager Cloud should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the System Center Virtual Machine Manager Cloud. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the System Center Virtual Machine Cloud should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerInventoryItemId pulumi.StringPtrInput // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Cloud. Tags pulumi.StringMapInput } func (VirtualMachineManagerCloudState) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineManagerCloudState)(nil)).Elem() } type virtualMachineManagerCloudArgs struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Cloud. Changing this forces a new resource to be created. CustomLocationId string `pulumi:"customLocationId"` // The Azure Region where the System Center Virtual Machine Manager Cloud should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the System Center Virtual Machine Manager Cloud. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the System Center Virtual Machine Cloud should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerInventoryItemId string `pulumi:"systemCenterVirtualMachineManagerServerInventoryItemId"` // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Cloud. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a VirtualMachineManagerCloud resource. type VirtualMachineManagerCloudArgs struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Cloud. Changing this forces a new resource to be created. CustomLocationId pulumi.StringInput // The Azure Region where the System Center Virtual Machine Manager Cloud should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the System Center Virtual Machine Manager Cloud. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the System Center Virtual Machine Cloud should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerInventoryItemId pulumi.StringInput // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Cloud. Tags pulumi.StringMapInput } func (VirtualMachineManagerCloudArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineManagerCloudArgs)(nil)).Elem() } type VirtualMachineManagerCloudInput interface { pulumi.Input ToVirtualMachineManagerCloudOutput() VirtualMachineManagerCloudOutput ToVirtualMachineManagerCloudOutputWithContext(ctx context.Context) VirtualMachineManagerCloudOutput } func (*VirtualMachineManagerCloud) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerCloud)(nil)).Elem() } func (i *VirtualMachineManagerCloud) ToVirtualMachineManagerCloudOutput() VirtualMachineManagerCloudOutput { return i.ToVirtualMachineManagerCloudOutputWithContext(context.Background()) } func (i *VirtualMachineManagerCloud) ToVirtualMachineManagerCloudOutputWithContext(ctx context.Context) VirtualMachineManagerCloudOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerCloudOutput) } // VirtualMachineManagerCloudArrayInput is an input type that accepts VirtualMachineManagerCloudArray and VirtualMachineManagerCloudArrayOutput values. // You can construct a concrete instance of `VirtualMachineManagerCloudArrayInput` via: // // VirtualMachineManagerCloudArray{ VirtualMachineManagerCloudArgs{...} } type VirtualMachineManagerCloudArrayInput interface { pulumi.Input ToVirtualMachineManagerCloudArrayOutput() VirtualMachineManagerCloudArrayOutput ToVirtualMachineManagerCloudArrayOutputWithContext(context.Context) VirtualMachineManagerCloudArrayOutput } type VirtualMachineManagerCloudArray []VirtualMachineManagerCloudInput func (VirtualMachineManagerCloudArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineManagerCloud)(nil)).Elem() } func (i VirtualMachineManagerCloudArray) ToVirtualMachineManagerCloudArrayOutput() VirtualMachineManagerCloudArrayOutput { return i.ToVirtualMachineManagerCloudArrayOutputWithContext(context.Background()) } func (i VirtualMachineManagerCloudArray) ToVirtualMachineManagerCloudArrayOutputWithContext(ctx context.Context) VirtualMachineManagerCloudArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerCloudArrayOutput) } // VirtualMachineManagerCloudMapInput is an input type that accepts VirtualMachineManagerCloudMap and VirtualMachineManagerCloudMapOutput values. // You can construct a concrete instance of `VirtualMachineManagerCloudMapInput` via: // // VirtualMachineManagerCloudMap{ "key": VirtualMachineManagerCloudArgs{...} } type VirtualMachineManagerCloudMapInput interface { pulumi.Input ToVirtualMachineManagerCloudMapOutput() VirtualMachineManagerCloudMapOutput ToVirtualMachineManagerCloudMapOutputWithContext(context.Context) VirtualMachineManagerCloudMapOutput } type VirtualMachineManagerCloudMap map[string]VirtualMachineManagerCloudInput func (VirtualMachineManagerCloudMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineManagerCloud)(nil)).Elem() } func (i VirtualMachineManagerCloudMap) ToVirtualMachineManagerCloudMapOutput() VirtualMachineManagerCloudMapOutput { return i.ToVirtualMachineManagerCloudMapOutputWithContext(context.Background()) } func (i VirtualMachineManagerCloudMap) ToVirtualMachineManagerCloudMapOutputWithContext(ctx context.Context) VirtualMachineManagerCloudMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerCloudMapOutput) } type VirtualMachineManagerCloudOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerCloudOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerCloud)(nil)).Elem() } func (o VirtualMachineManagerCloudOutput) ToVirtualMachineManagerCloudOutput() VirtualMachineManagerCloudOutput { return o } func (o VirtualMachineManagerCloudOutput) ToVirtualMachineManagerCloudOutputWithContext(ctx context.Context) VirtualMachineManagerCloudOutput { return o } // The ID of the Custom Location for the System Center Virtual Machine Manager Cloud. Changing this forces a new resource to be created. func (o VirtualMachineManagerCloudOutput) CustomLocationId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerCloud) pulumi.StringOutput { return v.CustomLocationId }).(pulumi.StringOutput) } // The Azure Region where the System Center Virtual Machine Manager Cloud should exist. Changing this forces a new resource to be created. func (o VirtualMachineManagerCloudOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerCloud) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the System Center Virtual Machine Manager Cloud. Changing this forces a new resource to be created. func (o VirtualMachineManagerCloudOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerCloud) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the System Center Virtual Machine Cloud should exist. Changing this forces a new resource to be created. func (o VirtualMachineManagerCloudOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerCloud) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. func (o VirtualMachineManagerCloudOutput) SystemCenterVirtualMachineManagerServerInventoryItemId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerCloud) pulumi.StringOutput { return v.SystemCenterVirtualMachineManagerServerInventoryItemId }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Cloud. func (o VirtualMachineManagerCloudOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *VirtualMachineManagerCloud) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type VirtualMachineManagerCloudArrayOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerCloudArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineManagerCloud)(nil)).Elem() } func (o VirtualMachineManagerCloudArrayOutput) ToVirtualMachineManagerCloudArrayOutput() VirtualMachineManagerCloudArrayOutput { return o } func (o VirtualMachineManagerCloudArrayOutput) ToVirtualMachineManagerCloudArrayOutputWithContext(ctx context.Context) VirtualMachineManagerCloudArrayOutput { return o } func (o VirtualMachineManagerCloudArrayOutput) Index(i pulumi.IntInput) VirtualMachineManagerCloudOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualMachineManagerCloud { return vs[0].([]*VirtualMachineManagerCloud)[vs[1].(int)] }).(VirtualMachineManagerCloudOutput) } type VirtualMachineManagerCloudMapOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerCloudMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineManagerCloud)(nil)).Elem() } func (o VirtualMachineManagerCloudMapOutput) ToVirtualMachineManagerCloudMapOutput() VirtualMachineManagerCloudMapOutput { return o } func (o VirtualMachineManagerCloudMapOutput) ToVirtualMachineManagerCloudMapOutputWithContext(ctx context.Context) VirtualMachineManagerCloudMapOutput { return o } func (o VirtualMachineManagerCloudMapOutput) MapIndex(k pulumi.StringInput) VirtualMachineManagerCloudOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualMachineManagerCloud { return vs[0].(map[string]*VirtualMachineManagerCloud)[vs[1].(string)] }).(VirtualMachineManagerCloudOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerCloudInput)(nil)).Elem(), &VirtualMachineManagerCloud{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerCloudArrayInput)(nil)).Elem(), VirtualMachineManagerCloudArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerCloudMapInput)(nil)).Elem(), VirtualMachineManagerCloudMap{}) pulumi.RegisterOutputType(VirtualMachineManagerCloudOutput{}) pulumi.RegisterOutputType(VirtualMachineManagerCloudArrayOutput{}) pulumi.RegisterOutputType(VirtualMachineManagerCloudMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/systemcenter/virtualMachineManagerAvailabilitySet.go
sdk/go/azure/systemcenter/virtualMachineManagerAvailabilitySet.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package systemcenter import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a System Center Virtual Machine Manager Availability Set. // // ## 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/systemcenter" // "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 // } // exampleVirtualMachineManagerServer, err := systemcenter.NewVirtualMachineManagerServer(ctx, "example", &systemcenter.VirtualMachineManagerServerArgs{ // Name: pulumi.String("example-scvmmms"), // ResourceGroupName: example.Name, // Location: example.Location, // CustomLocationId: pulumi.String("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.ExtendedLocation/customLocations/customLocation1"), // Fqdn: pulumi.String("example.labtest"), // Username: pulumi.String("testUser"), // Password: pulumi.String("H@Sh1CoR3!"), // }) // if err != nil { // return err // } // _, err = systemcenter.NewVirtualMachineManagerAvailabilitySet(ctx, "example", &systemcenter.VirtualMachineManagerAvailabilitySetArgs{ // Name: pulumi.String("example-scvmmas"), // ResourceGroupName: example.Name, // Location: example.Location, // CustomLocationId: exampleVirtualMachineManagerServer.CustomLocationId, // SystemCenterVirtualMachineManagerServerId: exampleVirtualMachineManagerServer.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.ScVmm` - 2023-10-07 // // ## Import // // System Center Virtual Machine Manager Availability Sets can be imported into Pulumi using the `resource id`, e.g. // // ```sh // $ pulumi import azure:systemcenter/virtualMachineManagerAvailabilitySet:VirtualMachineManagerAvailabilitySet example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.ScVmm/availabilitySets/availabilitySet1 // ``` type VirtualMachineManagerAvailabilitySet struct { pulumi.CustomResourceState // The ID of the Custom Location for the System Center Virtual Machine Manager Availability Set. Changing this forces a new resource to be created. CustomLocationId pulumi.StringOutput `pulumi:"customLocationId"` // The Azure Region where the System Center Virtual Machine Manager Availability Set should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the System Center Virtual Machine Manager Availability Set. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the System Center Virtual Machine Availability Set should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The ID of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerId pulumi.StringOutput `pulumi:"systemCenterVirtualMachineManagerServerId"` // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Availability Set. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewVirtualMachineManagerAvailabilitySet registers a new resource with the given unique name, arguments, and options. func NewVirtualMachineManagerAvailabilitySet(ctx *pulumi.Context, name string, args *VirtualMachineManagerAvailabilitySetArgs, opts ...pulumi.ResourceOption) (*VirtualMachineManagerAvailabilitySet, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.CustomLocationId == nil { return nil, errors.New("invalid value for required argument 'CustomLocationId'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SystemCenterVirtualMachineManagerServerId == nil { return nil, errors.New("invalid value for required argument 'SystemCenterVirtualMachineManagerServerId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualMachineManagerAvailabilitySet err := ctx.RegisterResource("azure:systemcenter/virtualMachineManagerAvailabilitySet:VirtualMachineManagerAvailabilitySet", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualMachineManagerAvailabilitySet gets an existing VirtualMachineManagerAvailabilitySet 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 GetVirtualMachineManagerAvailabilitySet(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualMachineManagerAvailabilitySetState, opts ...pulumi.ResourceOption) (*VirtualMachineManagerAvailabilitySet, error) { var resource VirtualMachineManagerAvailabilitySet err := ctx.ReadResource("azure:systemcenter/virtualMachineManagerAvailabilitySet:VirtualMachineManagerAvailabilitySet", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualMachineManagerAvailabilitySet resources. type virtualMachineManagerAvailabilitySetState struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Availability Set. Changing this forces a new resource to be created. CustomLocationId *string `pulumi:"customLocationId"` // The Azure Region where the System Center Virtual Machine Manager Availability Set should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the System Center Virtual Machine Manager Availability Set. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the System Center Virtual Machine Availability Set should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The ID of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerId *string `pulumi:"systemCenterVirtualMachineManagerServerId"` // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Availability Set. Tags map[string]string `pulumi:"tags"` } type VirtualMachineManagerAvailabilitySetState struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Availability Set. Changing this forces a new resource to be created. CustomLocationId pulumi.StringPtrInput // The Azure Region where the System Center Virtual Machine Manager Availability Set should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the System Center Virtual Machine Manager Availability Set. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the System Center Virtual Machine Availability Set should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The ID of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerId pulumi.StringPtrInput // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Availability Set. Tags pulumi.StringMapInput } func (VirtualMachineManagerAvailabilitySetState) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineManagerAvailabilitySetState)(nil)).Elem() } type virtualMachineManagerAvailabilitySetArgs struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Availability Set. Changing this forces a new resource to be created. CustomLocationId string `pulumi:"customLocationId"` // The Azure Region where the System Center Virtual Machine Manager Availability Set should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the System Center Virtual Machine Manager Availability Set. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the System Center Virtual Machine Availability Set should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The ID of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerId string `pulumi:"systemCenterVirtualMachineManagerServerId"` // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Availability Set. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a VirtualMachineManagerAvailabilitySet resource. type VirtualMachineManagerAvailabilitySetArgs struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Availability Set. Changing this forces a new resource to be created. CustomLocationId pulumi.StringInput // The Azure Region where the System Center Virtual Machine Manager Availability Set should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the System Center Virtual Machine Manager Availability Set. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the System Center Virtual Machine Availability Set should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The ID of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerId pulumi.StringInput // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Availability Set. Tags pulumi.StringMapInput } func (VirtualMachineManagerAvailabilitySetArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineManagerAvailabilitySetArgs)(nil)).Elem() } type VirtualMachineManagerAvailabilitySetInput interface { pulumi.Input ToVirtualMachineManagerAvailabilitySetOutput() VirtualMachineManagerAvailabilitySetOutput ToVirtualMachineManagerAvailabilitySetOutputWithContext(ctx context.Context) VirtualMachineManagerAvailabilitySetOutput } func (*VirtualMachineManagerAvailabilitySet) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerAvailabilitySet)(nil)).Elem() } func (i *VirtualMachineManagerAvailabilitySet) ToVirtualMachineManagerAvailabilitySetOutput() VirtualMachineManagerAvailabilitySetOutput { return i.ToVirtualMachineManagerAvailabilitySetOutputWithContext(context.Background()) } func (i *VirtualMachineManagerAvailabilitySet) ToVirtualMachineManagerAvailabilitySetOutputWithContext(ctx context.Context) VirtualMachineManagerAvailabilitySetOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerAvailabilitySetOutput) } // VirtualMachineManagerAvailabilitySetArrayInput is an input type that accepts VirtualMachineManagerAvailabilitySetArray and VirtualMachineManagerAvailabilitySetArrayOutput values. // You can construct a concrete instance of `VirtualMachineManagerAvailabilitySetArrayInput` via: // // VirtualMachineManagerAvailabilitySetArray{ VirtualMachineManagerAvailabilitySetArgs{...} } type VirtualMachineManagerAvailabilitySetArrayInput interface { pulumi.Input ToVirtualMachineManagerAvailabilitySetArrayOutput() VirtualMachineManagerAvailabilitySetArrayOutput ToVirtualMachineManagerAvailabilitySetArrayOutputWithContext(context.Context) VirtualMachineManagerAvailabilitySetArrayOutput } type VirtualMachineManagerAvailabilitySetArray []VirtualMachineManagerAvailabilitySetInput func (VirtualMachineManagerAvailabilitySetArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineManagerAvailabilitySet)(nil)).Elem() } func (i VirtualMachineManagerAvailabilitySetArray) ToVirtualMachineManagerAvailabilitySetArrayOutput() VirtualMachineManagerAvailabilitySetArrayOutput { return i.ToVirtualMachineManagerAvailabilitySetArrayOutputWithContext(context.Background()) } func (i VirtualMachineManagerAvailabilitySetArray) ToVirtualMachineManagerAvailabilitySetArrayOutputWithContext(ctx context.Context) VirtualMachineManagerAvailabilitySetArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerAvailabilitySetArrayOutput) } // VirtualMachineManagerAvailabilitySetMapInput is an input type that accepts VirtualMachineManagerAvailabilitySetMap and VirtualMachineManagerAvailabilitySetMapOutput values. // You can construct a concrete instance of `VirtualMachineManagerAvailabilitySetMapInput` via: // // VirtualMachineManagerAvailabilitySetMap{ "key": VirtualMachineManagerAvailabilitySetArgs{...} } type VirtualMachineManagerAvailabilitySetMapInput interface { pulumi.Input ToVirtualMachineManagerAvailabilitySetMapOutput() VirtualMachineManagerAvailabilitySetMapOutput ToVirtualMachineManagerAvailabilitySetMapOutputWithContext(context.Context) VirtualMachineManagerAvailabilitySetMapOutput } type VirtualMachineManagerAvailabilitySetMap map[string]VirtualMachineManagerAvailabilitySetInput func (VirtualMachineManagerAvailabilitySetMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineManagerAvailabilitySet)(nil)).Elem() } func (i VirtualMachineManagerAvailabilitySetMap) ToVirtualMachineManagerAvailabilitySetMapOutput() VirtualMachineManagerAvailabilitySetMapOutput { return i.ToVirtualMachineManagerAvailabilitySetMapOutputWithContext(context.Background()) } func (i VirtualMachineManagerAvailabilitySetMap) ToVirtualMachineManagerAvailabilitySetMapOutputWithContext(ctx context.Context) VirtualMachineManagerAvailabilitySetMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerAvailabilitySetMapOutput) } type VirtualMachineManagerAvailabilitySetOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerAvailabilitySetOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerAvailabilitySet)(nil)).Elem() } func (o VirtualMachineManagerAvailabilitySetOutput) ToVirtualMachineManagerAvailabilitySetOutput() VirtualMachineManagerAvailabilitySetOutput { return o } func (o VirtualMachineManagerAvailabilitySetOutput) ToVirtualMachineManagerAvailabilitySetOutputWithContext(ctx context.Context) VirtualMachineManagerAvailabilitySetOutput { return o } // The ID of the Custom Location for the System Center Virtual Machine Manager Availability Set. Changing this forces a new resource to be created. func (o VirtualMachineManagerAvailabilitySetOutput) CustomLocationId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerAvailabilitySet) pulumi.StringOutput { return v.CustomLocationId }).(pulumi.StringOutput) } // The Azure Region where the System Center Virtual Machine Manager Availability Set should exist. Changing this forces a new resource to be created. func (o VirtualMachineManagerAvailabilitySetOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerAvailabilitySet) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the System Center Virtual Machine Manager Availability Set. Changing this forces a new resource to be created. func (o VirtualMachineManagerAvailabilitySetOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerAvailabilitySet) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the System Center Virtual Machine Availability Set should exist. Changing this forces a new resource to be created. func (o VirtualMachineManagerAvailabilitySetOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerAvailabilitySet) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The ID of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. func (o VirtualMachineManagerAvailabilitySetOutput) SystemCenterVirtualMachineManagerServerId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerAvailabilitySet) pulumi.StringOutput { return v.SystemCenterVirtualMachineManagerServerId }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Availability Set. func (o VirtualMachineManagerAvailabilitySetOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *VirtualMachineManagerAvailabilitySet) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type VirtualMachineManagerAvailabilitySetArrayOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerAvailabilitySetArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineManagerAvailabilitySet)(nil)).Elem() } func (o VirtualMachineManagerAvailabilitySetArrayOutput) ToVirtualMachineManagerAvailabilitySetArrayOutput() VirtualMachineManagerAvailabilitySetArrayOutput { return o } func (o VirtualMachineManagerAvailabilitySetArrayOutput) ToVirtualMachineManagerAvailabilitySetArrayOutputWithContext(ctx context.Context) VirtualMachineManagerAvailabilitySetArrayOutput { return o } func (o VirtualMachineManagerAvailabilitySetArrayOutput) Index(i pulumi.IntInput) VirtualMachineManagerAvailabilitySetOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualMachineManagerAvailabilitySet { return vs[0].([]*VirtualMachineManagerAvailabilitySet)[vs[1].(int)] }).(VirtualMachineManagerAvailabilitySetOutput) } type VirtualMachineManagerAvailabilitySetMapOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerAvailabilitySetMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineManagerAvailabilitySet)(nil)).Elem() } func (o VirtualMachineManagerAvailabilitySetMapOutput) ToVirtualMachineManagerAvailabilitySetMapOutput() VirtualMachineManagerAvailabilitySetMapOutput { return o } func (o VirtualMachineManagerAvailabilitySetMapOutput) ToVirtualMachineManagerAvailabilitySetMapOutputWithContext(ctx context.Context) VirtualMachineManagerAvailabilitySetMapOutput { return o } func (o VirtualMachineManagerAvailabilitySetMapOutput) MapIndex(k pulumi.StringInput) VirtualMachineManagerAvailabilitySetOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualMachineManagerAvailabilitySet { return vs[0].(map[string]*VirtualMachineManagerAvailabilitySet)[vs[1].(string)] }).(VirtualMachineManagerAvailabilitySetOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerAvailabilitySetInput)(nil)).Elem(), &VirtualMachineManagerAvailabilitySet{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerAvailabilitySetArrayInput)(nil)).Elem(), VirtualMachineManagerAvailabilitySetArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerAvailabilitySetMapInput)(nil)).Elem(), VirtualMachineManagerAvailabilitySetMap{}) pulumi.RegisterOutputType(VirtualMachineManagerAvailabilitySetOutput{}) pulumi.RegisterOutputType(VirtualMachineManagerAvailabilitySetArrayOutput{}) pulumi.RegisterOutputType(VirtualMachineManagerAvailabilitySetMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/systemcenter/virtualMachineManagerVirtualNetwork.go
sdk/go/azure/systemcenter/virtualMachineManagerVirtualNetwork.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package systemcenter import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a System Center Virtual Machine Manager Virtual Network. // // ## 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/systemcenter" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualMachineManagerServer, err := systemcenter.NewVirtualMachineManagerServer(ctx, "example", &systemcenter.VirtualMachineManagerServerArgs{ // Name: pulumi.String("example-scvmmms"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // CustomLocationId: pulumi.String("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.ExtendedLocation/customLocations/customLocation1"), // Fqdn: pulumi.String("example.labtest"), // Username: pulumi.String("testUser"), // Password: pulumi.String("H@Sh1CoR3!"), // }) // if err != nil { // return err // } // example := systemcenter.GetVirtualMachineManagerInventoryItemsOutput(ctx, systemcenter.GetVirtualMachineManagerInventoryItemsOutputArgs{ // InventoryType: pulumi.String("VirtualNetwork"), // SystemCenterVirtualMachineManagerServerId: exampleVirtualMachineManagerServer.ID(), // }, nil) // _, err = systemcenter.NewVirtualMachineManagerVirtualNetwork(ctx, "example", &systemcenter.VirtualMachineManagerVirtualNetworkArgs{ // Name: pulumi.String("example-scvmmvnet"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // CustomLocationId: exampleVirtualMachineManagerServer.CustomLocationId, // SystemCenterVirtualMachineManagerServerInventoryItemId: pulumi.String(example.ApplyT(func(example systemcenter.GetVirtualMachineManagerInventoryItemsResult) (*string, error) { // return &example.InventoryItems[0].Id, nil // }).(pulumi.StringPtrOutput)), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.ScVmm` - 2023-10-07 // // ## Import // // System Center Virtual Machine Manager Virtual Networks can be imported into Pulumi using the `resource id`, e.g. // // ```sh // $ pulumi import azure:systemcenter/virtualMachineManagerVirtualNetwork:VirtualMachineManagerVirtualNetwork example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.ScVmm/virtualNetworks/virtualNetwork1 // ``` type VirtualMachineManagerVirtualNetwork struct { pulumi.CustomResourceState // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Network. Changing this forces a new resource to be created. CustomLocationId pulumi.StringOutput `pulumi:"customLocationId"` // The Azure Region where the System Center Virtual Machine Manager Virtual Network should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the System Center Virtual Machine Manager Virtual Network. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the System Center Virtual Machine Virtual Network should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerInventoryItemId pulumi.StringOutput `pulumi:"systemCenterVirtualMachineManagerServerInventoryItemId"` // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Virtual Network. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewVirtualMachineManagerVirtualNetwork registers a new resource with the given unique name, arguments, and options. func NewVirtualMachineManagerVirtualNetwork(ctx *pulumi.Context, name string, args *VirtualMachineManagerVirtualNetworkArgs, opts ...pulumi.ResourceOption) (*VirtualMachineManagerVirtualNetwork, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.CustomLocationId == nil { return nil, errors.New("invalid value for required argument 'CustomLocationId'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SystemCenterVirtualMachineManagerServerInventoryItemId == nil { return nil, errors.New("invalid value for required argument 'SystemCenterVirtualMachineManagerServerInventoryItemId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualMachineManagerVirtualNetwork err := ctx.RegisterResource("azure:systemcenter/virtualMachineManagerVirtualNetwork:VirtualMachineManagerVirtualNetwork", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualMachineManagerVirtualNetwork gets an existing VirtualMachineManagerVirtualNetwork 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 GetVirtualMachineManagerVirtualNetwork(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualMachineManagerVirtualNetworkState, opts ...pulumi.ResourceOption) (*VirtualMachineManagerVirtualNetwork, error) { var resource VirtualMachineManagerVirtualNetwork err := ctx.ReadResource("azure:systemcenter/virtualMachineManagerVirtualNetwork:VirtualMachineManagerVirtualNetwork", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualMachineManagerVirtualNetwork resources. type virtualMachineManagerVirtualNetworkState struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Network. Changing this forces a new resource to be created. CustomLocationId *string `pulumi:"customLocationId"` // The Azure Region where the System Center Virtual Machine Manager Virtual Network should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the System Center Virtual Machine Manager Virtual Network. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the System Center Virtual Machine Virtual Network should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerInventoryItemId *string `pulumi:"systemCenterVirtualMachineManagerServerInventoryItemId"` // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Virtual Network. Tags map[string]string `pulumi:"tags"` } type VirtualMachineManagerVirtualNetworkState struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Network. Changing this forces a new resource to be created. CustomLocationId pulumi.StringPtrInput // The Azure Region where the System Center Virtual Machine Manager Virtual Network should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the System Center Virtual Machine Manager Virtual Network. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the System Center Virtual Machine Virtual Network should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerInventoryItemId pulumi.StringPtrInput // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Virtual Network. Tags pulumi.StringMapInput } func (VirtualMachineManagerVirtualNetworkState) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineManagerVirtualNetworkState)(nil)).Elem() } type virtualMachineManagerVirtualNetworkArgs struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Network. Changing this forces a new resource to be created. CustomLocationId string `pulumi:"customLocationId"` // The Azure Region where the System Center Virtual Machine Manager Virtual Network should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the System Center Virtual Machine Manager Virtual Network. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the System Center Virtual Machine Virtual Network should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerInventoryItemId string `pulumi:"systemCenterVirtualMachineManagerServerInventoryItemId"` // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Virtual Network. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a VirtualMachineManagerVirtualNetwork resource. type VirtualMachineManagerVirtualNetworkArgs struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Network. Changing this forces a new resource to be created. CustomLocationId pulumi.StringInput // The Azure Region where the System Center Virtual Machine Manager Virtual Network should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the System Center Virtual Machine Manager Virtual Network. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the System Center Virtual Machine Virtual Network should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerInventoryItemId pulumi.StringInput // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Virtual Network. Tags pulumi.StringMapInput } func (VirtualMachineManagerVirtualNetworkArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineManagerVirtualNetworkArgs)(nil)).Elem() } type VirtualMachineManagerVirtualNetworkInput interface { pulumi.Input ToVirtualMachineManagerVirtualNetworkOutput() VirtualMachineManagerVirtualNetworkOutput ToVirtualMachineManagerVirtualNetworkOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualNetworkOutput } func (*VirtualMachineManagerVirtualNetwork) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerVirtualNetwork)(nil)).Elem() } func (i *VirtualMachineManagerVirtualNetwork) ToVirtualMachineManagerVirtualNetworkOutput() VirtualMachineManagerVirtualNetworkOutput { return i.ToVirtualMachineManagerVirtualNetworkOutputWithContext(context.Background()) } func (i *VirtualMachineManagerVirtualNetwork) ToVirtualMachineManagerVirtualNetworkOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualNetworkOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualNetworkOutput) } // VirtualMachineManagerVirtualNetworkArrayInput is an input type that accepts VirtualMachineManagerVirtualNetworkArray and VirtualMachineManagerVirtualNetworkArrayOutput values. // You can construct a concrete instance of `VirtualMachineManagerVirtualNetworkArrayInput` via: // // VirtualMachineManagerVirtualNetworkArray{ VirtualMachineManagerVirtualNetworkArgs{...} } type VirtualMachineManagerVirtualNetworkArrayInput interface { pulumi.Input ToVirtualMachineManagerVirtualNetworkArrayOutput() VirtualMachineManagerVirtualNetworkArrayOutput ToVirtualMachineManagerVirtualNetworkArrayOutputWithContext(context.Context) VirtualMachineManagerVirtualNetworkArrayOutput } type VirtualMachineManagerVirtualNetworkArray []VirtualMachineManagerVirtualNetworkInput func (VirtualMachineManagerVirtualNetworkArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineManagerVirtualNetwork)(nil)).Elem() } func (i VirtualMachineManagerVirtualNetworkArray) ToVirtualMachineManagerVirtualNetworkArrayOutput() VirtualMachineManagerVirtualNetworkArrayOutput { return i.ToVirtualMachineManagerVirtualNetworkArrayOutputWithContext(context.Background()) } func (i VirtualMachineManagerVirtualNetworkArray) ToVirtualMachineManagerVirtualNetworkArrayOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualNetworkArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualNetworkArrayOutput) } // VirtualMachineManagerVirtualNetworkMapInput is an input type that accepts VirtualMachineManagerVirtualNetworkMap and VirtualMachineManagerVirtualNetworkMapOutput values. // You can construct a concrete instance of `VirtualMachineManagerVirtualNetworkMapInput` via: // // VirtualMachineManagerVirtualNetworkMap{ "key": VirtualMachineManagerVirtualNetworkArgs{...} } type VirtualMachineManagerVirtualNetworkMapInput interface { pulumi.Input ToVirtualMachineManagerVirtualNetworkMapOutput() VirtualMachineManagerVirtualNetworkMapOutput ToVirtualMachineManagerVirtualNetworkMapOutputWithContext(context.Context) VirtualMachineManagerVirtualNetworkMapOutput } type VirtualMachineManagerVirtualNetworkMap map[string]VirtualMachineManagerVirtualNetworkInput func (VirtualMachineManagerVirtualNetworkMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineManagerVirtualNetwork)(nil)).Elem() } func (i VirtualMachineManagerVirtualNetworkMap) ToVirtualMachineManagerVirtualNetworkMapOutput() VirtualMachineManagerVirtualNetworkMapOutput { return i.ToVirtualMachineManagerVirtualNetworkMapOutputWithContext(context.Background()) } func (i VirtualMachineManagerVirtualNetworkMap) ToVirtualMachineManagerVirtualNetworkMapOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualNetworkMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualNetworkMapOutput) } type VirtualMachineManagerVirtualNetworkOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualNetworkOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerVirtualNetwork)(nil)).Elem() } func (o VirtualMachineManagerVirtualNetworkOutput) ToVirtualMachineManagerVirtualNetworkOutput() VirtualMachineManagerVirtualNetworkOutput { return o } func (o VirtualMachineManagerVirtualNetworkOutput) ToVirtualMachineManagerVirtualNetworkOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualNetworkOutput { return o } // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Network. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualNetworkOutput) CustomLocationId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualNetwork) pulumi.StringOutput { return v.CustomLocationId }).(pulumi.StringOutput) } // The Azure Region where the System Center Virtual Machine Manager Virtual Network should exist. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualNetworkOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualNetwork) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the System Center Virtual Machine Manager Virtual Network. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualNetworkOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualNetwork) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the System Center Virtual Machine Virtual Network should exist. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualNetworkOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualNetwork) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualNetworkOutput) SystemCenterVirtualMachineManagerServerInventoryItemId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualNetwork) pulumi.StringOutput { return v.SystemCenterVirtualMachineManagerServerInventoryItemId }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Virtual Network. func (o VirtualMachineManagerVirtualNetworkOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualNetwork) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type VirtualMachineManagerVirtualNetworkArrayOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualNetworkArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineManagerVirtualNetwork)(nil)).Elem() } func (o VirtualMachineManagerVirtualNetworkArrayOutput) ToVirtualMachineManagerVirtualNetworkArrayOutput() VirtualMachineManagerVirtualNetworkArrayOutput { return o } func (o VirtualMachineManagerVirtualNetworkArrayOutput) ToVirtualMachineManagerVirtualNetworkArrayOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualNetworkArrayOutput { return o } func (o VirtualMachineManagerVirtualNetworkArrayOutput) Index(i pulumi.IntInput) VirtualMachineManagerVirtualNetworkOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualMachineManagerVirtualNetwork { return vs[0].([]*VirtualMachineManagerVirtualNetwork)[vs[1].(int)] }).(VirtualMachineManagerVirtualNetworkOutput) } type VirtualMachineManagerVirtualNetworkMapOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualNetworkMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineManagerVirtualNetwork)(nil)).Elem() } func (o VirtualMachineManagerVirtualNetworkMapOutput) ToVirtualMachineManagerVirtualNetworkMapOutput() VirtualMachineManagerVirtualNetworkMapOutput { return o } func (o VirtualMachineManagerVirtualNetworkMapOutput) ToVirtualMachineManagerVirtualNetworkMapOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualNetworkMapOutput { return o } func (o VirtualMachineManagerVirtualNetworkMapOutput) MapIndex(k pulumi.StringInput) VirtualMachineManagerVirtualNetworkOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualMachineManagerVirtualNetwork { return vs[0].(map[string]*VirtualMachineManagerVirtualNetwork)[vs[1].(string)] }).(VirtualMachineManagerVirtualNetworkOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerVirtualNetworkInput)(nil)).Elem(), &VirtualMachineManagerVirtualNetwork{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerVirtualNetworkArrayInput)(nil)).Elem(), VirtualMachineManagerVirtualNetworkArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerVirtualNetworkMapInput)(nil)).Elem(), VirtualMachineManagerVirtualNetworkMap{}) pulumi.RegisterOutputType(VirtualMachineManagerVirtualNetworkOutput{}) pulumi.RegisterOutputType(VirtualMachineManagerVirtualNetworkArrayOutput{}) pulumi.RegisterOutputType(VirtualMachineManagerVirtualNetworkMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/systemcenter/virtualMachineManagerVirtualMachineInstance.go
sdk/go/azure/systemcenter/virtualMachineManagerVirtualMachineInstance.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package systemcenter import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a System Center Virtual Machine Manager Virtual Machine Instance. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/arcmachine" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/systemcenter" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleArcMachine, err := arcmachine.NewArcMachine(ctx, "example", &arcmachine.ArcMachineArgs{ // Name: pulumi.String("example-arcmachine"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // Kind: pulumi.String("SCVMM"), // }) // if err != nil { // return err // } // exampleVirtualMachineManagerServer, err := systemcenter.NewVirtualMachineManagerServer(ctx, "example", &systemcenter.VirtualMachineManagerServerArgs{ // Name: pulumi.String("example-scvmmms"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // CustomLocationId: pulumi.String("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.ExtendedLocation/customLocations/customLocation1"), // Fqdn: pulumi.String("example.labtest"), // Username: pulumi.String("testUser"), // Password: pulumi.String("H@Sh1CoR3!"), // }) // if err != nil { // return err // } // example := systemcenter.GetVirtualMachineManagerInventoryItemsOutput(ctx, systemcenter.GetVirtualMachineManagerInventoryItemsOutputArgs{ // InventoryType: pulumi.String("Cloud"), // SystemCenterVirtualMachineManagerServerId: exampleVirtualMachineManagerServer.ID(), // }, nil) // exampleVirtualMachineManagerCloud, err := systemcenter.NewVirtualMachineManagerCloud(ctx, "example", &systemcenter.VirtualMachineManagerCloudArgs{ // Name: pulumi.String("example-scvmmc"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // CustomLocationId: exampleVirtualMachineManagerServer.CustomLocationId, // SystemCenterVirtualMachineManagerServerInventoryItemId: pulumi.String(example.ApplyT(func(example systemcenter.GetVirtualMachineManagerInventoryItemsResult) (*string, error) { // return &example.InventoryItems[0].Id, nil // }).(pulumi.StringPtrOutput)), // }) // if err != nil { // return err // } // example2 := systemcenter.GetVirtualMachineManagerInventoryItemsOutput(ctx, systemcenter.GetVirtualMachineManagerInventoryItemsOutputArgs{ // InventoryType: pulumi.String("VirtualMachineTemplate"), // SystemCenterVirtualMachineManagerServerId: exampleVirtualMachineManagerServer.ID(), // }, nil) // exampleVirtualMachineManagerVirtualMachineTemplate, err := systemcenter.NewVirtualMachineManagerVirtualMachineTemplate(ctx, "example", &systemcenter.VirtualMachineManagerVirtualMachineTemplateArgs{ // Name: pulumi.String("example-scvmmvmt"), // Location: exampleResourceGroup.Location, // ResourceGroupName: exampleResourceGroup.Name, // CustomLocationId: exampleVirtualMachineManagerServer.CustomLocationId, // SystemCenterVirtualMachineManagerServerInventoryItemId: pulumi.String(example2.ApplyT(func(example2 systemcenter.GetVirtualMachineManagerInventoryItemsResult) (*string, error) { // return &example2.InventoryItems[0].Id, nil // }).(pulumi.StringPtrOutput)), // }) // if err != nil { // return err // } // _, err = systemcenter.NewVirtualMachineManagerVirtualMachineInstance(ctx, "example", &systemcenter.VirtualMachineManagerVirtualMachineInstanceArgs{ // ScopedResourceId: exampleArcMachine.ID(), // CustomLocationId: exampleVirtualMachineManagerServer.CustomLocationId, // Infrastructure: &systemcenter.VirtualMachineManagerVirtualMachineInstanceInfrastructureArgs{ // SystemCenterVirtualMachineManagerCloudId: exampleVirtualMachineManagerCloud.ID(), // SystemCenterVirtualMachineManagerTemplateId: exampleVirtualMachineManagerVirtualMachineTemplate.ID(), // SystemCenterVirtualMachineManagerVirtualMachineServerId: exampleVirtualMachineManagerServer.ID(), // }, // OperatingSystem: &systemcenter.VirtualMachineManagerVirtualMachineInstanceOperatingSystemArgs{ // ComputerName: pulumi.String("testComputer"), // }, // Hardware: &systemcenter.VirtualMachineManagerVirtualMachineInstanceHardwareArgs{ // CpuCount: pulumi.Int(1), // MemoryInMb: pulumi.Int(1024), // }, // }) // 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.ScVmm` - 2023-10-07 // // ## Import // // System Center Virtual Machine Manager Virtual Machine Instances can be imported into Pulumi using the `resource id`, e.g. // // ```sh // $ pulumi import azure:systemcenter/virtualMachineManagerVirtualMachineInstance:VirtualMachineManagerVirtualMachineInstance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.HybridCompute/machines/machine1/providers/Microsoft.ScVmm/virtualMachineInstances/default // ``` type VirtualMachineManagerVirtualMachineInstance struct { pulumi.CustomResourceState // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Machine Instance. Changing this forces a new resource to be created. CustomLocationId pulumi.StringOutput `pulumi:"customLocationId"` // A `hardware` block as defined below. Changing this forces a new resource to be created. // // > **Note:** This resource will be restarted while updating `hardware`. Hardware VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput `pulumi:"hardware"` // An `infrastructure` block as defined below. Infrastructure VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput `pulumi:"infrastructure"` // A `networkInterface` block as defined below. // // > **Note:** This resource will be restarted while updating `networkInterface`. NetworkInterfaces VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArrayOutput `pulumi:"networkInterfaces"` // An `operatingSystem` block as defined below. Changing this forces a new resource to be created. OperatingSystem VirtualMachineManagerVirtualMachineInstanceOperatingSystemPtrOutput `pulumi:"operatingSystem"` // The ID of the Hybrid Compute Machine where this System Center Virtual Machine Manager Virtual Machine Instance is stored. Changing this forces a new resource to be created. ScopedResourceId pulumi.StringOutput `pulumi:"scopedResourceId"` // A `storageDisk` block as defined below. // // > **Note:** This resource will be restarted while updating `storageDisk`. StorageDisks VirtualMachineManagerVirtualMachineInstanceStorageDiskArrayOutput `pulumi:"storageDisks"` // A list of IDs of System Center Virtual Machine Manager Availability Set. SystemCenterVirtualMachineManagerAvailabilitySetIds pulumi.StringArrayOutput `pulumi:"systemCenterVirtualMachineManagerAvailabilitySetIds"` } // NewVirtualMachineManagerVirtualMachineInstance registers a new resource with the given unique name, arguments, and options. func NewVirtualMachineManagerVirtualMachineInstance(ctx *pulumi.Context, name string, args *VirtualMachineManagerVirtualMachineInstanceArgs, opts ...pulumi.ResourceOption) (*VirtualMachineManagerVirtualMachineInstance, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.CustomLocationId == nil { return nil, errors.New("invalid value for required argument 'CustomLocationId'") } if args.Infrastructure == nil { return nil, errors.New("invalid value for required argument 'Infrastructure'") } if args.ScopedResourceId == nil { return nil, errors.New("invalid value for required argument 'ScopedResourceId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualMachineManagerVirtualMachineInstance err := ctx.RegisterResource("azure:systemcenter/virtualMachineManagerVirtualMachineInstance:VirtualMachineManagerVirtualMachineInstance", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualMachineManagerVirtualMachineInstance gets an existing VirtualMachineManagerVirtualMachineInstance 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 GetVirtualMachineManagerVirtualMachineInstance(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualMachineManagerVirtualMachineInstanceState, opts ...pulumi.ResourceOption) (*VirtualMachineManagerVirtualMachineInstance, error) { var resource VirtualMachineManagerVirtualMachineInstance err := ctx.ReadResource("azure:systemcenter/virtualMachineManagerVirtualMachineInstance:VirtualMachineManagerVirtualMachineInstance", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualMachineManagerVirtualMachineInstance resources. type virtualMachineManagerVirtualMachineInstanceState struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Machine Instance. Changing this forces a new resource to be created. CustomLocationId *string `pulumi:"customLocationId"` // A `hardware` block as defined below. Changing this forces a new resource to be created. // // > **Note:** This resource will be restarted while updating `hardware`. Hardware *VirtualMachineManagerVirtualMachineInstanceHardware `pulumi:"hardware"` // An `infrastructure` block as defined below. Infrastructure *VirtualMachineManagerVirtualMachineInstanceInfrastructure `pulumi:"infrastructure"` // A `networkInterface` block as defined below. // // > **Note:** This resource will be restarted while updating `networkInterface`. NetworkInterfaces []VirtualMachineManagerVirtualMachineInstanceNetworkInterface `pulumi:"networkInterfaces"` // An `operatingSystem` block as defined below. Changing this forces a new resource to be created. OperatingSystem *VirtualMachineManagerVirtualMachineInstanceOperatingSystem `pulumi:"operatingSystem"` // The ID of the Hybrid Compute Machine where this System Center Virtual Machine Manager Virtual Machine Instance is stored. Changing this forces a new resource to be created. ScopedResourceId *string `pulumi:"scopedResourceId"` // A `storageDisk` block as defined below. // // > **Note:** This resource will be restarted while updating `storageDisk`. StorageDisks []VirtualMachineManagerVirtualMachineInstanceStorageDisk `pulumi:"storageDisks"` // A list of IDs of System Center Virtual Machine Manager Availability Set. SystemCenterVirtualMachineManagerAvailabilitySetIds []string `pulumi:"systemCenterVirtualMachineManagerAvailabilitySetIds"` } type VirtualMachineManagerVirtualMachineInstanceState struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Machine Instance. Changing this forces a new resource to be created. CustomLocationId pulumi.StringPtrInput // A `hardware` block as defined below. Changing this forces a new resource to be created. // // > **Note:** This resource will be restarted while updating `hardware`. Hardware VirtualMachineManagerVirtualMachineInstanceHardwarePtrInput // An `infrastructure` block as defined below. Infrastructure VirtualMachineManagerVirtualMachineInstanceInfrastructurePtrInput // A `networkInterface` block as defined below. // // > **Note:** This resource will be restarted while updating `networkInterface`. NetworkInterfaces VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArrayInput // An `operatingSystem` block as defined below. Changing this forces a new resource to be created. OperatingSystem VirtualMachineManagerVirtualMachineInstanceOperatingSystemPtrInput // The ID of the Hybrid Compute Machine where this System Center Virtual Machine Manager Virtual Machine Instance is stored. Changing this forces a new resource to be created. ScopedResourceId pulumi.StringPtrInput // A `storageDisk` block as defined below. // // > **Note:** This resource will be restarted while updating `storageDisk`. StorageDisks VirtualMachineManagerVirtualMachineInstanceStorageDiskArrayInput // A list of IDs of System Center Virtual Machine Manager Availability Set. SystemCenterVirtualMachineManagerAvailabilitySetIds pulumi.StringArrayInput } func (VirtualMachineManagerVirtualMachineInstanceState) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineManagerVirtualMachineInstanceState)(nil)).Elem() } type virtualMachineManagerVirtualMachineInstanceArgs struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Machine Instance. Changing this forces a new resource to be created. CustomLocationId string `pulumi:"customLocationId"` // A `hardware` block as defined below. Changing this forces a new resource to be created. // // > **Note:** This resource will be restarted while updating `hardware`. Hardware *VirtualMachineManagerVirtualMachineInstanceHardware `pulumi:"hardware"` // An `infrastructure` block as defined below. Infrastructure VirtualMachineManagerVirtualMachineInstanceInfrastructure `pulumi:"infrastructure"` // A `networkInterface` block as defined below. // // > **Note:** This resource will be restarted while updating `networkInterface`. NetworkInterfaces []VirtualMachineManagerVirtualMachineInstanceNetworkInterface `pulumi:"networkInterfaces"` // An `operatingSystem` block as defined below. Changing this forces a new resource to be created. OperatingSystem *VirtualMachineManagerVirtualMachineInstanceOperatingSystem `pulumi:"operatingSystem"` // The ID of the Hybrid Compute Machine where this System Center Virtual Machine Manager Virtual Machine Instance is stored. Changing this forces a new resource to be created. ScopedResourceId string `pulumi:"scopedResourceId"` // A `storageDisk` block as defined below. // // > **Note:** This resource will be restarted while updating `storageDisk`. StorageDisks []VirtualMachineManagerVirtualMachineInstanceStorageDisk `pulumi:"storageDisks"` // A list of IDs of System Center Virtual Machine Manager Availability Set. SystemCenterVirtualMachineManagerAvailabilitySetIds []string `pulumi:"systemCenterVirtualMachineManagerAvailabilitySetIds"` } // The set of arguments for constructing a VirtualMachineManagerVirtualMachineInstance resource. type VirtualMachineManagerVirtualMachineInstanceArgs struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Machine Instance. Changing this forces a new resource to be created. CustomLocationId pulumi.StringInput // A `hardware` block as defined below. Changing this forces a new resource to be created. // // > **Note:** This resource will be restarted while updating `hardware`. Hardware VirtualMachineManagerVirtualMachineInstanceHardwarePtrInput // An `infrastructure` block as defined below. Infrastructure VirtualMachineManagerVirtualMachineInstanceInfrastructureInput // A `networkInterface` block as defined below. // // > **Note:** This resource will be restarted while updating `networkInterface`. NetworkInterfaces VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArrayInput // An `operatingSystem` block as defined below. Changing this forces a new resource to be created. OperatingSystem VirtualMachineManagerVirtualMachineInstanceOperatingSystemPtrInput // The ID of the Hybrid Compute Machine where this System Center Virtual Machine Manager Virtual Machine Instance is stored. Changing this forces a new resource to be created. ScopedResourceId pulumi.StringInput // A `storageDisk` block as defined below. // // > **Note:** This resource will be restarted while updating `storageDisk`. StorageDisks VirtualMachineManagerVirtualMachineInstanceStorageDiskArrayInput // A list of IDs of System Center Virtual Machine Manager Availability Set. SystemCenterVirtualMachineManagerAvailabilitySetIds pulumi.StringArrayInput } func (VirtualMachineManagerVirtualMachineInstanceArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineManagerVirtualMachineInstanceArgs)(nil)).Elem() } type VirtualMachineManagerVirtualMachineInstanceInput interface { pulumi.Input ToVirtualMachineManagerVirtualMachineInstanceOutput() VirtualMachineManagerVirtualMachineInstanceOutput ToVirtualMachineManagerVirtualMachineInstanceOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceOutput } func (*VirtualMachineManagerVirtualMachineInstance) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerVirtualMachineInstance)(nil)).Elem() } func (i *VirtualMachineManagerVirtualMachineInstance) ToVirtualMachineManagerVirtualMachineInstanceOutput() VirtualMachineManagerVirtualMachineInstanceOutput { return i.ToVirtualMachineManagerVirtualMachineInstanceOutputWithContext(context.Background()) } func (i *VirtualMachineManagerVirtualMachineInstance) ToVirtualMachineManagerVirtualMachineInstanceOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineInstanceOutput) } // VirtualMachineManagerVirtualMachineInstanceArrayInput is an input type that accepts VirtualMachineManagerVirtualMachineInstanceArray and VirtualMachineManagerVirtualMachineInstanceArrayOutput values. // You can construct a concrete instance of `VirtualMachineManagerVirtualMachineInstanceArrayInput` via: // // VirtualMachineManagerVirtualMachineInstanceArray{ VirtualMachineManagerVirtualMachineInstanceArgs{...} } type VirtualMachineManagerVirtualMachineInstanceArrayInput interface { pulumi.Input ToVirtualMachineManagerVirtualMachineInstanceArrayOutput() VirtualMachineManagerVirtualMachineInstanceArrayOutput ToVirtualMachineManagerVirtualMachineInstanceArrayOutputWithContext(context.Context) VirtualMachineManagerVirtualMachineInstanceArrayOutput } type VirtualMachineManagerVirtualMachineInstanceArray []VirtualMachineManagerVirtualMachineInstanceInput func (VirtualMachineManagerVirtualMachineInstanceArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineManagerVirtualMachineInstance)(nil)).Elem() } func (i VirtualMachineManagerVirtualMachineInstanceArray) ToVirtualMachineManagerVirtualMachineInstanceArrayOutput() VirtualMachineManagerVirtualMachineInstanceArrayOutput { return i.ToVirtualMachineManagerVirtualMachineInstanceArrayOutputWithContext(context.Background()) } func (i VirtualMachineManagerVirtualMachineInstanceArray) ToVirtualMachineManagerVirtualMachineInstanceArrayOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineInstanceArrayOutput) } // VirtualMachineManagerVirtualMachineInstanceMapInput is an input type that accepts VirtualMachineManagerVirtualMachineInstanceMap and VirtualMachineManagerVirtualMachineInstanceMapOutput values. // You can construct a concrete instance of `VirtualMachineManagerVirtualMachineInstanceMapInput` via: // // VirtualMachineManagerVirtualMachineInstanceMap{ "key": VirtualMachineManagerVirtualMachineInstanceArgs{...} } type VirtualMachineManagerVirtualMachineInstanceMapInput interface { pulumi.Input ToVirtualMachineManagerVirtualMachineInstanceMapOutput() VirtualMachineManagerVirtualMachineInstanceMapOutput ToVirtualMachineManagerVirtualMachineInstanceMapOutputWithContext(context.Context) VirtualMachineManagerVirtualMachineInstanceMapOutput } type VirtualMachineManagerVirtualMachineInstanceMap map[string]VirtualMachineManagerVirtualMachineInstanceInput func (VirtualMachineManagerVirtualMachineInstanceMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineManagerVirtualMachineInstance)(nil)).Elem() } func (i VirtualMachineManagerVirtualMachineInstanceMap) ToVirtualMachineManagerVirtualMachineInstanceMapOutput() VirtualMachineManagerVirtualMachineInstanceMapOutput { return i.ToVirtualMachineManagerVirtualMachineInstanceMapOutputWithContext(context.Background()) } func (i VirtualMachineManagerVirtualMachineInstanceMap) ToVirtualMachineManagerVirtualMachineInstanceMapOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineInstanceMapOutput) } type VirtualMachineManagerVirtualMachineInstanceOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualMachineInstanceOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerVirtualMachineInstance)(nil)).Elem() } func (o VirtualMachineManagerVirtualMachineInstanceOutput) ToVirtualMachineManagerVirtualMachineInstanceOutput() VirtualMachineManagerVirtualMachineInstanceOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceOutput) ToVirtualMachineManagerVirtualMachineInstanceOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceOutput { return o } // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Machine Instance. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineInstanceOutput) CustomLocationId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstance) pulumi.StringOutput { return v.CustomLocationId }).(pulumi.StringOutput) } // A `hardware` block as defined below. Changing this forces a new resource to be created. // // > **Note:** This resource will be restarted while updating `hardware`. func (o VirtualMachineManagerVirtualMachineInstanceOutput) Hardware() VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstance) VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput { return v.Hardware }).(VirtualMachineManagerVirtualMachineInstanceHardwarePtrOutput) } // An `infrastructure` block as defined below. func (o VirtualMachineManagerVirtualMachineInstanceOutput) Infrastructure() VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstance) VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput { return v.Infrastructure }).(VirtualMachineManagerVirtualMachineInstanceInfrastructureOutput) } // A `networkInterface` block as defined below. // // > **Note:** This resource will be restarted while updating `networkInterface`. func (o VirtualMachineManagerVirtualMachineInstanceOutput) NetworkInterfaces() VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArrayOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstance) VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArrayOutput { return v.NetworkInterfaces }).(VirtualMachineManagerVirtualMachineInstanceNetworkInterfaceArrayOutput) } // An `operatingSystem` block as defined below. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineInstanceOutput) OperatingSystem() VirtualMachineManagerVirtualMachineInstanceOperatingSystemPtrOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstance) VirtualMachineManagerVirtualMachineInstanceOperatingSystemPtrOutput { return v.OperatingSystem }).(VirtualMachineManagerVirtualMachineInstanceOperatingSystemPtrOutput) } // The ID of the Hybrid Compute Machine where this System Center Virtual Machine Manager Virtual Machine Instance is stored. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineInstanceOutput) ScopedResourceId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstance) pulumi.StringOutput { return v.ScopedResourceId }).(pulumi.StringOutput) } // A `storageDisk` block as defined below. // // > **Note:** This resource will be restarted while updating `storageDisk`. func (o VirtualMachineManagerVirtualMachineInstanceOutput) StorageDisks() VirtualMachineManagerVirtualMachineInstanceStorageDiskArrayOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstance) VirtualMachineManagerVirtualMachineInstanceStorageDiskArrayOutput { return v.StorageDisks }).(VirtualMachineManagerVirtualMachineInstanceStorageDiskArrayOutput) } // A list of IDs of System Center Virtual Machine Manager Availability Set. func (o VirtualMachineManagerVirtualMachineInstanceOutput) SystemCenterVirtualMachineManagerAvailabilitySetIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineInstance) pulumi.StringArrayOutput { return v.SystemCenterVirtualMachineManagerAvailabilitySetIds }).(pulumi.StringArrayOutput) } type VirtualMachineManagerVirtualMachineInstanceArrayOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualMachineInstanceArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineManagerVirtualMachineInstance)(nil)).Elem() } func (o VirtualMachineManagerVirtualMachineInstanceArrayOutput) ToVirtualMachineManagerVirtualMachineInstanceArrayOutput() VirtualMachineManagerVirtualMachineInstanceArrayOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceArrayOutput) ToVirtualMachineManagerVirtualMachineInstanceArrayOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceArrayOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceArrayOutput) Index(i pulumi.IntInput) VirtualMachineManagerVirtualMachineInstanceOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualMachineManagerVirtualMachineInstance { return vs[0].([]*VirtualMachineManagerVirtualMachineInstance)[vs[1].(int)] }).(VirtualMachineManagerVirtualMachineInstanceOutput) } type VirtualMachineManagerVirtualMachineInstanceMapOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualMachineInstanceMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineManagerVirtualMachineInstance)(nil)).Elem() } func (o VirtualMachineManagerVirtualMachineInstanceMapOutput) ToVirtualMachineManagerVirtualMachineInstanceMapOutput() VirtualMachineManagerVirtualMachineInstanceMapOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceMapOutput) ToVirtualMachineManagerVirtualMachineInstanceMapOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineInstanceMapOutput { return o } func (o VirtualMachineManagerVirtualMachineInstanceMapOutput) MapIndex(k pulumi.StringInput) VirtualMachineManagerVirtualMachineInstanceOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualMachineManagerVirtualMachineInstance { return vs[0].(map[string]*VirtualMachineManagerVirtualMachineInstance)[vs[1].(string)] }).(VirtualMachineManagerVirtualMachineInstanceOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerVirtualMachineInstanceInput)(nil)).Elem(), &VirtualMachineManagerVirtualMachineInstance{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerVirtualMachineInstanceArrayInput)(nil)).Elem(), VirtualMachineManagerVirtualMachineInstanceArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerVirtualMachineInstanceMapInput)(nil)).Elem(), VirtualMachineManagerVirtualMachineInstanceMap{}) pulumi.RegisterOutputType(VirtualMachineManagerVirtualMachineInstanceOutput{}) pulumi.RegisterOutputType(VirtualMachineManagerVirtualMachineInstanceArrayOutput{}) pulumi.RegisterOutputType(VirtualMachineManagerVirtualMachineInstanceMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/systemcenter/virtualMachineManagerVirtualMachineTemplate.go
sdk/go/azure/systemcenter/virtualMachineManagerVirtualMachineTemplate.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package systemcenter import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a System Center Virtual Machine Manager Virtual Machine Template. // // ## 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/systemcenter" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-resources"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleVirtualMachineManagerServer, err := systemcenter.NewVirtualMachineManagerServer(ctx, "example", &systemcenter.VirtualMachineManagerServerArgs{ // Name: pulumi.String("example-scvmmms"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // CustomLocationId: pulumi.String("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.ExtendedLocation/customLocations/customLocation1"), // Fqdn: pulumi.String("example.labtest"), // Username: pulumi.String("testUser"), // Password: pulumi.String("H@Sh1CoR3!"), // }) // if err != nil { // return err // } // example := systemcenter.GetVirtualMachineManagerInventoryItemsOutput(ctx, systemcenter.GetVirtualMachineManagerInventoryItemsOutputArgs{ // InventoryType: pulumi.String("VirtualMachineTemplate"), // SystemCenterVirtualMachineManagerServerId: exampleVirtualMachineManagerServer.ID(), // }, nil) // _, err = systemcenter.NewVirtualMachineManagerVirtualMachineTemplate(ctx, "example", &systemcenter.VirtualMachineManagerVirtualMachineTemplateArgs{ // Name: pulumi.String("example-scvmmvmtemplate"), // ResourceGroupName: exampleResourceGroup.Name, // Location: exampleResourceGroup.Location, // CustomLocationId: exampleVirtualMachineManagerServer.CustomLocationId, // SystemCenterVirtualMachineManagerServerInventoryItemId: pulumi.String(example.ApplyT(func(example systemcenter.GetVirtualMachineManagerInventoryItemsResult) (*string, error) { // return &example.InventoryItems[0].Id, nil // }).(pulumi.StringPtrOutput)), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This resource uses the following Azure API Providers: // // * `Microsoft.ScVmm` - 2023-10-07 // // ## Import // // System Center Virtual Machine Manager Virtual Machine Templates can be imported into Pulumi using the `resource id`, e.g. // // ```sh // $ pulumi import azure:systemcenter/virtualMachineManagerVirtualMachineTemplate:VirtualMachineManagerVirtualMachineTemplate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.ScVmm/virtualMachineTemplates/virtualMachineTemplate1 // ``` type VirtualMachineManagerVirtualMachineTemplate struct { pulumi.CustomResourceState // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Machine Template. Changing this forces a new resource to be created. CustomLocationId pulumi.StringOutput `pulumi:"customLocationId"` // The Azure Region where the System Center Virtual Machine Manager Virtual Machine Template should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the System Center Virtual Machine Manager Virtual Machine Template. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the Resource Group where the System Center Virtual Machine Manager Virtual Machine Template should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerInventoryItemId pulumi.StringOutput `pulumi:"systemCenterVirtualMachineManagerServerInventoryItemId"` // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Virtual Machine Template. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewVirtualMachineManagerVirtualMachineTemplate registers a new resource with the given unique name, arguments, and options. func NewVirtualMachineManagerVirtualMachineTemplate(ctx *pulumi.Context, name string, args *VirtualMachineManagerVirtualMachineTemplateArgs, opts ...pulumi.ResourceOption) (*VirtualMachineManagerVirtualMachineTemplate, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.CustomLocationId == nil { return nil, errors.New("invalid value for required argument 'CustomLocationId'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } if args.SystemCenterVirtualMachineManagerServerInventoryItemId == nil { return nil, errors.New("invalid value for required argument 'SystemCenterVirtualMachineManagerServerInventoryItemId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VirtualMachineManagerVirtualMachineTemplate err := ctx.RegisterResource("azure:systemcenter/virtualMachineManagerVirtualMachineTemplate:VirtualMachineManagerVirtualMachineTemplate", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualMachineManagerVirtualMachineTemplate gets an existing VirtualMachineManagerVirtualMachineTemplate 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 GetVirtualMachineManagerVirtualMachineTemplate(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualMachineManagerVirtualMachineTemplateState, opts ...pulumi.ResourceOption) (*VirtualMachineManagerVirtualMachineTemplate, error) { var resource VirtualMachineManagerVirtualMachineTemplate err := ctx.ReadResource("azure:systemcenter/virtualMachineManagerVirtualMachineTemplate:VirtualMachineManagerVirtualMachineTemplate", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualMachineManagerVirtualMachineTemplate resources. type virtualMachineManagerVirtualMachineTemplateState struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Machine Template. Changing this forces a new resource to be created. CustomLocationId *string `pulumi:"customLocationId"` // The Azure Region where the System Center Virtual Machine Manager Virtual Machine Template should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the System Center Virtual Machine Manager Virtual Machine Template. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the System Center Virtual Machine Manager Virtual Machine Template should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerInventoryItemId *string `pulumi:"systemCenterVirtualMachineManagerServerInventoryItemId"` // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Virtual Machine Template. Tags map[string]string `pulumi:"tags"` } type VirtualMachineManagerVirtualMachineTemplateState struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Machine Template. Changing this forces a new resource to be created. CustomLocationId pulumi.StringPtrInput // The Azure Region where the System Center Virtual Machine Manager Virtual Machine Template should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the System Center Virtual Machine Manager Virtual Machine Template. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the System Center Virtual Machine Manager Virtual Machine Template should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerInventoryItemId pulumi.StringPtrInput // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Virtual Machine Template. Tags pulumi.StringMapInput } func (VirtualMachineManagerVirtualMachineTemplateState) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineManagerVirtualMachineTemplateState)(nil)).Elem() } type virtualMachineManagerVirtualMachineTemplateArgs struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Machine Template. Changing this forces a new resource to be created. CustomLocationId string `pulumi:"customLocationId"` // The Azure Region where the System Center Virtual Machine Manager Virtual Machine Template should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the System Center Virtual Machine Manager Virtual Machine Template. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the Resource Group where the System Center Virtual Machine Manager Virtual Machine Template should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerInventoryItemId string `pulumi:"systemCenterVirtualMachineManagerServerInventoryItemId"` // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Virtual Machine Template. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a VirtualMachineManagerVirtualMachineTemplate resource. type VirtualMachineManagerVirtualMachineTemplateArgs struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Machine Template. Changing this forces a new resource to be created. CustomLocationId pulumi.StringInput // The Azure Region where the System Center Virtual Machine Manager Virtual Machine Template should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the System Center Virtual Machine Manager Virtual Machine Template. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the Resource Group where the System Center Virtual Machine Manager Virtual Machine Template should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. SystemCenterVirtualMachineManagerServerInventoryItemId pulumi.StringInput // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Virtual Machine Template. Tags pulumi.StringMapInput } func (VirtualMachineManagerVirtualMachineTemplateArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineManagerVirtualMachineTemplateArgs)(nil)).Elem() } type VirtualMachineManagerVirtualMachineTemplateInput interface { pulumi.Input ToVirtualMachineManagerVirtualMachineTemplateOutput() VirtualMachineManagerVirtualMachineTemplateOutput ToVirtualMachineManagerVirtualMachineTemplateOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineTemplateOutput } func (*VirtualMachineManagerVirtualMachineTemplate) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerVirtualMachineTemplate)(nil)).Elem() } func (i *VirtualMachineManagerVirtualMachineTemplate) ToVirtualMachineManagerVirtualMachineTemplateOutput() VirtualMachineManagerVirtualMachineTemplateOutput { return i.ToVirtualMachineManagerVirtualMachineTemplateOutputWithContext(context.Background()) } func (i *VirtualMachineManagerVirtualMachineTemplate) ToVirtualMachineManagerVirtualMachineTemplateOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineTemplateOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineTemplateOutput) } // VirtualMachineManagerVirtualMachineTemplateArrayInput is an input type that accepts VirtualMachineManagerVirtualMachineTemplateArray and VirtualMachineManagerVirtualMachineTemplateArrayOutput values. // You can construct a concrete instance of `VirtualMachineManagerVirtualMachineTemplateArrayInput` via: // // VirtualMachineManagerVirtualMachineTemplateArray{ VirtualMachineManagerVirtualMachineTemplateArgs{...} } type VirtualMachineManagerVirtualMachineTemplateArrayInput interface { pulumi.Input ToVirtualMachineManagerVirtualMachineTemplateArrayOutput() VirtualMachineManagerVirtualMachineTemplateArrayOutput ToVirtualMachineManagerVirtualMachineTemplateArrayOutputWithContext(context.Context) VirtualMachineManagerVirtualMachineTemplateArrayOutput } type VirtualMachineManagerVirtualMachineTemplateArray []VirtualMachineManagerVirtualMachineTemplateInput func (VirtualMachineManagerVirtualMachineTemplateArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineManagerVirtualMachineTemplate)(nil)).Elem() } func (i VirtualMachineManagerVirtualMachineTemplateArray) ToVirtualMachineManagerVirtualMachineTemplateArrayOutput() VirtualMachineManagerVirtualMachineTemplateArrayOutput { return i.ToVirtualMachineManagerVirtualMachineTemplateArrayOutputWithContext(context.Background()) } func (i VirtualMachineManagerVirtualMachineTemplateArray) ToVirtualMachineManagerVirtualMachineTemplateArrayOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineTemplateArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineTemplateArrayOutput) } // VirtualMachineManagerVirtualMachineTemplateMapInput is an input type that accepts VirtualMachineManagerVirtualMachineTemplateMap and VirtualMachineManagerVirtualMachineTemplateMapOutput values. // You can construct a concrete instance of `VirtualMachineManagerVirtualMachineTemplateMapInput` via: // // VirtualMachineManagerVirtualMachineTemplateMap{ "key": VirtualMachineManagerVirtualMachineTemplateArgs{...} } type VirtualMachineManagerVirtualMachineTemplateMapInput interface { pulumi.Input ToVirtualMachineManagerVirtualMachineTemplateMapOutput() VirtualMachineManagerVirtualMachineTemplateMapOutput ToVirtualMachineManagerVirtualMachineTemplateMapOutputWithContext(context.Context) VirtualMachineManagerVirtualMachineTemplateMapOutput } type VirtualMachineManagerVirtualMachineTemplateMap map[string]VirtualMachineManagerVirtualMachineTemplateInput func (VirtualMachineManagerVirtualMachineTemplateMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineManagerVirtualMachineTemplate)(nil)).Elem() } func (i VirtualMachineManagerVirtualMachineTemplateMap) ToVirtualMachineManagerVirtualMachineTemplateMapOutput() VirtualMachineManagerVirtualMachineTemplateMapOutput { return i.ToVirtualMachineManagerVirtualMachineTemplateMapOutputWithContext(context.Background()) } func (i VirtualMachineManagerVirtualMachineTemplateMap) ToVirtualMachineManagerVirtualMachineTemplateMapOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineTemplateMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerVirtualMachineTemplateMapOutput) } type VirtualMachineManagerVirtualMachineTemplateOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualMachineTemplateOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerVirtualMachineTemplate)(nil)).Elem() } func (o VirtualMachineManagerVirtualMachineTemplateOutput) ToVirtualMachineManagerVirtualMachineTemplateOutput() VirtualMachineManagerVirtualMachineTemplateOutput { return o } func (o VirtualMachineManagerVirtualMachineTemplateOutput) ToVirtualMachineManagerVirtualMachineTemplateOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineTemplateOutput { return o } // The ID of the Custom Location for the System Center Virtual Machine Manager Virtual Machine Template. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineTemplateOutput) CustomLocationId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineTemplate) pulumi.StringOutput { return v.CustomLocationId }).(pulumi.StringOutput) } // The Azure Region where the System Center Virtual Machine Manager Virtual Machine Template should exist. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineTemplateOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineTemplate) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the System Center Virtual Machine Manager Virtual Machine Template. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineTemplateOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineTemplate) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the Resource Group where the System Center Virtual Machine Manager Virtual Machine Template should exist. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineTemplateOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineTemplate) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The ID of the System Center Virtual Machine Manager Server Inventory Item. Changing this forces a new resource to be created. func (o VirtualMachineManagerVirtualMachineTemplateOutput) SystemCenterVirtualMachineManagerServerInventoryItemId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineTemplate) pulumi.StringOutput { return v.SystemCenterVirtualMachineManagerServerInventoryItemId }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Virtual Machine Template. func (o VirtualMachineManagerVirtualMachineTemplateOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *VirtualMachineManagerVirtualMachineTemplate) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type VirtualMachineManagerVirtualMachineTemplateArrayOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualMachineTemplateArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineManagerVirtualMachineTemplate)(nil)).Elem() } func (o VirtualMachineManagerVirtualMachineTemplateArrayOutput) ToVirtualMachineManagerVirtualMachineTemplateArrayOutput() VirtualMachineManagerVirtualMachineTemplateArrayOutput { return o } func (o VirtualMachineManagerVirtualMachineTemplateArrayOutput) ToVirtualMachineManagerVirtualMachineTemplateArrayOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineTemplateArrayOutput { return o } func (o VirtualMachineManagerVirtualMachineTemplateArrayOutput) Index(i pulumi.IntInput) VirtualMachineManagerVirtualMachineTemplateOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualMachineManagerVirtualMachineTemplate { return vs[0].([]*VirtualMachineManagerVirtualMachineTemplate)[vs[1].(int)] }).(VirtualMachineManagerVirtualMachineTemplateOutput) } type VirtualMachineManagerVirtualMachineTemplateMapOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerVirtualMachineTemplateMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineManagerVirtualMachineTemplate)(nil)).Elem() } func (o VirtualMachineManagerVirtualMachineTemplateMapOutput) ToVirtualMachineManagerVirtualMachineTemplateMapOutput() VirtualMachineManagerVirtualMachineTemplateMapOutput { return o } func (o VirtualMachineManagerVirtualMachineTemplateMapOutput) ToVirtualMachineManagerVirtualMachineTemplateMapOutputWithContext(ctx context.Context) VirtualMachineManagerVirtualMachineTemplateMapOutput { return o } func (o VirtualMachineManagerVirtualMachineTemplateMapOutput) MapIndex(k pulumi.StringInput) VirtualMachineManagerVirtualMachineTemplateOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualMachineManagerVirtualMachineTemplate { return vs[0].(map[string]*VirtualMachineManagerVirtualMachineTemplate)[vs[1].(string)] }).(VirtualMachineManagerVirtualMachineTemplateOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerVirtualMachineTemplateInput)(nil)).Elem(), &VirtualMachineManagerVirtualMachineTemplate{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerVirtualMachineTemplateArrayInput)(nil)).Elem(), VirtualMachineManagerVirtualMachineTemplateArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerVirtualMachineTemplateMapInput)(nil)).Elem(), VirtualMachineManagerVirtualMachineTemplateMap{}) pulumi.RegisterOutputType(VirtualMachineManagerVirtualMachineTemplateOutput{}) pulumi.RegisterOutputType(VirtualMachineManagerVirtualMachineTemplateArrayOutput{}) pulumi.RegisterOutputType(VirtualMachineManagerVirtualMachineTemplateMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/systemcenter/virtualMachineManagerServer.go
sdk/go/azure/systemcenter/virtualMachineManagerServer.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package systemcenter import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a System Center Virtual Machine Manager Server. // // > **Note:** By request of the service team the provider no longer automatically registering the `Microsoft.ScVmm` Resource Provider for this resource. To register it you can run `az provider register --namespace Microsoft.ScVmm`. // // > **Note:** This resource depends on an existing `System Center Virtual Machine Manager Host Machine`, `Arc Resource Bridge` and `Custom Location`. Installing and configuring these dependencies is outside the scope of this document. See [Virtual Machine Manager documentation](https://learn.microsoft.com/en-us/system-center/vmm/?view=sc-vmm-2022) and [Install VMM](https://learn.microsoft.com/en-us/system-center/vmm/install?view=sc-vmm-2022) for more details of `System Center Virtual Machine Manager Host Machine`. See [What is Azure Arc resource bridge](https://learn.microsoft.com/en-us/azure/azure-arc/resource-bridge/overview) and [Overview of Arc-enabled System Center Virtual Machine Manager](https://learn.microsoft.com/en-us/azure/azure-arc/system-center-virtual-machine-manager/overview) for more details of `Arc Resource Bridge/Appliance`. See [Create and manage custom locations on Azure Arc-enabled Kubernetes](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/custom-locations) for more details of `Custom Location`. If you encounter issues while configuring, we'd recommend opening a ticket with Microsoft Support. // // ## 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/systemcenter" // "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 = systemcenter.NewVirtualMachineManagerServer(ctx, "example", &systemcenter.VirtualMachineManagerServerArgs{ // Name: pulumi.String("example-scvmmms"), // ResourceGroupName: example.Name, // Location: example.Location, // CustomLocationId: pulumi.String("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.ExtendedLocation/customLocations/customLocation1"), // Fqdn: pulumi.String("example.labtest"), // Username: pulumi.String("testUser"), // Password: pulumi.String("H@Sh1CoR3!"), // }) // 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.ScVmm` - 2023-10-07 // // ## Import // // System Center Virtual Machine Manager Servers can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:systemcenter/virtualMachineManagerServer:VirtualMachineManagerServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.ScVmm/vmmServers/vmmServer1 // ``` type VirtualMachineManagerServer struct { pulumi.CustomResourceState // The ID of the Custom Location for the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. CustomLocationId pulumi.StringOutput `pulumi:"customLocationId"` // The FQDN of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Fqdn pulumi.StringOutput `pulumi:"fqdn"` // The Azure Region where the System Center Virtual Machine Manager Server should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The password that is used to connect to the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Password pulumi.StringOutput `pulumi:"password"` // The port on which the System Center Virtual Machine Manager Server is listening. Possible values are between `1` and `65535`. Changing this forces a new resource to be created. Port pulumi.IntPtrOutput `pulumi:"port"` // The name of the Resource Group where the System Center Virtual Machine Manager should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Server. Tags pulumi.StringMapOutput `pulumi:"tags"` // The username that is used to connect to the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Username pulumi.StringOutput `pulumi:"username"` } // NewVirtualMachineManagerServer registers a new resource with the given unique name, arguments, and options. func NewVirtualMachineManagerServer(ctx *pulumi.Context, name string, args *VirtualMachineManagerServerArgs, opts ...pulumi.ResourceOption) (*VirtualMachineManagerServer, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.CustomLocationId == nil { return nil, errors.New("invalid value for required argument 'CustomLocationId'") } if args.Fqdn == nil { return nil, errors.New("invalid value for required argument 'Fqdn'") } 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 VirtualMachineManagerServer err := ctx.RegisterResource("azure:systemcenter/virtualMachineManagerServer:VirtualMachineManagerServer", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVirtualMachineManagerServer gets an existing VirtualMachineManagerServer 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 GetVirtualMachineManagerServer(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VirtualMachineManagerServerState, opts ...pulumi.ResourceOption) (*VirtualMachineManagerServer, error) { var resource VirtualMachineManagerServer err := ctx.ReadResource("azure:systemcenter/virtualMachineManagerServer:VirtualMachineManagerServer", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VirtualMachineManagerServer resources. type virtualMachineManagerServerState struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. CustomLocationId *string `pulumi:"customLocationId"` // The FQDN of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Fqdn *string `pulumi:"fqdn"` // The Azure Region where the System Center Virtual Machine Manager Server should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The password that is used to connect to the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Password *string `pulumi:"password"` // The port on which the System Center Virtual Machine Manager Server is listening. Possible values are between `1` and `65535`. Changing this forces a new resource to be created. Port *int `pulumi:"port"` // The name of the Resource Group where the System Center Virtual Machine Manager should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Server. Tags map[string]string `pulumi:"tags"` // The username that is used to connect to the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Username *string `pulumi:"username"` } type VirtualMachineManagerServerState struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. CustomLocationId pulumi.StringPtrInput // The FQDN of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Fqdn pulumi.StringPtrInput // The Azure Region where the System Center Virtual Machine Manager Server should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The password that is used to connect to the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Password pulumi.StringPtrInput // The port on which the System Center Virtual Machine Manager Server is listening. Possible values are between `1` and `65535`. Changing this forces a new resource to be created. Port pulumi.IntPtrInput // The name of the Resource Group where the System Center Virtual Machine Manager should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Server. Tags pulumi.StringMapInput // The username that is used to connect to the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Username pulumi.StringPtrInput } func (VirtualMachineManagerServerState) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineManagerServerState)(nil)).Elem() } type virtualMachineManagerServerArgs struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. CustomLocationId string `pulumi:"customLocationId"` // The FQDN of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Fqdn string `pulumi:"fqdn"` // The Azure Region where the System Center Virtual Machine Manager Server should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The password that is used to connect to the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Password string `pulumi:"password"` // The port on which the System Center Virtual Machine Manager Server is listening. Possible values are between `1` and `65535`. Changing this forces a new resource to be created. Port *int `pulumi:"port"` // The name of the Resource Group where the System Center Virtual Machine Manager should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Server. Tags map[string]string `pulumi:"tags"` // The username that is used to connect to the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Username string `pulumi:"username"` } // The set of arguments for constructing a VirtualMachineManagerServer resource. type VirtualMachineManagerServerArgs struct { // The ID of the Custom Location for the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. CustomLocationId pulumi.StringInput // The FQDN of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Fqdn pulumi.StringInput // The Azure Region where the System Center Virtual Machine Manager Server should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The password that is used to connect to the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Password pulumi.StringInput // The port on which the System Center Virtual Machine Manager Server is listening. Possible values are between `1` and `65535`. Changing this forces a new resource to be created. Port pulumi.IntPtrInput // The name of the Resource Group where the System Center Virtual Machine Manager should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Server. Tags pulumi.StringMapInput // The username that is used to connect to the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. Username pulumi.StringInput } func (VirtualMachineManagerServerArgs) ElementType() reflect.Type { return reflect.TypeOf((*virtualMachineManagerServerArgs)(nil)).Elem() } type VirtualMachineManagerServerInput interface { pulumi.Input ToVirtualMachineManagerServerOutput() VirtualMachineManagerServerOutput ToVirtualMachineManagerServerOutputWithContext(ctx context.Context) VirtualMachineManagerServerOutput } func (*VirtualMachineManagerServer) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerServer)(nil)).Elem() } func (i *VirtualMachineManagerServer) ToVirtualMachineManagerServerOutput() VirtualMachineManagerServerOutput { return i.ToVirtualMachineManagerServerOutputWithContext(context.Background()) } func (i *VirtualMachineManagerServer) ToVirtualMachineManagerServerOutputWithContext(ctx context.Context) VirtualMachineManagerServerOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerServerOutput) } // VirtualMachineManagerServerArrayInput is an input type that accepts VirtualMachineManagerServerArray and VirtualMachineManagerServerArrayOutput values. // You can construct a concrete instance of `VirtualMachineManagerServerArrayInput` via: // // VirtualMachineManagerServerArray{ VirtualMachineManagerServerArgs{...} } type VirtualMachineManagerServerArrayInput interface { pulumi.Input ToVirtualMachineManagerServerArrayOutput() VirtualMachineManagerServerArrayOutput ToVirtualMachineManagerServerArrayOutputWithContext(context.Context) VirtualMachineManagerServerArrayOutput } type VirtualMachineManagerServerArray []VirtualMachineManagerServerInput func (VirtualMachineManagerServerArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineManagerServer)(nil)).Elem() } func (i VirtualMachineManagerServerArray) ToVirtualMachineManagerServerArrayOutput() VirtualMachineManagerServerArrayOutput { return i.ToVirtualMachineManagerServerArrayOutputWithContext(context.Background()) } func (i VirtualMachineManagerServerArray) ToVirtualMachineManagerServerArrayOutputWithContext(ctx context.Context) VirtualMachineManagerServerArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerServerArrayOutput) } // VirtualMachineManagerServerMapInput is an input type that accepts VirtualMachineManagerServerMap and VirtualMachineManagerServerMapOutput values. // You can construct a concrete instance of `VirtualMachineManagerServerMapInput` via: // // VirtualMachineManagerServerMap{ "key": VirtualMachineManagerServerArgs{...} } type VirtualMachineManagerServerMapInput interface { pulumi.Input ToVirtualMachineManagerServerMapOutput() VirtualMachineManagerServerMapOutput ToVirtualMachineManagerServerMapOutputWithContext(context.Context) VirtualMachineManagerServerMapOutput } type VirtualMachineManagerServerMap map[string]VirtualMachineManagerServerInput func (VirtualMachineManagerServerMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineManagerServer)(nil)).Elem() } func (i VirtualMachineManagerServerMap) ToVirtualMachineManagerServerMapOutput() VirtualMachineManagerServerMapOutput { return i.ToVirtualMachineManagerServerMapOutputWithContext(context.Background()) } func (i VirtualMachineManagerServerMap) ToVirtualMachineManagerServerMapOutputWithContext(ctx context.Context) VirtualMachineManagerServerMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VirtualMachineManagerServerMapOutput) } type VirtualMachineManagerServerOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerServerOutput) ElementType() reflect.Type { return reflect.TypeOf((**VirtualMachineManagerServer)(nil)).Elem() } func (o VirtualMachineManagerServerOutput) ToVirtualMachineManagerServerOutput() VirtualMachineManagerServerOutput { return o } func (o VirtualMachineManagerServerOutput) ToVirtualMachineManagerServerOutputWithContext(ctx context.Context) VirtualMachineManagerServerOutput { return o } // The ID of the Custom Location for the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. func (o VirtualMachineManagerServerOutput) CustomLocationId() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerServer) pulumi.StringOutput { return v.CustomLocationId }).(pulumi.StringOutput) } // The FQDN of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. func (o VirtualMachineManagerServerOutput) Fqdn() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerServer) pulumi.StringOutput { return v.Fqdn }).(pulumi.StringOutput) } // The Azure Region where the System Center Virtual Machine Manager Server should exist. Changing this forces a new resource to be created. func (o VirtualMachineManagerServerOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerServer) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. func (o VirtualMachineManagerServerOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerServer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The password that is used to connect to the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. func (o VirtualMachineManagerServerOutput) Password() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerServer) pulumi.StringOutput { return v.Password }).(pulumi.StringOutput) } // The port on which the System Center Virtual Machine Manager Server is listening. Possible values are between `1` and `65535`. Changing this forces a new resource to be created. func (o VirtualMachineManagerServerOutput) Port() pulumi.IntPtrOutput { return o.ApplyT(func(v *VirtualMachineManagerServer) pulumi.IntPtrOutput { return v.Port }).(pulumi.IntPtrOutput) } // The name of the Resource Group where the System Center Virtual Machine Manager should exist. Changing this forces a new resource to be created. func (o VirtualMachineManagerServerOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerServer) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags which should be assigned to the System Center Virtual Machine Manager Server. func (o VirtualMachineManagerServerOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *VirtualMachineManagerServer) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // The username that is used to connect to the System Center Virtual Machine Manager Server. Changing this forces a new resource to be created. func (o VirtualMachineManagerServerOutput) Username() pulumi.StringOutput { return o.ApplyT(func(v *VirtualMachineManagerServer) pulumi.StringOutput { return v.Username }).(pulumi.StringOutput) } type VirtualMachineManagerServerArrayOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerServerArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VirtualMachineManagerServer)(nil)).Elem() } func (o VirtualMachineManagerServerArrayOutput) ToVirtualMachineManagerServerArrayOutput() VirtualMachineManagerServerArrayOutput { return o } func (o VirtualMachineManagerServerArrayOutput) ToVirtualMachineManagerServerArrayOutputWithContext(ctx context.Context) VirtualMachineManagerServerArrayOutput { return o } func (o VirtualMachineManagerServerArrayOutput) Index(i pulumi.IntInput) VirtualMachineManagerServerOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VirtualMachineManagerServer { return vs[0].([]*VirtualMachineManagerServer)[vs[1].(int)] }).(VirtualMachineManagerServerOutput) } type VirtualMachineManagerServerMapOutput struct{ *pulumi.OutputState } func (VirtualMachineManagerServerMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VirtualMachineManagerServer)(nil)).Elem() } func (o VirtualMachineManagerServerMapOutput) ToVirtualMachineManagerServerMapOutput() VirtualMachineManagerServerMapOutput { return o } func (o VirtualMachineManagerServerMapOutput) ToVirtualMachineManagerServerMapOutputWithContext(ctx context.Context) VirtualMachineManagerServerMapOutput { return o } func (o VirtualMachineManagerServerMapOutput) MapIndex(k pulumi.StringInput) VirtualMachineManagerServerOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VirtualMachineManagerServer { return vs[0].(map[string]*VirtualMachineManagerServer)[vs[1].(string)] }).(VirtualMachineManagerServerOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerServerInput)(nil)).Elem(), &VirtualMachineManagerServer{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerServerArrayInput)(nil)).Elem(), VirtualMachineManagerServerArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VirtualMachineManagerServerMapInput)(nil)).Elem(), VirtualMachineManagerServerMap{}) pulumi.RegisterOutputType(VirtualMachineManagerServerOutput{}) pulumi.RegisterOutputType(VirtualMachineManagerServerArrayOutput{}) pulumi.RegisterOutputType(VirtualMachineManagerServerMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/elasticsan/init.go
sdk/go/azure/elasticsan/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 elasticsan 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:elasticsan/elasticSan:ElasticSan": r = &ElasticSan{} case "azure:elasticsan/volume:Volume": r = &Volume{} case "azure:elasticsan/volumeGroup:VolumeGroup": r = &VolumeGroup{} 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", "elasticsan/elasticSan", &module{version}, ) pulumi.RegisterResourceModule( "azure", "elasticsan/volume", &module{version}, ) pulumi.RegisterResourceModule( "azure", "elasticsan/volumeGroup", &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/elasticsan/pulumiTypes.go
sdk/go/azure/elasticsan/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 elasticsan 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 ElasticSanSku struct { // The SKU name. Possible values are `Premium_LRS` and `Premium_ZRS`. Changing this forces a new resource to be created. // // > **Note:** `Premium_ZRS` SKU is only available in limited Azure regions including `France Central`, `North Europe`, `West Europe`, and `West US 2`. Please refer to this [document](https://azure.microsoft.com/updates/regional-expansion-azure-elastic-san-public-preview-is-now-available-in-more-regions) for more details. Name string `pulumi:"name"` // The SKU tier. The only possible value is `Premium`. Defaults to `Premium`. Tier *string `pulumi:"tier"` } // ElasticSanSkuInput is an input type that accepts ElasticSanSkuArgs and ElasticSanSkuOutput values. // You can construct a concrete instance of `ElasticSanSkuInput` via: // // ElasticSanSkuArgs{...} type ElasticSanSkuInput interface { pulumi.Input ToElasticSanSkuOutput() ElasticSanSkuOutput ToElasticSanSkuOutputWithContext(context.Context) ElasticSanSkuOutput } type ElasticSanSkuArgs struct { // The SKU name. Possible values are `Premium_LRS` and `Premium_ZRS`. Changing this forces a new resource to be created. // // > **Note:** `Premium_ZRS` SKU is only available in limited Azure regions including `France Central`, `North Europe`, `West Europe`, and `West US 2`. Please refer to this [document](https://azure.microsoft.com/updates/regional-expansion-azure-elastic-san-public-preview-is-now-available-in-more-regions) for more details. Name pulumi.StringInput `pulumi:"name"` // The SKU tier. The only possible value is `Premium`. Defaults to `Premium`. Tier pulumi.StringPtrInput `pulumi:"tier"` } func (ElasticSanSkuArgs) ElementType() reflect.Type { return reflect.TypeOf((*ElasticSanSku)(nil)).Elem() } func (i ElasticSanSkuArgs) ToElasticSanSkuOutput() ElasticSanSkuOutput { return i.ToElasticSanSkuOutputWithContext(context.Background()) } func (i ElasticSanSkuArgs) ToElasticSanSkuOutputWithContext(ctx context.Context) ElasticSanSkuOutput { return pulumi.ToOutputWithContext(ctx, i).(ElasticSanSkuOutput) } func (i ElasticSanSkuArgs) ToElasticSanSkuPtrOutput() ElasticSanSkuPtrOutput { return i.ToElasticSanSkuPtrOutputWithContext(context.Background()) } func (i ElasticSanSkuArgs) ToElasticSanSkuPtrOutputWithContext(ctx context.Context) ElasticSanSkuPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ElasticSanSkuOutput).ToElasticSanSkuPtrOutputWithContext(ctx) } // ElasticSanSkuPtrInput is an input type that accepts ElasticSanSkuArgs, ElasticSanSkuPtr and ElasticSanSkuPtrOutput values. // You can construct a concrete instance of `ElasticSanSkuPtrInput` via: // // ElasticSanSkuArgs{...} // // or: // // nil type ElasticSanSkuPtrInput interface { pulumi.Input ToElasticSanSkuPtrOutput() ElasticSanSkuPtrOutput ToElasticSanSkuPtrOutputWithContext(context.Context) ElasticSanSkuPtrOutput } type elasticSanSkuPtrType ElasticSanSkuArgs func ElasticSanSkuPtr(v *ElasticSanSkuArgs) ElasticSanSkuPtrInput { return (*elasticSanSkuPtrType)(v) } func (*elasticSanSkuPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ElasticSanSku)(nil)).Elem() } func (i *elasticSanSkuPtrType) ToElasticSanSkuPtrOutput() ElasticSanSkuPtrOutput { return i.ToElasticSanSkuPtrOutputWithContext(context.Background()) } func (i *elasticSanSkuPtrType) ToElasticSanSkuPtrOutputWithContext(ctx context.Context) ElasticSanSkuPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ElasticSanSkuPtrOutput) } type ElasticSanSkuOutput struct{ *pulumi.OutputState } func (ElasticSanSkuOutput) ElementType() reflect.Type { return reflect.TypeOf((*ElasticSanSku)(nil)).Elem() } func (o ElasticSanSkuOutput) ToElasticSanSkuOutput() ElasticSanSkuOutput { return o } func (o ElasticSanSkuOutput) ToElasticSanSkuOutputWithContext(ctx context.Context) ElasticSanSkuOutput { return o } func (o ElasticSanSkuOutput) ToElasticSanSkuPtrOutput() ElasticSanSkuPtrOutput { return o.ToElasticSanSkuPtrOutputWithContext(context.Background()) } func (o ElasticSanSkuOutput) ToElasticSanSkuPtrOutputWithContext(ctx context.Context) ElasticSanSkuPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ElasticSanSku) *ElasticSanSku { return &v }).(ElasticSanSkuPtrOutput) } // The SKU name. Possible values are `Premium_LRS` and `Premium_ZRS`. Changing this forces a new resource to be created. // // > **Note:** `Premium_ZRS` SKU is only available in limited Azure regions including `France Central`, `North Europe`, `West Europe`, and `West US 2`. Please refer to this [document](https://azure.microsoft.com/updates/regional-expansion-azure-elastic-san-public-preview-is-now-available-in-more-regions) for more details. func (o ElasticSanSkuOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v ElasticSanSku) string { return v.Name }).(pulumi.StringOutput) } // The SKU tier. The only possible value is `Premium`. Defaults to `Premium`. func (o ElasticSanSkuOutput) Tier() pulumi.StringPtrOutput { return o.ApplyT(func(v ElasticSanSku) *string { return v.Tier }).(pulumi.StringPtrOutput) } type ElasticSanSkuPtrOutput struct{ *pulumi.OutputState } func (ElasticSanSkuPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ElasticSanSku)(nil)).Elem() } func (o ElasticSanSkuPtrOutput) ToElasticSanSkuPtrOutput() ElasticSanSkuPtrOutput { return o } func (o ElasticSanSkuPtrOutput) ToElasticSanSkuPtrOutputWithContext(ctx context.Context) ElasticSanSkuPtrOutput { return o } func (o ElasticSanSkuPtrOutput) Elem() ElasticSanSkuOutput { return o.ApplyT(func(v *ElasticSanSku) ElasticSanSku { if v != nil { return *v } var ret ElasticSanSku return ret }).(ElasticSanSkuOutput) } // The SKU name. Possible values are `Premium_LRS` and `Premium_ZRS`. Changing this forces a new resource to be created. // // > **Note:** `Premium_ZRS` SKU is only available in limited Azure regions including `France Central`, `North Europe`, `West Europe`, and `West US 2`. Please refer to this [document](https://azure.microsoft.com/updates/regional-expansion-azure-elastic-san-public-preview-is-now-available-in-more-regions) for more details. func (o ElasticSanSkuPtrOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v *ElasticSanSku) *string { if v == nil { return nil } return &v.Name }).(pulumi.StringPtrOutput) } // The SKU tier. The only possible value is `Premium`. Defaults to `Premium`. func (o ElasticSanSkuPtrOutput) Tier() pulumi.StringPtrOutput { return o.ApplyT(func(v *ElasticSanSku) *string { if v == nil { return nil } return v.Tier }).(pulumi.StringPtrOutput) } type VolumeCreateSource struct { // Specifies the ID of the source to create the Elastic SAN Volume from. Changing this forces a new resource to be created. SourceId string `pulumi:"sourceId"` // Specifies the type of the source to create the Elastic SAN Volume from. Possible values are `Disk`, `DiskRestorePoint`, `DiskSnapshot` and `VolumeSnapshot`. Changing this forces a new resource to be created. SourceType string `pulumi:"sourceType"` } // VolumeCreateSourceInput is an input type that accepts VolumeCreateSourceArgs and VolumeCreateSourceOutput values. // You can construct a concrete instance of `VolumeCreateSourceInput` via: // // VolumeCreateSourceArgs{...} type VolumeCreateSourceInput interface { pulumi.Input ToVolumeCreateSourceOutput() VolumeCreateSourceOutput ToVolumeCreateSourceOutputWithContext(context.Context) VolumeCreateSourceOutput } type VolumeCreateSourceArgs struct { // Specifies the ID of the source to create the Elastic SAN Volume from. Changing this forces a new resource to be created. SourceId pulumi.StringInput `pulumi:"sourceId"` // Specifies the type of the source to create the Elastic SAN Volume from. Possible values are `Disk`, `DiskRestorePoint`, `DiskSnapshot` and `VolumeSnapshot`. Changing this forces a new resource to be created. SourceType pulumi.StringInput `pulumi:"sourceType"` } func (VolumeCreateSourceArgs) ElementType() reflect.Type { return reflect.TypeOf((*VolumeCreateSource)(nil)).Elem() } func (i VolumeCreateSourceArgs) ToVolumeCreateSourceOutput() VolumeCreateSourceOutput { return i.ToVolumeCreateSourceOutputWithContext(context.Background()) } func (i VolumeCreateSourceArgs) ToVolumeCreateSourceOutputWithContext(ctx context.Context) VolumeCreateSourceOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeCreateSourceOutput) } func (i VolumeCreateSourceArgs) ToVolumeCreateSourcePtrOutput() VolumeCreateSourcePtrOutput { return i.ToVolumeCreateSourcePtrOutputWithContext(context.Background()) } func (i VolumeCreateSourceArgs) ToVolumeCreateSourcePtrOutputWithContext(ctx context.Context) VolumeCreateSourcePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeCreateSourceOutput).ToVolumeCreateSourcePtrOutputWithContext(ctx) } // VolumeCreateSourcePtrInput is an input type that accepts VolumeCreateSourceArgs, VolumeCreateSourcePtr and VolumeCreateSourcePtrOutput values. // You can construct a concrete instance of `VolumeCreateSourcePtrInput` via: // // VolumeCreateSourceArgs{...} // // or: // // nil type VolumeCreateSourcePtrInput interface { pulumi.Input ToVolumeCreateSourcePtrOutput() VolumeCreateSourcePtrOutput ToVolumeCreateSourcePtrOutputWithContext(context.Context) VolumeCreateSourcePtrOutput } type volumeCreateSourcePtrType VolumeCreateSourceArgs func VolumeCreateSourcePtr(v *VolumeCreateSourceArgs) VolumeCreateSourcePtrInput { return (*volumeCreateSourcePtrType)(v) } func (*volumeCreateSourcePtrType) ElementType() reflect.Type { return reflect.TypeOf((**VolumeCreateSource)(nil)).Elem() } func (i *volumeCreateSourcePtrType) ToVolumeCreateSourcePtrOutput() VolumeCreateSourcePtrOutput { return i.ToVolumeCreateSourcePtrOutputWithContext(context.Background()) } func (i *volumeCreateSourcePtrType) ToVolumeCreateSourcePtrOutputWithContext(ctx context.Context) VolumeCreateSourcePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeCreateSourcePtrOutput) } type VolumeCreateSourceOutput struct{ *pulumi.OutputState } func (VolumeCreateSourceOutput) ElementType() reflect.Type { return reflect.TypeOf((*VolumeCreateSource)(nil)).Elem() } func (o VolumeCreateSourceOutput) ToVolumeCreateSourceOutput() VolumeCreateSourceOutput { return o } func (o VolumeCreateSourceOutput) ToVolumeCreateSourceOutputWithContext(ctx context.Context) VolumeCreateSourceOutput { return o } func (o VolumeCreateSourceOutput) ToVolumeCreateSourcePtrOutput() VolumeCreateSourcePtrOutput { return o.ToVolumeCreateSourcePtrOutputWithContext(context.Background()) } func (o VolumeCreateSourceOutput) ToVolumeCreateSourcePtrOutputWithContext(ctx context.Context) VolumeCreateSourcePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v VolumeCreateSource) *VolumeCreateSource { return &v }).(VolumeCreateSourcePtrOutput) } // Specifies the ID of the source to create the Elastic SAN Volume from. Changing this forces a new resource to be created. func (o VolumeCreateSourceOutput) SourceId() pulumi.StringOutput { return o.ApplyT(func(v VolumeCreateSource) string { return v.SourceId }).(pulumi.StringOutput) } // Specifies the type of the source to create the Elastic SAN Volume from. Possible values are `Disk`, `DiskRestorePoint`, `DiskSnapshot` and `VolumeSnapshot`. Changing this forces a new resource to be created. func (o VolumeCreateSourceOutput) SourceType() pulumi.StringOutput { return o.ApplyT(func(v VolumeCreateSource) string { return v.SourceType }).(pulumi.StringOutput) } type VolumeCreateSourcePtrOutput struct{ *pulumi.OutputState } func (VolumeCreateSourcePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**VolumeCreateSource)(nil)).Elem() } func (o VolumeCreateSourcePtrOutput) ToVolumeCreateSourcePtrOutput() VolumeCreateSourcePtrOutput { return o } func (o VolumeCreateSourcePtrOutput) ToVolumeCreateSourcePtrOutputWithContext(ctx context.Context) VolumeCreateSourcePtrOutput { return o } func (o VolumeCreateSourcePtrOutput) Elem() VolumeCreateSourceOutput { return o.ApplyT(func(v *VolumeCreateSource) VolumeCreateSource { if v != nil { return *v } var ret VolumeCreateSource return ret }).(VolumeCreateSourceOutput) } // Specifies the ID of the source to create the Elastic SAN Volume from. Changing this forces a new resource to be created. func (o VolumeCreateSourcePtrOutput) SourceId() pulumi.StringPtrOutput { return o.ApplyT(func(v *VolumeCreateSource) *string { if v == nil { return nil } return &v.SourceId }).(pulumi.StringPtrOutput) } // Specifies the type of the source to create the Elastic SAN Volume from. Possible values are `Disk`, `DiskRestorePoint`, `DiskSnapshot` and `VolumeSnapshot`. Changing this forces a new resource to be created. func (o VolumeCreateSourcePtrOutput) SourceType() pulumi.StringPtrOutput { return o.ApplyT(func(v *VolumeCreateSource) *string { if v == nil { return nil } return &v.SourceType }).(pulumi.StringPtrOutput) } type VolumeGroupEncryption struct { // The timestamp of the expiration time for the current version of the customer managed key. CurrentVersionedKeyExpirationTimestamp *string `pulumi:"currentVersionedKeyExpirationTimestamp"` // The ID of the current versioned Key Vault Key in use. CurrentVersionedKeyId *string `pulumi:"currentVersionedKeyId"` // The Key Vault key URI for Customer Managed Key encryption, which can be either a full URI or a versionless URI. KeyVaultKeyId string `pulumi:"keyVaultKeyId"` // The timestamp of the last rotation of the Key Vault Key. LastKeyRotationTimestamp *string `pulumi:"lastKeyRotationTimestamp"` // The ID of the User Assigned Identity used by this Elastic SAN Volume Group. UserAssignedIdentityId *string `pulumi:"userAssignedIdentityId"` } // VolumeGroupEncryptionInput is an input type that accepts VolumeGroupEncryptionArgs and VolumeGroupEncryptionOutput values. // You can construct a concrete instance of `VolumeGroupEncryptionInput` via: // // VolumeGroupEncryptionArgs{...} type VolumeGroupEncryptionInput interface { pulumi.Input ToVolumeGroupEncryptionOutput() VolumeGroupEncryptionOutput ToVolumeGroupEncryptionOutputWithContext(context.Context) VolumeGroupEncryptionOutput } type VolumeGroupEncryptionArgs struct { // The timestamp of the expiration time for the current version of the customer managed key. CurrentVersionedKeyExpirationTimestamp pulumi.StringPtrInput `pulumi:"currentVersionedKeyExpirationTimestamp"` // The ID of the current versioned Key Vault Key in use. CurrentVersionedKeyId pulumi.StringPtrInput `pulumi:"currentVersionedKeyId"` // The Key Vault key URI for Customer Managed Key encryption, which can be either a full URI or a versionless URI. KeyVaultKeyId pulumi.StringInput `pulumi:"keyVaultKeyId"` // The timestamp of the last rotation of the Key Vault Key. LastKeyRotationTimestamp pulumi.StringPtrInput `pulumi:"lastKeyRotationTimestamp"` // The ID of the User Assigned Identity used by this Elastic SAN Volume Group. UserAssignedIdentityId pulumi.StringPtrInput `pulumi:"userAssignedIdentityId"` } func (VolumeGroupEncryptionArgs) ElementType() reflect.Type { return reflect.TypeOf((*VolumeGroupEncryption)(nil)).Elem() } func (i VolumeGroupEncryptionArgs) ToVolumeGroupEncryptionOutput() VolumeGroupEncryptionOutput { return i.ToVolumeGroupEncryptionOutputWithContext(context.Background()) } func (i VolumeGroupEncryptionArgs) ToVolumeGroupEncryptionOutputWithContext(ctx context.Context) VolumeGroupEncryptionOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeGroupEncryptionOutput) } func (i VolumeGroupEncryptionArgs) ToVolumeGroupEncryptionPtrOutput() VolumeGroupEncryptionPtrOutput { return i.ToVolumeGroupEncryptionPtrOutputWithContext(context.Background()) } func (i VolumeGroupEncryptionArgs) ToVolumeGroupEncryptionPtrOutputWithContext(ctx context.Context) VolumeGroupEncryptionPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeGroupEncryptionOutput).ToVolumeGroupEncryptionPtrOutputWithContext(ctx) } // VolumeGroupEncryptionPtrInput is an input type that accepts VolumeGroupEncryptionArgs, VolumeGroupEncryptionPtr and VolumeGroupEncryptionPtrOutput values. // You can construct a concrete instance of `VolumeGroupEncryptionPtrInput` via: // // VolumeGroupEncryptionArgs{...} // // or: // // nil type VolumeGroupEncryptionPtrInput interface { pulumi.Input ToVolumeGroupEncryptionPtrOutput() VolumeGroupEncryptionPtrOutput ToVolumeGroupEncryptionPtrOutputWithContext(context.Context) VolumeGroupEncryptionPtrOutput } type volumeGroupEncryptionPtrType VolumeGroupEncryptionArgs func VolumeGroupEncryptionPtr(v *VolumeGroupEncryptionArgs) VolumeGroupEncryptionPtrInput { return (*volumeGroupEncryptionPtrType)(v) } func (*volumeGroupEncryptionPtrType) ElementType() reflect.Type { return reflect.TypeOf((**VolumeGroupEncryption)(nil)).Elem() } func (i *volumeGroupEncryptionPtrType) ToVolumeGroupEncryptionPtrOutput() VolumeGroupEncryptionPtrOutput { return i.ToVolumeGroupEncryptionPtrOutputWithContext(context.Background()) } func (i *volumeGroupEncryptionPtrType) ToVolumeGroupEncryptionPtrOutputWithContext(ctx context.Context) VolumeGroupEncryptionPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeGroupEncryptionPtrOutput) } type VolumeGroupEncryptionOutput struct{ *pulumi.OutputState } func (VolumeGroupEncryptionOutput) ElementType() reflect.Type { return reflect.TypeOf((*VolumeGroupEncryption)(nil)).Elem() } func (o VolumeGroupEncryptionOutput) ToVolumeGroupEncryptionOutput() VolumeGroupEncryptionOutput { return o } func (o VolumeGroupEncryptionOutput) ToVolumeGroupEncryptionOutputWithContext(ctx context.Context) VolumeGroupEncryptionOutput { return o } func (o VolumeGroupEncryptionOutput) ToVolumeGroupEncryptionPtrOutput() VolumeGroupEncryptionPtrOutput { return o.ToVolumeGroupEncryptionPtrOutputWithContext(context.Background()) } func (o VolumeGroupEncryptionOutput) ToVolumeGroupEncryptionPtrOutputWithContext(ctx context.Context) VolumeGroupEncryptionPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v VolumeGroupEncryption) *VolumeGroupEncryption { return &v }).(VolumeGroupEncryptionPtrOutput) } // The timestamp of the expiration time for the current version of the customer managed key. func (o VolumeGroupEncryptionOutput) CurrentVersionedKeyExpirationTimestamp() pulumi.StringPtrOutput { return o.ApplyT(func(v VolumeGroupEncryption) *string { return v.CurrentVersionedKeyExpirationTimestamp }).(pulumi.StringPtrOutput) } // The ID of the current versioned Key Vault Key in use. func (o VolumeGroupEncryptionOutput) CurrentVersionedKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v VolumeGroupEncryption) *string { return v.CurrentVersionedKeyId }).(pulumi.StringPtrOutput) } // The Key Vault key URI for Customer Managed Key encryption, which can be either a full URI or a versionless URI. func (o VolumeGroupEncryptionOutput) KeyVaultKeyId() pulumi.StringOutput { return o.ApplyT(func(v VolumeGroupEncryption) string { return v.KeyVaultKeyId }).(pulumi.StringOutput) } // The timestamp of the last rotation of the Key Vault Key. func (o VolumeGroupEncryptionOutput) LastKeyRotationTimestamp() pulumi.StringPtrOutput { return o.ApplyT(func(v VolumeGroupEncryption) *string { return v.LastKeyRotationTimestamp }).(pulumi.StringPtrOutput) } // The ID of the User Assigned Identity used by this Elastic SAN Volume Group. func (o VolumeGroupEncryptionOutput) UserAssignedIdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v VolumeGroupEncryption) *string { return v.UserAssignedIdentityId }).(pulumi.StringPtrOutput) } type VolumeGroupEncryptionPtrOutput struct{ *pulumi.OutputState } func (VolumeGroupEncryptionPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**VolumeGroupEncryption)(nil)).Elem() } func (o VolumeGroupEncryptionPtrOutput) ToVolumeGroupEncryptionPtrOutput() VolumeGroupEncryptionPtrOutput { return o } func (o VolumeGroupEncryptionPtrOutput) ToVolumeGroupEncryptionPtrOutputWithContext(ctx context.Context) VolumeGroupEncryptionPtrOutput { return o } func (o VolumeGroupEncryptionPtrOutput) Elem() VolumeGroupEncryptionOutput { return o.ApplyT(func(v *VolumeGroupEncryption) VolumeGroupEncryption { if v != nil { return *v } var ret VolumeGroupEncryption return ret }).(VolumeGroupEncryptionOutput) } // The timestamp of the expiration time for the current version of the customer managed key. func (o VolumeGroupEncryptionPtrOutput) CurrentVersionedKeyExpirationTimestamp() pulumi.StringPtrOutput { return o.ApplyT(func(v *VolumeGroupEncryption) *string { if v == nil { return nil } return v.CurrentVersionedKeyExpirationTimestamp }).(pulumi.StringPtrOutput) } // The ID of the current versioned Key Vault Key in use. func (o VolumeGroupEncryptionPtrOutput) CurrentVersionedKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *VolumeGroupEncryption) *string { if v == nil { return nil } return v.CurrentVersionedKeyId }).(pulumi.StringPtrOutput) } // The Key Vault key URI for Customer Managed Key encryption, which can be either a full URI or a versionless URI. func (o VolumeGroupEncryptionPtrOutput) KeyVaultKeyId() pulumi.StringPtrOutput { return o.ApplyT(func(v *VolumeGroupEncryption) *string { if v == nil { return nil } return &v.KeyVaultKeyId }).(pulumi.StringPtrOutput) } // The timestamp of the last rotation of the Key Vault Key. func (o VolumeGroupEncryptionPtrOutput) LastKeyRotationTimestamp() pulumi.StringPtrOutput { return o.ApplyT(func(v *VolumeGroupEncryption) *string { if v == nil { return nil } return v.LastKeyRotationTimestamp }).(pulumi.StringPtrOutput) } // The ID of the User Assigned Identity used by this Elastic SAN Volume Group. func (o VolumeGroupEncryptionPtrOutput) UserAssignedIdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v *VolumeGroupEncryption) *string { if v == nil { return nil } return v.UserAssignedIdentityId }).(pulumi.StringPtrOutput) } type VolumeGroupIdentity struct { // A list of the User Assigned Identity IDs that should be assigned to this Elastic SAN Volume Group. IdentityIds []string `pulumi:"identityIds"` // The Principal ID associated with the Managed Service Identity assigned to this Elastic SAN Volume Group. PrincipalId *string `pulumi:"principalId"` // The Tenant ID associated with this Managed Service Identity assigned to this Elastic SAN Volume Group. TenantId *string `pulumi:"tenantId"` // Specifies the type of Managed Identity that should be assigned to this Elastic SAN Volume Group. Possible values are `SystemAssigned` and `UserAssigned`. Type string `pulumi:"type"` } // VolumeGroupIdentityInput is an input type that accepts VolumeGroupIdentityArgs and VolumeGroupIdentityOutput values. // You can construct a concrete instance of `VolumeGroupIdentityInput` via: // // VolumeGroupIdentityArgs{...} type VolumeGroupIdentityInput interface { pulumi.Input ToVolumeGroupIdentityOutput() VolumeGroupIdentityOutput ToVolumeGroupIdentityOutputWithContext(context.Context) VolumeGroupIdentityOutput } type VolumeGroupIdentityArgs struct { // A list of the User Assigned Identity IDs that should be assigned to this Elastic SAN Volume Group. IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"` // The Principal ID associated with the Managed Service Identity assigned to this Elastic SAN Volume Group. PrincipalId pulumi.StringPtrInput `pulumi:"principalId"` // The Tenant ID associated with this Managed Service Identity assigned to this Elastic SAN Volume Group. TenantId pulumi.StringPtrInput `pulumi:"tenantId"` // Specifies the type of Managed Identity that should be assigned to this Elastic SAN Volume Group. Possible values are `SystemAssigned` and `UserAssigned`. Type pulumi.StringInput `pulumi:"type"` } func (VolumeGroupIdentityArgs) ElementType() reflect.Type { return reflect.TypeOf((*VolumeGroupIdentity)(nil)).Elem() } func (i VolumeGroupIdentityArgs) ToVolumeGroupIdentityOutput() VolumeGroupIdentityOutput { return i.ToVolumeGroupIdentityOutputWithContext(context.Background()) } func (i VolumeGroupIdentityArgs) ToVolumeGroupIdentityOutputWithContext(ctx context.Context) VolumeGroupIdentityOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeGroupIdentityOutput) } func (i VolumeGroupIdentityArgs) ToVolumeGroupIdentityPtrOutput() VolumeGroupIdentityPtrOutput { return i.ToVolumeGroupIdentityPtrOutputWithContext(context.Background()) } func (i VolumeGroupIdentityArgs) ToVolumeGroupIdentityPtrOutputWithContext(ctx context.Context) VolumeGroupIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeGroupIdentityOutput).ToVolumeGroupIdentityPtrOutputWithContext(ctx) } // VolumeGroupIdentityPtrInput is an input type that accepts VolumeGroupIdentityArgs, VolumeGroupIdentityPtr and VolumeGroupIdentityPtrOutput values. // You can construct a concrete instance of `VolumeGroupIdentityPtrInput` via: // // VolumeGroupIdentityArgs{...} // // or: // // nil type VolumeGroupIdentityPtrInput interface { pulumi.Input ToVolumeGroupIdentityPtrOutput() VolumeGroupIdentityPtrOutput ToVolumeGroupIdentityPtrOutputWithContext(context.Context) VolumeGroupIdentityPtrOutput } type volumeGroupIdentityPtrType VolumeGroupIdentityArgs func VolumeGroupIdentityPtr(v *VolumeGroupIdentityArgs) VolumeGroupIdentityPtrInput { return (*volumeGroupIdentityPtrType)(v) } func (*volumeGroupIdentityPtrType) ElementType() reflect.Type { return reflect.TypeOf((**VolumeGroupIdentity)(nil)).Elem() } func (i *volumeGroupIdentityPtrType) ToVolumeGroupIdentityPtrOutput() VolumeGroupIdentityPtrOutput { return i.ToVolumeGroupIdentityPtrOutputWithContext(context.Background()) } func (i *volumeGroupIdentityPtrType) ToVolumeGroupIdentityPtrOutputWithContext(ctx context.Context) VolumeGroupIdentityPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeGroupIdentityPtrOutput) } type VolumeGroupIdentityOutput struct{ *pulumi.OutputState } func (VolumeGroupIdentityOutput) ElementType() reflect.Type { return reflect.TypeOf((*VolumeGroupIdentity)(nil)).Elem() } func (o VolumeGroupIdentityOutput) ToVolumeGroupIdentityOutput() VolumeGroupIdentityOutput { return o } func (o VolumeGroupIdentityOutput) ToVolumeGroupIdentityOutputWithContext(ctx context.Context) VolumeGroupIdentityOutput { return o } func (o VolumeGroupIdentityOutput) ToVolumeGroupIdentityPtrOutput() VolumeGroupIdentityPtrOutput { return o.ToVolumeGroupIdentityPtrOutputWithContext(context.Background()) } func (o VolumeGroupIdentityOutput) ToVolumeGroupIdentityPtrOutputWithContext(ctx context.Context) VolumeGroupIdentityPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v VolumeGroupIdentity) *VolumeGroupIdentity { return &v }).(VolumeGroupIdentityPtrOutput) } // A list of the User Assigned Identity IDs that should be assigned to this Elastic SAN Volume Group. func (o VolumeGroupIdentityOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v VolumeGroupIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with the Managed Service Identity assigned to this Elastic SAN Volume Group. func (o VolumeGroupIdentityOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v VolumeGroupIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity assigned to this Elastic SAN Volume Group. func (o VolumeGroupIdentityOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v VolumeGroupIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Identity that should be assigned to this Elastic SAN Volume Group. Possible values are `SystemAssigned` and `UserAssigned`. func (o VolumeGroupIdentityOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v VolumeGroupIdentity) string { return v.Type }).(pulumi.StringOutput) } type VolumeGroupIdentityPtrOutput struct{ *pulumi.OutputState } func (VolumeGroupIdentityPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**VolumeGroupIdentity)(nil)).Elem() } func (o VolumeGroupIdentityPtrOutput) ToVolumeGroupIdentityPtrOutput() VolumeGroupIdentityPtrOutput { return o } func (o VolumeGroupIdentityPtrOutput) ToVolumeGroupIdentityPtrOutputWithContext(ctx context.Context) VolumeGroupIdentityPtrOutput { return o } func (o VolumeGroupIdentityPtrOutput) Elem() VolumeGroupIdentityOutput { return o.ApplyT(func(v *VolumeGroupIdentity) VolumeGroupIdentity { if v != nil { return *v } var ret VolumeGroupIdentity return ret }).(VolumeGroupIdentityOutput) } // A list of the User Assigned Identity IDs that should be assigned to this Elastic SAN Volume Group. func (o VolumeGroupIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput { return o.ApplyT(func(v *VolumeGroupIdentity) []string { if v == nil { return nil } return v.IdentityIds }).(pulumi.StringArrayOutput) } // The Principal ID associated with the Managed Service Identity assigned to this Elastic SAN Volume Group. func (o VolumeGroupIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput { return o.ApplyT(func(v *VolumeGroupIdentity) *string { if v == nil { return nil } return v.PrincipalId }).(pulumi.StringPtrOutput) } // The Tenant ID associated with this Managed Service Identity assigned to this Elastic SAN Volume Group. func (o VolumeGroupIdentityPtrOutput) TenantId() pulumi.StringPtrOutput { return o.ApplyT(func(v *VolumeGroupIdentity) *string { if v == nil { return nil } return v.TenantId }).(pulumi.StringPtrOutput) } // Specifies the type of Managed Identity that should be assigned to this Elastic SAN Volume Group. Possible values are `SystemAssigned` and `UserAssigned`. func (o VolumeGroupIdentityPtrOutput) Type() pulumi.StringPtrOutput { return o.ApplyT(func(v *VolumeGroupIdentity) *string { if v == nil { return nil } return &v.Type }).(pulumi.StringPtrOutput) } type VolumeGroupNetworkRule struct { // The action to take when the Subnet attempts to access this Elastic SAN Volume Group. The only possible value is `Allow`. Defaults to `Allow`. Action *string `pulumi:"action"` // The ID of the Subnet which should be allowed to access this Elastic SAN Volume Group. SubnetId string `pulumi:"subnetId"` } // VolumeGroupNetworkRuleInput is an input type that accepts VolumeGroupNetworkRuleArgs and VolumeGroupNetworkRuleOutput values. // You can construct a concrete instance of `VolumeGroupNetworkRuleInput` via: // // VolumeGroupNetworkRuleArgs{...} type VolumeGroupNetworkRuleInput interface { pulumi.Input ToVolumeGroupNetworkRuleOutput() VolumeGroupNetworkRuleOutput ToVolumeGroupNetworkRuleOutputWithContext(context.Context) VolumeGroupNetworkRuleOutput } type VolumeGroupNetworkRuleArgs struct { // The action to take when the Subnet attempts to access this Elastic SAN Volume Group. The only possible value is `Allow`. Defaults to `Allow`. Action pulumi.StringPtrInput `pulumi:"action"` // The ID of the Subnet which should be allowed to access this Elastic SAN Volume Group. SubnetId pulumi.StringInput `pulumi:"subnetId"` } func (VolumeGroupNetworkRuleArgs) ElementType() reflect.Type { return reflect.TypeOf((*VolumeGroupNetworkRule)(nil)).Elem() } func (i VolumeGroupNetworkRuleArgs) ToVolumeGroupNetworkRuleOutput() VolumeGroupNetworkRuleOutput { return i.ToVolumeGroupNetworkRuleOutputWithContext(context.Background()) } func (i VolumeGroupNetworkRuleArgs) ToVolumeGroupNetworkRuleOutputWithContext(ctx context.Context) VolumeGroupNetworkRuleOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeGroupNetworkRuleOutput) } // VolumeGroupNetworkRuleArrayInput is an input type that accepts VolumeGroupNetworkRuleArray and VolumeGroupNetworkRuleArrayOutput values. // You can construct a concrete instance of `VolumeGroupNetworkRuleArrayInput` via: // // VolumeGroupNetworkRuleArray{ VolumeGroupNetworkRuleArgs{...} } type VolumeGroupNetworkRuleArrayInput interface { pulumi.Input ToVolumeGroupNetworkRuleArrayOutput() VolumeGroupNetworkRuleArrayOutput ToVolumeGroupNetworkRuleArrayOutputWithContext(context.Context) VolumeGroupNetworkRuleArrayOutput }
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/elasticsan/volume.go
sdk/go/azure/elasticsan/volume.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package elasticsan import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Elastic SAN Volume resource. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/elasticsan" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleElasticSan, err := elasticsan.NewElasticSan(ctx, "example", &elasticsan.ElasticSanArgs{ // Name: pulumi.String("example-es"), // ResourceGroupName: example.Name, // Location: example.Location, // BaseSizeInTib: pulumi.Int(1), // Sku: &elasticsan.ElasticSanSkuArgs{ // Name: pulumi.String("Premium_LRS"), // }, // }) // if err != nil { // return err // } // exampleVolumeGroup, err := elasticsan.NewVolumeGroup(ctx, "example", &elasticsan.VolumeGroupArgs{ // Name: pulumi.String("example-esvg"), // ElasticSanId: exampleElasticSan.ID(), // }) // if err != nil { // return err // } // exampleVolume, err := elasticsan.NewVolume(ctx, "example", &elasticsan.VolumeArgs{ // Name: pulumi.String("example-esv"), // VolumeGroupId: exampleVolumeGroup.ID(), // SizeInGib: pulumi.Int(1), // }) // if err != nil { // return err // } // ctx.Export("targetIqn", exampleVolume.TargetIqn) // return nil // }) // } // // ``` // // ## Example of creating an Elastic SAN Volume from a Disk Snapshot // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/elasticsan" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleElasticSan, err := elasticsan.NewElasticSan(ctx, "example", &elasticsan.ElasticSanArgs{ // Name: pulumi.String("example-es"), // ResourceGroupName: example.Name, // Location: example.Location, // BaseSizeInTib: pulumi.Int(1), // Sku: &elasticsan.ElasticSanSkuArgs{ // Name: pulumi.String("Premium_LRS"), // }, // }) // if err != nil { // return err // } // exampleVolumeGroup, err := elasticsan.NewVolumeGroup(ctx, "example", &elasticsan.VolumeGroupArgs{ // Name: pulumi.String("example-esvg"), // ElasticSanId: exampleElasticSan.ID(), // }) // if err != nil { // return err // } // exampleManagedDisk, err := compute.NewManagedDisk(ctx, "example", &compute.ManagedDiskArgs{ // Name: pulumi.String("example-disk"), // Location: example.Location, // ResourceGroupName: example.Name, // CreateOption: pulumi.String("Empty"), // StorageAccountType: pulumi.String("Standard_LRS"), // DiskSizeGb: pulumi.Int(2), // }) // if err != nil { // return err // } // exampleSnapshot, err := compute.NewSnapshot(ctx, "example", &compute.SnapshotArgs{ // Name: pulumi.String("example-ss"), // Location: example.Location, // ResourceGroupName: example.Name, // CreateOption: pulumi.String("Copy"), // SourceUri: exampleManagedDisk.ID(), // }) // if err != nil { // return err // } // _, err = elasticsan.NewVolume(ctx, "example2", &elasticsan.VolumeArgs{ // Name: pulumi.String("example-esv2"), // VolumeGroupId: exampleVolumeGroup.ID(), // SizeInGib: pulumi.Int(2), // CreateSource: &elasticsan.VolumeCreateSourceArgs{ // SourceType: pulumi.String("DiskSnapshot"), // SourceId: exampleSnapshot.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.ElasticSan` - 2023-01-01 // // ## Import // // An existing Elastic SAN Volume can be imported into Pulumi using the `resource id`, e.g. // // ```sh // $ pulumi import azure:elasticsan/volume:Volume example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ElasticSan/elasticSans/esan1/volumeGroups/vg1/volumes/vol1 // ``` type Volume struct { pulumi.CustomResourceState // A `createSource` block as defined below. Changing this forces a new resource to be created. CreateSource VolumeCreateSourcePtrOutput `pulumi:"createSource"` // Specifies the name of this Elastic SAN Volume. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the size of the Elastic SAN Volume in GiB. The size should be within the remaining capacity of the parent Elastic SAN. Possible values are between `1` and `65536` (16 TiB). // // > **Note:** The size can only be increased. If `createSource` is specified, then the size must be equal to or greater than the source's size. SizeInGib pulumi.IntOutput `pulumi:"sizeInGib"` // The iSCSI Target IQN of the Elastic SAN Volume. TargetIqn pulumi.StringOutput `pulumi:"targetIqn"` // The iSCSI Target Portal Host Name of the Elastic SAN Volume. TargetPortalHostname pulumi.StringOutput `pulumi:"targetPortalHostname"` // The iSCSI Target Portal Port of the Elastic SAN Volume. TargetPortalPort pulumi.IntOutput `pulumi:"targetPortalPort"` // Specifies the Volume Group ID within which this Elastic SAN Volume should exist. Changing this forces a new resource to be created. VolumeGroupId pulumi.StringOutput `pulumi:"volumeGroupId"` // The UUID of the Elastic SAN Volume. VolumeId pulumi.StringOutput `pulumi:"volumeId"` } // NewVolume registers a new resource with the given unique name, arguments, and options. func NewVolume(ctx *pulumi.Context, name string, args *VolumeArgs, opts ...pulumi.ResourceOption) (*Volume, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.SizeInGib == nil { return nil, errors.New("invalid value for required argument 'SizeInGib'") } if args.VolumeGroupId == nil { return nil, errors.New("invalid value for required argument 'VolumeGroupId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Volume err := ctx.RegisterResource("azure:elasticsan/volume:Volume", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVolume gets an existing Volume 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 GetVolume(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VolumeState, opts ...pulumi.ResourceOption) (*Volume, error) { var resource Volume err := ctx.ReadResource("azure:elasticsan/volume:Volume", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Volume resources. type volumeState struct { // A `createSource` block as defined below. Changing this forces a new resource to be created. CreateSource *VolumeCreateSource `pulumi:"createSource"` // Specifies the name of this Elastic SAN Volume. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the size of the Elastic SAN Volume in GiB. The size should be within the remaining capacity of the parent Elastic SAN. Possible values are between `1` and `65536` (16 TiB). // // > **Note:** The size can only be increased. If `createSource` is specified, then the size must be equal to or greater than the source's size. SizeInGib *int `pulumi:"sizeInGib"` // The iSCSI Target IQN of the Elastic SAN Volume. TargetIqn *string `pulumi:"targetIqn"` // The iSCSI Target Portal Host Name of the Elastic SAN Volume. TargetPortalHostname *string `pulumi:"targetPortalHostname"` // The iSCSI Target Portal Port of the Elastic SAN Volume. TargetPortalPort *int `pulumi:"targetPortalPort"` // Specifies the Volume Group ID within which this Elastic SAN Volume should exist. Changing this forces a new resource to be created. VolumeGroupId *string `pulumi:"volumeGroupId"` // The UUID of the Elastic SAN Volume. VolumeId *string `pulumi:"volumeId"` } type VolumeState struct { // A `createSource` block as defined below. Changing this forces a new resource to be created. CreateSource VolumeCreateSourcePtrInput // Specifies the name of this Elastic SAN Volume. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the size of the Elastic SAN Volume in GiB. The size should be within the remaining capacity of the parent Elastic SAN. Possible values are between `1` and `65536` (16 TiB). // // > **Note:** The size can only be increased. If `createSource` is specified, then the size must be equal to or greater than the source's size. SizeInGib pulumi.IntPtrInput // The iSCSI Target IQN of the Elastic SAN Volume. TargetIqn pulumi.StringPtrInput // The iSCSI Target Portal Host Name of the Elastic SAN Volume. TargetPortalHostname pulumi.StringPtrInput // The iSCSI Target Portal Port of the Elastic SAN Volume. TargetPortalPort pulumi.IntPtrInput // Specifies the Volume Group ID within which this Elastic SAN Volume should exist. Changing this forces a new resource to be created. VolumeGroupId pulumi.StringPtrInput // The UUID of the Elastic SAN Volume. VolumeId pulumi.StringPtrInput } func (VolumeState) ElementType() reflect.Type { return reflect.TypeOf((*volumeState)(nil)).Elem() } type volumeArgs struct { // A `createSource` block as defined below. Changing this forces a new resource to be created. CreateSource *VolumeCreateSource `pulumi:"createSource"` // Specifies the name of this Elastic SAN Volume. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the size of the Elastic SAN Volume in GiB. The size should be within the remaining capacity of the parent Elastic SAN. Possible values are between `1` and `65536` (16 TiB). // // > **Note:** The size can only be increased. If `createSource` is specified, then the size must be equal to or greater than the source's size. SizeInGib int `pulumi:"sizeInGib"` // Specifies the Volume Group ID within which this Elastic SAN Volume should exist. Changing this forces a new resource to be created. VolumeGroupId string `pulumi:"volumeGroupId"` } // The set of arguments for constructing a Volume resource. type VolumeArgs struct { // A `createSource` block as defined below. Changing this forces a new resource to be created. CreateSource VolumeCreateSourcePtrInput // Specifies the name of this Elastic SAN Volume. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the size of the Elastic SAN Volume in GiB. The size should be within the remaining capacity of the parent Elastic SAN. Possible values are between `1` and `65536` (16 TiB). // // > **Note:** The size can only be increased. If `createSource` is specified, then the size must be equal to or greater than the source's size. SizeInGib pulumi.IntInput // Specifies the Volume Group ID within which this Elastic SAN Volume should exist. Changing this forces a new resource to be created. VolumeGroupId pulumi.StringInput } func (VolumeArgs) ElementType() reflect.Type { return reflect.TypeOf((*volumeArgs)(nil)).Elem() } type VolumeInput interface { pulumi.Input ToVolumeOutput() VolumeOutput ToVolumeOutputWithContext(ctx context.Context) VolumeOutput } func (*Volume) ElementType() reflect.Type { return reflect.TypeOf((**Volume)(nil)).Elem() } func (i *Volume) ToVolumeOutput() VolumeOutput { return i.ToVolumeOutputWithContext(context.Background()) } func (i *Volume) ToVolumeOutputWithContext(ctx context.Context) VolumeOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeOutput) } // VolumeArrayInput is an input type that accepts VolumeArray and VolumeArrayOutput values. // You can construct a concrete instance of `VolumeArrayInput` via: // // VolumeArray{ VolumeArgs{...} } type VolumeArrayInput interface { pulumi.Input ToVolumeArrayOutput() VolumeArrayOutput ToVolumeArrayOutputWithContext(context.Context) VolumeArrayOutput } type VolumeArray []VolumeInput func (VolumeArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Volume)(nil)).Elem() } func (i VolumeArray) ToVolumeArrayOutput() VolumeArrayOutput { return i.ToVolumeArrayOutputWithContext(context.Background()) } func (i VolumeArray) ToVolumeArrayOutputWithContext(ctx context.Context) VolumeArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeArrayOutput) } // VolumeMapInput is an input type that accepts VolumeMap and VolumeMapOutput values. // You can construct a concrete instance of `VolumeMapInput` via: // // VolumeMap{ "key": VolumeArgs{...} } type VolumeMapInput interface { pulumi.Input ToVolumeMapOutput() VolumeMapOutput ToVolumeMapOutputWithContext(context.Context) VolumeMapOutput } type VolumeMap map[string]VolumeInput func (VolumeMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Volume)(nil)).Elem() } func (i VolumeMap) ToVolumeMapOutput() VolumeMapOutput { return i.ToVolumeMapOutputWithContext(context.Background()) } func (i VolumeMap) ToVolumeMapOutputWithContext(ctx context.Context) VolumeMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeMapOutput) } type VolumeOutput struct{ *pulumi.OutputState } func (VolumeOutput) ElementType() reflect.Type { return reflect.TypeOf((**Volume)(nil)).Elem() } func (o VolumeOutput) ToVolumeOutput() VolumeOutput { return o } func (o VolumeOutput) ToVolumeOutputWithContext(ctx context.Context) VolumeOutput { return o } // A `createSource` block as defined below. Changing this forces a new resource to be created. func (o VolumeOutput) CreateSource() VolumeCreateSourcePtrOutput { return o.ApplyT(func(v *Volume) VolumeCreateSourcePtrOutput { return v.CreateSource }).(VolumeCreateSourcePtrOutput) } // Specifies the name of this Elastic SAN Volume. Changing this forces a new resource to be created. func (o VolumeOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Volume) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the size of the Elastic SAN Volume in GiB. The size should be within the remaining capacity of the parent Elastic SAN. Possible values are between `1` and `65536` (16 TiB). // // > **Note:** The size can only be increased. If `createSource` is specified, then the size must be equal to or greater than the source's size. func (o VolumeOutput) SizeInGib() pulumi.IntOutput { return o.ApplyT(func(v *Volume) pulumi.IntOutput { return v.SizeInGib }).(pulumi.IntOutput) } // The iSCSI Target IQN of the Elastic SAN Volume. func (o VolumeOutput) TargetIqn() pulumi.StringOutput { return o.ApplyT(func(v *Volume) pulumi.StringOutput { return v.TargetIqn }).(pulumi.StringOutput) } // The iSCSI Target Portal Host Name of the Elastic SAN Volume. func (o VolumeOutput) TargetPortalHostname() pulumi.StringOutput { return o.ApplyT(func(v *Volume) pulumi.StringOutput { return v.TargetPortalHostname }).(pulumi.StringOutput) } // The iSCSI Target Portal Port of the Elastic SAN Volume. func (o VolumeOutput) TargetPortalPort() pulumi.IntOutput { return o.ApplyT(func(v *Volume) pulumi.IntOutput { return v.TargetPortalPort }).(pulumi.IntOutput) } // Specifies the Volume Group ID within which this Elastic SAN Volume should exist. Changing this forces a new resource to be created. func (o VolumeOutput) VolumeGroupId() pulumi.StringOutput { return o.ApplyT(func(v *Volume) pulumi.StringOutput { return v.VolumeGroupId }).(pulumi.StringOutput) } // The UUID of the Elastic SAN Volume. func (o VolumeOutput) VolumeId() pulumi.StringOutput { return o.ApplyT(func(v *Volume) pulumi.StringOutput { return v.VolumeId }).(pulumi.StringOutput) } type VolumeArrayOutput struct{ *pulumi.OutputState } func (VolumeArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Volume)(nil)).Elem() } func (o VolumeArrayOutput) ToVolumeArrayOutput() VolumeArrayOutput { return o } func (o VolumeArrayOutput) ToVolumeArrayOutputWithContext(ctx context.Context) VolumeArrayOutput { return o } func (o VolumeArrayOutput) Index(i pulumi.IntInput) VolumeOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Volume { return vs[0].([]*Volume)[vs[1].(int)] }).(VolumeOutput) } type VolumeMapOutput struct{ *pulumi.OutputState } func (VolumeMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Volume)(nil)).Elem() } func (o VolumeMapOutput) ToVolumeMapOutput() VolumeMapOutput { return o } func (o VolumeMapOutput) ToVolumeMapOutputWithContext(ctx context.Context) VolumeMapOutput { return o } func (o VolumeMapOutput) MapIndex(k pulumi.StringInput) VolumeOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Volume { return vs[0].(map[string]*Volume)[vs[1].(string)] }).(VolumeOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VolumeInput)(nil)).Elem(), &Volume{}) pulumi.RegisterInputType(reflect.TypeOf((*VolumeArrayInput)(nil)).Elem(), VolumeArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VolumeMapInput)(nil)).Elem(), VolumeMap{}) pulumi.RegisterOutputType(VolumeOutput{}) pulumi.RegisterOutputType(VolumeArrayOutput{}) pulumi.RegisterOutputType(VolumeMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/elasticsan/volumeGroup.go
sdk/go/azure/elasticsan/volumeGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package elasticsan import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Elastic SAN Volume Group resource. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/elasticsan" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{ // Name: pulumi.String("example-rg"), // Location: pulumi.String("West Europe"), // }) // if err != nil { // return err // } // exampleElasticSan, err := elasticsan.NewElasticSan(ctx, "example", &elasticsan.ElasticSanArgs{ // Name: pulumi.String("examplees-es"), // ResourceGroupName: example.Name, // Location: example.Location, // BaseSizeInTib: pulumi.Int(1), // Sku: &elasticsan.ElasticSanSkuArgs{ // Name: pulumi.String("Premium_LRS"), // }, // }) // if err != nil { // return err // } // current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil) // if err != nil { // return err // } // exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{ // Name: pulumi.String("example-uai"), // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{ // Name: pulumi.String("example-vnet"), // AddressSpaces: pulumi.StringArray{ // pulumi.String("10.0.0.0/16"), // }, // Location: example.Location, // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{ // Name: pulumi.String("example-subnet"), // ResourceGroupName: example.Name, // VirtualNetworkName: exampleVirtualNetwork.Name, // AddressPrefixes: pulumi.StringArray{ // pulumi.String("10.0.1.0/24"), // }, // ServiceEndpoints: pulumi.StringArray{ // pulumi.String("Microsoft.Storage.Global"), // }, // }) // if err != nil { // return err // } // exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{ // Name: pulumi.String("examplekv"), // Location: example.Location, // ResourceGroupName: example.Name, // EnabledForDiskEncryption: pulumi.Bool(true), // TenantId: pulumi.String(current.TenantId), // SoftDeleteRetentionDays: pulumi.Int(7), // PurgeProtectionEnabled: pulumi.Bool(true), // SkuName: pulumi.String("standard"), // }) // if err != nil { // return err // } // userAssignedIdentity, err := keyvault.NewAccessPolicy(ctx, "userAssignedIdentity", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: exampleUserAssignedIdentity.PrincipalId, // KeyPermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("UnwrapKey"), // pulumi.String("WrapKey"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("Get"), // }, // }) // if err != nil { // return err // } // client, err := keyvault.NewAccessPolicy(ctx, "client", &keyvault.AccessPolicyArgs{ // KeyVaultId: exampleKeyVault.ID(), // TenantId: pulumi.String(current.TenantId), // ObjectId: pulumi.String(current.ObjectId), // KeyPermissions: pulumi.StringArray{ // pulumi.String("Get"), // pulumi.String("Create"), // pulumi.String("Delete"), // pulumi.String("List"), // pulumi.String("Restore"), // pulumi.String("Recover"), // pulumi.String("UnwrapKey"), // pulumi.String("WrapKey"), // pulumi.String("Purge"), // pulumi.String("Encrypt"), // pulumi.String("Decrypt"), // pulumi.String("Sign"), // pulumi.String("Verify"), // pulumi.String("GetRotationPolicy"), // }, // SecretPermissions: pulumi.StringArray{ // pulumi.String("Get"), // }, // }) // if err != nil { // return err // } // exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{ // Name: pulumi.String("example-kvk"), // KeyVaultId: exampleKeyVault.ID(), // KeyType: pulumi.String("RSA"), // KeySize: pulumi.Int(2048), // KeyOpts: pulumi.StringArray{ // pulumi.String("decrypt"), // pulumi.String("encrypt"), // pulumi.String("sign"), // pulumi.String("unwrapKey"), // pulumi.String("verify"), // pulumi.String("wrapKey"), // }, // }, pulumi.DependsOn([]pulumi.Resource{ // userAssignedIdentity, // client, // })) // if err != nil { // return err // } // _, err = elasticsan.NewVolumeGroup(ctx, "example", &elasticsan.VolumeGroupArgs{ // Name: pulumi.String("example-esvg"), // ElasticSanId: exampleElasticSan.ID(), // EncryptionType: pulumi.String("EncryptionAtRestWithCustomerManagedKey"), // Encryption: &elasticsan.VolumeGroupEncryptionArgs{ // KeyVaultKeyId: exampleKey.VersionlessId, // UserAssignedIdentityId: exampleUserAssignedIdentity.ID(), // }, // Identity: &elasticsan.VolumeGroupIdentityArgs{ // Type: pulumi.String("UserAssigned"), // IdentityIds: pulumi.StringArray{ // exampleUserAssignedIdentity.ID(), // }, // }, // NetworkRules: elasticsan.VolumeGroupNetworkRuleArray{ // &elasticsan.VolumeGroupNetworkRuleArgs{ // SubnetId: exampleSubnet.ID(), // Action: pulumi.String("Allow"), // }, // }, // }) // 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.ElasticSan` - 2023-01-01 // // ## Import // // An existing Elastic SAN Volume Group can be imported into Pulumi using the `resource id`, e.g. // // ```sh // $ pulumi import azure:elasticsan/volumeGroup:VolumeGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ElasticSan/elasticSans/esan1/volumeGroups/vg1 // ``` type VolumeGroup struct { pulumi.CustomResourceState // Specifies the Elastic SAN ID within which this Elastic SAN Volume Group should exist. Changing this forces a new resource to be created. ElasticSanId pulumi.StringOutput `pulumi:"elasticSanId"` // An `encryption` block as defined below. // // > **Note:** The `encryption` block can only be set when `encryptionType` is set to `EncryptionAtRestWithCustomerManagedKey`. Encryption VolumeGroupEncryptionPtrOutput `pulumi:"encryption"` // Specifies the type of the key used to encrypt the data of the disk. Possible values are `EncryptionAtRestWithCustomerManagedKey` and `EncryptionAtRestWithPlatformKey`. Defaults to `EncryptionAtRestWithPlatformKey`. EncryptionType pulumi.StringPtrOutput `pulumi:"encryptionType"` // An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Elastic SAN Volume Group. Identity VolumeGroupIdentityPtrOutput `pulumi:"identity"` // Specifies the name of this Elastic SAN Volume Group. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // One or more `networkRule` blocks as defined below. NetworkRules VolumeGroupNetworkRuleArrayOutput `pulumi:"networkRules"` // Specifies the type of the storage target. The only possible value is `Iscsi`. Defaults to `Iscsi`. ProtocolType pulumi.StringPtrOutput `pulumi:"protocolType"` } // NewVolumeGroup registers a new resource with the given unique name, arguments, and options. func NewVolumeGroup(ctx *pulumi.Context, name string, args *VolumeGroupArgs, opts ...pulumi.ResourceOption) (*VolumeGroup, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ElasticSanId == nil { return nil, errors.New("invalid value for required argument 'ElasticSanId'") } opts = internal.PkgResourceDefaultOpts(opts) var resource VolumeGroup err := ctx.RegisterResource("azure:elasticsan/volumeGroup:VolumeGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetVolumeGroup gets an existing VolumeGroup 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 GetVolumeGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *VolumeGroupState, opts ...pulumi.ResourceOption) (*VolumeGroup, error) { var resource VolumeGroup err := ctx.ReadResource("azure:elasticsan/volumeGroup:VolumeGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering VolumeGroup resources. type volumeGroupState struct { // Specifies the Elastic SAN ID within which this Elastic SAN Volume Group should exist. Changing this forces a new resource to be created. ElasticSanId *string `pulumi:"elasticSanId"` // An `encryption` block as defined below. // // > **Note:** The `encryption` block can only be set when `encryptionType` is set to `EncryptionAtRestWithCustomerManagedKey`. Encryption *VolumeGroupEncryption `pulumi:"encryption"` // Specifies the type of the key used to encrypt the data of the disk. Possible values are `EncryptionAtRestWithCustomerManagedKey` and `EncryptionAtRestWithPlatformKey`. Defaults to `EncryptionAtRestWithPlatformKey`. EncryptionType *string `pulumi:"encryptionType"` // An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Elastic SAN Volume Group. Identity *VolumeGroupIdentity `pulumi:"identity"` // Specifies the name of this Elastic SAN Volume Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `networkRule` blocks as defined below. NetworkRules []VolumeGroupNetworkRule `pulumi:"networkRules"` // Specifies the type of the storage target. The only possible value is `Iscsi`. Defaults to `Iscsi`. ProtocolType *string `pulumi:"protocolType"` } type VolumeGroupState struct { // Specifies the Elastic SAN ID within which this Elastic SAN Volume Group should exist. Changing this forces a new resource to be created. ElasticSanId pulumi.StringPtrInput // An `encryption` block as defined below. // // > **Note:** The `encryption` block can only be set when `encryptionType` is set to `EncryptionAtRestWithCustomerManagedKey`. Encryption VolumeGroupEncryptionPtrInput // Specifies the type of the key used to encrypt the data of the disk. Possible values are `EncryptionAtRestWithCustomerManagedKey` and `EncryptionAtRestWithPlatformKey`. Defaults to `EncryptionAtRestWithPlatformKey`. EncryptionType pulumi.StringPtrInput // An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Elastic SAN Volume Group. Identity VolumeGroupIdentityPtrInput // Specifies the name of this Elastic SAN Volume Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `networkRule` blocks as defined below. NetworkRules VolumeGroupNetworkRuleArrayInput // Specifies the type of the storage target. The only possible value is `Iscsi`. Defaults to `Iscsi`. ProtocolType pulumi.StringPtrInput } func (VolumeGroupState) ElementType() reflect.Type { return reflect.TypeOf((*volumeGroupState)(nil)).Elem() } type volumeGroupArgs struct { // Specifies the Elastic SAN ID within which this Elastic SAN Volume Group should exist. Changing this forces a new resource to be created. ElasticSanId string `pulumi:"elasticSanId"` // An `encryption` block as defined below. // // > **Note:** The `encryption` block can only be set when `encryptionType` is set to `EncryptionAtRestWithCustomerManagedKey`. Encryption *VolumeGroupEncryption `pulumi:"encryption"` // Specifies the type of the key used to encrypt the data of the disk. Possible values are `EncryptionAtRestWithCustomerManagedKey` and `EncryptionAtRestWithPlatformKey`. Defaults to `EncryptionAtRestWithPlatformKey`. EncryptionType *string `pulumi:"encryptionType"` // An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Elastic SAN Volume Group. Identity *VolumeGroupIdentity `pulumi:"identity"` // Specifies the name of this Elastic SAN Volume Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // One or more `networkRule` blocks as defined below. NetworkRules []VolumeGroupNetworkRule `pulumi:"networkRules"` // Specifies the type of the storage target. The only possible value is `Iscsi`. Defaults to `Iscsi`. ProtocolType *string `pulumi:"protocolType"` } // The set of arguments for constructing a VolumeGroup resource. type VolumeGroupArgs struct { // Specifies the Elastic SAN ID within which this Elastic SAN Volume Group should exist. Changing this forces a new resource to be created. ElasticSanId pulumi.StringInput // An `encryption` block as defined below. // // > **Note:** The `encryption` block can only be set when `encryptionType` is set to `EncryptionAtRestWithCustomerManagedKey`. Encryption VolumeGroupEncryptionPtrInput // Specifies the type of the key used to encrypt the data of the disk. Possible values are `EncryptionAtRestWithCustomerManagedKey` and `EncryptionAtRestWithPlatformKey`. Defaults to `EncryptionAtRestWithPlatformKey`. EncryptionType pulumi.StringPtrInput // An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Elastic SAN Volume Group. Identity VolumeGroupIdentityPtrInput // Specifies the name of this Elastic SAN Volume Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // One or more `networkRule` blocks as defined below. NetworkRules VolumeGroupNetworkRuleArrayInput // Specifies the type of the storage target. The only possible value is `Iscsi`. Defaults to `Iscsi`. ProtocolType pulumi.StringPtrInput } func (VolumeGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*volumeGroupArgs)(nil)).Elem() } type VolumeGroupInput interface { pulumi.Input ToVolumeGroupOutput() VolumeGroupOutput ToVolumeGroupOutputWithContext(ctx context.Context) VolumeGroupOutput } func (*VolumeGroup) ElementType() reflect.Type { return reflect.TypeOf((**VolumeGroup)(nil)).Elem() } func (i *VolumeGroup) ToVolumeGroupOutput() VolumeGroupOutput { return i.ToVolumeGroupOutputWithContext(context.Background()) } func (i *VolumeGroup) ToVolumeGroupOutputWithContext(ctx context.Context) VolumeGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeGroupOutput) } // VolumeGroupArrayInput is an input type that accepts VolumeGroupArray and VolumeGroupArrayOutput values. // You can construct a concrete instance of `VolumeGroupArrayInput` via: // // VolumeGroupArray{ VolumeGroupArgs{...} } type VolumeGroupArrayInput interface { pulumi.Input ToVolumeGroupArrayOutput() VolumeGroupArrayOutput ToVolumeGroupArrayOutputWithContext(context.Context) VolumeGroupArrayOutput } type VolumeGroupArray []VolumeGroupInput func (VolumeGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*VolumeGroup)(nil)).Elem() } func (i VolumeGroupArray) ToVolumeGroupArrayOutput() VolumeGroupArrayOutput { return i.ToVolumeGroupArrayOutputWithContext(context.Background()) } func (i VolumeGroupArray) ToVolumeGroupArrayOutputWithContext(ctx context.Context) VolumeGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeGroupArrayOutput) } // VolumeGroupMapInput is an input type that accepts VolumeGroupMap and VolumeGroupMapOutput values. // You can construct a concrete instance of `VolumeGroupMapInput` via: // // VolumeGroupMap{ "key": VolumeGroupArgs{...} } type VolumeGroupMapInput interface { pulumi.Input ToVolumeGroupMapOutput() VolumeGroupMapOutput ToVolumeGroupMapOutputWithContext(context.Context) VolumeGroupMapOutput } type VolumeGroupMap map[string]VolumeGroupInput func (VolumeGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VolumeGroup)(nil)).Elem() } func (i VolumeGroupMap) ToVolumeGroupMapOutput() VolumeGroupMapOutput { return i.ToVolumeGroupMapOutputWithContext(context.Background()) } func (i VolumeGroupMap) ToVolumeGroupMapOutputWithContext(ctx context.Context) VolumeGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(VolumeGroupMapOutput) } type VolumeGroupOutput struct{ *pulumi.OutputState } func (VolumeGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**VolumeGroup)(nil)).Elem() } func (o VolumeGroupOutput) ToVolumeGroupOutput() VolumeGroupOutput { return o } func (o VolumeGroupOutput) ToVolumeGroupOutputWithContext(ctx context.Context) VolumeGroupOutput { return o } // Specifies the Elastic SAN ID within which this Elastic SAN Volume Group should exist. Changing this forces a new resource to be created. func (o VolumeGroupOutput) ElasticSanId() pulumi.StringOutput { return o.ApplyT(func(v *VolumeGroup) pulumi.StringOutput { return v.ElasticSanId }).(pulumi.StringOutput) } // An `encryption` block as defined below. // // > **Note:** The `encryption` block can only be set when `encryptionType` is set to `EncryptionAtRestWithCustomerManagedKey`. func (o VolumeGroupOutput) Encryption() VolumeGroupEncryptionPtrOutput { return o.ApplyT(func(v *VolumeGroup) VolumeGroupEncryptionPtrOutput { return v.Encryption }).(VolumeGroupEncryptionPtrOutput) } // Specifies the type of the key used to encrypt the data of the disk. Possible values are `EncryptionAtRestWithCustomerManagedKey` and `EncryptionAtRestWithPlatformKey`. Defaults to `EncryptionAtRestWithPlatformKey`. func (o VolumeGroupOutput) EncryptionType() pulumi.StringPtrOutput { return o.ApplyT(func(v *VolumeGroup) pulumi.StringPtrOutput { return v.EncryptionType }).(pulumi.StringPtrOutput) } // An `identity` block as defined below. Specifies the Managed Identity which should be assigned to this Elastic SAN Volume Group. func (o VolumeGroupOutput) Identity() VolumeGroupIdentityPtrOutput { return o.ApplyT(func(v *VolumeGroup) VolumeGroupIdentityPtrOutput { return v.Identity }).(VolumeGroupIdentityPtrOutput) } // Specifies the name of this Elastic SAN Volume Group. Changing this forces a new resource to be created. func (o VolumeGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *VolumeGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // One or more `networkRule` blocks as defined below. func (o VolumeGroupOutput) NetworkRules() VolumeGroupNetworkRuleArrayOutput { return o.ApplyT(func(v *VolumeGroup) VolumeGroupNetworkRuleArrayOutput { return v.NetworkRules }).(VolumeGroupNetworkRuleArrayOutput) } // Specifies the type of the storage target. The only possible value is `Iscsi`. Defaults to `Iscsi`. func (o VolumeGroupOutput) ProtocolType() pulumi.StringPtrOutput { return o.ApplyT(func(v *VolumeGroup) pulumi.StringPtrOutput { return v.ProtocolType }).(pulumi.StringPtrOutput) } type VolumeGroupArrayOutput struct{ *pulumi.OutputState } func (VolumeGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*VolumeGroup)(nil)).Elem() } func (o VolumeGroupArrayOutput) ToVolumeGroupArrayOutput() VolumeGroupArrayOutput { return o } func (o VolumeGroupArrayOutput) ToVolumeGroupArrayOutputWithContext(ctx context.Context) VolumeGroupArrayOutput { return o } func (o VolumeGroupArrayOutput) Index(i pulumi.IntInput) VolumeGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VolumeGroup { return vs[0].([]*VolumeGroup)[vs[1].(int)] }).(VolumeGroupOutput) } type VolumeGroupMapOutput struct{ *pulumi.OutputState } func (VolumeGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*VolumeGroup)(nil)).Elem() } func (o VolumeGroupMapOutput) ToVolumeGroupMapOutput() VolumeGroupMapOutput { return o } func (o VolumeGroupMapOutput) ToVolumeGroupMapOutputWithContext(ctx context.Context) VolumeGroupMapOutput { return o } func (o VolumeGroupMapOutput) MapIndex(k pulumi.StringInput) VolumeGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VolumeGroup { return vs[0].(map[string]*VolumeGroup)[vs[1].(string)] }).(VolumeGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*VolumeGroupInput)(nil)).Elem(), &VolumeGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*VolumeGroupArrayInput)(nil)).Elem(), VolumeGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*VolumeGroupMapInput)(nil)).Elem(), VolumeGroupMap{}) pulumi.RegisterOutputType(VolumeGroupOutput{}) pulumi.RegisterOutputType(VolumeGroupArrayOutput{}) pulumi.RegisterOutputType(VolumeGroupMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/elasticsan/elasticSan.go
sdk/go/azure/elasticsan/elasticSan.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package elasticsan import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Elastic SAN resource. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/elasticsan" // "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 = elasticsan.NewElasticSan(ctx, "example", &elasticsan.ElasticSanArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // Location: example.Location, // BaseSizeInTib: pulumi.Int(1), // ExtendedSizeInTib: pulumi.Int(2), // Sku: &elasticsan.ElasticSanSkuArgs{ // Name: pulumi.String("example-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.ElasticSan` - 2023-01-01 // // ## Import // // An existing Elastic SAN can be imported into Pulumi using the `resource id`, e.g. // // ```sh // $ pulumi import azure:elasticsan/elasticSan:ElasticSan example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ElasticSan/elasticSans/esan1 // ``` type ElasticSan struct { pulumi.CustomResourceState // Specifies the base size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`. // // > **Note:** When updating `baseSizeInTib`, the new value should be greater than the existing one. BaseSizeInTib pulumi.IntOutput `pulumi:"baseSizeInTib"` // Specifies the extended size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`. // // > **Note:** `extendedSizeInTib` cannot be removed and when updating, the new value should be greater than the existing one. ExtendedSizeInTib pulumi.IntPtrOutput `pulumi:"extendedSizeInTib"` // The Azure Region where the Elastic SAN resource should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // Specifies the name of this Elastic SAN resource. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the name of the Resource Group within which this Elastic SAN resource should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A `sku` block as defined below. Sku ElasticSanSkuOutput `pulumi:"sku"` // A mapping of tags which should be assigned to the Elastic SAN resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // Total Provisioned IOps of the Elastic SAN resource. TotalIops pulumi.IntOutput `pulumi:"totalIops"` // Total Provisioned MBps Elastic SAN resource. TotalMbps pulumi.IntOutput `pulumi:"totalMbps"` // Total size of the Elastic SAN resource in TB. TotalSizeInTib pulumi.IntOutput `pulumi:"totalSizeInTib"` // Total size of the provisioned Volumes in GiB. TotalVolumeSizeInGib pulumi.IntOutput `pulumi:"totalVolumeSizeInGib"` // Total number of volume groups in this Elastic SAN resource. VolumeGroupCount pulumi.IntOutput `pulumi:"volumeGroupCount"` // Logical zone for the Elastic SAN resource. Changing this forces a new resource to be created. // // > **Note:** `zones` cannot be specified if `sku.name` is set to `Premium_ZRS`. Zones pulumi.StringArrayOutput `pulumi:"zones"` } // NewElasticSan registers a new resource with the given unique name, arguments, and options. func NewElasticSan(ctx *pulumi.Context, name string, args *ElasticSanArgs, opts ...pulumi.ResourceOption) (*ElasticSan, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.BaseSizeInTib == nil { return nil, errors.New("invalid value for required argument 'BaseSizeInTib'") } 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 ElasticSan err := ctx.RegisterResource("azure:elasticsan/elasticSan:ElasticSan", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetElasticSan gets an existing ElasticSan 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 GetElasticSan(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ElasticSanState, opts ...pulumi.ResourceOption) (*ElasticSan, error) { var resource ElasticSan err := ctx.ReadResource("azure:elasticsan/elasticSan:ElasticSan", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ElasticSan resources. type elasticSanState struct { // Specifies the base size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`. // // > **Note:** When updating `baseSizeInTib`, the new value should be greater than the existing one. BaseSizeInTib *int `pulumi:"baseSizeInTib"` // Specifies the extended size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`. // // > **Note:** `extendedSizeInTib` cannot be removed and when updating, the new value should be greater than the existing one. ExtendedSizeInTib *int `pulumi:"extendedSizeInTib"` // The Azure Region where the Elastic SAN resource should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of this Elastic SAN resource. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group within which this Elastic SAN resource should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A `sku` block as defined below. Sku *ElasticSanSku `pulumi:"sku"` // A mapping of tags which should be assigned to the Elastic SAN resource. Tags map[string]string `pulumi:"tags"` // Total Provisioned IOps of the Elastic SAN resource. TotalIops *int `pulumi:"totalIops"` // Total Provisioned MBps Elastic SAN resource. TotalMbps *int `pulumi:"totalMbps"` // Total size of the Elastic SAN resource in TB. TotalSizeInTib *int `pulumi:"totalSizeInTib"` // Total size of the provisioned Volumes in GiB. TotalVolumeSizeInGib *int `pulumi:"totalVolumeSizeInGib"` // Total number of volume groups in this Elastic SAN resource. VolumeGroupCount *int `pulumi:"volumeGroupCount"` // Logical zone for the Elastic SAN resource. Changing this forces a new resource to be created. // // > **Note:** `zones` cannot be specified if `sku.name` is set to `Premium_ZRS`. Zones []string `pulumi:"zones"` } type ElasticSanState struct { // Specifies the base size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`. // // > **Note:** When updating `baseSizeInTib`, the new value should be greater than the existing one. BaseSizeInTib pulumi.IntPtrInput // Specifies the extended size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`. // // > **Note:** `extendedSizeInTib` cannot be removed and when updating, the new value should be greater than the existing one. ExtendedSizeInTib pulumi.IntPtrInput // The Azure Region where the Elastic SAN resource should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of this Elastic SAN resource. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group within which this Elastic SAN resource should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A `sku` block as defined below. Sku ElasticSanSkuPtrInput // A mapping of tags which should be assigned to the Elastic SAN resource. Tags pulumi.StringMapInput // Total Provisioned IOps of the Elastic SAN resource. TotalIops pulumi.IntPtrInput // Total Provisioned MBps Elastic SAN resource. TotalMbps pulumi.IntPtrInput // Total size of the Elastic SAN resource in TB. TotalSizeInTib pulumi.IntPtrInput // Total size of the provisioned Volumes in GiB. TotalVolumeSizeInGib pulumi.IntPtrInput // Total number of volume groups in this Elastic SAN resource. VolumeGroupCount pulumi.IntPtrInput // Logical zone for the Elastic SAN resource. Changing this forces a new resource to be created. // // > **Note:** `zones` cannot be specified if `sku.name` is set to `Premium_ZRS`. Zones pulumi.StringArrayInput } func (ElasticSanState) ElementType() reflect.Type { return reflect.TypeOf((*elasticSanState)(nil)).Elem() } type elasticSanArgs struct { // Specifies the base size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`. // // > **Note:** When updating `baseSizeInTib`, the new value should be greater than the existing one. BaseSizeInTib int `pulumi:"baseSizeInTib"` // Specifies the extended size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`. // // > **Note:** `extendedSizeInTib` cannot be removed and when updating, the new value should be greater than the existing one. ExtendedSizeInTib *int `pulumi:"extendedSizeInTib"` // The Azure Region where the Elastic SAN resource should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the name of this Elastic SAN resource. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the name of the Resource Group within which this Elastic SAN resource should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A `sku` block as defined below. Sku ElasticSanSku `pulumi:"sku"` // A mapping of tags which should be assigned to the Elastic SAN resource. Tags map[string]string `pulumi:"tags"` // Logical zone for the Elastic SAN resource. Changing this forces a new resource to be created. // // > **Note:** `zones` cannot be specified if `sku.name` is set to `Premium_ZRS`. Zones []string `pulumi:"zones"` } // The set of arguments for constructing a ElasticSan resource. type ElasticSanArgs struct { // Specifies the base size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`. // // > **Note:** When updating `baseSizeInTib`, the new value should be greater than the existing one. BaseSizeInTib pulumi.IntInput // Specifies the extended size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`. // // > **Note:** `extendedSizeInTib` cannot be removed and when updating, the new value should be greater than the existing one. ExtendedSizeInTib pulumi.IntPtrInput // The Azure Region where the Elastic SAN resource should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the name of this Elastic SAN resource. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the name of the Resource Group within which this Elastic SAN resource should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A `sku` block as defined below. Sku ElasticSanSkuInput // A mapping of tags which should be assigned to the Elastic SAN resource. Tags pulumi.StringMapInput // Logical zone for the Elastic SAN resource. Changing this forces a new resource to be created. // // > **Note:** `zones` cannot be specified if `sku.name` is set to `Premium_ZRS`. Zones pulumi.StringArrayInput } func (ElasticSanArgs) ElementType() reflect.Type { return reflect.TypeOf((*elasticSanArgs)(nil)).Elem() } type ElasticSanInput interface { pulumi.Input ToElasticSanOutput() ElasticSanOutput ToElasticSanOutputWithContext(ctx context.Context) ElasticSanOutput } func (*ElasticSan) ElementType() reflect.Type { return reflect.TypeOf((**ElasticSan)(nil)).Elem() } func (i *ElasticSan) ToElasticSanOutput() ElasticSanOutput { return i.ToElasticSanOutputWithContext(context.Background()) } func (i *ElasticSan) ToElasticSanOutputWithContext(ctx context.Context) ElasticSanOutput { return pulumi.ToOutputWithContext(ctx, i).(ElasticSanOutput) } // ElasticSanArrayInput is an input type that accepts ElasticSanArray and ElasticSanArrayOutput values. // You can construct a concrete instance of `ElasticSanArrayInput` via: // // ElasticSanArray{ ElasticSanArgs{...} } type ElasticSanArrayInput interface { pulumi.Input ToElasticSanArrayOutput() ElasticSanArrayOutput ToElasticSanArrayOutputWithContext(context.Context) ElasticSanArrayOutput } type ElasticSanArray []ElasticSanInput func (ElasticSanArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ElasticSan)(nil)).Elem() } func (i ElasticSanArray) ToElasticSanArrayOutput() ElasticSanArrayOutput { return i.ToElasticSanArrayOutputWithContext(context.Background()) } func (i ElasticSanArray) ToElasticSanArrayOutputWithContext(ctx context.Context) ElasticSanArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ElasticSanArrayOutput) } // ElasticSanMapInput is an input type that accepts ElasticSanMap and ElasticSanMapOutput values. // You can construct a concrete instance of `ElasticSanMapInput` via: // // ElasticSanMap{ "key": ElasticSanArgs{...} } type ElasticSanMapInput interface { pulumi.Input ToElasticSanMapOutput() ElasticSanMapOutput ToElasticSanMapOutputWithContext(context.Context) ElasticSanMapOutput } type ElasticSanMap map[string]ElasticSanInput func (ElasticSanMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ElasticSan)(nil)).Elem() } func (i ElasticSanMap) ToElasticSanMapOutput() ElasticSanMapOutput { return i.ToElasticSanMapOutputWithContext(context.Background()) } func (i ElasticSanMap) ToElasticSanMapOutputWithContext(ctx context.Context) ElasticSanMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ElasticSanMapOutput) } type ElasticSanOutput struct{ *pulumi.OutputState } func (ElasticSanOutput) ElementType() reflect.Type { return reflect.TypeOf((**ElasticSan)(nil)).Elem() } func (o ElasticSanOutput) ToElasticSanOutput() ElasticSanOutput { return o } func (o ElasticSanOutput) ToElasticSanOutputWithContext(ctx context.Context) ElasticSanOutput { return o } // Specifies the base size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`. // // > **Note:** When updating `baseSizeInTib`, the new value should be greater than the existing one. func (o ElasticSanOutput) BaseSizeInTib() pulumi.IntOutput { return o.ApplyT(func(v *ElasticSan) pulumi.IntOutput { return v.BaseSizeInTib }).(pulumi.IntOutput) } // Specifies the extended size of the Elastic SAN resource in TiB. Possible values are between `1` and `100`. // // > **Note:** `extendedSizeInTib` cannot be removed and when updating, the new value should be greater than the existing one. func (o ElasticSanOutput) ExtendedSizeInTib() pulumi.IntPtrOutput { return o.ApplyT(func(v *ElasticSan) pulumi.IntPtrOutput { return v.ExtendedSizeInTib }).(pulumi.IntPtrOutput) } // The Azure Region where the Elastic SAN resource should exist. Changing this forces a new resource to be created. func (o ElasticSanOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *ElasticSan) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the name of this Elastic SAN resource. Changing this forces a new resource to be created. func (o ElasticSanOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ElasticSan) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the name of the Resource Group within which this Elastic SAN resource should exist. Changing this forces a new resource to be created. func (o ElasticSanOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ElasticSan) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `sku` block as defined below. func (o ElasticSanOutput) Sku() ElasticSanSkuOutput { return o.ApplyT(func(v *ElasticSan) ElasticSanSkuOutput { return v.Sku }).(ElasticSanSkuOutput) } // A mapping of tags which should be assigned to the Elastic SAN resource. func (o ElasticSanOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *ElasticSan) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Total Provisioned IOps of the Elastic SAN resource. func (o ElasticSanOutput) TotalIops() pulumi.IntOutput { return o.ApplyT(func(v *ElasticSan) pulumi.IntOutput { return v.TotalIops }).(pulumi.IntOutput) } // Total Provisioned MBps Elastic SAN resource. func (o ElasticSanOutput) TotalMbps() pulumi.IntOutput { return o.ApplyT(func(v *ElasticSan) pulumi.IntOutput { return v.TotalMbps }).(pulumi.IntOutput) } // Total size of the Elastic SAN resource in TB. func (o ElasticSanOutput) TotalSizeInTib() pulumi.IntOutput { return o.ApplyT(func(v *ElasticSan) pulumi.IntOutput { return v.TotalSizeInTib }).(pulumi.IntOutput) } // Total size of the provisioned Volumes in GiB. func (o ElasticSanOutput) TotalVolumeSizeInGib() pulumi.IntOutput { return o.ApplyT(func(v *ElasticSan) pulumi.IntOutput { return v.TotalVolumeSizeInGib }).(pulumi.IntOutput) } // Total number of volume groups in this Elastic SAN resource. func (o ElasticSanOutput) VolumeGroupCount() pulumi.IntOutput { return o.ApplyT(func(v *ElasticSan) pulumi.IntOutput { return v.VolumeGroupCount }).(pulumi.IntOutput) } // Logical zone for the Elastic SAN resource. Changing this forces a new resource to be created. // // > **Note:** `zones` cannot be specified if `sku.name` is set to `Premium_ZRS`. func (o ElasticSanOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v *ElasticSan) pulumi.StringArrayOutput { return v.Zones }).(pulumi.StringArrayOutput) } type ElasticSanArrayOutput struct{ *pulumi.OutputState } func (ElasticSanArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ElasticSan)(nil)).Elem() } func (o ElasticSanArrayOutput) ToElasticSanArrayOutput() ElasticSanArrayOutput { return o } func (o ElasticSanArrayOutput) ToElasticSanArrayOutputWithContext(ctx context.Context) ElasticSanArrayOutput { return o } func (o ElasticSanArrayOutput) Index(i pulumi.IntInput) ElasticSanOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ElasticSan { return vs[0].([]*ElasticSan)[vs[1].(int)] }).(ElasticSanOutput) } type ElasticSanMapOutput struct{ *pulumi.OutputState } func (ElasticSanMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ElasticSan)(nil)).Elem() } func (o ElasticSanMapOutput) ToElasticSanMapOutput() ElasticSanMapOutput { return o } func (o ElasticSanMapOutput) ToElasticSanMapOutputWithContext(ctx context.Context) ElasticSanMapOutput { return o } func (o ElasticSanMapOutput) MapIndex(k pulumi.StringInput) ElasticSanOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ElasticSan { return vs[0].(map[string]*ElasticSan)[vs[1].(string)] }).(ElasticSanOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ElasticSanInput)(nil)).Elem(), &ElasticSan{}) pulumi.RegisterInputType(reflect.TypeOf((*ElasticSanArrayInput)(nil)).Elem(), ElasticSanArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ElasticSanMapInput)(nil)).Elem(), ElasticSanMap{}) pulumi.RegisterOutputType(ElasticSanOutput{}) pulumi.RegisterOutputType(ElasticSanArrayOutput{}) pulumi.RegisterOutputType(ElasticSanMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/elasticsan/get.go
sdk/go/azure/elasticsan/get.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package elasticsan 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 Elastic SAN. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/elasticsan" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := elasticsan.Get(ctx, &elasticsan.GetArgs{ // Name: "existing", // ResourceGroupName: "existing", // }, nil) // if err != nil { // return err // } // ctx.Export("id", example.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.ElasticSan` - 2023-01-01 func Get(ctx *pulumi.Context, args *GetArgs, opts ...pulumi.InvokeOption) (*GetResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetResult err := ctx.Invoke("azure:elasticsan/get:get", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking get. type GetArgs struct { // The name of this Elastic SAN. Name string `pulumi:"name"` // The name of the Resource Group where the Elastic SAN exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by get. type GetResult struct { // The base size of the Elastic SAN resource in TiB. BaseSizeInTib int `pulumi:"baseSizeInTib"` // The base size of the Elastic SAN resource in TiB. ExtendedSizeInTib int `pulumi:"extendedSizeInTib"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region where the Elastic SAN exists. Location string `pulumi:"location"` // The SKU name. Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A `sku` block as defined below. Skus []GetSkus `pulumi:"skus"` // A mapping of tags assigned to the Elastic SAN. Tags map[string]string `pulumi:"tags"` // Total Provisioned IOps of the Elastic SAN resource. TotalIops int `pulumi:"totalIops"` // Total Provisioned MBps Elastic SAN resource. TotalMbps int `pulumi:"totalMbps"` // Total size of the Elastic SAN resource in TB. TotalSizeInTib int `pulumi:"totalSizeInTib"` // Total size of the provisioned Volumes in GiB. TotalVolumeSizeInGib int `pulumi:"totalVolumeSizeInGib"` // Total number of volume groups in this Elastic SAN resource. VolumeGroupCount int `pulumi:"volumeGroupCount"` // Logical zone for the Elastic SAN resource. Zones []string `pulumi:"zones"` } func GetOutput(ctx *pulumi.Context, args GetOutputArgs, opts ...pulumi.InvokeOption) GetResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetResultOutput, error) { args := v.(GetArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:elasticsan/get:get", args, GetResultOutput{}, options).(GetResultOutput), nil }).(GetResultOutput) } // A collection of arguments for invoking get. type GetOutputArgs struct { // The name of this Elastic SAN. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Elastic SAN exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (GetOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetArgs)(nil)).Elem() } // A collection of values returned by get. type GetResultOutput struct{ *pulumi.OutputState } func (GetResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetResult)(nil)).Elem() } func (o GetResultOutput) ToGetResultOutput() GetResultOutput { return o } func (o GetResultOutput) ToGetResultOutputWithContext(ctx context.Context) GetResultOutput { return o } // The base size of the Elastic SAN resource in TiB. func (o GetResultOutput) BaseSizeInTib() pulumi.IntOutput { return o.ApplyT(func(v GetResult) int { return v.BaseSizeInTib }).(pulumi.IntOutput) } // The base size of the Elastic SAN resource in TiB. func (o GetResultOutput) ExtendedSizeInTib() pulumi.IntOutput { return o.ApplyT(func(v GetResult) int { return v.ExtendedSizeInTib }).(pulumi.IntOutput) } // The provider-assigned unique ID for this managed resource. func (o GetResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region where the Elastic SAN exists. func (o GetResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.Location }).(pulumi.StringOutput) } // The SKU name. func (o GetResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.Name }).(pulumi.StringOutput) } func (o GetResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v GetResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A `sku` block as defined below. func (o GetResultOutput) Skus() GetSkusArrayOutput { return o.ApplyT(func(v GetResult) []GetSkus { return v.Skus }).(GetSkusArrayOutput) } // A mapping of tags assigned to the Elastic SAN. func (o GetResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v GetResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // Total Provisioned IOps of the Elastic SAN resource. func (o GetResultOutput) TotalIops() pulumi.IntOutput { return o.ApplyT(func(v GetResult) int { return v.TotalIops }).(pulumi.IntOutput) } // Total Provisioned MBps Elastic SAN resource. func (o GetResultOutput) TotalMbps() pulumi.IntOutput { return o.ApplyT(func(v GetResult) int { return v.TotalMbps }).(pulumi.IntOutput) } // Total size of the Elastic SAN resource in TB. func (o GetResultOutput) TotalSizeInTib() pulumi.IntOutput { return o.ApplyT(func(v GetResult) int { return v.TotalSizeInTib }).(pulumi.IntOutput) } // Total size of the provisioned Volumes in GiB. func (o GetResultOutput) TotalVolumeSizeInGib() pulumi.IntOutput { return o.ApplyT(func(v GetResult) int { return v.TotalVolumeSizeInGib }).(pulumi.IntOutput) } // Total number of volume groups in this Elastic SAN resource. func (o GetResultOutput) VolumeGroupCount() pulumi.IntOutput { return o.ApplyT(func(v GetResult) int { return v.VolumeGroupCount }).(pulumi.IntOutput) } // Logical zone for the Elastic SAN resource. func (o GetResultOutput) Zones() pulumi.StringArrayOutput { return o.ApplyT(func(v GetResult) []string { return v.Zones }).(pulumi.StringArrayOutput) } func init() { pulumi.RegisterOutputType(GetResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/elasticsan/getVolumeGroup.go
sdk/go/azure/elasticsan/getVolumeGroup.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package elasticsan 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 Elastic SAN Volume Group. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/elasticsan" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := elasticsan.Get(ctx, &elasticsan.GetArgs{ // Name: "existing", // ResourceGroupName: "existing", // }, nil) // if err != nil { // return err // } // exampleGetVolumeGroup, err := elasticsan.LookupVolumeGroup(ctx, &elasticsan.LookupVolumeGroupArgs{ // Name: "existing", // ElasticSanId: example.Id, // }, nil) // if err != nil { // return err // } // ctx.Export("id", exampleGetVolumeGroup.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.ElasticSan` - 2023-01-01 func LookupVolumeGroup(ctx *pulumi.Context, args *LookupVolumeGroupArgs, opts ...pulumi.InvokeOption) (*LookupVolumeGroupResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupVolumeGroupResult err := ctx.Invoke("azure:elasticsan/getVolumeGroup:getVolumeGroup", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getVolumeGroup. type LookupVolumeGroupArgs struct { // The Elastic SAN ID within which the Elastic SAN Volume Group exists. ElasticSanId string `pulumi:"elasticSanId"` // The name of the Elastic SAN Volume Group. Name string `pulumi:"name"` } // A collection of values returned by getVolumeGroup. type LookupVolumeGroupResult struct { ElasticSanId string `pulumi:"elasticSanId"` // The type of the key used to encrypt the data of the disk. EncryptionType string `pulumi:"encryptionType"` // An `encryption` block as defined below. Encryptions []GetVolumeGroupEncryption `pulumi:"encryptions"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // An `identity` block as defined below. Identities []GetVolumeGroupIdentity `pulumi:"identities"` Name string `pulumi:"name"` // One or more `networkRule` blocks as defined below. NetworkRules []GetVolumeGroupNetworkRule `pulumi:"networkRules"` // The type of the storage target. ProtocolType string `pulumi:"protocolType"` } func LookupVolumeGroupOutput(ctx *pulumi.Context, args LookupVolumeGroupOutputArgs, opts ...pulumi.InvokeOption) LookupVolumeGroupResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupVolumeGroupResultOutput, error) { args := v.(LookupVolumeGroupArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:elasticsan/getVolumeGroup:getVolumeGroup", args, LookupVolumeGroupResultOutput{}, options).(LookupVolumeGroupResultOutput), nil }).(LookupVolumeGroupResultOutput) } // A collection of arguments for invoking getVolumeGroup. type LookupVolumeGroupOutputArgs struct { // The Elastic SAN ID within which the Elastic SAN Volume Group exists. ElasticSanId pulumi.StringInput `pulumi:"elasticSanId"` // The name of the Elastic SAN Volume Group. Name pulumi.StringInput `pulumi:"name"` } func (LookupVolumeGroupOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupVolumeGroupArgs)(nil)).Elem() } // A collection of values returned by getVolumeGroup. type LookupVolumeGroupResultOutput struct{ *pulumi.OutputState } func (LookupVolumeGroupResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupVolumeGroupResult)(nil)).Elem() } func (o LookupVolumeGroupResultOutput) ToLookupVolumeGroupResultOutput() LookupVolumeGroupResultOutput { return o } func (o LookupVolumeGroupResultOutput) ToLookupVolumeGroupResultOutputWithContext(ctx context.Context) LookupVolumeGroupResultOutput { return o } func (o LookupVolumeGroupResultOutput) ElasticSanId() pulumi.StringOutput { return o.ApplyT(func(v LookupVolumeGroupResult) string { return v.ElasticSanId }).(pulumi.StringOutput) } // The type of the key used to encrypt the data of the disk. func (o LookupVolumeGroupResultOutput) EncryptionType() pulumi.StringOutput { return o.ApplyT(func(v LookupVolumeGroupResult) string { return v.EncryptionType }).(pulumi.StringOutput) } // An `encryption` block as defined below. func (o LookupVolumeGroupResultOutput) Encryptions() GetVolumeGroupEncryptionArrayOutput { return o.ApplyT(func(v LookupVolumeGroupResult) []GetVolumeGroupEncryption { return v.Encryptions }).(GetVolumeGroupEncryptionArrayOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupVolumeGroupResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupVolumeGroupResult) string { return v.Id }).(pulumi.StringOutput) } // An `identity` block as defined below. func (o LookupVolumeGroupResultOutput) Identities() GetVolumeGroupIdentityArrayOutput { return o.ApplyT(func(v LookupVolumeGroupResult) []GetVolumeGroupIdentity { return v.Identities }).(GetVolumeGroupIdentityArrayOutput) } func (o LookupVolumeGroupResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupVolumeGroupResult) string { return v.Name }).(pulumi.StringOutput) } // One or more `networkRule` blocks as defined below. func (o LookupVolumeGroupResultOutput) NetworkRules() GetVolumeGroupNetworkRuleArrayOutput { return o.ApplyT(func(v LookupVolumeGroupResult) []GetVolumeGroupNetworkRule { return v.NetworkRules }).(GetVolumeGroupNetworkRuleArrayOutput) } // The type of the storage target. func (o LookupVolumeGroupResultOutput) ProtocolType() pulumi.StringOutput { return o.ApplyT(func(v LookupVolumeGroupResult) string { return v.ProtocolType }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupVolumeGroupResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/elasticsan/getVolumeSnapshot.go
sdk/go/azure/elasticsan/getVolumeSnapshot.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package elasticsan 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 Elastic SAN Volume Snapshot. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/elasticsan" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := elasticsan.Get(ctx, &elasticsan.GetArgs{ // Name: "existing", // ResourceGroupName: "existing", // }, nil) // if err != nil { // return err // } // exampleGetVolumeGroup, err := elasticsan.LookupVolumeGroup(ctx, &elasticsan.LookupVolumeGroupArgs{ // Name: "existing", // ElasticSanId: example.Id, // }, nil) // if err != nil { // return err // } // exampleGetVolumeSnapshot, err := elasticsan.GetVolumeSnapshot(ctx, &elasticsan.GetVolumeSnapshotArgs{ // Name: "existing", // VolumeGroupId: exampleGetVolumeGroup.Id, // }, nil) // if err != nil { // return err // } // ctx.Export("id", exampleGetVolumeSnapshot.Id) // return nil // }) // } // // ``` // // ## API Providers // // <!-- This section is generated, changes will be overwritten --> // This data source uses the following Azure API Providers: // // * `Microsoft.ElasticSan` - 2023-01-01 func GetVolumeSnapshot(ctx *pulumi.Context, args *GetVolumeSnapshotArgs, opts ...pulumi.InvokeOption) (*GetVolumeSnapshotResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv GetVolumeSnapshotResult err := ctx.Invoke("azure:elasticsan/getVolumeSnapshot:getVolumeSnapshot", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getVolumeSnapshot. type GetVolumeSnapshotArgs struct { // The name of the Elastic SAN Volume Snapshot. Name string `pulumi:"name"` // The Elastic SAN Volume Group ID within which the Elastic SAN Volume Snapshot exists. VolumeGroupId string `pulumi:"volumeGroupId"` } // A collection of values returned by getVolumeSnapshot. type GetVolumeSnapshotResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Name string `pulumi:"name"` // The resource ID from which the Snapshot is created. SourceId string `pulumi:"sourceId"` // The size of source volume. SourceVolumeSizeInGib int `pulumi:"sourceVolumeSizeInGib"` VolumeGroupId string `pulumi:"volumeGroupId"` // The source volume name of the Snapshot. VolumeName string `pulumi:"volumeName"` } func GetVolumeSnapshotOutput(ctx *pulumi.Context, args GetVolumeSnapshotOutputArgs, opts ...pulumi.InvokeOption) GetVolumeSnapshotResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (GetVolumeSnapshotResultOutput, error) { args := v.(GetVolumeSnapshotArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:elasticsan/getVolumeSnapshot:getVolumeSnapshot", args, GetVolumeSnapshotResultOutput{}, options).(GetVolumeSnapshotResultOutput), nil }).(GetVolumeSnapshotResultOutput) } // A collection of arguments for invoking getVolumeSnapshot. type GetVolumeSnapshotOutputArgs struct { // The name of the Elastic SAN Volume Snapshot. Name pulumi.StringInput `pulumi:"name"` // The Elastic SAN Volume Group ID within which the Elastic SAN Volume Snapshot exists. VolumeGroupId pulumi.StringInput `pulumi:"volumeGroupId"` } func (GetVolumeSnapshotOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*GetVolumeSnapshotArgs)(nil)).Elem() } // A collection of values returned by getVolumeSnapshot. type GetVolumeSnapshotResultOutput struct{ *pulumi.OutputState } func (GetVolumeSnapshotResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*GetVolumeSnapshotResult)(nil)).Elem() } func (o GetVolumeSnapshotResultOutput) ToGetVolumeSnapshotResultOutput() GetVolumeSnapshotResultOutput { return o } func (o GetVolumeSnapshotResultOutput) ToGetVolumeSnapshotResultOutputWithContext(ctx context.Context) GetVolumeSnapshotResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o GetVolumeSnapshotResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v GetVolumeSnapshotResult) string { return v.Id }).(pulumi.StringOutput) } func (o GetVolumeSnapshotResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v GetVolumeSnapshotResult) string { return v.Name }).(pulumi.StringOutput) } // The resource ID from which the Snapshot is created. func (o GetVolumeSnapshotResultOutput) SourceId() pulumi.StringOutput { return o.ApplyT(func(v GetVolumeSnapshotResult) string { return v.SourceId }).(pulumi.StringOutput) } // The size of source volume. func (o GetVolumeSnapshotResultOutput) SourceVolumeSizeInGib() pulumi.IntOutput { return o.ApplyT(func(v GetVolumeSnapshotResult) int { return v.SourceVolumeSizeInGib }).(pulumi.IntOutput) } func (o GetVolumeSnapshotResultOutput) VolumeGroupId() pulumi.StringOutput { return o.ApplyT(func(v GetVolumeSnapshotResult) string { return v.VolumeGroupId }).(pulumi.StringOutput) } // The source volume name of the Snapshot. func (o GetVolumeSnapshotResultOutput) VolumeName() pulumi.StringOutput { return o.ApplyT(func(v GetVolumeSnapshotResult) string { return v.VolumeName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(GetVolumeSnapshotResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/attestation/init.go
sdk/go/azure/attestation/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 attestation 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:attestation/provider:Provider": r = &Provider{} 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", "attestation/provider", &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/attestation/provider.go
sdk/go/azure/attestation/provider.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package attestation import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages an Attestation Provider. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/attestation" // "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 // } // invokeFile, err := std.File(ctx, &std.FileArgs{ // Input: "./example/cert.pem", // }, nil) // if err != nil { // return err // } // _, err = attestation.NewProvider(ctx, "example", &attestation.ProviderArgs{ // Name: pulumi.String("exampleprovider"), // ResourceGroupName: example.Name, // Location: example.Location, // PolicySigningCertificateData: 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.Attestation` - 2020-10-01 // // ## Import // // Attestation Providers can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:attestation/provider:Provider example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Attestation/attestationProviders/provider1 // ``` type Provider struct { pulumi.CustomResourceState // The URI of the Attestation Service. AttestationUri pulumi.StringOutput `pulumi:"attestationUri"` // The Azure Region where the Attestation Provider should exist. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name which should be used for this Attestation Provider. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. OpenEnclavePolicyBase64 pulumi.StringPtrOutput `pulumi:"openEnclavePolicyBase64"` // A valid X.509 certificate (Section 4 of [RFC4648](https://tools.ietf.org/html/rfc4648)). Changing this forces a new resource to be created. // // > **Note:** If the `policySigningCertificateData` argument contains more than one valid X.509 certificate only the first certificate will be used. PolicySigningCertificateData pulumi.StringPtrOutput `pulumi:"policySigningCertificateData"` // The name of the Resource Group where the attestation provider should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. // // > **Note:** [More information on the JWT Policies can be found in this article on `learn.microsoft.com`](https://learn.microsoft.com/azure/attestation/author-sign-policy). SevSnpPolicyBase64 pulumi.StringPtrOutput `pulumi:"sevSnpPolicyBase64"` // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. SgxEnclavePolicyBase64 pulumi.StringPtrOutput `pulumi:"sgxEnclavePolicyBase64"` // A mapping of tags which should be assigned to the Attestation Provider. Tags pulumi.StringMapOutput `pulumi:"tags"` // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. TpmPolicyBase64 pulumi.StringPtrOutput `pulumi:"tpmPolicyBase64"` // Trust model used for the Attestation Service. TrustModel pulumi.StringOutput `pulumi:"trustModel"` } // NewProvider registers a new resource with the given unique name, arguments, and options. func NewProvider(ctx *pulumi.Context, name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, 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 Provider err := ctx.RegisterResource("azure:attestation/provider:Provider", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetProvider gets an existing Provider 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 GetProvider(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ProviderState, opts ...pulumi.ResourceOption) (*Provider, error) { var resource Provider err := ctx.ReadResource("azure:attestation/provider:Provider", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Provider resources. type providerState struct { // The URI of the Attestation Service. AttestationUri *string `pulumi:"attestationUri"` // The Azure Region where the Attestation Provider should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for this Attestation Provider. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. OpenEnclavePolicyBase64 *string `pulumi:"openEnclavePolicyBase64"` // A valid X.509 certificate (Section 4 of [RFC4648](https://tools.ietf.org/html/rfc4648)). Changing this forces a new resource to be created. // // > **Note:** If the `policySigningCertificateData` argument contains more than one valid X.509 certificate only the first certificate will be used. PolicySigningCertificateData *string `pulumi:"policySigningCertificateData"` // The name of the Resource Group where the attestation provider should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. // // > **Note:** [More information on the JWT Policies can be found in this article on `learn.microsoft.com`](https://learn.microsoft.com/azure/attestation/author-sign-policy). SevSnpPolicyBase64 *string `pulumi:"sevSnpPolicyBase64"` // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. SgxEnclavePolicyBase64 *string `pulumi:"sgxEnclavePolicyBase64"` // A mapping of tags which should be assigned to the Attestation Provider. Tags map[string]string `pulumi:"tags"` // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. TpmPolicyBase64 *string `pulumi:"tpmPolicyBase64"` // Trust model used for the Attestation Service. TrustModel *string `pulumi:"trustModel"` } type ProviderState struct { // The URI of the Attestation Service. AttestationUri pulumi.StringPtrInput // The Azure Region where the Attestation Provider should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for this Attestation Provider. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. OpenEnclavePolicyBase64 pulumi.StringPtrInput // A valid X.509 certificate (Section 4 of [RFC4648](https://tools.ietf.org/html/rfc4648)). Changing this forces a new resource to be created. // // > **Note:** If the `policySigningCertificateData` argument contains more than one valid X.509 certificate only the first certificate will be used. PolicySigningCertificateData pulumi.StringPtrInput // The name of the Resource Group where the attestation provider should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. // // > **Note:** [More information on the JWT Policies can be found in this article on `learn.microsoft.com`](https://learn.microsoft.com/azure/attestation/author-sign-policy). SevSnpPolicyBase64 pulumi.StringPtrInput // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. SgxEnclavePolicyBase64 pulumi.StringPtrInput // A mapping of tags which should be assigned to the Attestation Provider. Tags pulumi.StringMapInput // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. TpmPolicyBase64 pulumi.StringPtrInput // Trust model used for the Attestation Service. TrustModel pulumi.StringPtrInput } func (ProviderState) ElementType() reflect.Type { return reflect.TypeOf((*providerState)(nil)).Elem() } type providerArgs struct { // The Azure Region where the Attestation Provider should exist. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name which should be used for this Attestation Provider. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. OpenEnclavePolicyBase64 *string `pulumi:"openEnclavePolicyBase64"` // A valid X.509 certificate (Section 4 of [RFC4648](https://tools.ietf.org/html/rfc4648)). Changing this forces a new resource to be created. // // > **Note:** If the `policySigningCertificateData` argument contains more than one valid X.509 certificate only the first certificate will be used. PolicySigningCertificateData *string `pulumi:"policySigningCertificateData"` // The name of the Resource Group where the attestation provider should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. // // > **Note:** [More information on the JWT Policies can be found in this article on `learn.microsoft.com`](https://learn.microsoft.com/azure/attestation/author-sign-policy). SevSnpPolicyBase64 *string `pulumi:"sevSnpPolicyBase64"` // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. SgxEnclavePolicyBase64 *string `pulumi:"sgxEnclavePolicyBase64"` // A mapping of tags which should be assigned to the Attestation Provider. Tags map[string]string `pulumi:"tags"` // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. TpmPolicyBase64 *string `pulumi:"tpmPolicyBase64"` } // The set of arguments for constructing a Provider resource. type ProviderArgs struct { // The Azure Region where the Attestation Provider should exist. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name which should be used for this Attestation Provider. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. OpenEnclavePolicyBase64 pulumi.StringPtrInput // A valid X.509 certificate (Section 4 of [RFC4648](https://tools.ietf.org/html/rfc4648)). Changing this forces a new resource to be created. // // > **Note:** If the `policySigningCertificateData` argument contains more than one valid X.509 certificate only the first certificate will be used. PolicySigningCertificateData pulumi.StringPtrInput // The name of the Resource Group where the attestation provider should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. // // > **Note:** [More information on the JWT Policies can be found in this article on `learn.microsoft.com`](https://learn.microsoft.com/azure/attestation/author-sign-policy). SevSnpPolicyBase64 pulumi.StringPtrInput // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. SgxEnclavePolicyBase64 pulumi.StringPtrInput // A mapping of tags which should be assigned to the Attestation Provider. Tags pulumi.StringMapInput // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. TpmPolicyBase64 pulumi.StringPtrInput } func (ProviderArgs) ElementType() reflect.Type { return reflect.TypeOf((*providerArgs)(nil)).Elem() } type ProviderInput interface { pulumi.Input ToProviderOutput() ProviderOutput ToProviderOutputWithContext(ctx context.Context) ProviderOutput } func (*Provider) ElementType() reflect.Type { return reflect.TypeOf((**Provider)(nil)).Elem() } func (i *Provider) ToProviderOutput() ProviderOutput { return i.ToProviderOutputWithContext(context.Background()) } func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput { return pulumi.ToOutputWithContext(ctx, i).(ProviderOutput) } // ProviderArrayInput is an input type that accepts ProviderArray and ProviderArrayOutput values. // You can construct a concrete instance of `ProviderArrayInput` via: // // ProviderArray{ ProviderArgs{...} } type ProviderArrayInput interface { pulumi.Input ToProviderArrayOutput() ProviderArrayOutput ToProviderArrayOutputWithContext(context.Context) ProviderArrayOutput } type ProviderArray []ProviderInput func (ProviderArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Provider)(nil)).Elem() } func (i ProviderArray) ToProviderArrayOutput() ProviderArrayOutput { return i.ToProviderArrayOutputWithContext(context.Background()) } func (i ProviderArray) ToProviderArrayOutputWithContext(ctx context.Context) ProviderArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ProviderArrayOutput) } // ProviderMapInput is an input type that accepts ProviderMap and ProviderMapOutput values. // You can construct a concrete instance of `ProviderMapInput` via: // // ProviderMap{ "key": ProviderArgs{...} } type ProviderMapInput interface { pulumi.Input ToProviderMapOutput() ProviderMapOutput ToProviderMapOutputWithContext(context.Context) ProviderMapOutput } type ProviderMap map[string]ProviderInput func (ProviderMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Provider)(nil)).Elem() } func (i ProviderMap) ToProviderMapOutput() ProviderMapOutput { return i.ToProviderMapOutputWithContext(context.Background()) } func (i ProviderMap) ToProviderMapOutputWithContext(ctx context.Context) ProviderMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ProviderMapOutput) } type ProviderOutput struct{ *pulumi.OutputState } func (ProviderOutput) ElementType() reflect.Type { return reflect.TypeOf((**Provider)(nil)).Elem() } func (o ProviderOutput) ToProviderOutput() ProviderOutput { return o } func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput { return o } // The URI of the Attestation Service. func (o ProviderOutput) AttestationUri() pulumi.StringOutput { return o.ApplyT(func(v *Provider) pulumi.StringOutput { return v.AttestationUri }).(pulumi.StringOutput) } // The Azure Region where the Attestation Provider should exist. Changing this forces a new resource to be created. func (o ProviderOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Provider) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name which should be used for this Attestation Provider. Changing this forces a new resource to be created. func (o ProviderOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Provider) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. func (o ProviderOutput) OpenEnclavePolicyBase64() pulumi.StringPtrOutput { return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.OpenEnclavePolicyBase64 }).(pulumi.StringPtrOutput) } // A valid X.509 certificate (Section 4 of [RFC4648](https://tools.ietf.org/html/rfc4648)). Changing this forces a new resource to be created. // // > **Note:** If the `policySigningCertificateData` argument contains more than one valid X.509 certificate only the first certificate will be used. func (o ProviderOutput) PolicySigningCertificateData() pulumi.StringPtrOutput { return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.PolicySigningCertificateData }).(pulumi.StringPtrOutput) } // The name of the Resource Group where the attestation provider should exist. Changing this forces a new resource to be created. func (o ProviderOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Provider) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. // // > **Note:** [More information on the JWT Policies can be found in this article on `learn.microsoft.com`](https://learn.microsoft.com/azure/attestation/author-sign-policy). func (o ProviderOutput) SevSnpPolicyBase64() pulumi.StringPtrOutput { return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.SevSnpPolicyBase64 }).(pulumi.StringPtrOutput) } // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. func (o ProviderOutput) SgxEnclavePolicyBase64() pulumi.StringPtrOutput { return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.SgxEnclavePolicyBase64 }).(pulumi.StringPtrOutput) } // A mapping of tags which should be assigned to the Attestation Provider. func (o ProviderOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Provider) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } // Specifies the base64 URI Encoded RFC 7519 JWT that should be used for the Attestation Policy. func (o ProviderOutput) TpmPolicyBase64() pulumi.StringPtrOutput { return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.TpmPolicyBase64 }).(pulumi.StringPtrOutput) } // Trust model used for the Attestation Service. func (o ProviderOutput) TrustModel() pulumi.StringOutput { return o.ApplyT(func(v *Provider) pulumi.StringOutput { return v.TrustModel }).(pulumi.StringOutput) } type ProviderArrayOutput struct{ *pulumi.OutputState } func (ProviderArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Provider)(nil)).Elem() } func (o ProviderArrayOutput) ToProviderArrayOutput() ProviderArrayOutput { return o } func (o ProviderArrayOutput) ToProviderArrayOutputWithContext(ctx context.Context) ProviderArrayOutput { return o } func (o ProviderArrayOutput) Index(i pulumi.IntInput) ProviderOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Provider { return vs[0].([]*Provider)[vs[1].(int)] }).(ProviderOutput) } type ProviderMapOutput struct{ *pulumi.OutputState } func (ProviderMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Provider)(nil)).Elem() } func (o ProviderMapOutput) ToProviderMapOutput() ProviderMapOutput { return o } func (o ProviderMapOutput) ToProviderMapOutputWithContext(ctx context.Context) ProviderMapOutput { return o } func (o ProviderMapOutput) MapIndex(k pulumi.StringInput) ProviderOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Provider { return vs[0].(map[string]*Provider)[vs[1].(string)] }).(ProviderOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ProviderInput)(nil)).Elem(), &Provider{}) pulumi.RegisterInputType(reflect.TypeOf((*ProviderArrayInput)(nil)).Elem(), ProviderArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ProviderMapInput)(nil)).Elem(), ProviderMap{}) pulumi.RegisterOutputType(ProviderOutput{}) pulumi.RegisterOutputType(ProviderArrayOutput{}) pulumi.RegisterOutputType(ProviderMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/attestation/getProvider.go
sdk/go/azure/attestation/getProvider.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package attestation 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 Attestation Provider. func LookupProvider(ctx *pulumi.Context, args *LookupProviderArgs, opts ...pulumi.InvokeOption) (*LookupProviderResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupProviderResult err := ctx.Invoke("azure:attestation/getProvider:getProvider", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getProvider. type LookupProviderArgs struct { // The name of this Attestation Provider. Name string `pulumi:"name"` // The name of the Resource Group where the Attestation Provider exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getProvider. type LookupProviderResult struct { // The (Endpoint|URI) of the Attestation Service. AttestationUri string `pulumi:"attestationUri"` // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` // The Azure Region where the Attestation Provider exists. Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags assigned to the Attestation Provider. Tags map[string]string `pulumi:"tags"` // Trust model used for the Attestation Service. TrustModel string `pulumi:"trustModel"` } func LookupProviderOutput(ctx *pulumi.Context, args LookupProviderOutputArgs, opts ...pulumi.InvokeOption) LookupProviderResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupProviderResultOutput, error) { args := v.(LookupProviderArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:attestation/getProvider:getProvider", args, LookupProviderResultOutput{}, options).(LookupProviderResultOutput), nil }).(LookupProviderResultOutput) } // A collection of arguments for invoking getProvider. type LookupProviderOutputArgs struct { // The name of this Attestation Provider. Name pulumi.StringInput `pulumi:"name"` // The name of the Resource Group where the Attestation Provider exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupProviderOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupProviderArgs)(nil)).Elem() } // A collection of values returned by getProvider. type LookupProviderResultOutput struct{ *pulumi.OutputState } func (LookupProviderResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupProviderResult)(nil)).Elem() } func (o LookupProviderResultOutput) ToLookupProviderResultOutput() LookupProviderResultOutput { return o } func (o LookupProviderResultOutput) ToLookupProviderResultOutputWithContext(ctx context.Context) LookupProviderResultOutput { return o } // The (Endpoint|URI) of the Attestation Service. func (o LookupProviderResultOutput) AttestationUri() pulumi.StringOutput { return o.ApplyT(func(v LookupProviderResult) string { return v.AttestationUri }).(pulumi.StringOutput) } // The provider-assigned unique ID for this managed resource. func (o LookupProviderResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupProviderResult) string { return v.Id }).(pulumi.StringOutput) } // The Azure Region where the Attestation Provider exists. func (o LookupProviderResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupProviderResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupProviderResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupProviderResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupProviderResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupProviderResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags assigned to the Attestation Provider. func (o LookupProviderResultOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v LookupProviderResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) } // Trust model used for the Attestation Service. func (o LookupProviderResultOutput) TrustModel() pulumi.StringOutput { return o.ApplyT(func(v LookupProviderResult) string { return v.TrustModel }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupProviderResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/managedapplication/init.go
sdk/go/azure/managedapplication/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 managedapplication 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:managedapplication/application:Application": r = &Application{} case "azure:managedapplication/definition:Definition": r = &Definition{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) return } func init() { version, err := internal.PkgVersion() if err != nil { version = semver.Version{Major: 1} } pulumi.RegisterResourceModule( "azure", "managedapplication/application", &module{version}, ) pulumi.RegisterResourceModule( "azure", "managedapplication/definition", &module{version}, ) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/managedapplication/pulumiTypes.go
sdk/go/azure/managedapplication/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 managedapplication 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 ApplicationPlan struct { // Specifies the name of the plan from the marketplace. Changing this forces a new resource to be created. Name string `pulumi:"name"` // Specifies the product of the plan from the marketplace. Changing this forces a new resource to be created. Product string `pulumi:"product"` // Specifies the promotion code to use with the plan. Changing this forces a new resource to be created. // // > **Note:** When `plan` is specified, legal terms must be accepted for this item on this subscription before creating the Managed Application. The `marketplace.Agreement` resource or AZ CLI tool can be used to do this. PromotionCode *string `pulumi:"promotionCode"` // Specifies the publisher of the plan. Changing this forces a new resource to be created. Publisher string `pulumi:"publisher"` // Specifies the version of the plan from the marketplace. Changing this forces a new resource to be created. Version string `pulumi:"version"` } // ApplicationPlanInput is an input type that accepts ApplicationPlanArgs and ApplicationPlanOutput values. // You can construct a concrete instance of `ApplicationPlanInput` via: // // ApplicationPlanArgs{...} type ApplicationPlanInput interface { pulumi.Input ToApplicationPlanOutput() ApplicationPlanOutput ToApplicationPlanOutputWithContext(context.Context) ApplicationPlanOutput } type ApplicationPlanArgs struct { // Specifies the name of the plan from the marketplace. Changing this forces a new resource to be created. Name pulumi.StringInput `pulumi:"name"` // Specifies the product of the plan from the marketplace. Changing this forces a new resource to be created. Product pulumi.StringInput `pulumi:"product"` // Specifies the promotion code to use with the plan. Changing this forces a new resource to be created. // // > **Note:** When `plan` is specified, legal terms must be accepted for this item on this subscription before creating the Managed Application. The `marketplace.Agreement` resource or AZ CLI tool can be used to do this. PromotionCode pulumi.StringPtrInput `pulumi:"promotionCode"` // Specifies the publisher of the plan. Changing this forces a new resource to be created. Publisher pulumi.StringInput `pulumi:"publisher"` // Specifies the version of the plan from the marketplace. Changing this forces a new resource to be created. Version pulumi.StringInput `pulumi:"version"` } func (ApplicationPlanArgs) ElementType() reflect.Type { return reflect.TypeOf((*ApplicationPlan)(nil)).Elem() } func (i ApplicationPlanArgs) ToApplicationPlanOutput() ApplicationPlanOutput { return i.ToApplicationPlanOutputWithContext(context.Background()) } func (i ApplicationPlanArgs) ToApplicationPlanOutputWithContext(ctx context.Context) ApplicationPlanOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationPlanOutput) } func (i ApplicationPlanArgs) ToApplicationPlanPtrOutput() ApplicationPlanPtrOutput { return i.ToApplicationPlanPtrOutputWithContext(context.Background()) } func (i ApplicationPlanArgs) ToApplicationPlanPtrOutputWithContext(ctx context.Context) ApplicationPlanPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationPlanOutput).ToApplicationPlanPtrOutputWithContext(ctx) } // ApplicationPlanPtrInput is an input type that accepts ApplicationPlanArgs, ApplicationPlanPtr and ApplicationPlanPtrOutput values. // You can construct a concrete instance of `ApplicationPlanPtrInput` via: // // ApplicationPlanArgs{...} // // or: // // nil type ApplicationPlanPtrInput interface { pulumi.Input ToApplicationPlanPtrOutput() ApplicationPlanPtrOutput ToApplicationPlanPtrOutputWithContext(context.Context) ApplicationPlanPtrOutput } type applicationPlanPtrType ApplicationPlanArgs func ApplicationPlanPtr(v *ApplicationPlanArgs) ApplicationPlanPtrInput { return (*applicationPlanPtrType)(v) } func (*applicationPlanPtrType) ElementType() reflect.Type { return reflect.TypeOf((**ApplicationPlan)(nil)).Elem() } func (i *applicationPlanPtrType) ToApplicationPlanPtrOutput() ApplicationPlanPtrOutput { return i.ToApplicationPlanPtrOutputWithContext(context.Background()) } func (i *applicationPlanPtrType) ToApplicationPlanPtrOutputWithContext(ctx context.Context) ApplicationPlanPtrOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationPlanPtrOutput) } type ApplicationPlanOutput struct{ *pulumi.OutputState } func (ApplicationPlanOutput) ElementType() reflect.Type { return reflect.TypeOf((*ApplicationPlan)(nil)).Elem() } func (o ApplicationPlanOutput) ToApplicationPlanOutput() ApplicationPlanOutput { return o } func (o ApplicationPlanOutput) ToApplicationPlanOutputWithContext(ctx context.Context) ApplicationPlanOutput { return o } func (o ApplicationPlanOutput) ToApplicationPlanPtrOutput() ApplicationPlanPtrOutput { return o.ToApplicationPlanPtrOutputWithContext(context.Background()) } func (o ApplicationPlanOutput) ToApplicationPlanPtrOutputWithContext(ctx context.Context) ApplicationPlanPtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v ApplicationPlan) *ApplicationPlan { return &v }).(ApplicationPlanPtrOutput) } // Specifies the name of the plan from the marketplace. Changing this forces a new resource to be created. func (o ApplicationPlanOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v ApplicationPlan) string { return v.Name }).(pulumi.StringOutput) } // Specifies the product of the plan from the marketplace. Changing this forces a new resource to be created. func (o ApplicationPlanOutput) Product() pulumi.StringOutput { return o.ApplyT(func(v ApplicationPlan) string { return v.Product }).(pulumi.StringOutput) } // Specifies the promotion code to use with the plan. Changing this forces a new resource to be created. // // > **Note:** When `plan` is specified, legal terms must be accepted for this item on this subscription before creating the Managed Application. The `marketplace.Agreement` resource or AZ CLI tool can be used to do this. func (o ApplicationPlanOutput) PromotionCode() pulumi.StringPtrOutput { return o.ApplyT(func(v ApplicationPlan) *string { return v.PromotionCode }).(pulumi.StringPtrOutput) } // Specifies the publisher of the plan. Changing this forces a new resource to be created. func (o ApplicationPlanOutput) Publisher() pulumi.StringOutput { return o.ApplyT(func(v ApplicationPlan) string { return v.Publisher }).(pulumi.StringOutput) } // Specifies the version of the plan from the marketplace. Changing this forces a new resource to be created. func (o ApplicationPlanOutput) Version() pulumi.StringOutput { return o.ApplyT(func(v ApplicationPlan) string { return v.Version }).(pulumi.StringOutput) } type ApplicationPlanPtrOutput struct{ *pulumi.OutputState } func (ApplicationPlanPtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**ApplicationPlan)(nil)).Elem() } func (o ApplicationPlanPtrOutput) ToApplicationPlanPtrOutput() ApplicationPlanPtrOutput { return o } func (o ApplicationPlanPtrOutput) ToApplicationPlanPtrOutputWithContext(ctx context.Context) ApplicationPlanPtrOutput { return o } func (o ApplicationPlanPtrOutput) Elem() ApplicationPlanOutput { return o.ApplyT(func(v *ApplicationPlan) ApplicationPlan { if v != nil { return *v } var ret ApplicationPlan return ret }).(ApplicationPlanOutput) } // Specifies the name of the plan from the marketplace. Changing this forces a new resource to be created. func (o ApplicationPlanPtrOutput) Name() pulumi.StringPtrOutput { return o.ApplyT(func(v *ApplicationPlan) *string { if v == nil { return nil } return &v.Name }).(pulumi.StringPtrOutput) } // Specifies the product of the plan from the marketplace. Changing this forces a new resource to be created. func (o ApplicationPlanPtrOutput) Product() pulumi.StringPtrOutput { return o.ApplyT(func(v *ApplicationPlan) *string { if v == nil { return nil } return &v.Product }).(pulumi.StringPtrOutput) } // Specifies the promotion code to use with the plan. Changing this forces a new resource to be created. // // > **Note:** When `plan` is specified, legal terms must be accepted for this item on this subscription before creating the Managed Application. The `marketplace.Agreement` resource or AZ CLI tool can be used to do this. func (o ApplicationPlanPtrOutput) PromotionCode() pulumi.StringPtrOutput { return o.ApplyT(func(v *ApplicationPlan) *string { if v == nil { return nil } return v.PromotionCode }).(pulumi.StringPtrOutput) } // Specifies the publisher of the plan. Changing this forces a new resource to be created. func (o ApplicationPlanPtrOutput) Publisher() pulumi.StringPtrOutput { return o.ApplyT(func(v *ApplicationPlan) *string { if v == nil { return nil } return &v.Publisher }).(pulumi.StringPtrOutput) } // Specifies the version of the plan from the marketplace. Changing this forces a new resource to be created. func (o ApplicationPlanPtrOutput) Version() pulumi.StringPtrOutput { return o.ApplyT(func(v *ApplicationPlan) *string { if v == nil { return nil } return &v.Version }).(pulumi.StringPtrOutput) } type DefinitionAuthorization struct { // Specifies a role definition identifier for the provider. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group. RoleDefinitionId string `pulumi:"roleDefinitionId"` // Specifies a service principal identifier for the provider. This is the identity that the provider will use to call ARM to manage the managed application resources. ServicePrincipalId string `pulumi:"servicePrincipalId"` } // DefinitionAuthorizationInput is an input type that accepts DefinitionAuthorizationArgs and DefinitionAuthorizationOutput values. // You can construct a concrete instance of `DefinitionAuthorizationInput` via: // // DefinitionAuthorizationArgs{...} type DefinitionAuthorizationInput interface { pulumi.Input ToDefinitionAuthorizationOutput() DefinitionAuthorizationOutput ToDefinitionAuthorizationOutputWithContext(context.Context) DefinitionAuthorizationOutput } type DefinitionAuthorizationArgs struct { // Specifies a role definition identifier for the provider. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group. RoleDefinitionId pulumi.StringInput `pulumi:"roleDefinitionId"` // Specifies a service principal identifier for the provider. This is the identity that the provider will use to call ARM to manage the managed application resources. ServicePrincipalId pulumi.StringInput `pulumi:"servicePrincipalId"` } func (DefinitionAuthorizationArgs) ElementType() reflect.Type { return reflect.TypeOf((*DefinitionAuthorization)(nil)).Elem() } func (i DefinitionAuthorizationArgs) ToDefinitionAuthorizationOutput() DefinitionAuthorizationOutput { return i.ToDefinitionAuthorizationOutputWithContext(context.Background()) } func (i DefinitionAuthorizationArgs) ToDefinitionAuthorizationOutputWithContext(ctx context.Context) DefinitionAuthorizationOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionAuthorizationOutput) } // DefinitionAuthorizationArrayInput is an input type that accepts DefinitionAuthorizationArray and DefinitionAuthorizationArrayOutput values. // You can construct a concrete instance of `DefinitionAuthorizationArrayInput` via: // // DefinitionAuthorizationArray{ DefinitionAuthorizationArgs{...} } type DefinitionAuthorizationArrayInput interface { pulumi.Input ToDefinitionAuthorizationArrayOutput() DefinitionAuthorizationArrayOutput ToDefinitionAuthorizationArrayOutputWithContext(context.Context) DefinitionAuthorizationArrayOutput } type DefinitionAuthorizationArray []DefinitionAuthorizationInput func (DefinitionAuthorizationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]DefinitionAuthorization)(nil)).Elem() } func (i DefinitionAuthorizationArray) ToDefinitionAuthorizationArrayOutput() DefinitionAuthorizationArrayOutput { return i.ToDefinitionAuthorizationArrayOutputWithContext(context.Background()) } func (i DefinitionAuthorizationArray) ToDefinitionAuthorizationArrayOutputWithContext(ctx context.Context) DefinitionAuthorizationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionAuthorizationArrayOutput) } type DefinitionAuthorizationOutput struct{ *pulumi.OutputState } func (DefinitionAuthorizationOutput) ElementType() reflect.Type { return reflect.TypeOf((*DefinitionAuthorization)(nil)).Elem() } func (o DefinitionAuthorizationOutput) ToDefinitionAuthorizationOutput() DefinitionAuthorizationOutput { return o } func (o DefinitionAuthorizationOutput) ToDefinitionAuthorizationOutputWithContext(ctx context.Context) DefinitionAuthorizationOutput { return o } // Specifies a role definition identifier for the provider. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group. func (o DefinitionAuthorizationOutput) RoleDefinitionId() pulumi.StringOutput { return o.ApplyT(func(v DefinitionAuthorization) string { return v.RoleDefinitionId }).(pulumi.StringOutput) } // Specifies a service principal identifier for the provider. This is the identity that the provider will use to call ARM to manage the managed application resources. func (o DefinitionAuthorizationOutput) ServicePrincipalId() pulumi.StringOutput { return o.ApplyT(func(v DefinitionAuthorization) string { return v.ServicePrincipalId }).(pulumi.StringOutput) } type DefinitionAuthorizationArrayOutput struct{ *pulumi.OutputState } func (DefinitionAuthorizationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]DefinitionAuthorization)(nil)).Elem() } func (o DefinitionAuthorizationArrayOutput) ToDefinitionAuthorizationArrayOutput() DefinitionAuthorizationArrayOutput { return o } func (o DefinitionAuthorizationArrayOutput) ToDefinitionAuthorizationArrayOutputWithContext(ctx context.Context) DefinitionAuthorizationArrayOutput { return o } func (o DefinitionAuthorizationArrayOutput) Index(i pulumi.IntInput) DefinitionAuthorizationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) DefinitionAuthorization { return vs[0].([]DefinitionAuthorization)[vs[1].(int)] }).(DefinitionAuthorizationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ApplicationPlanInput)(nil)).Elem(), ApplicationPlanArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*ApplicationPlanPtrInput)(nil)).Elem(), ApplicationPlanArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*DefinitionAuthorizationInput)(nil)).Elem(), DefinitionAuthorizationArgs{}) pulumi.RegisterInputType(reflect.TypeOf((*DefinitionAuthorizationArrayInput)(nil)).Elem(), DefinitionAuthorizationArray{}) pulumi.RegisterOutputType(ApplicationPlanOutput{}) pulumi.RegisterOutputType(ApplicationPlanPtrOutput{}) pulumi.RegisterOutputType(DefinitionAuthorizationOutput{}) pulumi.RegisterOutputType(DefinitionAuthorizationArrayOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/managedapplication/application.go
sdk/go/azure/managedapplication/application.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package managedapplication import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Managed Application. // // ## Example Usage // // ```go // package main // // import ( // // "encoding/json" // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/managedapplication" // "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 // } // builtin, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{ // Name: pulumi.StringRef("Contributor"), // }, 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 // } // invokeSplit, err := std.Split(ctx, &std.SplitArgs{ // Separator: "/", // Text: builtin.Id, // }, nil) // if err != nil { // return err // } // invokeSplit1, err := std.Split(ctx, &std.SplitArgs{ // Separator: "/", // Text: builtin.Id, // }, nil) // if err != nil { // return err // } // exampleDefinition, err := managedapplication.NewDefinition(ctx, "example", &managedapplication.DefinitionArgs{ // Name: pulumi.String("examplemanagedapplicationdefinition"), // Location: example.Location, // ResourceGroupName: example.Name, // LockLevel: pulumi.String("ReadOnly"), // PackageFileUri: pulumi.String("https://github.com/Azure/azure-managedapp-samples/raw/master/Managed Application Sample Packages/201-managed-storage-account/managedstorage.zip"), // DisplayName: pulumi.String("TestManagedAppDefinition"), // Description: pulumi.String("Test Managed App Definition"), // Authorizations: managedapplication.DefinitionAuthorizationArray{ // &managedapplication.DefinitionAuthorizationArgs{ // ServicePrincipalId: pulumi.String(current.ObjectId), // RoleDefinitionId: len(invokeSplit.Result).ApplyT(func(length int) (string, error) { // %!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)).(pulumi.StringOutput), // }, // }, // }) // if err != nil { // return err // } // _, err = managedapplication.NewApplication(ctx, "example", &managedapplication.ApplicationArgs{ // Name: pulumi.String("example-managedapplication"), // Location: example.Location, // ResourceGroupName: example.Name, // Kind: pulumi.String("ServiceCatalog"), // ManagedResourceGroupName: pulumi.String("infrastructureGroup"), // ApplicationDefinitionId: exampleDefinition.ID(), // ParameterValues: example.Location.ApplyT(func(location string) (pulumi.String, error) { // var _zero pulumi.String // tmpJSON0, err := json.Marshal(map[string]interface{}{ // "location": map[string]interface{}{ // "value": location, // }, // "storageAccountNamePrefix": map[string]interface{}{ // "value": "storeNamePrefix", // }, // "storageAccountType": map[string]interface{}{ // "value": "Standard_LRS", // }, // }) // if err != nil { // return _zero, err // } // json0 := string(tmpJSON0) // return pulumi.String(json0), nil // }).(pulumi.StringOutput), // }) // 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.Solutions` - 2021-07-01 // // ## Import // // Managed Application can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:managedapplication/application:Application example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Solutions/applications/app1 // ``` type Application struct { pulumi.CustomResourceState // The application definition ID to deploy. ApplicationDefinitionId pulumi.StringPtrOutput `pulumi:"applicationDefinitionId"` // The kind of the managed application to deploy. Possible values are `MarketPlace` and `ServiceCatalog`. Changing this forces a new resource to be created. Kind pulumi.StringOutput `pulumi:"kind"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringOutput `pulumi:"location"` // The name of the target resource group where all the resources deployed by the managed application will reside. Changing this forces a new resource to be created. ManagedResourceGroupName pulumi.StringOutput `pulumi:"managedResourceGroupName"` // Specifies the name of the Managed Application. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name and value pairs that define the managed application outputs. Outputs pulumi.StringMapOutput `pulumi:"outputs"` // The parameter values to pass to the Managed Application. This field is a JSON object that allows you to assign parameters to this Managed Application. ParameterValues pulumi.StringOutput `pulumi:"parameterValues"` // One `plan` block as defined below. Changing this forces a new resource to be created. Plan ApplicationPlanPtrOutput `pulumi:"plan"` // The name of the Resource Group where the Managed Application should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewApplication registers a new resource with the given unique name, arguments, and options. func NewApplication(ctx *pulumi.Context, name string, args *ApplicationArgs, opts ...pulumi.ResourceOption) (*Application, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Kind == nil { return nil, errors.New("invalid value for required argument 'Kind'") } if args.ManagedResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ManagedResourceGroupName'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Application err := ctx.RegisterResource("azure:managedapplication/application:Application", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetApplication gets an existing Application 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 GetApplication(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ApplicationState, opts ...pulumi.ResourceOption) (*Application, error) { var resource Application err := ctx.ReadResource("azure:managedapplication/application:Application", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Application resources. type applicationState struct { // The application definition ID to deploy. ApplicationDefinitionId *string `pulumi:"applicationDefinitionId"` // The kind of the managed application to deploy. Possible values are `MarketPlace` and `ServiceCatalog`. Changing this forces a new resource to be created. Kind *string `pulumi:"kind"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the target resource group where all the resources deployed by the managed application will reside. Changing this forces a new resource to be created. ManagedResourceGroupName *string `pulumi:"managedResourceGroupName"` // Specifies the name of the Managed Application. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name and value pairs that define the managed application outputs. Outputs map[string]string `pulumi:"outputs"` // The parameter values to pass to the Managed Application. This field is a JSON object that allows you to assign parameters to this Managed Application. ParameterValues *string `pulumi:"parameterValues"` // One `plan` block as defined below. Changing this forces a new resource to be created. Plan *ApplicationPlan `pulumi:"plan"` // The name of the Resource Group where the Managed Application should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } type ApplicationState struct { // The application definition ID to deploy. ApplicationDefinitionId pulumi.StringPtrInput // The kind of the managed application to deploy. Possible values are `MarketPlace` and `ServiceCatalog`. Changing this forces a new resource to be created. Kind pulumi.StringPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the target resource group where all the resources deployed by the managed application will reside. Changing this forces a new resource to be created. ManagedResourceGroupName pulumi.StringPtrInput // Specifies the name of the Managed Application. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name and value pairs that define the managed application outputs. Outputs pulumi.StringMapInput // The parameter values to pass to the Managed Application. This field is a JSON object that allows you to assign parameters to this Managed Application. ParameterValues pulumi.StringPtrInput // One `plan` block as defined below. Changing this forces a new resource to be created. Plan ApplicationPlanPtrInput // The name of the Resource Group where the Managed Application should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (ApplicationState) ElementType() reflect.Type { return reflect.TypeOf((*applicationState)(nil)).Elem() } type applicationArgs struct { // The application definition ID to deploy. ApplicationDefinitionId *string `pulumi:"applicationDefinitionId"` // The kind of the managed application to deploy. Possible values are `MarketPlace` and `ServiceCatalog`. Changing this forces a new resource to be created. Kind string `pulumi:"kind"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // The name of the target resource group where all the resources deployed by the managed application will reside. Changing this forces a new resource to be created. ManagedResourceGroupName string `pulumi:"managedResourceGroupName"` // Specifies the name of the Managed Application. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The parameter values to pass to the Managed Application. This field is a JSON object that allows you to assign parameters to this Managed Application. ParameterValues *string `pulumi:"parameterValues"` // One `plan` block as defined below. Changing this forces a new resource to be created. Plan *ApplicationPlan `pulumi:"plan"` // The name of the Resource Group where the Managed Application should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Application resource. type ApplicationArgs struct { // The application definition ID to deploy. ApplicationDefinitionId pulumi.StringPtrInput // The kind of the managed application to deploy. Possible values are `MarketPlace` and `ServiceCatalog`. Changing this forces a new resource to be created. Kind pulumi.StringInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // The name of the target resource group where all the resources deployed by the managed application will reside. Changing this forces a new resource to be created. ManagedResourceGroupName pulumi.StringInput // Specifies the name of the Managed Application. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The parameter values to pass to the Managed Application. This field is a JSON object that allows you to assign parameters to this Managed Application. ParameterValues pulumi.StringPtrInput // One `plan` block as defined below. Changing this forces a new resource to be created. Plan ApplicationPlanPtrInput // The name of the Resource Group where the Managed Application should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. Tags pulumi.StringMapInput } func (ApplicationArgs) ElementType() reflect.Type { return reflect.TypeOf((*applicationArgs)(nil)).Elem() } type ApplicationInput interface { pulumi.Input ToApplicationOutput() ApplicationOutput ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput } func (*Application) ElementType() reflect.Type { return reflect.TypeOf((**Application)(nil)).Elem() } func (i *Application) ToApplicationOutput() ApplicationOutput { return i.ToApplicationOutputWithContext(context.Background()) } func (i *Application) ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationOutput) } // ApplicationArrayInput is an input type that accepts ApplicationArray and ApplicationArrayOutput values. // You can construct a concrete instance of `ApplicationArrayInput` via: // // ApplicationArray{ ApplicationArgs{...} } type ApplicationArrayInput interface { pulumi.Input ToApplicationArrayOutput() ApplicationArrayOutput ToApplicationArrayOutputWithContext(context.Context) ApplicationArrayOutput } type ApplicationArray []ApplicationInput func (ApplicationArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Application)(nil)).Elem() } func (i ApplicationArray) ToApplicationArrayOutput() ApplicationArrayOutput { return i.ToApplicationArrayOutputWithContext(context.Background()) } func (i ApplicationArray) ToApplicationArrayOutputWithContext(ctx context.Context) ApplicationArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationArrayOutput) } // ApplicationMapInput is an input type that accepts ApplicationMap and ApplicationMapOutput values. // You can construct a concrete instance of `ApplicationMapInput` via: // // ApplicationMap{ "key": ApplicationArgs{...} } type ApplicationMapInput interface { pulumi.Input ToApplicationMapOutput() ApplicationMapOutput ToApplicationMapOutputWithContext(context.Context) ApplicationMapOutput } type ApplicationMap map[string]ApplicationInput func (ApplicationMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Application)(nil)).Elem() } func (i ApplicationMap) ToApplicationMapOutput() ApplicationMapOutput { return i.ToApplicationMapOutputWithContext(context.Background()) } func (i ApplicationMap) ToApplicationMapOutputWithContext(ctx context.Context) ApplicationMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ApplicationMapOutput) } type ApplicationOutput struct{ *pulumi.OutputState } func (ApplicationOutput) ElementType() reflect.Type { return reflect.TypeOf((**Application)(nil)).Elem() } func (o ApplicationOutput) ToApplicationOutput() ApplicationOutput { return o } func (o ApplicationOutput) ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput { return o } // The application definition ID to deploy. func (o ApplicationOutput) ApplicationDefinitionId() pulumi.StringPtrOutput { return o.ApplyT(func(v *Application) pulumi.StringPtrOutput { return v.ApplicationDefinitionId }).(pulumi.StringPtrOutput) } // The kind of the managed application to deploy. Possible values are `MarketPlace` and `ServiceCatalog`. Changing this forces a new resource to be created. func (o ApplicationOutput) Kind() pulumi.StringOutput { return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.Kind }).(pulumi.StringOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o ApplicationOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // The name of the target resource group where all the resources deployed by the managed application will reside. Changing this forces a new resource to be created. func (o ApplicationOutput) ManagedResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.ManagedResourceGroupName }).(pulumi.StringOutput) } // Specifies the name of the Managed Application. Changing this forces a new resource to be created. func (o ApplicationOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name and value pairs that define the managed application outputs. func (o ApplicationOutput) Outputs() pulumi.StringMapOutput { return o.ApplyT(func(v *Application) pulumi.StringMapOutput { return v.Outputs }).(pulumi.StringMapOutput) } // The parameter values to pass to the Managed Application. This field is a JSON object that allows you to assign parameters to this Managed Application. func (o ApplicationOutput) ParameterValues() pulumi.StringOutput { return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.ParameterValues }).(pulumi.StringOutput) } // One `plan` block as defined below. Changing this forces a new resource to be created. func (o ApplicationOutput) Plan() ApplicationPlanPtrOutput { return o.ApplyT(func(v *Application) ApplicationPlanPtrOutput { return v.Plan }).(ApplicationPlanPtrOutput) } // The name of the Resource Group where the Managed Application should exist. Changing this forces a new resource to be created. func (o ApplicationOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. func (o ApplicationOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Application) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type ApplicationArrayOutput struct{ *pulumi.OutputState } func (ApplicationArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Application)(nil)).Elem() } func (o ApplicationArrayOutput) ToApplicationArrayOutput() ApplicationArrayOutput { return o } func (o ApplicationArrayOutput) ToApplicationArrayOutputWithContext(ctx context.Context) ApplicationArrayOutput { return o } func (o ApplicationArrayOutput) Index(i pulumi.IntInput) ApplicationOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Application { return vs[0].([]*Application)[vs[1].(int)] }).(ApplicationOutput) } type ApplicationMapOutput struct{ *pulumi.OutputState } func (ApplicationMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Application)(nil)).Elem() } func (o ApplicationMapOutput) ToApplicationMapOutput() ApplicationMapOutput { return o } func (o ApplicationMapOutput) ToApplicationMapOutputWithContext(ctx context.Context) ApplicationMapOutput { return o } func (o ApplicationMapOutput) MapIndex(k pulumi.StringInput) ApplicationOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Application { return vs[0].(map[string]*Application)[vs[1].(string)] }).(ApplicationOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ApplicationInput)(nil)).Elem(), &Application{}) pulumi.RegisterInputType(reflect.TypeOf((*ApplicationArrayInput)(nil)).Elem(), ApplicationArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ApplicationMapInput)(nil)).Elem(), ApplicationMap{}) pulumi.RegisterOutputType(ApplicationOutput{}) pulumi.RegisterOutputType(ApplicationArrayOutput{}) pulumi.RegisterOutputType(ApplicationMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/managedapplication/getDefinition.go
sdk/go/azure/managedapplication/getDefinition.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package managedapplication import ( "context" "reflect" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Uses this data source to access information about an existing Managed Application Definition. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/managedapplication" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // example, err := managedapplication.LookupDefinition(ctx, &managedapplication.LookupDefinitionArgs{ // Name: "examplemanagedappdef", // ResourceGroupName: "exampleresources", // }, 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.Solutions` - 2021-07-01 func LookupDefinition(ctx *pulumi.Context, args *LookupDefinitionArgs, opts ...pulumi.InvokeOption) (*LookupDefinitionResult, error) { opts = internal.PkgInvokeDefaultOpts(opts) var rv LookupDefinitionResult err := ctx.Invoke("azure:managedapplication/getDefinition:getDefinition", args, &rv, opts...) if err != nil { return nil, err } return &rv, nil } // A collection of arguments for invoking getDefinition. type LookupDefinitionArgs struct { // Specifies the name of the Managed Application Definition. Name string `pulumi:"name"` // Specifies the name of the Resource Group where this Managed Application Definition exists. ResourceGroupName string `pulumi:"resourceGroupName"` } // A collection of values returned by getDefinition. type LookupDefinitionResult struct { // The provider-assigned unique ID for this managed resource. Id string `pulumi:"id"` Location string `pulumi:"location"` Name string `pulumi:"name"` ResourceGroupName string `pulumi:"resourceGroupName"` } func LookupDefinitionOutput(ctx *pulumi.Context, args LookupDefinitionOutputArgs, opts ...pulumi.InvokeOption) LookupDefinitionResultOutput { return pulumi.ToOutputWithContext(ctx.Context(), args). ApplyT(func(v interface{}) (LookupDefinitionResultOutput, error) { args := v.(LookupDefinitionArgs) options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} return ctx.InvokeOutput("azure:managedapplication/getDefinition:getDefinition", args, LookupDefinitionResultOutput{}, options).(LookupDefinitionResultOutput), nil }).(LookupDefinitionResultOutput) } // A collection of arguments for invoking getDefinition. type LookupDefinitionOutputArgs struct { // Specifies the name of the Managed Application Definition. Name pulumi.StringInput `pulumi:"name"` // Specifies the name of the Resource Group where this Managed Application Definition exists. ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"` } func (LookupDefinitionOutputArgs) ElementType() reflect.Type { return reflect.TypeOf((*LookupDefinitionArgs)(nil)).Elem() } // A collection of values returned by getDefinition. type LookupDefinitionResultOutput struct{ *pulumi.OutputState } func (LookupDefinitionResultOutput) ElementType() reflect.Type { return reflect.TypeOf((*LookupDefinitionResult)(nil)).Elem() } func (o LookupDefinitionResultOutput) ToLookupDefinitionResultOutput() LookupDefinitionResultOutput { return o } func (o LookupDefinitionResultOutput) ToLookupDefinitionResultOutputWithContext(ctx context.Context) LookupDefinitionResultOutput { return o } // The provider-assigned unique ID for this managed resource. func (o LookupDefinitionResultOutput) Id() pulumi.StringOutput { return o.ApplyT(func(v LookupDefinitionResult) string { return v.Id }).(pulumi.StringOutput) } func (o LookupDefinitionResultOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v LookupDefinitionResult) string { return v.Location }).(pulumi.StringOutput) } func (o LookupDefinitionResultOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v LookupDefinitionResult) string { return v.Name }).(pulumi.StringOutput) } func (o LookupDefinitionResultOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v LookupDefinitionResult) string { return v.ResourceGroupName }).(pulumi.StringOutput) } func init() { pulumi.RegisterOutputType(LookupDefinitionResultOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/managedapplication/definition.go
sdk/go/azure/managedapplication/definition.go
// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package managedapplication import ( "context" "reflect" "errors" "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Manages a Managed Application Definition. // // ## 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/managedapplication" // "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 // } // _, err = managedapplication.NewDefinition(ctx, "example", &managedapplication.DefinitionArgs{ // Name: pulumi.String("examplemanagedapplicationdefinition"), // Location: example.Location, // ResourceGroupName: example.Name, // LockLevel: pulumi.String("ReadOnly"), // PackageFileUri: pulumi.String("https://github.com/Azure/azure-managedapp-samples/raw/master/Managed Application Sample Packages/201-managed-storage-account/managedstorage.zip"), // DisplayName: pulumi.String("TestManagedApplicationDefinition"), // Description: pulumi.String("Test Managed Application Definition"), // Authorizations: managedapplication.DefinitionAuthorizationArray{ // &managedapplication.DefinitionAuthorizationArgs{ // ServicePrincipalId: pulumi.String(current.ObjectId), // RoleDefinitionId: pulumi.String("a094b430-dad3-424d-ae58-13f72fd72591"), // }, // }, // }) // 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.Solutions` - 2021-07-01 // // ## Import // // Managed Application Definition can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:managedapplication/definition:Definition example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Solutions/applicationDefinitions/appDefinition1 // ``` type Definition struct { pulumi.CustomResourceState // One or more `authorization` block defined below. Authorizations DefinitionAuthorizationArrayOutput `pulumi:"authorizations"` // Specifies the `createUiDefinition` JSON for the backing template with `Microsoft.Solutions/applications` resource. CreateUiDefinition pulumi.StringPtrOutput `pulumi:"createUiDefinition"` // Specifies the managed application definition description. Description pulumi.StringPtrOutput `pulumi:"description"` // Specifies the managed application definition display name. DisplayName pulumi.StringOutput `pulumi:"displayName"` // 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 managed application lock level. Valid values include `CanNotDelete`, `None`, `ReadOnly`. Changing this forces a new resource to be created. LockLevel pulumi.StringOutput `pulumi:"lockLevel"` // Specifies the inline main template JSON which has resources to be provisioned. MainTemplate pulumi.StringPtrOutput `pulumi:"mainTemplate"` // Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // Is the package enabled? Defaults to `true`. PackageEnabled pulumi.BoolPtrOutput `pulumi:"packageEnabled"` // Specifies the managed application definition package file Uri. PackageFileUri pulumi.StringPtrOutput `pulumi:"packageFileUri"` // The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. // // > **Note:** If either `createUiDefinition` or `mainTemplate` is set they both must be set. Tags pulumi.StringMapOutput `pulumi:"tags"` } // NewDefinition registers a new resource with the given unique name, arguments, and options. func NewDefinition(ctx *pulumi.Context, name string, args *DefinitionArgs, opts ...pulumi.ResourceOption) (*Definition, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.DisplayName == nil { return nil, errors.New("invalid value for required argument 'DisplayName'") } if args.LockLevel == nil { return nil, errors.New("invalid value for required argument 'LockLevel'") } if args.ResourceGroupName == nil { return nil, errors.New("invalid value for required argument 'ResourceGroupName'") } opts = internal.PkgResourceDefaultOpts(opts) var resource Definition err := ctx.RegisterResource("azure:managedapplication/definition:Definition", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetDefinition gets an existing Definition resource's state with the given name, ID, and optional // state properties that are used to uniquely qualify the lookup (nil if not required). func GetDefinition(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DefinitionState, opts ...pulumi.ResourceOption) (*Definition, error) { var resource Definition err := ctx.ReadResource("azure:managedapplication/definition:Definition", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering Definition resources. type definitionState struct { // One or more `authorization` block defined below. Authorizations []DefinitionAuthorization `pulumi:"authorizations"` // Specifies the `createUiDefinition` JSON for the backing template with `Microsoft.Solutions/applications` resource. CreateUiDefinition *string `pulumi:"createUiDefinition"` // Specifies the managed application definition description. Description *string `pulumi:"description"` // Specifies the managed application definition display name. DisplayName *string `pulumi:"displayName"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the managed application lock level. Valid values include `CanNotDelete`, `None`, `ReadOnly`. Changing this forces a new resource to be created. LockLevel *string `pulumi:"lockLevel"` // Specifies the inline main template JSON which has resources to be provisioned. MainTemplate *string `pulumi:"mainTemplate"` // Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Is the package enabled? Defaults to `true`. PackageEnabled *bool `pulumi:"packageEnabled"` // Specifies the managed application definition package file Uri. PackageFileUri *string `pulumi:"packageFileUri"` // The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. // // > **Note:** If either `createUiDefinition` or `mainTemplate` is set they both must be set. Tags map[string]string `pulumi:"tags"` } type DefinitionState struct { // One or more `authorization` block defined below. Authorizations DefinitionAuthorizationArrayInput // Specifies the `createUiDefinition` JSON for the backing template with `Microsoft.Solutions/applications` resource. CreateUiDefinition pulumi.StringPtrInput // Specifies the managed application definition description. Description pulumi.StringPtrInput // Specifies the managed application definition display name. DisplayName pulumi.StringPtrInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the managed application lock level. Valid values include `CanNotDelete`, `None`, `ReadOnly`. Changing this forces a new resource to be created. LockLevel pulumi.StringPtrInput // Specifies the inline main template JSON which has resources to be provisioned. MainTemplate pulumi.StringPtrInput // Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Is the package enabled? Defaults to `true`. PackageEnabled pulumi.BoolPtrInput // Specifies the managed application definition package file Uri. PackageFileUri pulumi.StringPtrInput // The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // A mapping of tags to assign to the resource. // // > **Note:** If either `createUiDefinition` or `mainTemplate` is set they both must be set. Tags pulumi.StringMapInput } func (DefinitionState) ElementType() reflect.Type { return reflect.TypeOf((*definitionState)(nil)).Elem() } type definitionArgs struct { // One or more `authorization` block defined below. Authorizations []DefinitionAuthorization `pulumi:"authorizations"` // Specifies the `createUiDefinition` JSON for the backing template with `Microsoft.Solutions/applications` resource. CreateUiDefinition *string `pulumi:"createUiDefinition"` // Specifies the managed application definition description. Description *string `pulumi:"description"` // Specifies the managed application definition display name. DisplayName string `pulumi:"displayName"` // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location *string `pulumi:"location"` // Specifies the managed application lock level. Valid values include `CanNotDelete`, `None`, `ReadOnly`. Changing this forces a new resource to be created. LockLevel string `pulumi:"lockLevel"` // Specifies the inline main template JSON which has resources to be provisioned. MainTemplate *string `pulumi:"mainTemplate"` // Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // Is the package enabled? Defaults to `true`. PackageEnabled *bool `pulumi:"packageEnabled"` // Specifies the managed application definition package file Uri. PackageFileUri *string `pulumi:"packageFileUri"` // The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // A mapping of tags to assign to the resource. // // > **Note:** If either `createUiDefinition` or `mainTemplate` is set they both must be set. Tags map[string]string `pulumi:"tags"` } // The set of arguments for constructing a Definition resource. type DefinitionArgs struct { // One or more `authorization` block defined below. Authorizations DefinitionAuthorizationArrayInput // Specifies the `createUiDefinition` JSON for the backing template with `Microsoft.Solutions/applications` resource. CreateUiDefinition pulumi.StringPtrInput // Specifies the managed application definition description. Description pulumi.StringPtrInput // Specifies the managed application definition display name. DisplayName pulumi.StringInput // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. Location pulumi.StringPtrInput // Specifies the managed application lock level. Valid values include `CanNotDelete`, `None`, `ReadOnly`. Changing this forces a new resource to be created. LockLevel pulumi.StringInput // Specifies the inline main template JSON which has resources to be provisioned. MainTemplate pulumi.StringPtrInput // Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // Is the package enabled? Defaults to `true`. PackageEnabled pulumi.BoolPtrInput // Specifies the managed application definition package file Uri. PackageFileUri pulumi.StringPtrInput // The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // A mapping of tags to assign to the resource. // // > **Note:** If either `createUiDefinition` or `mainTemplate` is set they both must be set. Tags pulumi.StringMapInput } func (DefinitionArgs) ElementType() reflect.Type { return reflect.TypeOf((*definitionArgs)(nil)).Elem() } type DefinitionInput interface { pulumi.Input ToDefinitionOutput() DefinitionOutput ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput } func (*Definition) ElementType() reflect.Type { return reflect.TypeOf((**Definition)(nil)).Elem() } func (i *Definition) ToDefinitionOutput() DefinitionOutput { return i.ToDefinitionOutputWithContext(context.Background()) } func (i *Definition) ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionOutput) } // DefinitionArrayInput is an input type that accepts DefinitionArray and DefinitionArrayOutput values. // You can construct a concrete instance of `DefinitionArrayInput` via: // // DefinitionArray{ DefinitionArgs{...} } type DefinitionArrayInput interface { pulumi.Input ToDefinitionArrayOutput() DefinitionArrayOutput ToDefinitionArrayOutputWithContext(context.Context) DefinitionArrayOutput } type DefinitionArray []DefinitionInput func (DefinitionArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*Definition)(nil)).Elem() } func (i DefinitionArray) ToDefinitionArrayOutput() DefinitionArrayOutput { return i.ToDefinitionArrayOutputWithContext(context.Background()) } func (i DefinitionArray) ToDefinitionArrayOutputWithContext(ctx context.Context) DefinitionArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionArrayOutput) } // DefinitionMapInput is an input type that accepts DefinitionMap and DefinitionMapOutput values. // You can construct a concrete instance of `DefinitionMapInput` via: // // DefinitionMap{ "key": DefinitionArgs{...} } type DefinitionMapInput interface { pulumi.Input ToDefinitionMapOutput() DefinitionMapOutput ToDefinitionMapOutputWithContext(context.Context) DefinitionMapOutput } type DefinitionMap map[string]DefinitionInput func (DefinitionMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Definition)(nil)).Elem() } func (i DefinitionMap) ToDefinitionMapOutput() DefinitionMapOutput { return i.ToDefinitionMapOutputWithContext(context.Background()) } func (i DefinitionMap) ToDefinitionMapOutputWithContext(ctx context.Context) DefinitionMapOutput { return pulumi.ToOutputWithContext(ctx, i).(DefinitionMapOutput) } type DefinitionOutput struct{ *pulumi.OutputState } func (DefinitionOutput) ElementType() reflect.Type { return reflect.TypeOf((**Definition)(nil)).Elem() } func (o DefinitionOutput) ToDefinitionOutput() DefinitionOutput { return o } func (o DefinitionOutput) ToDefinitionOutputWithContext(ctx context.Context) DefinitionOutput { return o } // One or more `authorization` block defined below. func (o DefinitionOutput) Authorizations() DefinitionAuthorizationArrayOutput { return o.ApplyT(func(v *Definition) DefinitionAuthorizationArrayOutput { return v.Authorizations }).(DefinitionAuthorizationArrayOutput) } // Specifies the `createUiDefinition` JSON for the backing template with `Microsoft.Solutions/applications` resource. func (o DefinitionOutput) CreateUiDefinition() pulumi.StringPtrOutput { return o.ApplyT(func(v *Definition) pulumi.StringPtrOutput { return v.CreateUiDefinition }).(pulumi.StringPtrOutput) } // Specifies the managed application definition description. func (o DefinitionOutput) Description() pulumi.StringPtrOutput { return o.ApplyT(func(v *Definition) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) } // Specifies the managed application definition display name. func (o DefinitionOutput) DisplayName() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput) } // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. func (o DefinitionOutput) Location() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput) } // Specifies the managed application lock level. Valid values include `CanNotDelete`, `None`, `ReadOnly`. Changing this forces a new resource to be created. func (o DefinitionOutput) LockLevel() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.LockLevel }).(pulumi.StringOutput) } // Specifies the inline main template JSON which has resources to be provisioned. func (o DefinitionOutput) MainTemplate() pulumi.StringPtrOutput { return o.ApplyT(func(v *Definition) pulumi.StringPtrOutput { return v.MainTemplate }).(pulumi.StringPtrOutput) } // Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created. func (o DefinitionOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // Is the package enabled? Defaults to `true`. func (o DefinitionOutput) PackageEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *Definition) pulumi.BoolPtrOutput { return v.PackageEnabled }).(pulumi.BoolPtrOutput) } // Specifies the managed application definition package file Uri. func (o DefinitionOutput) PackageFileUri() pulumi.StringPtrOutput { return o.ApplyT(func(v *Definition) pulumi.StringPtrOutput { return v.PackageFileUri }).(pulumi.StringPtrOutput) } // The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created. func (o DefinitionOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *Definition) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // A mapping of tags to assign to the resource. // // > **Note:** If either `createUiDefinition` or `mainTemplate` is set they both must be set. func (o DefinitionOutput) Tags() pulumi.StringMapOutput { return o.ApplyT(func(v *Definition) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) } type DefinitionArrayOutput struct{ *pulumi.OutputState } func (DefinitionArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*Definition)(nil)).Elem() } func (o DefinitionArrayOutput) ToDefinitionArrayOutput() DefinitionArrayOutput { return o } func (o DefinitionArrayOutput) ToDefinitionArrayOutputWithContext(ctx context.Context) DefinitionArrayOutput { return o } func (o DefinitionArrayOutput) Index(i pulumi.IntInput) DefinitionOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Definition { return vs[0].([]*Definition)[vs[1].(int)] }).(DefinitionOutput) } type DefinitionMapOutput struct{ *pulumi.OutputState } func (DefinitionMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*Definition)(nil)).Elem() } func (o DefinitionMapOutput) ToDefinitionMapOutput() DefinitionMapOutput { return o } func (o DefinitionMapOutput) ToDefinitionMapOutputWithContext(ctx context.Context) DefinitionMapOutput { return o } func (o DefinitionMapOutput) MapIndex(k pulumi.StringInput) DefinitionOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Definition { return vs[0].(map[string]*Definition)[vs[1].(string)] }).(DefinitionOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*DefinitionInput)(nil)).Elem(), &Definition{}) pulumi.RegisterInputType(reflect.TypeOf((*DefinitionArrayInput)(nil)).Elem(), DefinitionArray{}) pulumi.RegisterInputType(reflect.TypeOf((*DefinitionMapInput)(nil)).Elem(), DefinitionMap{}) pulumi.RegisterOutputType(DefinitionOutput{}) pulumi.RegisterOutputType(DefinitionArrayOutput{}) pulumi.RegisterOutputType(DefinitionMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false
pulumi/pulumi-azure
https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/iot/init.go
sdk/go/azure/iot/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 iot 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:iot/certificate:Certificate": r = &Certificate{} case "azure:iot/consumerGroup:ConsumerGroup": r = &ConsumerGroup{} case "azure:iot/dpsSharedAccessPolicy:DpsSharedAccessPolicy": r = &DpsSharedAccessPolicy{} case "azure:iot/endpointCosmosdbAccount:EndpointCosmosdbAccount": r = &EndpointCosmosdbAccount{} case "azure:iot/endpointEventhub:EndpointEventhub": r = &EndpointEventhub{} case "azure:iot/endpointServicebusQueue:EndpointServicebusQueue": r = &EndpointServicebusQueue{} case "azure:iot/endpointServicebusTopic:EndpointServicebusTopic": r = &EndpointServicebusTopic{} case "azure:iot/endpointStorageContainer:EndpointStorageContainer": r = &EndpointStorageContainer{} case "azure:iot/enrichment:Enrichment": r = &Enrichment{} case "azure:iot/fallbackRoute:FallbackRoute": r = &FallbackRoute{} case "azure:iot/fileUpload:FileUpload": r = &FileUpload{} case "azure:iot/ioTHub:IoTHub": r = &IoTHub{} case "azure:iot/iotHubCertificate:IotHubCertificate": r = &IotHubCertificate{} case "azure:iot/iotHubDeviceUpdateAccount:IotHubDeviceUpdateAccount": r = &IotHubDeviceUpdateAccount{} case "azure:iot/iotHubDeviceUpdateInstance:IotHubDeviceUpdateInstance": r = &IotHubDeviceUpdateInstance{} case "azure:iot/iotHubDps:IotHubDps": r = &IotHubDps{} case "azure:iot/route:Route": r = &Route{} case "azure:iot/securityDeviceGroup:SecurityDeviceGroup": r = &SecurityDeviceGroup{} case "azure:iot/securitySolution:SecuritySolution": r = &SecuritySolution{} case "azure:iot/sharedAccessPolicy:SharedAccessPolicy": r = &SharedAccessPolicy{} 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", "iot/certificate", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/consumerGroup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/dpsSharedAccessPolicy", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/endpointCosmosdbAccount", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/endpointEventhub", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/endpointServicebusQueue", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/endpointServicebusTopic", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/endpointStorageContainer", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/enrichment", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/fallbackRoute", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/fileUpload", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/ioTHub", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/iotHubCertificate", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/iotHubDeviceUpdateAccount", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/iotHubDeviceUpdateInstance", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/iotHubDps", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/route", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/securityDeviceGroup", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/securitySolution", &module{version}, ) pulumi.RegisterResourceModule( "azure", "iot/sharedAccessPolicy", &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/iot/fileUpload.go
sdk/go/azure/iot/fileUpload.go
// Code generated 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 the File Upload of an IoT Hub. // // > **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/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 // } // 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.NewFileUpload(ctx, "example", &iot.FileUploadArgs{ // IothubId: exampleIoTHub.ID(), // ConnectionString: exampleAccount.PrimaryBlobConnectionString, // ContainerName: exampleContainer.Name, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // IoT Hub File Uploads can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:iot/fileUpload:FileUpload example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1 // ``` type FileUpload struct { pulumi.CustomResourceState // The type used to authenticate against the storage account. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType pulumi.StringPtrOutput `pulumi:"authenticationType"` // The connection string for the Azure Storage account to which files are uploaded. ConnectionString pulumi.StringOutput `pulumi:"connectionString"` // The name of the root container where the files should be uploaded to. The container need not exist but should be creatable using the `connectionString` specified. ContainerName pulumi.StringOutput `pulumi:"containerName"` // The period of time for which a file upload notification message is available to consume before it expires, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`. DefaultTtl pulumi.StringPtrOutput `pulumi:"defaultTtl"` // The ID of the User Managed Identity used to authenticate against the storage account. // // > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the IoT Hub. If `identityId` is omitted when `authenticationType` is `identityBased`, then the System-Assigned Managed Identity of the IoT Hub will be used. IdentityId pulumi.StringPtrOutput `pulumi:"identityId"` // The ID of the IoT Hub. Changing this forces a new IoT Hub to be created. IothubId pulumi.StringOutput `pulumi:"iothubId"` // The lock duration for the file upload notifications queue, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 5 and 300 seconds. Defaults to `PT1M`. LockDuration pulumi.StringPtrOutput `pulumi:"lockDuration"` // The number of times the IoT Hub attempts to deliver a file upload notification message. Defaults to `10`. MaxDeliveryCount pulumi.IntPtrOutput `pulumi:"maxDeliveryCount"` // Used to specify whether file notifications are sent to IoT Hub on upload. Defaults to `false`. NotificationsEnabled pulumi.BoolPtrOutput `pulumi:"notificationsEnabled"` // The period of time for which the SAS URI generated by IoT Hub for file upload is valid, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 24 hours. Defaults to `PT1H`. SasTtl pulumi.StringPtrOutput `pulumi:"sasTtl"` } // NewFileUpload registers a new resource with the given unique name, arguments, and options. func NewFileUpload(ctx *pulumi.Context, name string, args *FileUploadArgs, opts ...pulumi.ResourceOption) (*FileUpload, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ConnectionString == nil { return nil, errors.New("invalid value for required argument 'ConnectionString'") } if args.ContainerName == nil { return nil, errors.New("invalid value for required argument 'ContainerName'") } if args.IothubId == nil { return nil, errors.New("invalid value for required argument 'IothubId'") } if args.ConnectionString != nil { args.ConnectionString = pulumi.ToSecret(args.ConnectionString).(pulumi.StringInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "connectionString", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource FileUpload err := ctx.RegisterResource("azure:iot/fileUpload:FileUpload", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFileUpload gets an existing FileUpload 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 GetFileUpload(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FileUploadState, opts ...pulumi.ResourceOption) (*FileUpload, error) { var resource FileUpload err := ctx.ReadResource("azure:iot/fileUpload:FileUpload", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FileUpload resources. type fileUploadState struct { // The type used to authenticate against the storage account. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType *string `pulumi:"authenticationType"` // The connection string for the Azure Storage account to which files are uploaded. ConnectionString *string `pulumi:"connectionString"` // The name of the root container where the files should be uploaded to. The container need not exist but should be creatable using the `connectionString` specified. ContainerName *string `pulumi:"containerName"` // The period of time for which a file upload notification message is available to consume before it expires, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`. DefaultTtl *string `pulumi:"defaultTtl"` // The ID of the User Managed Identity used to authenticate against the storage account. // // > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the IoT Hub. If `identityId` is omitted when `authenticationType` is `identityBased`, then the System-Assigned Managed Identity of the IoT Hub will be used. IdentityId *string `pulumi:"identityId"` // The ID of the IoT Hub. Changing this forces a new IoT Hub to be created. IothubId *string `pulumi:"iothubId"` // The lock duration for the file upload notifications queue, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 5 and 300 seconds. Defaults to `PT1M`. LockDuration *string `pulumi:"lockDuration"` // The number of times the IoT Hub attempts to deliver a file upload notification message. Defaults to `10`. MaxDeliveryCount *int `pulumi:"maxDeliveryCount"` // Used to specify whether file notifications are sent to IoT Hub on upload. Defaults to `false`. NotificationsEnabled *bool `pulumi:"notificationsEnabled"` // The period of time for which the SAS URI generated by IoT Hub for file upload is valid, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 24 hours. Defaults to `PT1H`. SasTtl *string `pulumi:"sasTtl"` } type FileUploadState struct { // The type used to authenticate against the storage account. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType pulumi.StringPtrInput // The connection string for the Azure Storage account to which files are uploaded. ConnectionString pulumi.StringPtrInput // The name of the root container where the files should be uploaded to. The container need not exist but should be creatable using the `connectionString` specified. ContainerName pulumi.StringPtrInput // The period of time for which a file upload notification message is available to consume before it expires, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`. DefaultTtl pulumi.StringPtrInput // The ID of the User Managed Identity used to authenticate against the storage account. // // > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the IoT Hub. If `identityId` is omitted when `authenticationType` is `identityBased`, then the System-Assigned Managed Identity of the IoT Hub will be used. IdentityId pulumi.StringPtrInput // The ID of the IoT Hub. Changing this forces a new IoT Hub to be created. IothubId pulumi.StringPtrInput // The lock duration for the file upload notifications queue, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 5 and 300 seconds. Defaults to `PT1M`. LockDuration pulumi.StringPtrInput // The number of times the IoT Hub attempts to deliver a file upload notification message. Defaults to `10`. MaxDeliveryCount pulumi.IntPtrInput // Used to specify whether file notifications are sent to IoT Hub on upload. Defaults to `false`. NotificationsEnabled pulumi.BoolPtrInput // The period of time for which the SAS URI generated by IoT Hub for file upload is valid, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 24 hours. Defaults to `PT1H`. SasTtl pulumi.StringPtrInput } func (FileUploadState) ElementType() reflect.Type { return reflect.TypeOf((*fileUploadState)(nil)).Elem() } type fileUploadArgs struct { // The type used to authenticate against the storage account. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType *string `pulumi:"authenticationType"` // The connection string for the Azure Storage account to which files are uploaded. ConnectionString string `pulumi:"connectionString"` // The name of the root container where the files should be uploaded to. The container need not exist but should be creatable using the `connectionString` specified. ContainerName string `pulumi:"containerName"` // The period of time for which a file upload notification message is available to consume before it expires, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`. DefaultTtl *string `pulumi:"defaultTtl"` // The ID of the User Managed Identity used to authenticate against the storage account. // // > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the IoT Hub. If `identityId` is omitted when `authenticationType` is `identityBased`, then the System-Assigned Managed Identity of the IoT Hub will be used. IdentityId *string `pulumi:"identityId"` // The ID of the IoT Hub. Changing this forces a new IoT Hub to be created. IothubId string `pulumi:"iothubId"` // The lock duration for the file upload notifications queue, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 5 and 300 seconds. Defaults to `PT1M`. LockDuration *string `pulumi:"lockDuration"` // The number of times the IoT Hub attempts to deliver a file upload notification message. Defaults to `10`. MaxDeliveryCount *int `pulumi:"maxDeliveryCount"` // Used to specify whether file notifications are sent to IoT Hub on upload. Defaults to `false`. NotificationsEnabled *bool `pulumi:"notificationsEnabled"` // The period of time for which the SAS URI generated by IoT Hub for file upload is valid, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 24 hours. Defaults to `PT1H`. SasTtl *string `pulumi:"sasTtl"` } // The set of arguments for constructing a FileUpload resource. type FileUploadArgs struct { // The type used to authenticate against the storage account. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType pulumi.StringPtrInput // The connection string for the Azure Storage account to which files are uploaded. ConnectionString pulumi.StringInput // The name of the root container where the files should be uploaded to. The container need not exist but should be creatable using the `connectionString` specified. ContainerName pulumi.StringInput // The period of time for which a file upload notification message is available to consume before it expires, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`. DefaultTtl pulumi.StringPtrInput // The ID of the User Managed Identity used to authenticate against the storage account. // // > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the IoT Hub. If `identityId` is omitted when `authenticationType` is `identityBased`, then the System-Assigned Managed Identity of the IoT Hub will be used. IdentityId pulumi.StringPtrInput // The ID of the IoT Hub. Changing this forces a new IoT Hub to be created. IothubId pulumi.StringInput // The lock duration for the file upload notifications queue, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 5 and 300 seconds. Defaults to `PT1M`. LockDuration pulumi.StringPtrInput // The number of times the IoT Hub attempts to deliver a file upload notification message. Defaults to `10`. MaxDeliveryCount pulumi.IntPtrInput // Used to specify whether file notifications are sent to IoT Hub on upload. Defaults to `false`. NotificationsEnabled pulumi.BoolPtrInput // The period of time for which the SAS URI generated by IoT Hub for file upload is valid, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 24 hours. Defaults to `PT1H`. SasTtl pulumi.StringPtrInput } func (FileUploadArgs) ElementType() reflect.Type { return reflect.TypeOf((*fileUploadArgs)(nil)).Elem() } type FileUploadInput interface { pulumi.Input ToFileUploadOutput() FileUploadOutput ToFileUploadOutputWithContext(ctx context.Context) FileUploadOutput } func (*FileUpload) ElementType() reflect.Type { return reflect.TypeOf((**FileUpload)(nil)).Elem() } func (i *FileUpload) ToFileUploadOutput() FileUploadOutput { return i.ToFileUploadOutputWithContext(context.Background()) } func (i *FileUpload) ToFileUploadOutputWithContext(ctx context.Context) FileUploadOutput { return pulumi.ToOutputWithContext(ctx, i).(FileUploadOutput) } // FileUploadArrayInput is an input type that accepts FileUploadArray and FileUploadArrayOutput values. // You can construct a concrete instance of `FileUploadArrayInput` via: // // FileUploadArray{ FileUploadArgs{...} } type FileUploadArrayInput interface { pulumi.Input ToFileUploadArrayOutput() FileUploadArrayOutput ToFileUploadArrayOutputWithContext(context.Context) FileUploadArrayOutput } type FileUploadArray []FileUploadInput func (FileUploadArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FileUpload)(nil)).Elem() } func (i FileUploadArray) ToFileUploadArrayOutput() FileUploadArrayOutput { return i.ToFileUploadArrayOutputWithContext(context.Background()) } func (i FileUploadArray) ToFileUploadArrayOutputWithContext(ctx context.Context) FileUploadArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FileUploadArrayOutput) } // FileUploadMapInput is an input type that accepts FileUploadMap and FileUploadMapOutput values. // You can construct a concrete instance of `FileUploadMapInput` via: // // FileUploadMap{ "key": FileUploadArgs{...} } type FileUploadMapInput interface { pulumi.Input ToFileUploadMapOutput() FileUploadMapOutput ToFileUploadMapOutputWithContext(context.Context) FileUploadMapOutput } type FileUploadMap map[string]FileUploadInput func (FileUploadMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FileUpload)(nil)).Elem() } func (i FileUploadMap) ToFileUploadMapOutput() FileUploadMapOutput { return i.ToFileUploadMapOutputWithContext(context.Background()) } func (i FileUploadMap) ToFileUploadMapOutputWithContext(ctx context.Context) FileUploadMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FileUploadMapOutput) } type FileUploadOutput struct{ *pulumi.OutputState } func (FileUploadOutput) ElementType() reflect.Type { return reflect.TypeOf((**FileUpload)(nil)).Elem() } func (o FileUploadOutput) ToFileUploadOutput() FileUploadOutput { return o } func (o FileUploadOutput) ToFileUploadOutputWithContext(ctx context.Context) FileUploadOutput { return o } // The type used to authenticate against the storage account. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. func (o FileUploadOutput) AuthenticationType() pulumi.StringPtrOutput { return o.ApplyT(func(v *FileUpload) pulumi.StringPtrOutput { return v.AuthenticationType }).(pulumi.StringPtrOutput) } // The connection string for the Azure Storage account to which files are uploaded. func (o FileUploadOutput) ConnectionString() pulumi.StringOutput { return o.ApplyT(func(v *FileUpload) pulumi.StringOutput { return v.ConnectionString }).(pulumi.StringOutput) } // The name of the root container where the files should be uploaded to. The container need not exist but should be creatable using the `connectionString` specified. func (o FileUploadOutput) ContainerName() pulumi.StringOutput { return o.ApplyT(func(v *FileUpload) pulumi.StringOutput { return v.ContainerName }).(pulumi.StringOutput) } // The period of time for which a file upload notification message is available to consume before it expires, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`. func (o FileUploadOutput) DefaultTtl() pulumi.StringPtrOutput { return o.ApplyT(func(v *FileUpload) pulumi.StringPtrOutput { return v.DefaultTtl }).(pulumi.StringPtrOutput) } // The ID of the User Managed Identity used to authenticate against the storage account. // // > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the IoT Hub. If `identityId` is omitted when `authenticationType` is `identityBased`, then the System-Assigned Managed Identity of the IoT Hub will be used. func (o FileUploadOutput) IdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v *FileUpload) pulumi.StringPtrOutput { return v.IdentityId }).(pulumi.StringPtrOutput) } // The ID of the IoT Hub. Changing this forces a new IoT Hub to be created. func (o FileUploadOutput) IothubId() pulumi.StringOutput { return o.ApplyT(func(v *FileUpload) pulumi.StringOutput { return v.IothubId }).(pulumi.StringOutput) } // The lock duration for the file upload notifications queue, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 5 and 300 seconds. Defaults to `PT1M`. func (o FileUploadOutput) LockDuration() pulumi.StringPtrOutput { return o.ApplyT(func(v *FileUpload) pulumi.StringPtrOutput { return v.LockDuration }).(pulumi.StringPtrOutput) } // The number of times the IoT Hub attempts to deliver a file upload notification message. Defaults to `10`. func (o FileUploadOutput) MaxDeliveryCount() pulumi.IntPtrOutput { return o.ApplyT(func(v *FileUpload) pulumi.IntPtrOutput { return v.MaxDeliveryCount }).(pulumi.IntPtrOutput) } // Used to specify whether file notifications are sent to IoT Hub on upload. Defaults to `false`. func (o FileUploadOutput) NotificationsEnabled() pulumi.BoolPtrOutput { return o.ApplyT(func(v *FileUpload) pulumi.BoolPtrOutput { return v.NotificationsEnabled }).(pulumi.BoolPtrOutput) } // The period of time for which the SAS URI generated by IoT Hub for file upload is valid, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 24 hours. Defaults to `PT1H`. func (o FileUploadOutput) SasTtl() pulumi.StringPtrOutput { return o.ApplyT(func(v *FileUpload) pulumi.StringPtrOutput { return v.SasTtl }).(pulumi.StringPtrOutput) } type FileUploadArrayOutput struct{ *pulumi.OutputState } func (FileUploadArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FileUpload)(nil)).Elem() } func (o FileUploadArrayOutput) ToFileUploadArrayOutput() FileUploadArrayOutput { return o } func (o FileUploadArrayOutput) ToFileUploadArrayOutputWithContext(ctx context.Context) FileUploadArrayOutput { return o } func (o FileUploadArrayOutput) Index(i pulumi.IntInput) FileUploadOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FileUpload { return vs[0].([]*FileUpload)[vs[1].(int)] }).(FileUploadOutput) } type FileUploadMapOutput struct{ *pulumi.OutputState } func (FileUploadMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FileUpload)(nil)).Elem() } func (o FileUploadMapOutput) ToFileUploadMapOutput() FileUploadMapOutput { return o } func (o FileUploadMapOutput) ToFileUploadMapOutputWithContext(ctx context.Context) FileUploadMapOutput { return o } func (o FileUploadMapOutput) MapIndex(k pulumi.StringInput) FileUploadOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FileUpload { return vs[0].(map[string]*FileUpload)[vs[1].(string)] }).(FileUploadOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FileUploadInput)(nil)).Elem(), &FileUpload{}) pulumi.RegisterInputType(reflect.TypeOf((*FileUploadArrayInput)(nil)).Elem(), FileUploadArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FileUploadMapInput)(nil)).Elem(), FileUploadMap{}) pulumi.RegisterOutputType(FileUploadOutput{}) pulumi.RegisterOutputType(FileUploadArrayOutput{}) pulumi.RegisterOutputType(FileUploadMapOutput{}) }
go
Apache-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/endpointServicebusTopic.go
sdk/go/azure/iot/endpointServicebusTopic.go
// Code generated 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 Topic 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 // } // exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{ // Name: pulumi.String("exampleTopic"), // NamespaceId: exampleNamespace.ID(), // }) // if err != nil { // return err // } // exampleTopicAuthorizationRule, err := servicebus.NewTopicAuthorizationRule(ctx, "example", &servicebus.TopicAuthorizationRuleArgs{ // Name: pulumi.String("exampleRule"), // TopicId: exampleTopic.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.NewEndpointServicebusTopic(ctx, "example", &iot.EndpointServicebusTopicArgs{ // ResourceGroupName: example.Name, // IothubId: exampleIoTHub.ID(), // Name: pulumi.String("example"), // ConnectionString: exampleTopicAuthorizationRule.PrimaryConnectionString, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // IoTHub ServiceBus Topic Endpoint can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:iot/endpointServicebusTopic:EndpointServicebusTopic servicebus_topic1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/endpoints/servicebustopic_endpoint1 // ``` type EndpointServicebusTopic struct { pulumi.CustomResourceState // Type used to authenticate against the Service Bus Topic 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 Topic. 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 Topic 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 Topic 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"` } // NewEndpointServicebusTopic registers a new resource with the given unique name, arguments, and options. func NewEndpointServicebusTopic(ctx *pulumi.Context, name string, args *EndpointServicebusTopicArgs, opts ...pulumi.ResourceOption) (*EndpointServicebusTopic, 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 EndpointServicebusTopic err := ctx.RegisterResource("azure:iot/endpointServicebusTopic:EndpointServicebusTopic", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetEndpointServicebusTopic gets an existing EndpointServicebusTopic 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 GetEndpointServicebusTopic(ctx *pulumi.Context, name string, id pulumi.IDInput, state *EndpointServicebusTopicState, opts ...pulumi.ResourceOption) (*EndpointServicebusTopic, error) { var resource EndpointServicebusTopic err := ctx.ReadResource("azure:iot/endpointServicebusTopic:EndpointServicebusTopic", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering EndpointServicebusTopic resources. type endpointServicebusTopicState struct { // Type used to authenticate against the Service Bus Topic 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 Topic. 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 Topic 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 Topic 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 EndpointServicebusTopicState struct { // Type used to authenticate against the Service Bus Topic 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 Topic. 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 Topic 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 Topic 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 (EndpointServicebusTopicState) ElementType() reflect.Type { return reflect.TypeOf((*endpointServicebusTopicState)(nil)).Elem() } type endpointServicebusTopicArgs struct { // Type used to authenticate against the Service Bus Topic 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 Topic. 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 Topic 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 Topic 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 EndpointServicebusTopic resource. type EndpointServicebusTopicArgs struct { // Type used to authenticate against the Service Bus Topic 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 Topic. 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 Topic 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 Topic 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 (EndpointServicebusTopicArgs) ElementType() reflect.Type { return reflect.TypeOf((*endpointServicebusTopicArgs)(nil)).Elem() } type EndpointServicebusTopicInput interface { pulumi.Input ToEndpointServicebusTopicOutput() EndpointServicebusTopicOutput ToEndpointServicebusTopicOutputWithContext(ctx context.Context) EndpointServicebusTopicOutput } func (*EndpointServicebusTopic) ElementType() reflect.Type { return reflect.TypeOf((**EndpointServicebusTopic)(nil)).Elem() } func (i *EndpointServicebusTopic) ToEndpointServicebusTopicOutput() EndpointServicebusTopicOutput { return i.ToEndpointServicebusTopicOutputWithContext(context.Background()) } func (i *EndpointServicebusTopic) ToEndpointServicebusTopicOutputWithContext(ctx context.Context) EndpointServicebusTopicOutput { return pulumi.ToOutputWithContext(ctx, i).(EndpointServicebusTopicOutput) } // EndpointServicebusTopicArrayInput is an input type that accepts EndpointServicebusTopicArray and EndpointServicebusTopicArrayOutput values. // You can construct a concrete instance of `EndpointServicebusTopicArrayInput` via: // // EndpointServicebusTopicArray{ EndpointServicebusTopicArgs{...} } type EndpointServicebusTopicArrayInput interface { pulumi.Input ToEndpointServicebusTopicArrayOutput() EndpointServicebusTopicArrayOutput ToEndpointServicebusTopicArrayOutputWithContext(context.Context) EndpointServicebusTopicArrayOutput } type EndpointServicebusTopicArray []EndpointServicebusTopicInput func (EndpointServicebusTopicArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*EndpointServicebusTopic)(nil)).Elem() } func (i EndpointServicebusTopicArray) ToEndpointServicebusTopicArrayOutput() EndpointServicebusTopicArrayOutput { return i.ToEndpointServicebusTopicArrayOutputWithContext(context.Background()) } func (i EndpointServicebusTopicArray) ToEndpointServicebusTopicArrayOutputWithContext(ctx context.Context) EndpointServicebusTopicArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(EndpointServicebusTopicArrayOutput) } // EndpointServicebusTopicMapInput is an input type that accepts EndpointServicebusTopicMap and EndpointServicebusTopicMapOutput values. // You can construct a concrete instance of `EndpointServicebusTopicMapInput` via: // // EndpointServicebusTopicMap{ "key": EndpointServicebusTopicArgs{...} } type EndpointServicebusTopicMapInput interface { pulumi.Input ToEndpointServicebusTopicMapOutput() EndpointServicebusTopicMapOutput ToEndpointServicebusTopicMapOutputWithContext(context.Context) EndpointServicebusTopicMapOutput } type EndpointServicebusTopicMap map[string]EndpointServicebusTopicInput func (EndpointServicebusTopicMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*EndpointServicebusTopic)(nil)).Elem() } func (i EndpointServicebusTopicMap) ToEndpointServicebusTopicMapOutput() EndpointServicebusTopicMapOutput { return i.ToEndpointServicebusTopicMapOutputWithContext(context.Background()) } func (i EndpointServicebusTopicMap) ToEndpointServicebusTopicMapOutputWithContext(ctx context.Context) EndpointServicebusTopicMapOutput { return pulumi.ToOutputWithContext(ctx, i).(EndpointServicebusTopicMapOutput) } type EndpointServicebusTopicOutput struct{ *pulumi.OutputState } func (EndpointServicebusTopicOutput) ElementType() reflect.Type { return reflect.TypeOf((**EndpointServicebusTopic)(nil)).Elem() } func (o EndpointServicebusTopicOutput) ToEndpointServicebusTopicOutput() EndpointServicebusTopicOutput { return o } func (o EndpointServicebusTopicOutput) ToEndpointServicebusTopicOutputWithContext(ctx context.Context) EndpointServicebusTopicOutput { return o } // Type used to authenticate against the Service Bus Topic endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. func (o EndpointServicebusTopicOutput) AuthenticationType() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointServicebusTopic) 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 EndpointServicebusTopicOutput) ConnectionString() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointServicebusTopic) 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 EndpointServicebusTopicOutput) EndpointUri() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointServicebusTopic) pulumi.StringPtrOutput { return v.EndpointUri }).(pulumi.StringPtrOutput) } // Name of the Service Bus Topic. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`. func (o EndpointServicebusTopicOutput) EntityPath() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointServicebusTopic) pulumi.StringPtrOutput { return v.EntityPath }).(pulumi.StringPtrOutput) } // ID of the User Managed Identity used to authenticate against the Service Bus Topic 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 EndpointServicebusTopicOutput) IdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointServicebusTopic) pulumi.StringPtrOutput { return v.IdentityId }).(pulumi.StringPtrOutput) } // The IoTHub ID for the endpoint. Changing this forces a new resource to be created. func (o EndpointServicebusTopicOutput) IothubId() pulumi.StringOutput { return o.ApplyT(func(v *EndpointServicebusTopic) 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 EndpointServicebusTopicOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *EndpointServicebusTopic) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group under which the Service Bus Topic has been created. Changing this forces a new resource to be created. func (o EndpointServicebusTopicOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *EndpointServicebusTopic) 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 EndpointServicebusTopicOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v *EndpointServicebusTopic) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput) } type EndpointServicebusTopicArrayOutput struct{ *pulumi.OutputState } func (EndpointServicebusTopicArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*EndpointServicebusTopic)(nil)).Elem() } func (o EndpointServicebusTopicArrayOutput) ToEndpointServicebusTopicArrayOutput() EndpointServicebusTopicArrayOutput { return o } func (o EndpointServicebusTopicArrayOutput) ToEndpointServicebusTopicArrayOutputWithContext(ctx context.Context) EndpointServicebusTopicArrayOutput { return o } func (o EndpointServicebusTopicArrayOutput) Index(i pulumi.IntInput) EndpointServicebusTopicOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EndpointServicebusTopic { return vs[0].([]*EndpointServicebusTopic)[vs[1].(int)] }).(EndpointServicebusTopicOutput) } type EndpointServicebusTopicMapOutput struct{ *pulumi.OutputState } func (EndpointServicebusTopicMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*EndpointServicebusTopic)(nil)).Elem() } func (o EndpointServicebusTopicMapOutput) ToEndpointServicebusTopicMapOutput() EndpointServicebusTopicMapOutput { return o } func (o EndpointServicebusTopicMapOutput) ToEndpointServicebusTopicMapOutputWithContext(ctx context.Context) EndpointServicebusTopicMapOutput { return o } func (o EndpointServicebusTopicMapOutput) MapIndex(k pulumi.StringInput) EndpointServicebusTopicOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EndpointServicebusTopic { return vs[0].(map[string]*EndpointServicebusTopic)[vs[1].(string)] }).(EndpointServicebusTopicOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*EndpointServicebusTopicInput)(nil)).Elem(), &EndpointServicebusTopic{}) pulumi.RegisterInputType(reflect.TypeOf((*EndpointServicebusTopicArrayInput)(nil)).Elem(), EndpointServicebusTopicArray{}) pulumi.RegisterInputType(reflect.TypeOf((*EndpointServicebusTopicMapInput)(nil)).Elem(), EndpointServicebusTopicMap{}) pulumi.RegisterOutputType(EndpointServicebusTopicOutput{}) pulumi.RegisterOutputType(EndpointServicebusTopicArrayOutput{}) pulumi.RegisterOutputType(EndpointServicebusTopicMapOutput{}) }
go
Apache-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/pulumiTypes.go
sdk/go/azure/iot/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 iot 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 IoTHubCloudToDevice struct { // The default time to live for cloud-to-device messages, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`. DefaultTtl *string `pulumi:"defaultTtl"` // A `feedback` block as defined below. Feedbacks []IoTHubCloudToDeviceFeedback `pulumi:"feedbacks"` // The maximum delivery count for cloud-to-device per-device queues. This value must be between `1` and `100`. Defaults to `10`. MaxDeliveryCount *int `pulumi:"maxDeliveryCount"` } // IoTHubCloudToDeviceInput is an input type that accepts IoTHubCloudToDeviceArgs and IoTHubCloudToDeviceOutput values. // You can construct a concrete instance of `IoTHubCloudToDeviceInput` via: // // IoTHubCloudToDeviceArgs{...} type IoTHubCloudToDeviceInput interface { pulumi.Input ToIoTHubCloudToDeviceOutput() IoTHubCloudToDeviceOutput ToIoTHubCloudToDeviceOutputWithContext(context.Context) IoTHubCloudToDeviceOutput } type IoTHubCloudToDeviceArgs struct { // The default time to live for cloud-to-device messages, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`. DefaultTtl pulumi.StringPtrInput `pulumi:"defaultTtl"` // A `feedback` block as defined below. Feedbacks IoTHubCloudToDeviceFeedbackArrayInput `pulumi:"feedbacks"` // The maximum delivery count for cloud-to-device per-device queues. This value must be between `1` and `100`. Defaults to `10`. MaxDeliveryCount pulumi.IntPtrInput `pulumi:"maxDeliveryCount"` } func (IoTHubCloudToDeviceArgs) ElementType() reflect.Type { return reflect.TypeOf((*IoTHubCloudToDevice)(nil)).Elem() } func (i IoTHubCloudToDeviceArgs) ToIoTHubCloudToDeviceOutput() IoTHubCloudToDeviceOutput { return i.ToIoTHubCloudToDeviceOutputWithContext(context.Background()) } func (i IoTHubCloudToDeviceArgs) ToIoTHubCloudToDeviceOutputWithContext(ctx context.Context) IoTHubCloudToDeviceOutput { return pulumi.ToOutputWithContext(ctx, i).(IoTHubCloudToDeviceOutput) } func (i IoTHubCloudToDeviceArgs) ToIoTHubCloudToDevicePtrOutput() IoTHubCloudToDevicePtrOutput { return i.ToIoTHubCloudToDevicePtrOutputWithContext(context.Background()) } func (i IoTHubCloudToDeviceArgs) ToIoTHubCloudToDevicePtrOutputWithContext(ctx context.Context) IoTHubCloudToDevicePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(IoTHubCloudToDeviceOutput).ToIoTHubCloudToDevicePtrOutputWithContext(ctx) } // IoTHubCloudToDevicePtrInput is an input type that accepts IoTHubCloudToDeviceArgs, IoTHubCloudToDevicePtr and IoTHubCloudToDevicePtrOutput values. // You can construct a concrete instance of `IoTHubCloudToDevicePtrInput` via: // // IoTHubCloudToDeviceArgs{...} // // or: // // nil type IoTHubCloudToDevicePtrInput interface { pulumi.Input ToIoTHubCloudToDevicePtrOutput() IoTHubCloudToDevicePtrOutput ToIoTHubCloudToDevicePtrOutputWithContext(context.Context) IoTHubCloudToDevicePtrOutput } type ioTHubCloudToDevicePtrType IoTHubCloudToDeviceArgs func IoTHubCloudToDevicePtr(v *IoTHubCloudToDeviceArgs) IoTHubCloudToDevicePtrInput { return (*ioTHubCloudToDevicePtrType)(v) } func (*ioTHubCloudToDevicePtrType) ElementType() reflect.Type { return reflect.TypeOf((**IoTHubCloudToDevice)(nil)).Elem() } func (i *ioTHubCloudToDevicePtrType) ToIoTHubCloudToDevicePtrOutput() IoTHubCloudToDevicePtrOutput { return i.ToIoTHubCloudToDevicePtrOutputWithContext(context.Background()) } func (i *ioTHubCloudToDevicePtrType) ToIoTHubCloudToDevicePtrOutputWithContext(ctx context.Context) IoTHubCloudToDevicePtrOutput { return pulumi.ToOutputWithContext(ctx, i).(IoTHubCloudToDevicePtrOutput) } type IoTHubCloudToDeviceOutput struct{ *pulumi.OutputState } func (IoTHubCloudToDeviceOutput) ElementType() reflect.Type { return reflect.TypeOf((*IoTHubCloudToDevice)(nil)).Elem() } func (o IoTHubCloudToDeviceOutput) ToIoTHubCloudToDeviceOutput() IoTHubCloudToDeviceOutput { return o } func (o IoTHubCloudToDeviceOutput) ToIoTHubCloudToDeviceOutputWithContext(ctx context.Context) IoTHubCloudToDeviceOutput { return o } func (o IoTHubCloudToDeviceOutput) ToIoTHubCloudToDevicePtrOutput() IoTHubCloudToDevicePtrOutput { return o.ToIoTHubCloudToDevicePtrOutputWithContext(context.Background()) } func (o IoTHubCloudToDeviceOutput) ToIoTHubCloudToDevicePtrOutputWithContext(ctx context.Context) IoTHubCloudToDevicePtrOutput { return o.ApplyTWithContext(ctx, func(_ context.Context, v IoTHubCloudToDevice) *IoTHubCloudToDevice { return &v }).(IoTHubCloudToDevicePtrOutput) } // The default time to live for cloud-to-device messages, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`. func (o IoTHubCloudToDeviceOutput) DefaultTtl() pulumi.StringPtrOutput { return o.ApplyT(func(v IoTHubCloudToDevice) *string { return v.DefaultTtl }).(pulumi.StringPtrOutput) } // A `feedback` block as defined below. func (o IoTHubCloudToDeviceOutput) Feedbacks() IoTHubCloudToDeviceFeedbackArrayOutput { return o.ApplyT(func(v IoTHubCloudToDevice) []IoTHubCloudToDeviceFeedback { return v.Feedbacks }).(IoTHubCloudToDeviceFeedbackArrayOutput) } // The maximum delivery count for cloud-to-device per-device queues. This value must be between `1` and `100`. Defaults to `10`. func (o IoTHubCloudToDeviceOutput) MaxDeliveryCount() pulumi.IntPtrOutput { return o.ApplyT(func(v IoTHubCloudToDevice) *int { return v.MaxDeliveryCount }).(pulumi.IntPtrOutput) } type IoTHubCloudToDevicePtrOutput struct{ *pulumi.OutputState } func (IoTHubCloudToDevicePtrOutput) ElementType() reflect.Type { return reflect.TypeOf((**IoTHubCloudToDevice)(nil)).Elem() } func (o IoTHubCloudToDevicePtrOutput) ToIoTHubCloudToDevicePtrOutput() IoTHubCloudToDevicePtrOutput { return o } func (o IoTHubCloudToDevicePtrOutput) ToIoTHubCloudToDevicePtrOutputWithContext(ctx context.Context) IoTHubCloudToDevicePtrOutput { return o } func (o IoTHubCloudToDevicePtrOutput) Elem() IoTHubCloudToDeviceOutput { return o.ApplyT(func(v *IoTHubCloudToDevice) IoTHubCloudToDevice { if v != nil { return *v } var ret IoTHubCloudToDevice return ret }).(IoTHubCloudToDeviceOutput) } // The default time to live for cloud-to-device messages, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`. func (o IoTHubCloudToDevicePtrOutput) DefaultTtl() pulumi.StringPtrOutput { return o.ApplyT(func(v *IoTHubCloudToDevice) *string { if v == nil { return nil } return v.DefaultTtl }).(pulumi.StringPtrOutput) } // A `feedback` block as defined below. func (o IoTHubCloudToDevicePtrOutput) Feedbacks() IoTHubCloudToDeviceFeedbackArrayOutput { return o.ApplyT(func(v *IoTHubCloudToDevice) []IoTHubCloudToDeviceFeedback { if v == nil { return nil } return v.Feedbacks }).(IoTHubCloudToDeviceFeedbackArrayOutput) } // The maximum delivery count for cloud-to-device per-device queues. This value must be between `1` and `100`. Defaults to `10`. func (o IoTHubCloudToDevicePtrOutput) MaxDeliveryCount() pulumi.IntPtrOutput { return o.ApplyT(func(v *IoTHubCloudToDevice) *int { if v == nil { return nil } return v.MaxDeliveryCount }).(pulumi.IntPtrOutput) } type IoTHubCloudToDeviceFeedback struct { // The lock duration for the feedback queue, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 5 and 300 seconds. Defaults to `PT60S`. LockDuration *string `pulumi:"lockDuration"` // The maximum delivery count for the feedback queue. This value must be between `1` and `100`. Defaults to `10`. MaxDeliveryCount *int `pulumi:"maxDeliveryCount"` // The retention time for service-bound feedback messages, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`. TimeToLive *string `pulumi:"timeToLive"` } // IoTHubCloudToDeviceFeedbackInput is an input type that accepts IoTHubCloudToDeviceFeedbackArgs and IoTHubCloudToDeviceFeedbackOutput values. // You can construct a concrete instance of `IoTHubCloudToDeviceFeedbackInput` via: // // IoTHubCloudToDeviceFeedbackArgs{...} type IoTHubCloudToDeviceFeedbackInput interface { pulumi.Input ToIoTHubCloudToDeviceFeedbackOutput() IoTHubCloudToDeviceFeedbackOutput ToIoTHubCloudToDeviceFeedbackOutputWithContext(context.Context) IoTHubCloudToDeviceFeedbackOutput } type IoTHubCloudToDeviceFeedbackArgs struct { // The lock duration for the feedback queue, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 5 and 300 seconds. Defaults to `PT60S`. LockDuration pulumi.StringPtrInput `pulumi:"lockDuration"` // The maximum delivery count for the feedback queue. This value must be between `1` and `100`. Defaults to `10`. MaxDeliveryCount pulumi.IntPtrInput `pulumi:"maxDeliveryCount"` // The retention time for service-bound feedback messages, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`. TimeToLive pulumi.StringPtrInput `pulumi:"timeToLive"` } func (IoTHubCloudToDeviceFeedbackArgs) ElementType() reflect.Type { return reflect.TypeOf((*IoTHubCloudToDeviceFeedback)(nil)).Elem() } func (i IoTHubCloudToDeviceFeedbackArgs) ToIoTHubCloudToDeviceFeedbackOutput() IoTHubCloudToDeviceFeedbackOutput { return i.ToIoTHubCloudToDeviceFeedbackOutputWithContext(context.Background()) } func (i IoTHubCloudToDeviceFeedbackArgs) ToIoTHubCloudToDeviceFeedbackOutputWithContext(ctx context.Context) IoTHubCloudToDeviceFeedbackOutput { return pulumi.ToOutputWithContext(ctx, i).(IoTHubCloudToDeviceFeedbackOutput) } // IoTHubCloudToDeviceFeedbackArrayInput is an input type that accepts IoTHubCloudToDeviceFeedbackArray and IoTHubCloudToDeviceFeedbackArrayOutput values. // You can construct a concrete instance of `IoTHubCloudToDeviceFeedbackArrayInput` via: // // IoTHubCloudToDeviceFeedbackArray{ IoTHubCloudToDeviceFeedbackArgs{...} } type IoTHubCloudToDeviceFeedbackArrayInput interface { pulumi.Input ToIoTHubCloudToDeviceFeedbackArrayOutput() IoTHubCloudToDeviceFeedbackArrayOutput ToIoTHubCloudToDeviceFeedbackArrayOutputWithContext(context.Context) IoTHubCloudToDeviceFeedbackArrayOutput } type IoTHubCloudToDeviceFeedbackArray []IoTHubCloudToDeviceFeedbackInput func (IoTHubCloudToDeviceFeedbackArray) ElementType() reflect.Type { return reflect.TypeOf((*[]IoTHubCloudToDeviceFeedback)(nil)).Elem() } func (i IoTHubCloudToDeviceFeedbackArray) ToIoTHubCloudToDeviceFeedbackArrayOutput() IoTHubCloudToDeviceFeedbackArrayOutput { return i.ToIoTHubCloudToDeviceFeedbackArrayOutputWithContext(context.Background()) } func (i IoTHubCloudToDeviceFeedbackArray) ToIoTHubCloudToDeviceFeedbackArrayOutputWithContext(ctx context.Context) IoTHubCloudToDeviceFeedbackArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(IoTHubCloudToDeviceFeedbackArrayOutput) } type IoTHubCloudToDeviceFeedbackOutput struct{ *pulumi.OutputState } func (IoTHubCloudToDeviceFeedbackOutput) ElementType() reflect.Type { return reflect.TypeOf((*IoTHubCloudToDeviceFeedback)(nil)).Elem() } func (o IoTHubCloudToDeviceFeedbackOutput) ToIoTHubCloudToDeviceFeedbackOutput() IoTHubCloudToDeviceFeedbackOutput { return o } func (o IoTHubCloudToDeviceFeedbackOutput) ToIoTHubCloudToDeviceFeedbackOutputWithContext(ctx context.Context) IoTHubCloudToDeviceFeedbackOutput { return o } // The lock duration for the feedback queue, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 5 and 300 seconds. Defaults to `PT60S`. func (o IoTHubCloudToDeviceFeedbackOutput) LockDuration() pulumi.StringPtrOutput { return o.ApplyT(func(v IoTHubCloudToDeviceFeedback) *string { return v.LockDuration }).(pulumi.StringPtrOutput) } // The maximum delivery count for the feedback queue. This value must be between `1` and `100`. Defaults to `10`. func (o IoTHubCloudToDeviceFeedbackOutput) MaxDeliveryCount() pulumi.IntPtrOutput { return o.ApplyT(func(v IoTHubCloudToDeviceFeedback) *int { return v.MaxDeliveryCount }).(pulumi.IntPtrOutput) } // The retention time for service-bound feedback messages, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`. func (o IoTHubCloudToDeviceFeedbackOutput) TimeToLive() pulumi.StringPtrOutput { return o.ApplyT(func(v IoTHubCloudToDeviceFeedback) *string { return v.TimeToLive }).(pulumi.StringPtrOutput) } type IoTHubCloudToDeviceFeedbackArrayOutput struct{ *pulumi.OutputState } func (IoTHubCloudToDeviceFeedbackArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]IoTHubCloudToDeviceFeedback)(nil)).Elem() } func (o IoTHubCloudToDeviceFeedbackArrayOutput) ToIoTHubCloudToDeviceFeedbackArrayOutput() IoTHubCloudToDeviceFeedbackArrayOutput { return o } func (o IoTHubCloudToDeviceFeedbackArrayOutput) ToIoTHubCloudToDeviceFeedbackArrayOutputWithContext(ctx context.Context) IoTHubCloudToDeviceFeedbackArrayOutput { return o } func (o IoTHubCloudToDeviceFeedbackArrayOutput) Index(i pulumi.IntInput) IoTHubCloudToDeviceFeedbackOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) IoTHubCloudToDeviceFeedback { return vs[0].([]IoTHubCloudToDeviceFeedback)[vs[1].(int)] }).(IoTHubCloudToDeviceFeedbackOutput) } type IoTHubEndpoint struct { // The type used to authenticate against the endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType *string `pulumi:"authenticationType"` // Time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds. This attribute is applicable for endpoint type `AzureIotHub.StorageContainer`. BatchFrequencyInSeconds *int `pulumi:"batchFrequencyInSeconds"` // The connection string for the endpoint. This attribute is mandatory and can only be specified when `authenticationType` is `keyBased`. ConnectionString *string `pulumi:"connectionString"` // The name of storage container in the storage account. This attribute is mandatory for endpoint type `AzureIotHub.StorageContainer`. ContainerName *string `pulumi:"containerName"` // Encoding that is used to serialize messages to blobs. Supported values are `Avro`, `AvroDeflate` and `JSON`. Default value is `Avro`. This attribute is applicable for endpoint type `AzureIotHub.StorageContainer`. Changing this forces a new resource to be created. Encoding *string `pulumi:"encoding"` // URI of the Service Bus or Event Hubs Namespace endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased` for endpoint type `AzureIotHub.ServiceBusQueue`, `AzureIotHub.ServiceBusTopic` or `AzureIotHub.EventHub`. EndpointUri *string `pulumi:"endpointUri"` // Name of the Service Bus Queue/Topic or Event Hub. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased` for endpoint type `AzureIotHub.ServiceBusQueue`, `AzureIotHub.ServiceBusTopic` or `AzureIotHub.EventHub`. EntityPath *string `pulumi:"entityPath"` // File name format for the blob. All parameters are mandatory but can be reordered. This attribute is applicable for endpoint type `AzureIotHub.StorageContainer`. Defaults to `{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}`. FileNameFormat *string `pulumi:"fileNameFormat"` // The ID of the User Managed Identity used to authenticate against the endpoint. // // > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the IoT Hub. If `identityId` is omitted when `authenticationType` is `identityBased`, then the System-Assigned Managed Identity of the IoT Hub will be used. // // > **Note:** An IoT Hub can only be updated to use the System-Assigned Managed Identity for `endpoint` since it is not possible to grant access to the endpoint until after creation. The extracted resources `azurerm_iothub_endpoint_*` can be used to configure Endpoints with the IoT Hub's System-Assigned Managed Identity without the need for an update. IdentityId *string `pulumi:"identityId"` // Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). This attribute is applicable for endpoint type `AzureIotHub.StorageContainer`. MaxChunkSizeInBytes *int `pulumi:"maxChunkSizeInBytes"` // The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Name string `pulumi:"name"` // The resource group in which the endpoint will 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 type of the endpoint. Possible values are `AzureIotHub.StorageContainer`, `AzureIotHub.ServiceBusQueue`, `AzureIotHub.ServiceBusTopic` or `AzureIotHub.EventHub`. Type string `pulumi:"type"` } // IoTHubEndpointInput is an input type that accepts IoTHubEndpointArgs and IoTHubEndpointOutput values. // You can construct a concrete instance of `IoTHubEndpointInput` via: // // IoTHubEndpointArgs{...} type IoTHubEndpointInput interface { pulumi.Input ToIoTHubEndpointOutput() IoTHubEndpointOutput ToIoTHubEndpointOutputWithContext(context.Context) IoTHubEndpointOutput } type IoTHubEndpointArgs struct { // The type used to authenticate against the endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType pulumi.StringPtrInput `pulumi:"authenticationType"` // Time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds. This attribute is applicable for endpoint type `AzureIotHub.StorageContainer`. BatchFrequencyInSeconds pulumi.IntPtrInput `pulumi:"batchFrequencyInSeconds"` // The connection string for the endpoint. This attribute is mandatory and can only be specified when `authenticationType` is `keyBased`. ConnectionString pulumi.StringPtrInput `pulumi:"connectionString"` // The name of storage container in the storage account. This attribute is mandatory for endpoint type `AzureIotHub.StorageContainer`. ContainerName pulumi.StringPtrInput `pulumi:"containerName"` // Encoding that is used to serialize messages to blobs. Supported values are `Avro`, `AvroDeflate` and `JSON`. Default value is `Avro`. This attribute is applicable for endpoint type `AzureIotHub.StorageContainer`. Changing this forces a new resource to be created. Encoding pulumi.StringPtrInput `pulumi:"encoding"` // URI of the Service Bus or Event Hubs Namespace endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased` for endpoint type `AzureIotHub.ServiceBusQueue`, `AzureIotHub.ServiceBusTopic` or `AzureIotHub.EventHub`. EndpointUri pulumi.StringPtrInput `pulumi:"endpointUri"` // Name of the Service Bus Queue/Topic or Event Hub. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased` for endpoint type `AzureIotHub.ServiceBusQueue`, `AzureIotHub.ServiceBusTopic` or `AzureIotHub.EventHub`. EntityPath pulumi.StringPtrInput `pulumi:"entityPath"` // File name format for the blob. All parameters are mandatory but can be reordered. This attribute is applicable for endpoint type `AzureIotHub.StorageContainer`. Defaults to `{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}`. FileNameFormat pulumi.StringPtrInput `pulumi:"fileNameFormat"` // The ID of the User Managed Identity used to authenticate against the endpoint. // // > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the IoT Hub. If `identityId` is omitted when `authenticationType` is `identityBased`, then the System-Assigned Managed Identity of the IoT Hub will be used. // // > **Note:** An IoT Hub can only be updated to use the System-Assigned Managed Identity for `endpoint` since it is not possible to grant access to the endpoint until after creation. The extracted resources `azurerm_iothub_endpoint_*` can be used to configure Endpoints with the IoT Hub's System-Assigned Managed Identity without the need for an update. IdentityId pulumi.StringPtrInput `pulumi:"identityId"` // Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). This attribute is applicable for endpoint type `AzureIotHub.StorageContainer`. MaxChunkSizeInBytes pulumi.IntPtrInput `pulumi:"maxChunkSizeInBytes"` // The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. Name pulumi.StringInput `pulumi:"name"` // The resource group in which the endpoint will be created. ResourceGroupName pulumi.StringPtrInput `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.StringPtrInput `pulumi:"subscriptionId"` // The type of the endpoint. Possible values are `AzureIotHub.StorageContainer`, `AzureIotHub.ServiceBusQueue`, `AzureIotHub.ServiceBusTopic` or `AzureIotHub.EventHub`. Type pulumi.StringInput `pulumi:"type"` } func (IoTHubEndpointArgs) ElementType() reflect.Type { return reflect.TypeOf((*IoTHubEndpoint)(nil)).Elem() } func (i IoTHubEndpointArgs) ToIoTHubEndpointOutput() IoTHubEndpointOutput { return i.ToIoTHubEndpointOutputWithContext(context.Background()) } func (i IoTHubEndpointArgs) ToIoTHubEndpointOutputWithContext(ctx context.Context) IoTHubEndpointOutput { return pulumi.ToOutputWithContext(ctx, i).(IoTHubEndpointOutput) } // IoTHubEndpointArrayInput is an input type that accepts IoTHubEndpointArray and IoTHubEndpointArrayOutput values. // You can construct a concrete instance of `IoTHubEndpointArrayInput` via: // // IoTHubEndpointArray{ IoTHubEndpointArgs{...} } type IoTHubEndpointArrayInput interface { pulumi.Input ToIoTHubEndpointArrayOutput() IoTHubEndpointArrayOutput ToIoTHubEndpointArrayOutputWithContext(context.Context) IoTHubEndpointArrayOutput } type IoTHubEndpointArray []IoTHubEndpointInput func (IoTHubEndpointArray) ElementType() reflect.Type { return reflect.TypeOf((*[]IoTHubEndpoint)(nil)).Elem() } func (i IoTHubEndpointArray) ToIoTHubEndpointArrayOutput() IoTHubEndpointArrayOutput { return i.ToIoTHubEndpointArrayOutputWithContext(context.Background()) } func (i IoTHubEndpointArray) ToIoTHubEndpointArrayOutputWithContext(ctx context.Context) IoTHubEndpointArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(IoTHubEndpointArrayOutput) } type IoTHubEndpointOutput struct{ *pulumi.OutputState } func (IoTHubEndpointOutput) ElementType() reflect.Type { return reflect.TypeOf((*IoTHubEndpoint)(nil)).Elem() } func (o IoTHubEndpointOutput) ToIoTHubEndpointOutput() IoTHubEndpointOutput { return o } func (o IoTHubEndpointOutput) ToIoTHubEndpointOutputWithContext(ctx context.Context) IoTHubEndpointOutput { return o } // The type used to authenticate against the endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. func (o IoTHubEndpointOutput) AuthenticationType() pulumi.StringPtrOutput { return o.ApplyT(func(v IoTHubEndpoint) *string { return v.AuthenticationType }).(pulumi.StringPtrOutput) } // Time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds. This attribute is applicable for endpoint type `AzureIotHub.StorageContainer`. func (o IoTHubEndpointOutput) BatchFrequencyInSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v IoTHubEndpoint) *int { return v.BatchFrequencyInSeconds }).(pulumi.IntPtrOutput) } // The connection string for the endpoint. This attribute is mandatory and can only be specified when `authenticationType` is `keyBased`. func (o IoTHubEndpointOutput) ConnectionString() pulumi.StringPtrOutput { return o.ApplyT(func(v IoTHubEndpoint) *string { return v.ConnectionString }).(pulumi.StringPtrOutput) } // The name of storage container in the storage account. This attribute is mandatory for endpoint type `AzureIotHub.StorageContainer`. func (o IoTHubEndpointOutput) ContainerName() pulumi.StringPtrOutput { return o.ApplyT(func(v IoTHubEndpoint) *string { return v.ContainerName }).(pulumi.StringPtrOutput) } // Encoding that is used to serialize messages to blobs. Supported values are `Avro`, `AvroDeflate` and `JSON`. Default value is `Avro`. This attribute is applicable for endpoint type `AzureIotHub.StorageContainer`. Changing this forces a new resource to be created. func (o IoTHubEndpointOutput) Encoding() pulumi.StringPtrOutput { return o.ApplyT(func(v IoTHubEndpoint) *string { return v.Encoding }).(pulumi.StringPtrOutput) } // URI of the Service Bus or Event Hubs Namespace endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased` for endpoint type `AzureIotHub.ServiceBusQueue`, `AzureIotHub.ServiceBusTopic` or `AzureIotHub.EventHub`. func (o IoTHubEndpointOutput) EndpointUri() pulumi.StringPtrOutput { return o.ApplyT(func(v IoTHubEndpoint) *string { return v.EndpointUri }).(pulumi.StringPtrOutput) } // Name of the Service Bus Queue/Topic or Event Hub. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased` for endpoint type `AzureIotHub.ServiceBusQueue`, `AzureIotHub.ServiceBusTopic` or `AzureIotHub.EventHub`. func (o IoTHubEndpointOutput) EntityPath() pulumi.StringPtrOutput { return o.ApplyT(func(v IoTHubEndpoint) *string { return v.EntityPath }).(pulumi.StringPtrOutput) } // File name format for the blob. All parameters are mandatory but can be reordered. This attribute is applicable for endpoint type `AzureIotHub.StorageContainer`. Defaults to `{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}`. func (o IoTHubEndpointOutput) FileNameFormat() pulumi.StringPtrOutput { return o.ApplyT(func(v IoTHubEndpoint) *string { return v.FileNameFormat }).(pulumi.StringPtrOutput) } // The ID of the User Managed Identity used to authenticate against the endpoint. // // > **Note:** `identityId` can only be specified when `authenticationType` is `identityBased`. It must be one of the `identityIds` of the IoT Hub. If `identityId` is omitted when `authenticationType` is `identityBased`, then the System-Assigned Managed Identity of the IoT Hub will be used. // // > **Note:** An IoT Hub can only be updated to use the System-Assigned Managed Identity for `endpoint` since it is not possible to grant access to the endpoint until after creation. The extracted resources `azurerm_iothub_endpoint_*` can be used to configure Endpoints with the IoT Hub's System-Assigned Managed Identity without the need for an update. func (o IoTHubEndpointOutput) IdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v IoTHubEndpoint) *string { return v.IdentityId }).(pulumi.StringPtrOutput) } // Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). This attribute is applicable for endpoint type `AzureIotHub.StorageContainer`. func (o IoTHubEndpointOutput) MaxChunkSizeInBytes() pulumi.IntPtrOutput { return o.ApplyT(func(v IoTHubEndpoint) *int { return v.MaxChunkSizeInBytes }).(pulumi.IntPtrOutput) } // The name of the endpoint. The name must be unique across endpoint types. The following names are reserved: `events`, `operationsMonitoringEvents`, `fileNotifications` and `$default`. func (o IoTHubEndpointOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v IoTHubEndpoint) string { return v.Name }).(pulumi.StringOutput) } // The resource group in which the endpoint will be created. func (o IoTHubEndpointOutput) ResourceGroupName() pulumi.StringPtrOutput { return o.ApplyT(func(v IoTHubEndpoint) *string { return v.ResourceGroupName }).(pulumi.StringPtrOutput) } // 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 IoTHubEndpointOutput) SubscriptionId() pulumi.StringPtrOutput { return o.ApplyT(func(v IoTHubEndpoint) *string { return v.SubscriptionId }).(pulumi.StringPtrOutput) } // The type of the endpoint. Possible values are `AzureIotHub.StorageContainer`, `AzureIotHub.ServiceBusQueue`, `AzureIotHub.ServiceBusTopic` or `AzureIotHub.EventHub`. func (o IoTHubEndpointOutput) Type() pulumi.StringOutput { return o.ApplyT(func(v IoTHubEndpoint) string { return v.Type }).(pulumi.StringOutput) } type IoTHubEndpointArrayOutput struct{ *pulumi.OutputState } func (IoTHubEndpointArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]IoTHubEndpoint)(nil)).Elem() } func (o IoTHubEndpointArrayOutput) ToIoTHubEndpointArrayOutput() IoTHubEndpointArrayOutput { return o } func (o IoTHubEndpointArrayOutput) ToIoTHubEndpointArrayOutputWithContext(ctx context.Context) IoTHubEndpointArrayOutput { return o } func (o IoTHubEndpointArrayOutput) Index(i pulumi.IntInput) IoTHubEndpointOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) IoTHubEndpoint { return vs[0].([]IoTHubEndpoint)[vs[1].(int)] }).(IoTHubEndpointOutput) } type IoTHubEnrichment struct { // The list of endpoints which will be enriched. EndpointNames []string `pulumi:"endpointNames"` // The key of the enrichment. Key string `pulumi:"key"` // 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"` } // IoTHubEnrichmentInput is an input type that accepts IoTHubEnrichmentArgs and IoTHubEnrichmentOutput values. // You can construct a concrete instance of `IoTHubEnrichmentInput` via: // // IoTHubEnrichmentArgs{...} type IoTHubEnrichmentInput interface { pulumi.Input ToIoTHubEnrichmentOutput() IoTHubEnrichmentOutput ToIoTHubEnrichmentOutputWithContext(context.Context) IoTHubEnrichmentOutput } type IoTHubEnrichmentArgs struct { // The list of endpoints which will be enriched. EndpointNames pulumi.StringArrayInput `pulumi:"endpointNames"` // The key of the enrichment. Key pulumi.StringInput `pulumi:"key"` // 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 `pulumi:"value"` } func (IoTHubEnrichmentArgs) ElementType() reflect.Type { return reflect.TypeOf((*IoTHubEnrichment)(nil)).Elem() } func (i IoTHubEnrichmentArgs) ToIoTHubEnrichmentOutput() IoTHubEnrichmentOutput { return i.ToIoTHubEnrichmentOutputWithContext(context.Background()) } func (i IoTHubEnrichmentArgs) ToIoTHubEnrichmentOutputWithContext(ctx context.Context) IoTHubEnrichmentOutput { return pulumi.ToOutputWithContext(ctx, i).(IoTHubEnrichmentOutput) } // IoTHubEnrichmentArrayInput is an input type that accepts IoTHubEnrichmentArray and IoTHubEnrichmentArrayOutput values. // You can construct a concrete instance of `IoTHubEnrichmentArrayInput` via: // // IoTHubEnrichmentArray{ IoTHubEnrichmentArgs{...} } type IoTHubEnrichmentArrayInput interface { pulumi.Input ToIoTHubEnrichmentArrayOutput() IoTHubEnrichmentArrayOutput ToIoTHubEnrichmentArrayOutputWithContext(context.Context) IoTHubEnrichmentArrayOutput } type IoTHubEnrichmentArray []IoTHubEnrichmentInput
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/iot/endpointStorageContainer.go
sdk/go/azure/iot/endpointStorageContainer.go
// Code generated 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 Storage Container 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/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("example"), // ResourceGroupName: example.Name, // Location: example.Location, // AccountTier: pulumi.String("Standard"), // AccountReplicationType: pulumi.String("LRS"), // }) // if err != nil { // return err // } // _, err = storage.NewContainer(ctx, "example", &storage.ContainerArgs{ // Name: pulumi.String("acctestcont"), // StorageAccountName: exampleAccount.Name, // ContainerAccessType: pulumi.String("private"), // }) // 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.NewEndpointStorageContainer(ctx, "example", &iot.EndpointStorageContainerArgs{ // ResourceGroupName: example.Name, // IothubId: exampleIoTHub.ID(), // Name: pulumi.String("acctest"), // ContainerName: pulumi.String("acctestcont"), // ConnectionString: exampleAccount.PrimaryBlobConnectionString, // FileNameFormat: pulumi.String("{iothub}/{partition}_{YYYY}_{MM}_{DD}_{HH}_{mm}"), // BatchFrequencyInSeconds: pulumi.Int(60), // MaxChunkSizeInBytes: pulumi.Int(10485760), // Encoding: pulumi.String("JSON"), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // IoTHub Storage Container Endpoint can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:iot/endpointStorageContainer:EndpointStorageContainer storage_container1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/endpoints/storage_container_endpoint1 // ``` type EndpointStorageContainer struct { pulumi.CustomResourceState // Type used to authenticate against the storage endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType pulumi.StringPtrOutput `pulumi:"authenticationType"` // Time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds. BatchFrequencyInSeconds pulumi.IntPtrOutput `pulumi:"batchFrequencyInSeconds"` // The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`. ConnectionString pulumi.StringPtrOutput `pulumi:"connectionString"` // The name of storage container in the storage account. ContainerName pulumi.StringOutput `pulumi:"containerName"` // Encoding that is used to serialize messages to blobs. Supported values are `Avro`, `AvroDeflate` and `JSON`. Default value is `Avro`. Changing this forces a new resource to be created. Encoding pulumi.StringPtrOutput `pulumi:"encoding"` // URI of the Storage Container endpoint. This corresponds to the `primaryBlobEndpoint` of the parent storage account. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`. EndpointUri pulumi.StringPtrOutput `pulumi:"endpointUri"` // File name format for the blob. All parameters are mandatory but can be reordered. Defaults to `{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}`. FileNameFormat pulumi.StringPtrOutput `pulumi:"fileNameFormat"` // ID of the User Managed Identity used to authenticate against the storage 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"` // Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). MaxChunkSizeInBytes pulumi.IntPtrOutput `pulumi:"maxChunkSizeInBytes"` // 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 Storage Container 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"` } // NewEndpointStorageContainer registers a new resource with the given unique name, arguments, and options. func NewEndpointStorageContainer(ctx *pulumi.Context, name string, args *EndpointStorageContainerArgs, opts ...pulumi.ResourceOption) (*EndpointStorageContainer, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ContainerName == nil { return nil, errors.New("invalid value for required argument 'ContainerName'") } 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 EndpointStorageContainer err := ctx.RegisterResource("azure:iot/endpointStorageContainer:EndpointStorageContainer", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetEndpointStorageContainer gets an existing EndpointStorageContainer 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 GetEndpointStorageContainer(ctx *pulumi.Context, name string, id pulumi.IDInput, state *EndpointStorageContainerState, opts ...pulumi.ResourceOption) (*EndpointStorageContainer, error) { var resource EndpointStorageContainer err := ctx.ReadResource("azure:iot/endpointStorageContainer:EndpointStorageContainer", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering EndpointStorageContainer resources. type endpointStorageContainerState struct { // Type used to authenticate against the storage endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType *string `pulumi:"authenticationType"` // Time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds. BatchFrequencyInSeconds *int `pulumi:"batchFrequencyInSeconds"` // The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`. ConnectionString *string `pulumi:"connectionString"` // The name of storage container in the storage account. ContainerName *string `pulumi:"containerName"` // Encoding that is used to serialize messages to blobs. Supported values are `Avro`, `AvroDeflate` and `JSON`. Default value is `Avro`. Changing this forces a new resource to be created. Encoding *string `pulumi:"encoding"` // URI of the Storage Container endpoint. This corresponds to the `primaryBlobEndpoint` of the parent storage account. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`. EndpointUri *string `pulumi:"endpointUri"` // File name format for the blob. All parameters are mandatory but can be reordered. Defaults to `{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}`. FileNameFormat *string `pulumi:"fileNameFormat"` // ID of the User Managed Identity used to authenticate against the storage 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"` // Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). MaxChunkSizeInBytes *int `pulumi:"maxChunkSizeInBytes"` // 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 Storage Container 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 EndpointStorageContainerState struct { // Type used to authenticate against the storage endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType pulumi.StringPtrInput // Time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds. BatchFrequencyInSeconds pulumi.IntPtrInput // The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`. ConnectionString pulumi.StringPtrInput // The name of storage container in the storage account. ContainerName pulumi.StringPtrInput // Encoding that is used to serialize messages to blobs. Supported values are `Avro`, `AvroDeflate` and `JSON`. Default value is `Avro`. Changing this forces a new resource to be created. Encoding pulumi.StringPtrInput // URI of the Storage Container endpoint. This corresponds to the `primaryBlobEndpoint` of the parent storage account. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`. EndpointUri pulumi.StringPtrInput // File name format for the blob. All parameters are mandatory but can be reordered. Defaults to `{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}`. FileNameFormat pulumi.StringPtrInput // ID of the User Managed Identity used to authenticate against the storage 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 // Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). MaxChunkSizeInBytes pulumi.IntPtrInput // 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 Storage Container 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 (EndpointStorageContainerState) ElementType() reflect.Type { return reflect.TypeOf((*endpointStorageContainerState)(nil)).Elem() } type endpointStorageContainerArgs struct { // Type used to authenticate against the storage endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType *string `pulumi:"authenticationType"` // Time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds. BatchFrequencyInSeconds *int `pulumi:"batchFrequencyInSeconds"` // The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`. ConnectionString *string `pulumi:"connectionString"` // The name of storage container in the storage account. ContainerName string `pulumi:"containerName"` // Encoding that is used to serialize messages to blobs. Supported values are `Avro`, `AvroDeflate` and `JSON`. Default value is `Avro`. Changing this forces a new resource to be created. Encoding *string `pulumi:"encoding"` // URI of the Storage Container endpoint. This corresponds to the `primaryBlobEndpoint` of the parent storage account. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`. EndpointUri *string `pulumi:"endpointUri"` // File name format for the blob. All parameters are mandatory but can be reordered. Defaults to `{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}`. FileNameFormat *string `pulumi:"fileNameFormat"` // ID of the User Managed Identity used to authenticate against the storage 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"` // Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). MaxChunkSizeInBytes *int `pulumi:"maxChunkSizeInBytes"` // 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 Storage Container 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 EndpointStorageContainer resource. type EndpointStorageContainerArgs struct { // Type used to authenticate against the storage endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType pulumi.StringPtrInput // Time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds. BatchFrequencyInSeconds pulumi.IntPtrInput // The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`. ConnectionString pulumi.StringPtrInput // The name of storage container in the storage account. ContainerName pulumi.StringInput // Encoding that is used to serialize messages to blobs. Supported values are `Avro`, `AvroDeflate` and `JSON`. Default value is `Avro`. Changing this forces a new resource to be created. Encoding pulumi.StringPtrInput // URI of the Storage Container endpoint. This corresponds to the `primaryBlobEndpoint` of the parent storage account. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`. EndpointUri pulumi.StringPtrInput // File name format for the blob. All parameters are mandatory but can be reordered. Defaults to `{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}`. FileNameFormat pulumi.StringPtrInput // ID of the User Managed Identity used to authenticate against the storage 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 // Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). MaxChunkSizeInBytes pulumi.IntPtrInput // 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 Storage Container 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 (EndpointStorageContainerArgs) ElementType() reflect.Type { return reflect.TypeOf((*endpointStorageContainerArgs)(nil)).Elem() } type EndpointStorageContainerInput interface { pulumi.Input ToEndpointStorageContainerOutput() EndpointStorageContainerOutput ToEndpointStorageContainerOutputWithContext(ctx context.Context) EndpointStorageContainerOutput } func (*EndpointStorageContainer) ElementType() reflect.Type { return reflect.TypeOf((**EndpointStorageContainer)(nil)).Elem() } func (i *EndpointStorageContainer) ToEndpointStorageContainerOutput() EndpointStorageContainerOutput { return i.ToEndpointStorageContainerOutputWithContext(context.Background()) } func (i *EndpointStorageContainer) ToEndpointStorageContainerOutputWithContext(ctx context.Context) EndpointStorageContainerOutput { return pulumi.ToOutputWithContext(ctx, i).(EndpointStorageContainerOutput) } // EndpointStorageContainerArrayInput is an input type that accepts EndpointStorageContainerArray and EndpointStorageContainerArrayOutput values. // You can construct a concrete instance of `EndpointStorageContainerArrayInput` via: // // EndpointStorageContainerArray{ EndpointStorageContainerArgs{...} } type EndpointStorageContainerArrayInput interface { pulumi.Input ToEndpointStorageContainerArrayOutput() EndpointStorageContainerArrayOutput ToEndpointStorageContainerArrayOutputWithContext(context.Context) EndpointStorageContainerArrayOutput } type EndpointStorageContainerArray []EndpointStorageContainerInput func (EndpointStorageContainerArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*EndpointStorageContainer)(nil)).Elem() } func (i EndpointStorageContainerArray) ToEndpointStorageContainerArrayOutput() EndpointStorageContainerArrayOutput { return i.ToEndpointStorageContainerArrayOutputWithContext(context.Background()) } func (i EndpointStorageContainerArray) ToEndpointStorageContainerArrayOutputWithContext(ctx context.Context) EndpointStorageContainerArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(EndpointStorageContainerArrayOutput) } // EndpointStorageContainerMapInput is an input type that accepts EndpointStorageContainerMap and EndpointStorageContainerMapOutput values. // You can construct a concrete instance of `EndpointStorageContainerMapInput` via: // // EndpointStorageContainerMap{ "key": EndpointStorageContainerArgs{...} } type EndpointStorageContainerMapInput interface { pulumi.Input ToEndpointStorageContainerMapOutput() EndpointStorageContainerMapOutput ToEndpointStorageContainerMapOutputWithContext(context.Context) EndpointStorageContainerMapOutput } type EndpointStorageContainerMap map[string]EndpointStorageContainerInput func (EndpointStorageContainerMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*EndpointStorageContainer)(nil)).Elem() } func (i EndpointStorageContainerMap) ToEndpointStorageContainerMapOutput() EndpointStorageContainerMapOutput { return i.ToEndpointStorageContainerMapOutputWithContext(context.Background()) } func (i EndpointStorageContainerMap) ToEndpointStorageContainerMapOutputWithContext(ctx context.Context) EndpointStorageContainerMapOutput { return pulumi.ToOutputWithContext(ctx, i).(EndpointStorageContainerMapOutput) } type EndpointStorageContainerOutput struct{ *pulumi.OutputState } func (EndpointStorageContainerOutput) ElementType() reflect.Type { return reflect.TypeOf((**EndpointStorageContainer)(nil)).Elem() } func (o EndpointStorageContainerOutput) ToEndpointStorageContainerOutput() EndpointStorageContainerOutput { return o } func (o EndpointStorageContainerOutput) ToEndpointStorageContainerOutputWithContext(ctx context.Context) EndpointStorageContainerOutput { return o } // Type used to authenticate against the storage endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. func (o EndpointStorageContainerOutput) AuthenticationType() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointStorageContainer) pulumi.StringPtrOutput { return v.AuthenticationType }).(pulumi.StringPtrOutput) } // Time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds. func (o EndpointStorageContainerOutput) BatchFrequencyInSeconds() pulumi.IntPtrOutput { return o.ApplyT(func(v *EndpointStorageContainer) pulumi.IntPtrOutput { return v.BatchFrequencyInSeconds }).(pulumi.IntPtrOutput) } // The connection string for the endpoint. This attribute can only be specified and is mandatory when `authenticationType` is `keyBased`. func (o EndpointStorageContainerOutput) ConnectionString() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointStorageContainer) pulumi.StringPtrOutput { return v.ConnectionString }).(pulumi.StringPtrOutput) } // The name of storage container in the storage account. func (o EndpointStorageContainerOutput) ContainerName() pulumi.StringOutput { return o.ApplyT(func(v *EndpointStorageContainer) pulumi.StringOutput { return v.ContainerName }).(pulumi.StringOutput) } // Encoding that is used to serialize messages to blobs. Supported values are `Avro`, `AvroDeflate` and `JSON`. Default value is `Avro`. Changing this forces a new resource to be created. func (o EndpointStorageContainerOutput) Encoding() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointStorageContainer) pulumi.StringPtrOutput { return v.Encoding }).(pulumi.StringPtrOutput) } // URI of the Storage Container endpoint. This corresponds to the `primaryBlobEndpoint` of the parent storage account. This attribute can only be specified and is mandatory when `authenticationType` is `identityBased`. func (o EndpointStorageContainerOutput) EndpointUri() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointStorageContainer) pulumi.StringPtrOutput { return v.EndpointUri }).(pulumi.StringPtrOutput) } // File name format for the blob. All parameters are mandatory but can be reordered. Defaults to `{iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}`. func (o EndpointStorageContainerOutput) FileNameFormat() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointStorageContainer) pulumi.StringPtrOutput { return v.FileNameFormat }).(pulumi.StringPtrOutput) } // ID of the User Managed Identity used to authenticate against the storage 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 EndpointStorageContainerOutput) IdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointStorageContainer) pulumi.StringPtrOutput { return v.IdentityId }).(pulumi.StringPtrOutput) } // The IoTHub ID for the endpoint. Changing this forces a new resource to be created. func (o EndpointStorageContainerOutput) IothubId() pulumi.StringOutput { return o.ApplyT(func(v *EndpointStorageContainer) pulumi.StringOutput { return v.IothubId }).(pulumi.StringOutput) } // Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB). func (o EndpointStorageContainerOutput) MaxChunkSizeInBytes() pulumi.IntPtrOutput { return o.ApplyT(func(v *EndpointStorageContainer) pulumi.IntPtrOutput { return v.MaxChunkSizeInBytes }).(pulumi.IntPtrOutput) } // 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 EndpointStorageContainerOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *EndpointStorageContainer) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group under which the Storage Container has been created. Changing this forces a new resource to be created. func (o EndpointStorageContainerOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *EndpointStorageContainer) 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 EndpointStorageContainerOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v *EndpointStorageContainer) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput) } type EndpointStorageContainerArrayOutput struct{ *pulumi.OutputState } func (EndpointStorageContainerArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*EndpointStorageContainer)(nil)).Elem() } func (o EndpointStorageContainerArrayOutput) ToEndpointStorageContainerArrayOutput() EndpointStorageContainerArrayOutput { return o } func (o EndpointStorageContainerArrayOutput) ToEndpointStorageContainerArrayOutputWithContext(ctx context.Context) EndpointStorageContainerArrayOutput { return o } func (o EndpointStorageContainerArrayOutput) Index(i pulumi.IntInput) EndpointStorageContainerOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EndpointStorageContainer { return vs[0].([]*EndpointStorageContainer)[vs[1].(int)] }).(EndpointStorageContainerOutput) } type EndpointStorageContainerMapOutput struct{ *pulumi.OutputState } func (EndpointStorageContainerMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*EndpointStorageContainer)(nil)).Elem() } func (o EndpointStorageContainerMapOutput) ToEndpointStorageContainerMapOutput() EndpointStorageContainerMapOutput { return o } func (o EndpointStorageContainerMapOutput) ToEndpointStorageContainerMapOutputWithContext(ctx context.Context) EndpointStorageContainerMapOutput { return o } func (o EndpointStorageContainerMapOutput) MapIndex(k pulumi.StringInput) EndpointStorageContainerOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EndpointStorageContainer { return vs[0].(map[string]*EndpointStorageContainer)[vs[1].(string)] }).(EndpointStorageContainerOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*EndpointStorageContainerInput)(nil)).Elem(), &EndpointStorageContainer{}) pulumi.RegisterInputType(reflect.TypeOf((*EndpointStorageContainerArrayInput)(nil)).Elem(), EndpointStorageContainerArray{}) pulumi.RegisterInputType(reflect.TypeOf((*EndpointStorageContainerMapInput)(nil)).Elem(), EndpointStorageContainerMap{}) pulumi.RegisterOutputType(EndpointStorageContainerOutput{}) pulumi.RegisterOutputType(EndpointStorageContainerArrayOutput{}) pulumi.RegisterOutputType(EndpointStorageContainerMapOutput{}) }
go
Apache-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/endpointCosmosdbAccount.go
sdk/go/azure/iot/endpointCosmosdbAccount.go
// Code generated 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 Cosmos DB Account 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/cosmosdb" // "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("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 // } // exampleAccount, err := cosmosdb.NewAccount(ctx, "example", &cosmosdb.AccountArgs{ // Name: pulumi.String("cosmosdb-account"), // Location: example.Location, // ResourceGroupName: example.Name, // OfferType: pulumi.String("Standard"), // Kind: pulumi.String("GlobalDocumentDB"), // ConsistencyPolicy: &cosmosdb.AccountConsistencyPolicyArgs{ // ConsistencyLevel: pulumi.String("Strong"), // }, // GeoLocations: cosmosdb.AccountGeoLocationArray{ // &cosmosdb.AccountGeoLocationArgs{ // Location: example.Location, // FailoverPriority: pulumi.Int(0), // }, // }, // }) // if err != nil { // return err // } // exampleSqlDatabase, err := cosmosdb.NewSqlDatabase(ctx, "example", &cosmosdb.SqlDatabaseArgs{ // Name: pulumi.String("cosmos-sql-db"), // ResourceGroupName: exampleAccount.ResourceGroupName, // AccountName: exampleAccount.Name, // }) // if err != nil { // return err // } // exampleSqlContainer, err := cosmosdb.NewSqlContainer(ctx, "example", &cosmosdb.SqlContainerArgs{ // Name: pulumi.String("example-container"), // ResourceGroupName: exampleAccount.ResourceGroupName, // AccountName: exampleAccount.Name, // DatabaseName: exampleSqlDatabase.Name, // PartitionKeyPath: "/definition/id", // }) // if err != nil { // return err // } // _, err = iot.NewEndpointCosmosdbAccount(ctx, "example", &iot.EndpointCosmosdbAccountArgs{ // Name: pulumi.String("example"), // ResourceGroupName: example.Name, // IothubId: exampleIoTHub.ID(), // ContainerName: exampleSqlContainer.Name, // DatabaseName: exampleSqlDatabase.Name, // EndpointUri: exampleAccount.Endpoint, // PrimaryKey: exampleAccount.PrimaryKey, // SecondaryKey: exampleAccount.SecondaryKey, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // IoTHub Cosmos DB Account Endpoint can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:iot/endpointCosmosdbAccount:EndpointCosmosdbAccount endpoint1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/endpoints/cosmosDBAccountEndpoint1 // ``` type EndpointCosmosdbAccount struct { pulumi.CustomResourceState // The type used to authenticate against the Cosmos DB Account endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType pulumi.StringPtrOutput `pulumi:"authenticationType"` // The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created. ContainerName pulumi.StringOutput `pulumi:"containerName"` // The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created. DatabaseName pulumi.StringOutput `pulumi:"databaseName"` // The URI of the Cosmos DB Account. Changing this forces a new resource to be created. EndpointUri pulumi.StringOutput `pulumi:"endpointUri"` // The ID of the User Managed Identity used to authenticate against the Cosmos DB Account 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 ID of the IoT Hub to create 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 partition key associated with the Cosmos DB Container. PartitionKeyName pulumi.StringPtrOutput `pulumi:"partitionKeyName"` // The template for generating a synthetic partition key value for use within the Cosmos DB Container. PartitionKeyTemplate pulumi.StringPtrOutput `pulumi:"partitionKeyTemplate"` // The primary key of the Cosmos DB Account. // // > **Note:** `primaryKey` must and can only be specified when `authenticationType` is `keyBased`. PrimaryKey pulumi.StringPtrOutput `pulumi:"primaryKey"` // The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` // The secondary key of the Cosmos DB Account. // // > **Note:** `secondaryKey` must and can only be specified when `authenticationType` is `keyBased`. SecondaryKey pulumi.StringPtrOutput `pulumi:"secondaryKey"` // 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"` } // NewEndpointCosmosdbAccount registers a new resource with the given unique name, arguments, and options. func NewEndpointCosmosdbAccount(ctx *pulumi.Context, name string, args *EndpointCosmosdbAccountArgs, opts ...pulumi.ResourceOption) (*EndpointCosmosdbAccount, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.ContainerName == nil { return nil, errors.New("invalid value for required argument 'ContainerName'") } if args.DatabaseName == nil { return nil, errors.New("invalid value for required argument 'DatabaseName'") } if args.EndpointUri == nil { return nil, errors.New("invalid value for required argument 'EndpointUri'") } 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.PrimaryKey != nil { args.PrimaryKey = pulumi.ToSecret(args.PrimaryKey).(pulumi.StringPtrInput) } if args.SecondaryKey != nil { args.SecondaryKey = pulumi.ToSecret(args.SecondaryKey).(pulumi.StringPtrInput) } secrets := pulumi.AdditionalSecretOutputs([]string{ "primaryKey", "secondaryKey", }) opts = append(opts, secrets) opts = internal.PkgResourceDefaultOpts(opts) var resource EndpointCosmosdbAccount err := ctx.RegisterResource("azure:iot/endpointCosmosdbAccount:EndpointCosmosdbAccount", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetEndpointCosmosdbAccount gets an existing EndpointCosmosdbAccount 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 GetEndpointCosmosdbAccount(ctx *pulumi.Context, name string, id pulumi.IDInput, state *EndpointCosmosdbAccountState, opts ...pulumi.ResourceOption) (*EndpointCosmosdbAccount, error) { var resource EndpointCosmosdbAccount err := ctx.ReadResource("azure:iot/endpointCosmosdbAccount:EndpointCosmosdbAccount", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering EndpointCosmosdbAccount resources. type endpointCosmosdbAccountState struct { // The type used to authenticate against the Cosmos DB Account endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType *string `pulumi:"authenticationType"` // The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created. ContainerName *string `pulumi:"containerName"` // The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created. DatabaseName *string `pulumi:"databaseName"` // The URI of the Cosmos DB Account. Changing this forces a new resource to be created. EndpointUri *string `pulumi:"endpointUri"` // The ID of the User Managed Identity used to authenticate against the Cosmos DB Account 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 ID of the IoT Hub to create 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 partition key associated with the Cosmos DB Container. PartitionKeyName *string `pulumi:"partitionKeyName"` // The template for generating a synthetic partition key value for use within the Cosmos DB Container. PartitionKeyTemplate *string `pulumi:"partitionKeyTemplate"` // The primary key of the Cosmos DB Account. // // > **Note:** `primaryKey` must and can only be specified when `authenticationType` is `keyBased`. PrimaryKey *string `pulumi:"primaryKey"` // The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` // The secondary key of the Cosmos DB Account. // // > **Note:** `secondaryKey` must and can only be specified when `authenticationType` is `keyBased`. SecondaryKey *string `pulumi:"secondaryKey"` // 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 EndpointCosmosdbAccountState struct { // The type used to authenticate against the Cosmos DB Account endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType pulumi.StringPtrInput // The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created. ContainerName pulumi.StringPtrInput // The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created. DatabaseName pulumi.StringPtrInput // The URI of the Cosmos DB Account. Changing this forces a new resource to be created. EndpointUri pulumi.StringPtrInput // The ID of the User Managed Identity used to authenticate against the Cosmos DB Account 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 ID of the IoT Hub to create 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 partition key associated with the Cosmos DB Container. PartitionKeyName pulumi.StringPtrInput // The template for generating a synthetic partition key value for use within the Cosmos DB Container. PartitionKeyTemplate pulumi.StringPtrInput // The primary key of the Cosmos DB Account. // // > **Note:** `primaryKey` must and can only be specified when `authenticationType` is `keyBased`. PrimaryKey pulumi.StringPtrInput // The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput // The secondary key of the Cosmos DB Account. // // > **Note:** `secondaryKey` must and can only be specified when `authenticationType` is `keyBased`. SecondaryKey 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 (EndpointCosmosdbAccountState) ElementType() reflect.Type { return reflect.TypeOf((*endpointCosmosdbAccountState)(nil)).Elem() } type endpointCosmosdbAccountArgs struct { // The type used to authenticate against the Cosmos DB Account endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType *string `pulumi:"authenticationType"` // The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created. ContainerName string `pulumi:"containerName"` // The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created. DatabaseName string `pulumi:"databaseName"` // The URI of the Cosmos DB Account. Changing this forces a new resource to be created. EndpointUri string `pulumi:"endpointUri"` // The ID of the User Managed Identity used to authenticate against the Cosmos DB Account 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 ID of the IoT Hub to create 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 partition key associated with the Cosmos DB Container. PartitionKeyName *string `pulumi:"partitionKeyName"` // The template for generating a synthetic partition key value for use within the Cosmos DB Container. PartitionKeyTemplate *string `pulumi:"partitionKeyTemplate"` // The primary key of the Cosmos DB Account. // // > **Note:** `primaryKey` must and can only be specified when `authenticationType` is `keyBased`. PrimaryKey *string `pulumi:"primaryKey"` // The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` // The secondary key of the Cosmos DB Account. // // > **Note:** `secondaryKey` must and can only be specified when `authenticationType` is `keyBased`. SecondaryKey *string `pulumi:"secondaryKey"` // 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 EndpointCosmosdbAccount resource. type EndpointCosmosdbAccountArgs struct { // The type used to authenticate against the Cosmos DB Account endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. AuthenticationType pulumi.StringPtrInput // The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created. ContainerName pulumi.StringInput // The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created. DatabaseName pulumi.StringInput // The URI of the Cosmos DB Account. Changing this forces a new resource to be created. EndpointUri pulumi.StringInput // The ID of the User Managed Identity used to authenticate against the Cosmos DB Account 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 ID of the IoT Hub to create 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 partition key associated with the Cosmos DB Container. PartitionKeyName pulumi.StringPtrInput // The template for generating a synthetic partition key value for use within the Cosmos DB Container. PartitionKeyTemplate pulumi.StringPtrInput // The primary key of the Cosmos DB Account. // // > **Note:** `primaryKey` must and can only be specified when `authenticationType` is `keyBased`. PrimaryKey pulumi.StringPtrInput // The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput // The secondary key of the Cosmos DB Account. // // > **Note:** `secondaryKey` must and can only be specified when `authenticationType` is `keyBased`. SecondaryKey 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 (EndpointCosmosdbAccountArgs) ElementType() reflect.Type { return reflect.TypeOf((*endpointCosmosdbAccountArgs)(nil)).Elem() } type EndpointCosmosdbAccountInput interface { pulumi.Input ToEndpointCosmosdbAccountOutput() EndpointCosmosdbAccountOutput ToEndpointCosmosdbAccountOutputWithContext(ctx context.Context) EndpointCosmosdbAccountOutput } func (*EndpointCosmosdbAccount) ElementType() reflect.Type { return reflect.TypeOf((**EndpointCosmosdbAccount)(nil)).Elem() } func (i *EndpointCosmosdbAccount) ToEndpointCosmosdbAccountOutput() EndpointCosmosdbAccountOutput { return i.ToEndpointCosmosdbAccountOutputWithContext(context.Background()) } func (i *EndpointCosmosdbAccount) ToEndpointCosmosdbAccountOutputWithContext(ctx context.Context) EndpointCosmosdbAccountOutput { return pulumi.ToOutputWithContext(ctx, i).(EndpointCosmosdbAccountOutput) } // EndpointCosmosdbAccountArrayInput is an input type that accepts EndpointCosmosdbAccountArray and EndpointCosmosdbAccountArrayOutput values. // You can construct a concrete instance of `EndpointCosmosdbAccountArrayInput` via: // // EndpointCosmosdbAccountArray{ EndpointCosmosdbAccountArgs{...} } type EndpointCosmosdbAccountArrayInput interface { pulumi.Input ToEndpointCosmosdbAccountArrayOutput() EndpointCosmosdbAccountArrayOutput ToEndpointCosmosdbAccountArrayOutputWithContext(context.Context) EndpointCosmosdbAccountArrayOutput } type EndpointCosmosdbAccountArray []EndpointCosmosdbAccountInput func (EndpointCosmosdbAccountArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*EndpointCosmosdbAccount)(nil)).Elem() } func (i EndpointCosmosdbAccountArray) ToEndpointCosmosdbAccountArrayOutput() EndpointCosmosdbAccountArrayOutput { return i.ToEndpointCosmosdbAccountArrayOutputWithContext(context.Background()) } func (i EndpointCosmosdbAccountArray) ToEndpointCosmosdbAccountArrayOutputWithContext(ctx context.Context) EndpointCosmosdbAccountArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(EndpointCosmosdbAccountArrayOutput) } // EndpointCosmosdbAccountMapInput is an input type that accepts EndpointCosmosdbAccountMap and EndpointCosmosdbAccountMapOutput values. // You can construct a concrete instance of `EndpointCosmosdbAccountMapInput` via: // // EndpointCosmosdbAccountMap{ "key": EndpointCosmosdbAccountArgs{...} } type EndpointCosmosdbAccountMapInput interface { pulumi.Input ToEndpointCosmosdbAccountMapOutput() EndpointCosmosdbAccountMapOutput ToEndpointCosmosdbAccountMapOutputWithContext(context.Context) EndpointCosmosdbAccountMapOutput } type EndpointCosmosdbAccountMap map[string]EndpointCosmosdbAccountInput func (EndpointCosmosdbAccountMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*EndpointCosmosdbAccount)(nil)).Elem() } func (i EndpointCosmosdbAccountMap) ToEndpointCosmosdbAccountMapOutput() EndpointCosmosdbAccountMapOutput { return i.ToEndpointCosmosdbAccountMapOutputWithContext(context.Background()) } func (i EndpointCosmosdbAccountMap) ToEndpointCosmosdbAccountMapOutputWithContext(ctx context.Context) EndpointCosmosdbAccountMapOutput { return pulumi.ToOutputWithContext(ctx, i).(EndpointCosmosdbAccountMapOutput) } type EndpointCosmosdbAccountOutput struct{ *pulumi.OutputState } func (EndpointCosmosdbAccountOutput) ElementType() reflect.Type { return reflect.TypeOf((**EndpointCosmosdbAccount)(nil)).Elem() } func (o EndpointCosmosdbAccountOutput) ToEndpointCosmosdbAccountOutput() EndpointCosmosdbAccountOutput { return o } func (o EndpointCosmosdbAccountOutput) ToEndpointCosmosdbAccountOutputWithContext(ctx context.Context) EndpointCosmosdbAccountOutput { return o } // The type used to authenticate against the Cosmos DB Account endpoint. Possible values are `keyBased` and `identityBased`. Defaults to `keyBased`. func (o EndpointCosmosdbAccountOutput) AuthenticationType() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointCosmosdbAccount) pulumi.StringPtrOutput { return v.AuthenticationType }).(pulumi.StringPtrOutput) } // The name of the Cosmos DB Container in the Cosmos DB Database. Changing this forces a new resource to be created. func (o EndpointCosmosdbAccountOutput) ContainerName() pulumi.StringOutput { return o.ApplyT(func(v *EndpointCosmosdbAccount) pulumi.StringOutput { return v.ContainerName }).(pulumi.StringOutput) } // The name of the Cosmos DB Database in the Cosmos DB Account. Changing this forces a new resource to be created. func (o EndpointCosmosdbAccountOutput) DatabaseName() pulumi.StringOutput { return o.ApplyT(func(v *EndpointCosmosdbAccount) pulumi.StringOutput { return v.DatabaseName }).(pulumi.StringOutput) } // The URI of the Cosmos DB Account. Changing this forces a new resource to be created. func (o EndpointCosmosdbAccountOutput) EndpointUri() pulumi.StringOutput { return o.ApplyT(func(v *EndpointCosmosdbAccount) pulumi.StringOutput { return v.EndpointUri }).(pulumi.StringOutput) } // The ID of the User Managed Identity used to authenticate against the Cosmos DB Account 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 EndpointCosmosdbAccountOutput) IdentityId() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointCosmosdbAccount) pulumi.StringPtrOutput { return v.IdentityId }).(pulumi.StringPtrOutput) } // The ID of the IoT Hub to create the endpoint. Changing this forces a new resource to be created. func (o EndpointCosmosdbAccountOutput) IothubId() pulumi.StringOutput { return o.ApplyT(func(v *EndpointCosmosdbAccount) 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 EndpointCosmosdbAccountOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *EndpointCosmosdbAccount) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the partition key associated with the Cosmos DB Container. func (o EndpointCosmosdbAccountOutput) PartitionKeyName() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointCosmosdbAccount) pulumi.StringPtrOutput { return v.PartitionKeyName }).(pulumi.StringPtrOutput) } // The template for generating a synthetic partition key value for use within the Cosmos DB Container. func (o EndpointCosmosdbAccountOutput) PartitionKeyTemplate() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointCosmosdbAccount) pulumi.StringPtrOutput { return v.PartitionKeyTemplate }).(pulumi.StringPtrOutput) } // The primary key of the Cosmos DB Account. // // > **Note:** `primaryKey` must and can only be specified when `authenticationType` is `keyBased`. func (o EndpointCosmosdbAccountOutput) PrimaryKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointCosmosdbAccount) pulumi.StringPtrOutput { return v.PrimaryKey }).(pulumi.StringPtrOutput) } // The name of the resource group under which the Cosmos DB Account has been created. Changing this forces a new resource to be created. func (o EndpointCosmosdbAccountOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *EndpointCosmosdbAccount) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } // The secondary key of the Cosmos DB Account. // // > **Note:** `secondaryKey` must and can only be specified when `authenticationType` is `keyBased`. func (o EndpointCosmosdbAccountOutput) SecondaryKey() pulumi.StringPtrOutput { return o.ApplyT(func(v *EndpointCosmosdbAccount) pulumi.StringPtrOutput { return v.SecondaryKey }).(pulumi.StringPtrOutput) } // 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 EndpointCosmosdbAccountOutput) SubscriptionId() pulumi.StringOutput { return o.ApplyT(func(v *EndpointCosmosdbAccount) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput) } type EndpointCosmosdbAccountArrayOutput struct{ *pulumi.OutputState } func (EndpointCosmosdbAccountArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*EndpointCosmosdbAccount)(nil)).Elem() } func (o EndpointCosmosdbAccountArrayOutput) ToEndpointCosmosdbAccountArrayOutput() EndpointCosmosdbAccountArrayOutput { return o } func (o EndpointCosmosdbAccountArrayOutput) ToEndpointCosmosdbAccountArrayOutputWithContext(ctx context.Context) EndpointCosmosdbAccountArrayOutput { return o } func (o EndpointCosmosdbAccountArrayOutput) Index(i pulumi.IntInput) EndpointCosmosdbAccountOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EndpointCosmosdbAccount { return vs[0].([]*EndpointCosmosdbAccount)[vs[1].(int)] }).(EndpointCosmosdbAccountOutput) } type EndpointCosmosdbAccountMapOutput struct{ *pulumi.OutputState } func (EndpointCosmosdbAccountMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*EndpointCosmosdbAccount)(nil)).Elem() } func (o EndpointCosmosdbAccountMapOutput) ToEndpointCosmosdbAccountMapOutput() EndpointCosmosdbAccountMapOutput { return o } func (o EndpointCosmosdbAccountMapOutput) ToEndpointCosmosdbAccountMapOutputWithContext(ctx context.Context) EndpointCosmosdbAccountMapOutput { return o } func (o EndpointCosmosdbAccountMapOutput) MapIndex(k pulumi.StringInput) EndpointCosmosdbAccountOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EndpointCosmosdbAccount { return vs[0].(map[string]*EndpointCosmosdbAccount)[vs[1].(string)] }).(EndpointCosmosdbAccountOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*EndpointCosmosdbAccountInput)(nil)).Elem(), &EndpointCosmosdbAccount{}) pulumi.RegisterInputType(reflect.TypeOf((*EndpointCosmosdbAccountArrayInput)(nil)).Elem(), EndpointCosmosdbAccountArray{}) pulumi.RegisterInputType(reflect.TypeOf((*EndpointCosmosdbAccountMapInput)(nil)).Elem(), EndpointCosmosdbAccountMap{}) pulumi.RegisterOutputType(EndpointCosmosdbAccountOutput{}) pulumi.RegisterOutputType(EndpointCosmosdbAccountArrayOutput{}) pulumi.RegisterOutputType(EndpointCosmosdbAccountMapOutput{}) }
go
Apache-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/fallbackRoute.go
sdk/go/azure/iot/fallbackRoute.go
// Code generated 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 Fallback Route // // ## Disclaimers // // > **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:** Since this resource is provisioned by default, the Azure Provider will not check for the presence of an existing resource prior to attempting to create it. // // ## Example Usage // // ```go // package main // // import ( // // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core" // "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/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.NewFallbackRoute(ctx, "example", &iot.FallbackRouteArgs{ // ResourceGroupName: example.Name, // IothubName: exampleIoTHub.Name, // Condition: pulumi.String("true"), // EndpointNames: exampleEndpointStorageContainer.Name, // Enabled: pulumi.Bool(true), // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // IoTHub Fallback Route can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:iot/fallbackRoute:FallbackRoute route1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/fallbackRoute/default // ``` type FallbackRoute 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"` // Used to specify whether the fallback route is enabled. Enabled pulumi.BoolOutput `pulumi:"enabled"` // The endpoints to which messages that satisfy the condition are routed. Currently only 1 endpoint is allowed. EndpointNames pulumi.StringOutput `pulumi:"endpointNames"` // The name of the IoTHub to which this Fallback Route belongs. Changing this forces a new resource to be created. IothubName pulumi.StringOutput `pulumi:"iothubName"` // The name of the resource group under which the IotHub Storage Container Endpoint 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`. Defaults to `DeviceMessages`. Source pulumi.StringPtrOutput `pulumi:"source"` } // NewFallbackRoute registers a new resource with the given unique name, arguments, and options. func NewFallbackRoute(ctx *pulumi.Context, name string, args *FallbackRouteArgs, opts ...pulumi.ResourceOption) (*FallbackRoute, 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'") } opts = internal.PkgResourceDefaultOpts(opts) var resource FallbackRoute err := ctx.RegisterResource("azure:iot/fallbackRoute:FallbackRoute", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetFallbackRoute gets an existing FallbackRoute 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 GetFallbackRoute(ctx *pulumi.Context, name string, id pulumi.IDInput, state *FallbackRouteState, opts ...pulumi.ResourceOption) (*FallbackRoute, error) { var resource FallbackRoute err := ctx.ReadResource("azure:iot/fallbackRoute:FallbackRoute", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering FallbackRoute resources. type fallbackRouteState 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"` // Used to specify whether the fallback route is enabled. Enabled *bool `pulumi:"enabled"` // The endpoints to which messages that satisfy the condition are routed. Currently only 1 endpoint is allowed. EndpointNames *string `pulumi:"endpointNames"` // The name of the IoTHub to which this Fallback Route belongs. Changing this forces a new resource to be created. IothubName *string `pulumi:"iothubName"` // The name of the resource group under which the IotHub Storage Container Endpoint 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`. Defaults to `DeviceMessages`. Source *string `pulumi:"source"` } type FallbackRouteState 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 // Used to specify whether the fallback route is enabled. Enabled pulumi.BoolPtrInput // The endpoints to which messages that satisfy the condition are routed. Currently only 1 endpoint is allowed. EndpointNames pulumi.StringPtrInput // The name of the IoTHub to which this Fallback Route belongs. Changing this forces a new resource to be created. IothubName pulumi.StringPtrInput // The name of the resource group under which the IotHub Storage Container Endpoint 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`. Defaults to `DeviceMessages`. Source pulumi.StringPtrInput } func (FallbackRouteState) ElementType() reflect.Type { return reflect.TypeOf((*fallbackRouteState)(nil)).Elem() } type fallbackRouteArgs 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"` // Used to specify whether the fallback route is enabled. Enabled bool `pulumi:"enabled"` // The endpoints to which messages that satisfy the condition are routed. Currently only 1 endpoint is allowed. EndpointNames string `pulumi:"endpointNames"` // The name of the IoTHub to which this Fallback Route belongs. Changing this forces a new resource to be created. IothubName string `pulumi:"iothubName"` // The name of the resource group under which the IotHub Storage Container Endpoint 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`. Defaults to `DeviceMessages`. Source *string `pulumi:"source"` } // The set of arguments for constructing a FallbackRoute resource. type FallbackRouteArgs 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 // Used to specify whether the fallback route is enabled. Enabled pulumi.BoolInput // The endpoints to which messages that satisfy the condition are routed. Currently only 1 endpoint is allowed. EndpointNames pulumi.StringInput // The name of the IoTHub to which this Fallback Route belongs. Changing this forces a new resource to be created. IothubName pulumi.StringInput // The name of the resource group under which the IotHub Storage Container Endpoint 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`. Defaults to `DeviceMessages`. Source pulumi.StringPtrInput } func (FallbackRouteArgs) ElementType() reflect.Type { return reflect.TypeOf((*fallbackRouteArgs)(nil)).Elem() } type FallbackRouteInput interface { pulumi.Input ToFallbackRouteOutput() FallbackRouteOutput ToFallbackRouteOutputWithContext(ctx context.Context) FallbackRouteOutput } func (*FallbackRoute) ElementType() reflect.Type { return reflect.TypeOf((**FallbackRoute)(nil)).Elem() } func (i *FallbackRoute) ToFallbackRouteOutput() FallbackRouteOutput { return i.ToFallbackRouteOutputWithContext(context.Background()) } func (i *FallbackRoute) ToFallbackRouteOutputWithContext(ctx context.Context) FallbackRouteOutput { return pulumi.ToOutputWithContext(ctx, i).(FallbackRouteOutput) } // FallbackRouteArrayInput is an input type that accepts FallbackRouteArray and FallbackRouteArrayOutput values. // You can construct a concrete instance of `FallbackRouteArrayInput` via: // // FallbackRouteArray{ FallbackRouteArgs{...} } type FallbackRouteArrayInput interface { pulumi.Input ToFallbackRouteArrayOutput() FallbackRouteArrayOutput ToFallbackRouteArrayOutputWithContext(context.Context) FallbackRouteArrayOutput } type FallbackRouteArray []FallbackRouteInput func (FallbackRouteArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*FallbackRoute)(nil)).Elem() } func (i FallbackRouteArray) ToFallbackRouteArrayOutput() FallbackRouteArrayOutput { return i.ToFallbackRouteArrayOutputWithContext(context.Background()) } func (i FallbackRouteArray) ToFallbackRouteArrayOutputWithContext(ctx context.Context) FallbackRouteArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(FallbackRouteArrayOutput) } // FallbackRouteMapInput is an input type that accepts FallbackRouteMap and FallbackRouteMapOutput values. // You can construct a concrete instance of `FallbackRouteMapInput` via: // // FallbackRouteMap{ "key": FallbackRouteArgs{...} } type FallbackRouteMapInput interface { pulumi.Input ToFallbackRouteMapOutput() FallbackRouteMapOutput ToFallbackRouteMapOutputWithContext(context.Context) FallbackRouteMapOutput } type FallbackRouteMap map[string]FallbackRouteInput func (FallbackRouteMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FallbackRoute)(nil)).Elem() } func (i FallbackRouteMap) ToFallbackRouteMapOutput() FallbackRouteMapOutput { return i.ToFallbackRouteMapOutputWithContext(context.Background()) } func (i FallbackRouteMap) ToFallbackRouteMapOutputWithContext(ctx context.Context) FallbackRouteMapOutput { return pulumi.ToOutputWithContext(ctx, i).(FallbackRouteMapOutput) } type FallbackRouteOutput struct{ *pulumi.OutputState } func (FallbackRouteOutput) ElementType() reflect.Type { return reflect.TypeOf((**FallbackRoute)(nil)).Elem() } func (o FallbackRouteOutput) ToFallbackRouteOutput() FallbackRouteOutput { return o } func (o FallbackRouteOutput) ToFallbackRouteOutputWithContext(ctx context.Context) FallbackRouteOutput { 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 FallbackRouteOutput) Condition() pulumi.StringPtrOutput { return o.ApplyT(func(v *FallbackRoute) pulumi.StringPtrOutput { return v.Condition }).(pulumi.StringPtrOutput) } // Used to specify whether the fallback route is enabled. func (o FallbackRouteOutput) Enabled() pulumi.BoolOutput { return o.ApplyT(func(v *FallbackRoute) pulumi.BoolOutput { return v.Enabled }).(pulumi.BoolOutput) } // The endpoints to which messages that satisfy the condition are routed. Currently only 1 endpoint is allowed. func (o FallbackRouteOutput) EndpointNames() pulumi.StringOutput { return o.ApplyT(func(v *FallbackRoute) pulumi.StringOutput { return v.EndpointNames }).(pulumi.StringOutput) } // The name of the IoTHub to which this Fallback Route belongs. Changing this forces a new resource to be created. func (o FallbackRouteOutput) IothubName() pulumi.StringOutput { return o.ApplyT(func(v *FallbackRoute) pulumi.StringOutput { return v.IothubName }).(pulumi.StringOutput) } // The name of the resource group under which the IotHub Storage Container Endpoint resource has to be created. Changing this forces a new resource to be created. func (o FallbackRouteOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *FallbackRoute) 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`. Defaults to `DeviceMessages`. func (o FallbackRouteOutput) Source() pulumi.StringPtrOutput { return o.ApplyT(func(v *FallbackRoute) pulumi.StringPtrOutput { return v.Source }).(pulumi.StringPtrOutput) } type FallbackRouteArrayOutput struct{ *pulumi.OutputState } func (FallbackRouteArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*FallbackRoute)(nil)).Elem() } func (o FallbackRouteArrayOutput) ToFallbackRouteArrayOutput() FallbackRouteArrayOutput { return o } func (o FallbackRouteArrayOutput) ToFallbackRouteArrayOutputWithContext(ctx context.Context) FallbackRouteArrayOutput { return o } func (o FallbackRouteArrayOutput) Index(i pulumi.IntInput) FallbackRouteOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FallbackRoute { return vs[0].([]*FallbackRoute)[vs[1].(int)] }).(FallbackRouteOutput) } type FallbackRouteMapOutput struct{ *pulumi.OutputState } func (FallbackRouteMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*FallbackRoute)(nil)).Elem() } func (o FallbackRouteMapOutput) ToFallbackRouteMapOutput() FallbackRouteMapOutput { return o } func (o FallbackRouteMapOutput) ToFallbackRouteMapOutputWithContext(ctx context.Context) FallbackRouteMapOutput { return o } func (o FallbackRouteMapOutput) MapIndex(k pulumi.StringInput) FallbackRouteOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FallbackRoute { return vs[0].(map[string]*FallbackRoute)[vs[1].(string)] }).(FallbackRouteOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*FallbackRouteInput)(nil)).Elem(), &FallbackRoute{}) pulumi.RegisterInputType(reflect.TypeOf((*FallbackRouteArrayInput)(nil)).Elem(), FallbackRouteArray{}) pulumi.RegisterInputType(reflect.TypeOf((*FallbackRouteMapInput)(nil)).Elem(), FallbackRouteMap{}) pulumi.RegisterOutputType(FallbackRouteOutput{}) pulumi.RegisterOutputType(FallbackRouteArrayOutput{}) pulumi.RegisterOutputType(FallbackRouteMapOutput{}) }
go
Apache-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/consumerGroup.go
sdk/go/azure/iot/consumerGroup.go
// Code generated 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 Consumer Group within an IotHub // // ## 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("test"), // 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 // } // _, err = iot.NewConsumerGroup(ctx, "example", &iot.ConsumerGroupArgs{ // Name: pulumi.String("group"), // IothubName: exampleIoTHub.Name, // EventhubEndpointName: pulumi.String("events"), // ResourceGroupName: example.Name, // }) // if err != nil { // return err // } // return nil // }) // } // // ``` // // ## Import // // IoTHub Consumer Groups can be imported using the `resource id`, e.g. // // ```sh // $ pulumi import azure:iot/consumerGroup:ConsumerGroup group1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/eventHubEndpoints/events/consumerGroups/group1 // ``` type ConsumerGroup struct { pulumi.CustomResourceState // The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created. EventhubEndpointName pulumi.StringOutput `pulumi:"eventhubEndpointName"` // The name of the IoT Hub. Changing this forces a new resource to be created. IothubName pulumi.StringOutput `pulumi:"iothubName"` // The name of this Consumer Group. Changing this forces a new resource to be created. Name pulumi.StringOutput `pulumi:"name"` // The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"` } // NewConsumerGroup registers a new resource with the given unique name, arguments, and options. func NewConsumerGroup(ctx *pulumi.Context, name string, args *ConsumerGroupArgs, opts ...pulumi.ResourceOption) (*ConsumerGroup, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.EventhubEndpointName == nil { return nil, errors.New("invalid value for required argument 'EventhubEndpointName'") } 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'") } opts = internal.PkgResourceDefaultOpts(opts) var resource ConsumerGroup err := ctx.RegisterResource("azure:iot/consumerGroup:ConsumerGroup", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetConsumerGroup gets an existing ConsumerGroup 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 GetConsumerGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ConsumerGroupState, opts ...pulumi.ResourceOption) (*ConsumerGroup, error) { var resource ConsumerGroup err := ctx.ReadResource("azure:iot/consumerGroup:ConsumerGroup", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering ConsumerGroup resources. type consumerGroupState struct { // The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created. EventhubEndpointName *string `pulumi:"eventhubEndpointName"` // The name of the IoT Hub. Changing this forces a new resource to be created. IothubName *string `pulumi:"iothubName"` // The name of this Consumer Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created. ResourceGroupName *string `pulumi:"resourceGroupName"` } type ConsumerGroupState struct { // The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created. EventhubEndpointName pulumi.StringPtrInput // The name of the IoT Hub. Changing this forces a new resource to be created. IothubName pulumi.StringPtrInput // The name of this Consumer Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringPtrInput } func (ConsumerGroupState) ElementType() reflect.Type { return reflect.TypeOf((*consumerGroupState)(nil)).Elem() } type consumerGroupArgs struct { // The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created. EventhubEndpointName string `pulumi:"eventhubEndpointName"` // The name of the IoT Hub. Changing this forces a new resource to be created. IothubName string `pulumi:"iothubName"` // The name of this Consumer Group. Changing this forces a new resource to be created. Name *string `pulumi:"name"` // The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created. ResourceGroupName string `pulumi:"resourceGroupName"` } // The set of arguments for constructing a ConsumerGroup resource. type ConsumerGroupArgs struct { // The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created. EventhubEndpointName pulumi.StringInput // The name of the IoT Hub. Changing this forces a new resource to be created. IothubName pulumi.StringInput // The name of this Consumer Group. Changing this forces a new resource to be created. Name pulumi.StringPtrInput // The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created. ResourceGroupName pulumi.StringInput } func (ConsumerGroupArgs) ElementType() reflect.Type { return reflect.TypeOf((*consumerGroupArgs)(nil)).Elem() } type ConsumerGroupInput interface { pulumi.Input ToConsumerGroupOutput() ConsumerGroupOutput ToConsumerGroupOutputWithContext(ctx context.Context) ConsumerGroupOutput } func (*ConsumerGroup) ElementType() reflect.Type { return reflect.TypeOf((**ConsumerGroup)(nil)).Elem() } func (i *ConsumerGroup) ToConsumerGroupOutput() ConsumerGroupOutput { return i.ToConsumerGroupOutputWithContext(context.Background()) } func (i *ConsumerGroup) ToConsumerGroupOutputWithContext(ctx context.Context) ConsumerGroupOutput { return pulumi.ToOutputWithContext(ctx, i).(ConsumerGroupOutput) } // ConsumerGroupArrayInput is an input type that accepts ConsumerGroupArray and ConsumerGroupArrayOutput values. // You can construct a concrete instance of `ConsumerGroupArrayInput` via: // // ConsumerGroupArray{ ConsumerGroupArgs{...} } type ConsumerGroupArrayInput interface { pulumi.Input ToConsumerGroupArrayOutput() ConsumerGroupArrayOutput ToConsumerGroupArrayOutputWithContext(context.Context) ConsumerGroupArrayOutput } type ConsumerGroupArray []ConsumerGroupInput func (ConsumerGroupArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*ConsumerGroup)(nil)).Elem() } func (i ConsumerGroupArray) ToConsumerGroupArrayOutput() ConsumerGroupArrayOutput { return i.ToConsumerGroupArrayOutputWithContext(context.Background()) } func (i ConsumerGroupArray) ToConsumerGroupArrayOutputWithContext(ctx context.Context) ConsumerGroupArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(ConsumerGroupArrayOutput) } // ConsumerGroupMapInput is an input type that accepts ConsumerGroupMap and ConsumerGroupMapOutput values. // You can construct a concrete instance of `ConsumerGroupMapInput` via: // // ConsumerGroupMap{ "key": ConsumerGroupArgs{...} } type ConsumerGroupMapInput interface { pulumi.Input ToConsumerGroupMapOutput() ConsumerGroupMapOutput ToConsumerGroupMapOutputWithContext(context.Context) ConsumerGroupMapOutput } type ConsumerGroupMap map[string]ConsumerGroupInput func (ConsumerGroupMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ConsumerGroup)(nil)).Elem() } func (i ConsumerGroupMap) ToConsumerGroupMapOutput() ConsumerGroupMapOutput { return i.ToConsumerGroupMapOutputWithContext(context.Background()) } func (i ConsumerGroupMap) ToConsumerGroupMapOutputWithContext(ctx context.Context) ConsumerGroupMapOutput { return pulumi.ToOutputWithContext(ctx, i).(ConsumerGroupMapOutput) } type ConsumerGroupOutput struct{ *pulumi.OutputState } func (ConsumerGroupOutput) ElementType() reflect.Type { return reflect.TypeOf((**ConsumerGroup)(nil)).Elem() } func (o ConsumerGroupOutput) ToConsumerGroupOutput() ConsumerGroupOutput { return o } func (o ConsumerGroupOutput) ToConsumerGroupOutputWithContext(ctx context.Context) ConsumerGroupOutput { return o } // The name of the Event Hub-compatible endpoint in the IoT hub. Changing this forces a new resource to be created. func (o ConsumerGroupOutput) EventhubEndpointName() pulumi.StringOutput { return o.ApplyT(func(v *ConsumerGroup) pulumi.StringOutput { return v.EventhubEndpointName }).(pulumi.StringOutput) } // The name of the IoT Hub. Changing this forces a new resource to be created. func (o ConsumerGroupOutput) IothubName() pulumi.StringOutput { return o.ApplyT(func(v *ConsumerGroup) pulumi.StringOutput { return v.IothubName }).(pulumi.StringOutput) } // The name of this Consumer Group. Changing this forces a new resource to be created. func (o ConsumerGroupOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *ConsumerGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // The name of the resource group that contains the IoT hub. Changing this forces a new resource to be created. func (o ConsumerGroupOutput) ResourceGroupName() pulumi.StringOutput { return o.ApplyT(func(v *ConsumerGroup) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput) } type ConsumerGroupArrayOutput struct{ *pulumi.OutputState } func (ConsumerGroupArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*ConsumerGroup)(nil)).Elem() } func (o ConsumerGroupArrayOutput) ToConsumerGroupArrayOutput() ConsumerGroupArrayOutput { return o } func (o ConsumerGroupArrayOutput) ToConsumerGroupArrayOutputWithContext(ctx context.Context) ConsumerGroupArrayOutput { return o } func (o ConsumerGroupArrayOutput) Index(i pulumi.IntInput) ConsumerGroupOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ConsumerGroup { return vs[0].([]*ConsumerGroup)[vs[1].(int)] }).(ConsumerGroupOutput) } type ConsumerGroupMapOutput struct{ *pulumi.OutputState } func (ConsumerGroupMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*ConsumerGroup)(nil)).Elem() } func (o ConsumerGroupMapOutput) ToConsumerGroupMapOutput() ConsumerGroupMapOutput { return o } func (o ConsumerGroupMapOutput) ToConsumerGroupMapOutputWithContext(ctx context.Context) ConsumerGroupMapOutput { return o } func (o ConsumerGroupMapOutput) MapIndex(k pulumi.StringInput) ConsumerGroupOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ConsumerGroup { return vs[0].(map[string]*ConsumerGroup)[vs[1].(string)] }).(ConsumerGroupOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*ConsumerGroupInput)(nil)).Elem(), &ConsumerGroup{}) pulumi.RegisterInputType(reflect.TypeOf((*ConsumerGroupArrayInput)(nil)).Elem(), ConsumerGroupArray{}) pulumi.RegisterInputType(reflect.TypeOf((*ConsumerGroupMapInput)(nil)).Elem(), ConsumerGroupMap{}) pulumi.RegisterOutputType(ConsumerGroupOutput{}) pulumi.RegisterOutputType(ConsumerGroupArrayOutput{}) pulumi.RegisterOutputType(ConsumerGroupMapOutput{}) }
go
Apache-2.0
b66e1472775a89cca43f5050fef806854a7c3fa3
2026-01-07T09:44:27.619514Z
false