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/kusto/database.go | sdk/go/azure/kusto/database.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package kusto
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/kusto"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("my-kusto-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// cluster, err := kusto.NewCluster(ctx, "cluster", &kusto.ClusterArgs{
// Name: pulumi.String("kustocluster"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: &kusto.ClusterSkuArgs{
// Name: pulumi.String("Standard_D13_v2"),
// Capacity: pulumi.Int(2),
// },
// })
// if err != nil {
// return err
// }
// _, err = kusto.NewDatabase(ctx, "database", &kusto.DatabaseArgs{
// Name: pulumi.String("my-kusto-database"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// ClusterName: cluster.Name,
// HotCachePeriod: pulumi.String("P7D"),
// SoftDeletePeriod: pulumi.String("P31D"),
// })
// 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.Kusto` - 2024-04-13
//
// ## Import
//
// Kusto Clusters can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:kusto/database:Database example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/databases/database1
// ```
type Database struct {
pulumi.CustomResourceState
// Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
ClusterName pulumi.StringOutput `pulumi:"clusterName"`
// The time the data that should be kept in cache for fast queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
HotCachePeriod pulumi.StringPtrOutput `pulumi:"hotCachePeriod"`
// The location where the Kusto Database should be created. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the Kusto Database to create. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The size of the database in bytes.
Size pulumi.Float64Output `pulumi:"size"`
// The time the data should be kept before it stops being accessible to queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
SoftDeletePeriod pulumi.StringPtrOutput `pulumi:"softDeletePeriod"`
}
// NewDatabase registers a new resource with the given unique name, arguments, and options.
func NewDatabase(ctx *pulumi.Context,
name string, args *DatabaseArgs, opts ...pulumi.ResourceOption) (*Database, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ClusterName == nil {
return nil, errors.New("invalid value for required argument 'ClusterName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Database
err := ctx.RegisterResource("azure:kusto/database:Database", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDatabase gets an existing Database resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDatabase(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DatabaseState, opts ...pulumi.ResourceOption) (*Database, error) {
var resource Database
err := ctx.ReadResource("azure:kusto/database:Database", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Database resources.
type databaseState struct {
// Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
ClusterName *string `pulumi:"clusterName"`
// The time the data that should be kept in cache for fast queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
HotCachePeriod *string `pulumi:"hotCachePeriod"`
// The location where the Kusto Database should be created. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Kusto Database to create. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The size of the database in bytes.
Size *float64 `pulumi:"size"`
// The time the data should be kept before it stops being accessible to queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
SoftDeletePeriod *string `pulumi:"softDeletePeriod"`
}
type DatabaseState struct {
// Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
ClusterName pulumi.StringPtrInput
// The time the data that should be kept in cache for fast queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
HotCachePeriod pulumi.StringPtrInput
// The location where the Kusto Database should be created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Kusto Database to create. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The size of the database in bytes.
Size pulumi.Float64PtrInput
// The time the data should be kept before it stops being accessible to queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
SoftDeletePeriod pulumi.StringPtrInput
}
func (DatabaseState) ElementType() reflect.Type {
return reflect.TypeOf((*databaseState)(nil)).Elem()
}
type databaseArgs struct {
// Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
ClusterName string `pulumi:"clusterName"`
// The time the data that should be kept in cache for fast queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
HotCachePeriod *string `pulumi:"hotCachePeriod"`
// The location where the Kusto Database should be created. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Kusto Database to create. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The time the data should be kept before it stops being accessible to queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
SoftDeletePeriod *string `pulumi:"softDeletePeriod"`
}
// The set of arguments for constructing a Database resource.
type DatabaseArgs struct {
// Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
ClusterName pulumi.StringInput
// The time the data that should be kept in cache for fast queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
HotCachePeriod pulumi.StringPtrInput
// The location where the Kusto Database should be created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Kusto Database to create. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The time the data should be kept before it stops being accessible to queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
SoftDeletePeriod pulumi.StringPtrInput
}
func (DatabaseArgs) ElementType() reflect.Type {
return reflect.TypeOf((*databaseArgs)(nil)).Elem()
}
type DatabaseInput interface {
pulumi.Input
ToDatabaseOutput() DatabaseOutput
ToDatabaseOutputWithContext(ctx context.Context) DatabaseOutput
}
func (*Database) ElementType() reflect.Type {
return reflect.TypeOf((**Database)(nil)).Elem()
}
func (i *Database) ToDatabaseOutput() DatabaseOutput {
return i.ToDatabaseOutputWithContext(context.Background())
}
func (i *Database) ToDatabaseOutputWithContext(ctx context.Context) DatabaseOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseOutput)
}
// DatabaseArrayInput is an input type that accepts DatabaseArray and DatabaseArrayOutput values.
// You can construct a concrete instance of `DatabaseArrayInput` via:
//
// DatabaseArray{ DatabaseArgs{...} }
type DatabaseArrayInput interface {
pulumi.Input
ToDatabaseArrayOutput() DatabaseArrayOutput
ToDatabaseArrayOutputWithContext(context.Context) DatabaseArrayOutput
}
type DatabaseArray []DatabaseInput
func (DatabaseArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Database)(nil)).Elem()
}
func (i DatabaseArray) ToDatabaseArrayOutput() DatabaseArrayOutput {
return i.ToDatabaseArrayOutputWithContext(context.Background())
}
func (i DatabaseArray) ToDatabaseArrayOutputWithContext(ctx context.Context) DatabaseArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseArrayOutput)
}
// DatabaseMapInput is an input type that accepts DatabaseMap and DatabaseMapOutput values.
// You can construct a concrete instance of `DatabaseMapInput` via:
//
// DatabaseMap{ "key": DatabaseArgs{...} }
type DatabaseMapInput interface {
pulumi.Input
ToDatabaseMapOutput() DatabaseMapOutput
ToDatabaseMapOutputWithContext(context.Context) DatabaseMapOutput
}
type DatabaseMap map[string]DatabaseInput
func (DatabaseMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Database)(nil)).Elem()
}
func (i DatabaseMap) ToDatabaseMapOutput() DatabaseMapOutput {
return i.ToDatabaseMapOutputWithContext(context.Background())
}
func (i DatabaseMap) ToDatabaseMapOutputWithContext(ctx context.Context) DatabaseMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DatabaseMapOutput)
}
type DatabaseOutput struct{ *pulumi.OutputState }
func (DatabaseOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Database)(nil)).Elem()
}
func (o DatabaseOutput) ToDatabaseOutput() DatabaseOutput {
return o
}
func (o DatabaseOutput) ToDatabaseOutputWithContext(ctx context.Context) DatabaseOutput {
return o
}
// Specifies the name of the Kusto Cluster this database will be added to. Changing this forces a new resource to be created.
func (o DatabaseOutput) ClusterName() pulumi.StringOutput {
return o.ApplyT(func(v *Database) pulumi.StringOutput { return v.ClusterName }).(pulumi.StringOutput)
}
// The time the data that should be kept in cache for fast queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
func (o DatabaseOutput) HotCachePeriod() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Database) pulumi.StringPtrOutput { return v.HotCachePeriod }).(pulumi.StringPtrOutput)
}
// The location where the Kusto Database should be created. Changing this forces a new resource to be created.
func (o DatabaseOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Database) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the Kusto Database to create. Changing this forces a new resource to be created.
func (o DatabaseOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Database) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
func (o DatabaseOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Database) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The size of the database in bytes.
func (o DatabaseOutput) Size() pulumi.Float64Output {
return o.ApplyT(func(v *Database) pulumi.Float64Output { return v.Size }).(pulumi.Float64Output)
}
// The time the data should be kept before it stops being accessible to queries as ISO 8601 timespan. Default is unlimited. For more information see: [ISO 8601 Timespan](https://en.wikipedia.org/wiki/ISO_8601#Durations)
func (o DatabaseOutput) SoftDeletePeriod() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Database) pulumi.StringPtrOutput { return v.SoftDeletePeriod }).(pulumi.StringPtrOutput)
}
type DatabaseArrayOutput struct{ *pulumi.OutputState }
func (DatabaseArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Database)(nil)).Elem()
}
func (o DatabaseArrayOutput) ToDatabaseArrayOutput() DatabaseArrayOutput {
return o
}
func (o DatabaseArrayOutput) ToDatabaseArrayOutputWithContext(ctx context.Context) DatabaseArrayOutput {
return o
}
func (o DatabaseArrayOutput) Index(i pulumi.IntInput) DatabaseOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Database {
return vs[0].([]*Database)[vs[1].(int)]
}).(DatabaseOutput)
}
type DatabaseMapOutput struct{ *pulumi.OutputState }
func (DatabaseMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Database)(nil)).Elem()
}
func (o DatabaseMapOutput) ToDatabaseMapOutput() DatabaseMapOutput {
return o
}
func (o DatabaseMapOutput) ToDatabaseMapOutputWithContext(ctx context.Context) DatabaseMapOutput {
return o
}
func (o DatabaseMapOutput) MapIndex(k pulumi.StringInput) DatabaseOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Database {
return vs[0].(map[string]*Database)[vs[1].(string)]
}).(DatabaseOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DatabaseInput)(nil)).Elem(), &Database{})
pulumi.RegisterInputType(reflect.TypeOf((*DatabaseArrayInput)(nil)).Elem(), DatabaseArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DatabaseMapInput)(nil)).Elem(), DatabaseMap{})
pulumi.RegisterOutputType(DatabaseOutput{})
pulumi.RegisterOutputType(DatabaseArrayOutput{})
pulumi.RegisterOutputType(DatabaseMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/kusto/clusterPrincipalAssignment.go | sdk/go/azure/kusto/clusterPrincipalAssignment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package kusto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Kusto Cluster Principal Assignment.
//
// ## 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/kusto"
// "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("KustoRG"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleCluster, err := kusto.NewCluster(ctx, "example", &kusto.ClusterArgs{
// Name: pulumi.String("kustocluster"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: &kusto.ClusterSkuArgs{
// Name: pulumi.String("Standard_D13_v2"),
// Capacity: pulumi.Int(2),
// },
// })
// if err != nil {
// return err
// }
// _, err = kusto.NewClusterPrincipalAssignment(ctx, "example", &kusto.ClusterPrincipalAssignmentArgs{
// Name: pulumi.String("KustoPrincipalAssignment"),
// ResourceGroupName: example.Name,
// ClusterName: exampleCluster.Name,
// TenantId: pulumi.String(current.TenantId),
// PrincipalId: pulumi.Any(current.PrincipalId),
// PrincipalType: pulumi.String("App"),
// Role: pulumi.String("AllDatabasesAdmin"),
// })
// 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.Kusto` - 2024-04-13
//
// ## Import
//
// Data Explorer Cluster Principal Assignments can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:kusto/clusterPrincipalAssignment:ClusterPrincipalAssignment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/principalAssignments/assignment1
// ```
type ClusterPrincipalAssignment struct {
pulumi.CustomResourceState
// The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
ClusterName pulumi.StringOutput `pulumi:"clusterName"`
// The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The object id of the principal. Changing this forces a new resource to be created.
PrincipalId pulumi.StringOutput `pulumi:"principalId"`
// The name of the principal.
PrincipalName pulumi.StringOutput `pulumi:"principalName"`
// The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created.
PrincipalType pulumi.StringOutput `pulumi:"principalType"`
// 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"`
// The cluster role assigned to the principal. Valid values include `AllDatabasesAdmin`, `AllDatabasesViewer`, and `AllDatabasesMonitor`. Changing this forces a new resource to be created.
Role pulumi.StringOutput `pulumi:"role"`
// The tenant id in which the principal resides. Changing this forces a new resource to be created.
TenantId pulumi.StringOutput `pulumi:"tenantId"`
// The name of the tenant.
TenantName pulumi.StringOutput `pulumi:"tenantName"`
}
// NewClusterPrincipalAssignment registers a new resource with the given unique name, arguments, and options.
func NewClusterPrincipalAssignment(ctx *pulumi.Context,
name string, args *ClusterPrincipalAssignmentArgs, opts ...pulumi.ResourceOption) (*ClusterPrincipalAssignment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ClusterName == nil {
return nil, errors.New("invalid value for required argument 'ClusterName'")
}
if args.PrincipalId == nil {
return nil, errors.New("invalid value for required argument 'PrincipalId'")
}
if args.PrincipalType == nil {
return nil, errors.New("invalid value for required argument 'PrincipalType'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Role == nil {
return nil, errors.New("invalid value for required argument 'Role'")
}
if args.TenantId == nil {
return nil, errors.New("invalid value for required argument 'TenantId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ClusterPrincipalAssignment
err := ctx.RegisterResource("azure:kusto/clusterPrincipalAssignment:ClusterPrincipalAssignment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetClusterPrincipalAssignment gets an existing ClusterPrincipalAssignment 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 GetClusterPrincipalAssignment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ClusterPrincipalAssignmentState, opts ...pulumi.ResourceOption) (*ClusterPrincipalAssignment, error) {
var resource ClusterPrincipalAssignment
err := ctx.ReadResource("azure:kusto/clusterPrincipalAssignment:ClusterPrincipalAssignment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ClusterPrincipalAssignment resources.
type clusterPrincipalAssignmentState struct {
// The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
ClusterName *string `pulumi:"clusterName"`
// The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The object id of the principal. Changing this forces a new resource to be created.
PrincipalId *string `pulumi:"principalId"`
// The name of the principal.
PrincipalName *string `pulumi:"principalName"`
// The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created.
PrincipalType *string `pulumi:"principalType"`
// 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"`
// The cluster role assigned to the principal. Valid values include `AllDatabasesAdmin`, `AllDatabasesViewer`, and `AllDatabasesMonitor`. Changing this forces a new resource to be created.
Role *string `pulumi:"role"`
// The tenant id in which the principal resides. Changing this forces a new resource to be created.
TenantId *string `pulumi:"tenantId"`
// The name of the tenant.
TenantName *string `pulumi:"tenantName"`
}
type ClusterPrincipalAssignmentState struct {
// The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
ClusterName pulumi.StringPtrInput
// The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The object id of the principal. Changing this forces a new resource to be created.
PrincipalId pulumi.StringPtrInput
// The name of the principal.
PrincipalName pulumi.StringPtrInput
// The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created.
PrincipalType pulumi.StringPtrInput
// The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The cluster role assigned to the principal. Valid values include `AllDatabasesAdmin`, `AllDatabasesViewer`, and `AllDatabasesMonitor`. Changing this forces a new resource to be created.
Role pulumi.StringPtrInput
// The tenant id in which the principal resides. Changing this forces a new resource to be created.
TenantId pulumi.StringPtrInput
// The name of the tenant.
TenantName pulumi.StringPtrInput
}
func (ClusterPrincipalAssignmentState) ElementType() reflect.Type {
return reflect.TypeOf((*clusterPrincipalAssignmentState)(nil)).Elem()
}
type clusterPrincipalAssignmentArgs struct {
// The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
ClusterName string `pulumi:"clusterName"`
// The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The object id of the principal. Changing this forces a new resource to be created.
PrincipalId string `pulumi:"principalId"`
// The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created.
PrincipalType string `pulumi:"principalType"`
// 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"`
// The cluster role assigned to the principal. Valid values include `AllDatabasesAdmin`, `AllDatabasesViewer`, and `AllDatabasesMonitor`. Changing this forces a new resource to be created.
Role string `pulumi:"role"`
// The tenant id in which the principal resides. Changing this forces a new resource to be created.
TenantId string `pulumi:"tenantId"`
}
// The set of arguments for constructing a ClusterPrincipalAssignment resource.
type ClusterPrincipalAssignmentArgs struct {
// The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
ClusterName pulumi.StringInput
// The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The object id of the principal. Changing this forces a new resource to be created.
PrincipalId pulumi.StringInput
// The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created.
PrincipalType pulumi.StringInput
// The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The cluster role assigned to the principal. Valid values include `AllDatabasesAdmin`, `AllDatabasesViewer`, and `AllDatabasesMonitor`. Changing this forces a new resource to be created.
Role pulumi.StringInput
// The tenant id in which the principal resides. Changing this forces a new resource to be created.
TenantId pulumi.StringInput
}
func (ClusterPrincipalAssignmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*clusterPrincipalAssignmentArgs)(nil)).Elem()
}
type ClusterPrincipalAssignmentInput interface {
pulumi.Input
ToClusterPrincipalAssignmentOutput() ClusterPrincipalAssignmentOutput
ToClusterPrincipalAssignmentOutputWithContext(ctx context.Context) ClusterPrincipalAssignmentOutput
}
func (*ClusterPrincipalAssignment) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterPrincipalAssignment)(nil)).Elem()
}
func (i *ClusterPrincipalAssignment) ToClusterPrincipalAssignmentOutput() ClusterPrincipalAssignmentOutput {
return i.ToClusterPrincipalAssignmentOutputWithContext(context.Background())
}
func (i *ClusterPrincipalAssignment) ToClusterPrincipalAssignmentOutputWithContext(ctx context.Context) ClusterPrincipalAssignmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterPrincipalAssignmentOutput)
}
// ClusterPrincipalAssignmentArrayInput is an input type that accepts ClusterPrincipalAssignmentArray and ClusterPrincipalAssignmentArrayOutput values.
// You can construct a concrete instance of `ClusterPrincipalAssignmentArrayInput` via:
//
// ClusterPrincipalAssignmentArray{ ClusterPrincipalAssignmentArgs{...} }
type ClusterPrincipalAssignmentArrayInput interface {
pulumi.Input
ToClusterPrincipalAssignmentArrayOutput() ClusterPrincipalAssignmentArrayOutput
ToClusterPrincipalAssignmentArrayOutputWithContext(context.Context) ClusterPrincipalAssignmentArrayOutput
}
type ClusterPrincipalAssignmentArray []ClusterPrincipalAssignmentInput
func (ClusterPrincipalAssignmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ClusterPrincipalAssignment)(nil)).Elem()
}
func (i ClusterPrincipalAssignmentArray) ToClusterPrincipalAssignmentArrayOutput() ClusterPrincipalAssignmentArrayOutput {
return i.ToClusterPrincipalAssignmentArrayOutputWithContext(context.Background())
}
func (i ClusterPrincipalAssignmentArray) ToClusterPrincipalAssignmentArrayOutputWithContext(ctx context.Context) ClusterPrincipalAssignmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterPrincipalAssignmentArrayOutput)
}
// ClusterPrincipalAssignmentMapInput is an input type that accepts ClusterPrincipalAssignmentMap and ClusterPrincipalAssignmentMapOutput values.
// You can construct a concrete instance of `ClusterPrincipalAssignmentMapInput` via:
//
// ClusterPrincipalAssignmentMap{ "key": ClusterPrincipalAssignmentArgs{...} }
type ClusterPrincipalAssignmentMapInput interface {
pulumi.Input
ToClusterPrincipalAssignmentMapOutput() ClusterPrincipalAssignmentMapOutput
ToClusterPrincipalAssignmentMapOutputWithContext(context.Context) ClusterPrincipalAssignmentMapOutput
}
type ClusterPrincipalAssignmentMap map[string]ClusterPrincipalAssignmentInput
func (ClusterPrincipalAssignmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ClusterPrincipalAssignment)(nil)).Elem()
}
func (i ClusterPrincipalAssignmentMap) ToClusterPrincipalAssignmentMapOutput() ClusterPrincipalAssignmentMapOutput {
return i.ToClusterPrincipalAssignmentMapOutputWithContext(context.Background())
}
func (i ClusterPrincipalAssignmentMap) ToClusterPrincipalAssignmentMapOutputWithContext(ctx context.Context) ClusterPrincipalAssignmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterPrincipalAssignmentMapOutput)
}
type ClusterPrincipalAssignmentOutput struct{ *pulumi.OutputState }
func (ClusterPrincipalAssignmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterPrincipalAssignment)(nil)).Elem()
}
func (o ClusterPrincipalAssignmentOutput) ToClusterPrincipalAssignmentOutput() ClusterPrincipalAssignmentOutput {
return o
}
func (o ClusterPrincipalAssignmentOutput) ToClusterPrincipalAssignmentOutputWithContext(ctx context.Context) ClusterPrincipalAssignmentOutput {
return o
}
// The name of the cluster in which to create the resource. Changing this forces a new resource to be created.
func (o ClusterPrincipalAssignmentOutput) ClusterName() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterPrincipalAssignment) pulumi.StringOutput { return v.ClusterName }).(pulumi.StringOutput)
}
// The name of the Kusto cluster principal assignment. Changing this forces a new resource to be created.
func (o ClusterPrincipalAssignmentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterPrincipalAssignment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The object id of the principal. Changing this forces a new resource to be created.
func (o ClusterPrincipalAssignmentOutput) PrincipalId() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterPrincipalAssignment) pulumi.StringOutput { return v.PrincipalId }).(pulumi.StringOutput)
}
// The name of the principal.
func (o ClusterPrincipalAssignmentOutput) PrincipalName() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterPrincipalAssignment) pulumi.StringOutput { return v.PrincipalName }).(pulumi.StringOutput)
}
// The type of the principal. Valid values include `App`, `Group`, `User`. Changing this forces a new resource to be created.
func (o ClusterPrincipalAssignmentOutput) PrincipalType() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterPrincipalAssignment) pulumi.StringOutput { return v.PrincipalType }).(pulumi.StringOutput)
}
// The name of the resource group in which to create the resource. Changing this forces a new resource to be created.
func (o ClusterPrincipalAssignmentOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterPrincipalAssignment) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The cluster role assigned to the principal. Valid values include `AllDatabasesAdmin`, `AllDatabasesViewer`, and `AllDatabasesMonitor`. Changing this forces a new resource to be created.
func (o ClusterPrincipalAssignmentOutput) Role() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterPrincipalAssignment) pulumi.StringOutput { return v.Role }).(pulumi.StringOutput)
}
// The tenant id in which the principal resides. Changing this forces a new resource to be created.
func (o ClusterPrincipalAssignmentOutput) TenantId() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterPrincipalAssignment) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput)
}
// The name of the tenant.
func (o ClusterPrincipalAssignmentOutput) TenantName() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterPrincipalAssignment) pulumi.StringOutput { return v.TenantName }).(pulumi.StringOutput)
}
type ClusterPrincipalAssignmentArrayOutput struct{ *pulumi.OutputState }
func (ClusterPrincipalAssignmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ClusterPrincipalAssignment)(nil)).Elem()
}
func (o ClusterPrincipalAssignmentArrayOutput) ToClusterPrincipalAssignmentArrayOutput() ClusterPrincipalAssignmentArrayOutput {
return o
}
func (o ClusterPrincipalAssignmentArrayOutput) ToClusterPrincipalAssignmentArrayOutputWithContext(ctx context.Context) ClusterPrincipalAssignmentArrayOutput {
return o
}
func (o ClusterPrincipalAssignmentArrayOutput) Index(i pulumi.IntInput) ClusterPrincipalAssignmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ClusterPrincipalAssignment {
return vs[0].([]*ClusterPrincipalAssignment)[vs[1].(int)]
}).(ClusterPrincipalAssignmentOutput)
}
type ClusterPrincipalAssignmentMapOutput struct{ *pulumi.OutputState }
func (ClusterPrincipalAssignmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ClusterPrincipalAssignment)(nil)).Elem()
}
func (o ClusterPrincipalAssignmentMapOutput) ToClusterPrincipalAssignmentMapOutput() ClusterPrincipalAssignmentMapOutput {
return o
}
func (o ClusterPrincipalAssignmentMapOutput) ToClusterPrincipalAssignmentMapOutputWithContext(ctx context.Context) ClusterPrincipalAssignmentMapOutput {
return o
}
func (o ClusterPrincipalAssignmentMapOutput) MapIndex(k pulumi.StringInput) ClusterPrincipalAssignmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ClusterPrincipalAssignment {
return vs[0].(map[string]*ClusterPrincipalAssignment)[vs[1].(string)]
}).(ClusterPrincipalAssignmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ClusterPrincipalAssignmentInput)(nil)).Elem(), &ClusterPrincipalAssignment{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterPrincipalAssignmentArrayInput)(nil)).Elem(), ClusterPrincipalAssignmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterPrincipalAssignmentMapInput)(nil)).Elem(), ClusterPrincipalAssignmentMap{})
pulumi.RegisterOutputType(ClusterPrincipalAssignmentOutput{})
pulumi.RegisterOutputType(ClusterPrincipalAssignmentArrayOutput{})
pulumi.RegisterOutputType(ClusterPrincipalAssignmentMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/kusto/getDatabase.go | sdk/go/azure/kusto/getDatabase.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package kusto
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 Kusto Database
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/kusto"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := kusto.LookupDatabase(ctx, &kusto.LookupDatabaseArgs{
// Name: "my-kusto-database",
// ResourceGroupName: "test_resource_group",
// ClusterName: "test_cluster",
// }, 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.Kusto` - 2024-04-13
func LookupDatabase(ctx *pulumi.Context, args *LookupDatabaseArgs, opts ...pulumi.InvokeOption) (*LookupDatabaseResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDatabaseResult
err := ctx.Invoke("azure:kusto/getDatabase:getDatabase", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDatabase.
type LookupDatabaseArgs struct {
// The name of the Kusto Cluster this database is added to.
ClusterName string `pulumi:"clusterName"`
// The name of the Kusto Database.
Name string `pulumi:"name"`
// The Resource Group where the Kusto Database exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getDatabase.
type LookupDatabaseResult struct {
ClusterName string `pulumi:"clusterName"`
// The time the data that should be kept in cache for fast queries as ISO 8601 timespan.
HotCachePeriod string `pulumi:"hotCachePeriod"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure Region in which the managed Kusto Database exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The size of the database in bytes.
Size float64 `pulumi:"size"`
// The time the data should be kept before it stops being accessible to queries as ISO 8601 timespan.
SoftDeletePeriod string `pulumi:"softDeletePeriod"`
}
func LookupDatabaseOutput(ctx *pulumi.Context, args LookupDatabaseOutputArgs, opts ...pulumi.InvokeOption) LookupDatabaseResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupDatabaseResultOutput, error) {
args := v.(LookupDatabaseArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:kusto/getDatabase:getDatabase", args, LookupDatabaseResultOutput{}, options).(LookupDatabaseResultOutput), nil
}).(LookupDatabaseResultOutput)
}
// A collection of arguments for invoking getDatabase.
type LookupDatabaseOutputArgs struct {
// The name of the Kusto Cluster this database is added to.
ClusterName pulumi.StringInput `pulumi:"clusterName"`
// The name of the Kusto Database.
Name pulumi.StringInput `pulumi:"name"`
// The Resource Group where the Kusto Database exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupDatabaseOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDatabaseArgs)(nil)).Elem()
}
// A collection of values returned by getDatabase.
type LookupDatabaseResultOutput struct{ *pulumi.OutputState }
func (LookupDatabaseResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDatabaseResult)(nil)).Elem()
}
func (o LookupDatabaseResultOutput) ToLookupDatabaseResultOutput() LookupDatabaseResultOutput {
return o
}
func (o LookupDatabaseResultOutput) ToLookupDatabaseResultOutputWithContext(ctx context.Context) LookupDatabaseResultOutput {
return o
}
func (o LookupDatabaseResultOutput) ClusterName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.ClusterName }).(pulumi.StringOutput)
}
// The time the data that should be kept in cache for fast queries as ISO 8601 timespan.
func (o LookupDatabaseResultOutput) HotCachePeriod() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.HotCachePeriod }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupDatabaseResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Azure Region in which the managed Kusto Database exists.
func (o LookupDatabaseResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupDatabaseResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupDatabaseResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The size of the database in bytes.
func (o LookupDatabaseResultOutput) Size() pulumi.Float64Output {
return o.ApplyT(func(v LookupDatabaseResult) float64 { return v.Size }).(pulumi.Float64Output)
}
// The time the data should be kept before it stops being accessible to queries as ISO 8601 timespan.
func (o LookupDatabaseResultOutput) SoftDeletePeriod() pulumi.StringOutput {
return o.ApplyT(func(v LookupDatabaseResult) string { return v.SoftDeletePeriod }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDatabaseResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/kusto/eventGridDataConnection.go | sdk/go/azure/kusto/eventGridDataConnection.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package kusto
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Kusto (also known as Azure Data Explorer) Event Grid Data Connection
//
// ## 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/eventgrid"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/kusto"
// "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
// }
// exampleCluster, err := kusto.NewCluster(ctx, "example", &kusto.ClusterArgs{
// Name: pulumi.String("examplekustocluster"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: &kusto.ClusterSkuArgs{
// Name: pulumi.String("Standard_D13_v2"),
// Capacity: pulumi.Int(2),
// },
// })
// if err != nil {
// return err
// }
// exampleDatabase, err := kusto.NewDatabase(ctx, "example", &kusto.DatabaseArgs{
// Name: pulumi.String("example-kusto-database"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// ClusterName: exampleCluster.Name,
// HotCachePeriod: pulumi.String("P7D"),
// SoftDeletePeriod: pulumi.String("P31D"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("storageaccountname"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// })
// if err != nil {
// return err
// }
// exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("eventhubnamespace-example"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// })
// if err != nil {
// return err
// }
// exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
// Name: pulumi.String("eventhub-example"),
// NamespaceName: exampleEventHubNamespace.Name,
// ResourceGroupName: example.Name,
// PartitionCount: pulumi.Int(1),
// MessageRetention: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// exampleConsumerGroup, err := eventhub.NewConsumerGroup(ctx, "example", &eventhub.ConsumerGroupArgs{
// Name: pulumi.String("consumergroup-example"),
// NamespaceName: exampleEventHubNamespace.Name,
// EventhubName: exampleEventHub.Name,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleEventSubscription, err := eventgrid.NewEventSubscription(ctx, "example", &eventgrid.EventSubscriptionArgs{
// Name: pulumi.String("eventgrid-example"),
// Scope: exampleAccount.ID(),
// EventhubEndpointId: exampleEventHub.ID(),
// EventDeliverySchema: pulumi.String("EventGridSchema"),
// IncludedEventTypes: pulumi.StringArray{
// pulumi.String("Microsoft.Storage.BlobCreated"),
// pulumi.String("Microsoft.Storage.BlobRenamed"),
// },
// RetryPolicy: &eventgrid.EventSubscriptionRetryPolicyArgs{
// EventTimeToLive: pulumi.Int(144),
// MaxDeliveryAttempts: pulumi.Int(10),
// },
// })
// if err != nil {
// return err
// }
// _, err = kusto.NewEventGridDataConnection(ctx, "example", &kusto.EventGridDataConnectionArgs{
// Name: pulumi.String("my-kusto-eventgrid-data-connection"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// ClusterName: exampleCluster.Name,
// DatabaseName: exampleDatabase.Name,
// StorageAccountId: exampleAccount.ID(),
// EventhubId: exampleEventHub.ID(),
// EventhubConsumerGroupName: exampleConsumerGroup.Name,
// TableName: pulumi.String("my-table"),
// MappingRuleName: pulumi.String("my-table-mapping"),
// DataFormat: pulumi.String("JSON"),
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleEventSubscription,
// }))
// 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.Kusto` - 2024-04-13
//
// ## Import
//
// Kusto Event Grid Data Connections can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:kusto/eventGridDataConnection:EventGridDataConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/databases/database1/dataConnections/dataConnection1
// ```
type EventGridDataConnection struct {
pulumi.CustomResourceState
// Specifies the blob storage event type that needs to be processed. Possible Values are `Microsoft.Storage.BlobCreated` and `Microsoft.Storage.BlobRenamed`. Defaults to `Microsoft.Storage.BlobCreated`.
BlobStorageEventType pulumi.StringPtrOutput `pulumi:"blobStorageEventType"`
// Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created.
ClusterName pulumi.StringOutput `pulumi:"clusterName"`
// Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSV`, `TSVE`, `TXT` and `W3CLOGFILE`.
DataFormat pulumi.StringPtrOutput `pulumi:"dataFormat"`
// Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created.
DatabaseName pulumi.StringOutput `pulumi:"databaseName"`
// Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`.
DatabaseRoutingType pulumi.StringPtrOutput `pulumi:"databaseRoutingType"`
// The resource ID of the event grid that is subscribed to the storage account events.
EventgridEventSubscriptionId pulumi.StringOutput `pulumi:"eventgridEventSubscriptionId"`
// Deprecated: `eventgridResourceId` has been deprecated in favour of the `eventgridEventSubscriptionId` property and will be removed in v5.0 of the AzureRM Provider.
EventgridResourceId pulumi.StringOutput `pulumi:"eventgridResourceId"`
// Specifies the Event Hub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created.
EventhubConsumerGroupName pulumi.StringOutput `pulumi:"eventhubConsumerGroupName"`
// Specifies the resource id of the Event Hub this data connection will use for ingestion. Changing this forces a new resource to be created.
EventhubId pulumi.StringOutput `pulumi:"eventhubId"`
// The location where the Kusto Database should be created. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Empty for non-managed identity based data connection. For system assigned identity, provide cluster resource Id. For user assigned identity (UAI) provide the UAI resource Id.
ManagedIdentityId pulumi.StringOutput `pulumi:"managedIdentityId"`
// Deprecated: `managedIdentityResourceId` has been deprecated in favour of the `managedIdentityId` property and will be removed in v5.0 of the AzureRM Provider.
ManagedIdentityResourceId pulumi.StringOutput `pulumi:"managedIdentityResourceId"`
// Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.
MappingRuleName pulumi.StringPtrOutput `pulumi:"mappingRuleName"`
// The name of the Kusto Event Grid Data Connection to create. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// is the first record of every file ignored? Defaults to `false`.
SkipFirstRecord pulumi.BoolPtrOutput `pulumi:"skipFirstRecord"`
// Specifies the resource id of the Storage Account this data connection will use for ingestion. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
// Specifies the target table name used for the message ingestion. Table must exist before resource is created.
TableName pulumi.StringPtrOutput `pulumi:"tableName"`
}
// NewEventGridDataConnection registers a new resource with the given unique name, arguments, and options.
func NewEventGridDataConnection(ctx *pulumi.Context,
name string, args *EventGridDataConnectionArgs, opts ...pulumi.ResourceOption) (*EventGridDataConnection, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ClusterName == nil {
return nil, errors.New("invalid value for required argument 'ClusterName'")
}
if args.DatabaseName == nil {
return nil, errors.New("invalid value for required argument 'DatabaseName'")
}
if args.EventhubConsumerGroupName == nil {
return nil, errors.New("invalid value for required argument 'EventhubConsumerGroupName'")
}
if args.EventhubId == nil {
return nil, errors.New("invalid value for required argument 'EventhubId'")
}
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 EventGridDataConnection
err := ctx.RegisterResource("azure:kusto/eventGridDataConnection:EventGridDataConnection", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEventGridDataConnection gets an existing EventGridDataConnection 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 GetEventGridDataConnection(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EventGridDataConnectionState, opts ...pulumi.ResourceOption) (*EventGridDataConnection, error) {
var resource EventGridDataConnection
err := ctx.ReadResource("azure:kusto/eventGridDataConnection:EventGridDataConnection", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EventGridDataConnection resources.
type eventGridDataConnectionState struct {
// Specifies the blob storage event type that needs to be processed. Possible Values are `Microsoft.Storage.BlobCreated` and `Microsoft.Storage.BlobRenamed`. Defaults to `Microsoft.Storage.BlobCreated`.
BlobStorageEventType *string `pulumi:"blobStorageEventType"`
// Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created.
ClusterName *string `pulumi:"clusterName"`
// Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSV`, `TSVE`, `TXT` and `W3CLOGFILE`.
DataFormat *string `pulumi:"dataFormat"`
// Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created.
DatabaseName *string `pulumi:"databaseName"`
// Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`.
DatabaseRoutingType *string `pulumi:"databaseRoutingType"`
// The resource ID of the event grid that is subscribed to the storage account events.
EventgridEventSubscriptionId *string `pulumi:"eventgridEventSubscriptionId"`
// Deprecated: `eventgridResourceId` has been deprecated in favour of the `eventgridEventSubscriptionId` property and will be removed in v5.0 of the AzureRM Provider.
EventgridResourceId *string `pulumi:"eventgridResourceId"`
// Specifies the Event Hub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created.
EventhubConsumerGroupName *string `pulumi:"eventhubConsumerGroupName"`
// Specifies the resource id of the Event Hub this data connection will use for ingestion. Changing this forces a new resource to be created.
EventhubId *string `pulumi:"eventhubId"`
// The location where the Kusto Database should be created. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Empty for non-managed identity based data connection. For system assigned identity, provide cluster resource Id. For user assigned identity (UAI) provide the UAI resource Id.
ManagedIdentityId *string `pulumi:"managedIdentityId"`
// Deprecated: `managedIdentityResourceId` has been deprecated in favour of the `managedIdentityId` property and will be removed in v5.0 of the AzureRM Provider.
ManagedIdentityResourceId *string `pulumi:"managedIdentityResourceId"`
// Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.
MappingRuleName *string `pulumi:"mappingRuleName"`
// The name of the Kusto Event Grid Data Connection to create. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// is the first record of every file ignored? Defaults to `false`.
SkipFirstRecord *bool `pulumi:"skipFirstRecord"`
// Specifies the resource id of the Storage Account this data connection will use for ingestion. Changing this forces a new resource to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
// Specifies the target table name used for the message ingestion. Table must exist before resource is created.
TableName *string `pulumi:"tableName"`
}
type EventGridDataConnectionState struct {
// Specifies the blob storage event type that needs to be processed. Possible Values are `Microsoft.Storage.BlobCreated` and `Microsoft.Storage.BlobRenamed`. Defaults to `Microsoft.Storage.BlobCreated`.
BlobStorageEventType pulumi.StringPtrInput
// Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created.
ClusterName pulumi.StringPtrInput
// Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSV`, `TSVE`, `TXT` and `W3CLOGFILE`.
DataFormat pulumi.StringPtrInput
// Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created.
DatabaseName pulumi.StringPtrInput
// Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`.
DatabaseRoutingType pulumi.StringPtrInput
// The resource ID of the event grid that is subscribed to the storage account events.
EventgridEventSubscriptionId pulumi.StringPtrInput
// Deprecated: `eventgridResourceId` has been deprecated in favour of the `eventgridEventSubscriptionId` property and will be removed in v5.0 of the AzureRM Provider.
EventgridResourceId pulumi.StringPtrInput
// Specifies the Event Hub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created.
EventhubConsumerGroupName pulumi.StringPtrInput
// Specifies the resource id of the Event Hub this data connection will use for ingestion. Changing this forces a new resource to be created.
EventhubId pulumi.StringPtrInput
// The location where the Kusto Database should be created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Empty for non-managed identity based data connection. For system assigned identity, provide cluster resource Id. For user assigned identity (UAI) provide the UAI resource Id.
ManagedIdentityId pulumi.StringPtrInput
// Deprecated: `managedIdentityResourceId` has been deprecated in favour of the `managedIdentityId` property and will be removed in v5.0 of the AzureRM Provider.
ManagedIdentityResourceId pulumi.StringPtrInput
// Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.
MappingRuleName pulumi.StringPtrInput
// The name of the Kusto Event Grid Data Connection to create. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// is the first record of every file ignored? Defaults to `false`.
SkipFirstRecord pulumi.BoolPtrInput
// Specifies the resource id of the Storage Account this data connection will use for ingestion. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringPtrInput
// Specifies the target table name used for the message ingestion. Table must exist before resource is created.
TableName pulumi.StringPtrInput
}
func (EventGridDataConnectionState) ElementType() reflect.Type {
return reflect.TypeOf((*eventGridDataConnectionState)(nil)).Elem()
}
type eventGridDataConnectionArgs struct {
// Specifies the blob storage event type that needs to be processed. Possible Values are `Microsoft.Storage.BlobCreated` and `Microsoft.Storage.BlobRenamed`. Defaults to `Microsoft.Storage.BlobCreated`.
BlobStorageEventType *string `pulumi:"blobStorageEventType"`
// Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created.
ClusterName string `pulumi:"clusterName"`
// Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSV`, `TSVE`, `TXT` and `W3CLOGFILE`.
DataFormat *string `pulumi:"dataFormat"`
// Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created.
DatabaseName string `pulumi:"databaseName"`
// Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`.
DatabaseRoutingType *string `pulumi:"databaseRoutingType"`
// The resource ID of the event grid that is subscribed to the storage account events.
EventgridEventSubscriptionId *string `pulumi:"eventgridEventSubscriptionId"`
// Deprecated: `eventgridResourceId` has been deprecated in favour of the `eventgridEventSubscriptionId` property and will be removed in v5.0 of the AzureRM Provider.
EventgridResourceId *string `pulumi:"eventgridResourceId"`
// Specifies the Event Hub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created.
EventhubConsumerGroupName string `pulumi:"eventhubConsumerGroupName"`
// Specifies the resource id of the Event Hub this data connection will use for ingestion. Changing this forces a new resource to be created.
EventhubId string `pulumi:"eventhubId"`
// The location where the Kusto Database should be created. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Empty for non-managed identity based data connection. For system assigned identity, provide cluster resource Id. For user assigned identity (UAI) provide the UAI resource Id.
ManagedIdentityId *string `pulumi:"managedIdentityId"`
// Deprecated: `managedIdentityResourceId` has been deprecated in favour of the `managedIdentityId` property and will be removed in v5.0 of the AzureRM Provider.
ManagedIdentityResourceId *string `pulumi:"managedIdentityResourceId"`
// Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.
MappingRuleName *string `pulumi:"mappingRuleName"`
// The name of the Kusto Event Grid Data Connection to create. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// is the first record of every file ignored? Defaults to `false`.
SkipFirstRecord *bool `pulumi:"skipFirstRecord"`
// Specifies the resource id of the Storage Account this data connection will use for ingestion. Changing this forces a new resource to be created.
StorageAccountId string `pulumi:"storageAccountId"`
// Specifies the target table name used for the message ingestion. Table must exist before resource is created.
TableName *string `pulumi:"tableName"`
}
// The set of arguments for constructing a EventGridDataConnection resource.
type EventGridDataConnectionArgs struct {
// Specifies the blob storage event type that needs to be processed. Possible Values are `Microsoft.Storage.BlobCreated` and `Microsoft.Storage.BlobRenamed`. Defaults to `Microsoft.Storage.BlobCreated`.
BlobStorageEventType pulumi.StringPtrInput
// Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created.
ClusterName pulumi.StringInput
// Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSV`, `TSVE`, `TXT` and `W3CLOGFILE`.
DataFormat pulumi.StringPtrInput
// Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created.
DatabaseName pulumi.StringInput
// Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`.
DatabaseRoutingType pulumi.StringPtrInput
// The resource ID of the event grid that is subscribed to the storage account events.
EventgridEventSubscriptionId pulumi.StringPtrInput
// Deprecated: `eventgridResourceId` has been deprecated in favour of the `eventgridEventSubscriptionId` property and will be removed in v5.0 of the AzureRM Provider.
EventgridResourceId pulumi.StringPtrInput
// Specifies the Event Hub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created.
EventhubConsumerGroupName pulumi.StringInput
// Specifies the resource id of the Event Hub this data connection will use for ingestion. Changing this forces a new resource to be created.
EventhubId pulumi.StringInput
// The location where the Kusto Database should be created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Empty for non-managed identity based data connection. For system assigned identity, provide cluster resource Id. For user assigned identity (UAI) provide the UAI resource Id.
ManagedIdentityId pulumi.StringPtrInput
// Deprecated: `managedIdentityResourceId` has been deprecated in favour of the `managedIdentityId` property and will be removed in v5.0 of the AzureRM Provider.
ManagedIdentityResourceId pulumi.StringPtrInput
// Specifies the mapping rule used for the message ingestion. Mapping rule must exist before resource is created.
MappingRuleName pulumi.StringPtrInput
// The name of the Kusto Event Grid Data Connection to create. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the Resource Group where the Kusto Database should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// is the first record of every file ignored? Defaults to `false`.
SkipFirstRecord pulumi.BoolPtrInput
// Specifies the resource id of the Storage Account this data connection will use for ingestion. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringInput
// Specifies the target table name used for the message ingestion. Table must exist before resource is created.
TableName pulumi.StringPtrInput
}
func (EventGridDataConnectionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*eventGridDataConnectionArgs)(nil)).Elem()
}
type EventGridDataConnectionInput interface {
pulumi.Input
ToEventGridDataConnectionOutput() EventGridDataConnectionOutput
ToEventGridDataConnectionOutputWithContext(ctx context.Context) EventGridDataConnectionOutput
}
func (*EventGridDataConnection) ElementType() reflect.Type {
return reflect.TypeOf((**EventGridDataConnection)(nil)).Elem()
}
func (i *EventGridDataConnection) ToEventGridDataConnectionOutput() EventGridDataConnectionOutput {
return i.ToEventGridDataConnectionOutputWithContext(context.Background())
}
func (i *EventGridDataConnection) ToEventGridDataConnectionOutputWithContext(ctx context.Context) EventGridDataConnectionOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventGridDataConnectionOutput)
}
// EventGridDataConnectionArrayInput is an input type that accepts EventGridDataConnectionArray and EventGridDataConnectionArrayOutput values.
// You can construct a concrete instance of `EventGridDataConnectionArrayInput` via:
//
// EventGridDataConnectionArray{ EventGridDataConnectionArgs{...} }
type EventGridDataConnectionArrayInput interface {
pulumi.Input
ToEventGridDataConnectionArrayOutput() EventGridDataConnectionArrayOutput
ToEventGridDataConnectionArrayOutputWithContext(context.Context) EventGridDataConnectionArrayOutput
}
type EventGridDataConnectionArray []EventGridDataConnectionInput
func (EventGridDataConnectionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventGridDataConnection)(nil)).Elem()
}
func (i EventGridDataConnectionArray) ToEventGridDataConnectionArrayOutput() EventGridDataConnectionArrayOutput {
return i.ToEventGridDataConnectionArrayOutputWithContext(context.Background())
}
func (i EventGridDataConnectionArray) ToEventGridDataConnectionArrayOutputWithContext(ctx context.Context) EventGridDataConnectionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventGridDataConnectionArrayOutput)
}
// EventGridDataConnectionMapInput is an input type that accepts EventGridDataConnectionMap and EventGridDataConnectionMapOutput values.
// You can construct a concrete instance of `EventGridDataConnectionMapInput` via:
//
// EventGridDataConnectionMap{ "key": EventGridDataConnectionArgs{...} }
type EventGridDataConnectionMapInput interface {
pulumi.Input
ToEventGridDataConnectionMapOutput() EventGridDataConnectionMapOutput
ToEventGridDataConnectionMapOutputWithContext(context.Context) EventGridDataConnectionMapOutput
}
type EventGridDataConnectionMap map[string]EventGridDataConnectionInput
func (EventGridDataConnectionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventGridDataConnection)(nil)).Elem()
}
func (i EventGridDataConnectionMap) ToEventGridDataConnectionMapOutput() EventGridDataConnectionMapOutput {
return i.ToEventGridDataConnectionMapOutputWithContext(context.Background())
}
func (i EventGridDataConnectionMap) ToEventGridDataConnectionMapOutputWithContext(ctx context.Context) EventGridDataConnectionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventGridDataConnectionMapOutput)
}
type EventGridDataConnectionOutput struct{ *pulumi.OutputState }
func (EventGridDataConnectionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EventGridDataConnection)(nil)).Elem()
}
func (o EventGridDataConnectionOutput) ToEventGridDataConnectionOutput() EventGridDataConnectionOutput {
return o
}
func (o EventGridDataConnectionOutput) ToEventGridDataConnectionOutputWithContext(ctx context.Context) EventGridDataConnectionOutput {
return o
}
// Specifies the blob storage event type that needs to be processed. Possible Values are `Microsoft.Storage.BlobCreated` and `Microsoft.Storage.BlobRenamed`. Defaults to `Microsoft.Storage.BlobCreated`.
func (o EventGridDataConnectionOutput) BlobStorageEventType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EventGridDataConnection) pulumi.StringPtrOutput { return v.BlobStorageEventType }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Kusto Cluster this data connection will be added to. Changing this forces a new resource to be created.
func (o EventGridDataConnectionOutput) ClusterName() pulumi.StringOutput {
return o.ApplyT(func(v *EventGridDataConnection) pulumi.StringOutput { return v.ClusterName }).(pulumi.StringOutput)
}
// Specifies the data format of the EventHub messages. Allowed values: `APACHEAVRO`, `AVRO`, `CSV`, `JSON`, `MULTIJSON`, `ORC`, `PARQUET`, `PSV`, `RAW`, `SCSV`, `SINGLEJSON`, `SOHSV`, `TSV`, `TSVE`, `TXT` and `W3CLOGFILE`.
func (o EventGridDataConnectionOutput) DataFormat() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EventGridDataConnection) pulumi.StringPtrOutput { return v.DataFormat }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Kusto Database this data connection will be added to. Changing this forces a new resource to be created.
func (o EventGridDataConnectionOutput) DatabaseName() pulumi.StringOutput {
return o.ApplyT(func(v *EventGridDataConnection) pulumi.StringOutput { return v.DatabaseName }).(pulumi.StringOutput)
}
// Indication for database routing information from the data connection, by default only database routing information is allowed. Allowed values: `Single`, `Multi`. Changing this forces a new resource to be created. Defaults to `Single`.
func (o EventGridDataConnectionOutput) DatabaseRoutingType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EventGridDataConnection) pulumi.StringPtrOutput { return v.DatabaseRoutingType }).(pulumi.StringPtrOutput)
}
// The resource ID of the event grid that is subscribed to the storage account events.
func (o EventGridDataConnectionOutput) EventgridEventSubscriptionId() pulumi.StringOutput {
return o.ApplyT(func(v *EventGridDataConnection) pulumi.StringOutput { return v.EventgridEventSubscriptionId }).(pulumi.StringOutput)
}
// Deprecated: `eventgridResourceId` has been deprecated in favour of the `eventgridEventSubscriptionId` property and will be removed in v5.0 of the AzureRM Provider.
func (o EventGridDataConnectionOutput) EventgridResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *EventGridDataConnection) pulumi.StringOutput { return v.EventgridResourceId }).(pulumi.StringOutput)
}
// Specifies the Event Hub consumer group this data connection will use for ingestion. Changing this forces a new resource to be created.
func (o EventGridDataConnectionOutput) EventhubConsumerGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *EventGridDataConnection) pulumi.StringOutput { return v.EventhubConsumerGroupName }).(pulumi.StringOutput)
}
// Specifies the resource id of the Event Hub this data connection will use for ingestion. Changing this forces a new resource to be created.
func (o EventGridDataConnectionOutput) EventhubId() pulumi.StringOutput {
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | true |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/kusto/getCluster.go | sdk/go/azure/kusto/getCluster.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package kusto
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 Kusto (also known as Azure Data Explorer) Cluster
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/kusto"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := kusto.LookupCluster(ctx, &kusto.LookupClusterArgs{
// Name: "kustocluster",
// ResourceGroupName: "test_resource_group",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Kusto` - 2024-04-13
func LookupCluster(ctx *pulumi.Context, args *LookupClusterArgs, opts ...pulumi.InvokeOption) (*LookupClusterResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupClusterResult
err := ctx.Invoke("azure:kusto/getCluster:getCluster", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getCluster.
type LookupClusterArgs struct {
// Specifies the name of the Kusto Cluster.
Name string `pulumi:"name"`
// The name of the Resource Group where the Kusto Cluster exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getCluster.
type LookupClusterResult struct {
// The Kusto Cluster URI to be used for data ingestion.
DataIngestionUri string `pulumi:"dataIngestionUri"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// An `identity` block as defined below.
Identities []GetClusterIdentity `pulumi:"identities"`
Location string `pulumi:"location"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
Tags map[string]string `pulumi:"tags"`
// The FQDN of the Azure Kusto Cluster.
Uri string `pulumi:"uri"`
}
func LookupClusterOutput(ctx *pulumi.Context, args LookupClusterOutputArgs, opts ...pulumi.InvokeOption) LookupClusterResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupClusterResultOutput, error) {
args := v.(LookupClusterArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:kusto/getCluster:getCluster", args, LookupClusterResultOutput{}, options).(LookupClusterResultOutput), nil
}).(LookupClusterResultOutput)
}
// A collection of arguments for invoking getCluster.
type LookupClusterOutputArgs struct {
// Specifies the name of the Kusto Cluster.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Kusto Cluster exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupClusterOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupClusterArgs)(nil)).Elem()
}
// A collection of values returned by getCluster.
type LookupClusterResultOutput struct{ *pulumi.OutputState }
func (LookupClusterResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupClusterResult)(nil)).Elem()
}
func (o LookupClusterResultOutput) ToLookupClusterResultOutput() LookupClusterResultOutput {
return o
}
func (o LookupClusterResultOutput) ToLookupClusterResultOutputWithContext(ctx context.Context) LookupClusterResultOutput {
return o
}
// The Kusto Cluster URI to be used for data ingestion.
func (o LookupClusterResultOutput) DataIngestionUri() pulumi.StringOutput {
return o.ApplyT(func(v LookupClusterResult) string { return v.DataIngestionUri }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupClusterResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupClusterResult) string { return v.Id }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o LookupClusterResultOutput) Identities() GetClusterIdentityArrayOutput {
return o.ApplyT(func(v LookupClusterResult) []GetClusterIdentity { return v.Identities }).(GetClusterIdentityArrayOutput)
}
func (o LookupClusterResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupClusterResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupClusterResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupClusterResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupClusterResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupClusterResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func (o LookupClusterResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupClusterResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The FQDN of the Azure Kusto Cluster.
func (o LookupClusterResultOutput) Uri() pulumi.StringOutput {
return o.ApplyT(func(v LookupClusterResult) string { return v.Uri }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupClusterResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/securitycenter/autoProvisioning.go | sdk/go/azure/securitycenter/autoProvisioning.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package securitycenter
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Enables or disables the Security Center Auto Provisioning feature for the subscription
//
// > **Note:** The `securitycenter.AutoProvisioning` resource has been deprecated because [the auto provisioning capability will be deprecated by end of Novemember of 2024](https://learn.microsoft.com/en-us/azure/defender-for-cloud/prepare-deprecation-log-analytics-mma-agent#log-analytics-agent-autoprovisioning-experience---deprecation-plan) and will be removed in v5.0 of the AzureRM Provider.
//
// > **Note:** There is no resource name required, it will always be "default"
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/securitycenter"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := securitycenter.NewAutoProvisioning(ctx, "example", &securitycenter.AutoProvisioningArgs{
// AutoProvision: pulumi.String("On"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Security Center Auto Provisioning can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:securitycenter/autoProvisioning:AutoProvisioning example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/autoProvisioningSettings/default
// ```
type AutoProvisioning struct {
pulumi.CustomResourceState
// Should the security agent be automatically provisioned on Virtual Machines in this subscription? Possible values are `On` (to install the security agent automatically, if it's missing) or `Off` (to not install the security agent automatically).
AutoProvision pulumi.StringOutput `pulumi:"autoProvision"`
}
// NewAutoProvisioning registers a new resource with the given unique name, arguments, and options.
func NewAutoProvisioning(ctx *pulumi.Context,
name string, args *AutoProvisioningArgs, opts ...pulumi.ResourceOption) (*AutoProvisioning, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AutoProvision == nil {
return nil, errors.New("invalid value for required argument 'AutoProvision'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AutoProvisioning
err := ctx.RegisterResource("azure:securitycenter/autoProvisioning:AutoProvisioning", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAutoProvisioning gets an existing AutoProvisioning 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 GetAutoProvisioning(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AutoProvisioningState, opts ...pulumi.ResourceOption) (*AutoProvisioning, error) {
var resource AutoProvisioning
err := ctx.ReadResource("azure:securitycenter/autoProvisioning:AutoProvisioning", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AutoProvisioning resources.
type autoProvisioningState struct {
// Should the security agent be automatically provisioned on Virtual Machines in this subscription? Possible values are `On` (to install the security agent automatically, if it's missing) or `Off` (to not install the security agent automatically).
AutoProvision *string `pulumi:"autoProvision"`
}
type AutoProvisioningState struct {
// Should the security agent be automatically provisioned on Virtual Machines in this subscription? Possible values are `On` (to install the security agent automatically, if it's missing) or `Off` (to not install the security agent automatically).
AutoProvision pulumi.StringPtrInput
}
func (AutoProvisioningState) ElementType() reflect.Type {
return reflect.TypeOf((*autoProvisioningState)(nil)).Elem()
}
type autoProvisioningArgs struct {
// Should the security agent be automatically provisioned on Virtual Machines in this subscription? Possible values are `On` (to install the security agent automatically, if it's missing) or `Off` (to not install the security agent automatically).
AutoProvision string `pulumi:"autoProvision"`
}
// The set of arguments for constructing a AutoProvisioning resource.
type AutoProvisioningArgs struct {
// Should the security agent be automatically provisioned on Virtual Machines in this subscription? Possible values are `On` (to install the security agent automatically, if it's missing) or `Off` (to not install the security agent automatically).
AutoProvision pulumi.StringInput
}
func (AutoProvisioningArgs) ElementType() reflect.Type {
return reflect.TypeOf((*autoProvisioningArgs)(nil)).Elem()
}
type AutoProvisioningInput interface {
pulumi.Input
ToAutoProvisioningOutput() AutoProvisioningOutput
ToAutoProvisioningOutputWithContext(ctx context.Context) AutoProvisioningOutput
}
func (*AutoProvisioning) ElementType() reflect.Type {
return reflect.TypeOf((**AutoProvisioning)(nil)).Elem()
}
func (i *AutoProvisioning) ToAutoProvisioningOutput() AutoProvisioningOutput {
return i.ToAutoProvisioningOutputWithContext(context.Background())
}
func (i *AutoProvisioning) ToAutoProvisioningOutputWithContext(ctx context.Context) AutoProvisioningOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutoProvisioningOutput)
}
// AutoProvisioningArrayInput is an input type that accepts AutoProvisioningArray and AutoProvisioningArrayOutput values.
// You can construct a concrete instance of `AutoProvisioningArrayInput` via:
//
// AutoProvisioningArray{ AutoProvisioningArgs{...} }
type AutoProvisioningArrayInput interface {
pulumi.Input
ToAutoProvisioningArrayOutput() AutoProvisioningArrayOutput
ToAutoProvisioningArrayOutputWithContext(context.Context) AutoProvisioningArrayOutput
}
type AutoProvisioningArray []AutoProvisioningInput
func (AutoProvisioningArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AutoProvisioning)(nil)).Elem()
}
func (i AutoProvisioningArray) ToAutoProvisioningArrayOutput() AutoProvisioningArrayOutput {
return i.ToAutoProvisioningArrayOutputWithContext(context.Background())
}
func (i AutoProvisioningArray) ToAutoProvisioningArrayOutputWithContext(ctx context.Context) AutoProvisioningArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutoProvisioningArrayOutput)
}
// AutoProvisioningMapInput is an input type that accepts AutoProvisioningMap and AutoProvisioningMapOutput values.
// You can construct a concrete instance of `AutoProvisioningMapInput` via:
//
// AutoProvisioningMap{ "key": AutoProvisioningArgs{...} }
type AutoProvisioningMapInput interface {
pulumi.Input
ToAutoProvisioningMapOutput() AutoProvisioningMapOutput
ToAutoProvisioningMapOutputWithContext(context.Context) AutoProvisioningMapOutput
}
type AutoProvisioningMap map[string]AutoProvisioningInput
func (AutoProvisioningMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AutoProvisioning)(nil)).Elem()
}
func (i AutoProvisioningMap) ToAutoProvisioningMapOutput() AutoProvisioningMapOutput {
return i.ToAutoProvisioningMapOutputWithContext(context.Background())
}
func (i AutoProvisioningMap) ToAutoProvisioningMapOutputWithContext(ctx context.Context) AutoProvisioningMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutoProvisioningMapOutput)
}
type AutoProvisioningOutput struct{ *pulumi.OutputState }
func (AutoProvisioningOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AutoProvisioning)(nil)).Elem()
}
func (o AutoProvisioningOutput) ToAutoProvisioningOutput() AutoProvisioningOutput {
return o
}
func (o AutoProvisioningOutput) ToAutoProvisioningOutputWithContext(ctx context.Context) AutoProvisioningOutput {
return o
}
// Should the security agent be automatically provisioned on Virtual Machines in this subscription? Possible values are `On` (to install the security agent automatically, if it's missing) or `Off` (to not install the security agent automatically).
func (o AutoProvisioningOutput) AutoProvision() pulumi.StringOutput {
return o.ApplyT(func(v *AutoProvisioning) pulumi.StringOutput { return v.AutoProvision }).(pulumi.StringOutput)
}
type AutoProvisioningArrayOutput struct{ *pulumi.OutputState }
func (AutoProvisioningArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AutoProvisioning)(nil)).Elem()
}
func (o AutoProvisioningArrayOutput) ToAutoProvisioningArrayOutput() AutoProvisioningArrayOutput {
return o
}
func (o AutoProvisioningArrayOutput) ToAutoProvisioningArrayOutputWithContext(ctx context.Context) AutoProvisioningArrayOutput {
return o
}
func (o AutoProvisioningArrayOutput) Index(i pulumi.IntInput) AutoProvisioningOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AutoProvisioning {
return vs[0].([]*AutoProvisioning)[vs[1].(int)]
}).(AutoProvisioningOutput)
}
type AutoProvisioningMapOutput struct{ *pulumi.OutputState }
func (AutoProvisioningMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AutoProvisioning)(nil)).Elem()
}
func (o AutoProvisioningMapOutput) ToAutoProvisioningMapOutput() AutoProvisioningMapOutput {
return o
}
func (o AutoProvisioningMapOutput) ToAutoProvisioningMapOutputWithContext(ctx context.Context) AutoProvisioningMapOutput {
return o
}
func (o AutoProvisioningMapOutput) MapIndex(k pulumi.StringInput) AutoProvisioningOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AutoProvisioning {
return vs[0].(map[string]*AutoProvisioning)[vs[1].(string)]
}).(AutoProvisioningOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AutoProvisioningInput)(nil)).Elem(), &AutoProvisioning{})
pulumi.RegisterInputType(reflect.TypeOf((*AutoProvisioningArrayInput)(nil)).Elem(), AutoProvisioningArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AutoProvisioningMapInput)(nil)).Elem(), AutoProvisioningMap{})
pulumi.RegisterOutputType(AutoProvisioningOutput{})
pulumi.RegisterOutputType(AutoProvisioningArrayOutput{})
pulumi.RegisterOutputType(AutoProvisioningMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/securitycenter/subscriptionPricing.go | sdk/go/azure/securitycenter/subscriptionPricing.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package securitycenter
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the Pricing Tier for Azure Security Center in the current subscription.
//
// > **Note:** Deletion of this resource will reset the pricing tier to `Free`
//
// ## Example Usage
//
// ### Basic usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/securitycenter"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := securitycenter.NewSubscriptionPricing(ctx, "example", &securitycenter.SubscriptionPricingArgs{
// Tier: pulumi.String("Standard"),
// ResourceType: pulumi.String("VirtualMachines"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### Using Extensions with Defender CSPM
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/securitycenter"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := securitycenter.NewSubscriptionPricing(ctx, "example1", &securitycenter.SubscriptionPricingArgs{
// Tier: pulumi.String("Standard"),
// ResourceType: pulumi.String("CloudPosture"),
// Extensions: securitycenter.SubscriptionPricingExtensionArray{
// &securitycenter.SubscriptionPricingExtensionArgs{
// Name: pulumi.String("ContainerRegistriesVulnerabilityAssessments"),
// },
// &securitycenter.SubscriptionPricingExtensionArgs{
// Name: pulumi.String("AgentlessVmScanning"),
// AdditionalExtensionProperties: pulumi.StringMap{
// "ExclusionTags": pulumi.String("[]"),
// },
// },
// &securitycenter.SubscriptionPricingExtensionArgs{
// Name: pulumi.String("AgentlessDiscoveryForKubernetes"),
// },
// &securitycenter.SubscriptionPricingExtensionArgs{
// Name: pulumi.String("SensitiveDataDiscovery"),
// },
// },
// })
// 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.Security` - 2023-01-01
//
// ## Import
//
// The pricing tier can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:securitycenter/subscriptionPricing:SubscriptionPricing example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/pricings/<resource_type>
// ```
type SubscriptionPricing struct {
pulumi.CustomResourceState
// One or more `extension` blocks as defined below.
Extensions SubscriptionPricingExtensionArrayOutput `pulumi:"extensions"`
// The resource type this setting affects. Possible values are `AI`, `Api`, `AppServices`, `ContainerRegistry`, `KeyVaults`, `KubernetesService`, `SqlServers`, `SqlServerVirtualMachines`, `StorageAccounts`, `VirtualMachines`, `Arm`, `Dns`, `OpenSourceRelationalDatabases`, `Containers`, `CosmosDbs` and `CloudPosture`. Defaults to `VirtualMachines`
ResourceType pulumi.StringPtrOutput `pulumi:"resourceType"`
// Resource type pricing subplan. Contact your MSFT representative for possible values. Changing this forces a new resource to be created.
Subplan pulumi.StringPtrOutput `pulumi:"subplan"`
// The pricing tier to use. Possible values are `Free` and `Standard`.
Tier pulumi.StringOutput `pulumi:"tier"`
}
// NewSubscriptionPricing registers a new resource with the given unique name, arguments, and options.
func NewSubscriptionPricing(ctx *pulumi.Context,
name string, args *SubscriptionPricingArgs, opts ...pulumi.ResourceOption) (*SubscriptionPricing, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Tier == nil {
return nil, errors.New("invalid value for required argument 'Tier'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SubscriptionPricing
err := ctx.RegisterResource("azure:securitycenter/subscriptionPricing:SubscriptionPricing", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSubscriptionPricing gets an existing SubscriptionPricing 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 GetSubscriptionPricing(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SubscriptionPricingState, opts ...pulumi.ResourceOption) (*SubscriptionPricing, error) {
var resource SubscriptionPricing
err := ctx.ReadResource("azure:securitycenter/subscriptionPricing:SubscriptionPricing", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SubscriptionPricing resources.
type subscriptionPricingState struct {
// One or more `extension` blocks as defined below.
Extensions []SubscriptionPricingExtension `pulumi:"extensions"`
// The resource type this setting affects. Possible values are `AI`, `Api`, `AppServices`, `ContainerRegistry`, `KeyVaults`, `KubernetesService`, `SqlServers`, `SqlServerVirtualMachines`, `StorageAccounts`, `VirtualMachines`, `Arm`, `Dns`, `OpenSourceRelationalDatabases`, `Containers`, `CosmosDbs` and `CloudPosture`. Defaults to `VirtualMachines`
ResourceType *string `pulumi:"resourceType"`
// Resource type pricing subplan. Contact your MSFT representative for possible values. Changing this forces a new resource to be created.
Subplan *string `pulumi:"subplan"`
// The pricing tier to use. Possible values are `Free` and `Standard`.
Tier *string `pulumi:"tier"`
}
type SubscriptionPricingState struct {
// One or more `extension` blocks as defined below.
Extensions SubscriptionPricingExtensionArrayInput
// The resource type this setting affects. Possible values are `AI`, `Api`, `AppServices`, `ContainerRegistry`, `KeyVaults`, `KubernetesService`, `SqlServers`, `SqlServerVirtualMachines`, `StorageAccounts`, `VirtualMachines`, `Arm`, `Dns`, `OpenSourceRelationalDatabases`, `Containers`, `CosmosDbs` and `CloudPosture`. Defaults to `VirtualMachines`
ResourceType pulumi.StringPtrInput
// Resource type pricing subplan. Contact your MSFT representative for possible values. Changing this forces a new resource to be created.
Subplan pulumi.StringPtrInput
// The pricing tier to use. Possible values are `Free` and `Standard`.
Tier pulumi.StringPtrInput
}
func (SubscriptionPricingState) ElementType() reflect.Type {
return reflect.TypeOf((*subscriptionPricingState)(nil)).Elem()
}
type subscriptionPricingArgs struct {
// One or more `extension` blocks as defined below.
Extensions []SubscriptionPricingExtension `pulumi:"extensions"`
// The resource type this setting affects. Possible values are `AI`, `Api`, `AppServices`, `ContainerRegistry`, `KeyVaults`, `KubernetesService`, `SqlServers`, `SqlServerVirtualMachines`, `StorageAccounts`, `VirtualMachines`, `Arm`, `Dns`, `OpenSourceRelationalDatabases`, `Containers`, `CosmosDbs` and `CloudPosture`. Defaults to `VirtualMachines`
ResourceType *string `pulumi:"resourceType"`
// Resource type pricing subplan. Contact your MSFT representative for possible values. Changing this forces a new resource to be created.
Subplan *string `pulumi:"subplan"`
// The pricing tier to use. Possible values are `Free` and `Standard`.
Tier string `pulumi:"tier"`
}
// The set of arguments for constructing a SubscriptionPricing resource.
type SubscriptionPricingArgs struct {
// One or more `extension` blocks as defined below.
Extensions SubscriptionPricingExtensionArrayInput
// The resource type this setting affects. Possible values are `AI`, `Api`, `AppServices`, `ContainerRegistry`, `KeyVaults`, `KubernetesService`, `SqlServers`, `SqlServerVirtualMachines`, `StorageAccounts`, `VirtualMachines`, `Arm`, `Dns`, `OpenSourceRelationalDatabases`, `Containers`, `CosmosDbs` and `CloudPosture`. Defaults to `VirtualMachines`
ResourceType pulumi.StringPtrInput
// Resource type pricing subplan. Contact your MSFT representative for possible values. Changing this forces a new resource to be created.
Subplan pulumi.StringPtrInput
// The pricing tier to use. Possible values are `Free` and `Standard`.
Tier pulumi.StringInput
}
func (SubscriptionPricingArgs) ElementType() reflect.Type {
return reflect.TypeOf((*subscriptionPricingArgs)(nil)).Elem()
}
type SubscriptionPricingInput interface {
pulumi.Input
ToSubscriptionPricingOutput() SubscriptionPricingOutput
ToSubscriptionPricingOutputWithContext(ctx context.Context) SubscriptionPricingOutput
}
func (*SubscriptionPricing) ElementType() reflect.Type {
return reflect.TypeOf((**SubscriptionPricing)(nil)).Elem()
}
func (i *SubscriptionPricing) ToSubscriptionPricingOutput() SubscriptionPricingOutput {
return i.ToSubscriptionPricingOutputWithContext(context.Background())
}
func (i *SubscriptionPricing) ToSubscriptionPricingOutputWithContext(ctx context.Context) SubscriptionPricingOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionPricingOutput)
}
// SubscriptionPricingArrayInput is an input type that accepts SubscriptionPricingArray and SubscriptionPricingArrayOutput values.
// You can construct a concrete instance of `SubscriptionPricingArrayInput` via:
//
// SubscriptionPricingArray{ SubscriptionPricingArgs{...} }
type SubscriptionPricingArrayInput interface {
pulumi.Input
ToSubscriptionPricingArrayOutput() SubscriptionPricingArrayOutput
ToSubscriptionPricingArrayOutputWithContext(context.Context) SubscriptionPricingArrayOutput
}
type SubscriptionPricingArray []SubscriptionPricingInput
func (SubscriptionPricingArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SubscriptionPricing)(nil)).Elem()
}
func (i SubscriptionPricingArray) ToSubscriptionPricingArrayOutput() SubscriptionPricingArrayOutput {
return i.ToSubscriptionPricingArrayOutputWithContext(context.Background())
}
func (i SubscriptionPricingArray) ToSubscriptionPricingArrayOutputWithContext(ctx context.Context) SubscriptionPricingArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionPricingArrayOutput)
}
// SubscriptionPricingMapInput is an input type that accepts SubscriptionPricingMap and SubscriptionPricingMapOutput values.
// You can construct a concrete instance of `SubscriptionPricingMapInput` via:
//
// SubscriptionPricingMap{ "key": SubscriptionPricingArgs{...} }
type SubscriptionPricingMapInput interface {
pulumi.Input
ToSubscriptionPricingMapOutput() SubscriptionPricingMapOutput
ToSubscriptionPricingMapOutputWithContext(context.Context) SubscriptionPricingMapOutput
}
type SubscriptionPricingMap map[string]SubscriptionPricingInput
func (SubscriptionPricingMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SubscriptionPricing)(nil)).Elem()
}
func (i SubscriptionPricingMap) ToSubscriptionPricingMapOutput() SubscriptionPricingMapOutput {
return i.ToSubscriptionPricingMapOutputWithContext(context.Background())
}
func (i SubscriptionPricingMap) ToSubscriptionPricingMapOutputWithContext(ctx context.Context) SubscriptionPricingMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionPricingMapOutput)
}
type SubscriptionPricingOutput struct{ *pulumi.OutputState }
func (SubscriptionPricingOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SubscriptionPricing)(nil)).Elem()
}
func (o SubscriptionPricingOutput) ToSubscriptionPricingOutput() SubscriptionPricingOutput {
return o
}
func (o SubscriptionPricingOutput) ToSubscriptionPricingOutputWithContext(ctx context.Context) SubscriptionPricingOutput {
return o
}
// One or more `extension` blocks as defined below.
func (o SubscriptionPricingOutput) Extensions() SubscriptionPricingExtensionArrayOutput {
return o.ApplyT(func(v *SubscriptionPricing) SubscriptionPricingExtensionArrayOutput { return v.Extensions }).(SubscriptionPricingExtensionArrayOutput)
}
// The resource type this setting affects. Possible values are `AI`, `Api`, `AppServices`, `ContainerRegistry`, `KeyVaults`, `KubernetesService`, `SqlServers`, `SqlServerVirtualMachines`, `StorageAccounts`, `VirtualMachines`, `Arm`, `Dns`, `OpenSourceRelationalDatabases`, `Containers`, `CosmosDbs` and `CloudPosture`. Defaults to `VirtualMachines`
func (o SubscriptionPricingOutput) ResourceType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SubscriptionPricing) pulumi.StringPtrOutput { return v.ResourceType }).(pulumi.StringPtrOutput)
}
// Resource type pricing subplan. Contact your MSFT representative for possible values. Changing this forces a new resource to be created.
func (o SubscriptionPricingOutput) Subplan() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SubscriptionPricing) pulumi.StringPtrOutput { return v.Subplan }).(pulumi.StringPtrOutput)
}
// The pricing tier to use. Possible values are `Free` and `Standard`.
func (o SubscriptionPricingOutput) Tier() pulumi.StringOutput {
return o.ApplyT(func(v *SubscriptionPricing) pulumi.StringOutput { return v.Tier }).(pulumi.StringOutput)
}
type SubscriptionPricingArrayOutput struct{ *pulumi.OutputState }
func (SubscriptionPricingArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SubscriptionPricing)(nil)).Elem()
}
func (o SubscriptionPricingArrayOutput) ToSubscriptionPricingArrayOutput() SubscriptionPricingArrayOutput {
return o
}
func (o SubscriptionPricingArrayOutput) ToSubscriptionPricingArrayOutputWithContext(ctx context.Context) SubscriptionPricingArrayOutput {
return o
}
func (o SubscriptionPricingArrayOutput) Index(i pulumi.IntInput) SubscriptionPricingOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SubscriptionPricing {
return vs[0].([]*SubscriptionPricing)[vs[1].(int)]
}).(SubscriptionPricingOutput)
}
type SubscriptionPricingMapOutput struct{ *pulumi.OutputState }
func (SubscriptionPricingMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SubscriptionPricing)(nil)).Elem()
}
func (o SubscriptionPricingMapOutput) ToSubscriptionPricingMapOutput() SubscriptionPricingMapOutput {
return o
}
func (o SubscriptionPricingMapOutput) ToSubscriptionPricingMapOutputWithContext(ctx context.Context) SubscriptionPricingMapOutput {
return o
}
func (o SubscriptionPricingMapOutput) MapIndex(k pulumi.StringInput) SubscriptionPricingOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SubscriptionPricing {
return vs[0].(map[string]*SubscriptionPricing)[vs[1].(string)]
}).(SubscriptionPricingOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionPricingInput)(nil)).Elem(), &SubscriptionPricing{})
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionPricingArrayInput)(nil)).Elem(), SubscriptionPricingArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionPricingMapInput)(nil)).Elem(), SubscriptionPricingMap{})
pulumi.RegisterOutputType(SubscriptionPricingOutput{})
pulumi.RegisterOutputType(SubscriptionPricingArrayOutput{})
pulumi.RegisterOutputType(SubscriptionPricingMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/securitycenter/init.go | sdk/go/azure/securitycenter/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 securitycenter
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:securitycenter/advancedThreatProtection:AdvancedThreatProtection":
r = &AdvancedThreatProtection{}
case "azure:securitycenter/assessment:Assessment":
r = &Assessment{}
case "azure:securitycenter/assessmentPolicy:AssessmentPolicy":
r = &AssessmentPolicy{}
case "azure:securitycenter/autoProvisioning:AutoProvisioning":
r = &AutoProvisioning{}
case "azure:securitycenter/automation:Automation":
r = &Automation{}
case "azure:securitycenter/contact:Contact":
r = &Contact{}
case "azure:securitycenter/serverVulnerabilityAssessmentVirtualMachine:ServerVulnerabilityAssessmentVirtualMachine":
r = &ServerVulnerabilityAssessmentVirtualMachine{}
case "azure:securitycenter/serverVulnerabilityAssessmentsSetting:ServerVulnerabilityAssessmentsSetting":
r = &ServerVulnerabilityAssessmentsSetting{}
case "azure:securitycenter/setting:Setting":
r = &Setting{}
case "azure:securitycenter/storageDefender:StorageDefender":
r = &StorageDefender{}
case "azure:securitycenter/subscriptionPricing:SubscriptionPricing":
r = &SubscriptionPricing{}
case "azure:securitycenter/workspace:Workspace":
r = &Workspace{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
func init() {
version, err := internal.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"azure",
"securitycenter/advancedThreatProtection",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"securitycenter/assessment",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"securitycenter/assessmentPolicy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"securitycenter/autoProvisioning",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"securitycenter/automation",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"securitycenter/contact",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"securitycenter/serverVulnerabilityAssessmentVirtualMachine",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"securitycenter/serverVulnerabilityAssessmentsSetting",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"securitycenter/setting",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"securitycenter/storageDefender",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"securitycenter/subscriptionPricing",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"securitycenter/workspace",
&module{version},
)
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/securitycenter/pulumiTypes.go | sdk/go/azure/securitycenter/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 securitycenter
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 AssessmentStatus struct {
// Specifies the cause of the assessment status.
Cause *string `pulumi:"cause"`
// Specifies the programmatic code of the assessment status. Possible values are `Healthy`, `Unhealthy` and `NotApplicable`.
Code string `pulumi:"code"`
// Specifies the human readable description of the assessment status.
Description *string `pulumi:"description"`
}
// AssessmentStatusInput is an input type that accepts AssessmentStatusArgs and AssessmentStatusOutput values.
// You can construct a concrete instance of `AssessmentStatusInput` via:
//
// AssessmentStatusArgs{...}
type AssessmentStatusInput interface {
pulumi.Input
ToAssessmentStatusOutput() AssessmentStatusOutput
ToAssessmentStatusOutputWithContext(context.Context) AssessmentStatusOutput
}
type AssessmentStatusArgs struct {
// Specifies the cause of the assessment status.
Cause pulumi.StringPtrInput `pulumi:"cause"`
// Specifies the programmatic code of the assessment status. Possible values are `Healthy`, `Unhealthy` and `NotApplicable`.
Code pulumi.StringInput `pulumi:"code"`
// Specifies the human readable description of the assessment status.
Description pulumi.StringPtrInput `pulumi:"description"`
}
func (AssessmentStatusArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AssessmentStatus)(nil)).Elem()
}
func (i AssessmentStatusArgs) ToAssessmentStatusOutput() AssessmentStatusOutput {
return i.ToAssessmentStatusOutputWithContext(context.Background())
}
func (i AssessmentStatusArgs) ToAssessmentStatusOutputWithContext(ctx context.Context) AssessmentStatusOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssessmentStatusOutput)
}
func (i AssessmentStatusArgs) ToAssessmentStatusPtrOutput() AssessmentStatusPtrOutput {
return i.ToAssessmentStatusPtrOutputWithContext(context.Background())
}
func (i AssessmentStatusArgs) ToAssessmentStatusPtrOutputWithContext(ctx context.Context) AssessmentStatusPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssessmentStatusOutput).ToAssessmentStatusPtrOutputWithContext(ctx)
}
// AssessmentStatusPtrInput is an input type that accepts AssessmentStatusArgs, AssessmentStatusPtr and AssessmentStatusPtrOutput values.
// You can construct a concrete instance of `AssessmentStatusPtrInput` via:
//
// AssessmentStatusArgs{...}
//
// or:
//
// nil
type AssessmentStatusPtrInput interface {
pulumi.Input
ToAssessmentStatusPtrOutput() AssessmentStatusPtrOutput
ToAssessmentStatusPtrOutputWithContext(context.Context) AssessmentStatusPtrOutput
}
type assessmentStatusPtrType AssessmentStatusArgs
func AssessmentStatusPtr(v *AssessmentStatusArgs) AssessmentStatusPtrInput {
return (*assessmentStatusPtrType)(v)
}
func (*assessmentStatusPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AssessmentStatus)(nil)).Elem()
}
func (i *assessmentStatusPtrType) ToAssessmentStatusPtrOutput() AssessmentStatusPtrOutput {
return i.ToAssessmentStatusPtrOutputWithContext(context.Background())
}
func (i *assessmentStatusPtrType) ToAssessmentStatusPtrOutputWithContext(ctx context.Context) AssessmentStatusPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssessmentStatusPtrOutput)
}
type AssessmentStatusOutput struct{ *pulumi.OutputState }
func (AssessmentStatusOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AssessmentStatus)(nil)).Elem()
}
func (o AssessmentStatusOutput) ToAssessmentStatusOutput() AssessmentStatusOutput {
return o
}
func (o AssessmentStatusOutput) ToAssessmentStatusOutputWithContext(ctx context.Context) AssessmentStatusOutput {
return o
}
func (o AssessmentStatusOutput) ToAssessmentStatusPtrOutput() AssessmentStatusPtrOutput {
return o.ToAssessmentStatusPtrOutputWithContext(context.Background())
}
func (o AssessmentStatusOutput) ToAssessmentStatusPtrOutputWithContext(ctx context.Context) AssessmentStatusPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AssessmentStatus) *AssessmentStatus {
return &v
}).(AssessmentStatusPtrOutput)
}
// Specifies the cause of the assessment status.
func (o AssessmentStatusOutput) Cause() pulumi.StringPtrOutput {
return o.ApplyT(func(v AssessmentStatus) *string { return v.Cause }).(pulumi.StringPtrOutput)
}
// Specifies the programmatic code of the assessment status. Possible values are `Healthy`, `Unhealthy` and `NotApplicable`.
func (o AssessmentStatusOutput) Code() pulumi.StringOutput {
return o.ApplyT(func(v AssessmentStatus) string { return v.Code }).(pulumi.StringOutput)
}
// Specifies the human readable description of the assessment status.
func (o AssessmentStatusOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v AssessmentStatus) *string { return v.Description }).(pulumi.StringPtrOutput)
}
type AssessmentStatusPtrOutput struct{ *pulumi.OutputState }
func (AssessmentStatusPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AssessmentStatus)(nil)).Elem()
}
func (o AssessmentStatusPtrOutput) ToAssessmentStatusPtrOutput() AssessmentStatusPtrOutput {
return o
}
func (o AssessmentStatusPtrOutput) ToAssessmentStatusPtrOutputWithContext(ctx context.Context) AssessmentStatusPtrOutput {
return o
}
func (o AssessmentStatusPtrOutput) Elem() AssessmentStatusOutput {
return o.ApplyT(func(v *AssessmentStatus) AssessmentStatus {
if v != nil {
return *v
}
var ret AssessmentStatus
return ret
}).(AssessmentStatusOutput)
}
// Specifies the cause of the assessment status.
func (o AssessmentStatusPtrOutput) Cause() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AssessmentStatus) *string {
if v == nil {
return nil
}
return v.Cause
}).(pulumi.StringPtrOutput)
}
// Specifies the programmatic code of the assessment status. Possible values are `Healthy`, `Unhealthy` and `NotApplicable`.
func (o AssessmentStatusPtrOutput) Code() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AssessmentStatus) *string {
if v == nil {
return nil
}
return &v.Code
}).(pulumi.StringPtrOutput)
}
// Specifies the human readable description of the assessment status.
func (o AssessmentStatusPtrOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AssessmentStatus) *string {
if v == nil {
return nil
}
return v.Description
}).(pulumi.StringPtrOutput)
}
type AutomationAction struct {
// A connection string to send data to the target Event Hub namespace, this should include a key with send permissions.
//
// > **Note:** `connectionString` is required when `type` is `EventHub`.
ConnectionString *string `pulumi:"connectionString"`
// The resource id of the target Logic App, Event Hub namespace or Log Analytics workspace.
ResourceId string `pulumi:"resourceId"`
// The callback URL to trigger the Logic App that will receive and process data sent by this automation. This can be found in the Azure Portal under "See trigger history"
//
// > **Note:** `triggerUrl` is required when `type` is `LogicApp`.
TriggerUrl *string `pulumi:"triggerUrl"`
// Type of Azure resource to send data to. Possible values are `EventHub`, `LogicApp` and `Workspace`.
Type *string `pulumi:"type"`
}
// AutomationActionInput is an input type that accepts AutomationActionArgs and AutomationActionOutput values.
// You can construct a concrete instance of `AutomationActionInput` via:
//
// AutomationActionArgs{...}
type AutomationActionInput interface {
pulumi.Input
ToAutomationActionOutput() AutomationActionOutput
ToAutomationActionOutputWithContext(context.Context) AutomationActionOutput
}
type AutomationActionArgs struct {
// A connection string to send data to the target Event Hub namespace, this should include a key with send permissions.
//
// > **Note:** `connectionString` is required when `type` is `EventHub`.
ConnectionString pulumi.StringPtrInput `pulumi:"connectionString"`
// The resource id of the target Logic App, Event Hub namespace or Log Analytics workspace.
ResourceId pulumi.StringInput `pulumi:"resourceId"`
// The callback URL to trigger the Logic App that will receive and process data sent by this automation. This can be found in the Azure Portal under "See trigger history"
//
// > **Note:** `triggerUrl` is required when `type` is `LogicApp`.
TriggerUrl pulumi.StringPtrInput `pulumi:"triggerUrl"`
// Type of Azure resource to send data to. Possible values are `EventHub`, `LogicApp` and `Workspace`.
Type pulumi.StringPtrInput `pulumi:"type"`
}
func (AutomationActionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AutomationAction)(nil)).Elem()
}
func (i AutomationActionArgs) ToAutomationActionOutput() AutomationActionOutput {
return i.ToAutomationActionOutputWithContext(context.Background())
}
func (i AutomationActionArgs) ToAutomationActionOutputWithContext(ctx context.Context) AutomationActionOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutomationActionOutput)
}
// AutomationActionArrayInput is an input type that accepts AutomationActionArray and AutomationActionArrayOutput values.
// You can construct a concrete instance of `AutomationActionArrayInput` via:
//
// AutomationActionArray{ AutomationActionArgs{...} }
type AutomationActionArrayInput interface {
pulumi.Input
ToAutomationActionArrayOutput() AutomationActionArrayOutput
ToAutomationActionArrayOutputWithContext(context.Context) AutomationActionArrayOutput
}
type AutomationActionArray []AutomationActionInput
func (AutomationActionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]AutomationAction)(nil)).Elem()
}
func (i AutomationActionArray) ToAutomationActionArrayOutput() AutomationActionArrayOutput {
return i.ToAutomationActionArrayOutputWithContext(context.Background())
}
func (i AutomationActionArray) ToAutomationActionArrayOutputWithContext(ctx context.Context) AutomationActionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutomationActionArrayOutput)
}
type AutomationActionOutput struct{ *pulumi.OutputState }
func (AutomationActionOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AutomationAction)(nil)).Elem()
}
func (o AutomationActionOutput) ToAutomationActionOutput() AutomationActionOutput {
return o
}
func (o AutomationActionOutput) ToAutomationActionOutputWithContext(ctx context.Context) AutomationActionOutput {
return o
}
// A connection string to send data to the target Event Hub namespace, this should include a key with send permissions.
//
// > **Note:** `connectionString` is required when `type` is `EventHub`.
func (o AutomationActionOutput) ConnectionString() pulumi.StringPtrOutput {
return o.ApplyT(func(v AutomationAction) *string { return v.ConnectionString }).(pulumi.StringPtrOutput)
}
// The resource id of the target Logic App, Event Hub namespace or Log Analytics workspace.
func (o AutomationActionOutput) ResourceId() pulumi.StringOutput {
return o.ApplyT(func(v AutomationAction) string { return v.ResourceId }).(pulumi.StringOutput)
}
// The callback URL to trigger the Logic App that will receive and process data sent by this automation. This can be found in the Azure Portal under "See trigger history"
//
// > **Note:** `triggerUrl` is required when `type` is `LogicApp`.
func (o AutomationActionOutput) TriggerUrl() pulumi.StringPtrOutput {
return o.ApplyT(func(v AutomationAction) *string { return v.TriggerUrl }).(pulumi.StringPtrOutput)
}
// Type of Azure resource to send data to. Possible values are `EventHub`, `LogicApp` and `Workspace`.
func (o AutomationActionOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v AutomationAction) *string { return v.Type }).(pulumi.StringPtrOutput)
}
type AutomationActionArrayOutput struct{ *pulumi.OutputState }
func (AutomationActionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]AutomationAction)(nil)).Elem()
}
func (o AutomationActionArrayOutput) ToAutomationActionArrayOutput() AutomationActionArrayOutput {
return o
}
func (o AutomationActionArrayOutput) ToAutomationActionArrayOutputWithContext(ctx context.Context) AutomationActionArrayOutput {
return o
}
func (o AutomationActionArrayOutput) Index(i pulumi.IntInput) AutomationActionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) AutomationAction {
return vs[0].([]AutomationAction)[vs[1].(int)]
}).(AutomationActionOutput)
}
type AutomationSource struct {
// Type of data that will trigger this automation. Must be one of `Alerts`, `Assessments`, `AssessmentsSnapshot`, `RegulatoryComplianceAssessment`, `RegulatoryComplianceAssessmentSnapshot`, `SecureScoreControls`, `SecureScoreControlsSnapshot`, `SecureScores`, `SecureScoresSnapshot`, `SubAssessments` or `SubAssessmentsSnapshot`. Note. assessments are also referred to as recommendations
EventSource string `pulumi:"eventSource"`
// A set of rules which evaluate upon event and data interception. This is defined in one or more `ruleSet` blocks as defined below.
//
// > **Note:** When multiple `ruleSet` block are provided, a logical 'OR' is applied to the evaluation of them.
RuleSets []AutomationSourceRuleSet `pulumi:"ruleSets"`
}
// AutomationSourceInput is an input type that accepts AutomationSourceArgs and AutomationSourceOutput values.
// You can construct a concrete instance of `AutomationSourceInput` via:
//
// AutomationSourceArgs{...}
type AutomationSourceInput interface {
pulumi.Input
ToAutomationSourceOutput() AutomationSourceOutput
ToAutomationSourceOutputWithContext(context.Context) AutomationSourceOutput
}
type AutomationSourceArgs struct {
// Type of data that will trigger this automation. Must be one of `Alerts`, `Assessments`, `AssessmentsSnapshot`, `RegulatoryComplianceAssessment`, `RegulatoryComplianceAssessmentSnapshot`, `SecureScoreControls`, `SecureScoreControlsSnapshot`, `SecureScores`, `SecureScoresSnapshot`, `SubAssessments` or `SubAssessmentsSnapshot`. Note. assessments are also referred to as recommendations
EventSource pulumi.StringInput `pulumi:"eventSource"`
// A set of rules which evaluate upon event and data interception. This is defined in one or more `ruleSet` blocks as defined below.
//
// > **Note:** When multiple `ruleSet` block are provided, a logical 'OR' is applied to the evaluation of them.
RuleSets AutomationSourceRuleSetArrayInput `pulumi:"ruleSets"`
}
func (AutomationSourceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AutomationSource)(nil)).Elem()
}
func (i AutomationSourceArgs) ToAutomationSourceOutput() AutomationSourceOutput {
return i.ToAutomationSourceOutputWithContext(context.Background())
}
func (i AutomationSourceArgs) ToAutomationSourceOutputWithContext(ctx context.Context) AutomationSourceOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutomationSourceOutput)
}
// AutomationSourceArrayInput is an input type that accepts AutomationSourceArray and AutomationSourceArrayOutput values.
// You can construct a concrete instance of `AutomationSourceArrayInput` via:
//
// AutomationSourceArray{ AutomationSourceArgs{...} }
type AutomationSourceArrayInput interface {
pulumi.Input
ToAutomationSourceArrayOutput() AutomationSourceArrayOutput
ToAutomationSourceArrayOutputWithContext(context.Context) AutomationSourceArrayOutput
}
type AutomationSourceArray []AutomationSourceInput
func (AutomationSourceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]AutomationSource)(nil)).Elem()
}
func (i AutomationSourceArray) ToAutomationSourceArrayOutput() AutomationSourceArrayOutput {
return i.ToAutomationSourceArrayOutputWithContext(context.Background())
}
func (i AutomationSourceArray) ToAutomationSourceArrayOutputWithContext(ctx context.Context) AutomationSourceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutomationSourceArrayOutput)
}
type AutomationSourceOutput struct{ *pulumi.OutputState }
func (AutomationSourceOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AutomationSource)(nil)).Elem()
}
func (o AutomationSourceOutput) ToAutomationSourceOutput() AutomationSourceOutput {
return o
}
func (o AutomationSourceOutput) ToAutomationSourceOutputWithContext(ctx context.Context) AutomationSourceOutput {
return o
}
// Type of data that will trigger this automation. Must be one of `Alerts`, `Assessments`, `AssessmentsSnapshot`, `RegulatoryComplianceAssessment`, `RegulatoryComplianceAssessmentSnapshot`, `SecureScoreControls`, `SecureScoreControlsSnapshot`, `SecureScores`, `SecureScoresSnapshot`, `SubAssessments` or `SubAssessmentsSnapshot`. Note. assessments are also referred to as recommendations
func (o AutomationSourceOutput) EventSource() pulumi.StringOutput {
return o.ApplyT(func(v AutomationSource) string { return v.EventSource }).(pulumi.StringOutput)
}
// A set of rules which evaluate upon event and data interception. This is defined in one or more `ruleSet` blocks as defined below.
//
// > **Note:** When multiple `ruleSet` block are provided, a logical 'OR' is applied to the evaluation of them.
func (o AutomationSourceOutput) RuleSets() AutomationSourceRuleSetArrayOutput {
return o.ApplyT(func(v AutomationSource) []AutomationSourceRuleSet { return v.RuleSets }).(AutomationSourceRuleSetArrayOutput)
}
type AutomationSourceArrayOutput struct{ *pulumi.OutputState }
func (AutomationSourceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]AutomationSource)(nil)).Elem()
}
func (o AutomationSourceArrayOutput) ToAutomationSourceArrayOutput() AutomationSourceArrayOutput {
return o
}
func (o AutomationSourceArrayOutput) ToAutomationSourceArrayOutputWithContext(ctx context.Context) AutomationSourceArrayOutput {
return o
}
func (o AutomationSourceArrayOutput) Index(i pulumi.IntInput) AutomationSourceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) AutomationSource {
return vs[0].([]AutomationSource)[vs[1].(int)]
}).(AutomationSourceOutput)
}
type AutomationSourceRuleSet struct {
// One or more `rule` blocks as defined below.
//
// > **Note:** This automation will trigger when all of the `rule`s in this `ruleSet` are evaluated as 'true'. This is equivalent to a logical 'AND'.
Rules []AutomationSourceRuleSetRule `pulumi:"rules"`
}
// AutomationSourceRuleSetInput is an input type that accepts AutomationSourceRuleSetArgs and AutomationSourceRuleSetOutput values.
// You can construct a concrete instance of `AutomationSourceRuleSetInput` via:
//
// AutomationSourceRuleSetArgs{...}
type AutomationSourceRuleSetInput interface {
pulumi.Input
ToAutomationSourceRuleSetOutput() AutomationSourceRuleSetOutput
ToAutomationSourceRuleSetOutputWithContext(context.Context) AutomationSourceRuleSetOutput
}
type AutomationSourceRuleSetArgs struct {
// One or more `rule` blocks as defined below.
//
// > **Note:** This automation will trigger when all of the `rule`s in this `ruleSet` are evaluated as 'true'. This is equivalent to a logical 'AND'.
Rules AutomationSourceRuleSetRuleArrayInput `pulumi:"rules"`
}
func (AutomationSourceRuleSetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AutomationSourceRuleSet)(nil)).Elem()
}
func (i AutomationSourceRuleSetArgs) ToAutomationSourceRuleSetOutput() AutomationSourceRuleSetOutput {
return i.ToAutomationSourceRuleSetOutputWithContext(context.Background())
}
func (i AutomationSourceRuleSetArgs) ToAutomationSourceRuleSetOutputWithContext(ctx context.Context) AutomationSourceRuleSetOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutomationSourceRuleSetOutput)
}
// AutomationSourceRuleSetArrayInput is an input type that accepts AutomationSourceRuleSetArray and AutomationSourceRuleSetArrayOutput values.
// You can construct a concrete instance of `AutomationSourceRuleSetArrayInput` via:
//
// AutomationSourceRuleSetArray{ AutomationSourceRuleSetArgs{...} }
type AutomationSourceRuleSetArrayInput interface {
pulumi.Input
ToAutomationSourceRuleSetArrayOutput() AutomationSourceRuleSetArrayOutput
ToAutomationSourceRuleSetArrayOutputWithContext(context.Context) AutomationSourceRuleSetArrayOutput
}
type AutomationSourceRuleSetArray []AutomationSourceRuleSetInput
func (AutomationSourceRuleSetArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]AutomationSourceRuleSet)(nil)).Elem()
}
func (i AutomationSourceRuleSetArray) ToAutomationSourceRuleSetArrayOutput() AutomationSourceRuleSetArrayOutput {
return i.ToAutomationSourceRuleSetArrayOutputWithContext(context.Background())
}
func (i AutomationSourceRuleSetArray) ToAutomationSourceRuleSetArrayOutputWithContext(ctx context.Context) AutomationSourceRuleSetArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutomationSourceRuleSetArrayOutput)
}
type AutomationSourceRuleSetOutput struct{ *pulumi.OutputState }
func (AutomationSourceRuleSetOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AutomationSourceRuleSet)(nil)).Elem()
}
func (o AutomationSourceRuleSetOutput) ToAutomationSourceRuleSetOutput() AutomationSourceRuleSetOutput {
return o
}
func (o AutomationSourceRuleSetOutput) ToAutomationSourceRuleSetOutputWithContext(ctx context.Context) AutomationSourceRuleSetOutput {
return o
}
// One or more `rule` blocks as defined below.
//
// > **Note:** This automation will trigger when all of the `rule`s in this `ruleSet` are evaluated as 'true'. This is equivalent to a logical 'AND'.
func (o AutomationSourceRuleSetOutput) Rules() AutomationSourceRuleSetRuleArrayOutput {
return o.ApplyT(func(v AutomationSourceRuleSet) []AutomationSourceRuleSetRule { return v.Rules }).(AutomationSourceRuleSetRuleArrayOutput)
}
type AutomationSourceRuleSetArrayOutput struct{ *pulumi.OutputState }
func (AutomationSourceRuleSetArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]AutomationSourceRuleSet)(nil)).Elem()
}
func (o AutomationSourceRuleSetArrayOutput) ToAutomationSourceRuleSetArrayOutput() AutomationSourceRuleSetArrayOutput {
return o
}
func (o AutomationSourceRuleSetArrayOutput) ToAutomationSourceRuleSetArrayOutputWithContext(ctx context.Context) AutomationSourceRuleSetArrayOutput {
return o
}
func (o AutomationSourceRuleSetArrayOutput) Index(i pulumi.IntInput) AutomationSourceRuleSetOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) AutomationSourceRuleSet {
return vs[0].([]AutomationSourceRuleSet)[vs[1].(int)]
}).(AutomationSourceRuleSetOutput)
}
type AutomationSourceRuleSetRule struct {
// A value that will be compared with the value in `propertyPath`.
ExpectedValue string `pulumi:"expectedValue"`
// The comparison operator to use, must be one of: `Contains`, `EndsWith`, `Equals`, `GreaterThan`, `GreaterThanOrEqualTo`, `LesserThan`, `LesserThanOrEqualTo`, `NotEquals`, `StartsWith`
Operator string `pulumi:"operator"`
// The JPath of the entity model property that should be checked.
PropertyPath string `pulumi:"propertyPath"`
// The data type of the compared operands, must be one of: `Integer`, `String`, `Boolean` or `Number`.
//
// > **Note:** The schema for Security Center alerts (when `eventSource` is "Alerts") [can be found here](https://docs.microsoft.com/azure/security-center/alerts-schemas?tabs=schema-continuousexport)
PropertyType string `pulumi:"propertyType"`
}
// AutomationSourceRuleSetRuleInput is an input type that accepts AutomationSourceRuleSetRuleArgs and AutomationSourceRuleSetRuleOutput values.
// You can construct a concrete instance of `AutomationSourceRuleSetRuleInput` via:
//
// AutomationSourceRuleSetRuleArgs{...}
type AutomationSourceRuleSetRuleInput interface {
pulumi.Input
ToAutomationSourceRuleSetRuleOutput() AutomationSourceRuleSetRuleOutput
ToAutomationSourceRuleSetRuleOutputWithContext(context.Context) AutomationSourceRuleSetRuleOutput
}
type AutomationSourceRuleSetRuleArgs struct {
// A value that will be compared with the value in `propertyPath`.
ExpectedValue pulumi.StringInput `pulumi:"expectedValue"`
// The comparison operator to use, must be one of: `Contains`, `EndsWith`, `Equals`, `GreaterThan`, `GreaterThanOrEqualTo`, `LesserThan`, `LesserThanOrEqualTo`, `NotEquals`, `StartsWith`
Operator pulumi.StringInput `pulumi:"operator"`
// The JPath of the entity model property that should be checked.
PropertyPath pulumi.StringInput `pulumi:"propertyPath"`
// The data type of the compared operands, must be one of: `Integer`, `String`, `Boolean` or `Number`.
//
// > **Note:** The schema for Security Center alerts (when `eventSource` is "Alerts") [can be found here](https://docs.microsoft.com/azure/security-center/alerts-schemas?tabs=schema-continuousexport)
PropertyType pulumi.StringInput `pulumi:"propertyType"`
}
func (AutomationSourceRuleSetRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AutomationSourceRuleSetRule)(nil)).Elem()
}
func (i AutomationSourceRuleSetRuleArgs) ToAutomationSourceRuleSetRuleOutput() AutomationSourceRuleSetRuleOutput {
return i.ToAutomationSourceRuleSetRuleOutputWithContext(context.Background())
}
func (i AutomationSourceRuleSetRuleArgs) ToAutomationSourceRuleSetRuleOutputWithContext(ctx context.Context) AutomationSourceRuleSetRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutomationSourceRuleSetRuleOutput)
}
// AutomationSourceRuleSetRuleArrayInput is an input type that accepts AutomationSourceRuleSetRuleArray and AutomationSourceRuleSetRuleArrayOutput values.
// You can construct a concrete instance of `AutomationSourceRuleSetRuleArrayInput` via:
//
// AutomationSourceRuleSetRuleArray{ AutomationSourceRuleSetRuleArgs{...} }
type AutomationSourceRuleSetRuleArrayInput interface {
pulumi.Input
ToAutomationSourceRuleSetRuleArrayOutput() AutomationSourceRuleSetRuleArrayOutput
ToAutomationSourceRuleSetRuleArrayOutputWithContext(context.Context) AutomationSourceRuleSetRuleArrayOutput
}
type AutomationSourceRuleSetRuleArray []AutomationSourceRuleSetRuleInput
func (AutomationSourceRuleSetRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]AutomationSourceRuleSetRule)(nil)).Elem()
}
func (i AutomationSourceRuleSetRuleArray) ToAutomationSourceRuleSetRuleArrayOutput() AutomationSourceRuleSetRuleArrayOutput {
return i.ToAutomationSourceRuleSetRuleArrayOutputWithContext(context.Background())
}
func (i AutomationSourceRuleSetRuleArray) ToAutomationSourceRuleSetRuleArrayOutputWithContext(ctx context.Context) AutomationSourceRuleSetRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutomationSourceRuleSetRuleArrayOutput)
}
type AutomationSourceRuleSetRuleOutput struct{ *pulumi.OutputState }
func (AutomationSourceRuleSetRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AutomationSourceRuleSetRule)(nil)).Elem()
}
func (o AutomationSourceRuleSetRuleOutput) ToAutomationSourceRuleSetRuleOutput() AutomationSourceRuleSetRuleOutput {
return o
}
func (o AutomationSourceRuleSetRuleOutput) ToAutomationSourceRuleSetRuleOutputWithContext(ctx context.Context) AutomationSourceRuleSetRuleOutput {
return o
}
// A value that will be compared with the value in `propertyPath`.
func (o AutomationSourceRuleSetRuleOutput) ExpectedValue() pulumi.StringOutput {
return o.ApplyT(func(v AutomationSourceRuleSetRule) string { return v.ExpectedValue }).(pulumi.StringOutput)
}
// The comparison operator to use, must be one of: `Contains`, `EndsWith`, `Equals`, `GreaterThan`, `GreaterThanOrEqualTo`, `LesserThan`, `LesserThanOrEqualTo`, `NotEquals`, `StartsWith`
func (o AutomationSourceRuleSetRuleOutput) Operator() pulumi.StringOutput {
return o.ApplyT(func(v AutomationSourceRuleSetRule) string { return v.Operator }).(pulumi.StringOutput)
}
// The JPath of the entity model property that should be checked.
func (o AutomationSourceRuleSetRuleOutput) PropertyPath() pulumi.StringOutput {
return o.ApplyT(func(v AutomationSourceRuleSetRule) string { return v.PropertyPath }).(pulumi.StringOutput)
}
// The data type of the compared operands, must be one of: `Integer`, `String`, `Boolean` or `Number`.
//
// > **Note:** The schema for Security Center alerts (when `eventSource` is "Alerts") [can be found here](https://docs.microsoft.com/azure/security-center/alerts-schemas?tabs=schema-continuousexport)
func (o AutomationSourceRuleSetRuleOutput) PropertyType() pulumi.StringOutput {
return o.ApplyT(func(v AutomationSourceRuleSetRule) string { return v.PropertyType }).(pulumi.StringOutput)
}
type AutomationSourceRuleSetRuleArrayOutput struct{ *pulumi.OutputState }
func (AutomationSourceRuleSetRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]AutomationSourceRuleSetRule)(nil)).Elem()
}
func (o AutomationSourceRuleSetRuleArrayOutput) ToAutomationSourceRuleSetRuleArrayOutput() AutomationSourceRuleSetRuleArrayOutput {
return o
}
func (o AutomationSourceRuleSetRuleArrayOutput) ToAutomationSourceRuleSetRuleArrayOutputWithContext(ctx context.Context) AutomationSourceRuleSetRuleArrayOutput {
return o
}
func (o AutomationSourceRuleSetRuleArrayOutput) Index(i pulumi.IntInput) AutomationSourceRuleSetRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) AutomationSourceRuleSetRule {
return vs[0].([]AutomationSourceRuleSetRule)[vs[1].(int)]
}).(AutomationSourceRuleSetRuleOutput)
}
type SubscriptionPricingExtension struct {
// Key/Value pairs that are required for some extensions.
//
// > **Note:** If an extension is not defined, it will not be enabled.
//
// > **Note:** Changing the pricing tier to `Standard` affects all resources of the given type in the subscription and could be quite costly.
AdditionalExtensionProperties map[string]string `pulumi:"additionalExtensionProperties"`
// The name of extension.
Name string `pulumi:"name"`
}
// SubscriptionPricingExtensionInput is an input type that accepts SubscriptionPricingExtensionArgs and SubscriptionPricingExtensionOutput values.
// You can construct a concrete instance of `SubscriptionPricingExtensionInput` via:
//
// SubscriptionPricingExtensionArgs{...}
type SubscriptionPricingExtensionInput interface {
pulumi.Input
ToSubscriptionPricingExtensionOutput() SubscriptionPricingExtensionOutput
ToSubscriptionPricingExtensionOutputWithContext(context.Context) SubscriptionPricingExtensionOutput
}
type SubscriptionPricingExtensionArgs struct {
// Key/Value pairs that are required for some extensions.
//
// > **Note:** If an extension is not defined, it will not be enabled.
//
// > **Note:** Changing the pricing tier to `Standard` affects all resources of the given type in the subscription and could be quite costly.
AdditionalExtensionProperties pulumi.StringMapInput `pulumi:"additionalExtensionProperties"`
// The name of extension.
Name pulumi.StringInput `pulumi:"name"`
}
func (SubscriptionPricingExtensionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*SubscriptionPricingExtension)(nil)).Elem()
}
func (i SubscriptionPricingExtensionArgs) ToSubscriptionPricingExtensionOutput() SubscriptionPricingExtensionOutput {
return i.ToSubscriptionPricingExtensionOutputWithContext(context.Background())
}
func (i SubscriptionPricingExtensionArgs) ToSubscriptionPricingExtensionOutputWithContext(ctx context.Context) SubscriptionPricingExtensionOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionPricingExtensionOutput)
}
// SubscriptionPricingExtensionArrayInput is an input type that accepts SubscriptionPricingExtensionArray and SubscriptionPricingExtensionArrayOutput values.
// You can construct a concrete instance of `SubscriptionPricingExtensionArrayInput` via:
//
// SubscriptionPricingExtensionArray{ SubscriptionPricingExtensionArgs{...} }
type SubscriptionPricingExtensionArrayInput interface {
pulumi.Input
ToSubscriptionPricingExtensionArrayOutput() SubscriptionPricingExtensionArrayOutput
ToSubscriptionPricingExtensionArrayOutputWithContext(context.Context) SubscriptionPricingExtensionArrayOutput
}
type SubscriptionPricingExtensionArray []SubscriptionPricingExtensionInput
func (SubscriptionPricingExtensionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]SubscriptionPricingExtension)(nil)).Elem()
}
func (i SubscriptionPricingExtensionArray) ToSubscriptionPricingExtensionArrayOutput() SubscriptionPricingExtensionArrayOutput {
return i.ToSubscriptionPricingExtensionArrayOutputWithContext(context.Background())
}
func (i SubscriptionPricingExtensionArray) ToSubscriptionPricingExtensionArrayOutputWithContext(ctx context.Context) SubscriptionPricingExtensionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionPricingExtensionArrayOutput)
}
| 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/securitycenter/automation.go | sdk/go/azure/securitycenter/automation.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package securitycenter
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages Security Center Automation and Continuous Export. This resource supports three types of destination in the `action`, Logic Apps, Log Analytics and Event Hubs
//
// ## 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/eventhub"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/securitycenter"
// "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
// }
// exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("example-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Capacity: pulumi.Int(2),
// })
// if err != nil {
// return err
// }
// exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
// Name: pulumi.String("acceptanceTestEventHub"),
// NamespaceName: exampleEventHubNamespace.Name,
// ResourceGroupName: example.Name,
// PartitionCount: pulumi.Int(2),
// MessageRetention: pulumi.Int(2),
// })
// if err != nil {
// return err
// }
// exampleAuthorizationRule, err := eventhub.NewAuthorizationRule(ctx, "example", &eventhub.AuthorizationRuleArgs{
// Name: pulumi.String("example-rule"),
// NamespaceName: exampleEventHubNamespace.Name,
// EventhubName: exampleEventHub.Name,
// ResourceGroupName: example.Name,
// Listen: pulumi.Bool(true),
// Send: pulumi.Bool(false),
// Manage: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// _, err = securitycenter.NewAutomation(ctx, "example", &securitycenter.AutomationArgs{
// Name: pulumi.String("example-automation"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Actions: securitycenter.AutomationActionArray{
// &securitycenter.AutomationActionArgs{
// Type: pulumi.String("EventHub"),
// ResourceId: exampleEventHub.ID(),
// ConnectionString: exampleAuthorizationRule.PrimaryConnectionString,
// },
// },
// Sources: securitycenter.AutomationSourceArray{
// &securitycenter.AutomationSourceArgs{
// EventSource: pulumi.String("Alerts"),
// RuleSets: securitycenter.AutomationSourceRuleSetArray{
// &securitycenter.AutomationSourceRuleSetArgs{
// Rules: securitycenter.AutomationSourceRuleSetRuleArray{
// &securitycenter.AutomationSourceRuleSetRuleArgs{
// PropertyPath: pulumi.String("properties.metadata.severity"),
// Operator: pulumi.String("Equals"),
// ExpectedValue: pulumi.String("High"),
// PropertyType: pulumi.String("String"),
// },
// },
// },
// },
// },
// },
// Scopes: pulumi.StringArray{
// pulumi.Sprintf("/subscriptions/%v", current.SubscriptionId),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Security` - 2019-01-01-preview
//
// ## Import
//
// Security Center Automations can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:securitycenter/automation:Automation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Security/automations/automation1
// ```
type Automation struct {
pulumi.CustomResourceState
// One or more `action` blocks as defined below. An `action` tells this automation where the data is to be sent to upon being evaluated by the rules in the `source`.
Actions AutomationActionArrayOutput `pulumi:"actions"`
// Specifies the description for the Security Center Automation.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Boolean to enable or disable this Security Center Automation. Defaults to `true`.
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
// The Azure Region where the Security Center Automation should exist. Changing this forces a new Security Center Automation to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Security Center Automation. Changing this forces a new Security Center Automation to be created.
//
// > **Note:** For the automation to appear in Azure Portal correctly under Microsoft Defender for Cloud > Environment Settings > Account > Continuous Export, either `ExportToWorkspace` or `ExportToEventHub` must be used.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Security Center Automation should exist. Changing this forces a new Security Center Automation to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A list of scopes on which the automation logic is applied, at least one is required. Supported scopes are a subscription (in this format `/subscriptions/00000000-0000-0000-0000-000000000000`) or a resource group under that subscription (in the format `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example`). The automation will only apply on defined scopes.
Scopes pulumi.StringArrayOutput `pulumi:"scopes"`
// One or more `source` blocks as defined below. A `source` defines what data types will be processed and a set of rules to filter that data.
Sources AutomationSourceArrayOutput `pulumi:"sources"`
// A mapping of tags assigned to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewAutomation registers a new resource with the given unique name, arguments, and options.
func NewAutomation(ctx *pulumi.Context,
name string, args *AutomationArgs, opts ...pulumi.ResourceOption) (*Automation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Actions == nil {
return nil, errors.New("invalid value for required argument 'Actions'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Scopes == nil {
return nil, errors.New("invalid value for required argument 'Scopes'")
}
if args.Sources == nil {
return nil, errors.New("invalid value for required argument 'Sources'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Automation
err := ctx.RegisterResource("azure:securitycenter/automation:Automation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAutomation gets an existing Automation 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 GetAutomation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AutomationState, opts ...pulumi.ResourceOption) (*Automation, error) {
var resource Automation
err := ctx.ReadResource("azure:securitycenter/automation:Automation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Automation resources.
type automationState struct {
// One or more `action` blocks as defined below. An `action` tells this automation where the data is to be sent to upon being evaluated by the rules in the `source`.
Actions []AutomationAction `pulumi:"actions"`
// Specifies the description for the Security Center Automation.
Description *string `pulumi:"description"`
// Boolean to enable or disable this Security Center Automation. Defaults to `true`.
Enabled *bool `pulumi:"enabled"`
// The Azure Region where the Security Center Automation should exist. Changing this forces a new Security Center Automation to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Security Center Automation. Changing this forces a new Security Center Automation to be created.
//
// > **Note:** For the automation to appear in Azure Portal correctly under Microsoft Defender for Cloud > Environment Settings > Account > Continuous Export, either `ExportToWorkspace` or `ExportToEventHub` must be used.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Security Center Automation should exist. Changing this forces a new Security Center Automation to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A list of scopes on which the automation logic is applied, at least one is required. Supported scopes are a subscription (in this format `/subscriptions/00000000-0000-0000-0000-000000000000`) or a resource group under that subscription (in the format `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example`). The automation will only apply on defined scopes.
Scopes []string `pulumi:"scopes"`
// One or more `source` blocks as defined below. A `source` defines what data types will be processed and a set of rules to filter that data.
Sources []AutomationSource `pulumi:"sources"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
}
type AutomationState struct {
// One or more `action` blocks as defined below. An `action` tells this automation where the data is to be sent to upon being evaluated by the rules in the `source`.
Actions AutomationActionArrayInput
// Specifies the description for the Security Center Automation.
Description pulumi.StringPtrInput
// Boolean to enable or disable this Security Center Automation. Defaults to `true`.
Enabled pulumi.BoolPtrInput
// The Azure Region where the Security Center Automation should exist. Changing this forces a new Security Center Automation to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Security Center Automation. Changing this forces a new Security Center Automation to be created.
//
// > **Note:** For the automation to appear in Azure Portal correctly under Microsoft Defender for Cloud > Environment Settings > Account > Continuous Export, either `ExportToWorkspace` or `ExportToEventHub` must be used.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Security Center Automation should exist. Changing this forces a new Security Center Automation to be created.
ResourceGroupName pulumi.StringPtrInput
// A list of scopes on which the automation logic is applied, at least one is required. Supported scopes are a subscription (in this format `/subscriptions/00000000-0000-0000-0000-000000000000`) or a resource group under that subscription (in the format `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example`). The automation will only apply on defined scopes.
Scopes pulumi.StringArrayInput
// One or more `source` blocks as defined below. A `source` defines what data types will be processed and a set of rules to filter that data.
Sources AutomationSourceArrayInput
// A mapping of tags assigned to the resource.
Tags pulumi.StringMapInput
}
func (AutomationState) ElementType() reflect.Type {
return reflect.TypeOf((*automationState)(nil)).Elem()
}
type automationArgs struct {
// One or more `action` blocks as defined below. An `action` tells this automation where the data is to be sent to upon being evaluated by the rules in the `source`.
Actions []AutomationAction `pulumi:"actions"`
// Specifies the description for the Security Center Automation.
Description *string `pulumi:"description"`
// Boolean to enable or disable this Security Center Automation. Defaults to `true`.
Enabled *bool `pulumi:"enabled"`
// The Azure Region where the Security Center Automation should exist. Changing this forces a new Security Center Automation to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Security Center Automation. Changing this forces a new Security Center Automation to be created.
//
// > **Note:** For the automation to appear in Azure Portal correctly under Microsoft Defender for Cloud > Environment Settings > Account > Continuous Export, either `ExportToWorkspace` or `ExportToEventHub` must be used.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Security Center Automation should exist. Changing this forces a new Security Center Automation to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A list of scopes on which the automation logic is applied, at least one is required. Supported scopes are a subscription (in this format `/subscriptions/00000000-0000-0000-0000-000000000000`) or a resource group under that subscription (in the format `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example`). The automation will only apply on defined scopes.
Scopes []string `pulumi:"scopes"`
// One or more `source` blocks as defined below. A `source` defines what data types will be processed and a set of rules to filter that data.
Sources []AutomationSource `pulumi:"sources"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Automation resource.
type AutomationArgs struct {
// One or more `action` blocks as defined below. An `action` tells this automation where the data is to be sent to upon being evaluated by the rules in the `source`.
Actions AutomationActionArrayInput
// Specifies the description for the Security Center Automation.
Description pulumi.StringPtrInput
// Boolean to enable or disable this Security Center Automation. Defaults to `true`.
Enabled pulumi.BoolPtrInput
// The Azure Region where the Security Center Automation should exist. Changing this forces a new Security Center Automation to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Security Center Automation. Changing this forces a new Security Center Automation to be created.
//
// > **Note:** For the automation to appear in Azure Portal correctly under Microsoft Defender for Cloud > Environment Settings > Account > Continuous Export, either `ExportToWorkspace` or `ExportToEventHub` must be used.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Security Center Automation should exist. Changing this forces a new Security Center Automation to be created.
ResourceGroupName pulumi.StringInput
// A list of scopes on which the automation logic is applied, at least one is required. Supported scopes are a subscription (in this format `/subscriptions/00000000-0000-0000-0000-000000000000`) or a resource group under that subscription (in the format `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example`). The automation will only apply on defined scopes.
Scopes pulumi.StringArrayInput
// One or more `source` blocks as defined below. A `source` defines what data types will be processed and a set of rules to filter that data.
Sources AutomationSourceArrayInput
// A mapping of tags assigned to the resource.
Tags pulumi.StringMapInput
}
func (AutomationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*automationArgs)(nil)).Elem()
}
type AutomationInput interface {
pulumi.Input
ToAutomationOutput() AutomationOutput
ToAutomationOutputWithContext(ctx context.Context) AutomationOutput
}
func (*Automation) ElementType() reflect.Type {
return reflect.TypeOf((**Automation)(nil)).Elem()
}
func (i *Automation) ToAutomationOutput() AutomationOutput {
return i.ToAutomationOutputWithContext(context.Background())
}
func (i *Automation) ToAutomationOutputWithContext(ctx context.Context) AutomationOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutomationOutput)
}
// AutomationArrayInput is an input type that accepts AutomationArray and AutomationArrayOutput values.
// You can construct a concrete instance of `AutomationArrayInput` via:
//
// AutomationArray{ AutomationArgs{...} }
type AutomationArrayInput interface {
pulumi.Input
ToAutomationArrayOutput() AutomationArrayOutput
ToAutomationArrayOutputWithContext(context.Context) AutomationArrayOutput
}
type AutomationArray []AutomationInput
func (AutomationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Automation)(nil)).Elem()
}
func (i AutomationArray) ToAutomationArrayOutput() AutomationArrayOutput {
return i.ToAutomationArrayOutputWithContext(context.Background())
}
func (i AutomationArray) ToAutomationArrayOutputWithContext(ctx context.Context) AutomationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutomationArrayOutput)
}
// AutomationMapInput is an input type that accepts AutomationMap and AutomationMapOutput values.
// You can construct a concrete instance of `AutomationMapInput` via:
//
// AutomationMap{ "key": AutomationArgs{...} }
type AutomationMapInput interface {
pulumi.Input
ToAutomationMapOutput() AutomationMapOutput
ToAutomationMapOutputWithContext(context.Context) AutomationMapOutput
}
type AutomationMap map[string]AutomationInput
func (AutomationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Automation)(nil)).Elem()
}
func (i AutomationMap) ToAutomationMapOutput() AutomationMapOutput {
return i.ToAutomationMapOutputWithContext(context.Background())
}
func (i AutomationMap) ToAutomationMapOutputWithContext(ctx context.Context) AutomationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AutomationMapOutput)
}
type AutomationOutput struct{ *pulumi.OutputState }
func (AutomationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Automation)(nil)).Elem()
}
func (o AutomationOutput) ToAutomationOutput() AutomationOutput {
return o
}
func (o AutomationOutput) ToAutomationOutputWithContext(ctx context.Context) AutomationOutput {
return o
}
// One or more `action` blocks as defined below. An `action` tells this automation where the data is to be sent to upon being evaluated by the rules in the `source`.
func (o AutomationOutput) Actions() AutomationActionArrayOutput {
return o.ApplyT(func(v *Automation) AutomationActionArrayOutput { return v.Actions }).(AutomationActionArrayOutput)
}
// Specifies the description for the Security Center Automation.
func (o AutomationOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Automation) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Boolean to enable or disable this Security Center Automation. Defaults to `true`.
func (o AutomationOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Automation) pulumi.BoolPtrOutput { return v.Enabled }).(pulumi.BoolPtrOutput)
}
// The Azure Region where the Security Center Automation should exist. Changing this forces a new Security Center Automation to be created.
func (o AutomationOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Automation) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Security Center Automation. Changing this forces a new Security Center Automation to be created.
//
// > **Note:** For the automation to appear in Azure Portal correctly under Microsoft Defender for Cloud > Environment Settings > Account > Continuous Export, either `ExportToWorkspace` or `ExportToEventHub` must be used.
func (o AutomationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Automation) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Security Center Automation should exist. Changing this forces a new Security Center Automation to be created.
func (o AutomationOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Automation) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A list of scopes on which the automation logic is applied, at least one is required. Supported scopes are a subscription (in this format `/subscriptions/00000000-0000-0000-0000-000000000000`) or a resource group under that subscription (in the format `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example`). The automation will only apply on defined scopes.
func (o AutomationOutput) Scopes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Automation) pulumi.StringArrayOutput { return v.Scopes }).(pulumi.StringArrayOutput)
}
// One or more `source` blocks as defined below. A `source` defines what data types will be processed and a set of rules to filter that data.
func (o AutomationOutput) Sources() AutomationSourceArrayOutput {
return o.ApplyT(func(v *Automation) AutomationSourceArrayOutput { return v.Sources }).(AutomationSourceArrayOutput)
}
// A mapping of tags assigned to the resource.
func (o AutomationOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Automation) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type AutomationArrayOutput struct{ *pulumi.OutputState }
func (AutomationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Automation)(nil)).Elem()
}
func (o AutomationArrayOutput) ToAutomationArrayOutput() AutomationArrayOutput {
return o
}
func (o AutomationArrayOutput) ToAutomationArrayOutputWithContext(ctx context.Context) AutomationArrayOutput {
return o
}
func (o AutomationArrayOutput) Index(i pulumi.IntInput) AutomationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Automation {
return vs[0].([]*Automation)[vs[1].(int)]
}).(AutomationOutput)
}
type AutomationMapOutput struct{ *pulumi.OutputState }
func (AutomationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Automation)(nil)).Elem()
}
func (o AutomationMapOutput) ToAutomationMapOutput() AutomationMapOutput {
return o
}
func (o AutomationMapOutput) ToAutomationMapOutputWithContext(ctx context.Context) AutomationMapOutput {
return o
}
func (o AutomationMapOutput) MapIndex(k pulumi.StringInput) AutomationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Automation {
return vs[0].(map[string]*Automation)[vs[1].(string)]
}).(AutomationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AutomationInput)(nil)).Elem(), &Automation{})
pulumi.RegisterInputType(reflect.TypeOf((*AutomationArrayInput)(nil)).Elem(), AutomationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AutomationMapInput)(nil)).Elem(), AutomationMap{})
pulumi.RegisterOutputType(AutomationOutput{})
pulumi.RegisterOutputType(AutomationArrayOutput{})
pulumi.RegisterOutputType(AutomationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/securitycenter/contact.go | sdk/go/azure/securitycenter/contact.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package securitycenter
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the subscription's Security Center Contact.
//
// > **Note:** Owner access permission is required.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/securitycenter"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := securitycenter.NewContact(ctx, "example", &securitycenter.ContactArgs{
// Name: pulumi.String("contact"),
// Email: pulumi.String("contact@example.com"),
// Phone: pulumi.String("+1-555-555-5555"),
// AlertNotifications: pulumi.Bool(true),
// AlertsToAdmins: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Security Center Contacts can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:securitycenter/contact:Contact example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/securityContacts/default1
// ```
type Contact struct {
pulumi.CustomResourceState
// Whether to send security alerts notifications to the security contact.
AlertNotifications pulumi.BoolOutput `pulumi:"alertNotifications"`
// Whether to send security alerts notifications to subscription admins.
AlertsToAdmins pulumi.BoolOutput `pulumi:"alertsToAdmins"`
// The email of the Security Center Contact.
Email pulumi.StringOutput `pulumi:"email"`
// The name of the Security Center Contact. Changing this forces a new Security Center Contact to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The phone number of the Security Center Contact.
Phone pulumi.StringPtrOutput `pulumi:"phone"`
}
// NewContact registers a new resource with the given unique name, arguments, and options.
func NewContact(ctx *pulumi.Context,
name string, args *ContactArgs, opts ...pulumi.ResourceOption) (*Contact, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AlertNotifications == nil {
return nil, errors.New("invalid value for required argument 'AlertNotifications'")
}
if args.AlertsToAdmins == nil {
return nil, errors.New("invalid value for required argument 'AlertsToAdmins'")
}
if args.Email == nil {
return nil, errors.New("invalid value for required argument 'Email'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Contact
err := ctx.RegisterResource("azure:securitycenter/contact:Contact", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetContact gets an existing Contact 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 GetContact(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ContactState, opts ...pulumi.ResourceOption) (*Contact, error) {
var resource Contact
err := ctx.ReadResource("azure:securitycenter/contact:Contact", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Contact resources.
type contactState struct {
// Whether to send security alerts notifications to the security contact.
AlertNotifications *bool `pulumi:"alertNotifications"`
// Whether to send security alerts notifications to subscription admins.
AlertsToAdmins *bool `pulumi:"alertsToAdmins"`
// The email of the Security Center Contact.
Email *string `pulumi:"email"`
// The name of the Security Center Contact. Changing this forces a new Security Center Contact to be created.
Name *string `pulumi:"name"`
// The phone number of the Security Center Contact.
Phone *string `pulumi:"phone"`
}
type ContactState struct {
// Whether to send security alerts notifications to the security contact.
AlertNotifications pulumi.BoolPtrInput
// Whether to send security alerts notifications to subscription admins.
AlertsToAdmins pulumi.BoolPtrInput
// The email of the Security Center Contact.
Email pulumi.StringPtrInput
// The name of the Security Center Contact. Changing this forces a new Security Center Contact to be created.
Name pulumi.StringPtrInput
// The phone number of the Security Center Contact.
Phone pulumi.StringPtrInput
}
func (ContactState) ElementType() reflect.Type {
return reflect.TypeOf((*contactState)(nil)).Elem()
}
type contactArgs struct {
// Whether to send security alerts notifications to the security contact.
AlertNotifications bool `pulumi:"alertNotifications"`
// Whether to send security alerts notifications to subscription admins.
AlertsToAdmins bool `pulumi:"alertsToAdmins"`
// The email of the Security Center Contact.
Email string `pulumi:"email"`
// The name of the Security Center Contact. Changing this forces a new Security Center Contact to be created.
Name *string `pulumi:"name"`
// The phone number of the Security Center Contact.
Phone *string `pulumi:"phone"`
}
// The set of arguments for constructing a Contact resource.
type ContactArgs struct {
// Whether to send security alerts notifications to the security contact.
AlertNotifications pulumi.BoolInput
// Whether to send security alerts notifications to subscription admins.
AlertsToAdmins pulumi.BoolInput
// The email of the Security Center Contact.
Email pulumi.StringInput
// The name of the Security Center Contact. Changing this forces a new Security Center Contact to be created.
Name pulumi.StringPtrInput
// The phone number of the Security Center Contact.
Phone pulumi.StringPtrInput
}
func (ContactArgs) ElementType() reflect.Type {
return reflect.TypeOf((*contactArgs)(nil)).Elem()
}
type ContactInput interface {
pulumi.Input
ToContactOutput() ContactOutput
ToContactOutputWithContext(ctx context.Context) ContactOutput
}
func (*Contact) ElementType() reflect.Type {
return reflect.TypeOf((**Contact)(nil)).Elem()
}
func (i *Contact) ToContactOutput() ContactOutput {
return i.ToContactOutputWithContext(context.Background())
}
func (i *Contact) ToContactOutputWithContext(ctx context.Context) ContactOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactOutput)
}
// ContactArrayInput is an input type that accepts ContactArray and ContactArrayOutput values.
// You can construct a concrete instance of `ContactArrayInput` via:
//
// ContactArray{ ContactArgs{...} }
type ContactArrayInput interface {
pulumi.Input
ToContactArrayOutput() ContactArrayOutput
ToContactArrayOutputWithContext(context.Context) ContactArrayOutput
}
type ContactArray []ContactInput
func (ContactArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Contact)(nil)).Elem()
}
func (i ContactArray) ToContactArrayOutput() ContactArrayOutput {
return i.ToContactArrayOutputWithContext(context.Background())
}
func (i ContactArray) ToContactArrayOutputWithContext(ctx context.Context) ContactArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactArrayOutput)
}
// ContactMapInput is an input type that accepts ContactMap and ContactMapOutput values.
// You can construct a concrete instance of `ContactMapInput` via:
//
// ContactMap{ "key": ContactArgs{...} }
type ContactMapInput interface {
pulumi.Input
ToContactMapOutput() ContactMapOutput
ToContactMapOutputWithContext(context.Context) ContactMapOutput
}
type ContactMap map[string]ContactInput
func (ContactMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Contact)(nil)).Elem()
}
func (i ContactMap) ToContactMapOutput() ContactMapOutput {
return i.ToContactMapOutputWithContext(context.Background())
}
func (i ContactMap) ToContactMapOutputWithContext(ctx context.Context) ContactMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContactMapOutput)
}
type ContactOutput struct{ *pulumi.OutputState }
func (ContactOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Contact)(nil)).Elem()
}
func (o ContactOutput) ToContactOutput() ContactOutput {
return o
}
func (o ContactOutput) ToContactOutputWithContext(ctx context.Context) ContactOutput {
return o
}
// Whether to send security alerts notifications to the security contact.
func (o ContactOutput) AlertNotifications() pulumi.BoolOutput {
return o.ApplyT(func(v *Contact) pulumi.BoolOutput { return v.AlertNotifications }).(pulumi.BoolOutput)
}
// Whether to send security alerts notifications to subscription admins.
func (o ContactOutput) AlertsToAdmins() pulumi.BoolOutput {
return o.ApplyT(func(v *Contact) pulumi.BoolOutput { return v.AlertsToAdmins }).(pulumi.BoolOutput)
}
// The email of the Security Center Contact.
func (o ContactOutput) Email() pulumi.StringOutput {
return o.ApplyT(func(v *Contact) pulumi.StringOutput { return v.Email }).(pulumi.StringOutput)
}
// The name of the Security Center Contact. Changing this forces a new Security Center Contact to be created.
func (o ContactOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Contact) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The phone number of the Security Center Contact.
func (o ContactOutput) Phone() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Contact) pulumi.StringPtrOutput { return v.Phone }).(pulumi.StringPtrOutput)
}
type ContactArrayOutput struct{ *pulumi.OutputState }
func (ContactArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Contact)(nil)).Elem()
}
func (o ContactArrayOutput) ToContactArrayOutput() ContactArrayOutput {
return o
}
func (o ContactArrayOutput) ToContactArrayOutputWithContext(ctx context.Context) ContactArrayOutput {
return o
}
func (o ContactArrayOutput) Index(i pulumi.IntInput) ContactOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Contact {
return vs[0].([]*Contact)[vs[1].(int)]
}).(ContactOutput)
}
type ContactMapOutput struct{ *pulumi.OutputState }
func (ContactMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Contact)(nil)).Elem()
}
func (o ContactMapOutput) ToContactMapOutput() ContactMapOutput {
return o
}
func (o ContactMapOutput) ToContactMapOutputWithContext(ctx context.Context) ContactMapOutput {
return o
}
func (o ContactMapOutput) MapIndex(k pulumi.StringInput) ContactOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Contact {
return vs[0].(map[string]*Contact)[vs[1].(string)]
}).(ContactOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ContactInput)(nil)).Elem(), &Contact{})
pulumi.RegisterInputType(reflect.TypeOf((*ContactArrayInput)(nil)).Elem(), ContactArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ContactMapInput)(nil)).Elem(), ContactMap{})
pulumi.RegisterOutputType(ContactOutput{})
pulumi.RegisterOutputType(ContactArrayOutput{})
pulumi.RegisterOutputType(ContactMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/securitycenter/advancedThreatProtection.go | sdk/go/azure/securitycenter/advancedThreatProtection.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package securitycenter
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a resources Advanced Threat Protection setting.
//
// ## 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/securitycenter"
// "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("atp-example"),
// 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"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// _, err = securitycenter.NewAdvancedThreatProtection(ctx, "example", &securitycenter.AdvancedThreatProtectionArgs{
// TargetResourceId: exampleAccount.ID(),
// Enabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Advanced Threat Protection can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:securitycenter/advancedThreatProtection:AdvancedThreatProtection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup/providers/Microsoft.Storage/storageAccounts/exampleaccount/providers/Microsoft.Security/advancedThreatProtectionSettings/default
// ```
type AdvancedThreatProtection struct {
pulumi.CustomResourceState
// Should Advanced Threat Protection be enabled on this resource?
Enabled pulumi.BoolOutput `pulumi:"enabled"`
// The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
TargetResourceId pulumi.StringOutput `pulumi:"targetResourceId"`
}
// NewAdvancedThreatProtection registers a new resource with the given unique name, arguments, and options.
func NewAdvancedThreatProtection(ctx *pulumi.Context,
name string, args *AdvancedThreatProtectionArgs, opts ...pulumi.ResourceOption) (*AdvancedThreatProtection, 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.TargetResourceId == nil {
return nil, errors.New("invalid value for required argument 'TargetResourceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AdvancedThreatProtection
err := ctx.RegisterResource("azure:securitycenter/advancedThreatProtection:AdvancedThreatProtection", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAdvancedThreatProtection gets an existing AdvancedThreatProtection 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 GetAdvancedThreatProtection(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AdvancedThreatProtectionState, opts ...pulumi.ResourceOption) (*AdvancedThreatProtection, error) {
var resource AdvancedThreatProtection
err := ctx.ReadResource("azure:securitycenter/advancedThreatProtection:AdvancedThreatProtection", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AdvancedThreatProtection resources.
type advancedThreatProtectionState struct {
// Should Advanced Threat Protection be enabled on this resource?
Enabled *bool `pulumi:"enabled"`
// The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
TargetResourceId *string `pulumi:"targetResourceId"`
}
type AdvancedThreatProtectionState struct {
// Should Advanced Threat Protection be enabled on this resource?
Enabled pulumi.BoolPtrInput
// The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
TargetResourceId pulumi.StringPtrInput
}
func (AdvancedThreatProtectionState) ElementType() reflect.Type {
return reflect.TypeOf((*advancedThreatProtectionState)(nil)).Elem()
}
type advancedThreatProtectionArgs struct {
// Should Advanced Threat Protection be enabled on this resource?
Enabled bool `pulumi:"enabled"`
// The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
TargetResourceId string `pulumi:"targetResourceId"`
}
// The set of arguments for constructing a AdvancedThreatProtection resource.
type AdvancedThreatProtectionArgs struct {
// Should Advanced Threat Protection be enabled on this resource?
Enabled pulumi.BoolInput
// The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
TargetResourceId pulumi.StringInput
}
func (AdvancedThreatProtectionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*advancedThreatProtectionArgs)(nil)).Elem()
}
type AdvancedThreatProtectionInput interface {
pulumi.Input
ToAdvancedThreatProtectionOutput() AdvancedThreatProtectionOutput
ToAdvancedThreatProtectionOutputWithContext(ctx context.Context) AdvancedThreatProtectionOutput
}
func (*AdvancedThreatProtection) ElementType() reflect.Type {
return reflect.TypeOf((**AdvancedThreatProtection)(nil)).Elem()
}
func (i *AdvancedThreatProtection) ToAdvancedThreatProtectionOutput() AdvancedThreatProtectionOutput {
return i.ToAdvancedThreatProtectionOutputWithContext(context.Background())
}
func (i *AdvancedThreatProtection) ToAdvancedThreatProtectionOutputWithContext(ctx context.Context) AdvancedThreatProtectionOutput {
return pulumi.ToOutputWithContext(ctx, i).(AdvancedThreatProtectionOutput)
}
// AdvancedThreatProtectionArrayInput is an input type that accepts AdvancedThreatProtectionArray and AdvancedThreatProtectionArrayOutput values.
// You can construct a concrete instance of `AdvancedThreatProtectionArrayInput` via:
//
// AdvancedThreatProtectionArray{ AdvancedThreatProtectionArgs{...} }
type AdvancedThreatProtectionArrayInput interface {
pulumi.Input
ToAdvancedThreatProtectionArrayOutput() AdvancedThreatProtectionArrayOutput
ToAdvancedThreatProtectionArrayOutputWithContext(context.Context) AdvancedThreatProtectionArrayOutput
}
type AdvancedThreatProtectionArray []AdvancedThreatProtectionInput
func (AdvancedThreatProtectionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AdvancedThreatProtection)(nil)).Elem()
}
func (i AdvancedThreatProtectionArray) ToAdvancedThreatProtectionArrayOutput() AdvancedThreatProtectionArrayOutput {
return i.ToAdvancedThreatProtectionArrayOutputWithContext(context.Background())
}
func (i AdvancedThreatProtectionArray) ToAdvancedThreatProtectionArrayOutputWithContext(ctx context.Context) AdvancedThreatProtectionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AdvancedThreatProtectionArrayOutput)
}
// AdvancedThreatProtectionMapInput is an input type that accepts AdvancedThreatProtectionMap and AdvancedThreatProtectionMapOutput values.
// You can construct a concrete instance of `AdvancedThreatProtectionMapInput` via:
//
// AdvancedThreatProtectionMap{ "key": AdvancedThreatProtectionArgs{...} }
type AdvancedThreatProtectionMapInput interface {
pulumi.Input
ToAdvancedThreatProtectionMapOutput() AdvancedThreatProtectionMapOutput
ToAdvancedThreatProtectionMapOutputWithContext(context.Context) AdvancedThreatProtectionMapOutput
}
type AdvancedThreatProtectionMap map[string]AdvancedThreatProtectionInput
func (AdvancedThreatProtectionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AdvancedThreatProtection)(nil)).Elem()
}
func (i AdvancedThreatProtectionMap) ToAdvancedThreatProtectionMapOutput() AdvancedThreatProtectionMapOutput {
return i.ToAdvancedThreatProtectionMapOutputWithContext(context.Background())
}
func (i AdvancedThreatProtectionMap) ToAdvancedThreatProtectionMapOutputWithContext(ctx context.Context) AdvancedThreatProtectionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AdvancedThreatProtectionMapOutput)
}
type AdvancedThreatProtectionOutput struct{ *pulumi.OutputState }
func (AdvancedThreatProtectionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AdvancedThreatProtection)(nil)).Elem()
}
func (o AdvancedThreatProtectionOutput) ToAdvancedThreatProtectionOutput() AdvancedThreatProtectionOutput {
return o
}
func (o AdvancedThreatProtectionOutput) ToAdvancedThreatProtectionOutputWithContext(ctx context.Context) AdvancedThreatProtectionOutput {
return o
}
// Should Advanced Threat Protection be enabled on this resource?
func (o AdvancedThreatProtectionOutput) Enabled() pulumi.BoolOutput {
return o.ApplyT(func(v *AdvancedThreatProtection) pulumi.BoolOutput { return v.Enabled }).(pulumi.BoolOutput)
}
// The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
func (o AdvancedThreatProtectionOutput) TargetResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *AdvancedThreatProtection) pulumi.StringOutput { return v.TargetResourceId }).(pulumi.StringOutput)
}
type AdvancedThreatProtectionArrayOutput struct{ *pulumi.OutputState }
func (AdvancedThreatProtectionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AdvancedThreatProtection)(nil)).Elem()
}
func (o AdvancedThreatProtectionArrayOutput) ToAdvancedThreatProtectionArrayOutput() AdvancedThreatProtectionArrayOutput {
return o
}
func (o AdvancedThreatProtectionArrayOutput) ToAdvancedThreatProtectionArrayOutputWithContext(ctx context.Context) AdvancedThreatProtectionArrayOutput {
return o
}
func (o AdvancedThreatProtectionArrayOutput) Index(i pulumi.IntInput) AdvancedThreatProtectionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AdvancedThreatProtection {
return vs[0].([]*AdvancedThreatProtection)[vs[1].(int)]
}).(AdvancedThreatProtectionOutput)
}
type AdvancedThreatProtectionMapOutput struct{ *pulumi.OutputState }
func (AdvancedThreatProtectionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AdvancedThreatProtection)(nil)).Elem()
}
func (o AdvancedThreatProtectionMapOutput) ToAdvancedThreatProtectionMapOutput() AdvancedThreatProtectionMapOutput {
return o
}
func (o AdvancedThreatProtectionMapOutput) ToAdvancedThreatProtectionMapOutputWithContext(ctx context.Context) AdvancedThreatProtectionMapOutput {
return o
}
func (o AdvancedThreatProtectionMapOutput) MapIndex(k pulumi.StringInput) AdvancedThreatProtectionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AdvancedThreatProtection {
return vs[0].(map[string]*AdvancedThreatProtection)[vs[1].(string)]
}).(AdvancedThreatProtectionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AdvancedThreatProtectionInput)(nil)).Elem(), &AdvancedThreatProtection{})
pulumi.RegisterInputType(reflect.TypeOf((*AdvancedThreatProtectionArrayInput)(nil)).Elem(), AdvancedThreatProtectionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AdvancedThreatProtectionMapInput)(nil)).Elem(), AdvancedThreatProtectionMap{})
pulumi.RegisterOutputType(AdvancedThreatProtectionOutput{})
pulumi.RegisterOutputType(AdvancedThreatProtectionArrayOutput{})
pulumi.RegisterOutputType(AdvancedThreatProtectionMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/securitycenter/assessmentPolicy.go | sdk/go/azure/securitycenter/assessmentPolicy.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package securitycenter
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the Security Center Assessment Metadata for Azure Security Center.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/securitycenter"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := securitycenter.NewAssessmentPolicy(ctx, "example", &securitycenter.AssessmentPolicyArgs{
// DisplayName: pulumi.String("Test Display Name"),
// Severity: pulumi.String("Medium"),
// Description: pulumi.String("Test Description"),
// })
// 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.Security` - 2021-06-01
//
// ## Import
//
// Security Assessments Policy can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:securitycenter/assessmentPolicy:AssessmentPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/assessmentMetadata/metadata1
// ```
type AssessmentPolicy struct {
pulumi.CustomResourceState
// A list of the categories of resource that is at risk when the Security Center Assessment is unhealthy. Possible values are `Unknown`, `Compute`, `Data`, `IdentityAndAccess`, `IoT` and `Networking`.
Categories pulumi.StringArrayOutput `pulumi:"categories"`
// The description of the Security Center Assessment.
Description pulumi.StringOutput `pulumi:"description"`
// The user-friendly display name of the Security Center Assessment.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The implementation effort which is used to remediate the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`.
ImplementationEffort pulumi.StringPtrOutput `pulumi:"implementationEffort"`
// The GUID as the name of the Security Center Assessment Policy.
Name pulumi.StringOutput `pulumi:"name"`
// The description which is used to mitigate the security issue.
RemediationDescription pulumi.StringPtrOutput `pulumi:"remediationDescription"`
// The severity level of the Security Center Assessment. Possible values are `Low`, `Medium` and `High`. Defaults to `Medium`.
Severity pulumi.StringPtrOutput `pulumi:"severity"`
// A list of the threat impacts for the Security Center Assessment. Possible values are `AccountBreach`, `DataExfiltration`, `DataSpillage`, `DenialOfService`, `ElevationOfPrivilege`, `MaliciousInsider`, `MissingCoverage` and `ThreatResistance`.
Threats pulumi.StringArrayOutput `pulumi:"threats"`
// The user impact of the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`.
UserImpact pulumi.StringPtrOutput `pulumi:"userImpact"`
}
// NewAssessmentPolicy registers a new resource with the given unique name, arguments, and options.
func NewAssessmentPolicy(ctx *pulumi.Context,
name string, args *AssessmentPolicyArgs, opts ...pulumi.ResourceOption) (*AssessmentPolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Description == nil {
return nil, errors.New("invalid value for required argument 'Description'")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AssessmentPolicy
err := ctx.RegisterResource("azure:securitycenter/assessmentPolicy:AssessmentPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAssessmentPolicy gets an existing AssessmentPolicy 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 GetAssessmentPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AssessmentPolicyState, opts ...pulumi.ResourceOption) (*AssessmentPolicy, error) {
var resource AssessmentPolicy
err := ctx.ReadResource("azure:securitycenter/assessmentPolicy:AssessmentPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AssessmentPolicy resources.
type assessmentPolicyState struct {
// A list of the categories of resource that is at risk when the Security Center Assessment is unhealthy. Possible values are `Unknown`, `Compute`, `Data`, `IdentityAndAccess`, `IoT` and `Networking`.
Categories []string `pulumi:"categories"`
// The description of the Security Center Assessment.
Description *string `pulumi:"description"`
// The user-friendly display name of the Security Center Assessment.
DisplayName *string `pulumi:"displayName"`
// The implementation effort which is used to remediate the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`.
ImplementationEffort *string `pulumi:"implementationEffort"`
// The GUID as the name of the Security Center Assessment Policy.
Name *string `pulumi:"name"`
// The description which is used to mitigate the security issue.
RemediationDescription *string `pulumi:"remediationDescription"`
// The severity level of the Security Center Assessment. Possible values are `Low`, `Medium` and `High`. Defaults to `Medium`.
Severity *string `pulumi:"severity"`
// A list of the threat impacts for the Security Center Assessment. Possible values are `AccountBreach`, `DataExfiltration`, `DataSpillage`, `DenialOfService`, `ElevationOfPrivilege`, `MaliciousInsider`, `MissingCoverage` and `ThreatResistance`.
Threats []string `pulumi:"threats"`
// The user impact of the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`.
UserImpact *string `pulumi:"userImpact"`
}
type AssessmentPolicyState struct {
// A list of the categories of resource that is at risk when the Security Center Assessment is unhealthy. Possible values are `Unknown`, `Compute`, `Data`, `IdentityAndAccess`, `IoT` and `Networking`.
Categories pulumi.StringArrayInput
// The description of the Security Center Assessment.
Description pulumi.StringPtrInput
// The user-friendly display name of the Security Center Assessment.
DisplayName pulumi.StringPtrInput
// The implementation effort which is used to remediate the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`.
ImplementationEffort pulumi.StringPtrInput
// The GUID as the name of the Security Center Assessment Policy.
Name pulumi.StringPtrInput
// The description which is used to mitigate the security issue.
RemediationDescription pulumi.StringPtrInput
// The severity level of the Security Center Assessment. Possible values are `Low`, `Medium` and `High`. Defaults to `Medium`.
Severity pulumi.StringPtrInput
// A list of the threat impacts for the Security Center Assessment. Possible values are `AccountBreach`, `DataExfiltration`, `DataSpillage`, `DenialOfService`, `ElevationOfPrivilege`, `MaliciousInsider`, `MissingCoverage` and `ThreatResistance`.
Threats pulumi.StringArrayInput
// The user impact of the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`.
UserImpact pulumi.StringPtrInput
}
func (AssessmentPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*assessmentPolicyState)(nil)).Elem()
}
type assessmentPolicyArgs struct {
// A list of the categories of resource that is at risk when the Security Center Assessment is unhealthy. Possible values are `Unknown`, `Compute`, `Data`, `IdentityAndAccess`, `IoT` and `Networking`.
Categories []string `pulumi:"categories"`
// The description of the Security Center Assessment.
Description string `pulumi:"description"`
// The user-friendly display name of the Security Center Assessment.
DisplayName string `pulumi:"displayName"`
// The implementation effort which is used to remediate the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`.
ImplementationEffort *string `pulumi:"implementationEffort"`
// The description which is used to mitigate the security issue.
RemediationDescription *string `pulumi:"remediationDescription"`
// The severity level of the Security Center Assessment. Possible values are `Low`, `Medium` and `High`. Defaults to `Medium`.
Severity *string `pulumi:"severity"`
// A list of the threat impacts for the Security Center Assessment. Possible values are `AccountBreach`, `DataExfiltration`, `DataSpillage`, `DenialOfService`, `ElevationOfPrivilege`, `MaliciousInsider`, `MissingCoverage` and `ThreatResistance`.
Threats []string `pulumi:"threats"`
// The user impact of the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`.
UserImpact *string `pulumi:"userImpact"`
}
// The set of arguments for constructing a AssessmentPolicy resource.
type AssessmentPolicyArgs struct {
// A list of the categories of resource that is at risk when the Security Center Assessment is unhealthy. Possible values are `Unknown`, `Compute`, `Data`, `IdentityAndAccess`, `IoT` and `Networking`.
Categories pulumi.StringArrayInput
// The description of the Security Center Assessment.
Description pulumi.StringInput
// The user-friendly display name of the Security Center Assessment.
DisplayName pulumi.StringInput
// The implementation effort which is used to remediate the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`.
ImplementationEffort pulumi.StringPtrInput
// The description which is used to mitigate the security issue.
RemediationDescription pulumi.StringPtrInput
// The severity level of the Security Center Assessment. Possible values are `Low`, `Medium` and `High`. Defaults to `Medium`.
Severity pulumi.StringPtrInput
// A list of the threat impacts for the Security Center Assessment. Possible values are `AccountBreach`, `DataExfiltration`, `DataSpillage`, `DenialOfService`, `ElevationOfPrivilege`, `MaliciousInsider`, `MissingCoverage` and `ThreatResistance`.
Threats pulumi.StringArrayInput
// The user impact of the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`.
UserImpact pulumi.StringPtrInput
}
func (AssessmentPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*assessmentPolicyArgs)(nil)).Elem()
}
type AssessmentPolicyInput interface {
pulumi.Input
ToAssessmentPolicyOutput() AssessmentPolicyOutput
ToAssessmentPolicyOutputWithContext(ctx context.Context) AssessmentPolicyOutput
}
func (*AssessmentPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**AssessmentPolicy)(nil)).Elem()
}
func (i *AssessmentPolicy) ToAssessmentPolicyOutput() AssessmentPolicyOutput {
return i.ToAssessmentPolicyOutputWithContext(context.Background())
}
func (i *AssessmentPolicy) ToAssessmentPolicyOutputWithContext(ctx context.Context) AssessmentPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssessmentPolicyOutput)
}
// AssessmentPolicyArrayInput is an input type that accepts AssessmentPolicyArray and AssessmentPolicyArrayOutput values.
// You can construct a concrete instance of `AssessmentPolicyArrayInput` via:
//
// AssessmentPolicyArray{ AssessmentPolicyArgs{...} }
type AssessmentPolicyArrayInput interface {
pulumi.Input
ToAssessmentPolicyArrayOutput() AssessmentPolicyArrayOutput
ToAssessmentPolicyArrayOutputWithContext(context.Context) AssessmentPolicyArrayOutput
}
type AssessmentPolicyArray []AssessmentPolicyInput
func (AssessmentPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AssessmentPolicy)(nil)).Elem()
}
func (i AssessmentPolicyArray) ToAssessmentPolicyArrayOutput() AssessmentPolicyArrayOutput {
return i.ToAssessmentPolicyArrayOutputWithContext(context.Background())
}
func (i AssessmentPolicyArray) ToAssessmentPolicyArrayOutputWithContext(ctx context.Context) AssessmentPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssessmentPolicyArrayOutput)
}
// AssessmentPolicyMapInput is an input type that accepts AssessmentPolicyMap and AssessmentPolicyMapOutput values.
// You can construct a concrete instance of `AssessmentPolicyMapInput` via:
//
// AssessmentPolicyMap{ "key": AssessmentPolicyArgs{...} }
type AssessmentPolicyMapInput interface {
pulumi.Input
ToAssessmentPolicyMapOutput() AssessmentPolicyMapOutput
ToAssessmentPolicyMapOutputWithContext(context.Context) AssessmentPolicyMapOutput
}
type AssessmentPolicyMap map[string]AssessmentPolicyInput
func (AssessmentPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AssessmentPolicy)(nil)).Elem()
}
func (i AssessmentPolicyMap) ToAssessmentPolicyMapOutput() AssessmentPolicyMapOutput {
return i.ToAssessmentPolicyMapOutputWithContext(context.Background())
}
func (i AssessmentPolicyMap) ToAssessmentPolicyMapOutputWithContext(ctx context.Context) AssessmentPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssessmentPolicyMapOutput)
}
type AssessmentPolicyOutput struct{ *pulumi.OutputState }
func (AssessmentPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AssessmentPolicy)(nil)).Elem()
}
func (o AssessmentPolicyOutput) ToAssessmentPolicyOutput() AssessmentPolicyOutput {
return o
}
func (o AssessmentPolicyOutput) ToAssessmentPolicyOutputWithContext(ctx context.Context) AssessmentPolicyOutput {
return o
}
// A list of the categories of resource that is at risk when the Security Center Assessment is unhealthy. Possible values are `Unknown`, `Compute`, `Data`, `IdentityAndAccess`, `IoT` and `Networking`.
func (o AssessmentPolicyOutput) Categories() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AssessmentPolicy) pulumi.StringArrayOutput { return v.Categories }).(pulumi.StringArrayOutput)
}
// The description of the Security Center Assessment.
func (o AssessmentPolicyOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *AssessmentPolicy) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// The user-friendly display name of the Security Center Assessment.
func (o AssessmentPolicyOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *AssessmentPolicy) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The implementation effort which is used to remediate the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`.
func (o AssessmentPolicyOutput) ImplementationEffort() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AssessmentPolicy) pulumi.StringPtrOutput { return v.ImplementationEffort }).(pulumi.StringPtrOutput)
}
// The GUID as the name of the Security Center Assessment Policy.
func (o AssessmentPolicyOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AssessmentPolicy) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The description which is used to mitigate the security issue.
func (o AssessmentPolicyOutput) RemediationDescription() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AssessmentPolicy) pulumi.StringPtrOutput { return v.RemediationDescription }).(pulumi.StringPtrOutput)
}
// The severity level of the Security Center Assessment. Possible values are `Low`, `Medium` and `High`. Defaults to `Medium`.
func (o AssessmentPolicyOutput) Severity() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AssessmentPolicy) pulumi.StringPtrOutput { return v.Severity }).(pulumi.StringPtrOutput)
}
// A list of the threat impacts for the Security Center Assessment. Possible values are `AccountBreach`, `DataExfiltration`, `DataSpillage`, `DenialOfService`, `ElevationOfPrivilege`, `MaliciousInsider`, `MissingCoverage` and `ThreatResistance`.
func (o AssessmentPolicyOutput) Threats() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AssessmentPolicy) pulumi.StringArrayOutput { return v.Threats }).(pulumi.StringArrayOutput)
}
// The user impact of the Security Center Assessment. Possible values are `Low`, `Moderate` and `High`.
func (o AssessmentPolicyOutput) UserImpact() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AssessmentPolicy) pulumi.StringPtrOutput { return v.UserImpact }).(pulumi.StringPtrOutput)
}
type AssessmentPolicyArrayOutput struct{ *pulumi.OutputState }
func (AssessmentPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AssessmentPolicy)(nil)).Elem()
}
func (o AssessmentPolicyArrayOutput) ToAssessmentPolicyArrayOutput() AssessmentPolicyArrayOutput {
return o
}
func (o AssessmentPolicyArrayOutput) ToAssessmentPolicyArrayOutputWithContext(ctx context.Context) AssessmentPolicyArrayOutput {
return o
}
func (o AssessmentPolicyArrayOutput) Index(i pulumi.IntInput) AssessmentPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AssessmentPolicy {
return vs[0].([]*AssessmentPolicy)[vs[1].(int)]
}).(AssessmentPolicyOutput)
}
type AssessmentPolicyMapOutput struct{ *pulumi.OutputState }
func (AssessmentPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AssessmentPolicy)(nil)).Elem()
}
func (o AssessmentPolicyMapOutput) ToAssessmentPolicyMapOutput() AssessmentPolicyMapOutput {
return o
}
func (o AssessmentPolicyMapOutput) ToAssessmentPolicyMapOutputWithContext(ctx context.Context) AssessmentPolicyMapOutput {
return o
}
func (o AssessmentPolicyMapOutput) MapIndex(k pulumi.StringInput) AssessmentPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AssessmentPolicy {
return vs[0].(map[string]*AssessmentPolicy)[vs[1].(string)]
}).(AssessmentPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AssessmentPolicyInput)(nil)).Elem(), &AssessmentPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*AssessmentPolicyArrayInput)(nil)).Elem(), AssessmentPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AssessmentPolicyMapInput)(nil)).Elem(), AssessmentPolicyMap{})
pulumi.RegisterOutputType(AssessmentPolicyOutput{})
pulumi.RegisterOutputType(AssessmentPolicyArrayOutput{})
pulumi.RegisterOutputType(AssessmentPolicyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/securitycenter/storageDefender.go | sdk/go/azure/securitycenter/storageDefender.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package securitycenter
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the Defender for Storage.
//
// ## 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/securitycenter"
// "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("westus2"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("exampleacc"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// _, err = securitycenter.NewStorageDefender(ctx, "example", &securitycenter.StorageDefenderArgs{
// StorageAccountId: exampleAccount.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.Security` - 2022-12-01-preview
//
// ## Import
//
// The setting can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:securitycenter/storageDefender:StorageDefender example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Storage/storageAccounts/storageacc
// ```
type StorageDefender struct {
pulumi.CustomResourceState
// The max GB to be scanned per Month. Must be `-1` or above `0`. Omit this property or set to `-1` if no capping is needed. Defaults to `-1`.
MalwareScanningOnUploadCapGbPerMonth pulumi.IntPtrOutput `pulumi:"malwareScanningOnUploadCapGbPerMonth"`
// Whether On Upload malware scanning should be enabled. Defaults to `false`.
MalwareScanningOnUploadEnabled pulumi.BoolPtrOutput `pulumi:"malwareScanningOnUploadEnabled"`
// Whether the settings defined for this storage account should override the settings defined for the subscription. Defaults to `false`.
OverrideSubscriptionSettingsEnabled pulumi.BoolPtrOutput `pulumi:"overrideSubscriptionSettingsEnabled"`
// The Event Grid Topic where every scan result will be sent to. When you set an Event Grid custom topic, you must set `overrideSubscriptionSettingsEnabled` to `true` to override the subscription-level settings.
ScanResultsEventGridTopicId pulumi.StringPtrOutput `pulumi:"scanResultsEventGridTopicId"`
// Whether Sensitive Data Discovery should be enabled. Defaults to `false`.
SensitiveDataDiscoveryEnabled pulumi.BoolPtrOutput `pulumi:"sensitiveDataDiscoveryEnabled"`
// The ID of the storage account the defender applied to. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
}
// NewStorageDefender registers a new resource with the given unique name, arguments, and options.
func NewStorageDefender(ctx *pulumi.Context,
name string, args *StorageDefenderArgs, opts ...pulumi.ResourceOption) (*StorageDefender, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.StorageAccountId == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource StorageDefender
err := ctx.RegisterResource("azure:securitycenter/storageDefender:StorageDefender", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetStorageDefender gets an existing StorageDefender 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 GetStorageDefender(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *StorageDefenderState, opts ...pulumi.ResourceOption) (*StorageDefender, error) {
var resource StorageDefender
err := ctx.ReadResource("azure:securitycenter/storageDefender:StorageDefender", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering StorageDefender resources.
type storageDefenderState struct {
// The max GB to be scanned per Month. Must be `-1` or above `0`. Omit this property or set to `-1` if no capping is needed. Defaults to `-1`.
MalwareScanningOnUploadCapGbPerMonth *int `pulumi:"malwareScanningOnUploadCapGbPerMonth"`
// Whether On Upload malware scanning should be enabled. Defaults to `false`.
MalwareScanningOnUploadEnabled *bool `pulumi:"malwareScanningOnUploadEnabled"`
// Whether the settings defined for this storage account should override the settings defined for the subscription. Defaults to `false`.
OverrideSubscriptionSettingsEnabled *bool `pulumi:"overrideSubscriptionSettingsEnabled"`
// The Event Grid Topic where every scan result will be sent to. When you set an Event Grid custom topic, you must set `overrideSubscriptionSettingsEnabled` to `true` to override the subscription-level settings.
ScanResultsEventGridTopicId *string `pulumi:"scanResultsEventGridTopicId"`
// Whether Sensitive Data Discovery should be enabled. Defaults to `false`.
SensitiveDataDiscoveryEnabled *bool `pulumi:"sensitiveDataDiscoveryEnabled"`
// The ID of the storage account the defender applied to. Changing this forces a new resource to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
}
type StorageDefenderState struct {
// The max GB to be scanned per Month. Must be `-1` or above `0`. Omit this property or set to `-1` if no capping is needed. Defaults to `-1`.
MalwareScanningOnUploadCapGbPerMonth pulumi.IntPtrInput
// Whether On Upload malware scanning should be enabled. Defaults to `false`.
MalwareScanningOnUploadEnabled pulumi.BoolPtrInput
// Whether the settings defined for this storage account should override the settings defined for the subscription. Defaults to `false`.
OverrideSubscriptionSettingsEnabled pulumi.BoolPtrInput
// The Event Grid Topic where every scan result will be sent to. When you set an Event Grid custom topic, you must set `overrideSubscriptionSettingsEnabled` to `true` to override the subscription-level settings.
ScanResultsEventGridTopicId pulumi.StringPtrInput
// Whether Sensitive Data Discovery should be enabled. Defaults to `false`.
SensitiveDataDiscoveryEnabled pulumi.BoolPtrInput
// The ID of the storage account the defender applied to. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringPtrInput
}
func (StorageDefenderState) ElementType() reflect.Type {
return reflect.TypeOf((*storageDefenderState)(nil)).Elem()
}
type storageDefenderArgs struct {
// The max GB to be scanned per Month. Must be `-1` or above `0`. Omit this property or set to `-1` if no capping is needed. Defaults to `-1`.
MalwareScanningOnUploadCapGbPerMonth *int `pulumi:"malwareScanningOnUploadCapGbPerMonth"`
// Whether On Upload malware scanning should be enabled. Defaults to `false`.
MalwareScanningOnUploadEnabled *bool `pulumi:"malwareScanningOnUploadEnabled"`
// Whether the settings defined for this storage account should override the settings defined for the subscription. Defaults to `false`.
OverrideSubscriptionSettingsEnabled *bool `pulumi:"overrideSubscriptionSettingsEnabled"`
// The Event Grid Topic where every scan result will be sent to. When you set an Event Grid custom topic, you must set `overrideSubscriptionSettingsEnabled` to `true` to override the subscription-level settings.
ScanResultsEventGridTopicId *string `pulumi:"scanResultsEventGridTopicId"`
// Whether Sensitive Data Discovery should be enabled. Defaults to `false`.
SensitiveDataDiscoveryEnabled *bool `pulumi:"sensitiveDataDiscoveryEnabled"`
// The ID of the storage account the defender applied to. Changing this forces a new resource to be created.
StorageAccountId string `pulumi:"storageAccountId"`
}
// The set of arguments for constructing a StorageDefender resource.
type StorageDefenderArgs struct {
// The max GB to be scanned per Month. Must be `-1` or above `0`. Omit this property or set to `-1` if no capping is needed. Defaults to `-1`.
MalwareScanningOnUploadCapGbPerMonth pulumi.IntPtrInput
// Whether On Upload malware scanning should be enabled. Defaults to `false`.
MalwareScanningOnUploadEnabled pulumi.BoolPtrInput
// Whether the settings defined for this storage account should override the settings defined for the subscription. Defaults to `false`.
OverrideSubscriptionSettingsEnabled pulumi.BoolPtrInput
// The Event Grid Topic where every scan result will be sent to. When you set an Event Grid custom topic, you must set `overrideSubscriptionSettingsEnabled` to `true` to override the subscription-level settings.
ScanResultsEventGridTopicId pulumi.StringPtrInput
// Whether Sensitive Data Discovery should be enabled. Defaults to `false`.
SensitiveDataDiscoveryEnabled pulumi.BoolPtrInput
// The ID of the storage account the defender applied to. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringInput
}
func (StorageDefenderArgs) ElementType() reflect.Type {
return reflect.TypeOf((*storageDefenderArgs)(nil)).Elem()
}
type StorageDefenderInput interface {
pulumi.Input
ToStorageDefenderOutput() StorageDefenderOutput
ToStorageDefenderOutputWithContext(ctx context.Context) StorageDefenderOutput
}
func (*StorageDefender) ElementType() reflect.Type {
return reflect.TypeOf((**StorageDefender)(nil)).Elem()
}
func (i *StorageDefender) ToStorageDefenderOutput() StorageDefenderOutput {
return i.ToStorageDefenderOutputWithContext(context.Background())
}
func (i *StorageDefender) ToStorageDefenderOutputWithContext(ctx context.Context) StorageDefenderOutput {
return pulumi.ToOutputWithContext(ctx, i).(StorageDefenderOutput)
}
// StorageDefenderArrayInput is an input type that accepts StorageDefenderArray and StorageDefenderArrayOutput values.
// You can construct a concrete instance of `StorageDefenderArrayInput` via:
//
// StorageDefenderArray{ StorageDefenderArgs{...} }
type StorageDefenderArrayInput interface {
pulumi.Input
ToStorageDefenderArrayOutput() StorageDefenderArrayOutput
ToStorageDefenderArrayOutputWithContext(context.Context) StorageDefenderArrayOutput
}
type StorageDefenderArray []StorageDefenderInput
func (StorageDefenderArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StorageDefender)(nil)).Elem()
}
func (i StorageDefenderArray) ToStorageDefenderArrayOutput() StorageDefenderArrayOutput {
return i.ToStorageDefenderArrayOutputWithContext(context.Background())
}
func (i StorageDefenderArray) ToStorageDefenderArrayOutputWithContext(ctx context.Context) StorageDefenderArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(StorageDefenderArrayOutput)
}
// StorageDefenderMapInput is an input type that accepts StorageDefenderMap and StorageDefenderMapOutput values.
// You can construct a concrete instance of `StorageDefenderMapInput` via:
//
// StorageDefenderMap{ "key": StorageDefenderArgs{...} }
type StorageDefenderMapInput interface {
pulumi.Input
ToStorageDefenderMapOutput() StorageDefenderMapOutput
ToStorageDefenderMapOutputWithContext(context.Context) StorageDefenderMapOutput
}
type StorageDefenderMap map[string]StorageDefenderInput
func (StorageDefenderMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StorageDefender)(nil)).Elem()
}
func (i StorageDefenderMap) ToStorageDefenderMapOutput() StorageDefenderMapOutput {
return i.ToStorageDefenderMapOutputWithContext(context.Background())
}
func (i StorageDefenderMap) ToStorageDefenderMapOutputWithContext(ctx context.Context) StorageDefenderMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(StorageDefenderMapOutput)
}
type StorageDefenderOutput struct{ *pulumi.OutputState }
func (StorageDefenderOutput) ElementType() reflect.Type {
return reflect.TypeOf((**StorageDefender)(nil)).Elem()
}
func (o StorageDefenderOutput) ToStorageDefenderOutput() StorageDefenderOutput {
return o
}
func (o StorageDefenderOutput) ToStorageDefenderOutputWithContext(ctx context.Context) StorageDefenderOutput {
return o
}
// The max GB to be scanned per Month. Must be `-1` or above `0`. Omit this property or set to `-1` if no capping is needed. Defaults to `-1`.
func (o StorageDefenderOutput) MalwareScanningOnUploadCapGbPerMonth() pulumi.IntPtrOutput {
return o.ApplyT(func(v *StorageDefender) pulumi.IntPtrOutput { return v.MalwareScanningOnUploadCapGbPerMonth }).(pulumi.IntPtrOutput)
}
// Whether On Upload malware scanning should be enabled. Defaults to `false`.
func (o StorageDefenderOutput) MalwareScanningOnUploadEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *StorageDefender) pulumi.BoolPtrOutput { return v.MalwareScanningOnUploadEnabled }).(pulumi.BoolPtrOutput)
}
// Whether the settings defined for this storage account should override the settings defined for the subscription. Defaults to `false`.
func (o StorageDefenderOutput) OverrideSubscriptionSettingsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *StorageDefender) pulumi.BoolPtrOutput { return v.OverrideSubscriptionSettingsEnabled }).(pulumi.BoolPtrOutput)
}
// The Event Grid Topic where every scan result will be sent to. When you set an Event Grid custom topic, you must set `overrideSubscriptionSettingsEnabled` to `true` to override the subscription-level settings.
func (o StorageDefenderOutput) ScanResultsEventGridTopicId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *StorageDefender) pulumi.StringPtrOutput { return v.ScanResultsEventGridTopicId }).(pulumi.StringPtrOutput)
}
// Whether Sensitive Data Discovery should be enabled. Defaults to `false`.
func (o StorageDefenderOutput) SensitiveDataDiscoveryEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *StorageDefender) pulumi.BoolPtrOutput { return v.SensitiveDataDiscoveryEnabled }).(pulumi.BoolPtrOutput)
}
// The ID of the storage account the defender applied to. Changing this forces a new resource to be created.
func (o StorageDefenderOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *StorageDefender) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
type StorageDefenderArrayOutput struct{ *pulumi.OutputState }
func (StorageDefenderArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StorageDefender)(nil)).Elem()
}
func (o StorageDefenderArrayOutput) ToStorageDefenderArrayOutput() StorageDefenderArrayOutput {
return o
}
func (o StorageDefenderArrayOutput) ToStorageDefenderArrayOutputWithContext(ctx context.Context) StorageDefenderArrayOutput {
return o
}
func (o StorageDefenderArrayOutput) Index(i pulumi.IntInput) StorageDefenderOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StorageDefender {
return vs[0].([]*StorageDefender)[vs[1].(int)]
}).(StorageDefenderOutput)
}
type StorageDefenderMapOutput struct{ *pulumi.OutputState }
func (StorageDefenderMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StorageDefender)(nil)).Elem()
}
func (o StorageDefenderMapOutput) ToStorageDefenderMapOutput() StorageDefenderMapOutput {
return o
}
func (o StorageDefenderMapOutput) ToStorageDefenderMapOutputWithContext(ctx context.Context) StorageDefenderMapOutput {
return o
}
func (o StorageDefenderMapOutput) MapIndex(k pulumi.StringInput) StorageDefenderOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StorageDefender {
return vs[0].(map[string]*StorageDefender)[vs[1].(string)]
}).(StorageDefenderOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*StorageDefenderInput)(nil)).Elem(), &StorageDefender{})
pulumi.RegisterInputType(reflect.TypeOf((*StorageDefenderArrayInput)(nil)).Elem(), StorageDefenderArray{})
pulumi.RegisterInputType(reflect.TypeOf((*StorageDefenderMapInput)(nil)).Elem(), StorageDefenderMap{})
pulumi.RegisterOutputType(StorageDefenderOutput{})
pulumi.RegisterOutputType(StorageDefenderArrayOutput{})
pulumi.RegisterOutputType(StorageDefenderMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/securitycenter/setting.go | sdk/go/azure/securitycenter/setting.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package securitycenter
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the Data Access Settings for Azure Security Center.
//
// > **Note:** This resource requires the `Owner` permission on the Subscription.
//
// > **Note:** Deletion of this resource disables the setting.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/securitycenter"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := securitycenter.NewSetting(ctx, "example", &securitycenter.SettingArgs{
// SettingName: pulumi.String("MCAS"),
// Enabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Security` - 2022-05-01
//
// ## Import
//
// The setting can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:securitycenter/setting:Setting example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/settings/<setting_name>
// ```
type Setting struct {
pulumi.CustomResourceState
// Boolean flag to enable/disable data access.
Enabled pulumi.BoolOutput `pulumi:"enabled"`
// The setting to manage. Possible values are `MCAS` , `WDATP`, `WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW`, `WDATP_UNIFIED_SOLUTION` and `Sentinel`. Changing this forces a new resource to be created.
SettingName pulumi.StringOutput `pulumi:"settingName"`
}
// NewSetting registers a new resource with the given unique name, arguments, and options.
func NewSetting(ctx *pulumi.Context,
name string, args *SettingArgs, opts ...pulumi.ResourceOption) (*Setting, 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.SettingName == nil {
return nil, errors.New("invalid value for required argument 'SettingName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Setting
err := ctx.RegisterResource("azure:securitycenter/setting:Setting", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSetting gets an existing Setting 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 GetSetting(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SettingState, opts ...pulumi.ResourceOption) (*Setting, error) {
var resource Setting
err := ctx.ReadResource("azure:securitycenter/setting:Setting", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Setting resources.
type settingState struct {
// Boolean flag to enable/disable data access.
Enabled *bool `pulumi:"enabled"`
// The setting to manage. Possible values are `MCAS` , `WDATP`, `WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW`, `WDATP_UNIFIED_SOLUTION` and `Sentinel`. Changing this forces a new resource to be created.
SettingName *string `pulumi:"settingName"`
}
type SettingState struct {
// Boolean flag to enable/disable data access.
Enabled pulumi.BoolPtrInput
// The setting to manage. Possible values are `MCAS` , `WDATP`, `WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW`, `WDATP_UNIFIED_SOLUTION` and `Sentinel`. Changing this forces a new resource to be created.
SettingName pulumi.StringPtrInput
}
func (SettingState) ElementType() reflect.Type {
return reflect.TypeOf((*settingState)(nil)).Elem()
}
type settingArgs struct {
// Boolean flag to enable/disable data access.
Enabled bool `pulumi:"enabled"`
// The setting to manage. Possible values are `MCAS` , `WDATP`, `WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW`, `WDATP_UNIFIED_SOLUTION` and `Sentinel`. Changing this forces a new resource to be created.
SettingName string `pulumi:"settingName"`
}
// The set of arguments for constructing a Setting resource.
type SettingArgs struct {
// Boolean flag to enable/disable data access.
Enabled pulumi.BoolInput
// The setting to manage. Possible values are `MCAS` , `WDATP`, `WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW`, `WDATP_UNIFIED_SOLUTION` and `Sentinel`. Changing this forces a new resource to be created.
SettingName pulumi.StringInput
}
func (SettingArgs) ElementType() reflect.Type {
return reflect.TypeOf((*settingArgs)(nil)).Elem()
}
type SettingInput interface {
pulumi.Input
ToSettingOutput() SettingOutput
ToSettingOutputWithContext(ctx context.Context) SettingOutput
}
func (*Setting) ElementType() reflect.Type {
return reflect.TypeOf((**Setting)(nil)).Elem()
}
func (i *Setting) ToSettingOutput() SettingOutput {
return i.ToSettingOutputWithContext(context.Background())
}
func (i *Setting) ToSettingOutputWithContext(ctx context.Context) SettingOutput {
return pulumi.ToOutputWithContext(ctx, i).(SettingOutput)
}
// SettingArrayInput is an input type that accepts SettingArray and SettingArrayOutput values.
// You can construct a concrete instance of `SettingArrayInput` via:
//
// SettingArray{ SettingArgs{...} }
type SettingArrayInput interface {
pulumi.Input
ToSettingArrayOutput() SettingArrayOutput
ToSettingArrayOutputWithContext(context.Context) SettingArrayOutput
}
type SettingArray []SettingInput
func (SettingArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Setting)(nil)).Elem()
}
func (i SettingArray) ToSettingArrayOutput() SettingArrayOutput {
return i.ToSettingArrayOutputWithContext(context.Background())
}
func (i SettingArray) ToSettingArrayOutputWithContext(ctx context.Context) SettingArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SettingArrayOutput)
}
// SettingMapInput is an input type that accepts SettingMap and SettingMapOutput values.
// You can construct a concrete instance of `SettingMapInput` via:
//
// SettingMap{ "key": SettingArgs{...} }
type SettingMapInput interface {
pulumi.Input
ToSettingMapOutput() SettingMapOutput
ToSettingMapOutputWithContext(context.Context) SettingMapOutput
}
type SettingMap map[string]SettingInput
func (SettingMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Setting)(nil)).Elem()
}
func (i SettingMap) ToSettingMapOutput() SettingMapOutput {
return i.ToSettingMapOutputWithContext(context.Background())
}
func (i SettingMap) ToSettingMapOutputWithContext(ctx context.Context) SettingMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SettingMapOutput)
}
type SettingOutput struct{ *pulumi.OutputState }
func (SettingOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Setting)(nil)).Elem()
}
func (o SettingOutput) ToSettingOutput() SettingOutput {
return o
}
func (o SettingOutput) ToSettingOutputWithContext(ctx context.Context) SettingOutput {
return o
}
// Boolean flag to enable/disable data access.
func (o SettingOutput) Enabled() pulumi.BoolOutput {
return o.ApplyT(func(v *Setting) pulumi.BoolOutput { return v.Enabled }).(pulumi.BoolOutput)
}
// The setting to manage. Possible values are `MCAS` , `WDATP`, `WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW`, `WDATP_UNIFIED_SOLUTION` and `Sentinel`. Changing this forces a new resource to be created.
func (o SettingOutput) SettingName() pulumi.StringOutput {
return o.ApplyT(func(v *Setting) pulumi.StringOutput { return v.SettingName }).(pulumi.StringOutput)
}
type SettingArrayOutput struct{ *pulumi.OutputState }
func (SettingArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Setting)(nil)).Elem()
}
func (o SettingArrayOutput) ToSettingArrayOutput() SettingArrayOutput {
return o
}
func (o SettingArrayOutput) ToSettingArrayOutputWithContext(ctx context.Context) SettingArrayOutput {
return o
}
func (o SettingArrayOutput) Index(i pulumi.IntInput) SettingOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Setting {
return vs[0].([]*Setting)[vs[1].(int)]
}).(SettingOutput)
}
type SettingMapOutput struct{ *pulumi.OutputState }
func (SettingMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Setting)(nil)).Elem()
}
func (o SettingMapOutput) ToSettingMapOutput() SettingMapOutput {
return o
}
func (o SettingMapOutput) ToSettingMapOutputWithContext(ctx context.Context) SettingMapOutput {
return o
}
func (o SettingMapOutput) MapIndex(k pulumi.StringInput) SettingOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Setting {
return vs[0].(map[string]*Setting)[vs[1].(string)]
}).(SettingOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SettingInput)(nil)).Elem(), &Setting{})
pulumi.RegisterInputType(reflect.TypeOf((*SettingArrayInput)(nil)).Elem(), SettingArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SettingMapInput)(nil)).Elem(), SettingMap{})
pulumi.RegisterOutputType(SettingOutput{})
pulumi.RegisterOutputType(SettingArrayOutput{})
pulumi.RegisterOutputType(SettingMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/securitycenter/serverVulnerabilityAssessmentsSetting.go | sdk/go/azure/securitycenter/serverVulnerabilityAssessmentsSetting.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package securitycenter
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the Server Vulnerability Assesments Setting for Azure Security Center.
//
// > **Note:** This resource requires the `Owner` permission on the Subscription.
//
// > **Note:** Deletion of this resource disables the setting.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/securitycenter"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := securitycenter.NewServerVulnerabilityAssessmentsSetting(ctx, "example", &securitycenter.ServerVulnerabilityAssessmentsSettingArgs{
// VulnerabilityAssessmentProvider: pulumi.String("MdeTvm"),
// })
// 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.Security` - 2023-05-01
//
// ## Import
//
// The setting can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:securitycenter/serverVulnerabilityAssessmentsSetting:ServerVulnerabilityAssessmentsSetting example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/serverVulnerabilityAssessmentsSettings/AzureServersSetting
// ```
type ServerVulnerabilityAssessmentsSetting struct {
pulumi.CustomResourceState
// The vulnerability assesment provider to use. The only possible values is `MdeTvm`.
VulnerabilityAssessmentProvider pulumi.StringOutput `pulumi:"vulnerabilityAssessmentProvider"`
}
// NewServerVulnerabilityAssessmentsSetting registers a new resource with the given unique name, arguments, and options.
func NewServerVulnerabilityAssessmentsSetting(ctx *pulumi.Context,
name string, args *ServerVulnerabilityAssessmentsSettingArgs, opts ...pulumi.ResourceOption) (*ServerVulnerabilityAssessmentsSetting, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.VulnerabilityAssessmentProvider == nil {
return nil, errors.New("invalid value for required argument 'VulnerabilityAssessmentProvider'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServerVulnerabilityAssessmentsSetting
err := ctx.RegisterResource("azure:securitycenter/serverVulnerabilityAssessmentsSetting:ServerVulnerabilityAssessmentsSetting", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServerVulnerabilityAssessmentsSetting gets an existing ServerVulnerabilityAssessmentsSetting 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 GetServerVulnerabilityAssessmentsSetting(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServerVulnerabilityAssessmentsSettingState, opts ...pulumi.ResourceOption) (*ServerVulnerabilityAssessmentsSetting, error) {
var resource ServerVulnerabilityAssessmentsSetting
err := ctx.ReadResource("azure:securitycenter/serverVulnerabilityAssessmentsSetting:ServerVulnerabilityAssessmentsSetting", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServerVulnerabilityAssessmentsSetting resources.
type serverVulnerabilityAssessmentsSettingState struct {
// The vulnerability assesment provider to use. The only possible values is `MdeTvm`.
VulnerabilityAssessmentProvider *string `pulumi:"vulnerabilityAssessmentProvider"`
}
type ServerVulnerabilityAssessmentsSettingState struct {
// The vulnerability assesment provider to use. The only possible values is `MdeTvm`.
VulnerabilityAssessmentProvider pulumi.StringPtrInput
}
func (ServerVulnerabilityAssessmentsSettingState) ElementType() reflect.Type {
return reflect.TypeOf((*serverVulnerabilityAssessmentsSettingState)(nil)).Elem()
}
type serverVulnerabilityAssessmentsSettingArgs struct {
// The vulnerability assesment provider to use. The only possible values is `MdeTvm`.
VulnerabilityAssessmentProvider string `pulumi:"vulnerabilityAssessmentProvider"`
}
// The set of arguments for constructing a ServerVulnerabilityAssessmentsSetting resource.
type ServerVulnerabilityAssessmentsSettingArgs struct {
// The vulnerability assesment provider to use. The only possible values is `MdeTvm`.
VulnerabilityAssessmentProvider pulumi.StringInput
}
func (ServerVulnerabilityAssessmentsSettingArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serverVulnerabilityAssessmentsSettingArgs)(nil)).Elem()
}
type ServerVulnerabilityAssessmentsSettingInput interface {
pulumi.Input
ToServerVulnerabilityAssessmentsSettingOutput() ServerVulnerabilityAssessmentsSettingOutput
ToServerVulnerabilityAssessmentsSettingOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentsSettingOutput
}
func (*ServerVulnerabilityAssessmentsSetting) ElementType() reflect.Type {
return reflect.TypeOf((**ServerVulnerabilityAssessmentsSetting)(nil)).Elem()
}
func (i *ServerVulnerabilityAssessmentsSetting) ToServerVulnerabilityAssessmentsSettingOutput() ServerVulnerabilityAssessmentsSettingOutput {
return i.ToServerVulnerabilityAssessmentsSettingOutputWithContext(context.Background())
}
func (i *ServerVulnerabilityAssessmentsSetting) ToServerVulnerabilityAssessmentsSettingOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentsSettingOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerVulnerabilityAssessmentsSettingOutput)
}
// ServerVulnerabilityAssessmentsSettingArrayInput is an input type that accepts ServerVulnerabilityAssessmentsSettingArray and ServerVulnerabilityAssessmentsSettingArrayOutput values.
// You can construct a concrete instance of `ServerVulnerabilityAssessmentsSettingArrayInput` via:
//
// ServerVulnerabilityAssessmentsSettingArray{ ServerVulnerabilityAssessmentsSettingArgs{...} }
type ServerVulnerabilityAssessmentsSettingArrayInput interface {
pulumi.Input
ToServerVulnerabilityAssessmentsSettingArrayOutput() ServerVulnerabilityAssessmentsSettingArrayOutput
ToServerVulnerabilityAssessmentsSettingArrayOutputWithContext(context.Context) ServerVulnerabilityAssessmentsSettingArrayOutput
}
type ServerVulnerabilityAssessmentsSettingArray []ServerVulnerabilityAssessmentsSettingInput
func (ServerVulnerabilityAssessmentsSettingArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerVulnerabilityAssessmentsSetting)(nil)).Elem()
}
func (i ServerVulnerabilityAssessmentsSettingArray) ToServerVulnerabilityAssessmentsSettingArrayOutput() ServerVulnerabilityAssessmentsSettingArrayOutput {
return i.ToServerVulnerabilityAssessmentsSettingArrayOutputWithContext(context.Background())
}
func (i ServerVulnerabilityAssessmentsSettingArray) ToServerVulnerabilityAssessmentsSettingArrayOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentsSettingArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerVulnerabilityAssessmentsSettingArrayOutput)
}
// ServerVulnerabilityAssessmentsSettingMapInput is an input type that accepts ServerVulnerabilityAssessmentsSettingMap and ServerVulnerabilityAssessmentsSettingMapOutput values.
// You can construct a concrete instance of `ServerVulnerabilityAssessmentsSettingMapInput` via:
//
// ServerVulnerabilityAssessmentsSettingMap{ "key": ServerVulnerabilityAssessmentsSettingArgs{...} }
type ServerVulnerabilityAssessmentsSettingMapInput interface {
pulumi.Input
ToServerVulnerabilityAssessmentsSettingMapOutput() ServerVulnerabilityAssessmentsSettingMapOutput
ToServerVulnerabilityAssessmentsSettingMapOutputWithContext(context.Context) ServerVulnerabilityAssessmentsSettingMapOutput
}
type ServerVulnerabilityAssessmentsSettingMap map[string]ServerVulnerabilityAssessmentsSettingInput
func (ServerVulnerabilityAssessmentsSettingMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerVulnerabilityAssessmentsSetting)(nil)).Elem()
}
func (i ServerVulnerabilityAssessmentsSettingMap) ToServerVulnerabilityAssessmentsSettingMapOutput() ServerVulnerabilityAssessmentsSettingMapOutput {
return i.ToServerVulnerabilityAssessmentsSettingMapOutputWithContext(context.Background())
}
func (i ServerVulnerabilityAssessmentsSettingMap) ToServerVulnerabilityAssessmentsSettingMapOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentsSettingMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerVulnerabilityAssessmentsSettingMapOutput)
}
type ServerVulnerabilityAssessmentsSettingOutput struct{ *pulumi.OutputState }
func (ServerVulnerabilityAssessmentsSettingOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServerVulnerabilityAssessmentsSetting)(nil)).Elem()
}
func (o ServerVulnerabilityAssessmentsSettingOutput) ToServerVulnerabilityAssessmentsSettingOutput() ServerVulnerabilityAssessmentsSettingOutput {
return o
}
func (o ServerVulnerabilityAssessmentsSettingOutput) ToServerVulnerabilityAssessmentsSettingOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentsSettingOutput {
return o
}
// The vulnerability assesment provider to use. The only possible values is `MdeTvm`.
func (o ServerVulnerabilityAssessmentsSettingOutput) VulnerabilityAssessmentProvider() pulumi.StringOutput {
return o.ApplyT(func(v *ServerVulnerabilityAssessmentsSetting) pulumi.StringOutput {
return v.VulnerabilityAssessmentProvider
}).(pulumi.StringOutput)
}
type ServerVulnerabilityAssessmentsSettingArrayOutput struct{ *pulumi.OutputState }
func (ServerVulnerabilityAssessmentsSettingArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerVulnerabilityAssessmentsSetting)(nil)).Elem()
}
func (o ServerVulnerabilityAssessmentsSettingArrayOutput) ToServerVulnerabilityAssessmentsSettingArrayOutput() ServerVulnerabilityAssessmentsSettingArrayOutput {
return o
}
func (o ServerVulnerabilityAssessmentsSettingArrayOutput) ToServerVulnerabilityAssessmentsSettingArrayOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentsSettingArrayOutput {
return o
}
func (o ServerVulnerabilityAssessmentsSettingArrayOutput) Index(i pulumi.IntInput) ServerVulnerabilityAssessmentsSettingOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServerVulnerabilityAssessmentsSetting {
return vs[0].([]*ServerVulnerabilityAssessmentsSetting)[vs[1].(int)]
}).(ServerVulnerabilityAssessmentsSettingOutput)
}
type ServerVulnerabilityAssessmentsSettingMapOutput struct{ *pulumi.OutputState }
func (ServerVulnerabilityAssessmentsSettingMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerVulnerabilityAssessmentsSetting)(nil)).Elem()
}
func (o ServerVulnerabilityAssessmentsSettingMapOutput) ToServerVulnerabilityAssessmentsSettingMapOutput() ServerVulnerabilityAssessmentsSettingMapOutput {
return o
}
func (o ServerVulnerabilityAssessmentsSettingMapOutput) ToServerVulnerabilityAssessmentsSettingMapOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentsSettingMapOutput {
return o
}
func (o ServerVulnerabilityAssessmentsSettingMapOutput) MapIndex(k pulumi.StringInput) ServerVulnerabilityAssessmentsSettingOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServerVulnerabilityAssessmentsSetting {
return vs[0].(map[string]*ServerVulnerabilityAssessmentsSetting)[vs[1].(string)]
}).(ServerVulnerabilityAssessmentsSettingOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServerVulnerabilityAssessmentsSettingInput)(nil)).Elem(), &ServerVulnerabilityAssessmentsSetting{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerVulnerabilityAssessmentsSettingArrayInput)(nil)).Elem(), ServerVulnerabilityAssessmentsSettingArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerVulnerabilityAssessmentsSettingMapInput)(nil)).Elem(), ServerVulnerabilityAssessmentsSettingMap{})
pulumi.RegisterOutputType(ServerVulnerabilityAssessmentsSettingOutput{})
pulumi.RegisterOutputType(ServerVulnerabilityAssessmentsSettingArrayOutput{})
pulumi.RegisterOutputType(ServerVulnerabilityAssessmentsSettingMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/securitycenter/serverVulnerabilityAssessmentVirtualMachine.go | sdk/go/azure/securitycenter/serverVulnerabilityAssessmentVirtualMachine.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package securitycenter
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 Server Vulnerability Assessment (Qualys) to a VM.
//
// > **Note:** Azure Defender has to be enabled on the subscription in order for this resource to work.
// See this [documentation](https://docs.microsoft.com/azure/security-center/security-center-get-started) to get started.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/securitycenter"
// "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"),
// ResourceGroupName: example.Name,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("192.168.1.0/24"),
// },
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("example-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("192.168.1.0/24"),
// },
// })
// if err != nil {
// return err
// }
// exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{
// Name: pulumi.String("example-nic"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// IpConfigurations: network.NetworkInterfaceIpConfigurationArray{
// &network.NetworkInterfaceIpConfigurationArgs{
// Name: pulumi.String("vm-example"),
// SubnetId: exampleSubnet.ID(),
// PrivateIpAddressAllocation: pulumi.String("Dynamic"),
// },
// },
// })
// if err != nil {
// return err
// }
// exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "example", &compute.LinuxVirtualMachineArgs{
// Name: pulumi.String("example-vm"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Size: pulumi.String("Standard_B1s"),
// AdminUsername: pulumi.String("testadmin"),
// AdminPassword: pulumi.String("Password1234!"),
// DisablePasswordAuthentication: pulumi.Bool(false),
// SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{
// Publisher: pulumi.String("Canonical"),
// Offer: pulumi.String("0001-com-ubuntu-server-jammy"),
// Sku: pulumi.String("22_04-lts"),
// Version: pulumi.String("latest"),
// },
// OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{
// Caching: pulumi.String("ReadWrite"),
// StorageAccountType: pulumi.String("Standard_LRS"),
// },
// NetworkInterfaceIds: pulumi.StringArray{
// exampleNetworkInterface.ID(),
// },
// })
// if err != nil {
// return err
// }
// _, err = securitycenter.NewServerVulnerabilityAssessmentVirtualMachine(ctx, "example", &securitycenter.ServerVulnerabilityAssessmentVirtualMachineArgs{
// VirtualMachineId: exampleLinuxVirtualMachine.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Server Vulnerability Assessments can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:securitycenter/serverVulnerabilityAssessmentVirtualMachine:ServerVulnerabilityAssessmentVirtualMachine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.Compute/virtualMachines/vm-name/providers/Microsoft.Security/serverVulnerabilityAssessments/Default
// ```
type ServerVulnerabilityAssessmentVirtualMachine struct {
pulumi.CustomResourceState
// The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
VirtualMachineId pulumi.StringOutput `pulumi:"virtualMachineId"`
}
// NewServerVulnerabilityAssessmentVirtualMachine registers a new resource with the given unique name, arguments, and options.
func NewServerVulnerabilityAssessmentVirtualMachine(ctx *pulumi.Context,
name string, args *ServerVulnerabilityAssessmentVirtualMachineArgs, opts ...pulumi.ResourceOption) (*ServerVulnerabilityAssessmentVirtualMachine, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.VirtualMachineId == nil {
return nil, errors.New("invalid value for required argument 'VirtualMachineId'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:securitycenter/serverVulnerabilityAssessment:ServerVulnerabilityAssessment"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServerVulnerabilityAssessmentVirtualMachine
err := ctx.RegisterResource("azure:securitycenter/serverVulnerabilityAssessmentVirtualMachine:ServerVulnerabilityAssessmentVirtualMachine", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServerVulnerabilityAssessmentVirtualMachine gets an existing ServerVulnerabilityAssessmentVirtualMachine 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 GetServerVulnerabilityAssessmentVirtualMachine(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServerVulnerabilityAssessmentVirtualMachineState, opts ...pulumi.ResourceOption) (*ServerVulnerabilityAssessmentVirtualMachine, error) {
var resource ServerVulnerabilityAssessmentVirtualMachine
err := ctx.ReadResource("azure:securitycenter/serverVulnerabilityAssessmentVirtualMachine:ServerVulnerabilityAssessmentVirtualMachine", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServerVulnerabilityAssessmentVirtualMachine resources.
type serverVulnerabilityAssessmentVirtualMachineState struct {
// The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
VirtualMachineId *string `pulumi:"virtualMachineId"`
}
type ServerVulnerabilityAssessmentVirtualMachineState struct {
// The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
VirtualMachineId pulumi.StringPtrInput
}
func (ServerVulnerabilityAssessmentVirtualMachineState) ElementType() reflect.Type {
return reflect.TypeOf((*serverVulnerabilityAssessmentVirtualMachineState)(nil)).Elem()
}
type serverVulnerabilityAssessmentVirtualMachineArgs struct {
// The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
VirtualMachineId string `pulumi:"virtualMachineId"`
}
// The set of arguments for constructing a ServerVulnerabilityAssessmentVirtualMachine resource.
type ServerVulnerabilityAssessmentVirtualMachineArgs struct {
// The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
VirtualMachineId pulumi.StringInput
}
func (ServerVulnerabilityAssessmentVirtualMachineArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serverVulnerabilityAssessmentVirtualMachineArgs)(nil)).Elem()
}
type ServerVulnerabilityAssessmentVirtualMachineInput interface {
pulumi.Input
ToServerVulnerabilityAssessmentVirtualMachineOutput() ServerVulnerabilityAssessmentVirtualMachineOutput
ToServerVulnerabilityAssessmentVirtualMachineOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentVirtualMachineOutput
}
func (*ServerVulnerabilityAssessmentVirtualMachine) ElementType() reflect.Type {
return reflect.TypeOf((**ServerVulnerabilityAssessmentVirtualMachine)(nil)).Elem()
}
func (i *ServerVulnerabilityAssessmentVirtualMachine) ToServerVulnerabilityAssessmentVirtualMachineOutput() ServerVulnerabilityAssessmentVirtualMachineOutput {
return i.ToServerVulnerabilityAssessmentVirtualMachineOutputWithContext(context.Background())
}
func (i *ServerVulnerabilityAssessmentVirtualMachine) ToServerVulnerabilityAssessmentVirtualMachineOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentVirtualMachineOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerVulnerabilityAssessmentVirtualMachineOutput)
}
// ServerVulnerabilityAssessmentVirtualMachineArrayInput is an input type that accepts ServerVulnerabilityAssessmentVirtualMachineArray and ServerVulnerabilityAssessmentVirtualMachineArrayOutput values.
// You can construct a concrete instance of `ServerVulnerabilityAssessmentVirtualMachineArrayInput` via:
//
// ServerVulnerabilityAssessmentVirtualMachineArray{ ServerVulnerabilityAssessmentVirtualMachineArgs{...} }
type ServerVulnerabilityAssessmentVirtualMachineArrayInput interface {
pulumi.Input
ToServerVulnerabilityAssessmentVirtualMachineArrayOutput() ServerVulnerabilityAssessmentVirtualMachineArrayOutput
ToServerVulnerabilityAssessmentVirtualMachineArrayOutputWithContext(context.Context) ServerVulnerabilityAssessmentVirtualMachineArrayOutput
}
type ServerVulnerabilityAssessmentVirtualMachineArray []ServerVulnerabilityAssessmentVirtualMachineInput
func (ServerVulnerabilityAssessmentVirtualMachineArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerVulnerabilityAssessmentVirtualMachine)(nil)).Elem()
}
func (i ServerVulnerabilityAssessmentVirtualMachineArray) ToServerVulnerabilityAssessmentVirtualMachineArrayOutput() ServerVulnerabilityAssessmentVirtualMachineArrayOutput {
return i.ToServerVulnerabilityAssessmentVirtualMachineArrayOutputWithContext(context.Background())
}
func (i ServerVulnerabilityAssessmentVirtualMachineArray) ToServerVulnerabilityAssessmentVirtualMachineArrayOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentVirtualMachineArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerVulnerabilityAssessmentVirtualMachineArrayOutput)
}
// ServerVulnerabilityAssessmentVirtualMachineMapInput is an input type that accepts ServerVulnerabilityAssessmentVirtualMachineMap and ServerVulnerabilityAssessmentVirtualMachineMapOutput values.
// You can construct a concrete instance of `ServerVulnerabilityAssessmentVirtualMachineMapInput` via:
//
// ServerVulnerabilityAssessmentVirtualMachineMap{ "key": ServerVulnerabilityAssessmentVirtualMachineArgs{...} }
type ServerVulnerabilityAssessmentVirtualMachineMapInput interface {
pulumi.Input
ToServerVulnerabilityAssessmentVirtualMachineMapOutput() ServerVulnerabilityAssessmentVirtualMachineMapOutput
ToServerVulnerabilityAssessmentVirtualMachineMapOutputWithContext(context.Context) ServerVulnerabilityAssessmentVirtualMachineMapOutput
}
type ServerVulnerabilityAssessmentVirtualMachineMap map[string]ServerVulnerabilityAssessmentVirtualMachineInput
func (ServerVulnerabilityAssessmentVirtualMachineMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerVulnerabilityAssessmentVirtualMachine)(nil)).Elem()
}
func (i ServerVulnerabilityAssessmentVirtualMachineMap) ToServerVulnerabilityAssessmentVirtualMachineMapOutput() ServerVulnerabilityAssessmentVirtualMachineMapOutput {
return i.ToServerVulnerabilityAssessmentVirtualMachineMapOutputWithContext(context.Background())
}
func (i ServerVulnerabilityAssessmentVirtualMachineMap) ToServerVulnerabilityAssessmentVirtualMachineMapOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentVirtualMachineMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerVulnerabilityAssessmentVirtualMachineMapOutput)
}
type ServerVulnerabilityAssessmentVirtualMachineOutput struct{ *pulumi.OutputState }
func (ServerVulnerabilityAssessmentVirtualMachineOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServerVulnerabilityAssessmentVirtualMachine)(nil)).Elem()
}
func (o ServerVulnerabilityAssessmentVirtualMachineOutput) ToServerVulnerabilityAssessmentVirtualMachineOutput() ServerVulnerabilityAssessmentVirtualMachineOutput {
return o
}
func (o ServerVulnerabilityAssessmentVirtualMachineOutput) ToServerVulnerabilityAssessmentVirtualMachineOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentVirtualMachineOutput {
return o
}
// The ID of the virtual machine to be monitored by vulnerability assessment. Changing this forces a new resource to be created.
func (o ServerVulnerabilityAssessmentVirtualMachineOutput) VirtualMachineId() pulumi.StringOutput {
return o.ApplyT(func(v *ServerVulnerabilityAssessmentVirtualMachine) pulumi.StringOutput { return v.VirtualMachineId }).(pulumi.StringOutput)
}
type ServerVulnerabilityAssessmentVirtualMachineArrayOutput struct{ *pulumi.OutputState }
func (ServerVulnerabilityAssessmentVirtualMachineArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServerVulnerabilityAssessmentVirtualMachine)(nil)).Elem()
}
func (o ServerVulnerabilityAssessmentVirtualMachineArrayOutput) ToServerVulnerabilityAssessmentVirtualMachineArrayOutput() ServerVulnerabilityAssessmentVirtualMachineArrayOutput {
return o
}
func (o ServerVulnerabilityAssessmentVirtualMachineArrayOutput) ToServerVulnerabilityAssessmentVirtualMachineArrayOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentVirtualMachineArrayOutput {
return o
}
func (o ServerVulnerabilityAssessmentVirtualMachineArrayOutput) Index(i pulumi.IntInput) ServerVulnerabilityAssessmentVirtualMachineOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServerVulnerabilityAssessmentVirtualMachine {
return vs[0].([]*ServerVulnerabilityAssessmentVirtualMachine)[vs[1].(int)]
}).(ServerVulnerabilityAssessmentVirtualMachineOutput)
}
type ServerVulnerabilityAssessmentVirtualMachineMapOutput struct{ *pulumi.OutputState }
func (ServerVulnerabilityAssessmentVirtualMachineMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServerVulnerabilityAssessmentVirtualMachine)(nil)).Elem()
}
func (o ServerVulnerabilityAssessmentVirtualMachineMapOutput) ToServerVulnerabilityAssessmentVirtualMachineMapOutput() ServerVulnerabilityAssessmentVirtualMachineMapOutput {
return o
}
func (o ServerVulnerabilityAssessmentVirtualMachineMapOutput) ToServerVulnerabilityAssessmentVirtualMachineMapOutputWithContext(ctx context.Context) ServerVulnerabilityAssessmentVirtualMachineMapOutput {
return o
}
func (o ServerVulnerabilityAssessmentVirtualMachineMapOutput) MapIndex(k pulumi.StringInput) ServerVulnerabilityAssessmentVirtualMachineOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServerVulnerabilityAssessmentVirtualMachine {
return vs[0].(map[string]*ServerVulnerabilityAssessmentVirtualMachine)[vs[1].(string)]
}).(ServerVulnerabilityAssessmentVirtualMachineOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServerVulnerabilityAssessmentVirtualMachineInput)(nil)).Elem(), &ServerVulnerabilityAssessmentVirtualMachine{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerVulnerabilityAssessmentVirtualMachineArrayInput)(nil)).Elem(), ServerVulnerabilityAssessmentVirtualMachineArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerVulnerabilityAssessmentVirtualMachineMapInput)(nil)).Elem(), ServerVulnerabilityAssessmentVirtualMachineMap{})
pulumi.RegisterOutputType(ServerVulnerabilityAssessmentVirtualMachineOutput{})
pulumi.RegisterOutputType(ServerVulnerabilityAssessmentVirtualMachineArrayOutput{})
pulumi.RegisterOutputType(ServerVulnerabilityAssessmentVirtualMachineMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/securitycenter/workspace.go | sdk/go/azure/securitycenter/workspace.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package securitycenter
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the subscription's Security Center Workspace.
//
// > **Note:** Owner access permission is required.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/operationalinsights"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/securitycenter"
// "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-security-workspace"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
// Name: pulumi.String("tfex-security-workspace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("PerGB2018"),
// })
// if err != nil {
// return err
// }
// _, err = securitycenter.NewWorkspace(ctx, "example", &securitycenter.WorkspaceArgs{
// Scope: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000"),
// WorkspaceId: exampleAnalyticsWorkspace.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// The contact can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:securitycenter/workspace:Workspace example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/workspaceSettings/default
// ```
type Workspace struct {
pulumi.CustomResourceState
// The scope of VMs to send their security data to the desired workspace, unless overridden by a setting with more specific scope.
Scope pulumi.StringOutput `pulumi:"scope"`
// The ID of the Log Analytics Workspace to save the data in.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
}
// NewWorkspace registers a new resource with the given unique name, arguments, and options.
func NewWorkspace(ctx *pulumi.Context,
name string, args *WorkspaceArgs, opts ...pulumi.ResourceOption) (*Workspace, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Scope == nil {
return nil, errors.New("invalid value for required argument 'Scope'")
}
if args.WorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Workspace
err := ctx.RegisterResource("azure:securitycenter/workspace:Workspace", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWorkspace gets an existing Workspace resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetWorkspace(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WorkspaceState, opts ...pulumi.ResourceOption) (*Workspace, error) {
var resource Workspace
err := ctx.ReadResource("azure:securitycenter/workspace:Workspace", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Workspace resources.
type workspaceState struct {
// The scope of VMs to send their security data to the desired workspace, unless overridden by a setting with more specific scope.
Scope *string `pulumi:"scope"`
// The ID of the Log Analytics Workspace to save the data in.
WorkspaceId *string `pulumi:"workspaceId"`
}
type WorkspaceState struct {
// The scope of VMs to send their security data to the desired workspace, unless overridden by a setting with more specific scope.
Scope pulumi.StringPtrInput
// The ID of the Log Analytics Workspace to save the data in.
WorkspaceId pulumi.StringPtrInput
}
func (WorkspaceState) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceState)(nil)).Elem()
}
type workspaceArgs struct {
// The scope of VMs to send their security data to the desired workspace, unless overridden by a setting with more specific scope.
Scope string `pulumi:"scope"`
// The ID of the Log Analytics Workspace to save the data in.
WorkspaceId string `pulumi:"workspaceId"`
}
// The set of arguments for constructing a Workspace resource.
type WorkspaceArgs struct {
// The scope of VMs to send their security data to the desired workspace, unless overridden by a setting with more specific scope.
Scope pulumi.StringInput
// The ID of the Log Analytics Workspace to save the data in.
WorkspaceId pulumi.StringInput
}
func (WorkspaceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceArgs)(nil)).Elem()
}
type WorkspaceInput interface {
pulumi.Input
ToWorkspaceOutput() WorkspaceOutput
ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput
}
func (*Workspace) ElementType() reflect.Type {
return reflect.TypeOf((**Workspace)(nil)).Elem()
}
func (i *Workspace) ToWorkspaceOutput() WorkspaceOutput {
return i.ToWorkspaceOutputWithContext(context.Background())
}
func (i *Workspace) ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceOutput)
}
// WorkspaceArrayInput is an input type that accepts WorkspaceArray and WorkspaceArrayOutput values.
// You can construct a concrete instance of `WorkspaceArrayInput` via:
//
// WorkspaceArray{ WorkspaceArgs{...} }
type WorkspaceArrayInput interface {
pulumi.Input
ToWorkspaceArrayOutput() WorkspaceArrayOutput
ToWorkspaceArrayOutputWithContext(context.Context) WorkspaceArrayOutput
}
type WorkspaceArray []WorkspaceInput
func (WorkspaceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Workspace)(nil)).Elem()
}
func (i WorkspaceArray) ToWorkspaceArrayOutput() WorkspaceArrayOutput {
return i.ToWorkspaceArrayOutputWithContext(context.Background())
}
func (i WorkspaceArray) ToWorkspaceArrayOutputWithContext(ctx context.Context) WorkspaceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceArrayOutput)
}
// WorkspaceMapInput is an input type that accepts WorkspaceMap and WorkspaceMapOutput values.
// You can construct a concrete instance of `WorkspaceMapInput` via:
//
// WorkspaceMap{ "key": WorkspaceArgs{...} }
type WorkspaceMapInput interface {
pulumi.Input
ToWorkspaceMapOutput() WorkspaceMapOutput
ToWorkspaceMapOutputWithContext(context.Context) WorkspaceMapOutput
}
type WorkspaceMap map[string]WorkspaceInput
func (WorkspaceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Workspace)(nil)).Elem()
}
func (i WorkspaceMap) ToWorkspaceMapOutput() WorkspaceMapOutput {
return i.ToWorkspaceMapOutputWithContext(context.Background())
}
func (i WorkspaceMap) ToWorkspaceMapOutputWithContext(ctx context.Context) WorkspaceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceMapOutput)
}
type WorkspaceOutput struct{ *pulumi.OutputState }
func (WorkspaceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Workspace)(nil)).Elem()
}
func (o WorkspaceOutput) ToWorkspaceOutput() WorkspaceOutput {
return o
}
func (o WorkspaceOutput) ToWorkspaceOutputWithContext(ctx context.Context) WorkspaceOutput {
return o
}
// The scope of VMs to send their security data to the desired workspace, unless overridden by a setting with more specific scope.
func (o WorkspaceOutput) Scope() pulumi.StringOutput {
return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.Scope }).(pulumi.StringOutput)
}
// The ID of the Log Analytics Workspace to save the data in.
func (o WorkspaceOutput) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput)
}
type WorkspaceArrayOutput struct{ *pulumi.OutputState }
func (WorkspaceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Workspace)(nil)).Elem()
}
func (o WorkspaceArrayOutput) ToWorkspaceArrayOutput() WorkspaceArrayOutput {
return o
}
func (o WorkspaceArrayOutput) ToWorkspaceArrayOutputWithContext(ctx context.Context) WorkspaceArrayOutput {
return o
}
func (o WorkspaceArrayOutput) Index(i pulumi.IntInput) WorkspaceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Workspace {
return vs[0].([]*Workspace)[vs[1].(int)]
}).(WorkspaceOutput)
}
type WorkspaceMapOutput struct{ *pulumi.OutputState }
func (WorkspaceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Workspace)(nil)).Elem()
}
func (o WorkspaceMapOutput) ToWorkspaceMapOutput() WorkspaceMapOutput {
return o
}
func (o WorkspaceMapOutput) ToWorkspaceMapOutputWithContext(ctx context.Context) WorkspaceMapOutput {
return o
}
func (o WorkspaceMapOutput) MapIndex(k pulumi.StringInput) WorkspaceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Workspace {
return vs[0].(map[string]*Workspace)[vs[1].(string)]
}).(WorkspaceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceInput)(nil)).Elem(), &Workspace{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceArrayInput)(nil)).Elem(), WorkspaceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceMapInput)(nil)).Elem(), WorkspaceMap{})
pulumi.RegisterOutputType(WorkspaceOutput{})
pulumi.RegisterOutputType(WorkspaceArrayOutput{})
pulumi.RegisterOutputType(WorkspaceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/securitycenter/assessment.go | sdk/go/azure/securitycenter/assessment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package securitycenter
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the Security Center Assessment for Azure Security Center.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/securitycenter"
// "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
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-network"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// })
// if err != nil {
// return err
// }
// internal, err := network.NewSubnet(ctx, "internal", &network.SubnetArgs{
// Name: pulumi.String("internal"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// })
// if err != nil {
// return err
// }
// invokeFile, err := std.File(ctx, &std.FileArgs{
// Input: "~/.ssh/id_rsa.pub",
// }, nil)
// if err != nil {
// return err
// }
// exampleLinuxVirtualMachineScaleSet, err := compute.NewLinuxVirtualMachineScaleSet(ctx, "example", &compute.LinuxVirtualMachineScaleSetArgs{
// Name: pulumi.String("example-vmss"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: pulumi.String("Standard_F2"),
// Instances: pulumi.Int(1),
// AdminUsername: pulumi.String("adminuser"),
// AdminSshKeys: compute.LinuxVirtualMachineScaleSetAdminSshKeyArray{
// &compute.LinuxVirtualMachineScaleSetAdminSshKeyArgs{
// Username: pulumi.String("adminuser"),
// PublicKey: pulumi.String(invokeFile.Result),
// },
// },
// SourceImageReference: &compute.LinuxVirtualMachineScaleSetSourceImageReferenceArgs{
// Publisher: pulumi.String("Canonical"),
// Offer: pulumi.String("0001-com-ubuntu-server-jammy"),
// Sku: pulumi.String("22_04-lts"),
// Version: pulumi.String("latest"),
// },
// OsDisk: &compute.LinuxVirtualMachineScaleSetOsDiskArgs{
// StorageAccountType: pulumi.String("Standard_LRS"),
// Caching: pulumi.String("ReadWrite"),
// },
// NetworkInterfaces: compute.LinuxVirtualMachineScaleSetNetworkInterfaceArray{
// &compute.LinuxVirtualMachineScaleSetNetworkInterfaceArgs{
// Name: pulumi.String("example"),
// Primary: pulumi.Bool(true),
// IpConfigurations: compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArray{
// &compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs{
// Name: pulumi.String("internal"),
// Primary: pulumi.Bool(true),
// SubnetId: internal.ID(),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleAssessmentPolicy, err := securitycenter.NewAssessmentPolicy(ctx, "example", &securitycenter.AssessmentPolicyArgs{
// DisplayName: pulumi.String("Test Display Name"),
// Severity: pulumi.String("Medium"),
// Description: pulumi.String("Test Description"),
// })
// if err != nil {
// return err
// }
// _, err = securitycenter.NewAssessment(ctx, "example", &securitycenter.AssessmentArgs{
// AssessmentPolicyId: exampleAssessmentPolicy.ID(),
// TargetResourceId: exampleLinuxVirtualMachineScaleSet.ID(),
// Status: &securitycenter.AssessmentStatusArgs{
// Code: pulumi.String("Healthy"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Security Assessment can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:securitycenter/assessment:Assessment example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1/providers/Microsoft.Security/assessments/00000000-0000-0000-0000-000000000000
// ```
type Assessment struct {
pulumi.CustomResourceState
// A map of additional data to associate with the assessment.
AdditionalData pulumi.StringMapOutput `pulumi:"additionalData"`
// The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
AssessmentPolicyId pulumi.StringOutput `pulumi:"assessmentPolicyId"`
// A `status` block as defined below.
Status AssessmentStatusOutput `pulumi:"status"`
// The ID of the target resource. Changing this forces a new security Assessment to be created.
TargetResourceId pulumi.StringOutput `pulumi:"targetResourceId"`
}
// NewAssessment registers a new resource with the given unique name, arguments, and options.
func NewAssessment(ctx *pulumi.Context,
name string, args *AssessmentArgs, opts ...pulumi.ResourceOption) (*Assessment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AssessmentPolicyId == nil {
return nil, errors.New("invalid value for required argument 'AssessmentPolicyId'")
}
if args.Status == nil {
return nil, errors.New("invalid value for required argument 'Status'")
}
if args.TargetResourceId == nil {
return nil, errors.New("invalid value for required argument 'TargetResourceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Assessment
err := ctx.RegisterResource("azure:securitycenter/assessment:Assessment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAssessment gets an existing Assessment 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 GetAssessment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AssessmentState, opts ...pulumi.ResourceOption) (*Assessment, error) {
var resource Assessment
err := ctx.ReadResource("azure:securitycenter/assessment:Assessment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Assessment resources.
type assessmentState struct {
// A map of additional data to associate with the assessment.
AdditionalData map[string]string `pulumi:"additionalData"`
// The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
AssessmentPolicyId *string `pulumi:"assessmentPolicyId"`
// A `status` block as defined below.
Status *AssessmentStatus `pulumi:"status"`
// The ID of the target resource. Changing this forces a new security Assessment to be created.
TargetResourceId *string `pulumi:"targetResourceId"`
}
type AssessmentState struct {
// A map of additional data to associate with the assessment.
AdditionalData pulumi.StringMapInput
// The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
AssessmentPolicyId pulumi.StringPtrInput
// A `status` block as defined below.
Status AssessmentStatusPtrInput
// The ID of the target resource. Changing this forces a new security Assessment to be created.
TargetResourceId pulumi.StringPtrInput
}
func (AssessmentState) ElementType() reflect.Type {
return reflect.TypeOf((*assessmentState)(nil)).Elem()
}
type assessmentArgs struct {
// A map of additional data to associate with the assessment.
AdditionalData map[string]string `pulumi:"additionalData"`
// The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
AssessmentPolicyId string `pulumi:"assessmentPolicyId"`
// A `status` block as defined below.
Status AssessmentStatus `pulumi:"status"`
// The ID of the target resource. Changing this forces a new security Assessment to be created.
TargetResourceId string `pulumi:"targetResourceId"`
}
// The set of arguments for constructing a Assessment resource.
type AssessmentArgs struct {
// A map of additional data to associate with the assessment.
AdditionalData pulumi.StringMapInput
// The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
AssessmentPolicyId pulumi.StringInput
// A `status` block as defined below.
Status AssessmentStatusInput
// The ID of the target resource. Changing this forces a new security Assessment to be created.
TargetResourceId pulumi.StringInput
}
func (AssessmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*assessmentArgs)(nil)).Elem()
}
type AssessmentInput interface {
pulumi.Input
ToAssessmentOutput() AssessmentOutput
ToAssessmentOutputWithContext(ctx context.Context) AssessmentOutput
}
func (*Assessment) ElementType() reflect.Type {
return reflect.TypeOf((**Assessment)(nil)).Elem()
}
func (i *Assessment) ToAssessmentOutput() AssessmentOutput {
return i.ToAssessmentOutputWithContext(context.Background())
}
func (i *Assessment) ToAssessmentOutputWithContext(ctx context.Context) AssessmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssessmentOutput)
}
// AssessmentArrayInput is an input type that accepts AssessmentArray and AssessmentArrayOutput values.
// You can construct a concrete instance of `AssessmentArrayInput` via:
//
// AssessmentArray{ AssessmentArgs{...} }
type AssessmentArrayInput interface {
pulumi.Input
ToAssessmentArrayOutput() AssessmentArrayOutput
ToAssessmentArrayOutputWithContext(context.Context) AssessmentArrayOutput
}
type AssessmentArray []AssessmentInput
func (AssessmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Assessment)(nil)).Elem()
}
func (i AssessmentArray) ToAssessmentArrayOutput() AssessmentArrayOutput {
return i.ToAssessmentArrayOutputWithContext(context.Background())
}
func (i AssessmentArray) ToAssessmentArrayOutputWithContext(ctx context.Context) AssessmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssessmentArrayOutput)
}
// AssessmentMapInput is an input type that accepts AssessmentMap and AssessmentMapOutput values.
// You can construct a concrete instance of `AssessmentMapInput` via:
//
// AssessmentMap{ "key": AssessmentArgs{...} }
type AssessmentMapInput interface {
pulumi.Input
ToAssessmentMapOutput() AssessmentMapOutput
ToAssessmentMapOutputWithContext(context.Context) AssessmentMapOutput
}
type AssessmentMap map[string]AssessmentInput
func (AssessmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Assessment)(nil)).Elem()
}
func (i AssessmentMap) ToAssessmentMapOutput() AssessmentMapOutput {
return i.ToAssessmentMapOutputWithContext(context.Background())
}
func (i AssessmentMap) ToAssessmentMapOutputWithContext(ctx context.Context) AssessmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssessmentMapOutput)
}
type AssessmentOutput struct{ *pulumi.OutputState }
func (AssessmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Assessment)(nil)).Elem()
}
func (o AssessmentOutput) ToAssessmentOutput() AssessmentOutput {
return o
}
func (o AssessmentOutput) ToAssessmentOutputWithContext(ctx context.Context) AssessmentOutput {
return o
}
// A map of additional data to associate with the assessment.
func (o AssessmentOutput) AdditionalData() pulumi.StringMapOutput {
return o.ApplyT(func(v *Assessment) pulumi.StringMapOutput { return v.AdditionalData }).(pulumi.StringMapOutput)
}
// The ID of the security Assessment policy to apply to this resource. Changing this forces a new security Assessment to be created.
func (o AssessmentOutput) AssessmentPolicyId() pulumi.StringOutput {
return o.ApplyT(func(v *Assessment) pulumi.StringOutput { return v.AssessmentPolicyId }).(pulumi.StringOutput)
}
// A `status` block as defined below.
func (o AssessmentOutput) Status() AssessmentStatusOutput {
return o.ApplyT(func(v *Assessment) AssessmentStatusOutput { return v.Status }).(AssessmentStatusOutput)
}
// The ID of the target resource. Changing this forces a new security Assessment to be created.
func (o AssessmentOutput) TargetResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *Assessment) pulumi.StringOutput { return v.TargetResourceId }).(pulumi.StringOutput)
}
type AssessmentArrayOutput struct{ *pulumi.OutputState }
func (AssessmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Assessment)(nil)).Elem()
}
func (o AssessmentArrayOutput) ToAssessmentArrayOutput() AssessmentArrayOutput {
return o
}
func (o AssessmentArrayOutput) ToAssessmentArrayOutputWithContext(ctx context.Context) AssessmentArrayOutput {
return o
}
func (o AssessmentArrayOutput) Index(i pulumi.IntInput) AssessmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Assessment {
return vs[0].([]*Assessment)[vs[1].(int)]
}).(AssessmentOutput)
}
type AssessmentMapOutput struct{ *pulumi.OutputState }
func (AssessmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Assessment)(nil)).Elem()
}
func (o AssessmentMapOutput) ToAssessmentMapOutput() AssessmentMapOutput {
return o
}
func (o AssessmentMapOutput) ToAssessmentMapOutputWithContext(ctx context.Context) AssessmentMapOutput {
return o
}
func (o AssessmentMapOutput) MapIndex(k pulumi.StringInput) AssessmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Assessment {
return vs[0].(map[string]*Assessment)[vs[1].(string)]
}).(AssessmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AssessmentInput)(nil)).Elem(), &Assessment{})
pulumi.RegisterInputType(reflect.TypeOf((*AssessmentArrayInput)(nil)).Elem(), AssessmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AssessmentMapInput)(nil)).Elem(), AssessmentMap{})
pulumi.RegisterOutputType(AssessmentOutput{})
pulumi.RegisterOutputType(AssessmentArrayOutput{})
pulumi.RegisterOutputType(AssessmentMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/blueprint/init.go | sdk/go/azure/blueprint/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 blueprint
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:blueprint/assignment:Assignment":
r = &Assignment{}
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",
"blueprint/assignment",
&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/blueprint/pulumiTypes.go | sdk/go/azure/blueprint/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 blueprint
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 AssignmentIdentity struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Blueprint.
IdentityIds []string `pulumi:"identityIds"`
PrincipalId *string `pulumi:"principalId"`
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Blueprint. Possible values are `SystemAssigned` and `UserAssigned`.
Type string `pulumi:"type"`
}
// AssignmentIdentityInput is an input type that accepts AssignmentIdentityArgs and AssignmentIdentityOutput values.
// You can construct a concrete instance of `AssignmentIdentityInput` via:
//
// AssignmentIdentityArgs{...}
type AssignmentIdentityInput interface {
pulumi.Input
ToAssignmentIdentityOutput() AssignmentIdentityOutput
ToAssignmentIdentityOutputWithContext(context.Context) AssignmentIdentityOutput
}
type AssignmentIdentityArgs struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Blueprint.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Blueprint. Possible values are `SystemAssigned` and `UserAssigned`.
Type pulumi.StringInput `pulumi:"type"`
}
func (AssignmentIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AssignmentIdentity)(nil)).Elem()
}
func (i AssignmentIdentityArgs) ToAssignmentIdentityOutput() AssignmentIdentityOutput {
return i.ToAssignmentIdentityOutputWithContext(context.Background())
}
func (i AssignmentIdentityArgs) ToAssignmentIdentityOutputWithContext(ctx context.Context) AssignmentIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentIdentityOutput)
}
func (i AssignmentIdentityArgs) ToAssignmentIdentityPtrOutput() AssignmentIdentityPtrOutput {
return i.ToAssignmentIdentityPtrOutputWithContext(context.Background())
}
func (i AssignmentIdentityArgs) ToAssignmentIdentityPtrOutputWithContext(ctx context.Context) AssignmentIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentIdentityOutput).ToAssignmentIdentityPtrOutputWithContext(ctx)
}
// AssignmentIdentityPtrInput is an input type that accepts AssignmentIdentityArgs, AssignmentIdentityPtr and AssignmentIdentityPtrOutput values.
// You can construct a concrete instance of `AssignmentIdentityPtrInput` via:
//
// AssignmentIdentityArgs{...}
//
// or:
//
// nil
type AssignmentIdentityPtrInput interface {
pulumi.Input
ToAssignmentIdentityPtrOutput() AssignmentIdentityPtrOutput
ToAssignmentIdentityPtrOutputWithContext(context.Context) AssignmentIdentityPtrOutput
}
type assignmentIdentityPtrType AssignmentIdentityArgs
func AssignmentIdentityPtr(v *AssignmentIdentityArgs) AssignmentIdentityPtrInput {
return (*assignmentIdentityPtrType)(v)
}
func (*assignmentIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AssignmentIdentity)(nil)).Elem()
}
func (i *assignmentIdentityPtrType) ToAssignmentIdentityPtrOutput() AssignmentIdentityPtrOutput {
return i.ToAssignmentIdentityPtrOutputWithContext(context.Background())
}
func (i *assignmentIdentityPtrType) ToAssignmentIdentityPtrOutputWithContext(ctx context.Context) AssignmentIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentIdentityPtrOutput)
}
type AssignmentIdentityOutput struct{ *pulumi.OutputState }
func (AssignmentIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AssignmentIdentity)(nil)).Elem()
}
func (o AssignmentIdentityOutput) ToAssignmentIdentityOutput() AssignmentIdentityOutput {
return o
}
func (o AssignmentIdentityOutput) ToAssignmentIdentityOutputWithContext(ctx context.Context) AssignmentIdentityOutput {
return o
}
func (o AssignmentIdentityOutput) ToAssignmentIdentityPtrOutput() AssignmentIdentityPtrOutput {
return o.ToAssignmentIdentityPtrOutputWithContext(context.Background())
}
func (o AssignmentIdentityOutput) ToAssignmentIdentityPtrOutputWithContext(ctx context.Context) AssignmentIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AssignmentIdentity) *AssignmentIdentity {
return &v
}).(AssignmentIdentityPtrOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Blueprint.
func (o AssignmentIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v AssignmentIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
func (o AssignmentIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AssignmentIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
func (o AssignmentIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AssignmentIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Blueprint. Possible values are `SystemAssigned` and `UserAssigned`.
func (o AssignmentIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v AssignmentIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type AssignmentIdentityPtrOutput struct{ *pulumi.OutputState }
func (AssignmentIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AssignmentIdentity)(nil)).Elem()
}
func (o AssignmentIdentityPtrOutput) ToAssignmentIdentityPtrOutput() AssignmentIdentityPtrOutput {
return o
}
func (o AssignmentIdentityPtrOutput) ToAssignmentIdentityPtrOutputWithContext(ctx context.Context) AssignmentIdentityPtrOutput {
return o
}
func (o AssignmentIdentityPtrOutput) Elem() AssignmentIdentityOutput {
return o.ApplyT(func(v *AssignmentIdentity) AssignmentIdentity {
if v != nil {
return *v
}
var ret AssignmentIdentity
return ret
}).(AssignmentIdentityOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Blueprint.
func (o AssignmentIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AssignmentIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
func (o AssignmentIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AssignmentIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
func (o AssignmentIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AssignmentIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Blueprint. Possible values are `SystemAssigned` and `UserAssigned`.
func (o AssignmentIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AssignmentIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentIdentityInput)(nil)).Elem(), AssignmentIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentIdentityPtrInput)(nil)).Elem(), AssignmentIdentityArgs{})
pulumi.RegisterOutputType(AssignmentIdentityOutput{})
pulumi.RegisterOutputType(AssignmentIdentityPtrOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/blueprint/assignment.go | sdk/go/azure/blueprint/assignment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package blueprint
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Blueprint Assignment resource
//
// > **NOTE:** Azure Blueprints are in Preview and potentially subject to breaking change without notice.
//
// > **NOTE:** Azure Blueprint Assignments can only be applied to Subscriptions. Assignments to Management Groups is not currently supported by the service or by this provider.
//
// ## 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/blueprint"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil)
// if err != nil {
// return err
// }
// exampleGetDefinition, err := blueprint.GetDefinition(ctx, &blueprint.GetDefinitionArgs{
// Name: "exampleBlueprint",
// ScopeId: example.Id,
// }, nil)
// if err != nil {
// return err
// }
// exampleGetPublishedVersion, err := blueprint.GetPublishedVersion(ctx, &blueprint.GetPublishedVersionArgs{
// ScopeId: exampleGetDefinition.ScopeId,
// BlueprintName: exampleGetDefinition.Name,
// Version: "v1.0.0",
// }, nil)
// if err != nil {
// return err
// }
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("exampleRG-bp"),
// Location: pulumi.String("West Europe"),
// Tags: pulumi.StringMap{
// "Environment": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{
// ResourceGroupName: exampleResourceGroup.Name,
// Location: exampleResourceGroup.Location,
// Name: pulumi.String("bp-user-example"),
// })
// if err != nil {
// return err
// }
// operator, err := authorization.NewAssignment(ctx, "operator", &authorization.AssignmentArgs{
// Scope: pulumi.String(example.Id),
// RoleDefinitionName: pulumi.String("Blueprint Operator"),
// PrincipalId: exampleUserAssignedIdentity.PrincipalId,
// })
// if err != nil {
// return err
// }
// owner, err := authorization.NewAssignment(ctx, "owner", &authorization.AssignmentArgs{
// Scope: pulumi.String(example.Id),
// RoleDefinitionName: pulumi.String("Owner"),
// PrincipalId: exampleUserAssignedIdentity.PrincipalId,
// })
// if err != nil {
// return err
// }
// _, err = blueprint.NewAssignment(ctx, "example", &blueprint.AssignmentArgs{
// Name: pulumi.String("testAccBPAssignment"),
// TargetSubscriptionId: pulumi.String(example.Id),
// VersionId: pulumi.String(exampleGetPublishedVersion.Id),
// Location: exampleResourceGroup.Location,
// LockMode: pulumi.String("AllResourcesDoNotDelete"),
// LockExcludePrincipals: pulumi.StringArray{
// pulumi.String(current.ObjectId),
// },
// Identity: &blueprint.AssignmentIdentityArgs{
// Type: pulumi.String("UserAssigned"),
// IdentityIds: pulumi.StringArray{
// exampleUserAssignedIdentity.ID(),
// },
// },
// ResourceGroups: pulumi.String(` {
// \"ResourceGroup\": {
// \"name\": \"exampleRG-bp\"
// }
// }
//
// `),
//
// ParameterValues: pulumi.String(` {
// \"allowedlocationsforresourcegroups_listOfAllowedLocations\": {
// \"value\": [\"westus\", \"westus2\", \"eastus\", \"centralus\", \"centraluseuap\", \"southcentralus\", \"northcentralus\", \"westcentralus\", \"eastus2\", \"eastus2euap\", \"brazilsouth\", \"brazilus\", \"northeurope\", \"westeurope\", \"eastasia\", \"southeastasia\", \"japanwest\", \"japaneast\", \"koreacentral\", \"koreasouth\", \"indiasouth\", \"indiawest\", \"indiacentral\", \"australiaeast\", \"australiasoutheast\", \"canadacentral\", \"canadaeast\", \"uknorth\", \"uksouth2\", \"uksouth\", \"ukwest\", \"francecentral\", \"francesouth\", \"australiacentral\", \"australiacentral2\", \"uaecentral\", \"uaenorth\", \"southafricanorth\", \"southafricawest\", \"switzerlandnorth\", \"switzerlandwest\", \"germanynorth\", \"germanywestcentral\", \"norwayeast\", \"norwaywest\"]
// }
// }
//
// `),
//
// }, pulumi.DependsOn([]pulumi.Resource{
// operator,
// owner,
// }))
// 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.Blueprint` - 2018-11-01-preview
//
// ## Import
//
// Azure Blueprint Assignments can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:blueprint/assignment:Assignment example "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Blueprint/blueprintAssignments/assignSimpleBlueprint"
// ```
type Assignment struct {
pulumi.CustomResourceState
// The name of the blueprint assigned
BlueprintName pulumi.StringOutput `pulumi:"blueprintName"`
// The Description on the Blueprint
Description pulumi.StringOutput `pulumi:"description"`
// The display name of the blueprint
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// An `identity` block as defined below.
Identity AssignmentIdentityOutput `pulumi:"identity"`
// The Azure location of the Assignment. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
LockExcludeActions pulumi.StringArrayOutput `pulumi:"lockExcludeActions"`
// a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
LockExcludePrincipals pulumi.StringArrayOutput `pulumi:"lockExcludePrincipals"`
// The locking mode of the Blueprint Assignment. One of `None` (Default), `AllResourcesReadOnly`, or `AllResourcesDoNotDelete`. Defaults to `None`.
LockMode pulumi.StringPtrOutput `pulumi:"lockMode"`
// The name of the Blueprint Assignment. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// a JSON string to supply Blueprint Assignment parameter values.
//
// > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail.
ParameterValues pulumi.StringPtrOutput `pulumi:"parameterValues"`
// a JSON string to supply the Blueprint Resource Group information.
//
// > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail.
ResourceGroups pulumi.StringPtrOutput `pulumi:"resourceGroups"`
// The Subscription ID the Blueprint Published Version is to be applied to. Changing this forces a new resource to be created.
TargetSubscriptionId pulumi.StringOutput `pulumi:"targetSubscriptionId"`
Type pulumi.StringOutput `pulumi:"type"`
// The ID of the Published Version of the blueprint to be assigned.
VersionId pulumi.StringOutput `pulumi:"versionId"`
}
// NewAssignment registers a new resource with the given unique name, arguments, and options.
func NewAssignment(ctx *pulumi.Context,
name string, args *AssignmentArgs, opts ...pulumi.ResourceOption) (*Assignment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Identity == nil {
return nil, errors.New("invalid value for required argument 'Identity'")
}
if args.TargetSubscriptionId == nil {
return nil, errors.New("invalid value for required argument 'TargetSubscriptionId'")
}
if args.VersionId == nil {
return nil, errors.New("invalid value for required argument 'VersionId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Assignment
err := ctx.RegisterResource("azure:blueprint/assignment:Assignment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAssignment gets an existing Assignment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAssignment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AssignmentState, opts ...pulumi.ResourceOption) (*Assignment, error) {
var resource Assignment
err := ctx.ReadResource("azure:blueprint/assignment:Assignment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Assignment resources.
type assignmentState struct {
// The name of the blueprint assigned
BlueprintName *string `pulumi:"blueprintName"`
// The Description on the Blueprint
Description *string `pulumi:"description"`
// The display name of the blueprint
DisplayName *string `pulumi:"displayName"`
// An `identity` block as defined below.
Identity *AssignmentIdentity `pulumi:"identity"`
// The Azure location of the Assignment. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
LockExcludeActions []string `pulumi:"lockExcludeActions"`
// a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
LockExcludePrincipals []string `pulumi:"lockExcludePrincipals"`
// The locking mode of the Blueprint Assignment. One of `None` (Default), `AllResourcesReadOnly`, or `AllResourcesDoNotDelete`. Defaults to `None`.
LockMode *string `pulumi:"lockMode"`
// The name of the Blueprint Assignment. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// a JSON string to supply Blueprint Assignment parameter values.
//
// > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail.
ParameterValues *string `pulumi:"parameterValues"`
// a JSON string to supply the Blueprint Resource Group information.
//
// > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail.
ResourceGroups *string `pulumi:"resourceGroups"`
// The Subscription ID the Blueprint Published Version is to be applied to. Changing this forces a new resource to be created.
TargetSubscriptionId *string `pulumi:"targetSubscriptionId"`
Type *string `pulumi:"type"`
// The ID of the Published Version of the blueprint to be assigned.
VersionId *string `pulumi:"versionId"`
}
type AssignmentState struct {
// The name of the blueprint assigned
BlueprintName pulumi.StringPtrInput
// The Description on the Blueprint
Description pulumi.StringPtrInput
// The display name of the blueprint
DisplayName pulumi.StringPtrInput
// An `identity` block as defined below.
Identity AssignmentIdentityPtrInput
// The Azure location of the Assignment. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
LockExcludeActions pulumi.StringArrayInput
// a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
LockExcludePrincipals pulumi.StringArrayInput
// The locking mode of the Blueprint Assignment. One of `None` (Default), `AllResourcesReadOnly`, or `AllResourcesDoNotDelete`. Defaults to `None`.
LockMode pulumi.StringPtrInput
// The name of the Blueprint Assignment. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// a JSON string to supply Blueprint Assignment parameter values.
//
// > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail.
ParameterValues pulumi.StringPtrInput
// a JSON string to supply the Blueprint Resource Group information.
//
// > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail.
ResourceGroups pulumi.StringPtrInput
// The Subscription ID the Blueprint Published Version is to be applied to. Changing this forces a new resource to be created.
TargetSubscriptionId pulumi.StringPtrInput
Type pulumi.StringPtrInput
// The ID of the Published Version of the blueprint to be assigned.
VersionId pulumi.StringPtrInput
}
func (AssignmentState) ElementType() reflect.Type {
return reflect.TypeOf((*assignmentState)(nil)).Elem()
}
type assignmentArgs struct {
// An `identity` block as defined below.
Identity AssignmentIdentity `pulumi:"identity"`
// The Azure location of the Assignment. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
LockExcludeActions []string `pulumi:"lockExcludeActions"`
// a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
LockExcludePrincipals []string `pulumi:"lockExcludePrincipals"`
// The locking mode of the Blueprint Assignment. One of `None` (Default), `AllResourcesReadOnly`, or `AllResourcesDoNotDelete`. Defaults to `None`.
LockMode *string `pulumi:"lockMode"`
// The name of the Blueprint Assignment. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// a JSON string to supply Blueprint Assignment parameter values.
//
// > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail.
ParameterValues *string `pulumi:"parameterValues"`
// a JSON string to supply the Blueprint Resource Group information.
//
// > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail.
ResourceGroups *string `pulumi:"resourceGroups"`
// The Subscription ID the Blueprint Published Version is to be applied to. Changing this forces a new resource to be created.
TargetSubscriptionId string `pulumi:"targetSubscriptionId"`
// The ID of the Published Version of the blueprint to be assigned.
VersionId string `pulumi:"versionId"`
}
// The set of arguments for constructing a Assignment resource.
type AssignmentArgs struct {
// An `identity` block as defined below.
Identity AssignmentIdentityInput
// The Azure location of the Assignment. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
LockExcludeActions pulumi.StringArrayInput
// a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
LockExcludePrincipals pulumi.StringArrayInput
// The locking mode of the Blueprint Assignment. One of `None` (Default), `AllResourcesReadOnly`, or `AllResourcesDoNotDelete`. Defaults to `None`.
LockMode pulumi.StringPtrInput
// The name of the Blueprint Assignment. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// a JSON string to supply Blueprint Assignment parameter values.
//
// > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail.
ParameterValues pulumi.StringPtrInput
// a JSON string to supply the Blueprint Resource Group information.
//
// > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail.
ResourceGroups pulumi.StringPtrInput
// The Subscription ID the Blueprint Published Version is to be applied to. Changing this forces a new resource to be created.
TargetSubscriptionId pulumi.StringInput
// The ID of the Published Version of the blueprint to be assigned.
VersionId pulumi.StringInput
}
func (AssignmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*assignmentArgs)(nil)).Elem()
}
type AssignmentInput interface {
pulumi.Input
ToAssignmentOutput() AssignmentOutput
ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput
}
func (*Assignment) ElementType() reflect.Type {
return reflect.TypeOf((**Assignment)(nil)).Elem()
}
func (i *Assignment) ToAssignmentOutput() AssignmentOutput {
return i.ToAssignmentOutputWithContext(context.Background())
}
func (i *Assignment) ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentOutput)
}
// AssignmentArrayInput is an input type that accepts AssignmentArray and AssignmentArrayOutput values.
// You can construct a concrete instance of `AssignmentArrayInput` via:
//
// AssignmentArray{ AssignmentArgs{...} }
type AssignmentArrayInput interface {
pulumi.Input
ToAssignmentArrayOutput() AssignmentArrayOutput
ToAssignmentArrayOutputWithContext(context.Context) AssignmentArrayOutput
}
type AssignmentArray []AssignmentInput
func (AssignmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Assignment)(nil)).Elem()
}
func (i AssignmentArray) ToAssignmentArrayOutput() AssignmentArrayOutput {
return i.ToAssignmentArrayOutputWithContext(context.Background())
}
func (i AssignmentArray) ToAssignmentArrayOutputWithContext(ctx context.Context) AssignmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentArrayOutput)
}
// AssignmentMapInput is an input type that accepts AssignmentMap and AssignmentMapOutput values.
// You can construct a concrete instance of `AssignmentMapInput` via:
//
// AssignmentMap{ "key": AssignmentArgs{...} }
type AssignmentMapInput interface {
pulumi.Input
ToAssignmentMapOutput() AssignmentMapOutput
ToAssignmentMapOutputWithContext(context.Context) AssignmentMapOutput
}
type AssignmentMap map[string]AssignmentInput
func (AssignmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Assignment)(nil)).Elem()
}
func (i AssignmentMap) ToAssignmentMapOutput() AssignmentMapOutput {
return i.ToAssignmentMapOutputWithContext(context.Background())
}
func (i AssignmentMap) ToAssignmentMapOutputWithContext(ctx context.Context) AssignmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentMapOutput)
}
type AssignmentOutput struct{ *pulumi.OutputState }
func (AssignmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Assignment)(nil)).Elem()
}
func (o AssignmentOutput) ToAssignmentOutput() AssignmentOutput {
return o
}
func (o AssignmentOutput) ToAssignmentOutputWithContext(ctx context.Context) AssignmentOutput {
return o
}
// The name of the blueprint assigned
func (o AssignmentOutput) BlueprintName() pulumi.StringOutput {
return o.ApplyT(func(v *Assignment) pulumi.StringOutput { return v.BlueprintName }).(pulumi.StringOutput)
}
// The Description on the Blueprint
func (o AssignmentOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *Assignment) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// The display name of the blueprint
func (o AssignmentOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *Assignment) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o AssignmentOutput) Identity() AssignmentIdentityOutput {
return o.ApplyT(func(v *Assignment) AssignmentIdentityOutput { return v.Identity }).(AssignmentIdentityOutput)
}
// The Azure location of the Assignment. Changing this forces a new resource to be created.
func (o AssignmentOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Assignment) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// a list of up to 200 actions that are permitted to bypass the locks applied by the Blueprint.
func (o AssignmentOutput) LockExcludeActions() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Assignment) pulumi.StringArrayOutput { return v.LockExcludeActions }).(pulumi.StringArrayOutput)
}
// a list of up to 5 Principal IDs that are permitted to bypass the locks applied by the Blueprint.
func (o AssignmentOutput) LockExcludePrincipals() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Assignment) pulumi.StringArrayOutput { return v.LockExcludePrincipals }).(pulumi.StringArrayOutput)
}
// The locking mode of the Blueprint Assignment. One of `None` (Default), `AllResourcesReadOnly`, or `AllResourcesDoNotDelete`. Defaults to `None`.
func (o AssignmentOutput) LockMode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Assignment) pulumi.StringPtrOutput { return v.LockMode }).(pulumi.StringPtrOutput)
}
// The name of the Blueprint Assignment. Changing this forces a new resource to be created.
func (o AssignmentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Assignment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// a JSON string to supply Blueprint Assignment parameter values.
//
// > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail.
func (o AssignmentOutput) ParameterValues() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Assignment) pulumi.StringPtrOutput { return v.ParameterValues }).(pulumi.StringPtrOutput)
}
// a JSON string to supply the Blueprint Resource Group information.
//
// > **NOTE:** Improperly formatted JSON, or missing values required by a Blueprint will cause the assignment to fail.
func (o AssignmentOutput) ResourceGroups() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Assignment) pulumi.StringPtrOutput { return v.ResourceGroups }).(pulumi.StringPtrOutput)
}
// The Subscription ID the Blueprint Published Version is to be applied to. Changing this forces a new resource to be created.
func (o AssignmentOutput) TargetSubscriptionId() pulumi.StringOutput {
return o.ApplyT(func(v *Assignment) pulumi.StringOutput { return v.TargetSubscriptionId }).(pulumi.StringOutput)
}
func (o AssignmentOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *Assignment) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
// The ID of the Published Version of the blueprint to be assigned.
func (o AssignmentOutput) VersionId() pulumi.StringOutput {
return o.ApplyT(func(v *Assignment) pulumi.StringOutput { return v.VersionId }).(pulumi.StringOutput)
}
type AssignmentArrayOutput struct{ *pulumi.OutputState }
func (AssignmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Assignment)(nil)).Elem()
}
func (o AssignmentArrayOutput) ToAssignmentArrayOutput() AssignmentArrayOutput {
return o
}
func (o AssignmentArrayOutput) ToAssignmentArrayOutputWithContext(ctx context.Context) AssignmentArrayOutput {
return o
}
func (o AssignmentArrayOutput) Index(i pulumi.IntInput) AssignmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Assignment {
return vs[0].([]*Assignment)[vs[1].(int)]
}).(AssignmentOutput)
}
type AssignmentMapOutput struct{ *pulumi.OutputState }
func (AssignmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Assignment)(nil)).Elem()
}
func (o AssignmentMapOutput) ToAssignmentMapOutput() AssignmentMapOutput {
return o
}
func (o AssignmentMapOutput) ToAssignmentMapOutputWithContext(ctx context.Context) AssignmentMapOutput {
return o
}
func (o AssignmentMapOutput) MapIndex(k pulumi.StringInput) AssignmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Assignment {
return vs[0].(map[string]*Assignment)[vs[1].(string)]
}).(AssignmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentInput)(nil)).Elem(), &Assignment{})
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentArrayInput)(nil)).Elem(), AssignmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentMapInput)(nil)).Elem(), AssignmentMap{})
pulumi.RegisterOutputType(AssignmentOutput{})
pulumi.RegisterOutputType(AssignmentArrayOutput{})
pulumi.RegisterOutputType(AssignmentMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/blueprint/getPublishedVersion.go | sdk/go/azure/blueprint/getPublishedVersion.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package blueprint
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 Blueprint Published Version
//
// > **Note:** Azure Blueprints are in Preview and potentially subject to breaking change without notice.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/blueprint"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil)
// if err != nil {
// return err
// }
// _, err = blueprint.GetPublishedVersion(ctx, &blueprint.GetPublishedVersionArgs{
// ScopeId: current.Id,
// BlueprintName: "exampleBluePrint",
// Version: "dev_v2.3",
// }, 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.Blueprint` - 2018-11-01-preview
func GetPublishedVersion(ctx *pulumi.Context, args *GetPublishedVersionArgs, opts ...pulumi.InvokeOption) (*GetPublishedVersionResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetPublishedVersionResult
err := ctx.Invoke("azure:blueprint/getPublishedVersion:getPublishedVersion", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getPublishedVersion.
type GetPublishedVersionArgs struct {
// The name of the Blueprint Definition
BlueprintName string `pulumi:"blueprintName"`
// The ID of the Management Group / Subscription where this Blueprint Definition is stored.
ScopeId string `pulumi:"scopeId"`
// The Version name of the Published Version of the Blueprint Definition
Version string `pulumi:"version"`
}
// A collection of values returned by getPublishedVersion.
type GetPublishedVersionResult struct {
BlueprintName string `pulumi:"blueprintName"`
// The description of the Blueprint Published Version
Description string `pulumi:"description"`
// The display name of the Blueprint Published Version
DisplayName string `pulumi:"displayName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
LastModified string `pulumi:"lastModified"`
ScopeId string `pulumi:"scopeId"`
// The target scope
TargetScope string `pulumi:"targetScope"`
TimeCreated string `pulumi:"timeCreated"`
// The type of the Blueprint
Type string `pulumi:"type"`
Version string `pulumi:"version"`
}
func GetPublishedVersionOutput(ctx *pulumi.Context, args GetPublishedVersionOutputArgs, opts ...pulumi.InvokeOption) GetPublishedVersionResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetPublishedVersionResultOutput, error) {
args := v.(GetPublishedVersionArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:blueprint/getPublishedVersion:getPublishedVersion", args, GetPublishedVersionResultOutput{}, options).(GetPublishedVersionResultOutput), nil
}).(GetPublishedVersionResultOutput)
}
// A collection of arguments for invoking getPublishedVersion.
type GetPublishedVersionOutputArgs struct {
// The name of the Blueprint Definition
BlueprintName pulumi.StringInput `pulumi:"blueprintName"`
// The ID of the Management Group / Subscription where this Blueprint Definition is stored.
ScopeId pulumi.StringInput `pulumi:"scopeId"`
// The Version name of the Published Version of the Blueprint Definition
Version pulumi.StringInput `pulumi:"version"`
}
func (GetPublishedVersionOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetPublishedVersionArgs)(nil)).Elem()
}
// A collection of values returned by getPublishedVersion.
type GetPublishedVersionResultOutput struct{ *pulumi.OutputState }
func (GetPublishedVersionResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetPublishedVersionResult)(nil)).Elem()
}
func (o GetPublishedVersionResultOutput) ToGetPublishedVersionResultOutput() GetPublishedVersionResultOutput {
return o
}
func (o GetPublishedVersionResultOutput) ToGetPublishedVersionResultOutputWithContext(ctx context.Context) GetPublishedVersionResultOutput {
return o
}
func (o GetPublishedVersionResultOutput) BlueprintName() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.BlueprintName }).(pulumi.StringOutput)
}
// The description of the Blueprint Published Version
func (o GetPublishedVersionResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.Description }).(pulumi.StringOutput)
}
// The display name of the Blueprint Published Version
func (o GetPublishedVersionResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetPublishedVersionResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetPublishedVersionResultOutput) LastModified() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.LastModified }).(pulumi.StringOutput)
}
func (o GetPublishedVersionResultOutput) ScopeId() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.ScopeId }).(pulumi.StringOutput)
}
// The target scope
func (o GetPublishedVersionResultOutput) TargetScope() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.TargetScope }).(pulumi.StringOutput)
}
func (o GetPublishedVersionResultOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.TimeCreated }).(pulumi.StringOutput)
}
// The type of the Blueprint
func (o GetPublishedVersionResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.Type }).(pulumi.StringOutput)
}
func (o GetPublishedVersionResultOutput) Version() pulumi.StringOutput {
return o.ApplyT(func(v GetPublishedVersionResult) string { return v.Version }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetPublishedVersionResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/blueprint/getDefinition.go | sdk/go/azure/blueprint/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 blueprint
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about an existing Azure Blueprint Definition
//
// > **Note:** Azure Blueprints are in Preview and potentially subject to breaking change without notice.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/blueprint"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// root, err := management.LookupGroup(ctx, &management.LookupGroupArgs{
// Name: pulumi.StringRef(current.TenantId),
// }, nil)
// if err != nil {
// return err
// }
// _, err = blueprint.GetDefinition(ctx, &blueprint.GetDefinitionArgs{
// Name: "exampleManagementGroupBP",
// ScopeId: root.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.Blueprint` - 2018-11-01-preview
func GetDefinition(ctx *pulumi.Context, args *GetDefinitionArgs, opts ...pulumi.InvokeOption) (*GetDefinitionResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetDefinitionResult
err := ctx.Invoke("azure:blueprint/getDefinition:getDefinition", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDefinition.
type GetDefinitionArgs struct {
// The name of the Blueprint.
Name string `pulumi:"name"`
// The ID of the Subscription or Management Group, as the scope at which the blueprint definition is stored.
ScopeId string `pulumi:"scopeId"`
}
// A collection of values returned by getDefinition.
type GetDefinitionResult struct {
// The description of the Blueprint Definition.
Description string `pulumi:"description"`
// The display name of the Blueprint Definition.
DisplayName string `pulumi:"displayName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The timestamp of when this last modification was saved to the Blueprint Definition.
LastModified string `pulumi:"lastModified"`
Name string `pulumi:"name"`
ScopeId string `pulumi:"scopeId"`
// The target scope.
TargetScope string `pulumi:"targetScope"`
// The timestamp of when this Blueprint Definition was created.
TimeCreated string `pulumi:"timeCreated"`
// A list of versions published for this Blueprint Definition.
Versions []string `pulumi:"versions"`
}
func GetDefinitionOutput(ctx *pulumi.Context, args GetDefinitionOutputArgs, opts ...pulumi.InvokeOption) GetDefinitionResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetDefinitionResultOutput, error) {
args := v.(GetDefinitionArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:blueprint/getDefinition:getDefinition", args, GetDefinitionResultOutput{}, options).(GetDefinitionResultOutput), nil
}).(GetDefinitionResultOutput)
}
// A collection of arguments for invoking getDefinition.
type GetDefinitionOutputArgs struct {
// The name of the Blueprint.
Name pulumi.StringInput `pulumi:"name"`
// The ID of the Subscription or Management Group, as the scope at which the blueprint definition is stored.
ScopeId pulumi.StringInput `pulumi:"scopeId"`
}
func (GetDefinitionOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetDefinitionArgs)(nil)).Elem()
}
// A collection of values returned by getDefinition.
type GetDefinitionResultOutput struct{ *pulumi.OutputState }
func (GetDefinitionResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetDefinitionResult)(nil)).Elem()
}
func (o GetDefinitionResultOutput) ToGetDefinitionResultOutput() GetDefinitionResultOutput {
return o
}
func (o GetDefinitionResultOutput) ToGetDefinitionResultOutputWithContext(ctx context.Context) GetDefinitionResultOutput {
return o
}
// The description of the Blueprint Definition.
func (o GetDefinitionResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v GetDefinitionResult) string { return v.Description }).(pulumi.StringOutput)
}
// The display name of the Blueprint Definition.
func (o GetDefinitionResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v GetDefinitionResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetDefinitionResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetDefinitionResult) string { return v.Id }).(pulumi.StringOutput)
}
// The timestamp of when this last modification was saved to the Blueprint Definition.
func (o GetDefinitionResultOutput) LastModified() pulumi.StringOutput {
return o.ApplyT(func(v GetDefinitionResult) string { return v.LastModified }).(pulumi.StringOutput)
}
func (o GetDefinitionResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetDefinitionResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o GetDefinitionResultOutput) ScopeId() pulumi.StringOutput {
return o.ApplyT(func(v GetDefinitionResult) string { return v.ScopeId }).(pulumi.StringOutput)
}
// The target scope.
func (o GetDefinitionResultOutput) TargetScope() pulumi.StringOutput {
return o.ApplyT(func(v GetDefinitionResult) string { return v.TargetScope }).(pulumi.StringOutput)
}
// The timestamp of when this Blueprint Definition was created.
func (o GetDefinitionResultOutput) TimeCreated() pulumi.StringOutput {
return o.ApplyT(func(v GetDefinitionResult) string { return v.TimeCreated }).(pulumi.StringOutput)
}
// A list of versions published for this Blueprint Definition.
func (o GetDefinitionResultOutput) Versions() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetDefinitionResult) []string { return v.Versions }).(pulumi.StringArrayOutput)
}
func init() {
pulumi.RegisterOutputType(GetDefinitionResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/arckubernetes/init.go | sdk/go/azure/arckubernetes/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 arckubernetes
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:arckubernetes/cluster:Cluster":
r = &Cluster{}
case "azure:arckubernetes/clusterExtension:ClusterExtension":
r = &ClusterExtension{}
case "azure:arckubernetes/fluxConfiguration:FluxConfiguration":
r = &FluxConfiguration{}
case "azure:arckubernetes/provisionedCluster:ProvisionedCluster":
r = &ProvisionedCluster{}
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",
"arckubernetes/cluster",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"arckubernetes/clusterExtension",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"arckubernetes/fluxConfiguration",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"arckubernetes/provisionedCluster",
&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/arckubernetes/pulumiTypes.go | sdk/go/azure/arckubernetes/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 arckubernetes
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 ClusterExtensionIdentity 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. The only possible value is `SystemAssigned`. Changing this forces a new resource to be created.
Type string `pulumi:"type"`
}
// ClusterExtensionIdentityInput is an input type that accepts ClusterExtensionIdentityArgs and ClusterExtensionIdentityOutput values.
// You can construct a concrete instance of `ClusterExtensionIdentityInput` via:
//
// ClusterExtensionIdentityArgs{...}
type ClusterExtensionIdentityInput interface {
pulumi.Input
ToClusterExtensionIdentityOutput() ClusterExtensionIdentityOutput
ToClusterExtensionIdentityOutputWithContext(context.Context) ClusterExtensionIdentityOutput
}
type ClusterExtensionIdentityArgs 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. The only possible value is `SystemAssigned`. Changing this forces a new resource to be created.
Type pulumi.StringInput `pulumi:"type"`
}
func (ClusterExtensionIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ClusterExtensionIdentity)(nil)).Elem()
}
func (i ClusterExtensionIdentityArgs) ToClusterExtensionIdentityOutput() ClusterExtensionIdentityOutput {
return i.ToClusterExtensionIdentityOutputWithContext(context.Background())
}
func (i ClusterExtensionIdentityArgs) ToClusterExtensionIdentityOutputWithContext(ctx context.Context) ClusterExtensionIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterExtensionIdentityOutput)
}
func (i ClusterExtensionIdentityArgs) ToClusterExtensionIdentityPtrOutput() ClusterExtensionIdentityPtrOutput {
return i.ToClusterExtensionIdentityPtrOutputWithContext(context.Background())
}
func (i ClusterExtensionIdentityArgs) ToClusterExtensionIdentityPtrOutputWithContext(ctx context.Context) ClusterExtensionIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterExtensionIdentityOutput).ToClusterExtensionIdentityPtrOutputWithContext(ctx)
}
// ClusterExtensionIdentityPtrInput is an input type that accepts ClusterExtensionIdentityArgs, ClusterExtensionIdentityPtr and ClusterExtensionIdentityPtrOutput values.
// You can construct a concrete instance of `ClusterExtensionIdentityPtrInput` via:
//
// ClusterExtensionIdentityArgs{...}
//
// or:
//
// nil
type ClusterExtensionIdentityPtrInput interface {
pulumi.Input
ToClusterExtensionIdentityPtrOutput() ClusterExtensionIdentityPtrOutput
ToClusterExtensionIdentityPtrOutputWithContext(context.Context) ClusterExtensionIdentityPtrOutput
}
type clusterExtensionIdentityPtrType ClusterExtensionIdentityArgs
func ClusterExtensionIdentityPtr(v *ClusterExtensionIdentityArgs) ClusterExtensionIdentityPtrInput {
return (*clusterExtensionIdentityPtrType)(v)
}
func (*clusterExtensionIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterExtensionIdentity)(nil)).Elem()
}
func (i *clusterExtensionIdentityPtrType) ToClusterExtensionIdentityPtrOutput() ClusterExtensionIdentityPtrOutput {
return i.ToClusterExtensionIdentityPtrOutputWithContext(context.Background())
}
func (i *clusterExtensionIdentityPtrType) ToClusterExtensionIdentityPtrOutputWithContext(ctx context.Context) ClusterExtensionIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterExtensionIdentityPtrOutput)
}
type ClusterExtensionIdentityOutput struct{ *pulumi.OutputState }
func (ClusterExtensionIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ClusterExtensionIdentity)(nil)).Elem()
}
func (o ClusterExtensionIdentityOutput) ToClusterExtensionIdentityOutput() ClusterExtensionIdentityOutput {
return o
}
func (o ClusterExtensionIdentityOutput) ToClusterExtensionIdentityOutputWithContext(ctx context.Context) ClusterExtensionIdentityOutput {
return o
}
func (o ClusterExtensionIdentityOutput) ToClusterExtensionIdentityPtrOutput() ClusterExtensionIdentityPtrOutput {
return o.ToClusterExtensionIdentityPtrOutputWithContext(context.Background())
}
func (o ClusterExtensionIdentityOutput) ToClusterExtensionIdentityPtrOutputWithContext(ctx context.Context) ClusterExtensionIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ClusterExtensionIdentity) *ClusterExtensionIdentity {
return &v
}).(ClusterExtensionIdentityPtrOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o ClusterExtensionIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ClusterExtensionIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o ClusterExtensionIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ClusterExtensionIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity. The only possible value is `SystemAssigned`. Changing this forces a new resource to be created.
func (o ClusterExtensionIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v ClusterExtensionIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type ClusterExtensionIdentityPtrOutput struct{ *pulumi.OutputState }
func (ClusterExtensionIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterExtensionIdentity)(nil)).Elem()
}
func (o ClusterExtensionIdentityPtrOutput) ToClusterExtensionIdentityPtrOutput() ClusterExtensionIdentityPtrOutput {
return o
}
func (o ClusterExtensionIdentityPtrOutput) ToClusterExtensionIdentityPtrOutputWithContext(ctx context.Context) ClusterExtensionIdentityPtrOutput {
return o
}
func (o ClusterExtensionIdentityPtrOutput) Elem() ClusterExtensionIdentityOutput {
return o.ApplyT(func(v *ClusterExtensionIdentity) ClusterExtensionIdentity {
if v != nil {
return *v
}
var ret ClusterExtensionIdentity
return ret
}).(ClusterExtensionIdentityOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o ClusterExtensionIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterExtensionIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o ClusterExtensionIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterExtensionIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity. The only possible value is `SystemAssigned`. Changing this forces a new resource to be created.
func (o ClusterExtensionIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterExtensionIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type ClusterIdentity 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 assigned to this Arc Kubernetes Cluster. At this time the only possible value is `SystemAssigned`. Changing this forces a new resource to be created.
Type string `pulumi:"type"`
}
// ClusterIdentityInput is an input type that accepts ClusterIdentityArgs and ClusterIdentityOutput values.
// You can construct a concrete instance of `ClusterIdentityInput` via:
//
// ClusterIdentityArgs{...}
type ClusterIdentityInput interface {
pulumi.Input
ToClusterIdentityOutput() ClusterIdentityOutput
ToClusterIdentityOutputWithContext(context.Context) ClusterIdentityOutput
}
type ClusterIdentityArgs 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 assigned to this Arc Kubernetes Cluster. At this time the only possible value is `SystemAssigned`. Changing this forces a new resource to be created.
Type pulumi.StringInput `pulumi:"type"`
}
func (ClusterIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ClusterIdentity)(nil)).Elem()
}
func (i ClusterIdentityArgs) ToClusterIdentityOutput() ClusterIdentityOutput {
return i.ToClusterIdentityOutputWithContext(context.Background())
}
func (i ClusterIdentityArgs) ToClusterIdentityOutputWithContext(ctx context.Context) ClusterIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterIdentityOutput)
}
func (i ClusterIdentityArgs) ToClusterIdentityPtrOutput() ClusterIdentityPtrOutput {
return i.ToClusterIdentityPtrOutputWithContext(context.Background())
}
func (i ClusterIdentityArgs) ToClusterIdentityPtrOutputWithContext(ctx context.Context) ClusterIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterIdentityOutput).ToClusterIdentityPtrOutputWithContext(ctx)
}
// ClusterIdentityPtrInput is an input type that accepts ClusterIdentityArgs, ClusterIdentityPtr and ClusterIdentityPtrOutput values.
// You can construct a concrete instance of `ClusterIdentityPtrInput` via:
//
// ClusterIdentityArgs{...}
//
// or:
//
// nil
type ClusterIdentityPtrInput interface {
pulumi.Input
ToClusterIdentityPtrOutput() ClusterIdentityPtrOutput
ToClusterIdentityPtrOutputWithContext(context.Context) ClusterIdentityPtrOutput
}
type clusterIdentityPtrType ClusterIdentityArgs
func ClusterIdentityPtr(v *ClusterIdentityArgs) ClusterIdentityPtrInput {
return (*clusterIdentityPtrType)(v)
}
func (*clusterIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterIdentity)(nil)).Elem()
}
func (i *clusterIdentityPtrType) ToClusterIdentityPtrOutput() ClusterIdentityPtrOutput {
return i.ToClusterIdentityPtrOutputWithContext(context.Background())
}
func (i *clusterIdentityPtrType) ToClusterIdentityPtrOutputWithContext(ctx context.Context) ClusterIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterIdentityPtrOutput)
}
type ClusterIdentityOutput struct{ *pulumi.OutputState }
func (ClusterIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ClusterIdentity)(nil)).Elem()
}
func (o ClusterIdentityOutput) ToClusterIdentityOutput() ClusterIdentityOutput {
return o
}
func (o ClusterIdentityOutput) ToClusterIdentityOutputWithContext(ctx context.Context) ClusterIdentityOutput {
return o
}
func (o ClusterIdentityOutput) ToClusterIdentityPtrOutput() ClusterIdentityPtrOutput {
return o.ToClusterIdentityPtrOutputWithContext(context.Background())
}
func (o ClusterIdentityOutput) ToClusterIdentityPtrOutputWithContext(ctx context.Context) ClusterIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ClusterIdentity) *ClusterIdentity {
return &v
}).(ClusterIdentityPtrOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o ClusterIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ClusterIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o ClusterIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ClusterIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity assigned to this Arc Kubernetes Cluster. At this time the only possible value is `SystemAssigned`. Changing this forces a new resource to be created.
func (o ClusterIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v ClusterIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type ClusterIdentityPtrOutput struct{ *pulumi.OutputState }
func (ClusterIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterIdentity)(nil)).Elem()
}
func (o ClusterIdentityPtrOutput) ToClusterIdentityPtrOutput() ClusterIdentityPtrOutput {
return o
}
func (o ClusterIdentityPtrOutput) ToClusterIdentityPtrOutputWithContext(ctx context.Context) ClusterIdentityPtrOutput {
return o
}
func (o ClusterIdentityPtrOutput) Elem() ClusterIdentityOutput {
return o.ApplyT(func(v *ClusterIdentity) ClusterIdentity {
if v != nil {
return *v
}
var ret ClusterIdentity
return ret
}).(ClusterIdentityOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o ClusterIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o ClusterIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity assigned to this Arc Kubernetes Cluster. At this time the only possible value is `SystemAssigned`. Changing this forces a new resource to be created.
func (o ClusterIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type FluxConfigurationBlobStorage struct {
// Specifies the account key (shared key) to access the storage account.
AccountKey *string `pulumi:"accountKey"`
// Specifies the Azure Blob container ID.
ContainerId string `pulumi:"containerId"`
// Specifies the name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.
LocalAuthReference *string `pulumi:"localAuthReference"`
// Specifies the shared access token to access the storage container.
SasToken *string `pulumi:"sasToken"`
// A `servicePrincipal` block as defined below.
ServicePrincipal *FluxConfigurationBlobStorageServicePrincipal `pulumi:"servicePrincipal"`
// Specifies the interval at which to re-reconcile the cluster Azure Blob source with the remote.
SyncIntervalInSeconds *int `pulumi:"syncIntervalInSeconds"`
// Specifies the maximum time to attempt to reconcile the cluster Azure Blob source with the remote.
TimeoutInSeconds *int `pulumi:"timeoutInSeconds"`
}
// FluxConfigurationBlobStorageInput is an input type that accepts FluxConfigurationBlobStorageArgs and FluxConfigurationBlobStorageOutput values.
// You can construct a concrete instance of `FluxConfigurationBlobStorageInput` via:
//
// FluxConfigurationBlobStorageArgs{...}
type FluxConfigurationBlobStorageInput interface {
pulumi.Input
ToFluxConfigurationBlobStorageOutput() FluxConfigurationBlobStorageOutput
ToFluxConfigurationBlobStorageOutputWithContext(context.Context) FluxConfigurationBlobStorageOutput
}
type FluxConfigurationBlobStorageArgs struct {
// Specifies the account key (shared key) to access the storage account.
AccountKey pulumi.StringPtrInput `pulumi:"accountKey"`
// Specifies the Azure Blob container ID.
ContainerId pulumi.StringInput `pulumi:"containerId"`
// Specifies the name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.
LocalAuthReference pulumi.StringPtrInput `pulumi:"localAuthReference"`
// Specifies the shared access token to access the storage container.
SasToken pulumi.StringPtrInput `pulumi:"sasToken"`
// A `servicePrincipal` block as defined below.
ServicePrincipal FluxConfigurationBlobStorageServicePrincipalPtrInput `pulumi:"servicePrincipal"`
// Specifies the interval at which to re-reconcile the cluster Azure Blob source with the remote.
SyncIntervalInSeconds pulumi.IntPtrInput `pulumi:"syncIntervalInSeconds"`
// Specifies the maximum time to attempt to reconcile the cluster Azure Blob source with the remote.
TimeoutInSeconds pulumi.IntPtrInput `pulumi:"timeoutInSeconds"`
}
func (FluxConfigurationBlobStorageArgs) ElementType() reflect.Type {
return reflect.TypeOf((*FluxConfigurationBlobStorage)(nil)).Elem()
}
func (i FluxConfigurationBlobStorageArgs) ToFluxConfigurationBlobStorageOutput() FluxConfigurationBlobStorageOutput {
return i.ToFluxConfigurationBlobStorageOutputWithContext(context.Background())
}
func (i FluxConfigurationBlobStorageArgs) ToFluxConfigurationBlobStorageOutputWithContext(ctx context.Context) FluxConfigurationBlobStorageOutput {
return pulumi.ToOutputWithContext(ctx, i).(FluxConfigurationBlobStorageOutput)
}
func (i FluxConfigurationBlobStorageArgs) ToFluxConfigurationBlobStoragePtrOutput() FluxConfigurationBlobStoragePtrOutput {
return i.ToFluxConfigurationBlobStoragePtrOutputWithContext(context.Background())
}
func (i FluxConfigurationBlobStorageArgs) ToFluxConfigurationBlobStoragePtrOutputWithContext(ctx context.Context) FluxConfigurationBlobStoragePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(FluxConfigurationBlobStorageOutput).ToFluxConfigurationBlobStoragePtrOutputWithContext(ctx)
}
// FluxConfigurationBlobStoragePtrInput is an input type that accepts FluxConfigurationBlobStorageArgs, FluxConfigurationBlobStoragePtr and FluxConfigurationBlobStoragePtrOutput values.
// You can construct a concrete instance of `FluxConfigurationBlobStoragePtrInput` via:
//
// FluxConfigurationBlobStorageArgs{...}
//
// or:
//
// nil
type FluxConfigurationBlobStoragePtrInput interface {
pulumi.Input
ToFluxConfigurationBlobStoragePtrOutput() FluxConfigurationBlobStoragePtrOutput
ToFluxConfigurationBlobStoragePtrOutputWithContext(context.Context) FluxConfigurationBlobStoragePtrOutput
}
type fluxConfigurationBlobStoragePtrType FluxConfigurationBlobStorageArgs
func FluxConfigurationBlobStoragePtr(v *FluxConfigurationBlobStorageArgs) FluxConfigurationBlobStoragePtrInput {
return (*fluxConfigurationBlobStoragePtrType)(v)
}
func (*fluxConfigurationBlobStoragePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**FluxConfigurationBlobStorage)(nil)).Elem()
}
func (i *fluxConfigurationBlobStoragePtrType) ToFluxConfigurationBlobStoragePtrOutput() FluxConfigurationBlobStoragePtrOutput {
return i.ToFluxConfigurationBlobStoragePtrOutputWithContext(context.Background())
}
func (i *fluxConfigurationBlobStoragePtrType) ToFluxConfigurationBlobStoragePtrOutputWithContext(ctx context.Context) FluxConfigurationBlobStoragePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(FluxConfigurationBlobStoragePtrOutput)
}
type FluxConfigurationBlobStorageOutput struct{ *pulumi.OutputState }
func (FluxConfigurationBlobStorageOutput) ElementType() reflect.Type {
return reflect.TypeOf((*FluxConfigurationBlobStorage)(nil)).Elem()
}
func (o FluxConfigurationBlobStorageOutput) ToFluxConfigurationBlobStorageOutput() FluxConfigurationBlobStorageOutput {
return o
}
func (o FluxConfigurationBlobStorageOutput) ToFluxConfigurationBlobStorageOutputWithContext(ctx context.Context) FluxConfigurationBlobStorageOutput {
return o
}
func (o FluxConfigurationBlobStorageOutput) ToFluxConfigurationBlobStoragePtrOutput() FluxConfigurationBlobStoragePtrOutput {
return o.ToFluxConfigurationBlobStoragePtrOutputWithContext(context.Background())
}
func (o FluxConfigurationBlobStorageOutput) ToFluxConfigurationBlobStoragePtrOutputWithContext(ctx context.Context) FluxConfigurationBlobStoragePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v FluxConfigurationBlobStorage) *FluxConfigurationBlobStorage {
return &v
}).(FluxConfigurationBlobStoragePtrOutput)
}
// Specifies the account key (shared key) to access the storage account.
func (o FluxConfigurationBlobStorageOutput) AccountKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v FluxConfigurationBlobStorage) *string { return v.AccountKey }).(pulumi.StringPtrOutput)
}
// Specifies the Azure Blob container ID.
func (o FluxConfigurationBlobStorageOutput) ContainerId() pulumi.StringOutput {
return o.ApplyT(func(v FluxConfigurationBlobStorage) string { return v.ContainerId }).(pulumi.StringOutput)
}
// Specifies the name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.
func (o FluxConfigurationBlobStorageOutput) LocalAuthReference() pulumi.StringPtrOutput {
return o.ApplyT(func(v FluxConfigurationBlobStorage) *string { return v.LocalAuthReference }).(pulumi.StringPtrOutput)
}
// Specifies the shared access token to access the storage container.
func (o FluxConfigurationBlobStorageOutput) SasToken() pulumi.StringPtrOutput {
return o.ApplyT(func(v FluxConfigurationBlobStorage) *string { return v.SasToken }).(pulumi.StringPtrOutput)
}
// A `servicePrincipal` block as defined below.
func (o FluxConfigurationBlobStorageOutput) ServicePrincipal() FluxConfigurationBlobStorageServicePrincipalPtrOutput {
return o.ApplyT(func(v FluxConfigurationBlobStorage) *FluxConfigurationBlobStorageServicePrincipal {
return v.ServicePrincipal
}).(FluxConfigurationBlobStorageServicePrincipalPtrOutput)
}
// Specifies the interval at which to re-reconcile the cluster Azure Blob source with the remote.
func (o FluxConfigurationBlobStorageOutput) SyncIntervalInSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v FluxConfigurationBlobStorage) *int { return v.SyncIntervalInSeconds }).(pulumi.IntPtrOutput)
}
// Specifies the maximum time to attempt to reconcile the cluster Azure Blob source with the remote.
func (o FluxConfigurationBlobStorageOutput) TimeoutInSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v FluxConfigurationBlobStorage) *int { return v.TimeoutInSeconds }).(pulumi.IntPtrOutput)
}
type FluxConfigurationBlobStoragePtrOutput struct{ *pulumi.OutputState }
func (FluxConfigurationBlobStoragePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**FluxConfigurationBlobStorage)(nil)).Elem()
}
func (o FluxConfigurationBlobStoragePtrOutput) ToFluxConfigurationBlobStoragePtrOutput() FluxConfigurationBlobStoragePtrOutput {
return o
}
func (o FluxConfigurationBlobStoragePtrOutput) ToFluxConfigurationBlobStoragePtrOutputWithContext(ctx context.Context) FluxConfigurationBlobStoragePtrOutput {
return o
}
func (o FluxConfigurationBlobStoragePtrOutput) Elem() FluxConfigurationBlobStorageOutput {
return o.ApplyT(func(v *FluxConfigurationBlobStorage) FluxConfigurationBlobStorage {
if v != nil {
return *v
}
var ret FluxConfigurationBlobStorage
return ret
}).(FluxConfigurationBlobStorageOutput)
}
// Specifies the account key (shared key) to access the storage account.
func (o FluxConfigurationBlobStoragePtrOutput) AccountKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v *FluxConfigurationBlobStorage) *string {
if v == nil {
return nil
}
return v.AccountKey
}).(pulumi.StringPtrOutput)
}
// Specifies the Azure Blob container ID.
func (o FluxConfigurationBlobStoragePtrOutput) ContainerId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *FluxConfigurationBlobStorage) *string {
if v == nil {
return nil
}
return &v.ContainerId
}).(pulumi.StringPtrOutput)
}
// Specifies the name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or user-provided configuration secrets.
func (o FluxConfigurationBlobStoragePtrOutput) LocalAuthReference() pulumi.StringPtrOutput {
return o.ApplyT(func(v *FluxConfigurationBlobStorage) *string {
if v == nil {
return nil
}
return v.LocalAuthReference
}).(pulumi.StringPtrOutput)
}
// Specifies the shared access token to access the storage container.
func (o FluxConfigurationBlobStoragePtrOutput) SasToken() pulumi.StringPtrOutput {
return o.ApplyT(func(v *FluxConfigurationBlobStorage) *string {
if v == nil {
return nil
}
return v.SasToken
}).(pulumi.StringPtrOutput)
}
// A `servicePrincipal` block as defined below.
func (o FluxConfigurationBlobStoragePtrOutput) ServicePrincipal() FluxConfigurationBlobStorageServicePrincipalPtrOutput {
return o.ApplyT(func(v *FluxConfigurationBlobStorage) *FluxConfigurationBlobStorageServicePrincipal {
if v == nil {
return nil
}
return v.ServicePrincipal
}).(FluxConfigurationBlobStorageServicePrincipalPtrOutput)
}
// Specifies the interval at which to re-reconcile the cluster Azure Blob source with the remote.
func (o FluxConfigurationBlobStoragePtrOutput) SyncIntervalInSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *FluxConfigurationBlobStorage) *int {
if v == nil {
return nil
}
return v.SyncIntervalInSeconds
}).(pulumi.IntPtrOutput)
}
// Specifies the maximum time to attempt to reconcile the cluster Azure Blob source with the remote.
func (o FluxConfigurationBlobStoragePtrOutput) TimeoutInSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *FluxConfigurationBlobStorage) *int {
if v == nil {
return nil
}
return v.TimeoutInSeconds
}).(pulumi.IntPtrOutput)
}
type FluxConfigurationBlobStorageServicePrincipal struct {
// Base64-encoded certificate used to authenticate a Service Principal .
ClientCertificateBase64 *string `pulumi:"clientCertificateBase64"`
// Specifies the password for the certificate used to authenticate a Service Principal .
ClientCertificatePassword *string `pulumi:"clientCertificatePassword"`
// Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the client certificate.
ClientCertificateSendChain *bool `pulumi:"clientCertificateSendChain"`
// Specifies the client ID for authenticating a Service Principal.
ClientId string `pulumi:"clientId"`
// Specifies the client secret for authenticating a Service Principal.
ClientSecret *string `pulumi:"clientSecret"`
// Specifies the tenant ID for authenticating a Service Principal.
TenantId string `pulumi:"tenantId"`
}
// FluxConfigurationBlobStorageServicePrincipalInput is an input type that accepts FluxConfigurationBlobStorageServicePrincipalArgs and FluxConfigurationBlobStorageServicePrincipalOutput values.
// You can construct a concrete instance of `FluxConfigurationBlobStorageServicePrincipalInput` via:
//
// FluxConfigurationBlobStorageServicePrincipalArgs{...}
type FluxConfigurationBlobStorageServicePrincipalInput interface {
pulumi.Input
ToFluxConfigurationBlobStorageServicePrincipalOutput() FluxConfigurationBlobStorageServicePrincipalOutput
ToFluxConfigurationBlobStorageServicePrincipalOutputWithContext(context.Context) FluxConfigurationBlobStorageServicePrincipalOutput
}
type FluxConfigurationBlobStorageServicePrincipalArgs struct {
// Base64-encoded certificate used to authenticate a Service Principal .
ClientCertificateBase64 pulumi.StringPtrInput `pulumi:"clientCertificateBase64"`
// Specifies the password for the certificate used to authenticate a Service Principal .
ClientCertificatePassword pulumi.StringPtrInput `pulumi:"clientCertificatePassword"`
// Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer based authentication for the client certificate.
ClientCertificateSendChain pulumi.BoolPtrInput `pulumi:"clientCertificateSendChain"`
// Specifies the client ID for authenticating a Service Principal.
ClientId pulumi.StringInput `pulumi:"clientId"`
// Specifies the client secret for authenticating a Service Principal.
ClientSecret pulumi.StringPtrInput `pulumi:"clientSecret"`
// Specifies the tenant ID for authenticating a Service Principal.
TenantId pulumi.StringInput `pulumi:"tenantId"`
}
func (FluxConfigurationBlobStorageServicePrincipalArgs) ElementType() reflect.Type {
return reflect.TypeOf((*FluxConfigurationBlobStorageServicePrincipal)(nil)).Elem()
}
func (i FluxConfigurationBlobStorageServicePrincipalArgs) ToFluxConfigurationBlobStorageServicePrincipalOutput() FluxConfigurationBlobStorageServicePrincipalOutput {
return i.ToFluxConfigurationBlobStorageServicePrincipalOutputWithContext(context.Background())
}
func (i FluxConfigurationBlobStorageServicePrincipalArgs) ToFluxConfigurationBlobStorageServicePrincipalOutputWithContext(ctx context.Context) FluxConfigurationBlobStorageServicePrincipalOutput {
return pulumi.ToOutputWithContext(ctx, i).(FluxConfigurationBlobStorageServicePrincipalOutput)
}
func (i FluxConfigurationBlobStorageServicePrincipalArgs) ToFluxConfigurationBlobStorageServicePrincipalPtrOutput() FluxConfigurationBlobStorageServicePrincipalPtrOutput {
return i.ToFluxConfigurationBlobStorageServicePrincipalPtrOutputWithContext(context.Background())
}
func (i FluxConfigurationBlobStorageServicePrincipalArgs) ToFluxConfigurationBlobStorageServicePrincipalPtrOutputWithContext(ctx context.Context) FluxConfigurationBlobStorageServicePrincipalPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(FluxConfigurationBlobStorageServicePrincipalOutput).ToFluxConfigurationBlobStorageServicePrincipalPtrOutputWithContext(ctx)
}
// FluxConfigurationBlobStorageServicePrincipalPtrInput is an input type that accepts FluxConfigurationBlobStorageServicePrincipalArgs, FluxConfigurationBlobStorageServicePrincipalPtr and FluxConfigurationBlobStorageServicePrincipalPtrOutput values.
// You can construct a concrete instance of `FluxConfigurationBlobStorageServicePrincipalPtrInput` via:
//
// FluxConfigurationBlobStorageServicePrincipalArgs{...}
//
// or:
//
// nil
type FluxConfigurationBlobStorageServicePrincipalPtrInput interface {
pulumi.Input
ToFluxConfigurationBlobStorageServicePrincipalPtrOutput() FluxConfigurationBlobStorageServicePrincipalPtrOutput
ToFluxConfigurationBlobStorageServicePrincipalPtrOutputWithContext(context.Context) FluxConfigurationBlobStorageServicePrincipalPtrOutput
}
type fluxConfigurationBlobStorageServicePrincipalPtrType FluxConfigurationBlobStorageServicePrincipalArgs
func FluxConfigurationBlobStorageServicePrincipalPtr(v *FluxConfigurationBlobStorageServicePrincipalArgs) FluxConfigurationBlobStorageServicePrincipalPtrInput {
return (*fluxConfigurationBlobStorageServicePrincipalPtrType)(v)
}
func (*fluxConfigurationBlobStorageServicePrincipalPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**FluxConfigurationBlobStorageServicePrincipal)(nil)).Elem()
}
func (i *fluxConfigurationBlobStorageServicePrincipalPtrType) ToFluxConfigurationBlobStorageServicePrincipalPtrOutput() FluxConfigurationBlobStorageServicePrincipalPtrOutput {
return i.ToFluxConfigurationBlobStorageServicePrincipalPtrOutputWithContext(context.Background())
}
func (i *fluxConfigurationBlobStorageServicePrincipalPtrType) ToFluxConfigurationBlobStorageServicePrincipalPtrOutputWithContext(ctx context.Context) FluxConfigurationBlobStorageServicePrincipalPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(FluxConfigurationBlobStorageServicePrincipalPtrOutput)
}
type FluxConfigurationBlobStorageServicePrincipalOutput struct{ *pulumi.OutputState }
func (FluxConfigurationBlobStorageServicePrincipalOutput) ElementType() reflect.Type {
return reflect.TypeOf((*FluxConfigurationBlobStorageServicePrincipal)(nil)).Elem()
}
func (o FluxConfigurationBlobStorageServicePrincipalOutput) ToFluxConfigurationBlobStorageServicePrincipalOutput() FluxConfigurationBlobStorageServicePrincipalOutput {
return o
}
func (o FluxConfigurationBlobStorageServicePrincipalOutput) ToFluxConfigurationBlobStorageServicePrincipalOutputWithContext(ctx context.Context) FluxConfigurationBlobStorageServicePrincipalOutput {
return o
}
func (o FluxConfigurationBlobStorageServicePrincipalOutput) ToFluxConfigurationBlobStorageServicePrincipalPtrOutput() FluxConfigurationBlobStorageServicePrincipalPtrOutput {
return o.ToFluxConfigurationBlobStorageServicePrincipalPtrOutputWithContext(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/arckubernetes/provisionedCluster.go | sdk/go/azure/arckubernetes/provisionedCluster.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package arckubernetes
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 Kubernetes Provisioned Cluster.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/arckubernetes"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azuread/sdk/v6/go/azuread"
// "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.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleGroup, err := azuread.NewGroup(ctx, "example", &azuread.GroupArgs{
// DisplayName: pulumi.String("example-adg"),
// Owners: pulumi.StringArray{
// pulumi.String(current.ObjectId),
// },
// SecurityEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = arckubernetes.NewProvisionedCluster(ctx, "example", &arckubernetes.ProvisionedClusterArgs{
// Name: pulumi.String("example-akpc"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AzureActiveDirectory: &arckubernetes.ProvisionedClusterAzureActiveDirectoryArgs{
// AzureRbacEnabled: pulumi.Bool(true),
// AdminGroupObjectIds: pulumi.StringArray{
// exampleGroup.ID(),
// },
// TenantId: pulumi.String(current.TenantId),
// },
// Identity: &arckubernetes.ProvisionedClusterIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Kubernetes` - 2024-01-01
//
// ## Import
//
// Arc Kubernetes Provisioned Clusters can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:arckubernetes/provisionedCluster:ProvisionedCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/cluster1
// ```
type ProvisionedCluster struct {
pulumi.CustomResourceState
// The version of the agent running on the cluster resource.
AgentVersion pulumi.StringOutput `pulumi:"agentVersion"`
// Whether the Arc agents will be upgraded automatically to the latest version. Defaults to `true`.
ArcAgentAutoUpgradeEnabled pulumi.BoolPtrOutput `pulumi:"arcAgentAutoUpgradeEnabled"`
// The version of the Arc agents to be installed on the cluster.
ArcAgentDesiredVersion pulumi.StringPtrOutput `pulumi:"arcAgentDesiredVersion"`
// An `azureActiveDirectory` block as defined below.
AzureActiveDirectory ProvisionedClusterAzureActiveDirectoryPtrOutput `pulumi:"azureActiveDirectory"`
// The distribution running on this Arc Kubernetes Provisioned Cluster.
Distribution pulumi.StringOutput `pulumi:"distribution"`
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
Identity ProvisionedClusterIdentityOutput `pulumi:"identity"`
// The infrastructure on which the Arc Kubernetes Provisioned Cluster is running on.
Infrastructure pulumi.StringOutput `pulumi:"infrastructure"`
// The Kubernetes version of the cluster resource.
KubernetesVersion pulumi.StringOutput `pulumi:"kubernetesVersion"`
// The Azure Region where the Arc Kubernetes Provisioned Cluster should exist. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Arc Kubernetes Provisioned Cluster. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The cluster offering.
Offering pulumi.StringOutput `pulumi:"offering"`
// The name of the Resource Group where the Arc Kubernetes Provisioned Cluster should exist. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Arc Kubernetes Provisioned Cluster.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The number of CPU cores present in the cluster resource.
TotalCoreCount pulumi.IntOutput `pulumi:"totalCoreCount"`
// The number of nodes present in the cluster resource.
TotalNodeCount pulumi.IntOutput `pulumi:"totalNodeCount"`
}
// NewProvisionedCluster registers a new resource with the given unique name, arguments, and options.
func NewProvisionedCluster(ctx *pulumi.Context,
name string, args *ProvisionedClusterArgs, opts ...pulumi.ResourceOption) (*ProvisionedCluster, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Identity == nil {
return nil, errors.New("invalid value for required argument 'Identity'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ProvisionedCluster
err := ctx.RegisterResource("azure:arckubernetes/provisionedCluster:ProvisionedCluster", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetProvisionedCluster gets an existing ProvisionedCluster 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 GetProvisionedCluster(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ProvisionedClusterState, opts ...pulumi.ResourceOption) (*ProvisionedCluster, error) {
var resource ProvisionedCluster
err := ctx.ReadResource("azure:arckubernetes/provisionedCluster:ProvisionedCluster", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ProvisionedCluster resources.
type provisionedClusterState struct {
// The version of the agent running on the cluster resource.
AgentVersion *string `pulumi:"agentVersion"`
// Whether the Arc agents will be upgraded automatically to the latest version. Defaults to `true`.
ArcAgentAutoUpgradeEnabled *bool `pulumi:"arcAgentAutoUpgradeEnabled"`
// The version of the Arc agents to be installed on the cluster.
ArcAgentDesiredVersion *string `pulumi:"arcAgentDesiredVersion"`
// An `azureActiveDirectory` block as defined below.
AzureActiveDirectory *ProvisionedClusterAzureActiveDirectory `pulumi:"azureActiveDirectory"`
// The distribution running on this Arc Kubernetes Provisioned Cluster.
Distribution *string `pulumi:"distribution"`
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
Identity *ProvisionedClusterIdentity `pulumi:"identity"`
// The infrastructure on which the Arc Kubernetes Provisioned Cluster is running on.
Infrastructure *string `pulumi:"infrastructure"`
// The Kubernetes version of the cluster resource.
KubernetesVersion *string `pulumi:"kubernetesVersion"`
// The Azure Region where the Arc Kubernetes Provisioned Cluster should exist. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Arc Kubernetes Provisioned Cluster. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
Name *string `pulumi:"name"`
// The cluster offering.
Offering *string `pulumi:"offering"`
// The name of the Resource Group where the Arc Kubernetes Provisioned Cluster should exist. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Arc Kubernetes Provisioned Cluster.
Tags map[string]string `pulumi:"tags"`
// The number of CPU cores present in the cluster resource.
TotalCoreCount *int `pulumi:"totalCoreCount"`
// The number of nodes present in the cluster resource.
TotalNodeCount *int `pulumi:"totalNodeCount"`
}
type ProvisionedClusterState struct {
// The version of the agent running on the cluster resource.
AgentVersion pulumi.StringPtrInput
// Whether the Arc agents will be upgraded automatically to the latest version. Defaults to `true`.
ArcAgentAutoUpgradeEnabled pulumi.BoolPtrInput
// The version of the Arc agents to be installed on the cluster.
ArcAgentDesiredVersion pulumi.StringPtrInput
// An `azureActiveDirectory` block as defined below.
AzureActiveDirectory ProvisionedClusterAzureActiveDirectoryPtrInput
// The distribution running on this Arc Kubernetes Provisioned Cluster.
Distribution pulumi.StringPtrInput
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
Identity ProvisionedClusterIdentityPtrInput
// The infrastructure on which the Arc Kubernetes Provisioned Cluster is running on.
Infrastructure pulumi.StringPtrInput
// The Kubernetes version of the cluster resource.
KubernetesVersion pulumi.StringPtrInput
// The Azure Region where the Arc Kubernetes Provisioned Cluster should exist. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Arc Kubernetes Provisioned Cluster. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
Name pulumi.StringPtrInput
// The cluster offering.
Offering pulumi.StringPtrInput
// The name of the Resource Group where the Arc Kubernetes Provisioned Cluster should exist. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Arc Kubernetes Provisioned Cluster.
Tags pulumi.StringMapInput
// The number of CPU cores present in the cluster resource.
TotalCoreCount pulumi.IntPtrInput
// The number of nodes present in the cluster resource.
TotalNodeCount pulumi.IntPtrInput
}
func (ProvisionedClusterState) ElementType() reflect.Type {
return reflect.TypeOf((*provisionedClusterState)(nil)).Elem()
}
type provisionedClusterArgs struct {
// Whether the Arc agents will be upgraded automatically to the latest version. Defaults to `true`.
ArcAgentAutoUpgradeEnabled *bool `pulumi:"arcAgentAutoUpgradeEnabled"`
// The version of the Arc agents to be installed on the cluster.
ArcAgentDesiredVersion *string `pulumi:"arcAgentDesiredVersion"`
// An `azureActiveDirectory` block as defined below.
AzureActiveDirectory *ProvisionedClusterAzureActiveDirectory `pulumi:"azureActiveDirectory"`
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
Identity ProvisionedClusterIdentity `pulumi:"identity"`
// The Azure Region where the Arc Kubernetes Provisioned Cluster should exist. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Arc Kubernetes Provisioned Cluster. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Arc Kubernetes Provisioned Cluster should exist. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Arc Kubernetes Provisioned Cluster.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a ProvisionedCluster resource.
type ProvisionedClusterArgs struct {
// Whether the Arc agents will be upgraded automatically to the latest version. Defaults to `true`.
ArcAgentAutoUpgradeEnabled pulumi.BoolPtrInput
// The version of the Arc agents to be installed on the cluster.
ArcAgentDesiredVersion pulumi.StringPtrInput
// An `azureActiveDirectory` block as defined below.
AzureActiveDirectory ProvisionedClusterAzureActiveDirectoryPtrInput
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
Identity ProvisionedClusterIdentityInput
// The Azure Region where the Arc Kubernetes Provisioned Cluster should exist. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Arc Kubernetes Provisioned Cluster. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Arc Kubernetes Provisioned Cluster should exist. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Arc Kubernetes Provisioned Cluster.
Tags pulumi.StringMapInput
}
func (ProvisionedClusterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*provisionedClusterArgs)(nil)).Elem()
}
type ProvisionedClusterInput interface {
pulumi.Input
ToProvisionedClusterOutput() ProvisionedClusterOutput
ToProvisionedClusterOutputWithContext(ctx context.Context) ProvisionedClusterOutput
}
func (*ProvisionedCluster) ElementType() reflect.Type {
return reflect.TypeOf((**ProvisionedCluster)(nil)).Elem()
}
func (i *ProvisionedCluster) ToProvisionedClusterOutput() ProvisionedClusterOutput {
return i.ToProvisionedClusterOutputWithContext(context.Background())
}
func (i *ProvisionedCluster) ToProvisionedClusterOutputWithContext(ctx context.Context) ProvisionedClusterOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProvisionedClusterOutput)
}
// ProvisionedClusterArrayInput is an input type that accepts ProvisionedClusterArray and ProvisionedClusterArrayOutput values.
// You can construct a concrete instance of `ProvisionedClusterArrayInput` via:
//
// ProvisionedClusterArray{ ProvisionedClusterArgs{...} }
type ProvisionedClusterArrayInput interface {
pulumi.Input
ToProvisionedClusterArrayOutput() ProvisionedClusterArrayOutput
ToProvisionedClusterArrayOutputWithContext(context.Context) ProvisionedClusterArrayOutput
}
type ProvisionedClusterArray []ProvisionedClusterInput
func (ProvisionedClusterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ProvisionedCluster)(nil)).Elem()
}
func (i ProvisionedClusterArray) ToProvisionedClusterArrayOutput() ProvisionedClusterArrayOutput {
return i.ToProvisionedClusterArrayOutputWithContext(context.Background())
}
func (i ProvisionedClusterArray) ToProvisionedClusterArrayOutputWithContext(ctx context.Context) ProvisionedClusterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProvisionedClusterArrayOutput)
}
// ProvisionedClusterMapInput is an input type that accepts ProvisionedClusterMap and ProvisionedClusterMapOutput values.
// You can construct a concrete instance of `ProvisionedClusterMapInput` via:
//
// ProvisionedClusterMap{ "key": ProvisionedClusterArgs{...} }
type ProvisionedClusterMapInput interface {
pulumi.Input
ToProvisionedClusterMapOutput() ProvisionedClusterMapOutput
ToProvisionedClusterMapOutputWithContext(context.Context) ProvisionedClusterMapOutput
}
type ProvisionedClusterMap map[string]ProvisionedClusterInput
func (ProvisionedClusterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ProvisionedCluster)(nil)).Elem()
}
func (i ProvisionedClusterMap) ToProvisionedClusterMapOutput() ProvisionedClusterMapOutput {
return i.ToProvisionedClusterMapOutputWithContext(context.Background())
}
func (i ProvisionedClusterMap) ToProvisionedClusterMapOutputWithContext(ctx context.Context) ProvisionedClusterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ProvisionedClusterMapOutput)
}
type ProvisionedClusterOutput struct{ *pulumi.OutputState }
func (ProvisionedClusterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ProvisionedCluster)(nil)).Elem()
}
func (o ProvisionedClusterOutput) ToProvisionedClusterOutput() ProvisionedClusterOutput {
return o
}
func (o ProvisionedClusterOutput) ToProvisionedClusterOutputWithContext(ctx context.Context) ProvisionedClusterOutput {
return o
}
// The version of the agent running on the cluster resource.
func (o ProvisionedClusterOutput) AgentVersion() pulumi.StringOutput {
return o.ApplyT(func(v *ProvisionedCluster) pulumi.StringOutput { return v.AgentVersion }).(pulumi.StringOutput)
}
// Whether the Arc agents will be upgraded automatically to the latest version. Defaults to `true`.
func (o ProvisionedClusterOutput) ArcAgentAutoUpgradeEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ProvisionedCluster) pulumi.BoolPtrOutput { return v.ArcAgentAutoUpgradeEnabled }).(pulumi.BoolPtrOutput)
}
// The version of the Arc agents to be installed on the cluster.
func (o ProvisionedClusterOutput) ArcAgentDesiredVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ProvisionedCluster) pulumi.StringPtrOutput { return v.ArcAgentDesiredVersion }).(pulumi.StringPtrOutput)
}
// An `azureActiveDirectory` block as defined below.
func (o ProvisionedClusterOutput) AzureActiveDirectory() ProvisionedClusterAzureActiveDirectoryPtrOutput {
return o.ApplyT(func(v *ProvisionedCluster) ProvisionedClusterAzureActiveDirectoryPtrOutput {
return v.AzureActiveDirectory
}).(ProvisionedClusterAzureActiveDirectoryPtrOutput)
}
// The distribution running on this Arc Kubernetes Provisioned Cluster.
func (o ProvisionedClusterOutput) Distribution() pulumi.StringOutput {
return o.ApplyT(func(v *ProvisionedCluster) pulumi.StringOutput { return v.Distribution }).(pulumi.StringOutput)
}
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
func (o ProvisionedClusterOutput) Identity() ProvisionedClusterIdentityOutput {
return o.ApplyT(func(v *ProvisionedCluster) ProvisionedClusterIdentityOutput { return v.Identity }).(ProvisionedClusterIdentityOutput)
}
// The infrastructure on which the Arc Kubernetes Provisioned Cluster is running on.
func (o ProvisionedClusterOutput) Infrastructure() pulumi.StringOutput {
return o.ApplyT(func(v *ProvisionedCluster) pulumi.StringOutput { return v.Infrastructure }).(pulumi.StringOutput)
}
// The Kubernetes version of the cluster resource.
func (o ProvisionedClusterOutput) KubernetesVersion() pulumi.StringOutput {
return o.ApplyT(func(v *ProvisionedCluster) pulumi.StringOutput { return v.KubernetesVersion }).(pulumi.StringOutput)
}
// The Azure Region where the Arc Kubernetes Provisioned Cluster should exist. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
func (o ProvisionedClusterOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ProvisionedCluster) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Arc Kubernetes Provisioned Cluster. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
func (o ProvisionedClusterOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ProvisionedCluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The cluster offering.
func (o ProvisionedClusterOutput) Offering() pulumi.StringOutput {
return o.ApplyT(func(v *ProvisionedCluster) pulumi.StringOutput { return v.Offering }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Arc Kubernetes Provisioned Cluster should exist. Changing this forces a new Arc Kubernetes Provisioned Cluster to be created.
func (o ProvisionedClusterOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ProvisionedCluster) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Arc Kubernetes Provisioned Cluster.
func (o ProvisionedClusterOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ProvisionedCluster) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The number of CPU cores present in the cluster resource.
func (o ProvisionedClusterOutput) TotalCoreCount() pulumi.IntOutput {
return o.ApplyT(func(v *ProvisionedCluster) pulumi.IntOutput { return v.TotalCoreCount }).(pulumi.IntOutput)
}
// The number of nodes present in the cluster resource.
func (o ProvisionedClusterOutput) TotalNodeCount() pulumi.IntOutput {
return o.ApplyT(func(v *ProvisionedCluster) pulumi.IntOutput { return v.TotalNodeCount }).(pulumi.IntOutput)
}
type ProvisionedClusterArrayOutput struct{ *pulumi.OutputState }
func (ProvisionedClusterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ProvisionedCluster)(nil)).Elem()
}
func (o ProvisionedClusterArrayOutput) ToProvisionedClusterArrayOutput() ProvisionedClusterArrayOutput {
return o
}
func (o ProvisionedClusterArrayOutput) ToProvisionedClusterArrayOutputWithContext(ctx context.Context) ProvisionedClusterArrayOutput {
return o
}
func (o ProvisionedClusterArrayOutput) Index(i pulumi.IntInput) ProvisionedClusterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ProvisionedCluster {
return vs[0].([]*ProvisionedCluster)[vs[1].(int)]
}).(ProvisionedClusterOutput)
}
type ProvisionedClusterMapOutput struct{ *pulumi.OutputState }
func (ProvisionedClusterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ProvisionedCluster)(nil)).Elem()
}
func (o ProvisionedClusterMapOutput) ToProvisionedClusterMapOutput() ProvisionedClusterMapOutput {
return o
}
func (o ProvisionedClusterMapOutput) ToProvisionedClusterMapOutputWithContext(ctx context.Context) ProvisionedClusterMapOutput {
return o
}
func (o ProvisionedClusterMapOutput) MapIndex(k pulumi.StringInput) ProvisionedClusterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ProvisionedCluster {
return vs[0].(map[string]*ProvisionedCluster)[vs[1].(string)]
}).(ProvisionedClusterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ProvisionedClusterInput)(nil)).Elem(), &ProvisionedCluster{})
pulumi.RegisterInputType(reflect.TypeOf((*ProvisionedClusterArrayInput)(nil)).Elem(), ProvisionedClusterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ProvisionedClusterMapInput)(nil)).Elem(), ProvisionedClusterMap{})
pulumi.RegisterOutputType(ProvisionedClusterOutput{})
pulumi.RegisterOutputType(ProvisionedClusterArrayOutput{})
pulumi.RegisterOutputType(ProvisionedClusterMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/arckubernetes/cluster.go | sdk/go/azure/arckubernetes/cluster.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package arckubernetes
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 Kubernetes Cluster.
//
// > **Note:** Installing and configuring the Azure Arc Agent on your Kubernetes Cluster to establish connectivity is outside the scope of this document. For more details refer to [Deploy agents to your cluster](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/conceptual-agent-overview#deploy-agents-to-your-cluster) and [Connect an existing Kubernetes Cluster](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/quickstart-connect-cluster?tabs=azure-cli#connect-an-existing-kubernetes-cluster). If you encounter issues connecting your Kubernetes Cluster to Azure Arc, we'd recommend opening a ticket with Microsoft Support.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/arckubernetes"
// "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
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "testdata/public.cer",
// }, nil)
// if err != nil {
// return err
// }
// _, err = arckubernetes.NewCluster(ctx, "example", &arckubernetes.ClusterArgs{
// Name: pulumi.String("example-akcc"),
// ResourceGroupName: example.Name,
// Location: pulumi.String("West Europe"),
// AgentPublicKeyCertificate: pulumi.String(invokeFilebase64.Result),
// Identity: &arckubernetes.ClusterIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// Tags: pulumi.StringMap{
// "ENV": pulumi.String("Test"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// > **Note:** An extensive example on connecting the `arckubernetes.Cluster` to an external kubernetes cluster can be found in the `./examples/arckubernetes` directory within the GitHub Repository.
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Kubernetes` - 2024-01-01
//
// ## Import
//
// Arc Kubernetes Cluster can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:arckubernetes/cluster:Cluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Kubernetes/connectedClusters/cluster1
// ```
type Cluster struct {
pulumi.CustomResourceState
// Specifies the base64-encoded public certificate used by the agent to do the initial handshake to the backend services in Azure. Changing this forces a new Arc Kubernetes Cluster to be created.
AgentPublicKeyCertificate pulumi.StringOutput `pulumi:"agentPublicKeyCertificate"`
// Version of the agent running on the cluster resource.
AgentVersion pulumi.StringOutput `pulumi:"agentVersion"`
// The distribution running on this Arc Kubernetes Cluster.
Distribution pulumi.StringOutput `pulumi:"distribution"`
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Cluster to be created.
Identity ClusterIdentityOutput `pulumi:"identity"`
// The infrastructure on which the Arc Kubernetes Cluster is running on.
Infrastructure pulumi.StringOutput `pulumi:"infrastructure"`
// The Kubernetes version of the cluster resource.
KubernetesVersion pulumi.StringOutput `pulumi:"kubernetesVersion"`
// Specifies the Azure Region where the Arc Kubernetes Cluster should exist. Changing this forces a new Arc Kubernetes Cluster to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name which should be used for this Arc Kubernetes Cluster. Changing this forces a new Arc Kubernetes Cluster to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The cluster offering.
Offering pulumi.StringOutput `pulumi:"offering"`
// Specifies the name of the Resource Group where the Arc Kubernetes Cluster should exist. Changing this forces a new Arc Kubernetes Cluster to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Arc Kubernetes Cluster.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Number of CPU cores present in the cluster resource.
TotalCoreCount pulumi.IntOutput `pulumi:"totalCoreCount"`
// Number of nodes present in the cluster resource.
TotalNodeCount pulumi.IntOutput `pulumi:"totalNodeCount"`
}
// NewCluster registers a new resource with the given unique name, arguments, and options.
func NewCluster(ctx *pulumi.Context,
name string, args *ClusterArgs, opts ...pulumi.ResourceOption) (*Cluster, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AgentPublicKeyCertificate == nil {
return nil, errors.New("invalid value for required argument 'AgentPublicKeyCertificate'")
}
if args.Identity == nil {
return nil, errors.New("invalid value for required argument 'Identity'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Cluster
err := ctx.RegisterResource("azure:arckubernetes/cluster:Cluster", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCluster gets an existing Cluster 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 GetCluster(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ClusterState, opts ...pulumi.ResourceOption) (*Cluster, error) {
var resource Cluster
err := ctx.ReadResource("azure:arckubernetes/cluster:Cluster", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Cluster resources.
type clusterState struct {
// Specifies the base64-encoded public certificate used by the agent to do the initial handshake to the backend services in Azure. Changing this forces a new Arc Kubernetes Cluster to be created.
AgentPublicKeyCertificate *string `pulumi:"agentPublicKeyCertificate"`
// Version of the agent running on the cluster resource.
AgentVersion *string `pulumi:"agentVersion"`
// The distribution running on this Arc Kubernetes Cluster.
Distribution *string `pulumi:"distribution"`
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Cluster to be created.
Identity *ClusterIdentity `pulumi:"identity"`
// The infrastructure on which the Arc Kubernetes Cluster is running on.
Infrastructure *string `pulumi:"infrastructure"`
// The Kubernetes version of the cluster resource.
KubernetesVersion *string `pulumi:"kubernetesVersion"`
// Specifies the Azure Region where the Arc Kubernetes Cluster should exist. Changing this forces a new Arc Kubernetes Cluster to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Arc Kubernetes Cluster. Changing this forces a new Arc Kubernetes Cluster to be created.
Name *string `pulumi:"name"`
// The cluster offering.
Offering *string `pulumi:"offering"`
// Specifies the name of the Resource Group where the Arc Kubernetes Cluster should exist. Changing this forces a new Arc Kubernetes Cluster to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Arc Kubernetes Cluster.
Tags map[string]string `pulumi:"tags"`
// Number of CPU cores present in the cluster resource.
TotalCoreCount *int `pulumi:"totalCoreCount"`
// Number of nodes present in the cluster resource.
TotalNodeCount *int `pulumi:"totalNodeCount"`
}
type ClusterState struct {
// Specifies the base64-encoded public certificate used by the agent to do the initial handshake to the backend services in Azure. Changing this forces a new Arc Kubernetes Cluster to be created.
AgentPublicKeyCertificate pulumi.StringPtrInput
// Version of the agent running on the cluster resource.
AgentVersion pulumi.StringPtrInput
// The distribution running on this Arc Kubernetes Cluster.
Distribution pulumi.StringPtrInput
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Cluster to be created.
Identity ClusterIdentityPtrInput
// The infrastructure on which the Arc Kubernetes Cluster is running on.
Infrastructure pulumi.StringPtrInput
// The Kubernetes version of the cluster resource.
KubernetesVersion pulumi.StringPtrInput
// Specifies the Azure Region where the Arc Kubernetes Cluster should exist. Changing this forces a new Arc Kubernetes Cluster to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Arc Kubernetes Cluster. Changing this forces a new Arc Kubernetes Cluster to be created.
Name pulumi.StringPtrInput
// The cluster offering.
Offering pulumi.StringPtrInput
// Specifies the name of the Resource Group where the Arc Kubernetes Cluster should exist. Changing this forces a new Arc Kubernetes Cluster to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Arc Kubernetes Cluster.
Tags pulumi.StringMapInput
// Number of CPU cores present in the cluster resource.
TotalCoreCount pulumi.IntPtrInput
// Number of nodes present in the cluster resource.
TotalNodeCount pulumi.IntPtrInput
}
func (ClusterState) ElementType() reflect.Type {
return reflect.TypeOf((*clusterState)(nil)).Elem()
}
type clusterArgs struct {
// Specifies the base64-encoded public certificate used by the agent to do the initial handshake to the backend services in Azure. Changing this forces a new Arc Kubernetes Cluster to be created.
AgentPublicKeyCertificate string `pulumi:"agentPublicKeyCertificate"`
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Cluster to be created.
Identity ClusterIdentity `pulumi:"identity"`
// Specifies the Azure Region where the Arc Kubernetes Cluster should exist. Changing this forces a new Arc Kubernetes Cluster to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Arc Kubernetes Cluster. Changing this forces a new Arc Kubernetes Cluster to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Resource Group where the Arc Kubernetes Cluster should exist. Changing this forces a new Arc Kubernetes Cluster to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Arc Kubernetes Cluster.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Cluster resource.
type ClusterArgs struct {
// Specifies the base64-encoded public certificate used by the agent to do the initial handshake to the backend services in Azure. Changing this forces a new Arc Kubernetes Cluster to be created.
AgentPublicKeyCertificate pulumi.StringInput
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Cluster to be created.
Identity ClusterIdentityInput
// Specifies the Azure Region where the Arc Kubernetes Cluster should exist. Changing this forces a new Arc Kubernetes Cluster to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Arc Kubernetes Cluster. Changing this forces a new Arc Kubernetes Cluster to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Resource Group where the Arc Kubernetes Cluster should exist. Changing this forces a new Arc Kubernetes Cluster to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Arc Kubernetes Cluster.
Tags pulumi.StringMapInput
}
func (ClusterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*clusterArgs)(nil)).Elem()
}
type ClusterInput interface {
pulumi.Input
ToClusterOutput() ClusterOutput
ToClusterOutputWithContext(ctx context.Context) ClusterOutput
}
func (*Cluster) ElementType() reflect.Type {
return reflect.TypeOf((**Cluster)(nil)).Elem()
}
func (i *Cluster) ToClusterOutput() ClusterOutput {
return i.ToClusterOutputWithContext(context.Background())
}
func (i *Cluster) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterOutput)
}
// ClusterArrayInput is an input type that accepts ClusterArray and ClusterArrayOutput values.
// You can construct a concrete instance of `ClusterArrayInput` via:
//
// ClusterArray{ ClusterArgs{...} }
type ClusterArrayInput interface {
pulumi.Input
ToClusterArrayOutput() ClusterArrayOutput
ToClusterArrayOutputWithContext(context.Context) ClusterArrayOutput
}
type ClusterArray []ClusterInput
func (ClusterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
}
func (i ClusterArray) ToClusterArrayOutput() ClusterArrayOutput {
return i.ToClusterArrayOutputWithContext(context.Background())
}
func (i ClusterArray) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterArrayOutput)
}
// ClusterMapInput is an input type that accepts ClusterMap and ClusterMapOutput values.
// You can construct a concrete instance of `ClusterMapInput` via:
//
// ClusterMap{ "key": ClusterArgs{...} }
type ClusterMapInput interface {
pulumi.Input
ToClusterMapOutput() ClusterMapOutput
ToClusterMapOutputWithContext(context.Context) ClusterMapOutput
}
type ClusterMap map[string]ClusterInput
func (ClusterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
}
func (i ClusterMap) ToClusterMapOutput() ClusterMapOutput {
return i.ToClusterMapOutputWithContext(context.Background())
}
func (i ClusterMap) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterMapOutput)
}
type ClusterOutput struct{ *pulumi.OutputState }
func (ClusterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Cluster)(nil)).Elem()
}
func (o ClusterOutput) ToClusterOutput() ClusterOutput {
return o
}
func (o ClusterOutput) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
return o
}
// Specifies the base64-encoded public certificate used by the agent to do the initial handshake to the backend services in Azure. Changing this forces a new Arc Kubernetes Cluster to be created.
func (o ClusterOutput) AgentPublicKeyCertificate() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.AgentPublicKeyCertificate }).(pulumi.StringOutput)
}
// Version of the agent running on the cluster resource.
func (o ClusterOutput) AgentVersion() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.AgentVersion }).(pulumi.StringOutput)
}
// The distribution running on this Arc Kubernetes Cluster.
func (o ClusterOutput) Distribution() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Distribution }).(pulumi.StringOutput)
}
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Cluster to be created.
func (o ClusterOutput) Identity() ClusterIdentityOutput {
return o.ApplyT(func(v *Cluster) ClusterIdentityOutput { return v.Identity }).(ClusterIdentityOutput)
}
// The infrastructure on which the Arc Kubernetes Cluster is running on.
func (o ClusterOutput) Infrastructure() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Infrastructure }).(pulumi.StringOutput)
}
// The Kubernetes version of the cluster resource.
func (o ClusterOutput) KubernetesVersion() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.KubernetesVersion }).(pulumi.StringOutput)
}
// Specifies the Azure Region where the Arc Kubernetes Cluster should exist. Changing this forces a new Arc Kubernetes Cluster to be created.
func (o ClusterOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name which should be used for this Arc Kubernetes Cluster. Changing this forces a new Arc Kubernetes Cluster to be created.
func (o ClusterOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The cluster offering.
func (o ClusterOutput) Offering() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Offering }).(pulumi.StringOutput)
}
// Specifies the name of the Resource Group where the Arc Kubernetes Cluster should exist. Changing this forces a new Arc Kubernetes Cluster to be created.
func (o ClusterOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Arc Kubernetes Cluster.
func (o ClusterOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// Number of CPU cores present in the cluster resource.
func (o ClusterOutput) TotalCoreCount() pulumi.IntOutput {
return o.ApplyT(func(v *Cluster) pulumi.IntOutput { return v.TotalCoreCount }).(pulumi.IntOutput)
}
// Number of nodes present in the cluster resource.
func (o ClusterOutput) TotalNodeCount() pulumi.IntOutput {
return o.ApplyT(func(v *Cluster) pulumi.IntOutput { return v.TotalNodeCount }).(pulumi.IntOutput)
}
type ClusterArrayOutput struct{ *pulumi.OutputState }
func (ClusterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
}
func (o ClusterArrayOutput) ToClusterArrayOutput() ClusterArrayOutput {
return o
}
func (o ClusterArrayOutput) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
return o
}
func (o ClusterArrayOutput) Index(i pulumi.IntInput) ClusterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Cluster {
return vs[0].([]*Cluster)[vs[1].(int)]
}).(ClusterOutput)
}
type ClusterMapOutput struct{ *pulumi.OutputState }
func (ClusterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
}
func (o ClusterMapOutput) ToClusterMapOutput() ClusterMapOutput {
return o
}
func (o ClusterMapOutput) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
return o
}
func (o ClusterMapOutput) MapIndex(k pulumi.StringInput) ClusterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Cluster {
return vs[0].(map[string]*Cluster)[vs[1].(string)]
}).(ClusterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ClusterInput)(nil)).Elem(), &Cluster{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterArrayInput)(nil)).Elem(), ClusterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterMapInput)(nil)).Elem(), ClusterMap{})
pulumi.RegisterOutputType(ClusterOutput{})
pulumi.RegisterOutputType(ClusterArrayOutput{})
pulumi.RegisterOutputType(ClusterMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/arckubernetes/fluxConfiguration.go | sdk/go/azure/arckubernetes/fluxConfiguration.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package arckubernetes
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 Kubernetes Flux Configuration.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/arckubernetes"
// "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
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "testdata/public.cer",
// }, nil)
// if err != nil {
// return err
// }
// _, err = arckubernetes.NewCluster(ctx, "example", &arckubernetes.ClusterArgs{
// Name: pulumi.String("example-akcc"),
// ResourceGroupName: example.Name,
// Location: pulumi.String("West Europe"),
// AgentPublicKeyCertificate: pulumi.String(invokeFilebase64.Result),
// Identity: &arckubernetes.ClusterIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// Tags: pulumi.StringMap{
// "ENV": pulumi.String("Test"),
// },
// })
// if err != nil {
// return err
// }
// exampleClusterExtension, err := arckubernetes.NewClusterExtension(ctx, "example", &arckubernetes.ClusterExtensionArgs{
// Name: pulumi.String("example-ext"),
// ClusterId: pulumi.Any(test.Id),
// ExtensionType: pulumi.String("microsoft.flux"),
// })
// if err != nil {
// return err
// }
// _, err = arckubernetes.NewFluxConfiguration(ctx, "example", &arckubernetes.FluxConfigurationArgs{
// Name: pulumi.String("example-fc"),
// ClusterId: pulumi.Any(test.Id),
// Namespace: pulumi.String("flux"),
// GitRepository: &arckubernetes.FluxConfigurationGitRepositoryArgs{
// Url: pulumi.String("https://github.com/Azure/arc-k8s-demo"),
// ReferenceType: pulumi.String("branch"),
// ReferenceValue: pulumi.String("main"),
// },
// Kustomizations: arckubernetes.FluxConfigurationKustomizationArray{
// &arckubernetes.FluxConfigurationKustomizationArgs{
// Name: pulumi.String("kustomization-1"),
// },
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleClusterExtension,
// }))
// 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.KubernetesConfiguration` - 2024-11-01
//
// ## Import
//
// Arc Kubernetes Flux Configuration can be imported using the `resource id` for different `cluster_resource_name`, e.g.
//
// ```sh
// $ pulumi import azure:arckubernetes/fluxConfiguration:FluxConfiguration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Kubernetes/connectedClusters/cluster1/providers/Microsoft.KubernetesConfiguration/fluxConfigurations/fluxConfiguration1
// ```
type FluxConfiguration struct {
pulumi.CustomResourceState
// An `blobStorage` block as defined below.
BlobStorage FluxConfigurationBlobStoragePtrOutput `pulumi:"blobStorage"`
// A `bucket` block as defined below.
Bucket FluxConfigurationBucketPtrOutput `pulumi:"bucket"`
// Specifies the Cluster ID. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ClusterId pulumi.StringOutput `pulumi:"clusterId"`
// Whether the configuration will keep its reconciliation of its kustomizations and sources with the repository. Defaults to `true`.
ContinuousReconciliationEnabled pulumi.BoolPtrOutput `pulumi:"continuousReconciliationEnabled"`
// A `gitRepository` block as defined below.
GitRepository FluxConfigurationGitRepositoryPtrOutput `pulumi:"gitRepository"`
// A `kustomizations` block as defined below.
Kustomizations FluxConfigurationKustomizationArrayOutput `pulumi:"kustomizations"`
// Specifies the name which should be used for this Arc Kubernetes Flux Configuration. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the namespace to which this configuration is installed to. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
Namespace pulumi.StringOutput `pulumi:"namespace"`
// Specifies the scope at which the operator will be installed. Possible values are `cluster` and `namespace`. Defaults to `namespace`. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
Scope pulumi.StringPtrOutput `pulumi:"scope"`
}
// NewFluxConfiguration registers a new resource with the given unique name, arguments, and options.
func NewFluxConfiguration(ctx *pulumi.Context,
name string, args *FluxConfigurationArgs, opts ...pulumi.ResourceOption) (*FluxConfiguration, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ClusterId == nil {
return nil, errors.New("invalid value for required argument 'ClusterId'")
}
if args.Kustomizations == nil {
return nil, errors.New("invalid value for required argument 'Kustomizations'")
}
if args.Namespace == nil {
return nil, errors.New("invalid value for required argument 'Namespace'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource FluxConfiguration
err := ctx.RegisterResource("azure:arckubernetes/fluxConfiguration:FluxConfiguration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetFluxConfiguration gets an existing FluxConfiguration 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 GetFluxConfiguration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *FluxConfigurationState, opts ...pulumi.ResourceOption) (*FluxConfiguration, error) {
var resource FluxConfiguration
err := ctx.ReadResource("azure:arckubernetes/fluxConfiguration:FluxConfiguration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering FluxConfiguration resources.
type fluxConfigurationState struct {
// An `blobStorage` block as defined below.
BlobStorage *FluxConfigurationBlobStorage `pulumi:"blobStorage"`
// A `bucket` block as defined below.
Bucket *FluxConfigurationBucket `pulumi:"bucket"`
// Specifies the Cluster ID. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ClusterId *string `pulumi:"clusterId"`
// Whether the configuration will keep its reconciliation of its kustomizations and sources with the repository. Defaults to `true`.
ContinuousReconciliationEnabled *bool `pulumi:"continuousReconciliationEnabled"`
// A `gitRepository` block as defined below.
GitRepository *FluxConfigurationGitRepository `pulumi:"gitRepository"`
// A `kustomizations` block as defined below.
Kustomizations []FluxConfigurationKustomization `pulumi:"kustomizations"`
// Specifies the name which should be used for this Arc Kubernetes Flux Configuration. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
Name *string `pulumi:"name"`
// Specifies the namespace to which this configuration is installed to. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
Namespace *string `pulumi:"namespace"`
// Specifies the scope at which the operator will be installed. Possible values are `cluster` and `namespace`. Defaults to `namespace`. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
Scope *string `pulumi:"scope"`
}
type FluxConfigurationState struct {
// An `blobStorage` block as defined below.
BlobStorage FluxConfigurationBlobStoragePtrInput
// A `bucket` block as defined below.
Bucket FluxConfigurationBucketPtrInput
// Specifies the Cluster ID. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ClusterId pulumi.StringPtrInput
// Whether the configuration will keep its reconciliation of its kustomizations and sources with the repository. Defaults to `true`.
ContinuousReconciliationEnabled pulumi.BoolPtrInput
// A `gitRepository` block as defined below.
GitRepository FluxConfigurationGitRepositoryPtrInput
// A `kustomizations` block as defined below.
Kustomizations FluxConfigurationKustomizationArrayInput
// Specifies the name which should be used for this Arc Kubernetes Flux Configuration. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
Name pulumi.StringPtrInput
// Specifies the namespace to which this configuration is installed to. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
Namespace pulumi.StringPtrInput
// Specifies the scope at which the operator will be installed. Possible values are `cluster` and `namespace`. Defaults to `namespace`. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
Scope pulumi.StringPtrInput
}
func (FluxConfigurationState) ElementType() reflect.Type {
return reflect.TypeOf((*fluxConfigurationState)(nil)).Elem()
}
type fluxConfigurationArgs struct {
// An `blobStorage` block as defined below.
BlobStorage *FluxConfigurationBlobStorage `pulumi:"blobStorage"`
// A `bucket` block as defined below.
Bucket *FluxConfigurationBucket `pulumi:"bucket"`
// Specifies the Cluster ID. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ClusterId string `pulumi:"clusterId"`
// Whether the configuration will keep its reconciliation of its kustomizations and sources with the repository. Defaults to `true`.
ContinuousReconciliationEnabled *bool `pulumi:"continuousReconciliationEnabled"`
// A `gitRepository` block as defined below.
GitRepository *FluxConfigurationGitRepository `pulumi:"gitRepository"`
// A `kustomizations` block as defined below.
Kustomizations []FluxConfigurationKustomization `pulumi:"kustomizations"`
// Specifies the name which should be used for this Arc Kubernetes Flux Configuration. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
Name *string `pulumi:"name"`
// Specifies the namespace to which this configuration is installed to. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
Namespace string `pulumi:"namespace"`
// Specifies the scope at which the operator will be installed. Possible values are `cluster` and `namespace`. Defaults to `namespace`. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
Scope *string `pulumi:"scope"`
}
// The set of arguments for constructing a FluxConfiguration resource.
type FluxConfigurationArgs struct {
// An `blobStorage` block as defined below.
BlobStorage FluxConfigurationBlobStoragePtrInput
// A `bucket` block as defined below.
Bucket FluxConfigurationBucketPtrInput
// Specifies the Cluster ID. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ClusterId pulumi.StringInput
// Whether the configuration will keep its reconciliation of its kustomizations and sources with the repository. Defaults to `true`.
ContinuousReconciliationEnabled pulumi.BoolPtrInput
// A `gitRepository` block as defined below.
GitRepository FluxConfigurationGitRepositoryPtrInput
// A `kustomizations` block as defined below.
Kustomizations FluxConfigurationKustomizationArrayInput
// Specifies the name which should be used for this Arc Kubernetes Flux Configuration. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
Name pulumi.StringPtrInput
// Specifies the namespace to which this configuration is installed to. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
Namespace pulumi.StringInput
// Specifies the scope at which the operator will be installed. Possible values are `cluster` and `namespace`. Defaults to `namespace`. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
Scope pulumi.StringPtrInput
}
func (FluxConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*fluxConfigurationArgs)(nil)).Elem()
}
type FluxConfigurationInput interface {
pulumi.Input
ToFluxConfigurationOutput() FluxConfigurationOutput
ToFluxConfigurationOutputWithContext(ctx context.Context) FluxConfigurationOutput
}
func (*FluxConfiguration) ElementType() reflect.Type {
return reflect.TypeOf((**FluxConfiguration)(nil)).Elem()
}
func (i *FluxConfiguration) ToFluxConfigurationOutput() FluxConfigurationOutput {
return i.ToFluxConfigurationOutputWithContext(context.Background())
}
func (i *FluxConfiguration) ToFluxConfigurationOutputWithContext(ctx context.Context) FluxConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(FluxConfigurationOutput)
}
// FluxConfigurationArrayInput is an input type that accepts FluxConfigurationArray and FluxConfigurationArrayOutput values.
// You can construct a concrete instance of `FluxConfigurationArrayInput` via:
//
// FluxConfigurationArray{ FluxConfigurationArgs{...} }
type FluxConfigurationArrayInput interface {
pulumi.Input
ToFluxConfigurationArrayOutput() FluxConfigurationArrayOutput
ToFluxConfigurationArrayOutputWithContext(context.Context) FluxConfigurationArrayOutput
}
type FluxConfigurationArray []FluxConfigurationInput
func (FluxConfigurationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*FluxConfiguration)(nil)).Elem()
}
func (i FluxConfigurationArray) ToFluxConfigurationArrayOutput() FluxConfigurationArrayOutput {
return i.ToFluxConfigurationArrayOutputWithContext(context.Background())
}
func (i FluxConfigurationArray) ToFluxConfigurationArrayOutputWithContext(ctx context.Context) FluxConfigurationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(FluxConfigurationArrayOutput)
}
// FluxConfigurationMapInput is an input type that accepts FluxConfigurationMap and FluxConfigurationMapOutput values.
// You can construct a concrete instance of `FluxConfigurationMapInput` via:
//
// FluxConfigurationMap{ "key": FluxConfigurationArgs{...} }
type FluxConfigurationMapInput interface {
pulumi.Input
ToFluxConfigurationMapOutput() FluxConfigurationMapOutput
ToFluxConfigurationMapOutputWithContext(context.Context) FluxConfigurationMapOutput
}
type FluxConfigurationMap map[string]FluxConfigurationInput
func (FluxConfigurationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*FluxConfiguration)(nil)).Elem()
}
func (i FluxConfigurationMap) ToFluxConfigurationMapOutput() FluxConfigurationMapOutput {
return i.ToFluxConfigurationMapOutputWithContext(context.Background())
}
func (i FluxConfigurationMap) ToFluxConfigurationMapOutputWithContext(ctx context.Context) FluxConfigurationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(FluxConfigurationMapOutput)
}
type FluxConfigurationOutput struct{ *pulumi.OutputState }
func (FluxConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**FluxConfiguration)(nil)).Elem()
}
func (o FluxConfigurationOutput) ToFluxConfigurationOutput() FluxConfigurationOutput {
return o
}
func (o FluxConfigurationOutput) ToFluxConfigurationOutputWithContext(ctx context.Context) FluxConfigurationOutput {
return o
}
// An `blobStorage` block as defined below.
func (o FluxConfigurationOutput) BlobStorage() FluxConfigurationBlobStoragePtrOutput {
return o.ApplyT(func(v *FluxConfiguration) FluxConfigurationBlobStoragePtrOutput { return v.BlobStorage }).(FluxConfigurationBlobStoragePtrOutput)
}
// A `bucket` block as defined below.
func (o FluxConfigurationOutput) Bucket() FluxConfigurationBucketPtrOutput {
return o.ApplyT(func(v *FluxConfiguration) FluxConfigurationBucketPtrOutput { return v.Bucket }).(FluxConfigurationBucketPtrOutput)
}
// Specifies the Cluster ID. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
func (o FluxConfigurationOutput) ClusterId() pulumi.StringOutput {
return o.ApplyT(func(v *FluxConfiguration) pulumi.StringOutput { return v.ClusterId }).(pulumi.StringOutput)
}
// Whether the configuration will keep its reconciliation of its kustomizations and sources with the repository. Defaults to `true`.
func (o FluxConfigurationOutput) ContinuousReconciliationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *FluxConfiguration) pulumi.BoolPtrOutput { return v.ContinuousReconciliationEnabled }).(pulumi.BoolPtrOutput)
}
// A `gitRepository` block as defined below.
func (o FluxConfigurationOutput) GitRepository() FluxConfigurationGitRepositoryPtrOutput {
return o.ApplyT(func(v *FluxConfiguration) FluxConfigurationGitRepositoryPtrOutput { return v.GitRepository }).(FluxConfigurationGitRepositoryPtrOutput)
}
// A `kustomizations` block as defined below.
func (o FluxConfigurationOutput) Kustomizations() FluxConfigurationKustomizationArrayOutput {
return o.ApplyT(func(v *FluxConfiguration) FluxConfigurationKustomizationArrayOutput { return v.Kustomizations }).(FluxConfigurationKustomizationArrayOutput)
}
// Specifies the name which should be used for this Arc Kubernetes Flux Configuration. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
func (o FluxConfigurationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *FluxConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the namespace to which this configuration is installed to. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
func (o FluxConfigurationOutput) Namespace() pulumi.StringOutput {
return o.ApplyT(func(v *FluxConfiguration) pulumi.StringOutput { return v.Namespace }).(pulumi.StringOutput)
}
// Specifies the scope at which the operator will be installed. Possible values are `cluster` and `namespace`. Defaults to `namespace`. Changing this forces a new Arc Kubernetes Flux Configuration to be created.
func (o FluxConfigurationOutput) Scope() pulumi.StringPtrOutput {
return o.ApplyT(func(v *FluxConfiguration) pulumi.StringPtrOutput { return v.Scope }).(pulumi.StringPtrOutput)
}
type FluxConfigurationArrayOutput struct{ *pulumi.OutputState }
func (FluxConfigurationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*FluxConfiguration)(nil)).Elem()
}
func (o FluxConfigurationArrayOutput) ToFluxConfigurationArrayOutput() FluxConfigurationArrayOutput {
return o
}
func (o FluxConfigurationArrayOutput) ToFluxConfigurationArrayOutputWithContext(ctx context.Context) FluxConfigurationArrayOutput {
return o
}
func (o FluxConfigurationArrayOutput) Index(i pulumi.IntInput) FluxConfigurationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FluxConfiguration {
return vs[0].([]*FluxConfiguration)[vs[1].(int)]
}).(FluxConfigurationOutput)
}
type FluxConfigurationMapOutput struct{ *pulumi.OutputState }
func (FluxConfigurationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*FluxConfiguration)(nil)).Elem()
}
func (o FluxConfigurationMapOutput) ToFluxConfigurationMapOutput() FluxConfigurationMapOutput {
return o
}
func (o FluxConfigurationMapOutput) ToFluxConfigurationMapOutputWithContext(ctx context.Context) FluxConfigurationMapOutput {
return o
}
func (o FluxConfigurationMapOutput) MapIndex(k pulumi.StringInput) FluxConfigurationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FluxConfiguration {
return vs[0].(map[string]*FluxConfiguration)[vs[1].(string)]
}).(FluxConfigurationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*FluxConfigurationInput)(nil)).Elem(), &FluxConfiguration{})
pulumi.RegisterInputType(reflect.TypeOf((*FluxConfigurationArrayInput)(nil)).Elem(), FluxConfigurationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*FluxConfigurationMapInput)(nil)).Elem(), FluxConfigurationMap{})
pulumi.RegisterOutputType(FluxConfigurationOutput{})
pulumi.RegisterOutputType(FluxConfigurationArrayOutput{})
pulumi.RegisterOutputType(FluxConfigurationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/arckubernetes/clusterExtension.go | sdk/go/azure/arckubernetes/clusterExtension.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package arckubernetes
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 Kubernetes Cluster Extension.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/arckubernetes"
// "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
// }
// invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
// Input: "testdata/public.cer",
// }, nil)
// if err != nil {
// return err
// }
// exampleCluster, err := arckubernetes.NewCluster(ctx, "example", &arckubernetes.ClusterArgs{
// Name: pulumi.String("example-akcc"),
// ResourceGroupName: example.Name,
// Location: pulumi.String("West Europe"),
// AgentPublicKeyCertificate: pulumi.String(invokeFilebase64.Result),
// Identity: &arckubernetes.ClusterIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// Tags: pulumi.StringMap{
// "ENV": pulumi.String("Test"),
// },
// })
// if err != nil {
// return err
// }
// _, err = arckubernetes.NewClusterExtension(ctx, "example", &arckubernetes.ClusterExtensionArgs{
// Name: pulumi.String("example-ext"),
// ClusterId: exampleCluster.ID(),
// ExtensionType: pulumi.String("microsoft.flux"),
// })
// 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.KubernetesConfiguration` - 2024-11-01
//
// ## Import
//
// Arc Kubernetes Cluster Extension can be imported using the `resource id` for different `cluster_resource_name`, e.g.
//
// ```sh
// $ pulumi import azure:arckubernetes/clusterExtension:ClusterExtension example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Kubernetes/connectedClusters/cluster1/providers/Microsoft.KubernetesConfiguration/extensions/extension1
// ```
type ClusterExtension struct {
pulumi.CustomResourceState
// Specifies the Cluster ID. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ClusterId pulumi.StringOutput `pulumi:"clusterId"`
// Configuration settings that are sensitive, as name-value pairs for configuring this extension.
ConfigurationProtectedSettings pulumi.StringMapOutput `pulumi:"configurationProtectedSettings"`
// Configuration settings, as name-value pairs for configuring this extension.
ConfigurationSettings pulumi.StringMapOutput `pulumi:"configurationSettings"`
// The current version of the extension.
CurrentVersion pulumi.StringOutput `pulumi:"currentVersion"`
// Specifies the type of extension. It must be one of the extension types registered with Microsoft.KubernetesConfiguration by the Extension publisher. For more information, please refer to [Available Extensions for Arc-enabled Kubernetes clusters](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/extensions-release). Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ExtensionType pulumi.StringOutput `pulumi:"extensionType"`
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
Identity ClusterExtensionIdentityOutput `pulumi:"identity"`
// Specifies the name which should be used for this Arc Kubernetes Cluster Extension. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Namespace where the extension release must be placed for a cluster scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ReleaseNamespace pulumi.StringOutput `pulumi:"releaseNamespace"`
// The release train used by this extension. Possible values include but are not limited to `Stable`, `Preview`. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ReleaseTrain pulumi.StringOutput `pulumi:"releaseTrain"`
// Namespace where the extension will be created for a namespace scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
TargetNamespace pulumi.StringOutput `pulumi:"targetNamespace"`
// User-specified version that the extension should pin to. If it is not set, Azure will use the latest version and auto upgrade it. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
Version pulumi.StringPtrOutput `pulumi:"version"`
}
// NewClusterExtension registers a new resource with the given unique name, arguments, and options.
func NewClusterExtension(ctx *pulumi.Context,
name string, args *ClusterExtensionArgs, opts ...pulumi.ResourceOption) (*ClusterExtension, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ClusterId == nil {
return nil, errors.New("invalid value for required argument 'ClusterId'")
}
if args.ExtensionType == nil {
return nil, errors.New("invalid value for required argument 'ExtensionType'")
}
if args.Identity == nil {
return nil, errors.New("invalid value for required argument 'Identity'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ClusterExtension
err := ctx.RegisterResource("azure:arckubernetes/clusterExtension:ClusterExtension", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetClusterExtension gets an existing ClusterExtension 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 GetClusterExtension(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ClusterExtensionState, opts ...pulumi.ResourceOption) (*ClusterExtension, error) {
var resource ClusterExtension
err := ctx.ReadResource("azure:arckubernetes/clusterExtension:ClusterExtension", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ClusterExtension resources.
type clusterExtensionState struct {
// Specifies the Cluster ID. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ClusterId *string `pulumi:"clusterId"`
// Configuration settings that are sensitive, as name-value pairs for configuring this extension.
ConfigurationProtectedSettings map[string]string `pulumi:"configurationProtectedSettings"`
// Configuration settings, as name-value pairs for configuring this extension.
ConfigurationSettings map[string]string `pulumi:"configurationSettings"`
// The current version of the extension.
CurrentVersion *string `pulumi:"currentVersion"`
// Specifies the type of extension. It must be one of the extension types registered with Microsoft.KubernetesConfiguration by the Extension publisher. For more information, please refer to [Available Extensions for Arc-enabled Kubernetes clusters](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/extensions-release). Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ExtensionType *string `pulumi:"extensionType"`
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
Identity *ClusterExtensionIdentity `pulumi:"identity"`
// Specifies the name which should be used for this Arc Kubernetes Cluster Extension. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
Name *string `pulumi:"name"`
// Namespace where the extension release must be placed for a cluster scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ReleaseNamespace *string `pulumi:"releaseNamespace"`
// The release train used by this extension. Possible values include but are not limited to `Stable`, `Preview`. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ReleaseTrain *string `pulumi:"releaseTrain"`
// Namespace where the extension will be created for a namespace scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
TargetNamespace *string `pulumi:"targetNamespace"`
// User-specified version that the extension should pin to. If it is not set, Azure will use the latest version and auto upgrade it. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
Version *string `pulumi:"version"`
}
type ClusterExtensionState struct {
// Specifies the Cluster ID. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ClusterId pulumi.StringPtrInput
// Configuration settings that are sensitive, as name-value pairs for configuring this extension.
ConfigurationProtectedSettings pulumi.StringMapInput
// Configuration settings, as name-value pairs for configuring this extension.
ConfigurationSettings pulumi.StringMapInput
// The current version of the extension.
CurrentVersion pulumi.StringPtrInput
// Specifies the type of extension. It must be one of the extension types registered with Microsoft.KubernetesConfiguration by the Extension publisher. For more information, please refer to [Available Extensions for Arc-enabled Kubernetes clusters](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/extensions-release). Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ExtensionType pulumi.StringPtrInput
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
Identity ClusterExtensionIdentityPtrInput
// Specifies the name which should be used for this Arc Kubernetes Cluster Extension. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
Name pulumi.StringPtrInput
// Namespace where the extension release must be placed for a cluster scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ReleaseNamespace pulumi.StringPtrInput
// The release train used by this extension. Possible values include but are not limited to `Stable`, `Preview`. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ReleaseTrain pulumi.StringPtrInput
// Namespace where the extension will be created for a namespace scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
TargetNamespace pulumi.StringPtrInput
// User-specified version that the extension should pin to. If it is not set, Azure will use the latest version and auto upgrade it. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
Version pulumi.StringPtrInput
}
func (ClusterExtensionState) ElementType() reflect.Type {
return reflect.TypeOf((*clusterExtensionState)(nil)).Elem()
}
type clusterExtensionArgs struct {
// Specifies the Cluster ID. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ClusterId string `pulumi:"clusterId"`
// Configuration settings that are sensitive, as name-value pairs for configuring this extension.
ConfigurationProtectedSettings map[string]string `pulumi:"configurationProtectedSettings"`
// Configuration settings, as name-value pairs for configuring this extension.
ConfigurationSettings map[string]string `pulumi:"configurationSettings"`
// Specifies the type of extension. It must be one of the extension types registered with Microsoft.KubernetesConfiguration by the Extension publisher. For more information, please refer to [Available Extensions for Arc-enabled Kubernetes clusters](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/extensions-release). Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ExtensionType string `pulumi:"extensionType"`
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
Identity ClusterExtensionIdentity `pulumi:"identity"`
// Specifies the name which should be used for this Arc Kubernetes Cluster Extension. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
Name *string `pulumi:"name"`
// Namespace where the extension release must be placed for a cluster scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ReleaseNamespace *string `pulumi:"releaseNamespace"`
// The release train used by this extension. Possible values include but are not limited to `Stable`, `Preview`. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ReleaseTrain *string `pulumi:"releaseTrain"`
// Namespace where the extension will be created for a namespace scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
TargetNamespace *string `pulumi:"targetNamespace"`
// User-specified version that the extension should pin to. If it is not set, Azure will use the latest version and auto upgrade it. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
Version *string `pulumi:"version"`
}
// The set of arguments for constructing a ClusterExtension resource.
type ClusterExtensionArgs struct {
// Specifies the Cluster ID. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ClusterId pulumi.StringInput
// Configuration settings that are sensitive, as name-value pairs for configuring this extension.
ConfigurationProtectedSettings pulumi.StringMapInput
// Configuration settings, as name-value pairs for configuring this extension.
ConfigurationSettings pulumi.StringMapInput
// Specifies the type of extension. It must be one of the extension types registered with Microsoft.KubernetesConfiguration by the Extension publisher. For more information, please refer to [Available Extensions for Arc-enabled Kubernetes clusters](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/extensions-release). Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ExtensionType pulumi.StringInput
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
Identity ClusterExtensionIdentityInput
// Specifies the name which should be used for this Arc Kubernetes Cluster Extension. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
Name pulumi.StringPtrInput
// Namespace where the extension release must be placed for a cluster scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ReleaseNamespace pulumi.StringPtrInput
// The release train used by this extension. Possible values include but are not limited to `Stable`, `Preview`. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
ReleaseTrain pulumi.StringPtrInput
// Namespace where the extension will be created for a namespace scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
TargetNamespace pulumi.StringPtrInput
// User-specified version that the extension should pin to. If it is not set, Azure will use the latest version and auto upgrade it. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
Version pulumi.StringPtrInput
}
func (ClusterExtensionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*clusterExtensionArgs)(nil)).Elem()
}
type ClusterExtensionInput interface {
pulumi.Input
ToClusterExtensionOutput() ClusterExtensionOutput
ToClusterExtensionOutputWithContext(ctx context.Context) ClusterExtensionOutput
}
func (*ClusterExtension) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterExtension)(nil)).Elem()
}
func (i *ClusterExtension) ToClusterExtensionOutput() ClusterExtensionOutput {
return i.ToClusterExtensionOutputWithContext(context.Background())
}
func (i *ClusterExtension) ToClusterExtensionOutputWithContext(ctx context.Context) ClusterExtensionOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterExtensionOutput)
}
// ClusterExtensionArrayInput is an input type that accepts ClusterExtensionArray and ClusterExtensionArrayOutput values.
// You can construct a concrete instance of `ClusterExtensionArrayInput` via:
//
// ClusterExtensionArray{ ClusterExtensionArgs{...} }
type ClusterExtensionArrayInput interface {
pulumi.Input
ToClusterExtensionArrayOutput() ClusterExtensionArrayOutput
ToClusterExtensionArrayOutputWithContext(context.Context) ClusterExtensionArrayOutput
}
type ClusterExtensionArray []ClusterExtensionInput
func (ClusterExtensionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ClusterExtension)(nil)).Elem()
}
func (i ClusterExtensionArray) ToClusterExtensionArrayOutput() ClusterExtensionArrayOutput {
return i.ToClusterExtensionArrayOutputWithContext(context.Background())
}
func (i ClusterExtensionArray) ToClusterExtensionArrayOutputWithContext(ctx context.Context) ClusterExtensionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterExtensionArrayOutput)
}
// ClusterExtensionMapInput is an input type that accepts ClusterExtensionMap and ClusterExtensionMapOutput values.
// You can construct a concrete instance of `ClusterExtensionMapInput` via:
//
// ClusterExtensionMap{ "key": ClusterExtensionArgs{...} }
type ClusterExtensionMapInput interface {
pulumi.Input
ToClusterExtensionMapOutput() ClusterExtensionMapOutput
ToClusterExtensionMapOutputWithContext(context.Context) ClusterExtensionMapOutput
}
type ClusterExtensionMap map[string]ClusterExtensionInput
func (ClusterExtensionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ClusterExtension)(nil)).Elem()
}
func (i ClusterExtensionMap) ToClusterExtensionMapOutput() ClusterExtensionMapOutput {
return i.ToClusterExtensionMapOutputWithContext(context.Background())
}
func (i ClusterExtensionMap) ToClusterExtensionMapOutputWithContext(ctx context.Context) ClusterExtensionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterExtensionMapOutput)
}
type ClusterExtensionOutput struct{ *pulumi.OutputState }
func (ClusterExtensionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterExtension)(nil)).Elem()
}
func (o ClusterExtensionOutput) ToClusterExtensionOutput() ClusterExtensionOutput {
return o
}
func (o ClusterExtensionOutput) ToClusterExtensionOutputWithContext(ctx context.Context) ClusterExtensionOutput {
return o
}
// Specifies the Cluster ID. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
func (o ClusterExtensionOutput) ClusterId() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterExtension) pulumi.StringOutput { return v.ClusterId }).(pulumi.StringOutput)
}
// Configuration settings that are sensitive, as name-value pairs for configuring this extension.
func (o ClusterExtensionOutput) ConfigurationProtectedSettings() pulumi.StringMapOutput {
return o.ApplyT(func(v *ClusterExtension) pulumi.StringMapOutput { return v.ConfigurationProtectedSettings }).(pulumi.StringMapOutput)
}
// Configuration settings, as name-value pairs for configuring this extension.
func (o ClusterExtensionOutput) ConfigurationSettings() pulumi.StringMapOutput {
return o.ApplyT(func(v *ClusterExtension) pulumi.StringMapOutput { return v.ConfigurationSettings }).(pulumi.StringMapOutput)
}
// The current version of the extension.
func (o ClusterExtensionOutput) CurrentVersion() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterExtension) pulumi.StringOutput { return v.CurrentVersion }).(pulumi.StringOutput)
}
// Specifies the type of extension. It must be one of the extension types registered with Microsoft.KubernetesConfiguration by the Extension publisher. For more information, please refer to [Available Extensions for Arc-enabled Kubernetes clusters](https://learn.microsoft.com/en-us/azure/azure-arc/kubernetes/extensions-release). Changing this forces a new Arc Kubernetes Cluster Extension to be created.
func (o ClusterExtensionOutput) ExtensionType() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterExtension) pulumi.StringOutput { return v.ExtensionType }).(pulumi.StringOutput)
}
// An `identity` block as defined below. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
func (o ClusterExtensionOutput) Identity() ClusterExtensionIdentityOutput {
return o.ApplyT(func(v *ClusterExtension) ClusterExtensionIdentityOutput { return v.Identity }).(ClusterExtensionIdentityOutput)
}
// Specifies the name which should be used for this Arc Kubernetes Cluster Extension. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
func (o ClusterExtensionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterExtension) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Namespace where the extension release must be placed for a cluster scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
func (o ClusterExtensionOutput) ReleaseNamespace() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterExtension) pulumi.StringOutput { return v.ReleaseNamespace }).(pulumi.StringOutput)
}
// The release train used by this extension. Possible values include but are not limited to `Stable`, `Preview`. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
func (o ClusterExtensionOutput) ReleaseTrain() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterExtension) pulumi.StringOutput { return v.ReleaseTrain }).(pulumi.StringOutput)
}
// Namespace where the extension will be created for a namespace scoped extension. If this namespace does not exist, it will be created. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
func (o ClusterExtensionOutput) TargetNamespace() pulumi.StringOutput {
return o.ApplyT(func(v *ClusterExtension) pulumi.StringOutput { return v.TargetNamespace }).(pulumi.StringOutput)
}
// User-specified version that the extension should pin to. If it is not set, Azure will use the latest version and auto upgrade it. Changing this forces a new Arc Kubernetes Cluster Extension to be created.
func (o ClusterExtensionOutput) Version() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterExtension) pulumi.StringPtrOutput { return v.Version }).(pulumi.StringPtrOutput)
}
type ClusterExtensionArrayOutput struct{ *pulumi.OutputState }
func (ClusterExtensionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ClusterExtension)(nil)).Elem()
}
func (o ClusterExtensionArrayOutput) ToClusterExtensionArrayOutput() ClusterExtensionArrayOutput {
return o
}
func (o ClusterExtensionArrayOutput) ToClusterExtensionArrayOutputWithContext(ctx context.Context) ClusterExtensionArrayOutput {
return o
}
func (o ClusterExtensionArrayOutput) Index(i pulumi.IntInput) ClusterExtensionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ClusterExtension {
return vs[0].([]*ClusterExtension)[vs[1].(int)]
}).(ClusterExtensionOutput)
}
type ClusterExtensionMapOutput struct{ *pulumi.OutputState }
func (ClusterExtensionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ClusterExtension)(nil)).Elem()
}
func (o ClusterExtensionMapOutput) ToClusterExtensionMapOutput() ClusterExtensionMapOutput {
return o
}
func (o ClusterExtensionMapOutput) ToClusterExtensionMapOutputWithContext(ctx context.Context) ClusterExtensionMapOutput {
return o
}
func (o ClusterExtensionMapOutput) MapIndex(k pulumi.StringInput) ClusterExtensionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ClusterExtension {
return vs[0].(map[string]*ClusterExtension)[vs[1].(string)]
}).(ClusterExtensionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ClusterExtensionInput)(nil)).Elem(), &ClusterExtension{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterExtensionArrayInput)(nil)).Elem(), ClusterExtensionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterExtensionMapInput)(nil)).Elem(), ClusterExtensionMap{})
pulumi.RegisterOutputType(ClusterExtensionOutput{})
pulumi.RegisterOutputType(ClusterExtensionArrayOutput{})
pulumi.RegisterOutputType(ClusterExtensionMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/redhatopenshift/init.go | sdk/go/azure/redhatopenshift/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 redhatopenshift
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:redhatopenshift/cluster:Cluster":
r = &Cluster{}
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",
"redhatopenshift/cluster",
&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/redhatopenshift/pulumiTypes.go | sdk/go/azure/redhatopenshift/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 redhatopenshift
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 ClusterApiServerProfile struct {
// The IP Address the Ingress Profile is associated with.
IpAddress *string `pulumi:"ipAddress"`
// The URL the API Server Profile is associated with.
Url *string `pulumi:"url"`
// Cluster API server visibility. Supported values are `Public` and `Private`. Changing this forces a new resource to be created.
Visibility string `pulumi:"visibility"`
}
// ClusterApiServerProfileInput is an input type that accepts ClusterApiServerProfileArgs and ClusterApiServerProfileOutput values.
// You can construct a concrete instance of `ClusterApiServerProfileInput` via:
//
// ClusterApiServerProfileArgs{...}
type ClusterApiServerProfileInput interface {
pulumi.Input
ToClusterApiServerProfileOutput() ClusterApiServerProfileOutput
ToClusterApiServerProfileOutputWithContext(context.Context) ClusterApiServerProfileOutput
}
type ClusterApiServerProfileArgs struct {
// The IP Address the Ingress Profile is associated with.
IpAddress pulumi.StringPtrInput `pulumi:"ipAddress"`
// The URL the API Server Profile is associated with.
Url pulumi.StringPtrInput `pulumi:"url"`
// Cluster API server visibility. Supported values are `Public` and `Private`. Changing this forces a new resource to be created.
Visibility pulumi.StringInput `pulumi:"visibility"`
}
func (ClusterApiServerProfileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ClusterApiServerProfile)(nil)).Elem()
}
func (i ClusterApiServerProfileArgs) ToClusterApiServerProfileOutput() ClusterApiServerProfileOutput {
return i.ToClusterApiServerProfileOutputWithContext(context.Background())
}
func (i ClusterApiServerProfileArgs) ToClusterApiServerProfileOutputWithContext(ctx context.Context) ClusterApiServerProfileOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterApiServerProfileOutput)
}
func (i ClusterApiServerProfileArgs) ToClusterApiServerProfilePtrOutput() ClusterApiServerProfilePtrOutput {
return i.ToClusterApiServerProfilePtrOutputWithContext(context.Background())
}
func (i ClusterApiServerProfileArgs) ToClusterApiServerProfilePtrOutputWithContext(ctx context.Context) ClusterApiServerProfilePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterApiServerProfileOutput).ToClusterApiServerProfilePtrOutputWithContext(ctx)
}
// ClusterApiServerProfilePtrInput is an input type that accepts ClusterApiServerProfileArgs, ClusterApiServerProfilePtr and ClusterApiServerProfilePtrOutput values.
// You can construct a concrete instance of `ClusterApiServerProfilePtrInput` via:
//
// ClusterApiServerProfileArgs{...}
//
// or:
//
// nil
type ClusterApiServerProfilePtrInput interface {
pulumi.Input
ToClusterApiServerProfilePtrOutput() ClusterApiServerProfilePtrOutput
ToClusterApiServerProfilePtrOutputWithContext(context.Context) ClusterApiServerProfilePtrOutput
}
type clusterApiServerProfilePtrType ClusterApiServerProfileArgs
func ClusterApiServerProfilePtr(v *ClusterApiServerProfileArgs) ClusterApiServerProfilePtrInput {
return (*clusterApiServerProfilePtrType)(v)
}
func (*clusterApiServerProfilePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterApiServerProfile)(nil)).Elem()
}
func (i *clusterApiServerProfilePtrType) ToClusterApiServerProfilePtrOutput() ClusterApiServerProfilePtrOutput {
return i.ToClusterApiServerProfilePtrOutputWithContext(context.Background())
}
func (i *clusterApiServerProfilePtrType) ToClusterApiServerProfilePtrOutputWithContext(ctx context.Context) ClusterApiServerProfilePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterApiServerProfilePtrOutput)
}
type ClusterApiServerProfileOutput struct{ *pulumi.OutputState }
func (ClusterApiServerProfileOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ClusterApiServerProfile)(nil)).Elem()
}
func (o ClusterApiServerProfileOutput) ToClusterApiServerProfileOutput() ClusterApiServerProfileOutput {
return o
}
func (o ClusterApiServerProfileOutput) ToClusterApiServerProfileOutputWithContext(ctx context.Context) ClusterApiServerProfileOutput {
return o
}
func (o ClusterApiServerProfileOutput) ToClusterApiServerProfilePtrOutput() ClusterApiServerProfilePtrOutput {
return o.ToClusterApiServerProfilePtrOutputWithContext(context.Background())
}
func (o ClusterApiServerProfileOutput) ToClusterApiServerProfilePtrOutputWithContext(ctx context.Context) ClusterApiServerProfilePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ClusterApiServerProfile) *ClusterApiServerProfile {
return &v
}).(ClusterApiServerProfilePtrOutput)
}
// The IP Address the Ingress Profile is associated with.
func (o ClusterApiServerProfileOutput) IpAddress() pulumi.StringPtrOutput {
return o.ApplyT(func(v ClusterApiServerProfile) *string { return v.IpAddress }).(pulumi.StringPtrOutput)
}
// The URL the API Server Profile is associated with.
func (o ClusterApiServerProfileOutput) Url() pulumi.StringPtrOutput {
return o.ApplyT(func(v ClusterApiServerProfile) *string { return v.Url }).(pulumi.StringPtrOutput)
}
// Cluster API server visibility. Supported values are `Public` and `Private`. Changing this forces a new resource to be created.
func (o ClusterApiServerProfileOutput) Visibility() pulumi.StringOutput {
return o.ApplyT(func(v ClusterApiServerProfile) string { return v.Visibility }).(pulumi.StringOutput)
}
type ClusterApiServerProfilePtrOutput struct{ *pulumi.OutputState }
func (ClusterApiServerProfilePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterApiServerProfile)(nil)).Elem()
}
func (o ClusterApiServerProfilePtrOutput) ToClusterApiServerProfilePtrOutput() ClusterApiServerProfilePtrOutput {
return o
}
func (o ClusterApiServerProfilePtrOutput) ToClusterApiServerProfilePtrOutputWithContext(ctx context.Context) ClusterApiServerProfilePtrOutput {
return o
}
func (o ClusterApiServerProfilePtrOutput) Elem() ClusterApiServerProfileOutput {
return o.ApplyT(func(v *ClusterApiServerProfile) ClusterApiServerProfile {
if v != nil {
return *v
}
var ret ClusterApiServerProfile
return ret
}).(ClusterApiServerProfileOutput)
}
// The IP Address the Ingress Profile is associated with.
func (o ClusterApiServerProfilePtrOutput) IpAddress() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterApiServerProfile) *string {
if v == nil {
return nil
}
return v.IpAddress
}).(pulumi.StringPtrOutput)
}
// The URL the API Server Profile is associated with.
func (o ClusterApiServerProfilePtrOutput) Url() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterApiServerProfile) *string {
if v == nil {
return nil
}
return v.Url
}).(pulumi.StringPtrOutput)
}
// Cluster API server visibility. Supported values are `Public` and `Private`. Changing this forces a new resource to be created.
func (o ClusterApiServerProfilePtrOutput) Visibility() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterApiServerProfile) *string {
if v == nil {
return nil
}
return &v.Visibility
}).(pulumi.StringPtrOutput)
}
type ClusterClusterProfile struct {
// The custom domain for the cluster. For more info, see [Prepare a custom domain for your cluster](https://docs.microsoft.com/azure/openshift/tutorial-create-cluster#prepare-a-custom-domain-for-your-cluster-optional). Changing this forces a new resource to be created.
Domain string `pulumi:"domain"`
// Whether Federal Information Processing Standard (FIPS) validated cryptographic modules are used. Defaults to `false`. Changing this forces a new resource to be created.
FipsEnabled *bool `pulumi:"fipsEnabled"`
// The name of a Resource Group which will be created to host VMs of Azure Red Hat OpenShift Cluster. The value cannot contain uppercase characters. Changing this forces a new resource to be created.
ManagedResourceGroupName *string `pulumi:"managedResourceGroupName"`
// The Red Hat pull secret for the cluster. For more info, see [Get a Red Hat pull secret](https://learn.microsoft.com/azure/openshift/tutorial-create-cluster#get-a-red-hat-pull-secret-optional). Changing this forces a new resource to be created.
PullSecret *string `pulumi:"pullSecret"`
// The resource group that the cluster profile is attached to.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// The version of the OpenShift cluster. Available versions can be found with the Azure CLI command `az aro get-versions --location <region>`. Changing this forces a new resource to be created.
Version string `pulumi:"version"`
}
// ClusterClusterProfileInput is an input type that accepts ClusterClusterProfileArgs and ClusterClusterProfileOutput values.
// You can construct a concrete instance of `ClusterClusterProfileInput` via:
//
// ClusterClusterProfileArgs{...}
type ClusterClusterProfileInput interface {
pulumi.Input
ToClusterClusterProfileOutput() ClusterClusterProfileOutput
ToClusterClusterProfileOutputWithContext(context.Context) ClusterClusterProfileOutput
}
type ClusterClusterProfileArgs struct {
// The custom domain for the cluster. For more info, see [Prepare a custom domain for your cluster](https://docs.microsoft.com/azure/openshift/tutorial-create-cluster#prepare-a-custom-domain-for-your-cluster-optional). Changing this forces a new resource to be created.
Domain pulumi.StringInput `pulumi:"domain"`
// Whether Federal Information Processing Standard (FIPS) validated cryptographic modules are used. Defaults to `false`. Changing this forces a new resource to be created.
FipsEnabled pulumi.BoolPtrInput `pulumi:"fipsEnabled"`
// The name of a Resource Group which will be created to host VMs of Azure Red Hat OpenShift Cluster. The value cannot contain uppercase characters. Changing this forces a new resource to be created.
ManagedResourceGroupName pulumi.StringPtrInput `pulumi:"managedResourceGroupName"`
// The Red Hat pull secret for the cluster. For more info, see [Get a Red Hat pull secret](https://learn.microsoft.com/azure/openshift/tutorial-create-cluster#get-a-red-hat-pull-secret-optional). Changing this forces a new resource to be created.
PullSecret pulumi.StringPtrInput `pulumi:"pullSecret"`
// The resource group that the cluster profile is attached to.
ResourceGroupId pulumi.StringPtrInput `pulumi:"resourceGroupId"`
// The version of the OpenShift cluster. Available versions can be found with the Azure CLI command `az aro get-versions --location <region>`. Changing this forces a new resource to be created.
Version pulumi.StringInput `pulumi:"version"`
}
func (ClusterClusterProfileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ClusterClusterProfile)(nil)).Elem()
}
func (i ClusterClusterProfileArgs) ToClusterClusterProfileOutput() ClusterClusterProfileOutput {
return i.ToClusterClusterProfileOutputWithContext(context.Background())
}
func (i ClusterClusterProfileArgs) ToClusterClusterProfileOutputWithContext(ctx context.Context) ClusterClusterProfileOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterClusterProfileOutput)
}
func (i ClusterClusterProfileArgs) ToClusterClusterProfilePtrOutput() ClusterClusterProfilePtrOutput {
return i.ToClusterClusterProfilePtrOutputWithContext(context.Background())
}
func (i ClusterClusterProfileArgs) ToClusterClusterProfilePtrOutputWithContext(ctx context.Context) ClusterClusterProfilePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterClusterProfileOutput).ToClusterClusterProfilePtrOutputWithContext(ctx)
}
// ClusterClusterProfilePtrInput is an input type that accepts ClusterClusterProfileArgs, ClusterClusterProfilePtr and ClusterClusterProfilePtrOutput values.
// You can construct a concrete instance of `ClusterClusterProfilePtrInput` via:
//
// ClusterClusterProfileArgs{...}
//
// or:
//
// nil
type ClusterClusterProfilePtrInput interface {
pulumi.Input
ToClusterClusterProfilePtrOutput() ClusterClusterProfilePtrOutput
ToClusterClusterProfilePtrOutputWithContext(context.Context) ClusterClusterProfilePtrOutput
}
type clusterClusterProfilePtrType ClusterClusterProfileArgs
func ClusterClusterProfilePtr(v *ClusterClusterProfileArgs) ClusterClusterProfilePtrInput {
return (*clusterClusterProfilePtrType)(v)
}
func (*clusterClusterProfilePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterClusterProfile)(nil)).Elem()
}
func (i *clusterClusterProfilePtrType) ToClusterClusterProfilePtrOutput() ClusterClusterProfilePtrOutput {
return i.ToClusterClusterProfilePtrOutputWithContext(context.Background())
}
func (i *clusterClusterProfilePtrType) ToClusterClusterProfilePtrOutputWithContext(ctx context.Context) ClusterClusterProfilePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterClusterProfilePtrOutput)
}
type ClusterClusterProfileOutput struct{ *pulumi.OutputState }
func (ClusterClusterProfileOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ClusterClusterProfile)(nil)).Elem()
}
func (o ClusterClusterProfileOutput) ToClusterClusterProfileOutput() ClusterClusterProfileOutput {
return o
}
func (o ClusterClusterProfileOutput) ToClusterClusterProfileOutputWithContext(ctx context.Context) ClusterClusterProfileOutput {
return o
}
func (o ClusterClusterProfileOutput) ToClusterClusterProfilePtrOutput() ClusterClusterProfilePtrOutput {
return o.ToClusterClusterProfilePtrOutputWithContext(context.Background())
}
func (o ClusterClusterProfileOutput) ToClusterClusterProfilePtrOutputWithContext(ctx context.Context) ClusterClusterProfilePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ClusterClusterProfile) *ClusterClusterProfile {
return &v
}).(ClusterClusterProfilePtrOutput)
}
// The custom domain for the cluster. For more info, see [Prepare a custom domain for your cluster](https://docs.microsoft.com/azure/openshift/tutorial-create-cluster#prepare-a-custom-domain-for-your-cluster-optional). Changing this forces a new resource to be created.
func (o ClusterClusterProfileOutput) Domain() pulumi.StringOutput {
return o.ApplyT(func(v ClusterClusterProfile) string { return v.Domain }).(pulumi.StringOutput)
}
// Whether Federal Information Processing Standard (FIPS) validated cryptographic modules are used. Defaults to `false`. Changing this forces a new resource to be created.
func (o ClusterClusterProfileOutput) FipsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v ClusterClusterProfile) *bool { return v.FipsEnabled }).(pulumi.BoolPtrOutput)
}
// The name of a Resource Group which will be created to host VMs of Azure Red Hat OpenShift Cluster. The value cannot contain uppercase characters. Changing this forces a new resource to be created.
func (o ClusterClusterProfileOutput) ManagedResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v ClusterClusterProfile) *string { return v.ManagedResourceGroupName }).(pulumi.StringPtrOutput)
}
// The Red Hat pull secret for the cluster. For more info, see [Get a Red Hat pull secret](https://learn.microsoft.com/azure/openshift/tutorial-create-cluster#get-a-red-hat-pull-secret-optional). Changing this forces a new resource to be created.
func (o ClusterClusterProfileOutput) PullSecret() pulumi.StringPtrOutput {
return o.ApplyT(func(v ClusterClusterProfile) *string { return v.PullSecret }).(pulumi.StringPtrOutput)
}
// The resource group that the cluster profile is attached to.
func (o ClusterClusterProfileOutput) ResourceGroupId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ClusterClusterProfile) *string { return v.ResourceGroupId }).(pulumi.StringPtrOutput)
}
// The version of the OpenShift cluster. Available versions can be found with the Azure CLI command `az aro get-versions --location <region>`. Changing this forces a new resource to be created.
func (o ClusterClusterProfileOutput) Version() pulumi.StringOutput {
return o.ApplyT(func(v ClusterClusterProfile) string { return v.Version }).(pulumi.StringOutput)
}
type ClusterClusterProfilePtrOutput struct{ *pulumi.OutputState }
func (ClusterClusterProfilePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterClusterProfile)(nil)).Elem()
}
func (o ClusterClusterProfilePtrOutput) ToClusterClusterProfilePtrOutput() ClusterClusterProfilePtrOutput {
return o
}
func (o ClusterClusterProfilePtrOutput) ToClusterClusterProfilePtrOutputWithContext(ctx context.Context) ClusterClusterProfilePtrOutput {
return o
}
func (o ClusterClusterProfilePtrOutput) Elem() ClusterClusterProfileOutput {
return o.ApplyT(func(v *ClusterClusterProfile) ClusterClusterProfile {
if v != nil {
return *v
}
var ret ClusterClusterProfile
return ret
}).(ClusterClusterProfileOutput)
}
// The custom domain for the cluster. For more info, see [Prepare a custom domain for your cluster](https://docs.microsoft.com/azure/openshift/tutorial-create-cluster#prepare-a-custom-domain-for-your-cluster-optional). Changing this forces a new resource to be created.
func (o ClusterClusterProfilePtrOutput) Domain() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterClusterProfile) *string {
if v == nil {
return nil
}
return &v.Domain
}).(pulumi.StringPtrOutput)
}
// Whether Federal Information Processing Standard (FIPS) validated cryptographic modules are used. Defaults to `false`. Changing this forces a new resource to be created.
func (o ClusterClusterProfilePtrOutput) FipsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ClusterClusterProfile) *bool {
if v == nil {
return nil
}
return v.FipsEnabled
}).(pulumi.BoolPtrOutput)
}
// The name of a Resource Group which will be created to host VMs of Azure Red Hat OpenShift Cluster. The value cannot contain uppercase characters. Changing this forces a new resource to be created.
func (o ClusterClusterProfilePtrOutput) ManagedResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterClusterProfile) *string {
if v == nil {
return nil
}
return v.ManagedResourceGroupName
}).(pulumi.StringPtrOutput)
}
// The Red Hat pull secret for the cluster. For more info, see [Get a Red Hat pull secret](https://learn.microsoft.com/azure/openshift/tutorial-create-cluster#get-a-red-hat-pull-secret-optional). Changing this forces a new resource to be created.
func (o ClusterClusterProfilePtrOutput) PullSecret() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterClusterProfile) *string {
if v == nil {
return nil
}
return v.PullSecret
}).(pulumi.StringPtrOutput)
}
// The resource group that the cluster profile is attached to.
func (o ClusterClusterProfilePtrOutput) ResourceGroupId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterClusterProfile) *string {
if v == nil {
return nil
}
return v.ResourceGroupId
}).(pulumi.StringPtrOutput)
}
// The version of the OpenShift cluster. Available versions can be found with the Azure CLI command `az aro get-versions --location <region>`. Changing this forces a new resource to be created.
func (o ClusterClusterProfilePtrOutput) Version() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterClusterProfile) *string {
if v == nil {
return nil
}
return &v.Version
}).(pulumi.StringPtrOutput)
}
type ClusterIngressProfile struct {
// The IP Address the Ingress Profile is associated with.
IpAddress *string `pulumi:"ipAddress"`
// The name of the Azure Red Hat OpenShift Cluster to create. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Cluster Ingress visibility. Supported values are `Public` and `Private`. Changing this forces a new resource to be created.
Visibility string `pulumi:"visibility"`
}
// ClusterIngressProfileInput is an input type that accepts ClusterIngressProfileArgs and ClusterIngressProfileOutput values.
// You can construct a concrete instance of `ClusterIngressProfileInput` via:
//
// ClusterIngressProfileArgs{...}
type ClusterIngressProfileInput interface {
pulumi.Input
ToClusterIngressProfileOutput() ClusterIngressProfileOutput
ToClusterIngressProfileOutputWithContext(context.Context) ClusterIngressProfileOutput
}
type ClusterIngressProfileArgs struct {
// The IP Address the Ingress Profile is associated with.
IpAddress pulumi.StringPtrInput `pulumi:"ipAddress"`
// The name of the Azure Red Hat OpenShift Cluster to create. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput `pulumi:"name"`
// Cluster Ingress visibility. Supported values are `Public` and `Private`. Changing this forces a new resource to be created.
Visibility pulumi.StringInput `pulumi:"visibility"`
}
func (ClusterIngressProfileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ClusterIngressProfile)(nil)).Elem()
}
func (i ClusterIngressProfileArgs) ToClusterIngressProfileOutput() ClusterIngressProfileOutput {
return i.ToClusterIngressProfileOutputWithContext(context.Background())
}
func (i ClusterIngressProfileArgs) ToClusterIngressProfileOutputWithContext(ctx context.Context) ClusterIngressProfileOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterIngressProfileOutput)
}
func (i ClusterIngressProfileArgs) ToClusterIngressProfilePtrOutput() ClusterIngressProfilePtrOutput {
return i.ToClusterIngressProfilePtrOutputWithContext(context.Background())
}
func (i ClusterIngressProfileArgs) ToClusterIngressProfilePtrOutputWithContext(ctx context.Context) ClusterIngressProfilePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterIngressProfileOutput).ToClusterIngressProfilePtrOutputWithContext(ctx)
}
// ClusterIngressProfilePtrInput is an input type that accepts ClusterIngressProfileArgs, ClusterIngressProfilePtr and ClusterIngressProfilePtrOutput values.
// You can construct a concrete instance of `ClusterIngressProfilePtrInput` via:
//
// ClusterIngressProfileArgs{...}
//
// or:
//
// nil
type ClusterIngressProfilePtrInput interface {
pulumi.Input
ToClusterIngressProfilePtrOutput() ClusterIngressProfilePtrOutput
ToClusterIngressProfilePtrOutputWithContext(context.Context) ClusterIngressProfilePtrOutput
}
type clusterIngressProfilePtrType ClusterIngressProfileArgs
func ClusterIngressProfilePtr(v *ClusterIngressProfileArgs) ClusterIngressProfilePtrInput {
return (*clusterIngressProfilePtrType)(v)
}
func (*clusterIngressProfilePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterIngressProfile)(nil)).Elem()
}
func (i *clusterIngressProfilePtrType) ToClusterIngressProfilePtrOutput() ClusterIngressProfilePtrOutput {
return i.ToClusterIngressProfilePtrOutputWithContext(context.Background())
}
func (i *clusterIngressProfilePtrType) ToClusterIngressProfilePtrOutputWithContext(ctx context.Context) ClusterIngressProfilePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterIngressProfilePtrOutput)
}
type ClusterIngressProfileOutput struct{ *pulumi.OutputState }
func (ClusterIngressProfileOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ClusterIngressProfile)(nil)).Elem()
}
func (o ClusterIngressProfileOutput) ToClusterIngressProfileOutput() ClusterIngressProfileOutput {
return o
}
func (o ClusterIngressProfileOutput) ToClusterIngressProfileOutputWithContext(ctx context.Context) ClusterIngressProfileOutput {
return o
}
func (o ClusterIngressProfileOutput) ToClusterIngressProfilePtrOutput() ClusterIngressProfilePtrOutput {
return o.ToClusterIngressProfilePtrOutputWithContext(context.Background())
}
func (o ClusterIngressProfileOutput) ToClusterIngressProfilePtrOutputWithContext(ctx context.Context) ClusterIngressProfilePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ClusterIngressProfile) *ClusterIngressProfile {
return &v
}).(ClusterIngressProfilePtrOutput)
}
// The IP Address the Ingress Profile is associated with.
func (o ClusterIngressProfileOutput) IpAddress() pulumi.StringPtrOutput {
return o.ApplyT(func(v ClusterIngressProfile) *string { return v.IpAddress }).(pulumi.StringPtrOutput)
}
// The name of the Azure Red Hat OpenShift Cluster to create. Changing this forces a new resource to be created.
func (o ClusterIngressProfileOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v ClusterIngressProfile) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// Cluster Ingress visibility. Supported values are `Public` and `Private`. Changing this forces a new resource to be created.
func (o ClusterIngressProfileOutput) Visibility() pulumi.StringOutput {
return o.ApplyT(func(v ClusterIngressProfile) string { return v.Visibility }).(pulumi.StringOutput)
}
type ClusterIngressProfilePtrOutput struct{ *pulumi.OutputState }
func (ClusterIngressProfilePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterIngressProfile)(nil)).Elem()
}
func (o ClusterIngressProfilePtrOutput) ToClusterIngressProfilePtrOutput() ClusterIngressProfilePtrOutput {
return o
}
func (o ClusterIngressProfilePtrOutput) ToClusterIngressProfilePtrOutputWithContext(ctx context.Context) ClusterIngressProfilePtrOutput {
return o
}
func (o ClusterIngressProfilePtrOutput) Elem() ClusterIngressProfileOutput {
return o.ApplyT(func(v *ClusterIngressProfile) ClusterIngressProfile {
if v != nil {
return *v
}
var ret ClusterIngressProfile
return ret
}).(ClusterIngressProfileOutput)
}
// The IP Address the Ingress Profile is associated with.
func (o ClusterIngressProfilePtrOutput) IpAddress() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterIngressProfile) *string {
if v == nil {
return nil
}
return v.IpAddress
}).(pulumi.StringPtrOutput)
}
// The name of the Azure Red Hat OpenShift Cluster to create. Changing this forces a new resource to be created.
func (o ClusterIngressProfilePtrOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterIngressProfile) *string {
if v == nil {
return nil
}
return v.Name
}).(pulumi.StringPtrOutput)
}
// Cluster Ingress visibility. Supported values are `Public` and `Private`. Changing this forces a new resource to be created.
func (o ClusterIngressProfilePtrOutput) Visibility() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ClusterIngressProfile) *string {
if v == nil {
return nil
}
return &v.Visibility
}).(pulumi.StringPtrOutput)
}
type ClusterMainProfile struct {
// The resource ID of an associated disk encryption set. Changing this forces a new resource to be created.
DiskEncryptionSetId *string `pulumi:"diskEncryptionSetId"`
// Whether main virtual machines are encrypted at host. Defaults to `false`. Changing this forces a new resource to be created.
//
// > **Note:** `encryptionAtHostEnabled` is only available for certain VM sizes and the `EncryptionAtHost` feature must be enabled for your subscription. Please see the [Azure documentation](https://learn.microsoft.com/azure/virtual-machines/disks-enable-host-based-encryption-portal?tabs=azure-powershell) for more information.
EncryptionAtHostEnabled *bool `pulumi:"encryptionAtHostEnabled"`
// The ID of the subnet where main nodes will be hosted. Changing this forces a new resource to be created.
SubnetId string `pulumi:"subnetId"`
// The size of the Virtual Machines for the main nodes. Changing this forces a new resource to be created.
VmSize string `pulumi:"vmSize"`
}
// ClusterMainProfileInput is an input type that accepts ClusterMainProfileArgs and ClusterMainProfileOutput values.
// You can construct a concrete instance of `ClusterMainProfileInput` via:
//
// ClusterMainProfileArgs{...}
type ClusterMainProfileInput interface {
pulumi.Input
ToClusterMainProfileOutput() ClusterMainProfileOutput
ToClusterMainProfileOutputWithContext(context.Context) ClusterMainProfileOutput
}
type ClusterMainProfileArgs struct {
// The resource ID of an associated disk encryption set. Changing this forces a new resource to be created.
DiskEncryptionSetId pulumi.StringPtrInput `pulumi:"diskEncryptionSetId"`
// Whether main virtual machines are encrypted at host. Defaults to `false`. Changing this forces a new resource to be created.
//
// > **Note:** `encryptionAtHostEnabled` is only available for certain VM sizes and the `EncryptionAtHost` feature must be enabled for your subscription. Please see the [Azure documentation](https://learn.microsoft.com/azure/virtual-machines/disks-enable-host-based-encryption-portal?tabs=azure-powershell) for more information.
EncryptionAtHostEnabled pulumi.BoolPtrInput `pulumi:"encryptionAtHostEnabled"`
// The ID of the subnet where main nodes will be hosted. Changing this forces a new resource to be created.
SubnetId pulumi.StringInput `pulumi:"subnetId"`
// The size of the Virtual Machines for the main nodes. Changing this forces a new resource to be created.
VmSize pulumi.StringInput `pulumi:"vmSize"`
}
func (ClusterMainProfileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ClusterMainProfile)(nil)).Elem()
}
func (i ClusterMainProfileArgs) ToClusterMainProfileOutput() ClusterMainProfileOutput {
return i.ToClusterMainProfileOutputWithContext(context.Background())
}
func (i ClusterMainProfileArgs) ToClusterMainProfileOutputWithContext(ctx context.Context) ClusterMainProfileOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterMainProfileOutput)
}
func (i ClusterMainProfileArgs) ToClusterMainProfilePtrOutput() ClusterMainProfilePtrOutput {
return i.ToClusterMainProfilePtrOutputWithContext(context.Background())
}
func (i ClusterMainProfileArgs) ToClusterMainProfilePtrOutputWithContext(ctx context.Context) ClusterMainProfilePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterMainProfileOutput).ToClusterMainProfilePtrOutputWithContext(ctx)
}
// ClusterMainProfilePtrInput is an input type that accepts ClusterMainProfileArgs, ClusterMainProfilePtr and ClusterMainProfilePtrOutput values.
// You can construct a concrete instance of `ClusterMainProfilePtrInput` via:
//
// ClusterMainProfileArgs{...}
//
// or:
//
// nil
type ClusterMainProfilePtrInput interface {
pulumi.Input
ToClusterMainProfilePtrOutput() ClusterMainProfilePtrOutput
ToClusterMainProfilePtrOutputWithContext(context.Context) ClusterMainProfilePtrOutput
}
type clusterMainProfilePtrType ClusterMainProfileArgs
func ClusterMainProfilePtr(v *ClusterMainProfileArgs) ClusterMainProfilePtrInput {
return (*clusterMainProfilePtrType)(v)
}
func (*clusterMainProfilePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ClusterMainProfile)(nil)).Elem()
}
func (i *clusterMainProfilePtrType) ToClusterMainProfilePtrOutput() ClusterMainProfilePtrOutput {
return i.ToClusterMainProfilePtrOutputWithContext(context.Background())
}
func (i *clusterMainProfilePtrType) ToClusterMainProfilePtrOutputWithContext(ctx context.Context) ClusterMainProfilePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterMainProfilePtrOutput)
}
type ClusterMainProfileOutput struct{ *pulumi.OutputState }
func (ClusterMainProfileOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ClusterMainProfile)(nil)).Elem()
}
func (o ClusterMainProfileOutput) ToClusterMainProfileOutput() ClusterMainProfileOutput {
return o
}
func (o ClusterMainProfileOutput) ToClusterMainProfileOutputWithContext(ctx context.Context) ClusterMainProfileOutput {
return o
}
func (o ClusterMainProfileOutput) ToClusterMainProfilePtrOutput() ClusterMainProfilePtrOutput {
return o.ToClusterMainProfilePtrOutputWithContext(context.Background())
}
func (o ClusterMainProfileOutput) ToClusterMainProfilePtrOutputWithContext(ctx context.Context) ClusterMainProfilePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ClusterMainProfile) *ClusterMainProfile {
return &v
}).(ClusterMainProfilePtrOutput)
}
// The resource ID of an associated disk encryption set. Changing this forces a new resource to be created.
func (o ClusterMainProfileOutput) DiskEncryptionSetId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ClusterMainProfile) *string { return v.DiskEncryptionSetId }).(pulumi.StringPtrOutput)
}
// Whether main virtual machines are encrypted at host. Defaults to `false`. Changing this forces a new resource to be created.
//
// > **Note:** `encryptionAtHostEnabled` is only available for certain VM sizes and the `EncryptionAtHost` feature must be enabled for your subscription. Please see the [Azure documentation](https://learn.microsoft.com/azure/virtual-machines/disks-enable-host-based-encryption-portal?tabs=azure-powershell) for more information.
| 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/redhatopenshift/cluster.go | sdk/go/azure/redhatopenshift/cluster.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package redhatopenshift
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a fully managed Azure Red Hat OpenShift Cluster (also known as ARO).
//
// > **Note:** All arguments including the client secret will be stored in the raw state as plain-text. [Read more about sensitive data in state](https://www.terraform.io/docs/state/sensitive-data.html).
//
// ## Import
//
// Red Hat OpenShift Clusters can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:redhatopenshift/cluster:Cluster cluster1 /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/group1/providers/Microsoft.RedHatOpenShift/openShiftClusters/cluster1
// ```
type Cluster struct {
pulumi.CustomResourceState
// An `apiServerProfile` block as defined below. Changing this forces a new resource to be created.
ApiServerProfile ClusterApiServerProfileOutput `pulumi:"apiServerProfile"`
// A `clusterProfile` block as defined below. Changing this forces a new resource to be created.
ClusterProfile ClusterClusterProfileOutput `pulumi:"clusterProfile"`
// The Red Hat OpenShift cluster console URL.
ConsoleUrl pulumi.StringOutput `pulumi:"consoleUrl"`
// An `ingressProfile` block as defined below. Changing this forces a new resource to be created.
IngressProfile ClusterIngressProfileOutput `pulumi:"ingressProfile"`
// The location where the Azure Red Hat OpenShift Cluster should be created. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// A `mainProfile` block as defined below. Changing this forces a new resource to be created.
MainProfile ClusterMainProfileOutput `pulumi:"mainProfile"`
// The name of the Azure Red Hat OpenShift Cluster to create. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkProfile` block as defined below. Changing this forces a new resource to be created.
NetworkProfile ClusterNetworkProfileOutput `pulumi:"networkProfile"`
// Specifies the Resource Group where the Azure Red Hat OpenShift Cluster should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A `servicePrincipal` block as defined below.
ServicePrincipal ClusterServicePrincipalOutput `pulumi:"servicePrincipal"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A `workerProfile` block as defined below. Changing this forces a new resource to be created.
WorkerProfile ClusterWorkerProfileOutput `pulumi:"workerProfile"`
}
// NewCluster registers a new resource with the given unique name, arguments, and options.
func NewCluster(ctx *pulumi.Context,
name string, args *ClusterArgs, opts ...pulumi.ResourceOption) (*Cluster, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApiServerProfile == nil {
return nil, errors.New("invalid value for required argument 'ApiServerProfile'")
}
if args.ClusterProfile == nil {
return nil, errors.New("invalid value for required argument 'ClusterProfile'")
}
if args.IngressProfile == nil {
return nil, errors.New("invalid value for required argument 'IngressProfile'")
}
if args.MainProfile == nil {
return nil, errors.New("invalid value for required argument 'MainProfile'")
}
if args.NetworkProfile == nil {
return nil, errors.New("invalid value for required argument 'NetworkProfile'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ServicePrincipal == nil {
return nil, errors.New("invalid value for required argument 'ServicePrincipal'")
}
if args.WorkerProfile == nil {
return nil, errors.New("invalid value for required argument 'WorkerProfile'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Cluster
err := ctx.RegisterResource("azure:redhatopenshift/cluster:Cluster", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCluster gets an existing Cluster 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 GetCluster(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ClusterState, opts ...pulumi.ResourceOption) (*Cluster, error) {
var resource Cluster
err := ctx.ReadResource("azure:redhatopenshift/cluster:Cluster", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Cluster resources.
type clusterState struct {
// An `apiServerProfile` block as defined below. Changing this forces a new resource to be created.
ApiServerProfile *ClusterApiServerProfile `pulumi:"apiServerProfile"`
// A `clusterProfile` block as defined below. Changing this forces a new resource to be created.
ClusterProfile *ClusterClusterProfile `pulumi:"clusterProfile"`
// The Red Hat OpenShift cluster console URL.
ConsoleUrl *string `pulumi:"consoleUrl"`
// An `ingressProfile` block as defined below. Changing this forces a new resource to be created.
IngressProfile *ClusterIngressProfile `pulumi:"ingressProfile"`
// The location where the Azure Red Hat OpenShift Cluster should be created. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// A `mainProfile` block as defined below. Changing this forces a new resource to be created.
MainProfile *ClusterMainProfile `pulumi:"mainProfile"`
// The name of the Azure Red Hat OpenShift Cluster to create. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below. Changing this forces a new resource to be created.
NetworkProfile *ClusterNetworkProfile `pulumi:"networkProfile"`
// Specifies the Resource Group where the Azure Red Hat OpenShift Cluster should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A `servicePrincipal` block as defined below.
ServicePrincipal *ClusterServicePrincipal `pulumi:"servicePrincipal"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// A `workerProfile` block as defined below. Changing this forces a new resource to be created.
WorkerProfile *ClusterWorkerProfile `pulumi:"workerProfile"`
}
type ClusterState struct {
// An `apiServerProfile` block as defined below. Changing this forces a new resource to be created.
ApiServerProfile ClusterApiServerProfilePtrInput
// A `clusterProfile` block as defined below. Changing this forces a new resource to be created.
ClusterProfile ClusterClusterProfilePtrInput
// The Red Hat OpenShift cluster console URL.
ConsoleUrl pulumi.StringPtrInput
// An `ingressProfile` block as defined below. Changing this forces a new resource to be created.
IngressProfile ClusterIngressProfilePtrInput
// The location where the Azure Red Hat OpenShift Cluster should be created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// A `mainProfile` block as defined below. Changing this forces a new resource to be created.
MainProfile ClusterMainProfilePtrInput
// The name of the Azure Red Hat OpenShift Cluster to create. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below. Changing this forces a new resource to be created.
NetworkProfile ClusterNetworkProfilePtrInput
// Specifies the Resource Group where the Azure Red Hat OpenShift Cluster should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A `servicePrincipal` block as defined below.
ServicePrincipal ClusterServicePrincipalPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// A `workerProfile` block as defined below. Changing this forces a new resource to be created.
WorkerProfile ClusterWorkerProfilePtrInput
}
func (ClusterState) ElementType() reflect.Type {
return reflect.TypeOf((*clusterState)(nil)).Elem()
}
type clusterArgs struct {
// An `apiServerProfile` block as defined below. Changing this forces a new resource to be created.
ApiServerProfile ClusterApiServerProfile `pulumi:"apiServerProfile"`
// A `clusterProfile` block as defined below. Changing this forces a new resource to be created.
ClusterProfile ClusterClusterProfile `pulumi:"clusterProfile"`
// An `ingressProfile` block as defined below. Changing this forces a new resource to be created.
IngressProfile ClusterIngressProfile `pulumi:"ingressProfile"`
// The location where the Azure Red Hat OpenShift Cluster should be created. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// A `mainProfile` block as defined below. Changing this forces a new resource to be created.
MainProfile ClusterMainProfile `pulumi:"mainProfile"`
// The name of the Azure Red Hat OpenShift Cluster to create. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `networkProfile` block as defined below. Changing this forces a new resource to be created.
NetworkProfile ClusterNetworkProfile `pulumi:"networkProfile"`
// Specifies the Resource Group where the Azure Red Hat OpenShift Cluster should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `servicePrincipal` block as defined below.
ServicePrincipal ClusterServicePrincipal `pulumi:"servicePrincipal"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// A `workerProfile` block as defined below. Changing this forces a new resource to be created.
WorkerProfile ClusterWorkerProfile `pulumi:"workerProfile"`
}
// The set of arguments for constructing a Cluster resource.
type ClusterArgs struct {
// An `apiServerProfile` block as defined below. Changing this forces a new resource to be created.
ApiServerProfile ClusterApiServerProfileInput
// A `clusterProfile` block as defined below. Changing this forces a new resource to be created.
ClusterProfile ClusterClusterProfileInput
// An `ingressProfile` block as defined below. Changing this forces a new resource to be created.
IngressProfile ClusterIngressProfileInput
// The location where the Azure Red Hat OpenShift Cluster should be created. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// A `mainProfile` block as defined below. Changing this forces a new resource to be created.
MainProfile ClusterMainProfileInput
// The name of the Azure Red Hat OpenShift Cluster to create. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `networkProfile` block as defined below. Changing this forces a new resource to be created.
NetworkProfile ClusterNetworkProfileInput
// Specifies the Resource Group where the Azure Red Hat OpenShift Cluster should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A `servicePrincipal` block as defined below.
ServicePrincipal ClusterServicePrincipalInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// A `workerProfile` block as defined below. Changing this forces a new resource to be created.
WorkerProfile ClusterWorkerProfileInput
}
func (ClusterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*clusterArgs)(nil)).Elem()
}
type ClusterInput interface {
pulumi.Input
ToClusterOutput() ClusterOutput
ToClusterOutputWithContext(ctx context.Context) ClusterOutput
}
func (*Cluster) ElementType() reflect.Type {
return reflect.TypeOf((**Cluster)(nil)).Elem()
}
func (i *Cluster) ToClusterOutput() ClusterOutput {
return i.ToClusterOutputWithContext(context.Background())
}
func (i *Cluster) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterOutput)
}
// ClusterArrayInput is an input type that accepts ClusterArray and ClusterArrayOutput values.
// You can construct a concrete instance of `ClusterArrayInput` via:
//
// ClusterArray{ ClusterArgs{...} }
type ClusterArrayInput interface {
pulumi.Input
ToClusterArrayOutput() ClusterArrayOutput
ToClusterArrayOutputWithContext(context.Context) ClusterArrayOutput
}
type ClusterArray []ClusterInput
func (ClusterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
}
func (i ClusterArray) ToClusterArrayOutput() ClusterArrayOutput {
return i.ToClusterArrayOutputWithContext(context.Background())
}
func (i ClusterArray) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterArrayOutput)
}
// ClusterMapInput is an input type that accepts ClusterMap and ClusterMapOutput values.
// You can construct a concrete instance of `ClusterMapInput` via:
//
// ClusterMap{ "key": ClusterArgs{...} }
type ClusterMapInput interface {
pulumi.Input
ToClusterMapOutput() ClusterMapOutput
ToClusterMapOutputWithContext(context.Context) ClusterMapOutput
}
type ClusterMap map[string]ClusterInput
func (ClusterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
}
func (i ClusterMap) ToClusterMapOutput() ClusterMapOutput {
return i.ToClusterMapOutputWithContext(context.Background())
}
func (i ClusterMap) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterMapOutput)
}
type ClusterOutput struct{ *pulumi.OutputState }
func (ClusterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Cluster)(nil)).Elem()
}
func (o ClusterOutput) ToClusterOutput() ClusterOutput {
return o
}
func (o ClusterOutput) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
return o
}
// An `apiServerProfile` block as defined below. Changing this forces a new resource to be created.
func (o ClusterOutput) ApiServerProfile() ClusterApiServerProfileOutput {
return o.ApplyT(func(v *Cluster) ClusterApiServerProfileOutput { return v.ApiServerProfile }).(ClusterApiServerProfileOutput)
}
// A `clusterProfile` block as defined below. Changing this forces a new resource to be created.
func (o ClusterOutput) ClusterProfile() ClusterClusterProfileOutput {
return o.ApplyT(func(v *Cluster) ClusterClusterProfileOutput { return v.ClusterProfile }).(ClusterClusterProfileOutput)
}
// The Red Hat OpenShift cluster console URL.
func (o ClusterOutput) ConsoleUrl() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ConsoleUrl }).(pulumi.StringOutput)
}
// An `ingressProfile` block as defined below. Changing this forces a new resource to be created.
func (o ClusterOutput) IngressProfile() ClusterIngressProfileOutput {
return o.ApplyT(func(v *Cluster) ClusterIngressProfileOutput { return v.IngressProfile }).(ClusterIngressProfileOutput)
}
// The location where the Azure Red Hat OpenShift Cluster should be created. Changing this forces a new resource to be created.
func (o ClusterOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// A `mainProfile` block as defined below. Changing this forces a new resource to be created.
func (o ClusterOutput) MainProfile() ClusterMainProfileOutput {
return o.ApplyT(func(v *Cluster) ClusterMainProfileOutput { return v.MainProfile }).(ClusterMainProfileOutput)
}
// The name of the Azure Red Hat OpenShift Cluster to create. Changing this forces a new resource to be created.
func (o ClusterOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `networkProfile` block as defined below. Changing this forces a new resource to be created.
func (o ClusterOutput) NetworkProfile() ClusterNetworkProfileOutput {
return o.ApplyT(func(v *Cluster) ClusterNetworkProfileOutput { return v.NetworkProfile }).(ClusterNetworkProfileOutput)
}
// Specifies the Resource Group where the Azure Red Hat OpenShift Cluster should exist. Changing this forces a new resource to be created.
func (o ClusterOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A `servicePrincipal` block as defined below.
func (o ClusterOutput) ServicePrincipal() ClusterServicePrincipalOutput {
return o.ApplyT(func(v *Cluster) ClusterServicePrincipalOutput { return v.ServicePrincipal }).(ClusterServicePrincipalOutput)
}
// A mapping of tags to assign to the resource.
func (o ClusterOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// A `workerProfile` block as defined below. Changing this forces a new resource to be created.
func (o ClusterOutput) WorkerProfile() ClusterWorkerProfileOutput {
return o.ApplyT(func(v *Cluster) ClusterWorkerProfileOutput { return v.WorkerProfile }).(ClusterWorkerProfileOutput)
}
type ClusterArrayOutput struct{ *pulumi.OutputState }
func (ClusterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
}
func (o ClusterArrayOutput) ToClusterArrayOutput() ClusterArrayOutput {
return o
}
func (o ClusterArrayOutput) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
return o
}
func (o ClusterArrayOutput) Index(i pulumi.IntInput) ClusterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Cluster {
return vs[0].([]*Cluster)[vs[1].(int)]
}).(ClusterOutput)
}
type ClusterMapOutput struct{ *pulumi.OutputState }
func (ClusterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
}
func (o ClusterMapOutput) ToClusterMapOutput() ClusterMapOutput {
return o
}
func (o ClusterMapOutput) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
return o
}
func (o ClusterMapOutput) MapIndex(k pulumi.StringInput) ClusterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Cluster {
return vs[0].(map[string]*Cluster)[vs[1].(string)]
}).(ClusterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ClusterInput)(nil)).Elem(), &Cluster{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterArrayInput)(nil)).Elem(), ClusterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterMapInput)(nil)).Elem(), ClusterMap{})
pulumi.RegisterOutputType(ClusterOutput{})
pulumi.RegisterOutputType(ClusterArrayOutput{})
pulumi.RegisterOutputType(ClusterMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/getNamespace.go | sdk/go/azure/eventhub/getNamespace.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
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 EventHub Namespace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := eventhub.LookupNamespace(ctx, &eventhub.LookupNamespaceArgs{
// Name: "search-eventhubns",
// ResourceGroupName: "search-service",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("eventhubNamespaceId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.EventHub` - 2024-01-01
func LookupNamespace(ctx *pulumi.Context, args *LookupNamespaceArgs, opts ...pulumi.InvokeOption) (*LookupNamespaceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupNamespaceResult
err := ctx.Invoke("azure:eventhub/getNamespace:getNamespace", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getNamespace.
type LookupNamespaceArgs struct {
// The name of the EventHub Namespace.
Name string `pulumi:"name"`
// The Name of the Resource Group where the EventHub Namespace exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getNamespace.
type LookupNamespaceResult struct {
// Is Auto Inflate enabled for the EventHub Namespace?
AutoInflateEnabled bool `pulumi:"autoInflateEnabled"`
// The Capacity / Throughput Units for a `Standard` SKU namespace.
Capacity int `pulumi:"capacity"`
// The ID of the EventHub Dedicated Cluster where this Namespace exists.
DedicatedClusterId string `pulumi:"dedicatedClusterId"`
// The primary connection string for the authorization
// rule `RootManageSharedAccessKey`.
DefaultPrimaryConnectionString string `pulumi:"defaultPrimaryConnectionString"`
// The alias of the primary connection string for the authorization
// rule `RootManageSharedAccessKey`.
DefaultPrimaryConnectionStringAlias string `pulumi:"defaultPrimaryConnectionStringAlias"`
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey string `pulumi:"defaultPrimaryKey"`
// The secondary connection string for the
// authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryConnectionString string `pulumi:"defaultSecondaryConnectionString"`
// The alias of the secondary connection string for the
// authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryConnectionStringAlias string `pulumi:"defaultSecondaryConnectionStringAlias"`
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey string `pulumi:"defaultSecondaryKey"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
KafkaEnabled bool `pulumi:"kafkaEnabled"`
// The Azure location where the EventHub Namespace exists
Location string `pulumi:"location"`
// Specifies the maximum number of throughput units when Auto Inflate is Enabled.
MaximumThroughputUnits int `pulumi:"maximumThroughputUnits"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// Defines which tier to use.
Sku string `pulumi:"sku"`
// A mapping of tags to assign to the EventHub Namespace.
Tags map[string]string `pulumi:"tags"`
}
func LookupNamespaceOutput(ctx *pulumi.Context, args LookupNamespaceOutputArgs, opts ...pulumi.InvokeOption) LookupNamespaceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupNamespaceResultOutput, error) {
args := v.(LookupNamespaceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:eventhub/getNamespace:getNamespace", args, LookupNamespaceResultOutput{}, options).(LookupNamespaceResultOutput), nil
}).(LookupNamespaceResultOutput)
}
// A collection of arguments for invoking getNamespace.
type LookupNamespaceOutputArgs struct {
// The name of the EventHub Namespace.
Name pulumi.StringInput `pulumi:"name"`
// The Name of the Resource Group where the EventHub Namespace exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupNamespaceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupNamespaceArgs)(nil)).Elem()
}
// A collection of values returned by getNamespace.
type LookupNamespaceResultOutput struct{ *pulumi.OutputState }
func (LookupNamespaceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupNamespaceResult)(nil)).Elem()
}
func (o LookupNamespaceResultOutput) ToLookupNamespaceResultOutput() LookupNamespaceResultOutput {
return o
}
func (o LookupNamespaceResultOutput) ToLookupNamespaceResultOutputWithContext(ctx context.Context) LookupNamespaceResultOutput {
return o
}
// Is Auto Inflate enabled for the EventHub Namespace?
func (o LookupNamespaceResultOutput) AutoInflateEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupNamespaceResult) bool { return v.AutoInflateEnabled }).(pulumi.BoolOutput)
}
// The Capacity / Throughput Units for a `Standard` SKU namespace.
func (o LookupNamespaceResultOutput) Capacity() pulumi.IntOutput {
return o.ApplyT(func(v LookupNamespaceResult) int { return v.Capacity }).(pulumi.IntOutput)
}
// The ID of the EventHub Dedicated Cluster where this Namespace exists.
func (o LookupNamespaceResultOutput) DedicatedClusterId() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.DedicatedClusterId }).(pulumi.StringOutput)
}
// The primary connection string for the authorization
// rule `RootManageSharedAccessKey`.
func (o LookupNamespaceResultOutput) DefaultPrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.DefaultPrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the primary connection string for the authorization
// rule `RootManageSharedAccessKey`.
func (o LookupNamespaceResultOutput) DefaultPrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.DefaultPrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
func (o LookupNamespaceResultOutput) DefaultPrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.DefaultPrimaryKey }).(pulumi.StringOutput)
}
// The secondary connection string for the
// authorization rule `RootManageSharedAccessKey`.
func (o LookupNamespaceResultOutput) DefaultSecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.DefaultSecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the secondary connection string for the
// authorization rule `RootManageSharedAccessKey`.
func (o LookupNamespaceResultOutput) DefaultSecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.DefaultSecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
func (o LookupNamespaceResultOutput) DefaultSecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.DefaultSecondaryKey }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupNamespaceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupNamespaceResultOutput) KafkaEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupNamespaceResult) bool { return v.KafkaEnabled }).(pulumi.BoolOutput)
}
// The Azure location where the EventHub Namespace exists
func (o LookupNamespaceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.Location }).(pulumi.StringOutput)
}
// Specifies the maximum number of throughput units when Auto Inflate is Enabled.
func (o LookupNamespaceResultOutput) MaximumThroughputUnits() pulumi.IntOutput {
return o.ApplyT(func(v LookupNamespaceResult) int { return v.MaximumThroughputUnits }).(pulumi.IntOutput)
}
func (o LookupNamespaceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupNamespaceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Defines which tier to use.
func (o LookupNamespaceResultOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.Sku }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the EventHub Namespace.
func (o LookupNamespaceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupNamespaceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupNamespaceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/domain.go | sdk/go/azure/eventhub/domain.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an EventGrid Domain
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventgrid"
// "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 = eventgrid.NewDomain(ctx, "example", &eventgrid.DomainArgs{
// Name: pulumi.String("my-eventgrid-domain"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// 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.EventGrid` - 2025-02-15
//
// ## Import
//
// EventGrid Domains can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/domain:Domain domain1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/domains/domain1
// ```
//
// Deprecated: azure.eventhub.Domain has been deprecated in favor of azure.eventgrid.Domain
type Domain struct {
pulumi.CustomResourceState
// Whether to create the domain topic when the first event subscription at the scope of the domain topic is created. Defaults to `true`.
AutoCreateTopicWithFirstSubscription pulumi.BoolPtrOutput `pulumi:"autoCreateTopicWithFirstSubscription"`
// Whether to delete the domain topic when the last event subscription at the scope of the domain topic is deleted. Defaults to `true`.
AutoDeleteTopicWithLastSubscription pulumi.BoolPtrOutput `pulumi:"autoDeleteTopicWithLastSubscription"`
// The Endpoint associated with the EventGrid Domain.
Endpoint pulumi.StringOutput `pulumi:"endpoint"`
// An `identity` block as defined below.
Identity DomainIdentityPtrOutput `pulumi:"identity"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules DomainInboundIpRuleArrayOutput `pulumi:"inboundIpRules"`
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues DomainInputMappingDefaultValuesPtrOutput `pulumi:"inputMappingDefaultValues"`
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields DomainInputMappingFieldsPtrOutput `pulumi:"inputMappingFields"`
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
InputSchema pulumi.StringPtrOutput `pulumi:"inputSchema"`
// Whether local authentication methods is enabled for the EventGrid Domain. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrOutput `pulumi:"localAuthEnabled"`
// 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 EventGrid Domain resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The Primary Shared Access Key associated with the EventGrid Domain.
PrimaryAccessKey pulumi.StringOutput `pulumi:"primaryAccessKey"`
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which the EventGrid Domain exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Secondary Shared Access Key associated with the EventGrid Domain.
SecondaryAccessKey pulumi.StringOutput `pulumi:"secondaryAccessKey"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewDomain registers a new resource with the given unique name, arguments, and options.
func NewDomain(ctx *pulumi.Context,
name string, args *DomainArgs, opts ...pulumi.ResourceOption) (*Domain, 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'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryAccessKey",
"secondaryAccessKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Domain
err := ctx.RegisterResource("azure:eventhub/domain:Domain", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDomain gets an existing Domain 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 GetDomain(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DomainState, opts ...pulumi.ResourceOption) (*Domain, error) {
var resource Domain
err := ctx.ReadResource("azure:eventhub/domain:Domain", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Domain resources.
type domainState struct {
// Whether to create the domain topic when the first event subscription at the scope of the domain topic is created. Defaults to `true`.
AutoCreateTopicWithFirstSubscription *bool `pulumi:"autoCreateTopicWithFirstSubscription"`
// Whether to delete the domain topic when the last event subscription at the scope of the domain topic is deleted. Defaults to `true`.
AutoDeleteTopicWithLastSubscription *bool `pulumi:"autoDeleteTopicWithLastSubscription"`
// The Endpoint associated with the EventGrid Domain.
Endpoint *string `pulumi:"endpoint"`
// An `identity` block as defined below.
Identity *DomainIdentity `pulumi:"identity"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules []DomainInboundIpRule `pulumi:"inboundIpRules"`
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues *DomainInputMappingDefaultValues `pulumi:"inputMappingDefaultValues"`
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields *DomainInputMappingFields `pulumi:"inputMappingFields"`
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
InputSchema *string `pulumi:"inputSchema"`
// Whether local authentication methods is enabled for the EventGrid Domain. Defaults to `true`.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// 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 EventGrid Domain resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The Primary Shared Access Key associated with the EventGrid Domain.
PrimaryAccessKey *string `pulumi:"primaryAccessKey"`
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which the EventGrid Domain exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Secondary Shared Access Key associated with the EventGrid Domain.
SecondaryAccessKey *string `pulumi:"secondaryAccessKey"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type DomainState struct {
// Whether to create the domain topic when the first event subscription at the scope of the domain topic is created. Defaults to `true`.
AutoCreateTopicWithFirstSubscription pulumi.BoolPtrInput
// Whether to delete the domain topic when the last event subscription at the scope of the domain topic is deleted. Defaults to `true`.
AutoDeleteTopicWithLastSubscription pulumi.BoolPtrInput
// The Endpoint associated with the EventGrid Domain.
Endpoint pulumi.StringPtrInput
// An `identity` block as defined below.
Identity DomainIdentityPtrInput
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules DomainInboundIpRuleArrayInput
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues DomainInputMappingDefaultValuesPtrInput
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields DomainInputMappingFieldsPtrInput
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
InputSchema pulumi.StringPtrInput
// Whether local authentication methods is enabled for the EventGrid Domain. Defaults to `true`.
LocalAuthEnabled 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 EventGrid Domain resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The Primary Shared Access Key associated with the EventGrid Domain.
PrimaryAccessKey pulumi.StringPtrInput
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which the EventGrid Domain exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The Secondary Shared Access Key associated with the EventGrid Domain.
SecondaryAccessKey pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (DomainState) ElementType() reflect.Type {
return reflect.TypeOf((*domainState)(nil)).Elem()
}
type domainArgs struct {
// Whether to create the domain topic when the first event subscription at the scope of the domain topic is created. Defaults to `true`.
AutoCreateTopicWithFirstSubscription *bool `pulumi:"autoCreateTopicWithFirstSubscription"`
// Whether to delete the domain topic when the last event subscription at the scope of the domain topic is deleted. Defaults to `true`.
AutoDeleteTopicWithLastSubscription *bool `pulumi:"autoDeleteTopicWithLastSubscription"`
// An `identity` block as defined below.
Identity *DomainIdentity `pulumi:"identity"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules []DomainInboundIpRule `pulumi:"inboundIpRules"`
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues *DomainInputMappingDefaultValues `pulumi:"inputMappingDefaultValues"`
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields *DomainInputMappingFields `pulumi:"inputMappingFields"`
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
InputSchema *string `pulumi:"inputSchema"`
// Whether local authentication methods is enabled for the EventGrid Domain. Defaults to `true`.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// 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 EventGrid Domain resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which the EventGrid Domain exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Domain resource.
type DomainArgs struct {
// Whether to create the domain topic when the first event subscription at the scope of the domain topic is created. Defaults to `true`.
AutoCreateTopicWithFirstSubscription pulumi.BoolPtrInput
// Whether to delete the domain topic when the last event subscription at the scope of the domain topic is deleted. Defaults to `true`.
AutoDeleteTopicWithLastSubscription pulumi.BoolPtrInput
// An `identity` block as defined below.
Identity DomainIdentityPtrInput
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules DomainInboundIpRuleArrayInput
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues DomainInputMappingDefaultValuesPtrInput
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields DomainInputMappingFieldsPtrInput
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
InputSchema pulumi.StringPtrInput
// Whether local authentication methods is enabled for the EventGrid Domain. Defaults to `true`.
LocalAuthEnabled 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 EventGrid Domain resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which the EventGrid Domain exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (DomainArgs) ElementType() reflect.Type {
return reflect.TypeOf((*domainArgs)(nil)).Elem()
}
type DomainInput interface {
pulumi.Input
ToDomainOutput() DomainOutput
ToDomainOutputWithContext(ctx context.Context) DomainOutput
}
func (*Domain) ElementType() reflect.Type {
return reflect.TypeOf((**Domain)(nil)).Elem()
}
func (i *Domain) ToDomainOutput() DomainOutput {
return i.ToDomainOutputWithContext(context.Background())
}
func (i *Domain) ToDomainOutputWithContext(ctx context.Context) DomainOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainOutput)
}
// DomainArrayInput is an input type that accepts DomainArray and DomainArrayOutput values.
// You can construct a concrete instance of `DomainArrayInput` via:
//
// DomainArray{ DomainArgs{...} }
type DomainArrayInput interface {
pulumi.Input
ToDomainArrayOutput() DomainArrayOutput
ToDomainArrayOutputWithContext(context.Context) DomainArrayOutput
}
type DomainArray []DomainInput
func (DomainArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Domain)(nil)).Elem()
}
func (i DomainArray) ToDomainArrayOutput() DomainArrayOutput {
return i.ToDomainArrayOutputWithContext(context.Background())
}
func (i DomainArray) ToDomainArrayOutputWithContext(ctx context.Context) DomainArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainArrayOutput)
}
// DomainMapInput is an input type that accepts DomainMap and DomainMapOutput values.
// You can construct a concrete instance of `DomainMapInput` via:
//
// DomainMap{ "key": DomainArgs{...} }
type DomainMapInput interface {
pulumi.Input
ToDomainMapOutput() DomainMapOutput
ToDomainMapOutputWithContext(context.Context) DomainMapOutput
}
type DomainMap map[string]DomainInput
func (DomainMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Domain)(nil)).Elem()
}
func (i DomainMap) ToDomainMapOutput() DomainMapOutput {
return i.ToDomainMapOutputWithContext(context.Background())
}
func (i DomainMap) ToDomainMapOutputWithContext(ctx context.Context) DomainMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainMapOutput)
}
type DomainOutput struct{ *pulumi.OutputState }
func (DomainOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Domain)(nil)).Elem()
}
func (o DomainOutput) ToDomainOutput() DomainOutput {
return o
}
func (o DomainOutput) ToDomainOutputWithContext(ctx context.Context) DomainOutput {
return o
}
// Whether to create the domain topic when the first event subscription at the scope of the domain topic is created. Defaults to `true`.
func (o DomainOutput) AutoCreateTopicWithFirstSubscription() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.BoolPtrOutput { return v.AutoCreateTopicWithFirstSubscription }).(pulumi.BoolPtrOutput)
}
// Whether to delete the domain topic when the last event subscription at the scope of the domain topic is deleted. Defaults to `true`.
func (o DomainOutput) AutoDeleteTopicWithLastSubscription() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.BoolPtrOutput { return v.AutoDeleteTopicWithLastSubscription }).(pulumi.BoolPtrOutput)
}
// The Endpoint associated with the EventGrid Domain.
func (o DomainOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o DomainOutput) Identity() DomainIdentityPtrOutput {
return o.ApplyT(func(v *Domain) DomainIdentityPtrOutput { return v.Identity }).(DomainIdentityPtrOutput)
}
// One or more `inboundIpRule` blocks as defined below.
func (o DomainOutput) InboundIpRules() DomainInboundIpRuleArrayOutput {
return o.ApplyT(func(v *Domain) DomainInboundIpRuleArrayOutput { return v.InboundIpRules }).(DomainInboundIpRuleArrayOutput)
}
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
func (o DomainOutput) InputMappingDefaultValues() DomainInputMappingDefaultValuesPtrOutput {
return o.ApplyT(func(v *Domain) DomainInputMappingDefaultValuesPtrOutput { return v.InputMappingDefaultValues }).(DomainInputMappingDefaultValuesPtrOutput)
}
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
func (o DomainOutput) InputMappingFields() DomainInputMappingFieldsPtrOutput {
return o.ApplyT(func(v *Domain) DomainInputMappingFieldsPtrOutput { return v.InputMappingFields }).(DomainInputMappingFieldsPtrOutput)
}
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
func (o DomainOutput) InputSchema() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.StringPtrOutput { return v.InputSchema }).(pulumi.StringPtrOutput)
}
// Whether local authentication methods is enabled for the EventGrid Domain. Defaults to `true`.
func (o DomainOutput) LocalAuthEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.BoolPtrOutput { return v.LocalAuthEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o DomainOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the EventGrid Domain resource. Changing this forces a new resource to be created.
func (o DomainOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The Primary Shared Access Key associated with the EventGrid Domain.
func (o DomainOutput) PrimaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.PrimaryAccessKey }).(pulumi.StringOutput)
}
// Whether or not public network access is allowed for this server. Defaults to `true`.
func (o DomainOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Domain) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the resource group in which the EventGrid Domain exists. Changing this forces a new resource to be created.
func (o DomainOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Secondary Shared Access Key associated with the EventGrid Domain.
func (o DomainOutput) SecondaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.SecondaryAccessKey }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o DomainOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Domain) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type DomainArrayOutput struct{ *pulumi.OutputState }
func (DomainArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Domain)(nil)).Elem()
}
func (o DomainArrayOutput) ToDomainArrayOutput() DomainArrayOutput {
return o
}
func (o DomainArrayOutput) ToDomainArrayOutputWithContext(ctx context.Context) DomainArrayOutput {
return o
}
func (o DomainArrayOutput) Index(i pulumi.IntInput) DomainOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Domain {
return vs[0].([]*Domain)[vs[1].(int)]
}).(DomainOutput)
}
type DomainMapOutput struct{ *pulumi.OutputState }
func (DomainMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Domain)(nil)).Elem()
}
func (o DomainMapOutput) ToDomainMapOutput() DomainMapOutput {
return o
}
func (o DomainMapOutput) ToDomainMapOutputWithContext(ctx context.Context) DomainMapOutput {
return o
}
func (o DomainMapOutput) MapIndex(k pulumi.StringInput) DomainOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Domain {
return vs[0].(map[string]*Domain)[vs[1].(string)]
}).(DomainOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DomainInput)(nil)).Elem(), &Domain{})
pulumi.RegisterInputType(reflect.TypeOf((*DomainArrayInput)(nil)).Elem(), DomainArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DomainMapInput)(nil)).Elem(), DomainMap{})
pulumi.RegisterOutputType(DomainOutput{})
pulumi.RegisterOutputType(DomainArrayOutput{})
pulumi.RegisterOutputType(DomainMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/init.go | sdk/go/azure/eventhub/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 eventhub
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:eventhub/authorizationRule:AuthorizationRule":
r = &AuthorizationRule{}
case "azure:eventhub/cluster:Cluster":
r = &Cluster{}
case "azure:eventhub/consumerGroup:ConsumerGroup":
r = &ConsumerGroup{}
case "azure:eventhub/domain:Domain":
r = &Domain{}
case "azure:eventhub/eventGridTopic:EventGridTopic":
r = &EventGridTopic{}
case "azure:eventhub/eventHub:EventHub":
r = &EventHub{}
case "azure:eventhub/eventHubAuthorizationRule:EventHubAuthorizationRule":
r = &EventHubAuthorizationRule{}
case "azure:eventhub/eventHubConsumerGroup:EventHubConsumerGroup":
r = &EventHubConsumerGroup{}
case "azure:eventhub/eventHubNamespace:EventHubNamespace":
r = &EventHubNamespace{}
case "azure:eventhub/eventHubNamespaceAuthorizationRule:EventHubNamespaceAuthorizationRule":
r = &EventHubNamespaceAuthorizationRule{}
case "azure:eventhub/eventSubscription:EventSubscription":
r = &EventSubscription{}
case "azure:eventhub/eventhubNamespaceDisasterRecoveryConfig:EventhubNamespaceDisasterRecoveryConfig":
r = &EventhubNamespaceDisasterRecoveryConfig{}
case "azure:eventhub/namespace:Namespace":
r = &Namespace{}
case "azure:eventhub/namespaceAuthorizationRule:NamespaceAuthorizationRule":
r = &NamespaceAuthorizationRule{}
case "azure:eventhub/namespaceCustomerManagedKey:NamespaceCustomerManagedKey":
r = &NamespaceCustomerManagedKey{}
case "azure:eventhub/namespaceSchemaGroup:NamespaceSchemaGroup":
r = &NamespaceSchemaGroup{}
case "azure:eventhub/queue:Queue":
r = &Queue{}
case "azure:eventhub/queueAuthorizationRule:QueueAuthorizationRule":
r = &QueueAuthorizationRule{}
case "azure:eventhub/subscription:Subscription":
r = &Subscription{}
case "azure:eventhub/subscriptionRule:SubscriptionRule":
r = &SubscriptionRule{}
case "azure:eventhub/topic:Topic":
r = &Topic{}
case "azure:eventhub/topicAuthorizationRule:TopicAuthorizationRule":
r = &TopicAuthorizationRule{}
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",
"eventhub/authorizationRule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/cluster",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/consumerGroup",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/domain",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/eventGridTopic",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/eventHub",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/eventHubAuthorizationRule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/eventHubConsumerGroup",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/eventHubNamespace",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/eventHubNamespaceAuthorizationRule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/eventSubscription",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/eventhubNamespaceDisasterRecoveryConfig",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/namespace",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/namespaceAuthorizationRule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/namespaceCustomerManagedKey",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/namespaceSchemaGroup",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/queue",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/queueAuthorizationRule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/subscription",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/subscriptionRule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/topic",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventhub/topicAuthorizationRule",
&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/eventhub/pulumiTypes.go | sdk/go/azure/eventhub/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 eventhub
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 DomainIdentity struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Event Grid Domain.
//
// > **Note:** This is required when `type` is set to `UserAssigned`
//
// > **Note:** When `type` is set to `SystemAssigned`, The assigned `principalId` and `tenantId` can be retrieved after the Event Grid Domain has been created. More details are available below.
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 Event Grid Domain. Possible values are `SystemAssigned`, `UserAssigned`.
Type string `pulumi:"type"`
}
// DomainIdentityInput is an input type that accepts DomainIdentityArgs and DomainIdentityOutput values.
// You can construct a concrete instance of `DomainIdentityInput` via:
//
// DomainIdentityArgs{...}
type DomainIdentityInput interface {
pulumi.Input
ToDomainIdentityOutput() DomainIdentityOutput
ToDomainIdentityOutputWithContext(context.Context) DomainIdentityOutput
}
type DomainIdentityArgs struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Event Grid Domain.
//
// > **Note:** This is required when `type` is set to `UserAssigned`
//
// > **Note:** When `type` is set to `SystemAssigned`, The assigned `principalId` and `tenantId` can be retrieved after the Event Grid Domain has been created. More details are available below.
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 Event Grid Domain. Possible values are `SystemAssigned`, `UserAssigned`.
Type pulumi.StringInput `pulumi:"type"`
}
func (DomainIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*DomainIdentity)(nil)).Elem()
}
func (i DomainIdentityArgs) ToDomainIdentityOutput() DomainIdentityOutput {
return i.ToDomainIdentityOutputWithContext(context.Background())
}
func (i DomainIdentityArgs) ToDomainIdentityOutputWithContext(ctx context.Context) DomainIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainIdentityOutput)
}
func (i DomainIdentityArgs) ToDomainIdentityPtrOutput() DomainIdentityPtrOutput {
return i.ToDomainIdentityPtrOutputWithContext(context.Background())
}
func (i DomainIdentityArgs) ToDomainIdentityPtrOutputWithContext(ctx context.Context) DomainIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainIdentityOutput).ToDomainIdentityPtrOutputWithContext(ctx)
}
// DomainIdentityPtrInput is an input type that accepts DomainIdentityArgs, DomainIdentityPtr and DomainIdentityPtrOutput values.
// You can construct a concrete instance of `DomainIdentityPtrInput` via:
//
// DomainIdentityArgs{...}
//
// or:
//
// nil
type DomainIdentityPtrInput interface {
pulumi.Input
ToDomainIdentityPtrOutput() DomainIdentityPtrOutput
ToDomainIdentityPtrOutputWithContext(context.Context) DomainIdentityPtrOutput
}
type domainIdentityPtrType DomainIdentityArgs
func DomainIdentityPtr(v *DomainIdentityArgs) DomainIdentityPtrInput {
return (*domainIdentityPtrType)(v)
}
func (*domainIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**DomainIdentity)(nil)).Elem()
}
func (i *domainIdentityPtrType) ToDomainIdentityPtrOutput() DomainIdentityPtrOutput {
return i.ToDomainIdentityPtrOutputWithContext(context.Background())
}
func (i *domainIdentityPtrType) ToDomainIdentityPtrOutputWithContext(ctx context.Context) DomainIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainIdentityPtrOutput)
}
type DomainIdentityOutput struct{ *pulumi.OutputState }
func (DomainIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DomainIdentity)(nil)).Elem()
}
func (o DomainIdentityOutput) ToDomainIdentityOutput() DomainIdentityOutput {
return o
}
func (o DomainIdentityOutput) ToDomainIdentityOutputWithContext(ctx context.Context) DomainIdentityOutput {
return o
}
func (o DomainIdentityOutput) ToDomainIdentityPtrOutput() DomainIdentityPtrOutput {
return o.ToDomainIdentityPtrOutputWithContext(context.Background())
}
func (o DomainIdentityOutput) ToDomainIdentityPtrOutputWithContext(ctx context.Context) DomainIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v DomainIdentity) *DomainIdentity {
return &v
}).(DomainIdentityPtrOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Event Grid Domain.
//
// > **Note:** This is required when `type` is set to `UserAssigned`
//
// > **Note:** When `type` is set to `SystemAssigned`, The assigned `principalId` and `tenantId` can be retrieved after the Event Grid Domain has been created. More details are available below.
func (o DomainIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v DomainIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o DomainIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v DomainIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o DomainIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v DomainIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Event Grid Domain. Possible values are `SystemAssigned`, `UserAssigned`.
func (o DomainIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v DomainIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type DomainIdentityPtrOutput struct{ *pulumi.OutputState }
func (DomainIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DomainIdentity)(nil)).Elem()
}
func (o DomainIdentityPtrOutput) ToDomainIdentityPtrOutput() DomainIdentityPtrOutput {
return o
}
func (o DomainIdentityPtrOutput) ToDomainIdentityPtrOutputWithContext(ctx context.Context) DomainIdentityPtrOutput {
return o
}
func (o DomainIdentityPtrOutput) Elem() DomainIdentityOutput {
return o.ApplyT(func(v *DomainIdentity) DomainIdentity {
if v != nil {
return *v
}
var ret DomainIdentity
return ret
}).(DomainIdentityOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Event Grid Domain.
//
// > **Note:** This is required when `type` is set to `UserAssigned`
//
// > **Note:** When `type` is set to `SystemAssigned`, The assigned `principalId` and `tenantId` can be retrieved after the Event Grid Domain has been created. More details are available below.
func (o DomainIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *DomainIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o DomainIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DomainIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o DomainIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DomainIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Event Grid Domain. Possible values are `SystemAssigned`, `UserAssigned`.
func (o DomainIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DomainIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type DomainInboundIpRule struct {
// The action to take when the rule is matched. Possible values are `Allow`. Defaults to `Allow`.
Action *string `pulumi:"action"`
// The IP mask (CIDR) to match on.
IpMask string `pulumi:"ipMask"`
}
// DomainInboundIpRuleInput is an input type that accepts DomainInboundIpRuleArgs and DomainInboundIpRuleOutput values.
// You can construct a concrete instance of `DomainInboundIpRuleInput` via:
//
// DomainInboundIpRuleArgs{...}
type DomainInboundIpRuleInput interface {
pulumi.Input
ToDomainInboundIpRuleOutput() DomainInboundIpRuleOutput
ToDomainInboundIpRuleOutputWithContext(context.Context) DomainInboundIpRuleOutput
}
type DomainInboundIpRuleArgs struct {
// The action to take when the rule is matched. Possible values are `Allow`. Defaults to `Allow`.
Action pulumi.StringPtrInput `pulumi:"action"`
// The IP mask (CIDR) to match on.
IpMask pulumi.StringInput `pulumi:"ipMask"`
}
func (DomainInboundIpRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*DomainInboundIpRule)(nil)).Elem()
}
func (i DomainInboundIpRuleArgs) ToDomainInboundIpRuleOutput() DomainInboundIpRuleOutput {
return i.ToDomainInboundIpRuleOutputWithContext(context.Background())
}
func (i DomainInboundIpRuleArgs) ToDomainInboundIpRuleOutputWithContext(ctx context.Context) DomainInboundIpRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainInboundIpRuleOutput)
}
// DomainInboundIpRuleArrayInput is an input type that accepts DomainInboundIpRuleArray and DomainInboundIpRuleArrayOutput values.
// You can construct a concrete instance of `DomainInboundIpRuleArrayInput` via:
//
// DomainInboundIpRuleArray{ DomainInboundIpRuleArgs{...} }
type DomainInboundIpRuleArrayInput interface {
pulumi.Input
ToDomainInboundIpRuleArrayOutput() DomainInboundIpRuleArrayOutput
ToDomainInboundIpRuleArrayOutputWithContext(context.Context) DomainInboundIpRuleArrayOutput
}
type DomainInboundIpRuleArray []DomainInboundIpRuleInput
func (DomainInboundIpRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]DomainInboundIpRule)(nil)).Elem()
}
func (i DomainInboundIpRuleArray) ToDomainInboundIpRuleArrayOutput() DomainInboundIpRuleArrayOutput {
return i.ToDomainInboundIpRuleArrayOutputWithContext(context.Background())
}
func (i DomainInboundIpRuleArray) ToDomainInboundIpRuleArrayOutputWithContext(ctx context.Context) DomainInboundIpRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainInboundIpRuleArrayOutput)
}
type DomainInboundIpRuleOutput struct{ *pulumi.OutputState }
func (DomainInboundIpRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DomainInboundIpRule)(nil)).Elem()
}
func (o DomainInboundIpRuleOutput) ToDomainInboundIpRuleOutput() DomainInboundIpRuleOutput {
return o
}
func (o DomainInboundIpRuleOutput) ToDomainInboundIpRuleOutputWithContext(ctx context.Context) DomainInboundIpRuleOutput {
return o
}
// The action to take when the rule is matched. Possible values are `Allow`. Defaults to `Allow`.
func (o DomainInboundIpRuleOutput) Action() pulumi.StringPtrOutput {
return o.ApplyT(func(v DomainInboundIpRule) *string { return v.Action }).(pulumi.StringPtrOutput)
}
// The IP mask (CIDR) to match on.
func (o DomainInboundIpRuleOutput) IpMask() pulumi.StringOutput {
return o.ApplyT(func(v DomainInboundIpRule) string { return v.IpMask }).(pulumi.StringOutput)
}
type DomainInboundIpRuleArrayOutput struct{ *pulumi.OutputState }
func (DomainInboundIpRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]DomainInboundIpRule)(nil)).Elem()
}
func (o DomainInboundIpRuleArrayOutput) ToDomainInboundIpRuleArrayOutput() DomainInboundIpRuleArrayOutput {
return o
}
func (o DomainInboundIpRuleArrayOutput) ToDomainInboundIpRuleArrayOutputWithContext(ctx context.Context) DomainInboundIpRuleArrayOutput {
return o
}
func (o DomainInboundIpRuleArrayOutput) Index(i pulumi.IntInput) DomainInboundIpRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) DomainInboundIpRule {
return vs[0].([]DomainInboundIpRule)[vs[1].(int)]
}).(DomainInboundIpRuleOutput)
}
type DomainInputMappingDefaultValues struct {
// Specifies the default data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
DataVersion *string `pulumi:"dataVersion"`
// Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
EventType *string `pulumi:"eventType"`
// Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
Subject *string `pulumi:"subject"`
}
// DomainInputMappingDefaultValuesInput is an input type that accepts DomainInputMappingDefaultValuesArgs and DomainInputMappingDefaultValuesOutput values.
// You can construct a concrete instance of `DomainInputMappingDefaultValuesInput` via:
//
// DomainInputMappingDefaultValuesArgs{...}
type DomainInputMappingDefaultValuesInput interface {
pulumi.Input
ToDomainInputMappingDefaultValuesOutput() DomainInputMappingDefaultValuesOutput
ToDomainInputMappingDefaultValuesOutputWithContext(context.Context) DomainInputMappingDefaultValuesOutput
}
type DomainInputMappingDefaultValuesArgs struct {
// Specifies the default data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
DataVersion pulumi.StringPtrInput `pulumi:"dataVersion"`
// Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
EventType pulumi.StringPtrInput `pulumi:"eventType"`
// Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
Subject pulumi.StringPtrInput `pulumi:"subject"`
}
func (DomainInputMappingDefaultValuesArgs) ElementType() reflect.Type {
return reflect.TypeOf((*DomainInputMappingDefaultValues)(nil)).Elem()
}
func (i DomainInputMappingDefaultValuesArgs) ToDomainInputMappingDefaultValuesOutput() DomainInputMappingDefaultValuesOutput {
return i.ToDomainInputMappingDefaultValuesOutputWithContext(context.Background())
}
func (i DomainInputMappingDefaultValuesArgs) ToDomainInputMappingDefaultValuesOutputWithContext(ctx context.Context) DomainInputMappingDefaultValuesOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainInputMappingDefaultValuesOutput)
}
func (i DomainInputMappingDefaultValuesArgs) ToDomainInputMappingDefaultValuesPtrOutput() DomainInputMappingDefaultValuesPtrOutput {
return i.ToDomainInputMappingDefaultValuesPtrOutputWithContext(context.Background())
}
func (i DomainInputMappingDefaultValuesArgs) ToDomainInputMappingDefaultValuesPtrOutputWithContext(ctx context.Context) DomainInputMappingDefaultValuesPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainInputMappingDefaultValuesOutput).ToDomainInputMappingDefaultValuesPtrOutputWithContext(ctx)
}
// DomainInputMappingDefaultValuesPtrInput is an input type that accepts DomainInputMappingDefaultValuesArgs, DomainInputMappingDefaultValuesPtr and DomainInputMappingDefaultValuesPtrOutput values.
// You can construct a concrete instance of `DomainInputMappingDefaultValuesPtrInput` via:
//
// DomainInputMappingDefaultValuesArgs{...}
//
// or:
//
// nil
type DomainInputMappingDefaultValuesPtrInput interface {
pulumi.Input
ToDomainInputMappingDefaultValuesPtrOutput() DomainInputMappingDefaultValuesPtrOutput
ToDomainInputMappingDefaultValuesPtrOutputWithContext(context.Context) DomainInputMappingDefaultValuesPtrOutput
}
type domainInputMappingDefaultValuesPtrType DomainInputMappingDefaultValuesArgs
func DomainInputMappingDefaultValuesPtr(v *DomainInputMappingDefaultValuesArgs) DomainInputMappingDefaultValuesPtrInput {
return (*domainInputMappingDefaultValuesPtrType)(v)
}
func (*domainInputMappingDefaultValuesPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**DomainInputMappingDefaultValues)(nil)).Elem()
}
func (i *domainInputMappingDefaultValuesPtrType) ToDomainInputMappingDefaultValuesPtrOutput() DomainInputMappingDefaultValuesPtrOutput {
return i.ToDomainInputMappingDefaultValuesPtrOutputWithContext(context.Background())
}
func (i *domainInputMappingDefaultValuesPtrType) ToDomainInputMappingDefaultValuesPtrOutputWithContext(ctx context.Context) DomainInputMappingDefaultValuesPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainInputMappingDefaultValuesPtrOutput)
}
type DomainInputMappingDefaultValuesOutput struct{ *pulumi.OutputState }
func (DomainInputMappingDefaultValuesOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DomainInputMappingDefaultValues)(nil)).Elem()
}
func (o DomainInputMappingDefaultValuesOutput) ToDomainInputMappingDefaultValuesOutput() DomainInputMappingDefaultValuesOutput {
return o
}
func (o DomainInputMappingDefaultValuesOutput) ToDomainInputMappingDefaultValuesOutputWithContext(ctx context.Context) DomainInputMappingDefaultValuesOutput {
return o
}
func (o DomainInputMappingDefaultValuesOutput) ToDomainInputMappingDefaultValuesPtrOutput() DomainInputMappingDefaultValuesPtrOutput {
return o.ToDomainInputMappingDefaultValuesPtrOutputWithContext(context.Background())
}
func (o DomainInputMappingDefaultValuesOutput) ToDomainInputMappingDefaultValuesPtrOutputWithContext(ctx context.Context) DomainInputMappingDefaultValuesPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v DomainInputMappingDefaultValues) *DomainInputMappingDefaultValues {
return &v
}).(DomainInputMappingDefaultValuesPtrOutput)
}
// Specifies the default data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingDefaultValuesOutput) DataVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v DomainInputMappingDefaultValues) *string { return v.DataVersion }).(pulumi.StringPtrOutput)
}
// Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingDefaultValuesOutput) EventType() pulumi.StringPtrOutput {
return o.ApplyT(func(v DomainInputMappingDefaultValues) *string { return v.EventType }).(pulumi.StringPtrOutput)
}
// Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingDefaultValuesOutput) Subject() pulumi.StringPtrOutput {
return o.ApplyT(func(v DomainInputMappingDefaultValues) *string { return v.Subject }).(pulumi.StringPtrOutput)
}
type DomainInputMappingDefaultValuesPtrOutput struct{ *pulumi.OutputState }
func (DomainInputMappingDefaultValuesPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DomainInputMappingDefaultValues)(nil)).Elem()
}
func (o DomainInputMappingDefaultValuesPtrOutput) ToDomainInputMappingDefaultValuesPtrOutput() DomainInputMappingDefaultValuesPtrOutput {
return o
}
func (o DomainInputMappingDefaultValuesPtrOutput) ToDomainInputMappingDefaultValuesPtrOutputWithContext(ctx context.Context) DomainInputMappingDefaultValuesPtrOutput {
return o
}
func (o DomainInputMappingDefaultValuesPtrOutput) Elem() DomainInputMappingDefaultValuesOutput {
return o.ApplyT(func(v *DomainInputMappingDefaultValues) DomainInputMappingDefaultValues {
if v != nil {
return *v
}
var ret DomainInputMappingDefaultValues
return ret
}).(DomainInputMappingDefaultValuesOutput)
}
// Specifies the default data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingDefaultValuesPtrOutput) DataVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DomainInputMappingDefaultValues) *string {
if v == nil {
return nil
}
return v.DataVersion
}).(pulumi.StringPtrOutput)
}
// Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingDefaultValuesPtrOutput) EventType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DomainInputMappingDefaultValues) *string {
if v == nil {
return nil
}
return v.EventType
}).(pulumi.StringPtrOutput)
}
// Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingDefaultValuesPtrOutput) Subject() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DomainInputMappingDefaultValues) *string {
if v == nil {
return nil
}
return v.Subject
}).(pulumi.StringPtrOutput)
}
type DomainInputMappingFields struct {
// Specifies the data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
DataVersion *string `pulumi:"dataVersion"`
// Specifies the event time of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
EventTime *string `pulumi:"eventTime"`
// Specifies the event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
EventType *string `pulumi:"eventType"`
// Specifies the id of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
Id *string `pulumi:"id"`
// Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
Subject *string `pulumi:"subject"`
// Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
Topic *string `pulumi:"topic"`
}
// DomainInputMappingFieldsInput is an input type that accepts DomainInputMappingFieldsArgs and DomainInputMappingFieldsOutput values.
// You can construct a concrete instance of `DomainInputMappingFieldsInput` via:
//
// DomainInputMappingFieldsArgs{...}
type DomainInputMappingFieldsInput interface {
pulumi.Input
ToDomainInputMappingFieldsOutput() DomainInputMappingFieldsOutput
ToDomainInputMappingFieldsOutputWithContext(context.Context) DomainInputMappingFieldsOutput
}
type DomainInputMappingFieldsArgs struct {
// Specifies the data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
DataVersion pulumi.StringPtrInput `pulumi:"dataVersion"`
// Specifies the event time of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
EventTime pulumi.StringPtrInput `pulumi:"eventTime"`
// Specifies the event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
EventType pulumi.StringPtrInput `pulumi:"eventType"`
// Specifies the id of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
Id pulumi.StringPtrInput `pulumi:"id"`
// Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
Subject pulumi.StringPtrInput `pulumi:"subject"`
// Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
Topic pulumi.StringPtrInput `pulumi:"topic"`
}
func (DomainInputMappingFieldsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*DomainInputMappingFields)(nil)).Elem()
}
func (i DomainInputMappingFieldsArgs) ToDomainInputMappingFieldsOutput() DomainInputMappingFieldsOutput {
return i.ToDomainInputMappingFieldsOutputWithContext(context.Background())
}
func (i DomainInputMappingFieldsArgs) ToDomainInputMappingFieldsOutputWithContext(ctx context.Context) DomainInputMappingFieldsOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainInputMappingFieldsOutput)
}
func (i DomainInputMappingFieldsArgs) ToDomainInputMappingFieldsPtrOutput() DomainInputMappingFieldsPtrOutput {
return i.ToDomainInputMappingFieldsPtrOutputWithContext(context.Background())
}
func (i DomainInputMappingFieldsArgs) ToDomainInputMappingFieldsPtrOutputWithContext(ctx context.Context) DomainInputMappingFieldsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainInputMappingFieldsOutput).ToDomainInputMappingFieldsPtrOutputWithContext(ctx)
}
// DomainInputMappingFieldsPtrInput is an input type that accepts DomainInputMappingFieldsArgs, DomainInputMappingFieldsPtr and DomainInputMappingFieldsPtrOutput values.
// You can construct a concrete instance of `DomainInputMappingFieldsPtrInput` via:
//
// DomainInputMappingFieldsArgs{...}
//
// or:
//
// nil
type DomainInputMappingFieldsPtrInput interface {
pulumi.Input
ToDomainInputMappingFieldsPtrOutput() DomainInputMappingFieldsPtrOutput
ToDomainInputMappingFieldsPtrOutputWithContext(context.Context) DomainInputMappingFieldsPtrOutput
}
type domainInputMappingFieldsPtrType DomainInputMappingFieldsArgs
func DomainInputMappingFieldsPtr(v *DomainInputMappingFieldsArgs) DomainInputMappingFieldsPtrInput {
return (*domainInputMappingFieldsPtrType)(v)
}
func (*domainInputMappingFieldsPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**DomainInputMappingFields)(nil)).Elem()
}
func (i *domainInputMappingFieldsPtrType) ToDomainInputMappingFieldsPtrOutput() DomainInputMappingFieldsPtrOutput {
return i.ToDomainInputMappingFieldsPtrOutputWithContext(context.Background())
}
func (i *domainInputMappingFieldsPtrType) ToDomainInputMappingFieldsPtrOutputWithContext(ctx context.Context) DomainInputMappingFieldsPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainInputMappingFieldsPtrOutput)
}
type DomainInputMappingFieldsOutput struct{ *pulumi.OutputState }
func (DomainInputMappingFieldsOutput) ElementType() reflect.Type {
return reflect.TypeOf((*DomainInputMappingFields)(nil)).Elem()
}
func (o DomainInputMappingFieldsOutput) ToDomainInputMappingFieldsOutput() DomainInputMappingFieldsOutput {
return o
}
func (o DomainInputMappingFieldsOutput) ToDomainInputMappingFieldsOutputWithContext(ctx context.Context) DomainInputMappingFieldsOutput {
return o
}
func (o DomainInputMappingFieldsOutput) ToDomainInputMappingFieldsPtrOutput() DomainInputMappingFieldsPtrOutput {
return o.ToDomainInputMappingFieldsPtrOutputWithContext(context.Background())
}
func (o DomainInputMappingFieldsOutput) ToDomainInputMappingFieldsPtrOutputWithContext(ctx context.Context) DomainInputMappingFieldsPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v DomainInputMappingFields) *DomainInputMappingFields {
return &v
}).(DomainInputMappingFieldsPtrOutput)
}
// Specifies the data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingFieldsOutput) DataVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v DomainInputMappingFields) *string { return v.DataVersion }).(pulumi.StringPtrOutput)
}
// Specifies the event time of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingFieldsOutput) EventTime() pulumi.StringPtrOutput {
return o.ApplyT(func(v DomainInputMappingFields) *string { return v.EventTime }).(pulumi.StringPtrOutput)
}
// Specifies the event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingFieldsOutput) EventType() pulumi.StringPtrOutput {
return o.ApplyT(func(v DomainInputMappingFields) *string { return v.EventType }).(pulumi.StringPtrOutput)
}
// Specifies the id of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingFieldsOutput) Id() pulumi.StringPtrOutput {
return o.ApplyT(func(v DomainInputMappingFields) *string { return v.Id }).(pulumi.StringPtrOutput)
}
// Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingFieldsOutput) Subject() pulumi.StringPtrOutput {
return o.ApplyT(func(v DomainInputMappingFields) *string { return v.Subject }).(pulumi.StringPtrOutput)
}
// Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingFieldsOutput) Topic() pulumi.StringPtrOutput {
return o.ApplyT(func(v DomainInputMappingFields) *string { return v.Topic }).(pulumi.StringPtrOutput)
}
type DomainInputMappingFieldsPtrOutput struct{ *pulumi.OutputState }
func (DomainInputMappingFieldsPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DomainInputMappingFields)(nil)).Elem()
}
func (o DomainInputMappingFieldsPtrOutput) ToDomainInputMappingFieldsPtrOutput() DomainInputMappingFieldsPtrOutput {
return o
}
func (o DomainInputMappingFieldsPtrOutput) ToDomainInputMappingFieldsPtrOutputWithContext(ctx context.Context) DomainInputMappingFieldsPtrOutput {
return o
}
func (o DomainInputMappingFieldsPtrOutput) Elem() DomainInputMappingFieldsOutput {
return o.ApplyT(func(v *DomainInputMappingFields) DomainInputMappingFields {
if v != nil {
return *v
}
var ret DomainInputMappingFields
return ret
}).(DomainInputMappingFieldsOutput)
}
// Specifies the data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingFieldsPtrOutput) DataVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DomainInputMappingFields) *string {
if v == nil {
return nil
}
return v.DataVersion
}).(pulumi.StringPtrOutput)
}
// Specifies the event time of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingFieldsPtrOutput) EventTime() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DomainInputMappingFields) *string {
if v == nil {
return nil
}
return v.EventTime
}).(pulumi.StringPtrOutput)
}
// Specifies the event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingFieldsPtrOutput) EventType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DomainInputMappingFields) *string {
if v == nil {
return nil
}
return v.EventType
}).(pulumi.StringPtrOutput)
}
// Specifies the id of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingFieldsPtrOutput) Id() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DomainInputMappingFields) *string {
if v == nil {
return nil
}
return v.Id
}).(pulumi.StringPtrOutput)
}
// Specifies the subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingFieldsPtrOutput) Subject() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DomainInputMappingFields) *string {
if v == nil {
return nil
}
return v.Subject
}).(pulumi.StringPtrOutput)
}
// Specifies the topic of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created.
func (o DomainInputMappingFieldsPtrOutput) Topic() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DomainInputMappingFields) *string {
if v == nil {
return nil
}
return v.Topic
}).(pulumi.StringPtrOutput)
}
type EventGridTopicIdentity struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Event Grid Topic.
//
// > **Note:** This is required when `type` is set to `UserAssigned`
//
// > **Note:** When `type` is set to `SystemAssigned`, The assigned `principalId` and `tenantId` can be retrieved after the Event Grid Topic has been created. More details are available below.
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.
| 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/eventhub/authorizationRule.go | sdk/go/azure/eventhub/authorizationRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Event Hubs authorization Rule within an Event 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/eventhub"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("acceptanceTestEventHubNamespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Basic"),
// Capacity: pulumi.Int(2),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
// Name: pulumi.String("acceptanceTestEventHub"),
// NamespaceName: exampleEventHubNamespace.Name,
// ResourceGroupName: example.Name,
// PartitionCount: pulumi.Int(2),
// MessageRetention: pulumi.Int(2),
// })
// if err != nil {
// return err
// }
// _, err = eventhub.NewAuthorizationRule(ctx, "example", &eventhub.AuthorizationRuleArgs{
// Name: pulumi.String("navi"),
// NamespaceName: exampleEventHubNamespace.Name,
// EventhubName: exampleEventHub.Name,
// ResourceGroupName: example.Name,
// Listen: pulumi.Bool(true),
// Send: pulumi.Bool(false),
// Manage: 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.EventHub` - 2024-01-01
//
// ## Import
//
// EventHub Authorization Rules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/authorizationRule:AuthorizationRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1/eventhubs/eventhub1/authorizationRules/rule1
// ```
type AuthorizationRule struct {
pulumi.CustomResourceState
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName pulumi.StringOutput `pulumi:"eventhubName"`
// Does this Authorization Rule have permissions to Listen to the Event Hub? Defaults to `false`.
Listen pulumi.BoolPtrOutput `pulumi:"listen"`
// Does this Authorization Rule have permissions to Manage to the Event Hub? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrOutput `pulumi:"manage"`
// Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName pulumi.StringOutput `pulumi:"namespaceName"`
// The Primary Connection String for the Event Hubs authorization Rule.
PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"`
// The alias of the Primary Connection String for the Event Hubs authorization Rule, which is generated when disaster recovery is enabled.
PrimaryConnectionStringAlias pulumi.StringOutput `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the Event Hubs authorization Rule.
PrimaryKey pulumi.StringOutput `pulumi:"primaryKey"`
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Secondary Connection String for the Event Hubs Authorization Rule.
SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"`
// The alias of the Secondary Connection String for the Event Hubs Authorization Rule, which is generated when disaster recovery is enabled.
SecondaryConnectionStringAlias pulumi.StringOutput `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the Event Hubs Authorization Rule.
SecondaryKey pulumi.StringOutput `pulumi:"secondaryKey"`
// Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`.
Send pulumi.BoolPtrOutput `pulumi:"send"`
}
// NewAuthorizationRule registers a new resource with the given unique name, arguments, and options.
func NewAuthorizationRule(ctx *pulumi.Context,
name string, args *AuthorizationRuleArgs, opts ...pulumi.ResourceOption) (*AuthorizationRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.EventhubName == nil {
return nil, errors.New("invalid value for required argument 'EventhubName'")
}
if args.NamespaceName == nil {
return nil, errors.New("invalid value for required argument 'NamespaceName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:eventhub/eventHubAuthorizationRule:EventHubAuthorizationRule"),
},
})
opts = append(opts, aliases)
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryConnectionString",
"primaryConnectionStringAlias",
"primaryKey",
"secondaryConnectionString",
"secondaryConnectionStringAlias",
"secondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource AuthorizationRule
err := ctx.RegisterResource("azure:eventhub/authorizationRule:AuthorizationRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAuthorizationRule gets an existing AuthorizationRule resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAuthorizationRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AuthorizationRuleState, opts ...pulumi.ResourceOption) (*AuthorizationRule, error) {
var resource AuthorizationRule
err := ctx.ReadResource("azure:eventhub/authorizationRule:AuthorizationRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AuthorizationRule resources.
type authorizationRuleState struct {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName *string `pulumi:"eventhubName"`
// Does this Authorization Rule have permissions to Listen to the Event Hub? Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Does this Authorization Rule have permissions to Manage to the Event Hub? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName *string `pulumi:"namespaceName"`
// The Primary Connection String for the Event Hubs authorization Rule.
PrimaryConnectionString *string `pulumi:"primaryConnectionString"`
// The alias of the Primary Connection String for the Event Hubs authorization Rule, which is generated when disaster recovery is enabled.
PrimaryConnectionStringAlias *string `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the Event Hubs authorization Rule.
PrimaryKey *string `pulumi:"primaryKey"`
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Secondary Connection String for the Event Hubs Authorization Rule.
SecondaryConnectionString *string `pulumi:"secondaryConnectionString"`
// The alias of the Secondary Connection String for the Event Hubs Authorization Rule, which is generated when disaster recovery is enabled.
SecondaryConnectionStringAlias *string `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the Event Hubs Authorization Rule.
SecondaryKey *string `pulumi:"secondaryKey"`
// Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`.
Send *bool `pulumi:"send"`
}
type AuthorizationRuleState struct {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName pulumi.StringPtrInput
// Does this Authorization Rule have permissions to Listen to the Event Hub? Defaults to `false`.
Listen pulumi.BoolPtrInput
// Does this Authorization Rule have permissions to Manage to the Event Hub? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName pulumi.StringPtrInput
// The Primary Connection String for the Event Hubs authorization Rule.
PrimaryConnectionString pulumi.StringPtrInput
// The alias of the Primary Connection String for the Event Hubs authorization Rule, which is generated when disaster recovery is enabled.
PrimaryConnectionStringAlias pulumi.StringPtrInput
// The Primary Key for the Event Hubs authorization Rule.
PrimaryKey pulumi.StringPtrInput
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
ResourceGroupName pulumi.StringPtrInput
// The Secondary Connection String for the Event Hubs Authorization Rule.
SecondaryConnectionString pulumi.StringPtrInput
// The alias of the Secondary Connection String for the Event Hubs Authorization Rule, which is generated when disaster recovery is enabled.
SecondaryConnectionStringAlias pulumi.StringPtrInput
// The Secondary Key for the Event Hubs Authorization Rule.
SecondaryKey pulumi.StringPtrInput
// Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`.
Send pulumi.BoolPtrInput
}
func (AuthorizationRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*authorizationRuleState)(nil)).Elem()
}
type authorizationRuleArgs struct {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName string `pulumi:"eventhubName"`
// Does this Authorization Rule have permissions to Listen to the Event Hub? Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Does this Authorization Rule have permissions to Manage to the Event Hub? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName string `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`.
Send *bool `pulumi:"send"`
}
// The set of arguments for constructing a AuthorizationRule resource.
type AuthorizationRuleArgs struct {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName pulumi.StringInput
// Does this Authorization Rule have permissions to Listen to the Event Hub? Defaults to `false`.
Listen pulumi.BoolPtrInput
// Does this Authorization Rule have permissions to Manage to the Event Hub? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName pulumi.StringInput
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
ResourceGroupName pulumi.StringInput
// Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`.
Send pulumi.BoolPtrInput
}
func (AuthorizationRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*authorizationRuleArgs)(nil)).Elem()
}
type AuthorizationRuleInput interface {
pulumi.Input
ToAuthorizationRuleOutput() AuthorizationRuleOutput
ToAuthorizationRuleOutputWithContext(ctx context.Context) AuthorizationRuleOutput
}
func (*AuthorizationRule) ElementType() reflect.Type {
return reflect.TypeOf((**AuthorizationRule)(nil)).Elem()
}
func (i *AuthorizationRule) ToAuthorizationRuleOutput() AuthorizationRuleOutput {
return i.ToAuthorizationRuleOutputWithContext(context.Background())
}
func (i *AuthorizationRule) ToAuthorizationRuleOutputWithContext(ctx context.Context) AuthorizationRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuthorizationRuleOutput)
}
// AuthorizationRuleArrayInput is an input type that accepts AuthorizationRuleArray and AuthorizationRuleArrayOutput values.
// You can construct a concrete instance of `AuthorizationRuleArrayInput` via:
//
// AuthorizationRuleArray{ AuthorizationRuleArgs{...} }
type AuthorizationRuleArrayInput interface {
pulumi.Input
ToAuthorizationRuleArrayOutput() AuthorizationRuleArrayOutput
ToAuthorizationRuleArrayOutputWithContext(context.Context) AuthorizationRuleArrayOutput
}
type AuthorizationRuleArray []AuthorizationRuleInput
func (AuthorizationRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AuthorizationRule)(nil)).Elem()
}
func (i AuthorizationRuleArray) ToAuthorizationRuleArrayOutput() AuthorizationRuleArrayOutput {
return i.ToAuthorizationRuleArrayOutputWithContext(context.Background())
}
func (i AuthorizationRuleArray) ToAuthorizationRuleArrayOutputWithContext(ctx context.Context) AuthorizationRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuthorizationRuleArrayOutput)
}
// AuthorizationRuleMapInput is an input type that accepts AuthorizationRuleMap and AuthorizationRuleMapOutput values.
// You can construct a concrete instance of `AuthorizationRuleMapInput` via:
//
// AuthorizationRuleMap{ "key": AuthorizationRuleArgs{...} }
type AuthorizationRuleMapInput interface {
pulumi.Input
ToAuthorizationRuleMapOutput() AuthorizationRuleMapOutput
ToAuthorizationRuleMapOutputWithContext(context.Context) AuthorizationRuleMapOutput
}
type AuthorizationRuleMap map[string]AuthorizationRuleInput
func (AuthorizationRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AuthorizationRule)(nil)).Elem()
}
func (i AuthorizationRuleMap) ToAuthorizationRuleMapOutput() AuthorizationRuleMapOutput {
return i.ToAuthorizationRuleMapOutputWithContext(context.Background())
}
func (i AuthorizationRuleMap) ToAuthorizationRuleMapOutputWithContext(ctx context.Context) AuthorizationRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AuthorizationRuleMapOutput)
}
type AuthorizationRuleOutput struct{ *pulumi.OutputState }
func (AuthorizationRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AuthorizationRule)(nil)).Elem()
}
func (o AuthorizationRuleOutput) ToAuthorizationRuleOutput() AuthorizationRuleOutput {
return o
}
func (o AuthorizationRuleOutput) ToAuthorizationRuleOutputWithContext(ctx context.Context) AuthorizationRuleOutput {
return o
}
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
func (o AuthorizationRuleOutput) EventhubName() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.EventhubName }).(pulumi.StringOutput)
}
// Does this Authorization Rule have permissions to Listen to the Event Hub? Defaults to `false`.
func (o AuthorizationRuleOutput) Listen() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *AuthorizationRule) pulumi.BoolPtrOutput { return v.Listen }).(pulumi.BoolPtrOutput)
}
// Does this Authorization Rule have permissions to Manage to the Event Hub? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
func (o AuthorizationRuleOutput) Manage() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *AuthorizationRule) pulumi.BoolPtrOutput { return v.Manage }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created.
func (o AuthorizationRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
func (o AuthorizationRuleOutput) NamespaceName() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.NamespaceName }).(pulumi.StringOutput)
}
// The Primary Connection String for the Event Hubs authorization Rule.
func (o AuthorizationRuleOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the Primary Connection String for the Event Hubs authorization Rule, which is generated when disaster recovery is enabled.
func (o AuthorizationRuleOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Primary Key for the Event Hubs authorization Rule.
func (o AuthorizationRuleOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.PrimaryKey }).(pulumi.StringOutput)
}
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
func (o AuthorizationRuleOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Secondary Connection String for the Event Hubs Authorization Rule.
func (o AuthorizationRuleOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the Secondary Connection String for the Event Hubs Authorization Rule, which is generated when disaster recovery is enabled.
func (o AuthorizationRuleOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Secondary Key for the Event Hubs Authorization Rule.
func (o AuthorizationRuleOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *AuthorizationRule) pulumi.StringOutput { return v.SecondaryKey }).(pulumi.StringOutput)
}
// Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`.
func (o AuthorizationRuleOutput) Send() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *AuthorizationRule) pulumi.BoolPtrOutput { return v.Send }).(pulumi.BoolPtrOutput)
}
type AuthorizationRuleArrayOutput struct{ *pulumi.OutputState }
func (AuthorizationRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AuthorizationRule)(nil)).Elem()
}
func (o AuthorizationRuleArrayOutput) ToAuthorizationRuleArrayOutput() AuthorizationRuleArrayOutput {
return o
}
func (o AuthorizationRuleArrayOutput) ToAuthorizationRuleArrayOutputWithContext(ctx context.Context) AuthorizationRuleArrayOutput {
return o
}
func (o AuthorizationRuleArrayOutput) Index(i pulumi.IntInput) AuthorizationRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AuthorizationRule {
return vs[0].([]*AuthorizationRule)[vs[1].(int)]
}).(AuthorizationRuleOutput)
}
type AuthorizationRuleMapOutput struct{ *pulumi.OutputState }
func (AuthorizationRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AuthorizationRule)(nil)).Elem()
}
func (o AuthorizationRuleMapOutput) ToAuthorizationRuleMapOutput() AuthorizationRuleMapOutput {
return o
}
func (o AuthorizationRuleMapOutput) ToAuthorizationRuleMapOutputWithContext(ctx context.Context) AuthorizationRuleMapOutput {
return o
}
func (o AuthorizationRuleMapOutput) MapIndex(k pulumi.StringInput) AuthorizationRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AuthorizationRule {
return vs[0].(map[string]*AuthorizationRule)[vs[1].(string)]
}).(AuthorizationRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AuthorizationRuleInput)(nil)).Elem(), &AuthorizationRule{})
pulumi.RegisterInputType(reflect.TypeOf((*AuthorizationRuleArrayInput)(nil)).Elem(), AuthorizationRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AuthorizationRuleMapInput)(nil)).Elem(), AuthorizationRuleMap{})
pulumi.RegisterOutputType(AuthorizationRuleOutput{})
pulumi.RegisterOutputType(AuthorizationRuleArrayOutput{})
pulumi.RegisterOutputType(AuthorizationRuleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/getConsumeGroup.go | sdk/go/azure/eventhub/getConsumeGroup.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
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 Event Hubs Consumer Group within an Event Hub.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := eventhub.GetConsumeGroup(ctx, &eventhub.GetConsumeGroupArgs{
// Name: testAzurermEventhubConsumerGroup.Name,
// NamespaceName: testAzurermEventhubNamespace.Name,
// EventhubName: testAzurermEventhub.Name,
// ResourceGroupName: testAzurermResourceGroup.Name,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.EventHub` - 2024-01-01
func GetConsumeGroup(ctx *pulumi.Context, args *GetConsumeGroupArgs, opts ...pulumi.InvokeOption) (*GetConsumeGroupResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetConsumeGroupResult
err := ctx.Invoke("azure:eventhub/getConsumeGroup:getConsumeGroup", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getConsumeGroup.
type GetConsumeGroupArgs struct {
// Specifies the name of the EventHub.
EventhubName string `pulumi:"eventhubName"`
// Specifies the name of the EventHub Consumer Group resource.
Name string `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace.
NamespaceName string `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getConsumeGroup.
type GetConsumeGroupResult struct {
EventhubName string `pulumi:"eventhubName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
NamespaceName string `pulumi:"namespaceName"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the user metadata.
UserMetadata string `pulumi:"userMetadata"`
}
func GetConsumeGroupOutput(ctx *pulumi.Context, args GetConsumeGroupOutputArgs, opts ...pulumi.InvokeOption) GetConsumeGroupResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetConsumeGroupResultOutput, error) {
args := v.(GetConsumeGroupArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:eventhub/getConsumeGroup:getConsumeGroup", args, GetConsumeGroupResultOutput{}, options).(GetConsumeGroupResultOutput), nil
}).(GetConsumeGroupResultOutput)
}
// A collection of arguments for invoking getConsumeGroup.
type GetConsumeGroupOutputArgs struct {
// Specifies the name of the EventHub.
EventhubName pulumi.StringInput `pulumi:"eventhubName"`
// Specifies the name of the EventHub Consumer Group resource.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace.
NamespaceName pulumi.StringInput `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (GetConsumeGroupOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetConsumeGroupArgs)(nil)).Elem()
}
// A collection of values returned by getConsumeGroup.
type GetConsumeGroupResultOutput struct{ *pulumi.OutputState }
func (GetConsumeGroupResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetConsumeGroupResult)(nil)).Elem()
}
func (o GetConsumeGroupResultOutput) ToGetConsumeGroupResultOutput() GetConsumeGroupResultOutput {
return o
}
func (o GetConsumeGroupResultOutput) ToGetConsumeGroupResultOutputWithContext(ctx context.Context) GetConsumeGroupResultOutput {
return o
}
func (o GetConsumeGroupResultOutput) EventhubName() pulumi.StringOutput {
return o.ApplyT(func(v GetConsumeGroupResult) string { return v.EventhubName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetConsumeGroupResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetConsumeGroupResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetConsumeGroupResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetConsumeGroupResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o GetConsumeGroupResultOutput) NamespaceName() pulumi.StringOutput {
return o.ApplyT(func(v GetConsumeGroupResult) string { return v.NamespaceName }).(pulumi.StringOutput)
}
func (o GetConsumeGroupResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetConsumeGroupResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Specifies the user metadata.
func (o GetConsumeGroupResultOutput) UserMetadata() pulumi.StringOutput {
return o.ApplyT(func(v GetConsumeGroupResult) string { return v.UserMetadata }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetConsumeGroupResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/getEventhubNamespace.go | sdk/go/azure/eventhub/getEventhubNamespace.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
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 EventHub Namespace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := eventhub.LookupNamespace(ctx, &eventhub.LookupNamespaceArgs{
// Name: "search-eventhubns",
// ResourceGroupName: "search-service",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("eventhubNamespaceId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.EventHub` - 2024-01-01
//
// Deprecated: azure.eventhub.getEventhubNamespace has been deprecated in favor of azure.eventhub.getNamespace
func GetEventhubNamespace(ctx *pulumi.Context, args *GetEventhubNamespaceArgs, opts ...pulumi.InvokeOption) (*GetEventhubNamespaceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetEventhubNamespaceResult
err := ctx.Invoke("azure:eventhub/getEventhubNamespace:getEventhubNamespace", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getEventhubNamespace.
type GetEventhubNamespaceArgs struct {
// The name of the EventHub Namespace.
Name string `pulumi:"name"`
// The Name of the Resource Group where the EventHub Namespace exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getEventhubNamespace.
type GetEventhubNamespaceResult struct {
// Is Auto Inflate enabled for the EventHub Namespace?
AutoInflateEnabled bool `pulumi:"autoInflateEnabled"`
// The Capacity / Throughput Units for a `Standard` SKU namespace.
Capacity int `pulumi:"capacity"`
// The ID of the EventHub Dedicated Cluster where this Namespace exists.
DedicatedClusterId string `pulumi:"dedicatedClusterId"`
// The primary connection string for the authorization
// rule `RootManageSharedAccessKey`.
DefaultPrimaryConnectionString string `pulumi:"defaultPrimaryConnectionString"`
// The alias of the primary connection string for the authorization
// rule `RootManageSharedAccessKey`.
DefaultPrimaryConnectionStringAlias string `pulumi:"defaultPrimaryConnectionStringAlias"`
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey string `pulumi:"defaultPrimaryKey"`
// The secondary connection string for the
// authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryConnectionString string `pulumi:"defaultSecondaryConnectionString"`
// The alias of the secondary connection string for the
// authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryConnectionStringAlias string `pulumi:"defaultSecondaryConnectionStringAlias"`
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey string `pulumi:"defaultSecondaryKey"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
KafkaEnabled bool `pulumi:"kafkaEnabled"`
// The Azure location where the EventHub Namespace exists
Location string `pulumi:"location"`
// Specifies the maximum number of throughput units when Auto Inflate is Enabled.
MaximumThroughputUnits int `pulumi:"maximumThroughputUnits"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// Defines which tier to use.
Sku string `pulumi:"sku"`
// A mapping of tags to assign to the EventHub Namespace.
Tags map[string]string `pulumi:"tags"`
}
func GetEventhubNamespaceOutput(ctx *pulumi.Context, args GetEventhubNamespaceOutputArgs, opts ...pulumi.InvokeOption) GetEventhubNamespaceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetEventhubNamespaceResultOutput, error) {
args := v.(GetEventhubNamespaceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:eventhub/getEventhubNamespace:getEventhubNamespace", args, GetEventhubNamespaceResultOutput{}, options).(GetEventhubNamespaceResultOutput), nil
}).(GetEventhubNamespaceResultOutput)
}
// A collection of arguments for invoking getEventhubNamespace.
type GetEventhubNamespaceOutputArgs struct {
// The name of the EventHub Namespace.
Name pulumi.StringInput `pulumi:"name"`
// The Name of the Resource Group where the EventHub Namespace exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (GetEventhubNamespaceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetEventhubNamespaceArgs)(nil)).Elem()
}
// A collection of values returned by getEventhubNamespace.
type GetEventhubNamespaceResultOutput struct{ *pulumi.OutputState }
func (GetEventhubNamespaceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetEventhubNamespaceResult)(nil)).Elem()
}
func (o GetEventhubNamespaceResultOutput) ToGetEventhubNamespaceResultOutput() GetEventhubNamespaceResultOutput {
return o
}
func (o GetEventhubNamespaceResultOutput) ToGetEventhubNamespaceResultOutputWithContext(ctx context.Context) GetEventhubNamespaceResultOutput {
return o
}
// Is Auto Inflate enabled for the EventHub Namespace?
func (o GetEventhubNamespaceResultOutput) AutoInflateEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) bool { return v.AutoInflateEnabled }).(pulumi.BoolOutput)
}
// The Capacity / Throughput Units for a `Standard` SKU namespace.
func (o GetEventhubNamespaceResultOutput) Capacity() pulumi.IntOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) int { return v.Capacity }).(pulumi.IntOutput)
}
// The ID of the EventHub Dedicated Cluster where this Namespace exists.
func (o GetEventhubNamespaceResultOutput) DedicatedClusterId() pulumi.StringOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) string { return v.DedicatedClusterId }).(pulumi.StringOutput)
}
// The primary connection string for the authorization
// rule `RootManageSharedAccessKey`.
func (o GetEventhubNamespaceResultOutput) DefaultPrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) string { return v.DefaultPrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the primary connection string for the authorization
// rule `RootManageSharedAccessKey`.
func (o GetEventhubNamespaceResultOutput) DefaultPrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) string { return v.DefaultPrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
func (o GetEventhubNamespaceResultOutput) DefaultPrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) string { return v.DefaultPrimaryKey }).(pulumi.StringOutput)
}
// The secondary connection string for the
// authorization rule `RootManageSharedAccessKey`.
func (o GetEventhubNamespaceResultOutput) DefaultSecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) string { return v.DefaultSecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the secondary connection string for the
// authorization rule `RootManageSharedAccessKey`.
func (o GetEventhubNamespaceResultOutput) DefaultSecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) string { return v.DefaultSecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
func (o GetEventhubNamespaceResultOutput) DefaultSecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) string { return v.DefaultSecondaryKey }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetEventhubNamespaceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetEventhubNamespaceResultOutput) KafkaEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) bool { return v.KafkaEnabled }).(pulumi.BoolOutput)
}
// The Azure location where the EventHub Namespace exists
func (o GetEventhubNamespaceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) string { return v.Location }).(pulumi.StringOutput)
}
// Specifies the maximum number of throughput units when Auto Inflate is Enabled.
func (o GetEventhubNamespaceResultOutput) MaximumThroughputUnits() pulumi.IntOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) int { return v.MaximumThroughputUnits }).(pulumi.IntOutput)
}
func (o GetEventhubNamespaceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o GetEventhubNamespaceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Defines which tier to use.
func (o GetEventhubNamespaceResultOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) string { return v.Sku }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the EventHub Namespace.
func (o GetEventhubNamespaceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v GetEventhubNamespaceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(GetEventhubNamespaceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/queueAuthorizationRule.go | sdk/go/azure/eventhub/queueAuthorizationRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Authorization Rule for a ServiceBus Queue.
//
// ## 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/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("my-servicebus"),
// Location: pulumi.String("West US"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// exampleQueue, err := servicebus.NewQueue(ctx, "example", &servicebus.QueueArgs{
// Name: pulumi.String("tfex_servicebus_queue"),
// NamespaceId: exampleNamespace.ID(),
// EnablePartitioning: true,
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewQueueAuthorizationRule(ctx, "example", &servicebus.QueueAuthorizationRuleArgs{
// Name: pulumi.String("examplerule"),
// QueueId: exampleQueue.ID(),
// Listen: pulumi.Bool(true),
// Send: pulumi.Bool(true),
// Manage: 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.ServiceBus` - 2024-01-01
//
// ## Import
//
// ServiceBus Queue Authorization Rules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/queueAuthorizationRule:QueueAuthorizationRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ServiceBus/namespaces/namespace1/queues/queue1/authorizationRules/rule1
// ```
//
// Deprecated: azure.eventhub.QueueAuthorizationRule has been deprecated in favor of azure.servicebus.QueueAuthorizationRule
type QueueAuthorizationRule struct {
pulumi.CustomResourceState
// Does this Authorization Rule have Listen permissions to the ServiceBus Queue? Defaults to `false`.
Listen pulumi.BoolPtrOutput `pulumi:"listen"`
// Does this Authorization Rule have Manage permissions to the ServiceBus Queue? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrOutput `pulumi:"manage"`
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The Primary Connection String for the Authorization Rule.
PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias pulumi.StringOutput `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the Authorization Rule.
PrimaryKey pulumi.StringOutput `pulumi:"primaryKey"`
// Specifies the ID of the ServiceBus Queue. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
QueueId pulumi.StringOutput `pulumi:"queueId"`
// The Secondary Connection String for the Authorization Rule.
SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias pulumi.StringOutput `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the Authorization Rule.
SecondaryKey pulumi.StringOutput `pulumi:"secondaryKey"`
// Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`.
Send pulumi.BoolPtrOutput `pulumi:"send"`
}
// NewQueueAuthorizationRule registers a new resource with the given unique name, arguments, and options.
func NewQueueAuthorizationRule(ctx *pulumi.Context,
name string, args *QueueAuthorizationRuleArgs, opts ...pulumi.ResourceOption) (*QueueAuthorizationRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.QueueId == nil {
return nil, errors.New("invalid value for required argument 'QueueId'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryConnectionString",
"primaryConnectionStringAlias",
"primaryKey",
"secondaryConnectionString",
"secondaryConnectionStringAlias",
"secondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource QueueAuthorizationRule
err := ctx.RegisterResource("azure:eventhub/queueAuthorizationRule:QueueAuthorizationRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetQueueAuthorizationRule gets an existing QueueAuthorizationRule 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 GetQueueAuthorizationRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *QueueAuthorizationRuleState, opts ...pulumi.ResourceOption) (*QueueAuthorizationRule, error) {
var resource QueueAuthorizationRule
err := ctx.ReadResource("azure:eventhub/queueAuthorizationRule:QueueAuthorizationRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering QueueAuthorizationRule resources.
type queueAuthorizationRuleState struct {
// Does this Authorization Rule have Listen permissions to the ServiceBus Queue? Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Does this Authorization Rule have Manage permissions to the ServiceBus Queue? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The Primary Connection String for the Authorization Rule.
PrimaryConnectionString *string `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias *string `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the Authorization Rule.
PrimaryKey *string `pulumi:"primaryKey"`
// Specifies the ID of the ServiceBus Queue. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
QueueId *string `pulumi:"queueId"`
// The Secondary Connection String for the Authorization Rule.
SecondaryConnectionString *string `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias *string `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the Authorization Rule.
SecondaryKey *string `pulumi:"secondaryKey"`
// Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`.
Send *bool `pulumi:"send"`
}
type QueueAuthorizationRuleState struct {
// Does this Authorization Rule have Listen permissions to the ServiceBus Queue? Defaults to `false`.
Listen pulumi.BoolPtrInput
// Does this Authorization Rule have Manage permissions to the ServiceBus Queue? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The Primary Connection String for the Authorization Rule.
PrimaryConnectionString pulumi.StringPtrInput
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias pulumi.StringPtrInput
// The Primary Key for the Authorization Rule.
PrimaryKey pulumi.StringPtrInput
// Specifies the ID of the ServiceBus Queue. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
QueueId pulumi.StringPtrInput
// The Secondary Connection String for the Authorization Rule.
SecondaryConnectionString pulumi.StringPtrInput
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias pulumi.StringPtrInput
// The Secondary Key for the Authorization Rule.
SecondaryKey pulumi.StringPtrInput
// Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`.
Send pulumi.BoolPtrInput
}
func (QueueAuthorizationRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*queueAuthorizationRuleState)(nil)).Elem()
}
type queueAuthorizationRuleArgs struct {
// Does this Authorization Rule have Listen permissions to the ServiceBus Queue? Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Does this Authorization Rule have Manage permissions to the ServiceBus Queue? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the ServiceBus Queue. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
QueueId string `pulumi:"queueId"`
// Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`.
Send *bool `pulumi:"send"`
}
// The set of arguments for constructing a QueueAuthorizationRule resource.
type QueueAuthorizationRuleArgs struct {
// Does this Authorization Rule have Listen permissions to the ServiceBus Queue? Defaults to `false`.
Listen pulumi.BoolPtrInput
// Does this Authorization Rule have Manage permissions to the ServiceBus Queue? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the ServiceBus Queue. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
QueueId pulumi.StringInput
// Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`.
Send pulumi.BoolPtrInput
}
func (QueueAuthorizationRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*queueAuthorizationRuleArgs)(nil)).Elem()
}
type QueueAuthorizationRuleInput interface {
pulumi.Input
ToQueueAuthorizationRuleOutput() QueueAuthorizationRuleOutput
ToQueueAuthorizationRuleOutputWithContext(ctx context.Context) QueueAuthorizationRuleOutput
}
func (*QueueAuthorizationRule) ElementType() reflect.Type {
return reflect.TypeOf((**QueueAuthorizationRule)(nil)).Elem()
}
func (i *QueueAuthorizationRule) ToQueueAuthorizationRuleOutput() QueueAuthorizationRuleOutput {
return i.ToQueueAuthorizationRuleOutputWithContext(context.Background())
}
func (i *QueueAuthorizationRule) ToQueueAuthorizationRuleOutputWithContext(ctx context.Context) QueueAuthorizationRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueueAuthorizationRuleOutput)
}
// QueueAuthorizationRuleArrayInput is an input type that accepts QueueAuthorizationRuleArray and QueueAuthorizationRuleArrayOutput values.
// You can construct a concrete instance of `QueueAuthorizationRuleArrayInput` via:
//
// QueueAuthorizationRuleArray{ QueueAuthorizationRuleArgs{...} }
type QueueAuthorizationRuleArrayInput interface {
pulumi.Input
ToQueueAuthorizationRuleArrayOutput() QueueAuthorizationRuleArrayOutput
ToQueueAuthorizationRuleArrayOutputWithContext(context.Context) QueueAuthorizationRuleArrayOutput
}
type QueueAuthorizationRuleArray []QueueAuthorizationRuleInput
func (QueueAuthorizationRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*QueueAuthorizationRule)(nil)).Elem()
}
func (i QueueAuthorizationRuleArray) ToQueueAuthorizationRuleArrayOutput() QueueAuthorizationRuleArrayOutput {
return i.ToQueueAuthorizationRuleArrayOutputWithContext(context.Background())
}
func (i QueueAuthorizationRuleArray) ToQueueAuthorizationRuleArrayOutputWithContext(ctx context.Context) QueueAuthorizationRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueueAuthorizationRuleArrayOutput)
}
// QueueAuthorizationRuleMapInput is an input type that accepts QueueAuthorizationRuleMap and QueueAuthorizationRuleMapOutput values.
// You can construct a concrete instance of `QueueAuthorizationRuleMapInput` via:
//
// QueueAuthorizationRuleMap{ "key": QueueAuthorizationRuleArgs{...} }
type QueueAuthorizationRuleMapInput interface {
pulumi.Input
ToQueueAuthorizationRuleMapOutput() QueueAuthorizationRuleMapOutput
ToQueueAuthorizationRuleMapOutputWithContext(context.Context) QueueAuthorizationRuleMapOutput
}
type QueueAuthorizationRuleMap map[string]QueueAuthorizationRuleInput
func (QueueAuthorizationRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*QueueAuthorizationRule)(nil)).Elem()
}
func (i QueueAuthorizationRuleMap) ToQueueAuthorizationRuleMapOutput() QueueAuthorizationRuleMapOutput {
return i.ToQueueAuthorizationRuleMapOutputWithContext(context.Background())
}
func (i QueueAuthorizationRuleMap) ToQueueAuthorizationRuleMapOutputWithContext(ctx context.Context) QueueAuthorizationRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueueAuthorizationRuleMapOutput)
}
type QueueAuthorizationRuleOutput struct{ *pulumi.OutputState }
func (QueueAuthorizationRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**QueueAuthorizationRule)(nil)).Elem()
}
func (o QueueAuthorizationRuleOutput) ToQueueAuthorizationRuleOutput() QueueAuthorizationRuleOutput {
return o
}
func (o QueueAuthorizationRuleOutput) ToQueueAuthorizationRuleOutputWithContext(ctx context.Context) QueueAuthorizationRuleOutput {
return o
}
// Does this Authorization Rule have Listen permissions to the ServiceBus Queue? Defaults to `false`.
func (o QueueAuthorizationRuleOutput) Listen() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.BoolPtrOutput { return v.Listen }).(pulumi.BoolPtrOutput)
}
// Does this Authorization Rule have Manage permissions to the ServiceBus Queue? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
func (o QueueAuthorizationRuleOutput) Manage() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.BoolPtrOutput { return v.Manage }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
func (o QueueAuthorizationRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The Primary Connection String for the Authorization Rule.
func (o QueueAuthorizationRuleOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
func (o QueueAuthorizationRuleOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Primary Key for the Authorization Rule.
func (o QueueAuthorizationRuleOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.PrimaryKey }).(pulumi.StringOutput)
}
// Specifies the ID of the ServiceBus Queue. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
func (o QueueAuthorizationRuleOutput) QueueId() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.QueueId }).(pulumi.StringOutput)
}
// The Secondary Connection String for the Authorization Rule.
func (o QueueAuthorizationRuleOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias Secondary Connection String for the ServiceBus Namespace
func (o QueueAuthorizationRuleOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Secondary Key for the Authorization Rule.
func (o QueueAuthorizationRuleOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.SecondaryKey }).(pulumi.StringOutput)
}
// Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`.
func (o QueueAuthorizationRuleOutput) Send() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.BoolPtrOutput { return v.Send }).(pulumi.BoolPtrOutput)
}
type QueueAuthorizationRuleArrayOutput struct{ *pulumi.OutputState }
func (QueueAuthorizationRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*QueueAuthorizationRule)(nil)).Elem()
}
func (o QueueAuthorizationRuleArrayOutput) ToQueueAuthorizationRuleArrayOutput() QueueAuthorizationRuleArrayOutput {
return o
}
func (o QueueAuthorizationRuleArrayOutput) ToQueueAuthorizationRuleArrayOutputWithContext(ctx context.Context) QueueAuthorizationRuleArrayOutput {
return o
}
func (o QueueAuthorizationRuleArrayOutput) Index(i pulumi.IntInput) QueueAuthorizationRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *QueueAuthorizationRule {
return vs[0].([]*QueueAuthorizationRule)[vs[1].(int)]
}).(QueueAuthorizationRuleOutput)
}
type QueueAuthorizationRuleMapOutput struct{ *pulumi.OutputState }
func (QueueAuthorizationRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*QueueAuthorizationRule)(nil)).Elem()
}
func (o QueueAuthorizationRuleMapOutput) ToQueueAuthorizationRuleMapOutput() QueueAuthorizationRuleMapOutput {
return o
}
func (o QueueAuthorizationRuleMapOutput) ToQueueAuthorizationRuleMapOutputWithContext(ctx context.Context) QueueAuthorizationRuleMapOutput {
return o
}
func (o QueueAuthorizationRuleMapOutput) MapIndex(k pulumi.StringInput) QueueAuthorizationRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *QueueAuthorizationRule {
return vs[0].(map[string]*QueueAuthorizationRule)[vs[1].(string)]
}).(QueueAuthorizationRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*QueueAuthorizationRuleInput)(nil)).Elem(), &QueueAuthorizationRule{})
pulumi.RegisterInputType(reflect.TypeOf((*QueueAuthorizationRuleArrayInput)(nil)).Elem(), QueueAuthorizationRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*QueueAuthorizationRuleMapInput)(nil)).Elem(), QueueAuthorizationRuleMap{})
pulumi.RegisterOutputType(QueueAuthorizationRuleOutput{})
pulumi.RegisterOutputType(QueueAuthorizationRuleArrayOutput{})
pulumi.RegisterOutputType(QueueAuthorizationRuleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/eventHubNamespaceAuthorizationRule.go | sdk/go/azure/eventhub/eventHubNamespaceAuthorizationRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Authorization Rule for an Event Hub Namespace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "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("resourcegroup"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("acceptanceTestEventHubNamespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Basic"),
// Capacity: pulumi.Int(2),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// _, err = eventhub.NewEventHubNamespaceAuthorizationRule(ctx, "example", &eventhub.EventHubNamespaceAuthorizationRuleArgs{
// Name: pulumi.String("navi"),
// NamespaceName: exampleEventHubNamespace.Name,
// ResourceGroupName: example.Name,
// Listen: pulumi.Bool(true),
// Send: pulumi.Bool(false),
// Manage: 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.EventHub` - 2024-01-01
//
// ## Import
//
// EventHub Namespace Authorization Rules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/eventHubNamespaceAuthorizationRule:EventHubNamespaceAuthorizationRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1/authorizationRules/rule1
// ```
type EventHubNamespaceAuthorizationRule struct {
pulumi.CustomResourceState
// Grants listen access to this this Authorization Rule. Defaults to `false`.
Listen pulumi.BoolPtrOutput `pulumi:"listen"`
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrOutput `pulumi:"manage"`
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the name of the EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName pulumi.StringOutput `pulumi:"namespaceName"`
// The Primary Connection String for the Authorization Rule.
PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"`
// The alias of the Primary Connection String for the Authorization Rule, which is generated when disaster recovery is enabled.
PrimaryConnectionStringAlias pulumi.StringOutput `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the Authorization Rule.
PrimaryKey pulumi.StringOutput `pulumi:"primaryKey"`
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Secondary Connection String for the Authorization Rule.
SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"`
// The alias of the Secondary Connection String for the Authorization Rule, which is generated when disaster recovery is enabled.
SecondaryConnectionStringAlias pulumi.StringOutput `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the Authorization Rule.
SecondaryKey pulumi.StringOutput `pulumi:"secondaryKey"`
// Grants send access to this this Authorization Rule. Defaults to `false`.
Send pulumi.BoolPtrOutput `pulumi:"send"`
}
// NewEventHubNamespaceAuthorizationRule registers a new resource with the given unique name, arguments, and options.
func NewEventHubNamespaceAuthorizationRule(ctx *pulumi.Context,
name string, args *EventHubNamespaceAuthorizationRuleArgs, opts ...pulumi.ResourceOption) (*EventHubNamespaceAuthorizationRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NamespaceName == nil {
return nil, errors.New("invalid value for required argument 'NamespaceName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryConnectionString",
"primaryConnectionStringAlias",
"primaryKey",
"secondaryConnectionString",
"secondaryConnectionStringAlias",
"secondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource EventHubNamespaceAuthorizationRule
err := ctx.RegisterResource("azure:eventhub/eventHubNamespaceAuthorizationRule:EventHubNamespaceAuthorizationRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEventHubNamespaceAuthorizationRule gets an existing EventHubNamespaceAuthorizationRule 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 GetEventHubNamespaceAuthorizationRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EventHubNamespaceAuthorizationRuleState, opts ...pulumi.ResourceOption) (*EventHubNamespaceAuthorizationRule, error) {
var resource EventHubNamespaceAuthorizationRule
err := ctx.ReadResource("azure:eventhub/eventHubNamespaceAuthorizationRule:EventHubNamespaceAuthorizationRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EventHubNamespaceAuthorizationRule resources.
type eventHubNamespaceAuthorizationRuleState struct {
// Grants listen access to this this Authorization Rule. Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName *string `pulumi:"namespaceName"`
// The Primary Connection String for the Authorization Rule.
PrimaryConnectionString *string `pulumi:"primaryConnectionString"`
// The alias of the Primary Connection String for the Authorization Rule, which is generated when disaster recovery is enabled.
PrimaryConnectionStringAlias *string `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the Authorization Rule.
PrimaryKey *string `pulumi:"primaryKey"`
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Secondary Connection String for the Authorization Rule.
SecondaryConnectionString *string `pulumi:"secondaryConnectionString"`
// The alias of the Secondary Connection String for the Authorization Rule, which is generated when disaster recovery is enabled.
SecondaryConnectionStringAlias *string `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the Authorization Rule.
SecondaryKey *string `pulumi:"secondaryKey"`
// Grants send access to this this Authorization Rule. Defaults to `false`.
Send *bool `pulumi:"send"`
}
type EventHubNamespaceAuthorizationRuleState struct {
// Grants listen access to this this Authorization Rule. Defaults to `false`.
Listen pulumi.BoolPtrInput
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName pulumi.StringPtrInput
// The Primary Connection String for the Authorization Rule.
PrimaryConnectionString pulumi.StringPtrInput
// The alias of the Primary Connection String for the Authorization Rule, which is generated when disaster recovery is enabled.
PrimaryConnectionStringAlias pulumi.StringPtrInput
// The Primary Key for the Authorization Rule.
PrimaryKey pulumi.StringPtrInput
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
ResourceGroupName pulumi.StringPtrInput
// The Secondary Connection String for the Authorization Rule.
SecondaryConnectionString pulumi.StringPtrInput
// The alias of the Secondary Connection String for the Authorization Rule, which is generated when disaster recovery is enabled.
SecondaryConnectionStringAlias pulumi.StringPtrInput
// The Secondary Key for the Authorization Rule.
SecondaryKey pulumi.StringPtrInput
// Grants send access to this this Authorization Rule. Defaults to `false`.
Send pulumi.BoolPtrInput
}
func (EventHubNamespaceAuthorizationRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*eventHubNamespaceAuthorizationRuleState)(nil)).Elem()
}
type eventHubNamespaceAuthorizationRuleArgs struct {
// Grants listen access to this this Authorization Rule. Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName string `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Grants send access to this this Authorization Rule. Defaults to `false`.
Send *bool `pulumi:"send"`
}
// The set of arguments for constructing a EventHubNamespaceAuthorizationRule resource.
type EventHubNamespaceAuthorizationRuleArgs struct {
// Grants listen access to this this Authorization Rule. Defaults to `false`.
Listen pulumi.BoolPtrInput
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName pulumi.StringInput
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
ResourceGroupName pulumi.StringInput
// Grants send access to this this Authorization Rule. Defaults to `false`.
Send pulumi.BoolPtrInput
}
func (EventHubNamespaceAuthorizationRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*eventHubNamespaceAuthorizationRuleArgs)(nil)).Elem()
}
type EventHubNamespaceAuthorizationRuleInput interface {
pulumi.Input
ToEventHubNamespaceAuthorizationRuleOutput() EventHubNamespaceAuthorizationRuleOutput
ToEventHubNamespaceAuthorizationRuleOutputWithContext(ctx context.Context) EventHubNamespaceAuthorizationRuleOutput
}
func (*EventHubNamespaceAuthorizationRule) ElementType() reflect.Type {
return reflect.TypeOf((**EventHubNamespaceAuthorizationRule)(nil)).Elem()
}
func (i *EventHubNamespaceAuthorizationRule) ToEventHubNamespaceAuthorizationRuleOutput() EventHubNamespaceAuthorizationRuleOutput {
return i.ToEventHubNamespaceAuthorizationRuleOutputWithContext(context.Background())
}
func (i *EventHubNamespaceAuthorizationRule) ToEventHubNamespaceAuthorizationRuleOutputWithContext(ctx context.Context) EventHubNamespaceAuthorizationRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventHubNamespaceAuthorizationRuleOutput)
}
// EventHubNamespaceAuthorizationRuleArrayInput is an input type that accepts EventHubNamespaceAuthorizationRuleArray and EventHubNamespaceAuthorizationRuleArrayOutput values.
// You can construct a concrete instance of `EventHubNamespaceAuthorizationRuleArrayInput` via:
//
// EventHubNamespaceAuthorizationRuleArray{ EventHubNamespaceAuthorizationRuleArgs{...} }
type EventHubNamespaceAuthorizationRuleArrayInput interface {
pulumi.Input
ToEventHubNamespaceAuthorizationRuleArrayOutput() EventHubNamespaceAuthorizationRuleArrayOutput
ToEventHubNamespaceAuthorizationRuleArrayOutputWithContext(context.Context) EventHubNamespaceAuthorizationRuleArrayOutput
}
type EventHubNamespaceAuthorizationRuleArray []EventHubNamespaceAuthorizationRuleInput
func (EventHubNamespaceAuthorizationRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventHubNamespaceAuthorizationRule)(nil)).Elem()
}
func (i EventHubNamespaceAuthorizationRuleArray) ToEventHubNamespaceAuthorizationRuleArrayOutput() EventHubNamespaceAuthorizationRuleArrayOutput {
return i.ToEventHubNamespaceAuthorizationRuleArrayOutputWithContext(context.Background())
}
func (i EventHubNamespaceAuthorizationRuleArray) ToEventHubNamespaceAuthorizationRuleArrayOutputWithContext(ctx context.Context) EventHubNamespaceAuthorizationRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventHubNamespaceAuthorizationRuleArrayOutput)
}
// EventHubNamespaceAuthorizationRuleMapInput is an input type that accepts EventHubNamespaceAuthorizationRuleMap and EventHubNamespaceAuthorizationRuleMapOutput values.
// You can construct a concrete instance of `EventHubNamespaceAuthorizationRuleMapInput` via:
//
// EventHubNamespaceAuthorizationRuleMap{ "key": EventHubNamespaceAuthorizationRuleArgs{...} }
type EventHubNamespaceAuthorizationRuleMapInput interface {
pulumi.Input
ToEventHubNamespaceAuthorizationRuleMapOutput() EventHubNamespaceAuthorizationRuleMapOutput
ToEventHubNamespaceAuthorizationRuleMapOutputWithContext(context.Context) EventHubNamespaceAuthorizationRuleMapOutput
}
type EventHubNamespaceAuthorizationRuleMap map[string]EventHubNamespaceAuthorizationRuleInput
func (EventHubNamespaceAuthorizationRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventHubNamespaceAuthorizationRule)(nil)).Elem()
}
func (i EventHubNamespaceAuthorizationRuleMap) ToEventHubNamespaceAuthorizationRuleMapOutput() EventHubNamespaceAuthorizationRuleMapOutput {
return i.ToEventHubNamespaceAuthorizationRuleMapOutputWithContext(context.Background())
}
func (i EventHubNamespaceAuthorizationRuleMap) ToEventHubNamespaceAuthorizationRuleMapOutputWithContext(ctx context.Context) EventHubNamespaceAuthorizationRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventHubNamespaceAuthorizationRuleMapOutput)
}
type EventHubNamespaceAuthorizationRuleOutput struct{ *pulumi.OutputState }
func (EventHubNamespaceAuthorizationRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EventHubNamespaceAuthorizationRule)(nil)).Elem()
}
func (o EventHubNamespaceAuthorizationRuleOutput) ToEventHubNamespaceAuthorizationRuleOutput() EventHubNamespaceAuthorizationRuleOutput {
return o
}
func (o EventHubNamespaceAuthorizationRuleOutput) ToEventHubNamespaceAuthorizationRuleOutputWithContext(ctx context.Context) EventHubNamespaceAuthorizationRuleOutput {
return o
}
// Grants listen access to this this Authorization Rule. Defaults to `false`.
func (o EventHubNamespaceAuthorizationRuleOutput) Listen() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EventHubNamespaceAuthorizationRule) pulumi.BoolPtrOutput { return v.Listen }).(pulumi.BoolPtrOutput)
}
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
func (o EventHubNamespaceAuthorizationRuleOutput) Manage() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EventHubNamespaceAuthorizationRule) pulumi.BoolPtrOutput { return v.Manage }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
func (o EventHubNamespaceAuthorizationRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespaceAuthorizationRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the name of the EventHub Namespace. Changing this forces a new resource to be created.
func (o EventHubNamespaceAuthorizationRuleOutput) NamespaceName() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespaceAuthorizationRule) pulumi.StringOutput { return v.NamespaceName }).(pulumi.StringOutput)
}
// The Primary Connection String for the Authorization Rule.
func (o EventHubNamespaceAuthorizationRuleOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespaceAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the Primary Connection String for the Authorization Rule, which is generated when disaster recovery is enabled.
func (o EventHubNamespaceAuthorizationRuleOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespaceAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Primary Key for the Authorization Rule.
func (o EventHubNamespaceAuthorizationRuleOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespaceAuthorizationRule) pulumi.StringOutput { return v.PrimaryKey }).(pulumi.StringOutput)
}
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
func (o EventHubNamespaceAuthorizationRuleOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespaceAuthorizationRule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Secondary Connection String for the Authorization Rule.
func (o EventHubNamespaceAuthorizationRuleOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespaceAuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the Secondary Connection String for the Authorization Rule, which is generated when disaster recovery is enabled.
func (o EventHubNamespaceAuthorizationRuleOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespaceAuthorizationRule) pulumi.StringOutput {
return v.SecondaryConnectionStringAlias
}).(pulumi.StringOutput)
}
// The Secondary Key for the Authorization Rule.
func (o EventHubNamespaceAuthorizationRuleOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespaceAuthorizationRule) pulumi.StringOutput { return v.SecondaryKey }).(pulumi.StringOutput)
}
// Grants send access to this this Authorization Rule. Defaults to `false`.
func (o EventHubNamespaceAuthorizationRuleOutput) Send() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EventHubNamespaceAuthorizationRule) pulumi.BoolPtrOutput { return v.Send }).(pulumi.BoolPtrOutput)
}
type EventHubNamespaceAuthorizationRuleArrayOutput struct{ *pulumi.OutputState }
func (EventHubNamespaceAuthorizationRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventHubNamespaceAuthorizationRule)(nil)).Elem()
}
func (o EventHubNamespaceAuthorizationRuleArrayOutput) ToEventHubNamespaceAuthorizationRuleArrayOutput() EventHubNamespaceAuthorizationRuleArrayOutput {
return o
}
func (o EventHubNamespaceAuthorizationRuleArrayOutput) ToEventHubNamespaceAuthorizationRuleArrayOutputWithContext(ctx context.Context) EventHubNamespaceAuthorizationRuleArrayOutput {
return o
}
func (o EventHubNamespaceAuthorizationRuleArrayOutput) Index(i pulumi.IntInput) EventHubNamespaceAuthorizationRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EventHubNamespaceAuthorizationRule {
return vs[0].([]*EventHubNamespaceAuthorizationRule)[vs[1].(int)]
}).(EventHubNamespaceAuthorizationRuleOutput)
}
type EventHubNamespaceAuthorizationRuleMapOutput struct{ *pulumi.OutputState }
func (EventHubNamespaceAuthorizationRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventHubNamespaceAuthorizationRule)(nil)).Elem()
}
func (o EventHubNamespaceAuthorizationRuleMapOutput) ToEventHubNamespaceAuthorizationRuleMapOutput() EventHubNamespaceAuthorizationRuleMapOutput {
return o
}
func (o EventHubNamespaceAuthorizationRuleMapOutput) ToEventHubNamespaceAuthorizationRuleMapOutputWithContext(ctx context.Context) EventHubNamespaceAuthorizationRuleMapOutput {
return o
}
func (o EventHubNamespaceAuthorizationRuleMapOutput) MapIndex(k pulumi.StringInput) EventHubNamespaceAuthorizationRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EventHubNamespaceAuthorizationRule {
return vs[0].(map[string]*EventHubNamespaceAuthorizationRule)[vs[1].(string)]
}).(EventHubNamespaceAuthorizationRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EventHubNamespaceAuthorizationRuleInput)(nil)).Elem(), &EventHubNamespaceAuthorizationRule{})
pulumi.RegisterInputType(reflect.TypeOf((*EventHubNamespaceAuthorizationRuleArrayInput)(nil)).Elem(), EventHubNamespaceAuthorizationRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EventHubNamespaceAuthorizationRuleMapInput)(nil)).Elem(), EventHubNamespaceAuthorizationRuleMap{})
pulumi.RegisterOutputType(EventHubNamespaceAuthorizationRuleOutput{})
pulumi.RegisterOutputType(EventHubNamespaceAuthorizationRuleArrayOutput{})
pulumi.RegisterOutputType(EventHubNamespaceAuthorizationRuleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/getEventHub.go | sdk/go/azure/eventhub/getEventHub.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
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 EventHub.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := eventhub.LookupEventHub(ctx, &eventhub.LookupEventHubArgs{
// Name: "search-eventhub",
// ResourceGroupName: "search-service",
// NamespaceName: "search-eventhubns",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("eventhubId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.EventHub` - 2024-01-01
func LookupEventHub(ctx *pulumi.Context, args *LookupEventHubArgs, opts ...pulumi.InvokeOption) (*LookupEventHubResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupEventHubResult
err := ctx.Invoke("azure:eventhub/getEventHub:getEventHub", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getEventHub.
type LookupEventHubArgs struct {
// The name of this EventHub.
Name string `pulumi:"name"`
// The name of the EventHub Namespace where the EventHub exists.
NamespaceName string `pulumi:"namespaceName"`
// The name of the Resource Group where the EventHub exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getEventHub.
type LookupEventHubResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
NamespaceName string `pulumi:"namespaceName"`
// The number of partitions in the EventHub.
PartitionCount int `pulumi:"partitionCount"`
// The identifiers for the partitions of this EventHub.
PartitionIds []string `pulumi:"partitionIds"`
ResourceGroupName string `pulumi:"resourceGroupName"`
}
func LookupEventHubOutput(ctx *pulumi.Context, args LookupEventHubOutputArgs, opts ...pulumi.InvokeOption) LookupEventHubResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupEventHubResultOutput, error) {
args := v.(LookupEventHubArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:eventhub/getEventHub:getEventHub", args, LookupEventHubResultOutput{}, options).(LookupEventHubResultOutput), nil
}).(LookupEventHubResultOutput)
}
// A collection of arguments for invoking getEventHub.
type LookupEventHubOutputArgs struct {
// The name of this EventHub.
Name pulumi.StringInput `pulumi:"name"`
// The name of the EventHub Namespace where the EventHub exists.
NamespaceName pulumi.StringInput `pulumi:"namespaceName"`
// The name of the Resource Group where the EventHub exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupEventHubOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupEventHubArgs)(nil)).Elem()
}
// A collection of values returned by getEventHub.
type LookupEventHubResultOutput struct{ *pulumi.OutputState }
func (LookupEventHubResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupEventHubResult)(nil)).Elem()
}
func (o LookupEventHubResultOutput) ToLookupEventHubResultOutput() LookupEventHubResultOutput {
return o
}
func (o LookupEventHubResultOutput) ToLookupEventHubResultOutputWithContext(ctx context.Context) LookupEventHubResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupEventHubResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupEventHubResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupEventHubResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupEventHubResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupEventHubResultOutput) NamespaceName() pulumi.StringOutput {
return o.ApplyT(func(v LookupEventHubResult) string { return v.NamespaceName }).(pulumi.StringOutput)
}
// The number of partitions in the EventHub.
func (o LookupEventHubResultOutput) PartitionCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupEventHubResult) int { return v.PartitionCount }).(pulumi.IntOutput)
}
// The identifiers for the partitions of this EventHub.
func (o LookupEventHubResultOutput) PartitionIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupEventHubResult) []string { return v.PartitionIds }).(pulumi.StringArrayOutput)
}
func (o LookupEventHubResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupEventHubResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupEventHubResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/namespaceCustomerManagedKey.go | sdk/go/azure/eventhub/namespaceCustomerManagedKey.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Customer Managed Key for a EventHub Namespace.
//
// !> **Note:** In 2.x versions of the Azure Provider during deletion this resource will **delete and recreate the parent EventHub Namespace which may involve data loss** as it's not possible to remove the Customer Managed Key from the EventHub Namespace once it's been added. Version 3.0 of the Azure Provider will change this so that the Delete operation is a noop, requiring the parent EventHub Namespace is deleted/recreated to remove the Customer Managed Key.
//
// ## Example Usage
//
// ### With System Assigned Identity
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "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
// }
// exampleCluster, err := eventhub.NewCluster(ctx, "example", &eventhub.ClusterArgs{
// Name: pulumi.String("example-cluster"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SkuName: pulumi.String("Dedicated_1"),
// })
// if err != nil {
// return err
// }
// exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("example-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// DedicatedClusterId: exampleCluster.ID(),
// Identity: &eventhub.EventHubNamespaceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("examplekv"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("standard"),
// PurgeProtectionEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// exampleAccessPolicy, err := keyvault.NewAccessPolicy(ctx, "example", &keyvault.AccessPolicyArgs{
// KeyVaultId: exampleKeyVault.ID(),
// TenantId: pulumi.String(exampleEventHubNamespace.Identity.ApplyT(func(identity eventhub.EventHubNamespaceIdentity) (*string, error) {
// return &identity.TenantId, nil
// }).(pulumi.StringPtrOutput)),
// ObjectId: pulumi.String(exampleEventHubNamespace.Identity.ApplyT(func(identity eventhub.EventHubNamespaceIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("UnwrapKey"),
// pulumi.String("WrapKey"),
// },
// })
// if err != nil {
// return err
// }
// example2, err := keyvault.NewAccessPolicy(ctx, "example2", &keyvault.AccessPolicyArgs{
// KeyVaultId: exampleKeyVault.ID(),
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.String(current.ObjectId),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Create"),
// pulumi.String("Delete"),
// pulumi.String("Get"),
// pulumi.String("List"),
// pulumi.String("Purge"),
// pulumi.String("Recover"),
// pulumi.String("GetRotationPolicy"),
// },
// })
// if err != nil {
// return err
// }
// exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{
// Name: pulumi.String("examplekvkey"),
// 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{
// exampleAccessPolicy,
// example2,
// }))
// if err != nil {
// return err
// }
// _, err = eventhub.NewNamespaceCustomerManagedKey(ctx, "example", &eventhub.NamespaceCustomerManagedKeyArgs{
// EventhubNamespaceId: exampleEventHubNamespace.ID(),
// KeyVaultKeyIds: pulumi.StringArray{
// exampleKey.ID(),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### With User Assigned Identity
//
// ```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/eventhub"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleCluster, err := eventhub.NewCluster(ctx, "example", &eventhub.ClusterArgs{
// Name: pulumi.String("example-cluster"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SkuName: pulumi.String("Dedicated_1"),
// })
// if err != nil {
// return err
// }
// exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{
// Location: example.Location,
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("example-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// DedicatedClusterId: exampleCluster.ID(),
// Identity: &eventhub.EventHubNamespaceIdentityArgs{
// Type: pulumi.String("UserAssigned"),
// IdentityIds: pulumi.StringArray{
// exampleUserAssignedIdentity.ID(),
// },
// },
// })
// if err != nil {
// return err
// }
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("examplekv"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("standard"),
// PurgeProtectionEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// exampleAccessPolicy, err := keyvault.NewAccessPolicy(ctx, "example", &keyvault.AccessPolicyArgs{
// KeyVaultId: exampleKeyVault.ID(),
// TenantId: pulumi.Any(test.TenantId),
// ObjectId: pulumi.Any(test.PrincipalId),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("UnwrapKey"),
// pulumi.String("WrapKey"),
// },
// })
// if err != nil {
// return err
// }
// example2, err := keyvault.NewAccessPolicy(ctx, "example2", &keyvault.AccessPolicyArgs{
// KeyVaultId: exampleKeyVault.ID(),
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.String(current.ObjectId),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Create"),
// pulumi.String("Delete"),
// pulumi.String("Get"),
// pulumi.String("List"),
// pulumi.String("Purge"),
// pulumi.String("Recover"),
// pulumi.String("GetRotationPolicy"),
// },
// })
// if err != nil {
// return err
// }
// exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{
// Name: pulumi.String("examplekvkey"),
// 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{
// exampleAccessPolicy,
// example2,
// }))
// if err != nil {
// return err
// }
// _, err = eventhub.NewNamespaceCustomerManagedKey(ctx, "example", &eventhub.NamespaceCustomerManagedKeyArgs{
// EventhubNamespaceId: exampleEventHubNamespace.ID(),
// KeyVaultKeyIds: pulumi.StringArray{
// exampleKey.ID(),
// },
// UserAssignedIdentityId: exampleUserAssignedIdentity.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.EventHub` - 2024-01-01
//
// ## Import
//
// Customer Managed Keys for a EventHub Namespace can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/namespaceCustomerManagedKey:NamespaceCustomerManagedKey example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1
// ```
type NamespaceCustomerManagedKey struct {
pulumi.CustomResourceState
// The ID of the EventHub Namespace. Changing this forces a new resource to be created.
EventhubNamespaceId pulumi.StringOutput `pulumi:"eventhubNamespaceId"`
// Whether to enable Infrastructure Encryption (Double Encryption). Changing this forces a new resource to be created.
InfrastructureEncryptionEnabled pulumi.BoolPtrOutput `pulumi:"infrastructureEncryptionEnabled"`
// The list of keys of Key Vault.
KeyVaultKeyIds pulumi.StringArrayOutput `pulumi:"keyVaultKeyIds"`
// The ID of a User Managed Identity that will be used to access Key Vaults that contain the encryption keys.
//
// > **Note:** If using `userAssignedIdentityId`, ensure the User Assigned Identity is also assigned to the parent Event Hub.
//
// > **Note:** If using `userAssignedIdentityId`, make sure to assign the identity the appropriate permissions to access the Key Vault key. Failure to grant `Get, UnwrapKey, and WrapKey` will cause this resource to fail to apply.
UserAssignedIdentityId pulumi.StringPtrOutput `pulumi:"userAssignedIdentityId"`
}
// NewNamespaceCustomerManagedKey registers a new resource with the given unique name, arguments, and options.
func NewNamespaceCustomerManagedKey(ctx *pulumi.Context,
name string, args *NamespaceCustomerManagedKeyArgs, opts ...pulumi.ResourceOption) (*NamespaceCustomerManagedKey, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.EventhubNamespaceId == nil {
return nil, errors.New("invalid value for required argument 'EventhubNamespaceId'")
}
if args.KeyVaultKeyIds == nil {
return nil, errors.New("invalid value for required argument 'KeyVaultKeyIds'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource NamespaceCustomerManagedKey
err := ctx.RegisterResource("azure:eventhub/namespaceCustomerManagedKey:NamespaceCustomerManagedKey", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNamespaceCustomerManagedKey gets an existing NamespaceCustomerManagedKey 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 GetNamespaceCustomerManagedKey(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NamespaceCustomerManagedKeyState, opts ...pulumi.ResourceOption) (*NamespaceCustomerManagedKey, error) {
var resource NamespaceCustomerManagedKey
err := ctx.ReadResource("azure:eventhub/namespaceCustomerManagedKey:NamespaceCustomerManagedKey", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NamespaceCustomerManagedKey resources.
type namespaceCustomerManagedKeyState struct {
// The ID of the EventHub Namespace. Changing this forces a new resource to be created.
EventhubNamespaceId *string `pulumi:"eventhubNamespaceId"`
// Whether to enable Infrastructure Encryption (Double Encryption). Changing this forces a new resource to be created.
InfrastructureEncryptionEnabled *bool `pulumi:"infrastructureEncryptionEnabled"`
// The list of keys of Key Vault.
KeyVaultKeyIds []string `pulumi:"keyVaultKeyIds"`
// The ID of a User Managed Identity that will be used to access Key Vaults that contain the encryption keys.
//
// > **Note:** If using `userAssignedIdentityId`, ensure the User Assigned Identity is also assigned to the parent Event Hub.
//
// > **Note:** If using `userAssignedIdentityId`, make sure to assign the identity the appropriate permissions to access the Key Vault key. Failure to grant `Get, UnwrapKey, and WrapKey` will cause this resource to fail to apply.
UserAssignedIdentityId *string `pulumi:"userAssignedIdentityId"`
}
type NamespaceCustomerManagedKeyState struct {
// The ID of the EventHub Namespace. Changing this forces a new resource to be created.
EventhubNamespaceId pulumi.StringPtrInput
// Whether to enable Infrastructure Encryption (Double Encryption). Changing this forces a new resource to be created.
InfrastructureEncryptionEnabled pulumi.BoolPtrInput
// The list of keys of Key Vault.
KeyVaultKeyIds pulumi.StringArrayInput
// The ID of a User Managed Identity that will be used to access Key Vaults that contain the encryption keys.
//
// > **Note:** If using `userAssignedIdentityId`, ensure the User Assigned Identity is also assigned to the parent Event Hub.
//
// > **Note:** If using `userAssignedIdentityId`, make sure to assign the identity the appropriate permissions to access the Key Vault key. Failure to grant `Get, UnwrapKey, and WrapKey` will cause this resource to fail to apply.
UserAssignedIdentityId pulumi.StringPtrInput
}
func (NamespaceCustomerManagedKeyState) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceCustomerManagedKeyState)(nil)).Elem()
}
type namespaceCustomerManagedKeyArgs struct {
// The ID of the EventHub Namespace. Changing this forces a new resource to be created.
EventhubNamespaceId string `pulumi:"eventhubNamespaceId"`
// Whether to enable Infrastructure Encryption (Double Encryption). Changing this forces a new resource to be created.
InfrastructureEncryptionEnabled *bool `pulumi:"infrastructureEncryptionEnabled"`
// The list of keys of Key Vault.
KeyVaultKeyIds []string `pulumi:"keyVaultKeyIds"`
// The ID of a User Managed Identity that will be used to access Key Vaults that contain the encryption keys.
//
// > **Note:** If using `userAssignedIdentityId`, ensure the User Assigned Identity is also assigned to the parent Event Hub.
//
// > **Note:** If using `userAssignedIdentityId`, make sure to assign the identity the appropriate permissions to access the Key Vault key. Failure to grant `Get, UnwrapKey, and WrapKey` will cause this resource to fail to apply.
UserAssignedIdentityId *string `pulumi:"userAssignedIdentityId"`
}
// The set of arguments for constructing a NamespaceCustomerManagedKey resource.
type NamespaceCustomerManagedKeyArgs struct {
// The ID of the EventHub Namespace. Changing this forces a new resource to be created.
EventhubNamespaceId pulumi.StringInput
// Whether to enable Infrastructure Encryption (Double Encryption). Changing this forces a new resource to be created.
InfrastructureEncryptionEnabled pulumi.BoolPtrInput
// The list of keys of Key Vault.
KeyVaultKeyIds pulumi.StringArrayInput
// The ID of a User Managed Identity that will be used to access Key Vaults that contain the encryption keys.
//
// > **Note:** If using `userAssignedIdentityId`, ensure the User Assigned Identity is also assigned to the parent Event Hub.
//
// > **Note:** If using `userAssignedIdentityId`, make sure to assign the identity the appropriate permissions to access the Key Vault key. Failure to grant `Get, UnwrapKey, and WrapKey` will cause this resource to fail to apply.
UserAssignedIdentityId pulumi.StringPtrInput
}
func (NamespaceCustomerManagedKeyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceCustomerManagedKeyArgs)(nil)).Elem()
}
type NamespaceCustomerManagedKeyInput interface {
pulumi.Input
ToNamespaceCustomerManagedKeyOutput() NamespaceCustomerManagedKeyOutput
ToNamespaceCustomerManagedKeyOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyOutput
}
func (*NamespaceCustomerManagedKey) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceCustomerManagedKey)(nil)).Elem()
}
func (i *NamespaceCustomerManagedKey) ToNamespaceCustomerManagedKeyOutput() NamespaceCustomerManagedKeyOutput {
return i.ToNamespaceCustomerManagedKeyOutputWithContext(context.Background())
}
func (i *NamespaceCustomerManagedKey) ToNamespaceCustomerManagedKeyOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceCustomerManagedKeyOutput)
}
// NamespaceCustomerManagedKeyArrayInput is an input type that accepts NamespaceCustomerManagedKeyArray and NamespaceCustomerManagedKeyArrayOutput values.
// You can construct a concrete instance of `NamespaceCustomerManagedKeyArrayInput` via:
//
// NamespaceCustomerManagedKeyArray{ NamespaceCustomerManagedKeyArgs{...} }
type NamespaceCustomerManagedKeyArrayInput interface {
pulumi.Input
ToNamespaceCustomerManagedKeyArrayOutput() NamespaceCustomerManagedKeyArrayOutput
ToNamespaceCustomerManagedKeyArrayOutputWithContext(context.Context) NamespaceCustomerManagedKeyArrayOutput
}
type NamespaceCustomerManagedKeyArray []NamespaceCustomerManagedKeyInput
func (NamespaceCustomerManagedKeyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NamespaceCustomerManagedKey)(nil)).Elem()
}
func (i NamespaceCustomerManagedKeyArray) ToNamespaceCustomerManagedKeyArrayOutput() NamespaceCustomerManagedKeyArrayOutput {
return i.ToNamespaceCustomerManagedKeyArrayOutputWithContext(context.Background())
}
func (i NamespaceCustomerManagedKeyArray) ToNamespaceCustomerManagedKeyArrayOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceCustomerManagedKeyArrayOutput)
}
// NamespaceCustomerManagedKeyMapInput is an input type that accepts NamespaceCustomerManagedKeyMap and NamespaceCustomerManagedKeyMapOutput values.
// You can construct a concrete instance of `NamespaceCustomerManagedKeyMapInput` via:
//
// NamespaceCustomerManagedKeyMap{ "key": NamespaceCustomerManagedKeyArgs{...} }
type NamespaceCustomerManagedKeyMapInput interface {
pulumi.Input
ToNamespaceCustomerManagedKeyMapOutput() NamespaceCustomerManagedKeyMapOutput
ToNamespaceCustomerManagedKeyMapOutputWithContext(context.Context) NamespaceCustomerManagedKeyMapOutput
}
type NamespaceCustomerManagedKeyMap map[string]NamespaceCustomerManagedKeyInput
func (NamespaceCustomerManagedKeyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NamespaceCustomerManagedKey)(nil)).Elem()
}
func (i NamespaceCustomerManagedKeyMap) ToNamespaceCustomerManagedKeyMapOutput() NamespaceCustomerManagedKeyMapOutput {
return i.ToNamespaceCustomerManagedKeyMapOutputWithContext(context.Background())
}
func (i NamespaceCustomerManagedKeyMap) ToNamespaceCustomerManagedKeyMapOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceCustomerManagedKeyMapOutput)
}
type NamespaceCustomerManagedKeyOutput struct{ *pulumi.OutputState }
func (NamespaceCustomerManagedKeyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceCustomerManagedKey)(nil)).Elem()
}
func (o NamespaceCustomerManagedKeyOutput) ToNamespaceCustomerManagedKeyOutput() NamespaceCustomerManagedKeyOutput {
return o
}
func (o NamespaceCustomerManagedKeyOutput) ToNamespaceCustomerManagedKeyOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyOutput {
return o
}
// The ID of the EventHub Namespace. Changing this forces a new resource to be created.
func (o NamespaceCustomerManagedKeyOutput) EventhubNamespaceId() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceCustomerManagedKey) pulumi.StringOutput { return v.EventhubNamespaceId }).(pulumi.StringOutput)
}
// Whether to enable Infrastructure Encryption (Double Encryption). Changing this forces a new resource to be created.
func (o NamespaceCustomerManagedKeyOutput) InfrastructureEncryptionEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *NamespaceCustomerManagedKey) pulumi.BoolPtrOutput { return v.InfrastructureEncryptionEnabled }).(pulumi.BoolPtrOutput)
}
// The list of keys of Key Vault.
func (o NamespaceCustomerManagedKeyOutput) KeyVaultKeyIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *NamespaceCustomerManagedKey) pulumi.StringArrayOutput { return v.KeyVaultKeyIds }).(pulumi.StringArrayOutput)
}
// The ID of a User Managed Identity that will be used to access Key Vaults that contain the encryption keys.
//
// > **Note:** If using `userAssignedIdentityId`, ensure the User Assigned Identity is also assigned to the parent Event Hub.
//
// > **Note:** If using `userAssignedIdentityId`, make sure to assign the identity the appropriate permissions to access the Key Vault key. Failure to grant `Get, UnwrapKey, and WrapKey` will cause this resource to fail to apply.
func (o NamespaceCustomerManagedKeyOutput) UserAssignedIdentityId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NamespaceCustomerManagedKey) pulumi.StringPtrOutput { return v.UserAssignedIdentityId }).(pulumi.StringPtrOutput)
}
type NamespaceCustomerManagedKeyArrayOutput struct{ *pulumi.OutputState }
func (NamespaceCustomerManagedKeyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NamespaceCustomerManagedKey)(nil)).Elem()
}
func (o NamespaceCustomerManagedKeyArrayOutput) ToNamespaceCustomerManagedKeyArrayOutput() NamespaceCustomerManagedKeyArrayOutput {
return o
}
func (o NamespaceCustomerManagedKeyArrayOutput) ToNamespaceCustomerManagedKeyArrayOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyArrayOutput {
return o
}
func (o NamespaceCustomerManagedKeyArrayOutput) Index(i pulumi.IntInput) NamespaceCustomerManagedKeyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NamespaceCustomerManagedKey {
return vs[0].([]*NamespaceCustomerManagedKey)[vs[1].(int)]
}).(NamespaceCustomerManagedKeyOutput)
}
type NamespaceCustomerManagedKeyMapOutput struct{ *pulumi.OutputState }
func (NamespaceCustomerManagedKeyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NamespaceCustomerManagedKey)(nil)).Elem()
}
func (o NamespaceCustomerManagedKeyMapOutput) ToNamespaceCustomerManagedKeyMapOutput() NamespaceCustomerManagedKeyMapOutput {
return o
}
func (o NamespaceCustomerManagedKeyMapOutput) ToNamespaceCustomerManagedKeyMapOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyMapOutput {
return o
}
func (o NamespaceCustomerManagedKeyMapOutput) MapIndex(k pulumi.StringInput) NamespaceCustomerManagedKeyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NamespaceCustomerManagedKey {
return vs[0].(map[string]*NamespaceCustomerManagedKey)[vs[1].(string)]
}).(NamespaceCustomerManagedKeyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceCustomerManagedKeyInput)(nil)).Elem(), &NamespaceCustomerManagedKey{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceCustomerManagedKeyArrayInput)(nil)).Elem(), NamespaceCustomerManagedKeyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceCustomerManagedKeyMapInput)(nil)).Elem(), NamespaceCustomerManagedKeyMap{})
pulumi.RegisterOutputType(NamespaceCustomerManagedKeyOutput{})
pulumi.RegisterOutputType(NamespaceCustomerManagedKeyArrayOutput{})
pulumi.RegisterOutputType(NamespaceCustomerManagedKeyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/getAuthorizationRule.go | sdk/go/azure/eventhub/getAuthorizationRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
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 Event Hubs Authorization Rule within an Event Hub.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := eventhub.LookupAuthorizationRule(ctx, &eventhub.LookupAuthorizationRuleArgs{
// Name: "test",
// NamespaceName: testAzurermEventhubNamespace.Name,
// EventhubName: testAzurermEventhub.Name,
// ResourceGroupName: testAzurermResourceGroup.Name,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.EventHub` - 2024-01-01
func LookupAuthorizationRule(ctx *pulumi.Context, args *LookupAuthorizationRuleArgs, opts ...pulumi.InvokeOption) (*LookupAuthorizationRuleResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAuthorizationRuleResult
err := ctx.Invoke("azure:eventhub/getAuthorizationRule:getAuthorizationRule", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAuthorizationRule.
type LookupAuthorizationRuleArgs struct {
// Specifies the name of the EventHub.
EventhubName string `pulumi:"eventhubName"`
Listen *bool `pulumi:"listen"`
Manage *bool `pulumi:"manage"`
// Specifies the name of the EventHub Authorization Rule resource. be created.
Name string `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace.
NamespaceName string `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Authorization Rule's grandparent Namespace exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
Send *bool `pulumi:"send"`
}
// A collection of values returned by getAuthorizationRule.
type LookupAuthorizationRuleResult struct {
EventhubName string `pulumi:"eventhubName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Listen *bool `pulumi:"listen"`
Manage *bool `pulumi:"manage"`
Name string `pulumi:"name"`
NamespaceName string `pulumi:"namespaceName"`
// The Primary Connection String for the Event Hubs Authorization Rule.
PrimaryConnectionString string `pulumi:"primaryConnectionString"`
// The alias of the Primary Connection String for the Event Hubs Authorization Rule.
PrimaryConnectionStringAlias string `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the Event Hubs Authorization Rule.
PrimaryKey string `pulumi:"primaryKey"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Secondary Connection String for the Event Hubs Authorization Rule.
SecondaryConnectionString string `pulumi:"secondaryConnectionString"`
// The alias of the Secondary Connection String for the Event Hubs Authorization Rule.
SecondaryConnectionStringAlias string `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the Event Hubs Authorization Rule.
SecondaryKey string `pulumi:"secondaryKey"`
Send *bool `pulumi:"send"`
}
func LookupAuthorizationRuleOutput(ctx *pulumi.Context, args LookupAuthorizationRuleOutputArgs, opts ...pulumi.InvokeOption) LookupAuthorizationRuleResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupAuthorizationRuleResultOutput, error) {
args := v.(LookupAuthorizationRuleArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:eventhub/getAuthorizationRule:getAuthorizationRule", args, LookupAuthorizationRuleResultOutput{}, options).(LookupAuthorizationRuleResultOutput), nil
}).(LookupAuthorizationRuleResultOutput)
}
// A collection of arguments for invoking getAuthorizationRule.
type LookupAuthorizationRuleOutputArgs struct {
// Specifies the name of the EventHub.
EventhubName pulumi.StringInput `pulumi:"eventhubName"`
Listen pulumi.BoolPtrInput `pulumi:"listen"`
Manage pulumi.BoolPtrInput `pulumi:"manage"`
// Specifies the name of the EventHub Authorization Rule resource. be created.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace.
NamespaceName pulumi.StringInput `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Authorization Rule's grandparent Namespace exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
Send pulumi.BoolPtrInput `pulumi:"send"`
}
func (LookupAuthorizationRuleOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAuthorizationRuleArgs)(nil)).Elem()
}
// A collection of values returned by getAuthorizationRule.
type LookupAuthorizationRuleResultOutput struct{ *pulumi.OutputState }
func (LookupAuthorizationRuleResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAuthorizationRuleResult)(nil)).Elem()
}
func (o LookupAuthorizationRuleResultOutput) ToLookupAuthorizationRuleResultOutput() LookupAuthorizationRuleResultOutput {
return o
}
func (o LookupAuthorizationRuleResultOutput) ToLookupAuthorizationRuleResultOutputWithContext(ctx context.Context) LookupAuthorizationRuleResultOutput {
return o
}
func (o LookupAuthorizationRuleResultOutput) EventhubName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuthorizationRuleResult) string { return v.EventhubName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupAuthorizationRuleResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuthorizationRuleResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupAuthorizationRuleResultOutput) Listen() pulumi.BoolPtrOutput {
return o.ApplyT(func(v LookupAuthorizationRuleResult) *bool { return v.Listen }).(pulumi.BoolPtrOutput)
}
func (o LookupAuthorizationRuleResultOutput) Manage() pulumi.BoolPtrOutput {
return o.ApplyT(func(v LookupAuthorizationRuleResult) *bool { return v.Manage }).(pulumi.BoolPtrOutput)
}
func (o LookupAuthorizationRuleResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuthorizationRuleResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupAuthorizationRuleResultOutput) NamespaceName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuthorizationRuleResult) string { return v.NamespaceName }).(pulumi.StringOutput)
}
// The Primary Connection String for the Event Hubs Authorization Rule.
func (o LookupAuthorizationRuleResultOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuthorizationRuleResult) string { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the Primary Connection String for the Event Hubs Authorization Rule.
func (o LookupAuthorizationRuleResultOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuthorizationRuleResult) string { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Primary Key for the Event Hubs Authorization Rule.
func (o LookupAuthorizationRuleResultOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuthorizationRuleResult) string { return v.PrimaryKey }).(pulumi.StringOutput)
}
func (o LookupAuthorizationRuleResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuthorizationRuleResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Secondary Connection String for the Event Hubs Authorization Rule.
func (o LookupAuthorizationRuleResultOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuthorizationRuleResult) string { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the Secondary Connection String for the Event Hubs Authorization Rule.
func (o LookupAuthorizationRuleResultOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuthorizationRuleResult) string { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Secondary Key for the Event Hubs Authorization Rule.
func (o LookupAuthorizationRuleResultOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuthorizationRuleResult) string { return v.SecondaryKey }).(pulumi.StringOutput)
}
func (o LookupAuthorizationRuleResultOutput) Send() pulumi.BoolPtrOutput {
return o.ApplyT(func(v LookupAuthorizationRuleResult) *bool { return v.Send }).(pulumi.BoolPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAuthorizationRuleResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/cluster.go | sdk/go/azure/eventhub/cluster.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an EventHub Cluster
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "github.com/pulumi/pulumi/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 = eventhub.NewCluster(ctx, "test", &eventhub.ClusterArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SkuName: pulumi.String("Dedicated_1"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.EventHub` - 2024-01-01
//
// ## Import
//
// EventHub Cluster's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/cluster:Cluster cluster1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/clusters/cluster1
// ```
type Cluster 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 EventHub Cluster resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group in which the EventHub Cluster exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The SKU name of the EventHub Cluster. The only supported value at this time is `Dedicated_1`.
SkuName pulumi.StringOutput `pulumi:"skuName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewCluster registers a new resource with the given unique name, arguments, and options.
func NewCluster(ctx *pulumi.Context,
name string, args *ClusterArgs, opts ...pulumi.ResourceOption) (*Cluster, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SkuName == nil {
return nil, errors.New("invalid value for required argument 'SkuName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Cluster
err := ctx.RegisterResource("azure:eventhub/cluster:Cluster", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCluster gets an existing Cluster 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 GetCluster(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ClusterState, opts ...pulumi.ResourceOption) (*Cluster, error) {
var resource Cluster
err := ctx.ReadResource("azure:eventhub/cluster:Cluster", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Cluster resources.
type clusterState 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 EventHub Cluster resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the EventHub Cluster exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The SKU name of the EventHub Cluster. The only supported value at this time is `Dedicated_1`.
SkuName *string `pulumi:"skuName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type ClusterState 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 EventHub Cluster resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the EventHub Cluster exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The SKU name of the EventHub Cluster. The only supported value at this time is `Dedicated_1`.
SkuName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (ClusterState) ElementType() reflect.Type {
return reflect.TypeOf((*clusterState)(nil)).Elem()
}
type clusterArgs 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 EventHub Cluster resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which the EventHub Cluster exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The SKU name of the EventHub Cluster. The only supported value at this time is `Dedicated_1`.
SkuName string `pulumi:"skuName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Cluster resource.
type ClusterArgs 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 EventHub Cluster resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the EventHub Cluster exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The SKU name of the EventHub Cluster. The only supported value at this time is `Dedicated_1`.
SkuName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (ClusterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*clusterArgs)(nil)).Elem()
}
type ClusterInput interface {
pulumi.Input
ToClusterOutput() ClusterOutput
ToClusterOutputWithContext(ctx context.Context) ClusterOutput
}
func (*Cluster) ElementType() reflect.Type {
return reflect.TypeOf((**Cluster)(nil)).Elem()
}
func (i *Cluster) ToClusterOutput() ClusterOutput {
return i.ToClusterOutputWithContext(context.Background())
}
func (i *Cluster) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterOutput)
}
// ClusterArrayInput is an input type that accepts ClusterArray and ClusterArrayOutput values.
// You can construct a concrete instance of `ClusterArrayInput` via:
//
// ClusterArray{ ClusterArgs{...} }
type ClusterArrayInput interface {
pulumi.Input
ToClusterArrayOutput() ClusterArrayOutput
ToClusterArrayOutputWithContext(context.Context) ClusterArrayOutput
}
type ClusterArray []ClusterInput
func (ClusterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
}
func (i ClusterArray) ToClusterArrayOutput() ClusterArrayOutput {
return i.ToClusterArrayOutputWithContext(context.Background())
}
func (i ClusterArray) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterArrayOutput)
}
// ClusterMapInput is an input type that accepts ClusterMap and ClusterMapOutput values.
// You can construct a concrete instance of `ClusterMapInput` via:
//
// ClusterMap{ "key": ClusterArgs{...} }
type ClusterMapInput interface {
pulumi.Input
ToClusterMapOutput() ClusterMapOutput
ToClusterMapOutputWithContext(context.Context) ClusterMapOutput
}
type ClusterMap map[string]ClusterInput
func (ClusterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
}
func (i ClusterMap) ToClusterMapOutput() ClusterMapOutput {
return i.ToClusterMapOutputWithContext(context.Background())
}
func (i ClusterMap) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterMapOutput)
}
type ClusterOutput struct{ *pulumi.OutputState }
func (ClusterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Cluster)(nil)).Elem()
}
func (o ClusterOutput) ToClusterOutput() ClusterOutput {
return o
}
func (o ClusterOutput) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
return o
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ClusterOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the EventHub Cluster resource. Changing this forces a new resource to be created.
func (o ClusterOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which the EventHub Cluster exists. Changing this forces a new resource to be created.
func (o ClusterOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The SKU name of the EventHub Cluster. The only supported value at this time is `Dedicated_1`.
func (o ClusterOutput) SkuName() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.SkuName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o ClusterOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ClusterArrayOutput struct{ *pulumi.OutputState }
func (ClusterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
}
func (o ClusterArrayOutput) ToClusterArrayOutput() ClusterArrayOutput {
return o
}
func (o ClusterArrayOutput) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
return o
}
func (o ClusterArrayOutput) Index(i pulumi.IntInput) ClusterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Cluster {
return vs[0].([]*Cluster)[vs[1].(int)]
}).(ClusterOutput)
}
type ClusterMapOutput struct{ *pulumi.OutputState }
func (ClusterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
}
func (o ClusterMapOutput) ToClusterMapOutput() ClusterMapOutput {
return o
}
func (o ClusterMapOutput) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
return o
}
func (o ClusterMapOutput) MapIndex(k pulumi.StringInput) ClusterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Cluster {
return vs[0].(map[string]*Cluster)[vs[1].(string)]
}).(ClusterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ClusterInput)(nil)).Elem(), &Cluster{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterArrayInput)(nil)).Elem(), ClusterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterMapInput)(nil)).Elem(), ClusterMap{})
pulumi.RegisterOutputType(ClusterOutput{})
pulumi.RegisterOutputType(ClusterArrayOutput{})
pulumi.RegisterOutputType(ClusterMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/namespace.go | sdk/go/azure/eventhub/namespace.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a ServiceBus Namespace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/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("my-servicebus"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": 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.ServiceBus` - 2024-01-01
//
// ## Import
//
// Service Bus Namespace can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/namespace:Namespace example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1
// ```
//
// Deprecated: azure.eventhub.Namespace has been deprecated in favor of azure.servicebus.Namespace
type Namespace struct {
pulumi.CustomResourceState
// Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4`, `8` or `16`. When `sku` is `Basic` or `Standard`, capacity can be `0` only.
Capacity pulumi.IntPtrOutput `pulumi:"capacity"`
// An `customerManagedKey` block as defined below.
CustomerManagedKey NamespaceCustomerManagedKeyTypePtrOutput `pulumi:"customerManagedKey"`
// The primary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryConnectionString pulumi.StringOutput `pulumi:"defaultPrimaryConnectionString"`
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey pulumi.StringOutput `pulumi:"defaultPrimaryKey"`
// The secondary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryConnectionString pulumi.StringOutput `pulumi:"defaultSecondaryConnectionString"`
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey pulumi.StringOutput `pulumi:"defaultSecondaryKey"`
// The URL to access the Service Bus Namespace.
Endpoint pulumi.StringOutput `pulumi:"endpoint"`
// An `identity` block as defined below.
Identity NamespaceIdentityPtrOutput `pulumi:"identity"`
// Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrOutput `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
MinimumTlsVersion pulumi.StringPtrOutput `pulumi:"minimumTlsVersion"`
// Specifies the name of the Service Bus Namespace resource . Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// An `networkRuleSet` block as defined below.
NetworkRuleSet NamespaceNetworkRuleSetOutput `pulumi:"networkRuleSet"`
// Specifies the number messaging partitions. Only valid when `sku` is `Premium` and the minimum number is `1`. Possible values include `0`, `1`, `2`, and `4`. Defaults to `0` for Standard, Basic namespace. Changing this forces a new resource to be created.
//
// > **Note:** It's not possible to change the partitioning option on any existing namespace. The number of partitions can only be set during namespace creation. Please check the doc https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-partitions-premium for more feature restrictions.
PremiumMessagingPartitions pulumi.IntPtrOutput `pulumi:"premiumMessagingPartitions"`
// Is public network access enabled for the Service Bus Namespace? Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to Changing this forces a new resource to be created.
// create the namespace.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Defines which tier to use. Options are `Basic`, `Standard` or `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
Sku pulumi.StringOutput `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewNamespace registers a new resource with the given unique name, arguments, and options.
func NewNamespace(ctx *pulumi.Context,
name string, args *NamespaceArgs, opts ...pulumi.ResourceOption) (*Namespace, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.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{
"defaultPrimaryConnectionString",
"defaultPrimaryKey",
"defaultSecondaryConnectionString",
"defaultSecondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Namespace
err := ctx.RegisterResource("azure:eventhub/namespace:Namespace", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNamespace gets an existing Namespace resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetNamespace(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NamespaceState, opts ...pulumi.ResourceOption) (*Namespace, error) {
var resource Namespace
err := ctx.ReadResource("azure:eventhub/namespace:Namespace", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Namespace resources.
type namespaceState struct {
// Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4`, `8` or `16`. When `sku` is `Basic` or `Standard`, capacity can be `0` only.
Capacity *int `pulumi:"capacity"`
// An `customerManagedKey` block as defined below.
CustomerManagedKey *NamespaceCustomerManagedKeyType `pulumi:"customerManagedKey"`
// The primary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryConnectionString *string `pulumi:"defaultPrimaryConnectionString"`
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey *string `pulumi:"defaultPrimaryKey"`
// The secondary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryConnectionString *string `pulumi:"defaultSecondaryConnectionString"`
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey *string `pulumi:"defaultSecondaryKey"`
// The URL to access the Service Bus Namespace.
Endpoint *string `pulumi:"endpoint"`
// An `identity` block as defined below.
Identity *NamespaceIdentity `pulumi:"identity"`
// Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults to `true`.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
MinimumTlsVersion *string `pulumi:"minimumTlsVersion"`
// Specifies the name of the Service Bus Namespace resource . Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// An `networkRuleSet` block as defined below.
NetworkRuleSet *NamespaceNetworkRuleSet `pulumi:"networkRuleSet"`
// Specifies the number messaging partitions. Only valid when `sku` is `Premium` and the minimum number is `1`. Possible values include `0`, `1`, `2`, and `4`. Defaults to `0` for Standard, Basic namespace. Changing this forces a new resource to be created.
//
// > **Note:** It's not possible to change the partitioning option on any existing namespace. The number of partitions can only be set during namespace creation. Please check the doc https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-partitions-premium for more feature restrictions.
PremiumMessagingPartitions *int `pulumi:"premiumMessagingPartitions"`
// Is public network access enabled for the Service Bus Namespace? Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to Changing this forces a new resource to be created.
// create the namespace.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Defines which tier to use. Options are `Basic`, `Standard` or `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
Sku *string `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type NamespaceState struct {
// Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4`, `8` or `16`. When `sku` is `Basic` or `Standard`, capacity can be `0` only.
Capacity pulumi.IntPtrInput
// An `customerManagedKey` block as defined below.
CustomerManagedKey NamespaceCustomerManagedKeyTypePtrInput
// The primary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryConnectionString pulumi.StringPtrInput
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey pulumi.StringPtrInput
// The secondary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryConnectionString pulumi.StringPtrInput
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey pulumi.StringPtrInput
// The URL to access the Service Bus Namespace.
Endpoint pulumi.StringPtrInput
// An `identity` block as defined below.
Identity NamespaceIdentityPtrInput
// Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
MinimumTlsVersion pulumi.StringPtrInput
// Specifies the name of the Service Bus Namespace resource . Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// An `networkRuleSet` block as defined below.
NetworkRuleSet NamespaceNetworkRuleSetPtrInput
// Specifies the number messaging partitions. Only valid when `sku` is `Premium` and the minimum number is `1`. Possible values include `0`, `1`, `2`, and `4`. Defaults to `0` for Standard, Basic namespace. Changing this forces a new resource to be created.
//
// > **Note:** It's not possible to change the partitioning option on any existing namespace. The number of partitions can only be set during namespace creation. Please check the doc https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-partitions-premium for more feature restrictions.
PremiumMessagingPartitions pulumi.IntPtrInput
// Is public network access enabled for the Service Bus Namespace? Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to Changing this forces a new resource to be created.
// create the namespace.
ResourceGroupName pulumi.StringPtrInput
// Defines which tier to use. Options are `Basic`, `Standard` or `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
Sku pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (NamespaceState) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceState)(nil)).Elem()
}
type namespaceArgs struct {
// Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4`, `8` or `16`. When `sku` is `Basic` or `Standard`, capacity can be `0` only.
Capacity *int `pulumi:"capacity"`
// An `customerManagedKey` block as defined below.
CustomerManagedKey *NamespaceCustomerManagedKeyType `pulumi:"customerManagedKey"`
// An `identity` block as defined below.
Identity *NamespaceIdentity `pulumi:"identity"`
// Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults to `true`.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
MinimumTlsVersion *string `pulumi:"minimumTlsVersion"`
// Specifies the name of the Service Bus Namespace resource . Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// An `networkRuleSet` block as defined below.
NetworkRuleSet *NamespaceNetworkRuleSet `pulumi:"networkRuleSet"`
// Specifies the number messaging partitions. Only valid when `sku` is `Premium` and the minimum number is `1`. Possible values include `0`, `1`, `2`, and `4`. Defaults to `0` for Standard, Basic namespace. Changing this forces a new resource to be created.
//
// > **Note:** It's not possible to change the partitioning option on any existing namespace. The number of partitions can only be set during namespace creation. Please check the doc https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-partitions-premium for more feature restrictions.
PremiumMessagingPartitions *int `pulumi:"premiumMessagingPartitions"`
// Is public network access enabled for the Service Bus Namespace? Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to Changing this forces a new resource to be created.
// create the namespace.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Defines which tier to use. Options are `Basic`, `Standard` or `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
Sku string `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Namespace resource.
type NamespaceArgs struct {
// Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4`, `8` or `16`. When `sku` is `Basic` or `Standard`, capacity can be `0` only.
Capacity pulumi.IntPtrInput
// An `customerManagedKey` block as defined below.
CustomerManagedKey NamespaceCustomerManagedKeyTypePtrInput
// An `identity` block as defined below.
Identity NamespaceIdentityPtrInput
// Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
MinimumTlsVersion pulumi.StringPtrInput
// Specifies the name of the Service Bus Namespace resource . Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// An `networkRuleSet` block as defined below.
NetworkRuleSet NamespaceNetworkRuleSetPtrInput
// Specifies the number messaging partitions. Only valid when `sku` is `Premium` and the minimum number is `1`. Possible values include `0`, `1`, `2`, and `4`. Defaults to `0` for Standard, Basic namespace. Changing this forces a new resource to be created.
//
// > **Note:** It's not possible to change the partitioning option on any existing namespace. The number of partitions can only be set during namespace creation. Please check the doc https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-partitions-premium for more feature restrictions.
PremiumMessagingPartitions pulumi.IntPtrInput
// Is public network access enabled for the Service Bus Namespace? Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to Changing this forces a new resource to be created.
// create the namespace.
ResourceGroupName pulumi.StringInput
// Defines which tier to use. Options are `Basic`, `Standard` or `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
Sku pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (NamespaceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceArgs)(nil)).Elem()
}
type NamespaceInput interface {
pulumi.Input
ToNamespaceOutput() NamespaceOutput
ToNamespaceOutputWithContext(ctx context.Context) NamespaceOutput
}
func (*Namespace) ElementType() reflect.Type {
return reflect.TypeOf((**Namespace)(nil)).Elem()
}
func (i *Namespace) ToNamespaceOutput() NamespaceOutput {
return i.ToNamespaceOutputWithContext(context.Background())
}
func (i *Namespace) ToNamespaceOutputWithContext(ctx context.Context) NamespaceOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceOutput)
}
// NamespaceArrayInput is an input type that accepts NamespaceArray and NamespaceArrayOutput values.
// You can construct a concrete instance of `NamespaceArrayInput` via:
//
// NamespaceArray{ NamespaceArgs{...} }
type NamespaceArrayInput interface {
pulumi.Input
ToNamespaceArrayOutput() NamespaceArrayOutput
ToNamespaceArrayOutputWithContext(context.Context) NamespaceArrayOutput
}
type NamespaceArray []NamespaceInput
func (NamespaceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Namespace)(nil)).Elem()
}
func (i NamespaceArray) ToNamespaceArrayOutput() NamespaceArrayOutput {
return i.ToNamespaceArrayOutputWithContext(context.Background())
}
func (i NamespaceArray) ToNamespaceArrayOutputWithContext(ctx context.Context) NamespaceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceArrayOutput)
}
// NamespaceMapInput is an input type that accepts NamespaceMap and NamespaceMapOutput values.
// You can construct a concrete instance of `NamespaceMapInput` via:
//
// NamespaceMap{ "key": NamespaceArgs{...} }
type NamespaceMapInput interface {
pulumi.Input
ToNamespaceMapOutput() NamespaceMapOutput
ToNamespaceMapOutputWithContext(context.Context) NamespaceMapOutput
}
type NamespaceMap map[string]NamespaceInput
func (NamespaceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Namespace)(nil)).Elem()
}
func (i NamespaceMap) ToNamespaceMapOutput() NamespaceMapOutput {
return i.ToNamespaceMapOutputWithContext(context.Background())
}
func (i NamespaceMap) ToNamespaceMapOutputWithContext(ctx context.Context) NamespaceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceMapOutput)
}
type NamespaceOutput struct{ *pulumi.OutputState }
func (NamespaceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Namespace)(nil)).Elem()
}
func (o NamespaceOutput) ToNamespaceOutput() NamespaceOutput {
return o
}
func (o NamespaceOutput) ToNamespaceOutputWithContext(ctx context.Context) NamespaceOutput {
return o
}
// Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4`, `8` or `16`. When `sku` is `Basic` or `Standard`, capacity can be `0` only.
func (o NamespaceOutput) Capacity() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Namespace) pulumi.IntPtrOutput { return v.Capacity }).(pulumi.IntPtrOutput)
}
// An `customerManagedKey` block as defined below.
func (o NamespaceOutput) CustomerManagedKey() NamespaceCustomerManagedKeyTypePtrOutput {
return o.ApplyT(func(v *Namespace) NamespaceCustomerManagedKeyTypePtrOutput { return v.CustomerManagedKey }).(NamespaceCustomerManagedKeyTypePtrOutput)
}
// The primary connection string for the authorization rule `RootManageSharedAccessKey`.
func (o NamespaceOutput) DefaultPrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.DefaultPrimaryConnectionString }).(pulumi.StringOutput)
}
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
func (o NamespaceOutput) DefaultPrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.DefaultPrimaryKey }).(pulumi.StringOutput)
}
// The secondary connection string for the authorization rule `RootManageSharedAccessKey`.
func (o NamespaceOutput) DefaultSecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.DefaultSecondaryConnectionString }).(pulumi.StringOutput)
}
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
func (o NamespaceOutput) DefaultSecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.DefaultSecondaryKey }).(pulumi.StringOutput)
}
// The URL to access the Service Bus Namespace.
func (o NamespaceOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o NamespaceOutput) Identity() NamespaceIdentityPtrOutput {
return o.ApplyT(func(v *Namespace) NamespaceIdentityPtrOutput { return v.Identity }).(NamespaceIdentityPtrOutput)
}
// Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults to `true`.
func (o NamespaceOutput) LocalAuthEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Namespace) pulumi.BoolPtrOutput { return v.LocalAuthEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o NamespaceOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
func (o NamespaceOutput) MinimumTlsVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringPtrOutput { return v.MinimumTlsVersion }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Service Bus Namespace resource . Changing this forces a new resource to be created.
func (o NamespaceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// An `networkRuleSet` block as defined below.
func (o NamespaceOutput) NetworkRuleSet() NamespaceNetworkRuleSetOutput {
return o.ApplyT(func(v *Namespace) NamespaceNetworkRuleSetOutput { return v.NetworkRuleSet }).(NamespaceNetworkRuleSetOutput)
}
// Specifies the number messaging partitions. Only valid when `sku` is `Premium` and the minimum number is `1`. Possible values include `0`, `1`, `2`, and `4`. Defaults to `0` for Standard, Basic namespace. Changing this forces a new resource to be created.
//
// > **Note:** It's not possible to change the partitioning option on any existing namespace. The number of partitions can only be set during namespace creation. Please check the doc https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-partitions-premium for more feature restrictions.
func (o NamespaceOutput) PremiumMessagingPartitions() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Namespace) pulumi.IntPtrOutput { return v.PremiumMessagingPartitions }).(pulumi.IntPtrOutput)
}
// Is public network access enabled for the Service Bus Namespace? Defaults to `true`.
func (o NamespaceOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Namespace) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the resource group in which to Changing this forces a new resource to be created.
// create the namespace.
func (o NamespaceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Defines which tier to use. Options are `Basic`, `Standard` or `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
func (o NamespaceOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.Sku }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o NamespaceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type NamespaceArrayOutput struct{ *pulumi.OutputState }
func (NamespaceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Namespace)(nil)).Elem()
}
func (o NamespaceArrayOutput) ToNamespaceArrayOutput() NamespaceArrayOutput {
return o
}
func (o NamespaceArrayOutput) ToNamespaceArrayOutputWithContext(ctx context.Context) NamespaceArrayOutput {
return o
}
func (o NamespaceArrayOutput) Index(i pulumi.IntInput) NamespaceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Namespace {
return vs[0].([]*Namespace)[vs[1].(int)]
}).(NamespaceOutput)
}
type NamespaceMapOutput struct{ *pulumi.OutputState }
func (NamespaceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Namespace)(nil)).Elem()
}
func (o NamespaceMapOutput) ToNamespaceMapOutput() NamespaceMapOutput {
return o
}
func (o NamespaceMapOutput) ToNamespaceMapOutputWithContext(ctx context.Context) NamespaceMapOutput {
return o
}
func (o NamespaceMapOutput) MapIndex(k pulumi.StringInput) NamespaceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Namespace {
return vs[0].(map[string]*Namespace)[vs[1].(string)]
}).(NamespaceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceInput)(nil)).Elem(), &Namespace{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceArrayInput)(nil)).Elem(), NamespaceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceMapInput)(nil)).Elem(), NamespaceMap{})
pulumi.RegisterOutputType(NamespaceOutput{})
pulumi.RegisterOutputType(NamespaceArrayOutput{})
pulumi.RegisterOutputType(NamespaceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/getServiceBusNamespace.go | sdk/go/azure/eventhub/getServiceBusNamespace.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
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 ServiceBus Namespace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := servicebus.LookupNamespace(ctx, &servicebus.LookupNamespaceArgs{
// Name: "examplenamespace",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("location", example.Location)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.ServiceBus` - 2024-01-01
//
// Deprecated: azure.eventhub.getServiceBusNamespace has been deprecated in favor of azure.servicebus.getNamespace
func GetServiceBusNamespace(ctx *pulumi.Context, args *GetServiceBusNamespaceArgs, opts ...pulumi.InvokeOption) (*GetServiceBusNamespaceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetServiceBusNamespaceResult
err := ctx.Invoke("azure:eventhub/getServiceBusNamespace:getServiceBusNamespace", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getServiceBusNamespace.
type GetServiceBusNamespaceArgs struct {
// Specifies the name of the ServiceBus Namespace.
Name string `pulumi:"name"`
// Specifies the name of the Resource Group where the ServiceBus Namespace exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getServiceBusNamespace.
type GetServiceBusNamespaceResult struct {
// The capacity of the ServiceBus Namespace.
Capacity int `pulumi:"capacity"`
// The primary connection string for the authorization
// rule `RootManageSharedAccessKey`.
DefaultPrimaryConnectionString string `pulumi:"defaultPrimaryConnectionString"`
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey string `pulumi:"defaultPrimaryKey"`
// The secondary connection string for the
// authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryConnectionString string `pulumi:"defaultSecondaryConnectionString"`
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey string `pulumi:"defaultSecondaryKey"`
// The URL to access the ServiceBus Namespace.
Endpoint string `pulumi:"endpoint"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The location of the Resource Group in which the ServiceBus Namespace exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// The messaging partitions of the ServiceBus Namespace.
PremiumMessagingPartitions int `pulumi:"premiumMessagingPartitions"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Tier used for the ServiceBus Namespace.
Sku string `pulumi:"sku"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
}
func GetServiceBusNamespaceOutput(ctx *pulumi.Context, args GetServiceBusNamespaceOutputArgs, opts ...pulumi.InvokeOption) GetServiceBusNamespaceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetServiceBusNamespaceResultOutput, error) {
args := v.(GetServiceBusNamespaceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:eventhub/getServiceBusNamespace:getServiceBusNamespace", args, GetServiceBusNamespaceResultOutput{}, options).(GetServiceBusNamespaceResultOutput), nil
}).(GetServiceBusNamespaceResultOutput)
}
// A collection of arguments for invoking getServiceBusNamespace.
type GetServiceBusNamespaceOutputArgs struct {
// Specifies the name of the ServiceBus Namespace.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the name of the Resource Group where the ServiceBus Namespace exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (GetServiceBusNamespaceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetServiceBusNamespaceArgs)(nil)).Elem()
}
// A collection of values returned by getServiceBusNamespace.
type GetServiceBusNamespaceResultOutput struct{ *pulumi.OutputState }
func (GetServiceBusNamespaceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetServiceBusNamespaceResult)(nil)).Elem()
}
func (o GetServiceBusNamespaceResultOutput) ToGetServiceBusNamespaceResultOutput() GetServiceBusNamespaceResultOutput {
return o
}
func (o GetServiceBusNamespaceResultOutput) ToGetServiceBusNamespaceResultOutputWithContext(ctx context.Context) GetServiceBusNamespaceResultOutput {
return o
}
// The capacity of the ServiceBus Namespace.
func (o GetServiceBusNamespaceResultOutput) Capacity() pulumi.IntOutput {
return o.ApplyT(func(v GetServiceBusNamespaceResult) int { return v.Capacity }).(pulumi.IntOutput)
}
// The primary connection string for the authorization
// rule `RootManageSharedAccessKey`.
func (o GetServiceBusNamespaceResultOutput) DefaultPrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceBusNamespaceResult) string { return v.DefaultPrimaryConnectionString }).(pulumi.StringOutput)
}
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
func (o GetServiceBusNamespaceResultOutput) DefaultPrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceBusNamespaceResult) string { return v.DefaultPrimaryKey }).(pulumi.StringOutput)
}
// The secondary connection string for the
// authorization rule `RootManageSharedAccessKey`.
func (o GetServiceBusNamespaceResultOutput) DefaultSecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceBusNamespaceResult) string { return v.DefaultSecondaryConnectionString }).(pulumi.StringOutput)
}
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
func (o GetServiceBusNamespaceResultOutput) DefaultSecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceBusNamespaceResult) string { return v.DefaultSecondaryKey }).(pulumi.StringOutput)
}
// The URL to access the ServiceBus Namespace.
func (o GetServiceBusNamespaceResultOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceBusNamespaceResult) string { return v.Endpoint }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetServiceBusNamespaceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceBusNamespaceResult) string { return v.Id }).(pulumi.StringOutput)
}
// The location of the Resource Group in which the ServiceBus Namespace exists.
func (o GetServiceBusNamespaceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceBusNamespaceResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o GetServiceBusNamespaceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceBusNamespaceResult) string { return v.Name }).(pulumi.StringOutput)
}
// The messaging partitions of the ServiceBus Namespace.
func (o GetServiceBusNamespaceResultOutput) PremiumMessagingPartitions() pulumi.IntOutput {
return o.ApplyT(func(v GetServiceBusNamespaceResult) int { return v.PremiumMessagingPartitions }).(pulumi.IntOutput)
}
func (o GetServiceBusNamespaceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceBusNamespaceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Tier used for the ServiceBus Namespace.
func (o GetServiceBusNamespaceResultOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v GetServiceBusNamespaceResult) string { return v.Sku }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the resource.
func (o GetServiceBusNamespaceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v GetServiceBusNamespaceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(GetServiceBusNamespaceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/eventHubNamespace.go | sdk/go/azure/eventhub/eventHubNamespace.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an EventHub Namespace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "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 = eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("example-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Capacity: pulumi.Int(2),
// 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.EventHub` - 2024-01-01
//
// ## Import
//
// EventHub Namespaces can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/eventHubNamespace:EventHubNamespace namespace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1
// ```
type EventHubNamespace struct {
pulumi.CustomResourceState
// Is Auto Inflate enabled for the EventHub Namespace?
AutoInflateEnabled pulumi.BoolPtrOutput `pulumi:"autoInflateEnabled"`
// Specifies the Capacity / Throughput Units for a `Standard` SKU namespace. Default capacity has a maximum of `2`, but can be increased in blocks of 2 on a committed purchase basis. Defaults to `1`.
Capacity pulumi.IntPtrOutput `pulumi:"capacity"`
// Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
DedicatedClusterId pulumi.StringPtrOutput `pulumi:"dedicatedClusterId"`
// The primary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryConnectionString pulumi.StringOutput `pulumi:"defaultPrimaryConnectionString"`
// The alias of the primary connection string for the authorization rule `RootManageSharedAccessKey`, which is generated when disaster recovery is enabled.
DefaultPrimaryConnectionStringAlias pulumi.StringOutput `pulumi:"defaultPrimaryConnectionStringAlias"`
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey pulumi.StringOutput `pulumi:"defaultPrimaryKey"`
// The secondary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryConnectionString pulumi.StringOutput `pulumi:"defaultSecondaryConnectionString"`
// The alias of the secondary connection string for the authorization rule `RootManageSharedAccessKey`, which is generated when disaster recovery is enabled.
DefaultSecondaryConnectionStringAlias pulumi.StringOutput `pulumi:"defaultSecondaryConnectionStringAlias"`
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey pulumi.StringOutput `pulumi:"defaultSecondaryKey"`
// An `identity` block as defined below.
Identity EventHubNamespaceIdentityPtrOutput `pulumi:"identity"`
// Is SAS authentication enabled for the EventHub Namespace? Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrOutput `pulumi:"localAuthenticationEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from `1` - `40`.
MaximumThroughputUnits pulumi.IntPtrOutput `pulumi:"maximumThroughputUnits"`
// The minimum supported TLS version for this EventHub Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
MinimumTlsVersion pulumi.StringPtrOutput `pulumi:"minimumTlsVersion"`
// Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkRulesets` block as defined below.
NetworkRulesets EventHubNamespaceNetworkRulesetsOutput `pulumi:"networkRulesets"`
// Is public network access enabled for the EventHub Namespace? Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Defines which tier to use. Valid options are `Basic`, `Standard`, and `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
Sku pulumi.StringOutput `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewEventHubNamespace registers a new resource with the given unique name, arguments, and options.
func NewEventHubNamespace(ctx *pulumi.Context,
name string, args *EventHubNamespaceArgs, opts ...pulumi.ResourceOption) (*EventHubNamespace, 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{
"defaultPrimaryConnectionString",
"defaultPrimaryConnectionStringAlias",
"defaultPrimaryKey",
"defaultSecondaryConnectionString",
"defaultSecondaryConnectionStringAlias",
"defaultSecondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource EventHubNamespace
err := ctx.RegisterResource("azure:eventhub/eventHubNamespace:EventHubNamespace", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEventHubNamespace gets an existing EventHubNamespace 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 GetEventHubNamespace(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EventHubNamespaceState, opts ...pulumi.ResourceOption) (*EventHubNamespace, error) {
var resource EventHubNamespace
err := ctx.ReadResource("azure:eventhub/eventHubNamespace:EventHubNamespace", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EventHubNamespace resources.
type eventHubNamespaceState struct {
// Is Auto Inflate enabled for the EventHub Namespace?
AutoInflateEnabled *bool `pulumi:"autoInflateEnabled"`
// Specifies the Capacity / Throughput Units for a `Standard` SKU namespace. Default capacity has a maximum of `2`, but can be increased in blocks of 2 on a committed purchase basis. Defaults to `1`.
Capacity *int `pulumi:"capacity"`
// Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
DedicatedClusterId *string `pulumi:"dedicatedClusterId"`
// The primary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryConnectionString *string `pulumi:"defaultPrimaryConnectionString"`
// The alias of the primary connection string for the authorization rule `RootManageSharedAccessKey`, which is generated when disaster recovery is enabled.
DefaultPrimaryConnectionStringAlias *string `pulumi:"defaultPrimaryConnectionStringAlias"`
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey *string `pulumi:"defaultPrimaryKey"`
// The secondary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryConnectionString *string `pulumi:"defaultSecondaryConnectionString"`
// The alias of the secondary connection string for the authorization rule `RootManageSharedAccessKey`, which is generated when disaster recovery is enabled.
DefaultSecondaryConnectionStringAlias *string `pulumi:"defaultSecondaryConnectionStringAlias"`
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey *string `pulumi:"defaultSecondaryKey"`
// An `identity` block as defined below.
Identity *EventHubNamespaceIdentity `pulumi:"identity"`
// Is SAS authentication enabled for the EventHub Namespace? Defaults to `true`.
LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from `1` - `40`.
MaximumThroughputUnits *int `pulumi:"maximumThroughputUnits"`
// The minimum supported TLS version for this EventHub Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
MinimumTlsVersion *string `pulumi:"minimumTlsVersion"`
// Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `networkRulesets` block as defined below.
NetworkRulesets *EventHubNamespaceNetworkRulesets `pulumi:"networkRulesets"`
// Is public network access enabled for the EventHub Namespace? Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Defines which tier to use. Valid options are `Basic`, `Standard`, and `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
Sku *string `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type EventHubNamespaceState struct {
// Is Auto Inflate enabled for the EventHub Namespace?
AutoInflateEnabled pulumi.BoolPtrInput
// Specifies the Capacity / Throughput Units for a `Standard` SKU namespace. Default capacity has a maximum of `2`, but can be increased in blocks of 2 on a committed purchase basis. Defaults to `1`.
Capacity pulumi.IntPtrInput
// Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
DedicatedClusterId pulumi.StringPtrInput
// The primary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryConnectionString pulumi.StringPtrInput
// The alias of the primary connection string for the authorization rule `RootManageSharedAccessKey`, which is generated when disaster recovery is enabled.
DefaultPrimaryConnectionStringAlias pulumi.StringPtrInput
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey pulumi.StringPtrInput
// The secondary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryConnectionString pulumi.StringPtrInput
// The alias of the secondary connection string for the authorization rule `RootManageSharedAccessKey`, which is generated when disaster recovery is enabled.
DefaultSecondaryConnectionStringAlias pulumi.StringPtrInput
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey pulumi.StringPtrInput
// An `identity` block as defined below.
Identity EventHubNamespaceIdentityPtrInput
// Is SAS authentication enabled for the EventHub Namespace? Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from `1` - `40`.
MaximumThroughputUnits pulumi.IntPtrInput
// The minimum supported TLS version for this EventHub Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
MinimumTlsVersion pulumi.StringPtrInput
// Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `networkRulesets` block as defined below.
NetworkRulesets EventHubNamespaceNetworkRulesetsPtrInput
// Is public network access enabled for the EventHub Namespace? Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Defines which tier to use. Valid options are `Basic`, `Standard`, and `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
Sku pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (EventHubNamespaceState) ElementType() reflect.Type {
return reflect.TypeOf((*eventHubNamespaceState)(nil)).Elem()
}
type eventHubNamespaceArgs struct {
// Is Auto Inflate enabled for the EventHub Namespace?
AutoInflateEnabled *bool `pulumi:"autoInflateEnabled"`
// Specifies the Capacity / Throughput Units for a `Standard` SKU namespace. Default capacity has a maximum of `2`, but can be increased in blocks of 2 on a committed purchase basis. Defaults to `1`.
Capacity *int `pulumi:"capacity"`
// Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
DedicatedClusterId *string `pulumi:"dedicatedClusterId"`
// An `identity` block as defined below.
Identity *EventHubNamespaceIdentity `pulumi:"identity"`
// Is SAS authentication enabled for the EventHub Namespace? Defaults to `true`.
LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from `1` - `40`.
MaximumThroughputUnits *int `pulumi:"maximumThroughputUnits"`
// The minimum supported TLS version for this EventHub Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
MinimumTlsVersion *string `pulumi:"minimumTlsVersion"`
// Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `networkRulesets` block as defined below.
NetworkRulesets *EventHubNamespaceNetworkRulesets `pulumi:"networkRulesets"`
// Is public network access enabled for the EventHub Namespace? Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Defines which tier to use. Valid options are `Basic`, `Standard`, and `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
Sku string `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a EventHubNamespace resource.
type EventHubNamespaceArgs struct {
// Is Auto Inflate enabled for the EventHub Namespace?
AutoInflateEnabled pulumi.BoolPtrInput
// Specifies the Capacity / Throughput Units for a `Standard` SKU namespace. Default capacity has a maximum of `2`, but can be increased in blocks of 2 on a committed purchase basis. Defaults to `1`.
Capacity pulumi.IntPtrInput
// Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
DedicatedClusterId pulumi.StringPtrInput
// An `identity` block as defined below.
Identity EventHubNamespaceIdentityPtrInput
// Is SAS authentication enabled for the EventHub Namespace? Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from `1` - `40`.
MaximumThroughputUnits pulumi.IntPtrInput
// The minimum supported TLS version for this EventHub Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
MinimumTlsVersion pulumi.StringPtrInput
// Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `networkRulesets` block as defined below.
NetworkRulesets EventHubNamespaceNetworkRulesetsPtrInput
// Is public network access enabled for the EventHub Namespace? Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Defines which tier to use. Valid options are `Basic`, `Standard`, and `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
Sku pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (EventHubNamespaceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*eventHubNamespaceArgs)(nil)).Elem()
}
type EventHubNamespaceInput interface {
pulumi.Input
ToEventHubNamespaceOutput() EventHubNamespaceOutput
ToEventHubNamespaceOutputWithContext(ctx context.Context) EventHubNamespaceOutput
}
func (*EventHubNamespace) ElementType() reflect.Type {
return reflect.TypeOf((**EventHubNamespace)(nil)).Elem()
}
func (i *EventHubNamespace) ToEventHubNamespaceOutput() EventHubNamespaceOutput {
return i.ToEventHubNamespaceOutputWithContext(context.Background())
}
func (i *EventHubNamespace) ToEventHubNamespaceOutputWithContext(ctx context.Context) EventHubNamespaceOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventHubNamespaceOutput)
}
// EventHubNamespaceArrayInput is an input type that accepts EventHubNamespaceArray and EventHubNamespaceArrayOutput values.
// You can construct a concrete instance of `EventHubNamespaceArrayInput` via:
//
// EventHubNamespaceArray{ EventHubNamespaceArgs{...} }
type EventHubNamespaceArrayInput interface {
pulumi.Input
ToEventHubNamespaceArrayOutput() EventHubNamespaceArrayOutput
ToEventHubNamespaceArrayOutputWithContext(context.Context) EventHubNamespaceArrayOutput
}
type EventHubNamespaceArray []EventHubNamespaceInput
func (EventHubNamespaceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventHubNamespace)(nil)).Elem()
}
func (i EventHubNamespaceArray) ToEventHubNamespaceArrayOutput() EventHubNamespaceArrayOutput {
return i.ToEventHubNamespaceArrayOutputWithContext(context.Background())
}
func (i EventHubNamespaceArray) ToEventHubNamespaceArrayOutputWithContext(ctx context.Context) EventHubNamespaceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventHubNamespaceArrayOutput)
}
// EventHubNamespaceMapInput is an input type that accepts EventHubNamespaceMap and EventHubNamespaceMapOutput values.
// You can construct a concrete instance of `EventHubNamespaceMapInput` via:
//
// EventHubNamespaceMap{ "key": EventHubNamespaceArgs{...} }
type EventHubNamespaceMapInput interface {
pulumi.Input
ToEventHubNamespaceMapOutput() EventHubNamespaceMapOutput
ToEventHubNamespaceMapOutputWithContext(context.Context) EventHubNamespaceMapOutput
}
type EventHubNamespaceMap map[string]EventHubNamespaceInput
func (EventHubNamespaceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventHubNamespace)(nil)).Elem()
}
func (i EventHubNamespaceMap) ToEventHubNamespaceMapOutput() EventHubNamespaceMapOutput {
return i.ToEventHubNamespaceMapOutputWithContext(context.Background())
}
func (i EventHubNamespaceMap) ToEventHubNamespaceMapOutputWithContext(ctx context.Context) EventHubNamespaceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventHubNamespaceMapOutput)
}
type EventHubNamespaceOutput struct{ *pulumi.OutputState }
func (EventHubNamespaceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EventHubNamespace)(nil)).Elem()
}
func (o EventHubNamespaceOutput) ToEventHubNamespaceOutput() EventHubNamespaceOutput {
return o
}
func (o EventHubNamespaceOutput) ToEventHubNamespaceOutputWithContext(ctx context.Context) EventHubNamespaceOutput {
return o
}
// Is Auto Inflate enabled for the EventHub Namespace?
func (o EventHubNamespaceOutput) AutoInflateEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.BoolPtrOutput { return v.AutoInflateEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the Capacity / Throughput Units for a `Standard` SKU namespace. Default capacity has a maximum of `2`, but can be increased in blocks of 2 on a committed purchase basis. Defaults to `1`.
func (o EventHubNamespaceOutput) Capacity() pulumi.IntPtrOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.IntPtrOutput { return v.Capacity }).(pulumi.IntPtrOutput)
}
// Specifies the ID of the EventHub Dedicated Cluster where this Namespace should created. Changing this forces a new resource to be created.
func (o EventHubNamespaceOutput) DedicatedClusterId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.StringPtrOutput { return v.DedicatedClusterId }).(pulumi.StringPtrOutput)
}
// The primary connection string for the authorization rule `RootManageSharedAccessKey`.
func (o EventHubNamespaceOutput) DefaultPrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.StringOutput { return v.DefaultPrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the primary connection string for the authorization rule `RootManageSharedAccessKey`, which is generated when disaster recovery is enabled.
func (o EventHubNamespaceOutput) DefaultPrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.StringOutput { return v.DefaultPrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
func (o EventHubNamespaceOutput) DefaultPrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.StringOutput { return v.DefaultPrimaryKey }).(pulumi.StringOutput)
}
// The secondary connection string for the authorization rule `RootManageSharedAccessKey`.
func (o EventHubNamespaceOutput) DefaultSecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.StringOutput { return v.DefaultSecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the secondary connection string for the authorization rule `RootManageSharedAccessKey`, which is generated when disaster recovery is enabled.
func (o EventHubNamespaceOutput) DefaultSecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.StringOutput { return v.DefaultSecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
func (o EventHubNamespaceOutput) DefaultSecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.StringOutput { return v.DefaultSecondaryKey }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o EventHubNamespaceOutput) Identity() EventHubNamespaceIdentityPtrOutput {
return o.ApplyT(func(v *EventHubNamespace) EventHubNamespaceIdentityPtrOutput { return v.Identity }).(EventHubNamespaceIdentityPtrOutput)
}
// Is SAS authentication enabled for the EventHub Namespace? Defaults to `true`.
func (o EventHubNamespaceOutput) LocalAuthenticationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.BoolPtrOutput { return v.LocalAuthenticationEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o EventHubNamespaceOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the maximum number of throughput units when Auto Inflate is Enabled. Valid values range from `1` - `40`.
func (o EventHubNamespaceOutput) MaximumThroughputUnits() pulumi.IntPtrOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.IntPtrOutput { return v.MaximumThroughputUnits }).(pulumi.IntPtrOutput)
}
// The minimum supported TLS version for this EventHub Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
func (o EventHubNamespaceOutput) MinimumTlsVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.StringPtrOutput { return v.MinimumTlsVersion }).(pulumi.StringPtrOutput)
}
// Specifies the name of the EventHub Namespace resource. Changing this forces a new resource to be created.
func (o EventHubNamespaceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `networkRulesets` block as defined below.
func (o EventHubNamespaceOutput) NetworkRulesets() EventHubNamespaceNetworkRulesetsOutput {
return o.ApplyT(func(v *EventHubNamespace) EventHubNamespaceNetworkRulesetsOutput { return v.NetworkRulesets }).(EventHubNamespaceNetworkRulesetsOutput)
}
// Is public network access enabled for the EventHub Namespace? Defaults to `true`.
func (o EventHubNamespaceOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the resource group in which to create the namespace. Changing this forces a new resource to be created.
func (o EventHubNamespaceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Defines which tier to use. Valid options are `Basic`, `Standard`, and `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
func (o EventHubNamespaceOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.StringOutput { return v.Sku }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o EventHubNamespaceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *EventHubNamespace) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type EventHubNamespaceArrayOutput struct{ *pulumi.OutputState }
func (EventHubNamespaceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventHubNamespace)(nil)).Elem()
}
func (o EventHubNamespaceArrayOutput) ToEventHubNamespaceArrayOutput() EventHubNamespaceArrayOutput {
return o
}
func (o EventHubNamespaceArrayOutput) ToEventHubNamespaceArrayOutputWithContext(ctx context.Context) EventHubNamespaceArrayOutput {
return o
}
func (o EventHubNamespaceArrayOutput) Index(i pulumi.IntInput) EventHubNamespaceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EventHubNamespace {
return vs[0].([]*EventHubNamespace)[vs[1].(int)]
}).(EventHubNamespaceOutput)
}
type EventHubNamespaceMapOutput struct{ *pulumi.OutputState }
func (EventHubNamespaceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventHubNamespace)(nil)).Elem()
}
func (o EventHubNamespaceMapOutput) ToEventHubNamespaceMapOutput() EventHubNamespaceMapOutput {
return o
}
func (o EventHubNamespaceMapOutput) ToEventHubNamespaceMapOutputWithContext(ctx context.Context) EventHubNamespaceMapOutput {
return o
}
func (o EventHubNamespaceMapOutput) MapIndex(k pulumi.StringInput) EventHubNamespaceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EventHubNamespace {
return vs[0].(map[string]*EventHubNamespace)[vs[1].(string)]
}).(EventHubNamespaceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EventHubNamespaceInput)(nil)).Elem(), &EventHubNamespace{})
pulumi.RegisterInputType(reflect.TypeOf((*EventHubNamespaceArrayInput)(nil)).Elem(), EventHubNamespaceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EventHubNamespaceMapInput)(nil)).Elem(), EventHubNamespaceMap{})
pulumi.RegisterOutputType(EventHubNamespaceOutput{})
pulumi.RegisterOutputType(EventHubNamespaceArrayOutput{})
pulumi.RegisterOutputType(EventHubNamespaceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/subscription.go | sdk/go/azure/eventhub/subscription.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a ServiceBus Subscription.
//
// ## 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/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("tfex-servicebus-subscription"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
// Name: pulumi.String("tfex_servicebus_topic"),
// NamespaceId: exampleNamespace.ID(),
// PartitioningEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewSubscription(ctx, "example", &servicebus.SubscriptionArgs{
// Name: pulumi.String("tfex_servicebus_subscription"),
// TopicId: exampleTopic.ID(),
// MaxDeliveryCount: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ServiceBus` - 2024-01-01
//
// ## Import
//
// Service Bus Subscriptions can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/subscription:Subscription example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/topics/sntopic1/subscriptions/sbsub1
// ```
//
// Deprecated: azure.eventhub.Subscription has been deprecated in favor of azure.servicebus.Subscription
type Subscription struct {
pulumi.CustomResourceState
// The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle pulumi.StringPtrOutput `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls whether the Subscription supports batched operations.
BatchedOperationsEnabled pulumi.BoolPtrOutput `pulumi:"batchedOperationsEnabled"`
// A `clientScopedSubscription` block as defined below.
ClientScopedSubscription SubscriptionClientScopedSubscriptionPtrOutput `pulumi:"clientScopedSubscription"`
// whether the subscription is scoped to a client id. Defaults to `false`.
//
// > **Note:** Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
ClientScopedSubscriptionEnabled pulumi.BoolPtrOutput `pulumi:"clientScopedSubscriptionEnabled"`
// Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`.
DeadLetteringOnFilterEvaluationError pulumi.BoolPtrOutput `pulumi:"deadLetteringOnFilterEvaluationError"`
// Boolean flag which controls whether the Subscription has dead letter support when a message expires.
DeadLetteringOnMessageExpiration pulumi.BoolPtrOutput `pulumi:"deadLetteringOnMessageExpiration"`
// The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the value used when TimeToLive is not set on a message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl pulumi.StringPtrOutput `pulumi:"defaultMessageTtl"`
// The name of a Queue or Topic to automatically forward Dead Letter messages to.
ForwardDeadLetteredMessagesTo pulumi.StringPtrOutput `pulumi:"forwardDeadLetteredMessagesTo"`
// The name of a Queue or Topic to automatically forward messages to.
ForwardTo pulumi.StringPtrOutput `pulumi:"forwardTo"`
// The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `PT1M`.
LockDuration pulumi.StringPtrOutput `pulumi:"lockDuration"`
// The maximum number of deliveries.
MaxDeliveryCount pulumi.IntOutput `pulumi:"maxDeliveryCount"`
// Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.
RequiresSession pulumi.BoolPtrOutput `pulumi:"requiresSession"`
// The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`.
Status pulumi.StringPtrOutput `pulumi:"status"`
// The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
TopicId pulumi.StringOutput `pulumi:"topicId"`
}
// NewSubscription registers a new resource with the given unique name, arguments, and options.
func NewSubscription(ctx *pulumi.Context,
name string, args *SubscriptionArgs, opts ...pulumi.ResourceOption) (*Subscription, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MaxDeliveryCount == nil {
return nil, errors.New("invalid value for required argument 'MaxDeliveryCount'")
}
if args.TopicId == nil {
return nil, errors.New("invalid value for required argument 'TopicId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Subscription
err := ctx.RegisterResource("azure:eventhub/subscription:Subscription", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSubscription gets an existing Subscription 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 GetSubscription(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SubscriptionState, opts ...pulumi.ResourceOption) (*Subscription, error) {
var resource Subscription
err := ctx.ReadResource("azure:eventhub/subscription:Subscription", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Subscription resources.
type subscriptionState struct {
// The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle *string `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls whether the Subscription supports batched operations.
BatchedOperationsEnabled *bool `pulumi:"batchedOperationsEnabled"`
// A `clientScopedSubscription` block as defined below.
ClientScopedSubscription *SubscriptionClientScopedSubscription `pulumi:"clientScopedSubscription"`
// whether the subscription is scoped to a client id. Defaults to `false`.
//
// > **Note:** Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
ClientScopedSubscriptionEnabled *bool `pulumi:"clientScopedSubscriptionEnabled"`
// Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`.
DeadLetteringOnFilterEvaluationError *bool `pulumi:"deadLetteringOnFilterEvaluationError"`
// Boolean flag which controls whether the Subscription has dead letter support when a message expires.
DeadLetteringOnMessageExpiration *bool `pulumi:"deadLetteringOnMessageExpiration"`
// The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the value used when TimeToLive is not set on a message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl *string `pulumi:"defaultMessageTtl"`
// The name of a Queue or Topic to automatically forward Dead Letter messages to.
ForwardDeadLetteredMessagesTo *string `pulumi:"forwardDeadLetteredMessagesTo"`
// The name of a Queue or Topic to automatically forward messages to.
ForwardTo *string `pulumi:"forwardTo"`
// The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `PT1M`.
LockDuration *string `pulumi:"lockDuration"`
// The maximum number of deliveries.
MaxDeliveryCount *int `pulumi:"maxDeliveryCount"`
// Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.
RequiresSession *bool `pulumi:"requiresSession"`
// The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`.
Status *string `pulumi:"status"`
// The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
TopicId *string `pulumi:"topicId"`
}
type SubscriptionState struct {
// The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle pulumi.StringPtrInput
// Boolean flag which controls whether the Subscription supports batched operations.
BatchedOperationsEnabled pulumi.BoolPtrInput
// A `clientScopedSubscription` block as defined below.
ClientScopedSubscription SubscriptionClientScopedSubscriptionPtrInput
// whether the subscription is scoped to a client id. Defaults to `false`.
//
// > **Note:** Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
ClientScopedSubscriptionEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`.
DeadLetteringOnFilterEvaluationError pulumi.BoolPtrInput
// Boolean flag which controls whether the Subscription has dead letter support when a message expires.
DeadLetteringOnMessageExpiration pulumi.BoolPtrInput
// The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the value used when TimeToLive is not set on a message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl pulumi.StringPtrInput
// The name of a Queue or Topic to automatically forward Dead Letter messages to.
ForwardDeadLetteredMessagesTo pulumi.StringPtrInput
// The name of a Queue or Topic to automatically forward messages to.
ForwardTo pulumi.StringPtrInput
// The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `PT1M`.
LockDuration pulumi.StringPtrInput
// The maximum number of deliveries.
MaxDeliveryCount pulumi.IntPtrInput
// Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.
RequiresSession pulumi.BoolPtrInput
// The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`.
Status pulumi.StringPtrInput
// The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
TopicId pulumi.StringPtrInput
}
func (SubscriptionState) ElementType() reflect.Type {
return reflect.TypeOf((*subscriptionState)(nil)).Elem()
}
type subscriptionArgs struct {
// The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle *string `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls whether the Subscription supports batched operations.
BatchedOperationsEnabled *bool `pulumi:"batchedOperationsEnabled"`
// A `clientScopedSubscription` block as defined below.
ClientScopedSubscription *SubscriptionClientScopedSubscription `pulumi:"clientScopedSubscription"`
// whether the subscription is scoped to a client id. Defaults to `false`.
//
// > **Note:** Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
ClientScopedSubscriptionEnabled *bool `pulumi:"clientScopedSubscriptionEnabled"`
// Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`.
DeadLetteringOnFilterEvaluationError *bool `pulumi:"deadLetteringOnFilterEvaluationError"`
// Boolean flag which controls whether the Subscription has dead letter support when a message expires.
DeadLetteringOnMessageExpiration *bool `pulumi:"deadLetteringOnMessageExpiration"`
// The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the value used when TimeToLive is not set on a message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl *string `pulumi:"defaultMessageTtl"`
// The name of a Queue or Topic to automatically forward Dead Letter messages to.
ForwardDeadLetteredMessagesTo *string `pulumi:"forwardDeadLetteredMessagesTo"`
// The name of a Queue or Topic to automatically forward messages to.
ForwardTo *string `pulumi:"forwardTo"`
// The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `PT1M`.
LockDuration *string `pulumi:"lockDuration"`
// The maximum number of deliveries.
MaxDeliveryCount int `pulumi:"maxDeliveryCount"`
// Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.
RequiresSession *bool `pulumi:"requiresSession"`
// The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`.
Status *string `pulumi:"status"`
// The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
TopicId string `pulumi:"topicId"`
}
// The set of arguments for constructing a Subscription resource.
type SubscriptionArgs struct {
// The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle pulumi.StringPtrInput
// Boolean flag which controls whether the Subscription supports batched operations.
BatchedOperationsEnabled pulumi.BoolPtrInput
// A `clientScopedSubscription` block as defined below.
ClientScopedSubscription SubscriptionClientScopedSubscriptionPtrInput
// whether the subscription is scoped to a client id. Defaults to `false`.
//
// > **Note:** Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
ClientScopedSubscriptionEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`.
DeadLetteringOnFilterEvaluationError pulumi.BoolPtrInput
// Boolean flag which controls whether the Subscription has dead letter support when a message expires.
DeadLetteringOnMessageExpiration pulumi.BoolPtrInput
// The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the value used when TimeToLive is not set on a message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl pulumi.StringPtrInput
// The name of a Queue or Topic to automatically forward Dead Letter messages to.
ForwardDeadLetteredMessagesTo pulumi.StringPtrInput
// The name of a Queue or Topic to automatically forward messages to.
ForwardTo pulumi.StringPtrInput
// The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `PT1M`.
LockDuration pulumi.StringPtrInput
// The maximum number of deliveries.
MaxDeliveryCount pulumi.IntInput
// Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.
RequiresSession pulumi.BoolPtrInput
// The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`.
Status pulumi.StringPtrInput
// The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
TopicId pulumi.StringInput
}
func (SubscriptionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*subscriptionArgs)(nil)).Elem()
}
type SubscriptionInput interface {
pulumi.Input
ToSubscriptionOutput() SubscriptionOutput
ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput
}
func (*Subscription) ElementType() reflect.Type {
return reflect.TypeOf((**Subscription)(nil)).Elem()
}
func (i *Subscription) ToSubscriptionOutput() SubscriptionOutput {
return i.ToSubscriptionOutputWithContext(context.Background())
}
func (i *Subscription) ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionOutput)
}
// SubscriptionArrayInput is an input type that accepts SubscriptionArray and SubscriptionArrayOutput values.
// You can construct a concrete instance of `SubscriptionArrayInput` via:
//
// SubscriptionArray{ SubscriptionArgs{...} }
type SubscriptionArrayInput interface {
pulumi.Input
ToSubscriptionArrayOutput() SubscriptionArrayOutput
ToSubscriptionArrayOutputWithContext(context.Context) SubscriptionArrayOutput
}
type SubscriptionArray []SubscriptionInput
func (SubscriptionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Subscription)(nil)).Elem()
}
func (i SubscriptionArray) ToSubscriptionArrayOutput() SubscriptionArrayOutput {
return i.ToSubscriptionArrayOutputWithContext(context.Background())
}
func (i SubscriptionArray) ToSubscriptionArrayOutputWithContext(ctx context.Context) SubscriptionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionArrayOutput)
}
// SubscriptionMapInput is an input type that accepts SubscriptionMap and SubscriptionMapOutput values.
// You can construct a concrete instance of `SubscriptionMapInput` via:
//
// SubscriptionMap{ "key": SubscriptionArgs{...} }
type SubscriptionMapInput interface {
pulumi.Input
ToSubscriptionMapOutput() SubscriptionMapOutput
ToSubscriptionMapOutputWithContext(context.Context) SubscriptionMapOutput
}
type SubscriptionMap map[string]SubscriptionInput
func (SubscriptionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Subscription)(nil)).Elem()
}
func (i SubscriptionMap) ToSubscriptionMapOutput() SubscriptionMapOutput {
return i.ToSubscriptionMapOutputWithContext(context.Background())
}
func (i SubscriptionMap) ToSubscriptionMapOutputWithContext(ctx context.Context) SubscriptionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionMapOutput)
}
type SubscriptionOutput struct{ *pulumi.OutputState }
func (SubscriptionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Subscription)(nil)).Elem()
}
func (o SubscriptionOutput) ToSubscriptionOutput() SubscriptionOutput {
return o
}
func (o SubscriptionOutput) ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput {
return o
}
// The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`.
func (o SubscriptionOutput) AutoDeleteOnIdle() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.AutoDeleteOnIdle }).(pulumi.StringPtrOutput)
}
// Boolean flag which controls whether the Subscription supports batched operations.
func (o SubscriptionOutput) BatchedOperationsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.BoolPtrOutput { return v.BatchedOperationsEnabled }).(pulumi.BoolPtrOutput)
}
// A `clientScopedSubscription` block as defined below.
func (o SubscriptionOutput) ClientScopedSubscription() SubscriptionClientScopedSubscriptionPtrOutput {
return o.ApplyT(func(v *Subscription) SubscriptionClientScopedSubscriptionPtrOutput { return v.ClientScopedSubscription }).(SubscriptionClientScopedSubscriptionPtrOutput)
}
// whether the subscription is scoped to a client id. Defaults to `false`.
//
// > **Note:** Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
func (o SubscriptionOutput) ClientScopedSubscriptionEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.BoolPtrOutput { return v.ClientScopedSubscriptionEnabled }).(pulumi.BoolPtrOutput)
}
// Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`.
func (o SubscriptionOutput) DeadLetteringOnFilterEvaluationError() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.BoolPtrOutput { return v.DeadLetteringOnFilterEvaluationError }).(pulumi.BoolPtrOutput)
}
// Boolean flag which controls whether the Subscription has dead letter support when a message expires.
func (o SubscriptionOutput) DeadLetteringOnMessageExpiration() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.BoolPtrOutput { return v.DeadLetteringOnMessageExpiration }).(pulumi.BoolPtrOutput)
}
// The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the value used when TimeToLive is not set on a message itself. Defaults to `P10675199DT2H48M5.4775807S`.
func (o SubscriptionOutput) DefaultMessageTtl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.DefaultMessageTtl }).(pulumi.StringPtrOutput)
}
// The name of a Queue or Topic to automatically forward Dead Letter messages to.
func (o SubscriptionOutput) ForwardDeadLetteredMessagesTo() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.ForwardDeadLetteredMessagesTo }).(pulumi.StringPtrOutput)
}
// The name of a Queue or Topic to automatically forward messages to.
func (o SubscriptionOutput) ForwardTo() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.ForwardTo }).(pulumi.StringPtrOutput)
}
// The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `PT1M`.
func (o SubscriptionOutput) LockDuration() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.LockDuration }).(pulumi.StringPtrOutput)
}
// The maximum number of deliveries.
func (o SubscriptionOutput) MaxDeliveryCount() pulumi.IntOutput {
return o.ApplyT(func(v *Subscription) pulumi.IntOutput { return v.MaxDeliveryCount }).(pulumi.IntOutput)
}
// Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
func (o SubscriptionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.
func (o SubscriptionOutput) RequiresSession() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.BoolPtrOutput { return v.RequiresSession }).(pulumi.BoolPtrOutput)
}
// The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`.
func (o SubscriptionOutput) Status() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.Status }).(pulumi.StringPtrOutput)
}
// The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
func (o SubscriptionOutput) TopicId() pulumi.StringOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.TopicId }).(pulumi.StringOutput)
}
type SubscriptionArrayOutput struct{ *pulumi.OutputState }
func (SubscriptionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Subscription)(nil)).Elem()
}
func (o SubscriptionArrayOutput) ToSubscriptionArrayOutput() SubscriptionArrayOutput {
return o
}
func (o SubscriptionArrayOutput) ToSubscriptionArrayOutputWithContext(ctx context.Context) SubscriptionArrayOutput {
return o
}
func (o SubscriptionArrayOutput) Index(i pulumi.IntInput) SubscriptionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Subscription {
return vs[0].([]*Subscription)[vs[1].(int)]
}).(SubscriptionOutput)
}
type SubscriptionMapOutput struct{ *pulumi.OutputState }
func (SubscriptionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Subscription)(nil)).Elem()
}
func (o SubscriptionMapOutput) ToSubscriptionMapOutput() SubscriptionMapOutput {
return o
}
func (o SubscriptionMapOutput) ToSubscriptionMapOutputWithContext(ctx context.Context) SubscriptionMapOutput {
return o
}
func (o SubscriptionMapOutput) MapIndex(k pulumi.StringInput) SubscriptionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Subscription {
return vs[0].(map[string]*Subscription)[vs[1].(string)]
}).(SubscriptionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionInput)(nil)).Elem(), &Subscription{})
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionArrayInput)(nil)).Elem(), SubscriptionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionMapInput)(nil)).Elem(), SubscriptionMap{})
pulumi.RegisterOutputType(SubscriptionOutput{})
pulumi.RegisterOutputType(SubscriptionArrayOutput{})
pulumi.RegisterOutputType(SubscriptionMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/consumerGroup.go | sdk/go/azure/eventhub/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 eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Event Hubs Consumer Group as a nested resource within an Event 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/eventhub"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("acceptanceTestEventHubNamespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Basic"),
// Capacity: pulumi.Int(2),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
// Name: pulumi.String("acceptanceTestEventHub"),
// NamespaceName: exampleEventHubNamespace.Name,
// ResourceGroupName: example.Name,
// PartitionCount: pulumi.Int(2),
// MessageRetention: pulumi.Int(2),
// })
// if err != nil {
// return err
// }
// _, err = eventhub.NewConsumerGroup(ctx, "example", &eventhub.ConsumerGroupArgs{
// Name: pulumi.String("acceptanceTestEventHubConsumerGroup"),
// NamespaceName: exampleEventHubNamespace.Name,
// EventhubName: exampleEventHub.Name,
// ResourceGroupName: example.Name,
// UserMetadata: pulumi.String("some-meta-data"),
// })
// 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.EventHub` - 2024-01-01
//
// ## Import
//
// EventHub Consumer Groups can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/consumerGroup:ConsumerGroup consumerGroup1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1/eventhubs/eventhub1/consumerGroups/consumerGroup1
// ```
type ConsumerGroup struct {
pulumi.CustomResourceState
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName pulumi.StringOutput `pulumi:"eventhubName"`
// Specifies the name of the EventHub Consumer Group resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName pulumi.StringOutput `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Specifies the user metadata.
UserMetadata pulumi.StringPtrOutput `pulumi:"userMetadata"`
}
// 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.EventhubName == nil {
return nil, errors.New("invalid value for required argument 'EventhubName'")
}
if args.NamespaceName == nil {
return nil, errors.New("invalid value for required argument 'NamespaceName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:eventhub/eventHubConsumerGroup:EventHubConsumerGroup"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource ConsumerGroup
err := ctx.RegisterResource("azure:eventhub/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:eventhub/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 {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName *string `pulumi:"eventhubName"`
// Specifies the name of the EventHub Consumer Group resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName *string `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Specifies the user metadata.
UserMetadata *string `pulumi:"userMetadata"`
}
type ConsumerGroupState struct {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName pulumi.StringPtrInput
// Specifies the name of the EventHub Consumer Group resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName pulumi.StringPtrInput
// The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Specifies the user metadata.
UserMetadata pulumi.StringPtrInput
}
func (ConsumerGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*consumerGroupState)(nil)).Elem()
}
type consumerGroupArgs struct {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName string `pulumi:"eventhubName"`
// Specifies the name of the EventHub Consumer Group resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName string `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the user metadata.
UserMetadata *string `pulumi:"userMetadata"`
}
// The set of arguments for constructing a ConsumerGroup resource.
type ConsumerGroupArgs struct {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName pulumi.StringInput
// Specifies the name of the EventHub Consumer Group resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName pulumi.StringInput
// The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Specifies the user metadata.
UserMetadata pulumi.StringPtrInput
}
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
}
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
func (o ConsumerGroupOutput) EventhubName() pulumi.StringOutput {
return o.ApplyT(func(v *ConsumerGroup) pulumi.StringOutput { return v.EventhubName }).(pulumi.StringOutput)
}
// Specifies the name of the EventHub Consumer Group resource. 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)
}
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
func (o ConsumerGroupOutput) NamespaceName() pulumi.StringOutput {
return o.ApplyT(func(v *ConsumerGroup) pulumi.StringOutput { return v.NamespaceName }).(pulumi.StringOutput)
}
// The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists. 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)
}
// Specifies the user metadata.
func (o ConsumerGroupOutput) UserMetadata() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ConsumerGroup) pulumi.StringPtrOutput { return v.UserMetadata }).(pulumi.StringPtrOutput)
}
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 |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/namespaceSchemaGroup.go | sdk/go/azure/eventhub/namespaceSchemaGroup.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
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/eventhub"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("exampleRG-ehn-schemaGroup"),
// Location: pulumi.String("East US"),
// })
// if err != nil {
// return err
// }
// test, err := eventhub.NewEventHubNamespace(ctx, "test", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("example-ehn-schemaGroup"),
// Location: pulumi.Any(testAzurermResourceGroup.Location),
// ResourceGroupName: pulumi.Any(testAzurermResourceGroup.Name),
// Sku: pulumi.String("Standard"),
// })
// if err != nil {
// return err
// }
// _, err = eventhub.NewNamespaceSchemaGroup(ctx, "test", &eventhub.NamespaceSchemaGroupArgs{
// Name: pulumi.String("example-schemaGroup"),
// NamespaceId: test.ID(),
// SchemaCompatibility: pulumi.String("Forward"),
// SchemaType: pulumi.String("Avro"),
// })
// 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.EventHub` - 2024-01-01
//
// ## Import
//
// Schema Group for a EventHub Namespace can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/namespaceSchemaGroup:NamespaceSchemaGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1/schemaGroups/group1
// ```
type NamespaceSchemaGroup struct {
pulumi.CustomResourceState
// Specifies the name of this schema group. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
NamespaceId pulumi.StringOutput `pulumi:"namespaceId"`
// Specifies the compatibility of this schema group. Possible values are `None`, `Backward`, `Forward`. Changing this forces a new resource to be created.
SchemaCompatibility pulumi.StringOutput `pulumi:"schemaCompatibility"`
// Specifies the Type of this schema group. Possible values are `Avro`, `Unknown` and `Json`. Changing this forces a new resource to be created.
//
// > **Note:** When `schemaType` is specified as `Json`, `schemaCompatibility` must be set to `None`.
SchemaType pulumi.StringOutput `pulumi:"schemaType"`
}
// NewNamespaceSchemaGroup registers a new resource with the given unique name, arguments, and options.
func NewNamespaceSchemaGroup(ctx *pulumi.Context,
name string, args *NamespaceSchemaGroupArgs, opts ...pulumi.ResourceOption) (*NamespaceSchemaGroup, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NamespaceId == nil {
return nil, errors.New("invalid value for required argument 'NamespaceId'")
}
if args.SchemaCompatibility == nil {
return nil, errors.New("invalid value for required argument 'SchemaCompatibility'")
}
if args.SchemaType == nil {
return nil, errors.New("invalid value for required argument 'SchemaType'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource NamespaceSchemaGroup
err := ctx.RegisterResource("azure:eventhub/namespaceSchemaGroup:NamespaceSchemaGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNamespaceSchemaGroup gets an existing NamespaceSchemaGroup 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 GetNamespaceSchemaGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NamespaceSchemaGroupState, opts ...pulumi.ResourceOption) (*NamespaceSchemaGroup, error) {
var resource NamespaceSchemaGroup
err := ctx.ReadResource("azure:eventhub/namespaceSchemaGroup:NamespaceSchemaGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NamespaceSchemaGroup resources.
type namespaceSchemaGroupState struct {
// Specifies the name of this schema group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
NamespaceId *string `pulumi:"namespaceId"`
// Specifies the compatibility of this schema group. Possible values are `None`, `Backward`, `Forward`. Changing this forces a new resource to be created.
SchemaCompatibility *string `pulumi:"schemaCompatibility"`
// Specifies the Type of this schema group. Possible values are `Avro`, `Unknown` and `Json`. Changing this forces a new resource to be created.
//
// > **Note:** When `schemaType` is specified as `Json`, `schemaCompatibility` must be set to `None`.
SchemaType *string `pulumi:"schemaType"`
}
type NamespaceSchemaGroupState struct {
// Specifies the name of this schema group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
NamespaceId pulumi.StringPtrInput
// Specifies the compatibility of this schema group. Possible values are `None`, `Backward`, `Forward`. Changing this forces a new resource to be created.
SchemaCompatibility pulumi.StringPtrInput
// Specifies the Type of this schema group. Possible values are `Avro`, `Unknown` and `Json`. Changing this forces a new resource to be created.
//
// > **Note:** When `schemaType` is specified as `Json`, `schemaCompatibility` must be set to `None`.
SchemaType pulumi.StringPtrInput
}
func (NamespaceSchemaGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceSchemaGroupState)(nil)).Elem()
}
type namespaceSchemaGroupArgs struct {
// Specifies the name of this schema group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
NamespaceId string `pulumi:"namespaceId"`
// Specifies the compatibility of this schema group. Possible values are `None`, `Backward`, `Forward`. Changing this forces a new resource to be created.
SchemaCompatibility string `pulumi:"schemaCompatibility"`
// Specifies the Type of this schema group. Possible values are `Avro`, `Unknown` and `Json`. Changing this forces a new resource to be created.
//
// > **Note:** When `schemaType` is specified as `Json`, `schemaCompatibility` must be set to `None`.
SchemaType string `pulumi:"schemaType"`
}
// The set of arguments for constructing a NamespaceSchemaGroup resource.
type NamespaceSchemaGroupArgs struct {
// Specifies the name of this schema group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
NamespaceId pulumi.StringInput
// Specifies the compatibility of this schema group. Possible values are `None`, `Backward`, `Forward`. Changing this forces a new resource to be created.
SchemaCompatibility pulumi.StringInput
// Specifies the Type of this schema group. Possible values are `Avro`, `Unknown` and `Json`. Changing this forces a new resource to be created.
//
// > **Note:** When `schemaType` is specified as `Json`, `schemaCompatibility` must be set to `None`.
SchemaType pulumi.StringInput
}
func (NamespaceSchemaGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceSchemaGroupArgs)(nil)).Elem()
}
type NamespaceSchemaGroupInput interface {
pulumi.Input
ToNamespaceSchemaGroupOutput() NamespaceSchemaGroupOutput
ToNamespaceSchemaGroupOutputWithContext(ctx context.Context) NamespaceSchemaGroupOutput
}
func (*NamespaceSchemaGroup) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceSchemaGroup)(nil)).Elem()
}
func (i *NamespaceSchemaGroup) ToNamespaceSchemaGroupOutput() NamespaceSchemaGroupOutput {
return i.ToNamespaceSchemaGroupOutputWithContext(context.Background())
}
func (i *NamespaceSchemaGroup) ToNamespaceSchemaGroupOutputWithContext(ctx context.Context) NamespaceSchemaGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceSchemaGroupOutput)
}
// NamespaceSchemaGroupArrayInput is an input type that accepts NamespaceSchemaGroupArray and NamespaceSchemaGroupArrayOutput values.
// You can construct a concrete instance of `NamespaceSchemaGroupArrayInput` via:
//
// NamespaceSchemaGroupArray{ NamespaceSchemaGroupArgs{...} }
type NamespaceSchemaGroupArrayInput interface {
pulumi.Input
ToNamespaceSchemaGroupArrayOutput() NamespaceSchemaGroupArrayOutput
ToNamespaceSchemaGroupArrayOutputWithContext(context.Context) NamespaceSchemaGroupArrayOutput
}
type NamespaceSchemaGroupArray []NamespaceSchemaGroupInput
func (NamespaceSchemaGroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NamespaceSchemaGroup)(nil)).Elem()
}
func (i NamespaceSchemaGroupArray) ToNamespaceSchemaGroupArrayOutput() NamespaceSchemaGroupArrayOutput {
return i.ToNamespaceSchemaGroupArrayOutputWithContext(context.Background())
}
func (i NamespaceSchemaGroupArray) ToNamespaceSchemaGroupArrayOutputWithContext(ctx context.Context) NamespaceSchemaGroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceSchemaGroupArrayOutput)
}
// NamespaceSchemaGroupMapInput is an input type that accepts NamespaceSchemaGroupMap and NamespaceSchemaGroupMapOutput values.
// You can construct a concrete instance of `NamespaceSchemaGroupMapInput` via:
//
// NamespaceSchemaGroupMap{ "key": NamespaceSchemaGroupArgs{...} }
type NamespaceSchemaGroupMapInput interface {
pulumi.Input
ToNamespaceSchemaGroupMapOutput() NamespaceSchemaGroupMapOutput
ToNamespaceSchemaGroupMapOutputWithContext(context.Context) NamespaceSchemaGroupMapOutput
}
type NamespaceSchemaGroupMap map[string]NamespaceSchemaGroupInput
func (NamespaceSchemaGroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NamespaceSchemaGroup)(nil)).Elem()
}
func (i NamespaceSchemaGroupMap) ToNamespaceSchemaGroupMapOutput() NamespaceSchemaGroupMapOutput {
return i.ToNamespaceSchemaGroupMapOutputWithContext(context.Background())
}
func (i NamespaceSchemaGroupMap) ToNamespaceSchemaGroupMapOutputWithContext(ctx context.Context) NamespaceSchemaGroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceSchemaGroupMapOutput)
}
type NamespaceSchemaGroupOutput struct{ *pulumi.OutputState }
func (NamespaceSchemaGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceSchemaGroup)(nil)).Elem()
}
func (o NamespaceSchemaGroupOutput) ToNamespaceSchemaGroupOutput() NamespaceSchemaGroupOutput {
return o
}
func (o NamespaceSchemaGroupOutput) ToNamespaceSchemaGroupOutputWithContext(ctx context.Context) NamespaceSchemaGroupOutput {
return o
}
// Specifies the name of this schema group. Changing this forces a new resource to be created.
func (o NamespaceSchemaGroupOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceSchemaGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the ID of the EventHub Namespace. Changing this forces a new resource to be created.
func (o NamespaceSchemaGroupOutput) NamespaceId() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceSchemaGroup) pulumi.StringOutput { return v.NamespaceId }).(pulumi.StringOutput)
}
// Specifies the compatibility of this schema group. Possible values are `None`, `Backward`, `Forward`. Changing this forces a new resource to be created.
func (o NamespaceSchemaGroupOutput) SchemaCompatibility() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceSchemaGroup) pulumi.StringOutput { return v.SchemaCompatibility }).(pulumi.StringOutput)
}
// Specifies the Type of this schema group. Possible values are `Avro`, `Unknown` and `Json`. Changing this forces a new resource to be created.
//
// > **Note:** When `schemaType` is specified as `Json`, `schemaCompatibility` must be set to `None`.
func (o NamespaceSchemaGroupOutput) SchemaType() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceSchemaGroup) pulumi.StringOutput { return v.SchemaType }).(pulumi.StringOutput)
}
type NamespaceSchemaGroupArrayOutput struct{ *pulumi.OutputState }
func (NamespaceSchemaGroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NamespaceSchemaGroup)(nil)).Elem()
}
func (o NamespaceSchemaGroupArrayOutput) ToNamespaceSchemaGroupArrayOutput() NamespaceSchemaGroupArrayOutput {
return o
}
func (o NamespaceSchemaGroupArrayOutput) ToNamespaceSchemaGroupArrayOutputWithContext(ctx context.Context) NamespaceSchemaGroupArrayOutput {
return o
}
func (o NamespaceSchemaGroupArrayOutput) Index(i pulumi.IntInput) NamespaceSchemaGroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NamespaceSchemaGroup {
return vs[0].([]*NamespaceSchemaGroup)[vs[1].(int)]
}).(NamespaceSchemaGroupOutput)
}
type NamespaceSchemaGroupMapOutput struct{ *pulumi.OutputState }
func (NamespaceSchemaGroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NamespaceSchemaGroup)(nil)).Elem()
}
func (o NamespaceSchemaGroupMapOutput) ToNamespaceSchemaGroupMapOutput() NamespaceSchemaGroupMapOutput {
return o
}
func (o NamespaceSchemaGroupMapOutput) ToNamespaceSchemaGroupMapOutputWithContext(ctx context.Context) NamespaceSchemaGroupMapOutput {
return o
}
func (o NamespaceSchemaGroupMapOutput) MapIndex(k pulumi.StringInput) NamespaceSchemaGroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NamespaceSchemaGroup {
return vs[0].(map[string]*NamespaceSchemaGroup)[vs[1].(string)]
}).(NamespaceSchemaGroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceSchemaGroupInput)(nil)).Elem(), &NamespaceSchemaGroup{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceSchemaGroupArrayInput)(nil)).Elem(), NamespaceSchemaGroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceSchemaGroupMapInput)(nil)).Elem(), NamespaceSchemaGroupMap{})
pulumi.RegisterOutputType(NamespaceSchemaGroupOutput{})
pulumi.RegisterOutputType(NamespaceSchemaGroupArrayOutput{})
pulumi.RegisterOutputType(NamespaceSchemaGroupMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/eventhubNamespaceDisasterRecoveryConfig.go | sdk/go/azure/eventhub/eventhubNamespaceDisasterRecoveryConfig.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Disaster Recovery Config for an Event Hub Namespace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "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("eventhub-replication"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// primary, err := eventhub.NewEventHubNamespace(ctx, "primary", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("eventhub-primary"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// })
// if err != nil {
// return err
// }
// secondary, err := eventhub.NewEventHubNamespace(ctx, "secondary", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("eventhub-secondary"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// })
// if err != nil {
// return err
// }
// _, err = eventhub.NewEventhubNamespaceDisasterRecoveryConfig(ctx, "example", &eventhub.EventhubNamespaceDisasterRecoveryConfigArgs{
// Name: pulumi.String("replicate-eventhub"),
// ResourceGroupName: example.Name,
// NamespaceName: primary.Name,
// PartnerNamespaceId: secondary.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.EventHub` - 2024-01-01
//
// ## Import
//
// EventHubs can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/eventhubNamespaceDisasterRecoveryConfig:EventhubNamespaceDisasterRecoveryConfig config1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1/disasterRecoveryConfigs/config1
// ```
type EventhubNamespaceDisasterRecoveryConfig struct {
pulumi.CustomResourceState
// Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
NamespaceName pulumi.StringOutput `pulumi:"namespaceName"`
// The ID of the EventHub Namespace to replicate to.
PartnerNamespaceId pulumi.StringOutput `pulumi:"partnerNamespaceId"`
// The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewEventhubNamespaceDisasterRecoveryConfig registers a new resource with the given unique name, arguments, and options.
func NewEventhubNamespaceDisasterRecoveryConfig(ctx *pulumi.Context,
name string, args *EventhubNamespaceDisasterRecoveryConfigArgs, opts ...pulumi.ResourceOption) (*EventhubNamespaceDisasterRecoveryConfig, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NamespaceName == nil {
return nil, errors.New("invalid value for required argument 'NamespaceName'")
}
if args.PartnerNamespaceId == nil {
return nil, errors.New("invalid value for required argument 'PartnerNamespaceId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource EventhubNamespaceDisasterRecoveryConfig
err := ctx.RegisterResource("azure:eventhub/eventhubNamespaceDisasterRecoveryConfig:EventhubNamespaceDisasterRecoveryConfig", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEventhubNamespaceDisasterRecoveryConfig gets an existing EventhubNamespaceDisasterRecoveryConfig 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 GetEventhubNamespaceDisasterRecoveryConfig(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EventhubNamespaceDisasterRecoveryConfigState, opts ...pulumi.ResourceOption) (*EventhubNamespaceDisasterRecoveryConfig, error) {
var resource EventhubNamespaceDisasterRecoveryConfig
err := ctx.ReadResource("azure:eventhub/eventhubNamespaceDisasterRecoveryConfig:EventhubNamespaceDisasterRecoveryConfig", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EventhubNamespaceDisasterRecoveryConfig resources.
type eventhubNamespaceDisasterRecoveryConfigState struct {
// Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
NamespaceName *string `pulumi:"namespaceName"`
// The ID of the EventHub Namespace to replicate to.
PartnerNamespaceId *string `pulumi:"partnerNamespaceId"`
// The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type EventhubNamespaceDisasterRecoveryConfigState struct {
// Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
NamespaceName pulumi.StringPtrInput
// The ID of the EventHub Namespace to replicate to.
PartnerNamespaceId pulumi.StringPtrInput
// The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (EventhubNamespaceDisasterRecoveryConfigState) ElementType() reflect.Type {
return reflect.TypeOf((*eventhubNamespaceDisasterRecoveryConfigState)(nil)).Elem()
}
type eventhubNamespaceDisasterRecoveryConfigArgs struct {
// Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
NamespaceName string `pulumi:"namespaceName"`
// The ID of the EventHub Namespace to replicate to.
PartnerNamespaceId string `pulumi:"partnerNamespaceId"`
// The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a EventhubNamespaceDisasterRecoveryConfig resource.
type EventhubNamespaceDisasterRecoveryConfigArgs struct {
// Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
NamespaceName pulumi.StringInput
// The ID of the EventHub Namespace to replicate to.
PartnerNamespaceId pulumi.StringInput
// The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (EventhubNamespaceDisasterRecoveryConfigArgs) ElementType() reflect.Type {
return reflect.TypeOf((*eventhubNamespaceDisasterRecoveryConfigArgs)(nil)).Elem()
}
type EventhubNamespaceDisasterRecoveryConfigInput interface {
pulumi.Input
ToEventhubNamespaceDisasterRecoveryConfigOutput() EventhubNamespaceDisasterRecoveryConfigOutput
ToEventhubNamespaceDisasterRecoveryConfigOutputWithContext(ctx context.Context) EventhubNamespaceDisasterRecoveryConfigOutput
}
func (*EventhubNamespaceDisasterRecoveryConfig) ElementType() reflect.Type {
return reflect.TypeOf((**EventhubNamespaceDisasterRecoveryConfig)(nil)).Elem()
}
func (i *EventhubNamespaceDisasterRecoveryConfig) ToEventhubNamespaceDisasterRecoveryConfigOutput() EventhubNamespaceDisasterRecoveryConfigOutput {
return i.ToEventhubNamespaceDisasterRecoveryConfigOutputWithContext(context.Background())
}
func (i *EventhubNamespaceDisasterRecoveryConfig) ToEventhubNamespaceDisasterRecoveryConfigOutputWithContext(ctx context.Context) EventhubNamespaceDisasterRecoveryConfigOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventhubNamespaceDisasterRecoveryConfigOutput)
}
// EventhubNamespaceDisasterRecoveryConfigArrayInput is an input type that accepts EventhubNamespaceDisasterRecoveryConfigArray and EventhubNamespaceDisasterRecoveryConfigArrayOutput values.
// You can construct a concrete instance of `EventhubNamespaceDisasterRecoveryConfigArrayInput` via:
//
// EventhubNamespaceDisasterRecoveryConfigArray{ EventhubNamespaceDisasterRecoveryConfigArgs{...} }
type EventhubNamespaceDisasterRecoveryConfigArrayInput interface {
pulumi.Input
ToEventhubNamespaceDisasterRecoveryConfigArrayOutput() EventhubNamespaceDisasterRecoveryConfigArrayOutput
ToEventhubNamespaceDisasterRecoveryConfigArrayOutputWithContext(context.Context) EventhubNamespaceDisasterRecoveryConfigArrayOutput
}
type EventhubNamespaceDisasterRecoveryConfigArray []EventhubNamespaceDisasterRecoveryConfigInput
func (EventhubNamespaceDisasterRecoveryConfigArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventhubNamespaceDisasterRecoveryConfig)(nil)).Elem()
}
func (i EventhubNamespaceDisasterRecoveryConfigArray) ToEventhubNamespaceDisasterRecoveryConfigArrayOutput() EventhubNamespaceDisasterRecoveryConfigArrayOutput {
return i.ToEventhubNamespaceDisasterRecoveryConfigArrayOutputWithContext(context.Background())
}
func (i EventhubNamespaceDisasterRecoveryConfigArray) ToEventhubNamespaceDisasterRecoveryConfigArrayOutputWithContext(ctx context.Context) EventhubNamespaceDisasterRecoveryConfigArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventhubNamespaceDisasterRecoveryConfigArrayOutput)
}
// EventhubNamespaceDisasterRecoveryConfigMapInput is an input type that accepts EventhubNamespaceDisasterRecoveryConfigMap and EventhubNamespaceDisasterRecoveryConfigMapOutput values.
// You can construct a concrete instance of `EventhubNamespaceDisasterRecoveryConfigMapInput` via:
//
// EventhubNamespaceDisasterRecoveryConfigMap{ "key": EventhubNamespaceDisasterRecoveryConfigArgs{...} }
type EventhubNamespaceDisasterRecoveryConfigMapInput interface {
pulumi.Input
ToEventhubNamespaceDisasterRecoveryConfigMapOutput() EventhubNamespaceDisasterRecoveryConfigMapOutput
ToEventhubNamespaceDisasterRecoveryConfigMapOutputWithContext(context.Context) EventhubNamespaceDisasterRecoveryConfigMapOutput
}
type EventhubNamespaceDisasterRecoveryConfigMap map[string]EventhubNamespaceDisasterRecoveryConfigInput
func (EventhubNamespaceDisasterRecoveryConfigMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventhubNamespaceDisasterRecoveryConfig)(nil)).Elem()
}
func (i EventhubNamespaceDisasterRecoveryConfigMap) ToEventhubNamespaceDisasterRecoveryConfigMapOutput() EventhubNamespaceDisasterRecoveryConfigMapOutput {
return i.ToEventhubNamespaceDisasterRecoveryConfigMapOutputWithContext(context.Background())
}
func (i EventhubNamespaceDisasterRecoveryConfigMap) ToEventhubNamespaceDisasterRecoveryConfigMapOutputWithContext(ctx context.Context) EventhubNamespaceDisasterRecoveryConfigMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventhubNamespaceDisasterRecoveryConfigMapOutput)
}
type EventhubNamespaceDisasterRecoveryConfigOutput struct{ *pulumi.OutputState }
func (EventhubNamespaceDisasterRecoveryConfigOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EventhubNamespaceDisasterRecoveryConfig)(nil)).Elem()
}
func (o EventhubNamespaceDisasterRecoveryConfigOutput) ToEventhubNamespaceDisasterRecoveryConfigOutput() EventhubNamespaceDisasterRecoveryConfigOutput {
return o
}
func (o EventhubNamespaceDisasterRecoveryConfigOutput) ToEventhubNamespaceDisasterRecoveryConfigOutputWithContext(ctx context.Context) EventhubNamespaceDisasterRecoveryConfigOutput {
return o
}
// Specifies the name of the Disaster Recovery Config. Changing this forces a new resource to be created.
func (o EventhubNamespaceDisasterRecoveryConfigOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EventhubNamespaceDisasterRecoveryConfig) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the name of the primary EventHub Namespace to replicate. Changing this forces a new resource to be created.
func (o EventhubNamespaceDisasterRecoveryConfigOutput) NamespaceName() pulumi.StringOutput {
return o.ApplyT(func(v *EventhubNamespaceDisasterRecoveryConfig) pulumi.StringOutput { return v.NamespaceName }).(pulumi.StringOutput)
}
// The ID of the EventHub Namespace to replicate to.
func (o EventhubNamespaceDisasterRecoveryConfigOutput) PartnerNamespaceId() pulumi.StringOutput {
return o.ApplyT(func(v *EventhubNamespaceDisasterRecoveryConfig) pulumi.StringOutput { return v.PartnerNamespaceId }).(pulumi.StringOutput)
}
// The name of the resource group in which the Disaster Recovery Config exists. Changing this forces a new resource to be created.
func (o EventhubNamespaceDisasterRecoveryConfigOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *EventhubNamespaceDisasterRecoveryConfig) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type EventhubNamespaceDisasterRecoveryConfigArrayOutput struct{ *pulumi.OutputState }
func (EventhubNamespaceDisasterRecoveryConfigArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventhubNamespaceDisasterRecoveryConfig)(nil)).Elem()
}
func (o EventhubNamespaceDisasterRecoveryConfigArrayOutput) ToEventhubNamespaceDisasterRecoveryConfigArrayOutput() EventhubNamespaceDisasterRecoveryConfigArrayOutput {
return o
}
func (o EventhubNamespaceDisasterRecoveryConfigArrayOutput) ToEventhubNamespaceDisasterRecoveryConfigArrayOutputWithContext(ctx context.Context) EventhubNamespaceDisasterRecoveryConfigArrayOutput {
return o
}
func (o EventhubNamespaceDisasterRecoveryConfigArrayOutput) Index(i pulumi.IntInput) EventhubNamespaceDisasterRecoveryConfigOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EventhubNamespaceDisasterRecoveryConfig {
return vs[0].([]*EventhubNamespaceDisasterRecoveryConfig)[vs[1].(int)]
}).(EventhubNamespaceDisasterRecoveryConfigOutput)
}
type EventhubNamespaceDisasterRecoveryConfigMapOutput struct{ *pulumi.OutputState }
func (EventhubNamespaceDisasterRecoveryConfigMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventhubNamespaceDisasterRecoveryConfig)(nil)).Elem()
}
func (o EventhubNamespaceDisasterRecoveryConfigMapOutput) ToEventhubNamespaceDisasterRecoveryConfigMapOutput() EventhubNamespaceDisasterRecoveryConfigMapOutput {
return o
}
func (o EventhubNamespaceDisasterRecoveryConfigMapOutput) ToEventhubNamespaceDisasterRecoveryConfigMapOutputWithContext(ctx context.Context) EventhubNamespaceDisasterRecoveryConfigMapOutput {
return o
}
func (o EventhubNamespaceDisasterRecoveryConfigMapOutput) MapIndex(k pulumi.StringInput) EventhubNamespaceDisasterRecoveryConfigOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EventhubNamespaceDisasterRecoveryConfig {
return vs[0].(map[string]*EventhubNamespaceDisasterRecoveryConfig)[vs[1].(string)]
}).(EventhubNamespaceDisasterRecoveryConfigOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EventhubNamespaceDisasterRecoveryConfigInput)(nil)).Elem(), &EventhubNamespaceDisasterRecoveryConfig{})
pulumi.RegisterInputType(reflect.TypeOf((*EventhubNamespaceDisasterRecoveryConfigArrayInput)(nil)).Elem(), EventhubNamespaceDisasterRecoveryConfigArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EventhubNamespaceDisasterRecoveryConfigMapInput)(nil)).Elem(), EventhubNamespaceDisasterRecoveryConfigMap{})
pulumi.RegisterOutputType(EventhubNamespaceDisasterRecoveryConfigOutput{})
pulumi.RegisterOutputType(EventhubNamespaceDisasterRecoveryConfigArrayOutput{})
pulumi.RegisterOutputType(EventhubNamespaceDisasterRecoveryConfigMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/eventHubConsumerGroup.go | sdk/go/azure/eventhub/eventHubConsumerGroup.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Event Hubs Consumer Group as a nested resource within an Event 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/eventhub"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("acceptanceTestEventHubNamespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Basic"),
// Capacity: pulumi.Int(2),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
// Name: pulumi.String("acceptanceTestEventHub"),
// NamespaceName: exampleEventHubNamespace.Name,
// ResourceGroupName: example.Name,
// PartitionCount: pulumi.Int(2),
// MessageRetention: pulumi.Int(2),
// })
// if err != nil {
// return err
// }
// _, err = eventhub.NewConsumerGroup(ctx, "example", &eventhub.ConsumerGroupArgs{
// Name: pulumi.String("acceptanceTestEventHubConsumerGroup"),
// NamespaceName: exampleEventHubNamespace.Name,
// EventhubName: exampleEventHub.Name,
// ResourceGroupName: example.Name,
// UserMetadata: pulumi.String("some-meta-data"),
// })
// 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.EventHub` - 2024-01-01
//
// ## Import
//
// EventHub Consumer Groups can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/eventHubConsumerGroup:EventHubConsumerGroup consumerGroup1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1/eventhubs/eventhub1/consumerGroups/consumerGroup1
// ```
//
// Deprecated: azure.eventhub.EventHubConsumerGroup has been deprecated in favor of azure.eventhub.ConsumerGroup
type EventHubConsumerGroup struct {
pulumi.CustomResourceState
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName pulumi.StringOutput `pulumi:"eventhubName"`
// Specifies the name of the EventHub Consumer Group resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName pulumi.StringOutput `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Specifies the user metadata.
UserMetadata pulumi.StringPtrOutput `pulumi:"userMetadata"`
}
// NewEventHubConsumerGroup registers a new resource with the given unique name, arguments, and options.
func NewEventHubConsumerGroup(ctx *pulumi.Context,
name string, args *EventHubConsumerGroupArgs, opts ...pulumi.ResourceOption) (*EventHubConsumerGroup, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.EventhubName == nil {
return nil, errors.New("invalid value for required argument 'EventhubName'")
}
if args.NamespaceName == nil {
return nil, errors.New("invalid value for required argument 'NamespaceName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource EventHubConsumerGroup
err := ctx.RegisterResource("azure:eventhub/eventHubConsumerGroup:EventHubConsumerGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEventHubConsumerGroup gets an existing EventHubConsumerGroup 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 GetEventHubConsumerGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EventHubConsumerGroupState, opts ...pulumi.ResourceOption) (*EventHubConsumerGroup, error) {
var resource EventHubConsumerGroup
err := ctx.ReadResource("azure:eventhub/eventHubConsumerGroup:EventHubConsumerGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EventHubConsumerGroup resources.
type eventHubConsumerGroupState struct {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName *string `pulumi:"eventhubName"`
// Specifies the name of the EventHub Consumer Group resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName *string `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Specifies the user metadata.
UserMetadata *string `pulumi:"userMetadata"`
}
type EventHubConsumerGroupState struct {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName pulumi.StringPtrInput
// Specifies the name of the EventHub Consumer Group resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName pulumi.StringPtrInput
// The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Specifies the user metadata.
UserMetadata pulumi.StringPtrInput
}
func (EventHubConsumerGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*eventHubConsumerGroupState)(nil)).Elem()
}
type eventHubConsumerGroupArgs struct {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName string `pulumi:"eventhubName"`
// Specifies the name of the EventHub Consumer Group resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName string `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Specifies the user metadata.
UserMetadata *string `pulumi:"userMetadata"`
}
// The set of arguments for constructing a EventHubConsumerGroup resource.
type EventHubConsumerGroupArgs struct {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName pulumi.StringInput
// Specifies the name of the EventHub Consumer Group resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName pulumi.StringInput
// The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Specifies the user metadata.
UserMetadata pulumi.StringPtrInput
}
func (EventHubConsumerGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*eventHubConsumerGroupArgs)(nil)).Elem()
}
type EventHubConsumerGroupInput interface {
pulumi.Input
ToEventHubConsumerGroupOutput() EventHubConsumerGroupOutput
ToEventHubConsumerGroupOutputWithContext(ctx context.Context) EventHubConsumerGroupOutput
}
func (*EventHubConsumerGroup) ElementType() reflect.Type {
return reflect.TypeOf((**EventHubConsumerGroup)(nil)).Elem()
}
func (i *EventHubConsumerGroup) ToEventHubConsumerGroupOutput() EventHubConsumerGroupOutput {
return i.ToEventHubConsumerGroupOutputWithContext(context.Background())
}
func (i *EventHubConsumerGroup) ToEventHubConsumerGroupOutputWithContext(ctx context.Context) EventHubConsumerGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventHubConsumerGroupOutput)
}
// EventHubConsumerGroupArrayInput is an input type that accepts EventHubConsumerGroupArray and EventHubConsumerGroupArrayOutput values.
// You can construct a concrete instance of `EventHubConsumerGroupArrayInput` via:
//
// EventHubConsumerGroupArray{ EventHubConsumerGroupArgs{...} }
type EventHubConsumerGroupArrayInput interface {
pulumi.Input
ToEventHubConsumerGroupArrayOutput() EventHubConsumerGroupArrayOutput
ToEventHubConsumerGroupArrayOutputWithContext(context.Context) EventHubConsumerGroupArrayOutput
}
type EventHubConsumerGroupArray []EventHubConsumerGroupInput
func (EventHubConsumerGroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventHubConsumerGroup)(nil)).Elem()
}
func (i EventHubConsumerGroupArray) ToEventHubConsumerGroupArrayOutput() EventHubConsumerGroupArrayOutput {
return i.ToEventHubConsumerGroupArrayOutputWithContext(context.Background())
}
func (i EventHubConsumerGroupArray) ToEventHubConsumerGroupArrayOutputWithContext(ctx context.Context) EventHubConsumerGroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventHubConsumerGroupArrayOutput)
}
// EventHubConsumerGroupMapInput is an input type that accepts EventHubConsumerGroupMap and EventHubConsumerGroupMapOutput values.
// You can construct a concrete instance of `EventHubConsumerGroupMapInput` via:
//
// EventHubConsumerGroupMap{ "key": EventHubConsumerGroupArgs{...} }
type EventHubConsumerGroupMapInput interface {
pulumi.Input
ToEventHubConsumerGroupMapOutput() EventHubConsumerGroupMapOutput
ToEventHubConsumerGroupMapOutputWithContext(context.Context) EventHubConsumerGroupMapOutput
}
type EventHubConsumerGroupMap map[string]EventHubConsumerGroupInput
func (EventHubConsumerGroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventHubConsumerGroup)(nil)).Elem()
}
func (i EventHubConsumerGroupMap) ToEventHubConsumerGroupMapOutput() EventHubConsumerGroupMapOutput {
return i.ToEventHubConsumerGroupMapOutputWithContext(context.Background())
}
func (i EventHubConsumerGroupMap) ToEventHubConsumerGroupMapOutputWithContext(ctx context.Context) EventHubConsumerGroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventHubConsumerGroupMapOutput)
}
type EventHubConsumerGroupOutput struct{ *pulumi.OutputState }
func (EventHubConsumerGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EventHubConsumerGroup)(nil)).Elem()
}
func (o EventHubConsumerGroupOutput) ToEventHubConsumerGroupOutput() EventHubConsumerGroupOutput {
return o
}
func (o EventHubConsumerGroupOutput) ToEventHubConsumerGroupOutputWithContext(ctx context.Context) EventHubConsumerGroupOutput {
return o
}
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
func (o EventHubConsumerGroupOutput) EventhubName() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubConsumerGroup) pulumi.StringOutput { return v.EventhubName }).(pulumi.StringOutput)
}
// Specifies the name of the EventHub Consumer Group resource. Changing this forces a new resource to be created.
func (o EventHubConsumerGroupOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubConsumerGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
func (o EventHubConsumerGroupOutput) NamespaceName() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubConsumerGroup) pulumi.StringOutput { return v.NamespaceName }).(pulumi.StringOutput)
}
// The name of the resource group in which the EventHub Consumer Group's grandparent Namespace exists. Changing this forces a new resource to be created.
func (o EventHubConsumerGroupOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubConsumerGroup) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Specifies the user metadata.
func (o EventHubConsumerGroupOutput) UserMetadata() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EventHubConsumerGroup) pulumi.StringPtrOutput { return v.UserMetadata }).(pulumi.StringPtrOutput)
}
type EventHubConsumerGroupArrayOutput struct{ *pulumi.OutputState }
func (EventHubConsumerGroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventHubConsumerGroup)(nil)).Elem()
}
func (o EventHubConsumerGroupArrayOutput) ToEventHubConsumerGroupArrayOutput() EventHubConsumerGroupArrayOutput {
return o
}
func (o EventHubConsumerGroupArrayOutput) ToEventHubConsumerGroupArrayOutputWithContext(ctx context.Context) EventHubConsumerGroupArrayOutput {
return o
}
func (o EventHubConsumerGroupArrayOutput) Index(i pulumi.IntInput) EventHubConsumerGroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EventHubConsumerGroup {
return vs[0].([]*EventHubConsumerGroup)[vs[1].(int)]
}).(EventHubConsumerGroupOutput)
}
type EventHubConsumerGroupMapOutput struct{ *pulumi.OutputState }
func (EventHubConsumerGroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventHubConsumerGroup)(nil)).Elem()
}
func (o EventHubConsumerGroupMapOutput) ToEventHubConsumerGroupMapOutput() EventHubConsumerGroupMapOutput {
return o
}
func (o EventHubConsumerGroupMapOutput) ToEventHubConsumerGroupMapOutputWithContext(ctx context.Context) EventHubConsumerGroupMapOutput {
return o
}
func (o EventHubConsumerGroupMapOutput) MapIndex(k pulumi.StringInput) EventHubConsumerGroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EventHubConsumerGroup {
return vs[0].(map[string]*EventHubConsumerGroup)[vs[1].(string)]
}).(EventHubConsumerGroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EventHubConsumerGroupInput)(nil)).Elem(), &EventHubConsumerGroup{})
pulumi.RegisterInputType(reflect.TypeOf((*EventHubConsumerGroupArrayInput)(nil)).Elem(), EventHubConsumerGroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EventHubConsumerGroupMapInput)(nil)).Elem(), EventHubConsumerGroupMap{})
pulumi.RegisterOutputType(EventHubConsumerGroupOutput{})
pulumi.RegisterOutputType(EventHubConsumerGroupArrayOutput{})
pulumi.RegisterOutputType(EventHubConsumerGroupMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/eventHubAuthorizationRule.go | sdk/go/azure/eventhub/eventHubAuthorizationRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Event Hubs authorization Rule within an Event 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/eventhub"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("acceptanceTestEventHubNamespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Basic"),
// Capacity: pulumi.Int(2),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
// Name: pulumi.String("acceptanceTestEventHub"),
// NamespaceName: exampleEventHubNamespace.Name,
// ResourceGroupName: example.Name,
// PartitionCount: pulumi.Int(2),
// MessageRetention: pulumi.Int(2),
// })
// if err != nil {
// return err
// }
// _, err = eventhub.NewAuthorizationRule(ctx, "example", &eventhub.AuthorizationRuleArgs{
// Name: pulumi.String("navi"),
// NamespaceName: exampleEventHubNamespace.Name,
// EventhubName: exampleEventHub.Name,
// ResourceGroupName: example.Name,
// Listen: pulumi.Bool(true),
// Send: pulumi.Bool(false),
// Manage: 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.EventHub` - 2024-01-01
//
// ## Import
//
// EventHub Authorization Rules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/eventHubAuthorizationRule:EventHubAuthorizationRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1/eventhubs/eventhub1/authorizationRules/rule1
// ```
//
// Deprecated: azure.eventhub.EventHubAuthorizationRule has been deprecated in favor of azure.eventhub.AuthorizationRule
type EventHubAuthorizationRule struct {
pulumi.CustomResourceState
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName pulumi.StringOutput `pulumi:"eventhubName"`
// Does this Authorization Rule have permissions to Listen to the Event Hub? Defaults to `false`.
Listen pulumi.BoolPtrOutput `pulumi:"listen"`
// Does this Authorization Rule have permissions to Manage to the Event Hub? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrOutput `pulumi:"manage"`
// Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName pulumi.StringOutput `pulumi:"namespaceName"`
// The Primary Connection String for the Event Hubs authorization Rule.
PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"`
// The alias of the Primary Connection String for the Event Hubs authorization Rule, which is generated when disaster recovery is enabled.
PrimaryConnectionStringAlias pulumi.StringOutput `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the Event Hubs authorization Rule.
PrimaryKey pulumi.StringOutput `pulumi:"primaryKey"`
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Secondary Connection String for the Event Hubs Authorization Rule.
SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"`
// The alias of the Secondary Connection String for the Event Hubs Authorization Rule, which is generated when disaster recovery is enabled.
SecondaryConnectionStringAlias pulumi.StringOutput `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the Event Hubs Authorization Rule.
SecondaryKey pulumi.StringOutput `pulumi:"secondaryKey"`
// Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`.
Send pulumi.BoolPtrOutput `pulumi:"send"`
}
// NewEventHubAuthorizationRule registers a new resource with the given unique name, arguments, and options.
func NewEventHubAuthorizationRule(ctx *pulumi.Context,
name string, args *EventHubAuthorizationRuleArgs, opts ...pulumi.ResourceOption) (*EventHubAuthorizationRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.EventhubName == nil {
return nil, errors.New("invalid value for required argument 'EventhubName'")
}
if args.NamespaceName == nil {
return nil, errors.New("invalid value for required argument 'NamespaceName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryConnectionString",
"primaryConnectionStringAlias",
"primaryKey",
"secondaryConnectionString",
"secondaryConnectionStringAlias",
"secondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource EventHubAuthorizationRule
err := ctx.RegisterResource("azure:eventhub/eventHubAuthorizationRule:EventHubAuthorizationRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEventHubAuthorizationRule gets an existing EventHubAuthorizationRule 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 GetEventHubAuthorizationRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EventHubAuthorizationRuleState, opts ...pulumi.ResourceOption) (*EventHubAuthorizationRule, error) {
var resource EventHubAuthorizationRule
err := ctx.ReadResource("azure:eventhub/eventHubAuthorizationRule:EventHubAuthorizationRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EventHubAuthorizationRule resources.
type eventHubAuthorizationRuleState struct {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName *string `pulumi:"eventhubName"`
// Does this Authorization Rule have permissions to Listen to the Event Hub? Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Does this Authorization Rule have permissions to Manage to the Event Hub? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName *string `pulumi:"namespaceName"`
// The Primary Connection String for the Event Hubs authorization Rule.
PrimaryConnectionString *string `pulumi:"primaryConnectionString"`
// The alias of the Primary Connection String for the Event Hubs authorization Rule, which is generated when disaster recovery is enabled.
PrimaryConnectionStringAlias *string `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the Event Hubs authorization Rule.
PrimaryKey *string `pulumi:"primaryKey"`
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Secondary Connection String for the Event Hubs Authorization Rule.
SecondaryConnectionString *string `pulumi:"secondaryConnectionString"`
// The alias of the Secondary Connection String for the Event Hubs Authorization Rule, which is generated when disaster recovery is enabled.
SecondaryConnectionStringAlias *string `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the Event Hubs Authorization Rule.
SecondaryKey *string `pulumi:"secondaryKey"`
// Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`.
Send *bool `pulumi:"send"`
}
type EventHubAuthorizationRuleState struct {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName pulumi.StringPtrInput
// Does this Authorization Rule have permissions to Listen to the Event Hub? Defaults to `false`.
Listen pulumi.BoolPtrInput
// Does this Authorization Rule have permissions to Manage to the Event Hub? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName pulumi.StringPtrInput
// The Primary Connection String for the Event Hubs authorization Rule.
PrimaryConnectionString pulumi.StringPtrInput
// The alias of the Primary Connection String for the Event Hubs authorization Rule, which is generated when disaster recovery is enabled.
PrimaryConnectionStringAlias pulumi.StringPtrInput
// The Primary Key for the Event Hubs authorization Rule.
PrimaryKey pulumi.StringPtrInput
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
ResourceGroupName pulumi.StringPtrInput
// The Secondary Connection String for the Event Hubs Authorization Rule.
SecondaryConnectionString pulumi.StringPtrInput
// The alias of the Secondary Connection String for the Event Hubs Authorization Rule, which is generated when disaster recovery is enabled.
SecondaryConnectionStringAlias pulumi.StringPtrInput
// The Secondary Key for the Event Hubs Authorization Rule.
SecondaryKey pulumi.StringPtrInput
// Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`.
Send pulumi.BoolPtrInput
}
func (EventHubAuthorizationRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*eventHubAuthorizationRuleState)(nil)).Elem()
}
type eventHubAuthorizationRuleArgs struct {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName string `pulumi:"eventhubName"`
// Does this Authorization Rule have permissions to Listen to the Event Hub? Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Does this Authorization Rule have permissions to Manage to the Event Hub? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName string `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`.
Send *bool `pulumi:"send"`
}
// The set of arguments for constructing a EventHubAuthorizationRule resource.
type EventHubAuthorizationRuleArgs struct {
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
EventhubName pulumi.StringInput
// Does this Authorization Rule have permissions to Listen to the Event Hub? Defaults to `false`.
Listen pulumi.BoolPtrInput
// Does this Authorization Rule have permissions to Manage to the Event Hub? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
NamespaceName pulumi.StringInput
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
ResourceGroupName pulumi.StringInput
// Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`.
Send pulumi.BoolPtrInput
}
func (EventHubAuthorizationRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*eventHubAuthorizationRuleArgs)(nil)).Elem()
}
type EventHubAuthorizationRuleInput interface {
pulumi.Input
ToEventHubAuthorizationRuleOutput() EventHubAuthorizationRuleOutput
ToEventHubAuthorizationRuleOutputWithContext(ctx context.Context) EventHubAuthorizationRuleOutput
}
func (*EventHubAuthorizationRule) ElementType() reflect.Type {
return reflect.TypeOf((**EventHubAuthorizationRule)(nil)).Elem()
}
func (i *EventHubAuthorizationRule) ToEventHubAuthorizationRuleOutput() EventHubAuthorizationRuleOutput {
return i.ToEventHubAuthorizationRuleOutputWithContext(context.Background())
}
func (i *EventHubAuthorizationRule) ToEventHubAuthorizationRuleOutputWithContext(ctx context.Context) EventHubAuthorizationRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventHubAuthorizationRuleOutput)
}
// EventHubAuthorizationRuleArrayInput is an input type that accepts EventHubAuthorizationRuleArray and EventHubAuthorizationRuleArrayOutput values.
// You can construct a concrete instance of `EventHubAuthorizationRuleArrayInput` via:
//
// EventHubAuthorizationRuleArray{ EventHubAuthorizationRuleArgs{...} }
type EventHubAuthorizationRuleArrayInput interface {
pulumi.Input
ToEventHubAuthorizationRuleArrayOutput() EventHubAuthorizationRuleArrayOutput
ToEventHubAuthorizationRuleArrayOutputWithContext(context.Context) EventHubAuthorizationRuleArrayOutput
}
type EventHubAuthorizationRuleArray []EventHubAuthorizationRuleInput
func (EventHubAuthorizationRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventHubAuthorizationRule)(nil)).Elem()
}
func (i EventHubAuthorizationRuleArray) ToEventHubAuthorizationRuleArrayOutput() EventHubAuthorizationRuleArrayOutput {
return i.ToEventHubAuthorizationRuleArrayOutputWithContext(context.Background())
}
func (i EventHubAuthorizationRuleArray) ToEventHubAuthorizationRuleArrayOutputWithContext(ctx context.Context) EventHubAuthorizationRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventHubAuthorizationRuleArrayOutput)
}
// EventHubAuthorizationRuleMapInput is an input type that accepts EventHubAuthorizationRuleMap and EventHubAuthorizationRuleMapOutput values.
// You can construct a concrete instance of `EventHubAuthorizationRuleMapInput` via:
//
// EventHubAuthorizationRuleMap{ "key": EventHubAuthorizationRuleArgs{...} }
type EventHubAuthorizationRuleMapInput interface {
pulumi.Input
ToEventHubAuthorizationRuleMapOutput() EventHubAuthorizationRuleMapOutput
ToEventHubAuthorizationRuleMapOutputWithContext(context.Context) EventHubAuthorizationRuleMapOutput
}
type EventHubAuthorizationRuleMap map[string]EventHubAuthorizationRuleInput
func (EventHubAuthorizationRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventHubAuthorizationRule)(nil)).Elem()
}
func (i EventHubAuthorizationRuleMap) ToEventHubAuthorizationRuleMapOutput() EventHubAuthorizationRuleMapOutput {
return i.ToEventHubAuthorizationRuleMapOutputWithContext(context.Background())
}
func (i EventHubAuthorizationRuleMap) ToEventHubAuthorizationRuleMapOutputWithContext(ctx context.Context) EventHubAuthorizationRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventHubAuthorizationRuleMapOutput)
}
type EventHubAuthorizationRuleOutput struct{ *pulumi.OutputState }
func (EventHubAuthorizationRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EventHubAuthorizationRule)(nil)).Elem()
}
func (o EventHubAuthorizationRuleOutput) ToEventHubAuthorizationRuleOutput() EventHubAuthorizationRuleOutput {
return o
}
func (o EventHubAuthorizationRuleOutput) ToEventHubAuthorizationRuleOutputWithContext(ctx context.Context) EventHubAuthorizationRuleOutput {
return o
}
// Specifies the name of the EventHub. Changing this forces a new resource to be created.
func (o EventHubAuthorizationRuleOutput) EventhubName() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubAuthorizationRule) pulumi.StringOutput { return v.EventhubName }).(pulumi.StringOutput)
}
// Does this Authorization Rule have permissions to Listen to the Event Hub? Defaults to `false`.
func (o EventHubAuthorizationRuleOutput) Listen() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EventHubAuthorizationRule) pulumi.BoolPtrOutput { return v.Listen }).(pulumi.BoolPtrOutput)
}
// Does this Authorization Rule have permissions to Manage to the Event Hub? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
func (o EventHubAuthorizationRuleOutput) Manage() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EventHubAuthorizationRule) pulumi.BoolPtrOutput { return v.Manage }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the EventHub Authorization Rule resource. Changing this forces a new resource to be created.
func (o EventHubAuthorizationRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubAuthorizationRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the name of the grandparent EventHub Namespace. Changing this forces a new resource to be created.
func (o EventHubAuthorizationRuleOutput) NamespaceName() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubAuthorizationRule) pulumi.StringOutput { return v.NamespaceName }).(pulumi.StringOutput)
}
// The Primary Connection String for the Event Hubs authorization Rule.
func (o EventHubAuthorizationRuleOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the Primary Connection String for the Event Hubs authorization Rule, which is generated when disaster recovery is enabled.
func (o EventHubAuthorizationRuleOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Primary Key for the Event Hubs authorization Rule.
func (o EventHubAuthorizationRuleOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubAuthorizationRule) pulumi.StringOutput { return v.PrimaryKey }).(pulumi.StringOutput)
}
// The name of the resource group in which the EventHub Namespace exists. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
func (o EventHubAuthorizationRuleOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubAuthorizationRule) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Secondary Connection String for the Event Hubs Authorization Rule.
func (o EventHubAuthorizationRuleOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubAuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the Secondary Connection String for the Event Hubs Authorization Rule, which is generated when disaster recovery is enabled.
func (o EventHubAuthorizationRuleOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubAuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Secondary Key for the Event Hubs Authorization Rule.
func (o EventHubAuthorizationRuleOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *EventHubAuthorizationRule) pulumi.StringOutput { return v.SecondaryKey }).(pulumi.StringOutput)
}
// Does this Authorization Rule have permissions to Send to the Event Hub? Defaults to `false`.
func (o EventHubAuthorizationRuleOutput) Send() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EventHubAuthorizationRule) pulumi.BoolPtrOutput { return v.Send }).(pulumi.BoolPtrOutput)
}
type EventHubAuthorizationRuleArrayOutput struct{ *pulumi.OutputState }
func (EventHubAuthorizationRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventHubAuthorizationRule)(nil)).Elem()
}
func (o EventHubAuthorizationRuleArrayOutput) ToEventHubAuthorizationRuleArrayOutput() EventHubAuthorizationRuleArrayOutput {
return o
}
func (o EventHubAuthorizationRuleArrayOutput) ToEventHubAuthorizationRuleArrayOutputWithContext(ctx context.Context) EventHubAuthorizationRuleArrayOutput {
return o
}
func (o EventHubAuthorizationRuleArrayOutput) Index(i pulumi.IntInput) EventHubAuthorizationRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EventHubAuthorizationRule {
return vs[0].([]*EventHubAuthorizationRule)[vs[1].(int)]
}).(EventHubAuthorizationRuleOutput)
}
type EventHubAuthorizationRuleMapOutput struct{ *pulumi.OutputState }
func (EventHubAuthorizationRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventHubAuthorizationRule)(nil)).Elem()
}
func (o EventHubAuthorizationRuleMapOutput) ToEventHubAuthorizationRuleMapOutput() EventHubAuthorizationRuleMapOutput {
return o
}
func (o EventHubAuthorizationRuleMapOutput) ToEventHubAuthorizationRuleMapOutputWithContext(ctx context.Context) EventHubAuthorizationRuleMapOutput {
return o
}
func (o EventHubAuthorizationRuleMapOutput) MapIndex(k pulumi.StringInput) EventHubAuthorizationRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EventHubAuthorizationRule {
return vs[0].(map[string]*EventHubAuthorizationRule)[vs[1].(string)]
}).(EventHubAuthorizationRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EventHubAuthorizationRuleInput)(nil)).Elem(), &EventHubAuthorizationRule{})
pulumi.RegisterInputType(reflect.TypeOf((*EventHubAuthorizationRuleArrayInput)(nil)).Elem(), EventHubAuthorizationRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EventHubAuthorizationRuleMapInput)(nil)).Elem(), EventHubAuthorizationRuleMap{})
pulumi.RegisterOutputType(EventHubAuthorizationRuleOutput{})
pulumi.RegisterOutputType(EventHubAuthorizationRuleArrayOutput{})
pulumi.RegisterOutputType(EventHubAuthorizationRuleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/topicAuthorizationRule.go | sdk/go/azure/eventhub/topicAuthorizationRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a ServiceBus Topic authorization Rule within a ServiceBus Topic.
//
// ## 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/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("tfex-servicebus"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
// Name: pulumi.String("tfex_servicebus_topic"),
// NamespaceId: exampleNamespace.ID(),
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewTopicAuthorizationRule(ctx, "example", &servicebus.TopicAuthorizationRuleArgs{
// Name: pulumi.String("tfex_servicebus_topic_sasPolicy"),
// TopicId: exampleTopic.ID(),
// Listen: pulumi.Bool(true),
// Send: pulumi.Bool(false),
// Manage: 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.ServiceBus` - 2024-01-01
//
// ## Import
//
// ServiceBus Topic authorization rules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/topicAuthorizationRule:TopicAuthorizationRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ServiceBus/namespaces/namespace1/topics/topic1/authorizationRules/rule1
// ```
//
// Deprecated: azure.eventhub.TopicAuthorizationRule has been deprecated in favor of azure.servicebus.TopicAuthorizationRule
type TopicAuthorizationRule struct {
pulumi.CustomResourceState
// Grants listen access to this this Authorization Rule. Defaults to `false`.
Listen pulumi.BoolPtrOutput `pulumi:"listen"`
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrOutput `pulumi:"manage"`
// Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The Primary Connection String for the ServiceBus Topic authorization Rule.
PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias pulumi.StringOutput `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the ServiceBus Topic authorization Rule.
PrimaryKey pulumi.StringOutput `pulumi:"primaryKey"`
// The Secondary Connection String for the ServiceBus Topic authorization Rule.
SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias pulumi.StringOutput `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the ServiceBus Topic authorization Rule.
SecondaryKey pulumi.StringOutput `pulumi:"secondaryKey"`
// Grants send access to this this Authorization Rule. Defaults to `false`.
Send pulumi.BoolPtrOutput `pulumi:"send"`
// Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
TopicId pulumi.StringOutput `pulumi:"topicId"`
}
// NewTopicAuthorizationRule registers a new resource with the given unique name, arguments, and options.
func NewTopicAuthorizationRule(ctx *pulumi.Context,
name string, args *TopicAuthorizationRuleArgs, opts ...pulumi.ResourceOption) (*TopicAuthorizationRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.TopicId == nil {
return nil, errors.New("invalid value for required argument 'TopicId'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryConnectionString",
"primaryConnectionStringAlias",
"primaryKey",
"secondaryConnectionString",
"secondaryConnectionStringAlias",
"secondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource TopicAuthorizationRule
err := ctx.RegisterResource("azure:eventhub/topicAuthorizationRule:TopicAuthorizationRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTopicAuthorizationRule gets an existing TopicAuthorizationRule 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 GetTopicAuthorizationRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TopicAuthorizationRuleState, opts ...pulumi.ResourceOption) (*TopicAuthorizationRule, error) {
var resource TopicAuthorizationRule
err := ctx.ReadResource("azure:eventhub/topicAuthorizationRule:TopicAuthorizationRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering TopicAuthorizationRule resources.
type topicAuthorizationRuleState struct {
// Grants listen access to this this Authorization Rule. Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The Primary Connection String for the ServiceBus Topic authorization Rule.
PrimaryConnectionString *string `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias *string `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the ServiceBus Topic authorization Rule.
PrimaryKey *string `pulumi:"primaryKey"`
// The Secondary Connection String for the ServiceBus Topic authorization Rule.
SecondaryConnectionString *string `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias *string `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the ServiceBus Topic authorization Rule.
SecondaryKey *string `pulumi:"secondaryKey"`
// Grants send access to this this Authorization Rule. Defaults to `false`.
Send *bool `pulumi:"send"`
// Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
TopicId *string `pulumi:"topicId"`
}
type TopicAuthorizationRuleState struct {
// Grants listen access to this this Authorization Rule. Defaults to `false`.
Listen pulumi.BoolPtrInput
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The Primary Connection String for the ServiceBus Topic authorization Rule.
PrimaryConnectionString pulumi.StringPtrInput
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias pulumi.StringPtrInput
// The Primary Key for the ServiceBus Topic authorization Rule.
PrimaryKey pulumi.StringPtrInput
// The Secondary Connection String for the ServiceBus Topic authorization Rule.
SecondaryConnectionString pulumi.StringPtrInput
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias pulumi.StringPtrInput
// The Secondary Key for the ServiceBus Topic authorization Rule.
SecondaryKey pulumi.StringPtrInput
// Grants send access to this this Authorization Rule. Defaults to `false`.
Send pulumi.BoolPtrInput
// Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
TopicId pulumi.StringPtrInput
}
func (TopicAuthorizationRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*topicAuthorizationRuleState)(nil)).Elem()
}
type topicAuthorizationRuleArgs struct {
// Grants listen access to this this Authorization Rule. Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Grants send access to this this Authorization Rule. Defaults to `false`.
Send *bool `pulumi:"send"`
// Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
TopicId string `pulumi:"topicId"`
}
// The set of arguments for constructing a TopicAuthorizationRule resource.
type TopicAuthorizationRuleArgs struct {
// Grants listen access to this this Authorization Rule. Defaults to `false`.
Listen pulumi.BoolPtrInput
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Grants send access to this this Authorization Rule. Defaults to `false`.
Send pulumi.BoolPtrInput
// Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
TopicId pulumi.StringInput
}
func (TopicAuthorizationRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*topicAuthorizationRuleArgs)(nil)).Elem()
}
type TopicAuthorizationRuleInput interface {
pulumi.Input
ToTopicAuthorizationRuleOutput() TopicAuthorizationRuleOutput
ToTopicAuthorizationRuleOutputWithContext(ctx context.Context) TopicAuthorizationRuleOutput
}
func (*TopicAuthorizationRule) ElementType() reflect.Type {
return reflect.TypeOf((**TopicAuthorizationRule)(nil)).Elem()
}
func (i *TopicAuthorizationRule) ToTopicAuthorizationRuleOutput() TopicAuthorizationRuleOutput {
return i.ToTopicAuthorizationRuleOutputWithContext(context.Background())
}
func (i *TopicAuthorizationRule) ToTopicAuthorizationRuleOutputWithContext(ctx context.Context) TopicAuthorizationRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(TopicAuthorizationRuleOutput)
}
// TopicAuthorizationRuleArrayInput is an input type that accepts TopicAuthorizationRuleArray and TopicAuthorizationRuleArrayOutput values.
// You can construct a concrete instance of `TopicAuthorizationRuleArrayInput` via:
//
// TopicAuthorizationRuleArray{ TopicAuthorizationRuleArgs{...} }
type TopicAuthorizationRuleArrayInput interface {
pulumi.Input
ToTopicAuthorizationRuleArrayOutput() TopicAuthorizationRuleArrayOutput
ToTopicAuthorizationRuleArrayOutputWithContext(context.Context) TopicAuthorizationRuleArrayOutput
}
type TopicAuthorizationRuleArray []TopicAuthorizationRuleInput
func (TopicAuthorizationRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TopicAuthorizationRule)(nil)).Elem()
}
func (i TopicAuthorizationRuleArray) ToTopicAuthorizationRuleArrayOutput() TopicAuthorizationRuleArrayOutput {
return i.ToTopicAuthorizationRuleArrayOutputWithContext(context.Background())
}
func (i TopicAuthorizationRuleArray) ToTopicAuthorizationRuleArrayOutputWithContext(ctx context.Context) TopicAuthorizationRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TopicAuthorizationRuleArrayOutput)
}
// TopicAuthorizationRuleMapInput is an input type that accepts TopicAuthorizationRuleMap and TopicAuthorizationRuleMapOutput values.
// You can construct a concrete instance of `TopicAuthorizationRuleMapInput` via:
//
// TopicAuthorizationRuleMap{ "key": TopicAuthorizationRuleArgs{...} }
type TopicAuthorizationRuleMapInput interface {
pulumi.Input
ToTopicAuthorizationRuleMapOutput() TopicAuthorizationRuleMapOutput
ToTopicAuthorizationRuleMapOutputWithContext(context.Context) TopicAuthorizationRuleMapOutput
}
type TopicAuthorizationRuleMap map[string]TopicAuthorizationRuleInput
func (TopicAuthorizationRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TopicAuthorizationRule)(nil)).Elem()
}
func (i TopicAuthorizationRuleMap) ToTopicAuthorizationRuleMapOutput() TopicAuthorizationRuleMapOutput {
return i.ToTopicAuthorizationRuleMapOutputWithContext(context.Background())
}
func (i TopicAuthorizationRuleMap) ToTopicAuthorizationRuleMapOutputWithContext(ctx context.Context) TopicAuthorizationRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(TopicAuthorizationRuleMapOutput)
}
type TopicAuthorizationRuleOutput struct{ *pulumi.OutputState }
func (TopicAuthorizationRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**TopicAuthorizationRule)(nil)).Elem()
}
func (o TopicAuthorizationRuleOutput) ToTopicAuthorizationRuleOutput() TopicAuthorizationRuleOutput {
return o
}
func (o TopicAuthorizationRuleOutput) ToTopicAuthorizationRuleOutputWithContext(ctx context.Context) TopicAuthorizationRuleOutput {
return o
}
// Grants listen access to this this Authorization Rule. Defaults to `false`.
func (o TopicAuthorizationRuleOutput) Listen() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.BoolPtrOutput { return v.Listen }).(pulumi.BoolPtrOutput)
}
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
func (o TopicAuthorizationRuleOutput) Manage() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.BoolPtrOutput { return v.Manage }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created.
func (o TopicAuthorizationRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The Primary Connection String for the ServiceBus Topic authorization Rule.
func (o TopicAuthorizationRuleOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
func (o TopicAuthorizationRuleOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Primary Key for the ServiceBus Topic authorization Rule.
func (o TopicAuthorizationRuleOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.PrimaryKey }).(pulumi.StringOutput)
}
// The Secondary Connection String for the ServiceBus Topic authorization Rule.
func (o TopicAuthorizationRuleOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias Secondary Connection String for the ServiceBus Namespace
func (o TopicAuthorizationRuleOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Secondary Key for the ServiceBus Topic authorization Rule.
func (o TopicAuthorizationRuleOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.SecondaryKey }).(pulumi.StringOutput)
}
// Grants send access to this this Authorization Rule. Defaults to `false`.
func (o TopicAuthorizationRuleOutput) Send() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.BoolPtrOutput { return v.Send }).(pulumi.BoolPtrOutput)
}
// Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
func (o TopicAuthorizationRuleOutput) TopicId() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.TopicId }).(pulumi.StringOutput)
}
type TopicAuthorizationRuleArrayOutput struct{ *pulumi.OutputState }
func (TopicAuthorizationRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TopicAuthorizationRule)(nil)).Elem()
}
func (o TopicAuthorizationRuleArrayOutput) ToTopicAuthorizationRuleArrayOutput() TopicAuthorizationRuleArrayOutput {
return o
}
func (o TopicAuthorizationRuleArrayOutput) ToTopicAuthorizationRuleArrayOutputWithContext(ctx context.Context) TopicAuthorizationRuleArrayOutput {
return o
}
func (o TopicAuthorizationRuleArrayOutput) Index(i pulumi.IntInput) TopicAuthorizationRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TopicAuthorizationRule {
return vs[0].([]*TopicAuthorizationRule)[vs[1].(int)]
}).(TopicAuthorizationRuleOutput)
}
type TopicAuthorizationRuleMapOutput struct{ *pulumi.OutputState }
func (TopicAuthorizationRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TopicAuthorizationRule)(nil)).Elem()
}
func (o TopicAuthorizationRuleMapOutput) ToTopicAuthorizationRuleMapOutput() TopicAuthorizationRuleMapOutput {
return o
}
func (o TopicAuthorizationRuleMapOutput) ToTopicAuthorizationRuleMapOutputWithContext(ctx context.Context) TopicAuthorizationRuleMapOutput {
return o
}
func (o TopicAuthorizationRuleMapOutput) MapIndex(k pulumi.StringInput) TopicAuthorizationRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TopicAuthorizationRule {
return vs[0].(map[string]*TopicAuthorizationRule)[vs[1].(string)]
}).(TopicAuthorizationRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TopicAuthorizationRuleInput)(nil)).Elem(), &TopicAuthorizationRule{})
pulumi.RegisterInputType(reflect.TypeOf((*TopicAuthorizationRuleArrayInput)(nil)).Elem(), TopicAuthorizationRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*TopicAuthorizationRuleMapInput)(nil)).Elem(), TopicAuthorizationRuleMap{})
pulumi.RegisterOutputType(TopicAuthorizationRuleOutput{})
pulumi.RegisterOutputType(TopicAuthorizationRuleArrayOutput{})
pulumi.RegisterOutputType(TopicAuthorizationRuleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/getSas.go | sdk/go/azure/eventhub/getSas.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
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 obtain a Shared Access Signature (SAS Token) for an existing Event 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/eventhub"
// "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
// }
// exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("example-ehn"),
// Location: exampleResourceGroup.Location,
// ResourceGroupName: exampleResourceGroup.Name,
// Sku: pulumi.String("Basic"),
// })
// if err != nil {
// return err
// }
// exampleEventHub, err := eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
// Name: pulumi.String("example-eh"),
// NamespaceName: exampleEventHubNamespace.Name,
// ResourceGroupName: exampleResourceGroup.Name,
// PartitionCount: pulumi.Int(1),
// MessageRetention: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// exampleAuthorizationRule, err := eventhub.NewAuthorizationRule(ctx, "example", &eventhub.AuthorizationRuleArgs{
// Name: pulumi.String("example-ehar"),
// NamespaceName: exampleEventHubNamespace.Name,
// EventhubName: exampleEventHub.Name,
// ResourceGroupName: exampleResourceGroup.Name,
// Listen: pulumi.Bool(true),
// Send: pulumi.Bool(true),
// Manage: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// example := eventhub.LookupAuthorizationRuleOutput(ctx, eventhub.GetAuthorizationRuleOutputArgs{
// Name: exampleAuthorizationRule.Name,
// NamespaceName: exampleEventHubNamespace.Name,
// EventhubName: exampleEventHub.Name,
// ResourceGroupName: exampleResourceGroup.Name,
// }, nil)
// _ = example.ApplyT(func(example eventhub.GetAuthorizationRuleResult) (eventhub.GetSasResult, error) {
// return eventhub.GetSasResult(interface{}(eventhub.GetSas(ctx, &eventhub.GetSasArgs{
// ConnectionString: example.PrimaryConnectionString,
// Expiry: "2023-06-23T00:00:00Z",
// }, nil))), nil
// }).(eventhub.GetSasResultOutput)
// return nil
// })
// }
//
// ```
func GetSas(ctx *pulumi.Context, args *GetSasArgs, opts ...pulumi.InvokeOption) (*GetSasResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetSasResult
err := ctx.Invoke("azure:eventhub/getSas:getSas", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSas.
type GetSasArgs struct {
// The connection string for the Event Hub to which this SAS applies.
ConnectionString string `pulumi:"connectionString"`
// The expiration time and date of this SAS. Must be a valid ISO-8601 format time/date string.
Expiry string `pulumi:"expiry"`
}
// A collection of values returned by getSas.
type GetSasResult struct {
ConnectionString string `pulumi:"connectionString"`
Expiry string `pulumi:"expiry"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The computed Event Hub Shared Access Signature (SAS).
Sas string `pulumi:"sas"`
}
func GetSasOutput(ctx *pulumi.Context, args GetSasOutputArgs, opts ...pulumi.InvokeOption) GetSasResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetSasResultOutput, error) {
args := v.(GetSasArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:eventhub/getSas:getSas", args, GetSasResultOutput{}, options).(GetSasResultOutput), nil
}).(GetSasResultOutput)
}
// A collection of arguments for invoking getSas.
type GetSasOutputArgs struct {
// The connection string for the Event Hub to which this SAS applies.
ConnectionString pulumi.StringInput `pulumi:"connectionString"`
// The expiration time and date of this SAS. Must be a valid ISO-8601 format time/date string.
Expiry pulumi.StringInput `pulumi:"expiry"`
}
func (GetSasOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetSasArgs)(nil)).Elem()
}
// A collection of values returned by getSas.
type GetSasResultOutput struct{ *pulumi.OutputState }
func (GetSasResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetSasResult)(nil)).Elem()
}
func (o GetSasResultOutput) ToGetSasResultOutput() GetSasResultOutput {
return o
}
func (o GetSasResultOutput) ToGetSasResultOutputWithContext(ctx context.Context) GetSasResultOutput {
return o
}
func (o GetSasResultOutput) ConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v GetSasResult) string { return v.ConnectionString }).(pulumi.StringOutput)
}
func (o GetSasResultOutput) Expiry() pulumi.StringOutput {
return o.ApplyT(func(v GetSasResult) string { return v.Expiry }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetSasResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetSasResult) string { return v.Id }).(pulumi.StringOutput)
}
// The computed Event Hub Shared Access Signature (SAS).
func (o GetSasResultOutput) Sas() pulumi.StringOutput {
return o.ApplyT(func(v GetSasResult) string { return v.Sas }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetSasResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/topic.go | sdk/go/azure/eventhub/topic.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a ServiceBus Topic.
//
// > **Note:** Topics can only be created in Namespaces with an SKU of `Standard` or higher.
//
// ## 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/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("tfex-servicebus-topic"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
// Name: pulumi.String("tfex_servicebus_topic"),
// NamespaceId: exampleNamespace.ID(),
// PartitioningEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ServiceBus` - 2024-01-01
//
// ## Import
//
// Service Bus Topics can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/topic:Topic example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/topics/sntopic1
// ```
//
// Deprecated: azure.eventhub.Topic has been deprecated in favor of azure.servicebus.Topic
type Topic struct {
pulumi.CustomResourceState
// The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle pulumi.StringPtrOutput `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls if server-side batched operations are enabled.
BatchedOperationsEnabled pulumi.BoolPtrOutput `pulumi:"batchedOperationsEnabled"`
// The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl pulumi.StringPtrOutput `pulumi:"defaultMessageTtl"`
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow pulumi.StringPtrOutput `pulumi:"duplicateDetectionHistoryTimeWindow"`
// Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
ExpressEnabled pulumi.BoolPtrOutput `pulumi:"expressEnabled"`
// Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`.
MaxMessageSizeInKilobytes pulumi.IntOutput `pulumi:"maxMessageSizeInKilobytes"`
// Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`.
MaxSizeInMegabytes pulumi.IntOutput `pulumi:"maxSizeInMegabytes"`
// Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
NamespaceId pulumi.StringOutput `pulumi:"namespaceId"`
NamespaceName pulumi.StringOutput `pulumi:"namespaceName"`
// Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. For premium namespaces, partitioning is available at namespace creation and all queues and topics in the partitioned namespace will be partitioned. Premium namespaces that have `premiumMessagingPartitions` set to `1` are not partitioned. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information.
PartitioningEnabled pulumi.BoolPtrOutput `pulumi:"partitioningEnabled"`
// Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created.
RequiresDuplicateDetection pulumi.BoolPtrOutput `pulumi:"requiresDuplicateDetection"`
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`.
Status pulumi.StringPtrOutput `pulumi:"status"`
// Boolean flag which controls whether the Topic supports ordering.
SupportOrdering pulumi.BoolPtrOutput `pulumi:"supportOrdering"`
}
// NewTopic registers a new resource with the given unique name, arguments, and options.
func NewTopic(ctx *pulumi.Context,
name string, args *TopicArgs, opts ...pulumi.ResourceOption) (*Topic, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NamespaceId == nil {
return nil, errors.New("invalid value for required argument 'NamespaceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Topic
err := ctx.RegisterResource("azure:eventhub/topic:Topic", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTopic gets an existing Topic 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 GetTopic(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TopicState, opts ...pulumi.ResourceOption) (*Topic, error) {
var resource Topic
err := ctx.ReadResource("azure:eventhub/topic:Topic", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Topic resources.
type topicState struct {
// The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle *string `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls if server-side batched operations are enabled.
BatchedOperationsEnabled *bool `pulumi:"batchedOperationsEnabled"`
// The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl *string `pulumi:"defaultMessageTtl"`
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow *string `pulumi:"duplicateDetectionHistoryTimeWindow"`
// Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
ExpressEnabled *bool `pulumi:"expressEnabled"`
// Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`.
MaxMessageSizeInKilobytes *int `pulumi:"maxMessageSizeInKilobytes"`
// Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`.
MaxSizeInMegabytes *int `pulumi:"maxSizeInMegabytes"`
// Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
NamespaceId *string `pulumi:"namespaceId"`
NamespaceName *string `pulumi:"namespaceName"`
// Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. For premium namespaces, partitioning is available at namespace creation and all queues and topics in the partitioned namespace will be partitioned. Premium namespaces that have `premiumMessagingPartitions` set to `1` are not partitioned. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information.
PartitioningEnabled *bool `pulumi:"partitioningEnabled"`
// Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created.
RequiresDuplicateDetection *bool `pulumi:"requiresDuplicateDetection"`
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`.
Status *string `pulumi:"status"`
// Boolean flag which controls whether the Topic supports ordering.
SupportOrdering *bool `pulumi:"supportOrdering"`
}
type TopicState struct {
// The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle pulumi.StringPtrInput
// Boolean flag which controls if server-side batched operations are enabled.
BatchedOperationsEnabled pulumi.BoolPtrInput
// The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl pulumi.StringPtrInput
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow pulumi.StringPtrInput
// Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
ExpressEnabled pulumi.BoolPtrInput
// Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`.
MaxMessageSizeInKilobytes pulumi.IntPtrInput
// Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`.
MaxSizeInMegabytes pulumi.IntPtrInput
// Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
NamespaceId pulumi.StringPtrInput
NamespaceName pulumi.StringPtrInput
// Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. For premium namespaces, partitioning is available at namespace creation and all queues and topics in the partitioned namespace will be partitioned. Premium namespaces that have `premiumMessagingPartitions` set to `1` are not partitioned. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information.
PartitioningEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created.
RequiresDuplicateDetection pulumi.BoolPtrInput
ResourceGroupName pulumi.StringPtrInput
// The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`.
Status pulumi.StringPtrInput
// Boolean flag which controls whether the Topic supports ordering.
SupportOrdering pulumi.BoolPtrInput
}
func (TopicState) ElementType() reflect.Type {
return reflect.TypeOf((*topicState)(nil)).Elem()
}
type topicArgs struct {
// The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle *string `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls if server-side batched operations are enabled.
BatchedOperationsEnabled *bool `pulumi:"batchedOperationsEnabled"`
// The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl *string `pulumi:"defaultMessageTtl"`
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow *string `pulumi:"duplicateDetectionHistoryTimeWindow"`
// Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
ExpressEnabled *bool `pulumi:"expressEnabled"`
// Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`.
MaxMessageSizeInKilobytes *int `pulumi:"maxMessageSizeInKilobytes"`
// Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`.
MaxSizeInMegabytes *int `pulumi:"maxSizeInMegabytes"`
// Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
NamespaceId string `pulumi:"namespaceId"`
// Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. For premium namespaces, partitioning is available at namespace creation and all queues and topics in the partitioned namespace will be partitioned. Premium namespaces that have `premiumMessagingPartitions` set to `1` are not partitioned. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information.
PartitioningEnabled *bool `pulumi:"partitioningEnabled"`
// Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created.
RequiresDuplicateDetection *bool `pulumi:"requiresDuplicateDetection"`
// The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`.
Status *string `pulumi:"status"`
// Boolean flag which controls whether the Topic supports ordering.
SupportOrdering *bool `pulumi:"supportOrdering"`
}
// The set of arguments for constructing a Topic resource.
type TopicArgs struct {
// The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle pulumi.StringPtrInput
// Boolean flag which controls if server-side batched operations are enabled.
BatchedOperationsEnabled pulumi.BoolPtrInput
// The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl pulumi.StringPtrInput
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow pulumi.StringPtrInput
// Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
ExpressEnabled pulumi.BoolPtrInput
// Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`.
MaxMessageSizeInKilobytes pulumi.IntPtrInput
// Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`.
MaxSizeInMegabytes pulumi.IntPtrInput
// Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
NamespaceId pulumi.StringInput
// Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. For premium namespaces, partitioning is available at namespace creation and all queues and topics in the partitioned namespace will be partitioned. Premium namespaces that have `premiumMessagingPartitions` set to `1` are not partitioned. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information.
PartitioningEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created.
RequiresDuplicateDetection pulumi.BoolPtrInput
// The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`.
Status pulumi.StringPtrInput
// Boolean flag which controls whether the Topic supports ordering.
SupportOrdering pulumi.BoolPtrInput
}
func (TopicArgs) ElementType() reflect.Type {
return reflect.TypeOf((*topicArgs)(nil)).Elem()
}
type TopicInput interface {
pulumi.Input
ToTopicOutput() TopicOutput
ToTopicOutputWithContext(ctx context.Context) TopicOutput
}
func (*Topic) ElementType() reflect.Type {
return reflect.TypeOf((**Topic)(nil)).Elem()
}
func (i *Topic) ToTopicOutput() TopicOutput {
return i.ToTopicOutputWithContext(context.Background())
}
func (i *Topic) ToTopicOutputWithContext(ctx context.Context) TopicOutput {
return pulumi.ToOutputWithContext(ctx, i).(TopicOutput)
}
// TopicArrayInput is an input type that accepts TopicArray and TopicArrayOutput values.
// You can construct a concrete instance of `TopicArrayInput` via:
//
// TopicArray{ TopicArgs{...} }
type TopicArrayInput interface {
pulumi.Input
ToTopicArrayOutput() TopicArrayOutput
ToTopicArrayOutputWithContext(context.Context) TopicArrayOutput
}
type TopicArray []TopicInput
func (TopicArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Topic)(nil)).Elem()
}
func (i TopicArray) ToTopicArrayOutput() TopicArrayOutput {
return i.ToTopicArrayOutputWithContext(context.Background())
}
func (i TopicArray) ToTopicArrayOutputWithContext(ctx context.Context) TopicArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TopicArrayOutput)
}
// TopicMapInput is an input type that accepts TopicMap and TopicMapOutput values.
// You can construct a concrete instance of `TopicMapInput` via:
//
// TopicMap{ "key": TopicArgs{...} }
type TopicMapInput interface {
pulumi.Input
ToTopicMapOutput() TopicMapOutput
ToTopicMapOutputWithContext(context.Context) TopicMapOutput
}
type TopicMap map[string]TopicInput
func (TopicMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Topic)(nil)).Elem()
}
func (i TopicMap) ToTopicMapOutput() TopicMapOutput {
return i.ToTopicMapOutputWithContext(context.Background())
}
func (i TopicMap) ToTopicMapOutputWithContext(ctx context.Context) TopicMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(TopicMapOutput)
}
type TopicOutput struct{ *pulumi.OutputState }
func (TopicOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Topic)(nil)).Elem()
}
func (o TopicOutput) ToTopicOutput() TopicOutput {
return o
}
func (o TopicOutput) ToTopicOutputWithContext(ctx context.Context) TopicOutput {
return o
}
// The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`.
func (o TopicOutput) AutoDeleteOnIdle() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.StringPtrOutput { return v.AutoDeleteOnIdle }).(pulumi.StringPtrOutput)
}
// Boolean flag which controls if server-side batched operations are enabled.
func (o TopicOutput) BatchedOperationsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.BoolPtrOutput { return v.BatchedOperationsEnabled }).(pulumi.BoolPtrOutput)
}
// The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`.
func (o TopicOutput) DefaultMessageTtl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.StringPtrOutput { return v.DefaultMessageTtl }).(pulumi.StringPtrOutput)
}
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
func (o TopicOutput) DuplicateDetectionHistoryTimeWindow() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.StringPtrOutput { return v.DuplicateDetectionHistoryTimeWindow }).(pulumi.StringPtrOutput)
}
// Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
func (o TopicOutput) ExpressEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.BoolPtrOutput { return v.ExpressEnabled }).(pulumi.BoolPtrOutput)
}
// Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`.
func (o TopicOutput) MaxMessageSizeInKilobytes() pulumi.IntOutput {
return o.ApplyT(func(v *Topic) pulumi.IntOutput { return v.MaxMessageSizeInKilobytes }).(pulumi.IntOutput)
}
// Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`.
func (o TopicOutput) MaxSizeInMegabytes() pulumi.IntOutput {
return o.ApplyT(func(v *Topic) pulumi.IntOutput { return v.MaxSizeInMegabytes }).(pulumi.IntOutput)
}
// Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
func (o TopicOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Topic) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
func (o TopicOutput) NamespaceId() pulumi.StringOutput {
return o.ApplyT(func(v *Topic) pulumi.StringOutput { return v.NamespaceId }).(pulumi.StringOutput)
}
func (o TopicOutput) NamespaceName() pulumi.StringOutput {
return o.ApplyT(func(v *Topic) pulumi.StringOutput { return v.NamespaceName }).(pulumi.StringOutput)
}
// Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. For premium namespaces, partitioning is available at namespace creation and all queues and topics in the partitioned namespace will be partitioned. Premium namespaces that have `premiumMessagingPartitions` set to `1` are not partitioned. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information.
func (o TopicOutput) PartitioningEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.BoolPtrOutput { return v.PartitioningEnabled }).(pulumi.BoolPtrOutput)
}
// Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created.
func (o TopicOutput) RequiresDuplicateDetection() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.BoolPtrOutput { return v.RequiresDuplicateDetection }).(pulumi.BoolPtrOutput)
}
func (o TopicOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Topic) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`.
func (o TopicOutput) Status() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.StringPtrOutput { return v.Status }).(pulumi.StringPtrOutput)
}
// Boolean flag which controls whether the Topic supports ordering.
func (o TopicOutput) SupportOrdering() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.BoolPtrOutput { return v.SupportOrdering }).(pulumi.BoolPtrOutput)
}
type TopicArrayOutput struct{ *pulumi.OutputState }
func (TopicArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Topic)(nil)).Elem()
}
func (o TopicArrayOutput) ToTopicArrayOutput() TopicArrayOutput {
return o
}
func (o TopicArrayOutput) ToTopicArrayOutputWithContext(ctx context.Context) TopicArrayOutput {
return o
}
func (o TopicArrayOutput) Index(i pulumi.IntInput) TopicOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Topic {
return vs[0].([]*Topic)[vs[1].(int)]
}).(TopicOutput)
}
type TopicMapOutput struct{ *pulumi.OutputState }
func (TopicMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Topic)(nil)).Elem()
}
func (o TopicMapOutput) ToTopicMapOutput() TopicMapOutput {
return o
}
func (o TopicMapOutput) ToTopicMapOutputWithContext(ctx context.Context) TopicMapOutput {
return o
}
func (o TopicMapOutput) MapIndex(k pulumi.StringInput) TopicOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Topic {
return vs[0].(map[string]*Topic)[vs[1].(string)]
}).(TopicOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TopicInput)(nil)).Elem(), &Topic{})
pulumi.RegisterInputType(reflect.TypeOf((*TopicArrayInput)(nil)).Elem(), TopicArray{})
pulumi.RegisterInputType(reflect.TypeOf((*TopicMapInput)(nil)).Elem(), TopicMap{})
pulumi.RegisterOutputType(TopicOutput{})
pulumi.RegisterOutputType(TopicArrayOutput{})
pulumi.RegisterOutputType(TopicMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/subscriptionRule.go | sdk/go/azure/eventhub/subscriptionRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a ServiceBus Subscription Rule.
//
// ## Example Usage
//
// ### SQL Filter)
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "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("tfex-servicebus-subscription-rule-sql"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
// Name: pulumi.String("tfex_servicebus_topic"),
// NamespaceId: exampleNamespace.ID(),
// EnablePartitioning: true,
// })
// if err != nil {
// return err
// }
// exampleSubscription, err := servicebus.NewSubscription(ctx, "example", &servicebus.SubscriptionArgs{
// Name: pulumi.String("tfex_servicebus_subscription"),
// TopicId: exampleTopic.ID(),
// MaxDeliveryCount: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewSubscriptionRule(ctx, "example", &servicebus.SubscriptionRuleArgs{
// Name: pulumi.String("tfex_servicebus_rule"),
// SubscriptionId: exampleSubscription.ID(),
// FilterType: pulumi.String("SqlFilter"),
// SqlFilter: pulumi.String("colour = 'red'"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### Correlation Filter)
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "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("tfex-servicebus-subscription-rule-cor"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
// Name: pulumi.String("tfex_servicebus_topic"),
// NamespaceId: exampleNamespace.ID(),
// EnablePartitioning: true,
// })
// if err != nil {
// return err
// }
// exampleSubscription, err := servicebus.NewSubscription(ctx, "example", &servicebus.SubscriptionArgs{
// Name: pulumi.String("tfex_servicebus_subscription"),
// TopicId: exampleTopic.ID(),
// MaxDeliveryCount: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewSubscriptionRule(ctx, "example", &servicebus.SubscriptionRuleArgs{
// Name: pulumi.String("tfex_servicebus_rule"),
// SubscriptionId: exampleSubscription.ID(),
// FilterType: pulumi.String("CorrelationFilter"),
// CorrelationFilter: &servicebus.SubscriptionRuleCorrelationFilterArgs{
// CorrelationId: pulumi.String("high"),
// Label: pulumi.String("red"),
// Properties: pulumi.StringMap{
// "customProperty": pulumi.String("value"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ServiceBus` - 2024-01-01
//
// ## Import
//
// Service Bus Subscription Rule can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/subscriptionRule:SubscriptionRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/topics/sntopic1/subscriptions/sbsub1/rules/sbrule1
// ```
//
// Deprecated: azure.eventhub.SubscriptionRule has been deprecated in favor of azure.servicebus.SubscriptionRule
type SubscriptionRule struct {
pulumi.CustomResourceState
// Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
Action pulumi.StringPtrOutput `pulumi:"action"`
// A `correlationFilter` block as documented below to be evaluated against a BrokeredMessage. Required when `filterType` is set to `CorrelationFilter`.
CorrelationFilter SubscriptionRuleCorrelationFilterPtrOutput `pulumi:"correlationFilter"`
// Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
FilterType pulumi.StringOutput `pulumi:"filterType"`
// Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filterType` is set to `SqlFilter`.
SqlFilter pulumi.StringPtrOutput `pulumi:"sqlFilter"`
SqlFilterCompatibilityLevel pulumi.IntOutput `pulumi:"sqlFilterCompatibilityLevel"`
// The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"`
}
// NewSubscriptionRule registers a new resource with the given unique name, arguments, and options.
func NewSubscriptionRule(ctx *pulumi.Context,
name string, args *SubscriptionRuleArgs, opts ...pulumi.ResourceOption) (*SubscriptionRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.FilterType == nil {
return nil, errors.New("invalid value for required argument 'FilterType'")
}
if args.SubscriptionId == nil {
return nil, errors.New("invalid value for required argument 'SubscriptionId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SubscriptionRule
err := ctx.RegisterResource("azure:eventhub/subscriptionRule:SubscriptionRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSubscriptionRule gets an existing SubscriptionRule 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 GetSubscriptionRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SubscriptionRuleState, opts ...pulumi.ResourceOption) (*SubscriptionRule, error) {
var resource SubscriptionRule
err := ctx.ReadResource("azure:eventhub/subscriptionRule:SubscriptionRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SubscriptionRule resources.
type subscriptionRuleState struct {
// Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
Action *string `pulumi:"action"`
// A `correlationFilter` block as documented below to be evaluated against a BrokeredMessage. Required when `filterType` is set to `CorrelationFilter`.
CorrelationFilter *SubscriptionRuleCorrelationFilter `pulumi:"correlationFilter"`
// Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
FilterType *string `pulumi:"filterType"`
// Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filterType` is set to `SqlFilter`.
SqlFilter *string `pulumi:"sqlFilter"`
SqlFilterCompatibilityLevel *int `pulumi:"sqlFilterCompatibilityLevel"`
// The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
SubscriptionId *string `pulumi:"subscriptionId"`
}
type SubscriptionRuleState struct {
// Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
Action pulumi.StringPtrInput
// A `correlationFilter` block as documented below to be evaluated against a BrokeredMessage. Required when `filterType` is set to `CorrelationFilter`.
CorrelationFilter SubscriptionRuleCorrelationFilterPtrInput
// Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
FilterType pulumi.StringPtrInput
// Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filterType` is set to `SqlFilter`.
SqlFilter pulumi.StringPtrInput
SqlFilterCompatibilityLevel pulumi.IntPtrInput
// The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
SubscriptionId pulumi.StringPtrInput
}
func (SubscriptionRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*subscriptionRuleState)(nil)).Elem()
}
type subscriptionRuleArgs struct {
// Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
Action *string `pulumi:"action"`
// A `correlationFilter` block as documented below to be evaluated against a BrokeredMessage. Required when `filterType` is set to `CorrelationFilter`.
CorrelationFilter *SubscriptionRuleCorrelationFilter `pulumi:"correlationFilter"`
// Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
FilterType string `pulumi:"filterType"`
// Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filterType` is set to `SqlFilter`.
SqlFilter *string `pulumi:"sqlFilter"`
// The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
SubscriptionId string `pulumi:"subscriptionId"`
}
// The set of arguments for constructing a SubscriptionRule resource.
type SubscriptionRuleArgs struct {
// Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
Action pulumi.StringPtrInput
// A `correlationFilter` block as documented below to be evaluated against a BrokeredMessage. Required when `filterType` is set to `CorrelationFilter`.
CorrelationFilter SubscriptionRuleCorrelationFilterPtrInput
// Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
FilterType pulumi.StringInput
// Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filterType` is set to `SqlFilter`.
SqlFilter pulumi.StringPtrInput
// The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
SubscriptionId pulumi.StringInput
}
func (SubscriptionRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*subscriptionRuleArgs)(nil)).Elem()
}
type SubscriptionRuleInput interface {
pulumi.Input
ToSubscriptionRuleOutput() SubscriptionRuleOutput
ToSubscriptionRuleOutputWithContext(ctx context.Context) SubscriptionRuleOutput
}
func (*SubscriptionRule) ElementType() reflect.Type {
return reflect.TypeOf((**SubscriptionRule)(nil)).Elem()
}
func (i *SubscriptionRule) ToSubscriptionRuleOutput() SubscriptionRuleOutput {
return i.ToSubscriptionRuleOutputWithContext(context.Background())
}
func (i *SubscriptionRule) ToSubscriptionRuleOutputWithContext(ctx context.Context) SubscriptionRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionRuleOutput)
}
// SubscriptionRuleArrayInput is an input type that accepts SubscriptionRuleArray and SubscriptionRuleArrayOutput values.
// You can construct a concrete instance of `SubscriptionRuleArrayInput` via:
//
// SubscriptionRuleArray{ SubscriptionRuleArgs{...} }
type SubscriptionRuleArrayInput interface {
pulumi.Input
ToSubscriptionRuleArrayOutput() SubscriptionRuleArrayOutput
ToSubscriptionRuleArrayOutputWithContext(context.Context) SubscriptionRuleArrayOutput
}
type SubscriptionRuleArray []SubscriptionRuleInput
func (SubscriptionRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SubscriptionRule)(nil)).Elem()
}
func (i SubscriptionRuleArray) ToSubscriptionRuleArrayOutput() SubscriptionRuleArrayOutput {
return i.ToSubscriptionRuleArrayOutputWithContext(context.Background())
}
func (i SubscriptionRuleArray) ToSubscriptionRuleArrayOutputWithContext(ctx context.Context) SubscriptionRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionRuleArrayOutput)
}
// SubscriptionRuleMapInput is an input type that accepts SubscriptionRuleMap and SubscriptionRuleMapOutput values.
// You can construct a concrete instance of `SubscriptionRuleMapInput` via:
//
// SubscriptionRuleMap{ "key": SubscriptionRuleArgs{...} }
type SubscriptionRuleMapInput interface {
pulumi.Input
ToSubscriptionRuleMapOutput() SubscriptionRuleMapOutput
ToSubscriptionRuleMapOutputWithContext(context.Context) SubscriptionRuleMapOutput
}
type SubscriptionRuleMap map[string]SubscriptionRuleInput
func (SubscriptionRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SubscriptionRule)(nil)).Elem()
}
func (i SubscriptionRuleMap) ToSubscriptionRuleMapOutput() SubscriptionRuleMapOutput {
return i.ToSubscriptionRuleMapOutputWithContext(context.Background())
}
func (i SubscriptionRuleMap) ToSubscriptionRuleMapOutputWithContext(ctx context.Context) SubscriptionRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionRuleMapOutput)
}
type SubscriptionRuleOutput struct{ *pulumi.OutputState }
func (SubscriptionRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SubscriptionRule)(nil)).Elem()
}
func (o SubscriptionRuleOutput) ToSubscriptionRuleOutput() SubscriptionRuleOutput {
return o
}
func (o SubscriptionRuleOutput) ToSubscriptionRuleOutputWithContext(ctx context.Context) SubscriptionRuleOutput {
return o
}
// Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
func (o SubscriptionRuleOutput) Action() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SubscriptionRule) pulumi.StringPtrOutput { return v.Action }).(pulumi.StringPtrOutput)
}
// A `correlationFilter` block as documented below to be evaluated against a BrokeredMessage. Required when `filterType` is set to `CorrelationFilter`.
func (o SubscriptionRuleOutput) CorrelationFilter() SubscriptionRuleCorrelationFilterPtrOutput {
return o.ApplyT(func(v *SubscriptionRule) SubscriptionRuleCorrelationFilterPtrOutput { return v.CorrelationFilter }).(SubscriptionRuleCorrelationFilterPtrOutput)
}
// Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
func (o SubscriptionRuleOutput) FilterType() pulumi.StringOutput {
return o.ApplyT(func(v *SubscriptionRule) pulumi.StringOutput { return v.FilterType }).(pulumi.StringOutput)
}
// Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
func (o SubscriptionRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SubscriptionRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filterType` is set to `SqlFilter`.
func (o SubscriptionRuleOutput) SqlFilter() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SubscriptionRule) pulumi.StringPtrOutput { return v.SqlFilter }).(pulumi.StringPtrOutput)
}
func (o SubscriptionRuleOutput) SqlFilterCompatibilityLevel() pulumi.IntOutput {
return o.ApplyT(func(v *SubscriptionRule) pulumi.IntOutput { return v.SqlFilterCompatibilityLevel }).(pulumi.IntOutput)
}
// The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
func (o SubscriptionRuleOutput) SubscriptionId() pulumi.StringOutput {
return o.ApplyT(func(v *SubscriptionRule) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput)
}
type SubscriptionRuleArrayOutput struct{ *pulumi.OutputState }
func (SubscriptionRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SubscriptionRule)(nil)).Elem()
}
func (o SubscriptionRuleArrayOutput) ToSubscriptionRuleArrayOutput() SubscriptionRuleArrayOutput {
return o
}
func (o SubscriptionRuleArrayOutput) ToSubscriptionRuleArrayOutputWithContext(ctx context.Context) SubscriptionRuleArrayOutput {
return o
}
func (o SubscriptionRuleArrayOutput) Index(i pulumi.IntInput) SubscriptionRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SubscriptionRule {
return vs[0].([]*SubscriptionRule)[vs[1].(int)]
}).(SubscriptionRuleOutput)
}
type SubscriptionRuleMapOutput struct{ *pulumi.OutputState }
func (SubscriptionRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SubscriptionRule)(nil)).Elem()
}
func (o SubscriptionRuleMapOutput) ToSubscriptionRuleMapOutput() SubscriptionRuleMapOutput {
return o
}
func (o SubscriptionRuleMapOutput) ToSubscriptionRuleMapOutputWithContext(ctx context.Context) SubscriptionRuleMapOutput {
return o
}
func (o SubscriptionRuleMapOutput) MapIndex(k pulumi.StringInput) SubscriptionRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SubscriptionRule {
return vs[0].(map[string]*SubscriptionRule)[vs[1].(string)]
}).(SubscriptionRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionRuleInput)(nil)).Elem(), &SubscriptionRule{})
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionRuleArrayInput)(nil)).Elem(), SubscriptionRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionRuleMapInput)(nil)).Elem(), SubscriptionRuleMap{})
pulumi.RegisterOutputType(SubscriptionRuleOutput{})
pulumi.RegisterOutputType(SubscriptionRuleArrayOutput{})
pulumi.RegisterOutputType(SubscriptionRuleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/namespaceAuthorizationRule.go | sdk/go/azure/eventhub/namespaceAuthorizationRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a ServiceBus Namespace authorization Rule within a ServiceBus.
//
// ## 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/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("my-servicebus"),
// Location: pulumi.String("West US"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewNamespaceAuthorizationRule(ctx, "example", &servicebus.NamespaceAuthorizationRuleArgs{
// Name: pulumi.String("examplerule"),
// NamespaceId: exampleNamespace.ID(),
// Listen: pulumi.Bool(true),
// Send: pulumi.Bool(true),
// Manage: 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.ServiceBus` - 2024-01-01
//
// ## Import
//
// ServiceBus Namespace authorization rules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/namespaceAuthorizationRule:NamespaceAuthorizationRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ServiceBus/namespaces/namespace1/authorizationRules/rule1
// ```
//
// Deprecated: azure.eventhub.NamespaceAuthorizationRule has been deprecated in favor of azure.servicebus.NamespaceAuthorizationRule
type NamespaceAuthorizationRule struct {
pulumi.CustomResourceState
// Grants listen access to this Authorization Rule. Defaults to `false`.
Listen pulumi.BoolPtrOutput `pulumi:"listen"`
// Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrOutput `pulumi:"manage"`
// Specifies the name of the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the ID of the ServiceBus Namespace. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
NamespaceId pulumi.StringOutput `pulumi:"namespaceId"`
// The Primary Connection String for the ServiceBus Namespace authorization Rule.
PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias pulumi.StringOutput `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the ServiceBus Namespace authorization Rule.
PrimaryKey pulumi.StringOutput `pulumi:"primaryKey"`
// The Secondary Connection String for the ServiceBus Namespace authorization Rule.
SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias pulumi.StringOutput `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the ServiceBus Namespace authorization Rule.
SecondaryKey pulumi.StringOutput `pulumi:"secondaryKey"`
// Grants send access to this Authorization Rule. Defaults to `false`.
Send pulumi.BoolPtrOutput `pulumi:"send"`
}
// NewNamespaceAuthorizationRule registers a new resource with the given unique name, arguments, and options.
func NewNamespaceAuthorizationRule(ctx *pulumi.Context,
name string, args *NamespaceAuthorizationRuleArgs, opts ...pulumi.ResourceOption) (*NamespaceAuthorizationRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NamespaceId == nil {
return nil, errors.New("invalid value for required argument 'NamespaceId'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryConnectionString",
"primaryConnectionStringAlias",
"primaryKey",
"secondaryConnectionString",
"secondaryConnectionStringAlias",
"secondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource NamespaceAuthorizationRule
err := ctx.RegisterResource("azure:eventhub/namespaceAuthorizationRule:NamespaceAuthorizationRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNamespaceAuthorizationRule gets an existing NamespaceAuthorizationRule 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 GetNamespaceAuthorizationRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NamespaceAuthorizationRuleState, opts ...pulumi.ResourceOption) (*NamespaceAuthorizationRule, error) {
var resource NamespaceAuthorizationRule
err := ctx.ReadResource("azure:eventhub/namespaceAuthorizationRule:NamespaceAuthorizationRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NamespaceAuthorizationRule resources.
type namespaceAuthorizationRuleState struct {
// Grants listen access to this Authorization Rule. Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the ServiceBus Namespace. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
NamespaceId *string `pulumi:"namespaceId"`
// The Primary Connection String for the ServiceBus Namespace authorization Rule.
PrimaryConnectionString *string `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias *string `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the ServiceBus Namespace authorization Rule.
PrimaryKey *string `pulumi:"primaryKey"`
// The Secondary Connection String for the ServiceBus Namespace authorization Rule.
SecondaryConnectionString *string `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias *string `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the ServiceBus Namespace authorization Rule.
SecondaryKey *string `pulumi:"secondaryKey"`
// Grants send access to this Authorization Rule. Defaults to `false`.
Send *bool `pulumi:"send"`
}
type NamespaceAuthorizationRuleState struct {
// Grants listen access to this Authorization Rule. Defaults to `false`.
Listen pulumi.BoolPtrInput
// Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the ServiceBus Namespace. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
NamespaceId pulumi.StringPtrInput
// The Primary Connection String for the ServiceBus Namespace authorization Rule.
PrimaryConnectionString pulumi.StringPtrInput
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias pulumi.StringPtrInput
// The Primary Key for the ServiceBus Namespace authorization Rule.
PrimaryKey pulumi.StringPtrInput
// The Secondary Connection String for the ServiceBus Namespace authorization Rule.
SecondaryConnectionString pulumi.StringPtrInput
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias pulumi.StringPtrInput
// The Secondary Key for the ServiceBus Namespace authorization Rule.
SecondaryKey pulumi.StringPtrInput
// Grants send access to this Authorization Rule. Defaults to `false`.
Send pulumi.BoolPtrInput
}
func (NamespaceAuthorizationRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceAuthorizationRuleState)(nil)).Elem()
}
type namespaceAuthorizationRuleArgs struct {
// Grants listen access to this Authorization Rule. Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the ServiceBus Namespace. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
NamespaceId string `pulumi:"namespaceId"`
// Grants send access to this Authorization Rule. Defaults to `false`.
Send *bool `pulumi:"send"`
}
// The set of arguments for constructing a NamespaceAuthorizationRule resource.
type NamespaceAuthorizationRuleArgs struct {
// Grants listen access to this Authorization Rule. Defaults to `false`.
Listen pulumi.BoolPtrInput
// Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the ServiceBus Namespace. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
NamespaceId pulumi.StringInput
// Grants send access to this Authorization Rule. Defaults to `false`.
Send pulumi.BoolPtrInput
}
func (NamespaceAuthorizationRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceAuthorizationRuleArgs)(nil)).Elem()
}
type NamespaceAuthorizationRuleInput interface {
pulumi.Input
ToNamespaceAuthorizationRuleOutput() NamespaceAuthorizationRuleOutput
ToNamespaceAuthorizationRuleOutputWithContext(ctx context.Context) NamespaceAuthorizationRuleOutput
}
func (*NamespaceAuthorizationRule) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceAuthorizationRule)(nil)).Elem()
}
func (i *NamespaceAuthorizationRule) ToNamespaceAuthorizationRuleOutput() NamespaceAuthorizationRuleOutput {
return i.ToNamespaceAuthorizationRuleOutputWithContext(context.Background())
}
func (i *NamespaceAuthorizationRule) ToNamespaceAuthorizationRuleOutputWithContext(ctx context.Context) NamespaceAuthorizationRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceAuthorizationRuleOutput)
}
// NamespaceAuthorizationRuleArrayInput is an input type that accepts NamespaceAuthorizationRuleArray and NamespaceAuthorizationRuleArrayOutput values.
// You can construct a concrete instance of `NamespaceAuthorizationRuleArrayInput` via:
//
// NamespaceAuthorizationRuleArray{ NamespaceAuthorizationRuleArgs{...} }
type NamespaceAuthorizationRuleArrayInput interface {
pulumi.Input
ToNamespaceAuthorizationRuleArrayOutput() NamespaceAuthorizationRuleArrayOutput
ToNamespaceAuthorizationRuleArrayOutputWithContext(context.Context) NamespaceAuthorizationRuleArrayOutput
}
type NamespaceAuthorizationRuleArray []NamespaceAuthorizationRuleInput
func (NamespaceAuthorizationRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NamespaceAuthorizationRule)(nil)).Elem()
}
func (i NamespaceAuthorizationRuleArray) ToNamespaceAuthorizationRuleArrayOutput() NamespaceAuthorizationRuleArrayOutput {
return i.ToNamespaceAuthorizationRuleArrayOutputWithContext(context.Background())
}
func (i NamespaceAuthorizationRuleArray) ToNamespaceAuthorizationRuleArrayOutputWithContext(ctx context.Context) NamespaceAuthorizationRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceAuthorizationRuleArrayOutput)
}
// NamespaceAuthorizationRuleMapInput is an input type that accepts NamespaceAuthorizationRuleMap and NamespaceAuthorizationRuleMapOutput values.
// You can construct a concrete instance of `NamespaceAuthorizationRuleMapInput` via:
//
// NamespaceAuthorizationRuleMap{ "key": NamespaceAuthorizationRuleArgs{...} }
type NamespaceAuthorizationRuleMapInput interface {
pulumi.Input
ToNamespaceAuthorizationRuleMapOutput() NamespaceAuthorizationRuleMapOutput
ToNamespaceAuthorizationRuleMapOutputWithContext(context.Context) NamespaceAuthorizationRuleMapOutput
}
type NamespaceAuthorizationRuleMap map[string]NamespaceAuthorizationRuleInput
func (NamespaceAuthorizationRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NamespaceAuthorizationRule)(nil)).Elem()
}
func (i NamespaceAuthorizationRuleMap) ToNamespaceAuthorizationRuleMapOutput() NamespaceAuthorizationRuleMapOutput {
return i.ToNamespaceAuthorizationRuleMapOutputWithContext(context.Background())
}
func (i NamespaceAuthorizationRuleMap) ToNamespaceAuthorizationRuleMapOutputWithContext(ctx context.Context) NamespaceAuthorizationRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceAuthorizationRuleMapOutput)
}
type NamespaceAuthorizationRuleOutput struct{ *pulumi.OutputState }
func (NamespaceAuthorizationRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceAuthorizationRule)(nil)).Elem()
}
func (o NamespaceAuthorizationRuleOutput) ToNamespaceAuthorizationRuleOutput() NamespaceAuthorizationRuleOutput {
return o
}
func (o NamespaceAuthorizationRuleOutput) ToNamespaceAuthorizationRuleOutputWithContext(ctx context.Context) NamespaceAuthorizationRuleOutput {
return o
}
// Grants listen access to this Authorization Rule. Defaults to `false`.
func (o NamespaceAuthorizationRuleOutput) Listen() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.BoolPtrOutput { return v.Listen }).(pulumi.BoolPtrOutput)
}
// Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
func (o NamespaceAuthorizationRuleOutput) Manage() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.BoolPtrOutput { return v.Manage }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created.
func (o NamespaceAuthorizationRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the ID of the ServiceBus Namespace. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
func (o NamespaceAuthorizationRuleOutput) NamespaceId() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.NamespaceId }).(pulumi.StringOutput)
}
// The Primary Connection String for the ServiceBus Namespace authorization Rule.
func (o NamespaceAuthorizationRuleOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
func (o NamespaceAuthorizationRuleOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Primary Key for the ServiceBus Namespace authorization Rule.
func (o NamespaceAuthorizationRuleOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.PrimaryKey }).(pulumi.StringOutput)
}
// The Secondary Connection String for the ServiceBus Namespace authorization Rule.
func (o NamespaceAuthorizationRuleOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias Secondary Connection String for the ServiceBus Namespace
func (o NamespaceAuthorizationRuleOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Secondary Key for the ServiceBus Namespace authorization Rule.
func (o NamespaceAuthorizationRuleOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.SecondaryKey }).(pulumi.StringOutput)
}
// Grants send access to this Authorization Rule. Defaults to `false`.
func (o NamespaceAuthorizationRuleOutput) Send() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.BoolPtrOutput { return v.Send }).(pulumi.BoolPtrOutput)
}
type NamespaceAuthorizationRuleArrayOutput struct{ *pulumi.OutputState }
func (NamespaceAuthorizationRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NamespaceAuthorizationRule)(nil)).Elem()
}
func (o NamespaceAuthorizationRuleArrayOutput) ToNamespaceAuthorizationRuleArrayOutput() NamespaceAuthorizationRuleArrayOutput {
return o
}
func (o NamespaceAuthorizationRuleArrayOutput) ToNamespaceAuthorizationRuleArrayOutputWithContext(ctx context.Context) NamespaceAuthorizationRuleArrayOutput {
return o
}
func (o NamespaceAuthorizationRuleArrayOutput) Index(i pulumi.IntInput) NamespaceAuthorizationRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NamespaceAuthorizationRule {
return vs[0].([]*NamespaceAuthorizationRule)[vs[1].(int)]
}).(NamespaceAuthorizationRuleOutput)
}
type NamespaceAuthorizationRuleMapOutput struct{ *pulumi.OutputState }
func (NamespaceAuthorizationRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NamespaceAuthorizationRule)(nil)).Elem()
}
func (o NamespaceAuthorizationRuleMapOutput) ToNamespaceAuthorizationRuleMapOutput() NamespaceAuthorizationRuleMapOutput {
return o
}
func (o NamespaceAuthorizationRuleMapOutput) ToNamespaceAuthorizationRuleMapOutputWithContext(ctx context.Context) NamespaceAuthorizationRuleMapOutput {
return o
}
func (o NamespaceAuthorizationRuleMapOutput) MapIndex(k pulumi.StringInput) NamespaceAuthorizationRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NamespaceAuthorizationRule {
return vs[0].(map[string]*NamespaceAuthorizationRule)[vs[1].(string)]
}).(NamespaceAuthorizationRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceAuthorizationRuleInput)(nil)).Elem(), &NamespaceAuthorizationRule{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceAuthorizationRuleArrayInput)(nil)).Elem(), NamespaceAuthorizationRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceAuthorizationRuleMapInput)(nil)).Elem(), NamespaceAuthorizationRuleMap{})
pulumi.RegisterOutputType(NamespaceAuthorizationRuleOutput{})
pulumi.RegisterOutputType(NamespaceAuthorizationRuleArrayOutput{})
pulumi.RegisterOutputType(NamespaceAuthorizationRuleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/getNamespaceAuthorizationRule.go | sdk/go/azure/eventhub/getNamespaceAuthorizationRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
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 Authorization Rule for an Event Hub Namespace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := eventhub.LookupNamespaceAuthorizationRule(ctx, &eventhub.LookupNamespaceAuthorizationRuleArgs{
// Name: "navi",
// ResourceGroupName: "example-resources",
// NamespaceName: "example-ns",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("eventhubAuthorizationRuleId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.EventHub` - 2024-01-01
func LookupNamespaceAuthorizationRule(ctx *pulumi.Context, args *LookupNamespaceAuthorizationRuleArgs, opts ...pulumi.InvokeOption) (*LookupNamespaceAuthorizationRuleResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupNamespaceAuthorizationRuleResult
err := ctx.Invoke("azure:eventhub/getNamespaceAuthorizationRule:getNamespaceAuthorizationRule", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getNamespaceAuthorizationRule.
type LookupNamespaceAuthorizationRuleArgs struct {
// The name of the EventHub Authorization Rule resource.
Name string `pulumi:"name"`
// Specifies the name of the EventHub Namespace.
NamespaceName string `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Namespace exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getNamespaceAuthorizationRule.
type LookupNamespaceAuthorizationRuleResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Does this Authorization Rule have permissions to Listen to the Event Hub?
Listen bool `pulumi:"listen"`
// Does this Authorization Rule have permissions to Manage to the Event Hub?
Manage bool `pulumi:"manage"`
Name string `pulumi:"name"`
NamespaceName string `pulumi:"namespaceName"`
// The Primary Connection String for the Event Hubs authorization Rule.
PrimaryConnectionString string `pulumi:"primaryConnectionString"`
// The alias of the Primary Connection String for the Event Hubs authorization Rule.
PrimaryConnectionStringAlias string `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the Event Hubs authorization Rule.
PrimaryKey string `pulumi:"primaryKey"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Secondary Connection String for the Event Hubs authorization Rule.
SecondaryConnectionString string `pulumi:"secondaryConnectionString"`
// The alias of the Secondary Connection String for the Event Hubs authorization Rule.
SecondaryConnectionStringAlias string `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the Event Hubs authorization Rule.
SecondaryKey string `pulumi:"secondaryKey"`
// Does this Authorization Rule have permissions to Send to the Event Hub?
Send bool `pulumi:"send"`
}
func LookupNamespaceAuthorizationRuleOutput(ctx *pulumi.Context, args LookupNamespaceAuthorizationRuleOutputArgs, opts ...pulumi.InvokeOption) LookupNamespaceAuthorizationRuleResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupNamespaceAuthorizationRuleResultOutput, error) {
args := v.(LookupNamespaceAuthorizationRuleArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:eventhub/getNamespaceAuthorizationRule:getNamespaceAuthorizationRule", args, LookupNamespaceAuthorizationRuleResultOutput{}, options).(LookupNamespaceAuthorizationRuleResultOutput), nil
}).(LookupNamespaceAuthorizationRuleResultOutput)
}
// A collection of arguments for invoking getNamespaceAuthorizationRule.
type LookupNamespaceAuthorizationRuleOutputArgs struct {
// The name of the EventHub Authorization Rule resource.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the name of the EventHub Namespace.
NamespaceName pulumi.StringInput `pulumi:"namespaceName"`
// The name of the resource group in which the EventHub Namespace exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupNamespaceAuthorizationRuleOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupNamespaceAuthorizationRuleArgs)(nil)).Elem()
}
// A collection of values returned by getNamespaceAuthorizationRule.
type LookupNamespaceAuthorizationRuleResultOutput struct{ *pulumi.OutputState }
func (LookupNamespaceAuthorizationRuleResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupNamespaceAuthorizationRuleResult)(nil)).Elem()
}
func (o LookupNamespaceAuthorizationRuleResultOutput) ToLookupNamespaceAuthorizationRuleResultOutput() LookupNamespaceAuthorizationRuleResultOutput {
return o
}
func (o LookupNamespaceAuthorizationRuleResultOutput) ToLookupNamespaceAuthorizationRuleResultOutputWithContext(ctx context.Context) LookupNamespaceAuthorizationRuleResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupNamespaceAuthorizationRuleResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.Id }).(pulumi.StringOutput)
}
// Does this Authorization Rule have permissions to Listen to the Event Hub?
func (o LookupNamespaceAuthorizationRuleResultOutput) Listen() pulumi.BoolOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) bool { return v.Listen }).(pulumi.BoolOutput)
}
// Does this Authorization Rule have permissions to Manage to the Event Hub?
func (o LookupNamespaceAuthorizationRuleResultOutput) Manage() pulumi.BoolOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) bool { return v.Manage }).(pulumi.BoolOutput)
}
func (o LookupNamespaceAuthorizationRuleResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupNamespaceAuthorizationRuleResultOutput) NamespaceName() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.NamespaceName }).(pulumi.StringOutput)
}
// The Primary Connection String for the Event Hubs authorization Rule.
func (o LookupNamespaceAuthorizationRuleResultOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the Primary Connection String for the Event Hubs authorization Rule.
func (o LookupNamespaceAuthorizationRuleResultOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Primary Key for the Event Hubs authorization Rule.
func (o LookupNamespaceAuthorizationRuleResultOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.PrimaryKey }).(pulumi.StringOutput)
}
func (o LookupNamespaceAuthorizationRuleResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Secondary Connection String for the Event Hubs authorization Rule.
func (o LookupNamespaceAuthorizationRuleResultOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias of the Secondary Connection String for the Event Hubs authorization Rule.
func (o LookupNamespaceAuthorizationRuleResultOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Secondary Key for the Event Hubs authorization Rule.
func (o LookupNamespaceAuthorizationRuleResultOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.SecondaryKey }).(pulumi.StringOutput)
}
// Does this Authorization Rule have permissions to Send to the Event Hub?
func (o LookupNamespaceAuthorizationRuleResultOutput) Send() pulumi.BoolOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) bool { return v.Send }).(pulumi.BoolOutput)
}
func init() {
pulumi.RegisterOutputType(LookupNamespaceAuthorizationRuleResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/eventGridTopic.go | sdk/go/azure/eventhub/eventGridTopic.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an EventGrid Topic
//
// > **Note:** at this time EventGrid Topics are only available in a limited number of regions.
//
// ## 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/eventgrid"
// "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 = eventgrid.NewTopic(ctx, "example", &eventgrid.TopicArgs{
// Name: pulumi.String("my-eventgrid-topic"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// 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.EventGrid` - 2025-02-15
//
// ## Import
//
// EventGrid Topic's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/eventGridTopic:EventGridTopic topic1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/topics/topic1
// ```
//
// Deprecated: azure.eventhub.EventGridTopic has been deprecated in favor of azure.eventgrid.Topic
type EventGridTopic struct {
pulumi.CustomResourceState
// The Endpoint associated with the EventGrid Topic.
Endpoint pulumi.StringOutput `pulumi:"endpoint"`
// An `identity` block as defined below.
Identity EventGridTopicIdentityPtrOutput `pulumi:"identity"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules EventGridTopicInboundIpRuleArrayOutput `pulumi:"inboundIpRules"`
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues EventGridTopicInputMappingDefaultValuesPtrOutput `pulumi:"inputMappingDefaultValues"`
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields EventGridTopicInputMappingFieldsPtrOutput `pulumi:"inputMappingFields"`
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
InputSchema pulumi.StringPtrOutput `pulumi:"inputSchema"`
// Whether local authentication methods is enabled for the EventGrid Topic. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrOutput `pulumi:"localAuthEnabled"`
// 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 EventGrid Topic resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The Primary Shared Access Key associated with the EventGrid Topic.
PrimaryAccessKey pulumi.StringOutput `pulumi:"primaryAccessKey"`
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Secondary Shared Access Key associated with the EventGrid Topic.
SecondaryAccessKey pulumi.StringOutput `pulumi:"secondaryAccessKey"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewEventGridTopic registers a new resource with the given unique name, arguments, and options.
func NewEventGridTopic(ctx *pulumi.Context,
name string, args *EventGridTopicArgs, opts ...pulumi.ResourceOption) (*EventGridTopic, 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'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryAccessKey",
"secondaryAccessKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource EventGridTopic
err := ctx.RegisterResource("azure:eventhub/eventGridTopic:EventGridTopic", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEventGridTopic gets an existing EventGridTopic 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 GetEventGridTopic(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EventGridTopicState, opts ...pulumi.ResourceOption) (*EventGridTopic, error) {
var resource EventGridTopic
err := ctx.ReadResource("azure:eventhub/eventGridTopic:EventGridTopic", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EventGridTopic resources.
type eventGridTopicState struct {
// The Endpoint associated with the EventGrid Topic.
Endpoint *string `pulumi:"endpoint"`
// An `identity` block as defined below.
Identity *EventGridTopicIdentity `pulumi:"identity"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules []EventGridTopicInboundIpRule `pulumi:"inboundIpRules"`
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues *EventGridTopicInputMappingDefaultValues `pulumi:"inputMappingDefaultValues"`
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields *EventGridTopicInputMappingFields `pulumi:"inputMappingFields"`
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
InputSchema *string `pulumi:"inputSchema"`
// Whether local authentication methods is enabled for the EventGrid Topic. Defaults to `true`.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// 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 EventGrid Topic resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The Primary Shared Access Key associated with the EventGrid Topic.
PrimaryAccessKey *string `pulumi:"primaryAccessKey"`
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Secondary Shared Access Key associated with the EventGrid Topic.
SecondaryAccessKey *string `pulumi:"secondaryAccessKey"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type EventGridTopicState struct {
// The Endpoint associated with the EventGrid Topic.
Endpoint pulumi.StringPtrInput
// An `identity` block as defined below.
Identity EventGridTopicIdentityPtrInput
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules EventGridTopicInboundIpRuleArrayInput
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues EventGridTopicInputMappingDefaultValuesPtrInput
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields EventGridTopicInputMappingFieldsPtrInput
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
InputSchema pulumi.StringPtrInput
// Whether local authentication methods is enabled for the EventGrid Topic. Defaults to `true`.
LocalAuthEnabled 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 EventGrid Topic resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The Primary Shared Access Key associated with the EventGrid Topic.
PrimaryAccessKey pulumi.StringPtrInput
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The Secondary Shared Access Key associated with the EventGrid Topic.
SecondaryAccessKey pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (EventGridTopicState) ElementType() reflect.Type {
return reflect.TypeOf((*eventGridTopicState)(nil)).Elem()
}
type eventGridTopicArgs struct {
// An `identity` block as defined below.
Identity *EventGridTopicIdentity `pulumi:"identity"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules []EventGridTopicInboundIpRule `pulumi:"inboundIpRules"`
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues *EventGridTopicInputMappingDefaultValues `pulumi:"inputMappingDefaultValues"`
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields *EventGridTopicInputMappingFields `pulumi:"inputMappingFields"`
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
InputSchema *string `pulumi:"inputSchema"`
// Whether local authentication methods is enabled for the EventGrid Topic. Defaults to `true`.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// 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 EventGrid Topic resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a EventGridTopic resource.
type EventGridTopicArgs struct {
// An `identity` block as defined below.
Identity EventGridTopicIdentityPtrInput
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules EventGridTopicInboundIpRuleArrayInput
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues EventGridTopicInputMappingDefaultValuesPtrInput
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields EventGridTopicInputMappingFieldsPtrInput
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
InputSchema pulumi.StringPtrInput
// Whether local authentication methods is enabled for the EventGrid Topic. Defaults to `true`.
LocalAuthEnabled 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 EventGrid Topic resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether or not public network access is allowed for this server. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (EventGridTopicArgs) ElementType() reflect.Type {
return reflect.TypeOf((*eventGridTopicArgs)(nil)).Elem()
}
type EventGridTopicInput interface {
pulumi.Input
ToEventGridTopicOutput() EventGridTopicOutput
ToEventGridTopicOutputWithContext(ctx context.Context) EventGridTopicOutput
}
func (*EventGridTopic) ElementType() reflect.Type {
return reflect.TypeOf((**EventGridTopic)(nil)).Elem()
}
func (i *EventGridTopic) ToEventGridTopicOutput() EventGridTopicOutput {
return i.ToEventGridTopicOutputWithContext(context.Background())
}
func (i *EventGridTopic) ToEventGridTopicOutputWithContext(ctx context.Context) EventGridTopicOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventGridTopicOutput)
}
// EventGridTopicArrayInput is an input type that accepts EventGridTopicArray and EventGridTopicArrayOutput values.
// You can construct a concrete instance of `EventGridTopicArrayInput` via:
//
// EventGridTopicArray{ EventGridTopicArgs{...} }
type EventGridTopicArrayInput interface {
pulumi.Input
ToEventGridTopicArrayOutput() EventGridTopicArrayOutput
ToEventGridTopicArrayOutputWithContext(context.Context) EventGridTopicArrayOutput
}
type EventGridTopicArray []EventGridTopicInput
func (EventGridTopicArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventGridTopic)(nil)).Elem()
}
func (i EventGridTopicArray) ToEventGridTopicArrayOutput() EventGridTopicArrayOutput {
return i.ToEventGridTopicArrayOutputWithContext(context.Background())
}
func (i EventGridTopicArray) ToEventGridTopicArrayOutputWithContext(ctx context.Context) EventGridTopicArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventGridTopicArrayOutput)
}
// EventGridTopicMapInput is an input type that accepts EventGridTopicMap and EventGridTopicMapOutput values.
// You can construct a concrete instance of `EventGridTopicMapInput` via:
//
// EventGridTopicMap{ "key": EventGridTopicArgs{...} }
type EventGridTopicMapInput interface {
pulumi.Input
ToEventGridTopicMapOutput() EventGridTopicMapOutput
ToEventGridTopicMapOutputWithContext(context.Context) EventGridTopicMapOutput
}
type EventGridTopicMap map[string]EventGridTopicInput
func (EventGridTopicMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventGridTopic)(nil)).Elem()
}
func (i EventGridTopicMap) ToEventGridTopicMapOutput() EventGridTopicMapOutput {
return i.ToEventGridTopicMapOutputWithContext(context.Background())
}
func (i EventGridTopicMap) ToEventGridTopicMapOutputWithContext(ctx context.Context) EventGridTopicMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventGridTopicMapOutput)
}
type EventGridTopicOutput struct{ *pulumi.OutputState }
func (EventGridTopicOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EventGridTopic)(nil)).Elem()
}
func (o EventGridTopicOutput) ToEventGridTopicOutput() EventGridTopicOutput {
return o
}
func (o EventGridTopicOutput) ToEventGridTopicOutputWithContext(ctx context.Context) EventGridTopicOutput {
return o
}
// The Endpoint associated with the EventGrid Topic.
func (o EventGridTopicOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v *EventGridTopic) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o EventGridTopicOutput) Identity() EventGridTopicIdentityPtrOutput {
return o.ApplyT(func(v *EventGridTopic) EventGridTopicIdentityPtrOutput { return v.Identity }).(EventGridTopicIdentityPtrOutput)
}
// One or more `inboundIpRule` blocks as defined below.
func (o EventGridTopicOutput) InboundIpRules() EventGridTopicInboundIpRuleArrayOutput {
return o.ApplyT(func(v *EventGridTopic) EventGridTopicInboundIpRuleArrayOutput { return v.InboundIpRules }).(EventGridTopicInboundIpRuleArrayOutput)
}
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
func (o EventGridTopicOutput) InputMappingDefaultValues() EventGridTopicInputMappingDefaultValuesPtrOutput {
return o.ApplyT(func(v *EventGridTopic) EventGridTopicInputMappingDefaultValuesPtrOutput {
return v.InputMappingDefaultValues
}).(EventGridTopicInputMappingDefaultValuesPtrOutput)
}
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
func (o EventGridTopicOutput) InputMappingFields() EventGridTopicInputMappingFieldsPtrOutput {
return o.ApplyT(func(v *EventGridTopic) EventGridTopicInputMappingFieldsPtrOutput { return v.InputMappingFields }).(EventGridTopicInputMappingFieldsPtrOutput)
}
// Specifies the schema in which incoming events will be published to this domain. Allowed values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
func (o EventGridTopicOutput) InputSchema() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EventGridTopic) pulumi.StringPtrOutput { return v.InputSchema }).(pulumi.StringPtrOutput)
}
// Whether local authentication methods is enabled for the EventGrid Topic. Defaults to `true`.
func (o EventGridTopicOutput) LocalAuthEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EventGridTopic) pulumi.BoolPtrOutput { return v.LocalAuthEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o EventGridTopicOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *EventGridTopic) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the EventGrid Topic resource. Changing this forces a new resource to be created.
func (o EventGridTopicOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EventGridTopic) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The Primary Shared Access Key associated with the EventGrid Topic.
func (o EventGridTopicOutput) PrimaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *EventGridTopic) pulumi.StringOutput { return v.PrimaryAccessKey }).(pulumi.StringOutput)
}
// Whether or not public network access is allowed for this server. Defaults to `true`.
func (o EventGridTopicOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EventGridTopic) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the resource group in which the EventGrid Topic exists. Changing this forces a new resource to be created.
func (o EventGridTopicOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *EventGridTopic) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Secondary Shared Access Key associated with the EventGrid Topic.
func (o EventGridTopicOutput) SecondaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *EventGridTopic) pulumi.StringOutput { return v.SecondaryAccessKey }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o EventGridTopicOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *EventGridTopic) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type EventGridTopicArrayOutput struct{ *pulumi.OutputState }
func (EventGridTopicArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventGridTopic)(nil)).Elem()
}
func (o EventGridTopicArrayOutput) ToEventGridTopicArrayOutput() EventGridTopicArrayOutput {
return o
}
func (o EventGridTopicArrayOutput) ToEventGridTopicArrayOutputWithContext(ctx context.Context) EventGridTopicArrayOutput {
return o
}
func (o EventGridTopicArrayOutput) Index(i pulumi.IntInput) EventGridTopicOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EventGridTopic {
return vs[0].([]*EventGridTopic)[vs[1].(int)]
}).(EventGridTopicOutput)
}
type EventGridTopicMapOutput struct{ *pulumi.OutputState }
func (EventGridTopicMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventGridTopic)(nil)).Elem()
}
func (o EventGridTopicMapOutput) ToEventGridTopicMapOutput() EventGridTopicMapOutput {
return o
}
func (o EventGridTopicMapOutput) ToEventGridTopicMapOutputWithContext(ctx context.Context) EventGridTopicMapOutput {
return o
}
func (o EventGridTopicMapOutput) MapIndex(k pulumi.StringInput) EventGridTopicOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EventGridTopic {
return vs[0].(map[string]*EventGridTopic)[vs[1].(string)]
}).(EventGridTopicOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EventGridTopicInput)(nil)).Elem(), &EventGridTopic{})
pulumi.RegisterInputType(reflect.TypeOf((*EventGridTopicArrayInput)(nil)).Elem(), EventGridTopicArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EventGridTopicMapInput)(nil)).Elem(), EventGridTopicMap{})
pulumi.RegisterOutputType(EventGridTopicOutput{})
pulumi.RegisterOutputType(EventGridTopicArrayOutput{})
pulumi.RegisterOutputType(EventGridTopicMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/getCluster.go | sdk/go/azure/eventhub/getCluster.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
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 EventHub.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := eventhub.LookupCluster(ctx, &eventhub.LookupClusterArgs{
// Name: "search-eventhub",
// ResourceGroupName: "search-service",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("eventhubId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.EventHub` - 2024-01-01
func LookupCluster(ctx *pulumi.Context, args *LookupClusterArgs, opts ...pulumi.InvokeOption) (*LookupClusterResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupClusterResult
err := ctx.Invoke("azure:eventhub/getCluster:getCluster", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getCluster.
type LookupClusterArgs struct {
// The name of this EventHub Cluster.
Name string `pulumi:"name"`
// The name of the Resource Group where the EventHub Cluster exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getCluster.
type LookupClusterResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Location of the EventHub Cluster.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// SKU name of the EventHub Cluster.
SkuName string `pulumi:"skuName"`
}
func LookupClusterOutput(ctx *pulumi.Context, args LookupClusterOutputArgs, opts ...pulumi.InvokeOption) LookupClusterResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupClusterResultOutput, error) {
args := v.(LookupClusterArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:eventhub/getCluster:getCluster", args, LookupClusterResultOutput{}, options).(LookupClusterResultOutput), nil
}).(LookupClusterResultOutput)
}
// A collection of arguments for invoking getCluster.
type LookupClusterOutputArgs struct {
// The name of this EventHub Cluster.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the EventHub Cluster exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupClusterOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupClusterArgs)(nil)).Elem()
}
// A collection of values returned by getCluster.
type LookupClusterResultOutput struct{ *pulumi.OutputState }
func (LookupClusterResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupClusterResult)(nil)).Elem()
}
func (o LookupClusterResultOutput) ToLookupClusterResultOutput() LookupClusterResultOutput {
return o
}
func (o LookupClusterResultOutput) ToLookupClusterResultOutputWithContext(ctx context.Context) LookupClusterResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupClusterResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupClusterResult) string { return v.Id }).(pulumi.StringOutput)
}
// Location of the EventHub Cluster.
func (o LookupClusterResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupClusterResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupClusterResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupClusterResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupClusterResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupClusterResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// SKU name of the EventHub Cluster.
func (o LookupClusterResultOutput) SkuName() pulumi.StringOutput {
return o.ApplyT(func(v LookupClusterResult) string { return v.SkuName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupClusterResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/eventHub.go | sdk/go/azure/eventhub/eventHub.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Event Hubs as a nested resource within a Event Hubs namespace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/eventhub"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleEventHubNamespace, err := eventhub.NewEventHubNamespace(ctx, "example", &eventhub.EventHubNamespaceArgs{
// Name: pulumi.String("acceptanceTestEventHubNamespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Capacity: pulumi.Int(1),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("Production"),
// },
// })
// if err != nil {
// return err
// }
// _, err = eventhub.NewEventHub(ctx, "example", &eventhub.EventHubArgs{
// Name: pulumi.String("acceptanceTestEventHub"),
// NamespaceId: exampleEventHubNamespace.ID(),
// PartitionCount: pulumi.Int(2),
// MessageRetention: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.EventHub` - 2024-01-01
//
// ## Import
//
// EventHubs can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/eventHub:EventHub eventhub1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventHub/namespaces/namespace1/eventhubs/eventhub1
// ```
type EventHub struct {
pulumi.CustomResourceState
// A `captureDescription` block as defined below.
CaptureDescription EventHubCaptureDescriptionPtrOutput `pulumi:"captureDescription"`
// Specifies the number of days to retain the events for this Event Hub.
//
// > **Note:** When using a dedicated Event Hubs cluster, maximum value of `messageRetention` is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.
MessageRetention pulumi.IntOutput `pulumi:"messageRetention"`
// Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the ID of the EventHub Namespace.
NamespaceId pulumi.StringOutput `pulumi:"namespaceId"`
// Deprecated: `namespaceName` has been deprecated in favour of `namespaceId` and will be removed in v5.0 of the AzureRM Provider
NamespaceName pulumi.StringOutput `pulumi:"namespaceName"`
// Specifies the current number of shards on the Event Hub.
//
// > **Note:** When using a shared parent EventHub Namespace, `partitionCount` cannot be changed unless the Eventhub Namespace SKU is `Premium`. When using a dedicated Event Hubs cluster, this restriction doesn't apply. In either case though, the `partitionCount` cannot be decreased.
//
// > **Note:** When using a dedicated Event Hubs cluster, maximum value of `partitionCount` is 1024. When using a shared parent EventHub Namespace, maximum value is 32.
PartitionCount pulumi.IntOutput `pulumi:"partitionCount"`
// The identifiers for partitions created for Event Hubs.
PartitionIds pulumi.StringArrayOutput `pulumi:"partitionIds"`
// Deprecated: `resourceGroupName` has been deprecated in favour of `namespaceId` and will be removed in v5.0 of the AzureRM Provider
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A `retentionDescription` block as defined below.
RetentionDescription EventHubRetentionDescriptionOutput `pulumi:"retentionDescription"`
// Specifies the status of the Event Hub resource. Possible values are `Active`, `Disabled` and `SendDisabled`. Defaults to `Active`.
Status pulumi.StringPtrOutput `pulumi:"status"`
}
// NewEventHub registers a new resource with the given unique name, arguments, and options.
func NewEventHub(ctx *pulumi.Context,
name string, args *EventHubArgs, opts ...pulumi.ResourceOption) (*EventHub, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PartitionCount == nil {
return nil, errors.New("invalid value for required argument 'PartitionCount'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource EventHub
err := ctx.RegisterResource("azure:eventhub/eventHub:EventHub", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEventHub gets an existing EventHub 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 GetEventHub(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EventHubState, opts ...pulumi.ResourceOption) (*EventHub, error) {
var resource EventHub
err := ctx.ReadResource("azure:eventhub/eventHub:EventHub", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EventHub resources.
type eventHubState struct {
// A `captureDescription` block as defined below.
CaptureDescription *EventHubCaptureDescription `pulumi:"captureDescription"`
// Specifies the number of days to retain the events for this Event Hub.
//
// > **Note:** When using a dedicated Event Hubs cluster, maximum value of `messageRetention` is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.
MessageRetention *int `pulumi:"messageRetention"`
// Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the EventHub Namespace.
NamespaceId *string `pulumi:"namespaceId"`
// Deprecated: `namespaceName` has been deprecated in favour of `namespaceId` and will be removed in v5.0 of the AzureRM Provider
NamespaceName *string `pulumi:"namespaceName"`
// Specifies the current number of shards on the Event Hub.
//
// > **Note:** When using a shared parent EventHub Namespace, `partitionCount` cannot be changed unless the Eventhub Namespace SKU is `Premium`. When using a dedicated Event Hubs cluster, this restriction doesn't apply. In either case though, the `partitionCount` cannot be decreased.
//
// > **Note:** When using a dedicated Event Hubs cluster, maximum value of `partitionCount` is 1024. When using a shared parent EventHub Namespace, maximum value is 32.
PartitionCount *int `pulumi:"partitionCount"`
// The identifiers for partitions created for Event Hubs.
PartitionIds []string `pulumi:"partitionIds"`
// Deprecated: `resourceGroupName` has been deprecated in favour of `namespaceId` and will be removed in v5.0 of the AzureRM Provider
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A `retentionDescription` block as defined below.
RetentionDescription *EventHubRetentionDescription `pulumi:"retentionDescription"`
// Specifies the status of the Event Hub resource. Possible values are `Active`, `Disabled` and `SendDisabled`. Defaults to `Active`.
Status *string `pulumi:"status"`
}
type EventHubState struct {
// A `captureDescription` block as defined below.
CaptureDescription EventHubCaptureDescriptionPtrInput
// Specifies the number of days to retain the events for this Event Hub.
//
// > **Note:** When using a dedicated Event Hubs cluster, maximum value of `messageRetention` is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.
MessageRetention pulumi.IntPtrInput
// Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the EventHub Namespace.
NamespaceId pulumi.StringPtrInput
// Deprecated: `namespaceName` has been deprecated in favour of `namespaceId` and will be removed in v5.0 of the AzureRM Provider
NamespaceName pulumi.StringPtrInput
// Specifies the current number of shards on the Event Hub.
//
// > **Note:** When using a shared parent EventHub Namespace, `partitionCount` cannot be changed unless the Eventhub Namespace SKU is `Premium`. When using a dedicated Event Hubs cluster, this restriction doesn't apply. In either case though, the `partitionCount` cannot be decreased.
//
// > **Note:** When using a dedicated Event Hubs cluster, maximum value of `partitionCount` is 1024. When using a shared parent EventHub Namespace, maximum value is 32.
PartitionCount pulumi.IntPtrInput
// The identifiers for partitions created for Event Hubs.
PartitionIds pulumi.StringArrayInput
// Deprecated: `resourceGroupName` has been deprecated in favour of `namespaceId` and will be removed in v5.0 of the AzureRM Provider
ResourceGroupName pulumi.StringPtrInput
// A `retentionDescription` block as defined below.
RetentionDescription EventHubRetentionDescriptionPtrInput
// Specifies the status of the Event Hub resource. Possible values are `Active`, `Disabled` and `SendDisabled`. Defaults to `Active`.
Status pulumi.StringPtrInput
}
func (EventHubState) ElementType() reflect.Type {
return reflect.TypeOf((*eventHubState)(nil)).Elem()
}
type eventHubArgs struct {
// A `captureDescription` block as defined below.
CaptureDescription *EventHubCaptureDescription `pulumi:"captureDescription"`
// Specifies the number of days to retain the events for this Event Hub.
//
// > **Note:** When using a dedicated Event Hubs cluster, maximum value of `messageRetention` is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.
MessageRetention *int `pulumi:"messageRetention"`
// Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the EventHub Namespace.
NamespaceId *string `pulumi:"namespaceId"`
// Deprecated: `namespaceName` has been deprecated in favour of `namespaceId` and will be removed in v5.0 of the AzureRM Provider
NamespaceName *string `pulumi:"namespaceName"`
// Specifies the current number of shards on the Event Hub.
//
// > **Note:** When using a shared parent EventHub Namespace, `partitionCount` cannot be changed unless the Eventhub Namespace SKU is `Premium`. When using a dedicated Event Hubs cluster, this restriction doesn't apply. In either case though, the `partitionCount` cannot be decreased.
//
// > **Note:** When using a dedicated Event Hubs cluster, maximum value of `partitionCount` is 1024. When using a shared parent EventHub Namespace, maximum value is 32.
PartitionCount int `pulumi:"partitionCount"`
// Deprecated: `resourceGroupName` has been deprecated in favour of `namespaceId` and will be removed in v5.0 of the AzureRM Provider
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A `retentionDescription` block as defined below.
RetentionDescription *EventHubRetentionDescription `pulumi:"retentionDescription"`
// Specifies the status of the Event Hub resource. Possible values are `Active`, `Disabled` and `SendDisabled`. Defaults to `Active`.
Status *string `pulumi:"status"`
}
// The set of arguments for constructing a EventHub resource.
type EventHubArgs struct {
// A `captureDescription` block as defined below.
CaptureDescription EventHubCaptureDescriptionPtrInput
// Specifies the number of days to retain the events for this Event Hub.
//
// > **Note:** When using a dedicated Event Hubs cluster, maximum value of `messageRetention` is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.
MessageRetention pulumi.IntPtrInput
// Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the EventHub Namespace.
NamespaceId pulumi.StringPtrInput
// Deprecated: `namespaceName` has been deprecated in favour of `namespaceId` and will be removed in v5.0 of the AzureRM Provider
NamespaceName pulumi.StringPtrInput
// Specifies the current number of shards on the Event Hub.
//
// > **Note:** When using a shared parent EventHub Namespace, `partitionCount` cannot be changed unless the Eventhub Namespace SKU is `Premium`. When using a dedicated Event Hubs cluster, this restriction doesn't apply. In either case though, the `partitionCount` cannot be decreased.
//
// > **Note:** When using a dedicated Event Hubs cluster, maximum value of `partitionCount` is 1024. When using a shared parent EventHub Namespace, maximum value is 32.
PartitionCount pulumi.IntInput
// Deprecated: `resourceGroupName` has been deprecated in favour of `namespaceId` and will be removed in v5.0 of the AzureRM Provider
ResourceGroupName pulumi.StringPtrInput
// A `retentionDescription` block as defined below.
RetentionDescription EventHubRetentionDescriptionPtrInput
// Specifies the status of the Event Hub resource. Possible values are `Active`, `Disabled` and `SendDisabled`. Defaults to `Active`.
Status pulumi.StringPtrInput
}
func (EventHubArgs) ElementType() reflect.Type {
return reflect.TypeOf((*eventHubArgs)(nil)).Elem()
}
type EventHubInput interface {
pulumi.Input
ToEventHubOutput() EventHubOutput
ToEventHubOutputWithContext(ctx context.Context) EventHubOutput
}
func (*EventHub) ElementType() reflect.Type {
return reflect.TypeOf((**EventHub)(nil)).Elem()
}
func (i *EventHub) ToEventHubOutput() EventHubOutput {
return i.ToEventHubOutputWithContext(context.Background())
}
func (i *EventHub) ToEventHubOutputWithContext(ctx context.Context) EventHubOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventHubOutput)
}
// EventHubArrayInput is an input type that accepts EventHubArray and EventHubArrayOutput values.
// You can construct a concrete instance of `EventHubArrayInput` via:
//
// EventHubArray{ EventHubArgs{...} }
type EventHubArrayInput interface {
pulumi.Input
ToEventHubArrayOutput() EventHubArrayOutput
ToEventHubArrayOutputWithContext(context.Context) EventHubArrayOutput
}
type EventHubArray []EventHubInput
func (EventHubArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventHub)(nil)).Elem()
}
func (i EventHubArray) ToEventHubArrayOutput() EventHubArrayOutput {
return i.ToEventHubArrayOutputWithContext(context.Background())
}
func (i EventHubArray) ToEventHubArrayOutputWithContext(ctx context.Context) EventHubArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventHubArrayOutput)
}
// EventHubMapInput is an input type that accepts EventHubMap and EventHubMapOutput values.
// You can construct a concrete instance of `EventHubMapInput` via:
//
// EventHubMap{ "key": EventHubArgs{...} }
type EventHubMapInput interface {
pulumi.Input
ToEventHubMapOutput() EventHubMapOutput
ToEventHubMapOutputWithContext(context.Context) EventHubMapOutput
}
type EventHubMap map[string]EventHubInput
func (EventHubMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventHub)(nil)).Elem()
}
func (i EventHubMap) ToEventHubMapOutput() EventHubMapOutput {
return i.ToEventHubMapOutputWithContext(context.Background())
}
func (i EventHubMap) ToEventHubMapOutputWithContext(ctx context.Context) EventHubMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventHubMapOutput)
}
type EventHubOutput struct{ *pulumi.OutputState }
func (EventHubOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EventHub)(nil)).Elem()
}
func (o EventHubOutput) ToEventHubOutput() EventHubOutput {
return o
}
func (o EventHubOutput) ToEventHubOutputWithContext(ctx context.Context) EventHubOutput {
return o
}
// A `captureDescription` block as defined below.
func (o EventHubOutput) CaptureDescription() EventHubCaptureDescriptionPtrOutput {
return o.ApplyT(func(v *EventHub) EventHubCaptureDescriptionPtrOutput { return v.CaptureDescription }).(EventHubCaptureDescriptionPtrOutput)
}
// Specifies the number of days to retain the events for this Event Hub.
//
// > **Note:** When using a dedicated Event Hubs cluster, maximum value of `messageRetention` is 90 days. When using a shared parent EventHub Namespace, maximum value is 7 days; or 1 day when using a Basic SKU for the shared parent EventHub Namespace.
func (o EventHubOutput) MessageRetention() pulumi.IntOutput {
return o.ApplyT(func(v *EventHub) pulumi.IntOutput { return v.MessageRetention }).(pulumi.IntOutput)
}
// Specifies the name of the EventHub resource. Changing this forces a new resource to be created.
func (o EventHubOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EventHub) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the ID of the EventHub Namespace.
func (o EventHubOutput) NamespaceId() pulumi.StringOutput {
return o.ApplyT(func(v *EventHub) pulumi.StringOutput { return v.NamespaceId }).(pulumi.StringOutput)
}
// Deprecated: `namespaceName` has been deprecated in favour of `namespaceId` and will be removed in v5.0 of the AzureRM Provider
func (o EventHubOutput) NamespaceName() pulumi.StringOutput {
return o.ApplyT(func(v *EventHub) pulumi.StringOutput { return v.NamespaceName }).(pulumi.StringOutput)
}
// Specifies the current number of shards on the Event Hub.
//
// > **Note:** When using a shared parent EventHub Namespace, `partitionCount` cannot be changed unless the Eventhub Namespace SKU is `Premium`. When using a dedicated Event Hubs cluster, this restriction doesn't apply. In either case though, the `partitionCount` cannot be decreased.
//
// > **Note:** When using a dedicated Event Hubs cluster, maximum value of `partitionCount` is 1024. When using a shared parent EventHub Namespace, maximum value is 32.
func (o EventHubOutput) PartitionCount() pulumi.IntOutput {
return o.ApplyT(func(v *EventHub) pulumi.IntOutput { return v.PartitionCount }).(pulumi.IntOutput)
}
// The identifiers for partitions created for Event Hubs.
func (o EventHubOutput) PartitionIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *EventHub) pulumi.StringArrayOutput { return v.PartitionIds }).(pulumi.StringArrayOutput)
}
// Deprecated: `resourceGroupName` has been deprecated in favour of `namespaceId` and will be removed in v5.0 of the AzureRM Provider
func (o EventHubOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *EventHub) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A `retentionDescription` block as defined below.
func (o EventHubOutput) RetentionDescription() EventHubRetentionDescriptionOutput {
return o.ApplyT(func(v *EventHub) EventHubRetentionDescriptionOutput { return v.RetentionDescription }).(EventHubRetentionDescriptionOutput)
}
// Specifies the status of the Event Hub resource. Possible values are `Active`, `Disabled` and `SendDisabled`. Defaults to `Active`.
func (o EventHubOutput) Status() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EventHub) pulumi.StringPtrOutput { return v.Status }).(pulumi.StringPtrOutput)
}
type EventHubArrayOutput struct{ *pulumi.OutputState }
func (EventHubArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventHub)(nil)).Elem()
}
func (o EventHubArrayOutput) ToEventHubArrayOutput() EventHubArrayOutput {
return o
}
func (o EventHubArrayOutput) ToEventHubArrayOutputWithContext(ctx context.Context) EventHubArrayOutput {
return o
}
func (o EventHubArrayOutput) Index(i pulumi.IntInput) EventHubOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EventHub {
return vs[0].([]*EventHub)[vs[1].(int)]
}).(EventHubOutput)
}
type EventHubMapOutput struct{ *pulumi.OutputState }
func (EventHubMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventHub)(nil)).Elem()
}
func (o EventHubMapOutput) ToEventHubMapOutput() EventHubMapOutput {
return o
}
func (o EventHubMapOutput) ToEventHubMapOutputWithContext(ctx context.Context) EventHubMapOutput {
return o
}
func (o EventHubMapOutput) MapIndex(k pulumi.StringInput) EventHubOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EventHub {
return vs[0].(map[string]*EventHub)[vs[1].(string)]
}).(EventHubOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EventHubInput)(nil)).Elem(), &EventHub{})
pulumi.RegisterInputType(reflect.TypeOf((*EventHubArrayInput)(nil)).Elem(), EventHubArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EventHubMapInput)(nil)).Elem(), EventHubMap{})
pulumi.RegisterOutputType(EventHubOutput{})
pulumi.RegisterOutputType(EventHubArrayOutput{})
pulumi.RegisterOutputType(EventHubMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventhub/eventSubscription.go | sdk/go/azure/eventhub/eventSubscription.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an EventGrid Event Subscription
//
// ## 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/eventgrid"
// "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("exampleasa"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("staging"),
// },
// })
// if err != nil {
// return err
// }
// exampleQueue, err := storage.NewQueue(ctx, "example", &storage.QueueArgs{
// Name: pulumi.String("example-astq"),
// StorageAccountName: exampleAccount.Name,
// })
// if err != nil {
// return err
// }
// _, err = eventgrid.NewEventSubscription(ctx, "example", &eventgrid.EventSubscriptionArgs{
// Name: pulumi.String("example-aees"),
// Scope: example.ID(),
// StorageQueueEndpoint: &eventgrid.EventSubscriptionStorageQueueEndpointArgs{
// StorageAccountId: exampleAccount.ID(),
// QueueName: exampleQueue.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.EventGrid` - 2025-02-15
//
// ## Import
//
// EventGrid Event Subscription's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/eventSubscription:EventSubscription eventSubscription1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/topics/topic1/providers/Microsoft.EventGrid/eventSubscriptions/eventSubscription1
// ```
//
// Deprecated: azure.eventhub.EventSubscription has been deprecated in favor of azure.eventgrid.EventSubscription
type EventSubscription struct {
pulumi.CustomResourceState
// A `advancedFilter` block as defined below.
AdvancedFilter EventSubscriptionAdvancedFilterPtrOutput `pulumi:"advancedFilter"`
// Specifies whether advanced filters should be evaluated against an array of values instead of expecting a singular value. Defaults to `false`.
AdvancedFilteringOnArraysEnabled pulumi.BoolPtrOutput `pulumi:"advancedFilteringOnArraysEnabled"`
// An `azureFunctionEndpoint` block as defined below.
AzureFunctionEndpoint EventSubscriptionAzureFunctionEndpointPtrOutput `pulumi:"azureFunctionEndpoint"`
// A `deadLetterIdentity` block as defined below.
//
// > **Note:** `storageBlobDeadLetterDestination` must be specified when a `deadLetterIdentity` is specified
DeadLetterIdentity EventSubscriptionDeadLetterIdentityPtrOutput `pulumi:"deadLetterIdentity"`
// A `deliveryIdentity` block as defined below.
DeliveryIdentity EventSubscriptionDeliveryIdentityPtrOutput `pulumi:"deliveryIdentity"`
// One or more `deliveryProperty` blocks as defined below.
DeliveryProperties EventSubscriptionDeliveryPropertyArrayOutput `pulumi:"deliveryProperties"`
// Specifies the event delivery schema for the event subscription. Possible values include: `EventGridSchema`, `CloudEventSchemaV1_0`, `CustomInputSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
EventDeliverySchema pulumi.StringPtrOutput `pulumi:"eventDeliverySchema"`
// Specifies the id where the Event Hub is located.
EventhubEndpointId pulumi.StringOutput `pulumi:"eventhubEndpointId"`
// Specifies the expiration time of the event subscription (Datetime Format `RFC 3339`).
ExpirationTimeUtc pulumi.StringPtrOutput `pulumi:"expirationTimeUtc"`
// Specifies the id where the Hybrid Connection is located.
HybridConnectionEndpointId pulumi.StringOutput `pulumi:"hybridConnectionEndpointId"`
// A list of applicable event types that need to be part of the event subscription.
IncludedEventTypes pulumi.StringArrayOutput `pulumi:"includedEventTypes"`
// A list of labels to assign to the event subscription.
Labels pulumi.StringArrayOutput `pulumi:"labels"`
// Specifies the name of the EventGrid Event Subscription resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A `retryPolicy` block as defined below.
RetryPolicy EventSubscriptionRetryPolicyOutput `pulumi:"retryPolicy"`
// Specifies the scope at which the EventGrid Event Subscription should be created. Changing this forces a new resource to be created.
Scope pulumi.StringOutput `pulumi:"scope"`
// Specifies the id where the Service Bus Queue is located.
ServiceBusQueueEndpointId pulumi.StringPtrOutput `pulumi:"serviceBusQueueEndpointId"`
// Specifies the id where the Service Bus Topic is located.
ServiceBusTopicEndpointId pulumi.StringPtrOutput `pulumi:"serviceBusTopicEndpointId"`
// A `storageBlobDeadLetterDestination` block as defined below.
StorageBlobDeadLetterDestination EventSubscriptionStorageBlobDeadLetterDestinationPtrOutput `pulumi:"storageBlobDeadLetterDestination"`
// A `storageQueueEndpoint` block as defined below.
StorageQueueEndpoint EventSubscriptionStorageQueueEndpointPtrOutput `pulumi:"storageQueueEndpoint"`
// A `subjectFilter` block as defined below.
SubjectFilter EventSubscriptionSubjectFilterPtrOutput `pulumi:"subjectFilter"`
// A `webhookEndpoint` block as defined below.
//
// > **Note:** One of `eventhubEndpointId`, `hybridConnectionEndpointId`, `serviceBusQueueEndpointId`, `serviceBusTopicEndpointId`, `storageQueueEndpoint`, `webhookEndpoint` or `azureFunctionEndpoint` must be specified.
WebhookEndpoint EventSubscriptionWebhookEndpointPtrOutput `pulumi:"webhookEndpoint"`
}
// NewEventSubscription registers a new resource with the given unique name, arguments, and options.
func NewEventSubscription(ctx *pulumi.Context,
name string, args *EventSubscriptionArgs, opts ...pulumi.ResourceOption) (*EventSubscription, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Scope == nil {
return nil, errors.New("invalid value for required argument 'Scope'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource EventSubscription
err := ctx.RegisterResource("azure:eventhub/eventSubscription:EventSubscription", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEventSubscription gets an existing EventSubscription 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 GetEventSubscription(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EventSubscriptionState, opts ...pulumi.ResourceOption) (*EventSubscription, error) {
var resource EventSubscription
err := ctx.ReadResource("azure:eventhub/eventSubscription:EventSubscription", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EventSubscription resources.
type eventSubscriptionState struct {
// A `advancedFilter` block as defined below.
AdvancedFilter *EventSubscriptionAdvancedFilter `pulumi:"advancedFilter"`
// Specifies whether advanced filters should be evaluated against an array of values instead of expecting a singular value. Defaults to `false`.
AdvancedFilteringOnArraysEnabled *bool `pulumi:"advancedFilteringOnArraysEnabled"`
// An `azureFunctionEndpoint` block as defined below.
AzureFunctionEndpoint *EventSubscriptionAzureFunctionEndpoint `pulumi:"azureFunctionEndpoint"`
// A `deadLetterIdentity` block as defined below.
//
// > **Note:** `storageBlobDeadLetterDestination` must be specified when a `deadLetterIdentity` is specified
DeadLetterIdentity *EventSubscriptionDeadLetterIdentity `pulumi:"deadLetterIdentity"`
// A `deliveryIdentity` block as defined below.
DeliveryIdentity *EventSubscriptionDeliveryIdentity `pulumi:"deliveryIdentity"`
// One or more `deliveryProperty` blocks as defined below.
DeliveryProperties []EventSubscriptionDeliveryProperty `pulumi:"deliveryProperties"`
// Specifies the event delivery schema for the event subscription. Possible values include: `EventGridSchema`, `CloudEventSchemaV1_0`, `CustomInputSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
EventDeliverySchema *string `pulumi:"eventDeliverySchema"`
// Specifies the id where the Event Hub is located.
EventhubEndpointId *string `pulumi:"eventhubEndpointId"`
// Specifies the expiration time of the event subscription (Datetime Format `RFC 3339`).
ExpirationTimeUtc *string `pulumi:"expirationTimeUtc"`
// Specifies the id where the Hybrid Connection is located.
HybridConnectionEndpointId *string `pulumi:"hybridConnectionEndpointId"`
// A list of applicable event types that need to be part of the event subscription.
IncludedEventTypes []string `pulumi:"includedEventTypes"`
// A list of labels to assign to the event subscription.
Labels []string `pulumi:"labels"`
// Specifies the name of the EventGrid Event Subscription resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `retryPolicy` block as defined below.
RetryPolicy *EventSubscriptionRetryPolicy `pulumi:"retryPolicy"`
// Specifies the scope at which the EventGrid Event Subscription should be created. Changing this forces a new resource to be created.
Scope *string `pulumi:"scope"`
// Specifies the id where the Service Bus Queue is located.
ServiceBusQueueEndpointId *string `pulumi:"serviceBusQueueEndpointId"`
// Specifies the id where the Service Bus Topic is located.
ServiceBusTopicEndpointId *string `pulumi:"serviceBusTopicEndpointId"`
// A `storageBlobDeadLetterDestination` block as defined below.
StorageBlobDeadLetterDestination *EventSubscriptionStorageBlobDeadLetterDestination `pulumi:"storageBlobDeadLetterDestination"`
// A `storageQueueEndpoint` block as defined below.
StorageQueueEndpoint *EventSubscriptionStorageQueueEndpoint `pulumi:"storageQueueEndpoint"`
// A `subjectFilter` block as defined below.
SubjectFilter *EventSubscriptionSubjectFilter `pulumi:"subjectFilter"`
// A `webhookEndpoint` block as defined below.
//
// > **Note:** One of `eventhubEndpointId`, `hybridConnectionEndpointId`, `serviceBusQueueEndpointId`, `serviceBusTopicEndpointId`, `storageQueueEndpoint`, `webhookEndpoint` or `azureFunctionEndpoint` must be specified.
WebhookEndpoint *EventSubscriptionWebhookEndpoint `pulumi:"webhookEndpoint"`
}
type EventSubscriptionState struct {
// A `advancedFilter` block as defined below.
AdvancedFilter EventSubscriptionAdvancedFilterPtrInput
// Specifies whether advanced filters should be evaluated against an array of values instead of expecting a singular value. Defaults to `false`.
AdvancedFilteringOnArraysEnabled pulumi.BoolPtrInput
// An `azureFunctionEndpoint` block as defined below.
AzureFunctionEndpoint EventSubscriptionAzureFunctionEndpointPtrInput
// A `deadLetterIdentity` block as defined below.
//
// > **Note:** `storageBlobDeadLetterDestination` must be specified when a `deadLetterIdentity` is specified
DeadLetterIdentity EventSubscriptionDeadLetterIdentityPtrInput
// A `deliveryIdentity` block as defined below.
DeliveryIdentity EventSubscriptionDeliveryIdentityPtrInput
// One or more `deliveryProperty` blocks as defined below.
DeliveryProperties EventSubscriptionDeliveryPropertyArrayInput
// Specifies the event delivery schema for the event subscription. Possible values include: `EventGridSchema`, `CloudEventSchemaV1_0`, `CustomInputSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
EventDeliverySchema pulumi.StringPtrInput
// Specifies the id where the Event Hub is located.
EventhubEndpointId pulumi.StringPtrInput
// Specifies the expiration time of the event subscription (Datetime Format `RFC 3339`).
ExpirationTimeUtc pulumi.StringPtrInput
// Specifies the id where the Hybrid Connection is located.
HybridConnectionEndpointId pulumi.StringPtrInput
// A list of applicable event types that need to be part of the event subscription.
IncludedEventTypes pulumi.StringArrayInput
// A list of labels to assign to the event subscription.
Labels pulumi.StringArrayInput
// Specifies the name of the EventGrid Event Subscription resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `retryPolicy` block as defined below.
RetryPolicy EventSubscriptionRetryPolicyPtrInput
// Specifies the scope at which the EventGrid Event Subscription should be created. Changing this forces a new resource to be created.
Scope pulumi.StringPtrInput
// Specifies the id where the Service Bus Queue is located.
ServiceBusQueueEndpointId pulumi.StringPtrInput
// Specifies the id where the Service Bus Topic is located.
ServiceBusTopicEndpointId pulumi.StringPtrInput
// A `storageBlobDeadLetterDestination` block as defined below.
StorageBlobDeadLetterDestination EventSubscriptionStorageBlobDeadLetterDestinationPtrInput
// A `storageQueueEndpoint` block as defined below.
StorageQueueEndpoint EventSubscriptionStorageQueueEndpointPtrInput
// A `subjectFilter` block as defined below.
SubjectFilter EventSubscriptionSubjectFilterPtrInput
// A `webhookEndpoint` block as defined below.
//
// > **Note:** One of `eventhubEndpointId`, `hybridConnectionEndpointId`, `serviceBusQueueEndpointId`, `serviceBusTopicEndpointId`, `storageQueueEndpoint`, `webhookEndpoint` or `azureFunctionEndpoint` must be specified.
WebhookEndpoint EventSubscriptionWebhookEndpointPtrInput
}
func (EventSubscriptionState) ElementType() reflect.Type {
return reflect.TypeOf((*eventSubscriptionState)(nil)).Elem()
}
type eventSubscriptionArgs struct {
// A `advancedFilter` block as defined below.
AdvancedFilter *EventSubscriptionAdvancedFilter `pulumi:"advancedFilter"`
// Specifies whether advanced filters should be evaluated against an array of values instead of expecting a singular value. Defaults to `false`.
AdvancedFilteringOnArraysEnabled *bool `pulumi:"advancedFilteringOnArraysEnabled"`
// An `azureFunctionEndpoint` block as defined below.
AzureFunctionEndpoint *EventSubscriptionAzureFunctionEndpoint `pulumi:"azureFunctionEndpoint"`
// A `deadLetterIdentity` block as defined below.
//
// > **Note:** `storageBlobDeadLetterDestination` must be specified when a `deadLetterIdentity` is specified
DeadLetterIdentity *EventSubscriptionDeadLetterIdentity `pulumi:"deadLetterIdentity"`
// A `deliveryIdentity` block as defined below.
DeliveryIdentity *EventSubscriptionDeliveryIdentity `pulumi:"deliveryIdentity"`
// One or more `deliveryProperty` blocks as defined below.
DeliveryProperties []EventSubscriptionDeliveryProperty `pulumi:"deliveryProperties"`
// Specifies the event delivery schema for the event subscription. Possible values include: `EventGridSchema`, `CloudEventSchemaV1_0`, `CustomInputSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
EventDeliverySchema *string `pulumi:"eventDeliverySchema"`
// Specifies the id where the Event Hub is located.
EventhubEndpointId *string `pulumi:"eventhubEndpointId"`
// Specifies the expiration time of the event subscription (Datetime Format `RFC 3339`).
ExpirationTimeUtc *string `pulumi:"expirationTimeUtc"`
// Specifies the id where the Hybrid Connection is located.
HybridConnectionEndpointId *string `pulumi:"hybridConnectionEndpointId"`
// A list of applicable event types that need to be part of the event subscription.
IncludedEventTypes []string `pulumi:"includedEventTypes"`
// A list of labels to assign to the event subscription.
Labels []string `pulumi:"labels"`
// Specifies the name of the EventGrid Event Subscription resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A `retryPolicy` block as defined below.
RetryPolicy *EventSubscriptionRetryPolicy `pulumi:"retryPolicy"`
// Specifies the scope at which the EventGrid Event Subscription should be created. Changing this forces a new resource to be created.
Scope string `pulumi:"scope"`
// Specifies the id where the Service Bus Queue is located.
ServiceBusQueueEndpointId *string `pulumi:"serviceBusQueueEndpointId"`
// Specifies the id where the Service Bus Topic is located.
ServiceBusTopicEndpointId *string `pulumi:"serviceBusTopicEndpointId"`
// A `storageBlobDeadLetterDestination` block as defined below.
StorageBlobDeadLetterDestination *EventSubscriptionStorageBlobDeadLetterDestination `pulumi:"storageBlobDeadLetterDestination"`
// A `storageQueueEndpoint` block as defined below.
StorageQueueEndpoint *EventSubscriptionStorageQueueEndpoint `pulumi:"storageQueueEndpoint"`
// A `subjectFilter` block as defined below.
SubjectFilter *EventSubscriptionSubjectFilter `pulumi:"subjectFilter"`
// A `webhookEndpoint` block as defined below.
//
// > **Note:** One of `eventhubEndpointId`, `hybridConnectionEndpointId`, `serviceBusQueueEndpointId`, `serviceBusTopicEndpointId`, `storageQueueEndpoint`, `webhookEndpoint` or `azureFunctionEndpoint` must be specified.
WebhookEndpoint *EventSubscriptionWebhookEndpoint `pulumi:"webhookEndpoint"`
}
// The set of arguments for constructing a EventSubscription resource.
type EventSubscriptionArgs struct {
// A `advancedFilter` block as defined below.
AdvancedFilter EventSubscriptionAdvancedFilterPtrInput
// Specifies whether advanced filters should be evaluated against an array of values instead of expecting a singular value. Defaults to `false`.
AdvancedFilteringOnArraysEnabled pulumi.BoolPtrInput
// An `azureFunctionEndpoint` block as defined below.
AzureFunctionEndpoint EventSubscriptionAzureFunctionEndpointPtrInput
// A `deadLetterIdentity` block as defined below.
//
// > **Note:** `storageBlobDeadLetterDestination` must be specified when a `deadLetterIdentity` is specified
DeadLetterIdentity EventSubscriptionDeadLetterIdentityPtrInput
// A `deliveryIdentity` block as defined below.
DeliveryIdentity EventSubscriptionDeliveryIdentityPtrInput
// One or more `deliveryProperty` blocks as defined below.
DeliveryProperties EventSubscriptionDeliveryPropertyArrayInput
// Specifies the event delivery schema for the event subscription. Possible values include: `EventGridSchema`, `CloudEventSchemaV1_0`, `CustomInputSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
EventDeliverySchema pulumi.StringPtrInput
// Specifies the id where the Event Hub is located.
EventhubEndpointId pulumi.StringPtrInput
// Specifies the expiration time of the event subscription (Datetime Format `RFC 3339`).
ExpirationTimeUtc pulumi.StringPtrInput
// Specifies the id where the Hybrid Connection is located.
HybridConnectionEndpointId pulumi.StringPtrInput
// A list of applicable event types that need to be part of the event subscription.
IncludedEventTypes pulumi.StringArrayInput
// A list of labels to assign to the event subscription.
Labels pulumi.StringArrayInput
// Specifies the name of the EventGrid Event Subscription resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A `retryPolicy` block as defined below.
RetryPolicy EventSubscriptionRetryPolicyPtrInput
// Specifies the scope at which the EventGrid Event Subscription should be created. Changing this forces a new resource to be created.
Scope pulumi.StringInput
// Specifies the id where the Service Bus Queue is located.
ServiceBusQueueEndpointId pulumi.StringPtrInput
// Specifies the id where the Service Bus Topic is located.
ServiceBusTopicEndpointId pulumi.StringPtrInput
// A `storageBlobDeadLetterDestination` block as defined below.
StorageBlobDeadLetterDestination EventSubscriptionStorageBlobDeadLetterDestinationPtrInput
// A `storageQueueEndpoint` block as defined below.
StorageQueueEndpoint EventSubscriptionStorageQueueEndpointPtrInput
// A `subjectFilter` block as defined below.
SubjectFilter EventSubscriptionSubjectFilterPtrInput
// A `webhookEndpoint` block as defined below.
//
// > **Note:** One of `eventhubEndpointId`, `hybridConnectionEndpointId`, `serviceBusQueueEndpointId`, `serviceBusTopicEndpointId`, `storageQueueEndpoint`, `webhookEndpoint` or `azureFunctionEndpoint` must be specified.
WebhookEndpoint EventSubscriptionWebhookEndpointPtrInput
}
func (EventSubscriptionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*eventSubscriptionArgs)(nil)).Elem()
}
type EventSubscriptionInput interface {
pulumi.Input
ToEventSubscriptionOutput() EventSubscriptionOutput
ToEventSubscriptionOutputWithContext(ctx context.Context) EventSubscriptionOutput
}
func (*EventSubscription) ElementType() reflect.Type {
return reflect.TypeOf((**EventSubscription)(nil)).Elem()
}
func (i *EventSubscription) ToEventSubscriptionOutput() EventSubscriptionOutput {
return i.ToEventSubscriptionOutputWithContext(context.Background())
}
func (i *EventSubscription) ToEventSubscriptionOutputWithContext(ctx context.Context) EventSubscriptionOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventSubscriptionOutput)
}
// EventSubscriptionArrayInput is an input type that accepts EventSubscriptionArray and EventSubscriptionArrayOutput values.
// You can construct a concrete instance of `EventSubscriptionArrayInput` via:
//
// EventSubscriptionArray{ EventSubscriptionArgs{...} }
type EventSubscriptionArrayInput interface {
pulumi.Input
ToEventSubscriptionArrayOutput() EventSubscriptionArrayOutput
ToEventSubscriptionArrayOutputWithContext(context.Context) EventSubscriptionArrayOutput
}
type EventSubscriptionArray []EventSubscriptionInput
func (EventSubscriptionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventSubscription)(nil)).Elem()
}
func (i EventSubscriptionArray) ToEventSubscriptionArrayOutput() EventSubscriptionArrayOutput {
return i.ToEventSubscriptionArrayOutputWithContext(context.Background())
}
func (i EventSubscriptionArray) ToEventSubscriptionArrayOutputWithContext(ctx context.Context) EventSubscriptionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventSubscriptionArrayOutput)
}
// EventSubscriptionMapInput is an input type that accepts EventSubscriptionMap and EventSubscriptionMapOutput values.
// You can construct a concrete instance of `EventSubscriptionMapInput` via:
//
// EventSubscriptionMap{ "key": EventSubscriptionArgs{...} }
type EventSubscriptionMapInput interface {
pulumi.Input
ToEventSubscriptionMapOutput() EventSubscriptionMapOutput
ToEventSubscriptionMapOutputWithContext(context.Context) EventSubscriptionMapOutput
}
type EventSubscriptionMap map[string]EventSubscriptionInput
func (EventSubscriptionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventSubscription)(nil)).Elem()
}
func (i EventSubscriptionMap) ToEventSubscriptionMapOutput() EventSubscriptionMapOutput {
return i.ToEventSubscriptionMapOutputWithContext(context.Background())
}
func (i EventSubscriptionMap) ToEventSubscriptionMapOutputWithContext(ctx context.Context) EventSubscriptionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EventSubscriptionMapOutput)
}
type EventSubscriptionOutput struct{ *pulumi.OutputState }
func (EventSubscriptionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EventSubscription)(nil)).Elem()
}
func (o EventSubscriptionOutput) ToEventSubscriptionOutput() EventSubscriptionOutput {
return o
}
func (o EventSubscriptionOutput) ToEventSubscriptionOutputWithContext(ctx context.Context) EventSubscriptionOutput {
return o
}
// A `advancedFilter` block as defined below.
func (o EventSubscriptionOutput) AdvancedFilter() EventSubscriptionAdvancedFilterPtrOutput {
return o.ApplyT(func(v *EventSubscription) EventSubscriptionAdvancedFilterPtrOutput { return v.AdvancedFilter }).(EventSubscriptionAdvancedFilterPtrOutput)
}
// Specifies whether advanced filters should be evaluated against an array of values instead of expecting a singular value. Defaults to `false`.
func (o EventSubscriptionOutput) AdvancedFilteringOnArraysEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EventSubscription) pulumi.BoolPtrOutput { return v.AdvancedFilteringOnArraysEnabled }).(pulumi.BoolPtrOutput)
}
// An `azureFunctionEndpoint` block as defined below.
func (o EventSubscriptionOutput) AzureFunctionEndpoint() EventSubscriptionAzureFunctionEndpointPtrOutput {
return o.ApplyT(func(v *EventSubscription) EventSubscriptionAzureFunctionEndpointPtrOutput {
return v.AzureFunctionEndpoint
}).(EventSubscriptionAzureFunctionEndpointPtrOutput)
}
// A `deadLetterIdentity` block as defined below.
//
// > **Note:** `storageBlobDeadLetterDestination` must be specified when a `deadLetterIdentity` is specified
func (o EventSubscriptionOutput) DeadLetterIdentity() EventSubscriptionDeadLetterIdentityPtrOutput {
return o.ApplyT(func(v *EventSubscription) EventSubscriptionDeadLetterIdentityPtrOutput { return v.DeadLetterIdentity }).(EventSubscriptionDeadLetterIdentityPtrOutput)
}
// A `deliveryIdentity` block as defined below.
func (o EventSubscriptionOutput) DeliveryIdentity() EventSubscriptionDeliveryIdentityPtrOutput {
return o.ApplyT(func(v *EventSubscription) EventSubscriptionDeliveryIdentityPtrOutput { return v.DeliveryIdentity }).(EventSubscriptionDeliveryIdentityPtrOutput)
}
// One or more `deliveryProperty` blocks as defined below.
func (o EventSubscriptionOutput) DeliveryProperties() EventSubscriptionDeliveryPropertyArrayOutput {
return o.ApplyT(func(v *EventSubscription) EventSubscriptionDeliveryPropertyArrayOutput { return v.DeliveryProperties }).(EventSubscriptionDeliveryPropertyArrayOutput)
}
// Specifies the event delivery schema for the event subscription. Possible values include: `EventGridSchema`, `CloudEventSchemaV1_0`, `CustomInputSchema`. Defaults to `EventGridSchema`. Changing this forces a new resource to be created.
func (o EventSubscriptionOutput) EventDeliverySchema() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EventSubscription) pulumi.StringPtrOutput { return v.EventDeliverySchema }).(pulumi.StringPtrOutput)
}
// Specifies the id where the Event Hub is located.
func (o EventSubscriptionOutput) EventhubEndpointId() pulumi.StringOutput {
return o.ApplyT(func(v *EventSubscription) pulumi.StringOutput { return v.EventhubEndpointId }).(pulumi.StringOutput)
}
// Specifies the expiration time of the event subscription (Datetime Format `RFC 3339`).
func (o EventSubscriptionOutput) ExpirationTimeUtc() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EventSubscription) pulumi.StringPtrOutput { return v.ExpirationTimeUtc }).(pulumi.StringPtrOutput)
}
// Specifies the id where the Hybrid Connection is located.
func (o EventSubscriptionOutput) HybridConnectionEndpointId() pulumi.StringOutput {
return o.ApplyT(func(v *EventSubscription) pulumi.StringOutput { return v.HybridConnectionEndpointId }).(pulumi.StringOutput)
}
// A list of applicable event types that need to be part of the event subscription.
func (o EventSubscriptionOutput) IncludedEventTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *EventSubscription) pulumi.StringArrayOutput { return v.IncludedEventTypes }).(pulumi.StringArrayOutput)
}
// A list of labels to assign to the event subscription.
func (o EventSubscriptionOutput) Labels() pulumi.StringArrayOutput {
return o.ApplyT(func(v *EventSubscription) pulumi.StringArrayOutput { return v.Labels }).(pulumi.StringArrayOutput)
}
// Specifies the name of the EventGrid Event Subscription resource. Changing this forces a new resource to be created.
func (o EventSubscriptionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EventSubscription) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A `retryPolicy` block as defined below.
func (o EventSubscriptionOutput) RetryPolicy() EventSubscriptionRetryPolicyOutput {
return o.ApplyT(func(v *EventSubscription) EventSubscriptionRetryPolicyOutput { return v.RetryPolicy }).(EventSubscriptionRetryPolicyOutput)
}
// Specifies the scope at which the EventGrid Event Subscription should be created. Changing this forces a new resource to be created.
func (o EventSubscriptionOutput) Scope() pulumi.StringOutput {
return o.ApplyT(func(v *EventSubscription) pulumi.StringOutput { return v.Scope }).(pulumi.StringOutput)
}
// Specifies the id where the Service Bus Queue is located.
func (o EventSubscriptionOutput) ServiceBusQueueEndpointId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EventSubscription) pulumi.StringPtrOutput { return v.ServiceBusQueueEndpointId }).(pulumi.StringPtrOutput)
}
// Specifies the id where the Service Bus Topic is located.
func (o EventSubscriptionOutput) ServiceBusTopicEndpointId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EventSubscription) pulumi.StringPtrOutput { return v.ServiceBusTopicEndpointId }).(pulumi.StringPtrOutput)
}
// A `storageBlobDeadLetterDestination` block as defined below.
func (o EventSubscriptionOutput) StorageBlobDeadLetterDestination() EventSubscriptionStorageBlobDeadLetterDestinationPtrOutput {
return o.ApplyT(func(v *EventSubscription) EventSubscriptionStorageBlobDeadLetterDestinationPtrOutput {
return v.StorageBlobDeadLetterDestination
}).(EventSubscriptionStorageBlobDeadLetterDestinationPtrOutput)
}
// A `storageQueueEndpoint` block as defined below.
func (o EventSubscriptionOutput) StorageQueueEndpoint() EventSubscriptionStorageQueueEndpointPtrOutput {
return o.ApplyT(func(v *EventSubscription) EventSubscriptionStorageQueueEndpointPtrOutput {
return v.StorageQueueEndpoint
}).(EventSubscriptionStorageQueueEndpointPtrOutput)
}
// A `subjectFilter` block as defined below.
func (o EventSubscriptionOutput) SubjectFilter() EventSubscriptionSubjectFilterPtrOutput {
return o.ApplyT(func(v *EventSubscription) EventSubscriptionSubjectFilterPtrOutput { return v.SubjectFilter }).(EventSubscriptionSubjectFilterPtrOutput)
}
// A `webhookEndpoint` block as defined below.
//
// > **Note:** One of `eventhubEndpointId`, `hybridConnectionEndpointId`, `serviceBusQueueEndpointId`, `serviceBusTopicEndpointId`, `storageQueueEndpoint`, `webhookEndpoint` or `azureFunctionEndpoint` must be specified.
func (o EventSubscriptionOutput) WebhookEndpoint() EventSubscriptionWebhookEndpointPtrOutput {
return o.ApplyT(func(v *EventSubscription) EventSubscriptionWebhookEndpointPtrOutput { return v.WebhookEndpoint }).(EventSubscriptionWebhookEndpointPtrOutput)
}
type EventSubscriptionArrayOutput struct{ *pulumi.OutputState }
func (EventSubscriptionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EventSubscription)(nil)).Elem()
}
func (o EventSubscriptionArrayOutput) ToEventSubscriptionArrayOutput() EventSubscriptionArrayOutput {
return o
}
func (o EventSubscriptionArrayOutput) ToEventSubscriptionArrayOutputWithContext(ctx context.Context) EventSubscriptionArrayOutput {
return o
}
func (o EventSubscriptionArrayOutput) Index(i pulumi.IntInput) EventSubscriptionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EventSubscription {
return vs[0].([]*EventSubscription)[vs[1].(int)]
}).(EventSubscriptionOutput)
}
type EventSubscriptionMapOutput struct{ *pulumi.OutputState }
func (EventSubscriptionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EventSubscription)(nil)).Elem()
}
func (o EventSubscriptionMapOutput) ToEventSubscriptionMapOutput() EventSubscriptionMapOutput {
return o
}
func (o EventSubscriptionMapOutput) ToEventSubscriptionMapOutputWithContext(ctx context.Context) EventSubscriptionMapOutput {
return o
}
func (o EventSubscriptionMapOutput) MapIndex(k pulumi.StringInput) EventSubscriptionOutput {
| 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/eventhub/queue.go | sdk/go/azure/eventhub/queue.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventhub
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a ServiceBus Queue.
//
// ## 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/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("my-servicebus"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewQueue(ctx, "example", &servicebus.QueueArgs{
// Name: pulumi.String("tfex_servicebus_queue"),
// NamespaceId: exampleNamespace.ID(),
// PartitioningEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ServiceBus` - 2024-01-01
//
// ## Import
//
// Service Bus Queue can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventhub/queue:Queue example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/queues/snqueue1
// ```
//
// Deprecated: azure.eventhub.Queue has been deprecated in favor of azure.servicebus.Queue
type Queue struct {
pulumi.CustomResourceState
// The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.
AutoDeleteOnIdle pulumi.StringOutput `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`.
BatchedOperationsEnabled pulumi.BoolPtrOutput `pulumi:"batchedOperationsEnabled"`
// Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to `false`.
DeadLetteringOnMessageExpiration pulumi.BoolPtrOutput `pulumi:"deadLetteringOnMessageExpiration"`
// The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on message itself.
DefaultMessageTtl pulumi.StringOutput `pulumi:"defaultMessageTtl"`
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow pulumi.StringPtrOutput `pulumi:"duplicateDetectionHistoryTimeWindow"`
// Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`.
//
// > **Note:** Service Bus Premium namespaces do not support Express Entities, so `expressEnabled` MUST be set to `false`.
ExpressEnabled pulumi.BoolPtrOutput `pulumi:"expressEnabled"`
// The name of a Queue or Topic to automatically forward dead lettered messages to.
ForwardDeadLetteredMessagesTo pulumi.StringPtrOutput `pulumi:"forwardDeadLetteredMessagesTo"`
// The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information.
ForwardTo pulumi.StringPtrOutput `pulumi:"forwardTo"`
// The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to `PT1M` (1 Minute).
LockDuration pulumi.StringPtrOutput `pulumi:"lockDuration"`
// Integer value which controls when a message is automatically dead lettered. Defaults to `10`.
MaxDeliveryCount pulumi.IntPtrOutput `pulumi:"maxDeliveryCount"`
// Integer value which controls the maximum size of a message allowed on the queue for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview).
MaxMessageSizeInKilobytes pulumi.IntOutput `pulumi:"maxMessageSizeInKilobytes"`
// Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas).
MaxSizeInMegabytes pulumi.IntOutput `pulumi:"maxSizeInMegabytes"`
// Specifies the name of the ServiceBus Queue resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
NamespaceId pulumi.StringOutput `pulumi:"namespaceId"`
NamespaceName pulumi.StringOutput `pulumi:"namespaceName"`
// Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers. Changing this forces a new resource to be created. Defaults to `false` for Basic and Standard.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. For premium namespace, partitioning is available at namespace creation, and all queues and topics in the partitioned namespace will be partitioned, for the premium namespace that has `premiumMessagingPartitions` sets to `1`, the namespace is not partitioned.
PartitioningEnabled pulumi.BoolPtrOutput `pulumi:"partitioningEnabled"`
// Boolean flag which controls whether the Queue requires duplicate detection. Changing this forces a new resource to be created. Defaults to `false`.
RequiresDuplicateDetection pulumi.BoolPtrOutput `pulumi:"requiresDuplicateDetection"`
// Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`.
RequiresSession pulumi.BoolPtrOutput `pulumi:"requiresSession"`
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`.
Status pulumi.StringPtrOutput `pulumi:"status"`
}
// NewQueue registers a new resource with the given unique name, arguments, and options.
func NewQueue(ctx *pulumi.Context,
name string, args *QueueArgs, opts ...pulumi.ResourceOption) (*Queue, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NamespaceId == nil {
return nil, errors.New("invalid value for required argument 'NamespaceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Queue
err := ctx.RegisterResource("azure:eventhub/queue:Queue", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetQueue gets an existing Queue 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 GetQueue(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *QueueState, opts ...pulumi.ResourceOption) (*Queue, error) {
var resource Queue
err := ctx.ReadResource("azure:eventhub/queue:Queue", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Queue resources.
type queueState struct {
// The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.
AutoDeleteOnIdle *string `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`.
BatchedOperationsEnabled *bool `pulumi:"batchedOperationsEnabled"`
// Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to `false`.
DeadLetteringOnMessageExpiration *bool `pulumi:"deadLetteringOnMessageExpiration"`
// The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on message itself.
DefaultMessageTtl *string `pulumi:"defaultMessageTtl"`
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow *string `pulumi:"duplicateDetectionHistoryTimeWindow"`
// Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`.
//
// > **Note:** Service Bus Premium namespaces do not support Express Entities, so `expressEnabled` MUST be set to `false`.
ExpressEnabled *bool `pulumi:"expressEnabled"`
// The name of a Queue or Topic to automatically forward dead lettered messages to.
ForwardDeadLetteredMessagesTo *string `pulumi:"forwardDeadLetteredMessagesTo"`
// The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information.
ForwardTo *string `pulumi:"forwardTo"`
// The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to `PT1M` (1 Minute).
LockDuration *string `pulumi:"lockDuration"`
// Integer value which controls when a message is automatically dead lettered. Defaults to `10`.
MaxDeliveryCount *int `pulumi:"maxDeliveryCount"`
// Integer value which controls the maximum size of a message allowed on the queue for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview).
MaxMessageSizeInKilobytes *int `pulumi:"maxMessageSizeInKilobytes"`
// Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas).
MaxSizeInMegabytes *int `pulumi:"maxSizeInMegabytes"`
// Specifies the name of the ServiceBus Queue resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
NamespaceId *string `pulumi:"namespaceId"`
NamespaceName *string `pulumi:"namespaceName"`
// Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers. Changing this forces a new resource to be created. Defaults to `false` for Basic and Standard.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. For premium namespace, partitioning is available at namespace creation, and all queues and topics in the partitioned namespace will be partitioned, for the premium namespace that has `premiumMessagingPartitions` sets to `1`, the namespace is not partitioned.
PartitioningEnabled *bool `pulumi:"partitioningEnabled"`
// Boolean flag which controls whether the Queue requires duplicate detection. Changing this forces a new resource to be created. Defaults to `false`.
RequiresDuplicateDetection *bool `pulumi:"requiresDuplicateDetection"`
// Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`.
RequiresSession *bool `pulumi:"requiresSession"`
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`.
Status *string `pulumi:"status"`
}
type QueueState struct {
// The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.
AutoDeleteOnIdle pulumi.StringPtrInput
// Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`.
BatchedOperationsEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to `false`.
DeadLetteringOnMessageExpiration pulumi.BoolPtrInput
// The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on message itself.
DefaultMessageTtl pulumi.StringPtrInput
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow pulumi.StringPtrInput
// Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`.
//
// > **Note:** Service Bus Premium namespaces do not support Express Entities, so `expressEnabled` MUST be set to `false`.
ExpressEnabled pulumi.BoolPtrInput
// The name of a Queue or Topic to automatically forward dead lettered messages to.
ForwardDeadLetteredMessagesTo pulumi.StringPtrInput
// The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information.
ForwardTo pulumi.StringPtrInput
// The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to `PT1M` (1 Minute).
LockDuration pulumi.StringPtrInput
// Integer value which controls when a message is automatically dead lettered. Defaults to `10`.
MaxDeliveryCount pulumi.IntPtrInput
// Integer value which controls the maximum size of a message allowed on the queue for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview).
MaxMessageSizeInKilobytes pulumi.IntPtrInput
// Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas).
MaxSizeInMegabytes pulumi.IntPtrInput
// Specifies the name of the ServiceBus Queue resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
NamespaceId pulumi.StringPtrInput
NamespaceName pulumi.StringPtrInput
// Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers. Changing this forces a new resource to be created. Defaults to `false` for Basic and Standard.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. For premium namespace, partitioning is available at namespace creation, and all queues and topics in the partitioned namespace will be partitioned, for the premium namespace that has `premiumMessagingPartitions` sets to `1`, the namespace is not partitioned.
PartitioningEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Queue requires duplicate detection. Changing this forces a new resource to be created. Defaults to `false`.
RequiresDuplicateDetection pulumi.BoolPtrInput
// Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`.
RequiresSession pulumi.BoolPtrInput
ResourceGroupName pulumi.StringPtrInput
// The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`.
Status pulumi.StringPtrInput
}
func (QueueState) ElementType() reflect.Type {
return reflect.TypeOf((*queueState)(nil)).Elem()
}
type queueArgs struct {
// The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.
AutoDeleteOnIdle *string `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`.
BatchedOperationsEnabled *bool `pulumi:"batchedOperationsEnabled"`
// Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to `false`.
DeadLetteringOnMessageExpiration *bool `pulumi:"deadLetteringOnMessageExpiration"`
// The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on message itself.
DefaultMessageTtl *string `pulumi:"defaultMessageTtl"`
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow *string `pulumi:"duplicateDetectionHistoryTimeWindow"`
// Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`.
//
// > **Note:** Service Bus Premium namespaces do not support Express Entities, so `expressEnabled` MUST be set to `false`.
ExpressEnabled *bool `pulumi:"expressEnabled"`
// The name of a Queue or Topic to automatically forward dead lettered messages to.
ForwardDeadLetteredMessagesTo *string `pulumi:"forwardDeadLetteredMessagesTo"`
// The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information.
ForwardTo *string `pulumi:"forwardTo"`
// The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to `PT1M` (1 Minute).
LockDuration *string `pulumi:"lockDuration"`
// Integer value which controls when a message is automatically dead lettered. Defaults to `10`.
MaxDeliveryCount *int `pulumi:"maxDeliveryCount"`
// Integer value which controls the maximum size of a message allowed on the queue for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview).
MaxMessageSizeInKilobytes *int `pulumi:"maxMessageSizeInKilobytes"`
// Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas).
MaxSizeInMegabytes *int `pulumi:"maxSizeInMegabytes"`
// Specifies the name of the ServiceBus Queue resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
NamespaceId string `pulumi:"namespaceId"`
// Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers. Changing this forces a new resource to be created. Defaults to `false` for Basic and Standard.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. For premium namespace, partitioning is available at namespace creation, and all queues and topics in the partitioned namespace will be partitioned, for the premium namespace that has `premiumMessagingPartitions` sets to `1`, the namespace is not partitioned.
PartitioningEnabled *bool `pulumi:"partitioningEnabled"`
// Boolean flag which controls whether the Queue requires duplicate detection. Changing this forces a new resource to be created. Defaults to `false`.
RequiresDuplicateDetection *bool `pulumi:"requiresDuplicateDetection"`
// Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`.
RequiresSession *bool `pulumi:"requiresSession"`
// The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`.
Status *string `pulumi:"status"`
}
// The set of arguments for constructing a Queue resource.
type QueueArgs struct {
// The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.
AutoDeleteOnIdle pulumi.StringPtrInput
// Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`.
BatchedOperationsEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to `false`.
DeadLetteringOnMessageExpiration pulumi.BoolPtrInput
// The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on message itself.
DefaultMessageTtl pulumi.StringPtrInput
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow pulumi.StringPtrInput
// Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`.
//
// > **Note:** Service Bus Premium namespaces do not support Express Entities, so `expressEnabled` MUST be set to `false`.
ExpressEnabled pulumi.BoolPtrInput
// The name of a Queue or Topic to automatically forward dead lettered messages to.
ForwardDeadLetteredMessagesTo pulumi.StringPtrInput
// The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information.
ForwardTo pulumi.StringPtrInput
// The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to `PT1M` (1 Minute).
LockDuration pulumi.StringPtrInput
// Integer value which controls when a message is automatically dead lettered. Defaults to `10`.
MaxDeliveryCount pulumi.IntPtrInput
// Integer value which controls the maximum size of a message allowed on the queue for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview).
MaxMessageSizeInKilobytes pulumi.IntPtrInput
// Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas).
MaxSizeInMegabytes pulumi.IntPtrInput
// Specifies the name of the ServiceBus Queue resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
NamespaceId pulumi.StringInput
// Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers. Changing this forces a new resource to be created. Defaults to `false` for Basic and Standard.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. For premium namespace, partitioning is available at namespace creation, and all queues and topics in the partitioned namespace will be partitioned, for the premium namespace that has `premiumMessagingPartitions` sets to `1`, the namespace is not partitioned.
PartitioningEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Queue requires duplicate detection. Changing this forces a new resource to be created. Defaults to `false`.
RequiresDuplicateDetection pulumi.BoolPtrInput
// Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`.
RequiresSession pulumi.BoolPtrInput
// The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`.
Status pulumi.StringPtrInput
}
func (QueueArgs) ElementType() reflect.Type {
return reflect.TypeOf((*queueArgs)(nil)).Elem()
}
type QueueInput interface {
pulumi.Input
ToQueueOutput() QueueOutput
ToQueueOutputWithContext(ctx context.Context) QueueOutput
}
func (*Queue) ElementType() reflect.Type {
return reflect.TypeOf((**Queue)(nil)).Elem()
}
func (i *Queue) ToQueueOutput() QueueOutput {
return i.ToQueueOutputWithContext(context.Background())
}
func (i *Queue) ToQueueOutputWithContext(ctx context.Context) QueueOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueueOutput)
}
// QueueArrayInput is an input type that accepts QueueArray and QueueArrayOutput values.
// You can construct a concrete instance of `QueueArrayInput` via:
//
// QueueArray{ QueueArgs{...} }
type QueueArrayInput interface {
pulumi.Input
ToQueueArrayOutput() QueueArrayOutput
ToQueueArrayOutputWithContext(context.Context) QueueArrayOutput
}
type QueueArray []QueueInput
func (QueueArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Queue)(nil)).Elem()
}
func (i QueueArray) ToQueueArrayOutput() QueueArrayOutput {
return i.ToQueueArrayOutputWithContext(context.Background())
}
func (i QueueArray) ToQueueArrayOutputWithContext(ctx context.Context) QueueArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueueArrayOutput)
}
// QueueMapInput is an input type that accepts QueueMap and QueueMapOutput values.
// You can construct a concrete instance of `QueueMapInput` via:
//
// QueueMap{ "key": QueueArgs{...} }
type QueueMapInput interface {
pulumi.Input
ToQueueMapOutput() QueueMapOutput
ToQueueMapOutputWithContext(context.Context) QueueMapOutput
}
type QueueMap map[string]QueueInput
func (QueueMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Queue)(nil)).Elem()
}
func (i QueueMap) ToQueueMapOutput() QueueMapOutput {
return i.ToQueueMapOutputWithContext(context.Background())
}
func (i QueueMap) ToQueueMapOutputWithContext(ctx context.Context) QueueMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueueMapOutput)
}
type QueueOutput struct{ *pulumi.OutputState }
func (QueueOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Queue)(nil)).Elem()
}
func (o QueueOutput) ToQueueOutput() QueueOutput {
return o
}
func (o QueueOutput) ToQueueOutputWithContext(ctx context.Context) QueueOutput {
return o
}
// The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.
func (o QueueOutput) AutoDeleteOnIdle() pulumi.StringOutput {
return o.ApplyT(func(v *Queue) pulumi.StringOutput { return v.AutoDeleteOnIdle }).(pulumi.StringOutput)
}
// Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`.
func (o QueueOutput) BatchedOperationsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.BoolPtrOutput { return v.BatchedOperationsEnabled }).(pulumi.BoolPtrOutput)
}
// Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to `false`.
func (o QueueOutput) DeadLetteringOnMessageExpiration() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.BoolPtrOutput { return v.DeadLetteringOnMessageExpiration }).(pulumi.BoolPtrOutput)
}
// The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on message itself.
func (o QueueOutput) DefaultMessageTtl() pulumi.StringOutput {
return o.ApplyT(func(v *Queue) pulumi.StringOutput { return v.DefaultMessageTtl }).(pulumi.StringOutput)
}
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
func (o QueueOutput) DuplicateDetectionHistoryTimeWindow() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.StringPtrOutput { return v.DuplicateDetectionHistoryTimeWindow }).(pulumi.StringPtrOutput)
}
// Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`.
//
// > **Note:** Service Bus Premium namespaces do not support Express Entities, so `expressEnabled` MUST be set to `false`.
func (o QueueOutput) ExpressEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.BoolPtrOutput { return v.ExpressEnabled }).(pulumi.BoolPtrOutput)
}
// The name of a Queue or Topic to automatically forward dead lettered messages to.
func (o QueueOutput) ForwardDeadLetteredMessagesTo() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.StringPtrOutput { return v.ForwardDeadLetteredMessagesTo }).(pulumi.StringPtrOutput)
}
// The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information.
func (o QueueOutput) ForwardTo() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.StringPtrOutput { return v.ForwardTo }).(pulumi.StringPtrOutput)
}
// The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to `PT1M` (1 Minute).
func (o QueueOutput) LockDuration() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.StringPtrOutput { return v.LockDuration }).(pulumi.StringPtrOutput)
}
// Integer value which controls when a message is automatically dead lettered. Defaults to `10`.
func (o QueueOutput) MaxDeliveryCount() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.IntPtrOutput { return v.MaxDeliveryCount }).(pulumi.IntPtrOutput)
}
| 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/servicebus/getNamespace.go | sdk/go/azure/servicebus/getNamespace.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
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 ServiceBus Namespace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := servicebus.LookupNamespace(ctx, &servicebus.LookupNamespaceArgs{
// Name: "examplenamespace",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("location", example.Location)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.ServiceBus` - 2024-01-01
func LookupNamespace(ctx *pulumi.Context, args *LookupNamespaceArgs, opts ...pulumi.InvokeOption) (*LookupNamespaceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupNamespaceResult
err := ctx.Invoke("azure:servicebus/getNamespace:getNamespace", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getNamespace.
type LookupNamespaceArgs struct {
// Specifies the name of the ServiceBus Namespace.
Name string `pulumi:"name"`
// Specifies the name of the Resource Group where the ServiceBus Namespace exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getNamespace.
type LookupNamespaceResult struct {
// The capacity of the ServiceBus Namespace.
Capacity int `pulumi:"capacity"`
// The primary connection string for the authorization
// rule `RootManageSharedAccessKey`.
DefaultPrimaryConnectionString string `pulumi:"defaultPrimaryConnectionString"`
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey string `pulumi:"defaultPrimaryKey"`
// The secondary connection string for the
// authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryConnectionString string `pulumi:"defaultSecondaryConnectionString"`
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey string `pulumi:"defaultSecondaryKey"`
// The URL to access the ServiceBus Namespace.
Endpoint string `pulumi:"endpoint"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The location of the Resource Group in which the ServiceBus Namespace exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// The messaging partitions of the ServiceBus Namespace.
PremiumMessagingPartitions int `pulumi:"premiumMessagingPartitions"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Tier used for the ServiceBus Namespace.
Sku string `pulumi:"sku"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
}
func LookupNamespaceOutput(ctx *pulumi.Context, args LookupNamespaceOutputArgs, opts ...pulumi.InvokeOption) LookupNamespaceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupNamespaceResultOutput, error) {
args := v.(LookupNamespaceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:servicebus/getNamespace:getNamespace", args, LookupNamespaceResultOutput{}, options).(LookupNamespaceResultOutput), nil
}).(LookupNamespaceResultOutput)
}
// A collection of arguments for invoking getNamespace.
type LookupNamespaceOutputArgs struct {
// Specifies the name of the ServiceBus Namespace.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the name of the Resource Group where the ServiceBus Namespace exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupNamespaceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupNamespaceArgs)(nil)).Elem()
}
// A collection of values returned by getNamespace.
type LookupNamespaceResultOutput struct{ *pulumi.OutputState }
func (LookupNamespaceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupNamespaceResult)(nil)).Elem()
}
func (o LookupNamespaceResultOutput) ToLookupNamespaceResultOutput() LookupNamespaceResultOutput {
return o
}
func (o LookupNamespaceResultOutput) ToLookupNamespaceResultOutputWithContext(ctx context.Context) LookupNamespaceResultOutput {
return o
}
// The capacity of the ServiceBus Namespace.
func (o LookupNamespaceResultOutput) Capacity() pulumi.IntOutput {
return o.ApplyT(func(v LookupNamespaceResult) int { return v.Capacity }).(pulumi.IntOutput)
}
// The primary connection string for the authorization
// rule `RootManageSharedAccessKey`.
func (o LookupNamespaceResultOutput) DefaultPrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.DefaultPrimaryConnectionString }).(pulumi.StringOutput)
}
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
func (o LookupNamespaceResultOutput) DefaultPrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.DefaultPrimaryKey }).(pulumi.StringOutput)
}
// The secondary connection string for the
// authorization rule `RootManageSharedAccessKey`.
func (o LookupNamespaceResultOutput) DefaultSecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.DefaultSecondaryConnectionString }).(pulumi.StringOutput)
}
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
func (o LookupNamespaceResultOutput) DefaultSecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.DefaultSecondaryKey }).(pulumi.StringOutput)
}
// The URL to access the ServiceBus Namespace.
func (o LookupNamespaceResultOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.Endpoint }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupNamespaceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.Id }).(pulumi.StringOutput)
}
// The location of the Resource Group in which the ServiceBus Namespace exists.
func (o LookupNamespaceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupNamespaceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.Name }).(pulumi.StringOutput)
}
// The messaging partitions of the ServiceBus Namespace.
func (o LookupNamespaceResultOutput) PremiumMessagingPartitions() pulumi.IntOutput {
return o.ApplyT(func(v LookupNamespaceResult) int { return v.PremiumMessagingPartitions }).(pulumi.IntOutput)
}
func (o LookupNamespaceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Tier used for the ServiceBus Namespace.
func (o LookupNamespaceResultOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceResult) string { return v.Sku }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the resource.
func (o LookupNamespaceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupNamespaceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupNamespaceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/namespaceDisasterRecoveryConfig.go | sdk/go/azure/servicebus/namespaceDisasterRecoveryConfig.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Disaster Recovery Config for a Service Bus Namespace.
//
// > **Note:** Disaster Recovery Config is a Premium SKU only capability.
//
// ## 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/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("servicebus-replication"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// primary, err := servicebus.NewNamespace(ctx, "primary", &servicebus.NamespaceArgs{
// Name: pulumi.String("servicebus-primary"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Premium"),
// Capacity: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// secondary, err := servicebus.NewNamespace(ctx, "secondary", &servicebus.NamespaceArgs{
// Name: pulumi.String("servicebus-secondary"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Premium"),
// Capacity: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// exampleNamespaceAuthorizationRule, err := servicebus.NewNamespaceAuthorizationRule(ctx, "example", &servicebus.NamespaceAuthorizationRuleArgs{
// Name: pulumi.String("examplerule"),
// NamespaceId: pulumi.Any(exampleAzurermServicebusNamespace.Id),
// Listen: pulumi.Bool(true),
// Send: pulumi.Bool(true),
// Manage: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewNamespaceDisasterRecoveryConfig(ctx, "example", &servicebus.NamespaceDisasterRecoveryConfigArgs{
// Name: pulumi.String("servicebus-alias-name"),
// PrimaryNamespaceId: primary.ID(),
// PartnerNamespaceId: secondary.ID(),
// AliasAuthorizationRuleId: exampleNamespaceAuthorizationRule.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.ServiceBus` - 2024-01-01
//
// ## Import
//
// Service Bus DR configs can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:servicebus/namespaceDisasterRecoveryConfig:NamespaceDisasterRecoveryConfig config1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ServiceBus/namespaces/namespace1/disasterRecoveryConfigs/config1
// ```
type NamespaceDisasterRecoveryConfig struct {
pulumi.CustomResourceState
// The Shared access policies used to access the connection string for the alias.
AliasAuthorizationRuleId pulumi.StringPtrOutput `pulumi:"aliasAuthorizationRuleId"`
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey pulumi.StringOutput `pulumi:"defaultPrimaryKey"`
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey pulumi.StringOutput `pulumi:"defaultSecondaryKey"`
// Specifies the name of the Disaster Recovery Config. This is the alias DNS name that will be created. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Service Bus Namespace to replicate to.
PartnerNamespaceId pulumi.StringOutput `pulumi:"partnerNamespaceId"`
// The alias Primary Connection String for the ServiceBus Namespace.
PrimaryConnectionStringAlias pulumi.StringOutput `pulumi:"primaryConnectionStringAlias"`
// The ID of the primary Service Bus Namespace to replicate. Changing this forces a new resource to be created.
PrimaryNamespaceId pulumi.StringOutput `pulumi:"primaryNamespaceId"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias pulumi.StringOutput `pulumi:"secondaryConnectionStringAlias"`
}
// NewNamespaceDisasterRecoveryConfig registers a new resource with the given unique name, arguments, and options.
func NewNamespaceDisasterRecoveryConfig(ctx *pulumi.Context,
name string, args *NamespaceDisasterRecoveryConfigArgs, opts ...pulumi.ResourceOption) (*NamespaceDisasterRecoveryConfig, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PartnerNamespaceId == nil {
return nil, errors.New("invalid value for required argument 'PartnerNamespaceId'")
}
if args.PrimaryNamespaceId == nil {
return nil, errors.New("invalid value for required argument 'PrimaryNamespaceId'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"defaultPrimaryKey",
"defaultSecondaryKey",
"primaryConnectionStringAlias",
"secondaryConnectionStringAlias",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource NamespaceDisasterRecoveryConfig
err := ctx.RegisterResource("azure:servicebus/namespaceDisasterRecoveryConfig:NamespaceDisasterRecoveryConfig", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNamespaceDisasterRecoveryConfig gets an existing NamespaceDisasterRecoveryConfig 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 GetNamespaceDisasterRecoveryConfig(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NamespaceDisasterRecoveryConfigState, opts ...pulumi.ResourceOption) (*NamespaceDisasterRecoveryConfig, error) {
var resource NamespaceDisasterRecoveryConfig
err := ctx.ReadResource("azure:servicebus/namespaceDisasterRecoveryConfig:NamespaceDisasterRecoveryConfig", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NamespaceDisasterRecoveryConfig resources.
type namespaceDisasterRecoveryConfigState struct {
// The Shared access policies used to access the connection string for the alias.
AliasAuthorizationRuleId *string `pulumi:"aliasAuthorizationRuleId"`
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey *string `pulumi:"defaultPrimaryKey"`
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey *string `pulumi:"defaultSecondaryKey"`
// Specifies the name of the Disaster Recovery Config. This is the alias DNS name that will be created. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Service Bus Namespace to replicate to.
PartnerNamespaceId *string `pulumi:"partnerNamespaceId"`
// The alias Primary Connection String for the ServiceBus Namespace.
PrimaryConnectionStringAlias *string `pulumi:"primaryConnectionStringAlias"`
// The ID of the primary Service Bus Namespace to replicate. Changing this forces a new resource to be created.
PrimaryNamespaceId *string `pulumi:"primaryNamespaceId"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias *string `pulumi:"secondaryConnectionStringAlias"`
}
type NamespaceDisasterRecoveryConfigState struct {
// The Shared access policies used to access the connection string for the alias.
AliasAuthorizationRuleId pulumi.StringPtrInput
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey pulumi.StringPtrInput
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey pulumi.StringPtrInput
// Specifies the name of the Disaster Recovery Config. This is the alias DNS name that will be created. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Service Bus Namespace to replicate to.
PartnerNamespaceId pulumi.StringPtrInput
// The alias Primary Connection String for the ServiceBus Namespace.
PrimaryConnectionStringAlias pulumi.StringPtrInput
// The ID of the primary Service Bus Namespace to replicate. Changing this forces a new resource to be created.
PrimaryNamespaceId pulumi.StringPtrInput
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias pulumi.StringPtrInput
}
func (NamespaceDisasterRecoveryConfigState) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceDisasterRecoveryConfigState)(nil)).Elem()
}
type namespaceDisasterRecoveryConfigArgs struct {
// The Shared access policies used to access the connection string for the alias.
AliasAuthorizationRuleId *string `pulumi:"aliasAuthorizationRuleId"`
// Specifies the name of the Disaster Recovery Config. This is the alias DNS name that will be created. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Service Bus Namespace to replicate to.
PartnerNamespaceId string `pulumi:"partnerNamespaceId"`
// The ID of the primary Service Bus Namespace to replicate. Changing this forces a new resource to be created.
PrimaryNamespaceId string `pulumi:"primaryNamespaceId"`
}
// The set of arguments for constructing a NamespaceDisasterRecoveryConfig resource.
type NamespaceDisasterRecoveryConfigArgs struct {
// The Shared access policies used to access the connection string for the alias.
AliasAuthorizationRuleId pulumi.StringPtrInput
// Specifies the name of the Disaster Recovery Config. This is the alias DNS name that will be created. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Service Bus Namespace to replicate to.
PartnerNamespaceId pulumi.StringInput
// The ID of the primary Service Bus Namespace to replicate. Changing this forces a new resource to be created.
PrimaryNamespaceId pulumi.StringInput
}
func (NamespaceDisasterRecoveryConfigArgs) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceDisasterRecoveryConfigArgs)(nil)).Elem()
}
type NamespaceDisasterRecoveryConfigInput interface {
pulumi.Input
ToNamespaceDisasterRecoveryConfigOutput() NamespaceDisasterRecoveryConfigOutput
ToNamespaceDisasterRecoveryConfigOutputWithContext(ctx context.Context) NamespaceDisasterRecoveryConfigOutput
}
func (*NamespaceDisasterRecoveryConfig) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceDisasterRecoveryConfig)(nil)).Elem()
}
func (i *NamespaceDisasterRecoveryConfig) ToNamespaceDisasterRecoveryConfigOutput() NamespaceDisasterRecoveryConfigOutput {
return i.ToNamespaceDisasterRecoveryConfigOutputWithContext(context.Background())
}
func (i *NamespaceDisasterRecoveryConfig) ToNamespaceDisasterRecoveryConfigOutputWithContext(ctx context.Context) NamespaceDisasterRecoveryConfigOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceDisasterRecoveryConfigOutput)
}
// NamespaceDisasterRecoveryConfigArrayInput is an input type that accepts NamespaceDisasterRecoveryConfigArray and NamespaceDisasterRecoveryConfigArrayOutput values.
// You can construct a concrete instance of `NamespaceDisasterRecoveryConfigArrayInput` via:
//
// NamespaceDisasterRecoveryConfigArray{ NamespaceDisasterRecoveryConfigArgs{...} }
type NamespaceDisasterRecoveryConfigArrayInput interface {
pulumi.Input
ToNamespaceDisasterRecoveryConfigArrayOutput() NamespaceDisasterRecoveryConfigArrayOutput
ToNamespaceDisasterRecoveryConfigArrayOutputWithContext(context.Context) NamespaceDisasterRecoveryConfigArrayOutput
}
type NamespaceDisasterRecoveryConfigArray []NamespaceDisasterRecoveryConfigInput
func (NamespaceDisasterRecoveryConfigArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NamespaceDisasterRecoveryConfig)(nil)).Elem()
}
func (i NamespaceDisasterRecoveryConfigArray) ToNamespaceDisasterRecoveryConfigArrayOutput() NamespaceDisasterRecoveryConfigArrayOutput {
return i.ToNamespaceDisasterRecoveryConfigArrayOutputWithContext(context.Background())
}
func (i NamespaceDisasterRecoveryConfigArray) ToNamespaceDisasterRecoveryConfigArrayOutputWithContext(ctx context.Context) NamespaceDisasterRecoveryConfigArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceDisasterRecoveryConfigArrayOutput)
}
// NamespaceDisasterRecoveryConfigMapInput is an input type that accepts NamespaceDisasterRecoveryConfigMap and NamespaceDisasterRecoveryConfigMapOutput values.
// You can construct a concrete instance of `NamespaceDisasterRecoveryConfigMapInput` via:
//
// NamespaceDisasterRecoveryConfigMap{ "key": NamespaceDisasterRecoveryConfigArgs{...} }
type NamespaceDisasterRecoveryConfigMapInput interface {
pulumi.Input
ToNamespaceDisasterRecoveryConfigMapOutput() NamespaceDisasterRecoveryConfigMapOutput
ToNamespaceDisasterRecoveryConfigMapOutputWithContext(context.Context) NamespaceDisasterRecoveryConfigMapOutput
}
type NamespaceDisasterRecoveryConfigMap map[string]NamespaceDisasterRecoveryConfigInput
func (NamespaceDisasterRecoveryConfigMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NamespaceDisasterRecoveryConfig)(nil)).Elem()
}
func (i NamespaceDisasterRecoveryConfigMap) ToNamespaceDisasterRecoveryConfigMapOutput() NamespaceDisasterRecoveryConfigMapOutput {
return i.ToNamespaceDisasterRecoveryConfigMapOutputWithContext(context.Background())
}
func (i NamespaceDisasterRecoveryConfigMap) ToNamespaceDisasterRecoveryConfigMapOutputWithContext(ctx context.Context) NamespaceDisasterRecoveryConfigMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceDisasterRecoveryConfigMapOutput)
}
type NamespaceDisasterRecoveryConfigOutput struct{ *pulumi.OutputState }
func (NamespaceDisasterRecoveryConfigOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceDisasterRecoveryConfig)(nil)).Elem()
}
func (o NamespaceDisasterRecoveryConfigOutput) ToNamespaceDisasterRecoveryConfigOutput() NamespaceDisasterRecoveryConfigOutput {
return o
}
func (o NamespaceDisasterRecoveryConfigOutput) ToNamespaceDisasterRecoveryConfigOutputWithContext(ctx context.Context) NamespaceDisasterRecoveryConfigOutput {
return o
}
// The Shared access policies used to access the connection string for the alias.
func (o NamespaceDisasterRecoveryConfigOutput) AliasAuthorizationRuleId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NamespaceDisasterRecoveryConfig) pulumi.StringPtrOutput { return v.AliasAuthorizationRuleId }).(pulumi.StringPtrOutput)
}
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
func (o NamespaceDisasterRecoveryConfigOutput) DefaultPrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceDisasterRecoveryConfig) pulumi.StringOutput { return v.DefaultPrimaryKey }).(pulumi.StringOutput)
}
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
func (o NamespaceDisasterRecoveryConfigOutput) DefaultSecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceDisasterRecoveryConfig) pulumi.StringOutput { return v.DefaultSecondaryKey }).(pulumi.StringOutput)
}
// Specifies the name of the Disaster Recovery Config. This is the alias DNS name that will be created. Changing this forces a new resource to be created.
func (o NamespaceDisasterRecoveryConfigOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceDisasterRecoveryConfig) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Service Bus Namespace to replicate to.
func (o NamespaceDisasterRecoveryConfigOutput) PartnerNamespaceId() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceDisasterRecoveryConfig) pulumi.StringOutput { return v.PartnerNamespaceId }).(pulumi.StringOutput)
}
// The alias Primary Connection String for the ServiceBus Namespace.
func (o NamespaceDisasterRecoveryConfigOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceDisasterRecoveryConfig) pulumi.StringOutput { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The ID of the primary Service Bus Namespace to replicate. Changing this forces a new resource to be created.
func (o NamespaceDisasterRecoveryConfigOutput) PrimaryNamespaceId() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceDisasterRecoveryConfig) pulumi.StringOutput { return v.PrimaryNamespaceId }).(pulumi.StringOutput)
}
// The alias Secondary Connection String for the ServiceBus Namespace
func (o NamespaceDisasterRecoveryConfigOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceDisasterRecoveryConfig) pulumi.StringOutput { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
type NamespaceDisasterRecoveryConfigArrayOutput struct{ *pulumi.OutputState }
func (NamespaceDisasterRecoveryConfigArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NamespaceDisasterRecoveryConfig)(nil)).Elem()
}
func (o NamespaceDisasterRecoveryConfigArrayOutput) ToNamespaceDisasterRecoveryConfigArrayOutput() NamespaceDisasterRecoveryConfigArrayOutput {
return o
}
func (o NamespaceDisasterRecoveryConfigArrayOutput) ToNamespaceDisasterRecoveryConfigArrayOutputWithContext(ctx context.Context) NamespaceDisasterRecoveryConfigArrayOutput {
return o
}
func (o NamespaceDisasterRecoveryConfigArrayOutput) Index(i pulumi.IntInput) NamespaceDisasterRecoveryConfigOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NamespaceDisasterRecoveryConfig {
return vs[0].([]*NamespaceDisasterRecoveryConfig)[vs[1].(int)]
}).(NamespaceDisasterRecoveryConfigOutput)
}
type NamespaceDisasterRecoveryConfigMapOutput struct{ *pulumi.OutputState }
func (NamespaceDisasterRecoveryConfigMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NamespaceDisasterRecoveryConfig)(nil)).Elem()
}
func (o NamespaceDisasterRecoveryConfigMapOutput) ToNamespaceDisasterRecoveryConfigMapOutput() NamespaceDisasterRecoveryConfigMapOutput {
return o
}
func (o NamespaceDisasterRecoveryConfigMapOutput) ToNamespaceDisasterRecoveryConfigMapOutputWithContext(ctx context.Context) NamespaceDisasterRecoveryConfigMapOutput {
return o
}
func (o NamespaceDisasterRecoveryConfigMapOutput) MapIndex(k pulumi.StringInput) NamespaceDisasterRecoveryConfigOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NamespaceDisasterRecoveryConfig {
return vs[0].(map[string]*NamespaceDisasterRecoveryConfig)[vs[1].(string)]
}).(NamespaceDisasterRecoveryConfigOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceDisasterRecoveryConfigInput)(nil)).Elem(), &NamespaceDisasterRecoveryConfig{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceDisasterRecoveryConfigArrayInput)(nil)).Elem(), NamespaceDisasterRecoveryConfigArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceDisasterRecoveryConfigMapInput)(nil)).Elem(), NamespaceDisasterRecoveryConfigMap{})
pulumi.RegisterOutputType(NamespaceDisasterRecoveryConfigOutput{})
pulumi.RegisterOutputType(NamespaceDisasterRecoveryConfigArrayOutput{})
pulumi.RegisterOutputType(NamespaceDisasterRecoveryConfigMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/init.go | sdk/go/azure/servicebus/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 servicebus
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:servicebus/namespace:Namespace":
r = &Namespace{}
case "azure:servicebus/namespaceAuthorizationRule:NamespaceAuthorizationRule":
r = &NamespaceAuthorizationRule{}
case "azure:servicebus/namespaceCustomerManagedKey:NamespaceCustomerManagedKey":
r = &NamespaceCustomerManagedKey{}
case "azure:servicebus/namespaceDisasterRecoveryConfig:NamespaceDisasterRecoveryConfig":
r = &NamespaceDisasterRecoveryConfig{}
case "azure:servicebus/queue:Queue":
r = &Queue{}
case "azure:servicebus/queueAuthorizationRule:QueueAuthorizationRule":
r = &QueueAuthorizationRule{}
case "azure:servicebus/subscription:Subscription":
r = &Subscription{}
case "azure:servicebus/subscriptionRule:SubscriptionRule":
r = &SubscriptionRule{}
case "azure:servicebus/topic:Topic":
r = &Topic{}
case "azure:servicebus/topicAuthorizationRule:TopicAuthorizationRule":
r = &TopicAuthorizationRule{}
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",
"servicebus/namespace",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"servicebus/namespaceAuthorizationRule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"servicebus/namespaceCustomerManagedKey",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"servicebus/namespaceDisasterRecoveryConfig",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"servicebus/queue",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"servicebus/queueAuthorizationRule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"servicebus/subscription",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"servicebus/subscriptionRule",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"servicebus/topic",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"servicebus/topicAuthorizationRule",
&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/servicebus/pulumiTypes.go | sdk/go/azure/servicebus/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 servicebus
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 NamespaceCustomerManagedKeyType struct {
// The ID of the User Assigned Identity that has access to the key.
IdentityId string `pulumi:"identityId"`
// Used to specify whether enable Infrastructure Encryption (Double Encryption). Changing this forces a new resource to be created.
InfrastructureEncryptionEnabled *bool `pulumi:"infrastructureEncryptionEnabled"`
// The ID of the Key Vault Key which should be used to Encrypt the data in this Service Bus Namespace.
KeyVaultKeyId string `pulumi:"keyVaultKeyId"`
}
// NamespaceCustomerManagedKeyTypeInput is an input type that accepts NamespaceCustomerManagedKeyTypeArgs and NamespaceCustomerManagedKeyTypeOutput values.
// You can construct a concrete instance of `NamespaceCustomerManagedKeyTypeInput` via:
//
// NamespaceCustomerManagedKeyTypeArgs{...}
type NamespaceCustomerManagedKeyTypeInput interface {
pulumi.Input
ToNamespaceCustomerManagedKeyTypeOutput() NamespaceCustomerManagedKeyTypeOutput
ToNamespaceCustomerManagedKeyTypeOutputWithContext(context.Context) NamespaceCustomerManagedKeyTypeOutput
}
type NamespaceCustomerManagedKeyTypeArgs struct {
// The ID of the User Assigned Identity that has access to the key.
IdentityId pulumi.StringInput `pulumi:"identityId"`
// Used to specify whether enable Infrastructure Encryption (Double Encryption). Changing this forces a new resource to be created.
InfrastructureEncryptionEnabled pulumi.BoolPtrInput `pulumi:"infrastructureEncryptionEnabled"`
// The ID of the Key Vault Key which should be used to Encrypt the data in this Service Bus Namespace.
KeyVaultKeyId pulumi.StringInput `pulumi:"keyVaultKeyId"`
}
func (NamespaceCustomerManagedKeyTypeArgs) ElementType() reflect.Type {
return reflect.TypeOf((*NamespaceCustomerManagedKeyType)(nil)).Elem()
}
func (i NamespaceCustomerManagedKeyTypeArgs) ToNamespaceCustomerManagedKeyTypeOutput() NamespaceCustomerManagedKeyTypeOutput {
return i.ToNamespaceCustomerManagedKeyTypeOutputWithContext(context.Background())
}
func (i NamespaceCustomerManagedKeyTypeArgs) ToNamespaceCustomerManagedKeyTypeOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyTypeOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceCustomerManagedKeyTypeOutput)
}
func (i NamespaceCustomerManagedKeyTypeArgs) ToNamespaceCustomerManagedKeyTypePtrOutput() NamespaceCustomerManagedKeyTypePtrOutput {
return i.ToNamespaceCustomerManagedKeyTypePtrOutputWithContext(context.Background())
}
func (i NamespaceCustomerManagedKeyTypeArgs) ToNamespaceCustomerManagedKeyTypePtrOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyTypePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceCustomerManagedKeyTypeOutput).ToNamespaceCustomerManagedKeyTypePtrOutputWithContext(ctx)
}
// NamespaceCustomerManagedKeyTypePtrInput is an input type that accepts NamespaceCustomerManagedKeyTypeArgs, NamespaceCustomerManagedKeyTypePtr and NamespaceCustomerManagedKeyTypePtrOutput values.
// You can construct a concrete instance of `NamespaceCustomerManagedKeyTypePtrInput` via:
//
// NamespaceCustomerManagedKeyTypeArgs{...}
//
// or:
//
// nil
type NamespaceCustomerManagedKeyTypePtrInput interface {
pulumi.Input
ToNamespaceCustomerManagedKeyTypePtrOutput() NamespaceCustomerManagedKeyTypePtrOutput
ToNamespaceCustomerManagedKeyTypePtrOutputWithContext(context.Context) NamespaceCustomerManagedKeyTypePtrOutput
}
type namespaceCustomerManagedKeyTypePtrType NamespaceCustomerManagedKeyTypeArgs
func NamespaceCustomerManagedKeyTypePtr(v *NamespaceCustomerManagedKeyTypeArgs) NamespaceCustomerManagedKeyTypePtrInput {
return (*namespaceCustomerManagedKeyTypePtrType)(v)
}
func (*namespaceCustomerManagedKeyTypePtrType) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceCustomerManagedKeyType)(nil)).Elem()
}
func (i *namespaceCustomerManagedKeyTypePtrType) ToNamespaceCustomerManagedKeyTypePtrOutput() NamespaceCustomerManagedKeyTypePtrOutput {
return i.ToNamespaceCustomerManagedKeyTypePtrOutputWithContext(context.Background())
}
func (i *namespaceCustomerManagedKeyTypePtrType) ToNamespaceCustomerManagedKeyTypePtrOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyTypePtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceCustomerManagedKeyTypePtrOutput)
}
type NamespaceCustomerManagedKeyTypeOutput struct{ *pulumi.OutputState }
func (NamespaceCustomerManagedKeyTypeOutput) ElementType() reflect.Type {
return reflect.TypeOf((*NamespaceCustomerManagedKeyType)(nil)).Elem()
}
func (o NamespaceCustomerManagedKeyTypeOutput) ToNamespaceCustomerManagedKeyTypeOutput() NamespaceCustomerManagedKeyTypeOutput {
return o
}
func (o NamespaceCustomerManagedKeyTypeOutput) ToNamespaceCustomerManagedKeyTypeOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyTypeOutput {
return o
}
func (o NamespaceCustomerManagedKeyTypeOutput) ToNamespaceCustomerManagedKeyTypePtrOutput() NamespaceCustomerManagedKeyTypePtrOutput {
return o.ToNamespaceCustomerManagedKeyTypePtrOutputWithContext(context.Background())
}
func (o NamespaceCustomerManagedKeyTypeOutput) ToNamespaceCustomerManagedKeyTypePtrOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyTypePtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v NamespaceCustomerManagedKeyType) *NamespaceCustomerManagedKeyType {
return &v
}).(NamespaceCustomerManagedKeyTypePtrOutput)
}
// The ID of the User Assigned Identity that has access to the key.
func (o NamespaceCustomerManagedKeyTypeOutput) IdentityId() pulumi.StringOutput {
return o.ApplyT(func(v NamespaceCustomerManagedKeyType) string { return v.IdentityId }).(pulumi.StringOutput)
}
// Used to specify whether enable Infrastructure Encryption (Double Encryption). Changing this forces a new resource to be created.
func (o NamespaceCustomerManagedKeyTypeOutput) InfrastructureEncryptionEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v NamespaceCustomerManagedKeyType) *bool { return v.InfrastructureEncryptionEnabled }).(pulumi.BoolPtrOutput)
}
// The ID of the Key Vault Key which should be used to Encrypt the data in this Service Bus Namespace.
func (o NamespaceCustomerManagedKeyTypeOutput) KeyVaultKeyId() pulumi.StringOutput {
return o.ApplyT(func(v NamespaceCustomerManagedKeyType) string { return v.KeyVaultKeyId }).(pulumi.StringOutput)
}
type NamespaceCustomerManagedKeyTypePtrOutput struct{ *pulumi.OutputState }
func (NamespaceCustomerManagedKeyTypePtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceCustomerManagedKeyType)(nil)).Elem()
}
func (o NamespaceCustomerManagedKeyTypePtrOutput) ToNamespaceCustomerManagedKeyTypePtrOutput() NamespaceCustomerManagedKeyTypePtrOutput {
return o
}
func (o NamespaceCustomerManagedKeyTypePtrOutput) ToNamespaceCustomerManagedKeyTypePtrOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyTypePtrOutput {
return o
}
func (o NamespaceCustomerManagedKeyTypePtrOutput) Elem() NamespaceCustomerManagedKeyTypeOutput {
return o.ApplyT(func(v *NamespaceCustomerManagedKeyType) NamespaceCustomerManagedKeyType {
if v != nil {
return *v
}
var ret NamespaceCustomerManagedKeyType
return ret
}).(NamespaceCustomerManagedKeyTypeOutput)
}
// The ID of the User Assigned Identity that has access to the key.
func (o NamespaceCustomerManagedKeyTypePtrOutput) IdentityId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NamespaceCustomerManagedKeyType) *string {
if v == nil {
return nil
}
return &v.IdentityId
}).(pulumi.StringPtrOutput)
}
// Used to specify whether enable Infrastructure Encryption (Double Encryption). Changing this forces a new resource to be created.
func (o NamespaceCustomerManagedKeyTypePtrOutput) InfrastructureEncryptionEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *NamespaceCustomerManagedKeyType) *bool {
if v == nil {
return nil
}
return v.InfrastructureEncryptionEnabled
}).(pulumi.BoolPtrOutput)
}
// The ID of the Key Vault Key which should be used to Encrypt the data in this Service Bus Namespace.
func (o NamespaceCustomerManagedKeyTypePtrOutput) KeyVaultKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NamespaceCustomerManagedKeyType) *string {
if v == nil {
return nil
}
return &v.KeyVaultKeyId
}).(pulumi.StringPtrOutput)
}
type NamespaceIdentity struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Service Bus namespace.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
IdentityIds []string `pulumi:"identityIds"`
// The Principal ID for the Service Principal associated with the Managed Service Identity of this Service Bus Namespace.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID for the Service Principal associated with the Managed Service Identity of this Service Bus Namespace.
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Service Bus Namespace. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
Type string `pulumi:"type"`
}
// NamespaceIdentityInput is an input type that accepts NamespaceIdentityArgs and NamespaceIdentityOutput values.
// You can construct a concrete instance of `NamespaceIdentityInput` via:
//
// NamespaceIdentityArgs{...}
type NamespaceIdentityInput interface {
pulumi.Input
ToNamespaceIdentityOutput() NamespaceIdentityOutput
ToNamespaceIdentityOutputWithContext(context.Context) NamespaceIdentityOutput
}
type NamespaceIdentityArgs struct {
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Service Bus namespace.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// The Principal ID for the Service Principal associated with the Managed Service Identity of this Service Bus Namespace.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID for the Service Principal associated with the Managed Service Identity of this Service Bus Namespace.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this Service Bus Namespace. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
Type pulumi.StringInput `pulumi:"type"`
}
func (NamespaceIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*NamespaceIdentity)(nil)).Elem()
}
func (i NamespaceIdentityArgs) ToNamespaceIdentityOutput() NamespaceIdentityOutput {
return i.ToNamespaceIdentityOutputWithContext(context.Background())
}
func (i NamespaceIdentityArgs) ToNamespaceIdentityOutputWithContext(ctx context.Context) NamespaceIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceIdentityOutput)
}
func (i NamespaceIdentityArgs) ToNamespaceIdentityPtrOutput() NamespaceIdentityPtrOutput {
return i.ToNamespaceIdentityPtrOutputWithContext(context.Background())
}
func (i NamespaceIdentityArgs) ToNamespaceIdentityPtrOutputWithContext(ctx context.Context) NamespaceIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceIdentityOutput).ToNamespaceIdentityPtrOutputWithContext(ctx)
}
// NamespaceIdentityPtrInput is an input type that accepts NamespaceIdentityArgs, NamespaceIdentityPtr and NamespaceIdentityPtrOutput values.
// You can construct a concrete instance of `NamespaceIdentityPtrInput` via:
//
// NamespaceIdentityArgs{...}
//
// or:
//
// nil
type NamespaceIdentityPtrInput interface {
pulumi.Input
ToNamespaceIdentityPtrOutput() NamespaceIdentityPtrOutput
ToNamespaceIdentityPtrOutputWithContext(context.Context) NamespaceIdentityPtrOutput
}
type namespaceIdentityPtrType NamespaceIdentityArgs
func NamespaceIdentityPtr(v *NamespaceIdentityArgs) NamespaceIdentityPtrInput {
return (*namespaceIdentityPtrType)(v)
}
func (*namespaceIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceIdentity)(nil)).Elem()
}
func (i *namespaceIdentityPtrType) ToNamespaceIdentityPtrOutput() NamespaceIdentityPtrOutput {
return i.ToNamespaceIdentityPtrOutputWithContext(context.Background())
}
func (i *namespaceIdentityPtrType) ToNamespaceIdentityPtrOutputWithContext(ctx context.Context) NamespaceIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceIdentityPtrOutput)
}
type NamespaceIdentityOutput struct{ *pulumi.OutputState }
func (NamespaceIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*NamespaceIdentity)(nil)).Elem()
}
func (o NamespaceIdentityOutput) ToNamespaceIdentityOutput() NamespaceIdentityOutput {
return o
}
func (o NamespaceIdentityOutput) ToNamespaceIdentityOutputWithContext(ctx context.Context) NamespaceIdentityOutput {
return o
}
func (o NamespaceIdentityOutput) ToNamespaceIdentityPtrOutput() NamespaceIdentityPtrOutput {
return o.ToNamespaceIdentityPtrOutputWithContext(context.Background())
}
func (o NamespaceIdentityOutput) ToNamespaceIdentityPtrOutputWithContext(ctx context.Context) NamespaceIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v NamespaceIdentity) *NamespaceIdentity {
return &v
}).(NamespaceIdentityPtrOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Service Bus namespace.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
func (o NamespaceIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v NamespaceIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// The Principal ID for the Service Principal associated with the Managed Service Identity of this Service Bus Namespace.
func (o NamespaceIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v NamespaceIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID for the Service Principal associated with the Managed Service Identity of this Service Bus Namespace.
func (o NamespaceIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v NamespaceIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Service Bus Namespace. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
func (o NamespaceIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v NamespaceIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type NamespaceIdentityPtrOutput struct{ *pulumi.OutputState }
func (NamespaceIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceIdentity)(nil)).Elem()
}
func (o NamespaceIdentityPtrOutput) ToNamespaceIdentityPtrOutput() NamespaceIdentityPtrOutput {
return o
}
func (o NamespaceIdentityPtrOutput) ToNamespaceIdentityPtrOutputWithContext(ctx context.Context) NamespaceIdentityPtrOutput {
return o
}
func (o NamespaceIdentityPtrOutput) Elem() NamespaceIdentityOutput {
return o.ApplyT(func(v *NamespaceIdentity) NamespaceIdentity {
if v != nil {
return *v
}
var ret NamespaceIdentity
return ret
}).(NamespaceIdentityOutput)
}
// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Service Bus namespace.
//
// > **Note:** This is required when `type` is set to `UserAssigned` or `SystemAssigned, UserAssigned`.
func (o NamespaceIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *NamespaceIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
// The Principal ID for the Service Principal associated with the Managed Service Identity of this Service Bus Namespace.
func (o NamespaceIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NamespaceIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID for the Service Principal associated with the Managed Service Identity of this Service Bus Namespace.
func (o NamespaceIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NamespaceIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this Service Bus Namespace. Possible values are `SystemAssigned`, `UserAssigned`, `SystemAssigned, UserAssigned` (to enable both).
func (o NamespaceIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NamespaceIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type NamespaceNetworkRuleSet struct {
// Specifies the default action for the Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Allow`.
DefaultAction *string `pulumi:"defaultAction"`
// One or more IP Addresses, or CIDR Blocks which should be able to access the Service Bus Namespace.
IpRules []string `pulumi:"ipRules"`
// One or more `networkRules` blocks as defined below.
NetworkRules []NamespaceNetworkRuleSetNetworkRule `pulumi:"networkRules"`
// Whether to allow traffic over public network. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** To disable public network access, you must also configure the property `publicNetworkAccessEnabled`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// Are Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration? See [Trusted Microsoft Services](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-bus-messaging/includes/service-bus-trusted-services.md)
TrustedServicesAllowed *bool `pulumi:"trustedServicesAllowed"`
}
// NamespaceNetworkRuleSetInput is an input type that accepts NamespaceNetworkRuleSetArgs and NamespaceNetworkRuleSetOutput values.
// You can construct a concrete instance of `NamespaceNetworkRuleSetInput` via:
//
// NamespaceNetworkRuleSetArgs{...}
type NamespaceNetworkRuleSetInput interface {
pulumi.Input
ToNamespaceNetworkRuleSetOutput() NamespaceNetworkRuleSetOutput
ToNamespaceNetworkRuleSetOutputWithContext(context.Context) NamespaceNetworkRuleSetOutput
}
type NamespaceNetworkRuleSetArgs struct {
// Specifies the default action for the Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Allow`.
DefaultAction pulumi.StringPtrInput `pulumi:"defaultAction"`
// One or more IP Addresses, or CIDR Blocks which should be able to access the Service Bus Namespace.
IpRules pulumi.StringArrayInput `pulumi:"ipRules"`
// One or more `networkRules` blocks as defined below.
NetworkRules NamespaceNetworkRuleSetNetworkRuleArrayInput `pulumi:"networkRules"`
// Whether to allow traffic over public network. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** To disable public network access, you must also configure the property `publicNetworkAccessEnabled`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput `pulumi:"publicNetworkAccessEnabled"`
// Are Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration? See [Trusted Microsoft Services](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-bus-messaging/includes/service-bus-trusted-services.md)
TrustedServicesAllowed pulumi.BoolPtrInput `pulumi:"trustedServicesAllowed"`
}
func (NamespaceNetworkRuleSetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*NamespaceNetworkRuleSet)(nil)).Elem()
}
func (i NamespaceNetworkRuleSetArgs) ToNamespaceNetworkRuleSetOutput() NamespaceNetworkRuleSetOutput {
return i.ToNamespaceNetworkRuleSetOutputWithContext(context.Background())
}
func (i NamespaceNetworkRuleSetArgs) ToNamespaceNetworkRuleSetOutputWithContext(ctx context.Context) NamespaceNetworkRuleSetOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceNetworkRuleSetOutput)
}
func (i NamespaceNetworkRuleSetArgs) ToNamespaceNetworkRuleSetPtrOutput() NamespaceNetworkRuleSetPtrOutput {
return i.ToNamespaceNetworkRuleSetPtrOutputWithContext(context.Background())
}
func (i NamespaceNetworkRuleSetArgs) ToNamespaceNetworkRuleSetPtrOutputWithContext(ctx context.Context) NamespaceNetworkRuleSetPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceNetworkRuleSetOutput).ToNamespaceNetworkRuleSetPtrOutputWithContext(ctx)
}
// NamespaceNetworkRuleSetPtrInput is an input type that accepts NamespaceNetworkRuleSetArgs, NamespaceNetworkRuleSetPtr and NamespaceNetworkRuleSetPtrOutput values.
// You can construct a concrete instance of `NamespaceNetworkRuleSetPtrInput` via:
//
// NamespaceNetworkRuleSetArgs{...}
//
// or:
//
// nil
type NamespaceNetworkRuleSetPtrInput interface {
pulumi.Input
ToNamespaceNetworkRuleSetPtrOutput() NamespaceNetworkRuleSetPtrOutput
ToNamespaceNetworkRuleSetPtrOutputWithContext(context.Context) NamespaceNetworkRuleSetPtrOutput
}
type namespaceNetworkRuleSetPtrType NamespaceNetworkRuleSetArgs
func NamespaceNetworkRuleSetPtr(v *NamespaceNetworkRuleSetArgs) NamespaceNetworkRuleSetPtrInput {
return (*namespaceNetworkRuleSetPtrType)(v)
}
func (*namespaceNetworkRuleSetPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceNetworkRuleSet)(nil)).Elem()
}
func (i *namespaceNetworkRuleSetPtrType) ToNamespaceNetworkRuleSetPtrOutput() NamespaceNetworkRuleSetPtrOutput {
return i.ToNamespaceNetworkRuleSetPtrOutputWithContext(context.Background())
}
func (i *namespaceNetworkRuleSetPtrType) ToNamespaceNetworkRuleSetPtrOutputWithContext(ctx context.Context) NamespaceNetworkRuleSetPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceNetworkRuleSetPtrOutput)
}
type NamespaceNetworkRuleSetOutput struct{ *pulumi.OutputState }
func (NamespaceNetworkRuleSetOutput) ElementType() reflect.Type {
return reflect.TypeOf((*NamespaceNetworkRuleSet)(nil)).Elem()
}
func (o NamespaceNetworkRuleSetOutput) ToNamespaceNetworkRuleSetOutput() NamespaceNetworkRuleSetOutput {
return o
}
func (o NamespaceNetworkRuleSetOutput) ToNamespaceNetworkRuleSetOutputWithContext(ctx context.Context) NamespaceNetworkRuleSetOutput {
return o
}
func (o NamespaceNetworkRuleSetOutput) ToNamespaceNetworkRuleSetPtrOutput() NamespaceNetworkRuleSetPtrOutput {
return o.ToNamespaceNetworkRuleSetPtrOutputWithContext(context.Background())
}
func (o NamespaceNetworkRuleSetOutput) ToNamespaceNetworkRuleSetPtrOutputWithContext(ctx context.Context) NamespaceNetworkRuleSetPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v NamespaceNetworkRuleSet) *NamespaceNetworkRuleSet {
return &v
}).(NamespaceNetworkRuleSetPtrOutput)
}
// Specifies the default action for the Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Allow`.
func (o NamespaceNetworkRuleSetOutput) DefaultAction() pulumi.StringPtrOutput {
return o.ApplyT(func(v NamespaceNetworkRuleSet) *string { return v.DefaultAction }).(pulumi.StringPtrOutput)
}
// One or more IP Addresses, or CIDR Blocks which should be able to access the Service Bus Namespace.
func (o NamespaceNetworkRuleSetOutput) IpRules() pulumi.StringArrayOutput {
return o.ApplyT(func(v NamespaceNetworkRuleSet) []string { return v.IpRules }).(pulumi.StringArrayOutput)
}
// One or more `networkRules` blocks as defined below.
func (o NamespaceNetworkRuleSetOutput) NetworkRules() NamespaceNetworkRuleSetNetworkRuleArrayOutput {
return o.ApplyT(func(v NamespaceNetworkRuleSet) []NamespaceNetworkRuleSetNetworkRule { return v.NetworkRules }).(NamespaceNetworkRuleSetNetworkRuleArrayOutput)
}
// Whether to allow traffic over public network. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** To disable public network access, you must also configure the property `publicNetworkAccessEnabled`.
func (o NamespaceNetworkRuleSetOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v NamespaceNetworkRuleSet) *bool { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// Are Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration? See [Trusted Microsoft Services](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-bus-messaging/includes/service-bus-trusted-services.md)
func (o NamespaceNetworkRuleSetOutput) TrustedServicesAllowed() pulumi.BoolPtrOutput {
return o.ApplyT(func(v NamespaceNetworkRuleSet) *bool { return v.TrustedServicesAllowed }).(pulumi.BoolPtrOutput)
}
type NamespaceNetworkRuleSetPtrOutput struct{ *pulumi.OutputState }
func (NamespaceNetworkRuleSetPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceNetworkRuleSet)(nil)).Elem()
}
func (o NamespaceNetworkRuleSetPtrOutput) ToNamespaceNetworkRuleSetPtrOutput() NamespaceNetworkRuleSetPtrOutput {
return o
}
func (o NamespaceNetworkRuleSetPtrOutput) ToNamespaceNetworkRuleSetPtrOutputWithContext(ctx context.Context) NamespaceNetworkRuleSetPtrOutput {
return o
}
func (o NamespaceNetworkRuleSetPtrOutput) Elem() NamespaceNetworkRuleSetOutput {
return o.ApplyT(func(v *NamespaceNetworkRuleSet) NamespaceNetworkRuleSet {
if v != nil {
return *v
}
var ret NamespaceNetworkRuleSet
return ret
}).(NamespaceNetworkRuleSetOutput)
}
// Specifies the default action for the Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Allow`.
func (o NamespaceNetworkRuleSetPtrOutput) DefaultAction() pulumi.StringPtrOutput {
return o.ApplyT(func(v *NamespaceNetworkRuleSet) *string {
if v == nil {
return nil
}
return v.DefaultAction
}).(pulumi.StringPtrOutput)
}
// One or more IP Addresses, or CIDR Blocks which should be able to access the Service Bus Namespace.
func (o NamespaceNetworkRuleSetPtrOutput) IpRules() pulumi.StringArrayOutput {
return o.ApplyT(func(v *NamespaceNetworkRuleSet) []string {
if v == nil {
return nil
}
return v.IpRules
}).(pulumi.StringArrayOutput)
}
// One or more `networkRules` blocks as defined below.
func (o NamespaceNetworkRuleSetPtrOutput) NetworkRules() NamespaceNetworkRuleSetNetworkRuleArrayOutput {
return o.ApplyT(func(v *NamespaceNetworkRuleSet) []NamespaceNetworkRuleSetNetworkRule {
if v == nil {
return nil
}
return v.NetworkRules
}).(NamespaceNetworkRuleSetNetworkRuleArrayOutput)
}
// Whether to allow traffic over public network. Possible values are `true` and `false`. Defaults to `true`.
//
// > **Note:** To disable public network access, you must also configure the property `publicNetworkAccessEnabled`.
func (o NamespaceNetworkRuleSetPtrOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *NamespaceNetworkRuleSet) *bool {
if v == nil {
return nil
}
return v.PublicNetworkAccessEnabled
}).(pulumi.BoolPtrOutput)
}
// Are Azure Services that are known and trusted for this resource type are allowed to bypass firewall configuration? See [Trusted Microsoft Services](https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/service-bus-messaging/includes/service-bus-trusted-services.md)
func (o NamespaceNetworkRuleSetPtrOutput) TrustedServicesAllowed() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *NamespaceNetworkRuleSet) *bool {
if v == nil {
return nil
}
return v.TrustedServicesAllowed
}).(pulumi.BoolPtrOutput)
}
type NamespaceNetworkRuleSetNetworkRule struct {
// Should the Service Bus Namespace Network Rule Set ignore missing Virtual Network Service Endpoint option in the Subnet? Defaults to `false`.
IgnoreMissingVnetServiceEndpoint *bool `pulumi:"ignoreMissingVnetServiceEndpoint"`
// The Subnet ID which should be able to access this Service Bus Namespace.
SubnetId string `pulumi:"subnetId"`
}
// NamespaceNetworkRuleSetNetworkRuleInput is an input type that accepts NamespaceNetworkRuleSetNetworkRuleArgs and NamespaceNetworkRuleSetNetworkRuleOutput values.
// You can construct a concrete instance of `NamespaceNetworkRuleSetNetworkRuleInput` via:
//
// NamespaceNetworkRuleSetNetworkRuleArgs{...}
type NamespaceNetworkRuleSetNetworkRuleInput interface {
pulumi.Input
ToNamespaceNetworkRuleSetNetworkRuleOutput() NamespaceNetworkRuleSetNetworkRuleOutput
ToNamespaceNetworkRuleSetNetworkRuleOutputWithContext(context.Context) NamespaceNetworkRuleSetNetworkRuleOutput
}
type NamespaceNetworkRuleSetNetworkRuleArgs struct {
// Should the Service Bus Namespace Network Rule Set ignore missing Virtual Network Service Endpoint option in the Subnet? Defaults to `false`.
IgnoreMissingVnetServiceEndpoint pulumi.BoolPtrInput `pulumi:"ignoreMissingVnetServiceEndpoint"`
// The Subnet ID which should be able to access this Service Bus Namespace.
SubnetId pulumi.StringInput `pulumi:"subnetId"`
}
func (NamespaceNetworkRuleSetNetworkRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*NamespaceNetworkRuleSetNetworkRule)(nil)).Elem()
}
func (i NamespaceNetworkRuleSetNetworkRuleArgs) ToNamespaceNetworkRuleSetNetworkRuleOutput() NamespaceNetworkRuleSetNetworkRuleOutput {
return i.ToNamespaceNetworkRuleSetNetworkRuleOutputWithContext(context.Background())
}
func (i NamespaceNetworkRuleSetNetworkRuleArgs) ToNamespaceNetworkRuleSetNetworkRuleOutputWithContext(ctx context.Context) NamespaceNetworkRuleSetNetworkRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceNetworkRuleSetNetworkRuleOutput)
}
// NamespaceNetworkRuleSetNetworkRuleArrayInput is an input type that accepts NamespaceNetworkRuleSetNetworkRuleArray and NamespaceNetworkRuleSetNetworkRuleArrayOutput values.
// You can construct a concrete instance of `NamespaceNetworkRuleSetNetworkRuleArrayInput` via:
//
// NamespaceNetworkRuleSetNetworkRuleArray{ NamespaceNetworkRuleSetNetworkRuleArgs{...} }
type NamespaceNetworkRuleSetNetworkRuleArrayInput interface {
pulumi.Input
ToNamespaceNetworkRuleSetNetworkRuleArrayOutput() NamespaceNetworkRuleSetNetworkRuleArrayOutput
ToNamespaceNetworkRuleSetNetworkRuleArrayOutputWithContext(context.Context) NamespaceNetworkRuleSetNetworkRuleArrayOutput
}
type NamespaceNetworkRuleSetNetworkRuleArray []NamespaceNetworkRuleSetNetworkRuleInput
func (NamespaceNetworkRuleSetNetworkRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]NamespaceNetworkRuleSetNetworkRule)(nil)).Elem()
}
func (i NamespaceNetworkRuleSetNetworkRuleArray) ToNamespaceNetworkRuleSetNetworkRuleArrayOutput() NamespaceNetworkRuleSetNetworkRuleArrayOutput {
return i.ToNamespaceNetworkRuleSetNetworkRuleArrayOutputWithContext(context.Background())
}
func (i NamespaceNetworkRuleSetNetworkRuleArray) ToNamespaceNetworkRuleSetNetworkRuleArrayOutputWithContext(ctx context.Context) NamespaceNetworkRuleSetNetworkRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceNetworkRuleSetNetworkRuleArrayOutput)
}
type NamespaceNetworkRuleSetNetworkRuleOutput struct{ *pulumi.OutputState }
func (NamespaceNetworkRuleSetNetworkRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*NamespaceNetworkRuleSetNetworkRule)(nil)).Elem()
}
func (o NamespaceNetworkRuleSetNetworkRuleOutput) ToNamespaceNetworkRuleSetNetworkRuleOutput() NamespaceNetworkRuleSetNetworkRuleOutput {
return o
}
func (o NamespaceNetworkRuleSetNetworkRuleOutput) ToNamespaceNetworkRuleSetNetworkRuleOutputWithContext(ctx context.Context) NamespaceNetworkRuleSetNetworkRuleOutput {
return o
}
// Should the Service Bus Namespace Network Rule Set ignore missing Virtual Network Service Endpoint option in the Subnet? Defaults to `false`.
func (o NamespaceNetworkRuleSetNetworkRuleOutput) IgnoreMissingVnetServiceEndpoint() pulumi.BoolPtrOutput {
return o.ApplyT(func(v NamespaceNetworkRuleSetNetworkRule) *bool { return v.IgnoreMissingVnetServiceEndpoint }).(pulumi.BoolPtrOutput)
}
// The Subnet ID which should be able to access this Service Bus Namespace.
func (o NamespaceNetworkRuleSetNetworkRuleOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v NamespaceNetworkRuleSetNetworkRule) string { return v.SubnetId }).(pulumi.StringOutput)
}
type NamespaceNetworkRuleSetNetworkRuleArrayOutput struct{ *pulumi.OutputState }
| 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/servicebus/getNamespaceDisasterRecoveryConfig.go | sdk/go/azure/servicebus/getNamespaceDisasterRecoveryConfig.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
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 Service Bus Disaster Recovery Config.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := servicebus.LookupNamespaceDisasterRecoveryConfig(ctx, &servicebus.LookupNamespaceDisasterRecoveryConfigArgs{
// Name: "existing",
// NamespaceId: pulumi.StringRef("example-namespace-id"),
// }, 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.ServiceBus` - 2024-01-01
func LookupNamespaceDisasterRecoveryConfig(ctx *pulumi.Context, args *LookupNamespaceDisasterRecoveryConfigArgs, opts ...pulumi.InvokeOption) (*LookupNamespaceDisasterRecoveryConfigResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupNamespaceDisasterRecoveryConfigResult
err := ctx.Invoke("azure:servicebus/getNamespaceDisasterRecoveryConfig:getNamespaceDisasterRecoveryConfig", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getNamespaceDisasterRecoveryConfig.
type LookupNamespaceDisasterRecoveryConfigArgs struct {
// The Shared access policies used to access the connection string for the alias.
AliasAuthorizationRuleId *string `pulumi:"aliasAuthorizationRuleId"`
// The name of this Service Bus Disaster Recovery Config.
Name string `pulumi:"name"`
// The ID of the Service Bus Namespace.
NamespaceId *string `pulumi:"namespaceId"`
// Deprecated: `namespaceName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
NamespaceName *string `pulumi:"namespaceName"`
// Deprecated: `resourceGroupName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getNamespaceDisasterRecoveryConfig.
type LookupNamespaceDisasterRecoveryConfigResult struct {
AliasAuthorizationRuleId *string `pulumi:"aliasAuthorizationRuleId"`
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey string `pulumi:"defaultPrimaryKey"`
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey string `pulumi:"defaultSecondaryKey"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
NamespaceId string `pulumi:"namespaceId"`
// Deprecated: `namespaceName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
NamespaceName string `pulumi:"namespaceName"`
// The ID of the Service Bus Namespace to replicate to.
PartnerNamespaceId string `pulumi:"partnerNamespaceId"`
// The alias Primary Connection String for the ServiceBus Namespace.
PrimaryConnectionStringAlias string `pulumi:"primaryConnectionStringAlias"`
// Deprecated: `resourceGroupName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias string `pulumi:"secondaryConnectionStringAlias"`
}
func LookupNamespaceDisasterRecoveryConfigOutput(ctx *pulumi.Context, args LookupNamespaceDisasterRecoveryConfigOutputArgs, opts ...pulumi.InvokeOption) LookupNamespaceDisasterRecoveryConfigResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupNamespaceDisasterRecoveryConfigResultOutput, error) {
args := v.(LookupNamespaceDisasterRecoveryConfigArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:servicebus/getNamespaceDisasterRecoveryConfig:getNamespaceDisasterRecoveryConfig", args, LookupNamespaceDisasterRecoveryConfigResultOutput{}, options).(LookupNamespaceDisasterRecoveryConfigResultOutput), nil
}).(LookupNamespaceDisasterRecoveryConfigResultOutput)
}
// A collection of arguments for invoking getNamespaceDisasterRecoveryConfig.
type LookupNamespaceDisasterRecoveryConfigOutputArgs struct {
// The Shared access policies used to access the connection string for the alias.
AliasAuthorizationRuleId pulumi.StringPtrInput `pulumi:"aliasAuthorizationRuleId"`
// The name of this Service Bus Disaster Recovery Config.
Name pulumi.StringInput `pulumi:"name"`
// The ID of the Service Bus Namespace.
NamespaceId pulumi.StringPtrInput `pulumi:"namespaceId"`
// Deprecated: `namespaceName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
NamespaceName pulumi.StringPtrInput `pulumi:"namespaceName"`
// Deprecated: `resourceGroupName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
ResourceGroupName pulumi.StringPtrInput `pulumi:"resourceGroupName"`
}
func (LookupNamespaceDisasterRecoveryConfigOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupNamespaceDisasterRecoveryConfigArgs)(nil)).Elem()
}
// A collection of values returned by getNamespaceDisasterRecoveryConfig.
type LookupNamespaceDisasterRecoveryConfigResultOutput struct{ *pulumi.OutputState }
func (LookupNamespaceDisasterRecoveryConfigResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupNamespaceDisasterRecoveryConfigResult)(nil)).Elem()
}
func (o LookupNamespaceDisasterRecoveryConfigResultOutput) ToLookupNamespaceDisasterRecoveryConfigResultOutput() LookupNamespaceDisasterRecoveryConfigResultOutput {
return o
}
func (o LookupNamespaceDisasterRecoveryConfigResultOutput) ToLookupNamespaceDisasterRecoveryConfigResultOutputWithContext(ctx context.Context) LookupNamespaceDisasterRecoveryConfigResultOutput {
return o
}
func (o LookupNamespaceDisasterRecoveryConfigResultOutput) AliasAuthorizationRuleId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupNamespaceDisasterRecoveryConfigResult) *string { return v.AliasAuthorizationRuleId }).(pulumi.StringPtrOutput)
}
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
func (o LookupNamespaceDisasterRecoveryConfigResultOutput) DefaultPrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceDisasterRecoveryConfigResult) string { return v.DefaultPrimaryKey }).(pulumi.StringOutput)
}
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
func (o LookupNamespaceDisasterRecoveryConfigResultOutput) DefaultSecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceDisasterRecoveryConfigResult) string { return v.DefaultSecondaryKey }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupNamespaceDisasterRecoveryConfigResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceDisasterRecoveryConfigResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupNamespaceDisasterRecoveryConfigResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceDisasterRecoveryConfigResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupNamespaceDisasterRecoveryConfigResultOutput) NamespaceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceDisasterRecoveryConfigResult) string { return v.NamespaceId }).(pulumi.StringOutput)
}
// Deprecated: `namespaceName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
func (o LookupNamespaceDisasterRecoveryConfigResultOutput) NamespaceName() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceDisasterRecoveryConfigResult) string { return v.NamespaceName }).(pulumi.StringOutput)
}
// The ID of the Service Bus Namespace to replicate to.
func (o LookupNamespaceDisasterRecoveryConfigResultOutput) PartnerNamespaceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceDisasterRecoveryConfigResult) string { return v.PartnerNamespaceId }).(pulumi.StringOutput)
}
// The alias Primary Connection String for the ServiceBus Namespace.
func (o LookupNamespaceDisasterRecoveryConfigResultOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceDisasterRecoveryConfigResult) string { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// Deprecated: `resourceGroupName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
func (o LookupNamespaceDisasterRecoveryConfigResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceDisasterRecoveryConfigResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The alias Secondary Connection String for the ServiceBus Namespace
func (o LookupNamespaceDisasterRecoveryConfigResultOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceDisasterRecoveryConfigResult) string { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupNamespaceDisasterRecoveryConfigResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/queueAuthorizationRule.go | sdk/go/azure/servicebus/queueAuthorizationRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Authorization Rule for a ServiceBus Queue.
//
// ## 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/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("my-servicebus"),
// Location: pulumi.String("West US"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// exampleQueue, err := servicebus.NewQueue(ctx, "example", &servicebus.QueueArgs{
// Name: pulumi.String("tfex_servicebus_queue"),
// NamespaceId: exampleNamespace.ID(),
// EnablePartitioning: true,
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewQueueAuthorizationRule(ctx, "example", &servicebus.QueueAuthorizationRuleArgs{
// Name: pulumi.String("examplerule"),
// QueueId: exampleQueue.ID(),
// Listen: pulumi.Bool(true),
// Send: pulumi.Bool(true),
// Manage: 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.ServiceBus` - 2024-01-01
//
// ## Import
//
// ServiceBus Queue Authorization Rules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:servicebus/queueAuthorizationRule:QueueAuthorizationRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ServiceBus/namespaces/namespace1/queues/queue1/authorizationRules/rule1
// ```
type QueueAuthorizationRule struct {
pulumi.CustomResourceState
// Does this Authorization Rule have Listen permissions to the ServiceBus Queue? Defaults to `false`.
Listen pulumi.BoolPtrOutput `pulumi:"listen"`
// Does this Authorization Rule have Manage permissions to the ServiceBus Queue? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrOutput `pulumi:"manage"`
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The Primary Connection String for the Authorization Rule.
PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias pulumi.StringOutput `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the Authorization Rule.
PrimaryKey pulumi.StringOutput `pulumi:"primaryKey"`
// Specifies the ID of the ServiceBus Queue. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
QueueId pulumi.StringOutput `pulumi:"queueId"`
// The Secondary Connection String for the Authorization Rule.
SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias pulumi.StringOutput `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the Authorization Rule.
SecondaryKey pulumi.StringOutput `pulumi:"secondaryKey"`
// Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`.
Send pulumi.BoolPtrOutput `pulumi:"send"`
}
// NewQueueAuthorizationRule registers a new resource with the given unique name, arguments, and options.
func NewQueueAuthorizationRule(ctx *pulumi.Context,
name string, args *QueueAuthorizationRuleArgs, opts ...pulumi.ResourceOption) (*QueueAuthorizationRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.QueueId == nil {
return nil, errors.New("invalid value for required argument 'QueueId'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:eventhub/queueAuthorizationRule:QueueAuthorizationRule"),
},
})
opts = append(opts, aliases)
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryConnectionString",
"primaryConnectionStringAlias",
"primaryKey",
"secondaryConnectionString",
"secondaryConnectionStringAlias",
"secondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource QueueAuthorizationRule
err := ctx.RegisterResource("azure:servicebus/queueAuthorizationRule:QueueAuthorizationRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetQueueAuthorizationRule gets an existing QueueAuthorizationRule 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 GetQueueAuthorizationRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *QueueAuthorizationRuleState, opts ...pulumi.ResourceOption) (*QueueAuthorizationRule, error) {
var resource QueueAuthorizationRule
err := ctx.ReadResource("azure:servicebus/queueAuthorizationRule:QueueAuthorizationRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering QueueAuthorizationRule resources.
type queueAuthorizationRuleState struct {
// Does this Authorization Rule have Listen permissions to the ServiceBus Queue? Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Does this Authorization Rule have Manage permissions to the ServiceBus Queue? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The Primary Connection String for the Authorization Rule.
PrimaryConnectionString *string `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias *string `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the Authorization Rule.
PrimaryKey *string `pulumi:"primaryKey"`
// Specifies the ID of the ServiceBus Queue. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
QueueId *string `pulumi:"queueId"`
// The Secondary Connection String for the Authorization Rule.
SecondaryConnectionString *string `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias *string `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the Authorization Rule.
SecondaryKey *string `pulumi:"secondaryKey"`
// Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`.
Send *bool `pulumi:"send"`
}
type QueueAuthorizationRuleState struct {
// Does this Authorization Rule have Listen permissions to the ServiceBus Queue? Defaults to `false`.
Listen pulumi.BoolPtrInput
// Does this Authorization Rule have Manage permissions to the ServiceBus Queue? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The Primary Connection String for the Authorization Rule.
PrimaryConnectionString pulumi.StringPtrInput
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias pulumi.StringPtrInput
// The Primary Key for the Authorization Rule.
PrimaryKey pulumi.StringPtrInput
// Specifies the ID of the ServiceBus Queue. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
QueueId pulumi.StringPtrInput
// The Secondary Connection String for the Authorization Rule.
SecondaryConnectionString pulumi.StringPtrInput
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias pulumi.StringPtrInput
// The Secondary Key for the Authorization Rule.
SecondaryKey pulumi.StringPtrInput
// Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`.
Send pulumi.BoolPtrInput
}
func (QueueAuthorizationRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*queueAuthorizationRuleState)(nil)).Elem()
}
type queueAuthorizationRuleArgs struct {
// Does this Authorization Rule have Listen permissions to the ServiceBus Queue? Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Does this Authorization Rule have Manage permissions to the ServiceBus Queue? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the ServiceBus Queue. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
QueueId string `pulumi:"queueId"`
// Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`.
Send *bool `pulumi:"send"`
}
// The set of arguments for constructing a QueueAuthorizationRule resource.
type QueueAuthorizationRuleArgs struct {
// Does this Authorization Rule have Listen permissions to the ServiceBus Queue? Defaults to `false`.
Listen pulumi.BoolPtrInput
// Does this Authorization Rule have Manage permissions to the ServiceBus Queue? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the ServiceBus Queue. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
QueueId pulumi.StringInput
// Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`.
Send pulumi.BoolPtrInput
}
func (QueueAuthorizationRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*queueAuthorizationRuleArgs)(nil)).Elem()
}
type QueueAuthorizationRuleInput interface {
pulumi.Input
ToQueueAuthorizationRuleOutput() QueueAuthorizationRuleOutput
ToQueueAuthorizationRuleOutputWithContext(ctx context.Context) QueueAuthorizationRuleOutput
}
func (*QueueAuthorizationRule) ElementType() reflect.Type {
return reflect.TypeOf((**QueueAuthorizationRule)(nil)).Elem()
}
func (i *QueueAuthorizationRule) ToQueueAuthorizationRuleOutput() QueueAuthorizationRuleOutput {
return i.ToQueueAuthorizationRuleOutputWithContext(context.Background())
}
func (i *QueueAuthorizationRule) ToQueueAuthorizationRuleOutputWithContext(ctx context.Context) QueueAuthorizationRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueueAuthorizationRuleOutput)
}
// QueueAuthorizationRuleArrayInput is an input type that accepts QueueAuthorizationRuleArray and QueueAuthorizationRuleArrayOutput values.
// You can construct a concrete instance of `QueueAuthorizationRuleArrayInput` via:
//
// QueueAuthorizationRuleArray{ QueueAuthorizationRuleArgs{...} }
type QueueAuthorizationRuleArrayInput interface {
pulumi.Input
ToQueueAuthorizationRuleArrayOutput() QueueAuthorizationRuleArrayOutput
ToQueueAuthorizationRuleArrayOutputWithContext(context.Context) QueueAuthorizationRuleArrayOutput
}
type QueueAuthorizationRuleArray []QueueAuthorizationRuleInput
func (QueueAuthorizationRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*QueueAuthorizationRule)(nil)).Elem()
}
func (i QueueAuthorizationRuleArray) ToQueueAuthorizationRuleArrayOutput() QueueAuthorizationRuleArrayOutput {
return i.ToQueueAuthorizationRuleArrayOutputWithContext(context.Background())
}
func (i QueueAuthorizationRuleArray) ToQueueAuthorizationRuleArrayOutputWithContext(ctx context.Context) QueueAuthorizationRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueueAuthorizationRuleArrayOutput)
}
// QueueAuthorizationRuleMapInput is an input type that accepts QueueAuthorizationRuleMap and QueueAuthorizationRuleMapOutput values.
// You can construct a concrete instance of `QueueAuthorizationRuleMapInput` via:
//
// QueueAuthorizationRuleMap{ "key": QueueAuthorizationRuleArgs{...} }
type QueueAuthorizationRuleMapInput interface {
pulumi.Input
ToQueueAuthorizationRuleMapOutput() QueueAuthorizationRuleMapOutput
ToQueueAuthorizationRuleMapOutputWithContext(context.Context) QueueAuthorizationRuleMapOutput
}
type QueueAuthorizationRuleMap map[string]QueueAuthorizationRuleInput
func (QueueAuthorizationRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*QueueAuthorizationRule)(nil)).Elem()
}
func (i QueueAuthorizationRuleMap) ToQueueAuthorizationRuleMapOutput() QueueAuthorizationRuleMapOutput {
return i.ToQueueAuthorizationRuleMapOutputWithContext(context.Background())
}
func (i QueueAuthorizationRuleMap) ToQueueAuthorizationRuleMapOutputWithContext(ctx context.Context) QueueAuthorizationRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueueAuthorizationRuleMapOutput)
}
type QueueAuthorizationRuleOutput struct{ *pulumi.OutputState }
func (QueueAuthorizationRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**QueueAuthorizationRule)(nil)).Elem()
}
func (o QueueAuthorizationRuleOutput) ToQueueAuthorizationRuleOutput() QueueAuthorizationRuleOutput {
return o
}
func (o QueueAuthorizationRuleOutput) ToQueueAuthorizationRuleOutputWithContext(ctx context.Context) QueueAuthorizationRuleOutput {
return o
}
// Does this Authorization Rule have Listen permissions to the ServiceBus Queue? Defaults to `false`.
func (o QueueAuthorizationRuleOutput) Listen() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.BoolPtrOutput { return v.Listen }).(pulumi.BoolPtrOutput)
}
// Does this Authorization Rule have Manage permissions to the ServiceBus Queue? When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
func (o QueueAuthorizationRuleOutput) Manage() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.BoolPtrOutput { return v.Manage }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the Authorization Rule. Changing this forces a new resource to be created.
func (o QueueAuthorizationRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The Primary Connection String for the Authorization Rule.
func (o QueueAuthorizationRuleOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
func (o QueueAuthorizationRuleOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Primary Key for the Authorization Rule.
func (o QueueAuthorizationRuleOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.PrimaryKey }).(pulumi.StringOutput)
}
// Specifies the ID of the ServiceBus Queue. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
func (o QueueAuthorizationRuleOutput) QueueId() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.QueueId }).(pulumi.StringOutput)
}
// The Secondary Connection String for the Authorization Rule.
func (o QueueAuthorizationRuleOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias Secondary Connection String for the ServiceBus Namespace
func (o QueueAuthorizationRuleOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Secondary Key for the Authorization Rule.
func (o QueueAuthorizationRuleOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.StringOutput { return v.SecondaryKey }).(pulumi.StringOutput)
}
// Does this Authorization Rule have Send permissions to the ServiceBus Queue? Defaults to `false`.
func (o QueueAuthorizationRuleOutput) Send() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *QueueAuthorizationRule) pulumi.BoolPtrOutput { return v.Send }).(pulumi.BoolPtrOutput)
}
type QueueAuthorizationRuleArrayOutput struct{ *pulumi.OutputState }
func (QueueAuthorizationRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*QueueAuthorizationRule)(nil)).Elem()
}
func (o QueueAuthorizationRuleArrayOutput) ToQueueAuthorizationRuleArrayOutput() QueueAuthorizationRuleArrayOutput {
return o
}
func (o QueueAuthorizationRuleArrayOutput) ToQueueAuthorizationRuleArrayOutputWithContext(ctx context.Context) QueueAuthorizationRuleArrayOutput {
return o
}
func (o QueueAuthorizationRuleArrayOutput) Index(i pulumi.IntInput) QueueAuthorizationRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *QueueAuthorizationRule {
return vs[0].([]*QueueAuthorizationRule)[vs[1].(int)]
}).(QueueAuthorizationRuleOutput)
}
type QueueAuthorizationRuleMapOutput struct{ *pulumi.OutputState }
func (QueueAuthorizationRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*QueueAuthorizationRule)(nil)).Elem()
}
func (o QueueAuthorizationRuleMapOutput) ToQueueAuthorizationRuleMapOutput() QueueAuthorizationRuleMapOutput {
return o
}
func (o QueueAuthorizationRuleMapOutput) ToQueueAuthorizationRuleMapOutputWithContext(ctx context.Context) QueueAuthorizationRuleMapOutput {
return o
}
func (o QueueAuthorizationRuleMapOutput) MapIndex(k pulumi.StringInput) QueueAuthorizationRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *QueueAuthorizationRule {
return vs[0].(map[string]*QueueAuthorizationRule)[vs[1].(string)]
}).(QueueAuthorizationRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*QueueAuthorizationRuleInput)(nil)).Elem(), &QueueAuthorizationRule{})
pulumi.RegisterInputType(reflect.TypeOf((*QueueAuthorizationRuleArrayInput)(nil)).Elem(), QueueAuthorizationRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*QueueAuthorizationRuleMapInput)(nil)).Elem(), QueueAuthorizationRuleMap{})
pulumi.RegisterOutputType(QueueAuthorizationRuleOutput{})
pulumi.RegisterOutputType(QueueAuthorizationRuleArrayOutput{})
pulumi.RegisterOutputType(QueueAuthorizationRuleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/namespaceCustomerManagedKey.go | sdk/go/azure/servicebus/namespaceCustomerManagedKey.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Service Bus Namespace Customer Managed Key.
//
// !> **Note:** It is not possible to remove the Customer Managed Key from the Service Bus Namespace once it's been added. To remove the Customer Managed Key, the parent Service Bus Namespace must be deleted and recreated.
//
// > **Note:** This resource should only be used to create a Customer Managed Key for Service Bus Namespaces with System Assigned identities. The `customerManagedKey` block in `servicebus.Namespace` should be used to create a Customer Managed Key for a Service Bus Namespace with a User Assigned identity.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/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-resource-group"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("example-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Premium"),
// PremiumMessagingPartitions: pulumi.Int(1),
// Capacity: pulumi.Int(1),
// Identity: &servicebus.NamespaceIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("example-key-vault"),
// 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"),
// AccessPolicies: keyvault.KeyVaultAccessPolicyArray{
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.String(current.ObjectId),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Create"),
// pulumi.String("Decrypt"),
// pulumi.String("Encrypt"),
// pulumi.String("Delete"),
// pulumi.String("Get"),
// pulumi.String("List"),
// pulumi.String("Purge"),
// pulumi.String("UnwrapKey"),
// pulumi.String("WrapKey"),
// pulumi.String("Verify"),
// pulumi.String("GetRotationPolicy"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Set"),
// },
// },
// &keyvault.KeyVaultAccessPolicyArgs{
// TenantId: exampleNamespace.Identity.ApplyT(func(identity servicebus.NamespaceIdentity) (*string, error) {
// return &identity.TenantId, nil
// }).(pulumi.StringPtrOutput),
// ObjectId: exampleNamespace.Identity.ApplyT(func(identity servicebus.NamespaceIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput),
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Create"),
// pulumi.String("Decrypt"),
// pulumi.String("Encrypt"),
// pulumi.String("Delete"),
// pulumi.String("Get"),
// pulumi.String("List"),
// pulumi.String("Purge"),
// pulumi.String("UnwrapKey"),
// pulumi.String("WrapKey"),
// pulumi.String("Verify"),
// pulumi.String("GetRotationPolicy"),
// },
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Set"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{
// Name: pulumi.String("example-key-vault-key"),
// KeyVaultId: exampleKeyVault.ID(),
// KeyType: pulumi.String("RSA"),
// KeySize: pulumi.Int(2048),
// KeyOpts: pulumi.StringArray{
// pulumi.String("decrypt"),
// pulumi.String("encrypt"),
// pulumi.String("sign"),
// pulumi.String("unwrapKey"),
// pulumi.String("verify"),
// pulumi.String("wrapKey"),
// },
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewNamespaceCustomerManagedKey(ctx, "example", &servicebus.NamespaceCustomerManagedKeyArgs{
// NamespaceId: exampleNamespace.ID(),
// KeyVaultKeyId: exampleKey.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ServiceBus` - 2024-01-01
//
// ## Import
//
// Service Bus Namespace Customer Managed Key can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:servicebus/namespaceCustomerManagedKey:NamespaceCustomerManagedKey example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1
// ```
type NamespaceCustomerManagedKey struct {
pulumi.CustomResourceState
// Used to specify whether enable Infrastructure Encryption. Changing this forces a new resource to be created.
InfrastructureEncryptionEnabled pulumi.BoolPtrOutput `pulumi:"infrastructureEncryptionEnabled"`
// The ID of the Key Vault Key which should be used to Encrypt the data in this Service Bus Namespace.
KeyVaultKeyId pulumi.StringOutput `pulumi:"keyVaultKeyId"`
// The ID of the Service Bus namespace. Changing this forces a new resource to be created.
NamespaceId pulumi.StringOutput `pulumi:"namespaceId"`
}
// NewNamespaceCustomerManagedKey registers a new resource with the given unique name, arguments, and options.
func NewNamespaceCustomerManagedKey(ctx *pulumi.Context,
name string, args *NamespaceCustomerManagedKeyArgs, opts ...pulumi.ResourceOption) (*NamespaceCustomerManagedKey, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.KeyVaultKeyId == nil {
return nil, errors.New("invalid value for required argument 'KeyVaultKeyId'")
}
if args.NamespaceId == nil {
return nil, errors.New("invalid value for required argument 'NamespaceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource NamespaceCustomerManagedKey
err := ctx.RegisterResource("azure:servicebus/namespaceCustomerManagedKey:NamespaceCustomerManagedKey", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNamespaceCustomerManagedKey gets an existing NamespaceCustomerManagedKey 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 GetNamespaceCustomerManagedKey(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NamespaceCustomerManagedKeyState, opts ...pulumi.ResourceOption) (*NamespaceCustomerManagedKey, error) {
var resource NamespaceCustomerManagedKey
err := ctx.ReadResource("azure:servicebus/namespaceCustomerManagedKey:NamespaceCustomerManagedKey", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NamespaceCustomerManagedKey resources.
type namespaceCustomerManagedKeyState struct {
// Used to specify whether enable Infrastructure Encryption. Changing this forces a new resource to be created.
InfrastructureEncryptionEnabled *bool `pulumi:"infrastructureEncryptionEnabled"`
// The ID of the Key Vault Key which should be used to Encrypt the data in this Service Bus Namespace.
KeyVaultKeyId *string `pulumi:"keyVaultKeyId"`
// The ID of the Service Bus namespace. Changing this forces a new resource to be created.
NamespaceId *string `pulumi:"namespaceId"`
}
type NamespaceCustomerManagedKeyState struct {
// Used to specify whether enable Infrastructure Encryption. Changing this forces a new resource to be created.
InfrastructureEncryptionEnabled pulumi.BoolPtrInput
// The ID of the Key Vault Key which should be used to Encrypt the data in this Service Bus Namespace.
KeyVaultKeyId pulumi.StringPtrInput
// The ID of the Service Bus namespace. Changing this forces a new resource to be created.
NamespaceId pulumi.StringPtrInput
}
func (NamespaceCustomerManagedKeyState) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceCustomerManagedKeyState)(nil)).Elem()
}
type namespaceCustomerManagedKeyArgs struct {
// Used to specify whether enable Infrastructure Encryption. Changing this forces a new resource to be created.
InfrastructureEncryptionEnabled *bool `pulumi:"infrastructureEncryptionEnabled"`
// The ID of the Key Vault Key which should be used to Encrypt the data in this Service Bus Namespace.
KeyVaultKeyId string `pulumi:"keyVaultKeyId"`
// The ID of the Service Bus namespace. Changing this forces a new resource to be created.
NamespaceId string `pulumi:"namespaceId"`
}
// The set of arguments for constructing a NamespaceCustomerManagedKey resource.
type NamespaceCustomerManagedKeyArgs struct {
// Used to specify whether enable Infrastructure Encryption. Changing this forces a new resource to be created.
InfrastructureEncryptionEnabled pulumi.BoolPtrInput
// The ID of the Key Vault Key which should be used to Encrypt the data in this Service Bus Namespace.
KeyVaultKeyId pulumi.StringInput
// The ID of the Service Bus namespace. Changing this forces a new resource to be created.
NamespaceId pulumi.StringInput
}
func (NamespaceCustomerManagedKeyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceCustomerManagedKeyArgs)(nil)).Elem()
}
type NamespaceCustomerManagedKeyInput interface {
pulumi.Input
ToNamespaceCustomerManagedKeyOutput() NamespaceCustomerManagedKeyOutput
ToNamespaceCustomerManagedKeyOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyOutput
}
func (*NamespaceCustomerManagedKey) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceCustomerManagedKey)(nil)).Elem()
}
func (i *NamespaceCustomerManagedKey) ToNamespaceCustomerManagedKeyOutput() NamespaceCustomerManagedKeyOutput {
return i.ToNamespaceCustomerManagedKeyOutputWithContext(context.Background())
}
func (i *NamespaceCustomerManagedKey) ToNamespaceCustomerManagedKeyOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceCustomerManagedKeyOutput)
}
// NamespaceCustomerManagedKeyArrayInput is an input type that accepts NamespaceCustomerManagedKeyArray and NamespaceCustomerManagedKeyArrayOutput values.
// You can construct a concrete instance of `NamespaceCustomerManagedKeyArrayInput` via:
//
// NamespaceCustomerManagedKeyArray{ NamespaceCustomerManagedKeyArgs{...} }
type NamespaceCustomerManagedKeyArrayInput interface {
pulumi.Input
ToNamespaceCustomerManagedKeyArrayOutput() NamespaceCustomerManagedKeyArrayOutput
ToNamespaceCustomerManagedKeyArrayOutputWithContext(context.Context) NamespaceCustomerManagedKeyArrayOutput
}
type NamespaceCustomerManagedKeyArray []NamespaceCustomerManagedKeyInput
func (NamespaceCustomerManagedKeyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NamespaceCustomerManagedKey)(nil)).Elem()
}
func (i NamespaceCustomerManagedKeyArray) ToNamespaceCustomerManagedKeyArrayOutput() NamespaceCustomerManagedKeyArrayOutput {
return i.ToNamespaceCustomerManagedKeyArrayOutputWithContext(context.Background())
}
func (i NamespaceCustomerManagedKeyArray) ToNamespaceCustomerManagedKeyArrayOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceCustomerManagedKeyArrayOutput)
}
// NamespaceCustomerManagedKeyMapInput is an input type that accepts NamespaceCustomerManagedKeyMap and NamespaceCustomerManagedKeyMapOutput values.
// You can construct a concrete instance of `NamespaceCustomerManagedKeyMapInput` via:
//
// NamespaceCustomerManagedKeyMap{ "key": NamespaceCustomerManagedKeyArgs{...} }
type NamespaceCustomerManagedKeyMapInput interface {
pulumi.Input
ToNamespaceCustomerManagedKeyMapOutput() NamespaceCustomerManagedKeyMapOutput
ToNamespaceCustomerManagedKeyMapOutputWithContext(context.Context) NamespaceCustomerManagedKeyMapOutput
}
type NamespaceCustomerManagedKeyMap map[string]NamespaceCustomerManagedKeyInput
func (NamespaceCustomerManagedKeyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NamespaceCustomerManagedKey)(nil)).Elem()
}
func (i NamespaceCustomerManagedKeyMap) ToNamespaceCustomerManagedKeyMapOutput() NamespaceCustomerManagedKeyMapOutput {
return i.ToNamespaceCustomerManagedKeyMapOutputWithContext(context.Background())
}
func (i NamespaceCustomerManagedKeyMap) ToNamespaceCustomerManagedKeyMapOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceCustomerManagedKeyMapOutput)
}
type NamespaceCustomerManagedKeyOutput struct{ *pulumi.OutputState }
func (NamespaceCustomerManagedKeyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceCustomerManagedKey)(nil)).Elem()
}
func (o NamespaceCustomerManagedKeyOutput) ToNamespaceCustomerManagedKeyOutput() NamespaceCustomerManagedKeyOutput {
return o
}
func (o NamespaceCustomerManagedKeyOutput) ToNamespaceCustomerManagedKeyOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyOutput {
return o
}
// Used to specify whether enable Infrastructure Encryption. Changing this forces a new resource to be created.
func (o NamespaceCustomerManagedKeyOutput) InfrastructureEncryptionEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *NamespaceCustomerManagedKey) pulumi.BoolPtrOutput { return v.InfrastructureEncryptionEnabled }).(pulumi.BoolPtrOutput)
}
// The ID of the Key Vault Key which should be used to Encrypt the data in this Service Bus Namespace.
func (o NamespaceCustomerManagedKeyOutput) KeyVaultKeyId() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceCustomerManagedKey) pulumi.StringOutput { return v.KeyVaultKeyId }).(pulumi.StringOutput)
}
// The ID of the Service Bus namespace. Changing this forces a new resource to be created.
func (o NamespaceCustomerManagedKeyOutput) NamespaceId() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceCustomerManagedKey) pulumi.StringOutput { return v.NamespaceId }).(pulumi.StringOutput)
}
type NamespaceCustomerManagedKeyArrayOutput struct{ *pulumi.OutputState }
func (NamespaceCustomerManagedKeyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NamespaceCustomerManagedKey)(nil)).Elem()
}
func (o NamespaceCustomerManagedKeyArrayOutput) ToNamespaceCustomerManagedKeyArrayOutput() NamespaceCustomerManagedKeyArrayOutput {
return o
}
func (o NamespaceCustomerManagedKeyArrayOutput) ToNamespaceCustomerManagedKeyArrayOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyArrayOutput {
return o
}
func (o NamespaceCustomerManagedKeyArrayOutput) Index(i pulumi.IntInput) NamespaceCustomerManagedKeyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NamespaceCustomerManagedKey {
return vs[0].([]*NamespaceCustomerManagedKey)[vs[1].(int)]
}).(NamespaceCustomerManagedKeyOutput)
}
type NamespaceCustomerManagedKeyMapOutput struct{ *pulumi.OutputState }
func (NamespaceCustomerManagedKeyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NamespaceCustomerManagedKey)(nil)).Elem()
}
func (o NamespaceCustomerManagedKeyMapOutput) ToNamespaceCustomerManagedKeyMapOutput() NamespaceCustomerManagedKeyMapOutput {
return o
}
func (o NamespaceCustomerManagedKeyMapOutput) ToNamespaceCustomerManagedKeyMapOutputWithContext(ctx context.Context) NamespaceCustomerManagedKeyMapOutput {
return o
}
func (o NamespaceCustomerManagedKeyMapOutput) MapIndex(k pulumi.StringInput) NamespaceCustomerManagedKeyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NamespaceCustomerManagedKey {
return vs[0].(map[string]*NamespaceCustomerManagedKey)[vs[1].(string)]
}).(NamespaceCustomerManagedKeyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceCustomerManagedKeyInput)(nil)).Elem(), &NamespaceCustomerManagedKey{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceCustomerManagedKeyArrayInput)(nil)).Elem(), NamespaceCustomerManagedKeyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceCustomerManagedKeyMapInput)(nil)).Elem(), NamespaceCustomerManagedKeyMap{})
pulumi.RegisterOutputType(NamespaceCustomerManagedKeyOutput{})
pulumi.RegisterOutputType(NamespaceCustomerManagedKeyArrayOutput{})
pulumi.RegisterOutputType(NamespaceCustomerManagedKeyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/namespace.go | sdk/go/azure/servicebus/namespace.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a ServiceBus Namespace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/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("my-servicebus"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": 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.ServiceBus` - 2024-01-01
//
// ## Import
//
// Service Bus Namespace can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:servicebus/namespace:Namespace example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1
// ```
type Namespace struct {
pulumi.CustomResourceState
// Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4`, `8` or `16`. When `sku` is `Basic` or `Standard`, capacity can be `0` only.
Capacity pulumi.IntPtrOutput `pulumi:"capacity"`
// An `customerManagedKey` block as defined below.
CustomerManagedKey NamespaceCustomerManagedKeyTypePtrOutput `pulumi:"customerManagedKey"`
// The primary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryConnectionString pulumi.StringOutput `pulumi:"defaultPrimaryConnectionString"`
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey pulumi.StringOutput `pulumi:"defaultPrimaryKey"`
// The secondary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryConnectionString pulumi.StringOutput `pulumi:"defaultSecondaryConnectionString"`
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey pulumi.StringOutput `pulumi:"defaultSecondaryKey"`
// The URL to access the Service Bus Namespace.
Endpoint pulumi.StringOutput `pulumi:"endpoint"`
// An `identity` block as defined below.
Identity NamespaceIdentityPtrOutput `pulumi:"identity"`
// Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrOutput `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
MinimumTlsVersion pulumi.StringPtrOutput `pulumi:"minimumTlsVersion"`
// Specifies the name of the Service Bus Namespace resource . Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// An `networkRuleSet` block as defined below.
NetworkRuleSet NamespaceNetworkRuleSetOutput `pulumi:"networkRuleSet"`
// Specifies the number messaging partitions. Only valid when `sku` is `Premium` and the minimum number is `1`. Possible values include `0`, `1`, `2`, and `4`. Defaults to `0` for Standard, Basic namespace. Changing this forces a new resource to be created.
//
// > **Note:** It's not possible to change the partitioning option on any existing namespace. The number of partitions can only be set during namespace creation. Please check the doc https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-partitions-premium for more feature restrictions.
PremiumMessagingPartitions pulumi.IntPtrOutput `pulumi:"premiumMessagingPartitions"`
// Is public network access enabled for the Service Bus Namespace? Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to Changing this forces a new resource to be created.
// create the namespace.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Defines which tier to use. Options are `Basic`, `Standard` or `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
Sku pulumi.StringOutput `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewNamespace registers a new resource with the given unique name, arguments, and options.
func NewNamespace(ctx *pulumi.Context,
name string, args *NamespaceArgs, opts ...pulumi.ResourceOption) (*Namespace, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.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'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:eventhub/namespace:Namespace"),
},
})
opts = append(opts, aliases)
secrets := pulumi.AdditionalSecretOutputs([]string{
"defaultPrimaryConnectionString",
"defaultPrimaryKey",
"defaultSecondaryConnectionString",
"defaultSecondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Namespace
err := ctx.RegisterResource("azure:servicebus/namespace:Namespace", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNamespace gets an existing Namespace resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetNamespace(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NamespaceState, opts ...pulumi.ResourceOption) (*Namespace, error) {
var resource Namespace
err := ctx.ReadResource("azure:servicebus/namespace:Namespace", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Namespace resources.
type namespaceState struct {
// Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4`, `8` or `16`. When `sku` is `Basic` or `Standard`, capacity can be `0` only.
Capacity *int `pulumi:"capacity"`
// An `customerManagedKey` block as defined below.
CustomerManagedKey *NamespaceCustomerManagedKeyType `pulumi:"customerManagedKey"`
// The primary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryConnectionString *string `pulumi:"defaultPrimaryConnectionString"`
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey *string `pulumi:"defaultPrimaryKey"`
// The secondary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryConnectionString *string `pulumi:"defaultSecondaryConnectionString"`
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey *string `pulumi:"defaultSecondaryKey"`
// The URL to access the Service Bus Namespace.
Endpoint *string `pulumi:"endpoint"`
// An `identity` block as defined below.
Identity *NamespaceIdentity `pulumi:"identity"`
// Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults to `true`.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
MinimumTlsVersion *string `pulumi:"minimumTlsVersion"`
// Specifies the name of the Service Bus Namespace resource . Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// An `networkRuleSet` block as defined below.
NetworkRuleSet *NamespaceNetworkRuleSet `pulumi:"networkRuleSet"`
// Specifies the number messaging partitions. Only valid when `sku` is `Premium` and the minimum number is `1`. Possible values include `0`, `1`, `2`, and `4`. Defaults to `0` for Standard, Basic namespace. Changing this forces a new resource to be created.
//
// > **Note:** It's not possible to change the partitioning option on any existing namespace. The number of partitions can only be set during namespace creation. Please check the doc https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-partitions-premium for more feature restrictions.
PremiumMessagingPartitions *int `pulumi:"premiumMessagingPartitions"`
// Is public network access enabled for the Service Bus Namespace? Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to Changing this forces a new resource to be created.
// create the namespace.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Defines which tier to use. Options are `Basic`, `Standard` or `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
Sku *string `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type NamespaceState struct {
// Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4`, `8` or `16`. When `sku` is `Basic` or `Standard`, capacity can be `0` only.
Capacity pulumi.IntPtrInput
// An `customerManagedKey` block as defined below.
CustomerManagedKey NamespaceCustomerManagedKeyTypePtrInput
// The primary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryConnectionString pulumi.StringPtrInput
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultPrimaryKey pulumi.StringPtrInput
// The secondary connection string for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryConnectionString pulumi.StringPtrInput
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
DefaultSecondaryKey pulumi.StringPtrInput
// The URL to access the Service Bus Namespace.
Endpoint pulumi.StringPtrInput
// An `identity` block as defined below.
Identity NamespaceIdentityPtrInput
// Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
MinimumTlsVersion pulumi.StringPtrInput
// Specifies the name of the Service Bus Namespace resource . Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// An `networkRuleSet` block as defined below.
NetworkRuleSet NamespaceNetworkRuleSetPtrInput
// Specifies the number messaging partitions. Only valid when `sku` is `Premium` and the minimum number is `1`. Possible values include `0`, `1`, `2`, and `4`. Defaults to `0` for Standard, Basic namespace. Changing this forces a new resource to be created.
//
// > **Note:** It's not possible to change the partitioning option on any existing namespace. The number of partitions can only be set during namespace creation. Please check the doc https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-partitions-premium for more feature restrictions.
PremiumMessagingPartitions pulumi.IntPtrInput
// Is public network access enabled for the Service Bus Namespace? Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to Changing this forces a new resource to be created.
// create the namespace.
ResourceGroupName pulumi.StringPtrInput
// Defines which tier to use. Options are `Basic`, `Standard` or `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
Sku pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (NamespaceState) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceState)(nil)).Elem()
}
type namespaceArgs struct {
// Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4`, `8` or `16`. When `sku` is `Basic` or `Standard`, capacity can be `0` only.
Capacity *int `pulumi:"capacity"`
// An `customerManagedKey` block as defined below.
CustomerManagedKey *NamespaceCustomerManagedKeyType `pulumi:"customerManagedKey"`
// An `identity` block as defined below.
Identity *NamespaceIdentity `pulumi:"identity"`
// Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults to `true`.
LocalAuthEnabled *bool `pulumi:"localAuthEnabled"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
MinimumTlsVersion *string `pulumi:"minimumTlsVersion"`
// Specifies the name of the Service Bus Namespace resource . Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// An `networkRuleSet` block as defined below.
NetworkRuleSet *NamespaceNetworkRuleSet `pulumi:"networkRuleSet"`
// Specifies the number messaging partitions. Only valid when `sku` is `Premium` and the minimum number is `1`. Possible values include `0`, `1`, `2`, and `4`. Defaults to `0` for Standard, Basic namespace. Changing this forces a new resource to be created.
//
// > **Note:** It's not possible to change the partitioning option on any existing namespace. The number of partitions can only be set during namespace creation. Please check the doc https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-partitions-premium for more feature restrictions.
PremiumMessagingPartitions *int `pulumi:"premiumMessagingPartitions"`
// Is public network access enabled for the Service Bus Namespace? Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to Changing this forces a new resource to be created.
// create the namespace.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Defines which tier to use. Options are `Basic`, `Standard` or `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
Sku string `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Namespace resource.
type NamespaceArgs struct {
// Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4`, `8` or `16`. When `sku` is `Basic` or `Standard`, capacity can be `0` only.
Capacity pulumi.IntPtrInput
// An `customerManagedKey` block as defined below.
CustomerManagedKey NamespaceCustomerManagedKeyTypePtrInput
// An `identity` block as defined below.
Identity NamespaceIdentityPtrInput
// Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults to `true`.
LocalAuthEnabled pulumi.BoolPtrInput
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
MinimumTlsVersion pulumi.StringPtrInput
// Specifies the name of the Service Bus Namespace resource . Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// An `networkRuleSet` block as defined below.
NetworkRuleSet NamespaceNetworkRuleSetPtrInput
// Specifies the number messaging partitions. Only valid when `sku` is `Premium` and the minimum number is `1`. Possible values include `0`, `1`, `2`, and `4`. Defaults to `0` for Standard, Basic namespace. Changing this forces a new resource to be created.
//
// > **Note:** It's not possible to change the partitioning option on any existing namespace. The number of partitions can only be set during namespace creation. Please check the doc https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-partitions-premium for more feature restrictions.
PremiumMessagingPartitions pulumi.IntPtrInput
// Is public network access enabled for the Service Bus Namespace? Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to Changing this forces a new resource to be created.
// create the namespace.
ResourceGroupName pulumi.StringInput
// Defines which tier to use. Options are `Basic`, `Standard` or `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
Sku pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (NamespaceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceArgs)(nil)).Elem()
}
type NamespaceInput interface {
pulumi.Input
ToNamespaceOutput() NamespaceOutput
ToNamespaceOutputWithContext(ctx context.Context) NamespaceOutput
}
func (*Namespace) ElementType() reflect.Type {
return reflect.TypeOf((**Namespace)(nil)).Elem()
}
func (i *Namespace) ToNamespaceOutput() NamespaceOutput {
return i.ToNamespaceOutputWithContext(context.Background())
}
func (i *Namespace) ToNamespaceOutputWithContext(ctx context.Context) NamespaceOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceOutput)
}
// NamespaceArrayInput is an input type that accepts NamespaceArray and NamespaceArrayOutput values.
// You can construct a concrete instance of `NamespaceArrayInput` via:
//
// NamespaceArray{ NamespaceArgs{...} }
type NamespaceArrayInput interface {
pulumi.Input
ToNamespaceArrayOutput() NamespaceArrayOutput
ToNamespaceArrayOutputWithContext(context.Context) NamespaceArrayOutput
}
type NamespaceArray []NamespaceInput
func (NamespaceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Namespace)(nil)).Elem()
}
func (i NamespaceArray) ToNamespaceArrayOutput() NamespaceArrayOutput {
return i.ToNamespaceArrayOutputWithContext(context.Background())
}
func (i NamespaceArray) ToNamespaceArrayOutputWithContext(ctx context.Context) NamespaceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceArrayOutput)
}
// NamespaceMapInput is an input type that accepts NamespaceMap and NamespaceMapOutput values.
// You can construct a concrete instance of `NamespaceMapInput` via:
//
// NamespaceMap{ "key": NamespaceArgs{...} }
type NamespaceMapInput interface {
pulumi.Input
ToNamespaceMapOutput() NamespaceMapOutput
ToNamespaceMapOutputWithContext(context.Context) NamespaceMapOutput
}
type NamespaceMap map[string]NamespaceInput
func (NamespaceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Namespace)(nil)).Elem()
}
func (i NamespaceMap) ToNamespaceMapOutput() NamespaceMapOutput {
return i.ToNamespaceMapOutputWithContext(context.Background())
}
func (i NamespaceMap) ToNamespaceMapOutputWithContext(ctx context.Context) NamespaceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceMapOutput)
}
type NamespaceOutput struct{ *pulumi.OutputState }
func (NamespaceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Namespace)(nil)).Elem()
}
func (o NamespaceOutput) ToNamespaceOutput() NamespaceOutput {
return o
}
func (o NamespaceOutput) ToNamespaceOutputWithContext(ctx context.Context) NamespaceOutput {
return o
}
// Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4`, `8` or `16`. When `sku` is `Basic` or `Standard`, capacity can be `0` only.
func (o NamespaceOutput) Capacity() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Namespace) pulumi.IntPtrOutput { return v.Capacity }).(pulumi.IntPtrOutput)
}
// An `customerManagedKey` block as defined below.
func (o NamespaceOutput) CustomerManagedKey() NamespaceCustomerManagedKeyTypePtrOutput {
return o.ApplyT(func(v *Namespace) NamespaceCustomerManagedKeyTypePtrOutput { return v.CustomerManagedKey }).(NamespaceCustomerManagedKeyTypePtrOutput)
}
// The primary connection string for the authorization rule `RootManageSharedAccessKey`.
func (o NamespaceOutput) DefaultPrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.DefaultPrimaryConnectionString }).(pulumi.StringOutput)
}
// The primary access key for the authorization rule `RootManageSharedAccessKey`.
func (o NamespaceOutput) DefaultPrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.DefaultPrimaryKey }).(pulumi.StringOutput)
}
// The secondary connection string for the authorization rule `RootManageSharedAccessKey`.
func (o NamespaceOutput) DefaultSecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.DefaultSecondaryConnectionString }).(pulumi.StringOutput)
}
// The secondary access key for the authorization rule `RootManageSharedAccessKey`.
func (o NamespaceOutput) DefaultSecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.DefaultSecondaryKey }).(pulumi.StringOutput)
}
// The URL to access the Service Bus Namespace.
func (o NamespaceOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o NamespaceOutput) Identity() NamespaceIdentityPtrOutput {
return o.ApplyT(func(v *Namespace) NamespaceIdentityPtrOutput { return v.Identity }).(NamespaceIdentityPtrOutput)
}
// Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults to `true`.
func (o NamespaceOutput) LocalAuthEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Namespace) pulumi.BoolPtrOutput { return v.LocalAuthEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o NamespaceOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The minimum supported TLS version for this Service Bus Namespace. Valid values are: `1.0`, `1.1` and `1.2`. Defaults to `1.2`.
//
// > **Note:** Azure Services will require TLS 1.2+ by August 2025, please see this [announcement](https://azure.microsoft.com/en-us/updates/v2/update-retirement-tls1-0-tls1-1-versions-azure-services/) for more.
func (o NamespaceOutput) MinimumTlsVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringPtrOutput { return v.MinimumTlsVersion }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Service Bus Namespace resource . Changing this forces a new resource to be created.
func (o NamespaceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// An `networkRuleSet` block as defined below.
func (o NamespaceOutput) NetworkRuleSet() NamespaceNetworkRuleSetOutput {
return o.ApplyT(func(v *Namespace) NamespaceNetworkRuleSetOutput { return v.NetworkRuleSet }).(NamespaceNetworkRuleSetOutput)
}
// Specifies the number messaging partitions. Only valid when `sku` is `Premium` and the minimum number is `1`. Possible values include `0`, `1`, `2`, and `4`. Defaults to `0` for Standard, Basic namespace. Changing this forces a new resource to be created.
//
// > **Note:** It's not possible to change the partitioning option on any existing namespace. The number of partitions can only be set during namespace creation. Please check the doc https://learn.microsoft.com/en-us/azure/service-bus-messaging/enable-partitions-premium for more feature restrictions.
func (o NamespaceOutput) PremiumMessagingPartitions() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Namespace) pulumi.IntPtrOutput { return v.PremiumMessagingPartitions }).(pulumi.IntPtrOutput)
}
// Is public network access enabled for the Service Bus Namespace? Defaults to `true`.
func (o NamespaceOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Namespace) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the resource group in which to Changing this forces a new resource to be created.
// create the namespace.
func (o NamespaceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Defines which tier to use. Options are `Basic`, `Standard` or `Premium`. Please note that setting this field to `Premium` will force the creation of a new resource.
func (o NamespaceOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.Sku }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o NamespaceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type NamespaceArrayOutput struct{ *pulumi.OutputState }
func (NamespaceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Namespace)(nil)).Elem()
}
func (o NamespaceArrayOutput) ToNamespaceArrayOutput() NamespaceArrayOutput {
return o
}
func (o NamespaceArrayOutput) ToNamespaceArrayOutputWithContext(ctx context.Context) NamespaceArrayOutput {
return o
}
func (o NamespaceArrayOutput) Index(i pulumi.IntInput) NamespaceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Namespace {
return vs[0].([]*Namespace)[vs[1].(int)]
}).(NamespaceOutput)
}
type NamespaceMapOutput struct{ *pulumi.OutputState }
func (NamespaceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Namespace)(nil)).Elem()
}
func (o NamespaceMapOutput) ToNamespaceMapOutput() NamespaceMapOutput {
return o
}
func (o NamespaceMapOutput) ToNamespaceMapOutputWithContext(ctx context.Context) NamespaceMapOutput {
return o
}
func (o NamespaceMapOutput) MapIndex(k pulumi.StringInput) NamespaceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Namespace {
return vs[0].(map[string]*Namespace)[vs[1].(string)]
}).(NamespaceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceInput)(nil)).Elem(), &Namespace{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceArrayInput)(nil)).Elem(), NamespaceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceMapInput)(nil)).Elem(), NamespaceMap{})
pulumi.RegisterOutputType(NamespaceOutput{})
pulumi.RegisterOutputType(NamespaceArrayOutput{})
pulumi.RegisterOutputType(NamespaceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/getSubscription.go | sdk/go/azure/servicebus/getSubscription.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
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 ServiceBus Subscription.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 {
// _, err := servicebus.LookupSubscription(ctx, &servicebus.LookupSubscriptionArgs{
// Name: "examplesubscription",
// TopicId: pulumi.StringRef("exampletopic"),
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("servicebusSubscription", exampleAzurermServicebusNamespace)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.ServiceBus` - 2024-01-01
func LookupSubscription(ctx *pulumi.Context, args *LookupSubscriptionArgs, opts ...pulumi.InvokeOption) (*LookupSubscriptionResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupSubscriptionResult
err := ctx.Invoke("azure:servicebus/getSubscription:getSubscription", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSubscription.
type LookupSubscriptionArgs struct {
// Specifies the name of the ServiceBus Subscription.
Name string `pulumi:"name"`
// Deprecated: `namespaceName` will be removed in favour of the property `topicId` in version 5.0 of the AzureRM Provider.
NamespaceName *string `pulumi:"namespaceName"`
// Deprecated: `resourceGroupName` will be removed in favour of the property `topicId` in version 5.0 of the AzureRM Provider.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The ID of the ServiceBus Topic where the Service Bus Subscription exists.
TopicId *string `pulumi:"topicId"`
// Deprecated: `topicName` will be removed in favour of the property `topicId` in version 5.0 of the AzureRM Provider.
TopicName *string `pulumi:"topicName"`
}
// A collection of values returned by getSubscription.
type LookupSubscriptionResult struct {
// The idle interval after which the Subscription is automatically deleted.
AutoDeleteOnIdle string `pulumi:"autoDeleteOnIdle"`
// Whether batched operations are enabled.
BatchedOperationsEnabled bool `pulumi:"batchedOperationsEnabled"`
// Does the ServiceBus Subscription have dead letter support on filter evaluation exceptions?
DeadLetteringOnFilterEvaluationError bool `pulumi:"deadLetteringOnFilterEvaluationError"`
// Does the Service Bus Subscription have dead letter support when a message expires?
DeadLetteringOnMessageExpiration bool `pulumi:"deadLetteringOnMessageExpiration"`
// The Default message timespan to live. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.
DefaultMessageTtl string `pulumi:"defaultMessageTtl"`
EnableBatchedOperations bool `pulumi:"enableBatchedOperations"`
// The name of a Queue or Topic to automatically forward Dead Letter messages to.
ForwardDeadLetteredMessagesTo string `pulumi:"forwardDeadLetteredMessagesTo"`
// The name of a ServiceBus Queue or ServiceBus Topic where messages are automatically forwarded.
ForwardTo string `pulumi:"forwardTo"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The lock duration for the subscription.
LockDuration string `pulumi:"lockDuration"`
// The maximum number of deliveries.
MaxDeliveryCount int `pulumi:"maxDeliveryCount"`
Name string `pulumi:"name"`
// Deprecated: `namespaceName` will be removed in favour of the property `topicId` in version 5.0 of the AzureRM Provider.
NamespaceName *string `pulumi:"namespaceName"`
// Whether this ServiceBus Subscription supports session.
RequiresSession bool `pulumi:"requiresSession"`
// Deprecated: `resourceGroupName` will be removed in favour of the property `topicId` in version 5.0 of the AzureRM Provider.
ResourceGroupName *string `pulumi:"resourceGroupName"`
TopicId *string `pulumi:"topicId"`
// Deprecated: `topicName` will be removed in favour of the property `topicId` in version 5.0 of the AzureRM Provider.
TopicName *string `pulumi:"topicName"`
}
func LookupSubscriptionOutput(ctx *pulumi.Context, args LookupSubscriptionOutputArgs, opts ...pulumi.InvokeOption) LookupSubscriptionResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupSubscriptionResultOutput, error) {
args := v.(LookupSubscriptionArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:servicebus/getSubscription:getSubscription", args, LookupSubscriptionResultOutput{}, options).(LookupSubscriptionResultOutput), nil
}).(LookupSubscriptionResultOutput)
}
// A collection of arguments for invoking getSubscription.
type LookupSubscriptionOutputArgs struct {
// Specifies the name of the ServiceBus Subscription.
Name pulumi.StringInput `pulumi:"name"`
// Deprecated: `namespaceName` will be removed in favour of the property `topicId` in version 5.0 of the AzureRM Provider.
NamespaceName pulumi.StringPtrInput `pulumi:"namespaceName"`
// Deprecated: `resourceGroupName` will be removed in favour of the property `topicId` in version 5.0 of the AzureRM Provider.
ResourceGroupName pulumi.StringPtrInput `pulumi:"resourceGroupName"`
// The ID of the ServiceBus Topic where the Service Bus Subscription exists.
TopicId pulumi.StringPtrInput `pulumi:"topicId"`
// Deprecated: `topicName` will be removed in favour of the property `topicId` in version 5.0 of the AzureRM Provider.
TopicName pulumi.StringPtrInput `pulumi:"topicName"`
}
func (LookupSubscriptionOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSubscriptionArgs)(nil)).Elem()
}
// A collection of values returned by getSubscription.
type LookupSubscriptionResultOutput struct{ *pulumi.OutputState }
func (LookupSubscriptionResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSubscriptionResult)(nil)).Elem()
}
func (o LookupSubscriptionResultOutput) ToLookupSubscriptionResultOutput() LookupSubscriptionResultOutput {
return o
}
func (o LookupSubscriptionResultOutput) ToLookupSubscriptionResultOutputWithContext(ctx context.Context) LookupSubscriptionResultOutput {
return o
}
// The idle interval after which the Subscription is automatically deleted.
func (o LookupSubscriptionResultOutput) AutoDeleteOnIdle() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.AutoDeleteOnIdle }).(pulumi.StringOutput)
}
// Whether batched operations are enabled.
func (o LookupSubscriptionResultOutput) BatchedOperationsEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupSubscriptionResult) bool { return v.BatchedOperationsEnabled }).(pulumi.BoolOutput)
}
// Does the ServiceBus Subscription have dead letter support on filter evaluation exceptions?
func (o LookupSubscriptionResultOutput) DeadLetteringOnFilterEvaluationError() pulumi.BoolOutput {
return o.ApplyT(func(v LookupSubscriptionResult) bool { return v.DeadLetteringOnFilterEvaluationError }).(pulumi.BoolOutput)
}
// Does the Service Bus Subscription have dead letter support when a message expires?
func (o LookupSubscriptionResultOutput) DeadLetteringOnMessageExpiration() pulumi.BoolOutput {
return o.ApplyT(func(v LookupSubscriptionResult) bool { return v.DeadLetteringOnMessageExpiration }).(pulumi.BoolOutput)
}
// The Default message timespan to live. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself.
func (o LookupSubscriptionResultOutput) DefaultMessageTtl() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.DefaultMessageTtl }).(pulumi.StringOutput)
}
func (o LookupSubscriptionResultOutput) EnableBatchedOperations() pulumi.BoolOutput {
return o.ApplyT(func(v LookupSubscriptionResult) bool { return v.EnableBatchedOperations }).(pulumi.BoolOutput)
}
// The name of a Queue or Topic to automatically forward Dead Letter messages to.
func (o LookupSubscriptionResultOutput) ForwardDeadLetteredMessagesTo() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.ForwardDeadLetteredMessagesTo }).(pulumi.StringOutput)
}
// The name of a ServiceBus Queue or ServiceBus Topic where messages are automatically forwarded.
func (o LookupSubscriptionResultOutput) ForwardTo() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.ForwardTo }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupSubscriptionResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.Id }).(pulumi.StringOutput)
}
// The lock duration for the subscription.
func (o LookupSubscriptionResultOutput) LockDuration() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.LockDuration }).(pulumi.StringOutput)
}
// The maximum number of deliveries.
func (o LookupSubscriptionResultOutput) MaxDeliveryCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupSubscriptionResult) int { return v.MaxDeliveryCount }).(pulumi.IntOutput)
}
func (o LookupSubscriptionResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupSubscriptionResult) string { return v.Name }).(pulumi.StringOutput)
}
// Deprecated: `namespaceName` will be removed in favour of the property `topicId` in version 5.0 of the AzureRM Provider.
func (o LookupSubscriptionResultOutput) NamespaceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupSubscriptionResult) *string { return v.NamespaceName }).(pulumi.StringPtrOutput)
}
// Whether this ServiceBus Subscription supports session.
func (o LookupSubscriptionResultOutput) RequiresSession() pulumi.BoolOutput {
return o.ApplyT(func(v LookupSubscriptionResult) bool { return v.RequiresSession }).(pulumi.BoolOutput)
}
// Deprecated: `resourceGroupName` will be removed in favour of the property `topicId` in version 5.0 of the AzureRM Provider.
func (o LookupSubscriptionResultOutput) ResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupSubscriptionResult) *string { return v.ResourceGroupName }).(pulumi.StringPtrOutput)
}
func (o LookupSubscriptionResultOutput) TopicId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupSubscriptionResult) *string { return v.TopicId }).(pulumi.StringPtrOutput)
}
// Deprecated: `topicName` will be removed in favour of the property `topicId` in version 5.0 of the AzureRM Provider.
func (o LookupSubscriptionResultOutput) TopicName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupSubscriptionResult) *string { return v.TopicName }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupSubscriptionResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/subscription.go | sdk/go/azure/servicebus/subscription.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a ServiceBus Subscription.
//
// ## 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/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("tfex-servicebus-subscription"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
// Name: pulumi.String("tfex_servicebus_topic"),
// NamespaceId: exampleNamespace.ID(),
// PartitioningEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewSubscription(ctx, "example", &servicebus.SubscriptionArgs{
// Name: pulumi.String("tfex_servicebus_subscription"),
// TopicId: exampleTopic.ID(),
// MaxDeliveryCount: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ServiceBus` - 2024-01-01
//
// ## Import
//
// Service Bus Subscriptions can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:servicebus/subscription:Subscription example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/topics/sntopic1/subscriptions/sbsub1
// ```
type Subscription struct {
pulumi.CustomResourceState
// The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle pulumi.StringPtrOutput `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls whether the Subscription supports batched operations.
BatchedOperationsEnabled pulumi.BoolPtrOutput `pulumi:"batchedOperationsEnabled"`
// A `clientScopedSubscription` block as defined below.
ClientScopedSubscription SubscriptionClientScopedSubscriptionPtrOutput `pulumi:"clientScopedSubscription"`
// whether the subscription is scoped to a client id. Defaults to `false`.
//
// > **Note:** Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
ClientScopedSubscriptionEnabled pulumi.BoolPtrOutput `pulumi:"clientScopedSubscriptionEnabled"`
// Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`.
DeadLetteringOnFilterEvaluationError pulumi.BoolPtrOutput `pulumi:"deadLetteringOnFilterEvaluationError"`
// Boolean flag which controls whether the Subscription has dead letter support when a message expires.
DeadLetteringOnMessageExpiration pulumi.BoolPtrOutput `pulumi:"deadLetteringOnMessageExpiration"`
// The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the value used when TimeToLive is not set on a message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl pulumi.StringPtrOutput `pulumi:"defaultMessageTtl"`
// The name of a Queue or Topic to automatically forward Dead Letter messages to.
ForwardDeadLetteredMessagesTo pulumi.StringPtrOutput `pulumi:"forwardDeadLetteredMessagesTo"`
// The name of a Queue or Topic to automatically forward messages to.
ForwardTo pulumi.StringPtrOutput `pulumi:"forwardTo"`
// The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `PT1M`.
LockDuration pulumi.StringPtrOutput `pulumi:"lockDuration"`
// The maximum number of deliveries.
MaxDeliveryCount pulumi.IntOutput `pulumi:"maxDeliveryCount"`
// Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.
RequiresSession pulumi.BoolPtrOutput `pulumi:"requiresSession"`
// The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`.
Status pulumi.StringPtrOutput `pulumi:"status"`
// The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
TopicId pulumi.StringOutput `pulumi:"topicId"`
}
// NewSubscription registers a new resource with the given unique name, arguments, and options.
func NewSubscription(ctx *pulumi.Context,
name string, args *SubscriptionArgs, opts ...pulumi.ResourceOption) (*Subscription, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MaxDeliveryCount == nil {
return nil, errors.New("invalid value for required argument 'MaxDeliveryCount'")
}
if args.TopicId == nil {
return nil, errors.New("invalid value for required argument 'TopicId'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:eventhub/subscription:Subscription"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Subscription
err := ctx.RegisterResource("azure:servicebus/subscription:Subscription", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSubscription gets an existing Subscription 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 GetSubscription(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SubscriptionState, opts ...pulumi.ResourceOption) (*Subscription, error) {
var resource Subscription
err := ctx.ReadResource("azure:servicebus/subscription:Subscription", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Subscription resources.
type subscriptionState struct {
// The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle *string `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls whether the Subscription supports batched operations.
BatchedOperationsEnabled *bool `pulumi:"batchedOperationsEnabled"`
// A `clientScopedSubscription` block as defined below.
ClientScopedSubscription *SubscriptionClientScopedSubscription `pulumi:"clientScopedSubscription"`
// whether the subscription is scoped to a client id. Defaults to `false`.
//
// > **Note:** Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
ClientScopedSubscriptionEnabled *bool `pulumi:"clientScopedSubscriptionEnabled"`
// Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`.
DeadLetteringOnFilterEvaluationError *bool `pulumi:"deadLetteringOnFilterEvaluationError"`
// Boolean flag which controls whether the Subscription has dead letter support when a message expires.
DeadLetteringOnMessageExpiration *bool `pulumi:"deadLetteringOnMessageExpiration"`
// The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the value used when TimeToLive is not set on a message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl *string `pulumi:"defaultMessageTtl"`
// The name of a Queue or Topic to automatically forward Dead Letter messages to.
ForwardDeadLetteredMessagesTo *string `pulumi:"forwardDeadLetteredMessagesTo"`
// The name of a Queue or Topic to automatically forward messages to.
ForwardTo *string `pulumi:"forwardTo"`
// The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `PT1M`.
LockDuration *string `pulumi:"lockDuration"`
// The maximum number of deliveries.
MaxDeliveryCount *int `pulumi:"maxDeliveryCount"`
// Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.
RequiresSession *bool `pulumi:"requiresSession"`
// The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`.
Status *string `pulumi:"status"`
// The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
TopicId *string `pulumi:"topicId"`
}
type SubscriptionState struct {
// The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle pulumi.StringPtrInput
// Boolean flag which controls whether the Subscription supports batched operations.
BatchedOperationsEnabled pulumi.BoolPtrInput
// A `clientScopedSubscription` block as defined below.
ClientScopedSubscription SubscriptionClientScopedSubscriptionPtrInput
// whether the subscription is scoped to a client id. Defaults to `false`.
//
// > **Note:** Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
ClientScopedSubscriptionEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`.
DeadLetteringOnFilterEvaluationError pulumi.BoolPtrInput
// Boolean flag which controls whether the Subscription has dead letter support when a message expires.
DeadLetteringOnMessageExpiration pulumi.BoolPtrInput
// The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the value used when TimeToLive is not set on a message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl pulumi.StringPtrInput
// The name of a Queue or Topic to automatically forward Dead Letter messages to.
ForwardDeadLetteredMessagesTo pulumi.StringPtrInput
// The name of a Queue or Topic to automatically forward messages to.
ForwardTo pulumi.StringPtrInput
// The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `PT1M`.
LockDuration pulumi.StringPtrInput
// The maximum number of deliveries.
MaxDeliveryCount pulumi.IntPtrInput
// Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.
RequiresSession pulumi.BoolPtrInput
// The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`.
Status pulumi.StringPtrInput
// The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
TopicId pulumi.StringPtrInput
}
func (SubscriptionState) ElementType() reflect.Type {
return reflect.TypeOf((*subscriptionState)(nil)).Elem()
}
type subscriptionArgs struct {
// The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle *string `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls whether the Subscription supports batched operations.
BatchedOperationsEnabled *bool `pulumi:"batchedOperationsEnabled"`
// A `clientScopedSubscription` block as defined below.
ClientScopedSubscription *SubscriptionClientScopedSubscription `pulumi:"clientScopedSubscription"`
// whether the subscription is scoped to a client id. Defaults to `false`.
//
// > **Note:** Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
ClientScopedSubscriptionEnabled *bool `pulumi:"clientScopedSubscriptionEnabled"`
// Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`.
DeadLetteringOnFilterEvaluationError *bool `pulumi:"deadLetteringOnFilterEvaluationError"`
// Boolean flag which controls whether the Subscription has dead letter support when a message expires.
DeadLetteringOnMessageExpiration *bool `pulumi:"deadLetteringOnMessageExpiration"`
// The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the value used when TimeToLive is not set on a message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl *string `pulumi:"defaultMessageTtl"`
// The name of a Queue or Topic to automatically forward Dead Letter messages to.
ForwardDeadLetteredMessagesTo *string `pulumi:"forwardDeadLetteredMessagesTo"`
// The name of a Queue or Topic to automatically forward messages to.
ForwardTo *string `pulumi:"forwardTo"`
// The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `PT1M`.
LockDuration *string `pulumi:"lockDuration"`
// The maximum number of deliveries.
MaxDeliveryCount int `pulumi:"maxDeliveryCount"`
// Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.
RequiresSession *bool `pulumi:"requiresSession"`
// The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`.
Status *string `pulumi:"status"`
// The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
TopicId string `pulumi:"topicId"`
}
// The set of arguments for constructing a Subscription resource.
type SubscriptionArgs struct {
// The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle pulumi.StringPtrInput
// Boolean flag which controls whether the Subscription supports batched operations.
BatchedOperationsEnabled pulumi.BoolPtrInput
// A `clientScopedSubscription` block as defined below.
ClientScopedSubscription SubscriptionClientScopedSubscriptionPtrInput
// whether the subscription is scoped to a client id. Defaults to `false`.
//
// > **Note:** Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
ClientScopedSubscriptionEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`.
DeadLetteringOnFilterEvaluationError pulumi.BoolPtrInput
// Boolean flag which controls whether the Subscription has dead letter support when a message expires.
DeadLetteringOnMessageExpiration pulumi.BoolPtrInput
// The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the value used when TimeToLive is not set on a message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl pulumi.StringPtrInput
// The name of a Queue or Topic to automatically forward Dead Letter messages to.
ForwardDeadLetteredMessagesTo pulumi.StringPtrInput
// The name of a Queue or Topic to automatically forward messages to.
ForwardTo pulumi.StringPtrInput
// The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `PT1M`.
LockDuration pulumi.StringPtrInput
// The maximum number of deliveries.
MaxDeliveryCount pulumi.IntInput
// Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.
RequiresSession pulumi.BoolPtrInput
// The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`.
Status pulumi.StringPtrInput
// The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
TopicId pulumi.StringInput
}
func (SubscriptionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*subscriptionArgs)(nil)).Elem()
}
type SubscriptionInput interface {
pulumi.Input
ToSubscriptionOutput() SubscriptionOutput
ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput
}
func (*Subscription) ElementType() reflect.Type {
return reflect.TypeOf((**Subscription)(nil)).Elem()
}
func (i *Subscription) ToSubscriptionOutput() SubscriptionOutput {
return i.ToSubscriptionOutputWithContext(context.Background())
}
func (i *Subscription) ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionOutput)
}
// SubscriptionArrayInput is an input type that accepts SubscriptionArray and SubscriptionArrayOutput values.
// You can construct a concrete instance of `SubscriptionArrayInput` via:
//
// SubscriptionArray{ SubscriptionArgs{...} }
type SubscriptionArrayInput interface {
pulumi.Input
ToSubscriptionArrayOutput() SubscriptionArrayOutput
ToSubscriptionArrayOutputWithContext(context.Context) SubscriptionArrayOutput
}
type SubscriptionArray []SubscriptionInput
func (SubscriptionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Subscription)(nil)).Elem()
}
func (i SubscriptionArray) ToSubscriptionArrayOutput() SubscriptionArrayOutput {
return i.ToSubscriptionArrayOutputWithContext(context.Background())
}
func (i SubscriptionArray) ToSubscriptionArrayOutputWithContext(ctx context.Context) SubscriptionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionArrayOutput)
}
// SubscriptionMapInput is an input type that accepts SubscriptionMap and SubscriptionMapOutput values.
// You can construct a concrete instance of `SubscriptionMapInput` via:
//
// SubscriptionMap{ "key": SubscriptionArgs{...} }
type SubscriptionMapInput interface {
pulumi.Input
ToSubscriptionMapOutput() SubscriptionMapOutput
ToSubscriptionMapOutputWithContext(context.Context) SubscriptionMapOutput
}
type SubscriptionMap map[string]SubscriptionInput
func (SubscriptionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Subscription)(nil)).Elem()
}
func (i SubscriptionMap) ToSubscriptionMapOutput() SubscriptionMapOutput {
return i.ToSubscriptionMapOutputWithContext(context.Background())
}
func (i SubscriptionMap) ToSubscriptionMapOutputWithContext(ctx context.Context) SubscriptionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionMapOutput)
}
type SubscriptionOutput struct{ *pulumi.OutputState }
func (SubscriptionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Subscription)(nil)).Elem()
}
func (o SubscriptionOutput) ToSubscriptionOutput() SubscriptionOutput {
return o
}
func (o SubscriptionOutput) ToSubscriptionOutputWithContext(ctx context.Context) SubscriptionOutput {
return o
}
// The idle interval after which the topic is automatically deleted as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). The minimum duration is `5` minutes or `PT5M`. Defaults to `P10675199DT2H48M5.4775807S`.
func (o SubscriptionOutput) AutoDeleteOnIdle() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.AutoDeleteOnIdle }).(pulumi.StringPtrOutput)
}
// Boolean flag which controls whether the Subscription supports batched operations.
func (o SubscriptionOutput) BatchedOperationsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.BoolPtrOutput { return v.BatchedOperationsEnabled }).(pulumi.BoolPtrOutput)
}
// A `clientScopedSubscription` block as defined below.
func (o SubscriptionOutput) ClientScopedSubscription() SubscriptionClientScopedSubscriptionPtrOutput {
return o.ApplyT(func(v *Subscription) SubscriptionClientScopedSubscriptionPtrOutput { return v.ClientScopedSubscription }).(SubscriptionClientScopedSubscriptionPtrOutput)
}
// whether the subscription is scoped to a client id. Defaults to `false`.
//
// > **Note:** Client Scoped Subscription can only be used for JMS subscription (Java Message Service).
func (o SubscriptionOutput) ClientScopedSubscriptionEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.BoolPtrOutput { return v.ClientScopedSubscriptionEnabled }).(pulumi.BoolPtrOutput)
}
// Boolean flag which controls whether the Subscription has dead letter support on filter evaluation exceptions. Defaults to `true`.
func (o SubscriptionOutput) DeadLetteringOnFilterEvaluationError() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.BoolPtrOutput { return v.DeadLetteringOnFilterEvaluationError }).(pulumi.BoolPtrOutput)
}
// Boolean flag which controls whether the Subscription has dead letter support when a message expires.
func (o SubscriptionOutput) DeadLetteringOnMessageExpiration() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.BoolPtrOutput { return v.DeadLetteringOnMessageExpiration }).(pulumi.BoolPtrOutput)
}
// The Default message timespan to live as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the value used when TimeToLive is not set on a message itself. Defaults to `P10675199DT2H48M5.4775807S`.
func (o SubscriptionOutput) DefaultMessageTtl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.DefaultMessageTtl }).(pulumi.StringPtrOutput)
}
// The name of a Queue or Topic to automatically forward Dead Letter messages to.
func (o SubscriptionOutput) ForwardDeadLetteredMessagesTo() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.ForwardDeadLetteredMessagesTo }).(pulumi.StringPtrOutput)
}
// The name of a Queue or Topic to automatically forward messages to.
func (o SubscriptionOutput) ForwardTo() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.ForwardTo }).(pulumi.StringPtrOutput)
}
// The lock duration for the subscription as an [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `PT1M`.
func (o SubscriptionOutput) LockDuration() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.LockDuration }).(pulumi.StringPtrOutput)
}
// The maximum number of deliveries.
func (o SubscriptionOutput) MaxDeliveryCount() pulumi.IntOutput {
return o.ApplyT(func(v *Subscription) pulumi.IntOutput { return v.MaxDeliveryCount }).(pulumi.IntOutput)
}
// Specifies the name of the ServiceBus Subscription resource. Changing this forces a new resource to be created.
func (o SubscriptionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Boolean flag which controls whether this Subscription supports the concept of a session. Changing this forces a new resource to be created.
func (o SubscriptionOutput) RequiresSession() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.BoolPtrOutput { return v.RequiresSession }).(pulumi.BoolPtrOutput)
}
// The status of the Subscription. Possible values are `Active`,`ReceiveDisabled`, or `Disabled`. Defaults to `Active`.
func (o SubscriptionOutput) Status() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringPtrOutput { return v.Status }).(pulumi.StringPtrOutput)
}
// The ID of the ServiceBus Topic to create this Subscription in. Changing this forces a new resource to be created.
func (o SubscriptionOutput) TopicId() pulumi.StringOutput {
return o.ApplyT(func(v *Subscription) pulumi.StringOutput { return v.TopicId }).(pulumi.StringOutput)
}
type SubscriptionArrayOutput struct{ *pulumi.OutputState }
func (SubscriptionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Subscription)(nil)).Elem()
}
func (o SubscriptionArrayOutput) ToSubscriptionArrayOutput() SubscriptionArrayOutput {
return o
}
func (o SubscriptionArrayOutput) ToSubscriptionArrayOutputWithContext(ctx context.Context) SubscriptionArrayOutput {
return o
}
func (o SubscriptionArrayOutput) Index(i pulumi.IntInput) SubscriptionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Subscription {
return vs[0].([]*Subscription)[vs[1].(int)]
}).(SubscriptionOutput)
}
type SubscriptionMapOutput struct{ *pulumi.OutputState }
func (SubscriptionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Subscription)(nil)).Elem()
}
func (o SubscriptionMapOutput) ToSubscriptionMapOutput() SubscriptionMapOutput {
return o
}
func (o SubscriptionMapOutput) ToSubscriptionMapOutputWithContext(ctx context.Context) SubscriptionMapOutput {
return o
}
func (o SubscriptionMapOutput) MapIndex(k pulumi.StringInput) SubscriptionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Subscription {
return vs[0].(map[string]*Subscription)[vs[1].(string)]
}).(SubscriptionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionInput)(nil)).Elem(), &Subscription{})
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionArrayInput)(nil)).Elem(), SubscriptionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionMapInput)(nil)).Elem(), SubscriptionMap{})
pulumi.RegisterOutputType(SubscriptionOutput{})
pulumi.RegisterOutputType(SubscriptionArrayOutput{})
pulumi.RegisterOutputType(SubscriptionMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/getQueue.go | sdk/go/azure/servicebus/getQueue.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
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 Service Bus Queue.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := servicebus.LookupQueue(ctx, &servicebus.LookupQueueArgs{
// Name: "existing",
// NamespaceId: pulumi.StringRef("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.ServiceBus` - 2024-01-01
func LookupQueue(ctx *pulumi.Context, args *LookupQueueArgs, opts ...pulumi.InvokeOption) (*LookupQueueResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupQueueResult
err := ctx.Invoke("azure:servicebus/getQueue:getQueue", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getQueue.
type LookupQueueArgs struct {
// The name of this Service Bus Queue.
Name string `pulumi:"name"`
// The ID of the ServiceBus Namespace where the Service Bus Queue exists.
NamespaceId *string `pulumi:"namespaceId"`
// Deprecated: `namespaceName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
NamespaceName *string `pulumi:"namespaceName"`
// Deprecated: `resourceGroupName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getQueue.
type LookupQueueResult struct {
// The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.
AutoDeleteOnIdle string `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls whether server-side batched operations are enabled.
BatchedOperationsEnabled bool `pulumi:"batchedOperationsEnabled"`
// Boolean flag which controls whether the Queue has dead letter support when a message expires.
DeadLetteringOnMessageExpiration bool `pulumi:"deadLetteringOnMessageExpiration"`
// The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on a message itself.
DefaultMessageTtl string `pulumi:"defaultMessageTtl"`
// The ISO 8601 timespan duration during which duplicates can be detected.
DuplicateDetectionHistoryTimeWindow string `pulumi:"duplicateDetectionHistoryTimeWindow"`
EnableBatchedOperations bool `pulumi:"enableBatchedOperations"`
EnableExpress bool `pulumi:"enableExpress"`
EnablePartitioning bool `pulumi:"enablePartitioning"`
// Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage.
ExpressEnabled bool `pulumi:"expressEnabled"`
// The name of a Queue or Topic to automatically forward dead lettered messages to.
ForwardDeadLetteredMessagesTo string `pulumi:"forwardDeadLetteredMessagesTo"`
// The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information.
ForwardTo string `pulumi:"forwardTo"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers.
LockDuration string `pulumi:"lockDuration"`
// Integer value which controls when a message is automatically dead lettered.
MaxDeliveryCount int `pulumi:"maxDeliveryCount"`
// Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas).
MaxSizeInMegabytes int `pulumi:"maxSizeInMegabytes"`
Name string `pulumi:"name"`
NamespaceId *string `pulumi:"namespaceId"`
// Deprecated: `namespaceName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
NamespaceName *string `pulumi:"namespaceName"`
// Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers.
PartitioningEnabled bool `pulumi:"partitioningEnabled"`
// Boolean flag which controls whether the Queue requires duplicate detection.
RequiresDuplicateDetection bool `pulumi:"requiresDuplicateDetection"`
// Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages.
RequiresSession bool `pulumi:"requiresSession"`
// Deprecated: `resourceGroupName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`.
Status string `pulumi:"status"`
}
func LookupQueueOutput(ctx *pulumi.Context, args LookupQueueOutputArgs, opts ...pulumi.InvokeOption) LookupQueueResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupQueueResultOutput, error) {
args := v.(LookupQueueArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:servicebus/getQueue:getQueue", args, LookupQueueResultOutput{}, options).(LookupQueueResultOutput), nil
}).(LookupQueueResultOutput)
}
// A collection of arguments for invoking getQueue.
type LookupQueueOutputArgs struct {
// The name of this Service Bus Queue.
Name pulumi.StringInput `pulumi:"name"`
// The ID of the ServiceBus Namespace where the Service Bus Queue exists.
NamespaceId pulumi.StringPtrInput `pulumi:"namespaceId"`
// Deprecated: `namespaceName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
NamespaceName pulumi.StringPtrInput `pulumi:"namespaceName"`
// Deprecated: `resourceGroupName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
ResourceGroupName pulumi.StringPtrInput `pulumi:"resourceGroupName"`
}
func (LookupQueueOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupQueueArgs)(nil)).Elem()
}
// A collection of values returned by getQueue.
type LookupQueueResultOutput struct{ *pulumi.OutputState }
func (LookupQueueResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupQueueResult)(nil)).Elem()
}
func (o LookupQueueResultOutput) ToLookupQueueResultOutput() LookupQueueResultOutput {
return o
}
func (o LookupQueueResultOutput) ToLookupQueueResultOutputWithContext(ctx context.Context) LookupQueueResultOutput {
return o
}
// The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.
func (o LookupQueueResultOutput) AutoDeleteOnIdle() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueResult) string { return v.AutoDeleteOnIdle }).(pulumi.StringOutput)
}
// Boolean flag which controls whether server-side batched operations are enabled.
func (o LookupQueueResultOutput) BatchedOperationsEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupQueueResult) bool { return v.BatchedOperationsEnabled }).(pulumi.BoolOutput)
}
// Boolean flag which controls whether the Queue has dead letter support when a message expires.
func (o LookupQueueResultOutput) DeadLetteringOnMessageExpiration() pulumi.BoolOutput {
return o.ApplyT(func(v LookupQueueResult) bool { return v.DeadLetteringOnMessageExpiration }).(pulumi.BoolOutput)
}
// The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on a message itself.
func (o LookupQueueResultOutput) DefaultMessageTtl() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueResult) string { return v.DefaultMessageTtl }).(pulumi.StringOutput)
}
// The ISO 8601 timespan duration during which duplicates can be detected.
func (o LookupQueueResultOutput) DuplicateDetectionHistoryTimeWindow() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueResult) string { return v.DuplicateDetectionHistoryTimeWindow }).(pulumi.StringOutput)
}
func (o LookupQueueResultOutput) EnableBatchedOperations() pulumi.BoolOutput {
return o.ApplyT(func(v LookupQueueResult) bool { return v.EnableBatchedOperations }).(pulumi.BoolOutput)
}
func (o LookupQueueResultOutput) EnableExpress() pulumi.BoolOutput {
return o.ApplyT(func(v LookupQueueResult) bool { return v.EnableExpress }).(pulumi.BoolOutput)
}
func (o LookupQueueResultOutput) EnablePartitioning() pulumi.BoolOutput {
return o.ApplyT(func(v LookupQueueResult) bool { return v.EnablePartitioning }).(pulumi.BoolOutput)
}
// Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage.
func (o LookupQueueResultOutput) ExpressEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupQueueResult) bool { return v.ExpressEnabled }).(pulumi.BoolOutput)
}
// The name of a Queue or Topic to automatically forward dead lettered messages to.
func (o LookupQueueResultOutput) ForwardDeadLetteredMessagesTo() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueResult) string { return v.ForwardDeadLetteredMessagesTo }).(pulumi.StringOutput)
}
// The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information.
func (o LookupQueueResultOutput) ForwardTo() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueResult) string { return v.ForwardTo }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupQueueResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueResult) string { return v.Id }).(pulumi.StringOutput)
}
// The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers.
func (o LookupQueueResultOutput) LockDuration() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueResult) string { return v.LockDuration }).(pulumi.StringOutput)
}
// Integer value which controls when a message is automatically dead lettered.
func (o LookupQueueResultOutput) MaxDeliveryCount() pulumi.IntOutput {
return o.ApplyT(func(v LookupQueueResult) int { return v.MaxDeliveryCount }).(pulumi.IntOutput)
}
// Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas).
func (o LookupQueueResultOutput) MaxSizeInMegabytes() pulumi.IntOutput {
return o.ApplyT(func(v LookupQueueResult) int { return v.MaxSizeInMegabytes }).(pulumi.IntOutput)
}
func (o LookupQueueResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupQueueResultOutput) NamespaceId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupQueueResult) *string { return v.NamespaceId }).(pulumi.StringPtrOutput)
}
// Deprecated: `namespaceName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
func (o LookupQueueResultOutput) NamespaceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupQueueResult) *string { return v.NamespaceName }).(pulumi.StringPtrOutput)
}
// Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers.
func (o LookupQueueResultOutput) PartitioningEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupQueueResult) bool { return v.PartitioningEnabled }).(pulumi.BoolOutput)
}
// Boolean flag which controls whether the Queue requires duplicate detection.
func (o LookupQueueResultOutput) RequiresDuplicateDetection() pulumi.BoolOutput {
return o.ApplyT(func(v LookupQueueResult) bool { return v.RequiresDuplicateDetection }).(pulumi.BoolOutput)
}
// Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages.
func (o LookupQueueResultOutput) RequiresSession() pulumi.BoolOutput {
return o.ApplyT(func(v LookupQueueResult) bool { return v.RequiresSession }).(pulumi.BoolOutput)
}
// Deprecated: `resourceGroupName` will be removed in favour of the property `namespaceId` in version 5.0 of the AzureRM Provider.
func (o LookupQueueResultOutput) ResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupQueueResult) *string { return v.ResourceGroupName }).(pulumi.StringPtrOutput)
}
// The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`.
func (o LookupQueueResultOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueResult) string { return v.Status }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupQueueResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/topicAuthorizationRule.go | sdk/go/azure/servicebus/topicAuthorizationRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a ServiceBus Topic authorization Rule within a ServiceBus Topic.
//
// ## 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/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("tfex-servicebus"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
// Name: pulumi.String("tfex_servicebus_topic"),
// NamespaceId: exampleNamespace.ID(),
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewTopicAuthorizationRule(ctx, "example", &servicebus.TopicAuthorizationRuleArgs{
// Name: pulumi.String("tfex_servicebus_topic_sasPolicy"),
// TopicId: exampleTopic.ID(),
// Listen: pulumi.Bool(true),
// Send: pulumi.Bool(false),
// Manage: 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.ServiceBus` - 2024-01-01
//
// ## Import
//
// ServiceBus Topic authorization rules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:servicebus/topicAuthorizationRule:TopicAuthorizationRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ServiceBus/namespaces/namespace1/topics/topic1/authorizationRules/rule1
// ```
type TopicAuthorizationRule struct {
pulumi.CustomResourceState
// Grants listen access to this this Authorization Rule. Defaults to `false`.
Listen pulumi.BoolPtrOutput `pulumi:"listen"`
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrOutput `pulumi:"manage"`
// Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The Primary Connection String for the ServiceBus Topic authorization Rule.
PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias pulumi.StringOutput `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the ServiceBus Topic authorization Rule.
PrimaryKey pulumi.StringOutput `pulumi:"primaryKey"`
// The Secondary Connection String for the ServiceBus Topic authorization Rule.
SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias pulumi.StringOutput `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the ServiceBus Topic authorization Rule.
SecondaryKey pulumi.StringOutput `pulumi:"secondaryKey"`
// Grants send access to this this Authorization Rule. Defaults to `false`.
Send pulumi.BoolPtrOutput `pulumi:"send"`
// Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
TopicId pulumi.StringOutput `pulumi:"topicId"`
}
// NewTopicAuthorizationRule registers a new resource with the given unique name, arguments, and options.
func NewTopicAuthorizationRule(ctx *pulumi.Context,
name string, args *TopicAuthorizationRuleArgs, opts ...pulumi.ResourceOption) (*TopicAuthorizationRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.TopicId == nil {
return nil, errors.New("invalid value for required argument 'TopicId'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:eventhub/topicAuthorizationRule:TopicAuthorizationRule"),
},
})
opts = append(opts, aliases)
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryConnectionString",
"primaryConnectionStringAlias",
"primaryKey",
"secondaryConnectionString",
"secondaryConnectionStringAlias",
"secondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource TopicAuthorizationRule
err := ctx.RegisterResource("azure:servicebus/topicAuthorizationRule:TopicAuthorizationRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTopicAuthorizationRule gets an existing TopicAuthorizationRule 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 GetTopicAuthorizationRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TopicAuthorizationRuleState, opts ...pulumi.ResourceOption) (*TopicAuthorizationRule, error) {
var resource TopicAuthorizationRule
err := ctx.ReadResource("azure:servicebus/topicAuthorizationRule:TopicAuthorizationRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering TopicAuthorizationRule resources.
type topicAuthorizationRuleState struct {
// Grants listen access to this this Authorization Rule. Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The Primary Connection String for the ServiceBus Topic authorization Rule.
PrimaryConnectionString *string `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias *string `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the ServiceBus Topic authorization Rule.
PrimaryKey *string `pulumi:"primaryKey"`
// The Secondary Connection String for the ServiceBus Topic authorization Rule.
SecondaryConnectionString *string `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias *string `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the ServiceBus Topic authorization Rule.
SecondaryKey *string `pulumi:"secondaryKey"`
// Grants send access to this this Authorization Rule. Defaults to `false`.
Send *bool `pulumi:"send"`
// Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
TopicId *string `pulumi:"topicId"`
}
type TopicAuthorizationRuleState struct {
// Grants listen access to this this Authorization Rule. Defaults to `false`.
Listen pulumi.BoolPtrInput
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The Primary Connection String for the ServiceBus Topic authorization Rule.
PrimaryConnectionString pulumi.StringPtrInput
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias pulumi.StringPtrInput
// The Primary Key for the ServiceBus Topic authorization Rule.
PrimaryKey pulumi.StringPtrInput
// The Secondary Connection String for the ServiceBus Topic authorization Rule.
SecondaryConnectionString pulumi.StringPtrInput
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias pulumi.StringPtrInput
// The Secondary Key for the ServiceBus Topic authorization Rule.
SecondaryKey pulumi.StringPtrInput
// Grants send access to this this Authorization Rule. Defaults to `false`.
Send pulumi.BoolPtrInput
// Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
TopicId pulumi.StringPtrInput
}
func (TopicAuthorizationRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*topicAuthorizationRuleState)(nil)).Elem()
}
type topicAuthorizationRuleArgs struct {
// Grants listen access to this this Authorization Rule. Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Grants send access to this this Authorization Rule. Defaults to `false`.
Send *bool `pulumi:"send"`
// Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
TopicId string `pulumi:"topicId"`
}
// The set of arguments for constructing a TopicAuthorizationRule resource.
type TopicAuthorizationRuleArgs struct {
// Grants listen access to this this Authorization Rule. Defaults to `false`.
Listen pulumi.BoolPtrInput
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Grants send access to this this Authorization Rule. Defaults to `false`.
Send pulumi.BoolPtrInput
// Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
TopicId pulumi.StringInput
}
func (TopicAuthorizationRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*topicAuthorizationRuleArgs)(nil)).Elem()
}
type TopicAuthorizationRuleInput interface {
pulumi.Input
ToTopicAuthorizationRuleOutput() TopicAuthorizationRuleOutput
ToTopicAuthorizationRuleOutputWithContext(ctx context.Context) TopicAuthorizationRuleOutput
}
func (*TopicAuthorizationRule) ElementType() reflect.Type {
return reflect.TypeOf((**TopicAuthorizationRule)(nil)).Elem()
}
func (i *TopicAuthorizationRule) ToTopicAuthorizationRuleOutput() TopicAuthorizationRuleOutput {
return i.ToTopicAuthorizationRuleOutputWithContext(context.Background())
}
func (i *TopicAuthorizationRule) ToTopicAuthorizationRuleOutputWithContext(ctx context.Context) TopicAuthorizationRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(TopicAuthorizationRuleOutput)
}
// TopicAuthorizationRuleArrayInput is an input type that accepts TopicAuthorizationRuleArray and TopicAuthorizationRuleArrayOutput values.
// You can construct a concrete instance of `TopicAuthorizationRuleArrayInput` via:
//
// TopicAuthorizationRuleArray{ TopicAuthorizationRuleArgs{...} }
type TopicAuthorizationRuleArrayInput interface {
pulumi.Input
ToTopicAuthorizationRuleArrayOutput() TopicAuthorizationRuleArrayOutput
ToTopicAuthorizationRuleArrayOutputWithContext(context.Context) TopicAuthorizationRuleArrayOutput
}
type TopicAuthorizationRuleArray []TopicAuthorizationRuleInput
func (TopicAuthorizationRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TopicAuthorizationRule)(nil)).Elem()
}
func (i TopicAuthorizationRuleArray) ToTopicAuthorizationRuleArrayOutput() TopicAuthorizationRuleArrayOutput {
return i.ToTopicAuthorizationRuleArrayOutputWithContext(context.Background())
}
func (i TopicAuthorizationRuleArray) ToTopicAuthorizationRuleArrayOutputWithContext(ctx context.Context) TopicAuthorizationRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TopicAuthorizationRuleArrayOutput)
}
// TopicAuthorizationRuleMapInput is an input type that accepts TopicAuthorizationRuleMap and TopicAuthorizationRuleMapOutput values.
// You can construct a concrete instance of `TopicAuthorizationRuleMapInput` via:
//
// TopicAuthorizationRuleMap{ "key": TopicAuthorizationRuleArgs{...} }
type TopicAuthorizationRuleMapInput interface {
pulumi.Input
ToTopicAuthorizationRuleMapOutput() TopicAuthorizationRuleMapOutput
ToTopicAuthorizationRuleMapOutputWithContext(context.Context) TopicAuthorizationRuleMapOutput
}
type TopicAuthorizationRuleMap map[string]TopicAuthorizationRuleInput
func (TopicAuthorizationRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TopicAuthorizationRule)(nil)).Elem()
}
func (i TopicAuthorizationRuleMap) ToTopicAuthorizationRuleMapOutput() TopicAuthorizationRuleMapOutput {
return i.ToTopicAuthorizationRuleMapOutputWithContext(context.Background())
}
func (i TopicAuthorizationRuleMap) ToTopicAuthorizationRuleMapOutputWithContext(ctx context.Context) TopicAuthorizationRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(TopicAuthorizationRuleMapOutput)
}
type TopicAuthorizationRuleOutput struct{ *pulumi.OutputState }
func (TopicAuthorizationRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**TopicAuthorizationRule)(nil)).Elem()
}
func (o TopicAuthorizationRuleOutput) ToTopicAuthorizationRuleOutput() TopicAuthorizationRuleOutput {
return o
}
func (o TopicAuthorizationRuleOutput) ToTopicAuthorizationRuleOutputWithContext(ctx context.Context) TopicAuthorizationRuleOutput {
return o
}
// Grants listen access to this this Authorization Rule. Defaults to `false`.
func (o TopicAuthorizationRuleOutput) Listen() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.BoolPtrOutput { return v.Listen }).(pulumi.BoolPtrOutput)
}
// Grants manage access to this this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
func (o TopicAuthorizationRuleOutput) Manage() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.BoolPtrOutput { return v.Manage }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the ServiceBus Topic Authorization Rule resource. Changing this forces a new resource to be created.
func (o TopicAuthorizationRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The Primary Connection String for the ServiceBus Topic authorization Rule.
func (o TopicAuthorizationRuleOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
func (o TopicAuthorizationRuleOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Primary Key for the ServiceBus Topic authorization Rule.
func (o TopicAuthorizationRuleOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.PrimaryKey }).(pulumi.StringOutput)
}
// The Secondary Connection String for the ServiceBus Topic authorization Rule.
func (o TopicAuthorizationRuleOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias Secondary Connection String for the ServiceBus Namespace
func (o TopicAuthorizationRuleOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Secondary Key for the ServiceBus Topic authorization Rule.
func (o TopicAuthorizationRuleOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.SecondaryKey }).(pulumi.StringOutput)
}
// Grants send access to this this Authorization Rule. Defaults to `false`.
func (o TopicAuthorizationRuleOutput) Send() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.BoolPtrOutput { return v.Send }).(pulumi.BoolPtrOutput)
}
// Specifies the ID of the ServiceBus Topic. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
func (o TopicAuthorizationRuleOutput) TopicId() pulumi.StringOutput {
return o.ApplyT(func(v *TopicAuthorizationRule) pulumi.StringOutput { return v.TopicId }).(pulumi.StringOutput)
}
type TopicAuthorizationRuleArrayOutput struct{ *pulumi.OutputState }
func (TopicAuthorizationRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TopicAuthorizationRule)(nil)).Elem()
}
func (o TopicAuthorizationRuleArrayOutput) ToTopicAuthorizationRuleArrayOutput() TopicAuthorizationRuleArrayOutput {
return o
}
func (o TopicAuthorizationRuleArrayOutput) ToTopicAuthorizationRuleArrayOutputWithContext(ctx context.Context) TopicAuthorizationRuleArrayOutput {
return o
}
func (o TopicAuthorizationRuleArrayOutput) Index(i pulumi.IntInput) TopicAuthorizationRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TopicAuthorizationRule {
return vs[0].([]*TopicAuthorizationRule)[vs[1].(int)]
}).(TopicAuthorizationRuleOutput)
}
type TopicAuthorizationRuleMapOutput struct{ *pulumi.OutputState }
func (TopicAuthorizationRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TopicAuthorizationRule)(nil)).Elem()
}
func (o TopicAuthorizationRuleMapOutput) ToTopicAuthorizationRuleMapOutput() TopicAuthorizationRuleMapOutput {
return o
}
func (o TopicAuthorizationRuleMapOutput) ToTopicAuthorizationRuleMapOutputWithContext(ctx context.Context) TopicAuthorizationRuleMapOutput {
return o
}
func (o TopicAuthorizationRuleMapOutput) MapIndex(k pulumi.StringInput) TopicAuthorizationRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TopicAuthorizationRule {
return vs[0].(map[string]*TopicAuthorizationRule)[vs[1].(string)]
}).(TopicAuthorizationRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TopicAuthorizationRuleInput)(nil)).Elem(), &TopicAuthorizationRule{})
pulumi.RegisterInputType(reflect.TypeOf((*TopicAuthorizationRuleArrayInput)(nil)).Elem(), TopicAuthorizationRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*TopicAuthorizationRuleMapInput)(nil)).Elem(), TopicAuthorizationRuleMap{})
pulumi.RegisterOutputType(TopicAuthorizationRuleOutput{})
pulumi.RegisterOutputType(TopicAuthorizationRuleArrayOutput{})
pulumi.RegisterOutputType(TopicAuthorizationRuleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/getQueueAuthorizationRule.go | sdk/go/azure/servicebus/getQueueAuthorizationRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
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 ServiceBus Queue Authorisation Rule within a ServiceBus Queue.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := servicebus.LookupQueueAuthorizationRule(ctx, &servicebus.LookupQueueAuthorizationRuleArgs{
// Name: "example-tfex_name",
// ResourceGroupName: pulumi.StringRef("example-resources"),
// QueueName: pulumi.StringRef("example-servicebus_queue"),
// NamespaceName: pulumi.StringRef("example-namespace"),
// }, 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.ServiceBus` - 2024-01-01
func LookupQueueAuthorizationRule(ctx *pulumi.Context, args *LookupQueueAuthorizationRuleArgs, opts ...pulumi.InvokeOption) (*LookupQueueAuthorizationRuleResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupQueueAuthorizationRuleResult
err := ctx.Invoke("azure:servicebus/getQueueAuthorizationRule:getQueueAuthorizationRule", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getQueueAuthorizationRule.
type LookupQueueAuthorizationRuleArgs struct {
// The name of this ServiceBus Queue Authorisation Rule.
Name string `pulumi:"name"`
// The name of the ServiceBus Namespace.
NamespaceName *string `pulumi:"namespaceName"`
QueueId *string `pulumi:"queueId"`
// The name of the ServiceBus Queue.
QueueName *string `pulumi:"queueName"`
// The name of the Resource Group where the ServiceBus Queue Authorisation Rule exists.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getQueueAuthorizationRule.
type LookupQueueAuthorizationRuleResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Listen bool `pulumi:"listen"`
Manage bool `pulumi:"manage"`
Name string `pulumi:"name"`
NamespaceName *string `pulumi:"namespaceName"`
// The Primary Connection String for the ServiceBus Queue authorization Rule.
PrimaryConnectionString string `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias string `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the ServiceBus Queue authorization Rule.
PrimaryKey string `pulumi:"primaryKey"`
QueueId *string `pulumi:"queueId"`
QueueName *string `pulumi:"queueName"`
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Secondary Connection String for the ServiceBus Queue authorization Rule.
SecondaryConnectionString string `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias string `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the ServiceBus Queue authorization Rule.
SecondaryKey string `pulumi:"secondaryKey"`
Send bool `pulumi:"send"`
}
func LookupQueueAuthorizationRuleOutput(ctx *pulumi.Context, args LookupQueueAuthorizationRuleOutputArgs, opts ...pulumi.InvokeOption) LookupQueueAuthorizationRuleResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupQueueAuthorizationRuleResultOutput, error) {
args := v.(LookupQueueAuthorizationRuleArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:servicebus/getQueueAuthorizationRule:getQueueAuthorizationRule", args, LookupQueueAuthorizationRuleResultOutput{}, options).(LookupQueueAuthorizationRuleResultOutput), nil
}).(LookupQueueAuthorizationRuleResultOutput)
}
// A collection of arguments for invoking getQueueAuthorizationRule.
type LookupQueueAuthorizationRuleOutputArgs struct {
// The name of this ServiceBus Queue Authorisation Rule.
Name pulumi.StringInput `pulumi:"name"`
// The name of the ServiceBus Namespace.
NamespaceName pulumi.StringPtrInput `pulumi:"namespaceName"`
QueueId pulumi.StringPtrInput `pulumi:"queueId"`
// The name of the ServiceBus Queue.
QueueName pulumi.StringPtrInput `pulumi:"queueName"`
// The name of the Resource Group where the ServiceBus Queue Authorisation Rule exists.
ResourceGroupName pulumi.StringPtrInput `pulumi:"resourceGroupName"`
}
func (LookupQueueAuthorizationRuleOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupQueueAuthorizationRuleArgs)(nil)).Elem()
}
// A collection of values returned by getQueueAuthorizationRule.
type LookupQueueAuthorizationRuleResultOutput struct{ *pulumi.OutputState }
func (LookupQueueAuthorizationRuleResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupQueueAuthorizationRuleResult)(nil)).Elem()
}
func (o LookupQueueAuthorizationRuleResultOutput) ToLookupQueueAuthorizationRuleResultOutput() LookupQueueAuthorizationRuleResultOutput {
return o
}
func (o LookupQueueAuthorizationRuleResultOutput) ToLookupQueueAuthorizationRuleResultOutputWithContext(ctx context.Context) LookupQueueAuthorizationRuleResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupQueueAuthorizationRuleResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) Listen() pulumi.BoolOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) bool { return v.Listen }).(pulumi.BoolOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) Manage() pulumi.BoolOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) bool { return v.Manage }).(pulumi.BoolOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) NamespaceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) *string { return v.NamespaceName }).(pulumi.StringPtrOutput)
}
// The Primary Connection String for the ServiceBus Queue authorization Rule.
func (o LookupQueueAuthorizationRuleResultOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
func (o LookupQueueAuthorizationRuleResultOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Primary Key for the ServiceBus Queue authorization Rule.
func (o LookupQueueAuthorizationRuleResultOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.PrimaryKey }).(pulumi.StringOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) QueueId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) *string { return v.QueueId }).(pulumi.StringPtrOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) QueueName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) *string { return v.QueueName }).(pulumi.StringPtrOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) ResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) *string { return v.ResourceGroupName }).(pulumi.StringPtrOutput)
}
// The Secondary Connection String for the ServiceBus Queue authorization Rule.
func (o LookupQueueAuthorizationRuleResultOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias Secondary Connection String for the ServiceBus Namespace
func (o LookupQueueAuthorizationRuleResultOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Secondary Key for the ServiceBus Queue authorization Rule.
func (o LookupQueueAuthorizationRuleResultOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) string { return v.SecondaryKey }).(pulumi.StringOutput)
}
func (o LookupQueueAuthorizationRuleResultOutput) Send() pulumi.BoolOutput {
return o.ApplyT(func(v LookupQueueAuthorizationRuleResult) bool { return v.Send }).(pulumi.BoolOutput)
}
func init() {
pulumi.RegisterOutputType(LookupQueueAuthorizationRuleResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/topic.go | sdk/go/azure/servicebus/topic.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a ServiceBus Topic.
//
// > **Note:** Topics can only be created in Namespaces with an SKU of `Standard` or higher.
//
// ## 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/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("tfex-servicebus-topic"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
// Name: pulumi.String("tfex_servicebus_topic"),
// NamespaceId: exampleNamespace.ID(),
// PartitioningEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ServiceBus` - 2024-01-01
//
// ## Import
//
// Service Bus Topics can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:servicebus/topic:Topic example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/topics/sntopic1
// ```
type Topic struct {
pulumi.CustomResourceState
// The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle pulumi.StringPtrOutput `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls if server-side batched operations are enabled.
BatchedOperationsEnabled pulumi.BoolPtrOutput `pulumi:"batchedOperationsEnabled"`
// The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl pulumi.StringPtrOutput `pulumi:"defaultMessageTtl"`
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow pulumi.StringPtrOutput `pulumi:"duplicateDetectionHistoryTimeWindow"`
// Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
ExpressEnabled pulumi.BoolPtrOutput `pulumi:"expressEnabled"`
// Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`.
MaxMessageSizeInKilobytes pulumi.IntOutput `pulumi:"maxMessageSizeInKilobytes"`
// Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`.
MaxSizeInMegabytes pulumi.IntOutput `pulumi:"maxSizeInMegabytes"`
// Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
NamespaceId pulumi.StringOutput `pulumi:"namespaceId"`
NamespaceName pulumi.StringOutput `pulumi:"namespaceName"`
// Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. For premium namespaces, partitioning is available at namespace creation and all queues and topics in the partitioned namespace will be partitioned. Premium namespaces that have `premiumMessagingPartitions` set to `1` are not partitioned. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information.
PartitioningEnabled pulumi.BoolPtrOutput `pulumi:"partitioningEnabled"`
// Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created.
RequiresDuplicateDetection pulumi.BoolPtrOutput `pulumi:"requiresDuplicateDetection"`
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`.
Status pulumi.StringPtrOutput `pulumi:"status"`
// Boolean flag which controls whether the Topic supports ordering.
SupportOrdering pulumi.BoolPtrOutput `pulumi:"supportOrdering"`
}
// NewTopic registers a new resource with the given unique name, arguments, and options.
func NewTopic(ctx *pulumi.Context,
name string, args *TopicArgs, opts ...pulumi.ResourceOption) (*Topic, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NamespaceId == nil {
return nil, errors.New("invalid value for required argument 'NamespaceId'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:eventhub/topic:Topic"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Topic
err := ctx.RegisterResource("azure:servicebus/topic:Topic", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTopic gets an existing Topic 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 GetTopic(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TopicState, opts ...pulumi.ResourceOption) (*Topic, error) {
var resource Topic
err := ctx.ReadResource("azure:servicebus/topic:Topic", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Topic resources.
type topicState struct {
// The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle *string `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls if server-side batched operations are enabled.
BatchedOperationsEnabled *bool `pulumi:"batchedOperationsEnabled"`
// The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl *string `pulumi:"defaultMessageTtl"`
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow *string `pulumi:"duplicateDetectionHistoryTimeWindow"`
// Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
ExpressEnabled *bool `pulumi:"expressEnabled"`
// Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`.
MaxMessageSizeInKilobytes *int `pulumi:"maxMessageSizeInKilobytes"`
// Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`.
MaxSizeInMegabytes *int `pulumi:"maxSizeInMegabytes"`
// Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
NamespaceId *string `pulumi:"namespaceId"`
NamespaceName *string `pulumi:"namespaceName"`
// Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. For premium namespaces, partitioning is available at namespace creation and all queues and topics in the partitioned namespace will be partitioned. Premium namespaces that have `premiumMessagingPartitions` set to `1` are not partitioned. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information.
PartitioningEnabled *bool `pulumi:"partitioningEnabled"`
// Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created.
RequiresDuplicateDetection *bool `pulumi:"requiresDuplicateDetection"`
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`.
Status *string `pulumi:"status"`
// Boolean flag which controls whether the Topic supports ordering.
SupportOrdering *bool `pulumi:"supportOrdering"`
}
type TopicState struct {
// The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle pulumi.StringPtrInput
// Boolean flag which controls if server-side batched operations are enabled.
BatchedOperationsEnabled pulumi.BoolPtrInput
// The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl pulumi.StringPtrInput
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow pulumi.StringPtrInput
// Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
ExpressEnabled pulumi.BoolPtrInput
// Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`.
MaxMessageSizeInKilobytes pulumi.IntPtrInput
// Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`.
MaxSizeInMegabytes pulumi.IntPtrInput
// Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
NamespaceId pulumi.StringPtrInput
NamespaceName pulumi.StringPtrInput
// Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. For premium namespaces, partitioning is available at namespace creation and all queues and topics in the partitioned namespace will be partitioned. Premium namespaces that have `premiumMessagingPartitions` set to `1` are not partitioned. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information.
PartitioningEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created.
RequiresDuplicateDetection pulumi.BoolPtrInput
ResourceGroupName pulumi.StringPtrInput
// The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`.
Status pulumi.StringPtrInput
// Boolean flag which controls whether the Topic supports ordering.
SupportOrdering pulumi.BoolPtrInput
}
func (TopicState) ElementType() reflect.Type {
return reflect.TypeOf((*topicState)(nil)).Elem()
}
type topicArgs struct {
// The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle *string `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls if server-side batched operations are enabled.
BatchedOperationsEnabled *bool `pulumi:"batchedOperationsEnabled"`
// The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl *string `pulumi:"defaultMessageTtl"`
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow *string `pulumi:"duplicateDetectionHistoryTimeWindow"`
// Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
ExpressEnabled *bool `pulumi:"expressEnabled"`
// Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`.
MaxMessageSizeInKilobytes *int `pulumi:"maxMessageSizeInKilobytes"`
// Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`.
MaxSizeInMegabytes *int `pulumi:"maxSizeInMegabytes"`
// Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
NamespaceId string `pulumi:"namespaceId"`
// Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. For premium namespaces, partitioning is available at namespace creation and all queues and topics in the partitioned namespace will be partitioned. Premium namespaces that have `premiumMessagingPartitions` set to `1` are not partitioned. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information.
PartitioningEnabled *bool `pulumi:"partitioningEnabled"`
// Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created.
RequiresDuplicateDetection *bool `pulumi:"requiresDuplicateDetection"`
// The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`.
Status *string `pulumi:"status"`
// Boolean flag which controls whether the Topic supports ordering.
SupportOrdering *bool `pulumi:"supportOrdering"`
}
// The set of arguments for constructing a Topic resource.
type TopicArgs struct {
// The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`.
AutoDeleteOnIdle pulumi.StringPtrInput
// Boolean flag which controls if server-side batched operations are enabled.
BatchedOperationsEnabled pulumi.BoolPtrInput
// The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`.
DefaultMessageTtl pulumi.StringPtrInput
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow pulumi.StringPtrInput
// Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
ExpressEnabled pulumi.BoolPtrInput
// Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`.
MaxMessageSizeInKilobytes pulumi.IntPtrInput
// Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`.
MaxSizeInMegabytes pulumi.IntPtrInput
// Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
NamespaceId pulumi.StringInput
// Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. For premium namespaces, partitioning is available at namespace creation and all queues and topics in the partitioned namespace will be partitioned. Premium namespaces that have `premiumMessagingPartitions` set to `1` are not partitioned. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information.
PartitioningEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created.
RequiresDuplicateDetection pulumi.BoolPtrInput
// The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`.
Status pulumi.StringPtrInput
// Boolean flag which controls whether the Topic supports ordering.
SupportOrdering pulumi.BoolPtrInput
}
func (TopicArgs) ElementType() reflect.Type {
return reflect.TypeOf((*topicArgs)(nil)).Elem()
}
type TopicInput interface {
pulumi.Input
ToTopicOutput() TopicOutput
ToTopicOutputWithContext(ctx context.Context) TopicOutput
}
func (*Topic) ElementType() reflect.Type {
return reflect.TypeOf((**Topic)(nil)).Elem()
}
func (i *Topic) ToTopicOutput() TopicOutput {
return i.ToTopicOutputWithContext(context.Background())
}
func (i *Topic) ToTopicOutputWithContext(ctx context.Context) TopicOutput {
return pulumi.ToOutputWithContext(ctx, i).(TopicOutput)
}
// TopicArrayInput is an input type that accepts TopicArray and TopicArrayOutput values.
// You can construct a concrete instance of `TopicArrayInput` via:
//
// TopicArray{ TopicArgs{...} }
type TopicArrayInput interface {
pulumi.Input
ToTopicArrayOutput() TopicArrayOutput
ToTopicArrayOutputWithContext(context.Context) TopicArrayOutput
}
type TopicArray []TopicInput
func (TopicArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Topic)(nil)).Elem()
}
func (i TopicArray) ToTopicArrayOutput() TopicArrayOutput {
return i.ToTopicArrayOutputWithContext(context.Background())
}
func (i TopicArray) ToTopicArrayOutputWithContext(ctx context.Context) TopicArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TopicArrayOutput)
}
// TopicMapInput is an input type that accepts TopicMap and TopicMapOutput values.
// You can construct a concrete instance of `TopicMapInput` via:
//
// TopicMap{ "key": TopicArgs{...} }
type TopicMapInput interface {
pulumi.Input
ToTopicMapOutput() TopicMapOutput
ToTopicMapOutputWithContext(context.Context) TopicMapOutput
}
type TopicMap map[string]TopicInput
func (TopicMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Topic)(nil)).Elem()
}
func (i TopicMap) ToTopicMapOutput() TopicMapOutput {
return i.ToTopicMapOutputWithContext(context.Background())
}
func (i TopicMap) ToTopicMapOutputWithContext(ctx context.Context) TopicMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(TopicMapOutput)
}
type TopicOutput struct{ *pulumi.OutputState }
func (TopicOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Topic)(nil)).Elem()
}
func (o TopicOutput) ToTopicOutput() TopicOutput {
return o
}
func (o TopicOutput) ToTopicOutputWithContext(ctx context.Context) TopicOutput {
return o
}
// The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes. Defaults to `P10675199DT2H48M5.4775807S`.
func (o TopicOutput) AutoDeleteOnIdle() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.StringPtrOutput { return v.AutoDeleteOnIdle }).(pulumi.StringPtrOutput)
}
// Boolean flag which controls if server-side batched operations are enabled.
func (o TopicOutput) BatchedOperationsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.BoolPtrOutput { return v.BatchedOperationsEnabled }).(pulumi.BoolPtrOutput)
}
// The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself. Defaults to `P10675199DT2H48M5.4775807S`.
func (o TopicOutput) DefaultMessageTtl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.StringPtrOutput { return v.DefaultMessageTtl }).(pulumi.StringPtrOutput)
}
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
func (o TopicOutput) DuplicateDetectionHistoryTimeWindow() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.StringPtrOutput { return v.DuplicateDetectionHistoryTimeWindow }).(pulumi.StringPtrOutput)
}
// Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
func (o TopicOutput) ExpressEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.BoolPtrOutput { return v.ExpressEnabled }).(pulumi.BoolPtrOutput)
}
// Integer value which controls the maximum size of a message allowed on the topic for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview). Defaults to `256`.
func (o TopicOutput) MaxMessageSizeInKilobytes() pulumi.IntOutput {
return o.ApplyT(func(v *Topic) pulumi.IntOutput { return v.MaxMessageSizeInKilobytes }).(pulumi.IntOutput)
}
// Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). Defaults to `5120`.
func (o TopicOutput) MaxSizeInMegabytes() pulumi.IntOutput {
return o.ApplyT(func(v *Topic) pulumi.IntOutput { return v.MaxSizeInMegabytes }).(pulumi.IntOutput)
}
// Specifies the name of the ServiceBus Topic resource. Changing this forces a new resource to be created.
func (o TopicOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Topic) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the ServiceBus Namespace to create this topic in. Changing this forces a new resource to be created.
func (o TopicOutput) NamespaceId() pulumi.StringOutput {
return o.ApplyT(func(v *Topic) pulumi.StringOutput { return v.NamespaceId }).(pulumi.StringOutput)
}
func (o TopicOutput) NamespaceName() pulumi.StringOutput {
return o.ApplyT(func(v *Topic) pulumi.StringOutput { return v.NamespaceName }).(pulumi.StringOutput)
}
// Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers. Changing this forces a new resource to be created.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. It is not available for the Premium messaging SKU, but any previously existing partitioned entities in Premium namespaces continue to work as expected. For premium namespaces, partitioning is available at namespace creation and all queues and topics in the partitioned namespace will be partitioned. Premium namespaces that have `premiumMessagingPartitions` set to `1` are not partitioned. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning) for more information.
func (o TopicOutput) PartitioningEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.BoolPtrOutput { return v.PartitioningEnabled }).(pulumi.BoolPtrOutput)
}
// Boolean flag which controls whether the Topic requires duplicate detection. Defaults to `false`. Changing this forces a new resource to be created.
func (o TopicOutput) RequiresDuplicateDetection() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.BoolPtrOutput { return v.RequiresDuplicateDetection }).(pulumi.BoolPtrOutput)
}
func (o TopicOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Topic) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Status of the Service Bus Topic. Acceptable values are `Active` or `Disabled`. Defaults to `Active`.
func (o TopicOutput) Status() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.StringPtrOutput { return v.Status }).(pulumi.StringPtrOutput)
}
// Boolean flag which controls whether the Topic supports ordering.
func (o TopicOutput) SupportOrdering() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.BoolPtrOutput { return v.SupportOrdering }).(pulumi.BoolPtrOutput)
}
type TopicArrayOutput struct{ *pulumi.OutputState }
func (TopicArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Topic)(nil)).Elem()
}
func (o TopicArrayOutput) ToTopicArrayOutput() TopicArrayOutput {
return o
}
func (o TopicArrayOutput) ToTopicArrayOutputWithContext(ctx context.Context) TopicArrayOutput {
return o
}
func (o TopicArrayOutput) Index(i pulumi.IntInput) TopicOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Topic {
return vs[0].([]*Topic)[vs[1].(int)]
}).(TopicOutput)
}
type TopicMapOutput struct{ *pulumi.OutputState }
func (TopicMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Topic)(nil)).Elem()
}
func (o TopicMapOutput) ToTopicMapOutput() TopicMapOutput {
return o
}
func (o TopicMapOutput) ToTopicMapOutputWithContext(ctx context.Context) TopicMapOutput {
return o
}
func (o TopicMapOutput) MapIndex(k pulumi.StringInput) TopicOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Topic {
return vs[0].(map[string]*Topic)[vs[1].(string)]
}).(TopicOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TopicInput)(nil)).Elem(), &Topic{})
pulumi.RegisterInputType(reflect.TypeOf((*TopicArrayInput)(nil)).Elem(), TopicArray{})
pulumi.RegisterInputType(reflect.TypeOf((*TopicMapInput)(nil)).Elem(), TopicMap{})
pulumi.RegisterOutputType(TopicOutput{})
pulumi.RegisterOutputType(TopicArrayOutput{})
pulumi.RegisterOutputType(TopicMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/subscriptionRule.go | sdk/go/azure/servicebus/subscriptionRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a ServiceBus Subscription Rule.
//
// ## Example Usage
//
// ### SQL Filter)
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "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("tfex-servicebus-subscription-rule-sql"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
// Name: pulumi.String("tfex_servicebus_topic"),
// NamespaceId: exampleNamespace.ID(),
// EnablePartitioning: true,
// })
// if err != nil {
// return err
// }
// exampleSubscription, err := servicebus.NewSubscription(ctx, "example", &servicebus.SubscriptionArgs{
// Name: pulumi.String("tfex_servicebus_subscription"),
// TopicId: exampleTopic.ID(),
// MaxDeliveryCount: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewSubscriptionRule(ctx, "example", &servicebus.SubscriptionRuleArgs{
// Name: pulumi.String("tfex_servicebus_rule"),
// SubscriptionId: exampleSubscription.ID(),
// FilterType: pulumi.String("SqlFilter"),
// SqlFilter: pulumi.String("colour = 'red'"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### Correlation Filter)
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "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("tfex-servicebus-subscription-rule-cor"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// exampleTopic, err := servicebus.NewTopic(ctx, "example", &servicebus.TopicArgs{
// Name: pulumi.String("tfex_servicebus_topic"),
// NamespaceId: exampleNamespace.ID(),
// EnablePartitioning: true,
// })
// if err != nil {
// return err
// }
// exampleSubscription, err := servicebus.NewSubscription(ctx, "example", &servicebus.SubscriptionArgs{
// Name: pulumi.String("tfex_servicebus_subscription"),
// TopicId: exampleTopic.ID(),
// MaxDeliveryCount: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewSubscriptionRule(ctx, "example", &servicebus.SubscriptionRuleArgs{
// Name: pulumi.String("tfex_servicebus_rule"),
// SubscriptionId: exampleSubscription.ID(),
// FilterType: pulumi.String("CorrelationFilter"),
// CorrelationFilter: &servicebus.SubscriptionRuleCorrelationFilterArgs{
// CorrelationId: pulumi.String("high"),
// Label: pulumi.String("red"),
// Properties: pulumi.StringMap{
// "customProperty": pulumi.String("value"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ServiceBus` - 2024-01-01
//
// ## Import
//
// Service Bus Subscription Rule can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:servicebus/subscriptionRule:SubscriptionRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/topics/sntopic1/subscriptions/sbsub1/rules/sbrule1
// ```
type SubscriptionRule struct {
pulumi.CustomResourceState
// Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
Action pulumi.StringPtrOutput `pulumi:"action"`
// A `correlationFilter` block as documented below to be evaluated against a BrokeredMessage. Required when `filterType` is set to `CorrelationFilter`.
CorrelationFilter SubscriptionRuleCorrelationFilterPtrOutput `pulumi:"correlationFilter"`
// Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
FilterType pulumi.StringOutput `pulumi:"filterType"`
// Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filterType` is set to `SqlFilter`.
SqlFilter pulumi.StringPtrOutput `pulumi:"sqlFilter"`
SqlFilterCompatibilityLevel pulumi.IntOutput `pulumi:"sqlFilterCompatibilityLevel"`
// The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"`
}
// NewSubscriptionRule registers a new resource with the given unique name, arguments, and options.
func NewSubscriptionRule(ctx *pulumi.Context,
name string, args *SubscriptionRuleArgs, opts ...pulumi.ResourceOption) (*SubscriptionRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.FilterType == nil {
return nil, errors.New("invalid value for required argument 'FilterType'")
}
if args.SubscriptionId == nil {
return nil, errors.New("invalid value for required argument 'SubscriptionId'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:eventhub/subscriptionRule:SubscriptionRule"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource SubscriptionRule
err := ctx.RegisterResource("azure:servicebus/subscriptionRule:SubscriptionRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSubscriptionRule gets an existing SubscriptionRule 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 GetSubscriptionRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SubscriptionRuleState, opts ...pulumi.ResourceOption) (*SubscriptionRule, error) {
var resource SubscriptionRule
err := ctx.ReadResource("azure:servicebus/subscriptionRule:SubscriptionRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SubscriptionRule resources.
type subscriptionRuleState struct {
// Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
Action *string `pulumi:"action"`
// A `correlationFilter` block as documented below to be evaluated against a BrokeredMessage. Required when `filterType` is set to `CorrelationFilter`.
CorrelationFilter *SubscriptionRuleCorrelationFilter `pulumi:"correlationFilter"`
// Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
FilterType *string `pulumi:"filterType"`
// Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filterType` is set to `SqlFilter`.
SqlFilter *string `pulumi:"sqlFilter"`
SqlFilterCompatibilityLevel *int `pulumi:"sqlFilterCompatibilityLevel"`
// The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
SubscriptionId *string `pulumi:"subscriptionId"`
}
type SubscriptionRuleState struct {
// Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
Action pulumi.StringPtrInput
// A `correlationFilter` block as documented below to be evaluated against a BrokeredMessage. Required when `filterType` is set to `CorrelationFilter`.
CorrelationFilter SubscriptionRuleCorrelationFilterPtrInput
// Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
FilterType pulumi.StringPtrInput
// Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filterType` is set to `SqlFilter`.
SqlFilter pulumi.StringPtrInput
SqlFilterCompatibilityLevel pulumi.IntPtrInput
// The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
SubscriptionId pulumi.StringPtrInput
}
func (SubscriptionRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*subscriptionRuleState)(nil)).Elem()
}
type subscriptionRuleArgs struct {
// Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
Action *string `pulumi:"action"`
// A `correlationFilter` block as documented below to be evaluated against a BrokeredMessage. Required when `filterType` is set to `CorrelationFilter`.
CorrelationFilter *SubscriptionRuleCorrelationFilter `pulumi:"correlationFilter"`
// Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
FilterType string `pulumi:"filterType"`
// Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filterType` is set to `SqlFilter`.
SqlFilter *string `pulumi:"sqlFilter"`
// The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
SubscriptionId string `pulumi:"subscriptionId"`
}
// The set of arguments for constructing a SubscriptionRule resource.
type SubscriptionRuleArgs struct {
// Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
Action pulumi.StringPtrInput
// A `correlationFilter` block as documented below to be evaluated against a BrokeredMessage. Required when `filterType` is set to `CorrelationFilter`.
CorrelationFilter SubscriptionRuleCorrelationFilterPtrInput
// Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
FilterType pulumi.StringInput
// Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filterType` is set to `SqlFilter`.
SqlFilter pulumi.StringPtrInput
// The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
SubscriptionId pulumi.StringInput
}
func (SubscriptionRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*subscriptionRuleArgs)(nil)).Elem()
}
type SubscriptionRuleInput interface {
pulumi.Input
ToSubscriptionRuleOutput() SubscriptionRuleOutput
ToSubscriptionRuleOutputWithContext(ctx context.Context) SubscriptionRuleOutput
}
func (*SubscriptionRule) ElementType() reflect.Type {
return reflect.TypeOf((**SubscriptionRule)(nil)).Elem()
}
func (i *SubscriptionRule) ToSubscriptionRuleOutput() SubscriptionRuleOutput {
return i.ToSubscriptionRuleOutputWithContext(context.Background())
}
func (i *SubscriptionRule) ToSubscriptionRuleOutputWithContext(ctx context.Context) SubscriptionRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionRuleOutput)
}
// SubscriptionRuleArrayInput is an input type that accepts SubscriptionRuleArray and SubscriptionRuleArrayOutput values.
// You can construct a concrete instance of `SubscriptionRuleArrayInput` via:
//
// SubscriptionRuleArray{ SubscriptionRuleArgs{...} }
type SubscriptionRuleArrayInput interface {
pulumi.Input
ToSubscriptionRuleArrayOutput() SubscriptionRuleArrayOutput
ToSubscriptionRuleArrayOutputWithContext(context.Context) SubscriptionRuleArrayOutput
}
type SubscriptionRuleArray []SubscriptionRuleInput
func (SubscriptionRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SubscriptionRule)(nil)).Elem()
}
func (i SubscriptionRuleArray) ToSubscriptionRuleArrayOutput() SubscriptionRuleArrayOutput {
return i.ToSubscriptionRuleArrayOutputWithContext(context.Background())
}
func (i SubscriptionRuleArray) ToSubscriptionRuleArrayOutputWithContext(ctx context.Context) SubscriptionRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionRuleArrayOutput)
}
// SubscriptionRuleMapInput is an input type that accepts SubscriptionRuleMap and SubscriptionRuleMapOutput values.
// You can construct a concrete instance of `SubscriptionRuleMapInput` via:
//
// SubscriptionRuleMap{ "key": SubscriptionRuleArgs{...} }
type SubscriptionRuleMapInput interface {
pulumi.Input
ToSubscriptionRuleMapOutput() SubscriptionRuleMapOutput
ToSubscriptionRuleMapOutputWithContext(context.Context) SubscriptionRuleMapOutput
}
type SubscriptionRuleMap map[string]SubscriptionRuleInput
func (SubscriptionRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SubscriptionRule)(nil)).Elem()
}
func (i SubscriptionRuleMap) ToSubscriptionRuleMapOutput() SubscriptionRuleMapOutput {
return i.ToSubscriptionRuleMapOutputWithContext(context.Background())
}
func (i SubscriptionRuleMap) ToSubscriptionRuleMapOutputWithContext(ctx context.Context) SubscriptionRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SubscriptionRuleMapOutput)
}
type SubscriptionRuleOutput struct{ *pulumi.OutputState }
func (SubscriptionRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SubscriptionRule)(nil)).Elem()
}
func (o SubscriptionRuleOutput) ToSubscriptionRuleOutput() SubscriptionRuleOutput {
return o
}
func (o SubscriptionRuleOutput) ToSubscriptionRuleOutputWithContext(ctx context.Context) SubscriptionRuleOutput {
return o
}
// Represents set of actions written in SQL language-based syntax that is performed against a BrokeredMessage.
func (o SubscriptionRuleOutput) Action() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SubscriptionRule) pulumi.StringPtrOutput { return v.Action }).(pulumi.StringPtrOutput)
}
// A `correlationFilter` block as documented below to be evaluated against a BrokeredMessage. Required when `filterType` is set to `CorrelationFilter`.
func (o SubscriptionRuleOutput) CorrelationFilter() SubscriptionRuleCorrelationFilterPtrOutput {
return o.ApplyT(func(v *SubscriptionRule) SubscriptionRuleCorrelationFilterPtrOutput { return v.CorrelationFilter }).(SubscriptionRuleCorrelationFilterPtrOutput)
}
// Type of filter to be applied to a BrokeredMessage. Possible values are `SqlFilter` and `CorrelationFilter`.
func (o SubscriptionRuleOutput) FilterType() pulumi.StringOutput {
return o.ApplyT(func(v *SubscriptionRule) pulumi.StringOutput { return v.FilterType }).(pulumi.StringOutput)
}
// Specifies the name of the ServiceBus Subscription Rule. Changing this forces a new resource to be created.
func (o SubscriptionRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SubscriptionRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Represents a filter written in SQL language-based syntax that to be evaluated against a BrokeredMessage. Required when `filterType` is set to `SqlFilter`.
func (o SubscriptionRuleOutput) SqlFilter() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SubscriptionRule) pulumi.StringPtrOutput { return v.SqlFilter }).(pulumi.StringPtrOutput)
}
func (o SubscriptionRuleOutput) SqlFilterCompatibilityLevel() pulumi.IntOutput {
return o.ApplyT(func(v *SubscriptionRule) pulumi.IntOutput { return v.SqlFilterCompatibilityLevel }).(pulumi.IntOutput)
}
// The ID of the ServiceBus Subscription in which this Rule should be created. Changing this forces a new resource to be created.
func (o SubscriptionRuleOutput) SubscriptionId() pulumi.StringOutput {
return o.ApplyT(func(v *SubscriptionRule) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput)
}
type SubscriptionRuleArrayOutput struct{ *pulumi.OutputState }
func (SubscriptionRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SubscriptionRule)(nil)).Elem()
}
func (o SubscriptionRuleArrayOutput) ToSubscriptionRuleArrayOutput() SubscriptionRuleArrayOutput {
return o
}
func (o SubscriptionRuleArrayOutput) ToSubscriptionRuleArrayOutputWithContext(ctx context.Context) SubscriptionRuleArrayOutput {
return o
}
func (o SubscriptionRuleArrayOutput) Index(i pulumi.IntInput) SubscriptionRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SubscriptionRule {
return vs[0].([]*SubscriptionRule)[vs[1].(int)]
}).(SubscriptionRuleOutput)
}
type SubscriptionRuleMapOutput struct{ *pulumi.OutputState }
func (SubscriptionRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SubscriptionRule)(nil)).Elem()
}
func (o SubscriptionRuleMapOutput) ToSubscriptionRuleMapOutput() SubscriptionRuleMapOutput {
return o
}
func (o SubscriptionRuleMapOutput) ToSubscriptionRuleMapOutputWithContext(ctx context.Context) SubscriptionRuleMapOutput {
return o
}
func (o SubscriptionRuleMapOutput) MapIndex(k pulumi.StringInput) SubscriptionRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SubscriptionRule {
return vs[0].(map[string]*SubscriptionRule)[vs[1].(string)]
}).(SubscriptionRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionRuleInput)(nil)).Elem(), &SubscriptionRule{})
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionRuleArrayInput)(nil)).Elem(), SubscriptionRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SubscriptionRuleMapInput)(nil)).Elem(), SubscriptionRuleMap{})
pulumi.RegisterOutputType(SubscriptionRuleOutput{})
pulumi.RegisterOutputType(SubscriptionRuleArrayOutput{})
pulumi.RegisterOutputType(SubscriptionRuleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/namespaceAuthorizationRule.go | sdk/go/azure/servicebus/namespaceAuthorizationRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a ServiceBus Namespace authorization Rule within a ServiceBus.
//
// ## 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/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("my-servicebus"),
// Location: pulumi.String("West US"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewNamespaceAuthorizationRule(ctx, "example", &servicebus.NamespaceAuthorizationRuleArgs{
// Name: pulumi.String("examplerule"),
// NamespaceId: exampleNamespace.ID(),
// Listen: pulumi.Bool(true),
// Send: pulumi.Bool(true),
// Manage: 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.ServiceBus` - 2024-01-01
//
// ## Import
//
// ServiceBus Namespace authorization rules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:servicebus/namespaceAuthorizationRule:NamespaceAuthorizationRule rule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ServiceBus/namespaces/namespace1/authorizationRules/rule1
// ```
type NamespaceAuthorizationRule struct {
pulumi.CustomResourceState
// Grants listen access to this Authorization Rule. Defaults to `false`.
Listen pulumi.BoolPtrOutput `pulumi:"listen"`
// Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrOutput `pulumi:"manage"`
// Specifies the name of the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the ID of the ServiceBus Namespace. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
NamespaceId pulumi.StringOutput `pulumi:"namespaceId"`
// The Primary Connection String for the ServiceBus Namespace authorization Rule.
PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias pulumi.StringOutput `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the ServiceBus Namespace authorization Rule.
PrimaryKey pulumi.StringOutput `pulumi:"primaryKey"`
// The Secondary Connection String for the ServiceBus Namespace authorization Rule.
SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias pulumi.StringOutput `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the ServiceBus Namespace authorization Rule.
SecondaryKey pulumi.StringOutput `pulumi:"secondaryKey"`
// Grants send access to this Authorization Rule. Defaults to `false`.
Send pulumi.BoolPtrOutput `pulumi:"send"`
}
// NewNamespaceAuthorizationRule registers a new resource with the given unique name, arguments, and options.
func NewNamespaceAuthorizationRule(ctx *pulumi.Context,
name string, args *NamespaceAuthorizationRuleArgs, opts ...pulumi.ResourceOption) (*NamespaceAuthorizationRule, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NamespaceId == nil {
return nil, errors.New("invalid value for required argument 'NamespaceId'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:eventhub/namespaceAuthorizationRule:NamespaceAuthorizationRule"),
},
})
opts = append(opts, aliases)
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryConnectionString",
"primaryConnectionStringAlias",
"primaryKey",
"secondaryConnectionString",
"secondaryConnectionStringAlias",
"secondaryKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource NamespaceAuthorizationRule
err := ctx.RegisterResource("azure:servicebus/namespaceAuthorizationRule:NamespaceAuthorizationRule", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNamespaceAuthorizationRule gets an existing NamespaceAuthorizationRule 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 GetNamespaceAuthorizationRule(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NamespaceAuthorizationRuleState, opts ...pulumi.ResourceOption) (*NamespaceAuthorizationRule, error) {
var resource NamespaceAuthorizationRule
err := ctx.ReadResource("azure:servicebus/namespaceAuthorizationRule:NamespaceAuthorizationRule", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NamespaceAuthorizationRule resources.
type namespaceAuthorizationRuleState struct {
// Grants listen access to this Authorization Rule. Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the ServiceBus Namespace. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
NamespaceId *string `pulumi:"namespaceId"`
// The Primary Connection String for the ServiceBus Namespace authorization Rule.
PrimaryConnectionString *string `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias *string `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the ServiceBus Namespace authorization Rule.
PrimaryKey *string `pulumi:"primaryKey"`
// The Secondary Connection String for the ServiceBus Namespace authorization Rule.
SecondaryConnectionString *string `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias *string `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the ServiceBus Namespace authorization Rule.
SecondaryKey *string `pulumi:"secondaryKey"`
// Grants send access to this Authorization Rule. Defaults to `false`.
Send *bool `pulumi:"send"`
}
type NamespaceAuthorizationRuleState struct {
// Grants listen access to this Authorization Rule. Defaults to `false`.
Listen pulumi.BoolPtrInput
// Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the ServiceBus Namespace. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
NamespaceId pulumi.StringPtrInput
// The Primary Connection String for the ServiceBus Namespace authorization Rule.
PrimaryConnectionString pulumi.StringPtrInput
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias pulumi.StringPtrInput
// The Primary Key for the ServiceBus Namespace authorization Rule.
PrimaryKey pulumi.StringPtrInput
// The Secondary Connection String for the ServiceBus Namespace authorization Rule.
SecondaryConnectionString pulumi.StringPtrInput
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias pulumi.StringPtrInput
// The Secondary Key for the ServiceBus Namespace authorization Rule.
SecondaryKey pulumi.StringPtrInput
// Grants send access to this Authorization Rule. Defaults to `false`.
Send pulumi.BoolPtrInput
}
func (NamespaceAuthorizationRuleState) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceAuthorizationRuleState)(nil)).Elem()
}
type namespaceAuthorizationRuleArgs struct {
// Grants listen access to this Authorization Rule. Defaults to `false`.
Listen *bool `pulumi:"listen"`
// Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage *bool `pulumi:"manage"`
// Specifies the name of the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the ServiceBus Namespace. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
NamespaceId string `pulumi:"namespaceId"`
// Grants send access to this Authorization Rule. Defaults to `false`.
Send *bool `pulumi:"send"`
}
// The set of arguments for constructing a NamespaceAuthorizationRule resource.
type NamespaceAuthorizationRuleArgs struct {
// Grants listen access to this Authorization Rule. Defaults to `false`.
Listen pulumi.BoolPtrInput
// Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
Manage pulumi.BoolPtrInput
// Specifies the name of the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the ServiceBus Namespace. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
NamespaceId pulumi.StringInput
// Grants send access to this Authorization Rule. Defaults to `false`.
Send pulumi.BoolPtrInput
}
func (NamespaceAuthorizationRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceAuthorizationRuleArgs)(nil)).Elem()
}
type NamespaceAuthorizationRuleInput interface {
pulumi.Input
ToNamespaceAuthorizationRuleOutput() NamespaceAuthorizationRuleOutput
ToNamespaceAuthorizationRuleOutputWithContext(ctx context.Context) NamespaceAuthorizationRuleOutput
}
func (*NamespaceAuthorizationRule) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceAuthorizationRule)(nil)).Elem()
}
func (i *NamespaceAuthorizationRule) ToNamespaceAuthorizationRuleOutput() NamespaceAuthorizationRuleOutput {
return i.ToNamespaceAuthorizationRuleOutputWithContext(context.Background())
}
func (i *NamespaceAuthorizationRule) ToNamespaceAuthorizationRuleOutputWithContext(ctx context.Context) NamespaceAuthorizationRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceAuthorizationRuleOutput)
}
// NamespaceAuthorizationRuleArrayInput is an input type that accepts NamespaceAuthorizationRuleArray and NamespaceAuthorizationRuleArrayOutput values.
// You can construct a concrete instance of `NamespaceAuthorizationRuleArrayInput` via:
//
// NamespaceAuthorizationRuleArray{ NamespaceAuthorizationRuleArgs{...} }
type NamespaceAuthorizationRuleArrayInput interface {
pulumi.Input
ToNamespaceAuthorizationRuleArrayOutput() NamespaceAuthorizationRuleArrayOutput
ToNamespaceAuthorizationRuleArrayOutputWithContext(context.Context) NamespaceAuthorizationRuleArrayOutput
}
type NamespaceAuthorizationRuleArray []NamespaceAuthorizationRuleInput
func (NamespaceAuthorizationRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NamespaceAuthorizationRule)(nil)).Elem()
}
func (i NamespaceAuthorizationRuleArray) ToNamespaceAuthorizationRuleArrayOutput() NamespaceAuthorizationRuleArrayOutput {
return i.ToNamespaceAuthorizationRuleArrayOutputWithContext(context.Background())
}
func (i NamespaceAuthorizationRuleArray) ToNamespaceAuthorizationRuleArrayOutputWithContext(ctx context.Context) NamespaceAuthorizationRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceAuthorizationRuleArrayOutput)
}
// NamespaceAuthorizationRuleMapInput is an input type that accepts NamespaceAuthorizationRuleMap and NamespaceAuthorizationRuleMapOutput values.
// You can construct a concrete instance of `NamespaceAuthorizationRuleMapInput` via:
//
// NamespaceAuthorizationRuleMap{ "key": NamespaceAuthorizationRuleArgs{...} }
type NamespaceAuthorizationRuleMapInput interface {
pulumi.Input
ToNamespaceAuthorizationRuleMapOutput() NamespaceAuthorizationRuleMapOutput
ToNamespaceAuthorizationRuleMapOutputWithContext(context.Context) NamespaceAuthorizationRuleMapOutput
}
type NamespaceAuthorizationRuleMap map[string]NamespaceAuthorizationRuleInput
func (NamespaceAuthorizationRuleMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NamespaceAuthorizationRule)(nil)).Elem()
}
func (i NamespaceAuthorizationRuleMap) ToNamespaceAuthorizationRuleMapOutput() NamespaceAuthorizationRuleMapOutput {
return i.ToNamespaceAuthorizationRuleMapOutputWithContext(context.Background())
}
func (i NamespaceAuthorizationRuleMap) ToNamespaceAuthorizationRuleMapOutputWithContext(ctx context.Context) NamespaceAuthorizationRuleMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NamespaceAuthorizationRuleMapOutput)
}
type NamespaceAuthorizationRuleOutput struct{ *pulumi.OutputState }
func (NamespaceAuthorizationRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NamespaceAuthorizationRule)(nil)).Elem()
}
func (o NamespaceAuthorizationRuleOutput) ToNamespaceAuthorizationRuleOutput() NamespaceAuthorizationRuleOutput {
return o
}
func (o NamespaceAuthorizationRuleOutput) ToNamespaceAuthorizationRuleOutputWithContext(ctx context.Context) NamespaceAuthorizationRuleOutput {
return o
}
// Grants listen access to this Authorization Rule. Defaults to `false`.
func (o NamespaceAuthorizationRuleOutput) Listen() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.BoolPtrOutput { return v.Listen }).(pulumi.BoolPtrOutput)
}
// Grants manage access to this Authorization Rule. When this property is `true` - both `listen` and `send` must be too. Defaults to `false`.
func (o NamespaceAuthorizationRuleOutput) Manage() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.BoolPtrOutput { return v.Manage }).(pulumi.BoolPtrOutput)
}
// Specifies the name of the ServiceBus Namespace Authorization Rule resource. Changing this forces a new resource to be created.
func (o NamespaceAuthorizationRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the ID of the ServiceBus Namespace. Changing this forces a new resource to be created.
//
// > **Note:** At least one of the 3 permissions below needs to be set.
func (o NamespaceAuthorizationRuleOutput) NamespaceId() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.NamespaceId }).(pulumi.StringOutput)
}
// The Primary Connection String for the ServiceBus Namespace authorization Rule.
func (o NamespaceAuthorizationRuleOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
func (o NamespaceAuthorizationRuleOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Primary Key for the ServiceBus Namespace authorization Rule.
func (o NamespaceAuthorizationRuleOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.PrimaryKey }).(pulumi.StringOutput)
}
// The Secondary Connection String for the ServiceBus Namespace authorization Rule.
func (o NamespaceAuthorizationRuleOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias Secondary Connection String for the ServiceBus Namespace
func (o NamespaceAuthorizationRuleOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Secondary Key for the ServiceBus Namespace authorization Rule.
func (o NamespaceAuthorizationRuleOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.StringOutput { return v.SecondaryKey }).(pulumi.StringOutput)
}
// Grants send access to this Authorization Rule. Defaults to `false`.
func (o NamespaceAuthorizationRuleOutput) Send() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *NamespaceAuthorizationRule) pulumi.BoolPtrOutput { return v.Send }).(pulumi.BoolPtrOutput)
}
type NamespaceAuthorizationRuleArrayOutput struct{ *pulumi.OutputState }
func (NamespaceAuthorizationRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NamespaceAuthorizationRule)(nil)).Elem()
}
func (o NamespaceAuthorizationRuleArrayOutput) ToNamespaceAuthorizationRuleArrayOutput() NamespaceAuthorizationRuleArrayOutput {
return o
}
func (o NamespaceAuthorizationRuleArrayOutput) ToNamespaceAuthorizationRuleArrayOutputWithContext(ctx context.Context) NamespaceAuthorizationRuleArrayOutput {
return o
}
func (o NamespaceAuthorizationRuleArrayOutput) Index(i pulumi.IntInput) NamespaceAuthorizationRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *NamespaceAuthorizationRule {
return vs[0].([]*NamespaceAuthorizationRule)[vs[1].(int)]
}).(NamespaceAuthorizationRuleOutput)
}
type NamespaceAuthorizationRuleMapOutput struct{ *pulumi.OutputState }
func (NamespaceAuthorizationRuleMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NamespaceAuthorizationRule)(nil)).Elem()
}
func (o NamespaceAuthorizationRuleMapOutput) ToNamespaceAuthorizationRuleMapOutput() NamespaceAuthorizationRuleMapOutput {
return o
}
func (o NamespaceAuthorizationRuleMapOutput) ToNamespaceAuthorizationRuleMapOutputWithContext(ctx context.Context) NamespaceAuthorizationRuleMapOutput {
return o
}
func (o NamespaceAuthorizationRuleMapOutput) MapIndex(k pulumi.StringInput) NamespaceAuthorizationRuleOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *NamespaceAuthorizationRule {
return vs[0].(map[string]*NamespaceAuthorizationRule)[vs[1].(string)]
}).(NamespaceAuthorizationRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceAuthorizationRuleInput)(nil)).Elem(), &NamespaceAuthorizationRule{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceAuthorizationRuleArrayInput)(nil)).Elem(), NamespaceAuthorizationRuleArray{})
pulumi.RegisterInputType(reflect.TypeOf((*NamespaceAuthorizationRuleMapInput)(nil)).Elem(), NamespaceAuthorizationRuleMap{})
pulumi.RegisterOutputType(NamespaceAuthorizationRuleOutput{})
pulumi.RegisterOutputType(NamespaceAuthorizationRuleArrayOutput{})
pulumi.RegisterOutputType(NamespaceAuthorizationRuleMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/getTopic.go | sdk/go/azure/servicebus/getTopic.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
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 Service Bus Topic.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := servicebus.LookupTopic(ctx, &servicebus.LookupTopicArgs{
// Name: "existing",
// NamespaceId: pulumi.StringRef("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.ServiceBus` - 2024-01-01
func LookupTopic(ctx *pulumi.Context, args *LookupTopicArgs, opts ...pulumi.InvokeOption) (*LookupTopicResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupTopicResult
err := ctx.Invoke("azure:servicebus/getTopic:getTopic", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getTopic.
type LookupTopicArgs struct {
// The name of this Service Bus Topic.
Name string `pulumi:"name"`
// The ID of the ServiceBus Namespace where the Service Bus Topic exists.
NamespaceId *string `pulumi:"namespaceId"`
// Deprecated: `namespaceName` will be removed in favour of the `namespaceId` property in v5.0 of the AzureRM Provider.
NamespaceName *string `pulumi:"namespaceName"`
// Deprecated: `resourceGroupName` will be removed in favour of the `namespaceId` property in v5.0 of the AzureRM Provider.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getTopic.
type LookupTopicResult struct {
// The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes.
AutoDeleteOnIdle string `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls if server-side batched operations are enabled.
BatchedOperationsEnabled bool `pulumi:"batchedOperationsEnabled"`
// The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself.
DefaultMessageTtl string `pulumi:"defaultMessageTtl"`
// The ISO 8601 timespan duration during which duplicates can be detected.
DuplicateDetectionHistoryTimeWindow string `pulumi:"duplicateDetectionHistoryTimeWindow"`
EnableBatchedOperations bool `pulumi:"enableBatchedOperations"`
EnableExpress bool `pulumi:"enableExpress"`
EnablePartitioning bool `pulumi:"enablePartitioning"`
// Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
ExpressEnabled bool `pulumi:"expressEnabled"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas).
MaxSizeInMegabytes int `pulumi:"maxSizeInMegabytes"`
Name string `pulumi:"name"`
NamespaceId *string `pulumi:"namespaceId"`
// Deprecated: `namespaceName` will be removed in favour of the `namespaceId` property in v5.0 of the AzureRM Provider.
NamespaceName *string `pulumi:"namespaceName"`
// Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers.
PartitioningEnabled bool `pulumi:"partitioningEnabled"`
// Boolean flag which controls whether the Topic requires duplicate detection.
RequiresDuplicateDetection bool `pulumi:"requiresDuplicateDetection"`
// Deprecated: `resourceGroupName` will be removed in favour of the `namespaceId` property in v5.0 of the AzureRM Provider.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Status of the Service Bus Topic. Acceptable values are Active or Disabled.
Status string `pulumi:"status"`
// Boolean flag which controls whether the Topic supports ordering.
SupportOrdering bool `pulumi:"supportOrdering"`
}
func LookupTopicOutput(ctx *pulumi.Context, args LookupTopicOutputArgs, opts ...pulumi.InvokeOption) LookupTopicResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupTopicResultOutput, error) {
args := v.(LookupTopicArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:servicebus/getTopic:getTopic", args, LookupTopicResultOutput{}, options).(LookupTopicResultOutput), nil
}).(LookupTopicResultOutput)
}
// A collection of arguments for invoking getTopic.
type LookupTopicOutputArgs struct {
// The name of this Service Bus Topic.
Name pulumi.StringInput `pulumi:"name"`
// The ID of the ServiceBus Namespace where the Service Bus Topic exists.
NamespaceId pulumi.StringPtrInput `pulumi:"namespaceId"`
// Deprecated: `namespaceName` will be removed in favour of the `namespaceId` property in v5.0 of the AzureRM Provider.
NamespaceName pulumi.StringPtrInput `pulumi:"namespaceName"`
// Deprecated: `resourceGroupName` will be removed in favour of the `namespaceId` property in v5.0 of the AzureRM Provider.
ResourceGroupName pulumi.StringPtrInput `pulumi:"resourceGroupName"`
}
func (LookupTopicOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTopicArgs)(nil)).Elem()
}
// A collection of values returned by getTopic.
type LookupTopicResultOutput struct{ *pulumi.OutputState }
func (LookupTopicResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTopicResult)(nil)).Elem()
}
func (o LookupTopicResultOutput) ToLookupTopicResultOutput() LookupTopicResultOutput {
return o
}
func (o LookupTopicResultOutput) ToLookupTopicResultOutputWithContext(ctx context.Context) LookupTopicResultOutput {
return o
}
// The ISO 8601 timespan duration of the idle interval after which the Topic is automatically deleted, minimum of 5 minutes.
func (o LookupTopicResultOutput) AutoDeleteOnIdle() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicResult) string { return v.AutoDeleteOnIdle }).(pulumi.StringOutput)
}
// Boolean flag which controls if server-side batched operations are enabled.
func (o LookupTopicResultOutput) BatchedOperationsEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTopicResult) bool { return v.BatchedOperationsEnabled }).(pulumi.BoolOutput)
}
// The ISO 8601 timespan duration of TTL of messages sent to this topic if no TTL value is set on the message itself.
func (o LookupTopicResultOutput) DefaultMessageTtl() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicResult) string { return v.DefaultMessageTtl }).(pulumi.StringOutput)
}
// The ISO 8601 timespan duration during which duplicates can be detected.
func (o LookupTopicResultOutput) DuplicateDetectionHistoryTimeWindow() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicResult) string { return v.DuplicateDetectionHistoryTimeWindow }).(pulumi.StringOutput)
}
func (o LookupTopicResultOutput) EnableBatchedOperations() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTopicResult) bool { return v.EnableBatchedOperations }).(pulumi.BoolOutput)
}
func (o LookupTopicResultOutput) EnableExpress() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTopicResult) bool { return v.EnableExpress }).(pulumi.BoolOutput)
}
func (o LookupTopicResultOutput) EnablePartitioning() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTopicResult) bool { return v.EnablePartitioning }).(pulumi.BoolOutput)
}
// Boolean flag which controls whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage.
func (o LookupTopicResultOutput) ExpressEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTopicResult) bool { return v.ExpressEnabled }).(pulumi.BoolOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupTopicResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicResult) string { return v.Id }).(pulumi.StringOutput)
}
// Integer value which controls the size of memory allocated for the topic. For supported values see the "Queue/topic size" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas).
func (o LookupTopicResultOutput) MaxSizeInMegabytes() pulumi.IntOutput {
return o.ApplyT(func(v LookupTopicResult) int { return v.MaxSizeInMegabytes }).(pulumi.IntOutput)
}
func (o LookupTopicResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupTopicResultOutput) NamespaceId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupTopicResult) *string { return v.NamespaceId }).(pulumi.StringPtrOutput)
}
// Deprecated: `namespaceName` will be removed in favour of the `namespaceId` property in v5.0 of the AzureRM Provider.
func (o LookupTopicResultOutput) NamespaceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupTopicResult) *string { return v.NamespaceName }).(pulumi.StringPtrOutput)
}
// Boolean flag which controls whether to enable the topic to be partitioned across multiple message brokers.
func (o LookupTopicResultOutput) PartitioningEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTopicResult) bool { return v.PartitioningEnabled }).(pulumi.BoolOutput)
}
// Boolean flag which controls whether the Topic requires duplicate detection.
func (o LookupTopicResultOutput) RequiresDuplicateDetection() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTopicResult) bool { return v.RequiresDuplicateDetection }).(pulumi.BoolOutput)
}
// Deprecated: `resourceGroupName` will be removed in favour of the `namespaceId` property in v5.0 of the AzureRM Provider.
func (o LookupTopicResultOutput) ResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupTopicResult) *string { return v.ResourceGroupName }).(pulumi.StringPtrOutput)
}
// The Status of the Service Bus Topic. Acceptable values are Active or Disabled.
func (o LookupTopicResultOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicResult) string { return v.Status }).(pulumi.StringOutput)
}
// Boolean flag which controls whether the Topic supports ordering.
func (o LookupTopicResultOutput) SupportOrdering() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTopicResult) bool { return v.SupportOrdering }).(pulumi.BoolOutput)
}
func init() {
pulumi.RegisterOutputType(LookupTopicResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/getTopicAuthorizationRule.go | sdk/go/azure/servicebus/getTopicAuthorizationRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about a ServiceBus Topic Authorization Rule within a ServiceBus Topic.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 {
// _, err := servicebus.LookupTopicAuthorizationRule(ctx, &servicebus.LookupTopicAuthorizationRuleArgs{
// Name: "example-tfex_name",
// ResourceGroupName: pulumi.StringRef("example-resources"),
// NamespaceName: pulumi.StringRef("example-namespace"),
// TopicName: pulumi.StringRef("example-servicebus_topic"),
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("servicebusAuthorizationRuleId", exampleAzuremServicebusTopicAuthorizationRule.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.ServiceBus` - 2024-01-01
func LookupTopicAuthorizationRule(ctx *pulumi.Context, args *LookupTopicAuthorizationRuleArgs, opts ...pulumi.InvokeOption) (*LookupTopicAuthorizationRuleResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupTopicAuthorizationRuleResult
err := ctx.Invoke("azure:servicebus/getTopicAuthorizationRule:getTopicAuthorizationRule", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getTopicAuthorizationRule.
type LookupTopicAuthorizationRuleArgs struct {
// The name of the ServiceBus Topic Authorization Rule resource.
Name string `pulumi:"name"`
// The name of the ServiceBus Namespace.
NamespaceName *string `pulumi:"namespaceName"`
QueueName *string `pulumi:"queueName"`
// The name of the resource group in which the ServiceBus Namespace exists.
ResourceGroupName *string `pulumi:"resourceGroupName"`
TopicId *string `pulumi:"topicId"`
// The name of the ServiceBus Topic.
TopicName *string `pulumi:"topicName"`
}
// A collection of values returned by getTopicAuthorizationRule.
type LookupTopicAuthorizationRuleResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Listen bool `pulumi:"listen"`
Manage bool `pulumi:"manage"`
Name string `pulumi:"name"`
NamespaceName *string `pulumi:"namespaceName"`
// The Primary Connection String for the ServiceBus Topic authorization Rule.
PrimaryConnectionString string `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias string `pulumi:"primaryConnectionStringAlias"`
// The Primary Key for the ServiceBus Topic authorization Rule.
PrimaryKey string `pulumi:"primaryKey"`
QueueName *string `pulumi:"queueName"`
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The Secondary Connection String for the ServiceBus Topic authorization Rule.
SecondaryConnectionString string `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias string `pulumi:"secondaryConnectionStringAlias"`
// The Secondary Key for the ServiceBus Topic authorization Rule.
SecondaryKey string `pulumi:"secondaryKey"`
Send bool `pulumi:"send"`
TopicId *string `pulumi:"topicId"`
TopicName *string `pulumi:"topicName"`
}
func LookupTopicAuthorizationRuleOutput(ctx *pulumi.Context, args LookupTopicAuthorizationRuleOutputArgs, opts ...pulumi.InvokeOption) LookupTopicAuthorizationRuleResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupTopicAuthorizationRuleResultOutput, error) {
args := v.(LookupTopicAuthorizationRuleArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:servicebus/getTopicAuthorizationRule:getTopicAuthorizationRule", args, LookupTopicAuthorizationRuleResultOutput{}, options).(LookupTopicAuthorizationRuleResultOutput), nil
}).(LookupTopicAuthorizationRuleResultOutput)
}
// A collection of arguments for invoking getTopicAuthorizationRule.
type LookupTopicAuthorizationRuleOutputArgs struct {
// The name of the ServiceBus Topic Authorization Rule resource.
Name pulumi.StringInput `pulumi:"name"`
// The name of the ServiceBus Namespace.
NamespaceName pulumi.StringPtrInput `pulumi:"namespaceName"`
QueueName pulumi.StringPtrInput `pulumi:"queueName"`
// The name of the resource group in which the ServiceBus Namespace exists.
ResourceGroupName pulumi.StringPtrInput `pulumi:"resourceGroupName"`
TopicId pulumi.StringPtrInput `pulumi:"topicId"`
// The name of the ServiceBus Topic.
TopicName pulumi.StringPtrInput `pulumi:"topicName"`
}
func (LookupTopicAuthorizationRuleOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTopicAuthorizationRuleArgs)(nil)).Elem()
}
// A collection of values returned by getTopicAuthorizationRule.
type LookupTopicAuthorizationRuleResultOutput struct{ *pulumi.OutputState }
func (LookupTopicAuthorizationRuleResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTopicAuthorizationRuleResult)(nil)).Elem()
}
func (o LookupTopicAuthorizationRuleResultOutput) ToLookupTopicAuthorizationRuleResultOutput() LookupTopicAuthorizationRuleResultOutput {
return o
}
func (o LookupTopicAuthorizationRuleResultOutput) ToLookupTopicAuthorizationRuleResultOutputWithContext(ctx context.Context) LookupTopicAuthorizationRuleResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupTopicAuthorizationRuleResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) Listen() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) bool { return v.Listen }).(pulumi.BoolOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) Manage() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) bool { return v.Manage }).(pulumi.BoolOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) NamespaceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) *string { return v.NamespaceName }).(pulumi.StringPtrOutput)
}
// The Primary Connection String for the ServiceBus Topic authorization Rule.
func (o LookupTopicAuthorizationRuleResultOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
func (o LookupTopicAuthorizationRuleResultOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Primary Key for the ServiceBus Topic authorization Rule.
func (o LookupTopicAuthorizationRuleResultOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.PrimaryKey }).(pulumi.StringOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) QueueName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) *string { return v.QueueName }).(pulumi.StringPtrOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) ResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) *string { return v.ResourceGroupName }).(pulumi.StringPtrOutput)
}
// The Secondary Connection String for the ServiceBus Topic authorization Rule.
func (o LookupTopicAuthorizationRuleResultOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias Secondary Connection String for the ServiceBus Namespace
func (o LookupTopicAuthorizationRuleResultOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The Secondary Key for the ServiceBus Topic authorization Rule.
func (o LookupTopicAuthorizationRuleResultOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) string { return v.SecondaryKey }).(pulumi.StringOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) Send() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) bool { return v.Send }).(pulumi.BoolOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) TopicId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) *string { return v.TopicId }).(pulumi.StringPtrOutput)
}
func (o LookupTopicAuthorizationRuleResultOutput) TopicName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupTopicAuthorizationRuleResult) *string { return v.TopicName }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupTopicAuthorizationRuleResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/getNamespaceAuthorizationRule.go | sdk/go/azure/servicebus/getNamespaceAuthorizationRule.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
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 ServiceBus Namespace Authorization Rule.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := servicebus.LookupNamespaceAuthorizationRule(ctx, &servicebus.LookupNamespaceAuthorizationRuleArgs{
// Name: "examplerule",
// NamespaceId: pulumi.StringRef("examplenamespace"),
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("ruleId", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.ServiceBus` - 2024-01-01
func LookupNamespaceAuthorizationRule(ctx *pulumi.Context, args *LookupNamespaceAuthorizationRuleArgs, opts ...pulumi.InvokeOption) (*LookupNamespaceAuthorizationRuleResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupNamespaceAuthorizationRuleResult
err := ctx.Invoke("azure:servicebus/getNamespaceAuthorizationRule:getNamespaceAuthorizationRule", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getNamespaceAuthorizationRule.
type LookupNamespaceAuthorizationRuleArgs struct {
// Specifies the name of the ServiceBus Namespace Authorization Rule.
Name string `pulumi:"name"`
// Specifies the ID of the ServiceBus Namespace where the Service Bus Namespace Authorization Rule exists.
NamespaceId *string `pulumi:"namespaceId"`
// Deprecated: `namespaceName` will be removed in favour of the property `namespaceId` in v5.0 of the AzureRM Provider.
NamespaceName *string `pulumi:"namespaceName"`
// Deprecated: `resourceGroupName` will be removed in favour of the property `namespaceId` in v5.0 of the AzureRM Provider.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getNamespaceAuthorizationRule.
type LookupNamespaceAuthorizationRuleResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
NamespaceId *string `pulumi:"namespaceId"`
// Deprecated: `namespaceName` will be removed in favour of the property `namespaceId` in v5.0 of the AzureRM Provider.
NamespaceName *string `pulumi:"namespaceName"`
// The primary connection string for the authorization rule.
PrimaryConnectionString string `pulumi:"primaryConnectionString"`
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
PrimaryConnectionStringAlias string `pulumi:"primaryConnectionStringAlias"`
// The primary access key for the authorization rule.
PrimaryKey string `pulumi:"primaryKey"`
// Deprecated: `resourceGroupName` will be removed in favour of the property `namespaceId` in v5.0 of the AzureRM Provider.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The secondary connection string for the authorization rule.
SecondaryConnectionString string `pulumi:"secondaryConnectionString"`
// The alias Secondary Connection String for the ServiceBus Namespace
SecondaryConnectionStringAlias string `pulumi:"secondaryConnectionStringAlias"`
// The secondary access key for the authorization rule.
SecondaryKey string `pulumi:"secondaryKey"`
}
func LookupNamespaceAuthorizationRuleOutput(ctx *pulumi.Context, args LookupNamespaceAuthorizationRuleOutputArgs, opts ...pulumi.InvokeOption) LookupNamespaceAuthorizationRuleResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupNamespaceAuthorizationRuleResultOutput, error) {
args := v.(LookupNamespaceAuthorizationRuleArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:servicebus/getNamespaceAuthorizationRule:getNamespaceAuthorizationRule", args, LookupNamespaceAuthorizationRuleResultOutput{}, options).(LookupNamespaceAuthorizationRuleResultOutput), nil
}).(LookupNamespaceAuthorizationRuleResultOutput)
}
// A collection of arguments for invoking getNamespaceAuthorizationRule.
type LookupNamespaceAuthorizationRuleOutputArgs struct {
// Specifies the name of the ServiceBus Namespace Authorization Rule.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the ID of the ServiceBus Namespace where the Service Bus Namespace Authorization Rule exists.
NamespaceId pulumi.StringPtrInput `pulumi:"namespaceId"`
// Deprecated: `namespaceName` will be removed in favour of the property `namespaceId` in v5.0 of the AzureRM Provider.
NamespaceName pulumi.StringPtrInput `pulumi:"namespaceName"`
// Deprecated: `resourceGroupName` will be removed in favour of the property `namespaceId` in v5.0 of the AzureRM Provider.
ResourceGroupName pulumi.StringPtrInput `pulumi:"resourceGroupName"`
}
func (LookupNamespaceAuthorizationRuleOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupNamespaceAuthorizationRuleArgs)(nil)).Elem()
}
// A collection of values returned by getNamespaceAuthorizationRule.
type LookupNamespaceAuthorizationRuleResultOutput struct{ *pulumi.OutputState }
func (LookupNamespaceAuthorizationRuleResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupNamespaceAuthorizationRuleResult)(nil)).Elem()
}
func (o LookupNamespaceAuthorizationRuleResultOutput) ToLookupNamespaceAuthorizationRuleResultOutput() LookupNamespaceAuthorizationRuleResultOutput {
return o
}
func (o LookupNamespaceAuthorizationRuleResultOutput) ToLookupNamespaceAuthorizationRuleResultOutputWithContext(ctx context.Context) LookupNamespaceAuthorizationRuleResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupNamespaceAuthorizationRuleResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupNamespaceAuthorizationRuleResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupNamespaceAuthorizationRuleResultOutput) NamespaceId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) *string { return v.NamespaceId }).(pulumi.StringPtrOutput)
}
// Deprecated: `namespaceName` will be removed in favour of the property `namespaceId` in v5.0 of the AzureRM Provider.
func (o LookupNamespaceAuthorizationRuleResultOutput) NamespaceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) *string { return v.NamespaceName }).(pulumi.StringPtrOutput)
}
// The primary connection string for the authorization rule.
func (o LookupNamespaceAuthorizationRuleResultOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The alias Primary Connection String for the ServiceBus Namespace, if the namespace is Geo DR paired.
func (o LookupNamespaceAuthorizationRuleResultOutput) PrimaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.PrimaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The primary access key for the authorization rule.
func (o LookupNamespaceAuthorizationRuleResultOutput) PrimaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.PrimaryKey }).(pulumi.StringOutput)
}
// Deprecated: `resourceGroupName` will be removed in favour of the property `namespaceId` in v5.0 of the AzureRM Provider.
func (o LookupNamespaceAuthorizationRuleResultOutput) ResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) *string { return v.ResourceGroupName }).(pulumi.StringPtrOutput)
}
// The secondary connection string for the authorization rule.
func (o LookupNamespaceAuthorizationRuleResultOutput) SecondaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.SecondaryConnectionString }).(pulumi.StringOutput)
}
// The alias Secondary Connection String for the ServiceBus Namespace
func (o LookupNamespaceAuthorizationRuleResultOutput) SecondaryConnectionStringAlias() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.SecondaryConnectionStringAlias }).(pulumi.StringOutput)
}
// The secondary access key for the authorization rule.
func (o LookupNamespaceAuthorizationRuleResultOutput) SecondaryKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupNamespaceAuthorizationRuleResult) string { return v.SecondaryKey }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupNamespaceAuthorizationRuleResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/servicebus/queue.go | sdk/go/azure/servicebus/queue.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package servicebus
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a ServiceBus Queue.
//
// ## 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/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("my-servicebus"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleNamespace, err := servicebus.NewNamespace(ctx, "example", &servicebus.NamespaceArgs{
// Name: pulumi.String("tfex-servicebus-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("Standard"),
// Tags: pulumi.StringMap{
// "source": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// _, err = servicebus.NewQueue(ctx, "example", &servicebus.QueueArgs{
// Name: pulumi.String("tfex_servicebus_queue"),
// NamespaceId: exampleNamespace.ID(),
// PartitioningEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ServiceBus` - 2024-01-01
//
// ## Import
//
// Service Bus Queue can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:servicebus/queue:Queue example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ServiceBus/namespaces/sbns1/queues/snqueue1
// ```
type Queue struct {
pulumi.CustomResourceState
// The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.
AutoDeleteOnIdle pulumi.StringOutput `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`.
BatchedOperationsEnabled pulumi.BoolPtrOutput `pulumi:"batchedOperationsEnabled"`
// Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to `false`.
DeadLetteringOnMessageExpiration pulumi.BoolPtrOutput `pulumi:"deadLetteringOnMessageExpiration"`
// The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on message itself.
DefaultMessageTtl pulumi.StringOutput `pulumi:"defaultMessageTtl"`
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow pulumi.StringPtrOutput `pulumi:"duplicateDetectionHistoryTimeWindow"`
// Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`.
//
// > **Note:** Service Bus Premium namespaces do not support Express Entities, so `expressEnabled` MUST be set to `false`.
ExpressEnabled pulumi.BoolPtrOutput `pulumi:"expressEnabled"`
// The name of a Queue or Topic to automatically forward dead lettered messages to.
ForwardDeadLetteredMessagesTo pulumi.StringPtrOutput `pulumi:"forwardDeadLetteredMessagesTo"`
// The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information.
ForwardTo pulumi.StringPtrOutput `pulumi:"forwardTo"`
// The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to `PT1M` (1 Minute).
LockDuration pulumi.StringPtrOutput `pulumi:"lockDuration"`
// Integer value which controls when a message is automatically dead lettered. Defaults to `10`.
MaxDeliveryCount pulumi.IntPtrOutput `pulumi:"maxDeliveryCount"`
// Integer value which controls the maximum size of a message allowed on the queue for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview).
MaxMessageSizeInKilobytes pulumi.IntOutput `pulumi:"maxMessageSizeInKilobytes"`
// Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas).
MaxSizeInMegabytes pulumi.IntOutput `pulumi:"maxSizeInMegabytes"`
// Specifies the name of the ServiceBus Queue resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
NamespaceId pulumi.StringOutput `pulumi:"namespaceId"`
NamespaceName pulumi.StringOutput `pulumi:"namespaceName"`
// Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers. Changing this forces a new resource to be created. Defaults to `false` for Basic and Standard.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. For premium namespace, partitioning is available at namespace creation, and all queues and topics in the partitioned namespace will be partitioned, for the premium namespace that has `premiumMessagingPartitions` sets to `1`, the namespace is not partitioned.
PartitioningEnabled pulumi.BoolPtrOutput `pulumi:"partitioningEnabled"`
// Boolean flag which controls whether the Queue requires duplicate detection. Changing this forces a new resource to be created. Defaults to `false`.
RequiresDuplicateDetection pulumi.BoolPtrOutput `pulumi:"requiresDuplicateDetection"`
// Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`.
RequiresSession pulumi.BoolPtrOutput `pulumi:"requiresSession"`
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`.
Status pulumi.StringPtrOutput `pulumi:"status"`
}
// NewQueue registers a new resource with the given unique name, arguments, and options.
func NewQueue(ctx *pulumi.Context,
name string, args *QueueArgs, opts ...pulumi.ResourceOption) (*Queue, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.NamespaceId == nil {
return nil, errors.New("invalid value for required argument 'NamespaceId'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:eventhub/queue:Queue"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Queue
err := ctx.RegisterResource("azure:servicebus/queue:Queue", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetQueue gets an existing Queue 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 GetQueue(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *QueueState, opts ...pulumi.ResourceOption) (*Queue, error) {
var resource Queue
err := ctx.ReadResource("azure:servicebus/queue:Queue", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Queue resources.
type queueState struct {
// The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.
AutoDeleteOnIdle *string `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`.
BatchedOperationsEnabled *bool `pulumi:"batchedOperationsEnabled"`
// Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to `false`.
DeadLetteringOnMessageExpiration *bool `pulumi:"deadLetteringOnMessageExpiration"`
// The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on message itself.
DefaultMessageTtl *string `pulumi:"defaultMessageTtl"`
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow *string `pulumi:"duplicateDetectionHistoryTimeWindow"`
// Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`.
//
// > **Note:** Service Bus Premium namespaces do not support Express Entities, so `expressEnabled` MUST be set to `false`.
ExpressEnabled *bool `pulumi:"expressEnabled"`
// The name of a Queue or Topic to automatically forward dead lettered messages to.
ForwardDeadLetteredMessagesTo *string `pulumi:"forwardDeadLetteredMessagesTo"`
// The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information.
ForwardTo *string `pulumi:"forwardTo"`
// The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to `PT1M` (1 Minute).
LockDuration *string `pulumi:"lockDuration"`
// Integer value which controls when a message is automatically dead lettered. Defaults to `10`.
MaxDeliveryCount *int `pulumi:"maxDeliveryCount"`
// Integer value which controls the maximum size of a message allowed on the queue for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview).
MaxMessageSizeInKilobytes *int `pulumi:"maxMessageSizeInKilobytes"`
// Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas).
MaxSizeInMegabytes *int `pulumi:"maxSizeInMegabytes"`
// Specifies the name of the ServiceBus Queue resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
NamespaceId *string `pulumi:"namespaceId"`
NamespaceName *string `pulumi:"namespaceName"`
// Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers. Changing this forces a new resource to be created. Defaults to `false` for Basic and Standard.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. For premium namespace, partitioning is available at namespace creation, and all queues and topics in the partitioned namespace will be partitioned, for the premium namespace that has `premiumMessagingPartitions` sets to `1`, the namespace is not partitioned.
PartitioningEnabled *bool `pulumi:"partitioningEnabled"`
// Boolean flag which controls whether the Queue requires duplicate detection. Changing this forces a new resource to be created. Defaults to `false`.
RequiresDuplicateDetection *bool `pulumi:"requiresDuplicateDetection"`
// Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`.
RequiresSession *bool `pulumi:"requiresSession"`
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`.
Status *string `pulumi:"status"`
}
type QueueState struct {
// The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.
AutoDeleteOnIdle pulumi.StringPtrInput
// Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`.
BatchedOperationsEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to `false`.
DeadLetteringOnMessageExpiration pulumi.BoolPtrInput
// The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on message itself.
DefaultMessageTtl pulumi.StringPtrInput
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow pulumi.StringPtrInput
// Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`.
//
// > **Note:** Service Bus Premium namespaces do not support Express Entities, so `expressEnabled` MUST be set to `false`.
ExpressEnabled pulumi.BoolPtrInput
// The name of a Queue or Topic to automatically forward dead lettered messages to.
ForwardDeadLetteredMessagesTo pulumi.StringPtrInput
// The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information.
ForwardTo pulumi.StringPtrInput
// The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to `PT1M` (1 Minute).
LockDuration pulumi.StringPtrInput
// Integer value which controls when a message is automatically dead lettered. Defaults to `10`.
MaxDeliveryCount pulumi.IntPtrInput
// Integer value which controls the maximum size of a message allowed on the queue for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview).
MaxMessageSizeInKilobytes pulumi.IntPtrInput
// Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas).
MaxSizeInMegabytes pulumi.IntPtrInput
// Specifies the name of the ServiceBus Queue resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
NamespaceId pulumi.StringPtrInput
NamespaceName pulumi.StringPtrInput
// Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers. Changing this forces a new resource to be created. Defaults to `false` for Basic and Standard.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. For premium namespace, partitioning is available at namespace creation, and all queues and topics in the partitioned namespace will be partitioned, for the premium namespace that has `premiumMessagingPartitions` sets to `1`, the namespace is not partitioned.
PartitioningEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Queue requires duplicate detection. Changing this forces a new resource to be created. Defaults to `false`.
RequiresDuplicateDetection pulumi.BoolPtrInput
// Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`.
RequiresSession pulumi.BoolPtrInput
ResourceGroupName pulumi.StringPtrInput
// The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`.
Status pulumi.StringPtrInput
}
func (QueueState) ElementType() reflect.Type {
return reflect.TypeOf((*queueState)(nil)).Elem()
}
type queueArgs struct {
// The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.
AutoDeleteOnIdle *string `pulumi:"autoDeleteOnIdle"`
// Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`.
BatchedOperationsEnabled *bool `pulumi:"batchedOperationsEnabled"`
// Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to `false`.
DeadLetteringOnMessageExpiration *bool `pulumi:"deadLetteringOnMessageExpiration"`
// The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on message itself.
DefaultMessageTtl *string `pulumi:"defaultMessageTtl"`
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow *string `pulumi:"duplicateDetectionHistoryTimeWindow"`
// Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`.
//
// > **Note:** Service Bus Premium namespaces do not support Express Entities, so `expressEnabled` MUST be set to `false`.
ExpressEnabled *bool `pulumi:"expressEnabled"`
// The name of a Queue or Topic to automatically forward dead lettered messages to.
ForwardDeadLetteredMessagesTo *string `pulumi:"forwardDeadLetteredMessagesTo"`
// The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information.
ForwardTo *string `pulumi:"forwardTo"`
// The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to `PT1M` (1 Minute).
LockDuration *string `pulumi:"lockDuration"`
// Integer value which controls when a message is automatically dead lettered. Defaults to `10`.
MaxDeliveryCount *int `pulumi:"maxDeliveryCount"`
// Integer value which controls the maximum size of a message allowed on the queue for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview).
MaxMessageSizeInKilobytes *int `pulumi:"maxMessageSizeInKilobytes"`
// Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas).
MaxSizeInMegabytes *int `pulumi:"maxSizeInMegabytes"`
// Specifies the name of the ServiceBus Queue resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
NamespaceId string `pulumi:"namespaceId"`
// Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers. Changing this forces a new resource to be created. Defaults to `false` for Basic and Standard.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. For premium namespace, partitioning is available at namespace creation, and all queues and topics in the partitioned namespace will be partitioned, for the premium namespace that has `premiumMessagingPartitions` sets to `1`, the namespace is not partitioned.
PartitioningEnabled *bool `pulumi:"partitioningEnabled"`
// Boolean flag which controls whether the Queue requires duplicate detection. Changing this forces a new resource to be created. Defaults to `false`.
RequiresDuplicateDetection *bool `pulumi:"requiresDuplicateDetection"`
// Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`.
RequiresSession *bool `pulumi:"requiresSession"`
// The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`.
Status *string `pulumi:"status"`
}
// The set of arguments for constructing a Queue resource.
type QueueArgs struct {
// The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.
AutoDeleteOnIdle pulumi.StringPtrInput
// Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`.
BatchedOperationsEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to `false`.
DeadLetteringOnMessageExpiration pulumi.BoolPtrInput
// The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on message itself.
DefaultMessageTtl pulumi.StringPtrInput
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
DuplicateDetectionHistoryTimeWindow pulumi.StringPtrInput
// Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`.
//
// > **Note:** Service Bus Premium namespaces do not support Express Entities, so `expressEnabled` MUST be set to `false`.
ExpressEnabled pulumi.BoolPtrInput
// The name of a Queue or Topic to automatically forward dead lettered messages to.
ForwardDeadLetteredMessagesTo pulumi.StringPtrInput
// The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information.
ForwardTo pulumi.StringPtrInput
// The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to `PT1M` (1 Minute).
LockDuration pulumi.StringPtrInput
// Integer value which controls when a message is automatically dead lettered. Defaults to `10`.
MaxDeliveryCount pulumi.IntPtrInput
// Integer value which controls the maximum size of a message allowed on the queue for Premium SKU. For supported values see the "Large messages support" section of [this document](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support-preview).
MaxMessageSizeInKilobytes pulumi.IntPtrInput
// Integer value which controls the size of memory allocated for the queue. For supported values see the "Queue or topic size" section of [Service Bus Quotas](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas).
MaxSizeInMegabytes pulumi.IntPtrInput
// Specifies the name of the ServiceBus Queue resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the ServiceBus Namespace to create this queue in. Changing this forces a new resource to be created.
NamespaceId pulumi.StringInput
// Boolean flag which controls whether to enable the queue to be partitioned across multiple message brokers. Changing this forces a new resource to be created. Defaults to `false` for Basic and Standard.
//
// > **Note:** Partitioning is available at entity creation for all queues and topics in Basic or Standard SKUs. For premium namespace, partitioning is available at namespace creation, and all queues and topics in the partitioned namespace will be partitioned, for the premium namespace that has `premiumMessagingPartitions` sets to `1`, the namespace is not partitioned.
PartitioningEnabled pulumi.BoolPtrInput
// Boolean flag which controls whether the Queue requires duplicate detection. Changing this forces a new resource to be created. Defaults to `false`.
RequiresDuplicateDetection pulumi.BoolPtrInput
// Boolean flag which controls whether the Queue requires sessions. This will allow ordered handling of unbounded sequences of related messages. With sessions enabled a queue can guarantee first-in-first-out delivery of messages. Changing this forces a new resource to be created. Defaults to `false`.
RequiresSession pulumi.BoolPtrInput
// The status of the Queue. Possible values are `Active`, `Creating`, `Deleting`, `Disabled`, `ReceiveDisabled`, `Renaming`, `SendDisabled`, `Unknown`. Note that `Restoring` is not accepted. Defaults to `Active`.
Status pulumi.StringPtrInput
}
func (QueueArgs) ElementType() reflect.Type {
return reflect.TypeOf((*queueArgs)(nil)).Elem()
}
type QueueInput interface {
pulumi.Input
ToQueueOutput() QueueOutput
ToQueueOutputWithContext(ctx context.Context) QueueOutput
}
func (*Queue) ElementType() reflect.Type {
return reflect.TypeOf((**Queue)(nil)).Elem()
}
func (i *Queue) ToQueueOutput() QueueOutput {
return i.ToQueueOutputWithContext(context.Background())
}
func (i *Queue) ToQueueOutputWithContext(ctx context.Context) QueueOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueueOutput)
}
// QueueArrayInput is an input type that accepts QueueArray and QueueArrayOutput values.
// You can construct a concrete instance of `QueueArrayInput` via:
//
// QueueArray{ QueueArgs{...} }
type QueueArrayInput interface {
pulumi.Input
ToQueueArrayOutput() QueueArrayOutput
ToQueueArrayOutputWithContext(context.Context) QueueArrayOutput
}
type QueueArray []QueueInput
func (QueueArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Queue)(nil)).Elem()
}
func (i QueueArray) ToQueueArrayOutput() QueueArrayOutput {
return i.ToQueueArrayOutputWithContext(context.Background())
}
func (i QueueArray) ToQueueArrayOutputWithContext(ctx context.Context) QueueArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueueArrayOutput)
}
// QueueMapInput is an input type that accepts QueueMap and QueueMapOutput values.
// You can construct a concrete instance of `QueueMapInput` via:
//
// QueueMap{ "key": QueueArgs{...} }
type QueueMapInput interface {
pulumi.Input
ToQueueMapOutput() QueueMapOutput
ToQueueMapOutputWithContext(context.Context) QueueMapOutput
}
type QueueMap map[string]QueueInput
func (QueueMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Queue)(nil)).Elem()
}
func (i QueueMap) ToQueueMapOutput() QueueMapOutput {
return i.ToQueueMapOutputWithContext(context.Background())
}
func (i QueueMap) ToQueueMapOutputWithContext(ctx context.Context) QueueMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(QueueMapOutput)
}
type QueueOutput struct{ *pulumi.OutputState }
func (QueueOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Queue)(nil)).Elem()
}
func (o QueueOutput) ToQueueOutput() QueueOutput {
return o
}
func (o QueueOutput) ToQueueOutputWithContext(ctx context.Context) QueueOutput {
return o
}
// The ISO 8601 timespan duration of the idle interval after which the Queue is automatically deleted, minimum of 5 minutes.
func (o QueueOutput) AutoDeleteOnIdle() pulumi.StringOutput {
return o.ApplyT(func(v *Queue) pulumi.StringOutput { return v.AutoDeleteOnIdle }).(pulumi.StringOutput)
}
// Boolean flag which controls whether server-side batched operations are enabled. Defaults to `true`.
func (o QueueOutput) BatchedOperationsEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.BoolPtrOutput { return v.BatchedOperationsEnabled }).(pulumi.BoolPtrOutput)
}
// Boolean flag which controls whether the Queue has dead letter support when a message expires. Defaults to `false`.
func (o QueueOutput) DeadLetteringOnMessageExpiration() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.BoolPtrOutput { return v.DeadLetteringOnMessageExpiration }).(pulumi.BoolPtrOutput)
}
// The ISO 8601 timespan duration of the TTL of messages sent to this queue. This is the default value used when TTL is not set on message itself.
func (o QueueOutput) DefaultMessageTtl() pulumi.StringOutput {
return o.ApplyT(func(v *Queue) pulumi.StringOutput { return v.DefaultMessageTtl }).(pulumi.StringOutput)
}
// The ISO 8601 timespan duration during which duplicates can be detected. Defaults to `PT10M` (10 Minutes).
func (o QueueOutput) DuplicateDetectionHistoryTimeWindow() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.StringPtrOutput { return v.DuplicateDetectionHistoryTimeWindow }).(pulumi.StringPtrOutput)
}
// Boolean flag which controls whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage. Defaults to `false` for Basic and Standard. For Premium, it MUST be set to `false`.
//
// > **Note:** Service Bus Premium namespaces do not support Express Entities, so `expressEnabled` MUST be set to `false`.
func (o QueueOutput) ExpressEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.BoolPtrOutput { return v.ExpressEnabled }).(pulumi.BoolPtrOutput)
}
// The name of a Queue or Topic to automatically forward dead lettered messages to.
func (o QueueOutput) ForwardDeadLetteredMessagesTo() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.StringPtrOutput { return v.ForwardDeadLetteredMessagesTo }).(pulumi.StringPtrOutput)
}
// The name of a Queue or Topic to automatically forward messages to. Please [see the documentation](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding) for more information.
func (o QueueOutput) ForwardTo() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.StringPtrOutput { return v.ForwardTo }).(pulumi.StringPtrOutput)
}
// The ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. Maximum value is 5 minutes. Defaults to `PT1M` (1 Minute).
func (o QueueOutput) LockDuration() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.StringPtrOutput { return v.LockDuration }).(pulumi.StringPtrOutput)
}
// Integer value which controls when a message is automatically dead lettered. Defaults to `10`.
func (o QueueOutput) MaxDeliveryCount() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.IntPtrOutput { return v.MaxDeliveryCount }).(pulumi.IntPtrOutput)
}
| 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/msi/init.go | sdk/go/azure/msi/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 msi
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:msi/userAssignedIdentity:UserAssignedIdentity":
r = &UserAssignedIdentity{}
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",
"msi/userAssignedIdentity",
&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/msi/userAssignedIdentity.go | sdk/go/azure/msi/userAssignedIdentity.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package msi
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// <!-- Note: This documentation is generated. Any manual changes will be overwritten -->
//
// Manages a User Assigned Identity.
//
// ## 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/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{
// Location: example.Location,
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.ManagedIdentity` - 2024-11-30
//
// ## Import
//
// An existing User Assigned Identity can be imported into Pulumi using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:msi/userAssignedIdentity:UserAssignedIdentity example /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}
// ```
//
// * Where `{subscriptionId}` is the ID of the Azure Subscription where the User Assigned Identity exists. For example `12345678-1234-9876-4563-123456789012`.
//
// * Where `{resourceGroupName}` is the name of Resource Group where this User Assigned Identity exists. For example `example-resource-group`.
//
// * Where `{userAssignedIdentityName}` is the name of the User Assigned Identity. For example `userAssignedIdentityValue`.
//
// Deprecated: azure.msi.UserAssignedIdentity has been deprecated in favor of azure.authorization.UserAssignedIdentity
type UserAssignedIdentity struct {
pulumi.CustomResourceState
// The ID of the app associated with the Identity.
ClientId pulumi.StringOutput `pulumi:"clientId"`
// The Azure Region where the User Assigned Identity should exist. Changing this forces a new User Assigned Identity to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of this User Assigned Identity. Changing this forces a new User Assigned Identity to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Service Principal object associated with the created Identity.
PrincipalId pulumi.StringOutput `pulumi:"principalId"`
// Specifies the name of the Resource Group within which this User Assigned Identity should exist. Changing this forces a new User Assigned Identity to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the User Assigned Identity.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The ID of the Tenant which the Identity belongs to.
TenantId pulumi.StringOutput `pulumi:"tenantId"`
}
// NewUserAssignedIdentity registers a new resource with the given unique name, arguments, and options.
func NewUserAssignedIdentity(ctx *pulumi.Context,
name string, args *UserAssignedIdentityArgs, opts ...pulumi.ResourceOption) (*UserAssignedIdentity, 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 UserAssignedIdentity
err := ctx.RegisterResource("azure:msi/userAssignedIdentity:UserAssignedIdentity", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetUserAssignedIdentity gets an existing UserAssignedIdentity 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 GetUserAssignedIdentity(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *UserAssignedIdentityState, opts ...pulumi.ResourceOption) (*UserAssignedIdentity, error) {
var resource UserAssignedIdentity
err := ctx.ReadResource("azure:msi/userAssignedIdentity:UserAssignedIdentity", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering UserAssignedIdentity resources.
type userAssignedIdentityState struct {
// The ID of the app associated with the Identity.
ClientId *string `pulumi:"clientId"`
// The Azure Region where the User Assigned Identity should exist. Changing this forces a new User Assigned Identity to be created.
Location *string `pulumi:"location"`
// Specifies the name of this User Assigned Identity. Changing this forces a new User Assigned Identity to be created.
Name *string `pulumi:"name"`
// The ID of the Service Principal object associated with the created Identity.
PrincipalId *string `pulumi:"principalId"`
// Specifies the name of the Resource Group within which this User Assigned Identity should exist. Changing this forces a new User Assigned Identity to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the User Assigned Identity.
Tags map[string]string `pulumi:"tags"`
// The ID of the Tenant which the Identity belongs to.
TenantId *string `pulumi:"tenantId"`
}
type UserAssignedIdentityState struct {
// The ID of the app associated with the Identity.
ClientId pulumi.StringPtrInput
// The Azure Region where the User Assigned Identity should exist. Changing this forces a new User Assigned Identity to be created.
Location pulumi.StringPtrInput
// Specifies the name of this User Assigned Identity. Changing this forces a new User Assigned Identity to be created.
Name pulumi.StringPtrInput
// The ID of the Service Principal object associated with the created Identity.
PrincipalId pulumi.StringPtrInput
// Specifies the name of the Resource Group within which this User Assigned Identity should exist. Changing this forces a new User Assigned Identity to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the User Assigned Identity.
Tags pulumi.StringMapInput
// The ID of the Tenant which the Identity belongs to.
TenantId pulumi.StringPtrInput
}
func (UserAssignedIdentityState) ElementType() reflect.Type {
return reflect.TypeOf((*userAssignedIdentityState)(nil)).Elem()
}
type userAssignedIdentityArgs struct {
// The Azure Region where the User Assigned Identity should exist. Changing this forces a new User Assigned Identity to be created.
Location *string `pulumi:"location"`
// Specifies the name of this User Assigned Identity. Changing this forces a new User Assigned Identity to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Resource Group within which this User Assigned Identity should exist. Changing this forces a new User Assigned Identity to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the User Assigned Identity.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a UserAssignedIdentity resource.
type UserAssignedIdentityArgs struct {
// The Azure Region where the User Assigned Identity should exist. Changing this forces a new User Assigned Identity to be created.
Location pulumi.StringPtrInput
// Specifies the name of this User Assigned Identity. Changing this forces a new User Assigned Identity to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Resource Group within which this User Assigned Identity should exist. Changing this forces a new User Assigned Identity to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the User Assigned Identity.
Tags pulumi.StringMapInput
}
func (UserAssignedIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*userAssignedIdentityArgs)(nil)).Elem()
}
type UserAssignedIdentityInput interface {
pulumi.Input
ToUserAssignedIdentityOutput() UserAssignedIdentityOutput
ToUserAssignedIdentityOutputWithContext(ctx context.Context) UserAssignedIdentityOutput
}
func (*UserAssignedIdentity) ElementType() reflect.Type {
return reflect.TypeOf((**UserAssignedIdentity)(nil)).Elem()
}
func (i *UserAssignedIdentity) ToUserAssignedIdentityOutput() UserAssignedIdentityOutput {
return i.ToUserAssignedIdentityOutputWithContext(context.Background())
}
func (i *UserAssignedIdentity) ToUserAssignedIdentityOutputWithContext(ctx context.Context) UserAssignedIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(UserAssignedIdentityOutput)
}
// UserAssignedIdentityArrayInput is an input type that accepts UserAssignedIdentityArray and UserAssignedIdentityArrayOutput values.
// You can construct a concrete instance of `UserAssignedIdentityArrayInput` via:
//
// UserAssignedIdentityArray{ UserAssignedIdentityArgs{...} }
type UserAssignedIdentityArrayInput interface {
pulumi.Input
ToUserAssignedIdentityArrayOutput() UserAssignedIdentityArrayOutput
ToUserAssignedIdentityArrayOutputWithContext(context.Context) UserAssignedIdentityArrayOutput
}
type UserAssignedIdentityArray []UserAssignedIdentityInput
func (UserAssignedIdentityArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*UserAssignedIdentity)(nil)).Elem()
}
func (i UserAssignedIdentityArray) ToUserAssignedIdentityArrayOutput() UserAssignedIdentityArrayOutput {
return i.ToUserAssignedIdentityArrayOutputWithContext(context.Background())
}
func (i UserAssignedIdentityArray) ToUserAssignedIdentityArrayOutputWithContext(ctx context.Context) UserAssignedIdentityArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(UserAssignedIdentityArrayOutput)
}
// UserAssignedIdentityMapInput is an input type that accepts UserAssignedIdentityMap and UserAssignedIdentityMapOutput values.
// You can construct a concrete instance of `UserAssignedIdentityMapInput` via:
//
// UserAssignedIdentityMap{ "key": UserAssignedIdentityArgs{...} }
type UserAssignedIdentityMapInput interface {
pulumi.Input
ToUserAssignedIdentityMapOutput() UserAssignedIdentityMapOutput
ToUserAssignedIdentityMapOutputWithContext(context.Context) UserAssignedIdentityMapOutput
}
type UserAssignedIdentityMap map[string]UserAssignedIdentityInput
func (UserAssignedIdentityMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*UserAssignedIdentity)(nil)).Elem()
}
func (i UserAssignedIdentityMap) ToUserAssignedIdentityMapOutput() UserAssignedIdentityMapOutput {
return i.ToUserAssignedIdentityMapOutputWithContext(context.Background())
}
func (i UserAssignedIdentityMap) ToUserAssignedIdentityMapOutputWithContext(ctx context.Context) UserAssignedIdentityMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(UserAssignedIdentityMapOutput)
}
type UserAssignedIdentityOutput struct{ *pulumi.OutputState }
func (UserAssignedIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((**UserAssignedIdentity)(nil)).Elem()
}
func (o UserAssignedIdentityOutput) ToUserAssignedIdentityOutput() UserAssignedIdentityOutput {
return o
}
func (o UserAssignedIdentityOutput) ToUserAssignedIdentityOutputWithContext(ctx context.Context) UserAssignedIdentityOutput {
return o
}
// The ID of the app associated with the Identity.
func (o UserAssignedIdentityOutput) ClientId() pulumi.StringOutput {
return o.ApplyT(func(v *UserAssignedIdentity) pulumi.StringOutput { return v.ClientId }).(pulumi.StringOutput)
}
// The Azure Region where the User Assigned Identity should exist. Changing this forces a new User Assigned Identity to be created.
func (o UserAssignedIdentityOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *UserAssignedIdentity) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of this User Assigned Identity. Changing this forces a new User Assigned Identity to be created.
func (o UserAssignedIdentityOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *UserAssignedIdentity) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Service Principal object associated with the created Identity.
func (o UserAssignedIdentityOutput) PrincipalId() pulumi.StringOutput {
return o.ApplyT(func(v *UserAssignedIdentity) pulumi.StringOutput { return v.PrincipalId }).(pulumi.StringOutput)
}
// Specifies the name of the Resource Group within which this User Assigned Identity should exist. Changing this forces a new User Assigned Identity to be created.
func (o UserAssignedIdentityOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *UserAssignedIdentity) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the User Assigned Identity.
func (o UserAssignedIdentityOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *UserAssignedIdentity) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The ID of the Tenant which the Identity belongs to.
func (o UserAssignedIdentityOutput) TenantId() pulumi.StringOutput {
return o.ApplyT(func(v *UserAssignedIdentity) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput)
}
type UserAssignedIdentityArrayOutput struct{ *pulumi.OutputState }
func (UserAssignedIdentityArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*UserAssignedIdentity)(nil)).Elem()
}
func (o UserAssignedIdentityArrayOutput) ToUserAssignedIdentityArrayOutput() UserAssignedIdentityArrayOutput {
return o
}
func (o UserAssignedIdentityArrayOutput) ToUserAssignedIdentityArrayOutputWithContext(ctx context.Context) UserAssignedIdentityArrayOutput {
return o
}
func (o UserAssignedIdentityArrayOutput) Index(i pulumi.IntInput) UserAssignedIdentityOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *UserAssignedIdentity {
return vs[0].([]*UserAssignedIdentity)[vs[1].(int)]
}).(UserAssignedIdentityOutput)
}
type UserAssignedIdentityMapOutput struct{ *pulumi.OutputState }
func (UserAssignedIdentityMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*UserAssignedIdentity)(nil)).Elem()
}
func (o UserAssignedIdentityMapOutput) ToUserAssignedIdentityMapOutput() UserAssignedIdentityMapOutput {
return o
}
func (o UserAssignedIdentityMapOutput) ToUserAssignedIdentityMapOutputWithContext(ctx context.Context) UserAssignedIdentityMapOutput {
return o
}
func (o UserAssignedIdentityMapOutput) MapIndex(k pulumi.StringInput) UserAssignedIdentityOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *UserAssignedIdentity {
return vs[0].(map[string]*UserAssignedIdentity)[vs[1].(string)]
}).(UserAssignedIdentityOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*UserAssignedIdentityInput)(nil)).Elem(), &UserAssignedIdentity{})
pulumi.RegisterInputType(reflect.TypeOf((*UserAssignedIdentityArrayInput)(nil)).Elem(), UserAssignedIdentityArray{})
pulumi.RegisterInputType(reflect.TypeOf((*UserAssignedIdentityMapInput)(nil)).Elem(), UserAssignedIdentityMap{})
pulumi.RegisterOutputType(UserAssignedIdentityOutput{})
pulumi.RegisterOutputType(UserAssignedIdentityArrayOutput{})
pulumi.RegisterOutputType(UserAssignedIdentityMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/maintenance/init.go | sdk/go/azure/maintenance/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 maintenance
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:maintenance/assignmentDedicatedHost:AssignmentDedicatedHost":
r = &AssignmentDedicatedHost{}
case "azure:maintenance/assignmentDynamicScope:AssignmentDynamicScope":
r = &AssignmentDynamicScope{}
case "azure:maintenance/assignmentVirtualMachine:AssignmentVirtualMachine":
r = &AssignmentVirtualMachine{}
case "azure:maintenance/assignmentVirtualMachineScaleSet:AssignmentVirtualMachineScaleSet":
r = &AssignmentVirtualMachineScaleSet{}
case "azure:maintenance/configuration:Configuration":
r = &Configuration{}
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",
"maintenance/assignmentDedicatedHost",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"maintenance/assignmentDynamicScope",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"maintenance/assignmentVirtualMachine",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"maintenance/assignmentVirtualMachineScaleSet",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"maintenance/configuration",
&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/maintenance/pulumiTypes.go | sdk/go/azure/maintenance/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 maintenance
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 AssignmentDynamicScopeFilter struct {
// Specifies a list of locations to scope the query to.
Locations []string `pulumi:"locations"`
// Specifies a list of allowed operating systems. Possible values are `Linux` and `Windows`.
OsTypes []string `pulumi:"osTypes"`
// Specifies a list of allowed resource groups.
ResourceGroups []string `pulumi:"resourceGroups"`
// Specifies a list of allowed resources. Possible values are `Microsoft.Compute/virtualMachines` and `Microsoft.HybridCompute/machines`.
ResourceTypes []string `pulumi:"resourceTypes"`
// Filter VMs by `Any` or `All` specified tags. Defaults to `Any`.
TagFilter *string `pulumi:"tagFilter"`
// One or more `tags` blocks as defined below.
Tags []AssignmentDynamicScopeFilterTag `pulumi:"tags"`
}
// AssignmentDynamicScopeFilterInput is an input type that accepts AssignmentDynamicScopeFilterArgs and AssignmentDynamicScopeFilterOutput values.
// You can construct a concrete instance of `AssignmentDynamicScopeFilterInput` via:
//
// AssignmentDynamicScopeFilterArgs{...}
type AssignmentDynamicScopeFilterInput interface {
pulumi.Input
ToAssignmentDynamicScopeFilterOutput() AssignmentDynamicScopeFilterOutput
ToAssignmentDynamicScopeFilterOutputWithContext(context.Context) AssignmentDynamicScopeFilterOutput
}
type AssignmentDynamicScopeFilterArgs struct {
// Specifies a list of locations to scope the query to.
Locations pulumi.StringArrayInput `pulumi:"locations"`
// Specifies a list of allowed operating systems. Possible values are `Linux` and `Windows`.
OsTypes pulumi.StringArrayInput `pulumi:"osTypes"`
// Specifies a list of allowed resource groups.
ResourceGroups pulumi.StringArrayInput `pulumi:"resourceGroups"`
// Specifies a list of allowed resources. Possible values are `Microsoft.Compute/virtualMachines` and `Microsoft.HybridCompute/machines`.
ResourceTypes pulumi.StringArrayInput `pulumi:"resourceTypes"`
// Filter VMs by `Any` or `All` specified tags. Defaults to `Any`.
TagFilter pulumi.StringPtrInput `pulumi:"tagFilter"`
// One or more `tags` blocks as defined below.
Tags AssignmentDynamicScopeFilterTagArrayInput `pulumi:"tags"`
}
func (AssignmentDynamicScopeFilterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AssignmentDynamicScopeFilter)(nil)).Elem()
}
func (i AssignmentDynamicScopeFilterArgs) ToAssignmentDynamicScopeFilterOutput() AssignmentDynamicScopeFilterOutput {
return i.ToAssignmentDynamicScopeFilterOutputWithContext(context.Background())
}
func (i AssignmentDynamicScopeFilterArgs) ToAssignmentDynamicScopeFilterOutputWithContext(ctx context.Context) AssignmentDynamicScopeFilterOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentDynamicScopeFilterOutput)
}
func (i AssignmentDynamicScopeFilterArgs) ToAssignmentDynamicScopeFilterPtrOutput() AssignmentDynamicScopeFilterPtrOutput {
return i.ToAssignmentDynamicScopeFilterPtrOutputWithContext(context.Background())
}
func (i AssignmentDynamicScopeFilterArgs) ToAssignmentDynamicScopeFilterPtrOutputWithContext(ctx context.Context) AssignmentDynamicScopeFilterPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentDynamicScopeFilterOutput).ToAssignmentDynamicScopeFilterPtrOutputWithContext(ctx)
}
// AssignmentDynamicScopeFilterPtrInput is an input type that accepts AssignmentDynamicScopeFilterArgs, AssignmentDynamicScopeFilterPtr and AssignmentDynamicScopeFilterPtrOutput values.
// You can construct a concrete instance of `AssignmentDynamicScopeFilterPtrInput` via:
//
// AssignmentDynamicScopeFilterArgs{...}
//
// or:
//
// nil
type AssignmentDynamicScopeFilterPtrInput interface {
pulumi.Input
ToAssignmentDynamicScopeFilterPtrOutput() AssignmentDynamicScopeFilterPtrOutput
ToAssignmentDynamicScopeFilterPtrOutputWithContext(context.Context) AssignmentDynamicScopeFilterPtrOutput
}
type assignmentDynamicScopeFilterPtrType AssignmentDynamicScopeFilterArgs
func AssignmentDynamicScopeFilterPtr(v *AssignmentDynamicScopeFilterArgs) AssignmentDynamicScopeFilterPtrInput {
return (*assignmentDynamicScopeFilterPtrType)(v)
}
func (*assignmentDynamicScopeFilterPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AssignmentDynamicScopeFilter)(nil)).Elem()
}
func (i *assignmentDynamicScopeFilterPtrType) ToAssignmentDynamicScopeFilterPtrOutput() AssignmentDynamicScopeFilterPtrOutput {
return i.ToAssignmentDynamicScopeFilterPtrOutputWithContext(context.Background())
}
func (i *assignmentDynamicScopeFilterPtrType) ToAssignmentDynamicScopeFilterPtrOutputWithContext(ctx context.Context) AssignmentDynamicScopeFilterPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentDynamicScopeFilterPtrOutput)
}
type AssignmentDynamicScopeFilterOutput struct{ *pulumi.OutputState }
func (AssignmentDynamicScopeFilterOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AssignmentDynamicScopeFilter)(nil)).Elem()
}
func (o AssignmentDynamicScopeFilterOutput) ToAssignmentDynamicScopeFilterOutput() AssignmentDynamicScopeFilterOutput {
return o
}
func (o AssignmentDynamicScopeFilterOutput) ToAssignmentDynamicScopeFilterOutputWithContext(ctx context.Context) AssignmentDynamicScopeFilterOutput {
return o
}
func (o AssignmentDynamicScopeFilterOutput) ToAssignmentDynamicScopeFilterPtrOutput() AssignmentDynamicScopeFilterPtrOutput {
return o.ToAssignmentDynamicScopeFilterPtrOutputWithContext(context.Background())
}
func (o AssignmentDynamicScopeFilterOutput) ToAssignmentDynamicScopeFilterPtrOutputWithContext(ctx context.Context) AssignmentDynamicScopeFilterPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AssignmentDynamicScopeFilter) *AssignmentDynamicScopeFilter {
return &v
}).(AssignmentDynamicScopeFilterPtrOutput)
}
// Specifies a list of locations to scope the query to.
func (o AssignmentDynamicScopeFilterOutput) Locations() pulumi.StringArrayOutput {
return o.ApplyT(func(v AssignmentDynamicScopeFilter) []string { return v.Locations }).(pulumi.StringArrayOutput)
}
// Specifies a list of allowed operating systems. Possible values are `Linux` and `Windows`.
func (o AssignmentDynamicScopeFilterOutput) OsTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v AssignmentDynamicScopeFilter) []string { return v.OsTypes }).(pulumi.StringArrayOutput)
}
// Specifies a list of allowed resource groups.
func (o AssignmentDynamicScopeFilterOutput) ResourceGroups() pulumi.StringArrayOutput {
return o.ApplyT(func(v AssignmentDynamicScopeFilter) []string { return v.ResourceGroups }).(pulumi.StringArrayOutput)
}
// Specifies a list of allowed resources. Possible values are `Microsoft.Compute/virtualMachines` and `Microsoft.HybridCompute/machines`.
func (o AssignmentDynamicScopeFilterOutput) ResourceTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v AssignmentDynamicScopeFilter) []string { return v.ResourceTypes }).(pulumi.StringArrayOutput)
}
// Filter VMs by `Any` or `All` specified tags. Defaults to `Any`.
func (o AssignmentDynamicScopeFilterOutput) TagFilter() pulumi.StringPtrOutput {
return o.ApplyT(func(v AssignmentDynamicScopeFilter) *string { return v.TagFilter }).(pulumi.StringPtrOutput)
}
// One or more `tags` blocks as defined below.
func (o AssignmentDynamicScopeFilterOutput) Tags() AssignmentDynamicScopeFilterTagArrayOutput {
return o.ApplyT(func(v AssignmentDynamicScopeFilter) []AssignmentDynamicScopeFilterTag { return v.Tags }).(AssignmentDynamicScopeFilterTagArrayOutput)
}
type AssignmentDynamicScopeFilterPtrOutput struct{ *pulumi.OutputState }
func (AssignmentDynamicScopeFilterPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AssignmentDynamicScopeFilter)(nil)).Elem()
}
func (o AssignmentDynamicScopeFilterPtrOutput) ToAssignmentDynamicScopeFilterPtrOutput() AssignmentDynamicScopeFilterPtrOutput {
return o
}
func (o AssignmentDynamicScopeFilterPtrOutput) ToAssignmentDynamicScopeFilterPtrOutputWithContext(ctx context.Context) AssignmentDynamicScopeFilterPtrOutput {
return o
}
func (o AssignmentDynamicScopeFilterPtrOutput) Elem() AssignmentDynamicScopeFilterOutput {
return o.ApplyT(func(v *AssignmentDynamicScopeFilter) AssignmentDynamicScopeFilter {
if v != nil {
return *v
}
var ret AssignmentDynamicScopeFilter
return ret
}).(AssignmentDynamicScopeFilterOutput)
}
// Specifies a list of locations to scope the query to.
func (o AssignmentDynamicScopeFilterPtrOutput) Locations() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AssignmentDynamicScopeFilter) []string {
if v == nil {
return nil
}
return v.Locations
}).(pulumi.StringArrayOutput)
}
// Specifies a list of allowed operating systems. Possible values are `Linux` and `Windows`.
func (o AssignmentDynamicScopeFilterPtrOutput) OsTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AssignmentDynamicScopeFilter) []string {
if v == nil {
return nil
}
return v.OsTypes
}).(pulumi.StringArrayOutput)
}
// Specifies a list of allowed resource groups.
func (o AssignmentDynamicScopeFilterPtrOutput) ResourceGroups() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AssignmentDynamicScopeFilter) []string {
if v == nil {
return nil
}
return v.ResourceGroups
}).(pulumi.StringArrayOutput)
}
// Specifies a list of allowed resources. Possible values are `Microsoft.Compute/virtualMachines` and `Microsoft.HybridCompute/machines`.
func (o AssignmentDynamicScopeFilterPtrOutput) ResourceTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AssignmentDynamicScopeFilter) []string {
if v == nil {
return nil
}
return v.ResourceTypes
}).(pulumi.StringArrayOutput)
}
// Filter VMs by `Any` or `All` specified tags. Defaults to `Any`.
func (o AssignmentDynamicScopeFilterPtrOutput) TagFilter() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AssignmentDynamicScopeFilter) *string {
if v == nil {
return nil
}
return v.TagFilter
}).(pulumi.StringPtrOutput)
}
// One or more `tags` blocks as defined below.
func (o AssignmentDynamicScopeFilterPtrOutput) Tags() AssignmentDynamicScopeFilterTagArrayOutput {
return o.ApplyT(func(v *AssignmentDynamicScopeFilter) []AssignmentDynamicScopeFilterTag {
if v == nil {
return nil
}
return v.Tags
}).(AssignmentDynamicScopeFilterTagArrayOutput)
}
type AssignmentDynamicScopeFilterTag struct {
// Specifies the tag to filter by.
Tag string `pulumi:"tag"`
// Specifies a list of values the defined tag can have.
Values []string `pulumi:"values"`
}
// AssignmentDynamicScopeFilterTagInput is an input type that accepts AssignmentDynamicScopeFilterTagArgs and AssignmentDynamicScopeFilterTagOutput values.
// You can construct a concrete instance of `AssignmentDynamicScopeFilterTagInput` via:
//
// AssignmentDynamicScopeFilterTagArgs{...}
type AssignmentDynamicScopeFilterTagInput interface {
pulumi.Input
ToAssignmentDynamicScopeFilterTagOutput() AssignmentDynamicScopeFilterTagOutput
ToAssignmentDynamicScopeFilterTagOutputWithContext(context.Context) AssignmentDynamicScopeFilterTagOutput
}
type AssignmentDynamicScopeFilterTagArgs struct {
// Specifies the tag to filter by.
Tag pulumi.StringInput `pulumi:"tag"`
// Specifies a list of values the defined tag can have.
Values pulumi.StringArrayInput `pulumi:"values"`
}
func (AssignmentDynamicScopeFilterTagArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AssignmentDynamicScopeFilterTag)(nil)).Elem()
}
func (i AssignmentDynamicScopeFilterTagArgs) ToAssignmentDynamicScopeFilterTagOutput() AssignmentDynamicScopeFilterTagOutput {
return i.ToAssignmentDynamicScopeFilterTagOutputWithContext(context.Background())
}
func (i AssignmentDynamicScopeFilterTagArgs) ToAssignmentDynamicScopeFilterTagOutputWithContext(ctx context.Context) AssignmentDynamicScopeFilterTagOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentDynamicScopeFilterTagOutput)
}
// AssignmentDynamicScopeFilterTagArrayInput is an input type that accepts AssignmentDynamicScopeFilterTagArray and AssignmentDynamicScopeFilterTagArrayOutput values.
// You can construct a concrete instance of `AssignmentDynamicScopeFilterTagArrayInput` via:
//
// AssignmentDynamicScopeFilterTagArray{ AssignmentDynamicScopeFilterTagArgs{...} }
type AssignmentDynamicScopeFilterTagArrayInput interface {
pulumi.Input
ToAssignmentDynamicScopeFilterTagArrayOutput() AssignmentDynamicScopeFilterTagArrayOutput
ToAssignmentDynamicScopeFilterTagArrayOutputWithContext(context.Context) AssignmentDynamicScopeFilterTagArrayOutput
}
type AssignmentDynamicScopeFilterTagArray []AssignmentDynamicScopeFilterTagInput
func (AssignmentDynamicScopeFilterTagArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]AssignmentDynamicScopeFilterTag)(nil)).Elem()
}
func (i AssignmentDynamicScopeFilterTagArray) ToAssignmentDynamicScopeFilterTagArrayOutput() AssignmentDynamicScopeFilterTagArrayOutput {
return i.ToAssignmentDynamicScopeFilterTagArrayOutputWithContext(context.Background())
}
func (i AssignmentDynamicScopeFilterTagArray) ToAssignmentDynamicScopeFilterTagArrayOutputWithContext(ctx context.Context) AssignmentDynamicScopeFilterTagArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentDynamicScopeFilterTagArrayOutput)
}
type AssignmentDynamicScopeFilterTagOutput struct{ *pulumi.OutputState }
func (AssignmentDynamicScopeFilterTagOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AssignmentDynamicScopeFilterTag)(nil)).Elem()
}
func (o AssignmentDynamicScopeFilterTagOutput) ToAssignmentDynamicScopeFilterTagOutput() AssignmentDynamicScopeFilterTagOutput {
return o
}
func (o AssignmentDynamicScopeFilterTagOutput) ToAssignmentDynamicScopeFilterTagOutputWithContext(ctx context.Context) AssignmentDynamicScopeFilterTagOutput {
return o
}
// Specifies the tag to filter by.
func (o AssignmentDynamicScopeFilterTagOutput) Tag() pulumi.StringOutput {
return o.ApplyT(func(v AssignmentDynamicScopeFilterTag) string { return v.Tag }).(pulumi.StringOutput)
}
// Specifies a list of values the defined tag can have.
func (o AssignmentDynamicScopeFilterTagOutput) Values() pulumi.StringArrayOutput {
return o.ApplyT(func(v AssignmentDynamicScopeFilterTag) []string { return v.Values }).(pulumi.StringArrayOutput)
}
type AssignmentDynamicScopeFilterTagArrayOutput struct{ *pulumi.OutputState }
func (AssignmentDynamicScopeFilterTagArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]AssignmentDynamicScopeFilterTag)(nil)).Elem()
}
func (o AssignmentDynamicScopeFilterTagArrayOutput) ToAssignmentDynamicScopeFilterTagArrayOutput() AssignmentDynamicScopeFilterTagArrayOutput {
return o
}
func (o AssignmentDynamicScopeFilterTagArrayOutput) ToAssignmentDynamicScopeFilterTagArrayOutputWithContext(ctx context.Context) AssignmentDynamicScopeFilterTagArrayOutput {
return o
}
func (o AssignmentDynamicScopeFilterTagArrayOutput) Index(i pulumi.IntInput) AssignmentDynamicScopeFilterTagOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) AssignmentDynamicScopeFilterTag {
return vs[0].([]AssignmentDynamicScopeFilterTag)[vs[1].(int)]
}).(AssignmentDynamicScopeFilterTagOutput)
}
type ConfigurationInstallPatches struct {
// A `linux` block as defined above. This property only applies when `scope` is set to `InGuestPatch`
Linuxes []ConfigurationInstallPatchesLinux `pulumi:"linuxes"`
// Possible reboot preference as defined by the user based on which it would be decided to reboot the machine or not after the patch operation is completed. Possible values are `Always`, `IfRequired` and `Never`. This property only applies when `scope` is set to `InGuestPatch`.
Reboot *string `pulumi:"reboot"`
// A `windows` block as defined above. This property only applies when `scope` is set to `InGuestPatch`
Windows []ConfigurationInstallPatchesWindow `pulumi:"windows"`
}
// ConfigurationInstallPatchesInput is an input type that accepts ConfigurationInstallPatchesArgs and ConfigurationInstallPatchesOutput values.
// You can construct a concrete instance of `ConfigurationInstallPatchesInput` via:
//
// ConfigurationInstallPatchesArgs{...}
type ConfigurationInstallPatchesInput interface {
pulumi.Input
ToConfigurationInstallPatchesOutput() ConfigurationInstallPatchesOutput
ToConfigurationInstallPatchesOutputWithContext(context.Context) ConfigurationInstallPatchesOutput
}
type ConfigurationInstallPatchesArgs struct {
// A `linux` block as defined above. This property only applies when `scope` is set to `InGuestPatch`
Linuxes ConfigurationInstallPatchesLinuxArrayInput `pulumi:"linuxes"`
// Possible reboot preference as defined by the user based on which it would be decided to reboot the machine or not after the patch operation is completed. Possible values are `Always`, `IfRequired` and `Never`. This property only applies when `scope` is set to `InGuestPatch`.
Reboot pulumi.StringPtrInput `pulumi:"reboot"`
// A `windows` block as defined above. This property only applies when `scope` is set to `InGuestPatch`
Windows ConfigurationInstallPatchesWindowArrayInput `pulumi:"windows"`
}
func (ConfigurationInstallPatchesArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ConfigurationInstallPatches)(nil)).Elem()
}
func (i ConfigurationInstallPatchesArgs) ToConfigurationInstallPatchesOutput() ConfigurationInstallPatchesOutput {
return i.ToConfigurationInstallPatchesOutputWithContext(context.Background())
}
func (i ConfigurationInstallPatchesArgs) ToConfigurationInstallPatchesOutputWithContext(ctx context.Context) ConfigurationInstallPatchesOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationInstallPatchesOutput)
}
func (i ConfigurationInstallPatchesArgs) ToConfigurationInstallPatchesPtrOutput() ConfigurationInstallPatchesPtrOutput {
return i.ToConfigurationInstallPatchesPtrOutputWithContext(context.Background())
}
func (i ConfigurationInstallPatchesArgs) ToConfigurationInstallPatchesPtrOutputWithContext(ctx context.Context) ConfigurationInstallPatchesPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationInstallPatchesOutput).ToConfigurationInstallPatchesPtrOutputWithContext(ctx)
}
// ConfigurationInstallPatchesPtrInput is an input type that accepts ConfigurationInstallPatchesArgs, ConfigurationInstallPatchesPtr and ConfigurationInstallPatchesPtrOutput values.
// You can construct a concrete instance of `ConfigurationInstallPatchesPtrInput` via:
//
// ConfigurationInstallPatchesArgs{...}
//
// or:
//
// nil
type ConfigurationInstallPatchesPtrInput interface {
pulumi.Input
ToConfigurationInstallPatchesPtrOutput() ConfigurationInstallPatchesPtrOutput
ToConfigurationInstallPatchesPtrOutputWithContext(context.Context) ConfigurationInstallPatchesPtrOutput
}
type configurationInstallPatchesPtrType ConfigurationInstallPatchesArgs
func ConfigurationInstallPatchesPtr(v *ConfigurationInstallPatchesArgs) ConfigurationInstallPatchesPtrInput {
return (*configurationInstallPatchesPtrType)(v)
}
func (*configurationInstallPatchesPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ConfigurationInstallPatches)(nil)).Elem()
}
func (i *configurationInstallPatchesPtrType) ToConfigurationInstallPatchesPtrOutput() ConfigurationInstallPatchesPtrOutput {
return i.ToConfigurationInstallPatchesPtrOutputWithContext(context.Background())
}
func (i *configurationInstallPatchesPtrType) ToConfigurationInstallPatchesPtrOutputWithContext(ctx context.Context) ConfigurationInstallPatchesPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationInstallPatchesPtrOutput)
}
type ConfigurationInstallPatchesOutput struct{ *pulumi.OutputState }
func (ConfigurationInstallPatchesOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ConfigurationInstallPatches)(nil)).Elem()
}
func (o ConfigurationInstallPatchesOutput) ToConfigurationInstallPatchesOutput() ConfigurationInstallPatchesOutput {
return o
}
func (o ConfigurationInstallPatchesOutput) ToConfigurationInstallPatchesOutputWithContext(ctx context.Context) ConfigurationInstallPatchesOutput {
return o
}
func (o ConfigurationInstallPatchesOutput) ToConfigurationInstallPatchesPtrOutput() ConfigurationInstallPatchesPtrOutput {
return o.ToConfigurationInstallPatchesPtrOutputWithContext(context.Background())
}
func (o ConfigurationInstallPatchesOutput) ToConfigurationInstallPatchesPtrOutputWithContext(ctx context.Context) ConfigurationInstallPatchesPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ConfigurationInstallPatches) *ConfigurationInstallPatches {
return &v
}).(ConfigurationInstallPatchesPtrOutput)
}
// A `linux` block as defined above. This property only applies when `scope` is set to `InGuestPatch`
func (o ConfigurationInstallPatchesOutput) Linuxes() ConfigurationInstallPatchesLinuxArrayOutput {
return o.ApplyT(func(v ConfigurationInstallPatches) []ConfigurationInstallPatchesLinux { return v.Linuxes }).(ConfigurationInstallPatchesLinuxArrayOutput)
}
// Possible reboot preference as defined by the user based on which it would be decided to reboot the machine or not after the patch operation is completed. Possible values are `Always`, `IfRequired` and `Never`. This property only applies when `scope` is set to `InGuestPatch`.
func (o ConfigurationInstallPatchesOutput) Reboot() pulumi.StringPtrOutput {
return o.ApplyT(func(v ConfigurationInstallPatches) *string { return v.Reboot }).(pulumi.StringPtrOutput)
}
// A `windows` block as defined above. This property only applies when `scope` is set to `InGuestPatch`
func (o ConfigurationInstallPatchesOutput) Windows() ConfigurationInstallPatchesWindowArrayOutput {
return o.ApplyT(func(v ConfigurationInstallPatches) []ConfigurationInstallPatchesWindow { return v.Windows }).(ConfigurationInstallPatchesWindowArrayOutput)
}
type ConfigurationInstallPatchesPtrOutput struct{ *pulumi.OutputState }
func (ConfigurationInstallPatchesPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ConfigurationInstallPatches)(nil)).Elem()
}
func (o ConfigurationInstallPatchesPtrOutput) ToConfigurationInstallPatchesPtrOutput() ConfigurationInstallPatchesPtrOutput {
return o
}
func (o ConfigurationInstallPatchesPtrOutput) ToConfigurationInstallPatchesPtrOutputWithContext(ctx context.Context) ConfigurationInstallPatchesPtrOutput {
return o
}
func (o ConfigurationInstallPatchesPtrOutput) Elem() ConfigurationInstallPatchesOutput {
return o.ApplyT(func(v *ConfigurationInstallPatches) ConfigurationInstallPatches {
if v != nil {
return *v
}
var ret ConfigurationInstallPatches
return ret
}).(ConfigurationInstallPatchesOutput)
}
// A `linux` block as defined above. This property only applies when `scope` is set to `InGuestPatch`
func (o ConfigurationInstallPatchesPtrOutput) Linuxes() ConfigurationInstallPatchesLinuxArrayOutput {
return o.ApplyT(func(v *ConfigurationInstallPatches) []ConfigurationInstallPatchesLinux {
if v == nil {
return nil
}
return v.Linuxes
}).(ConfigurationInstallPatchesLinuxArrayOutput)
}
// Possible reboot preference as defined by the user based on which it would be decided to reboot the machine or not after the patch operation is completed. Possible values are `Always`, `IfRequired` and `Never`. This property only applies when `scope` is set to `InGuestPatch`.
func (o ConfigurationInstallPatchesPtrOutput) Reboot() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ConfigurationInstallPatches) *string {
if v == nil {
return nil
}
return v.Reboot
}).(pulumi.StringPtrOutput)
}
// A `windows` block as defined above. This property only applies when `scope` is set to `InGuestPatch`
func (o ConfigurationInstallPatchesPtrOutput) Windows() ConfigurationInstallPatchesWindowArrayOutput {
return o.ApplyT(func(v *ConfigurationInstallPatches) []ConfigurationInstallPatchesWindow {
if v == nil {
return nil
}
return v.Windows
}).(ConfigurationInstallPatchesWindowArrayOutput)
}
type ConfigurationInstallPatchesLinux struct {
// List of Classification category of patches to be patched. Possible values are `Critical`, `Security` and `Other`.
ClassificationsToIncludes []string `pulumi:"classificationsToIncludes"`
// List of package names to be excluded from patching.
PackageNamesMaskToExcludes []string `pulumi:"packageNamesMaskToExcludes"`
// List of package names to be included for patching.
PackageNamesMaskToIncludes []string `pulumi:"packageNamesMaskToIncludes"`
}
// ConfigurationInstallPatchesLinuxInput is an input type that accepts ConfigurationInstallPatchesLinuxArgs and ConfigurationInstallPatchesLinuxOutput values.
// You can construct a concrete instance of `ConfigurationInstallPatchesLinuxInput` via:
//
// ConfigurationInstallPatchesLinuxArgs{...}
type ConfigurationInstallPatchesLinuxInput interface {
pulumi.Input
ToConfigurationInstallPatchesLinuxOutput() ConfigurationInstallPatchesLinuxOutput
ToConfigurationInstallPatchesLinuxOutputWithContext(context.Context) ConfigurationInstallPatchesLinuxOutput
}
type ConfigurationInstallPatchesLinuxArgs struct {
// List of Classification category of patches to be patched. Possible values are `Critical`, `Security` and `Other`.
ClassificationsToIncludes pulumi.StringArrayInput `pulumi:"classificationsToIncludes"`
// List of package names to be excluded from patching.
PackageNamesMaskToExcludes pulumi.StringArrayInput `pulumi:"packageNamesMaskToExcludes"`
// List of package names to be included for patching.
PackageNamesMaskToIncludes pulumi.StringArrayInput `pulumi:"packageNamesMaskToIncludes"`
}
func (ConfigurationInstallPatchesLinuxArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ConfigurationInstallPatchesLinux)(nil)).Elem()
}
func (i ConfigurationInstallPatchesLinuxArgs) ToConfigurationInstallPatchesLinuxOutput() ConfigurationInstallPatchesLinuxOutput {
return i.ToConfigurationInstallPatchesLinuxOutputWithContext(context.Background())
}
func (i ConfigurationInstallPatchesLinuxArgs) ToConfigurationInstallPatchesLinuxOutputWithContext(ctx context.Context) ConfigurationInstallPatchesLinuxOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationInstallPatchesLinuxOutput)
}
// ConfigurationInstallPatchesLinuxArrayInput is an input type that accepts ConfigurationInstallPatchesLinuxArray and ConfigurationInstallPatchesLinuxArrayOutput values.
// You can construct a concrete instance of `ConfigurationInstallPatchesLinuxArrayInput` via:
//
// ConfigurationInstallPatchesLinuxArray{ ConfigurationInstallPatchesLinuxArgs{...} }
type ConfigurationInstallPatchesLinuxArrayInput interface {
pulumi.Input
ToConfigurationInstallPatchesLinuxArrayOutput() ConfigurationInstallPatchesLinuxArrayOutput
ToConfigurationInstallPatchesLinuxArrayOutputWithContext(context.Context) ConfigurationInstallPatchesLinuxArrayOutput
}
type ConfigurationInstallPatchesLinuxArray []ConfigurationInstallPatchesLinuxInput
func (ConfigurationInstallPatchesLinuxArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ConfigurationInstallPatchesLinux)(nil)).Elem()
}
func (i ConfigurationInstallPatchesLinuxArray) ToConfigurationInstallPatchesLinuxArrayOutput() ConfigurationInstallPatchesLinuxArrayOutput {
return i.ToConfigurationInstallPatchesLinuxArrayOutputWithContext(context.Background())
}
func (i ConfigurationInstallPatchesLinuxArray) ToConfigurationInstallPatchesLinuxArrayOutputWithContext(ctx context.Context) ConfigurationInstallPatchesLinuxArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationInstallPatchesLinuxArrayOutput)
}
type ConfigurationInstallPatchesLinuxOutput struct{ *pulumi.OutputState }
func (ConfigurationInstallPatchesLinuxOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ConfigurationInstallPatchesLinux)(nil)).Elem()
}
func (o ConfigurationInstallPatchesLinuxOutput) ToConfigurationInstallPatchesLinuxOutput() ConfigurationInstallPatchesLinuxOutput {
return o
}
func (o ConfigurationInstallPatchesLinuxOutput) ToConfigurationInstallPatchesLinuxOutputWithContext(ctx context.Context) ConfigurationInstallPatchesLinuxOutput {
return o
}
// List of Classification category of patches to be patched. Possible values are `Critical`, `Security` and `Other`.
func (o ConfigurationInstallPatchesLinuxOutput) ClassificationsToIncludes() pulumi.StringArrayOutput {
return o.ApplyT(func(v ConfigurationInstallPatchesLinux) []string { return v.ClassificationsToIncludes }).(pulumi.StringArrayOutput)
}
// List of package names to be excluded from patching.
func (o ConfigurationInstallPatchesLinuxOutput) PackageNamesMaskToExcludes() pulumi.StringArrayOutput {
return o.ApplyT(func(v ConfigurationInstallPatchesLinux) []string { return v.PackageNamesMaskToExcludes }).(pulumi.StringArrayOutput)
}
// List of package names to be included for patching.
func (o ConfigurationInstallPatchesLinuxOutput) PackageNamesMaskToIncludes() pulumi.StringArrayOutput {
return o.ApplyT(func(v ConfigurationInstallPatchesLinux) []string { return v.PackageNamesMaskToIncludes }).(pulumi.StringArrayOutput)
}
type ConfigurationInstallPatchesLinuxArrayOutput struct{ *pulumi.OutputState }
func (ConfigurationInstallPatchesLinuxArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ConfigurationInstallPatchesLinux)(nil)).Elem()
}
func (o ConfigurationInstallPatchesLinuxArrayOutput) ToConfigurationInstallPatchesLinuxArrayOutput() ConfigurationInstallPatchesLinuxArrayOutput {
return o
}
func (o ConfigurationInstallPatchesLinuxArrayOutput) ToConfigurationInstallPatchesLinuxArrayOutputWithContext(ctx context.Context) ConfigurationInstallPatchesLinuxArrayOutput {
return o
}
func (o ConfigurationInstallPatchesLinuxArrayOutput) Index(i pulumi.IntInput) ConfigurationInstallPatchesLinuxOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ConfigurationInstallPatchesLinux {
return vs[0].([]ConfigurationInstallPatchesLinux)[vs[1].(int)]
}).(ConfigurationInstallPatchesLinuxOutput)
}
type ConfigurationInstallPatchesWindow struct {
// List of Classification category of patches to be patched. Possible values are `Critical`, `Security`, `UpdateRollup`, `FeaturePack`, `ServicePack`, `Definition`, `Tools` and `Updates`.
ClassificationsToIncludes []string `pulumi:"classificationsToIncludes"`
// List of KB numbers to be excluded from patching.
KbNumbersToExcludes []string `pulumi:"kbNumbersToExcludes"`
// List of KB numbers to be included for patching.
KbNumbersToIncludes []string `pulumi:"kbNumbersToIncludes"`
}
// ConfigurationInstallPatchesWindowInput is an input type that accepts ConfigurationInstallPatchesWindowArgs and ConfigurationInstallPatchesWindowOutput values.
// You can construct a concrete instance of `ConfigurationInstallPatchesWindowInput` via:
//
// ConfigurationInstallPatchesWindowArgs{...}
type ConfigurationInstallPatchesWindowInput interface {
pulumi.Input
ToConfigurationInstallPatchesWindowOutput() ConfigurationInstallPatchesWindowOutput
ToConfigurationInstallPatchesWindowOutputWithContext(context.Context) ConfigurationInstallPatchesWindowOutput
}
type ConfigurationInstallPatchesWindowArgs struct {
// List of Classification category of patches to be patched. Possible values are `Critical`, `Security`, `UpdateRollup`, `FeaturePack`, `ServicePack`, `Definition`, `Tools` and `Updates`.
ClassificationsToIncludes pulumi.StringArrayInput `pulumi:"classificationsToIncludes"`
// List of KB numbers to be excluded from patching.
KbNumbersToExcludes pulumi.StringArrayInput `pulumi:"kbNumbersToExcludes"`
// List of KB numbers to be included for patching.
KbNumbersToIncludes pulumi.StringArrayInput `pulumi:"kbNumbersToIncludes"`
}
func (ConfigurationInstallPatchesWindowArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ConfigurationInstallPatchesWindow)(nil)).Elem()
}
func (i ConfigurationInstallPatchesWindowArgs) ToConfigurationInstallPatchesWindowOutput() ConfigurationInstallPatchesWindowOutput {
return i.ToConfigurationInstallPatchesWindowOutputWithContext(context.Background())
}
func (i ConfigurationInstallPatchesWindowArgs) ToConfigurationInstallPatchesWindowOutputWithContext(ctx context.Context) ConfigurationInstallPatchesWindowOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationInstallPatchesWindowOutput)
}
// ConfigurationInstallPatchesWindowArrayInput is an input type that accepts ConfigurationInstallPatchesWindowArray and ConfigurationInstallPatchesWindowArrayOutput values.
| 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/maintenance/assignmentDynamicScope.go | sdk/go/azure/maintenance/assignmentDynamicScope.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package maintenance
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Dynamic Maintenance Assignment.
//
// > **Note:** Only valid for `InGuestPatch` Maintenance Configuration Scopes.
//
// ## Import
//
// Dynamic Maintenance Assignments can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:maintenance/assignmentDynamicScope:AssignmentDynamicScope example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Maintenance/configurationAssignments/assignmentName
// ```
type AssignmentDynamicScope struct {
pulumi.CustomResourceState
// A `filter` block as defined below.
Filter AssignmentDynamicScopeFilterOutput `pulumi:"filter"`
// The ID of the Maintenance Configuration Resource. Changing this forces a new Dynamic Maintenance Assignment to be created.
MaintenanceConfigurationId pulumi.StringOutput `pulumi:"maintenanceConfigurationId"`
// The name which should be used for this Dynamic Maintenance Assignment. Changing this forces a new Dynamic Maintenance Assignment to be created.
//
// > **Note:** The `name` must be unique per subscription.
Name pulumi.StringOutput `pulumi:"name"`
}
// NewAssignmentDynamicScope registers a new resource with the given unique name, arguments, and options.
func NewAssignmentDynamicScope(ctx *pulumi.Context,
name string, args *AssignmentDynamicScopeArgs, opts ...pulumi.ResourceOption) (*AssignmentDynamicScope, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Filter == nil {
return nil, errors.New("invalid value for required argument 'Filter'")
}
if args.MaintenanceConfigurationId == nil {
return nil, errors.New("invalid value for required argument 'MaintenanceConfigurationId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AssignmentDynamicScope
err := ctx.RegisterResource("azure:maintenance/assignmentDynamicScope:AssignmentDynamicScope", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAssignmentDynamicScope gets an existing AssignmentDynamicScope 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 GetAssignmentDynamicScope(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AssignmentDynamicScopeState, opts ...pulumi.ResourceOption) (*AssignmentDynamicScope, error) {
var resource AssignmentDynamicScope
err := ctx.ReadResource("azure:maintenance/assignmentDynamicScope:AssignmentDynamicScope", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AssignmentDynamicScope resources.
type assignmentDynamicScopeState struct {
// A `filter` block as defined below.
Filter *AssignmentDynamicScopeFilter `pulumi:"filter"`
// The ID of the Maintenance Configuration Resource. Changing this forces a new Dynamic Maintenance Assignment to be created.
MaintenanceConfigurationId *string `pulumi:"maintenanceConfigurationId"`
// The name which should be used for this Dynamic Maintenance Assignment. Changing this forces a new Dynamic Maintenance Assignment to be created.
//
// > **Note:** The `name` must be unique per subscription.
Name *string `pulumi:"name"`
}
type AssignmentDynamicScopeState struct {
// A `filter` block as defined below.
Filter AssignmentDynamicScopeFilterPtrInput
// The ID of the Maintenance Configuration Resource. Changing this forces a new Dynamic Maintenance Assignment to be created.
MaintenanceConfigurationId pulumi.StringPtrInput
// The name which should be used for this Dynamic Maintenance Assignment. Changing this forces a new Dynamic Maintenance Assignment to be created.
//
// > **Note:** The `name` must be unique per subscription.
Name pulumi.StringPtrInput
}
func (AssignmentDynamicScopeState) ElementType() reflect.Type {
return reflect.TypeOf((*assignmentDynamicScopeState)(nil)).Elem()
}
type assignmentDynamicScopeArgs struct {
// A `filter` block as defined below.
Filter AssignmentDynamicScopeFilter `pulumi:"filter"`
// The ID of the Maintenance Configuration Resource. Changing this forces a new Dynamic Maintenance Assignment to be created.
MaintenanceConfigurationId string `pulumi:"maintenanceConfigurationId"`
// The name which should be used for this Dynamic Maintenance Assignment. Changing this forces a new Dynamic Maintenance Assignment to be created.
//
// > **Note:** The `name` must be unique per subscription.
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a AssignmentDynamicScope resource.
type AssignmentDynamicScopeArgs struct {
// A `filter` block as defined below.
Filter AssignmentDynamicScopeFilterInput
// The ID of the Maintenance Configuration Resource. Changing this forces a new Dynamic Maintenance Assignment to be created.
MaintenanceConfigurationId pulumi.StringInput
// The name which should be used for this Dynamic Maintenance Assignment. Changing this forces a new Dynamic Maintenance Assignment to be created.
//
// > **Note:** The `name` must be unique per subscription.
Name pulumi.StringPtrInput
}
func (AssignmentDynamicScopeArgs) ElementType() reflect.Type {
return reflect.TypeOf((*assignmentDynamicScopeArgs)(nil)).Elem()
}
type AssignmentDynamicScopeInput interface {
pulumi.Input
ToAssignmentDynamicScopeOutput() AssignmentDynamicScopeOutput
ToAssignmentDynamicScopeOutputWithContext(ctx context.Context) AssignmentDynamicScopeOutput
}
func (*AssignmentDynamicScope) ElementType() reflect.Type {
return reflect.TypeOf((**AssignmentDynamicScope)(nil)).Elem()
}
func (i *AssignmentDynamicScope) ToAssignmentDynamicScopeOutput() AssignmentDynamicScopeOutput {
return i.ToAssignmentDynamicScopeOutputWithContext(context.Background())
}
func (i *AssignmentDynamicScope) ToAssignmentDynamicScopeOutputWithContext(ctx context.Context) AssignmentDynamicScopeOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentDynamicScopeOutput)
}
// AssignmentDynamicScopeArrayInput is an input type that accepts AssignmentDynamicScopeArray and AssignmentDynamicScopeArrayOutput values.
// You can construct a concrete instance of `AssignmentDynamicScopeArrayInput` via:
//
// AssignmentDynamicScopeArray{ AssignmentDynamicScopeArgs{...} }
type AssignmentDynamicScopeArrayInput interface {
pulumi.Input
ToAssignmentDynamicScopeArrayOutput() AssignmentDynamicScopeArrayOutput
ToAssignmentDynamicScopeArrayOutputWithContext(context.Context) AssignmentDynamicScopeArrayOutput
}
type AssignmentDynamicScopeArray []AssignmentDynamicScopeInput
func (AssignmentDynamicScopeArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AssignmentDynamicScope)(nil)).Elem()
}
func (i AssignmentDynamicScopeArray) ToAssignmentDynamicScopeArrayOutput() AssignmentDynamicScopeArrayOutput {
return i.ToAssignmentDynamicScopeArrayOutputWithContext(context.Background())
}
func (i AssignmentDynamicScopeArray) ToAssignmentDynamicScopeArrayOutputWithContext(ctx context.Context) AssignmentDynamicScopeArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentDynamicScopeArrayOutput)
}
// AssignmentDynamicScopeMapInput is an input type that accepts AssignmentDynamicScopeMap and AssignmentDynamicScopeMapOutput values.
// You can construct a concrete instance of `AssignmentDynamicScopeMapInput` via:
//
// AssignmentDynamicScopeMap{ "key": AssignmentDynamicScopeArgs{...} }
type AssignmentDynamicScopeMapInput interface {
pulumi.Input
ToAssignmentDynamicScopeMapOutput() AssignmentDynamicScopeMapOutput
ToAssignmentDynamicScopeMapOutputWithContext(context.Context) AssignmentDynamicScopeMapOutput
}
type AssignmentDynamicScopeMap map[string]AssignmentDynamicScopeInput
func (AssignmentDynamicScopeMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AssignmentDynamicScope)(nil)).Elem()
}
func (i AssignmentDynamicScopeMap) ToAssignmentDynamicScopeMapOutput() AssignmentDynamicScopeMapOutput {
return i.ToAssignmentDynamicScopeMapOutputWithContext(context.Background())
}
func (i AssignmentDynamicScopeMap) ToAssignmentDynamicScopeMapOutputWithContext(ctx context.Context) AssignmentDynamicScopeMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentDynamicScopeMapOutput)
}
type AssignmentDynamicScopeOutput struct{ *pulumi.OutputState }
func (AssignmentDynamicScopeOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AssignmentDynamicScope)(nil)).Elem()
}
func (o AssignmentDynamicScopeOutput) ToAssignmentDynamicScopeOutput() AssignmentDynamicScopeOutput {
return o
}
func (o AssignmentDynamicScopeOutput) ToAssignmentDynamicScopeOutputWithContext(ctx context.Context) AssignmentDynamicScopeOutput {
return o
}
// A `filter` block as defined below.
func (o AssignmentDynamicScopeOutput) Filter() AssignmentDynamicScopeFilterOutput {
return o.ApplyT(func(v *AssignmentDynamicScope) AssignmentDynamicScopeFilterOutput { return v.Filter }).(AssignmentDynamicScopeFilterOutput)
}
// The ID of the Maintenance Configuration Resource. Changing this forces a new Dynamic Maintenance Assignment to be created.
func (o AssignmentDynamicScopeOutput) MaintenanceConfigurationId() pulumi.StringOutput {
return o.ApplyT(func(v *AssignmentDynamicScope) pulumi.StringOutput { return v.MaintenanceConfigurationId }).(pulumi.StringOutput)
}
// The name which should be used for this Dynamic Maintenance Assignment. Changing this forces a new Dynamic Maintenance Assignment to be created.
//
// > **Note:** The `name` must be unique per subscription.
func (o AssignmentDynamicScopeOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AssignmentDynamicScope) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
type AssignmentDynamicScopeArrayOutput struct{ *pulumi.OutputState }
func (AssignmentDynamicScopeArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AssignmentDynamicScope)(nil)).Elem()
}
func (o AssignmentDynamicScopeArrayOutput) ToAssignmentDynamicScopeArrayOutput() AssignmentDynamicScopeArrayOutput {
return o
}
func (o AssignmentDynamicScopeArrayOutput) ToAssignmentDynamicScopeArrayOutputWithContext(ctx context.Context) AssignmentDynamicScopeArrayOutput {
return o
}
func (o AssignmentDynamicScopeArrayOutput) Index(i pulumi.IntInput) AssignmentDynamicScopeOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AssignmentDynamicScope {
return vs[0].([]*AssignmentDynamicScope)[vs[1].(int)]
}).(AssignmentDynamicScopeOutput)
}
type AssignmentDynamicScopeMapOutput struct{ *pulumi.OutputState }
func (AssignmentDynamicScopeMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AssignmentDynamicScope)(nil)).Elem()
}
func (o AssignmentDynamicScopeMapOutput) ToAssignmentDynamicScopeMapOutput() AssignmentDynamicScopeMapOutput {
return o
}
func (o AssignmentDynamicScopeMapOutput) ToAssignmentDynamicScopeMapOutputWithContext(ctx context.Context) AssignmentDynamicScopeMapOutput {
return o
}
func (o AssignmentDynamicScopeMapOutput) MapIndex(k pulumi.StringInput) AssignmentDynamicScopeOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AssignmentDynamicScope {
return vs[0].(map[string]*AssignmentDynamicScope)[vs[1].(string)]
}).(AssignmentDynamicScopeOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentDynamicScopeInput)(nil)).Elem(), &AssignmentDynamicScope{})
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentDynamicScopeArrayInput)(nil)).Elem(), AssignmentDynamicScopeArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentDynamicScopeMapInput)(nil)).Elem(), AssignmentDynamicScopeMap{})
pulumi.RegisterOutputType(AssignmentDynamicScopeOutput{})
pulumi.RegisterOutputType(AssignmentDynamicScopeArrayOutput{})
pulumi.RegisterOutputType(AssignmentDynamicScopeMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/maintenance/getConfiguration.go | sdk/go/azure/maintenance/getConfiguration.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package maintenance
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 Maintenance Configuration.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/maintenance"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := maintenance.LookupConfiguration(ctx, &maintenance.LookupConfigurationArgs{
// Name: "example-mc",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", existingAzurermMaintenanceConfiguration.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Maintenance` - 2023-04-01
func LookupConfiguration(ctx *pulumi.Context, args *LookupConfigurationArgs, opts ...pulumi.InvokeOption) (*LookupConfigurationResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupConfigurationResult
err := ctx.Invoke("azure:maintenance/getConfiguration:getConfiguration", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getConfiguration.
type LookupConfigurationArgs struct {
// Specifies the name of the Maintenance Configuration.
Name string `pulumi:"name"`
// Specifies the name of the Resource Group where this Maintenance Configuration exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getConfiguration.
type LookupConfigurationResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The in guest user patch mode.
InGuestUserPatchMode string `pulumi:"inGuestUserPatchMode"`
// An `installPatches` block as defined below.
InstallPatches []GetConfigurationInstallPatch `pulumi:"installPatches"`
// The Azure location where the resource exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// The properties assigned to the resource.
Properties map[string]string `pulumi:"properties"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The scope of the Maintenance Configuration.
Scope string `pulumi:"scope"`
// A mapping of tags assigned to the resource.
Tags map[string]string `pulumi:"tags"`
// The visibility of the Maintenance Configuration.
Visibility string `pulumi:"visibility"`
// A `window` block as defined below.
Windows []GetConfigurationWindow `pulumi:"windows"`
}
func LookupConfigurationOutput(ctx *pulumi.Context, args LookupConfigurationOutputArgs, opts ...pulumi.InvokeOption) LookupConfigurationResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupConfigurationResultOutput, error) {
args := v.(LookupConfigurationArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:maintenance/getConfiguration:getConfiguration", args, LookupConfigurationResultOutput{}, options).(LookupConfigurationResultOutput), nil
}).(LookupConfigurationResultOutput)
}
// A collection of arguments for invoking getConfiguration.
type LookupConfigurationOutputArgs struct {
// Specifies the name of the Maintenance Configuration.
Name pulumi.StringInput `pulumi:"name"`
// Specifies the name of the Resource Group where this Maintenance Configuration exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupConfigurationOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupConfigurationArgs)(nil)).Elem()
}
// A collection of values returned by getConfiguration.
type LookupConfigurationResultOutput struct{ *pulumi.OutputState }
func (LookupConfigurationResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupConfigurationResult)(nil)).Elem()
}
func (o LookupConfigurationResultOutput) ToLookupConfigurationResultOutput() LookupConfigurationResultOutput {
return o
}
func (o LookupConfigurationResultOutput) ToLookupConfigurationResultOutputWithContext(ctx context.Context) LookupConfigurationResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupConfigurationResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupConfigurationResult) string { return v.Id }).(pulumi.StringOutput)
}
// The in guest user patch mode.
func (o LookupConfigurationResultOutput) InGuestUserPatchMode() pulumi.StringOutput {
return o.ApplyT(func(v LookupConfigurationResult) string { return v.InGuestUserPatchMode }).(pulumi.StringOutput)
}
// An `installPatches` block as defined below.
func (o LookupConfigurationResultOutput) InstallPatches() GetConfigurationInstallPatchArrayOutput {
return o.ApplyT(func(v LookupConfigurationResult) []GetConfigurationInstallPatch { return v.InstallPatches }).(GetConfigurationInstallPatchArrayOutput)
}
// The Azure location where the resource exists.
func (o LookupConfigurationResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupConfigurationResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupConfigurationResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupConfigurationResult) string { return v.Name }).(pulumi.StringOutput)
}
// The properties assigned to the resource.
func (o LookupConfigurationResultOutput) Properties() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupConfigurationResult) map[string]string { return v.Properties }).(pulumi.StringMapOutput)
}
func (o LookupConfigurationResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupConfigurationResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The scope of the Maintenance Configuration.
func (o LookupConfigurationResultOutput) Scope() pulumi.StringOutput {
return o.ApplyT(func(v LookupConfigurationResult) string { return v.Scope }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the resource.
func (o LookupConfigurationResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupConfigurationResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The visibility of the Maintenance Configuration.
func (o LookupConfigurationResultOutput) Visibility() pulumi.StringOutput {
return o.ApplyT(func(v LookupConfigurationResult) string { return v.Visibility }).(pulumi.StringOutput)
}
// A `window` block as defined below.
func (o LookupConfigurationResultOutput) Windows() GetConfigurationWindowArrayOutput {
return o.ApplyT(func(v LookupConfigurationResult) []GetConfigurationWindow { return v.Windows }).(GetConfigurationWindowArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupConfigurationResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/maintenance/configuration.go | sdk/go/azure/maintenance/configuration.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package maintenance
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a maintenance 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/maintenance"
// "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 = maintenance.NewConfiguration(ctx, "example", &maintenance.ConfigurationArgs{
// Name: pulumi.String("example-mc"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Scope: pulumi.String("SQLDB"),
// Tags: pulumi.StringMap{
// "Env": pulumi.String("prod"),
// },
// })
// 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.Maintenance` - 2023-04-01
//
// ## Import
//
// Maintenance Configuration can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:maintenance/configuration:Configuration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Maintenance/maintenanceConfigurations/example-mc
// ```
type Configuration struct {
pulumi.CustomResourceState
// The in guest user patch mode. Possible values are `Platform` or `User`. Must be specified when `scope` is `InGuestPatch`.
InGuestUserPatchMode pulumi.StringPtrOutput `pulumi:"inGuestUserPatchMode"`
// An `installPatches` block as defined below.
//
// > **Note:** `installPatches` must be specified when `scope` is `InGuestPatch`.
InstallPatches ConfigurationInstallPatchesPtrOutput `pulumi:"installPatches"`
// Specified 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 Maintenance Configuration. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A mapping of properties to assign to the resource.
Properties pulumi.StringMapOutput `pulumi:"properties"`
// The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The scope of the Maintenance Configuration. Possible values are `Extension`, `Host`, `InGuestPatch`, `OSImage`, `SQLDB` or `SQLManagedInstance`.
Scope pulumi.StringOutput `pulumi:"scope"`
// A mapping of tags to assign to the resource. The key could not contain upper case letter.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The visibility of the Maintenance Configuration. The only allowable value is `Custom`. Defaults to `Custom`.
Visibility pulumi.StringPtrOutput `pulumi:"visibility"`
// A `window` block as defined below.
Window ConfigurationWindowPtrOutput `pulumi:"window"`
}
// NewConfiguration registers a new resource with the given unique name, arguments, and options.
func NewConfiguration(ctx *pulumi.Context,
name string, args *ConfigurationArgs, opts ...pulumi.ResourceOption) (*Configuration, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Scope == nil {
return nil, errors.New("invalid value for required argument 'Scope'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Configuration
err := ctx.RegisterResource("azure:maintenance/configuration:Configuration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetConfiguration gets an existing Configuration resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetConfiguration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ConfigurationState, opts ...pulumi.ResourceOption) (*Configuration, error) {
var resource Configuration
err := ctx.ReadResource("azure:maintenance/configuration:Configuration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Configuration resources.
type configurationState struct {
// The in guest user patch mode. Possible values are `Platform` or `User`. Must be specified when `scope` is `InGuestPatch`.
InGuestUserPatchMode *string `pulumi:"inGuestUserPatchMode"`
// An `installPatches` block as defined below.
//
// > **Note:** `installPatches` must be specified when `scope` is `InGuestPatch`.
InstallPatches *ConfigurationInstallPatches `pulumi:"installPatches"`
// Specified 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 Maintenance Configuration. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A mapping of properties to assign to the resource.
Properties map[string]string `pulumi:"properties"`
// The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The scope of the Maintenance Configuration. Possible values are `Extension`, `Host`, `InGuestPatch`, `OSImage`, `SQLDB` or `SQLManagedInstance`.
Scope *string `pulumi:"scope"`
// A mapping of tags to assign to the resource. The key could not contain upper case letter.
Tags map[string]string `pulumi:"tags"`
// The visibility of the Maintenance Configuration. The only allowable value is `Custom`. Defaults to `Custom`.
Visibility *string `pulumi:"visibility"`
// A `window` block as defined below.
Window *ConfigurationWindow `pulumi:"window"`
}
type ConfigurationState struct {
// The in guest user patch mode. Possible values are `Platform` or `User`. Must be specified when `scope` is `InGuestPatch`.
InGuestUserPatchMode pulumi.StringPtrInput
// An `installPatches` block as defined below.
//
// > **Note:** `installPatches` must be specified when `scope` is `InGuestPatch`.
InstallPatches ConfigurationInstallPatchesPtrInput
// Specified 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 Maintenance Configuration. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A mapping of properties to assign to the resource.
Properties pulumi.StringMapInput
// The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The scope of the Maintenance Configuration. Possible values are `Extension`, `Host`, `InGuestPatch`, `OSImage`, `SQLDB` or `SQLManagedInstance`.
Scope pulumi.StringPtrInput
// A mapping of tags to assign to the resource. The key could not contain upper case letter.
Tags pulumi.StringMapInput
// The visibility of the Maintenance Configuration. The only allowable value is `Custom`. Defaults to `Custom`.
Visibility pulumi.StringPtrInput
// A `window` block as defined below.
Window ConfigurationWindowPtrInput
}
func (ConfigurationState) ElementType() reflect.Type {
return reflect.TypeOf((*configurationState)(nil)).Elem()
}
type configurationArgs struct {
// The in guest user patch mode. Possible values are `Platform` or `User`. Must be specified when `scope` is `InGuestPatch`.
InGuestUserPatchMode *string `pulumi:"inGuestUserPatchMode"`
// An `installPatches` block as defined below.
//
// > **Note:** `installPatches` must be specified when `scope` is `InGuestPatch`.
InstallPatches *ConfigurationInstallPatches `pulumi:"installPatches"`
// Specified 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 Maintenance Configuration. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// A mapping of properties to assign to the resource.
Properties map[string]string `pulumi:"properties"`
// The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The scope of the Maintenance Configuration. Possible values are `Extension`, `Host`, `InGuestPatch`, `OSImage`, `SQLDB` or `SQLManagedInstance`.
Scope string `pulumi:"scope"`
// A mapping of tags to assign to the resource. The key could not contain upper case letter.
Tags map[string]string `pulumi:"tags"`
// The visibility of the Maintenance Configuration. The only allowable value is `Custom`. Defaults to `Custom`.
Visibility *string `pulumi:"visibility"`
// A `window` block as defined below.
Window *ConfigurationWindow `pulumi:"window"`
}
// The set of arguments for constructing a Configuration resource.
type ConfigurationArgs struct {
// The in guest user patch mode. Possible values are `Platform` or `User`. Must be specified when `scope` is `InGuestPatch`.
InGuestUserPatchMode pulumi.StringPtrInput
// An `installPatches` block as defined below.
//
// > **Note:** `installPatches` must be specified when `scope` is `InGuestPatch`.
InstallPatches ConfigurationInstallPatchesPtrInput
// Specified 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 Maintenance Configuration. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// A mapping of properties to assign to the resource.
Properties pulumi.StringMapInput
// The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The scope of the Maintenance Configuration. Possible values are `Extension`, `Host`, `InGuestPatch`, `OSImage`, `SQLDB` or `SQLManagedInstance`.
Scope pulumi.StringInput
// A mapping of tags to assign to the resource. The key could not contain upper case letter.
Tags pulumi.StringMapInput
// The visibility of the Maintenance Configuration. The only allowable value is `Custom`. Defaults to `Custom`.
Visibility pulumi.StringPtrInput
// A `window` block as defined below.
Window ConfigurationWindowPtrInput
}
func (ConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*configurationArgs)(nil)).Elem()
}
type ConfigurationInput interface {
pulumi.Input
ToConfigurationOutput() ConfigurationOutput
ToConfigurationOutputWithContext(ctx context.Context) ConfigurationOutput
}
func (*Configuration) ElementType() reflect.Type {
return reflect.TypeOf((**Configuration)(nil)).Elem()
}
func (i *Configuration) ToConfigurationOutput() ConfigurationOutput {
return i.ToConfigurationOutputWithContext(context.Background())
}
func (i *Configuration) ToConfigurationOutputWithContext(ctx context.Context) ConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationOutput)
}
// ConfigurationArrayInput is an input type that accepts ConfigurationArray and ConfigurationArrayOutput values.
// You can construct a concrete instance of `ConfigurationArrayInput` via:
//
// ConfigurationArray{ ConfigurationArgs{...} }
type ConfigurationArrayInput interface {
pulumi.Input
ToConfigurationArrayOutput() ConfigurationArrayOutput
ToConfigurationArrayOutputWithContext(context.Context) ConfigurationArrayOutput
}
type ConfigurationArray []ConfigurationInput
func (ConfigurationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Configuration)(nil)).Elem()
}
func (i ConfigurationArray) ToConfigurationArrayOutput() ConfigurationArrayOutput {
return i.ToConfigurationArrayOutputWithContext(context.Background())
}
func (i ConfigurationArray) ToConfigurationArrayOutputWithContext(ctx context.Context) ConfigurationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationArrayOutput)
}
// ConfigurationMapInput is an input type that accepts ConfigurationMap and ConfigurationMapOutput values.
// You can construct a concrete instance of `ConfigurationMapInput` via:
//
// ConfigurationMap{ "key": ConfigurationArgs{...} }
type ConfigurationMapInput interface {
pulumi.Input
ToConfigurationMapOutput() ConfigurationMapOutput
ToConfigurationMapOutputWithContext(context.Context) ConfigurationMapOutput
}
type ConfigurationMap map[string]ConfigurationInput
func (ConfigurationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Configuration)(nil)).Elem()
}
func (i ConfigurationMap) ToConfigurationMapOutput() ConfigurationMapOutput {
return i.ToConfigurationMapOutputWithContext(context.Background())
}
func (i ConfigurationMap) ToConfigurationMapOutputWithContext(ctx context.Context) ConfigurationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConfigurationMapOutput)
}
type ConfigurationOutput struct{ *pulumi.OutputState }
func (ConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Configuration)(nil)).Elem()
}
func (o ConfigurationOutput) ToConfigurationOutput() ConfigurationOutput {
return o
}
func (o ConfigurationOutput) ToConfigurationOutputWithContext(ctx context.Context) ConfigurationOutput {
return o
}
// The in guest user patch mode. Possible values are `Platform` or `User`. Must be specified when `scope` is `InGuestPatch`.
func (o ConfigurationOutput) InGuestUserPatchMode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Configuration) pulumi.StringPtrOutput { return v.InGuestUserPatchMode }).(pulumi.StringPtrOutput)
}
// An `installPatches` block as defined below.
//
// > **Note:** `installPatches` must be specified when `scope` is `InGuestPatch`.
func (o ConfigurationOutput) InstallPatches() ConfigurationInstallPatchesPtrOutput {
return o.ApplyT(func(v *Configuration) ConfigurationInstallPatchesPtrOutput { return v.InstallPatches }).(ConfigurationInstallPatchesPtrOutput)
}
// Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o ConfigurationOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created.
func (o ConfigurationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A mapping of properties to assign to the resource.
func (o ConfigurationOutput) Properties() pulumi.StringMapOutput {
return o.ApplyT(func(v *Configuration) pulumi.StringMapOutput { return v.Properties }).(pulumi.StringMapOutput)
}
// The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created.
func (o ConfigurationOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The scope of the Maintenance Configuration. Possible values are `Extension`, `Host`, `InGuestPatch`, `OSImage`, `SQLDB` or `SQLManagedInstance`.
func (o ConfigurationOutput) Scope() pulumi.StringOutput {
return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.Scope }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource. The key could not contain upper case letter.
func (o ConfigurationOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Configuration) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The visibility of the Maintenance Configuration. The only allowable value is `Custom`. Defaults to `Custom`.
func (o ConfigurationOutput) Visibility() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Configuration) pulumi.StringPtrOutput { return v.Visibility }).(pulumi.StringPtrOutput)
}
// A `window` block as defined below.
func (o ConfigurationOutput) Window() ConfigurationWindowPtrOutput {
return o.ApplyT(func(v *Configuration) ConfigurationWindowPtrOutput { return v.Window }).(ConfigurationWindowPtrOutput)
}
type ConfigurationArrayOutput struct{ *pulumi.OutputState }
func (ConfigurationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Configuration)(nil)).Elem()
}
func (o ConfigurationArrayOutput) ToConfigurationArrayOutput() ConfigurationArrayOutput {
return o
}
func (o ConfigurationArrayOutput) ToConfigurationArrayOutputWithContext(ctx context.Context) ConfigurationArrayOutput {
return o
}
func (o ConfigurationArrayOutput) Index(i pulumi.IntInput) ConfigurationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Configuration {
return vs[0].([]*Configuration)[vs[1].(int)]
}).(ConfigurationOutput)
}
type ConfigurationMapOutput struct{ *pulumi.OutputState }
func (ConfigurationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Configuration)(nil)).Elem()
}
func (o ConfigurationMapOutput) ToConfigurationMapOutput() ConfigurationMapOutput {
return o
}
func (o ConfigurationMapOutput) ToConfigurationMapOutputWithContext(ctx context.Context) ConfigurationMapOutput {
return o
}
func (o ConfigurationMapOutput) MapIndex(k pulumi.StringInput) ConfigurationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Configuration {
return vs[0].(map[string]*Configuration)[vs[1].(string)]
}).(ConfigurationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationInput)(nil)).Elem(), &Configuration{})
pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationArrayInput)(nil)).Elem(), ConfigurationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationMapInput)(nil)).Elem(), ConfigurationMap{})
pulumi.RegisterOutputType(ConfigurationOutput{})
pulumi.RegisterOutputType(ConfigurationArrayOutput{})
pulumi.RegisterOutputType(ConfigurationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/maintenance/getPublicConfigurations.go | sdk/go/azure/maintenance/getPublicConfigurations.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package maintenance
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 Public Maintenance Configurations.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/maintenance"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// existing, err := maintenance.GetPublicConfigurations(ctx, &maintenance.GetPublicConfigurationsArgs{
// Location: pulumi.StringRef("West Europe"),
// Scope: pulumi.StringRef("SQLManagedInstance"),
// RecurEvery: pulumi.StringRef("Monday-Thursday"),
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("name", existing.Configs[0].Name)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Maintenance` - 2023-04-01
func GetPublicConfigurations(ctx *pulumi.Context, args *GetPublicConfigurationsArgs, opts ...pulumi.InvokeOption) (*GetPublicConfigurationsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetPublicConfigurationsResult
err := ctx.Invoke("azure:maintenance/getPublicConfigurations:getPublicConfigurations", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getPublicConfigurations.
type GetPublicConfigurationsArgs struct {
// The Azure location to filter the list of Public Maintenance Configurations against.
Location *string `pulumi:"location"`
// The recurring window to filter the list of Public Maintenance Configurations against. Possible values are `Monday-Thursday` and `Friday-Sunday`
RecurEvery *string `pulumi:"recurEvery"`
// The scope to filter the list of Public Maintenance Configurations against. Possible values are `Extension`, `Host`, `InGuestPatch`, `OSImage`, `SQLDB` and `SQLManagedInstance`.
Scope *string `pulumi:"scope"`
}
// A collection of values returned by getPublicConfigurations.
type GetPublicConfigurationsResult struct {
// A `configs` block as defined below.
Configs []GetPublicConfigurationsConfig `pulumi:"configs"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure location of the Public Maintenance Configuration.
Location *string `pulumi:"location"`
// The rate at which a maintenance window is expected to recur.
RecurEvery *string `pulumi:"recurEvery"`
Scope *string `pulumi:"scope"`
}
func GetPublicConfigurationsOutput(ctx *pulumi.Context, args GetPublicConfigurationsOutputArgs, opts ...pulumi.InvokeOption) GetPublicConfigurationsResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetPublicConfigurationsResultOutput, error) {
args := v.(GetPublicConfigurationsArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:maintenance/getPublicConfigurations:getPublicConfigurations", args, GetPublicConfigurationsResultOutput{}, options).(GetPublicConfigurationsResultOutput), nil
}).(GetPublicConfigurationsResultOutput)
}
// A collection of arguments for invoking getPublicConfigurations.
type GetPublicConfigurationsOutputArgs struct {
// The Azure location to filter the list of Public Maintenance Configurations against.
Location pulumi.StringPtrInput `pulumi:"location"`
// The recurring window to filter the list of Public Maintenance Configurations against. Possible values are `Monday-Thursday` and `Friday-Sunday`
RecurEvery pulumi.StringPtrInput `pulumi:"recurEvery"`
// The scope to filter the list of Public Maintenance Configurations against. Possible values are `Extension`, `Host`, `InGuestPatch`, `OSImage`, `SQLDB` and `SQLManagedInstance`.
Scope pulumi.StringPtrInput `pulumi:"scope"`
}
func (GetPublicConfigurationsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetPublicConfigurationsArgs)(nil)).Elem()
}
// A collection of values returned by getPublicConfigurations.
type GetPublicConfigurationsResultOutput struct{ *pulumi.OutputState }
func (GetPublicConfigurationsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetPublicConfigurationsResult)(nil)).Elem()
}
func (o GetPublicConfigurationsResultOutput) ToGetPublicConfigurationsResultOutput() GetPublicConfigurationsResultOutput {
return o
}
func (o GetPublicConfigurationsResultOutput) ToGetPublicConfigurationsResultOutputWithContext(ctx context.Context) GetPublicConfigurationsResultOutput {
return o
}
// A `configs` block as defined below.
func (o GetPublicConfigurationsResultOutput) Configs() GetPublicConfigurationsConfigArrayOutput {
return o.ApplyT(func(v GetPublicConfigurationsResult) []GetPublicConfigurationsConfig { return v.Configs }).(GetPublicConfigurationsConfigArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetPublicConfigurationsResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetPublicConfigurationsResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Azure location of the Public Maintenance Configuration.
func (o GetPublicConfigurationsResultOutput) Location() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetPublicConfigurationsResult) *string { return v.Location }).(pulumi.StringPtrOutput)
}
// The rate at which a maintenance window is expected to recur.
func (o GetPublicConfigurationsResultOutput) RecurEvery() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetPublicConfigurationsResult) *string { return v.RecurEvery }).(pulumi.StringPtrOutput)
}
func (o GetPublicConfigurationsResultOutput) Scope() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetPublicConfigurationsResult) *string { return v.Scope }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetPublicConfigurationsResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/maintenance/assignmentDedicatedHost.go | sdk/go/azure/maintenance/assignmentDedicatedHost.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package maintenance
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a maintenance assignment to Dedicated Host.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/maintenance"
// "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
// }
// exampleDedicatedHostGroup, err := compute.NewDedicatedHostGroup(ctx, "example", &compute.DedicatedHostGroupArgs{
// Name: pulumi.String("example-host-group"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// PlatformFaultDomainCount: pulumi.Int(2),
// })
// if err != nil {
// return err
// }
// exampleDedicatedHost, err := compute.NewDedicatedHost(ctx, "example", &compute.DedicatedHostArgs{
// Name: pulumi.String("example-host"),
// Location: example.Location,
// DedicatedHostGroupId: exampleDedicatedHostGroup.ID(),
// SkuName: pulumi.String("DSv3-Type3"),
// PlatformFaultDomain: pulumi.Int(1),
// })
// if err != nil {
// return err
// }
// exampleConfiguration, err := maintenance.NewConfiguration(ctx, "example", &maintenance.ConfigurationArgs{
// Name: pulumi.String("example-mc"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Scope: pulumi.String("Host"),
// })
// if err != nil {
// return err
// }
// _, err = maintenance.NewAssignmentDedicatedHost(ctx, "example", &maintenance.AssignmentDedicatedHostArgs{
// Location: example.Location,
// MaintenanceConfigurationId: exampleConfiguration.ID(),
// DedicatedHostId: exampleDedicatedHost.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.Maintenance` - 2023-04-01
//
// ## Import
//
// Maintenance Assignment can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:maintenance/assignmentDedicatedHost:AssignmentDedicatedHost example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Compute/hostGroups/group1/hosts/host1/providers/Microsoft.Maintenance/configurationAssignments/assign1
// ```
type AssignmentDedicatedHost struct {
pulumi.CustomResourceState
// Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
DedicatedHostId pulumi.StringOutput `pulumi:"dedicatedHostId"`
// 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 ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
MaintenanceConfigurationId pulumi.StringOutput `pulumi:"maintenanceConfigurationId"`
}
// NewAssignmentDedicatedHost registers a new resource with the given unique name, arguments, and options.
func NewAssignmentDedicatedHost(ctx *pulumi.Context,
name string, args *AssignmentDedicatedHostArgs, opts ...pulumi.ResourceOption) (*AssignmentDedicatedHost, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DedicatedHostId == nil {
return nil, errors.New("invalid value for required argument 'DedicatedHostId'")
}
if args.MaintenanceConfigurationId == nil {
return nil, errors.New("invalid value for required argument 'MaintenanceConfigurationId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AssignmentDedicatedHost
err := ctx.RegisterResource("azure:maintenance/assignmentDedicatedHost:AssignmentDedicatedHost", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAssignmentDedicatedHost gets an existing AssignmentDedicatedHost 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 GetAssignmentDedicatedHost(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AssignmentDedicatedHostState, opts ...pulumi.ResourceOption) (*AssignmentDedicatedHost, error) {
var resource AssignmentDedicatedHost
err := ctx.ReadResource("azure:maintenance/assignmentDedicatedHost:AssignmentDedicatedHost", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AssignmentDedicatedHost resources.
type assignmentDedicatedHostState struct {
// Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
DedicatedHostId *string `pulumi:"dedicatedHostId"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
MaintenanceConfigurationId *string `pulumi:"maintenanceConfigurationId"`
}
type AssignmentDedicatedHostState struct {
// Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
DedicatedHostId 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 ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
MaintenanceConfigurationId pulumi.StringPtrInput
}
func (AssignmentDedicatedHostState) ElementType() reflect.Type {
return reflect.TypeOf((*assignmentDedicatedHostState)(nil)).Elem()
}
type assignmentDedicatedHostArgs struct {
// Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
DedicatedHostId string `pulumi:"dedicatedHostId"`
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
MaintenanceConfigurationId string `pulumi:"maintenanceConfigurationId"`
}
// The set of arguments for constructing a AssignmentDedicatedHost resource.
type AssignmentDedicatedHostArgs struct {
// Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
DedicatedHostId 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 ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
MaintenanceConfigurationId pulumi.StringInput
}
func (AssignmentDedicatedHostArgs) ElementType() reflect.Type {
return reflect.TypeOf((*assignmentDedicatedHostArgs)(nil)).Elem()
}
type AssignmentDedicatedHostInput interface {
pulumi.Input
ToAssignmentDedicatedHostOutput() AssignmentDedicatedHostOutput
ToAssignmentDedicatedHostOutputWithContext(ctx context.Context) AssignmentDedicatedHostOutput
}
func (*AssignmentDedicatedHost) ElementType() reflect.Type {
return reflect.TypeOf((**AssignmentDedicatedHost)(nil)).Elem()
}
func (i *AssignmentDedicatedHost) ToAssignmentDedicatedHostOutput() AssignmentDedicatedHostOutput {
return i.ToAssignmentDedicatedHostOutputWithContext(context.Background())
}
func (i *AssignmentDedicatedHost) ToAssignmentDedicatedHostOutputWithContext(ctx context.Context) AssignmentDedicatedHostOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentDedicatedHostOutput)
}
// AssignmentDedicatedHostArrayInput is an input type that accepts AssignmentDedicatedHostArray and AssignmentDedicatedHostArrayOutput values.
// You can construct a concrete instance of `AssignmentDedicatedHostArrayInput` via:
//
// AssignmentDedicatedHostArray{ AssignmentDedicatedHostArgs{...} }
type AssignmentDedicatedHostArrayInput interface {
pulumi.Input
ToAssignmentDedicatedHostArrayOutput() AssignmentDedicatedHostArrayOutput
ToAssignmentDedicatedHostArrayOutputWithContext(context.Context) AssignmentDedicatedHostArrayOutput
}
type AssignmentDedicatedHostArray []AssignmentDedicatedHostInput
func (AssignmentDedicatedHostArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AssignmentDedicatedHost)(nil)).Elem()
}
func (i AssignmentDedicatedHostArray) ToAssignmentDedicatedHostArrayOutput() AssignmentDedicatedHostArrayOutput {
return i.ToAssignmentDedicatedHostArrayOutputWithContext(context.Background())
}
func (i AssignmentDedicatedHostArray) ToAssignmentDedicatedHostArrayOutputWithContext(ctx context.Context) AssignmentDedicatedHostArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentDedicatedHostArrayOutput)
}
// AssignmentDedicatedHostMapInput is an input type that accepts AssignmentDedicatedHostMap and AssignmentDedicatedHostMapOutput values.
// You can construct a concrete instance of `AssignmentDedicatedHostMapInput` via:
//
// AssignmentDedicatedHostMap{ "key": AssignmentDedicatedHostArgs{...} }
type AssignmentDedicatedHostMapInput interface {
pulumi.Input
ToAssignmentDedicatedHostMapOutput() AssignmentDedicatedHostMapOutput
ToAssignmentDedicatedHostMapOutputWithContext(context.Context) AssignmentDedicatedHostMapOutput
}
type AssignmentDedicatedHostMap map[string]AssignmentDedicatedHostInput
func (AssignmentDedicatedHostMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AssignmentDedicatedHost)(nil)).Elem()
}
func (i AssignmentDedicatedHostMap) ToAssignmentDedicatedHostMapOutput() AssignmentDedicatedHostMapOutput {
return i.ToAssignmentDedicatedHostMapOutputWithContext(context.Background())
}
func (i AssignmentDedicatedHostMap) ToAssignmentDedicatedHostMapOutputWithContext(ctx context.Context) AssignmentDedicatedHostMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentDedicatedHostMapOutput)
}
type AssignmentDedicatedHostOutput struct{ *pulumi.OutputState }
func (AssignmentDedicatedHostOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AssignmentDedicatedHost)(nil)).Elem()
}
func (o AssignmentDedicatedHostOutput) ToAssignmentDedicatedHostOutput() AssignmentDedicatedHostOutput {
return o
}
func (o AssignmentDedicatedHostOutput) ToAssignmentDedicatedHostOutputWithContext(ctx context.Context) AssignmentDedicatedHostOutput {
return o
}
// Specifies the Dedicated Host ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
func (o AssignmentDedicatedHostOutput) DedicatedHostId() pulumi.StringOutput {
return o.ApplyT(func(v *AssignmentDedicatedHost) pulumi.StringOutput { return v.DedicatedHostId }).(pulumi.StringOutput)
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o AssignmentDedicatedHostOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *AssignmentDedicatedHost) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
func (o AssignmentDedicatedHostOutput) MaintenanceConfigurationId() pulumi.StringOutput {
return o.ApplyT(func(v *AssignmentDedicatedHost) pulumi.StringOutput { return v.MaintenanceConfigurationId }).(pulumi.StringOutput)
}
type AssignmentDedicatedHostArrayOutput struct{ *pulumi.OutputState }
func (AssignmentDedicatedHostArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AssignmentDedicatedHost)(nil)).Elem()
}
func (o AssignmentDedicatedHostArrayOutput) ToAssignmentDedicatedHostArrayOutput() AssignmentDedicatedHostArrayOutput {
return o
}
func (o AssignmentDedicatedHostArrayOutput) ToAssignmentDedicatedHostArrayOutputWithContext(ctx context.Context) AssignmentDedicatedHostArrayOutput {
return o
}
func (o AssignmentDedicatedHostArrayOutput) Index(i pulumi.IntInput) AssignmentDedicatedHostOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AssignmentDedicatedHost {
return vs[0].([]*AssignmentDedicatedHost)[vs[1].(int)]
}).(AssignmentDedicatedHostOutput)
}
type AssignmentDedicatedHostMapOutput struct{ *pulumi.OutputState }
func (AssignmentDedicatedHostMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AssignmentDedicatedHost)(nil)).Elem()
}
func (o AssignmentDedicatedHostMapOutput) ToAssignmentDedicatedHostMapOutput() AssignmentDedicatedHostMapOutput {
return o
}
func (o AssignmentDedicatedHostMapOutput) ToAssignmentDedicatedHostMapOutputWithContext(ctx context.Context) AssignmentDedicatedHostMapOutput {
return o
}
func (o AssignmentDedicatedHostMapOutput) MapIndex(k pulumi.StringInput) AssignmentDedicatedHostOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AssignmentDedicatedHost {
return vs[0].(map[string]*AssignmentDedicatedHost)[vs[1].(string)]
}).(AssignmentDedicatedHostOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentDedicatedHostInput)(nil)).Elem(), &AssignmentDedicatedHost{})
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentDedicatedHostArrayInput)(nil)).Elem(), AssignmentDedicatedHostArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentDedicatedHostMapInput)(nil)).Elem(), AssignmentDedicatedHostMap{})
pulumi.RegisterOutputType(AssignmentDedicatedHostOutput{})
pulumi.RegisterOutputType(AssignmentDedicatedHostArrayOutput{})
pulumi.RegisterOutputType(AssignmentDedicatedHostMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/maintenance/assignmentVirtualMachine.go | sdk/go/azure/maintenance/assignmentVirtualMachine.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package maintenance
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a maintenance assignment to virtual machine.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/maintenance"
// "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
// }
// 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
// }
// 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("internal"),
// SubnetId: exampleSubnet.ID(),
// PrivateIpAddressAllocation: pulumi.String("Dynamic"),
// },
// },
// })
// if err != nil {
// return err
// }
// invokeFile, err := std.File(ctx, &std.FileArgs{
// Input: "~/.ssh/id_rsa.pub",
// }, nil)
// if err != nil {
// return err
// }
// exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "example", &compute.LinuxVirtualMachineArgs{
// Name: pulumi.String("example-machine"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Size: pulumi.String("Standard_F2"),
// AdminUsername: pulumi.String("adminuser"),
// NetworkInterfaceIds: pulumi.StringArray{
// exampleNetworkInterface.ID(),
// },
// AdminSshKeys: compute.LinuxVirtualMachineAdminSshKeyArray{
// &compute.LinuxVirtualMachineAdminSshKeyArgs{
// Username: pulumi.String("adminuser"),
// PublicKey: pulumi.String(invokeFile.Result),
// },
// },
// OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{
// Caching: pulumi.String("ReadWrite"),
// StorageAccountType: pulumi.String("Standard_LRS"),
// },
// SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{
// Publisher: pulumi.String("Canonical"),
// Offer: pulumi.String("0001-com-ubuntu-server-jammy"),
// Sku: pulumi.String("22_04-lts"),
// Version: pulumi.String("latest"),
// },
// })
// if err != nil {
// return err
// }
// exampleConfiguration, err := maintenance.NewConfiguration(ctx, "example", &maintenance.ConfigurationArgs{
// Name: pulumi.String("example-mc"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Scope: pulumi.String("All"),
// })
// if err != nil {
// return err
// }
// _, err = maintenance.NewAssignmentVirtualMachine(ctx, "example", &maintenance.AssignmentVirtualMachineArgs{
// Location: example.Location,
// MaintenanceConfigurationId: exampleConfiguration.ID(),
// VirtualMachineId: exampleLinuxVirtualMachine.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.Maintenance` - 2023-04-01
//
// ## Import
//
// Maintenance Assignment can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:maintenance/assignmentVirtualMachine:AssignmentVirtualMachine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.Maintenance/configurationAssignments/assign1
// ```
type AssignmentVirtualMachine 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 ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
MaintenanceConfigurationId pulumi.StringOutput `pulumi:"maintenanceConfigurationId"`
// Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
VirtualMachineId pulumi.StringOutput `pulumi:"virtualMachineId"`
}
// NewAssignmentVirtualMachine registers a new resource with the given unique name, arguments, and options.
func NewAssignmentVirtualMachine(ctx *pulumi.Context,
name string, args *AssignmentVirtualMachineArgs, opts ...pulumi.ResourceOption) (*AssignmentVirtualMachine, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MaintenanceConfigurationId == nil {
return nil, errors.New("invalid value for required argument 'MaintenanceConfigurationId'")
}
if args.VirtualMachineId == nil {
return nil, errors.New("invalid value for required argument 'VirtualMachineId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AssignmentVirtualMachine
err := ctx.RegisterResource("azure:maintenance/assignmentVirtualMachine:AssignmentVirtualMachine", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAssignmentVirtualMachine gets an existing AssignmentVirtualMachine 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 GetAssignmentVirtualMachine(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AssignmentVirtualMachineState, opts ...pulumi.ResourceOption) (*AssignmentVirtualMachine, error) {
var resource AssignmentVirtualMachine
err := ctx.ReadResource("azure:maintenance/assignmentVirtualMachine:AssignmentVirtualMachine", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AssignmentVirtualMachine resources.
type assignmentVirtualMachineState 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 ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
MaintenanceConfigurationId *string `pulumi:"maintenanceConfigurationId"`
// Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
VirtualMachineId *string `pulumi:"virtualMachineId"`
}
type AssignmentVirtualMachineState struct {
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
MaintenanceConfigurationId pulumi.StringPtrInput
// Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
VirtualMachineId pulumi.StringPtrInput
}
func (AssignmentVirtualMachineState) ElementType() reflect.Type {
return reflect.TypeOf((*assignmentVirtualMachineState)(nil)).Elem()
}
type assignmentVirtualMachineArgs 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 ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
MaintenanceConfigurationId string `pulumi:"maintenanceConfigurationId"`
// Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
VirtualMachineId string `pulumi:"virtualMachineId"`
}
// The set of arguments for constructing a AssignmentVirtualMachine resource.
type AssignmentVirtualMachineArgs struct {
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
MaintenanceConfigurationId pulumi.StringInput
// Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
VirtualMachineId pulumi.StringInput
}
func (AssignmentVirtualMachineArgs) ElementType() reflect.Type {
return reflect.TypeOf((*assignmentVirtualMachineArgs)(nil)).Elem()
}
type AssignmentVirtualMachineInput interface {
pulumi.Input
ToAssignmentVirtualMachineOutput() AssignmentVirtualMachineOutput
ToAssignmentVirtualMachineOutputWithContext(ctx context.Context) AssignmentVirtualMachineOutput
}
func (*AssignmentVirtualMachine) ElementType() reflect.Type {
return reflect.TypeOf((**AssignmentVirtualMachine)(nil)).Elem()
}
func (i *AssignmentVirtualMachine) ToAssignmentVirtualMachineOutput() AssignmentVirtualMachineOutput {
return i.ToAssignmentVirtualMachineOutputWithContext(context.Background())
}
func (i *AssignmentVirtualMachine) ToAssignmentVirtualMachineOutputWithContext(ctx context.Context) AssignmentVirtualMachineOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentVirtualMachineOutput)
}
// AssignmentVirtualMachineArrayInput is an input type that accepts AssignmentVirtualMachineArray and AssignmentVirtualMachineArrayOutput values.
// You can construct a concrete instance of `AssignmentVirtualMachineArrayInput` via:
//
// AssignmentVirtualMachineArray{ AssignmentVirtualMachineArgs{...} }
type AssignmentVirtualMachineArrayInput interface {
pulumi.Input
ToAssignmentVirtualMachineArrayOutput() AssignmentVirtualMachineArrayOutput
ToAssignmentVirtualMachineArrayOutputWithContext(context.Context) AssignmentVirtualMachineArrayOutput
}
type AssignmentVirtualMachineArray []AssignmentVirtualMachineInput
func (AssignmentVirtualMachineArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AssignmentVirtualMachine)(nil)).Elem()
}
func (i AssignmentVirtualMachineArray) ToAssignmentVirtualMachineArrayOutput() AssignmentVirtualMachineArrayOutput {
return i.ToAssignmentVirtualMachineArrayOutputWithContext(context.Background())
}
func (i AssignmentVirtualMachineArray) ToAssignmentVirtualMachineArrayOutputWithContext(ctx context.Context) AssignmentVirtualMachineArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentVirtualMachineArrayOutput)
}
// AssignmentVirtualMachineMapInput is an input type that accepts AssignmentVirtualMachineMap and AssignmentVirtualMachineMapOutput values.
// You can construct a concrete instance of `AssignmentVirtualMachineMapInput` via:
//
// AssignmentVirtualMachineMap{ "key": AssignmentVirtualMachineArgs{...} }
type AssignmentVirtualMachineMapInput interface {
pulumi.Input
ToAssignmentVirtualMachineMapOutput() AssignmentVirtualMachineMapOutput
ToAssignmentVirtualMachineMapOutputWithContext(context.Context) AssignmentVirtualMachineMapOutput
}
type AssignmentVirtualMachineMap map[string]AssignmentVirtualMachineInput
func (AssignmentVirtualMachineMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AssignmentVirtualMachine)(nil)).Elem()
}
func (i AssignmentVirtualMachineMap) ToAssignmentVirtualMachineMapOutput() AssignmentVirtualMachineMapOutput {
return i.ToAssignmentVirtualMachineMapOutputWithContext(context.Background())
}
func (i AssignmentVirtualMachineMap) ToAssignmentVirtualMachineMapOutputWithContext(ctx context.Context) AssignmentVirtualMachineMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentVirtualMachineMapOutput)
}
type AssignmentVirtualMachineOutput struct{ *pulumi.OutputState }
func (AssignmentVirtualMachineOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AssignmentVirtualMachine)(nil)).Elem()
}
func (o AssignmentVirtualMachineOutput) ToAssignmentVirtualMachineOutput() AssignmentVirtualMachineOutput {
return o
}
func (o AssignmentVirtualMachineOutput) ToAssignmentVirtualMachineOutputWithContext(ctx context.Context) AssignmentVirtualMachineOutput {
return o
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o AssignmentVirtualMachineOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *AssignmentVirtualMachine) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
func (o AssignmentVirtualMachineOutput) MaintenanceConfigurationId() pulumi.StringOutput {
return o.ApplyT(func(v *AssignmentVirtualMachine) pulumi.StringOutput { return v.MaintenanceConfigurationId }).(pulumi.StringOutput)
}
// Specifies the Virtual Machine ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
func (o AssignmentVirtualMachineOutput) VirtualMachineId() pulumi.StringOutput {
return o.ApplyT(func(v *AssignmentVirtualMachine) pulumi.StringOutput { return v.VirtualMachineId }).(pulumi.StringOutput)
}
type AssignmentVirtualMachineArrayOutput struct{ *pulumi.OutputState }
func (AssignmentVirtualMachineArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AssignmentVirtualMachine)(nil)).Elem()
}
func (o AssignmentVirtualMachineArrayOutput) ToAssignmentVirtualMachineArrayOutput() AssignmentVirtualMachineArrayOutput {
return o
}
func (o AssignmentVirtualMachineArrayOutput) ToAssignmentVirtualMachineArrayOutputWithContext(ctx context.Context) AssignmentVirtualMachineArrayOutput {
return o
}
func (o AssignmentVirtualMachineArrayOutput) Index(i pulumi.IntInput) AssignmentVirtualMachineOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AssignmentVirtualMachine {
return vs[0].([]*AssignmentVirtualMachine)[vs[1].(int)]
}).(AssignmentVirtualMachineOutput)
}
type AssignmentVirtualMachineMapOutput struct{ *pulumi.OutputState }
func (AssignmentVirtualMachineMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AssignmentVirtualMachine)(nil)).Elem()
}
func (o AssignmentVirtualMachineMapOutput) ToAssignmentVirtualMachineMapOutput() AssignmentVirtualMachineMapOutput {
return o
}
func (o AssignmentVirtualMachineMapOutput) ToAssignmentVirtualMachineMapOutputWithContext(ctx context.Context) AssignmentVirtualMachineMapOutput {
return o
}
func (o AssignmentVirtualMachineMapOutput) MapIndex(k pulumi.StringInput) AssignmentVirtualMachineOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AssignmentVirtualMachine {
return vs[0].(map[string]*AssignmentVirtualMachine)[vs[1].(string)]
}).(AssignmentVirtualMachineOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentVirtualMachineInput)(nil)).Elem(), &AssignmentVirtualMachine{})
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentVirtualMachineArrayInput)(nil)).Elem(), AssignmentVirtualMachineArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentVirtualMachineMapInput)(nil)).Elem(), AssignmentVirtualMachineMap{})
pulumi.RegisterOutputType(AssignmentVirtualMachineOutput{})
pulumi.RegisterOutputType(AssignmentVirtualMachineArrayOutput{})
pulumi.RegisterOutputType(AssignmentVirtualMachineMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/maintenance/assignmentVirtualMachineScaleSet.go | sdk/go/azure/maintenance/assignmentVirtualMachineScaleSet.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package maintenance
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a maintenance assignment to a virtual machine scale set.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/lb"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/maintenance"
// "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
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: example.Name,
// Location: example.Location,
// ResourceGroupName: example.Name,
// AllocationMethod: pulumi.String("Static"),
// })
// if err != nil {
// return err
// }
// exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{
// Name: example.Name,
// Location: example.Location,
// ResourceGroupName: example.Name,
// FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{
// &lb.LoadBalancerFrontendIpConfigurationArgs{
// Name: pulumi.String("internal"),
// PublicIpAddressId: examplePublicIp.ID(),
// },
// },
// })
// if err != nil {
// return err
// }
// exampleBackendAddressPool, err := lb.NewBackendAddressPool(ctx, "example", &lb.BackendAddressPoolArgs{
// Name: pulumi.String("example"),
// LoadbalancerId: exampleLoadBalancer.ID(),
// })
// if err != nil {
// return err
// }
// exampleProbe, err := lb.NewProbe(ctx, "example", &lb.ProbeArgs{
// Name: pulumi.String("example"),
// LoadbalancerId: exampleLoadBalancer.ID(),
// Port: pulumi.Int(22),
// Protocol: pulumi.String("Tcp"),
// })
// if err != nil {
// return err
// }
// exampleRule, err := lb.NewRule(ctx, "example", &lb.RuleArgs{
// Name: pulumi.String("example"),
// LoadbalancerId: exampleLoadBalancer.ID(),
// ProbeId: exampleProbe.ID(),
// FrontendIpConfigurationName: pulumi.String("internal"),
// Protocol: pulumi.String("Tcp"),
// FrontendPort: pulumi.Int(22),
// BackendPort: pulumi.Int(22),
// })
// if err != nil {
// return err
// }
// exampleConfiguration, err := maintenance.NewConfiguration(ctx, "example", &maintenance.ConfigurationArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Scope: pulumi.String("OSImage"),
// Visibility: pulumi.String("Custom"),
// Window: &maintenance.ConfigurationWindowArgs{
// StartDateTime: pulumi.String("2021-12-31 00:00"),
// ExpirationDateTime: pulumi.String("9999-12-31 00:00"),
// Duration: pulumi.String("06:00"),
// TimeZone: pulumi.String("Pacific Standard Time"),
// RecurEvery: pulumi.String("1Days"),
// },
// })
// if err != nil {
// return err
// }
// exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{
// Name: pulumi.String("sample-nic"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// IpConfigurations: network.NetworkInterfaceIpConfigurationArray{
// &network.NetworkInterfaceIpConfigurationArgs{
// Name: pulumi.String("testconfiguration1"),
// PrivateIpAddressAllocation: pulumi.String("Dynamic"),
// },
// },
// })
// if err != nil {
// return err
// }
// exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "example", &compute.LinuxVirtualMachineArgs{
// Name: pulumi.String("example-machine"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Size: pulumi.String("Standard_F2"),
// AdminUsername: pulumi.String("adminuser"),
// NetworkInterfaceIds: pulumi.StringArray{
// exampleNetworkInterface.ID(),
// },
// OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{
// Caching: pulumi.String("ReadWrite"),
// StorageAccountType: pulumi.String("Standard_LRS"),
// },
// })
// if err != nil {
// return err
// }
// _, err = compute.NewLinuxVirtualMachineScaleSet(ctx, "example", &compute.LinuxVirtualMachineScaleSetArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Sku: pulumi.String("Standard_F2"),
// Instances: pulumi.Int(1),
// AdminUsername: pulumi.String("adminuser"),
// AdminPassword: pulumi.String("P@ssword1234!"),
// UpgradeMode: pulumi.String("Automatic"),
// HealthProbeId: exampleProbe.ID(),
// DisablePasswordAuthentication: pulumi.Bool(false),
// SourceImageReference: &compute.LinuxVirtualMachineScaleSetSourceImageReferenceArgs{
// Publisher: pulumi.String("Canonical"),
// Offer: pulumi.String("0001-com-ubuntu-server-jammy"),
// Sku: pulumi.String("22_04-lts"),
// Version: pulumi.String("latest"),
// },
// OsDisk: &compute.LinuxVirtualMachineScaleSetOsDiskArgs{
// StorageAccountType: pulumi.String("Standard_LRS"),
// Caching: pulumi.String("ReadWrite"),
// },
// NetworkInterfaces: compute.LinuxVirtualMachineScaleSetNetworkInterfaceArray{
// &compute.LinuxVirtualMachineScaleSetNetworkInterfaceArgs{
// Name: pulumi.String("example"),
// Primary: pulumi.Bool(true),
// IpConfigurations: compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArray{
// &compute.LinuxVirtualMachineScaleSetNetworkInterfaceIpConfigurationArgs{
// Name: pulumi.String("internal"),
// Primary: pulumi.Bool(true),
// SubnetId: exampleSubnet.ID(),
// LoadBalancerBackendAddressPoolIds: pulumi.StringArray{
// exampleBackendAddressPool.ID(),
// },
// },
// },
// },
// },
// AutomaticOsUpgradePolicy: &compute.LinuxVirtualMachineScaleSetAutomaticOsUpgradePolicyArgs{
// DisableAutomaticRollback: pulumi.Bool(true),
// EnableAutomaticOsUpgrade: pulumi.Bool(true),
// },
// RollingUpgradePolicy: &compute.LinuxVirtualMachineScaleSetRollingUpgradePolicyArgs{
// MaxBatchInstancePercent: pulumi.Int(20),
// MaxUnhealthyInstancePercent: pulumi.Int(20),
// MaxUnhealthyUpgradedInstancePercent: pulumi.Int(20),
// PauseTimeBetweenBatches: pulumi.String("PT0S"),
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleRule,
// }))
// if err != nil {
// return err
// }
// _, err = maintenance.NewAssignmentVirtualMachineScaleSet(ctx, "example", &maintenance.AssignmentVirtualMachineScaleSetArgs{
// Location: example.Location,
// MaintenanceConfigurationId: exampleConfiguration.ID(),
// VirtualMachineScaleSetId: exampleLinuxVirtualMachine.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.Maintenance` - 2023-04-01
//
// ## Import
//
// Maintenance Assignment can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:maintenance/assignmentVirtualMachineScaleSet:AssignmentVirtualMachineScaleSet example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1/providers/Microsoft.Maintenance/configurationAssignments/assign1
// ```
type AssignmentVirtualMachineScaleSet 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 ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
MaintenanceConfigurationId pulumi.StringOutput `pulumi:"maintenanceConfigurationId"`
// Specifies the Virtual Machine Scale Set ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
VirtualMachineScaleSetId pulumi.StringOutput `pulumi:"virtualMachineScaleSetId"`
}
// NewAssignmentVirtualMachineScaleSet registers a new resource with the given unique name, arguments, and options.
func NewAssignmentVirtualMachineScaleSet(ctx *pulumi.Context,
name string, args *AssignmentVirtualMachineScaleSetArgs, opts ...pulumi.ResourceOption) (*AssignmentVirtualMachineScaleSet, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.MaintenanceConfigurationId == nil {
return nil, errors.New("invalid value for required argument 'MaintenanceConfigurationId'")
}
if args.VirtualMachineScaleSetId == nil {
return nil, errors.New("invalid value for required argument 'VirtualMachineScaleSetId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AssignmentVirtualMachineScaleSet
err := ctx.RegisterResource("azure:maintenance/assignmentVirtualMachineScaleSet:AssignmentVirtualMachineScaleSet", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAssignmentVirtualMachineScaleSet gets an existing AssignmentVirtualMachineScaleSet 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 GetAssignmentVirtualMachineScaleSet(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AssignmentVirtualMachineScaleSetState, opts ...pulumi.ResourceOption) (*AssignmentVirtualMachineScaleSet, error) {
var resource AssignmentVirtualMachineScaleSet
err := ctx.ReadResource("azure:maintenance/assignmentVirtualMachineScaleSet:AssignmentVirtualMachineScaleSet", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AssignmentVirtualMachineScaleSet resources.
type assignmentVirtualMachineScaleSetState 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 ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
MaintenanceConfigurationId *string `pulumi:"maintenanceConfigurationId"`
// Specifies the Virtual Machine Scale Set ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
VirtualMachineScaleSetId *string `pulumi:"virtualMachineScaleSetId"`
}
type AssignmentVirtualMachineScaleSetState struct {
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
MaintenanceConfigurationId pulumi.StringPtrInput
// Specifies the Virtual Machine Scale Set ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
VirtualMachineScaleSetId pulumi.StringPtrInput
}
func (AssignmentVirtualMachineScaleSetState) ElementType() reflect.Type {
return reflect.TypeOf((*assignmentVirtualMachineScaleSetState)(nil)).Elem()
}
type assignmentVirtualMachineScaleSetArgs 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 ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
MaintenanceConfigurationId string `pulumi:"maintenanceConfigurationId"`
// Specifies the Virtual Machine Scale Set ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
VirtualMachineScaleSetId string `pulumi:"virtualMachineScaleSetId"`
}
// The set of arguments for constructing a AssignmentVirtualMachineScaleSet resource.
type AssignmentVirtualMachineScaleSetArgs struct {
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
MaintenanceConfigurationId pulumi.StringInput
// Specifies the Virtual Machine Scale Set ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
VirtualMachineScaleSetId pulumi.StringInput
}
func (AssignmentVirtualMachineScaleSetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*assignmentVirtualMachineScaleSetArgs)(nil)).Elem()
}
type AssignmentVirtualMachineScaleSetInput interface {
pulumi.Input
ToAssignmentVirtualMachineScaleSetOutput() AssignmentVirtualMachineScaleSetOutput
ToAssignmentVirtualMachineScaleSetOutputWithContext(ctx context.Context) AssignmentVirtualMachineScaleSetOutput
}
func (*AssignmentVirtualMachineScaleSet) ElementType() reflect.Type {
return reflect.TypeOf((**AssignmentVirtualMachineScaleSet)(nil)).Elem()
}
func (i *AssignmentVirtualMachineScaleSet) ToAssignmentVirtualMachineScaleSetOutput() AssignmentVirtualMachineScaleSetOutput {
return i.ToAssignmentVirtualMachineScaleSetOutputWithContext(context.Background())
}
func (i *AssignmentVirtualMachineScaleSet) ToAssignmentVirtualMachineScaleSetOutputWithContext(ctx context.Context) AssignmentVirtualMachineScaleSetOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentVirtualMachineScaleSetOutput)
}
// AssignmentVirtualMachineScaleSetArrayInput is an input type that accepts AssignmentVirtualMachineScaleSetArray and AssignmentVirtualMachineScaleSetArrayOutput values.
// You can construct a concrete instance of `AssignmentVirtualMachineScaleSetArrayInput` via:
//
// AssignmentVirtualMachineScaleSetArray{ AssignmentVirtualMachineScaleSetArgs{...} }
type AssignmentVirtualMachineScaleSetArrayInput interface {
pulumi.Input
ToAssignmentVirtualMachineScaleSetArrayOutput() AssignmentVirtualMachineScaleSetArrayOutput
ToAssignmentVirtualMachineScaleSetArrayOutputWithContext(context.Context) AssignmentVirtualMachineScaleSetArrayOutput
}
type AssignmentVirtualMachineScaleSetArray []AssignmentVirtualMachineScaleSetInput
func (AssignmentVirtualMachineScaleSetArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AssignmentVirtualMachineScaleSet)(nil)).Elem()
}
func (i AssignmentVirtualMachineScaleSetArray) ToAssignmentVirtualMachineScaleSetArrayOutput() AssignmentVirtualMachineScaleSetArrayOutput {
return i.ToAssignmentVirtualMachineScaleSetArrayOutputWithContext(context.Background())
}
func (i AssignmentVirtualMachineScaleSetArray) ToAssignmentVirtualMachineScaleSetArrayOutputWithContext(ctx context.Context) AssignmentVirtualMachineScaleSetArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentVirtualMachineScaleSetArrayOutput)
}
// AssignmentVirtualMachineScaleSetMapInput is an input type that accepts AssignmentVirtualMachineScaleSetMap and AssignmentVirtualMachineScaleSetMapOutput values.
// You can construct a concrete instance of `AssignmentVirtualMachineScaleSetMapInput` via:
//
// AssignmentVirtualMachineScaleSetMap{ "key": AssignmentVirtualMachineScaleSetArgs{...} }
type AssignmentVirtualMachineScaleSetMapInput interface {
pulumi.Input
ToAssignmentVirtualMachineScaleSetMapOutput() AssignmentVirtualMachineScaleSetMapOutput
ToAssignmentVirtualMachineScaleSetMapOutputWithContext(context.Context) AssignmentVirtualMachineScaleSetMapOutput
}
type AssignmentVirtualMachineScaleSetMap map[string]AssignmentVirtualMachineScaleSetInput
func (AssignmentVirtualMachineScaleSetMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AssignmentVirtualMachineScaleSet)(nil)).Elem()
}
func (i AssignmentVirtualMachineScaleSetMap) ToAssignmentVirtualMachineScaleSetMapOutput() AssignmentVirtualMachineScaleSetMapOutput {
return i.ToAssignmentVirtualMachineScaleSetMapOutputWithContext(context.Background())
}
func (i AssignmentVirtualMachineScaleSetMap) ToAssignmentVirtualMachineScaleSetMapOutputWithContext(ctx context.Context) AssignmentVirtualMachineScaleSetMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssignmentVirtualMachineScaleSetMapOutput)
}
type AssignmentVirtualMachineScaleSetOutput struct{ *pulumi.OutputState }
func (AssignmentVirtualMachineScaleSetOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AssignmentVirtualMachineScaleSet)(nil)).Elem()
}
func (o AssignmentVirtualMachineScaleSetOutput) ToAssignmentVirtualMachineScaleSetOutput() AssignmentVirtualMachineScaleSetOutput {
return o
}
func (o AssignmentVirtualMachineScaleSetOutput) ToAssignmentVirtualMachineScaleSetOutputWithContext(ctx context.Context) AssignmentVirtualMachineScaleSetOutput {
return o
}
// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
func (o AssignmentVirtualMachineScaleSetOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *AssignmentVirtualMachineScaleSet) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the ID of the Maintenance Configuration Resource. Changing this forces a new resource to be created.
func (o AssignmentVirtualMachineScaleSetOutput) MaintenanceConfigurationId() pulumi.StringOutput {
return o.ApplyT(func(v *AssignmentVirtualMachineScaleSet) pulumi.StringOutput { return v.MaintenanceConfigurationId }).(pulumi.StringOutput)
}
// Specifies the Virtual Machine Scale Set ID to which the Maintenance Configuration will be assigned. Changing this forces a new resource to be created.
func (o AssignmentVirtualMachineScaleSetOutput) VirtualMachineScaleSetId() pulumi.StringOutput {
return o.ApplyT(func(v *AssignmentVirtualMachineScaleSet) pulumi.StringOutput { return v.VirtualMachineScaleSetId }).(pulumi.StringOutput)
}
type AssignmentVirtualMachineScaleSetArrayOutput struct{ *pulumi.OutputState }
func (AssignmentVirtualMachineScaleSetArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AssignmentVirtualMachineScaleSet)(nil)).Elem()
}
func (o AssignmentVirtualMachineScaleSetArrayOutput) ToAssignmentVirtualMachineScaleSetArrayOutput() AssignmentVirtualMachineScaleSetArrayOutput {
return o
}
func (o AssignmentVirtualMachineScaleSetArrayOutput) ToAssignmentVirtualMachineScaleSetArrayOutputWithContext(ctx context.Context) AssignmentVirtualMachineScaleSetArrayOutput {
return o
}
func (o AssignmentVirtualMachineScaleSetArrayOutput) Index(i pulumi.IntInput) AssignmentVirtualMachineScaleSetOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AssignmentVirtualMachineScaleSet {
return vs[0].([]*AssignmentVirtualMachineScaleSet)[vs[1].(int)]
}).(AssignmentVirtualMachineScaleSetOutput)
}
type AssignmentVirtualMachineScaleSetMapOutput struct{ *pulumi.OutputState }
func (AssignmentVirtualMachineScaleSetMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AssignmentVirtualMachineScaleSet)(nil)).Elem()
}
func (o AssignmentVirtualMachineScaleSetMapOutput) ToAssignmentVirtualMachineScaleSetMapOutput() AssignmentVirtualMachineScaleSetMapOutput {
return o
}
func (o AssignmentVirtualMachineScaleSetMapOutput) ToAssignmentVirtualMachineScaleSetMapOutputWithContext(ctx context.Context) AssignmentVirtualMachineScaleSetMapOutput {
return o
}
func (o AssignmentVirtualMachineScaleSetMapOutput) MapIndex(k pulumi.StringInput) AssignmentVirtualMachineScaleSetOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AssignmentVirtualMachineScaleSet {
return vs[0].(map[string]*AssignmentVirtualMachineScaleSet)[vs[1].(string)]
}).(AssignmentVirtualMachineScaleSetOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentVirtualMachineScaleSetInput)(nil)).Elem(), &AssignmentVirtualMachineScaleSet{})
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentVirtualMachineScaleSetArrayInput)(nil)).Elem(), AssignmentVirtualMachineScaleSetArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AssignmentVirtualMachineScaleSetMapInput)(nil)).Elem(), AssignmentVirtualMachineScaleSetMap{})
pulumi.RegisterOutputType(AssignmentVirtualMachineScaleSetOutput{})
pulumi.RegisterOutputType(AssignmentVirtualMachineScaleSetArrayOutput{})
pulumi.RegisterOutputType(AssignmentVirtualMachineScaleSetMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/analysisservices/init.go | sdk/go/azure/analysisservices/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 analysisservices
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:analysisservices/server:Server":
r = &Server{}
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",
"analysisservices/server",
&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/analysisservices/pulumiTypes.go | sdk/go/azure/analysisservices/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 analysisservices
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 ServerIpv4FirewallRule struct {
// Specifies the name of the firewall rule.
Name string `pulumi:"name"`
// End of the firewall rule range as IPv4 address.
RangeEnd string `pulumi:"rangeEnd"`
// Start of the firewall rule range as IPv4 address.
RangeStart string `pulumi:"rangeStart"`
}
// ServerIpv4FirewallRuleInput is an input type that accepts ServerIpv4FirewallRuleArgs and ServerIpv4FirewallRuleOutput values.
// You can construct a concrete instance of `ServerIpv4FirewallRuleInput` via:
//
// ServerIpv4FirewallRuleArgs{...}
type ServerIpv4FirewallRuleInput interface {
pulumi.Input
ToServerIpv4FirewallRuleOutput() ServerIpv4FirewallRuleOutput
ToServerIpv4FirewallRuleOutputWithContext(context.Context) ServerIpv4FirewallRuleOutput
}
type ServerIpv4FirewallRuleArgs struct {
// Specifies the name of the firewall rule.
Name pulumi.StringInput `pulumi:"name"`
// End of the firewall rule range as IPv4 address.
RangeEnd pulumi.StringInput `pulumi:"rangeEnd"`
// Start of the firewall rule range as IPv4 address.
RangeStart pulumi.StringInput `pulumi:"rangeStart"`
}
func (ServerIpv4FirewallRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ServerIpv4FirewallRule)(nil)).Elem()
}
func (i ServerIpv4FirewallRuleArgs) ToServerIpv4FirewallRuleOutput() ServerIpv4FirewallRuleOutput {
return i.ToServerIpv4FirewallRuleOutputWithContext(context.Background())
}
func (i ServerIpv4FirewallRuleArgs) ToServerIpv4FirewallRuleOutputWithContext(ctx context.Context) ServerIpv4FirewallRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerIpv4FirewallRuleOutput)
}
// ServerIpv4FirewallRuleArrayInput is an input type that accepts ServerIpv4FirewallRuleArray and ServerIpv4FirewallRuleArrayOutput values.
// You can construct a concrete instance of `ServerIpv4FirewallRuleArrayInput` via:
//
// ServerIpv4FirewallRuleArray{ ServerIpv4FirewallRuleArgs{...} }
type ServerIpv4FirewallRuleArrayInput interface {
pulumi.Input
ToServerIpv4FirewallRuleArrayOutput() ServerIpv4FirewallRuleArrayOutput
ToServerIpv4FirewallRuleArrayOutputWithContext(context.Context) ServerIpv4FirewallRuleArrayOutput
}
type ServerIpv4FirewallRuleArray []ServerIpv4FirewallRuleInput
func (ServerIpv4FirewallRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ServerIpv4FirewallRule)(nil)).Elem()
}
func (i ServerIpv4FirewallRuleArray) ToServerIpv4FirewallRuleArrayOutput() ServerIpv4FirewallRuleArrayOutput {
return i.ToServerIpv4FirewallRuleArrayOutputWithContext(context.Background())
}
func (i ServerIpv4FirewallRuleArray) ToServerIpv4FirewallRuleArrayOutputWithContext(ctx context.Context) ServerIpv4FirewallRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerIpv4FirewallRuleArrayOutput)
}
type ServerIpv4FirewallRuleOutput struct{ *pulumi.OutputState }
func (ServerIpv4FirewallRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ServerIpv4FirewallRule)(nil)).Elem()
}
func (o ServerIpv4FirewallRuleOutput) ToServerIpv4FirewallRuleOutput() ServerIpv4FirewallRuleOutput {
return o
}
func (o ServerIpv4FirewallRuleOutput) ToServerIpv4FirewallRuleOutputWithContext(ctx context.Context) ServerIpv4FirewallRuleOutput {
return o
}
// Specifies the name of the firewall rule.
func (o ServerIpv4FirewallRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v ServerIpv4FirewallRule) string { return v.Name }).(pulumi.StringOutput)
}
// End of the firewall rule range as IPv4 address.
func (o ServerIpv4FirewallRuleOutput) RangeEnd() pulumi.StringOutput {
return o.ApplyT(func(v ServerIpv4FirewallRule) string { return v.RangeEnd }).(pulumi.StringOutput)
}
// Start of the firewall rule range as IPv4 address.
func (o ServerIpv4FirewallRuleOutput) RangeStart() pulumi.StringOutput {
return o.ApplyT(func(v ServerIpv4FirewallRule) string { return v.RangeStart }).(pulumi.StringOutput)
}
type ServerIpv4FirewallRuleArrayOutput struct{ *pulumi.OutputState }
func (ServerIpv4FirewallRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ServerIpv4FirewallRule)(nil)).Elem()
}
func (o ServerIpv4FirewallRuleArrayOutput) ToServerIpv4FirewallRuleArrayOutput() ServerIpv4FirewallRuleArrayOutput {
return o
}
func (o ServerIpv4FirewallRuleArrayOutput) ToServerIpv4FirewallRuleArrayOutputWithContext(ctx context.Context) ServerIpv4FirewallRuleArrayOutput {
return o
}
func (o ServerIpv4FirewallRuleArrayOutput) Index(i pulumi.IntInput) ServerIpv4FirewallRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ServerIpv4FirewallRule {
return vs[0].([]ServerIpv4FirewallRule)[vs[1].(int)]
}).(ServerIpv4FirewallRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServerIpv4FirewallRuleInput)(nil)).Elem(), ServerIpv4FirewallRuleArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerIpv4FirewallRuleArrayInput)(nil)).Elem(), ServerIpv4FirewallRuleArray{})
pulumi.RegisterOutputType(ServerIpv4FirewallRuleOutput{})
pulumi.RegisterOutputType(ServerIpv4FirewallRuleArrayOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/analysisservices/server.go | sdk/go/azure/analysisservices/server.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package analysisservices
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Analysis Services Server.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/analysisservices"
// "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("analysis-services-server-test"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = analysisservices.NewServer(ctx, "server", &analysisservices.ServerArgs{
// Name: pulumi.String("analysisservicesserver"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Sku: pulumi.String("S0"),
// AdminUsers: pulumi.StringArray{
// pulumi.String("myuser@domain.tld"),
// },
// PowerBiServiceEnabled: pulumi.Bool(true),
// Ipv4FirewallRules: analysisservices.ServerIpv4FirewallRuleArray{
// &analysisservices.ServerIpv4FirewallRuleArgs{
// Name: pulumi.String("myRule1"),
// RangeStart: pulumi.String("210.117.252.0"),
// RangeEnd: pulumi.String("210.117.252.255"),
// },
// },
// Tags: pulumi.StringMap{
// "abc": pulumi.String("123"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// > **Note:** The server resource will automatically be started and stopped during an update if it is in `paused` state.
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.AnalysisServices` - 2017-08-01
//
// ## Import
//
// Analysis Services Server can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:analysisservices/server:Server server /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourcegroup1/providers/Microsoft.AnalysisServices/servers/server1
// ```
type Server struct {
pulumi.CustomResourceState
// List of email addresses of admin users.
AdminUsers pulumi.StringArrayOutput `pulumi:"adminUsers"`
// URI and SAS token for a blob container to store backups.
BackupBlobContainerUri pulumi.StringPtrOutput `pulumi:"backupBlobContainerUri"`
// One or more `ipv4FirewallRule` block(s) as defined below.
Ipv4FirewallRules ServerIpv4FirewallRuleArrayOutput `pulumi:"ipv4FirewallRules"`
// The Azure location where the Analysis Services Server exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the Analysis Services Server. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Indicates if the Power BI service is allowed to access or not.
PowerBiServiceEnabled pulumi.BoolPtrOutput `pulumi:"powerBiServiceEnabled"`
// Controls how the read-write server is used in the query pool. If this value is set to `All` then read-write servers are also used for queries. Otherwise with `ReadOnly` these servers do not participate in query operations. Defaults to `All`.
QuerypoolConnectionMode pulumi.StringPtrOutput `pulumi:"querypoolConnectionMode"`
// The name of the Resource Group in which the Analysis Services Server should be exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The full name of the Analysis Services Server.
ServerFullName pulumi.StringOutput `pulumi:"serverFullName"`
// SKU for the Analysis Services Server. Possible values are: `D1`, `B1`, `B2`, `S0`, `S1`, `S2`, `S4`, `S8`, `S9`, `S8v2` and `S9v2`.
Sku pulumi.StringOutput `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewServer registers a new resource with the given unique name, arguments, and options.
func NewServer(ctx *pulumi.Context,
name string, args *ServerArgs, opts ...pulumi.ResourceOption) (*Server, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Sku == nil {
return nil, errors.New("invalid value for required argument 'Sku'")
}
if args.BackupBlobContainerUri != nil {
args.BackupBlobContainerUri = pulumi.ToSecret(args.BackupBlobContainerUri).(pulumi.StringPtrInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"backupBlobContainerUri",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Server
err := ctx.RegisterResource("azure:analysisservices/server:Server", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServer gets an existing Server resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetServer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServerState, opts ...pulumi.ResourceOption) (*Server, error) {
var resource Server
err := ctx.ReadResource("azure:analysisservices/server:Server", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Server resources.
type serverState struct {
// List of email addresses of admin users.
AdminUsers []string `pulumi:"adminUsers"`
// URI and SAS token for a blob container to store backups.
BackupBlobContainerUri *string `pulumi:"backupBlobContainerUri"`
// One or more `ipv4FirewallRule` block(s) as defined below.
Ipv4FirewallRules []ServerIpv4FirewallRule `pulumi:"ipv4FirewallRules"`
// The Azure location where the Analysis Services Server exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Analysis Services Server. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Indicates if the Power BI service is allowed to access or not.
PowerBiServiceEnabled *bool `pulumi:"powerBiServiceEnabled"`
// Controls how the read-write server is used in the query pool. If this value is set to `All` then read-write servers are also used for queries. Otherwise with `ReadOnly` these servers do not participate in query operations. Defaults to `All`.
QuerypoolConnectionMode *string `pulumi:"querypoolConnectionMode"`
// The name of the Resource Group in which the Analysis Services Server should be exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The full name of the Analysis Services Server.
ServerFullName *string `pulumi:"serverFullName"`
// SKU for the Analysis Services Server. Possible values are: `D1`, `B1`, `B2`, `S0`, `S1`, `S2`, `S4`, `S8`, `S9`, `S8v2` and `S9v2`.
Sku *string `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type ServerState struct {
// List of email addresses of admin users.
AdminUsers pulumi.StringArrayInput
// URI and SAS token for a blob container to store backups.
BackupBlobContainerUri pulumi.StringPtrInput
// One or more `ipv4FirewallRule` block(s) as defined below.
Ipv4FirewallRules ServerIpv4FirewallRuleArrayInput
// The Azure location where the Analysis Services Server exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Analysis Services Server. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Indicates if the Power BI service is allowed to access or not.
PowerBiServiceEnabled pulumi.BoolPtrInput
// Controls how the read-write server is used in the query pool. If this value is set to `All` then read-write servers are also used for queries. Otherwise with `ReadOnly` these servers do not participate in query operations. Defaults to `All`.
QuerypoolConnectionMode pulumi.StringPtrInput
// The name of the Resource Group in which the Analysis Services Server should be exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The full name of the Analysis Services Server.
ServerFullName pulumi.StringPtrInput
// SKU for the Analysis Services Server. Possible values are: `D1`, `B1`, `B2`, `S0`, `S1`, `S2`, `S4`, `S8`, `S9`, `S8v2` and `S9v2`.
Sku pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (ServerState) ElementType() reflect.Type {
return reflect.TypeOf((*serverState)(nil)).Elem()
}
type serverArgs struct {
// List of email addresses of admin users.
AdminUsers []string `pulumi:"adminUsers"`
// URI and SAS token for a blob container to store backups.
BackupBlobContainerUri *string `pulumi:"backupBlobContainerUri"`
// One or more `ipv4FirewallRule` block(s) as defined below.
Ipv4FirewallRules []ServerIpv4FirewallRule `pulumi:"ipv4FirewallRules"`
// The Azure location where the Analysis Services Server exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Analysis Services Server. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Indicates if the Power BI service is allowed to access or not.
PowerBiServiceEnabled *bool `pulumi:"powerBiServiceEnabled"`
// Controls how the read-write server is used in the query pool. If this value is set to `All` then read-write servers are also used for queries. Otherwise with `ReadOnly` these servers do not participate in query operations. Defaults to `All`.
QuerypoolConnectionMode *string `pulumi:"querypoolConnectionMode"`
// The name of the Resource Group in which the Analysis Services Server should be exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// SKU for the Analysis Services Server. Possible values are: `D1`, `B1`, `B2`, `S0`, `S1`, `S2`, `S4`, `S8`, `S9`, `S8v2` and `S9v2`.
Sku string `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Server resource.
type ServerArgs struct {
// List of email addresses of admin users.
AdminUsers pulumi.StringArrayInput
// URI and SAS token for a blob container to store backups.
BackupBlobContainerUri pulumi.StringPtrInput
// One or more `ipv4FirewallRule` block(s) as defined below.
Ipv4FirewallRules ServerIpv4FirewallRuleArrayInput
// The Azure location where the Analysis Services Server exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Analysis Services Server. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Indicates if the Power BI service is allowed to access or not.
PowerBiServiceEnabled pulumi.BoolPtrInput
// Controls how the read-write server is used in the query pool. If this value is set to `All` then read-write servers are also used for queries. Otherwise with `ReadOnly` these servers do not participate in query operations. Defaults to `All`.
QuerypoolConnectionMode pulumi.StringPtrInput
// The name of the Resource Group in which the Analysis Services Server should be exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// SKU for the Analysis Services Server. Possible values are: `D1`, `B1`, `B2`, `S0`, `S1`, `S2`, `S4`, `S8`, `S9`, `S8v2` and `S9v2`.
Sku pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (ServerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serverArgs)(nil)).Elem()
}
type ServerInput interface {
pulumi.Input
ToServerOutput() ServerOutput
ToServerOutputWithContext(ctx context.Context) ServerOutput
}
func (*Server) ElementType() reflect.Type {
return reflect.TypeOf((**Server)(nil)).Elem()
}
func (i *Server) ToServerOutput() ServerOutput {
return i.ToServerOutputWithContext(context.Background())
}
func (i *Server) ToServerOutputWithContext(ctx context.Context) ServerOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerOutput)
}
// ServerArrayInput is an input type that accepts ServerArray and ServerArrayOutput values.
// You can construct a concrete instance of `ServerArrayInput` via:
//
// ServerArray{ ServerArgs{...} }
type ServerArrayInput interface {
pulumi.Input
ToServerArrayOutput() ServerArrayOutput
ToServerArrayOutputWithContext(context.Context) ServerArrayOutput
}
type ServerArray []ServerInput
func (ServerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Server)(nil)).Elem()
}
func (i ServerArray) ToServerArrayOutput() ServerArrayOutput {
return i.ToServerArrayOutputWithContext(context.Background())
}
func (i ServerArray) ToServerArrayOutputWithContext(ctx context.Context) ServerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerArrayOutput)
}
// ServerMapInput is an input type that accepts ServerMap and ServerMapOutput values.
// You can construct a concrete instance of `ServerMapInput` via:
//
// ServerMap{ "key": ServerArgs{...} }
type ServerMapInput interface {
pulumi.Input
ToServerMapOutput() ServerMapOutput
ToServerMapOutputWithContext(context.Context) ServerMapOutput
}
type ServerMap map[string]ServerInput
func (ServerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Server)(nil)).Elem()
}
func (i ServerMap) ToServerMapOutput() ServerMapOutput {
return i.ToServerMapOutputWithContext(context.Background())
}
func (i ServerMap) ToServerMapOutputWithContext(ctx context.Context) ServerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServerMapOutput)
}
type ServerOutput struct{ *pulumi.OutputState }
func (ServerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Server)(nil)).Elem()
}
func (o ServerOutput) ToServerOutput() ServerOutput {
return o
}
func (o ServerOutput) ToServerOutputWithContext(ctx context.Context) ServerOutput {
return o
}
// List of email addresses of admin users.
func (o ServerOutput) AdminUsers() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Server) pulumi.StringArrayOutput { return v.AdminUsers }).(pulumi.StringArrayOutput)
}
// URI and SAS token for a blob container to store backups.
func (o ServerOutput) BackupBlobContainerUri() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Server) pulumi.StringPtrOutput { return v.BackupBlobContainerUri }).(pulumi.StringPtrOutput)
}
// One or more `ipv4FirewallRule` block(s) as defined below.
func (o ServerOutput) Ipv4FirewallRules() ServerIpv4FirewallRuleArrayOutput {
return o.ApplyT(func(v *Server) ServerIpv4FirewallRuleArrayOutput { return v.Ipv4FirewallRules }).(ServerIpv4FirewallRuleArrayOutput)
}
// The Azure location where the Analysis Services Server exists. Changing this forces a new resource to be created.
func (o ServerOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Server) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the Analysis Services Server. Only lowercase Alphanumeric characters allowed, starting with a letter. Changing this forces a new resource to be created.
func (o ServerOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Server) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Indicates if the Power BI service is allowed to access or not.
func (o ServerOutput) PowerBiServiceEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Server) pulumi.BoolPtrOutput { return v.PowerBiServiceEnabled }).(pulumi.BoolPtrOutput)
}
// Controls how the read-write server is used in the query pool. If this value is set to `All` then read-write servers are also used for queries. Otherwise with `ReadOnly` these servers do not participate in query operations. Defaults to `All`.
func (o ServerOutput) QuerypoolConnectionMode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Server) pulumi.StringPtrOutput { return v.QuerypoolConnectionMode }).(pulumi.StringPtrOutput)
}
// The name of the Resource Group in which the Analysis Services Server should be exist. Changing this forces a new resource to be created.
func (o ServerOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Server) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The full name of the Analysis Services Server.
func (o ServerOutput) ServerFullName() pulumi.StringOutput {
return o.ApplyT(func(v *Server) pulumi.StringOutput { return v.ServerFullName }).(pulumi.StringOutput)
}
// SKU for the Analysis Services Server. Possible values are: `D1`, `B1`, `B2`, `S0`, `S1`, `S2`, `S4`, `S8`, `S9`, `S8v2` and `S9v2`.
func (o ServerOutput) Sku() pulumi.StringOutput {
return o.ApplyT(func(v *Server) pulumi.StringOutput { return v.Sku }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o ServerOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Server) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type ServerArrayOutput struct{ *pulumi.OutputState }
func (ServerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Server)(nil)).Elem()
}
func (o ServerArrayOutput) ToServerArrayOutput() ServerArrayOutput {
return o
}
func (o ServerArrayOutput) ToServerArrayOutputWithContext(ctx context.Context) ServerArrayOutput {
return o
}
func (o ServerArrayOutput) Index(i pulumi.IntInput) ServerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Server {
return vs[0].([]*Server)[vs[1].(int)]
}).(ServerOutput)
}
type ServerMapOutput struct{ *pulumi.OutputState }
func (ServerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Server)(nil)).Elem()
}
func (o ServerMapOutput) ToServerMapOutput() ServerMapOutput {
return o
}
func (o ServerMapOutput) ToServerMapOutputWithContext(ctx context.Context) ServerMapOutput {
return o
}
func (o ServerMapOutput) MapIndex(k pulumi.StringInput) ServerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Server {
return vs[0].(map[string]*Server)[vs[1].(string)]
}).(ServerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServerInput)(nil)).Elem(), &Server{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerArrayInput)(nil)).Elem(), ServerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServerMapInput)(nil)).Elem(), ServerMap{})
pulumi.RegisterOutputType(ServerOutput{})
pulumi.RegisterOutputType(ServerArrayOutput{})
pulumi.RegisterOutputType(ServerMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.