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/eventgrid/init.go | sdk/go/azure/eventgrid/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 eventgrid
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:eventgrid/domain:Domain":
r = &Domain{}
case "azure:eventgrid/domainTopic:DomainTopic":
r = &DomainTopic{}
case "azure:eventgrid/eventSubscription:EventSubscription":
r = &EventSubscription{}
case "azure:eventgrid/namespace:Namespace":
r = &Namespace{}
case "azure:eventgrid/partnerConfiguration:PartnerConfiguration":
r = &PartnerConfiguration{}
case "azure:eventgrid/partnerNamespace:PartnerNamespace":
r = &PartnerNamespace{}
case "azure:eventgrid/partnerRegistration:PartnerRegistration":
r = &PartnerRegistration{}
case "azure:eventgrid/systemTopic:SystemTopic":
r = &SystemTopic{}
case "azure:eventgrid/systemTopicEventSubscription:SystemTopicEventSubscription":
r = &SystemTopicEventSubscription{}
case "azure:eventgrid/topic:Topic":
r = &Topic{}
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",
"eventgrid/domain",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventgrid/domainTopic",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventgrid/eventSubscription",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventgrid/namespace",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventgrid/partnerConfiguration",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventgrid/partnerNamespace",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventgrid/partnerRegistration",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventgrid/systemTopic",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventgrid/systemTopicEventSubscription",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"eventgrid/topic",
&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/eventgrid/pulumiTypes.go | sdk/go/azure/eventgrid/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 eventgrid
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 EventSubscriptionAdvancedFilter struct {
// Compares a value of an event using a single boolean value.
BoolEquals []EventSubscriptionAdvancedFilterBoolEqual `pulumi:"boolEquals"`
// Evaluates if a value of an event isn't NULL or undefined.
IsNotNulls []EventSubscriptionAdvancedFilterIsNotNull `pulumi:"isNotNulls"`
// Evaluates if a value of an event is NULL or undefined.
//
// Each nested block consists of a key and a value(s) element.
IsNullOrUndefineds []EventSubscriptionAdvancedFilterIsNullOrUndefined `pulumi:"isNullOrUndefineds"`
// Compares a value of an event using a single floating point number.
| 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/eventgrid/getDomain.go | sdk/go/azure/eventgrid/getDomain.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventgrid
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 EventGrid Domain
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := eventgrid.LookupDomain(ctx, &eventgrid.LookupDomainArgs{
// Name: "my-eventgrid-domain",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("eventgridDomainMappingTopic", example.InputMappingFields[0].Topic)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.EventGrid` - 2025-02-15
func LookupDomain(ctx *pulumi.Context, args *LookupDomainArgs, opts ...pulumi.InvokeOption) (*LookupDomainResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDomainResult
err := ctx.Invoke("azure:eventgrid/getDomain:getDomain", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDomain.
type LookupDomainArgs struct {
// The name of the EventGrid Domain resource.
Name string `pulumi:"name"`
// The name of the resource group in which the EventGrid Domain exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getDomain.
type LookupDomainResult struct {
// The Endpoint associated with the EventGrid Domain.
Endpoint string `pulumi:"endpoint"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// An `identity` block as documented below.
Identities []GetDomainIdentity `pulumi:"identities"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules []GetDomainInboundIpRule `pulumi:"inboundIpRules"`
// A `inputMappingDefaultValues` block as defined below.
InputMappingDefaultValues []GetDomainInputMappingDefaultValue `pulumi:"inputMappingDefaultValues"`
// A `inputMappingFields` block as defined below.
InputMappingFields []GetDomainInputMappingField `pulumi:"inputMappingFields"`
// The schema in which incoming events will be published to this domain. Possible values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`.
InputSchema string `pulumi:"inputSchema"`
// The Azure Region in which this EventGrid Domain exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// The primary access key associated with the EventGrid Domain.
PrimaryAccessKey string `pulumi:"primaryAccessKey"`
// Whether or not public network access is allowed for this server.
PublicNetworkAccessEnabled bool `pulumi:"publicNetworkAccessEnabled"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The secondary access key associated with the EventGrid Domain.
SecondaryAccessKey string `pulumi:"secondaryAccessKey"`
// A mapping of tags assigned to the EventGrid Domain.
Tags map[string]string `pulumi:"tags"`
}
func LookupDomainOutput(ctx *pulumi.Context, args LookupDomainOutputArgs, opts ...pulumi.InvokeOption) LookupDomainResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupDomainResultOutput, error) {
args := v.(LookupDomainArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:eventgrid/getDomain:getDomain", args, LookupDomainResultOutput{}, options).(LookupDomainResultOutput), nil
}).(LookupDomainResultOutput)
}
// A collection of arguments for invoking getDomain.
type LookupDomainOutputArgs struct {
// The name of the EventGrid Domain resource.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group in which the EventGrid Domain exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupDomainOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDomainArgs)(nil)).Elem()
}
// A collection of values returned by getDomain.
type LookupDomainResultOutput struct{ *pulumi.OutputState }
func (LookupDomainResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDomainResult)(nil)).Elem()
}
func (o LookupDomainResultOutput) ToLookupDomainResultOutput() LookupDomainResultOutput {
return o
}
func (o LookupDomainResultOutput) ToLookupDomainResultOutputWithContext(ctx context.Context) LookupDomainResultOutput {
return o
}
// The Endpoint associated with the EventGrid Domain.
func (o LookupDomainResultOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupDomainResult) string { return v.Endpoint }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupDomainResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupDomainResult) string { return v.Id }).(pulumi.StringOutput)
}
// An `identity` block as documented below.
func (o LookupDomainResultOutput) Identities() GetDomainIdentityArrayOutput {
return o.ApplyT(func(v LookupDomainResult) []GetDomainIdentity { return v.Identities }).(GetDomainIdentityArrayOutput)
}
// One or more `inboundIpRule` blocks as defined below.
func (o LookupDomainResultOutput) InboundIpRules() GetDomainInboundIpRuleArrayOutput {
return o.ApplyT(func(v LookupDomainResult) []GetDomainInboundIpRule { return v.InboundIpRules }).(GetDomainInboundIpRuleArrayOutput)
}
// A `inputMappingDefaultValues` block as defined below.
func (o LookupDomainResultOutput) InputMappingDefaultValues() GetDomainInputMappingDefaultValueArrayOutput {
return o.ApplyT(func(v LookupDomainResult) []GetDomainInputMappingDefaultValue { return v.InputMappingDefaultValues }).(GetDomainInputMappingDefaultValueArrayOutput)
}
// A `inputMappingFields` block as defined below.
func (o LookupDomainResultOutput) InputMappingFields() GetDomainInputMappingFieldArrayOutput {
return o.ApplyT(func(v LookupDomainResult) []GetDomainInputMappingField { return v.InputMappingFields }).(GetDomainInputMappingFieldArrayOutput)
}
// The schema in which incoming events will be published to this domain. Possible values are `CloudEventSchemaV1_0`, `CustomEventSchema`, or `EventGridSchema`.
func (o LookupDomainResultOutput) InputSchema() pulumi.StringOutput {
return o.ApplyT(func(v LookupDomainResult) string { return v.InputSchema }).(pulumi.StringOutput)
}
// The Azure Region in which this EventGrid Domain exists.
func (o LookupDomainResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupDomainResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupDomainResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDomainResult) string { return v.Name }).(pulumi.StringOutput)
}
// The primary access key associated with the EventGrid Domain.
func (o LookupDomainResultOutput) PrimaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupDomainResult) string { return v.PrimaryAccessKey }).(pulumi.StringOutput)
}
// Whether or not public network access is allowed for this server.
func (o LookupDomainResultOutput) PublicNetworkAccessEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupDomainResult) bool { return v.PublicNetworkAccessEnabled }).(pulumi.BoolOutput)
}
func (o LookupDomainResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDomainResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The secondary access key associated with the EventGrid Domain.
func (o LookupDomainResultOutput) SecondaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupDomainResult) string { return v.SecondaryAccessKey }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the EventGrid Domain.
func (o LookupDomainResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupDomainResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDomainResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventgrid/getPartnerNamespace.go | sdk/go/azure/eventgrid/getPartnerNamespace.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventgrid
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 Grid Partner Namespace
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := eventgrid.LookupPartnerNamespace(ctx, &eventgrid.LookupPartnerNamespaceArgs{
// Name: "my-eventgrid-partner-namespace",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("eventgridPartnerNamespaceEndpoint", example.Endpoint)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.EventGrid` - 2025-02-15
func LookupPartnerNamespace(ctx *pulumi.Context, args *LookupPartnerNamespaceArgs, opts ...pulumi.InvokeOption) (*LookupPartnerNamespaceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupPartnerNamespaceResult
err := ctx.Invoke("azure:eventgrid/getPartnerNamespace:getPartnerNamespace", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getPartnerNamespace.
type LookupPartnerNamespaceArgs struct {
// The name of the Event Grid Partner Namespace resource.
Name string `pulumi:"name"`
// The name of the resource group in which the Event Grid Partner Namespace exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getPartnerNamespace.
type LookupPartnerNamespaceResult struct {
// The endpoint for the Event Grid Partner Namespace.
Endpoint string `pulumi:"endpoint"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules []GetPartnerNamespaceInboundIpRule `pulumi:"inboundIpRules"`
// Whether local authentication methods are enabled for the Event Grid Partner Namespace.
LocalAuthenticationEnabled bool `pulumi:"localAuthenticationEnabled"`
// The Azure Region where the Event Grid Partner Namespace exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// The resource Id of the partner registration associated with this Event Grid Partner Namespace.
PartnerRegistrationId string `pulumi:"partnerRegistrationId"`
// The partner topic routing mode.
PartnerTopicRoutingMode string `pulumi:"partnerTopicRoutingMode"`
// Whether or not public network access is allowed for this server.
PublicNetworkAccess string `pulumi:"publicNetworkAccess"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which are assigned to the Event Grid Partner Namespace.
Tags map[string]string `pulumi:"tags"`
}
func LookupPartnerNamespaceOutput(ctx *pulumi.Context, args LookupPartnerNamespaceOutputArgs, opts ...pulumi.InvokeOption) LookupPartnerNamespaceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupPartnerNamespaceResultOutput, error) {
args := v.(LookupPartnerNamespaceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:eventgrid/getPartnerNamespace:getPartnerNamespace", args, LookupPartnerNamespaceResultOutput{}, options).(LookupPartnerNamespaceResultOutput), nil
}).(LookupPartnerNamespaceResultOutput)
}
// A collection of arguments for invoking getPartnerNamespace.
type LookupPartnerNamespaceOutputArgs struct {
// The name of the Event Grid Partner Namespace resource.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group in which the Event Grid Partner Namespace exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupPartnerNamespaceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupPartnerNamespaceArgs)(nil)).Elem()
}
// A collection of values returned by getPartnerNamespace.
type LookupPartnerNamespaceResultOutput struct{ *pulumi.OutputState }
func (LookupPartnerNamespaceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupPartnerNamespaceResult)(nil)).Elem()
}
func (o LookupPartnerNamespaceResultOutput) ToLookupPartnerNamespaceResultOutput() LookupPartnerNamespaceResultOutput {
return o
}
func (o LookupPartnerNamespaceResultOutput) ToLookupPartnerNamespaceResultOutputWithContext(ctx context.Context) LookupPartnerNamespaceResultOutput {
return o
}
// The endpoint for the Event Grid Partner Namespace.
func (o LookupPartnerNamespaceResultOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupPartnerNamespaceResult) string { return v.Endpoint }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupPartnerNamespaceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupPartnerNamespaceResult) string { return v.Id }).(pulumi.StringOutput)
}
// One or more `inboundIpRule` blocks as defined below.
func (o LookupPartnerNamespaceResultOutput) InboundIpRules() GetPartnerNamespaceInboundIpRuleArrayOutput {
return o.ApplyT(func(v LookupPartnerNamespaceResult) []GetPartnerNamespaceInboundIpRule { return v.InboundIpRules }).(GetPartnerNamespaceInboundIpRuleArrayOutput)
}
// Whether local authentication methods are enabled for the Event Grid Partner Namespace.
func (o LookupPartnerNamespaceResultOutput) LocalAuthenticationEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupPartnerNamespaceResult) bool { return v.LocalAuthenticationEnabled }).(pulumi.BoolOutput)
}
// The Azure Region where the Event Grid Partner Namespace exists.
func (o LookupPartnerNamespaceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupPartnerNamespaceResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupPartnerNamespaceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupPartnerNamespaceResult) string { return v.Name }).(pulumi.StringOutput)
}
// The resource Id of the partner registration associated with this Event Grid Partner Namespace.
func (o LookupPartnerNamespaceResultOutput) PartnerRegistrationId() pulumi.StringOutput {
return o.ApplyT(func(v LookupPartnerNamespaceResult) string { return v.PartnerRegistrationId }).(pulumi.StringOutput)
}
// The partner topic routing mode.
func (o LookupPartnerNamespaceResultOutput) PartnerTopicRoutingMode() pulumi.StringOutput {
return o.ApplyT(func(v LookupPartnerNamespaceResult) string { return v.PartnerTopicRoutingMode }).(pulumi.StringOutput)
}
// Whether or not public network access is allowed for this server.
func (o LookupPartnerNamespaceResultOutput) PublicNetworkAccess() pulumi.StringOutput {
return o.ApplyT(func(v LookupPartnerNamespaceResult) string { return v.PublicNetworkAccess }).(pulumi.StringOutput)
}
func (o LookupPartnerNamespaceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupPartnerNamespaceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which are assigned to the Event Grid Partner Namespace.
func (o LookupPartnerNamespaceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupPartnerNamespaceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupPartnerNamespaceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventgrid/namespace.go | sdk/go/azure/eventgrid/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 eventgrid
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 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/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.NewNamespace(ctx, "example", &eventgrid.NamespaceArgs{
// Name: pulumi.String("my-eventgrid-namespace"),
// 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` - 2023-12-15-preview
//
// ## Import
//
// EventGrid Namespace's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventgrid/namespace:Namespace namespace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/namespaces/namespace1
// ```
type Namespace struct {
pulumi.CustomResourceState
// Specifies the Capacity / Throughput Units for an Eventgrid Namespace. Valid values can be between `1` and `40`.
Capacity pulumi.IntPtrOutput `pulumi:"capacity"`
// An `identity` block as defined below.
Identity NamespaceIdentityPtrOutput `pulumi:"identity"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules NamespaceInboundIpRuleArrayOutput `pulumi:"inboundIpRules"`
// Specifies the supported Azure location where the resource should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the Event Grid Namespace resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Whether or not public network access is allowed for this server. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess pulumi.StringPtrOutput `pulumi:"publicNetworkAccess"`
// The name of the resource group in which the Event Grid Namespace should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Defines which tier to use. The only possible value is `Standard`. Defaults to `Standard`.
Sku pulumi.StringPtrOutput `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A `topicSpacesConfiguration` block as defined below. Changing this forces a new resource to be created.
TopicSpacesConfigurations NamespaceTopicSpacesConfigurationArrayOutput `pulumi:"topicSpacesConfigurations"`
}
// 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'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Namespace
err := ctx.RegisterResource("azure:eventgrid/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:eventgrid/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 / Throughput Units for an Eventgrid Namespace. Valid values can be between `1` and `40`.
Capacity *int `pulumi:"capacity"`
// An `identity` block as defined below.
Identity *NamespaceIdentity `pulumi:"identity"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules []NamespaceInboundIpRule `pulumi:"inboundIpRules"`
// Specifies the supported Azure location where the resource should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Event Grid Namespace 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. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess *string `pulumi:"publicNetworkAccess"`
// The name of the resource group in which the Event Grid Namespace should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Defines which tier to use. The only possible value is `Standard`. Defaults to `Standard`.
Sku *string `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// A `topicSpacesConfiguration` block as defined below. Changing this forces a new resource to be created.
TopicSpacesConfigurations []NamespaceTopicSpacesConfiguration `pulumi:"topicSpacesConfigurations"`
}
type NamespaceState struct {
// Specifies the Capacity / Throughput Units for an Eventgrid Namespace. Valid values can be between `1` and `40`.
Capacity pulumi.IntPtrInput
// An `identity` block as defined below.
Identity NamespaceIdentityPtrInput
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules NamespaceInboundIpRuleArrayInput
// Specifies the supported Azure location where the resource should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Event Grid Namespace resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether or not public network access is allowed for this server. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess pulumi.StringPtrInput
// The name of the resource group in which the Event Grid Namespace should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// Defines which tier to use. The only possible value is `Standard`. Defaults to `Standard`.
Sku pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// A `topicSpacesConfiguration` block as defined below. Changing this forces a new resource to be created.
TopicSpacesConfigurations NamespaceTopicSpacesConfigurationArrayInput
}
func (NamespaceState) ElementType() reflect.Type {
return reflect.TypeOf((*namespaceState)(nil)).Elem()
}
type namespaceArgs struct {
// Specifies the Capacity / Throughput Units for an Eventgrid Namespace. Valid values can be between `1` and `40`.
Capacity *int `pulumi:"capacity"`
// An `identity` block as defined below.
Identity *NamespaceIdentity `pulumi:"identity"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules []NamespaceInboundIpRule `pulumi:"inboundIpRules"`
// Specifies the supported Azure location where the resource should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the Event Grid Namespace 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. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess *string `pulumi:"publicNetworkAccess"`
// The name of the resource group in which the Event Grid Namespace should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Defines which tier to use. The only possible value is `Standard`. Defaults to `Standard`.
Sku *string `pulumi:"sku"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// A `topicSpacesConfiguration` block as defined below. Changing this forces a new resource to be created.
TopicSpacesConfigurations []NamespaceTopicSpacesConfiguration `pulumi:"topicSpacesConfigurations"`
}
// The set of arguments for constructing a Namespace resource.
type NamespaceArgs struct {
// Specifies the Capacity / Throughput Units for an Eventgrid Namespace. Valid values can be between `1` and `40`.
Capacity pulumi.IntPtrInput
// An `identity` block as defined below.
Identity NamespaceIdentityPtrInput
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules NamespaceInboundIpRuleArrayInput
// Specifies the supported Azure location where the resource should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the Event Grid Namespace resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether or not public network access is allowed for this server. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess pulumi.StringPtrInput
// The name of the resource group in which the Event Grid Namespace should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// Defines which tier to use. The only possible value is `Standard`. Defaults to `Standard`.
Sku pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// A `topicSpacesConfiguration` block as defined below. Changing this forces a new resource to be created.
TopicSpacesConfigurations NamespaceTopicSpacesConfigurationArrayInput
}
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 / Throughput Units for an Eventgrid Namespace. Valid values can be between `1` and `40`.
func (o NamespaceOutput) Capacity() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Namespace) pulumi.IntPtrOutput { return v.Capacity }).(pulumi.IntPtrOutput)
}
// An `identity` block as defined below.
func (o NamespaceOutput) Identity() NamespaceIdentityPtrOutput {
return o.ApplyT(func(v *Namespace) NamespaceIdentityPtrOutput { return v.Identity }).(NamespaceIdentityPtrOutput)
}
// One or more `inboundIpRule` blocks as defined below.
func (o NamespaceOutput) InboundIpRules() NamespaceInboundIpRuleArrayOutput {
return o.ApplyT(func(v *Namespace) NamespaceInboundIpRuleArrayOutput { return v.InboundIpRules }).(NamespaceInboundIpRuleArrayOutput)
}
// Specifies the supported Azure location where the resource should exist. 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)
}
// Specifies the name of the Event Grid 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)
}
// Whether or not public network access is allowed for this server. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
func (o NamespaceOutput) PublicNetworkAccess() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringPtrOutput { return v.PublicNetworkAccess }).(pulumi.StringPtrOutput)
}
// The name of the resource group in which the Event Grid Namespace should exist. Changing this forces a new resource to be created.
func (o NamespaceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Defines which tier to use. The only possible value is `Standard`. Defaults to `Standard`.
func (o NamespaceOutput) Sku() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Namespace) pulumi.StringPtrOutput { return v.Sku }).(pulumi.StringPtrOutput)
}
// 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)
}
// A `topicSpacesConfiguration` block as defined below. Changing this forces a new resource to be created.
func (o NamespaceOutput) TopicSpacesConfigurations() NamespaceTopicSpacesConfigurationArrayOutput {
return o.ApplyT(func(v *Namespace) NamespaceTopicSpacesConfigurationArrayOutput { return v.TopicSpacesConfigurations }).(NamespaceTopicSpacesConfigurationArrayOutput)
}
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/eventgrid/partnerRegistration.go | sdk/go/azure/eventgrid/partnerRegistration.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventgrid
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 Partner Registration.
//
// ## 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.NewPartnerRegistration(ctx, "example", &eventgrid.PartnerRegistrationArgs{
// Name: pulumi.String("example-partner-registration"),
// 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.EventGrid` - 2025-02-15
//
// ## Import
//
// EventGrid Partner Registrations can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventgrid/partnerRegistration:PartnerRegistration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.EventGrid/partnerRegistrations/example
// ```
type PartnerRegistration struct {
pulumi.CustomResourceState
// The name which should be used for this EventGrid Partner Registration. Changing this forces a new EventGrid Partner Registration to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The immutable id of the corresponding partner registration.
PartnerRegistrationId pulumi.StringOutput `pulumi:"partnerRegistrationId"`
// The name of the Resource Group where the EventGrid Partner Registration should exist. Changing this forces a new EventGrid Partner Registration to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the EventGrid Partner Registration.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewPartnerRegistration registers a new resource with the given unique name, arguments, and options.
func NewPartnerRegistration(ctx *pulumi.Context,
name string, args *PartnerRegistrationArgs, opts ...pulumi.ResourceOption) (*PartnerRegistration, 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 PartnerRegistration
err := ctx.RegisterResource("azure:eventgrid/partnerRegistration:PartnerRegistration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPartnerRegistration gets an existing PartnerRegistration resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetPartnerRegistration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PartnerRegistrationState, opts ...pulumi.ResourceOption) (*PartnerRegistration, error) {
var resource PartnerRegistration
err := ctx.ReadResource("azure:eventgrid/partnerRegistration:PartnerRegistration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering PartnerRegistration resources.
type partnerRegistrationState struct {
// The name which should be used for this EventGrid Partner Registration. Changing this forces a new EventGrid Partner Registration to be created.
Name *string `pulumi:"name"`
// The immutable id of the corresponding partner registration.
PartnerRegistrationId *string `pulumi:"partnerRegistrationId"`
// The name of the Resource Group where the EventGrid Partner Registration should exist. Changing this forces a new EventGrid Partner Registration to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the EventGrid Partner Registration.
Tags map[string]string `pulumi:"tags"`
}
type PartnerRegistrationState struct {
// The name which should be used for this EventGrid Partner Registration. Changing this forces a new EventGrid Partner Registration to be created.
Name pulumi.StringPtrInput
// The immutable id of the corresponding partner registration.
PartnerRegistrationId pulumi.StringPtrInput
// The name of the Resource Group where the EventGrid Partner Registration should exist. Changing this forces a new EventGrid Partner Registration to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the EventGrid Partner Registration.
Tags pulumi.StringMapInput
}
func (PartnerRegistrationState) ElementType() reflect.Type {
return reflect.TypeOf((*partnerRegistrationState)(nil)).Elem()
}
type partnerRegistrationArgs struct {
// The name which should be used for this EventGrid Partner Registration. Changing this forces a new EventGrid Partner Registration to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the EventGrid Partner Registration should exist. Changing this forces a new EventGrid Partner Registration to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the EventGrid Partner Registration.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a PartnerRegistration resource.
type PartnerRegistrationArgs struct {
// The name which should be used for this EventGrid Partner Registration. Changing this forces a new EventGrid Partner Registration to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the EventGrid Partner Registration should exist. Changing this forces a new EventGrid Partner Registration to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the EventGrid Partner Registration.
Tags pulumi.StringMapInput
}
func (PartnerRegistrationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*partnerRegistrationArgs)(nil)).Elem()
}
type PartnerRegistrationInput interface {
pulumi.Input
ToPartnerRegistrationOutput() PartnerRegistrationOutput
ToPartnerRegistrationOutputWithContext(ctx context.Context) PartnerRegistrationOutput
}
func (*PartnerRegistration) ElementType() reflect.Type {
return reflect.TypeOf((**PartnerRegistration)(nil)).Elem()
}
func (i *PartnerRegistration) ToPartnerRegistrationOutput() PartnerRegistrationOutput {
return i.ToPartnerRegistrationOutputWithContext(context.Background())
}
func (i *PartnerRegistration) ToPartnerRegistrationOutputWithContext(ctx context.Context) PartnerRegistrationOutput {
return pulumi.ToOutputWithContext(ctx, i).(PartnerRegistrationOutput)
}
// PartnerRegistrationArrayInput is an input type that accepts PartnerRegistrationArray and PartnerRegistrationArrayOutput values.
// You can construct a concrete instance of `PartnerRegistrationArrayInput` via:
//
// PartnerRegistrationArray{ PartnerRegistrationArgs{...} }
type PartnerRegistrationArrayInput interface {
pulumi.Input
ToPartnerRegistrationArrayOutput() PartnerRegistrationArrayOutput
ToPartnerRegistrationArrayOutputWithContext(context.Context) PartnerRegistrationArrayOutput
}
type PartnerRegistrationArray []PartnerRegistrationInput
func (PartnerRegistrationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PartnerRegistration)(nil)).Elem()
}
func (i PartnerRegistrationArray) ToPartnerRegistrationArrayOutput() PartnerRegistrationArrayOutput {
return i.ToPartnerRegistrationArrayOutputWithContext(context.Background())
}
func (i PartnerRegistrationArray) ToPartnerRegistrationArrayOutputWithContext(ctx context.Context) PartnerRegistrationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(PartnerRegistrationArrayOutput)
}
// PartnerRegistrationMapInput is an input type that accepts PartnerRegistrationMap and PartnerRegistrationMapOutput values.
// You can construct a concrete instance of `PartnerRegistrationMapInput` via:
//
// PartnerRegistrationMap{ "key": PartnerRegistrationArgs{...} }
type PartnerRegistrationMapInput interface {
pulumi.Input
ToPartnerRegistrationMapOutput() PartnerRegistrationMapOutput
ToPartnerRegistrationMapOutputWithContext(context.Context) PartnerRegistrationMapOutput
}
type PartnerRegistrationMap map[string]PartnerRegistrationInput
func (PartnerRegistrationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PartnerRegistration)(nil)).Elem()
}
func (i PartnerRegistrationMap) ToPartnerRegistrationMapOutput() PartnerRegistrationMapOutput {
return i.ToPartnerRegistrationMapOutputWithContext(context.Background())
}
func (i PartnerRegistrationMap) ToPartnerRegistrationMapOutputWithContext(ctx context.Context) PartnerRegistrationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(PartnerRegistrationMapOutput)
}
type PartnerRegistrationOutput struct{ *pulumi.OutputState }
func (PartnerRegistrationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**PartnerRegistration)(nil)).Elem()
}
func (o PartnerRegistrationOutput) ToPartnerRegistrationOutput() PartnerRegistrationOutput {
return o
}
func (o PartnerRegistrationOutput) ToPartnerRegistrationOutputWithContext(ctx context.Context) PartnerRegistrationOutput {
return o
}
// The name which should be used for this EventGrid Partner Registration. Changing this forces a new EventGrid Partner Registration to be created.
func (o PartnerRegistrationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *PartnerRegistration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The immutable id of the corresponding partner registration.
func (o PartnerRegistrationOutput) PartnerRegistrationId() pulumi.StringOutput {
return o.ApplyT(func(v *PartnerRegistration) pulumi.StringOutput { return v.PartnerRegistrationId }).(pulumi.StringOutput)
}
// The name of the Resource Group where the EventGrid Partner Registration should exist. Changing this forces a new EventGrid Partner Registration to be created.
func (o PartnerRegistrationOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *PartnerRegistration) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the EventGrid Partner Registration.
func (o PartnerRegistrationOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *PartnerRegistration) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type PartnerRegistrationArrayOutput struct{ *pulumi.OutputState }
func (PartnerRegistrationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PartnerRegistration)(nil)).Elem()
}
func (o PartnerRegistrationArrayOutput) ToPartnerRegistrationArrayOutput() PartnerRegistrationArrayOutput {
return o
}
func (o PartnerRegistrationArrayOutput) ToPartnerRegistrationArrayOutputWithContext(ctx context.Context) PartnerRegistrationArrayOutput {
return o
}
func (o PartnerRegistrationArrayOutput) Index(i pulumi.IntInput) PartnerRegistrationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PartnerRegistration {
return vs[0].([]*PartnerRegistration)[vs[1].(int)]
}).(PartnerRegistrationOutput)
}
type PartnerRegistrationMapOutput struct{ *pulumi.OutputState }
func (PartnerRegistrationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PartnerRegistration)(nil)).Elem()
}
func (o PartnerRegistrationMapOutput) ToPartnerRegistrationMapOutput() PartnerRegistrationMapOutput {
return o
}
func (o PartnerRegistrationMapOutput) ToPartnerRegistrationMapOutputWithContext(ctx context.Context) PartnerRegistrationMapOutput {
return o
}
func (o PartnerRegistrationMapOutput) MapIndex(k pulumi.StringInput) PartnerRegistrationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PartnerRegistration {
return vs[0].(map[string]*PartnerRegistration)[vs[1].(string)]
}).(PartnerRegistrationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PartnerRegistrationInput)(nil)).Elem(), &PartnerRegistration{})
pulumi.RegisterInputType(reflect.TypeOf((*PartnerRegistrationArrayInput)(nil)).Elem(), PartnerRegistrationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*PartnerRegistrationMapInput)(nil)).Elem(), PartnerRegistrationMap{})
pulumi.RegisterOutputType(PartnerRegistrationOutput{})
pulumi.RegisterOutputType(PartnerRegistrationArrayOutput{})
pulumi.RegisterOutputType(PartnerRegistrationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventgrid/systemTopicEventSubscription.go | sdk/go/azure/eventgrid/systemTopicEventSubscription.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventgrid
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 System Topic 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-rg"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("examplestorageaccount"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// 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("examplestoragequeue"),
// StorageAccountName: exampleAccount.Name,
// })
// if err != nil {
// return err
// }
// exampleSystemTopic, err := eventgrid.NewSystemTopic(ctx, "example", &eventgrid.SystemTopicArgs{
// Name: pulumi.String("example-system-topic"),
// Location: pulumi.String("Global"),
// ResourceGroupName: example.Name,
// SourceResourceId: example.ID(),
// TopicType: pulumi.String("Microsoft.Resources.ResourceGroups"),
// })
// if err != nil {
// return err
// }
// _, err = eventgrid.NewSystemTopicEventSubscription(ctx, "example", &eventgrid.SystemTopicEventSubscriptionArgs{
// Name: pulumi.String("example-event-subscription"),
// SystemTopic: exampleSystemTopic.Name,
// ResourceGroupName: example.Name,
// StorageQueueEndpoint: &eventgrid.SystemTopicEventSubscriptionStorageQueueEndpointArgs{
// 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 System Topic Event Subscriptions can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventgrid/systemTopicEventSubscription:SystemTopicEventSubscription example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/systemTopics/topic1/eventSubscriptions/subscription1
// ```
type SystemTopicEventSubscription struct {
pulumi.CustomResourceState
// A `advancedFilter` block as defined below.
AdvancedFilter SystemTopicEventSubscriptionAdvancedFilterPtrOutput `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 SystemTopicEventSubscriptionAzureFunctionEndpointPtrOutput `pulumi:"azureFunctionEndpoint"`
// A `deadLetterIdentity` block as defined below.
//
// > **Note:** `storageBlobDeadLetterDestination` must be specified when a `deadLetterIdentity` is specified
DeadLetterIdentity SystemTopicEventSubscriptionDeadLetterIdentityPtrOutput `pulumi:"deadLetterIdentity"`
// A `deliveryIdentity` block as defined below.
DeliveryIdentity SystemTopicEventSubscriptionDeliveryIdentityPtrOutput `pulumi:"deliveryIdentity"`
// One or more `deliveryProperty` blocks as defined below.
DeliveryProperties SystemTopicEventSubscriptionDeliveryPropertyArrayOutput `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"`
// The name which should be used for this Event Subscription. Changing this forces a new Event Subscription to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the System Topic exists. Changing this forces a new Event Subscription to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A `retryPolicy` block as defined below.
RetryPolicy SystemTopicEventSubscriptionRetryPolicyOutput `pulumi:"retryPolicy"`
// 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 SystemTopicEventSubscriptionStorageBlobDeadLetterDestinationPtrOutput `pulumi:"storageBlobDeadLetterDestination"`
// A `storageQueueEndpoint` block as defined below.
StorageQueueEndpoint SystemTopicEventSubscriptionStorageQueueEndpointPtrOutput `pulumi:"storageQueueEndpoint"`
// A `subjectFilter` block as defined below.
SubjectFilter SystemTopicEventSubscriptionSubjectFilterPtrOutput `pulumi:"subjectFilter"`
// The System Topic where the Event Subscription should be created in. Changing this forces a new Event Subscription to be created.
SystemTopic pulumi.StringOutput `pulumi:"systemTopic"`
// A `webhookEndpoint` block as defined below.
//
// > **Note:** One of `azureFunctionEndpoint`, `eventhubEndpointId`, `hybridConnectionEndpoint`, `hybridConnectionEndpointId`, `serviceBusQueueEndpointId`, `serviceBusTopicEndpointId`, `storageQueueEndpoint` or `webhookEndpoint` must be specified.
WebhookEndpoint SystemTopicEventSubscriptionWebhookEndpointPtrOutput `pulumi:"webhookEndpoint"`
}
// NewSystemTopicEventSubscription registers a new resource with the given unique name, arguments, and options.
func NewSystemTopicEventSubscription(ctx *pulumi.Context,
name string, args *SystemTopicEventSubscriptionArgs, opts ...pulumi.ResourceOption) (*SystemTopicEventSubscription, 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.SystemTopic == nil {
return nil, errors.New("invalid value for required argument 'SystemTopic'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SystemTopicEventSubscription
err := ctx.RegisterResource("azure:eventgrid/systemTopicEventSubscription:SystemTopicEventSubscription", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSystemTopicEventSubscription gets an existing SystemTopicEventSubscription resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSystemTopicEventSubscription(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SystemTopicEventSubscriptionState, opts ...pulumi.ResourceOption) (*SystemTopicEventSubscription, error) {
var resource SystemTopicEventSubscription
err := ctx.ReadResource("azure:eventgrid/systemTopicEventSubscription:SystemTopicEventSubscription", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SystemTopicEventSubscription resources.
type systemTopicEventSubscriptionState struct {
// A `advancedFilter` block as defined below.
AdvancedFilter *SystemTopicEventSubscriptionAdvancedFilter `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 *SystemTopicEventSubscriptionAzureFunctionEndpoint `pulumi:"azureFunctionEndpoint"`
// A `deadLetterIdentity` block as defined below.
//
// > **Note:** `storageBlobDeadLetterDestination` must be specified when a `deadLetterIdentity` is specified
DeadLetterIdentity *SystemTopicEventSubscriptionDeadLetterIdentity `pulumi:"deadLetterIdentity"`
// A `deliveryIdentity` block as defined below.
DeliveryIdentity *SystemTopicEventSubscriptionDeliveryIdentity `pulumi:"deliveryIdentity"`
// One or more `deliveryProperty` blocks as defined below.
DeliveryProperties []SystemTopicEventSubscriptionDeliveryProperty `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"`
// The name which should be used for this Event Subscription. Changing this forces a new Event Subscription to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the System Topic exists. Changing this forces a new Event Subscription to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A `retryPolicy` block as defined below.
RetryPolicy *SystemTopicEventSubscriptionRetryPolicy `pulumi:"retryPolicy"`
// 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 *SystemTopicEventSubscriptionStorageBlobDeadLetterDestination `pulumi:"storageBlobDeadLetterDestination"`
// A `storageQueueEndpoint` block as defined below.
StorageQueueEndpoint *SystemTopicEventSubscriptionStorageQueueEndpoint `pulumi:"storageQueueEndpoint"`
// A `subjectFilter` block as defined below.
SubjectFilter *SystemTopicEventSubscriptionSubjectFilter `pulumi:"subjectFilter"`
// The System Topic where the Event Subscription should be created in. Changing this forces a new Event Subscription to be created.
SystemTopic *string `pulumi:"systemTopic"`
// A `webhookEndpoint` block as defined below.
//
// > **Note:** One of `azureFunctionEndpoint`, `eventhubEndpointId`, `hybridConnectionEndpoint`, `hybridConnectionEndpointId`, `serviceBusQueueEndpointId`, `serviceBusTopicEndpointId`, `storageQueueEndpoint` or `webhookEndpoint` must be specified.
WebhookEndpoint *SystemTopicEventSubscriptionWebhookEndpoint `pulumi:"webhookEndpoint"`
}
type SystemTopicEventSubscriptionState struct {
// A `advancedFilter` block as defined below.
AdvancedFilter SystemTopicEventSubscriptionAdvancedFilterPtrInput
// 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 SystemTopicEventSubscriptionAzureFunctionEndpointPtrInput
// A `deadLetterIdentity` block as defined below.
//
// > **Note:** `storageBlobDeadLetterDestination` must be specified when a `deadLetterIdentity` is specified
DeadLetterIdentity SystemTopicEventSubscriptionDeadLetterIdentityPtrInput
// A `deliveryIdentity` block as defined below.
DeliveryIdentity SystemTopicEventSubscriptionDeliveryIdentityPtrInput
// One or more `deliveryProperty` blocks as defined below.
DeliveryProperties SystemTopicEventSubscriptionDeliveryPropertyArrayInput
// 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
// The name which should be used for this Event Subscription. Changing this forces a new Event Subscription to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the System Topic exists. Changing this forces a new Event Subscription to be created.
ResourceGroupName pulumi.StringPtrInput
// A `retryPolicy` block as defined below.
RetryPolicy SystemTopicEventSubscriptionRetryPolicyPtrInput
// 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 SystemTopicEventSubscriptionStorageBlobDeadLetterDestinationPtrInput
// A `storageQueueEndpoint` block as defined below.
StorageQueueEndpoint SystemTopicEventSubscriptionStorageQueueEndpointPtrInput
// A `subjectFilter` block as defined below.
SubjectFilter SystemTopicEventSubscriptionSubjectFilterPtrInput
// The System Topic where the Event Subscription should be created in. Changing this forces a new Event Subscription to be created.
SystemTopic pulumi.StringPtrInput
// A `webhookEndpoint` block as defined below.
//
// > **Note:** One of `azureFunctionEndpoint`, `eventhubEndpointId`, `hybridConnectionEndpoint`, `hybridConnectionEndpointId`, `serviceBusQueueEndpointId`, `serviceBusTopicEndpointId`, `storageQueueEndpoint` or `webhookEndpoint` must be specified.
WebhookEndpoint SystemTopicEventSubscriptionWebhookEndpointPtrInput
}
func (SystemTopicEventSubscriptionState) ElementType() reflect.Type {
return reflect.TypeOf((*systemTopicEventSubscriptionState)(nil)).Elem()
}
type systemTopicEventSubscriptionArgs struct {
// A `advancedFilter` block as defined below.
AdvancedFilter *SystemTopicEventSubscriptionAdvancedFilter `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 *SystemTopicEventSubscriptionAzureFunctionEndpoint `pulumi:"azureFunctionEndpoint"`
// A `deadLetterIdentity` block as defined below.
//
// > **Note:** `storageBlobDeadLetterDestination` must be specified when a `deadLetterIdentity` is specified
DeadLetterIdentity *SystemTopicEventSubscriptionDeadLetterIdentity `pulumi:"deadLetterIdentity"`
// A `deliveryIdentity` block as defined below.
DeliveryIdentity *SystemTopicEventSubscriptionDeliveryIdentity `pulumi:"deliveryIdentity"`
// One or more `deliveryProperty` blocks as defined below.
DeliveryProperties []SystemTopicEventSubscriptionDeliveryProperty `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"`
// The name which should be used for this Event Subscription. Changing this forces a new Event Subscription to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the System Topic exists. Changing this forces a new Event Subscription to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `retryPolicy` block as defined below.
RetryPolicy *SystemTopicEventSubscriptionRetryPolicy `pulumi:"retryPolicy"`
// 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 *SystemTopicEventSubscriptionStorageBlobDeadLetterDestination `pulumi:"storageBlobDeadLetterDestination"`
// A `storageQueueEndpoint` block as defined below.
StorageQueueEndpoint *SystemTopicEventSubscriptionStorageQueueEndpoint `pulumi:"storageQueueEndpoint"`
// A `subjectFilter` block as defined below.
SubjectFilter *SystemTopicEventSubscriptionSubjectFilter `pulumi:"subjectFilter"`
// The System Topic where the Event Subscription should be created in. Changing this forces a new Event Subscription to be created.
SystemTopic string `pulumi:"systemTopic"`
// A `webhookEndpoint` block as defined below.
//
// > **Note:** One of `azureFunctionEndpoint`, `eventhubEndpointId`, `hybridConnectionEndpoint`, `hybridConnectionEndpointId`, `serviceBusQueueEndpointId`, `serviceBusTopicEndpointId`, `storageQueueEndpoint` or `webhookEndpoint` must be specified.
WebhookEndpoint *SystemTopicEventSubscriptionWebhookEndpoint `pulumi:"webhookEndpoint"`
}
// The set of arguments for constructing a SystemTopicEventSubscription resource.
type SystemTopicEventSubscriptionArgs struct {
// A `advancedFilter` block as defined below.
AdvancedFilter SystemTopicEventSubscriptionAdvancedFilterPtrInput
// 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 SystemTopicEventSubscriptionAzureFunctionEndpointPtrInput
// A `deadLetterIdentity` block as defined below.
//
// > **Note:** `storageBlobDeadLetterDestination` must be specified when a `deadLetterIdentity` is specified
DeadLetterIdentity SystemTopicEventSubscriptionDeadLetterIdentityPtrInput
// A `deliveryIdentity` block as defined below.
DeliveryIdentity SystemTopicEventSubscriptionDeliveryIdentityPtrInput
// One or more `deliveryProperty` blocks as defined below.
DeliveryProperties SystemTopicEventSubscriptionDeliveryPropertyArrayInput
// 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
// The name which should be used for this Event Subscription. Changing this forces a new Event Subscription to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the System Topic exists. Changing this forces a new Event Subscription to be created.
ResourceGroupName pulumi.StringInput
// A `retryPolicy` block as defined below.
RetryPolicy SystemTopicEventSubscriptionRetryPolicyPtrInput
// 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 SystemTopicEventSubscriptionStorageBlobDeadLetterDestinationPtrInput
// A `storageQueueEndpoint` block as defined below.
StorageQueueEndpoint SystemTopicEventSubscriptionStorageQueueEndpointPtrInput
// A `subjectFilter` block as defined below.
SubjectFilter SystemTopicEventSubscriptionSubjectFilterPtrInput
// The System Topic where the Event Subscription should be created in. Changing this forces a new Event Subscription to be created.
SystemTopic pulumi.StringInput
// A `webhookEndpoint` block as defined below.
//
// > **Note:** One of `azureFunctionEndpoint`, `eventhubEndpointId`, `hybridConnectionEndpoint`, `hybridConnectionEndpointId`, `serviceBusQueueEndpointId`, `serviceBusTopicEndpointId`, `storageQueueEndpoint` or `webhookEndpoint` must be specified.
WebhookEndpoint SystemTopicEventSubscriptionWebhookEndpointPtrInput
}
func (SystemTopicEventSubscriptionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*systemTopicEventSubscriptionArgs)(nil)).Elem()
}
type SystemTopicEventSubscriptionInput interface {
pulumi.Input
ToSystemTopicEventSubscriptionOutput() SystemTopicEventSubscriptionOutput
ToSystemTopicEventSubscriptionOutputWithContext(ctx context.Context) SystemTopicEventSubscriptionOutput
}
func (*SystemTopicEventSubscription) ElementType() reflect.Type {
return reflect.TypeOf((**SystemTopicEventSubscription)(nil)).Elem()
}
func (i *SystemTopicEventSubscription) ToSystemTopicEventSubscriptionOutput() SystemTopicEventSubscriptionOutput {
return i.ToSystemTopicEventSubscriptionOutputWithContext(context.Background())
}
func (i *SystemTopicEventSubscription) ToSystemTopicEventSubscriptionOutputWithContext(ctx context.Context) SystemTopicEventSubscriptionOutput {
return pulumi.ToOutputWithContext(ctx, i).(SystemTopicEventSubscriptionOutput)
}
// SystemTopicEventSubscriptionArrayInput is an input type that accepts SystemTopicEventSubscriptionArray and SystemTopicEventSubscriptionArrayOutput values.
// You can construct a concrete instance of `SystemTopicEventSubscriptionArrayInput` via:
//
// SystemTopicEventSubscriptionArray{ SystemTopicEventSubscriptionArgs{...} }
type SystemTopicEventSubscriptionArrayInput interface {
pulumi.Input
ToSystemTopicEventSubscriptionArrayOutput() SystemTopicEventSubscriptionArrayOutput
ToSystemTopicEventSubscriptionArrayOutputWithContext(context.Context) SystemTopicEventSubscriptionArrayOutput
}
type SystemTopicEventSubscriptionArray []SystemTopicEventSubscriptionInput
func (SystemTopicEventSubscriptionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SystemTopicEventSubscription)(nil)).Elem()
}
func (i SystemTopicEventSubscriptionArray) ToSystemTopicEventSubscriptionArrayOutput() SystemTopicEventSubscriptionArrayOutput {
return i.ToSystemTopicEventSubscriptionArrayOutputWithContext(context.Background())
}
func (i SystemTopicEventSubscriptionArray) ToSystemTopicEventSubscriptionArrayOutputWithContext(ctx context.Context) SystemTopicEventSubscriptionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SystemTopicEventSubscriptionArrayOutput)
}
// SystemTopicEventSubscriptionMapInput is an input type that accepts SystemTopicEventSubscriptionMap and SystemTopicEventSubscriptionMapOutput values.
// You can construct a concrete instance of `SystemTopicEventSubscriptionMapInput` via:
//
// SystemTopicEventSubscriptionMap{ "key": SystemTopicEventSubscriptionArgs{...} }
type SystemTopicEventSubscriptionMapInput interface {
pulumi.Input
ToSystemTopicEventSubscriptionMapOutput() SystemTopicEventSubscriptionMapOutput
ToSystemTopicEventSubscriptionMapOutputWithContext(context.Context) SystemTopicEventSubscriptionMapOutput
}
type SystemTopicEventSubscriptionMap map[string]SystemTopicEventSubscriptionInput
func (SystemTopicEventSubscriptionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SystemTopicEventSubscription)(nil)).Elem()
}
func (i SystemTopicEventSubscriptionMap) ToSystemTopicEventSubscriptionMapOutput() SystemTopicEventSubscriptionMapOutput {
return i.ToSystemTopicEventSubscriptionMapOutputWithContext(context.Background())
}
func (i SystemTopicEventSubscriptionMap) ToSystemTopicEventSubscriptionMapOutputWithContext(ctx context.Context) SystemTopicEventSubscriptionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SystemTopicEventSubscriptionMapOutput)
}
type SystemTopicEventSubscriptionOutput struct{ *pulumi.OutputState }
func (SystemTopicEventSubscriptionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SystemTopicEventSubscription)(nil)).Elem()
}
func (o SystemTopicEventSubscriptionOutput) ToSystemTopicEventSubscriptionOutput() SystemTopicEventSubscriptionOutput {
return o
}
func (o SystemTopicEventSubscriptionOutput) ToSystemTopicEventSubscriptionOutputWithContext(ctx context.Context) SystemTopicEventSubscriptionOutput {
return o
}
// A `advancedFilter` block as defined below.
func (o SystemTopicEventSubscriptionOutput) AdvancedFilter() SystemTopicEventSubscriptionAdvancedFilterPtrOutput {
return o.ApplyT(func(v *SystemTopicEventSubscription) SystemTopicEventSubscriptionAdvancedFilterPtrOutput {
return v.AdvancedFilter
}).(SystemTopicEventSubscriptionAdvancedFilterPtrOutput)
}
// Specifies whether advanced filters should be evaluated against an array of values instead of expecting a singular value. Defaults to `false`.
func (o SystemTopicEventSubscriptionOutput) AdvancedFilteringOnArraysEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SystemTopicEventSubscription) pulumi.BoolPtrOutput { return v.AdvancedFilteringOnArraysEnabled }).(pulumi.BoolPtrOutput)
}
// An `azureFunctionEndpoint` block as defined below.
func (o SystemTopicEventSubscriptionOutput) AzureFunctionEndpoint() SystemTopicEventSubscriptionAzureFunctionEndpointPtrOutput {
return o.ApplyT(func(v *SystemTopicEventSubscription) SystemTopicEventSubscriptionAzureFunctionEndpointPtrOutput {
return v.AzureFunctionEndpoint
}).(SystemTopicEventSubscriptionAzureFunctionEndpointPtrOutput)
}
// A `deadLetterIdentity` block as defined below.
//
// > **Note:** `storageBlobDeadLetterDestination` must be specified when a `deadLetterIdentity` is specified
func (o SystemTopicEventSubscriptionOutput) DeadLetterIdentity() SystemTopicEventSubscriptionDeadLetterIdentityPtrOutput {
return o.ApplyT(func(v *SystemTopicEventSubscription) SystemTopicEventSubscriptionDeadLetterIdentityPtrOutput {
return v.DeadLetterIdentity
}).(SystemTopicEventSubscriptionDeadLetterIdentityPtrOutput)
}
// A `deliveryIdentity` block as defined below.
func (o SystemTopicEventSubscriptionOutput) DeliveryIdentity() SystemTopicEventSubscriptionDeliveryIdentityPtrOutput {
return o.ApplyT(func(v *SystemTopicEventSubscription) SystemTopicEventSubscriptionDeliveryIdentityPtrOutput {
return v.DeliveryIdentity
}).(SystemTopicEventSubscriptionDeliveryIdentityPtrOutput)
}
// One or more `deliveryProperty` blocks as defined below.
func (o SystemTopicEventSubscriptionOutput) DeliveryProperties() SystemTopicEventSubscriptionDeliveryPropertyArrayOutput {
return o.ApplyT(func(v *SystemTopicEventSubscription) SystemTopicEventSubscriptionDeliveryPropertyArrayOutput {
return v.DeliveryProperties
}).(SystemTopicEventSubscriptionDeliveryPropertyArrayOutput)
}
// 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 SystemTopicEventSubscriptionOutput) EventDeliverySchema() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SystemTopicEventSubscription) pulumi.StringPtrOutput { return v.EventDeliverySchema }).(pulumi.StringPtrOutput)
}
// Specifies the id where the Event Hub is located.
func (o SystemTopicEventSubscriptionOutput) EventhubEndpointId() pulumi.StringOutput {
return o.ApplyT(func(v *SystemTopicEventSubscription) pulumi.StringOutput { return v.EventhubEndpointId }).(pulumi.StringOutput)
}
// Specifies the expiration time of the event subscription (Datetime Format `RFC 3339`).
func (o SystemTopicEventSubscriptionOutput) ExpirationTimeUtc() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SystemTopicEventSubscription) pulumi.StringPtrOutput { return v.ExpirationTimeUtc }).(pulumi.StringPtrOutput)
}
// Specifies the id where the Hybrid Connection is located.
func (o SystemTopicEventSubscriptionOutput) HybridConnectionEndpointId() pulumi.StringOutput {
return o.ApplyT(func(v *SystemTopicEventSubscription) pulumi.StringOutput { return v.HybridConnectionEndpointId }).(pulumi.StringOutput)
}
// A list of applicable event types that need to be part of the event subscription.
func (o SystemTopicEventSubscriptionOutput) IncludedEventTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SystemTopicEventSubscription) pulumi.StringArrayOutput { return v.IncludedEventTypes }).(pulumi.StringArrayOutput)
}
// A list of labels to assign to the event subscription.
func (o SystemTopicEventSubscriptionOutput) Labels() pulumi.StringArrayOutput {
return o.ApplyT(func(v *SystemTopicEventSubscription) pulumi.StringArrayOutput { return v.Labels }).(pulumi.StringArrayOutput)
}
// The name which should be used for this Event Subscription. Changing this forces a new Event Subscription to be created.
func (o SystemTopicEventSubscriptionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SystemTopicEventSubscription) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the System Topic exists. Changing this forces a new Event Subscription to be created.
func (o SystemTopicEventSubscriptionOutput) ResourceGroupName() 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/eventgrid/getPartnerRegistration.go | sdk/go/azure/eventgrid/getPartnerRegistration.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventgrid
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 EventGrid Partner Registration
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := eventgrid.LookupPartnerRegistration(ctx, &eventgrid.LookupPartnerRegistrationArgs{
// Name: "my-eventgrid-partner-registration",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("eventgridPartnerRegistrationId", example.PartnerRegistrationId)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.EventGrid` - 2025-02-15
func LookupPartnerRegistration(ctx *pulumi.Context, args *LookupPartnerRegistrationArgs, opts ...pulumi.InvokeOption) (*LookupPartnerRegistrationResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupPartnerRegistrationResult
err := ctx.Invoke("azure:eventgrid/getPartnerRegistration:getPartnerRegistration", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getPartnerRegistration.
type LookupPartnerRegistrationArgs struct {
// The name of the EventGrid Partner Registration resource.
Name string `pulumi:"name"`
// The name of the resource group in which the EventGrid Partner Registration exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getPartnerRegistration.
type LookupPartnerRegistrationResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
// The immutable id of the corresponding partner registration.
PartnerRegistrationId string `pulumi:"partnerRegistrationId"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which are assigned to the EventGrid Partner Registration.
Tags map[string]string `pulumi:"tags"`
}
func LookupPartnerRegistrationOutput(ctx *pulumi.Context, args LookupPartnerRegistrationOutputArgs, opts ...pulumi.InvokeOption) LookupPartnerRegistrationResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupPartnerRegistrationResultOutput, error) {
args := v.(LookupPartnerRegistrationArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:eventgrid/getPartnerRegistration:getPartnerRegistration", args, LookupPartnerRegistrationResultOutput{}, options).(LookupPartnerRegistrationResultOutput), nil
}).(LookupPartnerRegistrationResultOutput)
}
// A collection of arguments for invoking getPartnerRegistration.
type LookupPartnerRegistrationOutputArgs struct {
// The name of the EventGrid Partner Registration resource.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group in which the EventGrid Partner Registration exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupPartnerRegistrationOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupPartnerRegistrationArgs)(nil)).Elem()
}
// A collection of values returned by getPartnerRegistration.
type LookupPartnerRegistrationResultOutput struct{ *pulumi.OutputState }
func (LookupPartnerRegistrationResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupPartnerRegistrationResult)(nil)).Elem()
}
func (o LookupPartnerRegistrationResultOutput) ToLookupPartnerRegistrationResultOutput() LookupPartnerRegistrationResultOutput {
return o
}
func (o LookupPartnerRegistrationResultOutput) ToLookupPartnerRegistrationResultOutputWithContext(ctx context.Context) LookupPartnerRegistrationResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupPartnerRegistrationResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupPartnerRegistrationResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupPartnerRegistrationResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupPartnerRegistrationResult) string { return v.Name }).(pulumi.StringOutput)
}
// The immutable id of the corresponding partner registration.
func (o LookupPartnerRegistrationResultOutput) PartnerRegistrationId() pulumi.StringOutput {
return o.ApplyT(func(v LookupPartnerRegistrationResult) string { return v.PartnerRegistrationId }).(pulumi.StringOutput)
}
func (o LookupPartnerRegistrationResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupPartnerRegistrationResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which are assigned to the EventGrid Partner Registration.
func (o LookupPartnerRegistrationResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupPartnerRegistrationResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupPartnerRegistrationResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventgrid/systemTopic.go | sdk/go/azure/eventgrid/systemTopic.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventgrid
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Event Grid System 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/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("examplestoracct"),
// 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
// }
// _, err = eventgrid.NewSystemTopic(ctx, "example", &eventgrid.SystemTopicArgs{
// Name: pulumi.String("example-topic"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SourceResourceId: exampleAccount.ID(),
// TopicType: pulumi.String("Microsoft.Storage.StorageAccounts"),
// })
// 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
//
// Event Grid System Topic can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventgrid/systemTopic:SystemTopic example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/systemTopics/systemTopic1
// ```
type SystemTopic struct {
pulumi.CustomResourceState
// An `identity` block as defined below.
Identity SystemTopicIdentityPtrOutput `pulumi:"identity"`
// The Azure Region where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
Location pulumi.StringOutput `pulumi:"location"`
MetricArmResourceId pulumi.StringOutput `pulumi:"metricArmResourceId"`
// The Metric Resource ID of the Event Grid System Topic.
MetricResourceId pulumi.StringOutput `pulumi:"metricResourceId"`
// The name which should be used for this Event Grid System Topic. Changing this forces a new Event Grid System Topic to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// Deprecated: the `sourceArmResourceId` property has been deprecated in favour of `sourceResourceId` and will be removed in version 5.0 of the Provider.
SourceArmResourceId pulumi.StringOutput `pulumi:"sourceArmResourceId"`
// The ID of the Event Grid System Topic ARM Source. Changing this forces a new Event Grid System Topic to be created.
SourceResourceId pulumi.StringOutput `pulumi:"sourceResourceId"`
// A mapping of tags which should be assigned to the Event Grid System Topic.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The Topic Type of the Event Grid System Topic. The topic type is validated by Azure and there may be additional topic types beyond the following: `Microsoft.AppConfiguration.ConfigurationStores`, `Microsoft.Communication.CommunicationServices`, `Microsoft.ContainerRegistry.Registries`, `Microsoft.Devices.IoTHubs`, `Microsoft.EventGrid.Domains`, `Microsoft.EventGrid.Topics`, `Microsoft.Eventhub.Namespaces`, `Microsoft.KeyVault.vaults`, `Microsoft.MachineLearningServices.Workspaces`, `Microsoft.Maps.Accounts`, `Microsoft.Media.MediaServices`, `Microsoft.Resources.ResourceGroups`, `Microsoft.Resources.Subscriptions`, `Microsoft.ServiceBus.Namespaces`, `Microsoft.SignalRService.SignalR`, `Microsoft.Storage.StorageAccounts`, `Microsoft.Web.ServerFarms` and `Microsoft.Web.Sites`. Changing this forces a new Event Grid System Topic to be created.
//
// > **Note:** Some `topicType`s (e.g. **Microsoft.Resources.Subscriptions**) requires location to be set to `Global` instead of a real location like `West US`.
//
// > **Note:** You can use Azure CLI to get a full list of the available topic types: `az eventgrid topic-type list --output json | grep -w id`
TopicType pulumi.StringOutput `pulumi:"topicType"`
}
// NewSystemTopic registers a new resource with the given unique name, arguments, and options.
func NewSystemTopic(ctx *pulumi.Context,
name string, args *SystemTopicArgs, opts ...pulumi.ResourceOption) (*SystemTopic, 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.TopicType == nil {
return nil, errors.New("invalid value for required argument 'TopicType'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SystemTopic
err := ctx.RegisterResource("azure:eventgrid/systemTopic:SystemTopic", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSystemTopic gets an existing SystemTopic resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSystemTopic(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SystemTopicState, opts ...pulumi.ResourceOption) (*SystemTopic, error) {
var resource SystemTopic
err := ctx.ReadResource("azure:eventgrid/systemTopic:SystemTopic", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SystemTopic resources.
type systemTopicState struct {
// An `identity` block as defined below.
Identity *SystemTopicIdentity `pulumi:"identity"`
// The Azure Region where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
Location *string `pulumi:"location"`
MetricArmResourceId *string `pulumi:"metricArmResourceId"`
// The Metric Resource ID of the Event Grid System Topic.
MetricResourceId *string `pulumi:"metricResourceId"`
// The name which should be used for this Event Grid System Topic. Changing this forces a new Event Grid System Topic to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// Deprecated: the `sourceArmResourceId` property has been deprecated in favour of `sourceResourceId` and will be removed in version 5.0 of the Provider.
SourceArmResourceId *string `pulumi:"sourceArmResourceId"`
// The ID of the Event Grid System Topic ARM Source. Changing this forces a new Event Grid System Topic to be created.
SourceResourceId *string `pulumi:"sourceResourceId"`
// A mapping of tags which should be assigned to the Event Grid System Topic.
Tags map[string]string `pulumi:"tags"`
// The Topic Type of the Event Grid System Topic. The topic type is validated by Azure and there may be additional topic types beyond the following: `Microsoft.AppConfiguration.ConfigurationStores`, `Microsoft.Communication.CommunicationServices`, `Microsoft.ContainerRegistry.Registries`, `Microsoft.Devices.IoTHubs`, `Microsoft.EventGrid.Domains`, `Microsoft.EventGrid.Topics`, `Microsoft.Eventhub.Namespaces`, `Microsoft.KeyVault.vaults`, `Microsoft.MachineLearningServices.Workspaces`, `Microsoft.Maps.Accounts`, `Microsoft.Media.MediaServices`, `Microsoft.Resources.ResourceGroups`, `Microsoft.Resources.Subscriptions`, `Microsoft.ServiceBus.Namespaces`, `Microsoft.SignalRService.SignalR`, `Microsoft.Storage.StorageAccounts`, `Microsoft.Web.ServerFarms` and `Microsoft.Web.Sites`. Changing this forces a new Event Grid System Topic to be created.
//
// > **Note:** Some `topicType`s (e.g. **Microsoft.Resources.Subscriptions**) requires location to be set to `Global` instead of a real location like `West US`.
//
// > **Note:** You can use Azure CLI to get a full list of the available topic types: `az eventgrid topic-type list --output json | grep -w id`
TopicType *string `pulumi:"topicType"`
}
type SystemTopicState struct {
// An `identity` block as defined below.
Identity SystemTopicIdentityPtrInput
// The Azure Region where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
Location pulumi.StringPtrInput
MetricArmResourceId pulumi.StringPtrInput
// The Metric Resource ID of the Event Grid System Topic.
MetricResourceId pulumi.StringPtrInput
// The name which should be used for this Event Grid System Topic. Changing this forces a new Event Grid System Topic to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
ResourceGroupName pulumi.StringPtrInput
// Deprecated: the `sourceArmResourceId` property has been deprecated in favour of `sourceResourceId` and will be removed in version 5.0 of the Provider.
SourceArmResourceId pulumi.StringPtrInput
// The ID of the Event Grid System Topic ARM Source. Changing this forces a new Event Grid System Topic to be created.
SourceResourceId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Event Grid System Topic.
Tags pulumi.StringMapInput
// The Topic Type of the Event Grid System Topic. The topic type is validated by Azure and there may be additional topic types beyond the following: `Microsoft.AppConfiguration.ConfigurationStores`, `Microsoft.Communication.CommunicationServices`, `Microsoft.ContainerRegistry.Registries`, `Microsoft.Devices.IoTHubs`, `Microsoft.EventGrid.Domains`, `Microsoft.EventGrid.Topics`, `Microsoft.Eventhub.Namespaces`, `Microsoft.KeyVault.vaults`, `Microsoft.MachineLearningServices.Workspaces`, `Microsoft.Maps.Accounts`, `Microsoft.Media.MediaServices`, `Microsoft.Resources.ResourceGroups`, `Microsoft.Resources.Subscriptions`, `Microsoft.ServiceBus.Namespaces`, `Microsoft.SignalRService.SignalR`, `Microsoft.Storage.StorageAccounts`, `Microsoft.Web.ServerFarms` and `Microsoft.Web.Sites`. Changing this forces a new Event Grid System Topic to be created.
//
// > **Note:** Some `topicType`s (e.g. **Microsoft.Resources.Subscriptions**) requires location to be set to `Global` instead of a real location like `West US`.
//
// > **Note:** You can use Azure CLI to get a full list of the available topic types: `az eventgrid topic-type list --output json | grep -w id`
TopicType pulumi.StringPtrInput
}
func (SystemTopicState) ElementType() reflect.Type {
return reflect.TypeOf((*systemTopicState)(nil)).Elem()
}
type systemTopicArgs struct {
// An `identity` block as defined below.
Identity *SystemTopicIdentity `pulumi:"identity"`
// The Azure Region where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Event Grid System Topic. Changing this forces a new Event Grid System Topic to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// Deprecated: the `sourceArmResourceId` property has been deprecated in favour of `sourceResourceId` and will be removed in version 5.0 of the Provider.
SourceArmResourceId *string `pulumi:"sourceArmResourceId"`
// The ID of the Event Grid System Topic ARM Source. Changing this forces a new Event Grid System Topic to be created.
SourceResourceId *string `pulumi:"sourceResourceId"`
// A mapping of tags which should be assigned to the Event Grid System Topic.
Tags map[string]string `pulumi:"tags"`
// The Topic Type of the Event Grid System Topic. The topic type is validated by Azure and there may be additional topic types beyond the following: `Microsoft.AppConfiguration.ConfigurationStores`, `Microsoft.Communication.CommunicationServices`, `Microsoft.ContainerRegistry.Registries`, `Microsoft.Devices.IoTHubs`, `Microsoft.EventGrid.Domains`, `Microsoft.EventGrid.Topics`, `Microsoft.Eventhub.Namespaces`, `Microsoft.KeyVault.vaults`, `Microsoft.MachineLearningServices.Workspaces`, `Microsoft.Maps.Accounts`, `Microsoft.Media.MediaServices`, `Microsoft.Resources.ResourceGroups`, `Microsoft.Resources.Subscriptions`, `Microsoft.ServiceBus.Namespaces`, `Microsoft.SignalRService.SignalR`, `Microsoft.Storage.StorageAccounts`, `Microsoft.Web.ServerFarms` and `Microsoft.Web.Sites`. Changing this forces a new Event Grid System Topic to be created.
//
// > **Note:** Some `topicType`s (e.g. **Microsoft.Resources.Subscriptions**) requires location to be set to `Global` instead of a real location like `West US`.
//
// > **Note:** You can use Azure CLI to get a full list of the available topic types: `az eventgrid topic-type list --output json | grep -w id`
TopicType string `pulumi:"topicType"`
}
// The set of arguments for constructing a SystemTopic resource.
type SystemTopicArgs struct {
// An `identity` block as defined below.
Identity SystemTopicIdentityPtrInput
// The Azure Region where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Event Grid System Topic. Changing this forces a new Event Grid System Topic to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
ResourceGroupName pulumi.StringInput
// Deprecated: the `sourceArmResourceId` property has been deprecated in favour of `sourceResourceId` and will be removed in version 5.0 of the Provider.
SourceArmResourceId pulumi.StringPtrInput
// The ID of the Event Grid System Topic ARM Source. Changing this forces a new Event Grid System Topic to be created.
SourceResourceId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Event Grid System Topic.
Tags pulumi.StringMapInput
// The Topic Type of the Event Grid System Topic. The topic type is validated by Azure and there may be additional topic types beyond the following: `Microsoft.AppConfiguration.ConfigurationStores`, `Microsoft.Communication.CommunicationServices`, `Microsoft.ContainerRegistry.Registries`, `Microsoft.Devices.IoTHubs`, `Microsoft.EventGrid.Domains`, `Microsoft.EventGrid.Topics`, `Microsoft.Eventhub.Namespaces`, `Microsoft.KeyVault.vaults`, `Microsoft.MachineLearningServices.Workspaces`, `Microsoft.Maps.Accounts`, `Microsoft.Media.MediaServices`, `Microsoft.Resources.ResourceGroups`, `Microsoft.Resources.Subscriptions`, `Microsoft.ServiceBus.Namespaces`, `Microsoft.SignalRService.SignalR`, `Microsoft.Storage.StorageAccounts`, `Microsoft.Web.ServerFarms` and `Microsoft.Web.Sites`. Changing this forces a new Event Grid System Topic to be created.
//
// > **Note:** Some `topicType`s (e.g. **Microsoft.Resources.Subscriptions**) requires location to be set to `Global` instead of a real location like `West US`.
//
// > **Note:** You can use Azure CLI to get a full list of the available topic types: `az eventgrid topic-type list --output json | grep -w id`
TopicType pulumi.StringInput
}
func (SystemTopicArgs) ElementType() reflect.Type {
return reflect.TypeOf((*systemTopicArgs)(nil)).Elem()
}
type SystemTopicInput interface {
pulumi.Input
ToSystemTopicOutput() SystemTopicOutput
ToSystemTopicOutputWithContext(ctx context.Context) SystemTopicOutput
}
func (*SystemTopic) ElementType() reflect.Type {
return reflect.TypeOf((**SystemTopic)(nil)).Elem()
}
func (i *SystemTopic) ToSystemTopicOutput() SystemTopicOutput {
return i.ToSystemTopicOutputWithContext(context.Background())
}
func (i *SystemTopic) ToSystemTopicOutputWithContext(ctx context.Context) SystemTopicOutput {
return pulumi.ToOutputWithContext(ctx, i).(SystemTopicOutput)
}
// SystemTopicArrayInput is an input type that accepts SystemTopicArray and SystemTopicArrayOutput values.
// You can construct a concrete instance of `SystemTopicArrayInput` via:
//
// SystemTopicArray{ SystemTopicArgs{...} }
type SystemTopicArrayInput interface {
pulumi.Input
ToSystemTopicArrayOutput() SystemTopicArrayOutput
ToSystemTopicArrayOutputWithContext(context.Context) SystemTopicArrayOutput
}
type SystemTopicArray []SystemTopicInput
func (SystemTopicArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SystemTopic)(nil)).Elem()
}
func (i SystemTopicArray) ToSystemTopicArrayOutput() SystemTopicArrayOutput {
return i.ToSystemTopicArrayOutputWithContext(context.Background())
}
func (i SystemTopicArray) ToSystemTopicArrayOutputWithContext(ctx context.Context) SystemTopicArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SystemTopicArrayOutput)
}
// SystemTopicMapInput is an input type that accepts SystemTopicMap and SystemTopicMapOutput values.
// You can construct a concrete instance of `SystemTopicMapInput` via:
//
// SystemTopicMap{ "key": SystemTopicArgs{...} }
type SystemTopicMapInput interface {
pulumi.Input
ToSystemTopicMapOutput() SystemTopicMapOutput
ToSystemTopicMapOutputWithContext(context.Context) SystemTopicMapOutput
}
type SystemTopicMap map[string]SystemTopicInput
func (SystemTopicMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SystemTopic)(nil)).Elem()
}
func (i SystemTopicMap) ToSystemTopicMapOutput() SystemTopicMapOutput {
return i.ToSystemTopicMapOutputWithContext(context.Background())
}
func (i SystemTopicMap) ToSystemTopicMapOutputWithContext(ctx context.Context) SystemTopicMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SystemTopicMapOutput)
}
type SystemTopicOutput struct{ *pulumi.OutputState }
func (SystemTopicOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SystemTopic)(nil)).Elem()
}
func (o SystemTopicOutput) ToSystemTopicOutput() SystemTopicOutput {
return o
}
func (o SystemTopicOutput) ToSystemTopicOutputWithContext(ctx context.Context) SystemTopicOutput {
return o
}
// An `identity` block as defined below.
func (o SystemTopicOutput) Identity() SystemTopicIdentityPtrOutput {
return o.ApplyT(func(v *SystemTopic) SystemTopicIdentityPtrOutput { return v.Identity }).(SystemTopicIdentityPtrOutput)
}
// The Azure Region where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
func (o SystemTopicOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *SystemTopic) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
func (o SystemTopicOutput) MetricArmResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *SystemTopic) pulumi.StringOutput { return v.MetricArmResourceId }).(pulumi.StringOutput)
}
// The Metric Resource ID of the Event Grid System Topic.
func (o SystemTopicOutput) MetricResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *SystemTopic) pulumi.StringOutput { return v.MetricResourceId }).(pulumi.StringOutput)
}
// The name which should be used for this Event Grid System Topic. Changing this forces a new Event Grid System Topic to be created.
func (o SystemTopicOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SystemTopic) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Event Grid System Topic should exist. Changing this forces a new Event Grid System Topic to be created.
func (o SystemTopicOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *SystemTopic) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// Deprecated: the `sourceArmResourceId` property has been deprecated in favour of `sourceResourceId` and will be removed in version 5.0 of the Provider.
func (o SystemTopicOutput) SourceArmResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *SystemTopic) pulumi.StringOutput { return v.SourceArmResourceId }).(pulumi.StringOutput)
}
// The ID of the Event Grid System Topic ARM Source. Changing this forces a new Event Grid System Topic to be created.
func (o SystemTopicOutput) SourceResourceId() pulumi.StringOutput {
return o.ApplyT(func(v *SystemTopic) pulumi.StringOutput { return v.SourceResourceId }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Event Grid System Topic.
func (o SystemTopicOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *SystemTopic) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The Topic Type of the Event Grid System Topic. The topic type is validated by Azure and there may be additional topic types beyond the following: `Microsoft.AppConfiguration.ConfigurationStores`, `Microsoft.Communication.CommunicationServices`, `Microsoft.ContainerRegistry.Registries`, `Microsoft.Devices.IoTHubs`, `Microsoft.EventGrid.Domains`, `Microsoft.EventGrid.Topics`, `Microsoft.Eventhub.Namespaces`, `Microsoft.KeyVault.vaults`, `Microsoft.MachineLearningServices.Workspaces`, `Microsoft.Maps.Accounts`, `Microsoft.Media.MediaServices`, `Microsoft.Resources.ResourceGroups`, `Microsoft.Resources.Subscriptions`, `Microsoft.ServiceBus.Namespaces`, `Microsoft.SignalRService.SignalR`, `Microsoft.Storage.StorageAccounts`, `Microsoft.Web.ServerFarms` and `Microsoft.Web.Sites`. Changing this forces a new Event Grid System Topic to be created.
//
// > **Note:** Some `topicType`s (e.g. **Microsoft.Resources.Subscriptions**) requires location to be set to `Global` instead of a real location like `West US`.
//
// > **Note:** You can use Azure CLI to get a full list of the available topic types: `az eventgrid topic-type list --output json | grep -w id`
func (o SystemTopicOutput) TopicType() pulumi.StringOutput {
return o.ApplyT(func(v *SystemTopic) pulumi.StringOutput { return v.TopicType }).(pulumi.StringOutput)
}
type SystemTopicArrayOutput struct{ *pulumi.OutputState }
func (SystemTopicArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SystemTopic)(nil)).Elem()
}
func (o SystemTopicArrayOutput) ToSystemTopicArrayOutput() SystemTopicArrayOutput {
return o
}
func (o SystemTopicArrayOutput) ToSystemTopicArrayOutputWithContext(ctx context.Context) SystemTopicArrayOutput {
return o
}
func (o SystemTopicArrayOutput) Index(i pulumi.IntInput) SystemTopicOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SystemTopic {
return vs[0].([]*SystemTopic)[vs[1].(int)]
}).(SystemTopicOutput)
}
type SystemTopicMapOutput struct{ *pulumi.OutputState }
func (SystemTopicMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SystemTopic)(nil)).Elem()
}
func (o SystemTopicMapOutput) ToSystemTopicMapOutput() SystemTopicMapOutput {
return o
}
func (o SystemTopicMapOutput) ToSystemTopicMapOutputWithContext(ctx context.Context) SystemTopicMapOutput {
return o
}
func (o SystemTopicMapOutput) MapIndex(k pulumi.StringInput) SystemTopicOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SystemTopic {
return vs[0].(map[string]*SystemTopic)[vs[1].(string)]
}).(SystemTopicOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SystemTopicInput)(nil)).Elem(), &SystemTopic{})
pulumi.RegisterInputType(reflect.TypeOf((*SystemTopicArrayInput)(nil)).Elem(), SystemTopicArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SystemTopicMapInput)(nil)).Elem(), SystemTopicMap{})
pulumi.RegisterOutputType(SystemTopicOutput{})
pulumi.RegisterOutputType(SystemTopicArrayOutput{})
pulumi.RegisterOutputType(SystemTopicMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventgrid/partnerNamespace.go | sdk/go/azure/eventgrid/partnerNamespace.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventgrid
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Event Grid Partner 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/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
// }
// examplePartnerRegistration, err := eventgrid.NewPartnerRegistration(ctx, "example", &eventgrid.PartnerRegistrationArgs{
// Name: pulumi.String("example-partner-registration"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = eventgrid.NewPartnerNamespace(ctx, "example", &eventgrid.PartnerNamespaceArgs{
// Name: pulumi.String("example-partner-namespace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// PartnerRegistrationId: examplePartnerRegistration.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.EventGrid` - 2025-02-15
//
// ## Import
//
// Event Grid Partner Namespaces can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventgrid/partnerNamespace:PartnerNamespace example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.EventGrid/partnerNamespaces/example
// ```
type PartnerNamespace struct {
pulumi.CustomResourceState
// The endpoint for the Event Grid Partner Namespace.
Endpoint pulumi.StringOutput `pulumi:"endpoint"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules PartnerNamespaceInboundIpRuleArrayOutput `pulumi:"inboundIpRules"`
// Whether local authentication methods are enabled for the Event Grid Partner Namespace. Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrOutput `pulumi:"localAuthenticationEnabled"`
// Specifies the Azure Region where the Event Grid Partner Namespace exists. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Event Grid Partner Namespace. Changing this forces a new Event Grid Partner Namespace to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The resource Id of the Event Grid Partner Registration that this namespace is associated with. Changing this forces a new Event Grid Partner Namespace to be created.
PartnerRegistrationId pulumi.StringOutput `pulumi:"partnerRegistrationId"`
// The partner topic routing mode. Possible values are `ChannelNameHeader` and `SourceEventAttribute`. Defaults to `ChannelNameHeader`. Changing this forces a new Event Grid Partner Namespace to be created.
PartnerTopicRoutingMode pulumi.StringPtrOutput `pulumi:"partnerTopicRoutingMode"`
// Whether or not public network access is allowed for this server. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess pulumi.StringPtrOutput `pulumi:"publicNetworkAccess"`
// The name of the Resource Group where the Event Grid Partner Namespace should exist. Changing this forces a new Event Grid Partner Namespace to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Event Grid Partner Namespace.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewPartnerNamespace registers a new resource with the given unique name, arguments, and options.
func NewPartnerNamespace(ctx *pulumi.Context,
name string, args *PartnerNamespaceArgs, opts ...pulumi.ResourceOption) (*PartnerNamespace, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PartnerRegistrationId == nil {
return nil, errors.New("invalid value for required argument 'PartnerRegistrationId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource PartnerNamespace
err := ctx.RegisterResource("azure:eventgrid/partnerNamespace:PartnerNamespace", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPartnerNamespace gets an existing PartnerNamespace resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetPartnerNamespace(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PartnerNamespaceState, opts ...pulumi.ResourceOption) (*PartnerNamespace, error) {
var resource PartnerNamespace
err := ctx.ReadResource("azure:eventgrid/partnerNamespace:PartnerNamespace", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering PartnerNamespace resources.
type partnerNamespaceState struct {
// The endpoint for the Event Grid Partner Namespace.
Endpoint *string `pulumi:"endpoint"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules []PartnerNamespaceInboundIpRule `pulumi:"inboundIpRules"`
// Whether local authentication methods are enabled for the Event Grid Partner Namespace. Defaults to `true`.
LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"`
// Specifies the Azure Region where the Event Grid Partner Namespace exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Event Grid Partner Namespace. Changing this forces a new Event Grid Partner Namespace to be created.
Name *string `pulumi:"name"`
// The resource Id of the Event Grid Partner Registration that this namespace is associated with. Changing this forces a new Event Grid Partner Namespace to be created.
PartnerRegistrationId *string `pulumi:"partnerRegistrationId"`
// The partner topic routing mode. Possible values are `ChannelNameHeader` and `SourceEventAttribute`. Defaults to `ChannelNameHeader`. Changing this forces a new Event Grid Partner Namespace to be created.
PartnerTopicRoutingMode *string `pulumi:"partnerTopicRoutingMode"`
// Whether or not public network access is allowed for this server. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess *string `pulumi:"publicNetworkAccess"`
// The name of the Resource Group where the Event Grid Partner Namespace should exist. Changing this forces a new Event Grid Partner Namespace to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Event Grid Partner Namespace.
Tags map[string]string `pulumi:"tags"`
}
type PartnerNamespaceState struct {
// The endpoint for the Event Grid Partner Namespace.
Endpoint pulumi.StringPtrInput
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules PartnerNamespaceInboundIpRuleArrayInput
// Whether local authentication methods are enabled for the Event Grid Partner Namespace. Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrInput
// Specifies the Azure Region where the Event Grid Partner Namespace exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Event Grid Partner Namespace. Changing this forces a new Event Grid Partner Namespace to be created.
Name pulumi.StringPtrInput
// The resource Id of the Event Grid Partner Registration that this namespace is associated with. Changing this forces a new Event Grid Partner Namespace to be created.
PartnerRegistrationId pulumi.StringPtrInput
// The partner topic routing mode. Possible values are `ChannelNameHeader` and `SourceEventAttribute`. Defaults to `ChannelNameHeader`. Changing this forces a new Event Grid Partner Namespace to be created.
PartnerTopicRoutingMode pulumi.StringPtrInput
// Whether or not public network access is allowed for this server. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess pulumi.StringPtrInput
// The name of the Resource Group where the Event Grid Partner Namespace should exist. Changing this forces a new Event Grid Partner Namespace to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Event Grid Partner Namespace.
Tags pulumi.StringMapInput
}
func (PartnerNamespaceState) ElementType() reflect.Type {
return reflect.TypeOf((*partnerNamespaceState)(nil)).Elem()
}
type partnerNamespaceArgs struct {
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules []PartnerNamespaceInboundIpRule `pulumi:"inboundIpRules"`
// Whether local authentication methods are enabled for the Event Grid Partner Namespace. Defaults to `true`.
LocalAuthenticationEnabled *bool `pulumi:"localAuthenticationEnabled"`
// Specifies the Azure Region where the Event Grid Partner Namespace exists. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Event Grid Partner Namespace. Changing this forces a new Event Grid Partner Namespace to be created.
Name *string `pulumi:"name"`
// The resource Id of the Event Grid Partner Registration that this namespace is associated with. Changing this forces a new Event Grid Partner Namespace to be created.
PartnerRegistrationId string `pulumi:"partnerRegistrationId"`
// The partner topic routing mode. Possible values are `ChannelNameHeader` and `SourceEventAttribute`. Defaults to `ChannelNameHeader`. Changing this forces a new Event Grid Partner Namespace to be created.
PartnerTopicRoutingMode *string `pulumi:"partnerTopicRoutingMode"`
// Whether or not public network access is allowed for this server. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess *string `pulumi:"publicNetworkAccess"`
// The name of the Resource Group where the Event Grid Partner Namespace should exist. Changing this forces a new Event Grid Partner Namespace to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Event Grid Partner Namespace.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a PartnerNamespace resource.
type PartnerNamespaceArgs struct {
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules PartnerNamespaceInboundIpRuleArrayInput
// Whether local authentication methods are enabled for the Event Grid Partner Namespace. Defaults to `true`.
LocalAuthenticationEnabled pulumi.BoolPtrInput
// Specifies the Azure Region where the Event Grid Partner Namespace exists. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Event Grid Partner Namespace. Changing this forces a new Event Grid Partner Namespace to be created.
Name pulumi.StringPtrInput
// The resource Id of the Event Grid Partner Registration that this namespace is associated with. Changing this forces a new Event Grid Partner Namespace to be created.
PartnerRegistrationId pulumi.StringInput
// The partner topic routing mode. Possible values are `ChannelNameHeader` and `SourceEventAttribute`. Defaults to `ChannelNameHeader`. Changing this forces a new Event Grid Partner Namespace to be created.
PartnerTopicRoutingMode pulumi.StringPtrInput
// Whether or not public network access is allowed for this server. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
PublicNetworkAccess pulumi.StringPtrInput
// The name of the Resource Group where the Event Grid Partner Namespace should exist. Changing this forces a new Event Grid Partner Namespace to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Event Grid Partner Namespace.
Tags pulumi.StringMapInput
}
func (PartnerNamespaceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*partnerNamespaceArgs)(nil)).Elem()
}
type PartnerNamespaceInput interface {
pulumi.Input
ToPartnerNamespaceOutput() PartnerNamespaceOutput
ToPartnerNamespaceOutputWithContext(ctx context.Context) PartnerNamespaceOutput
}
func (*PartnerNamespace) ElementType() reflect.Type {
return reflect.TypeOf((**PartnerNamespace)(nil)).Elem()
}
func (i *PartnerNamespace) ToPartnerNamespaceOutput() PartnerNamespaceOutput {
return i.ToPartnerNamespaceOutputWithContext(context.Background())
}
func (i *PartnerNamespace) ToPartnerNamespaceOutputWithContext(ctx context.Context) PartnerNamespaceOutput {
return pulumi.ToOutputWithContext(ctx, i).(PartnerNamespaceOutput)
}
// PartnerNamespaceArrayInput is an input type that accepts PartnerNamespaceArray and PartnerNamespaceArrayOutput values.
// You can construct a concrete instance of `PartnerNamespaceArrayInput` via:
//
// PartnerNamespaceArray{ PartnerNamespaceArgs{...} }
type PartnerNamespaceArrayInput interface {
pulumi.Input
ToPartnerNamespaceArrayOutput() PartnerNamespaceArrayOutput
ToPartnerNamespaceArrayOutputWithContext(context.Context) PartnerNamespaceArrayOutput
}
type PartnerNamespaceArray []PartnerNamespaceInput
func (PartnerNamespaceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PartnerNamespace)(nil)).Elem()
}
func (i PartnerNamespaceArray) ToPartnerNamespaceArrayOutput() PartnerNamespaceArrayOutput {
return i.ToPartnerNamespaceArrayOutputWithContext(context.Background())
}
func (i PartnerNamespaceArray) ToPartnerNamespaceArrayOutputWithContext(ctx context.Context) PartnerNamespaceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(PartnerNamespaceArrayOutput)
}
// PartnerNamespaceMapInput is an input type that accepts PartnerNamespaceMap and PartnerNamespaceMapOutput values.
// You can construct a concrete instance of `PartnerNamespaceMapInput` via:
//
// PartnerNamespaceMap{ "key": PartnerNamespaceArgs{...} }
type PartnerNamespaceMapInput interface {
pulumi.Input
ToPartnerNamespaceMapOutput() PartnerNamespaceMapOutput
ToPartnerNamespaceMapOutputWithContext(context.Context) PartnerNamespaceMapOutput
}
type PartnerNamespaceMap map[string]PartnerNamespaceInput
func (PartnerNamespaceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PartnerNamespace)(nil)).Elem()
}
func (i PartnerNamespaceMap) ToPartnerNamespaceMapOutput() PartnerNamespaceMapOutput {
return i.ToPartnerNamespaceMapOutputWithContext(context.Background())
}
func (i PartnerNamespaceMap) ToPartnerNamespaceMapOutputWithContext(ctx context.Context) PartnerNamespaceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(PartnerNamespaceMapOutput)
}
type PartnerNamespaceOutput struct{ *pulumi.OutputState }
func (PartnerNamespaceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**PartnerNamespace)(nil)).Elem()
}
func (o PartnerNamespaceOutput) ToPartnerNamespaceOutput() PartnerNamespaceOutput {
return o
}
func (o PartnerNamespaceOutput) ToPartnerNamespaceOutputWithContext(ctx context.Context) PartnerNamespaceOutput {
return o
}
// The endpoint for the Event Grid Partner Namespace.
func (o PartnerNamespaceOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v *PartnerNamespace) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput)
}
// One or more `inboundIpRule` blocks as defined below.
func (o PartnerNamespaceOutput) InboundIpRules() PartnerNamespaceInboundIpRuleArrayOutput {
return o.ApplyT(func(v *PartnerNamespace) PartnerNamespaceInboundIpRuleArrayOutput { return v.InboundIpRules }).(PartnerNamespaceInboundIpRuleArrayOutput)
}
// Whether local authentication methods are enabled for the Event Grid Partner Namespace. Defaults to `true`.
func (o PartnerNamespaceOutput) LocalAuthenticationEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *PartnerNamespace) pulumi.BoolPtrOutput { return v.LocalAuthenticationEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies the Azure Region where the Event Grid Partner Namespace exists. Changing this forces a new resource to be created.
func (o PartnerNamespaceOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *PartnerNamespace) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Event Grid Partner Namespace. Changing this forces a new Event Grid Partner Namespace to be created.
func (o PartnerNamespaceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *PartnerNamespace) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The resource Id of the Event Grid Partner Registration that this namespace is associated with. Changing this forces a new Event Grid Partner Namespace to be created.
func (o PartnerNamespaceOutput) PartnerRegistrationId() pulumi.StringOutput {
return o.ApplyT(func(v *PartnerNamespace) pulumi.StringOutput { return v.PartnerRegistrationId }).(pulumi.StringOutput)
}
// The partner topic routing mode. Possible values are `ChannelNameHeader` and `SourceEventAttribute`. Defaults to `ChannelNameHeader`. Changing this forces a new Event Grid Partner Namespace to be created.
func (o PartnerNamespaceOutput) PartnerTopicRoutingMode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *PartnerNamespace) pulumi.StringPtrOutput { return v.PartnerTopicRoutingMode }).(pulumi.StringPtrOutput)
}
// Whether or not public network access is allowed for this server. Possible values are `Enabled` and `Disabled`. Defaults to `Enabled`.
func (o PartnerNamespaceOutput) PublicNetworkAccess() pulumi.StringPtrOutput {
return o.ApplyT(func(v *PartnerNamespace) pulumi.StringPtrOutput { return v.PublicNetworkAccess }).(pulumi.StringPtrOutput)
}
// The name of the Resource Group where the Event Grid Partner Namespace should exist. Changing this forces a new Event Grid Partner Namespace to be created.
func (o PartnerNamespaceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *PartnerNamespace) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Event Grid Partner Namespace.
func (o PartnerNamespaceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *PartnerNamespace) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type PartnerNamespaceArrayOutput struct{ *pulumi.OutputState }
func (PartnerNamespaceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PartnerNamespace)(nil)).Elem()
}
func (o PartnerNamespaceArrayOutput) ToPartnerNamespaceArrayOutput() PartnerNamespaceArrayOutput {
return o
}
func (o PartnerNamespaceArrayOutput) ToPartnerNamespaceArrayOutputWithContext(ctx context.Context) PartnerNamespaceArrayOutput {
return o
}
func (o PartnerNamespaceArrayOutput) Index(i pulumi.IntInput) PartnerNamespaceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PartnerNamespace {
return vs[0].([]*PartnerNamespace)[vs[1].(int)]
}).(PartnerNamespaceOutput)
}
type PartnerNamespaceMapOutput struct{ *pulumi.OutputState }
func (PartnerNamespaceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PartnerNamespace)(nil)).Elem()
}
func (o PartnerNamespaceMapOutput) ToPartnerNamespaceMapOutput() PartnerNamespaceMapOutput {
return o
}
func (o PartnerNamespaceMapOutput) ToPartnerNamespaceMapOutputWithContext(ctx context.Context) PartnerNamespaceMapOutput {
return o
}
func (o PartnerNamespaceMapOutput) MapIndex(k pulumi.StringInput) PartnerNamespaceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PartnerNamespace {
return vs[0].(map[string]*PartnerNamespace)[vs[1].(string)]
}).(PartnerNamespaceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PartnerNamespaceInput)(nil)).Elem(), &PartnerNamespace{})
pulumi.RegisterInputType(reflect.TypeOf((*PartnerNamespaceArrayInput)(nil)).Elem(), PartnerNamespaceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*PartnerNamespaceMapInput)(nil)).Elem(), PartnerNamespaceMap{})
pulumi.RegisterOutputType(PartnerNamespaceOutput{})
pulumi.RegisterOutputType(PartnerNamespaceArrayOutput{})
pulumi.RegisterOutputType(PartnerNamespaceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventgrid/getSystemTopic.go | sdk/go/azure/eventgrid/getSystemTopic.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventgrid
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 Grid System Topic
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 {
// _, err := eventgrid.LookupSystemTopic(ctx, &eventgrid.LookupSystemTopicArgs{
// Name: "eventgrid-system-topic",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.EventGrid` - 2025-02-15
func LookupSystemTopic(ctx *pulumi.Context, args *LookupSystemTopicArgs, opts ...pulumi.InvokeOption) (*LookupSystemTopicResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupSystemTopicResult
err := ctx.Invoke("azure:eventgrid/getSystemTopic:getSystemTopic", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSystemTopic.
type LookupSystemTopicArgs struct {
// The name of the Event Grid System Topic resource.
Name string `pulumi:"name"`
// The name of the resource group in which the Event Grid System Topic exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getSystemTopic.
type LookupSystemTopicResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// An `identity` block as defined below, which contains the Managed Service Identity information for this Event Grid System Topic.
Identities []GetSystemTopicIdentity `pulumi:"identities"`
Location string `pulumi:"location"`
MetricArmResourceId string `pulumi:"metricArmResourceId"`
// The Metric Resource ID of the Event Grid System Topic.
MetricResourceId string `pulumi:"metricResourceId"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
SourceArmResourceId string `pulumi:"sourceArmResourceId"`
// The ID of the Event Grid System Topic ARM Source.
SourceResourceId string `pulumi:"sourceResourceId"`
// A mapping of tags which are assigned to the Event Grid System Topic.
Tags map[string]string `pulumi:"tags"`
// The Topic Type of the Event Grid System Topic.
TopicType string `pulumi:"topicType"`
}
func LookupSystemTopicOutput(ctx *pulumi.Context, args LookupSystemTopicOutputArgs, opts ...pulumi.InvokeOption) LookupSystemTopicResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupSystemTopicResultOutput, error) {
args := v.(LookupSystemTopicArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:eventgrid/getSystemTopic:getSystemTopic", args, LookupSystemTopicResultOutput{}, options).(LookupSystemTopicResultOutput), nil
}).(LookupSystemTopicResultOutput)
}
// A collection of arguments for invoking getSystemTopic.
type LookupSystemTopicOutputArgs struct {
// The name of the Event Grid System Topic resource.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group in which the Event Grid System Topic exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupSystemTopicOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSystemTopicArgs)(nil)).Elem()
}
// A collection of values returned by getSystemTopic.
type LookupSystemTopicResultOutput struct{ *pulumi.OutputState }
func (LookupSystemTopicResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSystemTopicResult)(nil)).Elem()
}
func (o LookupSystemTopicResultOutput) ToLookupSystemTopicResultOutput() LookupSystemTopicResultOutput {
return o
}
func (o LookupSystemTopicResultOutput) ToLookupSystemTopicResultOutputWithContext(ctx context.Context) LookupSystemTopicResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupSystemTopicResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupSystemTopicResult) string { return v.Id }).(pulumi.StringOutput)
}
// An `identity` block as defined below, which contains the Managed Service Identity information for this Event Grid System Topic.
func (o LookupSystemTopicResultOutput) Identities() GetSystemTopicIdentityArrayOutput {
return o.ApplyT(func(v LookupSystemTopicResult) []GetSystemTopicIdentity { return v.Identities }).(GetSystemTopicIdentityArrayOutput)
}
func (o LookupSystemTopicResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupSystemTopicResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupSystemTopicResultOutput) MetricArmResourceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupSystemTopicResult) string { return v.MetricArmResourceId }).(pulumi.StringOutput)
}
// The Metric Resource ID of the Event Grid System Topic.
func (o LookupSystemTopicResultOutput) MetricResourceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupSystemTopicResult) string { return v.MetricResourceId }).(pulumi.StringOutput)
}
func (o LookupSystemTopicResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupSystemTopicResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupSystemTopicResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupSystemTopicResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func (o LookupSystemTopicResultOutput) SourceArmResourceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupSystemTopicResult) string { return v.SourceArmResourceId }).(pulumi.StringOutput)
}
// The ID of the Event Grid System Topic ARM Source.
func (o LookupSystemTopicResultOutput) SourceResourceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupSystemTopicResult) string { return v.SourceResourceId }).(pulumi.StringOutput)
}
// A mapping of tags which are assigned to the Event Grid System Topic.
func (o LookupSystemTopicResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupSystemTopicResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The Topic Type of the Event Grid System Topic.
func (o LookupSystemTopicResultOutput) TopicType() pulumi.StringOutput {
return o.ApplyT(func(v LookupSystemTopicResult) string { return v.TopicType }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupSystemTopicResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventgrid/topic.go | sdk/go/azure/eventgrid/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 eventgrid
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:eventgrid/topic:Topic topic1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/topics/topic1
// ```
type Topic struct {
pulumi.CustomResourceState
// The Endpoint associated with the EventGrid Topic.
Endpoint pulumi.StringOutput `pulumi:"endpoint"`
// An `identity` block as defined below.
Identity TopicIdentityPtrOutput `pulumi:"identity"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules TopicInboundIpRuleArrayOutput `pulumi:"inboundIpRules"`
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues TopicInputMappingDefaultValuesPtrOutput `pulumi:"inputMappingDefaultValues"`
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields TopicInputMappingFieldsPtrOutput `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"`
}
// 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.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:eventhub/eventGridTopic:EventGridTopic"),
},
})
opts = append(opts, aliases)
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryAccessKey",
"secondaryAccessKey",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Topic
err := ctx.RegisterResource("azure:eventgrid/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:eventgrid/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 Endpoint associated with the EventGrid Topic.
Endpoint *string `pulumi:"endpoint"`
// An `identity` block as defined below.
Identity *TopicIdentity `pulumi:"identity"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules []TopicInboundIpRule `pulumi:"inboundIpRules"`
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues *TopicInputMappingDefaultValues `pulumi:"inputMappingDefaultValues"`
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields *TopicInputMappingFields `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 TopicState struct {
// The Endpoint associated with the EventGrid Topic.
Endpoint pulumi.StringPtrInput
// An `identity` block as defined below.
Identity TopicIdentityPtrInput
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules TopicInboundIpRuleArrayInput
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues TopicInputMappingDefaultValuesPtrInput
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields TopicInputMappingFieldsPtrInput
// 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 (TopicState) ElementType() reflect.Type {
return reflect.TypeOf((*topicState)(nil)).Elem()
}
type topicArgs struct {
// An `identity` block as defined below.
Identity *TopicIdentity `pulumi:"identity"`
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules []TopicInboundIpRule `pulumi:"inboundIpRules"`
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues *TopicInputMappingDefaultValues `pulumi:"inputMappingDefaultValues"`
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields *TopicInputMappingFields `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 Topic resource.
type TopicArgs struct {
// An `identity` block as defined below.
Identity TopicIdentityPtrInput
// One or more `inboundIpRule` blocks as defined below.
InboundIpRules TopicInboundIpRuleArrayInput
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
InputMappingDefaultValues TopicInputMappingDefaultValuesPtrInput
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
InputMappingFields TopicInputMappingFieldsPtrInput
// 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 (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 Endpoint associated with the EventGrid Topic.
func (o TopicOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v *Topic) pulumi.StringOutput { return v.Endpoint }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o TopicOutput) Identity() TopicIdentityPtrOutput {
return o.ApplyT(func(v *Topic) TopicIdentityPtrOutput { return v.Identity }).(TopicIdentityPtrOutput)
}
// One or more `inboundIpRule` blocks as defined below.
func (o TopicOutput) InboundIpRules() TopicInboundIpRuleArrayOutput {
return o.ApplyT(func(v *Topic) TopicInboundIpRuleArrayOutput { return v.InboundIpRules }).(TopicInboundIpRuleArrayOutput)
}
// A `inputMappingDefaultValues` block as defined below. Changing this forces a new resource to be created.
func (o TopicOutput) InputMappingDefaultValues() TopicInputMappingDefaultValuesPtrOutput {
return o.ApplyT(func(v *Topic) TopicInputMappingDefaultValuesPtrOutput { return v.InputMappingDefaultValues }).(TopicInputMappingDefaultValuesPtrOutput)
}
// A `inputMappingFields` block as defined below. Changing this forces a new resource to be created.
func (o TopicOutput) InputMappingFields() TopicInputMappingFieldsPtrOutput {
return o.ApplyT(func(v *Topic) TopicInputMappingFieldsPtrOutput { return v.InputMappingFields }).(TopicInputMappingFieldsPtrOutput)
}
// 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 TopicOutput) InputSchema() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Topic) pulumi.StringPtrOutput { return v.InputSchema }).(pulumi.StringPtrOutput)
}
// Whether local authentication methods is enabled for the EventGrid Topic. Defaults to `true`.
func (o TopicOutput) LocalAuthEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Topic) 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 TopicOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Topic) 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 TopicOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Topic) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The Primary Shared Access Key associated with the EventGrid Topic.
func (o TopicOutput) PrimaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Topic) pulumi.StringOutput { return v.PrimaryAccessKey }).(pulumi.StringOutput)
}
// Whether or not public network access is allowed for this server. Defaults to `true`.
func (o TopicOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Topic) 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 TopicOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Topic) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Secondary Shared Access Key associated with the EventGrid Topic.
func (o TopicOutput) SecondaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v *Topic) pulumi.StringOutput { return v.SecondaryAccessKey }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o TopicOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Topic) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
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/eventgrid/partnerConfiguration.go | sdk/go/azure/eventgrid/partnerConfiguration.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventgrid
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Event Grid Partner 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/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.NewPartnerConfiguration(ctx, "example", &eventgrid.PartnerConfigurationArgs{
// ResourceGroupName: example.Name,
// DefaultMaximumExpirationTimeInDays: pulumi.Int(14),
// PartnerAuthorizations: eventgrid.PartnerConfigurationPartnerAuthorizationArray{
// &eventgrid.PartnerConfigurationPartnerAuthorizationArgs{
// PartnerRegistrationId: pulumi.String("804a11ca-ce9b-4158-8e94-3c8dc7a072ec"),
// PartnerName: pulumi.String("Auth0"),
// AuthorizationExpirationTimeInUtc: pulumi.String("2025-02-05T00:00:00Z"),
// },
// },
// 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
//
// Event Grid Partner Configurations can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventgrid/partnerConfiguration:PartnerConfiguration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1
// ```
type PartnerConfiguration struct {
pulumi.CustomResourceState
// Time used to validate the authorization expiration time for each authorized partner. Defaults to `7`.
DefaultMaximumExpirationTimeInDays pulumi.IntPtrOutput `pulumi:"defaultMaximumExpirationTimeInDays"`
// One or more `partnerAuthorization` blocks as defined below.
PartnerAuthorizations PartnerConfigurationPartnerAuthorizationArrayOutput `pulumi:"partnerAuthorizations"`
// The name of the Resource Group where the Event Grid Partner Configuration should exist. Changing this forces a new Event Grid Partner Configuration to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Event Grid Partner Configuration.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewPartnerConfiguration registers a new resource with the given unique name, arguments, and options.
func NewPartnerConfiguration(ctx *pulumi.Context,
name string, args *PartnerConfigurationArgs, opts ...pulumi.ResourceOption) (*PartnerConfiguration, 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 PartnerConfiguration
err := ctx.RegisterResource("azure:eventgrid/partnerConfiguration:PartnerConfiguration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPartnerConfiguration gets an existing PartnerConfiguration resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetPartnerConfiguration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PartnerConfigurationState, opts ...pulumi.ResourceOption) (*PartnerConfiguration, error) {
var resource PartnerConfiguration
err := ctx.ReadResource("azure:eventgrid/partnerConfiguration:PartnerConfiguration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering PartnerConfiguration resources.
type partnerConfigurationState struct {
// Time used to validate the authorization expiration time for each authorized partner. Defaults to `7`.
DefaultMaximumExpirationTimeInDays *int `pulumi:"defaultMaximumExpirationTimeInDays"`
// One or more `partnerAuthorization` blocks as defined below.
PartnerAuthorizations []PartnerConfigurationPartnerAuthorization `pulumi:"partnerAuthorizations"`
// The name of the Resource Group where the Event Grid Partner Configuration should exist. Changing this forces a new Event Grid Partner Configuration to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Event Grid Partner Configuration.
Tags map[string]string `pulumi:"tags"`
}
type PartnerConfigurationState struct {
// Time used to validate the authorization expiration time for each authorized partner. Defaults to `7`.
DefaultMaximumExpirationTimeInDays pulumi.IntPtrInput
// One or more `partnerAuthorization` blocks as defined below.
PartnerAuthorizations PartnerConfigurationPartnerAuthorizationArrayInput
// The name of the Resource Group where the Event Grid Partner Configuration should exist. Changing this forces a new Event Grid Partner Configuration to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Event Grid Partner Configuration.
Tags pulumi.StringMapInput
}
func (PartnerConfigurationState) ElementType() reflect.Type {
return reflect.TypeOf((*partnerConfigurationState)(nil)).Elem()
}
type partnerConfigurationArgs struct {
// Time used to validate the authorization expiration time for each authorized partner. Defaults to `7`.
DefaultMaximumExpirationTimeInDays *int `pulumi:"defaultMaximumExpirationTimeInDays"`
// One or more `partnerAuthorization` blocks as defined below.
PartnerAuthorizations []PartnerConfigurationPartnerAuthorization `pulumi:"partnerAuthorizations"`
// The name of the Resource Group where the Event Grid Partner Configuration should exist. Changing this forces a new Event Grid Partner Configuration to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Event Grid Partner Configuration.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a PartnerConfiguration resource.
type PartnerConfigurationArgs struct {
// Time used to validate the authorization expiration time for each authorized partner. Defaults to `7`.
DefaultMaximumExpirationTimeInDays pulumi.IntPtrInput
// One or more `partnerAuthorization` blocks as defined below.
PartnerAuthorizations PartnerConfigurationPartnerAuthorizationArrayInput
// The name of the Resource Group where the Event Grid Partner Configuration should exist. Changing this forces a new Event Grid Partner Configuration to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Event Grid Partner Configuration.
Tags pulumi.StringMapInput
}
func (PartnerConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*partnerConfigurationArgs)(nil)).Elem()
}
type PartnerConfigurationInput interface {
pulumi.Input
ToPartnerConfigurationOutput() PartnerConfigurationOutput
ToPartnerConfigurationOutputWithContext(ctx context.Context) PartnerConfigurationOutput
}
func (*PartnerConfiguration) ElementType() reflect.Type {
return reflect.TypeOf((**PartnerConfiguration)(nil)).Elem()
}
func (i *PartnerConfiguration) ToPartnerConfigurationOutput() PartnerConfigurationOutput {
return i.ToPartnerConfigurationOutputWithContext(context.Background())
}
func (i *PartnerConfiguration) ToPartnerConfigurationOutputWithContext(ctx context.Context) PartnerConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(PartnerConfigurationOutput)
}
// PartnerConfigurationArrayInput is an input type that accepts PartnerConfigurationArray and PartnerConfigurationArrayOutput values.
// You can construct a concrete instance of `PartnerConfigurationArrayInput` via:
//
// PartnerConfigurationArray{ PartnerConfigurationArgs{...} }
type PartnerConfigurationArrayInput interface {
pulumi.Input
ToPartnerConfigurationArrayOutput() PartnerConfigurationArrayOutput
ToPartnerConfigurationArrayOutputWithContext(context.Context) PartnerConfigurationArrayOutput
}
type PartnerConfigurationArray []PartnerConfigurationInput
func (PartnerConfigurationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PartnerConfiguration)(nil)).Elem()
}
func (i PartnerConfigurationArray) ToPartnerConfigurationArrayOutput() PartnerConfigurationArrayOutput {
return i.ToPartnerConfigurationArrayOutputWithContext(context.Background())
}
func (i PartnerConfigurationArray) ToPartnerConfigurationArrayOutputWithContext(ctx context.Context) PartnerConfigurationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(PartnerConfigurationArrayOutput)
}
// PartnerConfigurationMapInput is an input type that accepts PartnerConfigurationMap and PartnerConfigurationMapOutput values.
// You can construct a concrete instance of `PartnerConfigurationMapInput` via:
//
// PartnerConfigurationMap{ "key": PartnerConfigurationArgs{...} }
type PartnerConfigurationMapInput interface {
pulumi.Input
ToPartnerConfigurationMapOutput() PartnerConfigurationMapOutput
ToPartnerConfigurationMapOutputWithContext(context.Context) PartnerConfigurationMapOutput
}
type PartnerConfigurationMap map[string]PartnerConfigurationInput
func (PartnerConfigurationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PartnerConfiguration)(nil)).Elem()
}
func (i PartnerConfigurationMap) ToPartnerConfigurationMapOutput() PartnerConfigurationMapOutput {
return i.ToPartnerConfigurationMapOutputWithContext(context.Background())
}
func (i PartnerConfigurationMap) ToPartnerConfigurationMapOutputWithContext(ctx context.Context) PartnerConfigurationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(PartnerConfigurationMapOutput)
}
type PartnerConfigurationOutput struct{ *pulumi.OutputState }
func (PartnerConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**PartnerConfiguration)(nil)).Elem()
}
func (o PartnerConfigurationOutput) ToPartnerConfigurationOutput() PartnerConfigurationOutput {
return o
}
func (o PartnerConfigurationOutput) ToPartnerConfigurationOutputWithContext(ctx context.Context) PartnerConfigurationOutput {
return o
}
// Time used to validate the authorization expiration time for each authorized partner. Defaults to `7`.
func (o PartnerConfigurationOutput) DefaultMaximumExpirationTimeInDays() pulumi.IntPtrOutput {
return o.ApplyT(func(v *PartnerConfiguration) pulumi.IntPtrOutput { return v.DefaultMaximumExpirationTimeInDays }).(pulumi.IntPtrOutput)
}
// One or more `partnerAuthorization` blocks as defined below.
func (o PartnerConfigurationOutput) PartnerAuthorizations() PartnerConfigurationPartnerAuthorizationArrayOutput {
return o.ApplyT(func(v *PartnerConfiguration) PartnerConfigurationPartnerAuthorizationArrayOutput {
return v.PartnerAuthorizations
}).(PartnerConfigurationPartnerAuthorizationArrayOutput)
}
// The name of the Resource Group where the Event Grid Partner Configuration should exist. Changing this forces a new Event Grid Partner Configuration to be created.
func (o PartnerConfigurationOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *PartnerConfiguration) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Event Grid Partner Configuration.
func (o PartnerConfigurationOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *PartnerConfiguration) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type PartnerConfigurationArrayOutput struct{ *pulumi.OutputState }
func (PartnerConfigurationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PartnerConfiguration)(nil)).Elem()
}
func (o PartnerConfigurationArrayOutput) ToPartnerConfigurationArrayOutput() PartnerConfigurationArrayOutput {
return o
}
func (o PartnerConfigurationArrayOutput) ToPartnerConfigurationArrayOutputWithContext(ctx context.Context) PartnerConfigurationArrayOutput {
return o
}
func (o PartnerConfigurationArrayOutput) Index(i pulumi.IntInput) PartnerConfigurationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PartnerConfiguration {
return vs[0].([]*PartnerConfiguration)[vs[1].(int)]
}).(PartnerConfigurationOutput)
}
type PartnerConfigurationMapOutput struct{ *pulumi.OutputState }
func (PartnerConfigurationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PartnerConfiguration)(nil)).Elem()
}
func (o PartnerConfigurationMapOutput) ToPartnerConfigurationMapOutput() PartnerConfigurationMapOutput {
return o
}
func (o PartnerConfigurationMapOutput) ToPartnerConfigurationMapOutputWithContext(ctx context.Context) PartnerConfigurationMapOutput {
return o
}
func (o PartnerConfigurationMapOutput) MapIndex(k pulumi.StringInput) PartnerConfigurationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PartnerConfiguration {
return vs[0].(map[string]*PartnerConfiguration)[vs[1].(string)]
}).(PartnerConfigurationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PartnerConfigurationInput)(nil)).Elem(), &PartnerConfiguration{})
pulumi.RegisterInputType(reflect.TypeOf((*PartnerConfigurationArrayInput)(nil)).Elem(), PartnerConfigurationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*PartnerConfigurationMapInput)(nil)).Elem(), PartnerConfigurationMap{})
pulumi.RegisterOutputType(PartnerConfigurationOutput{})
pulumi.RegisterOutputType(PartnerConfigurationArrayOutput{})
pulumi.RegisterOutputType(PartnerConfigurationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventgrid/getTopic.go | sdk/go/azure/eventgrid/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 eventgrid
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 EventGrid Topic
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 {
// _, err := eventgrid.LookupTopic(ctx, &eventgrid.LookupTopicArgs{
// Name: "my-eventgrid-topic",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.EventGrid` - 2025-02-15
func LookupTopic(ctx *pulumi.Context, args *LookupTopicArgs, opts ...pulumi.InvokeOption) (*LookupTopicResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupTopicResult
err := ctx.Invoke("azure:eventgrid/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 the EventGrid Topic resource.
Name string `pulumi:"name"`
// The name of the resource group in which the EventGrid Topic exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getTopic.
type LookupTopicResult struct {
// The Endpoint associated with the EventGrid Topic.
Endpoint string `pulumi:"endpoint"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// The Primary Shared Access Key associated with the EventGrid Topic.
PrimaryAccessKey string `pulumi:"primaryAccessKey"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Secondary Shared Access Key associated with the EventGrid Topic.
SecondaryAccessKey string `pulumi:"secondaryAccessKey"`
Tags map[string]string `pulumi:"tags"`
}
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:eventgrid/getTopic:getTopic", args, LookupTopicResultOutput{}, options).(LookupTopicResultOutput), nil
}).(LookupTopicResultOutput)
}
// A collection of arguments for invoking getTopic.
type LookupTopicOutputArgs struct {
// The name of the EventGrid Topic resource.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group in which the EventGrid Topic exists.
ResourceGroupName pulumi.StringInput `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 Endpoint associated with the EventGrid Topic.
func (o LookupTopicResultOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicResult) string { return v.Endpoint }).(pulumi.StringOutput)
}
// 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)
}
func (o LookupTopicResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupTopicResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicResult) string { return v.Name }).(pulumi.StringOutput)
}
// The Primary Shared Access Key associated with the EventGrid Topic.
func (o LookupTopicResultOutput) PrimaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicResult) string { return v.PrimaryAccessKey }).(pulumi.StringOutput)
}
func (o LookupTopicResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The Secondary Shared Access Key associated with the EventGrid Topic.
func (o LookupTopicResultOutput) SecondaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupTopicResult) string { return v.SecondaryAccessKey }).(pulumi.StringOutput)
}
func (o LookupTopicResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupTopicResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
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/eventgrid/getDomainTopic.go | sdk/go/azure/eventgrid/getDomainTopic.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventgrid
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 EventGrid Domain Topic
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 {
// _, err := eventgrid.LookupDomainTopic(ctx, &eventgrid.LookupDomainTopicArgs{
// Name: "my-eventgrid-domain-topic",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.EventGrid` - 2025-02-15
func LookupDomainTopic(ctx *pulumi.Context, args *LookupDomainTopicArgs, opts ...pulumi.InvokeOption) (*LookupDomainTopicResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDomainTopicResult
err := ctx.Invoke("azure:eventgrid/getDomainTopic:getDomainTopic", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getDomainTopic.
type LookupDomainTopicArgs struct {
// The name of the EventGrid Domain Topic domain.
DomainName string `pulumi:"domainName"`
// The name of the EventGrid Domain Topic resource.
Name string `pulumi:"name"`
// The name of the resource group in which the EventGrid Domain Topic exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getDomainTopic.
type LookupDomainTopicResult struct {
// The EventGrid Domain Topic Domain name.
DomainName string `pulumi:"domainName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
}
func LookupDomainTopicOutput(ctx *pulumi.Context, args LookupDomainTopicOutputArgs, opts ...pulumi.InvokeOption) LookupDomainTopicResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupDomainTopicResultOutput, error) {
args := v.(LookupDomainTopicArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:eventgrid/getDomainTopic:getDomainTopic", args, LookupDomainTopicResultOutput{}, options).(LookupDomainTopicResultOutput), nil
}).(LookupDomainTopicResultOutput)
}
// A collection of arguments for invoking getDomainTopic.
type LookupDomainTopicOutputArgs struct {
// The name of the EventGrid Domain Topic domain.
DomainName pulumi.StringInput `pulumi:"domainName"`
// The name of the EventGrid Domain Topic resource.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group in which the EventGrid Domain Topic exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupDomainTopicOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDomainTopicArgs)(nil)).Elem()
}
// A collection of values returned by getDomainTopic.
type LookupDomainTopicResultOutput struct{ *pulumi.OutputState }
func (LookupDomainTopicResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDomainTopicResult)(nil)).Elem()
}
func (o LookupDomainTopicResultOutput) ToLookupDomainTopicResultOutput() LookupDomainTopicResultOutput {
return o
}
func (o LookupDomainTopicResultOutput) ToLookupDomainTopicResultOutputWithContext(ctx context.Context) LookupDomainTopicResultOutput {
return o
}
// The EventGrid Domain Topic Domain name.
func (o LookupDomainTopicResultOutput) DomainName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDomainTopicResult) string { return v.DomainName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupDomainTopicResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupDomainTopicResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupDomainTopicResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDomainTopicResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupDomainTopicResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDomainTopicResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDomainTopicResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventgrid/domainTopic.go | sdk/go/azure/eventgrid/domainTopic.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package eventgrid
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 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/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
// }
// exampleDomain, 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
// }
// _, err = eventgrid.NewDomainTopic(ctx, "example", &eventgrid.DomainTopicArgs{
// Name: pulumi.String("my-eventgrid-domain-topic"),
// DomainName: exampleDomain.Name,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.EventGrid` - 2025-02-15
//
// ## Import
//
// EventGrid Domain Topics can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:eventgrid/domainTopic:DomainTopic topic1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/domains/domain1/topics/topic1
// ```
type DomainTopic struct {
pulumi.CustomResourceState
// Specifies the name of the EventGrid Domain. Changing this forces a new resource to be created.
DomainName pulumi.StringOutput `pulumi:"domainName"`
// Specifies the name of the EventGrid Domain Topic resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// 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"`
}
// NewDomainTopic registers a new resource with the given unique name, arguments, and options.
func NewDomainTopic(ctx *pulumi.Context,
name string, args *DomainTopicArgs, opts ...pulumi.ResourceOption) (*DomainTopic, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DomainName == nil {
return nil, errors.New("invalid value for required argument 'DomainName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource DomainTopic
err := ctx.RegisterResource("azure:eventgrid/domainTopic:DomainTopic", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDomainTopic gets an existing DomainTopic resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDomainTopic(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DomainTopicState, opts ...pulumi.ResourceOption) (*DomainTopic, error) {
var resource DomainTopic
err := ctx.ReadResource("azure:eventgrid/domainTopic:DomainTopic", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DomainTopic resources.
type domainTopicState struct {
// Specifies the name of the EventGrid Domain. Changing this forces a new resource to be created.
DomainName *string `pulumi:"domainName"`
// Specifies the name of the EventGrid Domain Topic resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// 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"`
}
type DomainTopicState struct {
// Specifies the name of the EventGrid Domain. Changing this forces a new resource to be created.
DomainName pulumi.StringPtrInput
// Specifies the name of the EventGrid Domain Topic resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the EventGrid Domain exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (DomainTopicState) ElementType() reflect.Type {
return reflect.TypeOf((*domainTopicState)(nil)).Elem()
}
type domainTopicArgs struct {
// Specifies the name of the EventGrid Domain. Changing this forces a new resource to be created.
DomainName string `pulumi:"domainName"`
// Specifies the name of the EventGrid Domain Topic resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// 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 set of arguments for constructing a DomainTopic resource.
type DomainTopicArgs struct {
// Specifies the name of the EventGrid Domain. Changing this forces a new resource to be created.
DomainName pulumi.StringInput
// Specifies the name of the EventGrid Domain Topic resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which the EventGrid Domain exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (DomainTopicArgs) ElementType() reflect.Type {
return reflect.TypeOf((*domainTopicArgs)(nil)).Elem()
}
type DomainTopicInput interface {
pulumi.Input
ToDomainTopicOutput() DomainTopicOutput
ToDomainTopicOutputWithContext(ctx context.Context) DomainTopicOutput
}
func (*DomainTopic) ElementType() reflect.Type {
return reflect.TypeOf((**DomainTopic)(nil)).Elem()
}
func (i *DomainTopic) ToDomainTopicOutput() DomainTopicOutput {
return i.ToDomainTopicOutputWithContext(context.Background())
}
func (i *DomainTopic) ToDomainTopicOutputWithContext(ctx context.Context) DomainTopicOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainTopicOutput)
}
// DomainTopicArrayInput is an input type that accepts DomainTopicArray and DomainTopicArrayOutput values.
// You can construct a concrete instance of `DomainTopicArrayInput` via:
//
// DomainTopicArray{ DomainTopicArgs{...} }
type DomainTopicArrayInput interface {
pulumi.Input
ToDomainTopicArrayOutput() DomainTopicArrayOutput
ToDomainTopicArrayOutputWithContext(context.Context) DomainTopicArrayOutput
}
type DomainTopicArray []DomainTopicInput
func (DomainTopicArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DomainTopic)(nil)).Elem()
}
func (i DomainTopicArray) ToDomainTopicArrayOutput() DomainTopicArrayOutput {
return i.ToDomainTopicArrayOutputWithContext(context.Background())
}
func (i DomainTopicArray) ToDomainTopicArrayOutputWithContext(ctx context.Context) DomainTopicArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainTopicArrayOutput)
}
// DomainTopicMapInput is an input type that accepts DomainTopicMap and DomainTopicMapOutput values.
// You can construct a concrete instance of `DomainTopicMapInput` via:
//
// DomainTopicMap{ "key": DomainTopicArgs{...} }
type DomainTopicMapInput interface {
pulumi.Input
ToDomainTopicMapOutput() DomainTopicMapOutput
ToDomainTopicMapOutputWithContext(context.Context) DomainTopicMapOutput
}
type DomainTopicMap map[string]DomainTopicInput
func (DomainTopicMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DomainTopic)(nil)).Elem()
}
func (i DomainTopicMap) ToDomainTopicMapOutput() DomainTopicMapOutput {
return i.ToDomainTopicMapOutputWithContext(context.Background())
}
func (i DomainTopicMap) ToDomainTopicMapOutputWithContext(ctx context.Context) DomainTopicMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DomainTopicMapOutput)
}
type DomainTopicOutput struct{ *pulumi.OutputState }
func (DomainTopicOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DomainTopic)(nil)).Elem()
}
func (o DomainTopicOutput) ToDomainTopicOutput() DomainTopicOutput {
return o
}
func (o DomainTopicOutput) ToDomainTopicOutputWithContext(ctx context.Context) DomainTopicOutput {
return o
}
// Specifies the name of the EventGrid Domain. Changing this forces a new resource to be created.
func (o DomainTopicOutput) DomainName() pulumi.StringOutput {
return o.ApplyT(func(v *DomainTopic) pulumi.StringOutput { return v.DomainName }).(pulumi.StringOutput)
}
// Specifies the name of the EventGrid Domain Topic resource. Changing this forces a new resource to be created.
func (o DomainTopicOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DomainTopic) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which the EventGrid Domain exists. Changing this forces a new resource to be created.
func (o DomainTopicOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *DomainTopic) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type DomainTopicArrayOutput struct{ *pulumi.OutputState }
func (DomainTopicArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DomainTopic)(nil)).Elem()
}
func (o DomainTopicArrayOutput) ToDomainTopicArrayOutput() DomainTopicArrayOutput {
return o
}
func (o DomainTopicArrayOutput) ToDomainTopicArrayOutputWithContext(ctx context.Context) DomainTopicArrayOutput {
return o
}
func (o DomainTopicArrayOutput) Index(i pulumi.IntInput) DomainTopicOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DomainTopic {
return vs[0].([]*DomainTopic)[vs[1].(int)]
}).(DomainTopicOutput)
}
type DomainTopicMapOutput struct{ *pulumi.OutputState }
func (DomainTopicMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DomainTopic)(nil)).Elem()
}
func (o DomainTopicMapOutput) ToDomainTopicMapOutput() DomainTopicMapOutput {
return o
}
func (o DomainTopicMapOutput) ToDomainTopicMapOutputWithContext(ctx context.Context) DomainTopicMapOutput {
return o
}
func (o DomainTopicMapOutput) MapIndex(k pulumi.StringInput) DomainTopicOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DomainTopic {
return vs[0].(map[string]*DomainTopic)[vs[1].(string)]
}).(DomainTopicOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DomainTopicInput)(nil)).Elem(), &DomainTopic{})
pulumi.RegisterInputType(reflect.TypeOf((*DomainTopicArrayInput)(nil)).Elem(), DomainTopicArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DomainTopicMapInput)(nil)).Elem(), DomainTopicMap{})
pulumi.RegisterOutputType(DomainTopicOutput{})
pulumi.RegisterOutputType(DomainTopicArrayOutput{})
pulumi.RegisterOutputType(DomainTopicMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/eventgrid/eventSubscription.go | sdk/go/azure/eventgrid/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 eventgrid
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:eventgrid/eventSubscription:EventSubscription eventSubscription1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.EventGrid/topics/topic1/providers/Microsoft.EventGrid/eventSubscriptions/eventSubscription1
// ```
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'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:eventhub/eventSubscription:EventSubscription"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource EventSubscription
err := ctx.RegisterResource("azure:eventgrid/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:eventgrid/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
}
| 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/storage/zipBlob.go | sdk/go/azure/storage/zipBlob.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Deprecated: ZipBlob resource is deprecated in the 2.0 version of the provider. Use Blob resource instead.
type ZipBlob struct {
pulumi.CustomResourceState
AccessTier pulumi.StringOutput `pulumi:"accessTier"`
CacheControl pulumi.StringPtrOutput `pulumi:"cacheControl"`
Content pulumi.ArchiveOutput `pulumi:"content"`
ContentMd5 pulumi.StringPtrOutput `pulumi:"contentMd5"`
ContentType pulumi.StringPtrOutput `pulumi:"contentType"`
EncryptionScope pulumi.StringPtrOutput `pulumi:"encryptionScope"`
Metadata pulumi.StringMapOutput `pulumi:"metadata"`
Name pulumi.StringOutput `pulumi:"name"`
Parallelism pulumi.IntPtrOutput `pulumi:"parallelism"`
Size pulumi.IntPtrOutput `pulumi:"size"`
SourceContent pulumi.StringPtrOutput `pulumi:"sourceContent"`
SourceUri pulumi.StringPtrOutput `pulumi:"sourceUri"`
StorageAccountName pulumi.StringOutput `pulumi:"storageAccountName"`
StorageContainerName pulumi.StringOutput `pulumi:"storageContainerName"`
Type pulumi.StringOutput `pulumi:"type"`
Url pulumi.StringOutput `pulumi:"url"`
}
// NewZipBlob registers a new resource with the given unique name, arguments, and options.
func NewZipBlob(ctx *pulumi.Context,
name string, args *ZipBlobArgs, opts ...pulumi.ResourceOption) (*ZipBlob, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.StorageAccountName == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountName'")
}
if args.StorageContainerName == nil {
return nil, errors.New("invalid value for required argument 'StorageContainerName'")
}
if args.Type == nil {
return nil, errors.New("invalid value for required argument 'Type'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ZipBlob
err := ctx.RegisterResource("azure:storage/zipBlob:ZipBlob", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetZipBlob gets an existing ZipBlob resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetZipBlob(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ZipBlobState, opts ...pulumi.ResourceOption) (*ZipBlob, error) {
var resource ZipBlob
err := ctx.ReadResource("azure:storage/zipBlob:ZipBlob", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ZipBlob resources.
type zipBlobState struct {
AccessTier *string `pulumi:"accessTier"`
CacheControl *string `pulumi:"cacheControl"`
Content pulumi.Archive `pulumi:"content"`
ContentMd5 *string `pulumi:"contentMd5"`
ContentType *string `pulumi:"contentType"`
EncryptionScope *string `pulumi:"encryptionScope"`
Metadata map[string]string `pulumi:"metadata"`
Name *string `pulumi:"name"`
Parallelism *int `pulumi:"parallelism"`
Size *int `pulumi:"size"`
SourceContent *string `pulumi:"sourceContent"`
SourceUri *string `pulumi:"sourceUri"`
StorageAccountName *string `pulumi:"storageAccountName"`
StorageContainerName *string `pulumi:"storageContainerName"`
Type *string `pulumi:"type"`
Url *string `pulumi:"url"`
}
type ZipBlobState struct {
AccessTier pulumi.StringPtrInput
CacheControl pulumi.StringPtrInput
Content pulumi.ArchiveInput
ContentMd5 pulumi.StringPtrInput
ContentType pulumi.StringPtrInput
EncryptionScope pulumi.StringPtrInput
Metadata pulumi.StringMapInput
Name pulumi.StringPtrInput
Parallelism pulumi.IntPtrInput
Size pulumi.IntPtrInput
SourceContent pulumi.StringPtrInput
SourceUri pulumi.StringPtrInput
StorageAccountName pulumi.StringPtrInput
StorageContainerName pulumi.StringPtrInput
Type pulumi.StringPtrInput
Url pulumi.StringPtrInput
}
func (ZipBlobState) ElementType() reflect.Type {
return reflect.TypeOf((*zipBlobState)(nil)).Elem()
}
type zipBlobArgs struct {
AccessTier *string `pulumi:"accessTier"`
CacheControl *string `pulumi:"cacheControl"`
Content pulumi.Archive `pulumi:"content"`
ContentMd5 *string `pulumi:"contentMd5"`
ContentType *string `pulumi:"contentType"`
EncryptionScope *string `pulumi:"encryptionScope"`
Metadata map[string]string `pulumi:"metadata"`
Name *string `pulumi:"name"`
Parallelism *int `pulumi:"parallelism"`
Size *int `pulumi:"size"`
SourceContent *string `pulumi:"sourceContent"`
SourceUri *string `pulumi:"sourceUri"`
StorageAccountName string `pulumi:"storageAccountName"`
StorageContainerName string `pulumi:"storageContainerName"`
Type string `pulumi:"type"`
}
// The set of arguments for constructing a ZipBlob resource.
type ZipBlobArgs struct {
AccessTier pulumi.StringPtrInput
CacheControl pulumi.StringPtrInput
Content pulumi.ArchiveInput
ContentMd5 pulumi.StringPtrInput
ContentType pulumi.StringPtrInput
EncryptionScope pulumi.StringPtrInput
Metadata pulumi.StringMapInput
Name pulumi.StringPtrInput
Parallelism pulumi.IntPtrInput
Size pulumi.IntPtrInput
SourceContent pulumi.StringPtrInput
SourceUri pulumi.StringPtrInput
StorageAccountName pulumi.StringInput
StorageContainerName pulumi.StringInput
Type pulumi.StringInput
}
func (ZipBlobArgs) ElementType() reflect.Type {
return reflect.TypeOf((*zipBlobArgs)(nil)).Elem()
}
type ZipBlobInput interface {
pulumi.Input
ToZipBlobOutput() ZipBlobOutput
ToZipBlobOutputWithContext(ctx context.Context) ZipBlobOutput
}
func (*ZipBlob) ElementType() reflect.Type {
return reflect.TypeOf((**ZipBlob)(nil)).Elem()
}
func (i *ZipBlob) ToZipBlobOutput() ZipBlobOutput {
return i.ToZipBlobOutputWithContext(context.Background())
}
func (i *ZipBlob) ToZipBlobOutputWithContext(ctx context.Context) ZipBlobOutput {
return pulumi.ToOutputWithContext(ctx, i).(ZipBlobOutput)
}
// ZipBlobArrayInput is an input type that accepts ZipBlobArray and ZipBlobArrayOutput values.
// You can construct a concrete instance of `ZipBlobArrayInput` via:
//
// ZipBlobArray{ ZipBlobArgs{...} }
type ZipBlobArrayInput interface {
pulumi.Input
ToZipBlobArrayOutput() ZipBlobArrayOutput
ToZipBlobArrayOutputWithContext(context.Context) ZipBlobArrayOutput
}
type ZipBlobArray []ZipBlobInput
func (ZipBlobArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ZipBlob)(nil)).Elem()
}
func (i ZipBlobArray) ToZipBlobArrayOutput() ZipBlobArrayOutput {
return i.ToZipBlobArrayOutputWithContext(context.Background())
}
func (i ZipBlobArray) ToZipBlobArrayOutputWithContext(ctx context.Context) ZipBlobArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ZipBlobArrayOutput)
}
// ZipBlobMapInput is an input type that accepts ZipBlobMap and ZipBlobMapOutput values.
// You can construct a concrete instance of `ZipBlobMapInput` via:
//
// ZipBlobMap{ "key": ZipBlobArgs{...} }
type ZipBlobMapInput interface {
pulumi.Input
ToZipBlobMapOutput() ZipBlobMapOutput
ToZipBlobMapOutputWithContext(context.Context) ZipBlobMapOutput
}
type ZipBlobMap map[string]ZipBlobInput
func (ZipBlobMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ZipBlob)(nil)).Elem()
}
func (i ZipBlobMap) ToZipBlobMapOutput() ZipBlobMapOutput {
return i.ToZipBlobMapOutputWithContext(context.Background())
}
func (i ZipBlobMap) ToZipBlobMapOutputWithContext(ctx context.Context) ZipBlobMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ZipBlobMapOutput)
}
type ZipBlobOutput struct{ *pulumi.OutputState }
func (ZipBlobOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ZipBlob)(nil)).Elem()
}
func (o ZipBlobOutput) ToZipBlobOutput() ZipBlobOutput {
return o
}
func (o ZipBlobOutput) ToZipBlobOutputWithContext(ctx context.Context) ZipBlobOutput {
return o
}
func (o ZipBlobOutput) AccessTier() pulumi.StringOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.StringOutput { return v.AccessTier }).(pulumi.StringOutput)
}
func (o ZipBlobOutput) CacheControl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.StringPtrOutput { return v.CacheControl }).(pulumi.StringPtrOutput)
}
func (o ZipBlobOutput) Content() pulumi.ArchiveOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.ArchiveOutput { return v.Content }).(pulumi.ArchiveOutput)
}
func (o ZipBlobOutput) ContentMd5() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.StringPtrOutput { return v.ContentMd5 }).(pulumi.StringPtrOutput)
}
func (o ZipBlobOutput) ContentType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.StringPtrOutput { return v.ContentType }).(pulumi.StringPtrOutput)
}
func (o ZipBlobOutput) EncryptionScope() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.StringPtrOutput { return v.EncryptionScope }).(pulumi.StringPtrOutput)
}
func (o ZipBlobOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.StringMapOutput { return v.Metadata }).(pulumi.StringMapOutput)
}
func (o ZipBlobOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
func (o ZipBlobOutput) Parallelism() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.IntPtrOutput { return v.Parallelism }).(pulumi.IntPtrOutput)
}
func (o ZipBlobOutput) Size() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.IntPtrOutput { return v.Size }).(pulumi.IntPtrOutput)
}
func (o ZipBlobOutput) SourceContent() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.StringPtrOutput { return v.SourceContent }).(pulumi.StringPtrOutput)
}
func (o ZipBlobOutput) SourceUri() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.StringPtrOutput { return v.SourceUri }).(pulumi.StringPtrOutput)
}
func (o ZipBlobOutput) StorageAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.StringOutput { return v.StorageAccountName }).(pulumi.StringOutput)
}
func (o ZipBlobOutput) StorageContainerName() pulumi.StringOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.StringOutput { return v.StorageContainerName }).(pulumi.StringOutput)
}
func (o ZipBlobOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
func (o ZipBlobOutput) Url() pulumi.StringOutput {
return o.ApplyT(func(v *ZipBlob) pulumi.StringOutput { return v.Url }).(pulumi.StringOutput)
}
type ZipBlobArrayOutput struct{ *pulumi.OutputState }
func (ZipBlobArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ZipBlob)(nil)).Elem()
}
func (o ZipBlobArrayOutput) ToZipBlobArrayOutput() ZipBlobArrayOutput {
return o
}
func (o ZipBlobArrayOutput) ToZipBlobArrayOutputWithContext(ctx context.Context) ZipBlobArrayOutput {
return o
}
func (o ZipBlobArrayOutput) Index(i pulumi.IntInput) ZipBlobOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ZipBlob {
return vs[0].([]*ZipBlob)[vs[1].(int)]
}).(ZipBlobOutput)
}
type ZipBlobMapOutput struct{ *pulumi.OutputState }
func (ZipBlobMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ZipBlob)(nil)).Elem()
}
func (o ZipBlobMapOutput) ToZipBlobMapOutput() ZipBlobMapOutput {
return o
}
func (o ZipBlobMapOutput) ToZipBlobMapOutputWithContext(ctx context.Context) ZipBlobMapOutput {
return o
}
func (o ZipBlobMapOutput) MapIndex(k pulumi.StringInput) ZipBlobOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ZipBlob {
return vs[0].(map[string]*ZipBlob)[vs[1].(string)]
}).(ZipBlobOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ZipBlobInput)(nil)).Elem(), &ZipBlob{})
pulumi.RegisterInputType(reflect.TypeOf((*ZipBlobArrayInput)(nil)).Elem(), ZipBlobArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ZipBlobMapInput)(nil)).Elem(), ZipBlobMap{})
pulumi.RegisterOutputType(ZipBlobOutput{})
pulumi.RegisterOutputType(ZipBlobArrayOutput{})
pulumi.RegisterOutputType(ZipBlobMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/init.go | sdk/go/azure/storage/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 storage
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:storage/account:Account":
r = &Account{}
case "azure:storage/accountNetworkRules:AccountNetworkRules":
r = &AccountNetworkRules{}
case "azure:storage/accountQueueProperties:AccountQueueProperties":
r = &AccountQueueProperties{}
case "azure:storage/accountStaticWebsite:AccountStaticWebsite":
r = &AccountStaticWebsite{}
case "azure:storage/blob:Blob":
r = &Blob{}
case "azure:storage/blobInventoryPolicy:BlobInventoryPolicy":
r = &BlobInventoryPolicy{}
case "azure:storage/container:Container":
r = &Container{}
case "azure:storage/containerImmutabilityPolicy:ContainerImmutabilityPolicy":
r = &ContainerImmutabilityPolicy{}
case "azure:storage/customerManagedKey:CustomerManagedKey":
r = &CustomerManagedKey{}
case "azure:storage/dataLakeGen2Filesystem:DataLakeGen2Filesystem":
r = &DataLakeGen2Filesystem{}
case "azure:storage/dataLakeGen2Path:DataLakeGen2Path":
r = &DataLakeGen2Path{}
case "azure:storage/encryptionScope:EncryptionScope":
r = &EncryptionScope{}
case "azure:storage/localUser:LocalUser":
r = &LocalUser{}
case "azure:storage/managementPolicy:ManagementPolicy":
r = &ManagementPolicy{}
case "azure:storage/mover:Mover":
r = &Mover{}
case "azure:storage/moverAgent:MoverAgent":
r = &MoverAgent{}
case "azure:storage/moverJobDefinition:MoverJobDefinition":
r = &MoverJobDefinition{}
case "azure:storage/moverProject:MoverProject":
r = &MoverProject{}
case "azure:storage/moverSourceEndpoint:MoverSourceEndpoint":
r = &MoverSourceEndpoint{}
case "azure:storage/moverTargetEndpoint:MoverTargetEndpoint":
r = &MoverTargetEndpoint{}
case "azure:storage/objectReplication:ObjectReplication":
r = &ObjectReplication{}
case "azure:storage/queue:Queue":
r = &Queue{}
case "azure:storage/share:Share":
r = &Share{}
case "azure:storage/shareDirectory:ShareDirectory":
r = &ShareDirectory{}
case "azure:storage/shareFile:ShareFile":
r = &ShareFile{}
case "azure:storage/sync:Sync":
r = &Sync{}
case "azure:storage/syncCloudEndpoint:SyncCloudEndpoint":
r = &SyncCloudEndpoint{}
case "azure:storage/syncGroup:SyncGroup":
r = &SyncGroup{}
case "azure:storage/syncServerEndpoint:SyncServerEndpoint":
r = &SyncServerEndpoint{}
case "azure:storage/table:Table":
r = &Table{}
case "azure:storage/tableEntity:TableEntity":
r = &TableEntity{}
case "azure:storage/zipBlob:ZipBlob":
r = &ZipBlob{}
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",
"storage/account",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/accountNetworkRules",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/accountQueueProperties",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/accountStaticWebsite",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/blob",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/blobInventoryPolicy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/container",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/containerImmutabilityPolicy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/customerManagedKey",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/dataLakeGen2Filesystem",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/dataLakeGen2Path",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/encryptionScope",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/localUser",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/managementPolicy",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/mover",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/moverAgent",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/moverJobDefinition",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/moverProject",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/moverSourceEndpoint",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/moverTargetEndpoint",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/objectReplication",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/queue",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/share",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/shareDirectory",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/shareFile",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/sync",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/syncCloudEndpoint",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/syncGroup",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/syncServerEndpoint",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/table",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/tableEntity",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"storage/zipBlob",
&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/storage/localUser.go | sdk/go/azure/storage/localUser.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Storage Account Local User.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/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("WestEurope"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("example-account"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountKind: pulumi.String("StorageV2"),
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// IsHnsEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("example-container"),
// StorageAccountName: exampleAccount.Name,
// })
// if err != nil {
// return err
// }
// _, err = storage.NewLocalUser(ctx, "example", &storage.LocalUserArgs{
// Name: pulumi.String("user1"),
// StorageAccountId: exampleAccount.ID(),
// SshKeyEnabled: pulumi.Bool(true),
// SshPasswordEnabled: pulumi.Bool(true),
// HomeDirectory: pulumi.String("example_path"),
// SshAuthorizedKeys: storage.LocalUserSshAuthorizedKeyArray{
// &storage.LocalUserSshAuthorizedKeyArgs{
// Description: pulumi.String("key1"),
// Key: pulumi.Any(firstPublicKey),
// },
// &storage.LocalUserSshAuthorizedKeyArgs{
// Description: pulumi.String("key2"),
// Key: pulumi.Any(secondPublicKey),
// },
// },
// PermissionScopes: storage.LocalUserPermissionScopeArray{
// &storage.LocalUserPermissionScopeArgs{
// Permissions: &storage.LocalUserPermissionScopePermissionsArgs{
// Read: pulumi.Bool(true),
// Create: pulumi.Bool(true),
// },
// Service: pulumi.String("blob"),
// ResourceName: exampleContainer.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.Storage` - 2023-05-01
//
// ## Import
//
// Storage Account Local Users can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/localUser:LocalUser example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/localUsers/user1
// ```
type LocalUser struct {
pulumi.CustomResourceState
// The home directory of the Storage Account Local User.
HomeDirectory pulumi.StringPtrOutput `pulumi:"homeDirectory"`
// The name which should be used for this Storage Account Local User. Changing this forces a new Storage Account Local User to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The value of the password, which is only available when `sshPasswordEnabled` is set to `true`.
Password pulumi.StringOutput `pulumi:"password"`
// One or more `permissionScope` blocks as defined below.
PermissionScopes LocalUserPermissionScopeArrayOutput `pulumi:"permissionScopes"`
// The unique Security Identifier of this Storage Account Local User.
Sid pulumi.StringOutput `pulumi:"sid"`
// One or more `sshAuthorizedKey` blocks as defined below.
SshAuthorizedKeys LocalUserSshAuthorizedKeyArrayOutput `pulumi:"sshAuthorizedKeys"`
// Specifies whether SSH Key Authentication is enabled. Defaults to `false`.
SshKeyEnabled pulumi.BoolPtrOutput `pulumi:"sshKeyEnabled"`
// Specifies whether SSH Password Authentication is enabled. Defaults to `false`.
SshPasswordEnabled pulumi.BoolPtrOutput `pulumi:"sshPasswordEnabled"`
// The ID of the Storage Account that this Storage Account Local User resides in. Changing this forces a new Storage Account Local User to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
}
// NewLocalUser registers a new resource with the given unique name, arguments, and options.
func NewLocalUser(ctx *pulumi.Context,
name string, args *LocalUserArgs, opts ...pulumi.ResourceOption) (*LocalUser, 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'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"password",
"sid",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource LocalUser
err := ctx.RegisterResource("azure:storage/localUser:LocalUser", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLocalUser gets an existing LocalUser resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetLocalUser(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LocalUserState, opts ...pulumi.ResourceOption) (*LocalUser, error) {
var resource LocalUser
err := ctx.ReadResource("azure:storage/localUser:LocalUser", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LocalUser resources.
type localUserState struct {
// The home directory of the Storage Account Local User.
HomeDirectory *string `pulumi:"homeDirectory"`
// The name which should be used for this Storage Account Local User. Changing this forces a new Storage Account Local User to be created.
Name *string `pulumi:"name"`
// The value of the password, which is only available when `sshPasswordEnabled` is set to `true`.
Password *string `pulumi:"password"`
// One or more `permissionScope` blocks as defined below.
PermissionScopes []LocalUserPermissionScope `pulumi:"permissionScopes"`
// The unique Security Identifier of this Storage Account Local User.
Sid *string `pulumi:"sid"`
// One or more `sshAuthorizedKey` blocks as defined below.
SshAuthorizedKeys []LocalUserSshAuthorizedKey `pulumi:"sshAuthorizedKeys"`
// Specifies whether SSH Key Authentication is enabled. Defaults to `false`.
SshKeyEnabled *bool `pulumi:"sshKeyEnabled"`
// Specifies whether SSH Password Authentication is enabled. Defaults to `false`.
SshPasswordEnabled *bool `pulumi:"sshPasswordEnabled"`
// The ID of the Storage Account that this Storage Account Local User resides in. Changing this forces a new Storage Account Local User to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
}
type LocalUserState struct {
// The home directory of the Storage Account Local User.
HomeDirectory pulumi.StringPtrInput
// The name which should be used for this Storage Account Local User. Changing this forces a new Storage Account Local User to be created.
Name pulumi.StringPtrInput
// The value of the password, which is only available when `sshPasswordEnabled` is set to `true`.
Password pulumi.StringPtrInput
// One or more `permissionScope` blocks as defined below.
PermissionScopes LocalUserPermissionScopeArrayInput
// The unique Security Identifier of this Storage Account Local User.
Sid pulumi.StringPtrInput
// One or more `sshAuthorizedKey` blocks as defined below.
SshAuthorizedKeys LocalUserSshAuthorizedKeyArrayInput
// Specifies whether SSH Key Authentication is enabled. Defaults to `false`.
SshKeyEnabled pulumi.BoolPtrInput
// Specifies whether SSH Password Authentication is enabled. Defaults to `false`.
SshPasswordEnabled pulumi.BoolPtrInput
// The ID of the Storage Account that this Storage Account Local User resides in. Changing this forces a new Storage Account Local User to be created.
StorageAccountId pulumi.StringPtrInput
}
func (LocalUserState) ElementType() reflect.Type {
return reflect.TypeOf((*localUserState)(nil)).Elem()
}
type localUserArgs struct {
// The home directory of the Storage Account Local User.
HomeDirectory *string `pulumi:"homeDirectory"`
// The name which should be used for this Storage Account Local User. Changing this forces a new Storage Account Local User to be created.
Name *string `pulumi:"name"`
// One or more `permissionScope` blocks as defined below.
PermissionScopes []LocalUserPermissionScope `pulumi:"permissionScopes"`
// One or more `sshAuthorizedKey` blocks as defined below.
SshAuthorizedKeys []LocalUserSshAuthorizedKey `pulumi:"sshAuthorizedKeys"`
// Specifies whether SSH Key Authentication is enabled. Defaults to `false`.
SshKeyEnabled *bool `pulumi:"sshKeyEnabled"`
// Specifies whether SSH Password Authentication is enabled. Defaults to `false`.
SshPasswordEnabled *bool `pulumi:"sshPasswordEnabled"`
// The ID of the Storage Account that this Storage Account Local User resides in. Changing this forces a new Storage Account Local User to be created.
StorageAccountId string `pulumi:"storageAccountId"`
}
// The set of arguments for constructing a LocalUser resource.
type LocalUserArgs struct {
// The home directory of the Storage Account Local User.
HomeDirectory pulumi.StringPtrInput
// The name which should be used for this Storage Account Local User. Changing this forces a new Storage Account Local User to be created.
Name pulumi.StringPtrInput
// One or more `permissionScope` blocks as defined below.
PermissionScopes LocalUserPermissionScopeArrayInput
// One or more `sshAuthorizedKey` blocks as defined below.
SshAuthorizedKeys LocalUserSshAuthorizedKeyArrayInput
// Specifies whether SSH Key Authentication is enabled. Defaults to `false`.
SshKeyEnabled pulumi.BoolPtrInput
// Specifies whether SSH Password Authentication is enabled. Defaults to `false`.
SshPasswordEnabled pulumi.BoolPtrInput
// The ID of the Storage Account that this Storage Account Local User resides in. Changing this forces a new Storage Account Local User to be created.
StorageAccountId pulumi.StringInput
}
func (LocalUserArgs) ElementType() reflect.Type {
return reflect.TypeOf((*localUserArgs)(nil)).Elem()
}
type LocalUserInput interface {
pulumi.Input
ToLocalUserOutput() LocalUserOutput
ToLocalUserOutputWithContext(ctx context.Context) LocalUserOutput
}
func (*LocalUser) ElementType() reflect.Type {
return reflect.TypeOf((**LocalUser)(nil)).Elem()
}
func (i *LocalUser) ToLocalUserOutput() LocalUserOutput {
return i.ToLocalUserOutputWithContext(context.Background())
}
func (i *LocalUser) ToLocalUserOutputWithContext(ctx context.Context) LocalUserOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalUserOutput)
}
// LocalUserArrayInput is an input type that accepts LocalUserArray and LocalUserArrayOutput values.
// You can construct a concrete instance of `LocalUserArrayInput` via:
//
// LocalUserArray{ LocalUserArgs{...} }
type LocalUserArrayInput interface {
pulumi.Input
ToLocalUserArrayOutput() LocalUserArrayOutput
ToLocalUserArrayOutputWithContext(context.Context) LocalUserArrayOutput
}
type LocalUserArray []LocalUserInput
func (LocalUserArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalUser)(nil)).Elem()
}
func (i LocalUserArray) ToLocalUserArrayOutput() LocalUserArrayOutput {
return i.ToLocalUserArrayOutputWithContext(context.Background())
}
func (i LocalUserArray) ToLocalUserArrayOutputWithContext(ctx context.Context) LocalUserArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalUserArrayOutput)
}
// LocalUserMapInput is an input type that accepts LocalUserMap and LocalUserMapOutput values.
// You can construct a concrete instance of `LocalUserMapInput` via:
//
// LocalUserMap{ "key": LocalUserArgs{...} }
type LocalUserMapInput interface {
pulumi.Input
ToLocalUserMapOutput() LocalUserMapOutput
ToLocalUserMapOutputWithContext(context.Context) LocalUserMapOutput
}
type LocalUserMap map[string]LocalUserInput
func (LocalUserMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalUser)(nil)).Elem()
}
func (i LocalUserMap) ToLocalUserMapOutput() LocalUserMapOutput {
return i.ToLocalUserMapOutputWithContext(context.Background())
}
func (i LocalUserMap) ToLocalUserMapOutputWithContext(ctx context.Context) LocalUserMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocalUserMapOutput)
}
type LocalUserOutput struct{ *pulumi.OutputState }
func (LocalUserOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LocalUser)(nil)).Elem()
}
func (o LocalUserOutput) ToLocalUserOutput() LocalUserOutput {
return o
}
func (o LocalUserOutput) ToLocalUserOutputWithContext(ctx context.Context) LocalUserOutput {
return o
}
// The home directory of the Storage Account Local User.
func (o LocalUserOutput) HomeDirectory() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocalUser) pulumi.StringPtrOutput { return v.HomeDirectory }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Storage Account Local User. Changing this forces a new Storage Account Local User to be created.
func (o LocalUserOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *LocalUser) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The value of the password, which is only available when `sshPasswordEnabled` is set to `true`.
func (o LocalUserOutput) Password() pulumi.StringOutput {
return o.ApplyT(func(v *LocalUser) pulumi.StringOutput { return v.Password }).(pulumi.StringOutput)
}
// One or more `permissionScope` blocks as defined below.
func (o LocalUserOutput) PermissionScopes() LocalUserPermissionScopeArrayOutput {
return o.ApplyT(func(v *LocalUser) LocalUserPermissionScopeArrayOutput { return v.PermissionScopes }).(LocalUserPermissionScopeArrayOutput)
}
// The unique Security Identifier of this Storage Account Local User.
func (o LocalUserOutput) Sid() pulumi.StringOutput {
return o.ApplyT(func(v *LocalUser) pulumi.StringOutput { return v.Sid }).(pulumi.StringOutput)
}
// One or more `sshAuthorizedKey` blocks as defined below.
func (o LocalUserOutput) SshAuthorizedKeys() LocalUserSshAuthorizedKeyArrayOutput {
return o.ApplyT(func(v *LocalUser) LocalUserSshAuthorizedKeyArrayOutput { return v.SshAuthorizedKeys }).(LocalUserSshAuthorizedKeyArrayOutput)
}
// Specifies whether SSH Key Authentication is enabled. Defaults to `false`.
func (o LocalUserOutput) SshKeyEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LocalUser) pulumi.BoolPtrOutput { return v.SshKeyEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies whether SSH Password Authentication is enabled. Defaults to `false`.
func (o LocalUserOutput) SshPasswordEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LocalUser) pulumi.BoolPtrOutput { return v.SshPasswordEnabled }).(pulumi.BoolPtrOutput)
}
// The ID of the Storage Account that this Storage Account Local User resides in. Changing this forces a new Storage Account Local User to be created.
func (o LocalUserOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *LocalUser) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
type LocalUserArrayOutput struct{ *pulumi.OutputState }
func (LocalUserArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LocalUser)(nil)).Elem()
}
func (o LocalUserArrayOutput) ToLocalUserArrayOutput() LocalUserArrayOutput {
return o
}
func (o LocalUserArrayOutput) ToLocalUserArrayOutputWithContext(ctx context.Context) LocalUserArrayOutput {
return o
}
func (o LocalUserArrayOutput) Index(i pulumi.IntInput) LocalUserOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LocalUser {
return vs[0].([]*LocalUser)[vs[1].(int)]
}).(LocalUserOutput)
}
type LocalUserMapOutput struct{ *pulumi.OutputState }
func (LocalUserMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LocalUser)(nil)).Elem()
}
func (o LocalUserMapOutput) ToLocalUserMapOutput() LocalUserMapOutput {
return o
}
func (o LocalUserMapOutput) ToLocalUserMapOutputWithContext(ctx context.Context) LocalUserMapOutput {
return o
}
func (o LocalUserMapOutput) MapIndex(k pulumi.StringInput) LocalUserOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LocalUser {
return vs[0].(map[string]*LocalUser)[vs[1].(string)]
}).(LocalUserOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LocalUserInput)(nil)).Elem(), &LocalUser{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalUserArrayInput)(nil)).Elem(), LocalUserArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LocalUserMapInput)(nil)).Elem(), LocalUserMap{})
pulumi.RegisterOutputType(LocalUserOutput{})
pulumi.RegisterOutputType(LocalUserArrayOutput{})
pulumi.RegisterOutputType(LocalUserMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/share.go | sdk/go/azure/storage/share.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a File Share within Azure Storage.
//
// > **Note:** The storage share supports two storage tiers: premium and standard. Standard file shares are created in general purpose (GPv1 or GPv2) storage accounts and premium file shares are created in FileStorage storage accounts. For further information, refer to the section "What storage tiers are supported in Azure Files?" of [documentation](https://docs.microsoft.com/azure/storage/files/storage-files-faq#general).
//
// > **Note:** Shared Key authentication will always be used for this resource, as AzureAD authentication is not supported by the Storage API for files.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("azuretest"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("azureteststorage"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewShare(ctx, "example", &storage.ShareArgs{
// Name: pulumi.String("sharename"),
// StorageAccountId: exampleAccount.ID(),
// Quota: pulumi.Int(50),
// Acls: storage.ShareAclArray{
// &storage.ShareAclArgs{
// Id: pulumi.String("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"),
// AccessPolicies: storage.ShareAclAccessPolicyArray{
// &storage.ShareAclAccessPolicyArgs{
// Permissions: pulumi.String("rwdl"),
// Start: pulumi.String("2019-07-02T09:38:21Z"),
// Expiry: pulumi.String("2019-07-02T10:38:21Z"),
// },
// },
// },
// },
// })
// 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.Storage` - 2023-05-01
//
// ## Import
//
// Storage Shares can be imported using the `id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/share:Share exampleShare /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Storage/storageAccounts/myAccount/fileServices/default/shares/exampleShare
// ```
type Share struct {
pulumi.CustomResourceState
// The access tier of the File Share. Possible values are `Hot`, `Cool` and `TransactionOptimized`, `Premium`.
//
// > **Note:** The `FileStorage` `accountKind` of the `storage.Account` requires `Premium` `accessTier`.
AccessTier pulumi.StringOutput `pulumi:"accessTier"`
// One or more `acl` blocks as defined below.
Acls ShareAclArrayOutput `pulumi:"acls"`
// The protocol used for the share. Possible values are `SMB` and `NFS`. The `SMB` indicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The `NFS` indicates the share can be accessed by NFSv4.1. Defaults to `SMB`. Changing this forces a new resource to be created.
//
// > **Note:** The `FileStorage` `accountKind` of the `storage.Account` is required for the `NFS` protocol.
EnabledProtocol pulumi.StringPtrOutput `pulumi:"enabledProtocol"`
// A mapping of MetaData for this File Share.
Metadata pulumi.StringMapOutput `pulumi:"metadata"`
// The name of the share. Must be unique within the storage account where the share is located. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The maximum size of the share, in gigabytes.
//
// > **Note:** For Standard storage accounts, by default this must be `1` GB (or higher) and at most `5120` GB (`5` TB). This can be set to a value larger than `5120` GB if `largeFileShareEnabled` is set to `true` in the parent `storage.Account`.
//
// > **Note:** For Premium FileStorage storage accounts, this must be greater than `100` GB and at most `102400` GB (`100` TB).
Quota pulumi.IntOutput `pulumi:"quota"`
// The Resource Manager ID of this File Share.
//
// Deprecated: this property is deprecated and will be removed 5.0 and replaced by the `id` property.
ResourceManagerId pulumi.StringOutput `pulumi:"resourceManagerId"`
// Specifies the storage account in which to create the share.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId pulumi.StringPtrOutput `pulumi:"storageAccountId"`
// Specifies the storage account in which to create the share. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: This property has been deprecated and will be replaced by `storageAccountId` in version 5.0 of the provider.
StorageAccountName pulumi.StringPtrOutput `pulumi:"storageAccountName"`
// The URL of the File Share
Url pulumi.StringOutput `pulumi:"url"`
}
// NewShare registers a new resource with the given unique name, arguments, and options.
func NewShare(ctx *pulumi.Context,
name string, args *ShareArgs, opts ...pulumi.ResourceOption) (*Share, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Quota == nil {
return nil, errors.New("invalid value for required argument 'Quota'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Share
err := ctx.RegisterResource("azure:storage/share:Share", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetShare gets an existing Share resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetShare(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ShareState, opts ...pulumi.ResourceOption) (*Share, error) {
var resource Share
err := ctx.ReadResource("azure:storage/share:Share", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Share resources.
type shareState struct {
// The access tier of the File Share. Possible values are `Hot`, `Cool` and `TransactionOptimized`, `Premium`.
//
// > **Note:** The `FileStorage` `accountKind` of the `storage.Account` requires `Premium` `accessTier`.
AccessTier *string `pulumi:"accessTier"`
// One or more `acl` blocks as defined below.
Acls []ShareAcl `pulumi:"acls"`
// The protocol used for the share. Possible values are `SMB` and `NFS`. The `SMB` indicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The `NFS` indicates the share can be accessed by NFSv4.1. Defaults to `SMB`. Changing this forces a new resource to be created.
//
// > **Note:** The `FileStorage` `accountKind` of the `storage.Account` is required for the `NFS` protocol.
EnabledProtocol *string `pulumi:"enabledProtocol"`
// A mapping of MetaData for this File Share.
Metadata map[string]string `pulumi:"metadata"`
// The name of the share. Must be unique within the storage account where the share is located. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The maximum size of the share, in gigabytes.
//
// > **Note:** For Standard storage accounts, by default this must be `1` GB (or higher) and at most `5120` GB (`5` TB). This can be set to a value larger than `5120` GB if `largeFileShareEnabled` is set to `true` in the parent `storage.Account`.
//
// > **Note:** For Premium FileStorage storage accounts, this must be greater than `100` GB and at most `102400` GB (`100` TB).
Quota *int `pulumi:"quota"`
// The Resource Manager ID of this File Share.
//
// Deprecated: this property is deprecated and will be removed 5.0 and replaced by the `id` property.
ResourceManagerId *string `pulumi:"resourceManagerId"`
// Specifies the storage account in which to create the share.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId *string `pulumi:"storageAccountId"`
// Specifies the storage account in which to create the share. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: This property has been deprecated and will be replaced by `storageAccountId` in version 5.0 of the provider.
StorageAccountName *string `pulumi:"storageAccountName"`
// The URL of the File Share
Url *string `pulumi:"url"`
}
type ShareState struct {
// The access tier of the File Share. Possible values are `Hot`, `Cool` and `TransactionOptimized`, `Premium`.
//
// > **Note:** The `FileStorage` `accountKind` of the `storage.Account` requires `Premium` `accessTier`.
AccessTier pulumi.StringPtrInput
// One or more `acl` blocks as defined below.
Acls ShareAclArrayInput
// The protocol used for the share. Possible values are `SMB` and `NFS`. The `SMB` indicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The `NFS` indicates the share can be accessed by NFSv4.1. Defaults to `SMB`. Changing this forces a new resource to be created.
//
// > **Note:** The `FileStorage` `accountKind` of the `storage.Account` is required for the `NFS` protocol.
EnabledProtocol pulumi.StringPtrInput
// A mapping of MetaData for this File Share.
Metadata pulumi.StringMapInput
// The name of the share. Must be unique within the storage account where the share is located. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The maximum size of the share, in gigabytes.
//
// > **Note:** For Standard storage accounts, by default this must be `1` GB (or higher) and at most `5120` GB (`5` TB). This can be set to a value larger than `5120` GB if `largeFileShareEnabled` is set to `true` in the parent `storage.Account`.
//
// > **Note:** For Premium FileStorage storage accounts, this must be greater than `100` GB and at most `102400` GB (`100` TB).
Quota pulumi.IntPtrInput
// The Resource Manager ID of this File Share.
//
// Deprecated: this property is deprecated and will be removed 5.0 and replaced by the `id` property.
ResourceManagerId pulumi.StringPtrInput
// Specifies the storage account in which to create the share.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId pulumi.StringPtrInput
// Specifies the storage account in which to create the share. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: This property has been deprecated and will be replaced by `storageAccountId` in version 5.0 of the provider.
StorageAccountName pulumi.StringPtrInput
// The URL of the File Share
Url pulumi.StringPtrInput
}
func (ShareState) ElementType() reflect.Type {
return reflect.TypeOf((*shareState)(nil)).Elem()
}
type shareArgs struct {
// The access tier of the File Share. Possible values are `Hot`, `Cool` and `TransactionOptimized`, `Premium`.
//
// > **Note:** The `FileStorage` `accountKind` of the `storage.Account` requires `Premium` `accessTier`.
AccessTier *string `pulumi:"accessTier"`
// One or more `acl` blocks as defined below.
Acls []ShareAcl `pulumi:"acls"`
// The protocol used for the share. Possible values are `SMB` and `NFS`. The `SMB` indicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The `NFS` indicates the share can be accessed by NFSv4.1. Defaults to `SMB`. Changing this forces a new resource to be created.
//
// > **Note:** The `FileStorage` `accountKind` of the `storage.Account` is required for the `NFS` protocol.
EnabledProtocol *string `pulumi:"enabledProtocol"`
// A mapping of MetaData for this File Share.
Metadata map[string]string `pulumi:"metadata"`
// The name of the share. Must be unique within the storage account where the share is located. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The maximum size of the share, in gigabytes.
//
// > **Note:** For Standard storage accounts, by default this must be `1` GB (or higher) and at most `5120` GB (`5` TB). This can be set to a value larger than `5120` GB if `largeFileShareEnabled` is set to `true` in the parent `storage.Account`.
//
// > **Note:** For Premium FileStorage storage accounts, this must be greater than `100` GB and at most `102400` GB (`100` TB).
Quota int `pulumi:"quota"`
// Specifies the storage account in which to create the share.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId *string `pulumi:"storageAccountId"`
// Specifies the storage account in which to create the share. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: This property has been deprecated and will be replaced by `storageAccountId` in version 5.0 of the provider.
StorageAccountName *string `pulumi:"storageAccountName"`
}
// The set of arguments for constructing a Share resource.
type ShareArgs struct {
// The access tier of the File Share. Possible values are `Hot`, `Cool` and `TransactionOptimized`, `Premium`.
//
// > **Note:** The `FileStorage` `accountKind` of the `storage.Account` requires `Premium` `accessTier`.
AccessTier pulumi.StringPtrInput
// One or more `acl` blocks as defined below.
Acls ShareAclArrayInput
// The protocol used for the share. Possible values are `SMB` and `NFS`. The `SMB` indicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The `NFS` indicates the share can be accessed by NFSv4.1. Defaults to `SMB`. Changing this forces a new resource to be created.
//
// > **Note:** The `FileStorage` `accountKind` of the `storage.Account` is required for the `NFS` protocol.
EnabledProtocol pulumi.StringPtrInput
// A mapping of MetaData for this File Share.
Metadata pulumi.StringMapInput
// The name of the share. Must be unique within the storage account where the share is located. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The maximum size of the share, in gigabytes.
//
// > **Note:** For Standard storage accounts, by default this must be `1` GB (or higher) and at most `5120` GB (`5` TB). This can be set to a value larger than `5120` GB if `largeFileShareEnabled` is set to `true` in the parent `storage.Account`.
//
// > **Note:** For Premium FileStorage storage accounts, this must be greater than `100` GB and at most `102400` GB (`100` TB).
Quota pulumi.IntInput
// Specifies the storage account in which to create the share.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId pulumi.StringPtrInput
// Specifies the storage account in which to create the share. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: This property has been deprecated and will be replaced by `storageAccountId` in version 5.0 of the provider.
StorageAccountName pulumi.StringPtrInput
}
func (ShareArgs) ElementType() reflect.Type {
return reflect.TypeOf((*shareArgs)(nil)).Elem()
}
type ShareInput interface {
pulumi.Input
ToShareOutput() ShareOutput
ToShareOutputWithContext(ctx context.Context) ShareOutput
}
func (*Share) ElementType() reflect.Type {
return reflect.TypeOf((**Share)(nil)).Elem()
}
func (i *Share) ToShareOutput() ShareOutput {
return i.ToShareOutputWithContext(context.Background())
}
func (i *Share) ToShareOutputWithContext(ctx context.Context) ShareOutput {
return pulumi.ToOutputWithContext(ctx, i).(ShareOutput)
}
// ShareArrayInput is an input type that accepts ShareArray and ShareArrayOutput values.
// You can construct a concrete instance of `ShareArrayInput` via:
//
// ShareArray{ ShareArgs{...} }
type ShareArrayInput interface {
pulumi.Input
ToShareArrayOutput() ShareArrayOutput
ToShareArrayOutputWithContext(context.Context) ShareArrayOutput
}
type ShareArray []ShareInput
func (ShareArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Share)(nil)).Elem()
}
func (i ShareArray) ToShareArrayOutput() ShareArrayOutput {
return i.ToShareArrayOutputWithContext(context.Background())
}
func (i ShareArray) ToShareArrayOutputWithContext(ctx context.Context) ShareArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ShareArrayOutput)
}
// ShareMapInput is an input type that accepts ShareMap and ShareMapOutput values.
// You can construct a concrete instance of `ShareMapInput` via:
//
// ShareMap{ "key": ShareArgs{...} }
type ShareMapInput interface {
pulumi.Input
ToShareMapOutput() ShareMapOutput
ToShareMapOutputWithContext(context.Context) ShareMapOutput
}
type ShareMap map[string]ShareInput
func (ShareMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Share)(nil)).Elem()
}
func (i ShareMap) ToShareMapOutput() ShareMapOutput {
return i.ToShareMapOutputWithContext(context.Background())
}
func (i ShareMap) ToShareMapOutputWithContext(ctx context.Context) ShareMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ShareMapOutput)
}
type ShareOutput struct{ *pulumi.OutputState }
func (ShareOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Share)(nil)).Elem()
}
func (o ShareOutput) ToShareOutput() ShareOutput {
return o
}
func (o ShareOutput) ToShareOutputWithContext(ctx context.Context) ShareOutput {
return o
}
// The access tier of the File Share. Possible values are `Hot`, `Cool` and `TransactionOptimized`, `Premium`.
//
// > **Note:** The `FileStorage` `accountKind` of the `storage.Account` requires `Premium` `accessTier`.
func (o ShareOutput) AccessTier() pulumi.StringOutput {
return o.ApplyT(func(v *Share) pulumi.StringOutput { return v.AccessTier }).(pulumi.StringOutput)
}
// One or more `acl` blocks as defined below.
func (o ShareOutput) Acls() ShareAclArrayOutput {
return o.ApplyT(func(v *Share) ShareAclArrayOutput { return v.Acls }).(ShareAclArrayOutput)
}
// The protocol used for the share. Possible values are `SMB` and `NFS`. The `SMB` indicates the share can be accessed by SMBv3.0, SMBv2.1 and REST. The `NFS` indicates the share can be accessed by NFSv4.1. Defaults to `SMB`. Changing this forces a new resource to be created.
//
// > **Note:** The `FileStorage` `accountKind` of the `storage.Account` is required for the `NFS` protocol.
func (o ShareOutput) EnabledProtocol() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Share) pulumi.StringPtrOutput { return v.EnabledProtocol }).(pulumi.StringPtrOutput)
}
// A mapping of MetaData for this File Share.
func (o ShareOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v *Share) pulumi.StringMapOutput { return v.Metadata }).(pulumi.StringMapOutput)
}
// The name of the share. Must be unique within the storage account where the share is located. Changing this forces a new resource to be created.
func (o ShareOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Share) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The maximum size of the share, in gigabytes.
//
// > **Note:** For Standard storage accounts, by default this must be `1` GB (or higher) and at most `5120` GB (`5` TB). This can be set to a value larger than `5120` GB if `largeFileShareEnabled` is set to `true` in the parent `storage.Account`.
//
// > **Note:** For Premium FileStorage storage accounts, this must be greater than `100` GB and at most `102400` GB (`100` TB).
func (o ShareOutput) Quota() pulumi.IntOutput {
return o.ApplyT(func(v *Share) pulumi.IntOutput { return v.Quota }).(pulumi.IntOutput)
}
// The Resource Manager ID of this File Share.
//
// Deprecated: this property is deprecated and will be removed 5.0 and replaced by the `id` property.
func (o ShareOutput) ResourceManagerId() pulumi.StringOutput {
return o.ApplyT(func(v *Share) pulumi.StringOutput { return v.ResourceManagerId }).(pulumi.StringOutput)
}
// Specifies the storage account in which to create the share.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
func (o ShareOutput) StorageAccountId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Share) pulumi.StringPtrOutput { return v.StorageAccountId }).(pulumi.StringPtrOutput)
}
// Specifies the storage account in which to create the share. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: This property has been deprecated and will be replaced by `storageAccountId` in version 5.0 of the provider.
func (o ShareOutput) StorageAccountName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Share) pulumi.StringPtrOutput { return v.StorageAccountName }).(pulumi.StringPtrOutput)
}
// The URL of the File Share
func (o ShareOutput) Url() pulumi.StringOutput {
return o.ApplyT(func(v *Share) pulumi.StringOutput { return v.Url }).(pulumi.StringOutput)
}
type ShareArrayOutput struct{ *pulumi.OutputState }
func (ShareArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Share)(nil)).Elem()
}
func (o ShareArrayOutput) ToShareArrayOutput() ShareArrayOutput {
return o
}
func (o ShareArrayOutput) ToShareArrayOutputWithContext(ctx context.Context) ShareArrayOutput {
return o
}
func (o ShareArrayOutput) Index(i pulumi.IntInput) ShareOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Share {
return vs[0].([]*Share)[vs[1].(int)]
}).(ShareOutput)
}
type ShareMapOutput struct{ *pulumi.OutputState }
func (ShareMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Share)(nil)).Elem()
}
func (o ShareMapOutput) ToShareMapOutput() ShareMapOutput {
return o
}
func (o ShareMapOutput) ToShareMapOutputWithContext(ctx context.Context) ShareMapOutput {
return o
}
func (o ShareMapOutput) MapIndex(k pulumi.StringInput) ShareOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Share {
return vs[0].(map[string]*Share)[vs[1].(string)]
}).(ShareOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ShareInput)(nil)).Elem(), &Share{})
pulumi.RegisterInputType(reflect.TypeOf((*ShareArrayInput)(nil)).Elem(), ShareArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ShareMapInput)(nil)).Elem(), ShareMap{})
pulumi.RegisterOutputType(ShareOutput{})
pulumi.RegisterOutputType(ShareArrayOutput{})
pulumi.RegisterOutputType(ShareMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/encryptionScope.go | sdk/go/azure/storage/encryptionScope.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Storage Encryption Scope.
//
// > **Note:** Storage Encryption Scopes are in Preview [more information can be found here](https://docs.microsoft.com/azure/storage/blobs/encryption-scope-manage).
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/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("examplesa"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// Identity: &storage.AccountIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// _, err = storage.NewEncryptionScope(ctx, "example", &storage.EncryptionScopeArgs{
// Name: pulumi.String("microsoftmanaged"),
// StorageAccountId: exampleAccount.ID(),
// Source: pulumi.String("Microsoft.Storage"),
// })
// 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.Storage` - 2023-05-01
//
// ## Import
//
// Storage Encryption Scopes can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/encryptionScope:EncryptionScope example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Storage/storageAccounts/account1/encryptionScopes/scope1
// ```
type EncryptionScope struct {
pulumi.CustomResourceState
// Is a secondary layer of encryption with Platform Managed Keys for data applied? Changing this forces a new resource to be created.
InfrastructureEncryptionRequired pulumi.BoolPtrOutput `pulumi:"infrastructureEncryptionRequired"`
// The ID of the Key Vault Key. Required when `source` is `Microsoft.KeyVault`.
KeyVaultKeyId pulumi.StringPtrOutput `pulumi:"keyVaultKeyId"`
// The name which should be used for this Storage Encryption Scope. Changing this forces a new Storage Encryption Scope to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The source of the Storage Encryption Scope. Possible values are `Microsoft.KeyVault` and `Microsoft.Storage`.
Source pulumi.StringOutput `pulumi:"source"`
// The ID of the Storage Account where this Storage Encryption Scope is created. Changing this forces a new Storage Encryption Scope to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
}
// NewEncryptionScope registers a new resource with the given unique name, arguments, and options.
func NewEncryptionScope(ctx *pulumi.Context,
name string, args *EncryptionScopeArgs, opts ...pulumi.ResourceOption) (*EncryptionScope, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Source == nil {
return nil, errors.New("invalid value for required argument 'Source'")
}
if args.StorageAccountId == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource EncryptionScope
err := ctx.RegisterResource("azure:storage/encryptionScope:EncryptionScope", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEncryptionScope gets an existing EncryptionScope resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetEncryptionScope(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EncryptionScopeState, opts ...pulumi.ResourceOption) (*EncryptionScope, error) {
var resource EncryptionScope
err := ctx.ReadResource("azure:storage/encryptionScope:EncryptionScope", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EncryptionScope resources.
type encryptionScopeState struct {
// Is a secondary layer of encryption with Platform Managed Keys for data applied? Changing this forces a new resource to be created.
InfrastructureEncryptionRequired *bool `pulumi:"infrastructureEncryptionRequired"`
// The ID of the Key Vault Key. Required when `source` is `Microsoft.KeyVault`.
KeyVaultKeyId *string `pulumi:"keyVaultKeyId"`
// The name which should be used for this Storage Encryption Scope. Changing this forces a new Storage Encryption Scope to be created.
Name *string `pulumi:"name"`
// The source of the Storage Encryption Scope. Possible values are `Microsoft.KeyVault` and `Microsoft.Storage`.
Source *string `pulumi:"source"`
// The ID of the Storage Account where this Storage Encryption Scope is created. Changing this forces a new Storage Encryption Scope to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
}
type EncryptionScopeState struct {
// Is a secondary layer of encryption with Platform Managed Keys for data applied? Changing this forces a new resource to be created.
InfrastructureEncryptionRequired pulumi.BoolPtrInput
// The ID of the Key Vault Key. Required when `source` is `Microsoft.KeyVault`.
KeyVaultKeyId pulumi.StringPtrInput
// The name which should be used for this Storage Encryption Scope. Changing this forces a new Storage Encryption Scope to be created.
Name pulumi.StringPtrInput
// The source of the Storage Encryption Scope. Possible values are `Microsoft.KeyVault` and `Microsoft.Storage`.
Source pulumi.StringPtrInput
// The ID of the Storage Account where this Storage Encryption Scope is created. Changing this forces a new Storage Encryption Scope to be created.
StorageAccountId pulumi.StringPtrInput
}
func (EncryptionScopeState) ElementType() reflect.Type {
return reflect.TypeOf((*encryptionScopeState)(nil)).Elem()
}
type encryptionScopeArgs struct {
// Is a secondary layer of encryption with Platform Managed Keys for data applied? Changing this forces a new resource to be created.
InfrastructureEncryptionRequired *bool `pulumi:"infrastructureEncryptionRequired"`
// The ID of the Key Vault Key. Required when `source` is `Microsoft.KeyVault`.
KeyVaultKeyId *string `pulumi:"keyVaultKeyId"`
// The name which should be used for this Storage Encryption Scope. Changing this forces a new Storage Encryption Scope to be created.
Name *string `pulumi:"name"`
// The source of the Storage Encryption Scope. Possible values are `Microsoft.KeyVault` and `Microsoft.Storage`.
Source string `pulumi:"source"`
// The ID of the Storage Account where this Storage Encryption Scope is created. Changing this forces a new Storage Encryption Scope to be created.
StorageAccountId string `pulumi:"storageAccountId"`
}
// The set of arguments for constructing a EncryptionScope resource.
type EncryptionScopeArgs struct {
// Is a secondary layer of encryption with Platform Managed Keys for data applied? Changing this forces a new resource to be created.
InfrastructureEncryptionRequired pulumi.BoolPtrInput
// The ID of the Key Vault Key. Required when `source` is `Microsoft.KeyVault`.
KeyVaultKeyId pulumi.StringPtrInput
// The name which should be used for this Storage Encryption Scope. Changing this forces a new Storage Encryption Scope to be created.
Name pulumi.StringPtrInput
// The source of the Storage Encryption Scope. Possible values are `Microsoft.KeyVault` and `Microsoft.Storage`.
Source pulumi.StringInput
// The ID of the Storage Account where this Storage Encryption Scope is created. Changing this forces a new Storage Encryption Scope to be created.
StorageAccountId pulumi.StringInput
}
func (EncryptionScopeArgs) ElementType() reflect.Type {
return reflect.TypeOf((*encryptionScopeArgs)(nil)).Elem()
}
type EncryptionScopeInput interface {
pulumi.Input
ToEncryptionScopeOutput() EncryptionScopeOutput
ToEncryptionScopeOutputWithContext(ctx context.Context) EncryptionScopeOutput
}
func (*EncryptionScope) ElementType() reflect.Type {
return reflect.TypeOf((**EncryptionScope)(nil)).Elem()
}
func (i *EncryptionScope) ToEncryptionScopeOutput() EncryptionScopeOutput {
return i.ToEncryptionScopeOutputWithContext(context.Background())
}
func (i *EncryptionScope) ToEncryptionScopeOutputWithContext(ctx context.Context) EncryptionScopeOutput {
return pulumi.ToOutputWithContext(ctx, i).(EncryptionScopeOutput)
}
// EncryptionScopeArrayInput is an input type that accepts EncryptionScopeArray and EncryptionScopeArrayOutput values.
// You can construct a concrete instance of `EncryptionScopeArrayInput` via:
//
// EncryptionScopeArray{ EncryptionScopeArgs{...} }
type EncryptionScopeArrayInput interface {
pulumi.Input
ToEncryptionScopeArrayOutput() EncryptionScopeArrayOutput
ToEncryptionScopeArrayOutputWithContext(context.Context) EncryptionScopeArrayOutput
}
type EncryptionScopeArray []EncryptionScopeInput
func (EncryptionScopeArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EncryptionScope)(nil)).Elem()
}
func (i EncryptionScopeArray) ToEncryptionScopeArrayOutput() EncryptionScopeArrayOutput {
return i.ToEncryptionScopeArrayOutputWithContext(context.Background())
}
func (i EncryptionScopeArray) ToEncryptionScopeArrayOutputWithContext(ctx context.Context) EncryptionScopeArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EncryptionScopeArrayOutput)
}
// EncryptionScopeMapInput is an input type that accepts EncryptionScopeMap and EncryptionScopeMapOutput values.
// You can construct a concrete instance of `EncryptionScopeMapInput` via:
//
// EncryptionScopeMap{ "key": EncryptionScopeArgs{...} }
type EncryptionScopeMapInput interface {
pulumi.Input
ToEncryptionScopeMapOutput() EncryptionScopeMapOutput
ToEncryptionScopeMapOutputWithContext(context.Context) EncryptionScopeMapOutput
}
type EncryptionScopeMap map[string]EncryptionScopeInput
func (EncryptionScopeMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EncryptionScope)(nil)).Elem()
}
func (i EncryptionScopeMap) ToEncryptionScopeMapOutput() EncryptionScopeMapOutput {
return i.ToEncryptionScopeMapOutputWithContext(context.Background())
}
func (i EncryptionScopeMap) ToEncryptionScopeMapOutputWithContext(ctx context.Context) EncryptionScopeMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EncryptionScopeMapOutput)
}
type EncryptionScopeOutput struct{ *pulumi.OutputState }
func (EncryptionScopeOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EncryptionScope)(nil)).Elem()
}
func (o EncryptionScopeOutput) ToEncryptionScopeOutput() EncryptionScopeOutput {
return o
}
func (o EncryptionScopeOutput) ToEncryptionScopeOutputWithContext(ctx context.Context) EncryptionScopeOutput {
return o
}
// Is a secondary layer of encryption with Platform Managed Keys for data applied? Changing this forces a new resource to be created.
func (o EncryptionScopeOutput) InfrastructureEncryptionRequired() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EncryptionScope) pulumi.BoolPtrOutput { return v.InfrastructureEncryptionRequired }).(pulumi.BoolPtrOutput)
}
// The ID of the Key Vault Key. Required when `source` is `Microsoft.KeyVault`.
func (o EncryptionScopeOutput) KeyVaultKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EncryptionScope) pulumi.StringPtrOutput { return v.KeyVaultKeyId }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Storage Encryption Scope. Changing this forces a new Storage Encryption Scope to be created.
func (o EncryptionScopeOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *EncryptionScope) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The source of the Storage Encryption Scope. Possible values are `Microsoft.KeyVault` and `Microsoft.Storage`.
func (o EncryptionScopeOutput) Source() pulumi.StringOutput {
return o.ApplyT(func(v *EncryptionScope) pulumi.StringOutput { return v.Source }).(pulumi.StringOutput)
}
// The ID of the Storage Account where this Storage Encryption Scope is created. Changing this forces a new Storage Encryption Scope to be created.
func (o EncryptionScopeOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *EncryptionScope) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
type EncryptionScopeArrayOutput struct{ *pulumi.OutputState }
func (EncryptionScopeArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EncryptionScope)(nil)).Elem()
}
func (o EncryptionScopeArrayOutput) ToEncryptionScopeArrayOutput() EncryptionScopeArrayOutput {
return o
}
func (o EncryptionScopeArrayOutput) ToEncryptionScopeArrayOutputWithContext(ctx context.Context) EncryptionScopeArrayOutput {
return o
}
func (o EncryptionScopeArrayOutput) Index(i pulumi.IntInput) EncryptionScopeOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EncryptionScope {
return vs[0].([]*EncryptionScope)[vs[1].(int)]
}).(EncryptionScopeOutput)
}
type EncryptionScopeMapOutput struct{ *pulumi.OutputState }
func (EncryptionScopeMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EncryptionScope)(nil)).Elem()
}
func (o EncryptionScopeMapOutput) ToEncryptionScopeMapOutput() EncryptionScopeMapOutput {
return o
}
func (o EncryptionScopeMapOutput) ToEncryptionScopeMapOutputWithContext(ctx context.Context) EncryptionScopeMapOutput {
return o
}
func (o EncryptionScopeMapOutput) MapIndex(k pulumi.StringInput) EncryptionScopeOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EncryptionScope {
return vs[0].(map[string]*EncryptionScope)[vs[1].(string)]
}).(EncryptionScopeOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EncryptionScopeInput)(nil)).Elem(), &EncryptionScope{})
pulumi.RegisterInputType(reflect.TypeOf((*EncryptionScopeArrayInput)(nil)).Elem(), EncryptionScopeArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EncryptionScopeMapInput)(nil)).Elem(), EncryptionScopeMap{})
pulumi.RegisterOutputType(EncryptionScopeOutput{})
pulumi.RegisterOutputType(EncryptionScopeArrayOutput{})
pulumi.RegisterOutputType(EncryptionScopeMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/moverJobDefinition.go | sdk/go/azure/storage/moverJobDefinition.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Storage Mover Job Definition.
//
// ## 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/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
// }
// exampleMover, err := storage.NewMover(ctx, "example", &storage.MoverArgs{
// Name: pulumi.String("example-ssm"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleMoverAgent, err := storage.NewMoverAgent(ctx, "example", &storage.MoverAgentArgs{
// Name: pulumi.String("example-agent"),
// StorageMoverId: exampleMover.ID(),
// ArcVirtualMachineId: example.ID().ApplyT(func(id string) (string, error) {
// return fmt.Sprintf("%v/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName", id), nil
// }).(pulumi.StringOutput),
// ArcVirtualMachineUuid: pulumi.String("3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("examplesa"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// AllowNestedItemsToBePublic: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("acccontainer"),
// StorageAccountName: exampleAccount.Name,
// ContainerAccessType: pulumi.String("blob"),
// })
// if err != nil {
// return err
// }
// exampleMoverTargetEndpoint, err := storage.NewMoverTargetEndpoint(ctx, "example", &storage.MoverTargetEndpointArgs{
// Name: pulumi.String("example-smte"),
// StorageMoverId: exampleMover.ID(),
// StorageAccountId: exampleAccount.ID(),
// StorageContainerName: exampleContainer.Name,
// })
// if err != nil {
// return err
// }
// exampleMoverSourceEndpoint, err := storage.NewMoverSourceEndpoint(ctx, "example", &storage.MoverSourceEndpointArgs{
// Name: pulumi.String("example-smse"),
// StorageMoverId: exampleMover.ID(),
// Host: pulumi.String("192.168.0.1"),
// })
// if err != nil {
// return err
// }
// exampleMoverProject, err := storage.NewMoverProject(ctx, "example", &storage.MoverProjectArgs{
// Name: pulumi.String("example-sp"),
// StorageMoverId: exampleMover.ID(),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewMoverJobDefinition(ctx, "example", &storage.MoverJobDefinitionArgs{
// Name: pulumi.String("example-sjd"),
// StorageMoverProjectId: exampleMoverProject.ID(),
// AgentName: exampleMoverAgent.Name,
// CopyMode: pulumi.String("Additive"),
// SourceName: exampleMoverSourceEndpoint.Name,
// SourceSubPath: pulumi.String("/"),
// TargetName: exampleMoverTargetEndpoint.Name,
// TargetSubPath: pulumi.String("/"),
// Description: pulumi.String("Example Job Definition 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.StorageMover` - 2023-03-01
//
// ## Import
//
// Storage Mover Job Definition can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/moverJobDefinition:MoverJobDefinition example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.StorageMover/storageMovers/storageMover1/projects/project1/jobDefinitions/jobDefinition1
// ```
type MoverJobDefinition struct {
pulumi.CustomResourceState
// Specifies the name of the Storage Mover Agent to assign for new Job Runs of this Storage Mover Job Definition.
AgentName pulumi.StringPtrOutput `pulumi:"agentName"`
// Specifies the strategy to use for copy. Possible values are `Additive` and `Mirror`.
CopyMode pulumi.StringOutput `pulumi:"copyMode"`
// Specifies a description for this Storage Mover Job Definition.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the name which should be used for this Storage Mover Job Definition. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the name of the Storage Mover Source Endpoint. Changing this forces a new resource to be created.
SourceName pulumi.StringOutput `pulumi:"sourceName"`
// Specifies the sub path to use when reading from the Storage Mover Source Endpoint. Changing this forces a new resource to be created.
SourceSubPath pulumi.StringPtrOutput `pulumi:"sourceSubPath"`
// Specifies the ID of the Storage Mover Project. Changing this forces a new resource to be created.
StorageMoverProjectId pulumi.StringOutput `pulumi:"storageMoverProjectId"`
// Specifies the name of the Storage Mover target Endpoint. Changing this forces a new resource to be created.
TargetName pulumi.StringOutput `pulumi:"targetName"`
// Specifies the sub path to use when writing to the Storage Mover Target Endpoint. Changing this forces a new resource to be created.
TargetSubPath pulumi.StringPtrOutput `pulumi:"targetSubPath"`
}
// NewMoverJobDefinition registers a new resource with the given unique name, arguments, and options.
func NewMoverJobDefinition(ctx *pulumi.Context,
name string, args *MoverJobDefinitionArgs, opts ...pulumi.ResourceOption) (*MoverJobDefinition, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.CopyMode == nil {
return nil, errors.New("invalid value for required argument 'CopyMode'")
}
if args.SourceName == nil {
return nil, errors.New("invalid value for required argument 'SourceName'")
}
if args.StorageMoverProjectId == nil {
return nil, errors.New("invalid value for required argument 'StorageMoverProjectId'")
}
if args.TargetName == nil {
return nil, errors.New("invalid value for required argument 'TargetName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource MoverJobDefinition
err := ctx.RegisterResource("azure:storage/moverJobDefinition:MoverJobDefinition", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMoverJobDefinition gets an existing MoverJobDefinition resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetMoverJobDefinition(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MoverJobDefinitionState, opts ...pulumi.ResourceOption) (*MoverJobDefinition, error) {
var resource MoverJobDefinition
err := ctx.ReadResource("azure:storage/moverJobDefinition:MoverJobDefinition", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MoverJobDefinition resources.
type moverJobDefinitionState struct {
// Specifies the name of the Storage Mover Agent to assign for new Job Runs of this Storage Mover Job Definition.
AgentName *string `pulumi:"agentName"`
// Specifies the strategy to use for copy. Possible values are `Additive` and `Mirror`.
CopyMode *string `pulumi:"copyMode"`
// Specifies a description for this Storage Mover Job Definition.
Description *string `pulumi:"description"`
// Specifies the name which should be used for this Storage Mover Job Definition. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Storage Mover Source Endpoint. Changing this forces a new resource to be created.
SourceName *string `pulumi:"sourceName"`
// Specifies the sub path to use when reading from the Storage Mover Source Endpoint. Changing this forces a new resource to be created.
SourceSubPath *string `pulumi:"sourceSubPath"`
// Specifies the ID of the Storage Mover Project. Changing this forces a new resource to be created.
StorageMoverProjectId *string `pulumi:"storageMoverProjectId"`
// Specifies the name of the Storage Mover target Endpoint. Changing this forces a new resource to be created.
TargetName *string `pulumi:"targetName"`
// Specifies the sub path to use when writing to the Storage Mover Target Endpoint. Changing this forces a new resource to be created.
TargetSubPath *string `pulumi:"targetSubPath"`
}
type MoverJobDefinitionState struct {
// Specifies the name of the Storage Mover Agent to assign for new Job Runs of this Storage Mover Job Definition.
AgentName pulumi.StringPtrInput
// Specifies the strategy to use for copy. Possible values are `Additive` and `Mirror`.
CopyMode pulumi.StringPtrInput
// Specifies a description for this Storage Mover Job Definition.
Description pulumi.StringPtrInput
// Specifies the name which should be used for this Storage Mover Job Definition. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Storage Mover Source Endpoint. Changing this forces a new resource to be created.
SourceName pulumi.StringPtrInput
// Specifies the sub path to use when reading from the Storage Mover Source Endpoint. Changing this forces a new resource to be created.
SourceSubPath pulumi.StringPtrInput
// Specifies the ID of the Storage Mover Project. Changing this forces a new resource to be created.
StorageMoverProjectId pulumi.StringPtrInput
// Specifies the name of the Storage Mover target Endpoint. Changing this forces a new resource to be created.
TargetName pulumi.StringPtrInput
// Specifies the sub path to use when writing to the Storage Mover Target Endpoint. Changing this forces a new resource to be created.
TargetSubPath pulumi.StringPtrInput
}
func (MoverJobDefinitionState) ElementType() reflect.Type {
return reflect.TypeOf((*moverJobDefinitionState)(nil)).Elem()
}
type moverJobDefinitionArgs struct {
// Specifies the name of the Storage Mover Agent to assign for new Job Runs of this Storage Mover Job Definition.
AgentName *string `pulumi:"agentName"`
// Specifies the strategy to use for copy. Possible values are `Additive` and `Mirror`.
CopyMode string `pulumi:"copyMode"`
// Specifies a description for this Storage Mover Job Definition.
Description *string `pulumi:"description"`
// Specifies the name which should be used for this Storage Mover Job Definition. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Storage Mover Source Endpoint. Changing this forces a new resource to be created.
SourceName string `pulumi:"sourceName"`
// Specifies the sub path to use when reading from the Storage Mover Source Endpoint. Changing this forces a new resource to be created.
SourceSubPath *string `pulumi:"sourceSubPath"`
// Specifies the ID of the Storage Mover Project. Changing this forces a new resource to be created.
StorageMoverProjectId string `pulumi:"storageMoverProjectId"`
// Specifies the name of the Storage Mover target Endpoint. Changing this forces a new resource to be created.
TargetName string `pulumi:"targetName"`
// Specifies the sub path to use when writing to the Storage Mover Target Endpoint. Changing this forces a new resource to be created.
TargetSubPath *string `pulumi:"targetSubPath"`
}
// The set of arguments for constructing a MoverJobDefinition resource.
type MoverJobDefinitionArgs struct {
// Specifies the name of the Storage Mover Agent to assign for new Job Runs of this Storage Mover Job Definition.
AgentName pulumi.StringPtrInput
// Specifies the strategy to use for copy. Possible values are `Additive` and `Mirror`.
CopyMode pulumi.StringInput
// Specifies a description for this Storage Mover Job Definition.
Description pulumi.StringPtrInput
// Specifies the name which should be used for this Storage Mover Job Definition. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Storage Mover Source Endpoint. Changing this forces a new resource to be created.
SourceName pulumi.StringInput
// Specifies the sub path to use when reading from the Storage Mover Source Endpoint. Changing this forces a new resource to be created.
SourceSubPath pulumi.StringPtrInput
// Specifies the ID of the Storage Mover Project. Changing this forces a new resource to be created.
StorageMoverProjectId pulumi.StringInput
// Specifies the name of the Storage Mover target Endpoint. Changing this forces a new resource to be created.
TargetName pulumi.StringInput
// Specifies the sub path to use when writing to the Storage Mover Target Endpoint. Changing this forces a new resource to be created.
TargetSubPath pulumi.StringPtrInput
}
func (MoverJobDefinitionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*moverJobDefinitionArgs)(nil)).Elem()
}
type MoverJobDefinitionInput interface {
pulumi.Input
ToMoverJobDefinitionOutput() MoverJobDefinitionOutput
ToMoverJobDefinitionOutputWithContext(ctx context.Context) MoverJobDefinitionOutput
}
func (*MoverJobDefinition) ElementType() reflect.Type {
return reflect.TypeOf((**MoverJobDefinition)(nil)).Elem()
}
func (i *MoverJobDefinition) ToMoverJobDefinitionOutput() MoverJobDefinitionOutput {
return i.ToMoverJobDefinitionOutputWithContext(context.Background())
}
func (i *MoverJobDefinition) ToMoverJobDefinitionOutputWithContext(ctx context.Context) MoverJobDefinitionOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverJobDefinitionOutput)
}
// MoverJobDefinitionArrayInput is an input type that accepts MoverJobDefinitionArray and MoverJobDefinitionArrayOutput values.
// You can construct a concrete instance of `MoverJobDefinitionArrayInput` via:
//
// MoverJobDefinitionArray{ MoverJobDefinitionArgs{...} }
type MoverJobDefinitionArrayInput interface {
pulumi.Input
ToMoverJobDefinitionArrayOutput() MoverJobDefinitionArrayOutput
ToMoverJobDefinitionArrayOutputWithContext(context.Context) MoverJobDefinitionArrayOutput
}
type MoverJobDefinitionArray []MoverJobDefinitionInput
func (MoverJobDefinitionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MoverJobDefinition)(nil)).Elem()
}
func (i MoverJobDefinitionArray) ToMoverJobDefinitionArrayOutput() MoverJobDefinitionArrayOutput {
return i.ToMoverJobDefinitionArrayOutputWithContext(context.Background())
}
func (i MoverJobDefinitionArray) ToMoverJobDefinitionArrayOutputWithContext(ctx context.Context) MoverJobDefinitionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverJobDefinitionArrayOutput)
}
// MoverJobDefinitionMapInput is an input type that accepts MoverJobDefinitionMap and MoverJobDefinitionMapOutput values.
// You can construct a concrete instance of `MoverJobDefinitionMapInput` via:
//
// MoverJobDefinitionMap{ "key": MoverJobDefinitionArgs{...} }
type MoverJobDefinitionMapInput interface {
pulumi.Input
ToMoverJobDefinitionMapOutput() MoverJobDefinitionMapOutput
ToMoverJobDefinitionMapOutputWithContext(context.Context) MoverJobDefinitionMapOutput
}
type MoverJobDefinitionMap map[string]MoverJobDefinitionInput
func (MoverJobDefinitionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MoverJobDefinition)(nil)).Elem()
}
func (i MoverJobDefinitionMap) ToMoverJobDefinitionMapOutput() MoverJobDefinitionMapOutput {
return i.ToMoverJobDefinitionMapOutputWithContext(context.Background())
}
func (i MoverJobDefinitionMap) ToMoverJobDefinitionMapOutputWithContext(ctx context.Context) MoverJobDefinitionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverJobDefinitionMapOutput)
}
type MoverJobDefinitionOutput struct{ *pulumi.OutputState }
func (MoverJobDefinitionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MoverJobDefinition)(nil)).Elem()
}
func (o MoverJobDefinitionOutput) ToMoverJobDefinitionOutput() MoverJobDefinitionOutput {
return o
}
func (o MoverJobDefinitionOutput) ToMoverJobDefinitionOutputWithContext(ctx context.Context) MoverJobDefinitionOutput {
return o
}
// Specifies the name of the Storage Mover Agent to assign for new Job Runs of this Storage Mover Job Definition.
func (o MoverJobDefinitionOutput) AgentName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MoverJobDefinition) pulumi.StringPtrOutput { return v.AgentName }).(pulumi.StringPtrOutput)
}
// Specifies the strategy to use for copy. Possible values are `Additive` and `Mirror`.
func (o MoverJobDefinitionOutput) CopyMode() pulumi.StringOutput {
return o.ApplyT(func(v *MoverJobDefinition) pulumi.StringOutput { return v.CopyMode }).(pulumi.StringOutput)
}
// Specifies a description for this Storage Mover Job Definition.
func (o MoverJobDefinitionOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MoverJobDefinition) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the name which should be used for this Storage Mover Job Definition. Changing this forces a new resource to be created.
func (o MoverJobDefinitionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *MoverJobDefinition) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the name of the Storage Mover Source Endpoint. Changing this forces a new resource to be created.
func (o MoverJobDefinitionOutput) SourceName() pulumi.StringOutput {
return o.ApplyT(func(v *MoverJobDefinition) pulumi.StringOutput { return v.SourceName }).(pulumi.StringOutput)
}
// Specifies the sub path to use when reading from the Storage Mover Source Endpoint. Changing this forces a new resource to be created.
func (o MoverJobDefinitionOutput) SourceSubPath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MoverJobDefinition) pulumi.StringPtrOutput { return v.SourceSubPath }).(pulumi.StringPtrOutput)
}
// Specifies the ID of the Storage Mover Project. Changing this forces a new resource to be created.
func (o MoverJobDefinitionOutput) StorageMoverProjectId() pulumi.StringOutput {
return o.ApplyT(func(v *MoverJobDefinition) pulumi.StringOutput { return v.StorageMoverProjectId }).(pulumi.StringOutput)
}
// Specifies the name of the Storage Mover target Endpoint. Changing this forces a new resource to be created.
func (o MoverJobDefinitionOutput) TargetName() pulumi.StringOutput {
return o.ApplyT(func(v *MoverJobDefinition) pulumi.StringOutput { return v.TargetName }).(pulumi.StringOutput)
}
// Specifies the sub path to use when writing to the Storage Mover Target Endpoint. Changing this forces a new resource to be created.
func (o MoverJobDefinitionOutput) TargetSubPath() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MoverJobDefinition) pulumi.StringPtrOutput { return v.TargetSubPath }).(pulumi.StringPtrOutput)
}
type MoverJobDefinitionArrayOutput struct{ *pulumi.OutputState }
func (MoverJobDefinitionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MoverJobDefinition)(nil)).Elem()
}
func (o MoverJobDefinitionArrayOutput) ToMoverJobDefinitionArrayOutput() MoverJobDefinitionArrayOutput {
return o
}
func (o MoverJobDefinitionArrayOutput) ToMoverJobDefinitionArrayOutputWithContext(ctx context.Context) MoverJobDefinitionArrayOutput {
return o
}
func (o MoverJobDefinitionArrayOutput) Index(i pulumi.IntInput) MoverJobDefinitionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MoverJobDefinition {
return vs[0].([]*MoverJobDefinition)[vs[1].(int)]
}).(MoverJobDefinitionOutput)
}
type MoverJobDefinitionMapOutput struct{ *pulumi.OutputState }
func (MoverJobDefinitionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MoverJobDefinition)(nil)).Elem()
}
func (o MoverJobDefinitionMapOutput) ToMoverJobDefinitionMapOutput() MoverJobDefinitionMapOutput {
return o
}
func (o MoverJobDefinitionMapOutput) ToMoverJobDefinitionMapOutputWithContext(ctx context.Context) MoverJobDefinitionMapOutput {
return o
}
func (o MoverJobDefinitionMapOutput) MapIndex(k pulumi.StringInput) MoverJobDefinitionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MoverJobDefinition {
return vs[0].(map[string]*MoverJobDefinition)[vs[1].(string)]
}).(MoverJobDefinitionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MoverJobDefinitionInput)(nil)).Elem(), &MoverJobDefinition{})
pulumi.RegisterInputType(reflect.TypeOf((*MoverJobDefinitionArrayInput)(nil)).Elem(), MoverJobDefinitionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MoverJobDefinitionMapInput)(nil)).Elem(), MoverJobDefinitionMap{})
pulumi.RegisterOutputType(MoverJobDefinitionOutput{})
pulumi.RegisterOutputType(MoverJobDefinitionArrayOutput{})
pulumi.RegisterOutputType(MoverJobDefinitionMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/pulumiTypes.go | sdk/go/azure/storage/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 storage
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 AccountAzureFilesAuthentication struct {
// A `activeDirectory` block as defined below. Required when `directoryType` is `AD`.
ActiveDirectory *AccountAzureFilesAuthenticationActiveDirectory `pulumi:"activeDirectory"`
// Specifies the default share level permissions applied to all users. Possible values are `StorageFileDataSmbShareReader`, `StorageFileDataSmbShareContributor`, `StorageFileDataSmbShareElevatedContributor`, or `None`. Defaults to `None`.
DefaultShareLevelPermission *string `pulumi:"defaultShareLevelPermission"`
// Specifies the directory service used. Possible values are `AADDS`, `AD` and `AADKERB`.
DirectoryType string `pulumi:"directoryType"`
}
// AccountAzureFilesAuthenticationInput is an input type that accepts AccountAzureFilesAuthenticationArgs and AccountAzureFilesAuthenticationOutput values.
// You can construct a concrete instance of `AccountAzureFilesAuthenticationInput` via:
//
// AccountAzureFilesAuthenticationArgs{...}
type AccountAzureFilesAuthenticationInput interface {
pulumi.Input
ToAccountAzureFilesAuthenticationOutput() AccountAzureFilesAuthenticationOutput
ToAccountAzureFilesAuthenticationOutputWithContext(context.Context) AccountAzureFilesAuthenticationOutput
}
type AccountAzureFilesAuthenticationArgs struct {
// A `activeDirectory` block as defined below. Required when `directoryType` is `AD`.
ActiveDirectory AccountAzureFilesAuthenticationActiveDirectoryPtrInput `pulumi:"activeDirectory"`
// Specifies the default share level permissions applied to all users. Possible values are `StorageFileDataSmbShareReader`, `StorageFileDataSmbShareContributor`, `StorageFileDataSmbShareElevatedContributor`, or `None`. Defaults to `None`.
DefaultShareLevelPermission pulumi.StringPtrInput `pulumi:"defaultShareLevelPermission"`
// Specifies the directory service used. Possible values are `AADDS`, `AD` and `AADKERB`.
DirectoryType pulumi.StringInput `pulumi:"directoryType"`
}
func (AccountAzureFilesAuthenticationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountAzureFilesAuthentication)(nil)).Elem()
}
func (i AccountAzureFilesAuthenticationArgs) ToAccountAzureFilesAuthenticationOutput() AccountAzureFilesAuthenticationOutput {
return i.ToAccountAzureFilesAuthenticationOutputWithContext(context.Background())
}
func (i AccountAzureFilesAuthenticationArgs) ToAccountAzureFilesAuthenticationOutputWithContext(ctx context.Context) AccountAzureFilesAuthenticationOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountAzureFilesAuthenticationOutput)
}
func (i AccountAzureFilesAuthenticationArgs) ToAccountAzureFilesAuthenticationPtrOutput() AccountAzureFilesAuthenticationPtrOutput {
return i.ToAccountAzureFilesAuthenticationPtrOutputWithContext(context.Background())
}
func (i AccountAzureFilesAuthenticationArgs) ToAccountAzureFilesAuthenticationPtrOutputWithContext(ctx context.Context) AccountAzureFilesAuthenticationPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountAzureFilesAuthenticationOutput).ToAccountAzureFilesAuthenticationPtrOutputWithContext(ctx)
}
// AccountAzureFilesAuthenticationPtrInput is an input type that accepts AccountAzureFilesAuthenticationArgs, AccountAzureFilesAuthenticationPtr and AccountAzureFilesAuthenticationPtrOutput values.
// You can construct a concrete instance of `AccountAzureFilesAuthenticationPtrInput` via:
//
// AccountAzureFilesAuthenticationArgs{...}
//
// or:
//
// nil
type AccountAzureFilesAuthenticationPtrInput interface {
pulumi.Input
ToAccountAzureFilesAuthenticationPtrOutput() AccountAzureFilesAuthenticationPtrOutput
ToAccountAzureFilesAuthenticationPtrOutputWithContext(context.Context) AccountAzureFilesAuthenticationPtrOutput
}
type accountAzureFilesAuthenticationPtrType AccountAzureFilesAuthenticationArgs
func AccountAzureFilesAuthenticationPtr(v *AccountAzureFilesAuthenticationArgs) AccountAzureFilesAuthenticationPtrInput {
return (*accountAzureFilesAuthenticationPtrType)(v)
}
func (*accountAzureFilesAuthenticationPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AccountAzureFilesAuthentication)(nil)).Elem()
}
func (i *accountAzureFilesAuthenticationPtrType) ToAccountAzureFilesAuthenticationPtrOutput() AccountAzureFilesAuthenticationPtrOutput {
return i.ToAccountAzureFilesAuthenticationPtrOutputWithContext(context.Background())
}
func (i *accountAzureFilesAuthenticationPtrType) ToAccountAzureFilesAuthenticationPtrOutputWithContext(ctx context.Context) AccountAzureFilesAuthenticationPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountAzureFilesAuthenticationPtrOutput)
}
type AccountAzureFilesAuthenticationOutput struct{ *pulumi.OutputState }
func (AccountAzureFilesAuthenticationOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountAzureFilesAuthentication)(nil)).Elem()
}
func (o AccountAzureFilesAuthenticationOutput) ToAccountAzureFilesAuthenticationOutput() AccountAzureFilesAuthenticationOutput {
return o
}
func (o AccountAzureFilesAuthenticationOutput) ToAccountAzureFilesAuthenticationOutputWithContext(ctx context.Context) AccountAzureFilesAuthenticationOutput {
return o
}
func (o AccountAzureFilesAuthenticationOutput) ToAccountAzureFilesAuthenticationPtrOutput() AccountAzureFilesAuthenticationPtrOutput {
return o.ToAccountAzureFilesAuthenticationPtrOutputWithContext(context.Background())
}
func (o AccountAzureFilesAuthenticationOutput) ToAccountAzureFilesAuthenticationPtrOutputWithContext(ctx context.Context) AccountAzureFilesAuthenticationPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AccountAzureFilesAuthentication) *AccountAzureFilesAuthentication {
return &v
}).(AccountAzureFilesAuthenticationPtrOutput)
}
// A `activeDirectory` block as defined below. Required when `directoryType` is `AD`.
func (o AccountAzureFilesAuthenticationOutput) ActiveDirectory() AccountAzureFilesAuthenticationActiveDirectoryPtrOutput {
return o.ApplyT(func(v AccountAzureFilesAuthentication) *AccountAzureFilesAuthenticationActiveDirectory {
return v.ActiveDirectory
}).(AccountAzureFilesAuthenticationActiveDirectoryPtrOutput)
}
// Specifies the default share level permissions applied to all users. Possible values are `StorageFileDataSmbShareReader`, `StorageFileDataSmbShareContributor`, `StorageFileDataSmbShareElevatedContributor`, or `None`. Defaults to `None`.
func (o AccountAzureFilesAuthenticationOutput) DefaultShareLevelPermission() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountAzureFilesAuthentication) *string { return v.DefaultShareLevelPermission }).(pulumi.StringPtrOutput)
}
// Specifies the directory service used. Possible values are `AADDS`, `AD` and `AADKERB`.
func (o AccountAzureFilesAuthenticationOutput) DirectoryType() pulumi.StringOutput {
return o.ApplyT(func(v AccountAzureFilesAuthentication) string { return v.DirectoryType }).(pulumi.StringOutput)
}
type AccountAzureFilesAuthenticationPtrOutput struct{ *pulumi.OutputState }
func (AccountAzureFilesAuthenticationPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountAzureFilesAuthentication)(nil)).Elem()
}
func (o AccountAzureFilesAuthenticationPtrOutput) ToAccountAzureFilesAuthenticationPtrOutput() AccountAzureFilesAuthenticationPtrOutput {
return o
}
func (o AccountAzureFilesAuthenticationPtrOutput) ToAccountAzureFilesAuthenticationPtrOutputWithContext(ctx context.Context) AccountAzureFilesAuthenticationPtrOutput {
return o
}
func (o AccountAzureFilesAuthenticationPtrOutput) Elem() AccountAzureFilesAuthenticationOutput {
return o.ApplyT(func(v *AccountAzureFilesAuthentication) AccountAzureFilesAuthentication {
if v != nil {
return *v
}
var ret AccountAzureFilesAuthentication
return ret
}).(AccountAzureFilesAuthenticationOutput)
}
// A `activeDirectory` block as defined below. Required when `directoryType` is `AD`.
func (o AccountAzureFilesAuthenticationPtrOutput) ActiveDirectory() AccountAzureFilesAuthenticationActiveDirectoryPtrOutput {
return o.ApplyT(func(v *AccountAzureFilesAuthentication) *AccountAzureFilesAuthenticationActiveDirectory {
if v == nil {
return nil
}
return v.ActiveDirectory
}).(AccountAzureFilesAuthenticationActiveDirectoryPtrOutput)
}
// Specifies the default share level permissions applied to all users. Possible values are `StorageFileDataSmbShareReader`, `StorageFileDataSmbShareContributor`, `StorageFileDataSmbShareElevatedContributor`, or `None`. Defaults to `None`.
func (o AccountAzureFilesAuthenticationPtrOutput) DefaultShareLevelPermission() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountAzureFilesAuthentication) *string {
if v == nil {
return nil
}
return v.DefaultShareLevelPermission
}).(pulumi.StringPtrOutput)
}
// Specifies the directory service used. Possible values are `AADDS`, `AD` and `AADKERB`.
func (o AccountAzureFilesAuthenticationPtrOutput) DirectoryType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountAzureFilesAuthentication) *string {
if v == nil {
return nil
}
return &v.DirectoryType
}).(pulumi.StringPtrOutput)
}
type AccountAzureFilesAuthenticationActiveDirectory struct {
// Specifies the domain GUID.
DomainGuid string `pulumi:"domainGuid"`
// Specifies the primary domain that the AD DNS server is authoritative for.
DomainName string `pulumi:"domainName"`
// Specifies the security identifier (SID). This is required when `directoryType` is set to `AD`.
DomainSid *string `pulumi:"domainSid"`
// Specifies the Active Directory forest. This is required when `directoryType` is set to `AD`.
ForestName *string `pulumi:"forestName"`
// Specifies the NetBIOS domain name. This is required when `directoryType` is set to `AD`.
NetbiosDomainName *string `pulumi:"netbiosDomainName"`
// Specifies the security identifier (SID) for Azure Storage. This is required when `directoryType` is set to `AD`.
StorageSid *string `pulumi:"storageSid"`
}
// AccountAzureFilesAuthenticationActiveDirectoryInput is an input type that accepts AccountAzureFilesAuthenticationActiveDirectoryArgs and AccountAzureFilesAuthenticationActiveDirectoryOutput values.
// You can construct a concrete instance of `AccountAzureFilesAuthenticationActiveDirectoryInput` via:
//
// AccountAzureFilesAuthenticationActiveDirectoryArgs{...}
type AccountAzureFilesAuthenticationActiveDirectoryInput interface {
pulumi.Input
ToAccountAzureFilesAuthenticationActiveDirectoryOutput() AccountAzureFilesAuthenticationActiveDirectoryOutput
ToAccountAzureFilesAuthenticationActiveDirectoryOutputWithContext(context.Context) AccountAzureFilesAuthenticationActiveDirectoryOutput
}
type AccountAzureFilesAuthenticationActiveDirectoryArgs struct {
// Specifies the domain GUID.
DomainGuid pulumi.StringInput `pulumi:"domainGuid"`
// Specifies the primary domain that the AD DNS server is authoritative for.
DomainName pulumi.StringInput `pulumi:"domainName"`
// Specifies the security identifier (SID). This is required when `directoryType` is set to `AD`.
DomainSid pulumi.StringPtrInput `pulumi:"domainSid"`
// Specifies the Active Directory forest. This is required when `directoryType` is set to `AD`.
ForestName pulumi.StringPtrInput `pulumi:"forestName"`
// Specifies the NetBIOS domain name. This is required when `directoryType` is set to `AD`.
NetbiosDomainName pulumi.StringPtrInput `pulumi:"netbiosDomainName"`
// Specifies the security identifier (SID) for Azure Storage. This is required when `directoryType` is set to `AD`.
StorageSid pulumi.StringPtrInput `pulumi:"storageSid"`
}
func (AccountAzureFilesAuthenticationActiveDirectoryArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountAzureFilesAuthenticationActiveDirectory)(nil)).Elem()
}
func (i AccountAzureFilesAuthenticationActiveDirectoryArgs) ToAccountAzureFilesAuthenticationActiveDirectoryOutput() AccountAzureFilesAuthenticationActiveDirectoryOutput {
return i.ToAccountAzureFilesAuthenticationActiveDirectoryOutputWithContext(context.Background())
}
func (i AccountAzureFilesAuthenticationActiveDirectoryArgs) ToAccountAzureFilesAuthenticationActiveDirectoryOutputWithContext(ctx context.Context) AccountAzureFilesAuthenticationActiveDirectoryOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountAzureFilesAuthenticationActiveDirectoryOutput)
}
func (i AccountAzureFilesAuthenticationActiveDirectoryArgs) ToAccountAzureFilesAuthenticationActiveDirectoryPtrOutput() AccountAzureFilesAuthenticationActiveDirectoryPtrOutput {
return i.ToAccountAzureFilesAuthenticationActiveDirectoryPtrOutputWithContext(context.Background())
}
func (i AccountAzureFilesAuthenticationActiveDirectoryArgs) ToAccountAzureFilesAuthenticationActiveDirectoryPtrOutputWithContext(ctx context.Context) AccountAzureFilesAuthenticationActiveDirectoryPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountAzureFilesAuthenticationActiveDirectoryOutput).ToAccountAzureFilesAuthenticationActiveDirectoryPtrOutputWithContext(ctx)
}
// AccountAzureFilesAuthenticationActiveDirectoryPtrInput is an input type that accepts AccountAzureFilesAuthenticationActiveDirectoryArgs, AccountAzureFilesAuthenticationActiveDirectoryPtr and AccountAzureFilesAuthenticationActiveDirectoryPtrOutput values.
// You can construct a concrete instance of `AccountAzureFilesAuthenticationActiveDirectoryPtrInput` via:
//
// AccountAzureFilesAuthenticationActiveDirectoryArgs{...}
//
// or:
//
// nil
type AccountAzureFilesAuthenticationActiveDirectoryPtrInput interface {
pulumi.Input
ToAccountAzureFilesAuthenticationActiveDirectoryPtrOutput() AccountAzureFilesAuthenticationActiveDirectoryPtrOutput
ToAccountAzureFilesAuthenticationActiveDirectoryPtrOutputWithContext(context.Context) AccountAzureFilesAuthenticationActiveDirectoryPtrOutput
}
type accountAzureFilesAuthenticationActiveDirectoryPtrType AccountAzureFilesAuthenticationActiveDirectoryArgs
func AccountAzureFilesAuthenticationActiveDirectoryPtr(v *AccountAzureFilesAuthenticationActiveDirectoryArgs) AccountAzureFilesAuthenticationActiveDirectoryPtrInput {
return (*accountAzureFilesAuthenticationActiveDirectoryPtrType)(v)
}
func (*accountAzureFilesAuthenticationActiveDirectoryPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AccountAzureFilesAuthenticationActiveDirectory)(nil)).Elem()
}
func (i *accountAzureFilesAuthenticationActiveDirectoryPtrType) ToAccountAzureFilesAuthenticationActiveDirectoryPtrOutput() AccountAzureFilesAuthenticationActiveDirectoryPtrOutput {
return i.ToAccountAzureFilesAuthenticationActiveDirectoryPtrOutputWithContext(context.Background())
}
func (i *accountAzureFilesAuthenticationActiveDirectoryPtrType) ToAccountAzureFilesAuthenticationActiveDirectoryPtrOutputWithContext(ctx context.Context) AccountAzureFilesAuthenticationActiveDirectoryPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountAzureFilesAuthenticationActiveDirectoryPtrOutput)
}
type AccountAzureFilesAuthenticationActiveDirectoryOutput struct{ *pulumi.OutputState }
func (AccountAzureFilesAuthenticationActiveDirectoryOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountAzureFilesAuthenticationActiveDirectory)(nil)).Elem()
}
func (o AccountAzureFilesAuthenticationActiveDirectoryOutput) ToAccountAzureFilesAuthenticationActiveDirectoryOutput() AccountAzureFilesAuthenticationActiveDirectoryOutput {
return o
}
func (o AccountAzureFilesAuthenticationActiveDirectoryOutput) ToAccountAzureFilesAuthenticationActiveDirectoryOutputWithContext(ctx context.Context) AccountAzureFilesAuthenticationActiveDirectoryOutput {
return o
}
func (o AccountAzureFilesAuthenticationActiveDirectoryOutput) ToAccountAzureFilesAuthenticationActiveDirectoryPtrOutput() AccountAzureFilesAuthenticationActiveDirectoryPtrOutput {
return o.ToAccountAzureFilesAuthenticationActiveDirectoryPtrOutputWithContext(context.Background())
}
func (o AccountAzureFilesAuthenticationActiveDirectoryOutput) ToAccountAzureFilesAuthenticationActiveDirectoryPtrOutputWithContext(ctx context.Context) AccountAzureFilesAuthenticationActiveDirectoryPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AccountAzureFilesAuthenticationActiveDirectory) *AccountAzureFilesAuthenticationActiveDirectory {
return &v
}).(AccountAzureFilesAuthenticationActiveDirectoryPtrOutput)
}
// Specifies the domain GUID.
func (o AccountAzureFilesAuthenticationActiveDirectoryOutput) DomainGuid() pulumi.StringOutput {
return o.ApplyT(func(v AccountAzureFilesAuthenticationActiveDirectory) string { return v.DomainGuid }).(pulumi.StringOutput)
}
// Specifies the primary domain that the AD DNS server is authoritative for.
func (o AccountAzureFilesAuthenticationActiveDirectoryOutput) DomainName() pulumi.StringOutput {
return o.ApplyT(func(v AccountAzureFilesAuthenticationActiveDirectory) string { return v.DomainName }).(pulumi.StringOutput)
}
// Specifies the security identifier (SID). This is required when `directoryType` is set to `AD`.
func (o AccountAzureFilesAuthenticationActiveDirectoryOutput) DomainSid() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountAzureFilesAuthenticationActiveDirectory) *string { return v.DomainSid }).(pulumi.StringPtrOutput)
}
// Specifies the Active Directory forest. This is required when `directoryType` is set to `AD`.
func (o AccountAzureFilesAuthenticationActiveDirectoryOutput) ForestName() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountAzureFilesAuthenticationActiveDirectory) *string { return v.ForestName }).(pulumi.StringPtrOutput)
}
// Specifies the NetBIOS domain name. This is required when `directoryType` is set to `AD`.
func (o AccountAzureFilesAuthenticationActiveDirectoryOutput) NetbiosDomainName() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountAzureFilesAuthenticationActiveDirectory) *string { return v.NetbiosDomainName }).(pulumi.StringPtrOutput)
}
// Specifies the security identifier (SID) for Azure Storage. This is required when `directoryType` is set to `AD`.
func (o AccountAzureFilesAuthenticationActiveDirectoryOutput) StorageSid() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountAzureFilesAuthenticationActiveDirectory) *string { return v.StorageSid }).(pulumi.StringPtrOutput)
}
type AccountAzureFilesAuthenticationActiveDirectoryPtrOutput struct{ *pulumi.OutputState }
func (AccountAzureFilesAuthenticationActiveDirectoryPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountAzureFilesAuthenticationActiveDirectory)(nil)).Elem()
}
func (o AccountAzureFilesAuthenticationActiveDirectoryPtrOutput) ToAccountAzureFilesAuthenticationActiveDirectoryPtrOutput() AccountAzureFilesAuthenticationActiveDirectoryPtrOutput {
return o
}
func (o AccountAzureFilesAuthenticationActiveDirectoryPtrOutput) ToAccountAzureFilesAuthenticationActiveDirectoryPtrOutputWithContext(ctx context.Context) AccountAzureFilesAuthenticationActiveDirectoryPtrOutput {
return o
}
func (o AccountAzureFilesAuthenticationActiveDirectoryPtrOutput) Elem() AccountAzureFilesAuthenticationActiveDirectoryOutput {
return o.ApplyT(func(v *AccountAzureFilesAuthenticationActiveDirectory) AccountAzureFilesAuthenticationActiveDirectory {
if v != nil {
return *v
}
var ret AccountAzureFilesAuthenticationActiveDirectory
return ret
}).(AccountAzureFilesAuthenticationActiveDirectoryOutput)
}
// Specifies the domain GUID.
func (o AccountAzureFilesAuthenticationActiveDirectoryPtrOutput) DomainGuid() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountAzureFilesAuthenticationActiveDirectory) *string {
if v == nil {
return nil
}
return &v.DomainGuid
}).(pulumi.StringPtrOutput)
}
// Specifies the primary domain that the AD DNS server is authoritative for.
func (o AccountAzureFilesAuthenticationActiveDirectoryPtrOutput) DomainName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountAzureFilesAuthenticationActiveDirectory) *string {
if v == nil {
return nil
}
return &v.DomainName
}).(pulumi.StringPtrOutput)
}
// Specifies the security identifier (SID). This is required when `directoryType` is set to `AD`.
func (o AccountAzureFilesAuthenticationActiveDirectoryPtrOutput) DomainSid() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountAzureFilesAuthenticationActiveDirectory) *string {
if v == nil {
return nil
}
return v.DomainSid
}).(pulumi.StringPtrOutput)
}
// Specifies the Active Directory forest. This is required when `directoryType` is set to `AD`.
func (o AccountAzureFilesAuthenticationActiveDirectoryPtrOutput) ForestName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountAzureFilesAuthenticationActiveDirectory) *string {
if v == nil {
return nil
}
return v.ForestName
}).(pulumi.StringPtrOutput)
}
// Specifies the NetBIOS domain name. This is required when `directoryType` is set to `AD`.
func (o AccountAzureFilesAuthenticationActiveDirectoryPtrOutput) NetbiosDomainName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountAzureFilesAuthenticationActiveDirectory) *string {
if v == nil {
return nil
}
return v.NetbiosDomainName
}).(pulumi.StringPtrOutput)
}
// Specifies the security identifier (SID) for Azure Storage. This is required when `directoryType` is set to `AD`.
func (o AccountAzureFilesAuthenticationActiveDirectoryPtrOutput) StorageSid() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountAzureFilesAuthenticationActiveDirectory) *string {
if v == nil {
return nil
}
return v.StorageSid
}).(pulumi.StringPtrOutput)
}
type AccountBlobProperties struct {
// Is the blob service properties for change feed events enabled? Default to `false`.
//
// > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
ChangeFeedEnabled *bool `pulumi:"changeFeedEnabled"`
// The duration of change feed events retention in days. The possible values are between 1 and 146000 days (400 years). Setting this to null (or omit this in the configuration file) indicates an infinite retention of the change feed.
//
// > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
ChangeFeedRetentionInDays *int `pulumi:"changeFeedRetentionInDays"`
// A `containerDeleteRetentionPolicy` block as defined below.
ContainerDeleteRetentionPolicy *AccountBlobPropertiesContainerDeleteRetentionPolicy `pulumi:"containerDeleteRetentionPolicy"`
// A `corsRule` block as defined below.
CorsRules []AccountBlobPropertiesCorsRule `pulumi:"corsRules"`
// The API Version which should be used by default for requests to the Data Plane API if an incoming request doesn't specify an API Version.
DefaultServiceVersion *string `pulumi:"defaultServiceVersion"`
// A `deleteRetentionPolicy` block as defined below.
DeleteRetentionPolicy *AccountBlobPropertiesDeleteRetentionPolicy `pulumi:"deleteRetentionPolicy"`
// Is the last access time based tracking enabled? Default to `false`.
//
// > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
LastAccessTimeEnabled *bool `pulumi:"lastAccessTimeEnabled"`
// A `restorePolicy` block as defined below. This must be used together with `deleteRetentionPolicy` set, `versioningEnabled` and `changeFeedEnabled` set to `true`.
//
// > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
//
// > **Note:** `restorePolicy` can not be configured when `dnsEndpointType` is `AzureDnsZone`.
RestorePolicy *AccountBlobPropertiesRestorePolicy `pulumi:"restorePolicy"`
// Is versioning enabled? Default to `false`.
//
// > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
VersioningEnabled *bool `pulumi:"versioningEnabled"`
}
// AccountBlobPropertiesInput is an input type that accepts AccountBlobPropertiesArgs and AccountBlobPropertiesOutput values.
// You can construct a concrete instance of `AccountBlobPropertiesInput` via:
//
// AccountBlobPropertiesArgs{...}
type AccountBlobPropertiesInput interface {
pulumi.Input
ToAccountBlobPropertiesOutput() AccountBlobPropertiesOutput
ToAccountBlobPropertiesOutputWithContext(context.Context) AccountBlobPropertiesOutput
}
type AccountBlobPropertiesArgs struct {
// Is the blob service properties for change feed events enabled? Default to `false`.
//
// > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
ChangeFeedEnabled pulumi.BoolPtrInput `pulumi:"changeFeedEnabled"`
// The duration of change feed events retention in days. The possible values are between 1 and 146000 days (400 years). Setting this to null (or omit this in the configuration file) indicates an infinite retention of the change feed.
//
// > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
ChangeFeedRetentionInDays pulumi.IntPtrInput `pulumi:"changeFeedRetentionInDays"`
// A `containerDeleteRetentionPolicy` block as defined below.
ContainerDeleteRetentionPolicy AccountBlobPropertiesContainerDeleteRetentionPolicyPtrInput `pulumi:"containerDeleteRetentionPolicy"`
// A `corsRule` block as defined below.
CorsRules AccountBlobPropertiesCorsRuleArrayInput `pulumi:"corsRules"`
// The API Version which should be used by default for requests to the Data Plane API if an incoming request doesn't specify an API Version.
DefaultServiceVersion pulumi.StringPtrInput `pulumi:"defaultServiceVersion"`
// A `deleteRetentionPolicy` block as defined below.
DeleteRetentionPolicy AccountBlobPropertiesDeleteRetentionPolicyPtrInput `pulumi:"deleteRetentionPolicy"`
// Is the last access time based tracking enabled? Default to `false`.
//
// > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
LastAccessTimeEnabled pulumi.BoolPtrInput `pulumi:"lastAccessTimeEnabled"`
// A `restorePolicy` block as defined below. This must be used together with `deleteRetentionPolicy` set, `versioningEnabled` and `changeFeedEnabled` set to `true`.
//
// > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
//
// > **Note:** `restorePolicy` can not be configured when `dnsEndpointType` is `AzureDnsZone`.
RestorePolicy AccountBlobPropertiesRestorePolicyPtrInput `pulumi:"restorePolicy"`
// Is versioning enabled? Default to `false`.
//
// > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
VersioningEnabled pulumi.BoolPtrInput `pulumi:"versioningEnabled"`
}
func (AccountBlobPropertiesArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AccountBlobProperties)(nil)).Elem()
}
func (i AccountBlobPropertiesArgs) ToAccountBlobPropertiesOutput() AccountBlobPropertiesOutput {
return i.ToAccountBlobPropertiesOutputWithContext(context.Background())
}
func (i AccountBlobPropertiesArgs) ToAccountBlobPropertiesOutputWithContext(ctx context.Context) AccountBlobPropertiesOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountBlobPropertiesOutput)
}
func (i AccountBlobPropertiesArgs) ToAccountBlobPropertiesPtrOutput() AccountBlobPropertiesPtrOutput {
return i.ToAccountBlobPropertiesPtrOutputWithContext(context.Background())
}
func (i AccountBlobPropertiesArgs) ToAccountBlobPropertiesPtrOutputWithContext(ctx context.Context) AccountBlobPropertiesPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountBlobPropertiesOutput).ToAccountBlobPropertiesPtrOutputWithContext(ctx)
}
// AccountBlobPropertiesPtrInput is an input type that accepts AccountBlobPropertiesArgs, AccountBlobPropertiesPtr and AccountBlobPropertiesPtrOutput values.
// You can construct a concrete instance of `AccountBlobPropertiesPtrInput` via:
//
// AccountBlobPropertiesArgs{...}
//
// or:
//
// nil
type AccountBlobPropertiesPtrInput interface {
pulumi.Input
ToAccountBlobPropertiesPtrOutput() AccountBlobPropertiesPtrOutput
ToAccountBlobPropertiesPtrOutputWithContext(context.Context) AccountBlobPropertiesPtrOutput
}
type accountBlobPropertiesPtrType AccountBlobPropertiesArgs
func AccountBlobPropertiesPtr(v *AccountBlobPropertiesArgs) AccountBlobPropertiesPtrInput {
return (*accountBlobPropertiesPtrType)(v)
}
func (*accountBlobPropertiesPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**AccountBlobProperties)(nil)).Elem()
}
func (i *accountBlobPropertiesPtrType) ToAccountBlobPropertiesPtrOutput() AccountBlobPropertiesPtrOutput {
return i.ToAccountBlobPropertiesPtrOutputWithContext(context.Background())
}
func (i *accountBlobPropertiesPtrType) ToAccountBlobPropertiesPtrOutputWithContext(ctx context.Context) AccountBlobPropertiesPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountBlobPropertiesPtrOutput)
}
type AccountBlobPropertiesOutput struct{ *pulumi.OutputState }
func (AccountBlobPropertiesOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AccountBlobProperties)(nil)).Elem()
}
func (o AccountBlobPropertiesOutput) ToAccountBlobPropertiesOutput() AccountBlobPropertiesOutput {
return o
}
func (o AccountBlobPropertiesOutput) ToAccountBlobPropertiesOutputWithContext(ctx context.Context) AccountBlobPropertiesOutput {
return o
}
func (o AccountBlobPropertiesOutput) ToAccountBlobPropertiesPtrOutput() AccountBlobPropertiesPtrOutput {
return o.ToAccountBlobPropertiesPtrOutputWithContext(context.Background())
}
func (o AccountBlobPropertiesOutput) ToAccountBlobPropertiesPtrOutputWithContext(ctx context.Context) AccountBlobPropertiesPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v AccountBlobProperties) *AccountBlobProperties {
return &v
}).(AccountBlobPropertiesPtrOutput)
}
// Is the blob service properties for change feed events enabled? Default to `false`.
//
// > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
func (o AccountBlobPropertiesOutput) ChangeFeedEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v AccountBlobProperties) *bool { return v.ChangeFeedEnabled }).(pulumi.BoolPtrOutput)
}
// The duration of change feed events retention in days. The possible values are between 1 and 146000 days (400 years). Setting this to null (or omit this in the configuration file) indicates an infinite retention of the change feed.
//
// > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
func (o AccountBlobPropertiesOutput) ChangeFeedRetentionInDays() pulumi.IntPtrOutput {
return o.ApplyT(func(v AccountBlobProperties) *int { return v.ChangeFeedRetentionInDays }).(pulumi.IntPtrOutput)
}
// A `containerDeleteRetentionPolicy` block as defined below.
func (o AccountBlobPropertiesOutput) ContainerDeleteRetentionPolicy() AccountBlobPropertiesContainerDeleteRetentionPolicyPtrOutput {
return o.ApplyT(func(v AccountBlobProperties) *AccountBlobPropertiesContainerDeleteRetentionPolicy {
return v.ContainerDeleteRetentionPolicy
}).(AccountBlobPropertiesContainerDeleteRetentionPolicyPtrOutput)
}
// A `corsRule` block as defined below.
func (o AccountBlobPropertiesOutput) CorsRules() AccountBlobPropertiesCorsRuleArrayOutput {
return o.ApplyT(func(v AccountBlobProperties) []AccountBlobPropertiesCorsRule { return v.CorsRules }).(AccountBlobPropertiesCorsRuleArrayOutput)
}
// The API Version which should be used by default for requests to the Data Plane API if an incoming request doesn't specify an API Version.
func (o AccountBlobPropertiesOutput) DefaultServiceVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v AccountBlobProperties) *string { return v.DefaultServiceVersion }).(pulumi.StringPtrOutput)
}
// A `deleteRetentionPolicy` block as defined below.
func (o AccountBlobPropertiesOutput) DeleteRetentionPolicy() AccountBlobPropertiesDeleteRetentionPolicyPtrOutput {
return o.ApplyT(func(v AccountBlobProperties) *AccountBlobPropertiesDeleteRetentionPolicy {
return v.DeleteRetentionPolicy
}).(AccountBlobPropertiesDeleteRetentionPolicyPtrOutput)
}
// Is the last access time based tracking enabled? Default to `false`.
//
// > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
func (o AccountBlobPropertiesOutput) LastAccessTimeEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v AccountBlobProperties) *bool { return v.LastAccessTimeEnabled }).(pulumi.BoolPtrOutput)
}
// A `restorePolicy` block as defined below. This must be used together with `deleteRetentionPolicy` set, `versioningEnabled` and `changeFeedEnabled` set to `true`.
//
// > **Note:** This field cannot be configured when `kind` is set to `Storage` (V1).
//
| 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/storage/sync.go | sdk/go/azure/storage/sync.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Storage Sync.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/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 = storage.NewSync(ctx, "example", &storage.SyncArgs{
// Name: pulumi.String("example-storage-sync"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// Tags: pulumi.StringMap{
// "foo": pulumi.String("bar"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.StorageSync` - 2020-03-01
//
// ## Import
//
// Storage Syncs can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/sync:Sync example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageSync/storageSyncServices/sync1
// ```
type Sync struct {
pulumi.CustomResourceState
// Incoming traffic policy. Possible values are `AllowAllTraffic` and `AllowVirtualNetworksOnly`. Defaults to `AllowAllTraffic`.
IncomingTrafficPolicy pulumi.StringPtrOutput `pulumi:"incomingTrafficPolicy"`
// The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
Name pulumi.StringOutput `pulumi:"name"`
// A list of registered servers owned by this Storage Sync.
RegisteredServers pulumi.StringArrayOutput `pulumi:"registeredServers"`
// The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Storage Sync.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewSync registers a new resource with the given unique name, arguments, and options.
func NewSync(ctx *pulumi.Context,
name string, args *SyncArgs, opts ...pulumi.ResourceOption) (*Sync, 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 Sync
err := ctx.RegisterResource("azure:storage/sync:Sync", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSync gets an existing Sync resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSync(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SyncState, opts ...pulumi.ResourceOption) (*Sync, error) {
var resource Sync
err := ctx.ReadResource("azure:storage/sync:Sync", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Sync resources.
type syncState struct {
// Incoming traffic policy. Possible values are `AllowAllTraffic` and `AllowVirtualNetworksOnly`. Defaults to `AllowAllTraffic`.
IncomingTrafficPolicy *string `pulumi:"incomingTrafficPolicy"`
// The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
Name *string `pulumi:"name"`
// A list of registered servers owned by this Storage Sync.
RegisteredServers []string `pulumi:"registeredServers"`
// The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Storage Sync.
Tags map[string]string `pulumi:"tags"`
}
type SyncState struct {
// Incoming traffic policy. Possible values are `AllowAllTraffic` and `AllowVirtualNetworksOnly`. Defaults to `AllowAllTraffic`.
IncomingTrafficPolicy pulumi.StringPtrInput
// The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
Name pulumi.StringPtrInput
// A list of registered servers owned by this Storage Sync.
RegisteredServers pulumi.StringArrayInput
// The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Storage Sync.
Tags pulumi.StringMapInput
}
func (SyncState) ElementType() reflect.Type {
return reflect.TypeOf((*syncState)(nil)).Elem()
}
type syncArgs struct {
// Incoming traffic policy. Possible values are `AllowAllTraffic` and `AllowVirtualNetworksOnly`. Defaults to `AllowAllTraffic`.
IncomingTrafficPolicy *string `pulumi:"incomingTrafficPolicy"`
// The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Storage Sync.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Sync resource.
type SyncArgs struct {
// Incoming traffic policy. Possible values are `AllowAllTraffic` and `AllowVirtualNetworksOnly`. Defaults to `AllowAllTraffic`.
IncomingTrafficPolicy pulumi.StringPtrInput
// The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Storage Sync.
Tags pulumi.StringMapInput
}
func (SyncArgs) ElementType() reflect.Type {
return reflect.TypeOf((*syncArgs)(nil)).Elem()
}
type SyncInput interface {
pulumi.Input
ToSyncOutput() SyncOutput
ToSyncOutputWithContext(ctx context.Context) SyncOutput
}
func (*Sync) ElementType() reflect.Type {
return reflect.TypeOf((**Sync)(nil)).Elem()
}
func (i *Sync) ToSyncOutput() SyncOutput {
return i.ToSyncOutputWithContext(context.Background())
}
func (i *Sync) ToSyncOutputWithContext(ctx context.Context) SyncOutput {
return pulumi.ToOutputWithContext(ctx, i).(SyncOutput)
}
// SyncArrayInput is an input type that accepts SyncArray and SyncArrayOutput values.
// You can construct a concrete instance of `SyncArrayInput` via:
//
// SyncArray{ SyncArgs{...} }
type SyncArrayInput interface {
pulumi.Input
ToSyncArrayOutput() SyncArrayOutput
ToSyncArrayOutputWithContext(context.Context) SyncArrayOutput
}
type SyncArray []SyncInput
func (SyncArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Sync)(nil)).Elem()
}
func (i SyncArray) ToSyncArrayOutput() SyncArrayOutput {
return i.ToSyncArrayOutputWithContext(context.Background())
}
func (i SyncArray) ToSyncArrayOutputWithContext(ctx context.Context) SyncArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SyncArrayOutput)
}
// SyncMapInput is an input type that accepts SyncMap and SyncMapOutput values.
// You can construct a concrete instance of `SyncMapInput` via:
//
// SyncMap{ "key": SyncArgs{...} }
type SyncMapInput interface {
pulumi.Input
ToSyncMapOutput() SyncMapOutput
ToSyncMapOutputWithContext(context.Context) SyncMapOutput
}
type SyncMap map[string]SyncInput
func (SyncMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Sync)(nil)).Elem()
}
func (i SyncMap) ToSyncMapOutput() SyncMapOutput {
return i.ToSyncMapOutputWithContext(context.Background())
}
func (i SyncMap) ToSyncMapOutputWithContext(ctx context.Context) SyncMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SyncMapOutput)
}
type SyncOutput struct{ *pulumi.OutputState }
func (SyncOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Sync)(nil)).Elem()
}
func (o SyncOutput) ToSyncOutput() SyncOutput {
return o
}
func (o SyncOutput) ToSyncOutputWithContext(ctx context.Context) SyncOutput {
return o
}
// Incoming traffic policy. Possible values are `AllowAllTraffic` and `AllowVirtualNetworksOnly`. Defaults to `AllowAllTraffic`.
func (o SyncOutput) IncomingTrafficPolicy() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Sync) pulumi.StringPtrOutput { return v.IncomingTrafficPolicy }).(pulumi.StringPtrOutput)
}
// The Azure Region where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
func (o SyncOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Sync) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Storage Sync. Changing this forces a new Storage Sync to be created.
func (o SyncOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Sync) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// A list of registered servers owned by this Storage Sync.
func (o SyncOutput) RegisteredServers() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Sync) pulumi.StringArrayOutput { return v.RegisteredServers }).(pulumi.StringArrayOutput)
}
// The name of the Resource Group where the Storage Sync should exist. Changing this forces a new Storage Sync to be created.
func (o SyncOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Sync) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Storage Sync.
func (o SyncOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Sync) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type SyncArrayOutput struct{ *pulumi.OutputState }
func (SyncArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Sync)(nil)).Elem()
}
func (o SyncArrayOutput) ToSyncArrayOutput() SyncArrayOutput {
return o
}
func (o SyncArrayOutput) ToSyncArrayOutputWithContext(ctx context.Context) SyncArrayOutput {
return o
}
func (o SyncArrayOutput) Index(i pulumi.IntInput) SyncOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Sync {
return vs[0].([]*Sync)[vs[1].(int)]
}).(SyncOutput)
}
type SyncMapOutput struct{ *pulumi.OutputState }
func (SyncMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Sync)(nil)).Elem()
}
func (o SyncMapOutput) ToSyncMapOutput() SyncMapOutput {
return o
}
func (o SyncMapOutput) ToSyncMapOutputWithContext(ctx context.Context) SyncMapOutput {
return o
}
func (o SyncMapOutput) MapIndex(k pulumi.StringInput) SyncOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Sync {
return vs[0].(map[string]*Sync)[vs[1].(string)]
}).(SyncOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SyncInput)(nil)).Elem(), &Sync{})
pulumi.RegisterInputType(reflect.TypeOf((*SyncArrayInput)(nil)).Elem(), SyncArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SyncMapInput)(nil)).Elem(), SyncMap{})
pulumi.RegisterOutputType(SyncOutput{})
pulumi.RegisterOutputType(SyncArrayOutput{})
pulumi.RegisterOutputType(SyncMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/syncServerEndpoint.go | sdk/go/azure/storage/syncServerEndpoint.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Storage Sync Server Endpoint.
//
// > **Note:** The parent `storage.SyncGroup` must have an `storage.SyncCloudEndpoint` available before an `storage.SyncServerEndpoint` resource can be created.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/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
// }
// exampleSync, err := storage.NewSync(ctx, "example", &storage.SyncArgs{
// Name: pulumi.String("example-storage-sync"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleSyncGroup, err := storage.NewSyncGroup(ctx, "example", &storage.SyncGroupArgs{
// Name: pulumi.String("example-storage-sync-group"),
// StorageSyncId: exampleSync.ID(),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("example-storage-account"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleShare, err := storage.NewShare(ctx, "example", &storage.ShareArgs{
// Name: pulumi.String("example-storage-share"),
// StorageAccountName: exampleAccount.Name,
// Quota: pulumi.Int(1),
// Acls: storage.ShareAclArray{
// &storage.ShareAclArgs{
// Id: pulumi.String("GhostedRecall"),
// AccessPolicies: storage.ShareAclAccessPolicyArray{
// &storage.ShareAclAccessPolicyArgs{
// Permissions: pulumi.String("r"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleSyncCloudEndpoint, err := storage.NewSyncCloudEndpoint(ctx, "example", &storage.SyncCloudEndpointArgs{
// Name: pulumi.String("example-ss-ce"),
// StorageSyncGroupId: exampleSyncGroup.ID(),
// FileShareName: exampleShare.Name,
// StorageAccountId: exampleAccount.ID(),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewSyncServerEndpoint(ctx, "example", &storage.SyncServerEndpointArgs{
// Name: pulumi.String("example-storage-sync-server-endpoint"),
// StorageSyncGroupId: exampleSyncGroup.ID(),
// RegisteredServerId: exampleSync.RegisteredServers.ApplyT(func(registeredServers []string) (string, error) {
// return registeredServers[0], nil
// }).(pulumi.StringOutput),
// }, pulumi.DependsOn([]pulumi.Resource{
// exampleSyncCloudEndpoint,
// }))
// 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.StorageSync` - 2020-03-01
//
// ## Import
//
// Storage Sync Server Endpoints can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/syncServerEndpoint:SyncServerEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageSync/storageSyncServices/sync1/syncGroups/syncGroup1/serverEndpoints/endpoint1
// ```
type SyncServerEndpoint struct {
pulumi.CustomResourceState
// Is Cloud Tiering Enabled? Defaults to `false`.
CloudTieringEnabled pulumi.BoolPtrOutput `pulumi:"cloudTieringEnabled"`
// Specifies how the server initially downloads the Azure file share data. Valid Values includes `NamespaceThenModifiedFiles`, `NamespaceOnly`, and `AvoidTieredFiles`. Defaults to `NamespaceThenModifiedFiles`. Changing this forces a new resource to be created.
InitialDownloadPolicy pulumi.StringPtrOutput `pulumi:"initialDownloadPolicy"`
// Specifies how to handle the local cache. Valid Values include `UpdateLocallyCachedFiles` and `DownloadNewAndModifiedFiles`. Defaults to `UpdateLocallyCachedFiles`.
LocalCacheMode pulumi.StringPtrOutput `pulumi:"localCacheMode"`
// The name which should be used for this Storage Sync. Changing this forces a new Storage Sync Server Endpoint to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Registered Server that will be associate with the Storage Sync Server Endpoint. Changing this forces a new Storage Sync Server Endpoint to be created.
//
// > **Note:** The target server must already be registered with the parent `storage.Sync` prior to creating this endpoint. For more information on registering a server see the [Microsoft documentation](https://learn.microsoft.com/azure/storage/file-sync/file-sync-server-registration)
RegisteredServerId pulumi.StringOutput `pulumi:"registeredServerId"`
// The path on the Windows Server to be synced to the Azure file share. Changing this forces a new Storage Sync Server Endpoint to be created.
ServerLocalPath pulumi.StringOutput `pulumi:"serverLocalPath"`
// The ID of the Storage Sync Group where the Storage Sync Server Endpoint should exist. Changing this forces a new Storage Sync Server Endpoint to be created.
StorageSyncGroupId pulumi.StringOutput `pulumi:"storageSyncGroupId"`
// Files older than the specified age will be tiered to the cloud.
TierFilesOlderThanDays pulumi.IntPtrOutput `pulumi:"tierFilesOlderThanDays"`
// What percentage of free space on the volume should be preserved? Defaults to `20`.
VolumeFreeSpacePercent pulumi.IntPtrOutput `pulumi:"volumeFreeSpacePercent"`
}
// NewSyncServerEndpoint registers a new resource with the given unique name, arguments, and options.
func NewSyncServerEndpoint(ctx *pulumi.Context,
name string, args *SyncServerEndpointArgs, opts ...pulumi.ResourceOption) (*SyncServerEndpoint, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.RegisteredServerId == nil {
return nil, errors.New("invalid value for required argument 'RegisteredServerId'")
}
if args.ServerLocalPath == nil {
return nil, errors.New("invalid value for required argument 'ServerLocalPath'")
}
if args.StorageSyncGroupId == nil {
return nil, errors.New("invalid value for required argument 'StorageSyncGroupId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SyncServerEndpoint
err := ctx.RegisterResource("azure:storage/syncServerEndpoint:SyncServerEndpoint", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSyncServerEndpoint gets an existing SyncServerEndpoint resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSyncServerEndpoint(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SyncServerEndpointState, opts ...pulumi.ResourceOption) (*SyncServerEndpoint, error) {
var resource SyncServerEndpoint
err := ctx.ReadResource("azure:storage/syncServerEndpoint:SyncServerEndpoint", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SyncServerEndpoint resources.
type syncServerEndpointState struct {
// Is Cloud Tiering Enabled? Defaults to `false`.
CloudTieringEnabled *bool `pulumi:"cloudTieringEnabled"`
// Specifies how the server initially downloads the Azure file share data. Valid Values includes `NamespaceThenModifiedFiles`, `NamespaceOnly`, and `AvoidTieredFiles`. Defaults to `NamespaceThenModifiedFiles`. Changing this forces a new resource to be created.
InitialDownloadPolicy *string `pulumi:"initialDownloadPolicy"`
// Specifies how to handle the local cache. Valid Values include `UpdateLocallyCachedFiles` and `DownloadNewAndModifiedFiles`. Defaults to `UpdateLocallyCachedFiles`.
LocalCacheMode *string `pulumi:"localCacheMode"`
// The name which should be used for this Storage Sync. Changing this forces a new Storage Sync Server Endpoint to be created.
Name *string `pulumi:"name"`
// The ID of the Registered Server that will be associate with the Storage Sync Server Endpoint. Changing this forces a new Storage Sync Server Endpoint to be created.
//
// > **Note:** The target server must already be registered with the parent `storage.Sync` prior to creating this endpoint. For more information on registering a server see the [Microsoft documentation](https://learn.microsoft.com/azure/storage/file-sync/file-sync-server-registration)
RegisteredServerId *string `pulumi:"registeredServerId"`
// The path on the Windows Server to be synced to the Azure file share. Changing this forces a new Storage Sync Server Endpoint to be created.
ServerLocalPath *string `pulumi:"serverLocalPath"`
// The ID of the Storage Sync Group where the Storage Sync Server Endpoint should exist. Changing this forces a new Storage Sync Server Endpoint to be created.
StorageSyncGroupId *string `pulumi:"storageSyncGroupId"`
// Files older than the specified age will be tiered to the cloud.
TierFilesOlderThanDays *int `pulumi:"tierFilesOlderThanDays"`
// What percentage of free space on the volume should be preserved? Defaults to `20`.
VolumeFreeSpacePercent *int `pulumi:"volumeFreeSpacePercent"`
}
type SyncServerEndpointState struct {
// Is Cloud Tiering Enabled? Defaults to `false`.
CloudTieringEnabled pulumi.BoolPtrInput
// Specifies how the server initially downloads the Azure file share data. Valid Values includes `NamespaceThenModifiedFiles`, `NamespaceOnly`, and `AvoidTieredFiles`. Defaults to `NamespaceThenModifiedFiles`. Changing this forces a new resource to be created.
InitialDownloadPolicy pulumi.StringPtrInput
// Specifies how to handle the local cache. Valid Values include `UpdateLocallyCachedFiles` and `DownloadNewAndModifiedFiles`. Defaults to `UpdateLocallyCachedFiles`.
LocalCacheMode pulumi.StringPtrInput
// The name which should be used for this Storage Sync. Changing this forces a new Storage Sync Server Endpoint to be created.
Name pulumi.StringPtrInput
// The ID of the Registered Server that will be associate with the Storage Sync Server Endpoint. Changing this forces a new Storage Sync Server Endpoint to be created.
//
// > **Note:** The target server must already be registered with the parent `storage.Sync` prior to creating this endpoint. For more information on registering a server see the [Microsoft documentation](https://learn.microsoft.com/azure/storage/file-sync/file-sync-server-registration)
RegisteredServerId pulumi.StringPtrInput
// The path on the Windows Server to be synced to the Azure file share. Changing this forces a new Storage Sync Server Endpoint to be created.
ServerLocalPath pulumi.StringPtrInput
// The ID of the Storage Sync Group where the Storage Sync Server Endpoint should exist. Changing this forces a new Storage Sync Server Endpoint to be created.
StorageSyncGroupId pulumi.StringPtrInput
// Files older than the specified age will be tiered to the cloud.
TierFilesOlderThanDays pulumi.IntPtrInput
// What percentage of free space on the volume should be preserved? Defaults to `20`.
VolumeFreeSpacePercent pulumi.IntPtrInput
}
func (SyncServerEndpointState) ElementType() reflect.Type {
return reflect.TypeOf((*syncServerEndpointState)(nil)).Elem()
}
type syncServerEndpointArgs struct {
// Is Cloud Tiering Enabled? Defaults to `false`.
CloudTieringEnabled *bool `pulumi:"cloudTieringEnabled"`
// Specifies how the server initially downloads the Azure file share data. Valid Values includes `NamespaceThenModifiedFiles`, `NamespaceOnly`, and `AvoidTieredFiles`. Defaults to `NamespaceThenModifiedFiles`. Changing this forces a new resource to be created.
InitialDownloadPolicy *string `pulumi:"initialDownloadPolicy"`
// Specifies how to handle the local cache. Valid Values include `UpdateLocallyCachedFiles` and `DownloadNewAndModifiedFiles`. Defaults to `UpdateLocallyCachedFiles`.
LocalCacheMode *string `pulumi:"localCacheMode"`
// The name which should be used for this Storage Sync. Changing this forces a new Storage Sync Server Endpoint to be created.
Name *string `pulumi:"name"`
// The ID of the Registered Server that will be associate with the Storage Sync Server Endpoint. Changing this forces a new Storage Sync Server Endpoint to be created.
//
// > **Note:** The target server must already be registered with the parent `storage.Sync` prior to creating this endpoint. For more information on registering a server see the [Microsoft documentation](https://learn.microsoft.com/azure/storage/file-sync/file-sync-server-registration)
RegisteredServerId string `pulumi:"registeredServerId"`
// The path on the Windows Server to be synced to the Azure file share. Changing this forces a new Storage Sync Server Endpoint to be created.
ServerLocalPath string `pulumi:"serverLocalPath"`
// The ID of the Storage Sync Group where the Storage Sync Server Endpoint should exist. Changing this forces a new Storage Sync Server Endpoint to be created.
StorageSyncGroupId string `pulumi:"storageSyncGroupId"`
// Files older than the specified age will be tiered to the cloud.
TierFilesOlderThanDays *int `pulumi:"tierFilesOlderThanDays"`
// What percentage of free space on the volume should be preserved? Defaults to `20`.
VolumeFreeSpacePercent *int `pulumi:"volumeFreeSpacePercent"`
}
// The set of arguments for constructing a SyncServerEndpoint resource.
type SyncServerEndpointArgs struct {
// Is Cloud Tiering Enabled? Defaults to `false`.
CloudTieringEnabled pulumi.BoolPtrInput
// Specifies how the server initially downloads the Azure file share data. Valid Values includes `NamespaceThenModifiedFiles`, `NamespaceOnly`, and `AvoidTieredFiles`. Defaults to `NamespaceThenModifiedFiles`. Changing this forces a new resource to be created.
InitialDownloadPolicy pulumi.StringPtrInput
// Specifies how to handle the local cache. Valid Values include `UpdateLocallyCachedFiles` and `DownloadNewAndModifiedFiles`. Defaults to `UpdateLocallyCachedFiles`.
LocalCacheMode pulumi.StringPtrInput
// The name which should be used for this Storage Sync. Changing this forces a new Storage Sync Server Endpoint to be created.
Name pulumi.StringPtrInput
// The ID of the Registered Server that will be associate with the Storage Sync Server Endpoint. Changing this forces a new Storage Sync Server Endpoint to be created.
//
// > **Note:** The target server must already be registered with the parent `storage.Sync` prior to creating this endpoint. For more information on registering a server see the [Microsoft documentation](https://learn.microsoft.com/azure/storage/file-sync/file-sync-server-registration)
RegisteredServerId pulumi.StringInput
// The path on the Windows Server to be synced to the Azure file share. Changing this forces a new Storage Sync Server Endpoint to be created.
ServerLocalPath pulumi.StringInput
// The ID of the Storage Sync Group where the Storage Sync Server Endpoint should exist. Changing this forces a new Storage Sync Server Endpoint to be created.
StorageSyncGroupId pulumi.StringInput
// Files older than the specified age will be tiered to the cloud.
TierFilesOlderThanDays pulumi.IntPtrInput
// What percentage of free space on the volume should be preserved? Defaults to `20`.
VolumeFreeSpacePercent pulumi.IntPtrInput
}
func (SyncServerEndpointArgs) ElementType() reflect.Type {
return reflect.TypeOf((*syncServerEndpointArgs)(nil)).Elem()
}
type SyncServerEndpointInput interface {
pulumi.Input
ToSyncServerEndpointOutput() SyncServerEndpointOutput
ToSyncServerEndpointOutputWithContext(ctx context.Context) SyncServerEndpointOutput
}
func (*SyncServerEndpoint) ElementType() reflect.Type {
return reflect.TypeOf((**SyncServerEndpoint)(nil)).Elem()
}
func (i *SyncServerEndpoint) ToSyncServerEndpointOutput() SyncServerEndpointOutput {
return i.ToSyncServerEndpointOutputWithContext(context.Background())
}
func (i *SyncServerEndpoint) ToSyncServerEndpointOutputWithContext(ctx context.Context) SyncServerEndpointOutput {
return pulumi.ToOutputWithContext(ctx, i).(SyncServerEndpointOutput)
}
// SyncServerEndpointArrayInput is an input type that accepts SyncServerEndpointArray and SyncServerEndpointArrayOutput values.
// You can construct a concrete instance of `SyncServerEndpointArrayInput` via:
//
// SyncServerEndpointArray{ SyncServerEndpointArgs{...} }
type SyncServerEndpointArrayInput interface {
pulumi.Input
ToSyncServerEndpointArrayOutput() SyncServerEndpointArrayOutput
ToSyncServerEndpointArrayOutputWithContext(context.Context) SyncServerEndpointArrayOutput
}
type SyncServerEndpointArray []SyncServerEndpointInput
func (SyncServerEndpointArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SyncServerEndpoint)(nil)).Elem()
}
func (i SyncServerEndpointArray) ToSyncServerEndpointArrayOutput() SyncServerEndpointArrayOutput {
return i.ToSyncServerEndpointArrayOutputWithContext(context.Background())
}
func (i SyncServerEndpointArray) ToSyncServerEndpointArrayOutputWithContext(ctx context.Context) SyncServerEndpointArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SyncServerEndpointArrayOutput)
}
// SyncServerEndpointMapInput is an input type that accepts SyncServerEndpointMap and SyncServerEndpointMapOutput values.
// You can construct a concrete instance of `SyncServerEndpointMapInput` via:
//
// SyncServerEndpointMap{ "key": SyncServerEndpointArgs{...} }
type SyncServerEndpointMapInput interface {
pulumi.Input
ToSyncServerEndpointMapOutput() SyncServerEndpointMapOutput
ToSyncServerEndpointMapOutputWithContext(context.Context) SyncServerEndpointMapOutput
}
type SyncServerEndpointMap map[string]SyncServerEndpointInput
func (SyncServerEndpointMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SyncServerEndpoint)(nil)).Elem()
}
func (i SyncServerEndpointMap) ToSyncServerEndpointMapOutput() SyncServerEndpointMapOutput {
return i.ToSyncServerEndpointMapOutputWithContext(context.Background())
}
func (i SyncServerEndpointMap) ToSyncServerEndpointMapOutputWithContext(ctx context.Context) SyncServerEndpointMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SyncServerEndpointMapOutput)
}
type SyncServerEndpointOutput struct{ *pulumi.OutputState }
func (SyncServerEndpointOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SyncServerEndpoint)(nil)).Elem()
}
func (o SyncServerEndpointOutput) ToSyncServerEndpointOutput() SyncServerEndpointOutput {
return o
}
func (o SyncServerEndpointOutput) ToSyncServerEndpointOutputWithContext(ctx context.Context) SyncServerEndpointOutput {
return o
}
// Is Cloud Tiering Enabled? Defaults to `false`.
func (o SyncServerEndpointOutput) CloudTieringEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *SyncServerEndpoint) pulumi.BoolPtrOutput { return v.CloudTieringEnabled }).(pulumi.BoolPtrOutput)
}
// Specifies how the server initially downloads the Azure file share data. Valid Values includes `NamespaceThenModifiedFiles`, `NamespaceOnly`, and `AvoidTieredFiles`. Defaults to `NamespaceThenModifiedFiles`. Changing this forces a new resource to be created.
func (o SyncServerEndpointOutput) InitialDownloadPolicy() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SyncServerEndpoint) pulumi.StringPtrOutput { return v.InitialDownloadPolicy }).(pulumi.StringPtrOutput)
}
// Specifies how to handle the local cache. Valid Values include `UpdateLocallyCachedFiles` and `DownloadNewAndModifiedFiles`. Defaults to `UpdateLocallyCachedFiles`.
func (o SyncServerEndpointOutput) LocalCacheMode() pulumi.StringPtrOutput {
return o.ApplyT(func(v *SyncServerEndpoint) pulumi.StringPtrOutput { return v.LocalCacheMode }).(pulumi.StringPtrOutput)
}
// The name which should be used for this Storage Sync. Changing this forces a new Storage Sync Server Endpoint to be created.
func (o SyncServerEndpointOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SyncServerEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Registered Server that will be associate with the Storage Sync Server Endpoint. Changing this forces a new Storage Sync Server Endpoint to be created.
//
// > **Note:** The target server must already be registered with the parent `storage.Sync` prior to creating this endpoint. For more information on registering a server see the [Microsoft documentation](https://learn.microsoft.com/azure/storage/file-sync/file-sync-server-registration)
func (o SyncServerEndpointOutput) RegisteredServerId() pulumi.StringOutput {
return o.ApplyT(func(v *SyncServerEndpoint) pulumi.StringOutput { return v.RegisteredServerId }).(pulumi.StringOutput)
}
// The path on the Windows Server to be synced to the Azure file share. Changing this forces a new Storage Sync Server Endpoint to be created.
func (o SyncServerEndpointOutput) ServerLocalPath() pulumi.StringOutput {
return o.ApplyT(func(v *SyncServerEndpoint) pulumi.StringOutput { return v.ServerLocalPath }).(pulumi.StringOutput)
}
// The ID of the Storage Sync Group where the Storage Sync Server Endpoint should exist. Changing this forces a new Storage Sync Server Endpoint to be created.
func (o SyncServerEndpointOutput) StorageSyncGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *SyncServerEndpoint) pulumi.StringOutput { return v.StorageSyncGroupId }).(pulumi.StringOutput)
}
// Files older than the specified age will be tiered to the cloud.
func (o SyncServerEndpointOutput) TierFilesOlderThanDays() pulumi.IntPtrOutput {
return o.ApplyT(func(v *SyncServerEndpoint) pulumi.IntPtrOutput { return v.TierFilesOlderThanDays }).(pulumi.IntPtrOutput)
}
// What percentage of free space on the volume should be preserved? Defaults to `20`.
func (o SyncServerEndpointOutput) VolumeFreeSpacePercent() pulumi.IntPtrOutput {
return o.ApplyT(func(v *SyncServerEndpoint) pulumi.IntPtrOutput { return v.VolumeFreeSpacePercent }).(pulumi.IntPtrOutput)
}
type SyncServerEndpointArrayOutput struct{ *pulumi.OutputState }
func (SyncServerEndpointArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SyncServerEndpoint)(nil)).Elem()
}
func (o SyncServerEndpointArrayOutput) ToSyncServerEndpointArrayOutput() SyncServerEndpointArrayOutput {
return o
}
func (o SyncServerEndpointArrayOutput) ToSyncServerEndpointArrayOutputWithContext(ctx context.Context) SyncServerEndpointArrayOutput {
return o
}
func (o SyncServerEndpointArrayOutput) Index(i pulumi.IntInput) SyncServerEndpointOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SyncServerEndpoint {
return vs[0].([]*SyncServerEndpoint)[vs[1].(int)]
}).(SyncServerEndpointOutput)
}
type SyncServerEndpointMapOutput struct{ *pulumi.OutputState }
func (SyncServerEndpointMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SyncServerEndpoint)(nil)).Elem()
}
func (o SyncServerEndpointMapOutput) ToSyncServerEndpointMapOutput() SyncServerEndpointMapOutput {
return o
}
func (o SyncServerEndpointMapOutput) ToSyncServerEndpointMapOutputWithContext(ctx context.Context) SyncServerEndpointMapOutput {
return o
}
func (o SyncServerEndpointMapOutput) MapIndex(k pulumi.StringInput) SyncServerEndpointOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SyncServerEndpoint {
return vs[0].(map[string]*SyncServerEndpoint)[vs[1].(string)]
}).(SyncServerEndpointOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SyncServerEndpointInput)(nil)).Elem(), &SyncServerEndpoint{})
pulumi.RegisterInputType(reflect.TypeOf((*SyncServerEndpointArrayInput)(nil)).Elem(), SyncServerEndpointArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SyncServerEndpointMapInput)(nil)).Elem(), SyncServerEndpointMap{})
pulumi.RegisterOutputType(SyncServerEndpointOutput{})
pulumi.RegisterOutputType(SyncServerEndpointArrayOutput{})
pulumi.RegisterOutputType(SyncServerEndpointMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/getTable.go | sdk/go/azure/storage/getTable.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
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 Storage Table.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 {
// _, err := storage.LookupTable(ctx, &storage.LookupTableArgs{
// Name: "example-table-name",
// StorageAccountName: "example-storage-account-name",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupTable(ctx *pulumi.Context, args *LookupTableArgs, opts ...pulumi.InvokeOption) (*LookupTableResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupTableResult
err := ctx.Invoke("azure:storage/getTable:getTable", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getTable.
type LookupTableArgs struct {
// The name of the Table.
Name string `pulumi:"name"`
// The name of the Storage Account where the Table exists.
StorageAccountName string `pulumi:"storageAccountName"`
}
// A collection of values returned by getTable.
type LookupTableResult struct {
// A mapping of ACLs for this Table.
Acls []GetTableAcl `pulumi:"acls"`
// The ID of the Storage Table.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
// The Resource Manager ID of this Storage Table.
ResourceManagerId string `pulumi:"resourceManagerId"`
StorageAccountName string `pulumi:"storageAccountName"`
}
func LookupTableOutput(ctx *pulumi.Context, args LookupTableOutputArgs, opts ...pulumi.InvokeOption) LookupTableResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupTableResultOutput, error) {
args := v.(LookupTableArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:storage/getTable:getTable", args, LookupTableResultOutput{}, options).(LookupTableResultOutput), nil
}).(LookupTableResultOutput)
}
// A collection of arguments for invoking getTable.
type LookupTableOutputArgs struct {
// The name of the Table.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Storage Account where the Table exists.
StorageAccountName pulumi.StringInput `pulumi:"storageAccountName"`
}
func (LookupTableOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTableArgs)(nil)).Elem()
}
// A collection of values returned by getTable.
type LookupTableResultOutput struct{ *pulumi.OutputState }
func (LookupTableResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTableResult)(nil)).Elem()
}
func (o LookupTableResultOutput) ToLookupTableResultOutput() LookupTableResultOutput {
return o
}
func (o LookupTableResultOutput) ToLookupTableResultOutputWithContext(ctx context.Context) LookupTableResultOutput {
return o
}
// A mapping of ACLs for this Table.
func (o LookupTableResultOutput) Acls() GetTableAclArrayOutput {
return o.ApplyT(func(v LookupTableResult) []GetTableAcl { return v.Acls }).(GetTableAclArrayOutput)
}
// The ID of the Storage Table.
func (o LookupTableResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupTableResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupTableResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupTableResult) string { return v.Name }).(pulumi.StringOutput)
}
// The Resource Manager ID of this Storage Table.
func (o LookupTableResultOutput) ResourceManagerId() pulumi.StringOutput {
return o.ApplyT(func(v LookupTableResult) string { return v.ResourceManagerId }).(pulumi.StringOutput)
}
func (o LookupTableResultOutput) StorageAccountName() pulumi.StringOutput {
return o.ApplyT(func(v LookupTableResult) string { return v.StorageAccountName }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupTableResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/getAccountBlobContainerSAS.go | sdk/go/azure/storage/getAccountBlobContainerSAS.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
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 Storage Account Blob Container.
//
// Shared access signatures allow fine-grained, ephemeral access control to various aspects of an Azure Storage Account Blob Container.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// rg, err := core.NewResourceGroup(ctx, "rg", &core.ResourceGroupArgs{
// Name: pulumi.String("resourceGroupName"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// storage, err := storage.NewAccount(ctx, "storage", &storage.AccountArgs{
// Name: pulumi.String("storageaccountname"),
// ResourceGroupName: rg.Name,
// Location: rg.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// container, err := storage.NewContainer(ctx, "container", &storage.ContainerArgs{
// Name: pulumi.String("mycontainer"),
// StorageAccountName: storage.Name,
// ContainerAccessType: pulumi.String("private"),
// })
// if err != nil {
// return err
// }
// example := storage.GetAccountBlobContainerSASOutput(ctx, storage.GetAccountBlobContainerSASOutputArgs{
// ConnectionString: storage.PrimaryConnectionString,
// ContainerName: container.Name,
// HttpsOnly: pulumi.Bool(true),
// IpAddress: pulumi.String("168.1.5.65"),
// Start: pulumi.String("2018-03-21"),
// Expiry: pulumi.String("2018-03-21"),
// Permissions: &storage.GetAccountBlobContainerSASPermissionsArgs{
// Read: pulumi.Bool(true),
// Add: pulumi.Bool(true),
// Create: pulumi.Bool(false),
// Write: pulumi.Bool(false),
// Delete: pulumi.Bool(true),
// List: pulumi.Bool(true),
// },
// CacheControl: pulumi.String("max-age=5"),
// ContentDisposition: pulumi.String("inline"),
// ContentEncoding: pulumi.String("deflate"),
// ContentLanguage: pulumi.String("en-US"),
// ContentType: pulumi.String("application/json"),
// }, nil)
// ctx.Export("sasUrlQueryString", example.ApplyT(func(example storage.GetAccountBlobContainerSASResult) (*string, error) {
// return &example.Sas, nil
// }).(pulumi.StringPtrOutput))
// return nil
// })
// }
//
// ```
func GetAccountBlobContainerSAS(ctx *pulumi.Context, args *GetAccountBlobContainerSASArgs, opts ...pulumi.InvokeOption) (*GetAccountBlobContainerSASResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetAccountBlobContainerSASResult
err := ctx.Invoke("azure:storage/getAccountBlobContainerSAS:getAccountBlobContainerSAS", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAccountBlobContainerSAS.
type GetAccountBlobContainerSASArgs struct {
// The `Cache-Control` response header that is sent when this SAS token is used.
CacheControl *string `pulumi:"cacheControl"`
// The connection string for the storage account to which this SAS applies. Typically directly from the `primaryConnectionString` attribute of an `storage.Account` resource.
ConnectionString string `pulumi:"connectionString"`
// Name of the container.
ContainerName string `pulumi:"containerName"`
// The `Content-Disposition` response header that is sent when this SAS token is used.
ContentDisposition *string `pulumi:"contentDisposition"`
// The `Content-Encoding` response header that is sent when this SAS token is used.
ContentEncoding *string `pulumi:"contentEncoding"`
// The `Content-Language` response header that is sent when this SAS token is used.
ContentLanguage *string `pulumi:"contentLanguage"`
// The `Content-Type` response header that is sent when this SAS token is used.
ContentType *string `pulumi:"contentType"`
// The expiration time and date of this SAS. Must be a valid ISO-8601 format time/date string.
//
// > **Note:** The [ISO-8601 Time offset from UTC](https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC) is currently not supported by the service, which will result into 409 error.
Expiry string `pulumi:"expiry"`
// Only permit `https` access. If `false`, both `http` and `https` are permitted. Defaults to `true`.
HttpsOnly *bool `pulumi:"httpsOnly"`
// Single IPv4 address or range (connected with a dash) of IPv4 addresses.
IpAddress *string `pulumi:"ipAddress"`
// A `permissions` block as defined below.
Permissions GetAccountBlobContainerSASPermissions `pulumi:"permissions"`
// The starting time and date of validity of this SAS. Must be a valid ISO-8601 format time/date string.
Start string `pulumi:"start"`
}
// A collection of values returned by getAccountBlobContainerSAS.
type GetAccountBlobContainerSASResult struct {
CacheControl *string `pulumi:"cacheControl"`
ConnectionString string `pulumi:"connectionString"`
ContainerName string `pulumi:"containerName"`
ContentDisposition *string `pulumi:"contentDisposition"`
ContentEncoding *string `pulumi:"contentEncoding"`
ContentLanguage *string `pulumi:"contentLanguage"`
ContentType *string `pulumi:"contentType"`
Expiry string `pulumi:"expiry"`
HttpsOnly *bool `pulumi:"httpsOnly"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
IpAddress *string `pulumi:"ipAddress"`
Permissions GetAccountBlobContainerSASPermissions `pulumi:"permissions"`
// The computed Blob Container Shared Access Signature (SAS). The delimiter character ('?') for the query string is the prefix of `sas`.
Sas string `pulumi:"sas"`
Start string `pulumi:"start"`
}
func GetAccountBlobContainerSASOutput(ctx *pulumi.Context, args GetAccountBlobContainerSASOutputArgs, opts ...pulumi.InvokeOption) GetAccountBlobContainerSASResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetAccountBlobContainerSASResultOutput, error) {
args := v.(GetAccountBlobContainerSASArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:storage/getAccountBlobContainerSAS:getAccountBlobContainerSAS", args, GetAccountBlobContainerSASResultOutput{}, options).(GetAccountBlobContainerSASResultOutput), nil
}).(GetAccountBlobContainerSASResultOutput)
}
// A collection of arguments for invoking getAccountBlobContainerSAS.
type GetAccountBlobContainerSASOutputArgs struct {
// The `Cache-Control` response header that is sent when this SAS token is used.
CacheControl pulumi.StringPtrInput `pulumi:"cacheControl"`
// The connection string for the storage account to which this SAS applies. Typically directly from the `primaryConnectionString` attribute of an `storage.Account` resource.
ConnectionString pulumi.StringInput `pulumi:"connectionString"`
// Name of the container.
ContainerName pulumi.StringInput `pulumi:"containerName"`
// The `Content-Disposition` response header that is sent when this SAS token is used.
ContentDisposition pulumi.StringPtrInput `pulumi:"contentDisposition"`
// The `Content-Encoding` response header that is sent when this SAS token is used.
ContentEncoding pulumi.StringPtrInput `pulumi:"contentEncoding"`
// The `Content-Language` response header that is sent when this SAS token is used.
ContentLanguage pulumi.StringPtrInput `pulumi:"contentLanguage"`
// The `Content-Type` response header that is sent when this SAS token is used.
ContentType pulumi.StringPtrInput `pulumi:"contentType"`
// The expiration time and date of this SAS. Must be a valid ISO-8601 format time/date string.
//
// > **Note:** The [ISO-8601 Time offset from UTC](https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC) is currently not supported by the service, which will result into 409 error.
Expiry pulumi.StringInput `pulumi:"expiry"`
// Only permit `https` access. If `false`, both `http` and `https` are permitted. Defaults to `true`.
HttpsOnly pulumi.BoolPtrInput `pulumi:"httpsOnly"`
// Single IPv4 address or range (connected with a dash) of IPv4 addresses.
IpAddress pulumi.StringPtrInput `pulumi:"ipAddress"`
// A `permissions` block as defined below.
Permissions GetAccountBlobContainerSASPermissionsInput `pulumi:"permissions"`
// The starting time and date of validity of this SAS. Must be a valid ISO-8601 format time/date string.
Start pulumi.StringInput `pulumi:"start"`
}
func (GetAccountBlobContainerSASOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetAccountBlobContainerSASArgs)(nil)).Elem()
}
// A collection of values returned by getAccountBlobContainerSAS.
type GetAccountBlobContainerSASResultOutput struct{ *pulumi.OutputState }
func (GetAccountBlobContainerSASResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetAccountBlobContainerSASResult)(nil)).Elem()
}
func (o GetAccountBlobContainerSASResultOutput) ToGetAccountBlobContainerSASResultOutput() GetAccountBlobContainerSASResultOutput {
return o
}
func (o GetAccountBlobContainerSASResultOutput) ToGetAccountBlobContainerSASResultOutputWithContext(ctx context.Context) GetAccountBlobContainerSASResultOutput {
return o
}
func (o GetAccountBlobContainerSASResultOutput) CacheControl() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetAccountBlobContainerSASResult) *string { return v.CacheControl }).(pulumi.StringPtrOutput)
}
func (o GetAccountBlobContainerSASResultOutput) ConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v GetAccountBlobContainerSASResult) string { return v.ConnectionString }).(pulumi.StringOutput)
}
func (o GetAccountBlobContainerSASResultOutput) ContainerName() pulumi.StringOutput {
return o.ApplyT(func(v GetAccountBlobContainerSASResult) string { return v.ContainerName }).(pulumi.StringOutput)
}
func (o GetAccountBlobContainerSASResultOutput) ContentDisposition() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetAccountBlobContainerSASResult) *string { return v.ContentDisposition }).(pulumi.StringPtrOutput)
}
func (o GetAccountBlobContainerSASResultOutput) ContentEncoding() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetAccountBlobContainerSASResult) *string { return v.ContentEncoding }).(pulumi.StringPtrOutput)
}
func (o GetAccountBlobContainerSASResultOutput) ContentLanguage() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetAccountBlobContainerSASResult) *string { return v.ContentLanguage }).(pulumi.StringPtrOutput)
}
func (o GetAccountBlobContainerSASResultOutput) ContentType() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetAccountBlobContainerSASResult) *string { return v.ContentType }).(pulumi.StringPtrOutput)
}
func (o GetAccountBlobContainerSASResultOutput) Expiry() pulumi.StringOutput {
return o.ApplyT(func(v GetAccountBlobContainerSASResult) string { return v.Expiry }).(pulumi.StringOutput)
}
func (o GetAccountBlobContainerSASResultOutput) HttpsOnly() pulumi.BoolPtrOutput {
return o.ApplyT(func(v GetAccountBlobContainerSASResult) *bool { return v.HttpsOnly }).(pulumi.BoolPtrOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetAccountBlobContainerSASResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetAccountBlobContainerSASResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetAccountBlobContainerSASResultOutput) IpAddress() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetAccountBlobContainerSASResult) *string { return v.IpAddress }).(pulumi.StringPtrOutput)
}
func (o GetAccountBlobContainerSASResultOutput) Permissions() GetAccountBlobContainerSASPermissionsOutput {
return o.ApplyT(func(v GetAccountBlobContainerSASResult) GetAccountBlobContainerSASPermissions { return v.Permissions }).(GetAccountBlobContainerSASPermissionsOutput)
}
// The computed Blob Container Shared Access Signature (SAS). The delimiter character ('?') for the query string is the prefix of `sas`.
func (o GetAccountBlobContainerSASResultOutput) Sas() pulumi.StringOutput {
return o.ApplyT(func(v GetAccountBlobContainerSASResult) string { return v.Sas }).(pulumi.StringOutput)
}
func (o GetAccountBlobContainerSASResultOutput) Start() pulumi.StringOutput {
return o.ApplyT(func(v GetAccountBlobContainerSASResult) string { return v.Start }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetAccountBlobContainerSASResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/table.go | sdk/go/azure/storage/table.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Table within an Azure Storage Account.
//
// > **Note:** Shared Key authentication will always be used for this resource, as AzureAD authentication is not supported when setting or retrieving ACLs for Tables.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("azuretest"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("azureteststorage1"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewTable(ctx, "example", &storage.TableArgs{
// Name: pulumi.String("mysampletable"),
// StorageAccountName: exampleAccount.Name,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Table's within a Storage Account can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/table:Table table1 "https://example.table.core.windows.net/Tables('replace-with-table-name')"
// ```
type Table struct {
pulumi.CustomResourceState
// One or more `acl` blocks as defined below.
Acls TableAclArrayOutput `pulumi:"acls"`
// The name of the storage table. Only Alphanumeric characters allowed, starting with a letter. Must be unique within the storage account the table is located. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The Resource Manager ID of this Storage Table.
ResourceManagerId pulumi.StringOutput `pulumi:"resourceManagerId"`
// Specifies the storage account in which to create the storage table. Changing this forces a new resource to be created.
StorageAccountName pulumi.StringOutput `pulumi:"storageAccountName"`
}
// NewTable registers a new resource with the given unique name, arguments, and options.
func NewTable(ctx *pulumi.Context,
name string, args *TableArgs, opts ...pulumi.ResourceOption) (*Table, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.StorageAccountName == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Table
err := ctx.RegisterResource("azure:storage/table:Table", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTable gets an existing Table resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetTable(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TableState, opts ...pulumi.ResourceOption) (*Table, error) {
var resource Table
err := ctx.ReadResource("azure:storage/table:Table", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Table resources.
type tableState struct {
// One or more `acl` blocks as defined below.
Acls []TableAcl `pulumi:"acls"`
// The name of the storage table. Only Alphanumeric characters allowed, starting with a letter. Must be unique within the storage account the table is located. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The Resource Manager ID of this Storage Table.
ResourceManagerId *string `pulumi:"resourceManagerId"`
// Specifies the storage account in which to create the storage table. Changing this forces a new resource to be created.
StorageAccountName *string `pulumi:"storageAccountName"`
}
type TableState struct {
// One or more `acl` blocks as defined below.
Acls TableAclArrayInput
// The name of the storage table. Only Alphanumeric characters allowed, starting with a letter. Must be unique within the storage account the table is located. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The Resource Manager ID of this Storage Table.
ResourceManagerId pulumi.StringPtrInput
// Specifies the storage account in which to create the storage table. Changing this forces a new resource to be created.
StorageAccountName pulumi.StringPtrInput
}
func (TableState) ElementType() reflect.Type {
return reflect.TypeOf((*tableState)(nil)).Elem()
}
type tableArgs struct {
// One or more `acl` blocks as defined below.
Acls []TableAcl `pulumi:"acls"`
// The name of the storage table. Only Alphanumeric characters allowed, starting with a letter. Must be unique within the storage account the table is located. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the storage account in which to create the storage table. Changing this forces a new resource to be created.
StorageAccountName string `pulumi:"storageAccountName"`
}
// The set of arguments for constructing a Table resource.
type TableArgs struct {
// One or more `acl` blocks as defined below.
Acls TableAclArrayInput
// The name of the storage table. Only Alphanumeric characters allowed, starting with a letter. Must be unique within the storage account the table is located. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the storage account in which to create the storage table. Changing this forces a new resource to be created.
StorageAccountName pulumi.StringInput
}
func (TableArgs) ElementType() reflect.Type {
return reflect.TypeOf((*tableArgs)(nil)).Elem()
}
type TableInput interface {
pulumi.Input
ToTableOutput() TableOutput
ToTableOutputWithContext(ctx context.Context) TableOutput
}
func (*Table) ElementType() reflect.Type {
return reflect.TypeOf((**Table)(nil)).Elem()
}
func (i *Table) ToTableOutput() TableOutput {
return i.ToTableOutputWithContext(context.Background())
}
func (i *Table) ToTableOutputWithContext(ctx context.Context) TableOutput {
return pulumi.ToOutputWithContext(ctx, i).(TableOutput)
}
// TableArrayInput is an input type that accepts TableArray and TableArrayOutput values.
// You can construct a concrete instance of `TableArrayInput` via:
//
// TableArray{ TableArgs{...} }
type TableArrayInput interface {
pulumi.Input
ToTableArrayOutput() TableArrayOutput
ToTableArrayOutputWithContext(context.Context) TableArrayOutput
}
type TableArray []TableInput
func (TableArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Table)(nil)).Elem()
}
func (i TableArray) ToTableArrayOutput() TableArrayOutput {
return i.ToTableArrayOutputWithContext(context.Background())
}
func (i TableArray) ToTableArrayOutputWithContext(ctx context.Context) TableArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TableArrayOutput)
}
// TableMapInput is an input type that accepts TableMap and TableMapOutput values.
// You can construct a concrete instance of `TableMapInput` via:
//
// TableMap{ "key": TableArgs{...} }
type TableMapInput interface {
pulumi.Input
ToTableMapOutput() TableMapOutput
ToTableMapOutputWithContext(context.Context) TableMapOutput
}
type TableMap map[string]TableInput
func (TableMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Table)(nil)).Elem()
}
func (i TableMap) ToTableMapOutput() TableMapOutput {
return i.ToTableMapOutputWithContext(context.Background())
}
func (i TableMap) ToTableMapOutputWithContext(ctx context.Context) TableMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(TableMapOutput)
}
type TableOutput struct{ *pulumi.OutputState }
func (TableOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Table)(nil)).Elem()
}
func (o TableOutput) ToTableOutput() TableOutput {
return o
}
func (o TableOutput) ToTableOutputWithContext(ctx context.Context) TableOutput {
return o
}
// One or more `acl` blocks as defined below.
func (o TableOutput) Acls() TableAclArrayOutput {
return o.ApplyT(func(v *Table) TableAclArrayOutput { return v.Acls }).(TableAclArrayOutput)
}
// The name of the storage table. Only Alphanumeric characters allowed, starting with a letter. Must be unique within the storage account the table is located. Changing this forces a new resource to be created.
func (o TableOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Table) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The Resource Manager ID of this Storage Table.
func (o TableOutput) ResourceManagerId() pulumi.StringOutput {
return o.ApplyT(func(v *Table) pulumi.StringOutput { return v.ResourceManagerId }).(pulumi.StringOutput)
}
// Specifies the storage account in which to create the storage table. Changing this forces a new resource to be created.
func (o TableOutput) StorageAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *Table) pulumi.StringOutput { return v.StorageAccountName }).(pulumi.StringOutput)
}
type TableArrayOutput struct{ *pulumi.OutputState }
func (TableArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Table)(nil)).Elem()
}
func (o TableArrayOutput) ToTableArrayOutput() TableArrayOutput {
return o
}
func (o TableArrayOutput) ToTableArrayOutputWithContext(ctx context.Context) TableArrayOutput {
return o
}
func (o TableArrayOutput) Index(i pulumi.IntInput) TableOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Table {
return vs[0].([]*Table)[vs[1].(int)]
}).(TableOutput)
}
type TableMapOutput struct{ *pulumi.OutputState }
func (TableMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Table)(nil)).Elem()
}
func (o TableMapOutput) ToTableMapOutput() TableMapOutput {
return o
}
func (o TableMapOutput) ToTableMapOutputWithContext(ctx context.Context) TableMapOutput {
return o
}
func (o TableMapOutput) MapIndex(k pulumi.StringInput) TableOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Table {
return vs[0].(map[string]*Table)[vs[1].(string)]
}).(TableOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TableInput)(nil)).Elem(), &Table{})
pulumi.RegisterInputType(reflect.TypeOf((*TableArrayInput)(nil)).Elem(), TableArray{})
pulumi.RegisterInputType(reflect.TypeOf((*TableMapInput)(nil)).Elem(), TableMap{})
pulumi.RegisterOutputType(TableOutput{})
pulumi.RegisterOutputType(TableArrayOutput{})
pulumi.RegisterOutputType(TableMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/container.go | sdk/go/azure/storage/container.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Container within an Azure Storage Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/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("examplestoraccount"),
// 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
// }
// _, err = storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("vhds"),
// StorageAccountId: exampleAccount.ID(),
// ContainerAccessType: pulumi.String("private"),
// })
// 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.Storage` - 2023-05-01
//
// ## Import
//
// Storage Containers can be imported using the `resource manager id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/container:Container container1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/blobServices/default/containers/mycontainer
// ```
type Container struct {
pulumi.CustomResourceState
// The Access Level configured for this Container. Possible values are `blob`, `container` or `private`. Defaults to `private`.
//
// > **Note:** When updating `containerAccessType` for an existing storage container resource, Shared Key authentication will always be used, as AzureAD authentication is not supported.
ContainerAccessType pulumi.StringPtrOutput `pulumi:"containerAccessType"`
// The default encryption scope to use for blobs uploaded to this container. Changing this forces a new resource to be created.
DefaultEncryptionScope pulumi.StringOutput `pulumi:"defaultEncryptionScope"`
// Whether to allow blobs to override the default encryption scope for this container. Can only be set when specifying `defaultEncryptionScope`. Defaults to `true`. Changing this forces a new resource to be created.
EncryptionScopeOverrideEnabled pulumi.BoolPtrOutput `pulumi:"encryptionScopeOverrideEnabled"`
// Is there an Immutability Policy configured on this Storage Container?
HasImmutabilityPolicy pulumi.BoolOutput `pulumi:"hasImmutabilityPolicy"`
// Is there a Legal Hold configured on this Storage Container?
HasLegalHold pulumi.BoolOutput `pulumi:"hasLegalHold"`
// A mapping of MetaData for this Container. All metadata keys should be lowercase.
Metadata pulumi.StringMapOutput `pulumi:"metadata"`
// The name of the Container which should be created within the Storage Account. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The Resource Manager ID of this Storage Container.
//
// Deprecated: this property has been deprecated in favour of `id` and will be removed in version 5.0 of the Provider.
ResourceManagerId pulumi.StringOutput `pulumi:"resourceManagerId"`
// The name of the Storage Account where the Container should be created.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId pulumi.StringPtrOutput `pulumi:"storageAccountId"`
// The name of the Storage Account where the Container should be created. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
StorageAccountName pulumi.StringPtrOutput `pulumi:"storageAccountName"`
}
// NewContainer registers a new resource with the given unique name, arguments, and options.
func NewContainer(ctx *pulumi.Context,
name string, args *ContainerArgs, opts ...pulumi.ResourceOption) (*Container, error) {
if args == nil {
args = &ContainerArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Container
err := ctx.RegisterResource("azure:storage/container:Container", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetContainer gets an existing Container resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetContainer(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ContainerState, opts ...pulumi.ResourceOption) (*Container, error) {
var resource Container
err := ctx.ReadResource("azure:storage/container:Container", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Container resources.
type containerState struct {
// The Access Level configured for this Container. Possible values are `blob`, `container` or `private`. Defaults to `private`.
//
// > **Note:** When updating `containerAccessType` for an existing storage container resource, Shared Key authentication will always be used, as AzureAD authentication is not supported.
ContainerAccessType *string `pulumi:"containerAccessType"`
// The default encryption scope to use for blobs uploaded to this container. Changing this forces a new resource to be created.
DefaultEncryptionScope *string `pulumi:"defaultEncryptionScope"`
// Whether to allow blobs to override the default encryption scope for this container. Can only be set when specifying `defaultEncryptionScope`. Defaults to `true`. Changing this forces a new resource to be created.
EncryptionScopeOverrideEnabled *bool `pulumi:"encryptionScopeOverrideEnabled"`
// Is there an Immutability Policy configured on this Storage Container?
HasImmutabilityPolicy *bool `pulumi:"hasImmutabilityPolicy"`
// Is there a Legal Hold configured on this Storage Container?
HasLegalHold *bool `pulumi:"hasLegalHold"`
// A mapping of MetaData for this Container. All metadata keys should be lowercase.
Metadata map[string]string `pulumi:"metadata"`
// The name of the Container which should be created within the Storage Account. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The Resource Manager ID of this Storage Container.
//
// Deprecated: this property has been deprecated in favour of `id` and will be removed in version 5.0 of the Provider.
ResourceManagerId *string `pulumi:"resourceManagerId"`
// The name of the Storage Account where the Container should be created.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId *string `pulumi:"storageAccountId"`
// The name of the Storage Account where the Container should be created. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
StorageAccountName *string `pulumi:"storageAccountName"`
}
type ContainerState struct {
// The Access Level configured for this Container. Possible values are `blob`, `container` or `private`. Defaults to `private`.
//
// > **Note:** When updating `containerAccessType` for an existing storage container resource, Shared Key authentication will always be used, as AzureAD authentication is not supported.
ContainerAccessType pulumi.StringPtrInput
// The default encryption scope to use for blobs uploaded to this container. Changing this forces a new resource to be created.
DefaultEncryptionScope pulumi.StringPtrInput
// Whether to allow blobs to override the default encryption scope for this container. Can only be set when specifying `defaultEncryptionScope`. Defaults to `true`. Changing this forces a new resource to be created.
EncryptionScopeOverrideEnabled pulumi.BoolPtrInput
// Is there an Immutability Policy configured on this Storage Container?
HasImmutabilityPolicy pulumi.BoolPtrInput
// Is there a Legal Hold configured on this Storage Container?
HasLegalHold pulumi.BoolPtrInput
// A mapping of MetaData for this Container. All metadata keys should be lowercase.
Metadata pulumi.StringMapInput
// The name of the Container which should be created within the Storage Account. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The Resource Manager ID of this Storage Container.
//
// Deprecated: this property has been deprecated in favour of `id` and will be removed in version 5.0 of the Provider.
ResourceManagerId pulumi.StringPtrInput
// The name of the Storage Account where the Container should be created.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId pulumi.StringPtrInput
// The name of the Storage Account where the Container should be created. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
StorageAccountName pulumi.StringPtrInput
}
func (ContainerState) ElementType() reflect.Type {
return reflect.TypeOf((*containerState)(nil)).Elem()
}
type containerArgs struct {
// The Access Level configured for this Container. Possible values are `blob`, `container` or `private`. Defaults to `private`.
//
// > **Note:** When updating `containerAccessType` for an existing storage container resource, Shared Key authentication will always be used, as AzureAD authentication is not supported.
ContainerAccessType *string `pulumi:"containerAccessType"`
// The default encryption scope to use for blobs uploaded to this container. Changing this forces a new resource to be created.
DefaultEncryptionScope *string `pulumi:"defaultEncryptionScope"`
// Whether to allow blobs to override the default encryption scope for this container. Can only be set when specifying `defaultEncryptionScope`. Defaults to `true`. Changing this forces a new resource to be created.
EncryptionScopeOverrideEnabled *bool `pulumi:"encryptionScopeOverrideEnabled"`
// A mapping of MetaData for this Container. All metadata keys should be lowercase.
Metadata map[string]string `pulumi:"metadata"`
// The name of the Container which should be created within the Storage Account. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Storage Account where the Container should be created.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId *string `pulumi:"storageAccountId"`
// The name of the Storage Account where the Container should be created. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
StorageAccountName *string `pulumi:"storageAccountName"`
}
// The set of arguments for constructing a Container resource.
type ContainerArgs struct {
// The Access Level configured for this Container. Possible values are `blob`, `container` or `private`. Defaults to `private`.
//
// > **Note:** When updating `containerAccessType` for an existing storage container resource, Shared Key authentication will always be used, as AzureAD authentication is not supported.
ContainerAccessType pulumi.StringPtrInput
// The default encryption scope to use for blobs uploaded to this container. Changing this forces a new resource to be created.
DefaultEncryptionScope pulumi.StringPtrInput
// Whether to allow blobs to override the default encryption scope for this container. Can only be set when specifying `defaultEncryptionScope`. Defaults to `true`. Changing this forces a new resource to be created.
EncryptionScopeOverrideEnabled pulumi.BoolPtrInput
// A mapping of MetaData for this Container. All metadata keys should be lowercase.
Metadata pulumi.StringMapInput
// The name of the Container which should be created within the Storage Account. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Storage Account where the Container should be created.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId pulumi.StringPtrInput
// The name of the Storage Account where the Container should be created. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
StorageAccountName pulumi.StringPtrInput
}
func (ContainerArgs) ElementType() reflect.Type {
return reflect.TypeOf((*containerArgs)(nil)).Elem()
}
type ContainerInput interface {
pulumi.Input
ToContainerOutput() ContainerOutput
ToContainerOutputWithContext(ctx context.Context) ContainerOutput
}
func (*Container) ElementType() reflect.Type {
return reflect.TypeOf((**Container)(nil)).Elem()
}
func (i *Container) ToContainerOutput() ContainerOutput {
return i.ToContainerOutputWithContext(context.Background())
}
func (i *Container) ToContainerOutputWithContext(ctx context.Context) ContainerOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContainerOutput)
}
// ContainerArrayInput is an input type that accepts ContainerArray and ContainerArrayOutput values.
// You can construct a concrete instance of `ContainerArrayInput` via:
//
// ContainerArray{ ContainerArgs{...} }
type ContainerArrayInput interface {
pulumi.Input
ToContainerArrayOutput() ContainerArrayOutput
ToContainerArrayOutputWithContext(context.Context) ContainerArrayOutput
}
type ContainerArray []ContainerInput
func (ContainerArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Container)(nil)).Elem()
}
func (i ContainerArray) ToContainerArrayOutput() ContainerArrayOutput {
return i.ToContainerArrayOutputWithContext(context.Background())
}
func (i ContainerArray) ToContainerArrayOutputWithContext(ctx context.Context) ContainerArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContainerArrayOutput)
}
// ContainerMapInput is an input type that accepts ContainerMap and ContainerMapOutput values.
// You can construct a concrete instance of `ContainerMapInput` via:
//
// ContainerMap{ "key": ContainerArgs{...} }
type ContainerMapInput interface {
pulumi.Input
ToContainerMapOutput() ContainerMapOutput
ToContainerMapOutputWithContext(context.Context) ContainerMapOutput
}
type ContainerMap map[string]ContainerInput
func (ContainerMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Container)(nil)).Elem()
}
func (i ContainerMap) ToContainerMapOutput() ContainerMapOutput {
return i.ToContainerMapOutputWithContext(context.Background())
}
func (i ContainerMap) ToContainerMapOutputWithContext(ctx context.Context) ContainerMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContainerMapOutput)
}
type ContainerOutput struct{ *pulumi.OutputState }
func (ContainerOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Container)(nil)).Elem()
}
func (o ContainerOutput) ToContainerOutput() ContainerOutput {
return o
}
func (o ContainerOutput) ToContainerOutputWithContext(ctx context.Context) ContainerOutput {
return o
}
// The Access Level configured for this Container. Possible values are `blob`, `container` or `private`. Defaults to `private`.
//
// > **Note:** When updating `containerAccessType` for an existing storage container resource, Shared Key authentication will always be used, as AzureAD authentication is not supported.
func (o ContainerOutput) ContainerAccessType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Container) pulumi.StringPtrOutput { return v.ContainerAccessType }).(pulumi.StringPtrOutput)
}
// The default encryption scope to use for blobs uploaded to this container. Changing this forces a new resource to be created.
func (o ContainerOutput) DefaultEncryptionScope() pulumi.StringOutput {
return o.ApplyT(func(v *Container) pulumi.StringOutput { return v.DefaultEncryptionScope }).(pulumi.StringOutput)
}
// Whether to allow blobs to override the default encryption scope for this container. Can only be set when specifying `defaultEncryptionScope`. Defaults to `true`. Changing this forces a new resource to be created.
func (o ContainerOutput) EncryptionScopeOverrideEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Container) pulumi.BoolPtrOutput { return v.EncryptionScopeOverrideEnabled }).(pulumi.BoolPtrOutput)
}
// Is there an Immutability Policy configured on this Storage Container?
func (o ContainerOutput) HasImmutabilityPolicy() pulumi.BoolOutput {
return o.ApplyT(func(v *Container) pulumi.BoolOutput { return v.HasImmutabilityPolicy }).(pulumi.BoolOutput)
}
// Is there a Legal Hold configured on this Storage Container?
func (o ContainerOutput) HasLegalHold() pulumi.BoolOutput {
return o.ApplyT(func(v *Container) pulumi.BoolOutput { return v.HasLegalHold }).(pulumi.BoolOutput)
}
// A mapping of MetaData for this Container. All metadata keys should be lowercase.
func (o ContainerOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v *Container) pulumi.StringMapOutput { return v.Metadata }).(pulumi.StringMapOutput)
}
// The name of the Container which should be created within the Storage Account. Changing this forces a new resource to be created.
func (o ContainerOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Container) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The Resource Manager ID of this Storage Container.
//
// Deprecated: this property has been deprecated in favour of `id` and will be removed in version 5.0 of the Provider.
func (o ContainerOutput) ResourceManagerId() pulumi.StringOutput {
return o.ApplyT(func(v *Container) pulumi.StringOutput { return v.ResourceManagerId }).(pulumi.StringOutput)
}
// The name of the Storage Account where the Container should be created.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
func (o ContainerOutput) StorageAccountId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Container) pulumi.StringPtrOutput { return v.StorageAccountId }).(pulumi.StringPtrOutput)
}
// The name of the Storage Account where the Container should be created. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
func (o ContainerOutput) StorageAccountName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Container) pulumi.StringPtrOutput { return v.StorageAccountName }).(pulumi.StringPtrOutput)
}
type ContainerArrayOutput struct{ *pulumi.OutputState }
func (ContainerArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Container)(nil)).Elem()
}
func (o ContainerArrayOutput) ToContainerArrayOutput() ContainerArrayOutput {
return o
}
func (o ContainerArrayOutput) ToContainerArrayOutputWithContext(ctx context.Context) ContainerArrayOutput {
return o
}
func (o ContainerArrayOutput) Index(i pulumi.IntInput) ContainerOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Container {
return vs[0].([]*Container)[vs[1].(int)]
}).(ContainerOutput)
}
type ContainerMapOutput struct{ *pulumi.OutputState }
func (ContainerMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Container)(nil)).Elem()
}
func (o ContainerMapOutput) ToContainerMapOutput() ContainerMapOutput {
return o
}
func (o ContainerMapOutput) ToContainerMapOutputWithContext(ctx context.Context) ContainerMapOutput {
return o
}
func (o ContainerMapOutput) MapIndex(k pulumi.StringInput) ContainerOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Container {
return vs[0].(map[string]*Container)[vs[1].(string)]
}).(ContainerOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ContainerInput)(nil)).Elem(), &Container{})
pulumi.RegisterInputType(reflect.TypeOf((*ContainerArrayInput)(nil)).Elem(), ContainerArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ContainerMapInput)(nil)).Elem(), ContainerMap{})
pulumi.RegisterOutputType(ContainerOutput{})
pulumi.RegisterOutputType(ContainerArrayOutput{})
pulumi.RegisterOutputType(ContainerMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/getAccountSAS.go | sdk/go/azure/storage/getAccountSAS.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
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 Storage Account.
//
// Shared access signatures allow fine-grained, ephemeral access control to various aspects of an Azure Storage Account.
//
// Note that this is an [Account SAS](https://docs.microsoft.com/rest/api/storageservices/constructing-an-account-sas)
// and *not* a [Service SAS](https://docs.microsoft.com/rest/api/storageservices/constructing-a-service-sas).
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("resourceGroupName"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("storageaccountname"),
// ResourceGroupName: exampleResourceGroup.Name,
// Location: exampleResourceGroup.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("staging"),
// },
// })
// if err != nil {
// return err
// }
// example := storage.GetAccountSASOutput(ctx, storage.GetAccountSASOutputArgs{
// ConnectionString: exampleAccount.PrimaryConnectionString,
// HttpsOnly: pulumi.Bool(true),
// SignedVersion: pulumi.String("2022-11-02"),
// ResourceTypes: &storage.GetAccountSASResourceTypesArgs{
// Service: pulumi.Bool(true),
// Container: pulumi.Bool(false),
// Object: pulumi.Bool(false),
// },
// Services: &storage.GetAccountSASServicesArgs{
// Blob: pulumi.Bool(true),
// Queue: pulumi.Bool(false),
// Table: pulumi.Bool(false),
// File: pulumi.Bool(false),
// },
// Start: pulumi.String("2018-03-21T00:00:00Z"),
// Expiry: pulumi.String("2020-03-21T00:00:00Z"),
// Permissions: &storage.GetAccountSASPermissionsArgs{
// Read: pulumi.Bool(true),
// Write: pulumi.Bool(true),
// Delete: pulumi.Bool(false),
// List: pulumi.Bool(false),
// Add: pulumi.Bool(true),
// Create: pulumi.Bool(true),
// Update: pulumi.Bool(false),
// Process: pulumi.Bool(false),
// Tag: pulumi.Bool(false),
// Filter: pulumi.Bool(false),
// },
// }, nil)
// ctx.Export("sasUrlQueryString", example.ApplyT(func(example storage.GetAccountSASResult) (*string, error) {
// return &example.Sas, nil
// }).(pulumi.StringPtrOutput))
// return nil
// })
// }
//
// ```
func GetAccountSAS(ctx *pulumi.Context, args *GetAccountSASArgs, opts ...pulumi.InvokeOption) (*GetAccountSASResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetAccountSASResult
err := ctx.Invoke("azure:storage/getAccountSAS:getAccountSAS", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAccountSAS.
type GetAccountSASArgs struct {
// The connection string for the storage account to which this SAS applies. Typically directly from the `primaryConnectionString` attribute of a `storage.Account` resource.
ConnectionString string `pulumi:"connectionString"`
// The expiration time and date of this SAS. Must be a valid ISO-8601 format time/date string.
//
// > **Note:** The [ISO-8601 Time offset from UTC](https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC) is currently not supported by the service, which will result into 409 error.
Expiry string `pulumi:"expiry"`
// Only permit `https` access. If `false`, both `http` and `https` are permitted. Defaults to `true`.
HttpsOnly *bool `pulumi:"httpsOnly"`
// IP address, or a range of IP addresses, from which to accept requests. When specifying a range, note that the range is inclusive.
IpAddresses *string `pulumi:"ipAddresses"`
// A `permissions` block as defined below.
Permissions GetAccountSASPermissions `pulumi:"permissions"`
// A `resourceTypes` block as defined below.
ResourceTypes GetAccountSASResourceTypes `pulumi:"resourceTypes"`
// A `services` block as defined below.
Services GetAccountSASServices `pulumi:"services"`
// Specifies the signed storage service version to use to authorize requests made with this account SAS. Defaults to `2022-11-02`.
SignedVersion *string `pulumi:"signedVersion"`
// The starting time and date of validity of this SAS. Must be a valid ISO-8601 format time/date string.
Start string `pulumi:"start"`
}
// A collection of values returned by getAccountSAS.
type GetAccountSASResult struct {
ConnectionString string `pulumi:"connectionString"`
Expiry string `pulumi:"expiry"`
HttpsOnly *bool `pulumi:"httpsOnly"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
IpAddresses *string `pulumi:"ipAddresses"`
Permissions GetAccountSASPermissions `pulumi:"permissions"`
ResourceTypes GetAccountSASResourceTypes `pulumi:"resourceTypes"`
// The computed Account Shared Access Signature (SAS).
Sas string `pulumi:"sas"`
Services GetAccountSASServices `pulumi:"services"`
SignedVersion *string `pulumi:"signedVersion"`
Start string `pulumi:"start"`
}
func GetAccountSASOutput(ctx *pulumi.Context, args GetAccountSASOutputArgs, opts ...pulumi.InvokeOption) GetAccountSASResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetAccountSASResultOutput, error) {
args := v.(GetAccountSASArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:storage/getAccountSAS:getAccountSAS", args, GetAccountSASResultOutput{}, options).(GetAccountSASResultOutput), nil
}).(GetAccountSASResultOutput)
}
// A collection of arguments for invoking getAccountSAS.
type GetAccountSASOutputArgs struct {
// The connection string for the storage account to which this SAS applies. Typically directly from the `primaryConnectionString` attribute of a `storage.Account` resource.
ConnectionString pulumi.StringInput `pulumi:"connectionString"`
// The expiration time and date of this SAS. Must be a valid ISO-8601 format time/date string.
//
// > **Note:** The [ISO-8601 Time offset from UTC](https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC) is currently not supported by the service, which will result into 409 error.
Expiry pulumi.StringInput `pulumi:"expiry"`
// Only permit `https` access. If `false`, both `http` and `https` are permitted. Defaults to `true`.
HttpsOnly pulumi.BoolPtrInput `pulumi:"httpsOnly"`
// IP address, or a range of IP addresses, from which to accept requests. When specifying a range, note that the range is inclusive.
IpAddresses pulumi.StringPtrInput `pulumi:"ipAddresses"`
// A `permissions` block as defined below.
Permissions GetAccountSASPermissionsInput `pulumi:"permissions"`
// A `resourceTypes` block as defined below.
ResourceTypes GetAccountSASResourceTypesInput `pulumi:"resourceTypes"`
// A `services` block as defined below.
Services GetAccountSASServicesInput `pulumi:"services"`
// Specifies the signed storage service version to use to authorize requests made with this account SAS. Defaults to `2022-11-02`.
SignedVersion pulumi.StringPtrInput `pulumi:"signedVersion"`
// The starting time and date of validity of this SAS. Must be a valid ISO-8601 format time/date string.
Start pulumi.StringInput `pulumi:"start"`
}
func (GetAccountSASOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetAccountSASArgs)(nil)).Elem()
}
// A collection of values returned by getAccountSAS.
type GetAccountSASResultOutput struct{ *pulumi.OutputState }
func (GetAccountSASResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetAccountSASResult)(nil)).Elem()
}
func (o GetAccountSASResultOutput) ToGetAccountSASResultOutput() GetAccountSASResultOutput {
return o
}
func (o GetAccountSASResultOutput) ToGetAccountSASResultOutputWithContext(ctx context.Context) GetAccountSASResultOutput {
return o
}
func (o GetAccountSASResultOutput) ConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v GetAccountSASResult) string { return v.ConnectionString }).(pulumi.StringOutput)
}
func (o GetAccountSASResultOutput) Expiry() pulumi.StringOutput {
return o.ApplyT(func(v GetAccountSASResult) string { return v.Expiry }).(pulumi.StringOutput)
}
func (o GetAccountSASResultOutput) HttpsOnly() pulumi.BoolPtrOutput {
return o.ApplyT(func(v GetAccountSASResult) *bool { return v.HttpsOnly }).(pulumi.BoolPtrOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetAccountSASResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetAccountSASResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetAccountSASResultOutput) IpAddresses() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetAccountSASResult) *string { return v.IpAddresses }).(pulumi.StringPtrOutput)
}
func (o GetAccountSASResultOutput) Permissions() GetAccountSASPermissionsOutput {
return o.ApplyT(func(v GetAccountSASResult) GetAccountSASPermissions { return v.Permissions }).(GetAccountSASPermissionsOutput)
}
func (o GetAccountSASResultOutput) ResourceTypes() GetAccountSASResourceTypesOutput {
return o.ApplyT(func(v GetAccountSASResult) GetAccountSASResourceTypes { return v.ResourceTypes }).(GetAccountSASResourceTypesOutput)
}
// The computed Account Shared Access Signature (SAS).
func (o GetAccountSASResultOutput) Sas() pulumi.StringOutput {
return o.ApplyT(func(v GetAccountSASResult) string { return v.Sas }).(pulumi.StringOutput)
}
func (o GetAccountSASResultOutput) Services() GetAccountSASServicesOutput {
return o.ApplyT(func(v GetAccountSASResult) GetAccountSASServices { return v.Services }).(GetAccountSASServicesOutput)
}
func (o GetAccountSASResultOutput) SignedVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetAccountSASResult) *string { return v.SignedVersion }).(pulumi.StringPtrOutput)
}
func (o GetAccountSASResultOutput) Start() pulumi.StringOutput {
return o.ApplyT(func(v GetAccountSASResult) string { return v.Start }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetAccountSASResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/getPolicy.go | sdk/go/azure/storage/getPolicy.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
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 Storage Management Policy.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := storage.LookupAccount(ctx, &storage.LookupAccountArgs{
// Name: "storageaccountname",
// ResourceGroupName: pulumi.StringRef("resourcegroupname"),
// }, nil)
// if err != nil {
// return err
// }
// _, err = storage.GetPolicy(ctx, &storage.GetPolicyArgs{
// StorageAccountId: example.Id,
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Storage` - 2023-05-01
func GetPolicy(ctx *pulumi.Context, args *GetPolicyArgs, opts ...pulumi.InvokeOption) (*GetPolicyResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetPolicyResult
err := ctx.Invoke("azure:storage/getPolicy:getPolicy", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getPolicy.
type GetPolicyArgs struct {
// Specifies the id of the storage account to retrieve the management policy for.
StorageAccountId string `pulumi:"storageAccountId"`
}
// A collection of values returned by getPolicy.
type GetPolicyResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// supports the following:
Rules []GetPolicyRule `pulumi:"rules"`
StorageAccountId string `pulumi:"storageAccountId"`
}
func GetPolicyOutput(ctx *pulumi.Context, args GetPolicyOutputArgs, opts ...pulumi.InvokeOption) GetPolicyResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetPolicyResultOutput, error) {
args := v.(GetPolicyArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:storage/getPolicy:getPolicy", args, GetPolicyResultOutput{}, options).(GetPolicyResultOutput), nil
}).(GetPolicyResultOutput)
}
// A collection of arguments for invoking getPolicy.
type GetPolicyOutputArgs struct {
// Specifies the id of the storage account to retrieve the management policy for.
StorageAccountId pulumi.StringInput `pulumi:"storageAccountId"`
}
func (GetPolicyOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetPolicyArgs)(nil)).Elem()
}
// A collection of values returned by getPolicy.
type GetPolicyResultOutput struct{ *pulumi.OutputState }
func (GetPolicyResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetPolicyResult)(nil)).Elem()
}
func (o GetPolicyResultOutput) ToGetPolicyResultOutput() GetPolicyResultOutput {
return o
}
func (o GetPolicyResultOutput) ToGetPolicyResultOutputWithContext(ctx context.Context) GetPolicyResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o GetPolicyResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetPolicyResult) string { return v.Id }).(pulumi.StringOutput)
}
// supports the following:
func (o GetPolicyResultOutput) Rules() GetPolicyRuleArrayOutput {
return o.ApplyT(func(v GetPolicyResult) []GetPolicyRule { return v.Rules }).(GetPolicyRuleArrayOutput)
}
func (o GetPolicyResultOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v GetPolicyResult) string { return v.StorageAccountId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetPolicyResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/getContainers.go | sdk/go/azure/storage/getContainers.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about the existing Storage Containers within a Storage Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := storage.GetContainers(ctx, &storage.GetContainersArgs{
// StorageAccountId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/sa1",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("containerId", example.Containers[0].ResourceManagerId)
// return nil
// })
// }
//
// ```
func GetContainers(ctx *pulumi.Context, args *GetContainersArgs, opts ...pulumi.InvokeOption) (*GetContainersResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetContainersResult
err := ctx.Invoke("azure:storage/getContainers:getContainers", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getContainers.
type GetContainersArgs struct {
// A prefix match used for the Storage Container `name` field.
NamePrefix *string `pulumi:"namePrefix"`
// The ID of the Storage Account that the Storage Containers reside in.
StorageAccountId string `pulumi:"storageAccountId"`
}
// A collection of values returned by getContainers.
type GetContainersResult struct {
// A `containers` block as defined below.
Containers []GetContainersContainer `pulumi:"containers"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
NamePrefix *string `pulumi:"namePrefix"`
StorageAccountId string `pulumi:"storageAccountId"`
}
func GetContainersOutput(ctx *pulumi.Context, args GetContainersOutputArgs, opts ...pulumi.InvokeOption) GetContainersResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetContainersResultOutput, error) {
args := v.(GetContainersArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:storage/getContainers:getContainers", args, GetContainersResultOutput{}, options).(GetContainersResultOutput), nil
}).(GetContainersResultOutput)
}
// A collection of arguments for invoking getContainers.
type GetContainersOutputArgs struct {
// A prefix match used for the Storage Container `name` field.
NamePrefix pulumi.StringPtrInput `pulumi:"namePrefix"`
// The ID of the Storage Account that the Storage Containers reside in.
StorageAccountId pulumi.StringInput `pulumi:"storageAccountId"`
}
func (GetContainersOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetContainersArgs)(nil)).Elem()
}
// A collection of values returned by getContainers.
type GetContainersResultOutput struct{ *pulumi.OutputState }
func (GetContainersResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetContainersResult)(nil)).Elem()
}
func (o GetContainersResultOutput) ToGetContainersResultOutput() GetContainersResultOutput {
return o
}
func (o GetContainersResultOutput) ToGetContainersResultOutputWithContext(ctx context.Context) GetContainersResultOutput {
return o
}
// A `containers` block as defined below.
func (o GetContainersResultOutput) Containers() GetContainersContainerArrayOutput {
return o.ApplyT(func(v GetContainersResult) []GetContainersContainer { return v.Containers }).(GetContainersContainerArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetContainersResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetContainersResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetContainersResultOutput) NamePrefix() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetContainersResult) *string { return v.NamePrefix }).(pulumi.StringPtrOutput)
}
func (o GetContainersResultOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v GetContainersResult) string { return v.StorageAccountId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetContainersResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/shareDirectory.go | sdk/go/azure/storage/shareDirectory.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("azuretest"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("azureteststorage"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleShare, err := storage.NewShare(ctx, "example", &storage.ShareArgs{
// Name: pulumi.String("sharename"),
// StorageAccountId: exampleAccount.ID(),
// Quota: pulumi.Int(50),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewShareDirectory(ctx, "example", &storage.ShareDirectoryArgs{
// Name: pulumi.String("example"),
// StorageShareUrl: exampleShare.Url,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Directories within an Azure Storage File Share can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/shareDirectory:ShareDirectory example https://tomdevsa20.file.core.windows.net/share1/directory1
// ```
type ShareDirectory struct {
pulumi.CustomResourceState
// A mapping of metadata to assign to this Directory.
Metadata pulumi.StringMapOutput `pulumi:"metadata"`
// The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Deprecated: This property has been deprecated in favour of `storageShareUrl` and will be removed in version 5.0 of the Provider.
StorageShareId pulumi.StringOutput `pulumi:"storageShareId"`
// The Storage Share URL in which this file will be placed into. Changing this forces a new resource to be created.
StorageShareUrl pulumi.StringOutput `pulumi:"storageShareUrl"`
}
// NewShareDirectory registers a new resource with the given unique name, arguments, and options.
func NewShareDirectory(ctx *pulumi.Context,
name string, args *ShareDirectoryArgs, opts ...pulumi.ResourceOption) (*ShareDirectory, error) {
if args == nil {
args = &ShareDirectoryArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ShareDirectory
err := ctx.RegisterResource("azure:storage/shareDirectory:ShareDirectory", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetShareDirectory gets an existing ShareDirectory resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetShareDirectory(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ShareDirectoryState, opts ...pulumi.ResourceOption) (*ShareDirectory, error) {
var resource ShareDirectory
err := ctx.ReadResource("azure:storage/shareDirectory:ShareDirectory", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ShareDirectory resources.
type shareDirectoryState struct {
// A mapping of metadata to assign to this Directory.
Metadata map[string]string `pulumi:"metadata"`
// The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Deprecated: This property has been deprecated in favour of `storageShareUrl` and will be removed in version 5.0 of the Provider.
StorageShareId *string `pulumi:"storageShareId"`
// The Storage Share URL in which this file will be placed into. Changing this forces a new resource to be created.
StorageShareUrl *string `pulumi:"storageShareUrl"`
}
type ShareDirectoryState struct {
// A mapping of metadata to assign to this Directory.
Metadata pulumi.StringMapInput
// The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Deprecated: This property has been deprecated in favour of `storageShareUrl` and will be removed in version 5.0 of the Provider.
StorageShareId pulumi.StringPtrInput
// The Storage Share URL in which this file will be placed into. Changing this forces a new resource to be created.
StorageShareUrl pulumi.StringPtrInput
}
func (ShareDirectoryState) ElementType() reflect.Type {
return reflect.TypeOf((*shareDirectoryState)(nil)).Elem()
}
type shareDirectoryArgs struct {
// A mapping of metadata to assign to this Directory.
Metadata map[string]string `pulumi:"metadata"`
// The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Deprecated: This property has been deprecated in favour of `storageShareUrl` and will be removed in version 5.0 of the Provider.
StorageShareId *string `pulumi:"storageShareId"`
// The Storage Share URL in which this file will be placed into. Changing this forces a new resource to be created.
StorageShareUrl *string `pulumi:"storageShareUrl"`
}
// The set of arguments for constructing a ShareDirectory resource.
type ShareDirectoryArgs struct {
// A mapping of metadata to assign to this Directory.
Metadata pulumi.StringMapInput
// The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Deprecated: This property has been deprecated in favour of `storageShareUrl` and will be removed in version 5.0 of the Provider.
StorageShareId pulumi.StringPtrInput
// The Storage Share URL in which this file will be placed into. Changing this forces a new resource to be created.
StorageShareUrl pulumi.StringPtrInput
}
func (ShareDirectoryArgs) ElementType() reflect.Type {
return reflect.TypeOf((*shareDirectoryArgs)(nil)).Elem()
}
type ShareDirectoryInput interface {
pulumi.Input
ToShareDirectoryOutput() ShareDirectoryOutput
ToShareDirectoryOutputWithContext(ctx context.Context) ShareDirectoryOutput
}
func (*ShareDirectory) ElementType() reflect.Type {
return reflect.TypeOf((**ShareDirectory)(nil)).Elem()
}
func (i *ShareDirectory) ToShareDirectoryOutput() ShareDirectoryOutput {
return i.ToShareDirectoryOutputWithContext(context.Background())
}
func (i *ShareDirectory) ToShareDirectoryOutputWithContext(ctx context.Context) ShareDirectoryOutput {
return pulumi.ToOutputWithContext(ctx, i).(ShareDirectoryOutput)
}
// ShareDirectoryArrayInput is an input type that accepts ShareDirectoryArray and ShareDirectoryArrayOutput values.
// You can construct a concrete instance of `ShareDirectoryArrayInput` via:
//
// ShareDirectoryArray{ ShareDirectoryArgs{...} }
type ShareDirectoryArrayInput interface {
pulumi.Input
ToShareDirectoryArrayOutput() ShareDirectoryArrayOutput
ToShareDirectoryArrayOutputWithContext(context.Context) ShareDirectoryArrayOutput
}
type ShareDirectoryArray []ShareDirectoryInput
func (ShareDirectoryArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ShareDirectory)(nil)).Elem()
}
func (i ShareDirectoryArray) ToShareDirectoryArrayOutput() ShareDirectoryArrayOutput {
return i.ToShareDirectoryArrayOutputWithContext(context.Background())
}
func (i ShareDirectoryArray) ToShareDirectoryArrayOutputWithContext(ctx context.Context) ShareDirectoryArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ShareDirectoryArrayOutput)
}
// ShareDirectoryMapInput is an input type that accepts ShareDirectoryMap and ShareDirectoryMapOutput values.
// You can construct a concrete instance of `ShareDirectoryMapInput` via:
//
// ShareDirectoryMap{ "key": ShareDirectoryArgs{...} }
type ShareDirectoryMapInput interface {
pulumi.Input
ToShareDirectoryMapOutput() ShareDirectoryMapOutput
ToShareDirectoryMapOutputWithContext(context.Context) ShareDirectoryMapOutput
}
type ShareDirectoryMap map[string]ShareDirectoryInput
func (ShareDirectoryMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ShareDirectory)(nil)).Elem()
}
func (i ShareDirectoryMap) ToShareDirectoryMapOutput() ShareDirectoryMapOutput {
return i.ToShareDirectoryMapOutputWithContext(context.Background())
}
func (i ShareDirectoryMap) ToShareDirectoryMapOutputWithContext(ctx context.Context) ShareDirectoryMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ShareDirectoryMapOutput)
}
type ShareDirectoryOutput struct{ *pulumi.OutputState }
func (ShareDirectoryOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ShareDirectory)(nil)).Elem()
}
func (o ShareDirectoryOutput) ToShareDirectoryOutput() ShareDirectoryOutput {
return o
}
func (o ShareDirectoryOutput) ToShareDirectoryOutputWithContext(ctx context.Context) ShareDirectoryOutput {
return o
}
// A mapping of metadata to assign to this Directory.
func (o ShareDirectoryOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v *ShareDirectory) pulumi.StringMapOutput { return v.Metadata }).(pulumi.StringMapOutput)
}
// The name (or path) of the Directory that should be created within this File Share. Changing this forces a new resource to be created.
func (o ShareDirectoryOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ShareDirectory) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Deprecated: This property has been deprecated in favour of `storageShareUrl` and will be removed in version 5.0 of the Provider.
func (o ShareDirectoryOutput) StorageShareId() pulumi.StringOutput {
return o.ApplyT(func(v *ShareDirectory) pulumi.StringOutput { return v.StorageShareId }).(pulumi.StringOutput)
}
// The Storage Share URL in which this file will be placed into. Changing this forces a new resource to be created.
func (o ShareDirectoryOutput) StorageShareUrl() pulumi.StringOutput {
return o.ApplyT(func(v *ShareDirectory) pulumi.StringOutput { return v.StorageShareUrl }).(pulumi.StringOutput)
}
type ShareDirectoryArrayOutput struct{ *pulumi.OutputState }
func (ShareDirectoryArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ShareDirectory)(nil)).Elem()
}
func (o ShareDirectoryArrayOutput) ToShareDirectoryArrayOutput() ShareDirectoryArrayOutput {
return o
}
func (o ShareDirectoryArrayOutput) ToShareDirectoryArrayOutputWithContext(ctx context.Context) ShareDirectoryArrayOutput {
return o
}
func (o ShareDirectoryArrayOutput) Index(i pulumi.IntInput) ShareDirectoryOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ShareDirectory {
return vs[0].([]*ShareDirectory)[vs[1].(int)]
}).(ShareDirectoryOutput)
}
type ShareDirectoryMapOutput struct{ *pulumi.OutputState }
func (ShareDirectoryMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ShareDirectory)(nil)).Elem()
}
func (o ShareDirectoryMapOutput) ToShareDirectoryMapOutput() ShareDirectoryMapOutput {
return o
}
func (o ShareDirectoryMapOutput) ToShareDirectoryMapOutputWithContext(ctx context.Context) ShareDirectoryMapOutput {
return o
}
func (o ShareDirectoryMapOutput) MapIndex(k pulumi.StringInput) ShareDirectoryOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ShareDirectory {
return vs[0].(map[string]*ShareDirectory)[vs[1].(string)]
}).(ShareDirectoryOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ShareDirectoryInput)(nil)).Elem(), &ShareDirectory{})
pulumi.RegisterInputType(reflect.TypeOf((*ShareDirectoryArrayInput)(nil)).Elem(), ShareDirectoryArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ShareDirectoryMapInput)(nil)).Elem(), ShareDirectoryMap{})
pulumi.RegisterOutputType(ShareDirectoryOutput{})
pulumi.RegisterOutputType(ShareDirectoryArrayOutput{})
pulumi.RegisterOutputType(ShareDirectoryMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/objectReplication.go | sdk/go/azure/storage/objectReplication.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Storage Object Replication.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// src, err := core.NewResourceGroup(ctx, "src", &core.ResourceGroupArgs{
// Name: pulumi.String("srcResourceGroupName"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// srcAccount, err := storage.NewAccount(ctx, "src", &storage.AccountArgs{
// Name: pulumi.String("srcstorageaccount"),
// ResourceGroupName: src.Name,
// Location: src.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// BlobProperties: &storage.AccountBlobPropertiesArgs{
// VersioningEnabled: pulumi.Bool(true),
// ChangeFeedEnabled: pulumi.Bool(true),
// },
// })
// if err != nil {
// return err
// }
// srcContainer, err := storage.NewContainer(ctx, "src", &storage.ContainerArgs{
// Name: pulumi.String("srcstrcontainer"),
// StorageAccountName: srcAccount.Name,
// ContainerAccessType: pulumi.String("private"),
// })
// if err != nil {
// return err
// }
// dst, err := core.NewResourceGroup(ctx, "dst", &core.ResourceGroupArgs{
// Name: pulumi.String("dstResourceGroupName"),
// Location: pulumi.String("East US"),
// })
// if err != nil {
// return err
// }
// dstAccount, err := storage.NewAccount(ctx, "dst", &storage.AccountArgs{
// Name: pulumi.String("dststorageaccount"),
// ResourceGroupName: dst.Name,
// Location: dst.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// BlobProperties: &storage.AccountBlobPropertiesArgs{
// VersioningEnabled: pulumi.Bool(true),
// ChangeFeedEnabled: pulumi.Bool(true),
// },
// })
// if err != nil {
// return err
// }
// dstContainer, err := storage.NewContainer(ctx, "dst", &storage.ContainerArgs{
// Name: pulumi.String("dststrcontainer"),
// StorageAccountName: dstAccount.Name,
// ContainerAccessType: pulumi.String("private"),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewObjectReplication(ctx, "example", &storage.ObjectReplicationArgs{
// SourceStorageAccountId: srcAccount.ID(),
// DestinationStorageAccountId: dstAccount.ID(),
// Rules: storage.ObjectReplicationRuleArray{
// &storage.ObjectReplicationRuleArgs{
// SourceContainerName: srcContainer.Name,
// DestinationContainerName: dstContainer.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.Storage` - 2023-05-01
//
// ## Import
//
// Storage Object Replication Policies can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/objectReplication:ObjectReplication example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Storage/storageAccounts/storageAccount1/objectReplicationPolicies/objectReplicationPolicy1;/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group2/providers/Microsoft.Storage/storageAccounts/storageAccount2/objectReplicationPolicies/objectReplicationPolicy2
// ```
type ObjectReplication struct {
pulumi.CustomResourceState
// The ID of the Object Replication in the destination storage account.
DestinationObjectReplicationId pulumi.StringOutput `pulumi:"destinationObjectReplicationId"`
// The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
DestinationStorageAccountId pulumi.StringOutput `pulumi:"destinationStorageAccountId"`
// One or more `rules` blocks as defined below.
Rules ObjectReplicationRuleArrayOutput `pulumi:"rules"`
// The ID of the Object Replication in the source storage account.
SourceObjectReplicationId pulumi.StringOutput `pulumi:"sourceObjectReplicationId"`
// The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
SourceStorageAccountId pulumi.StringOutput `pulumi:"sourceStorageAccountId"`
}
// NewObjectReplication registers a new resource with the given unique name, arguments, and options.
func NewObjectReplication(ctx *pulumi.Context,
name string, args *ObjectReplicationArgs, opts ...pulumi.ResourceOption) (*ObjectReplication, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DestinationStorageAccountId == nil {
return nil, errors.New("invalid value for required argument 'DestinationStorageAccountId'")
}
if args.Rules == nil {
return nil, errors.New("invalid value for required argument 'Rules'")
}
if args.SourceStorageAccountId == nil {
return nil, errors.New("invalid value for required argument 'SourceStorageAccountId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ObjectReplication
err := ctx.RegisterResource("azure:storage/objectReplication:ObjectReplication", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetObjectReplication gets an existing ObjectReplication resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetObjectReplication(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ObjectReplicationState, opts ...pulumi.ResourceOption) (*ObjectReplication, error) {
var resource ObjectReplication
err := ctx.ReadResource("azure:storage/objectReplication:ObjectReplication", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ObjectReplication resources.
type objectReplicationState struct {
// The ID of the Object Replication in the destination storage account.
DestinationObjectReplicationId *string `pulumi:"destinationObjectReplicationId"`
// The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
DestinationStorageAccountId *string `pulumi:"destinationStorageAccountId"`
// One or more `rules` blocks as defined below.
Rules []ObjectReplicationRule `pulumi:"rules"`
// The ID of the Object Replication in the source storage account.
SourceObjectReplicationId *string `pulumi:"sourceObjectReplicationId"`
// The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
SourceStorageAccountId *string `pulumi:"sourceStorageAccountId"`
}
type ObjectReplicationState struct {
// The ID of the Object Replication in the destination storage account.
DestinationObjectReplicationId pulumi.StringPtrInput
// The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
DestinationStorageAccountId pulumi.StringPtrInput
// One or more `rules` blocks as defined below.
Rules ObjectReplicationRuleArrayInput
// The ID of the Object Replication in the source storage account.
SourceObjectReplicationId pulumi.StringPtrInput
// The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
SourceStorageAccountId pulumi.StringPtrInput
}
func (ObjectReplicationState) ElementType() reflect.Type {
return reflect.TypeOf((*objectReplicationState)(nil)).Elem()
}
type objectReplicationArgs struct {
// The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
DestinationStorageAccountId string `pulumi:"destinationStorageAccountId"`
// One or more `rules` blocks as defined below.
Rules []ObjectReplicationRule `pulumi:"rules"`
// The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
SourceStorageAccountId string `pulumi:"sourceStorageAccountId"`
}
// The set of arguments for constructing a ObjectReplication resource.
type ObjectReplicationArgs struct {
// The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
DestinationStorageAccountId pulumi.StringInput
// One or more `rules` blocks as defined below.
Rules ObjectReplicationRuleArrayInput
// The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
SourceStorageAccountId pulumi.StringInput
}
func (ObjectReplicationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*objectReplicationArgs)(nil)).Elem()
}
type ObjectReplicationInput interface {
pulumi.Input
ToObjectReplicationOutput() ObjectReplicationOutput
ToObjectReplicationOutputWithContext(ctx context.Context) ObjectReplicationOutput
}
func (*ObjectReplication) ElementType() reflect.Type {
return reflect.TypeOf((**ObjectReplication)(nil)).Elem()
}
func (i *ObjectReplication) ToObjectReplicationOutput() ObjectReplicationOutput {
return i.ToObjectReplicationOutputWithContext(context.Background())
}
func (i *ObjectReplication) ToObjectReplicationOutputWithContext(ctx context.Context) ObjectReplicationOutput {
return pulumi.ToOutputWithContext(ctx, i).(ObjectReplicationOutput)
}
// ObjectReplicationArrayInput is an input type that accepts ObjectReplicationArray and ObjectReplicationArrayOutput values.
// You can construct a concrete instance of `ObjectReplicationArrayInput` via:
//
// ObjectReplicationArray{ ObjectReplicationArgs{...} }
type ObjectReplicationArrayInput interface {
pulumi.Input
ToObjectReplicationArrayOutput() ObjectReplicationArrayOutput
ToObjectReplicationArrayOutputWithContext(context.Context) ObjectReplicationArrayOutput
}
type ObjectReplicationArray []ObjectReplicationInput
func (ObjectReplicationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ObjectReplication)(nil)).Elem()
}
func (i ObjectReplicationArray) ToObjectReplicationArrayOutput() ObjectReplicationArrayOutput {
return i.ToObjectReplicationArrayOutputWithContext(context.Background())
}
func (i ObjectReplicationArray) ToObjectReplicationArrayOutputWithContext(ctx context.Context) ObjectReplicationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ObjectReplicationArrayOutput)
}
// ObjectReplicationMapInput is an input type that accepts ObjectReplicationMap and ObjectReplicationMapOutput values.
// You can construct a concrete instance of `ObjectReplicationMapInput` via:
//
// ObjectReplicationMap{ "key": ObjectReplicationArgs{...} }
type ObjectReplicationMapInput interface {
pulumi.Input
ToObjectReplicationMapOutput() ObjectReplicationMapOutput
ToObjectReplicationMapOutputWithContext(context.Context) ObjectReplicationMapOutput
}
type ObjectReplicationMap map[string]ObjectReplicationInput
func (ObjectReplicationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ObjectReplication)(nil)).Elem()
}
func (i ObjectReplicationMap) ToObjectReplicationMapOutput() ObjectReplicationMapOutput {
return i.ToObjectReplicationMapOutputWithContext(context.Background())
}
func (i ObjectReplicationMap) ToObjectReplicationMapOutputWithContext(ctx context.Context) ObjectReplicationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ObjectReplicationMapOutput)
}
type ObjectReplicationOutput struct{ *pulumi.OutputState }
func (ObjectReplicationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ObjectReplication)(nil)).Elem()
}
func (o ObjectReplicationOutput) ToObjectReplicationOutput() ObjectReplicationOutput {
return o
}
func (o ObjectReplicationOutput) ToObjectReplicationOutputWithContext(ctx context.Context) ObjectReplicationOutput {
return o
}
// The ID of the Object Replication in the destination storage account.
func (o ObjectReplicationOutput) DestinationObjectReplicationId() pulumi.StringOutput {
return o.ApplyT(func(v *ObjectReplication) pulumi.StringOutput { return v.DestinationObjectReplicationId }).(pulumi.StringOutput)
}
// The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
func (o ObjectReplicationOutput) DestinationStorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *ObjectReplication) pulumi.StringOutput { return v.DestinationStorageAccountId }).(pulumi.StringOutput)
}
// One or more `rules` blocks as defined below.
func (o ObjectReplicationOutput) Rules() ObjectReplicationRuleArrayOutput {
return o.ApplyT(func(v *ObjectReplication) ObjectReplicationRuleArrayOutput { return v.Rules }).(ObjectReplicationRuleArrayOutput)
}
// The ID of the Object Replication in the source storage account.
func (o ObjectReplicationOutput) SourceObjectReplicationId() pulumi.StringOutput {
return o.ApplyT(func(v *ObjectReplication) pulumi.StringOutput { return v.SourceObjectReplicationId }).(pulumi.StringOutput)
}
// The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
func (o ObjectReplicationOutput) SourceStorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *ObjectReplication) pulumi.StringOutput { return v.SourceStorageAccountId }).(pulumi.StringOutput)
}
type ObjectReplicationArrayOutput struct{ *pulumi.OutputState }
func (ObjectReplicationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ObjectReplication)(nil)).Elem()
}
func (o ObjectReplicationArrayOutput) ToObjectReplicationArrayOutput() ObjectReplicationArrayOutput {
return o
}
func (o ObjectReplicationArrayOutput) ToObjectReplicationArrayOutputWithContext(ctx context.Context) ObjectReplicationArrayOutput {
return o
}
func (o ObjectReplicationArrayOutput) Index(i pulumi.IntInput) ObjectReplicationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ObjectReplication {
return vs[0].([]*ObjectReplication)[vs[1].(int)]
}).(ObjectReplicationOutput)
}
type ObjectReplicationMapOutput struct{ *pulumi.OutputState }
func (ObjectReplicationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ObjectReplication)(nil)).Elem()
}
func (o ObjectReplicationMapOutput) ToObjectReplicationMapOutput() ObjectReplicationMapOutput {
return o
}
func (o ObjectReplicationMapOutput) ToObjectReplicationMapOutputWithContext(ctx context.Context) ObjectReplicationMapOutput {
return o
}
func (o ObjectReplicationMapOutput) MapIndex(k pulumi.StringInput) ObjectReplicationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ObjectReplication {
return vs[0].(map[string]*ObjectReplication)[vs[1].(string)]
}).(ObjectReplicationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ObjectReplicationInput)(nil)).Elem(), &ObjectReplication{})
pulumi.RegisterInputType(reflect.TypeOf((*ObjectReplicationArrayInput)(nil)).Elem(), ObjectReplicationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ObjectReplicationMapInput)(nil)).Elem(), ObjectReplicationMap{})
pulumi.RegisterOutputType(ObjectReplicationOutput{})
pulumi.RegisterOutputType(ObjectReplicationArrayOutput{})
pulumi.RegisterOutputType(ObjectReplicationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/tableEntity.go | sdk/go/azure/storage/tableEntity.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Entity within a Table in an Azure Storage Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("azureexample"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("azureexamplestorage1"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleTable, err := storage.NewTable(ctx, "example", &storage.TableArgs{
// Name: pulumi.String("myexampletable"),
// StorageAccountName: exampleAccount.Name,
// })
// if err != nil {
// return err
// }
// _, err = storage.NewTableEntity(ctx, "example", &storage.TableEntityArgs{
// StorageTableId: exampleTable.ID(),
// PartitionKey: pulumi.String("examplepartition"),
// RowKey: pulumi.String("examplerow"),
// Entity: pulumi.StringMap{
// "example": pulumi.String("example"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Entities within a Table in an Azure Storage Account can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/tableEntity:TableEntity entity1 https://example.table.core.windows.net/table1(PartitionKey='samplepartition',RowKey='samplerow')
// ```
type TableEntity struct {
pulumi.CustomResourceState
// A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
Entity pulumi.StringMapOutput `pulumi:"entity"`
// The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
PartitionKey pulumi.StringOutput `pulumi:"partitionKey"`
// The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
RowKey pulumi.StringOutput `pulumi:"rowKey"`
// The Storage Share ID in which this file will be placed into.
StorageTableId pulumi.StringOutput `pulumi:"storageTableId"`
}
// NewTableEntity registers a new resource with the given unique name, arguments, and options.
func NewTableEntity(ctx *pulumi.Context,
name string, args *TableEntityArgs, opts ...pulumi.ResourceOption) (*TableEntity, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Entity == nil {
return nil, errors.New("invalid value for required argument 'Entity'")
}
if args.PartitionKey == nil {
return nil, errors.New("invalid value for required argument 'PartitionKey'")
}
if args.RowKey == nil {
return nil, errors.New("invalid value for required argument 'RowKey'")
}
if args.StorageTableId == nil {
return nil, errors.New("invalid value for required argument 'StorageTableId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource TableEntity
err := ctx.RegisterResource("azure:storage/tableEntity:TableEntity", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetTableEntity gets an existing TableEntity resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetTableEntity(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *TableEntityState, opts ...pulumi.ResourceOption) (*TableEntity, error) {
var resource TableEntity
err := ctx.ReadResource("azure:storage/tableEntity:TableEntity", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering TableEntity resources.
type tableEntityState struct {
// A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
Entity map[string]string `pulumi:"entity"`
// The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
PartitionKey *string `pulumi:"partitionKey"`
// The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
RowKey *string `pulumi:"rowKey"`
// The Storage Share ID in which this file will be placed into.
StorageTableId *string `pulumi:"storageTableId"`
}
type TableEntityState struct {
// A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
Entity pulumi.StringMapInput
// The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
PartitionKey pulumi.StringPtrInput
// The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
RowKey pulumi.StringPtrInput
// The Storage Share ID in which this file will be placed into.
StorageTableId pulumi.StringPtrInput
}
func (TableEntityState) ElementType() reflect.Type {
return reflect.TypeOf((*tableEntityState)(nil)).Elem()
}
type tableEntityArgs struct {
// A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
Entity map[string]string `pulumi:"entity"`
// The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
PartitionKey string `pulumi:"partitionKey"`
// The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
RowKey string `pulumi:"rowKey"`
// The Storage Share ID in which this file will be placed into.
StorageTableId string `pulumi:"storageTableId"`
}
// The set of arguments for constructing a TableEntity resource.
type TableEntityArgs struct {
// A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
Entity pulumi.StringMapInput
// The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
PartitionKey pulumi.StringInput
// The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
RowKey pulumi.StringInput
// The Storage Share ID in which this file will be placed into.
StorageTableId pulumi.StringInput
}
func (TableEntityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*tableEntityArgs)(nil)).Elem()
}
type TableEntityInput interface {
pulumi.Input
ToTableEntityOutput() TableEntityOutput
ToTableEntityOutputWithContext(ctx context.Context) TableEntityOutput
}
func (*TableEntity) ElementType() reflect.Type {
return reflect.TypeOf((**TableEntity)(nil)).Elem()
}
func (i *TableEntity) ToTableEntityOutput() TableEntityOutput {
return i.ToTableEntityOutputWithContext(context.Background())
}
func (i *TableEntity) ToTableEntityOutputWithContext(ctx context.Context) TableEntityOutput {
return pulumi.ToOutputWithContext(ctx, i).(TableEntityOutput)
}
// TableEntityArrayInput is an input type that accepts TableEntityArray and TableEntityArrayOutput values.
// You can construct a concrete instance of `TableEntityArrayInput` via:
//
// TableEntityArray{ TableEntityArgs{...} }
type TableEntityArrayInput interface {
pulumi.Input
ToTableEntityArrayOutput() TableEntityArrayOutput
ToTableEntityArrayOutputWithContext(context.Context) TableEntityArrayOutput
}
type TableEntityArray []TableEntityInput
func (TableEntityArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TableEntity)(nil)).Elem()
}
func (i TableEntityArray) ToTableEntityArrayOutput() TableEntityArrayOutput {
return i.ToTableEntityArrayOutputWithContext(context.Background())
}
func (i TableEntityArray) ToTableEntityArrayOutputWithContext(ctx context.Context) TableEntityArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TableEntityArrayOutput)
}
// TableEntityMapInput is an input type that accepts TableEntityMap and TableEntityMapOutput values.
// You can construct a concrete instance of `TableEntityMapInput` via:
//
// TableEntityMap{ "key": TableEntityArgs{...} }
type TableEntityMapInput interface {
pulumi.Input
ToTableEntityMapOutput() TableEntityMapOutput
ToTableEntityMapOutputWithContext(context.Context) TableEntityMapOutput
}
type TableEntityMap map[string]TableEntityInput
func (TableEntityMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TableEntity)(nil)).Elem()
}
func (i TableEntityMap) ToTableEntityMapOutput() TableEntityMapOutput {
return i.ToTableEntityMapOutputWithContext(context.Background())
}
func (i TableEntityMap) ToTableEntityMapOutputWithContext(ctx context.Context) TableEntityMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(TableEntityMapOutput)
}
type TableEntityOutput struct{ *pulumi.OutputState }
func (TableEntityOutput) ElementType() reflect.Type {
return reflect.TypeOf((**TableEntity)(nil)).Elem()
}
func (o TableEntityOutput) ToTableEntityOutput() TableEntityOutput {
return o
}
func (o TableEntityOutput) ToTableEntityOutputWithContext(ctx context.Context) TableEntityOutput {
return o
}
// A map of key/value pairs that describe the entity to be inserted/merged in to the storage table.
func (o TableEntityOutput) Entity() pulumi.StringMapOutput {
return o.ApplyT(func(v *TableEntity) pulumi.StringMapOutput { return v.Entity }).(pulumi.StringMapOutput)
}
// The key for the partition where the entity will be inserted/merged. Changing this forces a new resource to be created.
func (o TableEntityOutput) PartitionKey() pulumi.StringOutput {
return o.ApplyT(func(v *TableEntity) pulumi.StringOutput { return v.PartitionKey }).(pulumi.StringOutput)
}
// The key for the row where the entity will be inserted/merged. Changing this forces a new resource to be created.
func (o TableEntityOutput) RowKey() pulumi.StringOutput {
return o.ApplyT(func(v *TableEntity) pulumi.StringOutput { return v.RowKey }).(pulumi.StringOutput)
}
// The Storage Share ID in which this file will be placed into.
func (o TableEntityOutput) StorageTableId() pulumi.StringOutput {
return o.ApplyT(func(v *TableEntity) pulumi.StringOutput { return v.StorageTableId }).(pulumi.StringOutput)
}
type TableEntityArrayOutput struct{ *pulumi.OutputState }
func (TableEntityArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*TableEntity)(nil)).Elem()
}
func (o TableEntityArrayOutput) ToTableEntityArrayOutput() TableEntityArrayOutput {
return o
}
func (o TableEntityArrayOutput) ToTableEntityArrayOutputWithContext(ctx context.Context) TableEntityArrayOutput {
return o
}
func (o TableEntityArrayOutput) Index(i pulumi.IntInput) TableEntityOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TableEntity {
return vs[0].([]*TableEntity)[vs[1].(int)]
}).(TableEntityOutput)
}
type TableEntityMapOutput struct{ *pulumi.OutputState }
func (TableEntityMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*TableEntity)(nil)).Elem()
}
func (o TableEntityMapOutput) ToTableEntityMapOutput() TableEntityMapOutput {
return o
}
func (o TableEntityMapOutput) ToTableEntityMapOutputWithContext(ctx context.Context) TableEntityMapOutput {
return o
}
func (o TableEntityMapOutput) MapIndex(k pulumi.StringInput) TableEntityOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TableEntity {
return vs[0].(map[string]*TableEntity)[vs[1].(string)]
}).(TableEntityOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*TableEntityInput)(nil)).Elem(), &TableEntity{})
pulumi.RegisterInputType(reflect.TypeOf((*TableEntityArrayInput)(nil)).Elem(), TableEntityArray{})
pulumi.RegisterInputType(reflect.TypeOf((*TableEntityMapInput)(nil)).Elem(), TableEntityMap{})
pulumi.RegisterOutputType(TableEntityOutput{})
pulumi.RegisterOutputType(TableEntityArrayOutput{})
pulumi.RegisterOutputType(TableEntityMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/getEncryptionScope.go | sdk/go/azure/storage/getEncryptionScope.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
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 Storage Encryption Scope.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := storage.LookupAccount(ctx, &storage.LookupAccountArgs{
// Name: "storageaccountname",
// ResourceGroupName: pulumi.StringRef("resourcegroupname"),
// }, nil)
// if err != nil {
// return err
// }
// exampleGetEncryptionScope, err := storage.LookupEncryptionScope(ctx, &storage.LookupEncryptionScopeArgs{
// Name: "existingStorageES",
// StorageAccountId: example.Id,
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", exampleGetEncryptionScope.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Storage` - 2023-05-01
func LookupEncryptionScope(ctx *pulumi.Context, args *LookupEncryptionScopeArgs, opts ...pulumi.InvokeOption) (*LookupEncryptionScopeResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupEncryptionScopeResult
err := ctx.Invoke("azure:storage/getEncryptionScope:getEncryptionScope", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getEncryptionScope.
type LookupEncryptionScopeArgs struct {
// The name of this Storage Encryption Scope.
Name string `pulumi:"name"`
// The ID of the Storage Account where this Storage Encryption Scope exists.
StorageAccountId string `pulumi:"storageAccountId"`
}
// A collection of values returned by getEncryptionScope.
type LookupEncryptionScopeResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The ID of the Key Vault Key.
KeyVaultKeyId string `pulumi:"keyVaultKeyId"`
Name string `pulumi:"name"`
// The source of the Storage Encryption Scope.
Source string `pulumi:"source"`
StorageAccountId string `pulumi:"storageAccountId"`
}
func LookupEncryptionScopeOutput(ctx *pulumi.Context, args LookupEncryptionScopeOutputArgs, opts ...pulumi.InvokeOption) LookupEncryptionScopeResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupEncryptionScopeResultOutput, error) {
args := v.(LookupEncryptionScopeArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:storage/getEncryptionScope:getEncryptionScope", args, LookupEncryptionScopeResultOutput{}, options).(LookupEncryptionScopeResultOutput), nil
}).(LookupEncryptionScopeResultOutput)
}
// A collection of arguments for invoking getEncryptionScope.
type LookupEncryptionScopeOutputArgs struct {
// The name of this Storage Encryption Scope.
Name pulumi.StringInput `pulumi:"name"`
// The ID of the Storage Account where this Storage Encryption Scope exists.
StorageAccountId pulumi.StringInput `pulumi:"storageAccountId"`
}
func (LookupEncryptionScopeOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupEncryptionScopeArgs)(nil)).Elem()
}
// A collection of values returned by getEncryptionScope.
type LookupEncryptionScopeResultOutput struct{ *pulumi.OutputState }
func (LookupEncryptionScopeResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupEncryptionScopeResult)(nil)).Elem()
}
func (o LookupEncryptionScopeResultOutput) ToLookupEncryptionScopeResultOutput() LookupEncryptionScopeResultOutput {
return o
}
func (o LookupEncryptionScopeResultOutput) ToLookupEncryptionScopeResultOutputWithContext(ctx context.Context) LookupEncryptionScopeResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupEncryptionScopeResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupEncryptionScopeResult) string { return v.Id }).(pulumi.StringOutput)
}
// The ID of the Key Vault Key.
func (o LookupEncryptionScopeResultOutput) KeyVaultKeyId() pulumi.StringOutput {
return o.ApplyT(func(v LookupEncryptionScopeResult) string { return v.KeyVaultKeyId }).(pulumi.StringOutput)
}
func (o LookupEncryptionScopeResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupEncryptionScopeResult) string { return v.Name }).(pulumi.StringOutput)
}
// The source of the Storage Encryption Scope.
func (o LookupEncryptionScopeResultOutput) Source() pulumi.StringOutput {
return o.ApplyT(func(v LookupEncryptionScopeResult) string { return v.Source }).(pulumi.StringOutput)
}
func (o LookupEncryptionScopeResultOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v LookupEncryptionScopeResult) string { return v.StorageAccountId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupEncryptionScopeResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/getShare.go | sdk/go/azure/storage/getShare.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about an existing File Share.
//
// > **Note:** Shared Key authentication will always be used for this data source, as AzureAD authentication is not supported by the Storage API for files.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := storage.LookupAccount(ctx, &storage.LookupAccountArgs{
// Name: "exampleaccount",
// ResourceGroupName: pulumi.StringRef("examples"),
// }, nil)
// if err != nil {
// return err
// }
// _, err = storage.LookupShare(ctx, &storage.LookupShareArgs{
// Name: "existing",
// StorageAccountId: pulumi.StringRef(example.Id),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Storage` - 2023-05-01
func LookupShare(ctx *pulumi.Context, args *LookupShareArgs, opts ...pulumi.InvokeOption) (*LookupShareResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupShareResult
err := ctx.Invoke("azure:storage/getShare:getShare", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getShare.
type LookupShareArgs struct {
// One or more acl blocks as defined below.
Acls []GetShareAcl `pulumi:"acls"`
// A map of custom file share metadata.
Metadata map[string]string `pulumi:"metadata"`
// The name of the share.
Name string `pulumi:"name"`
// The ID of the storage account in which the share exists.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId *string `pulumi:"storageAccountId"`
// The name of the storage account in which the share exists. This property is deprecated in favour of `storageAccountId`.
StorageAccountName *string `pulumi:"storageAccountName"`
}
// A collection of values returned by getShare.
type LookupShareResult struct {
// One or more acl blocks as defined below.
Acls []GetShareAcl `pulumi:"acls"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A map of custom file share metadata.
Metadata map[string]string `pulumi:"metadata"`
Name string `pulumi:"name"`
// The quota of the File Share in GB.
Quota int `pulumi:"quota"`
// Deprecated: this property has been deprecated in favour of `id` and will be removed in version 5.0 of the Provider.
ResourceManagerId string `pulumi:"resourceManagerId"`
StorageAccountId *string `pulumi:"storageAccountId"`
StorageAccountName *string `pulumi:"storageAccountName"`
}
func LookupShareOutput(ctx *pulumi.Context, args LookupShareOutputArgs, opts ...pulumi.InvokeOption) LookupShareResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupShareResultOutput, error) {
args := v.(LookupShareArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:storage/getShare:getShare", args, LookupShareResultOutput{}, options).(LookupShareResultOutput), nil
}).(LookupShareResultOutput)
}
// A collection of arguments for invoking getShare.
type LookupShareOutputArgs struct {
// One or more acl blocks as defined below.
Acls GetShareAclArrayInput `pulumi:"acls"`
// A map of custom file share metadata.
Metadata pulumi.StringMapInput `pulumi:"metadata"`
// The name of the share.
Name pulumi.StringInput `pulumi:"name"`
// The ID of the storage account in which the share exists.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId pulumi.StringPtrInput `pulumi:"storageAccountId"`
// The name of the storage account in which the share exists. This property is deprecated in favour of `storageAccountId`.
StorageAccountName pulumi.StringPtrInput `pulumi:"storageAccountName"`
}
func (LookupShareOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupShareArgs)(nil)).Elem()
}
// A collection of values returned by getShare.
type LookupShareResultOutput struct{ *pulumi.OutputState }
func (LookupShareResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupShareResult)(nil)).Elem()
}
func (o LookupShareResultOutput) ToLookupShareResultOutput() LookupShareResultOutput {
return o
}
func (o LookupShareResultOutput) ToLookupShareResultOutputWithContext(ctx context.Context) LookupShareResultOutput {
return o
}
// One or more acl blocks as defined below.
func (o LookupShareResultOutput) Acls() GetShareAclArrayOutput {
return o.ApplyT(func(v LookupShareResult) []GetShareAcl { return v.Acls }).(GetShareAclArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupShareResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupShareResult) string { return v.Id }).(pulumi.StringOutput)
}
// A map of custom file share metadata.
func (o LookupShareResultOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupShareResult) map[string]string { return v.Metadata }).(pulumi.StringMapOutput)
}
func (o LookupShareResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupShareResult) string { return v.Name }).(pulumi.StringOutput)
}
// The quota of the File Share in GB.
func (o LookupShareResultOutput) Quota() pulumi.IntOutput {
return o.ApplyT(func(v LookupShareResult) int { return v.Quota }).(pulumi.IntOutput)
}
// Deprecated: this property has been deprecated in favour of `id` and will be removed in version 5.0 of the Provider.
func (o LookupShareResultOutput) ResourceManagerId() pulumi.StringOutput {
return o.ApplyT(func(v LookupShareResult) string { return v.ResourceManagerId }).(pulumi.StringOutput)
}
func (o LookupShareResultOutput) StorageAccountId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupShareResult) *string { return v.StorageAccountId }).(pulumi.StringPtrOutput)
}
func (o LookupShareResultOutput) StorageAccountName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupShareResult) *string { return v.StorageAccountName }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupShareResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/moverSourceEndpoint.go | sdk/go/azure/storage/moverSourceEndpoint.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Storage Mover Source Endpoint.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/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
// }
// exampleMover, err := storage.NewMover(ctx, "example", &storage.MoverArgs{
// Name: pulumi.String("example-ssm"),
// ResourceGroupName: example.Name,
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewMoverSourceEndpoint(ctx, "example", &storage.MoverSourceEndpointArgs{
// Name: pulumi.String("example-se"),
// StorageMoverId: exampleMover.ID(),
// Export: pulumi.String("/"),
// Host: pulumi.String("192.168.0.1"),
// NfsVersion: pulumi.String("NFSv3"),
// })
// 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.StorageMover` - 2023-03-01
//
// ## Import
//
// Storage Mover Source Endpoint can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/moverSourceEndpoint:MoverSourceEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.StorageMover/storageMovers/storageMover1/endpoints/endpoint1
// ```
type MoverSourceEndpoint struct {
pulumi.CustomResourceState
// Specifies a description for the Storage Mover Source Endpoint.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the directory being exported from the server. Changing this forces a new resource to be created.
Export pulumi.StringPtrOutput `pulumi:"export"`
// Specifies the host name or IP address of the server exporting the file system. Changing this forces a new resource to be created.
Host pulumi.StringOutput `pulumi:"host"`
// Specifies the name which should be used for this Storage Mover Source Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the NFS protocol version. Possible values are `NFSauto`, `NFSv3` and `NFSv4`. Defaults to `NFSauto`. Changing this forces a new resource to be created.
NfsVersion pulumi.StringPtrOutput `pulumi:"nfsVersion"`
// Specifies the ID of the Storage Mover for this Storage Mover Source Endpoint. Changing this forces a new resource to be created.
StorageMoverId pulumi.StringOutput `pulumi:"storageMoverId"`
}
// NewMoverSourceEndpoint registers a new resource with the given unique name, arguments, and options.
func NewMoverSourceEndpoint(ctx *pulumi.Context,
name string, args *MoverSourceEndpointArgs, opts ...pulumi.ResourceOption) (*MoverSourceEndpoint, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Host == nil {
return nil, errors.New("invalid value for required argument 'Host'")
}
if args.StorageMoverId == nil {
return nil, errors.New("invalid value for required argument 'StorageMoverId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource MoverSourceEndpoint
err := ctx.RegisterResource("azure:storage/moverSourceEndpoint:MoverSourceEndpoint", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMoverSourceEndpoint gets an existing MoverSourceEndpoint resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetMoverSourceEndpoint(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MoverSourceEndpointState, opts ...pulumi.ResourceOption) (*MoverSourceEndpoint, error) {
var resource MoverSourceEndpoint
err := ctx.ReadResource("azure:storage/moverSourceEndpoint:MoverSourceEndpoint", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MoverSourceEndpoint resources.
type moverSourceEndpointState struct {
// Specifies a description for the Storage Mover Source Endpoint.
Description *string `pulumi:"description"`
// Specifies the directory being exported from the server. Changing this forces a new resource to be created.
Export *string `pulumi:"export"`
// Specifies the host name or IP address of the server exporting the file system. Changing this forces a new resource to be created.
Host *string `pulumi:"host"`
// Specifies the name which should be used for this Storage Mover Source Endpoint. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the NFS protocol version. Possible values are `NFSauto`, `NFSv3` and `NFSv4`. Defaults to `NFSauto`. Changing this forces a new resource to be created.
NfsVersion *string `pulumi:"nfsVersion"`
// Specifies the ID of the Storage Mover for this Storage Mover Source Endpoint. Changing this forces a new resource to be created.
StorageMoverId *string `pulumi:"storageMoverId"`
}
type MoverSourceEndpointState struct {
// Specifies a description for the Storage Mover Source Endpoint.
Description pulumi.StringPtrInput
// Specifies the directory being exported from the server. Changing this forces a new resource to be created.
Export pulumi.StringPtrInput
// Specifies the host name or IP address of the server exporting the file system. Changing this forces a new resource to be created.
Host pulumi.StringPtrInput
// Specifies the name which should be used for this Storage Mover Source Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the NFS protocol version. Possible values are `NFSauto`, `NFSv3` and `NFSv4`. Defaults to `NFSauto`. Changing this forces a new resource to be created.
NfsVersion pulumi.StringPtrInput
// Specifies the ID of the Storage Mover for this Storage Mover Source Endpoint. Changing this forces a new resource to be created.
StorageMoverId pulumi.StringPtrInput
}
func (MoverSourceEndpointState) ElementType() reflect.Type {
return reflect.TypeOf((*moverSourceEndpointState)(nil)).Elem()
}
type moverSourceEndpointArgs struct {
// Specifies a description for the Storage Mover Source Endpoint.
Description *string `pulumi:"description"`
// Specifies the directory being exported from the server. Changing this forces a new resource to be created.
Export *string `pulumi:"export"`
// Specifies the host name or IP address of the server exporting the file system. Changing this forces a new resource to be created.
Host string `pulumi:"host"`
// Specifies the name which should be used for this Storage Mover Source Endpoint. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the NFS protocol version. Possible values are `NFSauto`, `NFSv3` and `NFSv4`. Defaults to `NFSauto`. Changing this forces a new resource to be created.
NfsVersion *string `pulumi:"nfsVersion"`
// Specifies the ID of the Storage Mover for this Storage Mover Source Endpoint. Changing this forces a new resource to be created.
StorageMoverId string `pulumi:"storageMoverId"`
}
// The set of arguments for constructing a MoverSourceEndpoint resource.
type MoverSourceEndpointArgs struct {
// Specifies a description for the Storage Mover Source Endpoint.
Description pulumi.StringPtrInput
// Specifies the directory being exported from the server. Changing this forces a new resource to be created.
Export pulumi.StringPtrInput
// Specifies the host name or IP address of the server exporting the file system. Changing this forces a new resource to be created.
Host pulumi.StringInput
// Specifies the name which should be used for this Storage Mover Source Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the NFS protocol version. Possible values are `NFSauto`, `NFSv3` and `NFSv4`. Defaults to `NFSauto`. Changing this forces a new resource to be created.
NfsVersion pulumi.StringPtrInput
// Specifies the ID of the Storage Mover for this Storage Mover Source Endpoint. Changing this forces a new resource to be created.
StorageMoverId pulumi.StringInput
}
func (MoverSourceEndpointArgs) ElementType() reflect.Type {
return reflect.TypeOf((*moverSourceEndpointArgs)(nil)).Elem()
}
type MoverSourceEndpointInput interface {
pulumi.Input
ToMoverSourceEndpointOutput() MoverSourceEndpointOutput
ToMoverSourceEndpointOutputWithContext(ctx context.Context) MoverSourceEndpointOutput
}
func (*MoverSourceEndpoint) ElementType() reflect.Type {
return reflect.TypeOf((**MoverSourceEndpoint)(nil)).Elem()
}
func (i *MoverSourceEndpoint) ToMoverSourceEndpointOutput() MoverSourceEndpointOutput {
return i.ToMoverSourceEndpointOutputWithContext(context.Background())
}
func (i *MoverSourceEndpoint) ToMoverSourceEndpointOutputWithContext(ctx context.Context) MoverSourceEndpointOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverSourceEndpointOutput)
}
// MoverSourceEndpointArrayInput is an input type that accepts MoverSourceEndpointArray and MoverSourceEndpointArrayOutput values.
// You can construct a concrete instance of `MoverSourceEndpointArrayInput` via:
//
// MoverSourceEndpointArray{ MoverSourceEndpointArgs{...} }
type MoverSourceEndpointArrayInput interface {
pulumi.Input
ToMoverSourceEndpointArrayOutput() MoverSourceEndpointArrayOutput
ToMoverSourceEndpointArrayOutputWithContext(context.Context) MoverSourceEndpointArrayOutput
}
type MoverSourceEndpointArray []MoverSourceEndpointInput
func (MoverSourceEndpointArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MoverSourceEndpoint)(nil)).Elem()
}
func (i MoverSourceEndpointArray) ToMoverSourceEndpointArrayOutput() MoverSourceEndpointArrayOutput {
return i.ToMoverSourceEndpointArrayOutputWithContext(context.Background())
}
func (i MoverSourceEndpointArray) ToMoverSourceEndpointArrayOutputWithContext(ctx context.Context) MoverSourceEndpointArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverSourceEndpointArrayOutput)
}
// MoverSourceEndpointMapInput is an input type that accepts MoverSourceEndpointMap and MoverSourceEndpointMapOutput values.
// You can construct a concrete instance of `MoverSourceEndpointMapInput` via:
//
// MoverSourceEndpointMap{ "key": MoverSourceEndpointArgs{...} }
type MoverSourceEndpointMapInput interface {
pulumi.Input
ToMoverSourceEndpointMapOutput() MoverSourceEndpointMapOutput
ToMoverSourceEndpointMapOutputWithContext(context.Context) MoverSourceEndpointMapOutput
}
type MoverSourceEndpointMap map[string]MoverSourceEndpointInput
func (MoverSourceEndpointMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MoverSourceEndpoint)(nil)).Elem()
}
func (i MoverSourceEndpointMap) ToMoverSourceEndpointMapOutput() MoverSourceEndpointMapOutput {
return i.ToMoverSourceEndpointMapOutputWithContext(context.Background())
}
func (i MoverSourceEndpointMap) ToMoverSourceEndpointMapOutputWithContext(ctx context.Context) MoverSourceEndpointMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverSourceEndpointMapOutput)
}
type MoverSourceEndpointOutput struct{ *pulumi.OutputState }
func (MoverSourceEndpointOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MoverSourceEndpoint)(nil)).Elem()
}
func (o MoverSourceEndpointOutput) ToMoverSourceEndpointOutput() MoverSourceEndpointOutput {
return o
}
func (o MoverSourceEndpointOutput) ToMoverSourceEndpointOutputWithContext(ctx context.Context) MoverSourceEndpointOutput {
return o
}
// Specifies a description for the Storage Mover Source Endpoint.
func (o MoverSourceEndpointOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MoverSourceEndpoint) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the directory being exported from the server. Changing this forces a new resource to be created.
func (o MoverSourceEndpointOutput) Export() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MoverSourceEndpoint) pulumi.StringPtrOutput { return v.Export }).(pulumi.StringPtrOutput)
}
// Specifies the host name or IP address of the server exporting the file system. Changing this forces a new resource to be created.
func (o MoverSourceEndpointOutput) Host() pulumi.StringOutput {
return o.ApplyT(func(v *MoverSourceEndpoint) pulumi.StringOutput { return v.Host }).(pulumi.StringOutput)
}
// Specifies the name which should be used for this Storage Mover Source Endpoint. Changing this forces a new resource to be created.
func (o MoverSourceEndpointOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *MoverSourceEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the NFS protocol version. Possible values are `NFSauto`, `NFSv3` and `NFSv4`. Defaults to `NFSauto`. Changing this forces a new resource to be created.
func (o MoverSourceEndpointOutput) NfsVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MoverSourceEndpoint) pulumi.StringPtrOutput { return v.NfsVersion }).(pulumi.StringPtrOutput)
}
// Specifies the ID of the Storage Mover for this Storage Mover Source Endpoint. Changing this forces a new resource to be created.
func (o MoverSourceEndpointOutput) StorageMoverId() pulumi.StringOutput {
return o.ApplyT(func(v *MoverSourceEndpoint) pulumi.StringOutput { return v.StorageMoverId }).(pulumi.StringOutput)
}
type MoverSourceEndpointArrayOutput struct{ *pulumi.OutputState }
func (MoverSourceEndpointArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MoverSourceEndpoint)(nil)).Elem()
}
func (o MoverSourceEndpointArrayOutput) ToMoverSourceEndpointArrayOutput() MoverSourceEndpointArrayOutput {
return o
}
func (o MoverSourceEndpointArrayOutput) ToMoverSourceEndpointArrayOutputWithContext(ctx context.Context) MoverSourceEndpointArrayOutput {
return o
}
func (o MoverSourceEndpointArrayOutput) Index(i pulumi.IntInput) MoverSourceEndpointOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MoverSourceEndpoint {
return vs[0].([]*MoverSourceEndpoint)[vs[1].(int)]
}).(MoverSourceEndpointOutput)
}
type MoverSourceEndpointMapOutput struct{ *pulumi.OutputState }
func (MoverSourceEndpointMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MoverSourceEndpoint)(nil)).Elem()
}
func (o MoverSourceEndpointMapOutput) ToMoverSourceEndpointMapOutput() MoverSourceEndpointMapOutput {
return o
}
func (o MoverSourceEndpointMapOutput) ToMoverSourceEndpointMapOutputWithContext(ctx context.Context) MoverSourceEndpointMapOutput {
return o
}
func (o MoverSourceEndpointMapOutput) MapIndex(k pulumi.StringInput) MoverSourceEndpointOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MoverSourceEndpoint {
return vs[0].(map[string]*MoverSourceEndpoint)[vs[1].(string)]
}).(MoverSourceEndpointOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MoverSourceEndpointInput)(nil)).Elem(), &MoverSourceEndpoint{})
pulumi.RegisterInputType(reflect.TypeOf((*MoverSourceEndpointArrayInput)(nil)).Elem(), MoverSourceEndpointArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MoverSourceEndpointMapInput)(nil)).Elem(), MoverSourceEndpointMap{})
pulumi.RegisterOutputType(MoverSourceEndpointOutput{})
pulumi.RegisterOutputType(MoverSourceEndpointArrayOutput{})
pulumi.RegisterOutputType(MoverSourceEndpointMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/syncCloudEndpoint.go | sdk/go/azure/storage/syncCloudEndpoint.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Storage Sync Cloud Endpoint.
//
// > **Note:** Please ensure Azure File Sync has access to the storage account in your subscription, which indicates that `Microsoft.StorageSync` is assigned role `Reader and Data Access` ( refer to details [here](https://docs.microsoft.com/azure/storage/files/storage-sync-files-troubleshoot?tabs=portal1%2Cazure-portal#common-troubleshooting-steps)).
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/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
// }
// exampleSync, err := storage.NewSync(ctx, "example", &storage.SyncArgs{
// Name: pulumi.String("example-ss"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// exampleSyncGroup, err := storage.NewSyncGroup(ctx, "example", &storage.SyncGroupArgs{
// Name: pulumi.String("example-ss-group"),
// StorageSyncId: exampleSync.ID(),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleShare, err := storage.NewShare(ctx, "example", &storage.ShareArgs{
// Name: pulumi.String("example-share"),
// StorageAccountName: exampleAccount.Name,
// Quota: pulumi.Int(50),
// Acls: storage.ShareAclArray{
// &storage.ShareAclArgs{
// Id: pulumi.String("GhostedRecall"),
// AccessPolicies: storage.ShareAclAccessPolicyArray{
// &storage.ShareAclAccessPolicyArgs{
// Permissions: pulumi.String("r"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = storage.NewSyncCloudEndpoint(ctx, "example", &storage.SyncCloudEndpointArgs{
// Name: pulumi.String("example-ss-ce"),
// StorageSyncGroupId: exampleSyncGroup.ID(),
// FileShareName: exampleShare.Name,
// 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.StorageSync` - 2020-03-01
//
// ## Import
//
// Storage Sync Cloud Endpoints can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/syncCloudEndpoint:SyncCloudEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StorageSync/storageSyncServices/sync1/syncGroups/syncgroup1/cloudEndpoints/cloudEndpoint1
// ```
type SyncCloudEndpoint struct {
pulumi.CustomResourceState
// The Storage Share name to be synchronized in this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
FileShareName pulumi.StringOutput `pulumi:"fileShareName"`
// The name which should be used for this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
// The Tenant ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created. Defaults to the current tenant id.
StorageAccountTenantId pulumi.StringOutput `pulumi:"storageAccountTenantId"`
// The ID of the Storage Sync Group where this Cloud Endpoint should be created. Changing this forces a new Storage Sync Cloud Endpoint to be created.
StorageSyncGroupId pulumi.StringOutput `pulumi:"storageSyncGroupId"`
}
// NewSyncCloudEndpoint registers a new resource with the given unique name, arguments, and options.
func NewSyncCloudEndpoint(ctx *pulumi.Context,
name string, args *SyncCloudEndpointArgs, opts ...pulumi.ResourceOption) (*SyncCloudEndpoint, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.FileShareName == nil {
return nil, errors.New("invalid value for required argument 'FileShareName'")
}
if args.StorageAccountId == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountId'")
}
if args.StorageSyncGroupId == nil {
return nil, errors.New("invalid value for required argument 'StorageSyncGroupId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SyncCloudEndpoint
err := ctx.RegisterResource("azure:storage/syncCloudEndpoint:SyncCloudEndpoint", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSyncCloudEndpoint gets an existing SyncCloudEndpoint resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSyncCloudEndpoint(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SyncCloudEndpointState, opts ...pulumi.ResourceOption) (*SyncCloudEndpoint, error) {
var resource SyncCloudEndpoint
err := ctx.ReadResource("azure:storage/syncCloudEndpoint:SyncCloudEndpoint", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SyncCloudEndpoint resources.
type syncCloudEndpointState struct {
// The Storage Share name to be synchronized in this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
FileShareName *string `pulumi:"fileShareName"`
// The name which should be used for this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
Name *string `pulumi:"name"`
// The ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
// The Tenant ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created. Defaults to the current tenant id.
StorageAccountTenantId *string `pulumi:"storageAccountTenantId"`
// The ID of the Storage Sync Group where this Cloud Endpoint should be created. Changing this forces a new Storage Sync Cloud Endpoint to be created.
StorageSyncGroupId *string `pulumi:"storageSyncGroupId"`
}
type SyncCloudEndpointState struct {
// The Storage Share name to be synchronized in this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
FileShareName pulumi.StringPtrInput
// The name which should be used for this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
Name pulumi.StringPtrInput
// The ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created.
StorageAccountId pulumi.StringPtrInput
// The Tenant ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created. Defaults to the current tenant id.
StorageAccountTenantId pulumi.StringPtrInput
// The ID of the Storage Sync Group where this Cloud Endpoint should be created. Changing this forces a new Storage Sync Cloud Endpoint to be created.
StorageSyncGroupId pulumi.StringPtrInput
}
func (SyncCloudEndpointState) ElementType() reflect.Type {
return reflect.TypeOf((*syncCloudEndpointState)(nil)).Elem()
}
type syncCloudEndpointArgs struct {
// The Storage Share name to be synchronized in this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
FileShareName string `pulumi:"fileShareName"`
// The name which should be used for this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
Name *string `pulumi:"name"`
// The ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created.
StorageAccountId string `pulumi:"storageAccountId"`
// The Tenant ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created. Defaults to the current tenant id.
StorageAccountTenantId *string `pulumi:"storageAccountTenantId"`
// The ID of the Storage Sync Group where this Cloud Endpoint should be created. Changing this forces a new Storage Sync Cloud Endpoint to be created.
StorageSyncGroupId string `pulumi:"storageSyncGroupId"`
}
// The set of arguments for constructing a SyncCloudEndpoint resource.
type SyncCloudEndpointArgs struct {
// The Storage Share name to be synchronized in this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
FileShareName pulumi.StringInput
// The name which should be used for this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
Name pulumi.StringPtrInput
// The ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created.
StorageAccountId pulumi.StringInput
// The Tenant ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created. Defaults to the current tenant id.
StorageAccountTenantId pulumi.StringPtrInput
// The ID of the Storage Sync Group where this Cloud Endpoint should be created. Changing this forces a new Storage Sync Cloud Endpoint to be created.
StorageSyncGroupId pulumi.StringInput
}
func (SyncCloudEndpointArgs) ElementType() reflect.Type {
return reflect.TypeOf((*syncCloudEndpointArgs)(nil)).Elem()
}
type SyncCloudEndpointInput interface {
pulumi.Input
ToSyncCloudEndpointOutput() SyncCloudEndpointOutput
ToSyncCloudEndpointOutputWithContext(ctx context.Context) SyncCloudEndpointOutput
}
func (*SyncCloudEndpoint) ElementType() reflect.Type {
return reflect.TypeOf((**SyncCloudEndpoint)(nil)).Elem()
}
func (i *SyncCloudEndpoint) ToSyncCloudEndpointOutput() SyncCloudEndpointOutput {
return i.ToSyncCloudEndpointOutputWithContext(context.Background())
}
func (i *SyncCloudEndpoint) ToSyncCloudEndpointOutputWithContext(ctx context.Context) SyncCloudEndpointOutput {
return pulumi.ToOutputWithContext(ctx, i).(SyncCloudEndpointOutput)
}
// SyncCloudEndpointArrayInput is an input type that accepts SyncCloudEndpointArray and SyncCloudEndpointArrayOutput values.
// You can construct a concrete instance of `SyncCloudEndpointArrayInput` via:
//
// SyncCloudEndpointArray{ SyncCloudEndpointArgs{...} }
type SyncCloudEndpointArrayInput interface {
pulumi.Input
ToSyncCloudEndpointArrayOutput() SyncCloudEndpointArrayOutput
ToSyncCloudEndpointArrayOutputWithContext(context.Context) SyncCloudEndpointArrayOutput
}
type SyncCloudEndpointArray []SyncCloudEndpointInput
func (SyncCloudEndpointArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SyncCloudEndpoint)(nil)).Elem()
}
func (i SyncCloudEndpointArray) ToSyncCloudEndpointArrayOutput() SyncCloudEndpointArrayOutput {
return i.ToSyncCloudEndpointArrayOutputWithContext(context.Background())
}
func (i SyncCloudEndpointArray) ToSyncCloudEndpointArrayOutputWithContext(ctx context.Context) SyncCloudEndpointArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SyncCloudEndpointArrayOutput)
}
// SyncCloudEndpointMapInput is an input type that accepts SyncCloudEndpointMap and SyncCloudEndpointMapOutput values.
// You can construct a concrete instance of `SyncCloudEndpointMapInput` via:
//
// SyncCloudEndpointMap{ "key": SyncCloudEndpointArgs{...} }
type SyncCloudEndpointMapInput interface {
pulumi.Input
ToSyncCloudEndpointMapOutput() SyncCloudEndpointMapOutput
ToSyncCloudEndpointMapOutputWithContext(context.Context) SyncCloudEndpointMapOutput
}
type SyncCloudEndpointMap map[string]SyncCloudEndpointInput
func (SyncCloudEndpointMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SyncCloudEndpoint)(nil)).Elem()
}
func (i SyncCloudEndpointMap) ToSyncCloudEndpointMapOutput() SyncCloudEndpointMapOutput {
return i.ToSyncCloudEndpointMapOutputWithContext(context.Background())
}
func (i SyncCloudEndpointMap) ToSyncCloudEndpointMapOutputWithContext(ctx context.Context) SyncCloudEndpointMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SyncCloudEndpointMapOutput)
}
type SyncCloudEndpointOutput struct{ *pulumi.OutputState }
func (SyncCloudEndpointOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SyncCloudEndpoint)(nil)).Elem()
}
func (o SyncCloudEndpointOutput) ToSyncCloudEndpointOutput() SyncCloudEndpointOutput {
return o
}
func (o SyncCloudEndpointOutput) ToSyncCloudEndpointOutputWithContext(ctx context.Context) SyncCloudEndpointOutput {
return o
}
// The Storage Share name to be synchronized in this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
func (o SyncCloudEndpointOutput) FileShareName() pulumi.StringOutput {
return o.ApplyT(func(v *SyncCloudEndpoint) pulumi.StringOutput { return v.FileShareName }).(pulumi.StringOutput)
}
// The name which should be used for this Storage Sync Cloud Endpoint. Changing this forces a new Storage Sync Cloud Endpoint to be created.
func (o SyncCloudEndpointOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SyncCloudEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created.
func (o SyncCloudEndpointOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *SyncCloudEndpoint) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
// The Tenant ID of the Storage Account where the Storage Share exists. Changing this forces a new Storage Sync Cloud Endpoint to be created. Defaults to the current tenant id.
func (o SyncCloudEndpointOutput) StorageAccountTenantId() pulumi.StringOutput {
return o.ApplyT(func(v *SyncCloudEndpoint) pulumi.StringOutput { return v.StorageAccountTenantId }).(pulumi.StringOutput)
}
// The ID of the Storage Sync Group where this Cloud Endpoint should be created. Changing this forces a new Storage Sync Cloud Endpoint to be created.
func (o SyncCloudEndpointOutput) StorageSyncGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *SyncCloudEndpoint) pulumi.StringOutput { return v.StorageSyncGroupId }).(pulumi.StringOutput)
}
type SyncCloudEndpointArrayOutput struct{ *pulumi.OutputState }
func (SyncCloudEndpointArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SyncCloudEndpoint)(nil)).Elem()
}
func (o SyncCloudEndpointArrayOutput) ToSyncCloudEndpointArrayOutput() SyncCloudEndpointArrayOutput {
return o
}
func (o SyncCloudEndpointArrayOutput) ToSyncCloudEndpointArrayOutputWithContext(ctx context.Context) SyncCloudEndpointArrayOutput {
return o
}
func (o SyncCloudEndpointArrayOutput) Index(i pulumi.IntInput) SyncCloudEndpointOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SyncCloudEndpoint {
return vs[0].([]*SyncCloudEndpoint)[vs[1].(int)]
}).(SyncCloudEndpointOutput)
}
type SyncCloudEndpointMapOutput struct{ *pulumi.OutputState }
func (SyncCloudEndpointMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SyncCloudEndpoint)(nil)).Elem()
}
func (o SyncCloudEndpointMapOutput) ToSyncCloudEndpointMapOutput() SyncCloudEndpointMapOutput {
return o
}
func (o SyncCloudEndpointMapOutput) ToSyncCloudEndpointMapOutputWithContext(ctx context.Context) SyncCloudEndpointMapOutput {
return o
}
func (o SyncCloudEndpointMapOutput) MapIndex(k pulumi.StringInput) SyncCloudEndpointOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SyncCloudEndpoint {
return vs[0].(map[string]*SyncCloudEndpoint)[vs[1].(string)]
}).(SyncCloudEndpointOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SyncCloudEndpointInput)(nil)).Elem(), &SyncCloudEndpoint{})
pulumi.RegisterInputType(reflect.TypeOf((*SyncCloudEndpointArrayInput)(nil)).Elem(), SyncCloudEndpointArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SyncCloudEndpointMapInput)(nil)).Elem(), SyncCloudEndpointMap{})
pulumi.RegisterOutputType(SyncCloudEndpointOutput{})
pulumi.RegisterOutputType(SyncCloudEndpointArrayOutput{})
pulumi.RegisterOutputType(SyncCloudEndpointMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/getQueue.go | sdk/go/azure/storage/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 storage
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 Storage Queue.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 {
// _, err := storage.LookupQueue(ctx, &storage.LookupQueueArgs{
// Name: "example-queue-name",
// StorageAccountName: pulumi.StringRef("example-storage-account-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.Storage` - 2023-05-01
func LookupQueue(ctx *pulumi.Context, args *LookupQueueArgs, opts ...pulumi.InvokeOption) (*LookupQueueResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupQueueResult
err := ctx.Invoke("azure:storage/getQueue:getQueue", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getQueue.
type LookupQueueArgs struct {
// A mapping of MetaData for this Queue.
Metadata map[string]string `pulumi:"metadata"`
// The name of the Queue.
Name string `pulumi:"name"`
// The name of the Storage Account where the Queue exists. This property will become Required in version 5.0 of the Provider.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId *string `pulumi:"storageAccountId"`
// The name of the Storage Account where the Queue exists. This property is deprecated in favour of `storageAccountId`.
//
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
StorageAccountName *string `pulumi:"storageAccountName"`
}
// A collection of values returned by getQueue.
type LookupQueueResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A mapping of MetaData for this Queue.
Metadata map[string]string `pulumi:"metadata"`
Name string `pulumi:"name"`
// The Resource Manager ID of this Storage Queue.
//
// Deprecated: the `resourceManagerId` property has been deprecated in favour of `id` and will be removed in version 5.0 of the Provider.
ResourceManagerId string `pulumi:"resourceManagerId"`
StorageAccountId *string `pulumi:"storageAccountId"`
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
StorageAccountName *string `pulumi:"storageAccountName"`
// The data plane URL of the Storage Queue in the format of `<storage queue endpoint>/<queue name>`. E.g. `https://example.queue.core.windows.net/queue1`.
Url string `pulumi:"url"`
}
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:storage/getQueue:getQueue", args, LookupQueueResultOutput{}, options).(LookupQueueResultOutput), nil
}).(LookupQueueResultOutput)
}
// A collection of arguments for invoking getQueue.
type LookupQueueOutputArgs struct {
// A mapping of MetaData for this Queue.
Metadata pulumi.StringMapInput `pulumi:"metadata"`
// The name of the Queue.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Storage Account where the Queue exists. This property will become Required in version 5.0 of the Provider.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId pulumi.StringPtrInput `pulumi:"storageAccountId"`
// The name of the Storage Account where the Queue exists. This property is deprecated in favour of `storageAccountId`.
//
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
StorageAccountName pulumi.StringPtrInput `pulumi:"storageAccountName"`
}
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 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)
}
// A mapping of MetaData for this Queue.
func (o LookupQueueResultOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupQueueResult) map[string]string { return v.Metadata }).(pulumi.StringMapOutput)
}
func (o LookupQueueResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueResult) string { return v.Name }).(pulumi.StringOutput)
}
// The Resource Manager ID of this Storage Queue.
//
// Deprecated: the `resourceManagerId` property has been deprecated in favour of `id` and will be removed in version 5.0 of the Provider.
func (o LookupQueueResultOutput) ResourceManagerId() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueResult) string { return v.ResourceManagerId }).(pulumi.StringOutput)
}
func (o LookupQueueResultOutput) StorageAccountId() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupQueueResult) *string { return v.StorageAccountId }).(pulumi.StringPtrOutput)
}
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
func (o LookupQueueResultOutput) StorageAccountName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupQueueResult) *string { return v.StorageAccountName }).(pulumi.StringPtrOutput)
}
// The data plane URL of the Storage Queue in the format of `<storage queue endpoint>/<queue name>`. E.g. `https://example.queue.core.windows.net/queue1`.
func (o LookupQueueResultOutput) Url() pulumi.StringOutput {
return o.ApplyT(func(v LookupQueueResult) string { return v.Url }).(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/storage/getAccount.go | sdk/go/azure/storage/getAccount.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
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 Storage Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := storage.LookupAccount(ctx, &storage.LookupAccountArgs{
// Name: "packerimages",
// ResourceGroupName: pulumi.StringRef("packer-storage"),
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("storageAccountTier", example.AccountTier)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Storage` - 2023-05-01
func LookupAccount(ctx *pulumi.Context, args *LookupAccountArgs, opts ...pulumi.InvokeOption) (*LookupAccountResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupAccountResult
err := ctx.Invoke("azure:storage/getAccount:getAccount", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAccount.
type LookupAccountArgs struct {
// The minimum supported TLS version for this storage account.
MinTlsVersion *string `pulumi:"minTlsVersion"`
// Specifies the name of the Storage Account
Name string `pulumi:"name"`
// Specifies the name of the resource group the Storage Account is located in.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getAccount.
type LookupAccountResult struct {
// The access tier for `BlobStorage` accounts.
AccessTier string `pulumi:"accessTier"`
// The Kind of account.
AccountKind string `pulumi:"accountKind"`
// The type of replication used for this storage account.
AccountReplicationType string `pulumi:"accountReplicationType"`
// The Tier of this storage account.
AccountTier string `pulumi:"accountTier"`
// Can nested items in the storage account opt into allowing public access?
AllowNestedItemsToBePublic bool `pulumi:"allowNestedItemsToBePublic"`
// A `azureFilesAuthentication` block as documented below.
AzureFilesAuthentications []GetAccountAzureFilesAuthentication `pulumi:"azureFilesAuthentications"`
// supports the following:
CustomDomains []GetAccountCustomDomain `pulumi:"customDomains"`
// Which DNS endpoint type is used - either `Standard` or `AzureDnsZone`.
DnsEndpointType string `pulumi:"dnsEndpointType"`
// Is traffic only allowed via HTTPS? See [here](https://docs.microsoft.com/azure/storage/storage-require-secure-transfer/) for more information.
HttpsTrafficOnlyEnabled bool `pulumi:"httpsTrafficOnlyEnabled"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// An `identity` block as documented below.
Identities []GetAccountIdentity `pulumi:"identities"`
// Is infrastructure encryption enabled? See [here](https://docs.microsoft.com/azure/storage/common/infrastructure-encryption-enable/)
// for more information.
InfrastructureEncryptionEnabled bool `pulumi:"infrastructureEncryptionEnabled"`
// Is Hierarchical Namespace enabled?
IsHnsEnabled bool `pulumi:"isHnsEnabled"`
// The Azure location where the Storage Account exists
Location string `pulumi:"location"`
// The minimum supported TLS version for this storage account.
MinTlsVersion *string `pulumi:"minTlsVersion"`
// The Custom Domain Name used for the Storage Account.
Name string `pulumi:"name"`
// Is NFSv3 protocol enabled?
Nfsv3Enabled bool `pulumi:"nfsv3Enabled"`
// The primary access key for the Storage Account.
PrimaryAccessKey string `pulumi:"primaryAccessKey"`
// The connection string associated with the primary blob location
PrimaryBlobConnectionString string `pulumi:"primaryBlobConnectionString"`
// The endpoint URL for blob storage in the primary location.
PrimaryBlobEndpoint string `pulumi:"primaryBlobEndpoint"`
// The hostname with port if applicable for blob storage in the primary location.
PrimaryBlobHost string `pulumi:"primaryBlobHost"`
// The internet routing endpoint URL for blob storage in the primary location.
PrimaryBlobInternetEndpoint string `pulumi:"primaryBlobInternetEndpoint"`
// The internet routing hostname with port if applicable for blob storage in the primary location.
PrimaryBlobInternetHost string `pulumi:"primaryBlobInternetHost"`
// The microsoft routing endpoint URL for blob storage in the primary location.
PrimaryBlobMicrosoftEndpoint string `pulumi:"primaryBlobMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for blob storage in the primary location.
PrimaryBlobMicrosoftHost string `pulumi:"primaryBlobMicrosoftHost"`
// The connection string associated with the primary location
PrimaryConnectionString string `pulumi:"primaryConnectionString"`
// The endpoint URL for DFS storage in the primary location.
PrimaryDfsEndpoint string `pulumi:"primaryDfsEndpoint"`
// The hostname with port if applicable for DFS storage in the primary location.
PrimaryDfsHost string `pulumi:"primaryDfsHost"`
// The internet routing endpoint URL for DFS storage in the primary location.
PrimaryDfsInternetEndpoint string `pulumi:"primaryDfsInternetEndpoint"`
// The internet routing hostname with port if applicable for DFS storage in the primary location.
PrimaryDfsInternetHost string `pulumi:"primaryDfsInternetHost"`
// The microsoft routing endpoint URL for DFS storage in the primary location.
PrimaryDfsMicrosoftEndpoint string `pulumi:"primaryDfsMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for DFS storage in the primary location.
PrimaryDfsMicrosoftHost string `pulumi:"primaryDfsMicrosoftHost"`
// The endpoint URL for file storage in the primary location.
PrimaryFileEndpoint string `pulumi:"primaryFileEndpoint"`
// The hostname with port if applicable for file storage in the primary location.
PrimaryFileHost string `pulumi:"primaryFileHost"`
// The internet routing endpoint URL for file storage in the primary location.
PrimaryFileInternetEndpoint string `pulumi:"primaryFileInternetEndpoint"`
// The internet routing hostname with port if applicable for file storage in the primary location.
PrimaryFileInternetHost string `pulumi:"primaryFileInternetHost"`
// The microsoft routing endpoint URL for file storage in the primary location.
PrimaryFileMicrosoftEndpoint string `pulumi:"primaryFileMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for file storage in the primary location.
PrimaryFileMicrosoftHost string `pulumi:"primaryFileMicrosoftHost"`
// The primary location of the Storage Account.
PrimaryLocation string `pulumi:"primaryLocation"`
// The endpoint URL for queue storage in the primary location.
PrimaryQueueEndpoint string `pulumi:"primaryQueueEndpoint"`
// The hostname with port if applicable for queue storage in the primary location.
PrimaryQueueHost string `pulumi:"primaryQueueHost"`
// The microsoft routing endpoint URL for queue storage in the primary location.
PrimaryQueueMicrosoftEndpoint string `pulumi:"primaryQueueMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for queue storage in the primary location.
PrimaryQueueMicrosoftHost string `pulumi:"primaryQueueMicrosoftHost"`
// The endpoint URL for table storage in the primary location.
PrimaryTableEndpoint string `pulumi:"primaryTableEndpoint"`
// The hostname with port if applicable for table storage in the primary location.
PrimaryTableHost string `pulumi:"primaryTableHost"`
// The microsoft routing endpoint URL for table storage in the primary location.
PrimaryTableMicrosoftEndpoint string `pulumi:"primaryTableMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for table storage in the primary location.
PrimaryTableMicrosoftHost string `pulumi:"primaryTableMicrosoftHost"`
// The endpoint URL for web storage in the primary location.
PrimaryWebEndpoint string `pulumi:"primaryWebEndpoint"`
// The hostname with port if applicable for web storage in the primary location.
PrimaryWebHost string `pulumi:"primaryWebHost"`
// The internet routing endpoint URL for web storage in the primary location.
PrimaryWebInternetEndpoint string `pulumi:"primaryWebInternetEndpoint"`
// The internet routing hostname with port if applicable for web storage in the primary location.
PrimaryWebInternetHost string `pulumi:"primaryWebInternetHost"`
// The microsoft routing endpoint URL for web storage in the primary location.
PrimaryWebMicrosoftEndpoint string `pulumi:"primaryWebMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for web storage in the primary location.
PrimaryWebMicrosoftHost string `pulumi:"primaryWebMicrosoftHost"`
// The encryption key type of the queue.
QueueEncryptionKeyType string `pulumi:"queueEncryptionKeyType"`
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The secondary access key for the Storage Account.
SecondaryAccessKey string `pulumi:"secondaryAccessKey"`
// The connection string associated with the secondary blob location
SecondaryBlobConnectionString string `pulumi:"secondaryBlobConnectionString"`
// The endpoint URL for blob storage in the secondary location.
SecondaryBlobEndpoint string `pulumi:"secondaryBlobEndpoint"`
// The hostname with port if applicable for blob storage in the secondary location.
SecondaryBlobHost string `pulumi:"secondaryBlobHost"`
// The internet routing endpoint URL for blob storage in the secondary location.
SecondaryBlobInternetEndpoint string `pulumi:"secondaryBlobInternetEndpoint"`
// The internet routing hostname with port if applicable for blob storage in the secondary location.
SecondaryBlobInternetHost string `pulumi:"secondaryBlobInternetHost"`
// The microsoft routing endpoint URL for blob storage in the secondary location.
SecondaryBlobMicrosoftEndpoint string `pulumi:"secondaryBlobMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for blob storage in the secondary location.
SecondaryBlobMicrosoftHost string `pulumi:"secondaryBlobMicrosoftHost"`
// The connection string associated with the secondary location
SecondaryConnectionString string `pulumi:"secondaryConnectionString"`
// The endpoint URL for DFS storage in the secondary location.
SecondaryDfsEndpoint string `pulumi:"secondaryDfsEndpoint"`
// The hostname with port if applicable for DFS storage in the secondary location.
SecondaryDfsHost string `pulumi:"secondaryDfsHost"`
// The internet routing endpoint URL for DFS storage in the secondary location.
SecondaryDfsInternetEndpoint string `pulumi:"secondaryDfsInternetEndpoint"`
// The internet routing hostname with port if applicable for DFS storage in the secondary location.
SecondaryDfsInternetHost string `pulumi:"secondaryDfsInternetHost"`
// The microsoft routing endpoint URL for DFS storage in the secondary location.
SecondaryDfsMicrosoftEndpoint string `pulumi:"secondaryDfsMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for DFS storage in the secondary location.
SecondaryDfsMicrosoftHost string `pulumi:"secondaryDfsMicrosoftHost"`
// The endpoint URL for file storage in the secondary location.
SecondaryFileEndpoint string `pulumi:"secondaryFileEndpoint"`
// The hostname with port if applicable for file storage in the secondary location.
SecondaryFileHost string `pulumi:"secondaryFileHost"`
// The internet routing endpoint URL for file storage in the secondary location.
SecondaryFileInternetEndpoint string `pulumi:"secondaryFileInternetEndpoint"`
// The internet routing hostname with port if applicable for file storage in the secondary location.
SecondaryFileInternetHost string `pulumi:"secondaryFileInternetHost"`
// The microsoft routing endpoint URL for file storage in the secondary location.
SecondaryFileMicrosoftEndpoint string `pulumi:"secondaryFileMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for file storage in the secondary location.
SecondaryFileMicrosoftHost string `pulumi:"secondaryFileMicrosoftHost"`
// The secondary location of the Storage Account.
SecondaryLocation string `pulumi:"secondaryLocation"`
// The endpoint URL for queue storage in the secondary location.
SecondaryQueueEndpoint string `pulumi:"secondaryQueueEndpoint"`
// The hostname with port if applicable for queue storage in the secondary location.
SecondaryQueueHost string `pulumi:"secondaryQueueHost"`
// The microsoft routing endpoint URL for queue storage in the secondary location.
SecondaryQueueMicrosoftEndpoint string `pulumi:"secondaryQueueMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for queue storage in the secondary location.
SecondaryQueueMicrosoftHost string `pulumi:"secondaryQueueMicrosoftHost"`
// The endpoint URL for table storage in the secondary location.
SecondaryTableEndpoint string `pulumi:"secondaryTableEndpoint"`
// The hostname with port if applicable for table storage in the secondary location.
SecondaryTableHost string `pulumi:"secondaryTableHost"`
// The microsoft routing endpoint URL for table storage in the secondary location.
SecondaryTableMicrosoftEndpoint string `pulumi:"secondaryTableMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for table storage in the secondary location.
SecondaryTableMicrosoftHost string `pulumi:"secondaryTableMicrosoftHost"`
// The endpoint URL for web storage in the secondary location.
SecondaryWebEndpoint string `pulumi:"secondaryWebEndpoint"`
// The hostname with port if applicable for web storage in the secondary location.
SecondaryWebHost string `pulumi:"secondaryWebHost"`
// The internet routing endpoint URL for web storage in the secondary location.
SecondaryWebInternetEndpoint string `pulumi:"secondaryWebInternetEndpoint"`
// The internet routing hostname with port if applicable for web storage in the secondary location.
SecondaryWebInternetHost string `pulumi:"secondaryWebInternetHost"`
// The microsoft routing endpoint URL for web storage in the secondary location.
SecondaryWebMicrosoftEndpoint string `pulumi:"secondaryWebMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for web storage in the secondary location.
SecondaryWebMicrosoftHost string `pulumi:"secondaryWebMicrosoftHost"`
// The encryption key type of the table.
TableEncryptionKeyType string `pulumi:"tableEncryptionKeyType"`
// A mapping of tags to assigned to the resource.
Tags map[string]string `pulumi:"tags"`
}
func LookupAccountOutput(ctx *pulumi.Context, args LookupAccountOutputArgs, opts ...pulumi.InvokeOption) LookupAccountResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupAccountResultOutput, error) {
args := v.(LookupAccountArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:storage/getAccount:getAccount", args, LookupAccountResultOutput{}, options).(LookupAccountResultOutput), nil
}).(LookupAccountResultOutput)
}
// A collection of arguments for invoking getAccount.
type LookupAccountOutputArgs struct {
// The minimum supported TLS version for this storage account.
MinTlsVersion pulumi.StringPtrInput `pulumi:"minTlsVersion"`
// Specifies the name of the Storage Account
Name pulumi.StringInput `pulumi:"name"`
// Specifies the name of the resource group the Storage Account is located in.
ResourceGroupName pulumi.StringPtrInput `pulumi:"resourceGroupName"`
}
func (LookupAccountOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAccountArgs)(nil)).Elem()
}
// A collection of values returned by getAccount.
type LookupAccountResultOutput struct{ *pulumi.OutputState }
func (LookupAccountResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAccountResult)(nil)).Elem()
}
func (o LookupAccountResultOutput) ToLookupAccountResultOutput() LookupAccountResultOutput {
return o
}
func (o LookupAccountResultOutput) ToLookupAccountResultOutputWithContext(ctx context.Context) LookupAccountResultOutput {
return o
}
// The access tier for `BlobStorage` accounts.
func (o LookupAccountResultOutput) AccessTier() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.AccessTier }).(pulumi.StringOutput)
}
// The Kind of account.
func (o LookupAccountResultOutput) AccountKind() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.AccountKind }).(pulumi.StringOutput)
}
// The type of replication used for this storage account.
func (o LookupAccountResultOutput) AccountReplicationType() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.AccountReplicationType }).(pulumi.StringOutput)
}
// The Tier of this storage account.
func (o LookupAccountResultOutput) AccountTier() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.AccountTier }).(pulumi.StringOutput)
}
// Can nested items in the storage account opt into allowing public access?
func (o LookupAccountResultOutput) AllowNestedItemsToBePublic() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAccountResult) bool { return v.AllowNestedItemsToBePublic }).(pulumi.BoolOutput)
}
// A `azureFilesAuthentication` block as documented below.
func (o LookupAccountResultOutput) AzureFilesAuthentications() GetAccountAzureFilesAuthenticationArrayOutput {
return o.ApplyT(func(v LookupAccountResult) []GetAccountAzureFilesAuthentication { return v.AzureFilesAuthentications }).(GetAccountAzureFilesAuthenticationArrayOutput)
}
// supports the following:
func (o LookupAccountResultOutput) CustomDomains() GetAccountCustomDomainArrayOutput {
return o.ApplyT(func(v LookupAccountResult) []GetAccountCustomDomain { return v.CustomDomains }).(GetAccountCustomDomainArrayOutput)
}
// Which DNS endpoint type is used - either `Standard` or `AzureDnsZone`.
func (o LookupAccountResultOutput) DnsEndpointType() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.DnsEndpointType }).(pulumi.StringOutput)
}
// Is traffic only allowed via HTTPS? See [here](https://docs.microsoft.com/azure/storage/storage-require-secure-transfer/) for more information.
func (o LookupAccountResultOutput) HttpsTrafficOnlyEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAccountResult) bool { return v.HttpsTrafficOnlyEnabled }).(pulumi.BoolOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupAccountResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Id }).(pulumi.StringOutput)
}
// An `identity` block as documented below.
func (o LookupAccountResultOutput) Identities() GetAccountIdentityArrayOutput {
return o.ApplyT(func(v LookupAccountResult) []GetAccountIdentity { return v.Identities }).(GetAccountIdentityArrayOutput)
}
// Is infrastructure encryption enabled? See [here](https://docs.microsoft.com/azure/storage/common/infrastructure-encryption-enable/)
// for more information.
func (o LookupAccountResultOutput) InfrastructureEncryptionEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAccountResult) bool { return v.InfrastructureEncryptionEnabled }).(pulumi.BoolOutput)
}
// Is Hierarchical Namespace enabled?
func (o LookupAccountResultOutput) IsHnsEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAccountResult) bool { return v.IsHnsEnabled }).(pulumi.BoolOutput)
}
// The Azure location where the Storage Account exists
func (o LookupAccountResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Location }).(pulumi.StringOutput)
}
// The minimum supported TLS version for this storage account.
func (o LookupAccountResultOutput) MinTlsVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupAccountResult) *string { return v.MinTlsVersion }).(pulumi.StringPtrOutput)
}
// The Custom Domain Name used for the Storage Account.
func (o LookupAccountResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.Name }).(pulumi.StringOutput)
}
// Is NFSv3 protocol enabled?
func (o LookupAccountResultOutput) Nfsv3Enabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupAccountResult) bool { return v.Nfsv3Enabled }).(pulumi.BoolOutput)
}
// The primary access key for the Storage Account.
func (o LookupAccountResultOutput) PrimaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryAccessKey }).(pulumi.StringOutput)
}
// The connection string associated with the primary blob location
func (o LookupAccountResultOutput) PrimaryBlobConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryBlobConnectionString }).(pulumi.StringOutput)
}
// The endpoint URL for blob storage in the primary location.
func (o LookupAccountResultOutput) PrimaryBlobEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryBlobEndpoint }).(pulumi.StringOutput)
}
// The hostname with port if applicable for blob storage in the primary location.
func (o LookupAccountResultOutput) PrimaryBlobHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryBlobHost }).(pulumi.StringOutput)
}
// The internet routing endpoint URL for blob storage in the primary location.
func (o LookupAccountResultOutput) PrimaryBlobInternetEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryBlobInternetEndpoint }).(pulumi.StringOutput)
}
// The internet routing hostname with port if applicable for blob storage in the primary location.
func (o LookupAccountResultOutput) PrimaryBlobInternetHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryBlobInternetHost }).(pulumi.StringOutput)
}
// The microsoft routing endpoint URL for blob storage in the primary location.
func (o LookupAccountResultOutput) PrimaryBlobMicrosoftEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryBlobMicrosoftEndpoint }).(pulumi.StringOutput)
}
// The microsoft routing hostname with port if applicable for blob storage in the primary location.
func (o LookupAccountResultOutput) PrimaryBlobMicrosoftHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryBlobMicrosoftHost }).(pulumi.StringOutput)
}
// The connection string associated with the primary location
func (o LookupAccountResultOutput) PrimaryConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryConnectionString }).(pulumi.StringOutput)
}
// The endpoint URL for DFS storage in the primary location.
func (o LookupAccountResultOutput) PrimaryDfsEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryDfsEndpoint }).(pulumi.StringOutput)
}
// The hostname with port if applicable for DFS storage in the primary location.
func (o LookupAccountResultOutput) PrimaryDfsHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryDfsHost }).(pulumi.StringOutput)
}
// The internet routing endpoint URL for DFS storage in the primary location.
func (o LookupAccountResultOutput) PrimaryDfsInternetEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryDfsInternetEndpoint }).(pulumi.StringOutput)
}
// The internet routing hostname with port if applicable for DFS storage in the primary location.
func (o LookupAccountResultOutput) PrimaryDfsInternetHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryDfsInternetHost }).(pulumi.StringOutput)
}
// The microsoft routing endpoint URL for DFS storage in the primary location.
func (o LookupAccountResultOutput) PrimaryDfsMicrosoftEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryDfsMicrosoftEndpoint }).(pulumi.StringOutput)
}
// The microsoft routing hostname with port if applicable for DFS storage in the primary location.
func (o LookupAccountResultOutput) PrimaryDfsMicrosoftHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryDfsMicrosoftHost }).(pulumi.StringOutput)
}
// The endpoint URL for file storage in the primary location.
func (o LookupAccountResultOutput) PrimaryFileEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryFileEndpoint }).(pulumi.StringOutput)
}
// The hostname with port if applicable for file storage in the primary location.
func (o LookupAccountResultOutput) PrimaryFileHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryFileHost }).(pulumi.StringOutput)
}
// The internet routing endpoint URL for file storage in the primary location.
func (o LookupAccountResultOutput) PrimaryFileInternetEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryFileInternetEndpoint }).(pulumi.StringOutput)
}
// The internet routing hostname with port if applicable for file storage in the primary location.
func (o LookupAccountResultOutput) PrimaryFileInternetHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryFileInternetHost }).(pulumi.StringOutput)
}
// The microsoft routing endpoint URL for file storage in the primary location.
func (o LookupAccountResultOutput) PrimaryFileMicrosoftEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryFileMicrosoftEndpoint }).(pulumi.StringOutput)
}
// The microsoft routing hostname with port if applicable for file storage in the primary location.
func (o LookupAccountResultOutput) PrimaryFileMicrosoftHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryFileMicrosoftHost }).(pulumi.StringOutput)
}
// The primary location of the Storage Account.
func (o LookupAccountResultOutput) PrimaryLocation() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryLocation }).(pulumi.StringOutput)
}
// The endpoint URL for queue storage in the primary location.
func (o LookupAccountResultOutput) PrimaryQueueEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryQueueEndpoint }).(pulumi.StringOutput)
}
// The hostname with port if applicable for queue storage in the primary location.
func (o LookupAccountResultOutput) PrimaryQueueHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryQueueHost }).(pulumi.StringOutput)
}
// The microsoft routing endpoint URL for queue storage in the primary location.
func (o LookupAccountResultOutput) PrimaryQueueMicrosoftEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryQueueMicrosoftEndpoint }).(pulumi.StringOutput)
}
// The microsoft routing hostname with port if applicable for queue storage in the primary location.
func (o LookupAccountResultOutput) PrimaryQueueMicrosoftHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryQueueMicrosoftHost }).(pulumi.StringOutput)
}
// The endpoint URL for table storage in the primary location.
func (o LookupAccountResultOutput) PrimaryTableEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryTableEndpoint }).(pulumi.StringOutput)
}
// The hostname with port if applicable for table storage in the primary location.
func (o LookupAccountResultOutput) PrimaryTableHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryTableHost }).(pulumi.StringOutput)
}
// The microsoft routing endpoint URL for table storage in the primary location.
func (o LookupAccountResultOutput) PrimaryTableMicrosoftEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryTableMicrosoftEndpoint }).(pulumi.StringOutput)
}
// The microsoft routing hostname with port if applicable for table storage in the primary location.
func (o LookupAccountResultOutput) PrimaryTableMicrosoftHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryTableMicrosoftHost }).(pulumi.StringOutput)
}
// The endpoint URL for web storage in the primary location.
func (o LookupAccountResultOutput) PrimaryWebEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryWebEndpoint }).(pulumi.StringOutput)
}
// The hostname with port if applicable for web storage in the primary location.
func (o LookupAccountResultOutput) PrimaryWebHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryWebHost }).(pulumi.StringOutput)
}
// The internet routing endpoint URL for web storage in the primary location.
func (o LookupAccountResultOutput) PrimaryWebInternetEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryWebInternetEndpoint }).(pulumi.StringOutput)
}
// The internet routing hostname with port if applicable for web storage in the primary location.
func (o LookupAccountResultOutput) PrimaryWebInternetHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryWebInternetHost }).(pulumi.StringOutput)
}
// The microsoft routing endpoint URL for web storage in the primary location.
func (o LookupAccountResultOutput) PrimaryWebMicrosoftEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryWebMicrosoftEndpoint }).(pulumi.StringOutput)
}
// The microsoft routing hostname with port if applicable for web storage in the primary location.
func (o LookupAccountResultOutput) PrimaryWebMicrosoftHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.PrimaryWebMicrosoftHost }).(pulumi.StringOutput)
}
// The encryption key type of the queue.
func (o LookupAccountResultOutput) QueueEncryptionKeyType() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.QueueEncryptionKeyType }).(pulumi.StringOutput)
}
func (o LookupAccountResultOutput) ResourceGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupAccountResult) *string { return v.ResourceGroupName }).(pulumi.StringPtrOutput)
}
// The secondary access key for the Storage Account.
func (o LookupAccountResultOutput) SecondaryAccessKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.SecondaryAccessKey }).(pulumi.StringOutput)
}
// The connection string associated with the secondary blob location
func (o LookupAccountResultOutput) SecondaryBlobConnectionString() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.SecondaryBlobConnectionString }).(pulumi.StringOutput)
}
// The endpoint URL for blob storage in the secondary location.
func (o LookupAccountResultOutput) SecondaryBlobEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.SecondaryBlobEndpoint }).(pulumi.StringOutput)
}
// The hostname with port if applicable for blob storage in the secondary location.
func (o LookupAccountResultOutput) SecondaryBlobHost() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.SecondaryBlobHost }).(pulumi.StringOutput)
}
// The internet routing endpoint URL for blob storage in the secondary location.
func (o LookupAccountResultOutput) SecondaryBlobInternetEndpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupAccountResult) string { return v.SecondaryBlobInternetEndpoint }).(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/storage/getTableEntities.go | sdk/go/azure/storage/getTableEntities.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
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 Storage Table Entity.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 {
// _, err := storage.GetTableEntities(ctx, &storage.GetTableEntitiesArgs{
// StorageTableId: exampleAzurermStorageTable.Id,
// Filter: "PartitionKey eq 'example'",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetTableEntities(ctx *pulumi.Context, args *GetTableEntitiesArgs, opts ...pulumi.InvokeOption) (*GetTableEntitiesResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetTableEntitiesResult
err := ctx.Invoke("azure:storage/getTableEntities:getTableEntities", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getTableEntities.
type GetTableEntitiesArgs struct {
// The filter used to retrieve the entities.
Filter string `pulumi:"filter"`
// A list of properties to select from the returned Storage Table Entities.
Selects []string `pulumi:"selects"`
// The Storage Table ID where the entities exist.
StorageTableId string `pulumi:"storageTableId"`
}
// A collection of values returned by getTableEntities.
type GetTableEntitiesResult struct {
Filter string `pulumi:"filter"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A list of `items` blocks as defined below.
Items []GetTableEntitiesItem `pulumi:"items"`
Selects []string `pulumi:"selects"`
StorageTableId string `pulumi:"storageTableId"`
}
func GetTableEntitiesOutput(ctx *pulumi.Context, args GetTableEntitiesOutputArgs, opts ...pulumi.InvokeOption) GetTableEntitiesResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetTableEntitiesResultOutput, error) {
args := v.(GetTableEntitiesArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:storage/getTableEntities:getTableEntities", args, GetTableEntitiesResultOutput{}, options).(GetTableEntitiesResultOutput), nil
}).(GetTableEntitiesResultOutput)
}
// A collection of arguments for invoking getTableEntities.
type GetTableEntitiesOutputArgs struct {
// The filter used to retrieve the entities.
Filter pulumi.StringInput `pulumi:"filter"`
// A list of properties to select from the returned Storage Table Entities.
Selects pulumi.StringArrayInput `pulumi:"selects"`
// The Storage Table ID where the entities exist.
StorageTableId pulumi.StringInput `pulumi:"storageTableId"`
}
func (GetTableEntitiesOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetTableEntitiesArgs)(nil)).Elem()
}
// A collection of values returned by getTableEntities.
type GetTableEntitiesResultOutput struct{ *pulumi.OutputState }
func (GetTableEntitiesResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetTableEntitiesResult)(nil)).Elem()
}
func (o GetTableEntitiesResultOutput) ToGetTableEntitiesResultOutput() GetTableEntitiesResultOutput {
return o
}
func (o GetTableEntitiesResultOutput) ToGetTableEntitiesResultOutputWithContext(ctx context.Context) GetTableEntitiesResultOutput {
return o
}
func (o GetTableEntitiesResultOutput) Filter() pulumi.StringOutput {
return o.ApplyT(func(v GetTableEntitiesResult) string { return v.Filter }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetTableEntitiesResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetTableEntitiesResult) string { return v.Id }).(pulumi.StringOutput)
}
// A list of `items` blocks as defined below.
func (o GetTableEntitiesResultOutput) Items() GetTableEntitiesItemArrayOutput {
return o.ApplyT(func(v GetTableEntitiesResult) []GetTableEntitiesItem { return v.Items }).(GetTableEntitiesItemArrayOutput)
}
func (o GetTableEntitiesResultOutput) Selects() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetTableEntitiesResult) []string { return v.Selects }).(pulumi.StringArrayOutput)
}
func (o GetTableEntitiesResultOutput) StorageTableId() pulumi.StringOutput {
return o.ApplyT(func(v GetTableEntitiesResult) string { return v.StorageTableId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetTableEntitiesResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/dataLakeGen2Filesystem.go | sdk/go/azure/storage/dataLakeGen2Filesystem.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Data Lake Gen2 File System within an Azure Storage Account.
//
// > **Note:** This resource requires some `Storage` specific roles which are not granted by default. Some of the built-ins roles that can be attributed are [`Storage Account Contributor`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-account-contributor), [`Storage Blob Data Owner`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-owner), [`Storage Blob Data Contributor`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-contributor), [`Storage Blob Data Reader`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-reader).
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/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("examplestorageacc"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// AccountKind: pulumi.String("StorageV2"),
// IsHnsEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{
// Name: pulumi.String("example"),
// StorageAccountId: exampleAccount.ID(),
// Properties: pulumi.StringMap{
// "hello": pulumi.String("aGVsbG8="),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Data Lake Gen2 File System's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/dataLakeGen2Filesystem:DataLakeGen2Filesystem queue1 https://account1.dfs.core.windows.net/fileSystem1
// ```
type DataLakeGen2Filesystem struct {
pulumi.CustomResourceState
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
Aces DataLakeGen2FilesystemAceArrayOutput `pulumi:"aces"`
// The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
DefaultEncryptionScope pulumi.StringOutput `pulumi:"defaultEncryptionScope"`
// Specifies the Object ID of the Azure Active Directory Group to make the owning group of the root path (i.e. `/`). Possible values also include `$superuser`.
//
// > **Note:** The Storage Account requires `accountKind` to be either `StorageV2` or `BlobStorage`. In addition, `isHnsEnabled` has to be set to `true`.
Group pulumi.StringOutput `pulumi:"group"`
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`.
Owner pulumi.StringOutput `pulumi:"owner"`
// A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
Properties pulumi.StringMapOutput `pulumi:"properties"`
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
}
// NewDataLakeGen2Filesystem registers a new resource with the given unique name, arguments, and options.
func NewDataLakeGen2Filesystem(ctx *pulumi.Context,
name string, args *DataLakeGen2FilesystemArgs, opts ...pulumi.ResourceOption) (*DataLakeGen2Filesystem, 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 DataLakeGen2Filesystem
err := ctx.RegisterResource("azure:storage/dataLakeGen2Filesystem:DataLakeGen2Filesystem", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDataLakeGen2Filesystem gets an existing DataLakeGen2Filesystem resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDataLakeGen2Filesystem(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DataLakeGen2FilesystemState, opts ...pulumi.ResourceOption) (*DataLakeGen2Filesystem, error) {
var resource DataLakeGen2Filesystem
err := ctx.ReadResource("azure:storage/dataLakeGen2Filesystem:DataLakeGen2Filesystem", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DataLakeGen2Filesystem resources.
type dataLakeGen2FilesystemState struct {
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
Aces []DataLakeGen2FilesystemAce `pulumi:"aces"`
// The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
DefaultEncryptionScope *string `pulumi:"defaultEncryptionScope"`
// Specifies the Object ID of the Azure Active Directory Group to make the owning group of the root path (i.e. `/`). Possible values also include `$superuser`.
//
// > **Note:** The Storage Account requires `accountKind` to be either `StorageV2` or `BlobStorage`. In addition, `isHnsEnabled` has to be set to `true`.
Group *string `pulumi:"group"`
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`.
Owner *string `pulumi:"owner"`
// A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
Properties map[string]string `pulumi:"properties"`
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
}
type DataLakeGen2FilesystemState struct {
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
Aces DataLakeGen2FilesystemAceArrayInput
// The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
DefaultEncryptionScope pulumi.StringPtrInput
// Specifies the Object ID of the Azure Active Directory Group to make the owning group of the root path (i.e. `/`). Possible values also include `$superuser`.
//
// > **Note:** The Storage Account requires `accountKind` to be either `StorageV2` or `BlobStorage`. In addition, `isHnsEnabled` has to be set to `true`.
Group pulumi.StringPtrInput
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`.
Owner pulumi.StringPtrInput
// A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
Properties pulumi.StringMapInput
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringPtrInput
}
func (DataLakeGen2FilesystemState) ElementType() reflect.Type {
return reflect.TypeOf((*dataLakeGen2FilesystemState)(nil)).Elem()
}
type dataLakeGen2FilesystemArgs struct {
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
Aces []DataLakeGen2FilesystemAce `pulumi:"aces"`
// The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
DefaultEncryptionScope *string `pulumi:"defaultEncryptionScope"`
// Specifies the Object ID of the Azure Active Directory Group to make the owning group of the root path (i.e. `/`). Possible values also include `$superuser`.
//
// > **Note:** The Storage Account requires `accountKind` to be either `StorageV2` or `BlobStorage`. In addition, `isHnsEnabled` has to be set to `true`.
Group *string `pulumi:"group"`
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`.
Owner *string `pulumi:"owner"`
// A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
Properties map[string]string `pulumi:"properties"`
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
StorageAccountId string `pulumi:"storageAccountId"`
}
// The set of arguments for constructing a DataLakeGen2Filesystem resource.
type DataLakeGen2FilesystemArgs struct {
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
Aces DataLakeGen2FilesystemAceArrayInput
// The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
DefaultEncryptionScope pulumi.StringPtrInput
// Specifies the Object ID of the Azure Active Directory Group to make the owning group of the root path (i.e. `/`). Possible values also include `$superuser`.
//
// > **Note:** The Storage Account requires `accountKind` to be either `StorageV2` or `BlobStorage`. In addition, `isHnsEnabled` has to be set to `true`.
Group pulumi.StringPtrInput
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`.
Owner pulumi.StringPtrInput
// A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
Properties pulumi.StringMapInput
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringInput
}
func (DataLakeGen2FilesystemArgs) ElementType() reflect.Type {
return reflect.TypeOf((*dataLakeGen2FilesystemArgs)(nil)).Elem()
}
type DataLakeGen2FilesystemInput interface {
pulumi.Input
ToDataLakeGen2FilesystemOutput() DataLakeGen2FilesystemOutput
ToDataLakeGen2FilesystemOutputWithContext(ctx context.Context) DataLakeGen2FilesystemOutput
}
func (*DataLakeGen2Filesystem) ElementType() reflect.Type {
return reflect.TypeOf((**DataLakeGen2Filesystem)(nil)).Elem()
}
func (i *DataLakeGen2Filesystem) ToDataLakeGen2FilesystemOutput() DataLakeGen2FilesystemOutput {
return i.ToDataLakeGen2FilesystemOutputWithContext(context.Background())
}
func (i *DataLakeGen2Filesystem) ToDataLakeGen2FilesystemOutputWithContext(ctx context.Context) DataLakeGen2FilesystemOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataLakeGen2FilesystemOutput)
}
// DataLakeGen2FilesystemArrayInput is an input type that accepts DataLakeGen2FilesystemArray and DataLakeGen2FilesystemArrayOutput values.
// You can construct a concrete instance of `DataLakeGen2FilesystemArrayInput` via:
//
// DataLakeGen2FilesystemArray{ DataLakeGen2FilesystemArgs{...} }
type DataLakeGen2FilesystemArrayInput interface {
pulumi.Input
ToDataLakeGen2FilesystemArrayOutput() DataLakeGen2FilesystemArrayOutput
ToDataLakeGen2FilesystemArrayOutputWithContext(context.Context) DataLakeGen2FilesystemArrayOutput
}
type DataLakeGen2FilesystemArray []DataLakeGen2FilesystemInput
func (DataLakeGen2FilesystemArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DataLakeGen2Filesystem)(nil)).Elem()
}
func (i DataLakeGen2FilesystemArray) ToDataLakeGen2FilesystemArrayOutput() DataLakeGen2FilesystemArrayOutput {
return i.ToDataLakeGen2FilesystemArrayOutputWithContext(context.Background())
}
func (i DataLakeGen2FilesystemArray) ToDataLakeGen2FilesystemArrayOutputWithContext(ctx context.Context) DataLakeGen2FilesystemArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataLakeGen2FilesystemArrayOutput)
}
// DataLakeGen2FilesystemMapInput is an input type that accepts DataLakeGen2FilesystemMap and DataLakeGen2FilesystemMapOutput values.
// You can construct a concrete instance of `DataLakeGen2FilesystemMapInput` via:
//
// DataLakeGen2FilesystemMap{ "key": DataLakeGen2FilesystemArgs{...} }
type DataLakeGen2FilesystemMapInput interface {
pulumi.Input
ToDataLakeGen2FilesystemMapOutput() DataLakeGen2FilesystemMapOutput
ToDataLakeGen2FilesystemMapOutputWithContext(context.Context) DataLakeGen2FilesystemMapOutput
}
type DataLakeGen2FilesystemMap map[string]DataLakeGen2FilesystemInput
func (DataLakeGen2FilesystemMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DataLakeGen2Filesystem)(nil)).Elem()
}
func (i DataLakeGen2FilesystemMap) ToDataLakeGen2FilesystemMapOutput() DataLakeGen2FilesystemMapOutput {
return i.ToDataLakeGen2FilesystemMapOutputWithContext(context.Background())
}
func (i DataLakeGen2FilesystemMap) ToDataLakeGen2FilesystemMapOutputWithContext(ctx context.Context) DataLakeGen2FilesystemMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataLakeGen2FilesystemMapOutput)
}
type DataLakeGen2FilesystemOutput struct{ *pulumi.OutputState }
func (DataLakeGen2FilesystemOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DataLakeGen2Filesystem)(nil)).Elem()
}
func (o DataLakeGen2FilesystemOutput) ToDataLakeGen2FilesystemOutput() DataLakeGen2FilesystemOutput {
return o
}
func (o DataLakeGen2FilesystemOutput) ToDataLakeGen2FilesystemOutputWithContext(ctx context.Context) DataLakeGen2FilesystemOutput {
return o
}
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
func (o DataLakeGen2FilesystemOutput) Aces() DataLakeGen2FilesystemAceArrayOutput {
return o.ApplyT(func(v *DataLakeGen2Filesystem) DataLakeGen2FilesystemAceArrayOutput { return v.Aces }).(DataLakeGen2FilesystemAceArrayOutput)
}
// The default encryption scope to use for this filesystem. Changing this forces a new resource to be created.
func (o DataLakeGen2FilesystemOutput) DefaultEncryptionScope() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Filesystem) pulumi.StringOutput { return v.DefaultEncryptionScope }).(pulumi.StringOutput)
}
// Specifies the Object ID of the Azure Active Directory Group to make the owning group of the root path (i.e. `/`). Possible values also include `$superuser`.
//
// > **Note:** The Storage Account requires `accountKind` to be either `StorageV2` or `BlobStorage`. In addition, `isHnsEnabled` has to be set to `true`.
func (o DataLakeGen2FilesystemOutput) Group() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Filesystem) pulumi.StringOutput { return v.Group }).(pulumi.StringOutput)
}
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
func (o DataLakeGen2FilesystemOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Filesystem) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the Object ID of the Azure Active Directory User to make the owning user of the root path (i.e. `/`). Possible values also include `$superuser`.
func (o DataLakeGen2FilesystemOutput) Owner() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Filesystem) pulumi.StringOutput { return v.Owner }).(pulumi.StringOutput)
}
// A mapping of Key to Base64-Encoded Values which should be assigned to this Data Lake Gen2 File System.
func (o DataLakeGen2FilesystemOutput) Properties() pulumi.StringMapOutput {
return o.ApplyT(func(v *DataLakeGen2Filesystem) pulumi.StringMapOutput { return v.Properties }).(pulumi.StringMapOutput)
}
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
func (o DataLakeGen2FilesystemOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Filesystem) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
type DataLakeGen2FilesystemArrayOutput struct{ *pulumi.OutputState }
func (DataLakeGen2FilesystemArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DataLakeGen2Filesystem)(nil)).Elem()
}
func (o DataLakeGen2FilesystemArrayOutput) ToDataLakeGen2FilesystemArrayOutput() DataLakeGen2FilesystemArrayOutput {
return o
}
func (o DataLakeGen2FilesystemArrayOutput) ToDataLakeGen2FilesystemArrayOutputWithContext(ctx context.Context) DataLakeGen2FilesystemArrayOutput {
return o
}
func (o DataLakeGen2FilesystemArrayOutput) Index(i pulumi.IntInput) DataLakeGen2FilesystemOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataLakeGen2Filesystem {
return vs[0].([]*DataLakeGen2Filesystem)[vs[1].(int)]
}).(DataLakeGen2FilesystemOutput)
}
type DataLakeGen2FilesystemMapOutput struct{ *pulumi.OutputState }
func (DataLakeGen2FilesystemMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DataLakeGen2Filesystem)(nil)).Elem()
}
func (o DataLakeGen2FilesystemMapOutput) ToDataLakeGen2FilesystemMapOutput() DataLakeGen2FilesystemMapOutput {
return o
}
func (o DataLakeGen2FilesystemMapOutput) ToDataLakeGen2FilesystemMapOutputWithContext(ctx context.Context) DataLakeGen2FilesystemMapOutput {
return o
}
func (o DataLakeGen2FilesystemMapOutput) MapIndex(k pulumi.StringInput) DataLakeGen2FilesystemOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataLakeGen2Filesystem {
return vs[0].(map[string]*DataLakeGen2Filesystem)[vs[1].(string)]
}).(DataLakeGen2FilesystemOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DataLakeGen2FilesystemInput)(nil)).Elem(), &DataLakeGen2Filesystem{})
pulumi.RegisterInputType(reflect.TypeOf((*DataLakeGen2FilesystemArrayInput)(nil)).Elem(), DataLakeGen2FilesystemArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DataLakeGen2FilesystemMapInput)(nil)).Elem(), DataLakeGen2FilesystemMap{})
pulumi.RegisterOutputType(DataLakeGen2FilesystemOutput{})
pulumi.RegisterOutputType(DataLakeGen2FilesystemArrayOutput{})
pulumi.RegisterOutputType(DataLakeGen2FilesystemMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/getBlob.go | sdk/go/azure/storage/getBlob.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
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 Storage Blob.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 {
// _, err := storage.LookupBlob(ctx, &storage.LookupBlobArgs{
// Name: "example-blob-name",
// StorageAccountName: "example-storage-account-name",
// StorageContainerName: "example-storage-container-name",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupBlob(ctx *pulumi.Context, args *LookupBlobArgs, opts ...pulumi.InvokeOption) (*LookupBlobResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupBlobResult
err := ctx.Invoke("azure:storage/getBlob:getBlob", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getBlob.
type LookupBlobArgs struct {
// A map of custom blob metadata.
Metadata map[string]string `pulumi:"metadata"`
// The name of the Blob.
Name string `pulumi:"name"`
// The name of the Storage Account where the Container exists.
StorageAccountName string `pulumi:"storageAccountName"`
// The name of the Storage Container where the Blob exists.
StorageContainerName string `pulumi:"storageContainerName"`
}
// A collection of values returned by getBlob.
type LookupBlobResult struct {
// The access tier of the storage blob.
AccessTier string `pulumi:"accessTier"`
// The MD5 sum of the blob contents.
ContentMd5 string `pulumi:"contentMd5"`
// The content type of the storage blob.
ContentType string `pulumi:"contentType"`
// The encryption scope for this blob.
EncryptionScope string `pulumi:"encryptionScope"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A map of custom blob metadata.
Metadata map[string]string `pulumi:"metadata"`
Name string `pulumi:"name"`
StorageAccountName string `pulumi:"storageAccountName"`
StorageContainerName string `pulumi:"storageContainerName"`
// The type of the storage blob
Type string `pulumi:"type"`
// The URL of the storage blob.
Url string `pulumi:"url"`
}
func LookupBlobOutput(ctx *pulumi.Context, args LookupBlobOutputArgs, opts ...pulumi.InvokeOption) LookupBlobResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupBlobResultOutput, error) {
args := v.(LookupBlobArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:storage/getBlob:getBlob", args, LookupBlobResultOutput{}, options).(LookupBlobResultOutput), nil
}).(LookupBlobResultOutput)
}
// A collection of arguments for invoking getBlob.
type LookupBlobOutputArgs struct {
// A map of custom blob metadata.
Metadata pulumi.StringMapInput `pulumi:"metadata"`
// The name of the Blob.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Storage Account where the Container exists.
StorageAccountName pulumi.StringInput `pulumi:"storageAccountName"`
// The name of the Storage Container where the Blob exists.
StorageContainerName pulumi.StringInput `pulumi:"storageContainerName"`
}
func (LookupBlobOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupBlobArgs)(nil)).Elem()
}
// A collection of values returned by getBlob.
type LookupBlobResultOutput struct{ *pulumi.OutputState }
func (LookupBlobResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupBlobResult)(nil)).Elem()
}
func (o LookupBlobResultOutput) ToLookupBlobResultOutput() LookupBlobResultOutput {
return o
}
func (o LookupBlobResultOutput) ToLookupBlobResultOutputWithContext(ctx context.Context) LookupBlobResultOutput {
return o
}
// The access tier of the storage blob.
func (o LookupBlobResultOutput) AccessTier() pulumi.StringOutput {
return o.ApplyT(func(v LookupBlobResult) string { return v.AccessTier }).(pulumi.StringOutput)
}
// The MD5 sum of the blob contents.
func (o LookupBlobResultOutput) ContentMd5() pulumi.StringOutput {
return o.ApplyT(func(v LookupBlobResult) string { return v.ContentMd5 }).(pulumi.StringOutput)
}
// The content type of the storage blob.
func (o LookupBlobResultOutput) ContentType() pulumi.StringOutput {
return o.ApplyT(func(v LookupBlobResult) string { return v.ContentType }).(pulumi.StringOutput)
}
// The encryption scope for this blob.
func (o LookupBlobResultOutput) EncryptionScope() pulumi.StringOutput {
return o.ApplyT(func(v LookupBlobResult) string { return v.EncryptionScope }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupBlobResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupBlobResult) string { return v.Id }).(pulumi.StringOutput)
}
// A map of custom blob metadata.
func (o LookupBlobResultOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupBlobResult) map[string]string { return v.Metadata }).(pulumi.StringMapOutput)
}
func (o LookupBlobResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupBlobResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupBlobResultOutput) StorageAccountName() pulumi.StringOutput {
return o.ApplyT(func(v LookupBlobResult) string { return v.StorageAccountName }).(pulumi.StringOutput)
}
func (o LookupBlobResultOutput) StorageContainerName() pulumi.StringOutput {
return o.ApplyT(func(v LookupBlobResult) string { return v.StorageContainerName }).(pulumi.StringOutput)
}
// The type of the storage blob
func (o LookupBlobResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupBlobResult) string { return v.Type }).(pulumi.StringOutput)
}
// The URL of the storage blob.
func (o LookupBlobResultOutput) Url() pulumi.StringOutput {
return o.ApplyT(func(v LookupBlobResult) string { return v.Url }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupBlobResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/managementPolicy.go | sdk/go/azure/storage/managementPolicy.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
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 Storage Account Management Policy.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/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("resourceGroupName"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("storageaccountname"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// AccountKind: pulumi.String("BlobStorage"),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewManagementPolicy(ctx, "example", &storage.ManagementPolicyArgs{
// StorageAccountId: exampleAccount.ID(),
// Rules: storage.ManagementPolicyRuleArray{
// &storage.ManagementPolicyRuleArgs{
// Name: pulumi.String("rule1"),
// Enabled: pulumi.Bool(true),
// Filters: &storage.ManagementPolicyRuleFiltersArgs{
// PrefixMatches: pulumi.StringArray{
// pulumi.String("container1/prefix1"),
// },
// BlobTypes: pulumi.StringArray{
// pulumi.String("blockBlob"),
// },
// MatchBlobIndexTags: storage.ManagementPolicyRuleFiltersMatchBlobIndexTagArray{
// &storage.ManagementPolicyRuleFiltersMatchBlobIndexTagArgs{
// Name: pulumi.String("tag1"),
// Operation: pulumi.String("=="),
// Value: pulumi.String("val1"),
// },
// },
// },
// Actions: &storage.ManagementPolicyRuleActionsArgs{
// BaseBlob: &storage.ManagementPolicyRuleActionsBaseBlobArgs{
// TierToCoolAfterDaysSinceModificationGreaterThan: pulumi.Int(10),
// TierToArchiveAfterDaysSinceModificationGreaterThan: pulumi.Int(50),
// DeleteAfterDaysSinceModificationGreaterThan: pulumi.Int(100),
// },
// Snapshot: &storage.ManagementPolicyRuleActionsSnapshotArgs{
// DeleteAfterDaysSinceCreationGreaterThan: pulumi.Int(30),
// },
// },
// },
// &storage.ManagementPolicyRuleArgs{
// Name: pulumi.String("rule2"),
// Enabled: pulumi.Bool(false),
// Filters: &storage.ManagementPolicyRuleFiltersArgs{
// PrefixMatches: pulumi.StringArray{
// pulumi.String("container2/prefix1"),
// pulumi.String("container2/prefix2"),
// },
// BlobTypes: pulumi.StringArray{
// pulumi.String("blockBlob"),
// },
// },
// Actions: &storage.ManagementPolicyRuleActionsArgs{
// BaseBlob: &storage.ManagementPolicyRuleActionsBaseBlobArgs{
// TierToCoolAfterDaysSinceModificationGreaterThan: pulumi.Int(11),
// TierToArchiveAfterDaysSinceModificationGreaterThan: pulumi.Int(51),
// DeleteAfterDaysSinceModificationGreaterThan: pulumi.Int(101),
// },
// Snapshot: &storage.ManagementPolicyRuleActionsSnapshotArgs{
// ChangeTierToArchiveAfterDaysSinceCreation: pulumi.Int(90),
// ChangeTierToCoolAfterDaysSinceCreation: pulumi.Int(23),
// DeleteAfterDaysSinceCreationGreaterThan: pulumi.Int(31),
// },
// Version: &storage.ManagementPolicyRuleActionsVersionArgs{
// ChangeTierToArchiveAfterDaysSinceCreation: pulumi.Int(9),
// ChangeTierToCoolAfterDaysSinceCreation: pulumi.Int(90),
// DeleteAfterDaysSinceCreation: pulumi.Int(3),
// },
// },
// },
// },
// })
// 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.Storage` - 2023-05-01
//
// ## Import
//
// Storage Account Management Policies can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/managementPolicy:ManagementPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Storage/storageAccounts/myaccountname/managementPolicies/default
// ```
type ManagementPolicy struct {
pulumi.CustomResourceState
// A `rule` block as documented below.
Rules ManagementPolicyRuleArrayOutput `pulumi:"rules"`
// Specifies the id of the storage account to apply the management policy to. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
}
// NewManagementPolicy registers a new resource with the given unique name, arguments, and options.
func NewManagementPolicy(ctx *pulumi.Context,
name string, args *ManagementPolicyArgs, opts ...pulumi.ResourceOption) (*ManagementPolicy, 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 ManagementPolicy
err := ctx.RegisterResource("azure:storage/managementPolicy:ManagementPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetManagementPolicy gets an existing ManagementPolicy resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetManagementPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ManagementPolicyState, opts ...pulumi.ResourceOption) (*ManagementPolicy, error) {
var resource ManagementPolicy
err := ctx.ReadResource("azure:storage/managementPolicy:ManagementPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ManagementPolicy resources.
type managementPolicyState struct {
// A `rule` block as documented below.
Rules []ManagementPolicyRule `pulumi:"rules"`
// Specifies the id of the storage account to apply the management policy to. Changing this forces a new resource to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
}
type ManagementPolicyState struct {
// A `rule` block as documented below.
Rules ManagementPolicyRuleArrayInput
// Specifies the id of the storage account to apply the management policy to. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringPtrInput
}
func (ManagementPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*managementPolicyState)(nil)).Elem()
}
type managementPolicyArgs struct {
// A `rule` block as documented below.
Rules []ManagementPolicyRule `pulumi:"rules"`
// Specifies the id of the storage account to apply the management policy to. Changing this forces a new resource to be created.
StorageAccountId string `pulumi:"storageAccountId"`
}
// The set of arguments for constructing a ManagementPolicy resource.
type ManagementPolicyArgs struct {
// A `rule` block as documented below.
Rules ManagementPolicyRuleArrayInput
// Specifies the id of the storage account to apply the management policy to. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringInput
}
func (ManagementPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*managementPolicyArgs)(nil)).Elem()
}
type ManagementPolicyInput interface {
pulumi.Input
ToManagementPolicyOutput() ManagementPolicyOutput
ToManagementPolicyOutputWithContext(ctx context.Context) ManagementPolicyOutput
}
func (*ManagementPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**ManagementPolicy)(nil)).Elem()
}
func (i *ManagementPolicy) ToManagementPolicyOutput() ManagementPolicyOutput {
return i.ToManagementPolicyOutputWithContext(context.Background())
}
func (i *ManagementPolicy) ToManagementPolicyOutputWithContext(ctx context.Context) ManagementPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagementPolicyOutput)
}
// ManagementPolicyArrayInput is an input type that accepts ManagementPolicyArray and ManagementPolicyArrayOutput values.
// You can construct a concrete instance of `ManagementPolicyArrayInput` via:
//
// ManagementPolicyArray{ ManagementPolicyArgs{...} }
type ManagementPolicyArrayInput interface {
pulumi.Input
ToManagementPolicyArrayOutput() ManagementPolicyArrayOutput
ToManagementPolicyArrayOutputWithContext(context.Context) ManagementPolicyArrayOutput
}
type ManagementPolicyArray []ManagementPolicyInput
func (ManagementPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagementPolicy)(nil)).Elem()
}
func (i ManagementPolicyArray) ToManagementPolicyArrayOutput() ManagementPolicyArrayOutput {
return i.ToManagementPolicyArrayOutputWithContext(context.Background())
}
func (i ManagementPolicyArray) ToManagementPolicyArrayOutputWithContext(ctx context.Context) ManagementPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagementPolicyArrayOutput)
}
// ManagementPolicyMapInput is an input type that accepts ManagementPolicyMap and ManagementPolicyMapOutput values.
// You can construct a concrete instance of `ManagementPolicyMapInput` via:
//
// ManagementPolicyMap{ "key": ManagementPolicyArgs{...} }
type ManagementPolicyMapInput interface {
pulumi.Input
ToManagementPolicyMapOutput() ManagementPolicyMapOutput
ToManagementPolicyMapOutputWithContext(context.Context) ManagementPolicyMapOutput
}
type ManagementPolicyMap map[string]ManagementPolicyInput
func (ManagementPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagementPolicy)(nil)).Elem()
}
func (i ManagementPolicyMap) ToManagementPolicyMapOutput() ManagementPolicyMapOutput {
return i.ToManagementPolicyMapOutputWithContext(context.Background())
}
func (i ManagementPolicyMap) ToManagementPolicyMapOutputWithContext(ctx context.Context) ManagementPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagementPolicyMapOutput)
}
type ManagementPolicyOutput struct{ *pulumi.OutputState }
func (ManagementPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ManagementPolicy)(nil)).Elem()
}
func (o ManagementPolicyOutput) ToManagementPolicyOutput() ManagementPolicyOutput {
return o
}
func (o ManagementPolicyOutput) ToManagementPolicyOutputWithContext(ctx context.Context) ManagementPolicyOutput {
return o
}
// A `rule` block as documented below.
func (o ManagementPolicyOutput) Rules() ManagementPolicyRuleArrayOutput {
return o.ApplyT(func(v *ManagementPolicy) ManagementPolicyRuleArrayOutput { return v.Rules }).(ManagementPolicyRuleArrayOutput)
}
// Specifies the id of the storage account to apply the management policy to. Changing this forces a new resource to be created.
func (o ManagementPolicyOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *ManagementPolicy) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
type ManagementPolicyArrayOutput struct{ *pulumi.OutputState }
func (ManagementPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ManagementPolicy)(nil)).Elem()
}
func (o ManagementPolicyArrayOutput) ToManagementPolicyArrayOutput() ManagementPolicyArrayOutput {
return o
}
func (o ManagementPolicyArrayOutput) ToManagementPolicyArrayOutputWithContext(ctx context.Context) ManagementPolicyArrayOutput {
return o
}
func (o ManagementPolicyArrayOutput) Index(i pulumi.IntInput) ManagementPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ManagementPolicy {
return vs[0].([]*ManagementPolicy)[vs[1].(int)]
}).(ManagementPolicyOutput)
}
type ManagementPolicyMapOutput struct{ *pulumi.OutputState }
func (ManagementPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ManagementPolicy)(nil)).Elem()
}
func (o ManagementPolicyMapOutput) ToManagementPolicyMapOutput() ManagementPolicyMapOutput {
return o
}
func (o ManagementPolicyMapOutput) ToManagementPolicyMapOutputWithContext(ctx context.Context) ManagementPolicyMapOutput {
return o
}
func (o ManagementPolicyMapOutput) MapIndex(k pulumi.StringInput) ManagementPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ManagementPolicy {
return vs[0].(map[string]*ManagementPolicy)[vs[1].(string)]
}).(ManagementPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ManagementPolicyInput)(nil)).Elem(), &ManagementPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagementPolicyArrayInput)(nil)).Elem(), ManagementPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ManagementPolicyMapInput)(nil)).Elem(), ManagementPolicyMap{})
pulumi.RegisterOutputType(ManagementPolicyOutput{})
pulumi.RegisterOutputType(ManagementPolicyArrayOutput{})
pulumi.RegisterOutputType(ManagementPolicyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/moverTargetEndpoint.go | sdk/go/azure/storage/moverTargetEndpoint.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Storage Mover Target Endpoint.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/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("examplestr"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// AllowNestedItemsToBePublic: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("example-sc"),
// StorageAccountName: exampleAccount.Name,
// ContainerAccessType: pulumi.String("blob"),
// })
// if err != nil {
// return err
// }
// exampleMover, err := storage.NewMover(ctx, "example", &storage.MoverArgs{
// Name: pulumi.String("example-ssm"),
// ResourceGroupName: example.Name,
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewMoverTargetEndpoint(ctx, "example", &storage.MoverTargetEndpointArgs{
// Name: pulumi.String("example-se"),
// StorageMoverId: exampleMover.ID(),
// StorageAccountId: exampleAccount.ID(),
// StorageContainerName: exampleContainer.Name,
// Description: pulumi.String("Example Storage Container Endpoint 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.StorageMover` - 2023-03-01
//
// ## Import
//
// Storage Mover Target Endpoint can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/moverTargetEndpoint:MoverTargetEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.StorageMover/storageMovers/storageMover1/endpoints/endpoint1
// ```
type MoverTargetEndpoint struct {
pulumi.CustomResourceState
// Specifies a description for the Storage Mover Target Endpoint.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the name which should be used for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the ID of the storage account for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
// Specifies the name of the storage blob container for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
StorageContainerName pulumi.StringOutput `pulumi:"storageContainerName"`
// Specifies the ID of the storage mover for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
StorageMoverId pulumi.StringOutput `pulumi:"storageMoverId"`
}
// NewMoverTargetEndpoint registers a new resource with the given unique name, arguments, and options.
func NewMoverTargetEndpoint(ctx *pulumi.Context,
name string, args *MoverTargetEndpointArgs, opts ...pulumi.ResourceOption) (*MoverTargetEndpoint, 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'")
}
if args.StorageContainerName == nil {
return nil, errors.New("invalid value for required argument 'StorageContainerName'")
}
if args.StorageMoverId == nil {
return nil, errors.New("invalid value for required argument 'StorageMoverId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource MoverTargetEndpoint
err := ctx.RegisterResource("azure:storage/moverTargetEndpoint:MoverTargetEndpoint", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMoverTargetEndpoint gets an existing MoverTargetEndpoint resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetMoverTargetEndpoint(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MoverTargetEndpointState, opts ...pulumi.ResourceOption) (*MoverTargetEndpoint, error) {
var resource MoverTargetEndpoint
err := ctx.ReadResource("azure:storage/moverTargetEndpoint:MoverTargetEndpoint", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MoverTargetEndpoint resources.
type moverTargetEndpointState struct {
// Specifies a description for the Storage Mover Target Endpoint.
Description *string `pulumi:"description"`
// Specifies the name which should be used for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the storage account for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
// Specifies the name of the storage blob container for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
StorageContainerName *string `pulumi:"storageContainerName"`
// Specifies the ID of the storage mover for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
StorageMoverId *string `pulumi:"storageMoverId"`
}
type MoverTargetEndpointState struct {
// Specifies a description for the Storage Mover Target Endpoint.
Description pulumi.StringPtrInput
// Specifies the name which should be used for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the storage account for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringPtrInput
// Specifies the name of the storage blob container for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
StorageContainerName pulumi.StringPtrInput
// Specifies the ID of the storage mover for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
StorageMoverId pulumi.StringPtrInput
}
func (MoverTargetEndpointState) ElementType() reflect.Type {
return reflect.TypeOf((*moverTargetEndpointState)(nil)).Elem()
}
type moverTargetEndpointArgs struct {
// Specifies a description for the Storage Mover Target Endpoint.
Description *string `pulumi:"description"`
// Specifies the name which should be used for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the storage account for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
StorageAccountId string `pulumi:"storageAccountId"`
// Specifies the name of the storage blob container for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
StorageContainerName string `pulumi:"storageContainerName"`
// Specifies the ID of the storage mover for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
StorageMoverId string `pulumi:"storageMoverId"`
}
// The set of arguments for constructing a MoverTargetEndpoint resource.
type MoverTargetEndpointArgs struct {
// Specifies a description for the Storage Mover Target Endpoint.
Description pulumi.StringPtrInput
// Specifies the name which should be used for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the storage account for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringInput
// Specifies the name of the storage blob container for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
StorageContainerName pulumi.StringInput
// Specifies the ID of the storage mover for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
StorageMoverId pulumi.StringInput
}
func (MoverTargetEndpointArgs) ElementType() reflect.Type {
return reflect.TypeOf((*moverTargetEndpointArgs)(nil)).Elem()
}
type MoverTargetEndpointInput interface {
pulumi.Input
ToMoverTargetEndpointOutput() MoverTargetEndpointOutput
ToMoverTargetEndpointOutputWithContext(ctx context.Context) MoverTargetEndpointOutput
}
func (*MoverTargetEndpoint) ElementType() reflect.Type {
return reflect.TypeOf((**MoverTargetEndpoint)(nil)).Elem()
}
func (i *MoverTargetEndpoint) ToMoverTargetEndpointOutput() MoverTargetEndpointOutput {
return i.ToMoverTargetEndpointOutputWithContext(context.Background())
}
func (i *MoverTargetEndpoint) ToMoverTargetEndpointOutputWithContext(ctx context.Context) MoverTargetEndpointOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverTargetEndpointOutput)
}
// MoverTargetEndpointArrayInput is an input type that accepts MoverTargetEndpointArray and MoverTargetEndpointArrayOutput values.
// You can construct a concrete instance of `MoverTargetEndpointArrayInput` via:
//
// MoverTargetEndpointArray{ MoverTargetEndpointArgs{...} }
type MoverTargetEndpointArrayInput interface {
pulumi.Input
ToMoverTargetEndpointArrayOutput() MoverTargetEndpointArrayOutput
ToMoverTargetEndpointArrayOutputWithContext(context.Context) MoverTargetEndpointArrayOutput
}
type MoverTargetEndpointArray []MoverTargetEndpointInput
func (MoverTargetEndpointArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MoverTargetEndpoint)(nil)).Elem()
}
func (i MoverTargetEndpointArray) ToMoverTargetEndpointArrayOutput() MoverTargetEndpointArrayOutput {
return i.ToMoverTargetEndpointArrayOutputWithContext(context.Background())
}
func (i MoverTargetEndpointArray) ToMoverTargetEndpointArrayOutputWithContext(ctx context.Context) MoverTargetEndpointArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverTargetEndpointArrayOutput)
}
// MoverTargetEndpointMapInput is an input type that accepts MoverTargetEndpointMap and MoverTargetEndpointMapOutput values.
// You can construct a concrete instance of `MoverTargetEndpointMapInput` via:
//
// MoverTargetEndpointMap{ "key": MoverTargetEndpointArgs{...} }
type MoverTargetEndpointMapInput interface {
pulumi.Input
ToMoverTargetEndpointMapOutput() MoverTargetEndpointMapOutput
ToMoverTargetEndpointMapOutputWithContext(context.Context) MoverTargetEndpointMapOutput
}
type MoverTargetEndpointMap map[string]MoverTargetEndpointInput
func (MoverTargetEndpointMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MoverTargetEndpoint)(nil)).Elem()
}
func (i MoverTargetEndpointMap) ToMoverTargetEndpointMapOutput() MoverTargetEndpointMapOutput {
return i.ToMoverTargetEndpointMapOutputWithContext(context.Background())
}
func (i MoverTargetEndpointMap) ToMoverTargetEndpointMapOutputWithContext(ctx context.Context) MoverTargetEndpointMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverTargetEndpointMapOutput)
}
type MoverTargetEndpointOutput struct{ *pulumi.OutputState }
func (MoverTargetEndpointOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MoverTargetEndpoint)(nil)).Elem()
}
func (o MoverTargetEndpointOutput) ToMoverTargetEndpointOutput() MoverTargetEndpointOutput {
return o
}
func (o MoverTargetEndpointOutput) ToMoverTargetEndpointOutputWithContext(ctx context.Context) MoverTargetEndpointOutput {
return o
}
// Specifies a description for the Storage Mover Target Endpoint.
func (o MoverTargetEndpointOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MoverTargetEndpoint) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the name which should be used for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
func (o MoverTargetEndpointOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *MoverTargetEndpoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the ID of the storage account for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
func (o MoverTargetEndpointOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *MoverTargetEndpoint) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
// Specifies the name of the storage blob container for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
func (o MoverTargetEndpointOutput) StorageContainerName() pulumi.StringOutput {
return o.ApplyT(func(v *MoverTargetEndpoint) pulumi.StringOutput { return v.StorageContainerName }).(pulumi.StringOutput)
}
// Specifies the ID of the storage mover for this Storage Mover Target Endpoint. Changing this forces a new resource to be created.
func (o MoverTargetEndpointOutput) StorageMoverId() pulumi.StringOutput {
return o.ApplyT(func(v *MoverTargetEndpoint) pulumi.StringOutput { return v.StorageMoverId }).(pulumi.StringOutput)
}
type MoverTargetEndpointArrayOutput struct{ *pulumi.OutputState }
func (MoverTargetEndpointArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MoverTargetEndpoint)(nil)).Elem()
}
func (o MoverTargetEndpointArrayOutput) ToMoverTargetEndpointArrayOutput() MoverTargetEndpointArrayOutput {
return o
}
func (o MoverTargetEndpointArrayOutput) ToMoverTargetEndpointArrayOutputWithContext(ctx context.Context) MoverTargetEndpointArrayOutput {
return o
}
func (o MoverTargetEndpointArrayOutput) Index(i pulumi.IntInput) MoverTargetEndpointOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MoverTargetEndpoint {
return vs[0].([]*MoverTargetEndpoint)[vs[1].(int)]
}).(MoverTargetEndpointOutput)
}
type MoverTargetEndpointMapOutput struct{ *pulumi.OutputState }
func (MoverTargetEndpointMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MoverTargetEndpoint)(nil)).Elem()
}
func (o MoverTargetEndpointMapOutput) ToMoverTargetEndpointMapOutput() MoverTargetEndpointMapOutput {
return o
}
func (o MoverTargetEndpointMapOutput) ToMoverTargetEndpointMapOutputWithContext(ctx context.Context) MoverTargetEndpointMapOutput {
return o
}
func (o MoverTargetEndpointMapOutput) MapIndex(k pulumi.StringInput) MoverTargetEndpointOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MoverTargetEndpoint {
return vs[0].(map[string]*MoverTargetEndpoint)[vs[1].(string)]
}).(MoverTargetEndpointOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MoverTargetEndpointInput)(nil)).Elem(), &MoverTargetEndpoint{})
pulumi.RegisterInputType(reflect.TypeOf((*MoverTargetEndpointArrayInput)(nil)).Elem(), MoverTargetEndpointArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MoverTargetEndpointMapInput)(nil)).Elem(), MoverTargetEndpointMap{})
pulumi.RegisterOutputType(MoverTargetEndpointOutput{})
pulumi.RegisterOutputType(MoverTargetEndpointArrayOutput{})
pulumi.RegisterOutputType(MoverTargetEndpointMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/shareFile.go | sdk/go/azure/storage/shareFile.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("azureteststorage"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleShare, err := storage.NewShare(ctx, "example", &storage.ShareArgs{
// Name: pulumi.String("sharename"),
// StorageAccountId: exampleAccount.ID(),
// Quota: pulumi.Int(50),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewShareFile(ctx, "example", &storage.ShareFileArgs{
// Name: pulumi.String("my-awesome-content.zip"),
// StorageShareUrl: exampleShare.Url,
// Source: pulumi.String("some-local-file.zip"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Directories within an Azure Storage File Share can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/shareFile:ShareFile example https://account1.file.core.windows.net/share1/file1
// ```
type ShareFile struct {
pulumi.CustomResourceState
// Sets the file’s Content-Disposition header.
ContentDisposition pulumi.StringPtrOutput `pulumi:"contentDisposition"`
// Specifies which content encodings have been applied to the file.
ContentEncoding pulumi.StringPtrOutput `pulumi:"contentEncoding"`
// The length in bytes of the file content
ContentLength pulumi.IntOutput `pulumi:"contentLength"`
ContentMd5 pulumi.StringPtrOutput `pulumi:"contentMd5"`
// The content type of the share file. Defaults to `application/octet-stream`.
ContentType pulumi.StringPtrOutput `pulumi:"contentType"`
// A mapping of metadata to assign to this file.
Metadata pulumi.StringMapOutput `pulumi:"metadata"`
// The name (or path) of the File that should be created within this File Share. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The storage share directory that you would like the file placed into. Changing this forces a new resource to be created. Defaults to `""`.
Path pulumi.StringPtrOutput `pulumi:"path"`
// An absolute path to a file on the local system. Changing this forces a new resource to be created.
//
// > **Note:** The file specified with `source` can not be empty.
Source pulumi.StringPtrOutput `pulumi:"source"`
// Deprecated: This property has been deprecated in favour of `storageShareUrl` and will be removed in version 5.0 of the Provider.
StorageShareId pulumi.StringOutput `pulumi:"storageShareId"`
// The Storage Share URL in which this file will be placed into. Changing this forces a new resource to be created.
StorageShareUrl pulumi.StringOutput `pulumi:"storageShareUrl"`
}
// NewShareFile registers a new resource with the given unique name, arguments, and options.
func NewShareFile(ctx *pulumi.Context,
name string, args *ShareFileArgs, opts ...pulumi.ResourceOption) (*ShareFile, error) {
if args == nil {
args = &ShareFileArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ShareFile
err := ctx.RegisterResource("azure:storage/shareFile:ShareFile", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetShareFile gets an existing ShareFile resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetShareFile(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ShareFileState, opts ...pulumi.ResourceOption) (*ShareFile, error) {
var resource ShareFile
err := ctx.ReadResource("azure:storage/shareFile:ShareFile", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ShareFile resources.
type shareFileState struct {
// Sets the file’s Content-Disposition header.
ContentDisposition *string `pulumi:"contentDisposition"`
// Specifies which content encodings have been applied to the file.
ContentEncoding *string `pulumi:"contentEncoding"`
// The length in bytes of the file content
ContentLength *int `pulumi:"contentLength"`
ContentMd5 *string `pulumi:"contentMd5"`
// The content type of the share file. Defaults to `application/octet-stream`.
ContentType *string `pulumi:"contentType"`
// A mapping of metadata to assign to this file.
Metadata map[string]string `pulumi:"metadata"`
// The name (or path) of the File that should be created within this File Share. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The storage share directory that you would like the file placed into. Changing this forces a new resource to be created. Defaults to `""`.
Path *string `pulumi:"path"`
// An absolute path to a file on the local system. Changing this forces a new resource to be created.
//
// > **Note:** The file specified with `source` can not be empty.
Source *string `pulumi:"source"`
// Deprecated: This property has been deprecated in favour of `storageShareUrl` and will be removed in version 5.0 of the Provider.
StorageShareId *string `pulumi:"storageShareId"`
// The Storage Share URL in which this file will be placed into. Changing this forces a new resource to be created.
StorageShareUrl *string `pulumi:"storageShareUrl"`
}
type ShareFileState struct {
// Sets the file’s Content-Disposition header.
ContentDisposition pulumi.StringPtrInput
// Specifies which content encodings have been applied to the file.
ContentEncoding pulumi.StringPtrInput
// The length in bytes of the file content
ContentLength pulumi.IntPtrInput
ContentMd5 pulumi.StringPtrInput
// The content type of the share file. Defaults to `application/octet-stream`.
ContentType pulumi.StringPtrInput
// A mapping of metadata to assign to this file.
Metadata pulumi.StringMapInput
// The name (or path) of the File that should be created within this File Share. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The storage share directory that you would like the file placed into. Changing this forces a new resource to be created. Defaults to `""`.
Path pulumi.StringPtrInput
// An absolute path to a file on the local system. Changing this forces a new resource to be created.
//
// > **Note:** The file specified with `source` can not be empty.
Source pulumi.StringPtrInput
// Deprecated: This property has been deprecated in favour of `storageShareUrl` and will be removed in version 5.0 of the Provider.
StorageShareId pulumi.StringPtrInput
// The Storage Share URL in which this file will be placed into. Changing this forces a new resource to be created.
StorageShareUrl pulumi.StringPtrInput
}
func (ShareFileState) ElementType() reflect.Type {
return reflect.TypeOf((*shareFileState)(nil)).Elem()
}
type shareFileArgs struct {
// Sets the file’s Content-Disposition header.
ContentDisposition *string `pulumi:"contentDisposition"`
// Specifies which content encodings have been applied to the file.
ContentEncoding *string `pulumi:"contentEncoding"`
ContentMd5 *string `pulumi:"contentMd5"`
// The content type of the share file. Defaults to `application/octet-stream`.
ContentType *string `pulumi:"contentType"`
// A mapping of metadata to assign to this file.
Metadata map[string]string `pulumi:"metadata"`
// The name (or path) of the File that should be created within this File Share. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The storage share directory that you would like the file placed into. Changing this forces a new resource to be created. Defaults to `""`.
Path *string `pulumi:"path"`
// An absolute path to a file on the local system. Changing this forces a new resource to be created.
//
// > **Note:** The file specified with `source` can not be empty.
Source *string `pulumi:"source"`
// Deprecated: This property has been deprecated in favour of `storageShareUrl` and will be removed in version 5.0 of the Provider.
StorageShareId *string `pulumi:"storageShareId"`
// The Storage Share URL in which this file will be placed into. Changing this forces a new resource to be created.
StorageShareUrl *string `pulumi:"storageShareUrl"`
}
// The set of arguments for constructing a ShareFile resource.
type ShareFileArgs struct {
// Sets the file’s Content-Disposition header.
ContentDisposition pulumi.StringPtrInput
// Specifies which content encodings have been applied to the file.
ContentEncoding pulumi.StringPtrInput
ContentMd5 pulumi.StringPtrInput
// The content type of the share file. Defaults to `application/octet-stream`.
ContentType pulumi.StringPtrInput
// A mapping of metadata to assign to this file.
Metadata pulumi.StringMapInput
// The name (or path) of the File that should be created within this File Share. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The storage share directory that you would like the file placed into. Changing this forces a new resource to be created. Defaults to `""`.
Path pulumi.StringPtrInput
// An absolute path to a file on the local system. Changing this forces a new resource to be created.
//
// > **Note:** The file specified with `source` can not be empty.
Source pulumi.StringPtrInput
// Deprecated: This property has been deprecated in favour of `storageShareUrl` and will be removed in version 5.0 of the Provider.
StorageShareId pulumi.StringPtrInput
// The Storage Share URL in which this file will be placed into. Changing this forces a new resource to be created.
StorageShareUrl pulumi.StringPtrInput
}
func (ShareFileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*shareFileArgs)(nil)).Elem()
}
type ShareFileInput interface {
pulumi.Input
ToShareFileOutput() ShareFileOutput
ToShareFileOutputWithContext(ctx context.Context) ShareFileOutput
}
func (*ShareFile) ElementType() reflect.Type {
return reflect.TypeOf((**ShareFile)(nil)).Elem()
}
func (i *ShareFile) ToShareFileOutput() ShareFileOutput {
return i.ToShareFileOutputWithContext(context.Background())
}
func (i *ShareFile) ToShareFileOutputWithContext(ctx context.Context) ShareFileOutput {
return pulumi.ToOutputWithContext(ctx, i).(ShareFileOutput)
}
// ShareFileArrayInput is an input type that accepts ShareFileArray and ShareFileArrayOutput values.
// You can construct a concrete instance of `ShareFileArrayInput` via:
//
// ShareFileArray{ ShareFileArgs{...} }
type ShareFileArrayInput interface {
pulumi.Input
ToShareFileArrayOutput() ShareFileArrayOutput
ToShareFileArrayOutputWithContext(context.Context) ShareFileArrayOutput
}
type ShareFileArray []ShareFileInput
func (ShareFileArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ShareFile)(nil)).Elem()
}
func (i ShareFileArray) ToShareFileArrayOutput() ShareFileArrayOutput {
return i.ToShareFileArrayOutputWithContext(context.Background())
}
func (i ShareFileArray) ToShareFileArrayOutputWithContext(ctx context.Context) ShareFileArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ShareFileArrayOutput)
}
// ShareFileMapInput is an input type that accepts ShareFileMap and ShareFileMapOutput values.
// You can construct a concrete instance of `ShareFileMapInput` via:
//
// ShareFileMap{ "key": ShareFileArgs{...} }
type ShareFileMapInput interface {
pulumi.Input
ToShareFileMapOutput() ShareFileMapOutput
ToShareFileMapOutputWithContext(context.Context) ShareFileMapOutput
}
type ShareFileMap map[string]ShareFileInput
func (ShareFileMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ShareFile)(nil)).Elem()
}
func (i ShareFileMap) ToShareFileMapOutput() ShareFileMapOutput {
return i.ToShareFileMapOutputWithContext(context.Background())
}
func (i ShareFileMap) ToShareFileMapOutputWithContext(ctx context.Context) ShareFileMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ShareFileMapOutput)
}
type ShareFileOutput struct{ *pulumi.OutputState }
func (ShareFileOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ShareFile)(nil)).Elem()
}
func (o ShareFileOutput) ToShareFileOutput() ShareFileOutput {
return o
}
func (o ShareFileOutput) ToShareFileOutputWithContext(ctx context.Context) ShareFileOutput {
return o
}
// Sets the file’s Content-Disposition header.
func (o ShareFileOutput) ContentDisposition() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ShareFile) pulumi.StringPtrOutput { return v.ContentDisposition }).(pulumi.StringPtrOutput)
}
// Specifies which content encodings have been applied to the file.
func (o ShareFileOutput) ContentEncoding() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ShareFile) pulumi.StringPtrOutput { return v.ContentEncoding }).(pulumi.StringPtrOutput)
}
// The length in bytes of the file content
func (o ShareFileOutput) ContentLength() pulumi.IntOutput {
return o.ApplyT(func(v *ShareFile) pulumi.IntOutput { return v.ContentLength }).(pulumi.IntOutput)
}
func (o ShareFileOutput) ContentMd5() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ShareFile) pulumi.StringPtrOutput { return v.ContentMd5 }).(pulumi.StringPtrOutput)
}
// The content type of the share file. Defaults to `application/octet-stream`.
func (o ShareFileOutput) ContentType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ShareFile) pulumi.StringPtrOutput { return v.ContentType }).(pulumi.StringPtrOutput)
}
// A mapping of metadata to assign to this file.
func (o ShareFileOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v *ShareFile) pulumi.StringMapOutput { return v.Metadata }).(pulumi.StringMapOutput)
}
// The name (or path) of the File that should be created within this File Share. Changing this forces a new resource to be created.
func (o ShareFileOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ShareFile) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The storage share directory that you would like the file placed into. Changing this forces a new resource to be created. Defaults to `""`.
func (o ShareFileOutput) Path() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ShareFile) pulumi.StringPtrOutput { return v.Path }).(pulumi.StringPtrOutput)
}
// An absolute path to a file on the local system. Changing this forces a new resource to be created.
//
// > **Note:** The file specified with `source` can not be empty.
func (o ShareFileOutput) Source() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ShareFile) pulumi.StringPtrOutput { return v.Source }).(pulumi.StringPtrOutput)
}
// Deprecated: This property has been deprecated in favour of `storageShareUrl` and will be removed in version 5.0 of the Provider.
func (o ShareFileOutput) StorageShareId() pulumi.StringOutput {
return o.ApplyT(func(v *ShareFile) pulumi.StringOutput { return v.StorageShareId }).(pulumi.StringOutput)
}
// The Storage Share URL in which this file will be placed into. Changing this forces a new resource to be created.
func (o ShareFileOutput) StorageShareUrl() pulumi.StringOutput {
return o.ApplyT(func(v *ShareFile) pulumi.StringOutput { return v.StorageShareUrl }).(pulumi.StringOutput)
}
type ShareFileArrayOutput struct{ *pulumi.OutputState }
func (ShareFileArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ShareFile)(nil)).Elem()
}
func (o ShareFileArrayOutput) ToShareFileArrayOutput() ShareFileArrayOutput {
return o
}
func (o ShareFileArrayOutput) ToShareFileArrayOutputWithContext(ctx context.Context) ShareFileArrayOutput {
return o
}
func (o ShareFileArrayOutput) Index(i pulumi.IntInput) ShareFileOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ShareFile {
return vs[0].([]*ShareFile)[vs[1].(int)]
}).(ShareFileOutput)
}
type ShareFileMapOutput struct{ *pulumi.OutputState }
func (ShareFileMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ShareFile)(nil)).Elem()
}
func (o ShareFileMapOutput) ToShareFileMapOutput() ShareFileMapOutput {
return o
}
func (o ShareFileMapOutput) ToShareFileMapOutputWithContext(ctx context.Context) ShareFileMapOutput {
return o
}
func (o ShareFileMapOutput) MapIndex(k pulumi.StringInput) ShareFileOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ShareFile {
return vs[0].(map[string]*ShareFile)[vs[1].(string)]
}).(ShareFileOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ShareFileInput)(nil)).Elem(), &ShareFile{})
pulumi.RegisterInputType(reflect.TypeOf((*ShareFileArrayInput)(nil)).Elem(), ShareFileArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ShareFileMapInput)(nil)).Elem(), ShareFileMap{})
pulumi.RegisterOutputType(ShareFileOutput{})
pulumi.RegisterOutputType(ShareFileArrayOutput{})
pulumi.RegisterOutputType(ShareFileMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/accountQueueProperties.go | sdk/go/azure/storage/accountQueueProperties.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the Queue Properties of an Azure Storage Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("storageaccountname"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("staging"),
// },
// })
// if err != nil {
// return err
// }
// _, err = storage.NewAccountQueueProperties(ctx, "example", &storage.AccountQueuePropertiesArgs{
// StorageAccountId: exampleAccount.ID(),
// CorsRules: storage.AccountQueuePropertiesCorsRuleArray{
// &storage.AccountQueuePropertiesCorsRuleArgs{
// AllowedOrigins: pulumi.StringArray{
// pulumi.String("http://www.example.com"),
// },
// ExposedHeaders: pulumi.StringArray{
// pulumi.String("x-tempo-*"),
// },
// AllowedHeaders: pulumi.StringArray{
// pulumi.String("x-tempo-*"),
// },
// AllowedMethods: pulumi.StringArray{
// pulumi.String("GET"),
// pulumi.String("PUT"),
// },
// MaxAgeInSeconds: pulumi.Int(500),
// },
// },
// Logging: &storage.AccountQueuePropertiesLoggingArgs{
// Version: pulumi.String("1.0"),
// Delete: pulumi.Bool(true),
// Read: pulumi.Bool(true),
// Write: pulumi.Bool(true),
// RetentionPolicyDays: pulumi.Int(7),
// },
// HourMetrics: &storage.AccountQueuePropertiesHourMetricsArgs{
// Version: pulumi.String("1.0"),
// RetentionPolicyDays: pulumi.Int(7),
// },
// MinuteMetrics: &storage.AccountQueuePropertiesMinuteMetricsArgs{
// Version: pulumi.String("1.0"),
// RetentionPolicyDays: pulumi.Int(7),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Storage Account Queue Properties can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/accountQueueProperties:AccountQueueProperties queueprops /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount
// ```
type AccountQueueProperties struct {
pulumi.CustomResourceState
// A `corsRule` block as defined above.
CorsRules AccountQueuePropertiesCorsRuleArrayOutput `pulumi:"corsRules"`
// A `hourMetrics` block as defined below.
//
// > **Note:** At least one of `corsRule`, `logging`, `minuteMetrics`, or `hourMetrics` must be specified.
HourMetrics AccountQueuePropertiesHourMetricsOutput `pulumi:"hourMetrics"`
// A `logging` block as defined below.
Logging AccountQueuePropertiesLoggingOutput `pulumi:"logging"`
// A `minuteMetrics` block as defined below.
MinuteMetrics AccountQueuePropertiesMinuteMetricsOutput `pulumi:"minuteMetrics"`
// The ID of the Storage Account to set Queue Properties on. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
}
// NewAccountQueueProperties registers a new resource with the given unique name, arguments, and options.
func NewAccountQueueProperties(ctx *pulumi.Context,
name string, args *AccountQueuePropertiesArgs, opts ...pulumi.ResourceOption) (*AccountQueueProperties, 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 AccountQueueProperties
err := ctx.RegisterResource("azure:storage/accountQueueProperties:AccountQueueProperties", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAccountQueueProperties gets an existing AccountQueueProperties resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAccountQueueProperties(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AccountQueuePropertiesState, opts ...pulumi.ResourceOption) (*AccountQueueProperties, error) {
var resource AccountQueueProperties
err := ctx.ReadResource("azure:storage/accountQueueProperties:AccountQueueProperties", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AccountQueueProperties resources.
type accountQueuePropertiesState struct {
// A `corsRule` block as defined above.
CorsRules []AccountQueuePropertiesCorsRule `pulumi:"corsRules"`
// A `hourMetrics` block as defined below.
//
// > **Note:** At least one of `corsRule`, `logging`, `minuteMetrics`, or `hourMetrics` must be specified.
HourMetrics *AccountQueuePropertiesHourMetrics `pulumi:"hourMetrics"`
// A `logging` block as defined below.
Logging *AccountQueuePropertiesLogging `pulumi:"logging"`
// A `minuteMetrics` block as defined below.
MinuteMetrics *AccountQueuePropertiesMinuteMetrics `pulumi:"minuteMetrics"`
// The ID of the Storage Account to set Queue Properties on. Changing this forces a new resource to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
}
type AccountQueuePropertiesState struct {
// A `corsRule` block as defined above.
CorsRules AccountQueuePropertiesCorsRuleArrayInput
// A `hourMetrics` block as defined below.
//
// > **Note:** At least one of `corsRule`, `logging`, `minuteMetrics`, or `hourMetrics` must be specified.
HourMetrics AccountQueuePropertiesHourMetricsPtrInput
// A `logging` block as defined below.
Logging AccountQueuePropertiesLoggingPtrInput
// A `minuteMetrics` block as defined below.
MinuteMetrics AccountQueuePropertiesMinuteMetricsPtrInput
// The ID of the Storage Account to set Queue Properties on. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringPtrInput
}
func (AccountQueuePropertiesState) ElementType() reflect.Type {
return reflect.TypeOf((*accountQueuePropertiesState)(nil)).Elem()
}
type accountQueuePropertiesArgs struct {
// A `corsRule` block as defined above.
CorsRules []AccountQueuePropertiesCorsRule `pulumi:"corsRules"`
// A `hourMetrics` block as defined below.
//
// > **Note:** At least one of `corsRule`, `logging`, `minuteMetrics`, or `hourMetrics` must be specified.
HourMetrics *AccountQueuePropertiesHourMetrics `pulumi:"hourMetrics"`
// A `logging` block as defined below.
Logging *AccountQueuePropertiesLogging `pulumi:"logging"`
// A `minuteMetrics` block as defined below.
MinuteMetrics *AccountQueuePropertiesMinuteMetrics `pulumi:"minuteMetrics"`
// The ID of the Storage Account to set Queue Properties on. Changing this forces a new resource to be created.
StorageAccountId string `pulumi:"storageAccountId"`
}
// The set of arguments for constructing a AccountQueueProperties resource.
type AccountQueuePropertiesArgs struct {
// A `corsRule` block as defined above.
CorsRules AccountQueuePropertiesCorsRuleArrayInput
// A `hourMetrics` block as defined below.
//
// > **Note:** At least one of `corsRule`, `logging`, `minuteMetrics`, or `hourMetrics` must be specified.
HourMetrics AccountQueuePropertiesHourMetricsPtrInput
// A `logging` block as defined below.
Logging AccountQueuePropertiesLoggingPtrInput
// A `minuteMetrics` block as defined below.
MinuteMetrics AccountQueuePropertiesMinuteMetricsPtrInput
// The ID of the Storage Account to set Queue Properties on. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringInput
}
func (AccountQueuePropertiesArgs) ElementType() reflect.Type {
return reflect.TypeOf((*accountQueuePropertiesArgs)(nil)).Elem()
}
type AccountQueuePropertiesInput interface {
pulumi.Input
ToAccountQueuePropertiesOutput() AccountQueuePropertiesOutput
ToAccountQueuePropertiesOutputWithContext(ctx context.Context) AccountQueuePropertiesOutput
}
func (*AccountQueueProperties) ElementType() reflect.Type {
return reflect.TypeOf((**AccountQueueProperties)(nil)).Elem()
}
func (i *AccountQueueProperties) ToAccountQueuePropertiesOutput() AccountQueuePropertiesOutput {
return i.ToAccountQueuePropertiesOutputWithContext(context.Background())
}
func (i *AccountQueueProperties) ToAccountQueuePropertiesOutputWithContext(ctx context.Context) AccountQueuePropertiesOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountQueuePropertiesOutput)
}
// AccountQueuePropertiesArrayInput is an input type that accepts AccountQueuePropertiesArray and AccountQueuePropertiesArrayOutput values.
// You can construct a concrete instance of `AccountQueuePropertiesArrayInput` via:
//
// AccountQueuePropertiesArray{ AccountQueuePropertiesArgs{...} }
type AccountQueuePropertiesArrayInput interface {
pulumi.Input
ToAccountQueuePropertiesArrayOutput() AccountQueuePropertiesArrayOutput
ToAccountQueuePropertiesArrayOutputWithContext(context.Context) AccountQueuePropertiesArrayOutput
}
type AccountQueuePropertiesArray []AccountQueuePropertiesInput
func (AccountQueuePropertiesArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountQueueProperties)(nil)).Elem()
}
func (i AccountQueuePropertiesArray) ToAccountQueuePropertiesArrayOutput() AccountQueuePropertiesArrayOutput {
return i.ToAccountQueuePropertiesArrayOutputWithContext(context.Background())
}
func (i AccountQueuePropertiesArray) ToAccountQueuePropertiesArrayOutputWithContext(ctx context.Context) AccountQueuePropertiesArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountQueuePropertiesArrayOutput)
}
// AccountQueuePropertiesMapInput is an input type that accepts AccountQueuePropertiesMap and AccountQueuePropertiesMapOutput values.
// You can construct a concrete instance of `AccountQueuePropertiesMapInput` via:
//
// AccountQueuePropertiesMap{ "key": AccountQueuePropertiesArgs{...} }
type AccountQueuePropertiesMapInput interface {
pulumi.Input
ToAccountQueuePropertiesMapOutput() AccountQueuePropertiesMapOutput
ToAccountQueuePropertiesMapOutputWithContext(context.Context) AccountQueuePropertiesMapOutput
}
type AccountQueuePropertiesMap map[string]AccountQueuePropertiesInput
func (AccountQueuePropertiesMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountQueueProperties)(nil)).Elem()
}
func (i AccountQueuePropertiesMap) ToAccountQueuePropertiesMapOutput() AccountQueuePropertiesMapOutput {
return i.ToAccountQueuePropertiesMapOutputWithContext(context.Background())
}
func (i AccountQueuePropertiesMap) ToAccountQueuePropertiesMapOutputWithContext(ctx context.Context) AccountQueuePropertiesMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountQueuePropertiesMapOutput)
}
type AccountQueuePropertiesOutput struct{ *pulumi.OutputState }
func (AccountQueuePropertiesOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountQueueProperties)(nil)).Elem()
}
func (o AccountQueuePropertiesOutput) ToAccountQueuePropertiesOutput() AccountQueuePropertiesOutput {
return o
}
func (o AccountQueuePropertiesOutput) ToAccountQueuePropertiesOutputWithContext(ctx context.Context) AccountQueuePropertiesOutput {
return o
}
// A `corsRule` block as defined above.
func (o AccountQueuePropertiesOutput) CorsRules() AccountQueuePropertiesCorsRuleArrayOutput {
return o.ApplyT(func(v *AccountQueueProperties) AccountQueuePropertiesCorsRuleArrayOutput { return v.CorsRules }).(AccountQueuePropertiesCorsRuleArrayOutput)
}
// A `hourMetrics` block as defined below.
//
// > **Note:** At least one of `corsRule`, `logging`, `minuteMetrics`, or `hourMetrics` must be specified.
func (o AccountQueuePropertiesOutput) HourMetrics() AccountQueuePropertiesHourMetricsOutput {
return o.ApplyT(func(v *AccountQueueProperties) AccountQueuePropertiesHourMetricsOutput { return v.HourMetrics }).(AccountQueuePropertiesHourMetricsOutput)
}
// A `logging` block as defined below.
func (o AccountQueuePropertiesOutput) Logging() AccountQueuePropertiesLoggingOutput {
return o.ApplyT(func(v *AccountQueueProperties) AccountQueuePropertiesLoggingOutput { return v.Logging }).(AccountQueuePropertiesLoggingOutput)
}
// A `minuteMetrics` block as defined below.
func (o AccountQueuePropertiesOutput) MinuteMetrics() AccountQueuePropertiesMinuteMetricsOutput {
return o.ApplyT(func(v *AccountQueueProperties) AccountQueuePropertiesMinuteMetricsOutput { return v.MinuteMetrics }).(AccountQueuePropertiesMinuteMetricsOutput)
}
// The ID of the Storage Account to set Queue Properties on. Changing this forces a new resource to be created.
func (o AccountQueuePropertiesOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *AccountQueueProperties) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
type AccountQueuePropertiesArrayOutput struct{ *pulumi.OutputState }
func (AccountQueuePropertiesArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountQueueProperties)(nil)).Elem()
}
func (o AccountQueuePropertiesArrayOutput) ToAccountQueuePropertiesArrayOutput() AccountQueuePropertiesArrayOutput {
return o
}
func (o AccountQueuePropertiesArrayOutput) ToAccountQueuePropertiesArrayOutputWithContext(ctx context.Context) AccountQueuePropertiesArrayOutput {
return o
}
func (o AccountQueuePropertiesArrayOutput) Index(i pulumi.IntInput) AccountQueuePropertiesOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AccountQueueProperties {
return vs[0].([]*AccountQueueProperties)[vs[1].(int)]
}).(AccountQueuePropertiesOutput)
}
type AccountQueuePropertiesMapOutput struct{ *pulumi.OutputState }
func (AccountQueuePropertiesMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountQueueProperties)(nil)).Elem()
}
func (o AccountQueuePropertiesMapOutput) ToAccountQueuePropertiesMapOutput() AccountQueuePropertiesMapOutput {
return o
}
func (o AccountQueuePropertiesMapOutput) ToAccountQueuePropertiesMapOutputWithContext(ctx context.Context) AccountQueuePropertiesMapOutput {
return o
}
func (o AccountQueuePropertiesMapOutput) MapIndex(k pulumi.StringInput) AccountQueuePropertiesOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AccountQueueProperties {
return vs[0].(map[string]*AccountQueueProperties)[vs[1].(string)]
}).(AccountQueuePropertiesOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccountQueuePropertiesInput)(nil)).Elem(), &AccountQueueProperties{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountQueuePropertiesArrayInput)(nil)).Elem(), AccountQueuePropertiesArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountQueuePropertiesMapInput)(nil)).Elem(), AccountQueuePropertiesMap{})
pulumi.RegisterOutputType(AccountQueuePropertiesOutput{})
pulumi.RegisterOutputType(AccountQueuePropertiesArrayOutput{})
pulumi.RegisterOutputType(AccountQueuePropertiesMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/syncGroup.go | sdk/go/azure/storage/syncGroup.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Storage Sync Group.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/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
// }
// exampleSync, err := storage.NewSync(ctx, "example", &storage.SyncArgs{
// Name: pulumi.String("example-ss"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// _, err = storage.NewSyncGroup(ctx, "example", &storage.SyncGroupArgs{
// Name: pulumi.String("example-ss-group"),
// StorageSyncId: exampleSync.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.StorageSync` - 2020-03-01
//
// ## Import
//
// Storage Sync Groups can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/syncGroup:SyncGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.StorageSync/storageSyncServices/sync1/syncGroups/group1
// ```
type SyncGroup struct {
pulumi.CustomResourceState
// The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
StorageSyncId pulumi.StringOutput `pulumi:"storageSyncId"`
}
// NewSyncGroup registers a new resource with the given unique name, arguments, and options.
func NewSyncGroup(ctx *pulumi.Context,
name string, args *SyncGroupArgs, opts ...pulumi.ResourceOption) (*SyncGroup, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.StorageSyncId == nil {
return nil, errors.New("invalid value for required argument 'StorageSyncId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource SyncGroup
err := ctx.RegisterResource("azure:storage/syncGroup:SyncGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetSyncGroup gets an existing SyncGroup resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetSyncGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *SyncGroupState, opts ...pulumi.ResourceOption) (*SyncGroup, error) {
var resource SyncGroup
err := ctx.ReadResource("azure:storage/syncGroup:SyncGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering SyncGroup resources.
type syncGroupState struct {
// The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
Name *string `pulumi:"name"`
// The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
StorageSyncId *string `pulumi:"storageSyncId"`
}
type SyncGroupState struct {
// The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
Name pulumi.StringPtrInput
// The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
StorageSyncId pulumi.StringPtrInput
}
func (SyncGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*syncGroupState)(nil)).Elem()
}
type syncGroupArgs struct {
// The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
Name *string `pulumi:"name"`
// The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
StorageSyncId string `pulumi:"storageSyncId"`
}
// The set of arguments for constructing a SyncGroup resource.
type SyncGroupArgs struct {
// The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
Name pulumi.StringPtrInput
// The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
StorageSyncId pulumi.StringInput
}
func (SyncGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*syncGroupArgs)(nil)).Elem()
}
type SyncGroupInput interface {
pulumi.Input
ToSyncGroupOutput() SyncGroupOutput
ToSyncGroupOutputWithContext(ctx context.Context) SyncGroupOutput
}
func (*SyncGroup) ElementType() reflect.Type {
return reflect.TypeOf((**SyncGroup)(nil)).Elem()
}
func (i *SyncGroup) ToSyncGroupOutput() SyncGroupOutput {
return i.ToSyncGroupOutputWithContext(context.Background())
}
func (i *SyncGroup) ToSyncGroupOutputWithContext(ctx context.Context) SyncGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(SyncGroupOutput)
}
// SyncGroupArrayInput is an input type that accepts SyncGroupArray and SyncGroupArrayOutput values.
// You can construct a concrete instance of `SyncGroupArrayInput` via:
//
// SyncGroupArray{ SyncGroupArgs{...} }
type SyncGroupArrayInput interface {
pulumi.Input
ToSyncGroupArrayOutput() SyncGroupArrayOutput
ToSyncGroupArrayOutputWithContext(context.Context) SyncGroupArrayOutput
}
type SyncGroupArray []SyncGroupInput
func (SyncGroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SyncGroup)(nil)).Elem()
}
func (i SyncGroupArray) ToSyncGroupArrayOutput() SyncGroupArrayOutput {
return i.ToSyncGroupArrayOutputWithContext(context.Background())
}
func (i SyncGroupArray) ToSyncGroupArrayOutputWithContext(ctx context.Context) SyncGroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(SyncGroupArrayOutput)
}
// SyncGroupMapInput is an input type that accepts SyncGroupMap and SyncGroupMapOutput values.
// You can construct a concrete instance of `SyncGroupMapInput` via:
//
// SyncGroupMap{ "key": SyncGroupArgs{...} }
type SyncGroupMapInput interface {
pulumi.Input
ToSyncGroupMapOutput() SyncGroupMapOutput
ToSyncGroupMapOutputWithContext(context.Context) SyncGroupMapOutput
}
type SyncGroupMap map[string]SyncGroupInput
func (SyncGroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SyncGroup)(nil)).Elem()
}
func (i SyncGroupMap) ToSyncGroupMapOutput() SyncGroupMapOutput {
return i.ToSyncGroupMapOutputWithContext(context.Background())
}
func (i SyncGroupMap) ToSyncGroupMapOutputWithContext(ctx context.Context) SyncGroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(SyncGroupMapOutput)
}
type SyncGroupOutput struct{ *pulumi.OutputState }
func (SyncGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**SyncGroup)(nil)).Elem()
}
func (o SyncGroupOutput) ToSyncGroupOutput() SyncGroupOutput {
return o
}
func (o SyncGroupOutput) ToSyncGroupOutputWithContext(ctx context.Context) SyncGroupOutput {
return o
}
// The name which should be used for this Storage Sync Group. Changing this forces a new Storage Sync Group to be created.
func (o SyncGroupOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *SyncGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The resource ID of the Storage Sync where this Storage Sync Group is. Changing this forces a new Storage Sync Group to be created.
func (o SyncGroupOutput) StorageSyncId() pulumi.StringOutput {
return o.ApplyT(func(v *SyncGroup) pulumi.StringOutput { return v.StorageSyncId }).(pulumi.StringOutput)
}
type SyncGroupArrayOutput struct{ *pulumi.OutputState }
func (SyncGroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*SyncGroup)(nil)).Elem()
}
func (o SyncGroupArrayOutput) ToSyncGroupArrayOutput() SyncGroupArrayOutput {
return o
}
func (o SyncGroupArrayOutput) ToSyncGroupArrayOutputWithContext(ctx context.Context) SyncGroupArrayOutput {
return o
}
func (o SyncGroupArrayOutput) Index(i pulumi.IntInput) SyncGroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SyncGroup {
return vs[0].([]*SyncGroup)[vs[1].(int)]
}).(SyncGroupOutput)
}
type SyncGroupMapOutput struct{ *pulumi.OutputState }
func (SyncGroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*SyncGroup)(nil)).Elem()
}
func (o SyncGroupMapOutput) ToSyncGroupMapOutput() SyncGroupMapOutput {
return o
}
func (o SyncGroupMapOutput) ToSyncGroupMapOutputWithContext(ctx context.Context) SyncGroupMapOutput {
return o
}
func (o SyncGroupMapOutput) MapIndex(k pulumi.StringInput) SyncGroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SyncGroup {
return vs[0].(map[string]*SyncGroup)[vs[1].(string)]
}).(SyncGroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*SyncGroupInput)(nil)).Elem(), &SyncGroup{})
pulumi.RegisterInputType(reflect.TypeOf((*SyncGroupArrayInput)(nil)).Elem(), SyncGroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*SyncGroupMapInput)(nil)).Elem(), SyncGroupMap{})
pulumi.RegisterOutputType(SyncGroupOutput{})
pulumi.RegisterOutputType(SyncGroupArrayOutput{})
pulumi.RegisterOutputType(SyncGroupMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/containerImmutabilityPolicy.go | sdk/go/azure/storage/containerImmutabilityPolicy.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an Immutability Policy for a Container within an Azure Storage Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/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("examplestoraccount"),
// 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
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("example"),
// StorageAccountName: exampleAccount.Name,
// ContainerAccessType: pulumi.String("private"),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewContainerImmutabilityPolicy(ctx, "example", &storage.ContainerImmutabilityPolicyArgs{
// StorageContainerResourceManagerId: exampleContainer.ID(),
// ImmutabilityPeriodInDays: pulumi.Int(14),
// ProtectedAppendWritesAllEnabled: pulumi.Bool(false),
// ProtectedAppendWritesEnabled: 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.Storage` - 2023-05-01
//
// ## Import
//
// Storage Container Immutability Policies can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/containerImmutabilityPolicy:ContainerImmutabilityPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/blobServices/default/containers/mycontainer/immutabilityPolicies/default
// ```
type ContainerImmutabilityPolicy struct {
pulumi.CustomResourceState
// The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
ImmutabilityPeriodInDays pulumi.IntOutput `pulumi:"immutabilityPeriodInDays"`
// Whether to lock this immutability policy. Cannot be set to `false` once the policy has been locked.
//
// !> **Note:** Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for `retentionPeriodInDays` up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to [official documentation](https://learn.microsoft.com/en-us/azure/storage/blobs/immutable-policy-configure-container-scope?tabs=azure-portal#lock-a-time-based-retention-policy) for more information.
Locked pulumi.BoolPtrOutput `pulumi:"locked"`
// Whether to allow protected append writes to block and append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesEnabled`.
ProtectedAppendWritesAllEnabled pulumi.BoolPtrOutput `pulumi:"protectedAppendWritesAllEnabled"`
// Whether to allow protected append writes to append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesAllEnabled`.
ProtectedAppendWritesEnabled pulumi.BoolPtrOutput `pulumi:"protectedAppendWritesEnabled"`
// The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
StorageContainerResourceManagerId pulumi.StringOutput `pulumi:"storageContainerResourceManagerId"`
}
// NewContainerImmutabilityPolicy registers a new resource with the given unique name, arguments, and options.
func NewContainerImmutabilityPolicy(ctx *pulumi.Context,
name string, args *ContainerImmutabilityPolicyArgs, opts ...pulumi.ResourceOption) (*ContainerImmutabilityPolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ImmutabilityPeriodInDays == nil {
return nil, errors.New("invalid value for required argument 'ImmutabilityPeriodInDays'")
}
if args.StorageContainerResourceManagerId == nil {
return nil, errors.New("invalid value for required argument 'StorageContainerResourceManagerId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ContainerImmutabilityPolicy
err := ctx.RegisterResource("azure:storage/containerImmutabilityPolicy:ContainerImmutabilityPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetContainerImmutabilityPolicy gets an existing ContainerImmutabilityPolicy resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetContainerImmutabilityPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ContainerImmutabilityPolicyState, opts ...pulumi.ResourceOption) (*ContainerImmutabilityPolicy, error) {
var resource ContainerImmutabilityPolicy
err := ctx.ReadResource("azure:storage/containerImmutabilityPolicy:ContainerImmutabilityPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ContainerImmutabilityPolicy resources.
type containerImmutabilityPolicyState struct {
// The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
ImmutabilityPeriodInDays *int `pulumi:"immutabilityPeriodInDays"`
// Whether to lock this immutability policy. Cannot be set to `false` once the policy has been locked.
//
// !> **Note:** Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for `retentionPeriodInDays` up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to [official documentation](https://learn.microsoft.com/en-us/azure/storage/blobs/immutable-policy-configure-container-scope?tabs=azure-portal#lock-a-time-based-retention-policy) for more information.
Locked *bool `pulumi:"locked"`
// Whether to allow protected append writes to block and append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesEnabled`.
ProtectedAppendWritesAllEnabled *bool `pulumi:"protectedAppendWritesAllEnabled"`
// Whether to allow protected append writes to append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesAllEnabled`.
ProtectedAppendWritesEnabled *bool `pulumi:"protectedAppendWritesEnabled"`
// The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
StorageContainerResourceManagerId *string `pulumi:"storageContainerResourceManagerId"`
}
type ContainerImmutabilityPolicyState struct {
// The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
ImmutabilityPeriodInDays pulumi.IntPtrInput
// Whether to lock this immutability policy. Cannot be set to `false` once the policy has been locked.
//
// !> **Note:** Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for `retentionPeriodInDays` up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to [official documentation](https://learn.microsoft.com/en-us/azure/storage/blobs/immutable-policy-configure-container-scope?tabs=azure-portal#lock-a-time-based-retention-policy) for more information.
Locked pulumi.BoolPtrInput
// Whether to allow protected append writes to block and append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesEnabled`.
ProtectedAppendWritesAllEnabled pulumi.BoolPtrInput
// Whether to allow protected append writes to append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesAllEnabled`.
ProtectedAppendWritesEnabled pulumi.BoolPtrInput
// The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
StorageContainerResourceManagerId pulumi.StringPtrInput
}
func (ContainerImmutabilityPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*containerImmutabilityPolicyState)(nil)).Elem()
}
type containerImmutabilityPolicyArgs struct {
// The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
ImmutabilityPeriodInDays int `pulumi:"immutabilityPeriodInDays"`
// Whether to lock this immutability policy. Cannot be set to `false` once the policy has been locked.
//
// !> **Note:** Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for `retentionPeriodInDays` up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to [official documentation](https://learn.microsoft.com/en-us/azure/storage/blobs/immutable-policy-configure-container-scope?tabs=azure-portal#lock-a-time-based-retention-policy) for more information.
Locked *bool `pulumi:"locked"`
// Whether to allow protected append writes to block and append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesEnabled`.
ProtectedAppendWritesAllEnabled *bool `pulumi:"protectedAppendWritesAllEnabled"`
// Whether to allow protected append writes to append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesAllEnabled`.
ProtectedAppendWritesEnabled *bool `pulumi:"protectedAppendWritesEnabled"`
// The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
StorageContainerResourceManagerId string `pulumi:"storageContainerResourceManagerId"`
}
// The set of arguments for constructing a ContainerImmutabilityPolicy resource.
type ContainerImmutabilityPolicyArgs struct {
// The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
ImmutabilityPeriodInDays pulumi.IntInput
// Whether to lock this immutability policy. Cannot be set to `false` once the policy has been locked.
//
// !> **Note:** Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for `retentionPeriodInDays` up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to [official documentation](https://learn.microsoft.com/en-us/azure/storage/blobs/immutable-policy-configure-container-scope?tabs=azure-portal#lock-a-time-based-retention-policy) for more information.
Locked pulumi.BoolPtrInput
// Whether to allow protected append writes to block and append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesEnabled`.
ProtectedAppendWritesAllEnabled pulumi.BoolPtrInput
// Whether to allow protected append writes to append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesAllEnabled`.
ProtectedAppendWritesEnabled pulumi.BoolPtrInput
// The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
StorageContainerResourceManagerId pulumi.StringInput
}
func (ContainerImmutabilityPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*containerImmutabilityPolicyArgs)(nil)).Elem()
}
type ContainerImmutabilityPolicyInput interface {
pulumi.Input
ToContainerImmutabilityPolicyOutput() ContainerImmutabilityPolicyOutput
ToContainerImmutabilityPolicyOutputWithContext(ctx context.Context) ContainerImmutabilityPolicyOutput
}
func (*ContainerImmutabilityPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**ContainerImmutabilityPolicy)(nil)).Elem()
}
func (i *ContainerImmutabilityPolicy) ToContainerImmutabilityPolicyOutput() ContainerImmutabilityPolicyOutput {
return i.ToContainerImmutabilityPolicyOutputWithContext(context.Background())
}
func (i *ContainerImmutabilityPolicy) ToContainerImmutabilityPolicyOutputWithContext(ctx context.Context) ContainerImmutabilityPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContainerImmutabilityPolicyOutput)
}
// ContainerImmutabilityPolicyArrayInput is an input type that accepts ContainerImmutabilityPolicyArray and ContainerImmutabilityPolicyArrayOutput values.
// You can construct a concrete instance of `ContainerImmutabilityPolicyArrayInput` via:
//
// ContainerImmutabilityPolicyArray{ ContainerImmutabilityPolicyArgs{...} }
type ContainerImmutabilityPolicyArrayInput interface {
pulumi.Input
ToContainerImmutabilityPolicyArrayOutput() ContainerImmutabilityPolicyArrayOutput
ToContainerImmutabilityPolicyArrayOutputWithContext(context.Context) ContainerImmutabilityPolicyArrayOutput
}
type ContainerImmutabilityPolicyArray []ContainerImmutabilityPolicyInput
func (ContainerImmutabilityPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ContainerImmutabilityPolicy)(nil)).Elem()
}
func (i ContainerImmutabilityPolicyArray) ToContainerImmutabilityPolicyArrayOutput() ContainerImmutabilityPolicyArrayOutput {
return i.ToContainerImmutabilityPolicyArrayOutputWithContext(context.Background())
}
func (i ContainerImmutabilityPolicyArray) ToContainerImmutabilityPolicyArrayOutputWithContext(ctx context.Context) ContainerImmutabilityPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContainerImmutabilityPolicyArrayOutput)
}
// ContainerImmutabilityPolicyMapInput is an input type that accepts ContainerImmutabilityPolicyMap and ContainerImmutabilityPolicyMapOutput values.
// You can construct a concrete instance of `ContainerImmutabilityPolicyMapInput` via:
//
// ContainerImmutabilityPolicyMap{ "key": ContainerImmutabilityPolicyArgs{...} }
type ContainerImmutabilityPolicyMapInput interface {
pulumi.Input
ToContainerImmutabilityPolicyMapOutput() ContainerImmutabilityPolicyMapOutput
ToContainerImmutabilityPolicyMapOutputWithContext(context.Context) ContainerImmutabilityPolicyMapOutput
}
type ContainerImmutabilityPolicyMap map[string]ContainerImmutabilityPolicyInput
func (ContainerImmutabilityPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ContainerImmutabilityPolicy)(nil)).Elem()
}
func (i ContainerImmutabilityPolicyMap) ToContainerImmutabilityPolicyMapOutput() ContainerImmutabilityPolicyMapOutput {
return i.ToContainerImmutabilityPolicyMapOutputWithContext(context.Background())
}
func (i ContainerImmutabilityPolicyMap) ToContainerImmutabilityPolicyMapOutputWithContext(ctx context.Context) ContainerImmutabilityPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ContainerImmutabilityPolicyMapOutput)
}
type ContainerImmutabilityPolicyOutput struct{ *pulumi.OutputState }
func (ContainerImmutabilityPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ContainerImmutabilityPolicy)(nil)).Elem()
}
func (o ContainerImmutabilityPolicyOutput) ToContainerImmutabilityPolicyOutput() ContainerImmutabilityPolicyOutput {
return o
}
func (o ContainerImmutabilityPolicyOutput) ToContainerImmutabilityPolicyOutputWithContext(ctx context.Context) ContainerImmutabilityPolicyOutput {
return o
}
// The time interval in days that the data needs to be kept in a non-erasable and non-modifiable state.
func (o ContainerImmutabilityPolicyOutput) ImmutabilityPeriodInDays() pulumi.IntOutput {
return o.ApplyT(func(v *ContainerImmutabilityPolicy) pulumi.IntOutput { return v.ImmutabilityPeriodInDays }).(pulumi.IntOutput)
}
// Whether to lock this immutability policy. Cannot be set to `false` once the policy has been locked.
//
// !> **Note:** Once an Immutability Policy has been locked, it cannot be unlocked. After locking, it will only be possible to increase the value for `retentionPeriodInDays` up to 5 times for the lifetime of the policy. No other properties will be updateable. Furthermore, the Storage Container and the Storage Account in which it resides will become protected by the policy. It will no longer be possible to delete the Storage Container or the Storage Account. Please refer to [official documentation](https://learn.microsoft.com/en-us/azure/storage/blobs/immutable-policy-configure-container-scope?tabs=azure-portal#lock-a-time-based-retention-policy) for more information.
func (o ContainerImmutabilityPolicyOutput) Locked() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ContainerImmutabilityPolicy) pulumi.BoolPtrOutput { return v.Locked }).(pulumi.BoolPtrOutput)
}
// Whether to allow protected append writes to block and append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesEnabled`.
func (o ContainerImmutabilityPolicyOutput) ProtectedAppendWritesAllEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ContainerImmutabilityPolicy) pulumi.BoolPtrOutput { return v.ProtectedAppendWritesAllEnabled }).(pulumi.BoolPtrOutput)
}
// Whether to allow protected append writes to append blobs to the container. Defaults to `false`. Cannot be set with `protectedAppendWritesAllEnabled`.
func (o ContainerImmutabilityPolicyOutput) ProtectedAppendWritesEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ContainerImmutabilityPolicy) pulumi.BoolPtrOutput { return v.ProtectedAppendWritesEnabled }).(pulumi.BoolPtrOutput)
}
// The Resource Manager ID of the Storage Container where this Immutability Policy should be applied. Changing this forces a new resource to be created.
func (o ContainerImmutabilityPolicyOutput) StorageContainerResourceManagerId() pulumi.StringOutput {
return o.ApplyT(func(v *ContainerImmutabilityPolicy) pulumi.StringOutput { return v.StorageContainerResourceManagerId }).(pulumi.StringOutput)
}
type ContainerImmutabilityPolicyArrayOutput struct{ *pulumi.OutputState }
func (ContainerImmutabilityPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ContainerImmutabilityPolicy)(nil)).Elem()
}
func (o ContainerImmutabilityPolicyArrayOutput) ToContainerImmutabilityPolicyArrayOutput() ContainerImmutabilityPolicyArrayOutput {
return o
}
func (o ContainerImmutabilityPolicyArrayOutput) ToContainerImmutabilityPolicyArrayOutputWithContext(ctx context.Context) ContainerImmutabilityPolicyArrayOutput {
return o
}
func (o ContainerImmutabilityPolicyArrayOutput) Index(i pulumi.IntInput) ContainerImmutabilityPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ContainerImmutabilityPolicy {
return vs[0].([]*ContainerImmutabilityPolicy)[vs[1].(int)]
}).(ContainerImmutabilityPolicyOutput)
}
type ContainerImmutabilityPolicyMapOutput struct{ *pulumi.OutputState }
func (ContainerImmutabilityPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ContainerImmutabilityPolicy)(nil)).Elem()
}
func (o ContainerImmutabilityPolicyMapOutput) ToContainerImmutabilityPolicyMapOutput() ContainerImmutabilityPolicyMapOutput {
return o
}
func (o ContainerImmutabilityPolicyMapOutput) ToContainerImmutabilityPolicyMapOutputWithContext(ctx context.Context) ContainerImmutabilityPolicyMapOutput {
return o
}
func (o ContainerImmutabilityPolicyMapOutput) MapIndex(k pulumi.StringInput) ContainerImmutabilityPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ContainerImmutabilityPolicy {
return vs[0].(map[string]*ContainerImmutabilityPolicy)[vs[1].(string)]
}).(ContainerImmutabilityPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ContainerImmutabilityPolicyInput)(nil)).Elem(), &ContainerImmutabilityPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*ContainerImmutabilityPolicyArrayInput)(nil)).Elem(), ContainerImmutabilityPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ContainerImmutabilityPolicyMapInput)(nil)).Elem(), ContainerImmutabilityPolicyMap{})
pulumi.RegisterOutputType(ContainerImmutabilityPolicyOutput{})
pulumi.RegisterOutputType(ContainerImmutabilityPolicyArrayOutput{})
pulumi.RegisterOutputType(ContainerImmutabilityPolicyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/getStorageContainer.go | sdk/go/azure/storage/getStorageContainer.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
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 Storage Container.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := storage.LookupAccount(ctx, &storage.LookupAccountArgs{
// Name: "exampleaccount",
// ResourceGroupName: pulumi.StringRef("examples"),
// }, nil)
// if err != nil {
// return err
// }
// _, err = storage.GetStorageContainer(ctx, &storage.GetStorageContainerArgs{
// Name: "example-container-name",
// StorageAccountId: pulumi.StringRef(example.Id),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Storage` - 2023-05-01
func GetStorageContainer(ctx *pulumi.Context, args *GetStorageContainerArgs, opts ...pulumi.InvokeOption) (*GetStorageContainerResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetStorageContainerResult
err := ctx.Invoke("azure:storage/getStorageContainer:getStorageContainer", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getStorageContainer.
type GetStorageContainerArgs struct {
// A mapping of MetaData for this Container.
Metadata map[string]string `pulumi:"metadata"`
// The name of the Container.
Name string `pulumi:"name"`
// The id of the Storage Account where the Container exists. This property will become Required in version 5.0 of the Provider.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId *string `pulumi:"storageAccountId"`
// The name of the Storage Account where the Container exists. This property is deprecated in favour of `storageAccountId`.
StorageAccountName *string `pulumi:"storageAccountName"`
}
// A collection of values returned by getStorageContainer.
type GetStorageContainerResult struct {
// The Access Level configured for this Container.
ContainerAccessType string `pulumi:"containerAccessType"`
// The default encryption scope in use for blobs uploaded to this container.
DefaultEncryptionScope string `pulumi:"defaultEncryptionScope"`
// Whether blobs are allowed to override the default encryption scope for this container.
EncryptionScopeOverrideEnabled bool `pulumi:"encryptionScopeOverrideEnabled"`
// Is there an Immutability Policy configured on this Storage Container?
HasImmutabilityPolicy bool `pulumi:"hasImmutabilityPolicy"`
// Is there a Legal Hold configured on this Storage Container?
HasLegalHold bool `pulumi:"hasLegalHold"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A mapping of MetaData for this Container.
Metadata map[string]string `pulumi:"metadata"`
Name string `pulumi:"name"`
// Deprecated: this property has been deprecated in favour of `id` and will be removed in version 5.0 of the Provider.
ResourceManagerId string `pulumi:"resourceManagerId"`
StorageAccountId *string `pulumi:"storageAccountId"`
StorageAccountName *string `pulumi:"storageAccountName"`
}
func GetStorageContainerOutput(ctx *pulumi.Context, args GetStorageContainerOutputArgs, opts ...pulumi.InvokeOption) GetStorageContainerResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (GetStorageContainerResultOutput, error) {
args := v.(GetStorageContainerArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:storage/getStorageContainer:getStorageContainer", args, GetStorageContainerResultOutput{}, options).(GetStorageContainerResultOutput), nil
}).(GetStorageContainerResultOutput)
}
// A collection of arguments for invoking getStorageContainer.
type GetStorageContainerOutputArgs struct {
// A mapping of MetaData for this Container.
Metadata pulumi.StringMapInput `pulumi:"metadata"`
// The name of the Container.
Name pulumi.StringInput `pulumi:"name"`
// The id of the Storage Account where the Container exists. This property will become Required in version 5.0 of the Provider.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId pulumi.StringPtrInput `pulumi:"storageAccountId"`
// The name of the Storage Account where the Container exists. This property is deprecated in favour of `storageAccountId`.
StorageAccountName pulumi.StringPtrInput `pulumi:"storageAccountName"`
}
func (GetStorageContainerOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetStorageContainerArgs)(nil)).Elem()
}
// A collection of values returned by getStorageContainer.
type GetStorageContainerResultOutput struct{ *pulumi.OutputState }
func (GetStorageContainerResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetStorageContainerResult)(nil)).Elem()
}
func (o GetStorageContainerResultOutput) ToGetStorageContainerResultOutput() GetStorageContainerResultOutput {
return o
}
func (o GetStorageContainerResultOutput) ToGetStorageContainerResultOutputWithContext(ctx context.Context) GetStorageContainerResultOutput {
return o
}
// The Access Level configured for this Container.
func (o GetStorageContainerResultOutput) ContainerAccessType() pulumi.StringOutput {
return o.ApplyT(func(v GetStorageContainerResult) string { return v.ContainerAccessType }).(pulumi.StringOutput)
}
// The default encryption scope in use for blobs uploaded to this container.
func (o GetStorageContainerResultOutput) DefaultEncryptionScope() pulumi.StringOutput {
return o.ApplyT(func(v GetStorageContainerResult) string { return v.DefaultEncryptionScope }).(pulumi.StringOutput)
}
// Whether blobs are allowed to override the default encryption scope for this container.
func (o GetStorageContainerResultOutput) EncryptionScopeOverrideEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v GetStorageContainerResult) bool { return v.EncryptionScopeOverrideEnabled }).(pulumi.BoolOutput)
}
// Is there an Immutability Policy configured on this Storage Container?
func (o GetStorageContainerResultOutput) HasImmutabilityPolicy() pulumi.BoolOutput {
return o.ApplyT(func(v GetStorageContainerResult) bool { return v.HasImmutabilityPolicy }).(pulumi.BoolOutput)
}
// Is there a Legal Hold configured on this Storage Container?
func (o GetStorageContainerResultOutput) HasLegalHold() pulumi.BoolOutput {
return o.ApplyT(func(v GetStorageContainerResult) bool { return v.HasLegalHold }).(pulumi.BoolOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetStorageContainerResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetStorageContainerResult) string { return v.Id }).(pulumi.StringOutput)
}
// A mapping of MetaData for this Container.
func (o GetStorageContainerResultOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v GetStorageContainerResult) map[string]string { return v.Metadata }).(pulumi.StringMapOutput)
}
func (o GetStorageContainerResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetStorageContainerResult) string { return v.Name }).(pulumi.StringOutput)
}
// Deprecated: this property has been deprecated in favour of `id` and will be removed in version 5.0 of the Provider.
func (o GetStorageContainerResultOutput) ResourceManagerId() pulumi.StringOutput {
return o.ApplyT(func(v GetStorageContainerResult) string { return v.ResourceManagerId }).(pulumi.StringOutput)
}
func (o GetStorageContainerResultOutput) StorageAccountId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStorageContainerResult) *string { return v.StorageAccountId }).(pulumi.StringPtrOutput)
}
func (o GetStorageContainerResultOutput) StorageAccountName() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetStorageContainerResult) *string { return v.StorageAccountName }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetStorageContainerResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/getSyncGroup.go | sdk/go/azure/storage/getSyncGroup.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
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 Storage Sync Group.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := storage.LookupSyncGroup(ctx, &storage.LookupSyncGroupArgs{
// Name: "existing-ss-group",
// StorageSyncId: "existing-ss-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.StorageSync` - 2020-03-01
func LookupSyncGroup(ctx *pulumi.Context, args *LookupSyncGroupArgs, opts ...pulumi.InvokeOption) (*LookupSyncGroupResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupSyncGroupResult
err := ctx.Invoke("azure:storage/getSyncGroup:getSyncGroup", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSyncGroup.
type LookupSyncGroupArgs struct {
// The name of this Storage Sync Group.
Name string `pulumi:"name"`
// The resource ID of the Storage Sync where this Storage Sync Group is.
StorageSyncId string `pulumi:"storageSyncId"`
}
// A collection of values returned by getSyncGroup.
type LookupSyncGroupResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
StorageSyncId string `pulumi:"storageSyncId"`
}
func LookupSyncGroupOutput(ctx *pulumi.Context, args LookupSyncGroupOutputArgs, opts ...pulumi.InvokeOption) LookupSyncGroupResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupSyncGroupResultOutput, error) {
args := v.(LookupSyncGroupArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:storage/getSyncGroup:getSyncGroup", args, LookupSyncGroupResultOutput{}, options).(LookupSyncGroupResultOutput), nil
}).(LookupSyncGroupResultOutput)
}
// A collection of arguments for invoking getSyncGroup.
type LookupSyncGroupOutputArgs struct {
// The name of this Storage Sync Group.
Name pulumi.StringInput `pulumi:"name"`
// The resource ID of the Storage Sync where this Storage Sync Group is.
StorageSyncId pulumi.StringInput `pulumi:"storageSyncId"`
}
func (LookupSyncGroupOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSyncGroupArgs)(nil)).Elem()
}
// A collection of values returned by getSyncGroup.
type LookupSyncGroupResultOutput struct{ *pulumi.OutputState }
func (LookupSyncGroupResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSyncGroupResult)(nil)).Elem()
}
func (o LookupSyncGroupResultOutput) ToLookupSyncGroupResultOutput() LookupSyncGroupResultOutput {
return o
}
func (o LookupSyncGroupResultOutput) ToLookupSyncGroupResultOutputWithContext(ctx context.Context) LookupSyncGroupResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupSyncGroupResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupSyncGroupResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupSyncGroupResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupSyncGroupResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupSyncGroupResultOutput) StorageSyncId() pulumi.StringOutput {
return o.ApplyT(func(v LookupSyncGroupResult) string { return v.StorageSyncId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupSyncGroupResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/getSync.go | sdk/go/azure/storage/getSync.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
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 Storage Sync.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 := storage.LookupSync(ctx, &storage.LookupSyncArgs{
// Name: "existingStorageSyncName",
// ResourceGroupName: "existingResGroup",
// }, 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.StorageSync` - 2020-03-01
func LookupSync(ctx *pulumi.Context, args *LookupSyncArgs, opts ...pulumi.InvokeOption) (*LookupSyncResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupSyncResult
err := ctx.Invoke("azure:storage/getSync:getSync", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSync.
type LookupSyncArgs struct {
// The name of this Storage Sync.
Name string `pulumi:"name"`
// The name of the Resource Group where the Storage Sync exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getSync.
type LookupSyncResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Incoming traffic policy.
IncomingTrafficPolicy string `pulumi:"incomingTrafficPolicy"`
// The Azure Region where the Storage Sync exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the Storage Sync.
Tags map[string]string `pulumi:"tags"`
}
func LookupSyncOutput(ctx *pulumi.Context, args LookupSyncOutputArgs, opts ...pulumi.InvokeOption) LookupSyncResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupSyncResultOutput, error) {
args := v.(LookupSyncArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:storage/getSync:getSync", args, LookupSyncResultOutput{}, options).(LookupSyncResultOutput), nil
}).(LookupSyncResultOutput)
}
// A collection of arguments for invoking getSync.
type LookupSyncOutputArgs struct {
// The name of this Storage Sync.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Storage Sync exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupSyncOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSyncArgs)(nil)).Elem()
}
// A collection of values returned by getSync.
type LookupSyncResultOutput struct{ *pulumi.OutputState }
func (LookupSyncResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSyncResult)(nil)).Elem()
}
func (o LookupSyncResultOutput) ToLookupSyncResultOutput() LookupSyncResultOutput {
return o
}
func (o LookupSyncResultOutput) ToLookupSyncResultOutputWithContext(ctx context.Context) LookupSyncResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupSyncResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupSyncResult) string { return v.Id }).(pulumi.StringOutput)
}
// Incoming traffic policy.
func (o LookupSyncResultOutput) IncomingTrafficPolicy() pulumi.StringOutput {
return o.ApplyT(func(v LookupSyncResult) string { return v.IncomingTrafficPolicy }).(pulumi.StringOutput)
}
// The Azure Region where the Storage Sync exists.
func (o LookupSyncResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupSyncResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupSyncResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupSyncResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupSyncResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupSyncResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the Storage Sync.
func (o LookupSyncResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupSyncResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupSyncResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/blobInventoryPolicy.go | sdk/go/azure/storage/blobInventoryPolicy.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Storage Blob Inventory Policy.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/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("examplestoracc"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// BlobProperties: &storage.AccountBlobPropertiesArgs{
// VersioningEnabled: pulumi.Bool(true),
// },
// })
// if err != nil {
// return err
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("examplecontainer"),
// StorageAccountName: exampleAccount.Name,
// ContainerAccessType: pulumi.String("private"),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewBlobInventoryPolicy(ctx, "example", &storage.BlobInventoryPolicyArgs{
// StorageAccountId: exampleAccount.ID(),
// Rules: storage.BlobInventoryPolicyRuleArray{
// &storage.BlobInventoryPolicyRuleArgs{
// Name: pulumi.String("rule1"),
// StorageContainerName: exampleContainer.Name,
// Format: pulumi.String("Csv"),
// Schedule: pulumi.String("Daily"),
// Scope: pulumi.String("Container"),
// SchemaFields: pulumi.StringArray{
// pulumi.String("Name"),
// pulumi.String("Last-Modified"),
// },
// },
// },
// })
// 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.Storage` - 2023-05-01
//
// ## Import
//
// Storage Blob Inventory Policies can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/blobInventoryPolicy:BlobInventoryPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Storage/storageAccounts/storageAccount1
// ```
type BlobInventoryPolicy struct {
pulumi.CustomResourceState
// One or more `rules` blocks as defined below.
Rules BlobInventoryPolicyRuleArrayOutput `pulumi:"rules"`
// The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
}
// NewBlobInventoryPolicy registers a new resource with the given unique name, arguments, and options.
func NewBlobInventoryPolicy(ctx *pulumi.Context,
name string, args *BlobInventoryPolicyArgs, opts ...pulumi.ResourceOption) (*BlobInventoryPolicy, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Rules == nil {
return nil, errors.New("invalid value for required argument 'Rules'")
}
if args.StorageAccountId == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource BlobInventoryPolicy
err := ctx.RegisterResource("azure:storage/blobInventoryPolicy:BlobInventoryPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBlobInventoryPolicy gets an existing BlobInventoryPolicy resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBlobInventoryPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BlobInventoryPolicyState, opts ...pulumi.ResourceOption) (*BlobInventoryPolicy, error) {
var resource BlobInventoryPolicy
err := ctx.ReadResource("azure:storage/blobInventoryPolicy:BlobInventoryPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering BlobInventoryPolicy resources.
type blobInventoryPolicyState struct {
// One or more `rules` blocks as defined below.
Rules []BlobInventoryPolicyRule `pulumi:"rules"`
// The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
}
type BlobInventoryPolicyState struct {
// One or more `rules` blocks as defined below.
Rules BlobInventoryPolicyRuleArrayInput
// The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
StorageAccountId pulumi.StringPtrInput
}
func (BlobInventoryPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*blobInventoryPolicyState)(nil)).Elem()
}
type blobInventoryPolicyArgs struct {
// One or more `rules` blocks as defined below.
Rules []BlobInventoryPolicyRule `pulumi:"rules"`
// The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
StorageAccountId string `pulumi:"storageAccountId"`
}
// The set of arguments for constructing a BlobInventoryPolicy resource.
type BlobInventoryPolicyArgs struct {
// One or more `rules` blocks as defined below.
Rules BlobInventoryPolicyRuleArrayInput
// The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
StorageAccountId pulumi.StringInput
}
func (BlobInventoryPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*blobInventoryPolicyArgs)(nil)).Elem()
}
type BlobInventoryPolicyInput interface {
pulumi.Input
ToBlobInventoryPolicyOutput() BlobInventoryPolicyOutput
ToBlobInventoryPolicyOutputWithContext(ctx context.Context) BlobInventoryPolicyOutput
}
func (*BlobInventoryPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**BlobInventoryPolicy)(nil)).Elem()
}
func (i *BlobInventoryPolicy) ToBlobInventoryPolicyOutput() BlobInventoryPolicyOutput {
return i.ToBlobInventoryPolicyOutputWithContext(context.Background())
}
func (i *BlobInventoryPolicy) ToBlobInventoryPolicyOutputWithContext(ctx context.Context) BlobInventoryPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(BlobInventoryPolicyOutput)
}
// BlobInventoryPolicyArrayInput is an input type that accepts BlobInventoryPolicyArray and BlobInventoryPolicyArrayOutput values.
// You can construct a concrete instance of `BlobInventoryPolicyArrayInput` via:
//
// BlobInventoryPolicyArray{ BlobInventoryPolicyArgs{...} }
type BlobInventoryPolicyArrayInput interface {
pulumi.Input
ToBlobInventoryPolicyArrayOutput() BlobInventoryPolicyArrayOutput
ToBlobInventoryPolicyArrayOutputWithContext(context.Context) BlobInventoryPolicyArrayOutput
}
type BlobInventoryPolicyArray []BlobInventoryPolicyInput
func (BlobInventoryPolicyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BlobInventoryPolicy)(nil)).Elem()
}
func (i BlobInventoryPolicyArray) ToBlobInventoryPolicyArrayOutput() BlobInventoryPolicyArrayOutput {
return i.ToBlobInventoryPolicyArrayOutputWithContext(context.Background())
}
func (i BlobInventoryPolicyArray) ToBlobInventoryPolicyArrayOutputWithContext(ctx context.Context) BlobInventoryPolicyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BlobInventoryPolicyArrayOutput)
}
// BlobInventoryPolicyMapInput is an input type that accepts BlobInventoryPolicyMap and BlobInventoryPolicyMapOutput values.
// You can construct a concrete instance of `BlobInventoryPolicyMapInput` via:
//
// BlobInventoryPolicyMap{ "key": BlobInventoryPolicyArgs{...} }
type BlobInventoryPolicyMapInput interface {
pulumi.Input
ToBlobInventoryPolicyMapOutput() BlobInventoryPolicyMapOutput
ToBlobInventoryPolicyMapOutputWithContext(context.Context) BlobInventoryPolicyMapOutput
}
type BlobInventoryPolicyMap map[string]BlobInventoryPolicyInput
func (BlobInventoryPolicyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BlobInventoryPolicy)(nil)).Elem()
}
func (i BlobInventoryPolicyMap) ToBlobInventoryPolicyMapOutput() BlobInventoryPolicyMapOutput {
return i.ToBlobInventoryPolicyMapOutputWithContext(context.Background())
}
func (i BlobInventoryPolicyMap) ToBlobInventoryPolicyMapOutputWithContext(ctx context.Context) BlobInventoryPolicyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BlobInventoryPolicyMapOutput)
}
type BlobInventoryPolicyOutput struct{ *pulumi.OutputState }
func (BlobInventoryPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**BlobInventoryPolicy)(nil)).Elem()
}
func (o BlobInventoryPolicyOutput) ToBlobInventoryPolicyOutput() BlobInventoryPolicyOutput {
return o
}
func (o BlobInventoryPolicyOutput) ToBlobInventoryPolicyOutputWithContext(ctx context.Context) BlobInventoryPolicyOutput {
return o
}
// One or more `rules` blocks as defined below.
func (o BlobInventoryPolicyOutput) Rules() BlobInventoryPolicyRuleArrayOutput {
return o.ApplyT(func(v *BlobInventoryPolicy) BlobInventoryPolicyRuleArrayOutput { return v.Rules }).(BlobInventoryPolicyRuleArrayOutput)
}
// The ID of the storage account to apply this Blob Inventory Policy to. Changing this forces a new Storage Blob Inventory Policy to be created.
func (o BlobInventoryPolicyOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *BlobInventoryPolicy) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
type BlobInventoryPolicyArrayOutput struct{ *pulumi.OutputState }
func (BlobInventoryPolicyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*BlobInventoryPolicy)(nil)).Elem()
}
func (o BlobInventoryPolicyArrayOutput) ToBlobInventoryPolicyArrayOutput() BlobInventoryPolicyArrayOutput {
return o
}
func (o BlobInventoryPolicyArrayOutput) ToBlobInventoryPolicyArrayOutputWithContext(ctx context.Context) BlobInventoryPolicyArrayOutput {
return o
}
func (o BlobInventoryPolicyArrayOutput) Index(i pulumi.IntInput) BlobInventoryPolicyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *BlobInventoryPolicy {
return vs[0].([]*BlobInventoryPolicy)[vs[1].(int)]
}).(BlobInventoryPolicyOutput)
}
type BlobInventoryPolicyMapOutput struct{ *pulumi.OutputState }
func (BlobInventoryPolicyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*BlobInventoryPolicy)(nil)).Elem()
}
func (o BlobInventoryPolicyMapOutput) ToBlobInventoryPolicyMapOutput() BlobInventoryPolicyMapOutput {
return o
}
func (o BlobInventoryPolicyMapOutput) ToBlobInventoryPolicyMapOutputWithContext(ctx context.Context) BlobInventoryPolicyMapOutput {
return o
}
func (o BlobInventoryPolicyMapOutput) MapIndex(k pulumi.StringInput) BlobInventoryPolicyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *BlobInventoryPolicy {
return vs[0].(map[string]*BlobInventoryPolicy)[vs[1].(string)]
}).(BlobInventoryPolicyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BlobInventoryPolicyInput)(nil)).Elem(), &BlobInventoryPolicy{})
pulumi.RegisterInputType(reflect.TypeOf((*BlobInventoryPolicyArrayInput)(nil)).Elem(), BlobInventoryPolicyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BlobInventoryPolicyMapInput)(nil)).Elem(), BlobInventoryPolicyMap{})
pulumi.RegisterOutputType(BlobInventoryPolicyOutput{})
pulumi.RegisterOutputType(BlobInventoryPolicyArrayOutput{})
pulumi.RegisterOutputType(BlobInventoryPolicyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/mover.go | sdk/go/azure/storage/mover.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Storage Mover.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/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 = storage.NewMover(ctx, "example", &storage.MoverArgs{
// Name: pulumi.String("example-ssm"),
// ResourceGroupName: example.Name,
// Location: pulumi.String("West Europe"),
// Description: pulumi.String("Example Storage Mover Description"),
// Tags: pulumi.StringMap{
// "key": pulumi.String("value"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.StorageMover` - 2023-03-01
//
// ## Import
//
// Storage Mover can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/mover:Mover example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.StorageMover/storageMovers/storageMover1
// ```
type Mover struct {
pulumi.CustomResourceState
// A description for the Storage Mover.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the Azure Region where the Storage Mover should exist. Changing this forces a new Storage Mover to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name which should be used for this Storage Mover. Changing this forces a new Storage Mover to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the name of the Resource Group where the Storage Mover should exist. Changing this forces a new Storage Mover to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Storage Mover.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewMover registers a new resource with the given unique name, arguments, and options.
func NewMover(ctx *pulumi.Context,
name string, args *MoverArgs, opts ...pulumi.ResourceOption) (*Mover, 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 Mover
err := ctx.RegisterResource("azure:storage/mover:Mover", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMover gets an existing Mover resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetMover(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MoverState, opts ...pulumi.ResourceOption) (*Mover, error) {
var resource Mover
err := ctx.ReadResource("azure:storage/mover:Mover", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Mover resources.
type moverState struct {
// A description for the Storage Mover.
Description *string `pulumi:"description"`
// Specifies the Azure Region where the Storage Mover should exist. Changing this forces a new Storage Mover to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Storage Mover. Changing this forces a new Storage Mover to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Resource Group where the Storage Mover should exist. Changing this forces a new Storage Mover to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Storage Mover.
Tags map[string]string `pulumi:"tags"`
}
type MoverState struct {
// A description for the Storage Mover.
Description pulumi.StringPtrInput
// Specifies the Azure Region where the Storage Mover should exist. Changing this forces a new Storage Mover to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Storage Mover. Changing this forces a new Storage Mover to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Resource Group where the Storage Mover should exist. Changing this forces a new Storage Mover to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Storage Mover.
Tags pulumi.StringMapInput
}
func (MoverState) ElementType() reflect.Type {
return reflect.TypeOf((*moverState)(nil)).Elem()
}
type moverArgs struct {
// A description for the Storage Mover.
Description *string `pulumi:"description"`
// Specifies the Azure Region where the Storage Mover should exist. Changing this forces a new Storage Mover to be created.
Location *string `pulumi:"location"`
// Specifies the name which should be used for this Storage Mover. Changing this forces a new Storage Mover to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Resource Group where the Storage Mover should exist. Changing this forces a new Storage Mover to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags which should be assigned to the Storage Mover.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a Mover resource.
type MoverArgs struct {
// A description for the Storage Mover.
Description pulumi.StringPtrInput
// Specifies the Azure Region where the Storage Mover should exist. Changing this forces a new Storage Mover to be created.
Location pulumi.StringPtrInput
// Specifies the name which should be used for this Storage Mover. Changing this forces a new Storage Mover to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Resource Group where the Storage Mover should exist. Changing this forces a new Storage Mover to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags which should be assigned to the Storage Mover.
Tags pulumi.StringMapInput
}
func (MoverArgs) ElementType() reflect.Type {
return reflect.TypeOf((*moverArgs)(nil)).Elem()
}
type MoverInput interface {
pulumi.Input
ToMoverOutput() MoverOutput
ToMoverOutputWithContext(ctx context.Context) MoverOutput
}
func (*Mover) ElementType() reflect.Type {
return reflect.TypeOf((**Mover)(nil)).Elem()
}
func (i *Mover) ToMoverOutput() MoverOutput {
return i.ToMoverOutputWithContext(context.Background())
}
func (i *Mover) ToMoverOutputWithContext(ctx context.Context) MoverOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverOutput)
}
// MoverArrayInput is an input type that accepts MoverArray and MoverArrayOutput values.
// You can construct a concrete instance of `MoverArrayInput` via:
//
// MoverArray{ MoverArgs{...} }
type MoverArrayInput interface {
pulumi.Input
ToMoverArrayOutput() MoverArrayOutput
ToMoverArrayOutputWithContext(context.Context) MoverArrayOutput
}
type MoverArray []MoverInput
func (MoverArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Mover)(nil)).Elem()
}
func (i MoverArray) ToMoverArrayOutput() MoverArrayOutput {
return i.ToMoverArrayOutputWithContext(context.Background())
}
func (i MoverArray) ToMoverArrayOutputWithContext(ctx context.Context) MoverArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverArrayOutput)
}
// MoverMapInput is an input type that accepts MoverMap and MoverMapOutput values.
// You can construct a concrete instance of `MoverMapInput` via:
//
// MoverMap{ "key": MoverArgs{...} }
type MoverMapInput interface {
pulumi.Input
ToMoverMapOutput() MoverMapOutput
ToMoverMapOutputWithContext(context.Context) MoverMapOutput
}
type MoverMap map[string]MoverInput
func (MoverMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Mover)(nil)).Elem()
}
func (i MoverMap) ToMoverMapOutput() MoverMapOutput {
return i.ToMoverMapOutputWithContext(context.Background())
}
func (i MoverMap) ToMoverMapOutputWithContext(ctx context.Context) MoverMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverMapOutput)
}
type MoverOutput struct{ *pulumi.OutputState }
func (MoverOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Mover)(nil)).Elem()
}
func (o MoverOutput) ToMoverOutput() MoverOutput {
return o
}
func (o MoverOutput) ToMoverOutputWithContext(ctx context.Context) MoverOutput {
return o
}
// A description for the Storage Mover.
func (o MoverOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Mover) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the Azure Region where the Storage Mover should exist. Changing this forces a new Storage Mover to be created.
func (o MoverOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Mover) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name which should be used for this Storage Mover. Changing this forces a new Storage Mover to be created.
func (o MoverOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Mover) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the name of the Resource Group where the Storage Mover should exist. Changing this forces a new Storage Mover to be created.
func (o MoverOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Mover) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Storage Mover.
func (o MoverOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Mover) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type MoverArrayOutput struct{ *pulumi.OutputState }
func (MoverArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Mover)(nil)).Elem()
}
func (o MoverArrayOutput) ToMoverArrayOutput() MoverArrayOutput {
return o
}
func (o MoverArrayOutput) ToMoverArrayOutputWithContext(ctx context.Context) MoverArrayOutput {
return o
}
func (o MoverArrayOutput) Index(i pulumi.IntInput) MoverOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Mover {
return vs[0].([]*Mover)[vs[1].(int)]
}).(MoverOutput)
}
type MoverMapOutput struct{ *pulumi.OutputState }
func (MoverMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Mover)(nil)).Elem()
}
func (o MoverMapOutput) ToMoverMapOutput() MoverMapOutput {
return o
}
func (o MoverMapOutput) ToMoverMapOutputWithContext(ctx context.Context) MoverMapOutput {
return o
}
func (o MoverMapOutput) MapIndex(k pulumi.StringInput) MoverOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Mover {
return vs[0].(map[string]*Mover)[vs[1].(string)]
}).(MoverOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MoverInput)(nil)).Elem(), &Mover{})
pulumi.RegisterInputType(reflect.TypeOf((*MoverArrayInput)(nil)).Elem(), MoverArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MoverMapInput)(nil)).Elem(), MoverMap{})
pulumi.RegisterOutputType(MoverOutput{})
pulumi.RegisterOutputType(MoverArrayOutput{})
pulumi.RegisterOutputType(MoverMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/customerManagedKey.go | sdk/go/azure/storage/customerManagedKey.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
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 Storage Account.
//
// > **Note:** It's possible to define a Customer Managed Key both within the `storage.Account` resource via the `customerManagedKey` block and by using the `storage.CustomerManagedKey` resource. However it's not possible to use both methods to manage a Customer Managed Key for a Storage Account, since there'll be conflicts.
//
// ## 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/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
// Name: pulumi.String("examplekv"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// TenantId: pulumi.String(current.TenantId),
// SkuName: pulumi.String("standard"),
// PurgeProtectionEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("examplestor"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// Identity: &storage.AccountIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// storage, err := keyvault.NewAccessPolicy(ctx, "storage", &keyvault.AccessPolicyArgs{
// KeyVaultId: exampleKeyVault.ID(),
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.String(exampleAccount.Identity.ApplyT(func(identity storage.AccountIdentity) (*string, error) {
// return &identity.PrincipalId, nil
// }).(pulumi.StringPtrOutput)),
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// },
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("UnwrapKey"),
// pulumi.String("WrapKey"),
// },
// })
// if err != nil {
// return err
// }
// client, err := keyvault.NewAccessPolicy(ctx, "client", &keyvault.AccessPolicyArgs{
// KeyVaultId: exampleKeyVault.ID(),
// TenantId: pulumi.String(current.TenantId),
// ObjectId: pulumi.String(current.ObjectId),
// SecretPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// },
// KeyPermissions: pulumi.StringArray{
// pulumi.String("Get"),
// pulumi.String("Create"),
// pulumi.String("Delete"),
// pulumi.String("List"),
// pulumi.String("Restore"),
// pulumi.String("Recover"),
// pulumi.String("UnwrapKey"),
// pulumi.String("WrapKey"),
// pulumi.String("Purge"),
// pulumi.String("Encrypt"),
// pulumi.String("Decrypt"),
// pulumi.String("Sign"),
// pulumi.String("Verify"),
// pulumi.String("GetRotationPolicy"),
// pulumi.String("SetRotationPolicy"),
// },
// })
// if err != nil {
// return err
// }
// exampleKey, err := keyvault.NewKey(ctx, "example", &keyvault.KeyArgs{
// Name: pulumi.String("tfex-key"),
// KeyVaultId: exampleKeyVault.ID(),
// KeyType: pulumi.String("RSA"),
// KeySize: pulumi.Int(2048),
// KeyOpts: pulumi.StringArray{
// pulumi.String("decrypt"),
// pulumi.String("encrypt"),
// pulumi.String("sign"),
// pulumi.String("unwrapKey"),
// pulumi.String("verify"),
// pulumi.String("wrapKey"),
// },
// }, pulumi.DependsOn([]pulumi.Resource{
// client,
// storage,
// }))
// if err != nil {
// return err
// }
// _, err = storage.NewCustomerManagedKey(ctx, "example", &storage.CustomerManagedKeyArgs{
// StorageAccountId: exampleAccount.ID(),
// KeyVaultId: exampleKeyVault.ID(),
// KeyName: exampleKey.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.Storage` - 2023-05-01
//
// ## Import
//
// Customer Managed Keys for a Storage Account can be imported using the `resource id` of the Storage Account, e.g.
//
// ```sh
// $ pulumi import azure:storage/customerManagedKey:CustomerManagedKey example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount
// ```
type CustomerManagedKey struct {
pulumi.CustomResourceState
// The Client ID of the multi-tenant application to be used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys server-side encryption on the storage account.
FederatedIdentityClientId pulumi.StringPtrOutput `pulumi:"federatedIdentityClientId"`
// The name of Key Vault Key.
KeyName pulumi.StringOutput `pulumi:"keyName"`
KeyVaultId pulumi.StringPtrOutput `pulumi:"keyVaultId"`
// URI pointing at the Key Vault. Required when using `federatedIdentityClientId`. Exactly one of `managedHsmKeyId`, `keyVaultId`, or `keyVaultUri` must be specified.
KeyVaultUri pulumi.StringOutput `pulumi:"keyVaultUri"`
// The version of Key Vault Key. Remove or omit this argument to enable Automatic Key Rotation.
KeyVersion pulumi.StringPtrOutput `pulumi:"keyVersion"`
// Key ID of a key in a managed HSM. Exactly one of `managedHsmKeyId`, `keyVaultId`, or `keyVaultUri` must be specified.
ManagedHsmKeyId pulumi.StringPtrOutput `pulumi:"managedHsmKeyId"`
// The ID of the Storage Account. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
// The ID of a user assigned identity.
UserAssignedIdentityId pulumi.StringPtrOutput `pulumi:"userAssignedIdentityId"`
}
// NewCustomerManagedKey registers a new resource with the given unique name, arguments, and options.
func NewCustomerManagedKey(ctx *pulumi.Context,
name string, args *CustomerManagedKeyArgs, opts ...pulumi.ResourceOption) (*CustomerManagedKey, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.KeyName == nil {
return nil, errors.New("invalid value for required argument 'KeyName'")
}
if args.StorageAccountId == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource CustomerManagedKey
err := ctx.RegisterResource("azure:storage/customerManagedKey:CustomerManagedKey", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCustomerManagedKey gets an existing CustomerManagedKey resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetCustomerManagedKey(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *CustomerManagedKeyState, opts ...pulumi.ResourceOption) (*CustomerManagedKey, error) {
var resource CustomerManagedKey
err := ctx.ReadResource("azure:storage/customerManagedKey:CustomerManagedKey", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering CustomerManagedKey resources.
type customerManagedKeyState struct {
// The Client ID of the multi-tenant application to be used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys server-side encryption on the storage account.
FederatedIdentityClientId *string `pulumi:"federatedIdentityClientId"`
// The name of Key Vault Key.
KeyName *string `pulumi:"keyName"`
KeyVaultId *string `pulumi:"keyVaultId"`
// URI pointing at the Key Vault. Required when using `federatedIdentityClientId`. Exactly one of `managedHsmKeyId`, `keyVaultId`, or `keyVaultUri` must be specified.
KeyVaultUri *string `pulumi:"keyVaultUri"`
// The version of Key Vault Key. Remove or omit this argument to enable Automatic Key Rotation.
KeyVersion *string `pulumi:"keyVersion"`
// Key ID of a key in a managed HSM. Exactly one of `managedHsmKeyId`, `keyVaultId`, or `keyVaultUri` must be specified.
ManagedHsmKeyId *string `pulumi:"managedHsmKeyId"`
// The ID of the Storage Account. Changing this forces a new resource to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
// The ID of a user assigned identity.
UserAssignedIdentityId *string `pulumi:"userAssignedIdentityId"`
}
type CustomerManagedKeyState struct {
// The Client ID of the multi-tenant application to be used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys server-side encryption on the storage account.
FederatedIdentityClientId pulumi.StringPtrInput
// The name of Key Vault Key.
KeyName pulumi.StringPtrInput
KeyVaultId pulumi.StringPtrInput
// URI pointing at the Key Vault. Required when using `federatedIdentityClientId`. Exactly one of `managedHsmKeyId`, `keyVaultId`, or `keyVaultUri` must be specified.
KeyVaultUri pulumi.StringPtrInput
// The version of Key Vault Key. Remove or omit this argument to enable Automatic Key Rotation.
KeyVersion pulumi.StringPtrInput
// Key ID of a key in a managed HSM. Exactly one of `managedHsmKeyId`, `keyVaultId`, or `keyVaultUri` must be specified.
ManagedHsmKeyId pulumi.StringPtrInput
// The ID of the Storage Account. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringPtrInput
// The ID of a user assigned identity.
UserAssignedIdentityId pulumi.StringPtrInput
}
func (CustomerManagedKeyState) ElementType() reflect.Type {
return reflect.TypeOf((*customerManagedKeyState)(nil)).Elem()
}
type customerManagedKeyArgs struct {
// The Client ID of the multi-tenant application to be used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys server-side encryption on the storage account.
FederatedIdentityClientId *string `pulumi:"federatedIdentityClientId"`
// The name of Key Vault Key.
KeyName string `pulumi:"keyName"`
KeyVaultId *string `pulumi:"keyVaultId"`
// URI pointing at the Key Vault. Required when using `federatedIdentityClientId`. Exactly one of `managedHsmKeyId`, `keyVaultId`, or `keyVaultUri` must be specified.
KeyVaultUri *string `pulumi:"keyVaultUri"`
// The version of Key Vault Key. Remove or omit this argument to enable Automatic Key Rotation.
KeyVersion *string `pulumi:"keyVersion"`
// Key ID of a key in a managed HSM. Exactly one of `managedHsmKeyId`, `keyVaultId`, or `keyVaultUri` must be specified.
ManagedHsmKeyId *string `pulumi:"managedHsmKeyId"`
// The ID of the Storage Account. Changing this forces a new resource to be created.
StorageAccountId string `pulumi:"storageAccountId"`
// The ID of a user assigned identity.
UserAssignedIdentityId *string `pulumi:"userAssignedIdentityId"`
}
// The set of arguments for constructing a CustomerManagedKey resource.
type CustomerManagedKeyArgs struct {
// The Client ID of the multi-tenant application to be used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys server-side encryption on the storage account.
FederatedIdentityClientId pulumi.StringPtrInput
// The name of Key Vault Key.
KeyName pulumi.StringInput
KeyVaultId pulumi.StringPtrInput
// URI pointing at the Key Vault. Required when using `federatedIdentityClientId`. Exactly one of `managedHsmKeyId`, `keyVaultId`, or `keyVaultUri` must be specified.
KeyVaultUri pulumi.StringPtrInput
// The version of Key Vault Key. Remove or omit this argument to enable Automatic Key Rotation.
KeyVersion pulumi.StringPtrInput
// Key ID of a key in a managed HSM. Exactly one of `managedHsmKeyId`, `keyVaultId`, or `keyVaultUri` must be specified.
ManagedHsmKeyId pulumi.StringPtrInput
// The ID of the Storage Account. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringInput
// The ID of a user assigned identity.
UserAssignedIdentityId pulumi.StringPtrInput
}
func (CustomerManagedKeyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*customerManagedKeyArgs)(nil)).Elem()
}
type CustomerManagedKeyInput interface {
pulumi.Input
ToCustomerManagedKeyOutput() CustomerManagedKeyOutput
ToCustomerManagedKeyOutputWithContext(ctx context.Context) CustomerManagedKeyOutput
}
func (*CustomerManagedKey) ElementType() reflect.Type {
return reflect.TypeOf((**CustomerManagedKey)(nil)).Elem()
}
func (i *CustomerManagedKey) ToCustomerManagedKeyOutput() CustomerManagedKeyOutput {
return i.ToCustomerManagedKeyOutputWithContext(context.Background())
}
func (i *CustomerManagedKey) ToCustomerManagedKeyOutputWithContext(ctx context.Context) CustomerManagedKeyOutput {
return pulumi.ToOutputWithContext(ctx, i).(CustomerManagedKeyOutput)
}
// CustomerManagedKeyArrayInput is an input type that accepts CustomerManagedKeyArray and CustomerManagedKeyArrayOutput values.
// You can construct a concrete instance of `CustomerManagedKeyArrayInput` via:
//
// CustomerManagedKeyArray{ CustomerManagedKeyArgs{...} }
type CustomerManagedKeyArrayInput interface {
pulumi.Input
ToCustomerManagedKeyArrayOutput() CustomerManagedKeyArrayOutput
ToCustomerManagedKeyArrayOutputWithContext(context.Context) CustomerManagedKeyArrayOutput
}
type CustomerManagedKeyArray []CustomerManagedKeyInput
func (CustomerManagedKeyArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CustomerManagedKey)(nil)).Elem()
}
func (i CustomerManagedKeyArray) ToCustomerManagedKeyArrayOutput() CustomerManagedKeyArrayOutput {
return i.ToCustomerManagedKeyArrayOutputWithContext(context.Background())
}
func (i CustomerManagedKeyArray) ToCustomerManagedKeyArrayOutputWithContext(ctx context.Context) CustomerManagedKeyArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(CustomerManagedKeyArrayOutput)
}
// CustomerManagedKeyMapInput is an input type that accepts CustomerManagedKeyMap and CustomerManagedKeyMapOutput values.
// You can construct a concrete instance of `CustomerManagedKeyMapInput` via:
//
// CustomerManagedKeyMap{ "key": CustomerManagedKeyArgs{...} }
type CustomerManagedKeyMapInput interface {
pulumi.Input
ToCustomerManagedKeyMapOutput() CustomerManagedKeyMapOutput
ToCustomerManagedKeyMapOutputWithContext(context.Context) CustomerManagedKeyMapOutput
}
type CustomerManagedKeyMap map[string]CustomerManagedKeyInput
func (CustomerManagedKeyMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CustomerManagedKey)(nil)).Elem()
}
func (i CustomerManagedKeyMap) ToCustomerManagedKeyMapOutput() CustomerManagedKeyMapOutput {
return i.ToCustomerManagedKeyMapOutputWithContext(context.Background())
}
func (i CustomerManagedKeyMap) ToCustomerManagedKeyMapOutputWithContext(ctx context.Context) CustomerManagedKeyMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(CustomerManagedKeyMapOutput)
}
type CustomerManagedKeyOutput struct{ *pulumi.OutputState }
func (CustomerManagedKeyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**CustomerManagedKey)(nil)).Elem()
}
func (o CustomerManagedKeyOutput) ToCustomerManagedKeyOutput() CustomerManagedKeyOutput {
return o
}
func (o CustomerManagedKeyOutput) ToCustomerManagedKeyOutputWithContext(ctx context.Context) CustomerManagedKeyOutput {
return o
}
// The Client ID of the multi-tenant application to be used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys server-side encryption on the storage account.
func (o CustomerManagedKeyOutput) FederatedIdentityClientId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CustomerManagedKey) pulumi.StringPtrOutput { return v.FederatedIdentityClientId }).(pulumi.StringPtrOutput)
}
// The name of Key Vault Key.
func (o CustomerManagedKeyOutput) KeyName() pulumi.StringOutput {
return o.ApplyT(func(v *CustomerManagedKey) pulumi.StringOutput { return v.KeyName }).(pulumi.StringOutput)
}
func (o CustomerManagedKeyOutput) KeyVaultId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CustomerManagedKey) pulumi.StringPtrOutput { return v.KeyVaultId }).(pulumi.StringPtrOutput)
}
// URI pointing at the Key Vault. Required when using `federatedIdentityClientId`. Exactly one of `managedHsmKeyId`, `keyVaultId`, or `keyVaultUri` must be specified.
func (o CustomerManagedKeyOutput) KeyVaultUri() pulumi.StringOutput {
return o.ApplyT(func(v *CustomerManagedKey) pulumi.StringOutput { return v.KeyVaultUri }).(pulumi.StringOutput)
}
// The version of Key Vault Key. Remove or omit this argument to enable Automatic Key Rotation.
func (o CustomerManagedKeyOutput) KeyVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CustomerManagedKey) pulumi.StringPtrOutput { return v.KeyVersion }).(pulumi.StringPtrOutput)
}
// Key ID of a key in a managed HSM. Exactly one of `managedHsmKeyId`, `keyVaultId`, or `keyVaultUri` must be specified.
func (o CustomerManagedKeyOutput) ManagedHsmKeyId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CustomerManagedKey) pulumi.StringPtrOutput { return v.ManagedHsmKeyId }).(pulumi.StringPtrOutput)
}
// The ID of the Storage Account. Changing this forces a new resource to be created.
func (o CustomerManagedKeyOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *CustomerManagedKey) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
// The ID of a user assigned identity.
func (o CustomerManagedKeyOutput) UserAssignedIdentityId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *CustomerManagedKey) pulumi.StringPtrOutput { return v.UserAssignedIdentityId }).(pulumi.StringPtrOutput)
}
type CustomerManagedKeyArrayOutput struct{ *pulumi.OutputState }
func (CustomerManagedKeyArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*CustomerManagedKey)(nil)).Elem()
}
func (o CustomerManagedKeyArrayOutput) ToCustomerManagedKeyArrayOutput() CustomerManagedKeyArrayOutput {
return o
}
func (o CustomerManagedKeyArrayOutput) ToCustomerManagedKeyArrayOutputWithContext(ctx context.Context) CustomerManagedKeyArrayOutput {
return o
}
func (o CustomerManagedKeyArrayOutput) Index(i pulumi.IntInput) CustomerManagedKeyOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CustomerManagedKey {
return vs[0].([]*CustomerManagedKey)[vs[1].(int)]
}).(CustomerManagedKeyOutput)
}
type CustomerManagedKeyMapOutput struct{ *pulumi.OutputState }
func (CustomerManagedKeyMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*CustomerManagedKey)(nil)).Elem()
}
func (o CustomerManagedKeyMapOutput) ToCustomerManagedKeyMapOutput() CustomerManagedKeyMapOutput {
return o
}
func (o CustomerManagedKeyMapOutput) ToCustomerManagedKeyMapOutputWithContext(ctx context.Context) CustomerManagedKeyMapOutput {
return o
}
func (o CustomerManagedKeyMapOutput) MapIndex(k pulumi.StringInput) CustomerManagedKeyOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CustomerManagedKey {
return vs[0].(map[string]*CustomerManagedKey)[vs[1].(string)]
}).(CustomerManagedKeyOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*CustomerManagedKeyInput)(nil)).Elem(), &CustomerManagedKey{})
pulumi.RegisterInputType(reflect.TypeOf((*CustomerManagedKeyArrayInput)(nil)).Elem(), CustomerManagedKeyArray{})
pulumi.RegisterInputType(reflect.TypeOf((*CustomerManagedKeyMapInput)(nil)).Elem(), CustomerManagedKeyMap{})
pulumi.RegisterOutputType(CustomerManagedKeyOutput{})
pulumi.RegisterOutputType(CustomerManagedKeyArrayOutput{})
pulumi.RegisterOutputType(CustomerManagedKeyMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/dataLakeGen2Path.go | sdk/go/azure/storage/dataLakeGen2Path.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Data Lake Gen2 Path in a File System within an Azure Storage Account.
//
// > **Note:** This resource requires some `Storage` specific roles which are not granted by default. Some of the built-ins roles that can be attributed are [`Storage Account Contributor`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-account-contributor), [`Storage Blob Data Owner`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-owner), [`Storage Blob Data Contributor`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-contributor), [`Storage Blob Data Reader`](https://docs.microsoft.com/azure/role-based-access-control/built-in-roles#storage-blob-data-reader).
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/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("examplestorageacc"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// AccountKind: pulumi.String("StorageV2"),
// IsHnsEnabled: pulumi.Bool(true),
// })
// if err != nil {
// return err
// }
// exampleDataLakeGen2Filesystem, err := storage.NewDataLakeGen2Filesystem(ctx, "example", &storage.DataLakeGen2FilesystemArgs{
// Name: pulumi.String("example"),
// StorageAccountId: exampleAccount.ID(),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewDataLakeGen2Path(ctx, "example", &storage.DataLakeGen2PathArgs{
// Path: pulumi.String("example"),
// FilesystemName: exampleDataLakeGen2Filesystem.Name,
// StorageAccountId: exampleAccount.ID(),
// Resource: pulumi.String("directory"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Data Lake Gen2 Paths can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/dataLakeGen2Path:DataLakeGen2Path example https://account1.dfs.core.windows.net/fileSystem1/path
// ```
type DataLakeGen2Path struct {
pulumi.CustomResourceState
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
Aces DataLakeGen2PathAceArrayOutput `pulumi:"aces"`
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
FilesystemName pulumi.StringOutput `pulumi:"filesystemName"`
// Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include `$superuser`.
Group pulumi.StringOutput `pulumi:"group"`
// Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include `$superuser`.
Owner pulumi.StringOutput `pulumi:"owner"`
// The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.
Path pulumi.StringOutput `pulumi:"path"`
// Specifies the type for path to create. Currently only `directory` is supported. Changing this forces a new resource to be created.
Resource pulumi.StringOutput `pulumi:"resource"`
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
}
// NewDataLakeGen2Path registers a new resource with the given unique name, arguments, and options.
func NewDataLakeGen2Path(ctx *pulumi.Context,
name string, args *DataLakeGen2PathArgs, opts ...pulumi.ResourceOption) (*DataLakeGen2Path, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.FilesystemName == nil {
return nil, errors.New("invalid value for required argument 'FilesystemName'")
}
if args.Path == nil {
return nil, errors.New("invalid value for required argument 'Path'")
}
if args.Resource == nil {
return nil, errors.New("invalid value for required argument 'Resource'")
}
if args.StorageAccountId == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource DataLakeGen2Path
err := ctx.RegisterResource("azure:storage/dataLakeGen2Path:DataLakeGen2Path", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDataLakeGen2Path gets an existing DataLakeGen2Path resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetDataLakeGen2Path(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DataLakeGen2PathState, opts ...pulumi.ResourceOption) (*DataLakeGen2Path, error) {
var resource DataLakeGen2Path
err := ctx.ReadResource("azure:storage/dataLakeGen2Path:DataLakeGen2Path", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DataLakeGen2Path resources.
type dataLakeGen2PathState struct {
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
Aces []DataLakeGen2PathAce `pulumi:"aces"`
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
FilesystemName *string `pulumi:"filesystemName"`
// Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include `$superuser`.
Group *string `pulumi:"group"`
// Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include `$superuser`.
Owner *string `pulumi:"owner"`
// The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.
Path *string `pulumi:"path"`
// Specifies the type for path to create. Currently only `directory` is supported. Changing this forces a new resource to be created.
Resource *string `pulumi:"resource"`
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
}
type DataLakeGen2PathState struct {
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
Aces DataLakeGen2PathAceArrayInput
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
FilesystemName pulumi.StringPtrInput
// Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include `$superuser`.
Group pulumi.StringPtrInput
// Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include `$superuser`.
Owner pulumi.StringPtrInput
// The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.
Path pulumi.StringPtrInput
// Specifies the type for path to create. Currently only `directory` is supported. Changing this forces a new resource to be created.
Resource pulumi.StringPtrInput
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringPtrInput
}
func (DataLakeGen2PathState) ElementType() reflect.Type {
return reflect.TypeOf((*dataLakeGen2PathState)(nil)).Elem()
}
type dataLakeGen2PathArgs struct {
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
Aces []DataLakeGen2PathAce `pulumi:"aces"`
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
FilesystemName string `pulumi:"filesystemName"`
// Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include `$superuser`.
Group *string `pulumi:"group"`
// Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include `$superuser`.
Owner *string `pulumi:"owner"`
// The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.
Path string `pulumi:"path"`
// Specifies the type for path to create. Currently only `directory` is supported. Changing this forces a new resource to be created.
Resource string `pulumi:"resource"`
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
StorageAccountId string `pulumi:"storageAccountId"`
}
// The set of arguments for constructing a DataLakeGen2Path resource.
type DataLakeGen2PathArgs struct {
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
Aces DataLakeGen2PathAceArrayInput
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
FilesystemName pulumi.StringInput
// Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include `$superuser`.
Group pulumi.StringPtrInput
// Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include `$superuser`.
Owner pulumi.StringPtrInput
// The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.
Path pulumi.StringInput
// Specifies the type for path to create. Currently only `directory` is supported. Changing this forces a new resource to be created.
Resource pulumi.StringInput
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringInput
}
func (DataLakeGen2PathArgs) ElementType() reflect.Type {
return reflect.TypeOf((*dataLakeGen2PathArgs)(nil)).Elem()
}
type DataLakeGen2PathInput interface {
pulumi.Input
ToDataLakeGen2PathOutput() DataLakeGen2PathOutput
ToDataLakeGen2PathOutputWithContext(ctx context.Context) DataLakeGen2PathOutput
}
func (*DataLakeGen2Path) ElementType() reflect.Type {
return reflect.TypeOf((**DataLakeGen2Path)(nil)).Elem()
}
func (i *DataLakeGen2Path) ToDataLakeGen2PathOutput() DataLakeGen2PathOutput {
return i.ToDataLakeGen2PathOutputWithContext(context.Background())
}
func (i *DataLakeGen2Path) ToDataLakeGen2PathOutputWithContext(ctx context.Context) DataLakeGen2PathOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataLakeGen2PathOutput)
}
// DataLakeGen2PathArrayInput is an input type that accepts DataLakeGen2PathArray and DataLakeGen2PathArrayOutput values.
// You can construct a concrete instance of `DataLakeGen2PathArrayInput` via:
//
// DataLakeGen2PathArray{ DataLakeGen2PathArgs{...} }
type DataLakeGen2PathArrayInput interface {
pulumi.Input
ToDataLakeGen2PathArrayOutput() DataLakeGen2PathArrayOutput
ToDataLakeGen2PathArrayOutputWithContext(context.Context) DataLakeGen2PathArrayOutput
}
type DataLakeGen2PathArray []DataLakeGen2PathInput
func (DataLakeGen2PathArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DataLakeGen2Path)(nil)).Elem()
}
func (i DataLakeGen2PathArray) ToDataLakeGen2PathArrayOutput() DataLakeGen2PathArrayOutput {
return i.ToDataLakeGen2PathArrayOutputWithContext(context.Background())
}
func (i DataLakeGen2PathArray) ToDataLakeGen2PathArrayOutputWithContext(ctx context.Context) DataLakeGen2PathArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataLakeGen2PathArrayOutput)
}
// DataLakeGen2PathMapInput is an input type that accepts DataLakeGen2PathMap and DataLakeGen2PathMapOutput values.
// You can construct a concrete instance of `DataLakeGen2PathMapInput` via:
//
// DataLakeGen2PathMap{ "key": DataLakeGen2PathArgs{...} }
type DataLakeGen2PathMapInput interface {
pulumi.Input
ToDataLakeGen2PathMapOutput() DataLakeGen2PathMapOutput
ToDataLakeGen2PathMapOutputWithContext(context.Context) DataLakeGen2PathMapOutput
}
type DataLakeGen2PathMap map[string]DataLakeGen2PathInput
func (DataLakeGen2PathMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DataLakeGen2Path)(nil)).Elem()
}
func (i DataLakeGen2PathMap) ToDataLakeGen2PathMapOutput() DataLakeGen2PathMapOutput {
return i.ToDataLakeGen2PathMapOutputWithContext(context.Background())
}
func (i DataLakeGen2PathMap) ToDataLakeGen2PathMapOutputWithContext(ctx context.Context) DataLakeGen2PathMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DataLakeGen2PathMapOutput)
}
type DataLakeGen2PathOutput struct{ *pulumi.OutputState }
func (DataLakeGen2PathOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DataLakeGen2Path)(nil)).Elem()
}
func (o DataLakeGen2PathOutput) ToDataLakeGen2PathOutput() DataLakeGen2PathOutput {
return o
}
func (o DataLakeGen2PathOutput) ToDataLakeGen2PathOutputWithContext(ctx context.Context) DataLakeGen2PathOutput {
return o
}
// One or more `ace` blocks as defined below to specify the entries for the ACL for the path.
func (o DataLakeGen2PathOutput) Aces() DataLakeGen2PathAceArrayOutput {
return o.ApplyT(func(v *DataLakeGen2Path) DataLakeGen2PathAceArrayOutput { return v.Aces }).(DataLakeGen2PathAceArrayOutput)
}
// The name of the Data Lake Gen2 File System which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
func (o DataLakeGen2PathOutput) FilesystemName() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Path) pulumi.StringOutput { return v.FilesystemName }).(pulumi.StringOutput)
}
// Specifies the Object ID of the Azure Active Directory Group to make the owning group. Possible values also include `$superuser`.
func (o DataLakeGen2PathOutput) Group() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Path) pulumi.StringOutput { return v.Group }).(pulumi.StringOutput)
}
// Specifies the Object ID of the Azure Active Directory User to make the owning user. Possible values also include `$superuser`.
func (o DataLakeGen2PathOutput) Owner() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Path) pulumi.StringOutput { return v.Owner }).(pulumi.StringOutput)
}
// The path which should be created within the Data Lake Gen2 File System in the Storage Account. Changing this forces a new resource to be created.
func (o DataLakeGen2PathOutput) Path() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Path) pulumi.StringOutput { return v.Path }).(pulumi.StringOutput)
}
// Specifies the type for path to create. Currently only `directory` is supported. Changing this forces a new resource to be created.
func (o DataLakeGen2PathOutput) Resource() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Path) pulumi.StringOutput { return v.Resource }).(pulumi.StringOutput)
}
// Specifies the ID of the Storage Account in which the Data Lake Gen2 File System should exist. Changing this forces a new resource to be created.
func (o DataLakeGen2PathOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *DataLakeGen2Path) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
type DataLakeGen2PathArrayOutput struct{ *pulumi.OutputState }
func (DataLakeGen2PathArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DataLakeGen2Path)(nil)).Elem()
}
func (o DataLakeGen2PathArrayOutput) ToDataLakeGen2PathArrayOutput() DataLakeGen2PathArrayOutput {
return o
}
func (o DataLakeGen2PathArrayOutput) ToDataLakeGen2PathArrayOutputWithContext(ctx context.Context) DataLakeGen2PathArrayOutput {
return o
}
func (o DataLakeGen2PathArrayOutput) Index(i pulumi.IntInput) DataLakeGen2PathOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataLakeGen2Path {
return vs[0].([]*DataLakeGen2Path)[vs[1].(int)]
}).(DataLakeGen2PathOutput)
}
type DataLakeGen2PathMapOutput struct{ *pulumi.OutputState }
func (DataLakeGen2PathMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DataLakeGen2Path)(nil)).Elem()
}
func (o DataLakeGen2PathMapOutput) ToDataLakeGen2PathMapOutput() DataLakeGen2PathMapOutput {
return o
}
func (o DataLakeGen2PathMapOutput) ToDataLakeGen2PathMapOutputWithContext(ctx context.Context) DataLakeGen2PathMapOutput {
return o
}
func (o DataLakeGen2PathMapOutput) MapIndex(k pulumi.StringInput) DataLakeGen2PathOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataLakeGen2Path {
return vs[0].(map[string]*DataLakeGen2Path)[vs[1].(string)]
}).(DataLakeGen2PathOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DataLakeGen2PathInput)(nil)).Elem(), &DataLakeGen2Path{})
pulumi.RegisterInputType(reflect.TypeOf((*DataLakeGen2PathArrayInput)(nil)).Elem(), DataLakeGen2PathArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DataLakeGen2PathMapInput)(nil)).Elem(), DataLakeGen2PathMap{})
pulumi.RegisterOutputType(DataLakeGen2PathOutput{})
pulumi.RegisterOutputType(DataLakeGen2PathArrayOutput{})
pulumi.RegisterOutputType(DataLakeGen2PathMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/moverAgent.go | sdk/go/azure/storage/moverAgent.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Storage Mover Agent.
//
// ## 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/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("East US"),
// })
// if err != nil {
// return err
// }
// exampleMover, err := storage.NewMover(ctx, "example", &storage.MoverArgs{
// Name: pulumi.String("example-ssm"),
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = storage.NewMoverAgent(ctx, "example", &storage.MoverAgentArgs{
// Name: pulumi.String("example-sa"),
// StorageMoverId: exampleMover.ID(),
// ArcVirtualMachineId: example.ID().ApplyT(func(id string) (string, error) {
// return fmt.Sprintf("%v/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName", id), nil
// }).(pulumi.StringOutput),
// ArcVirtualMachineUuid: pulumi.String("3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9"),
// Description: pulumi.String("Example Agent 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.StorageMover` - 2023-03-01
//
// ## Import
//
// Storage Mover Agent can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/moverAgent:MoverAgent example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.StorageMover/storageMovers/storageMover1/agents/agent1
// ```
type MoverAgent struct {
pulumi.CustomResourceState
// Specifies the fully qualified ID of the Hybrid Compute resource for the Storage Mover Agent. Changing this forces a new resource to be created.
ArcVirtualMachineId pulumi.StringOutput `pulumi:"arcVirtualMachineId"`
// Specifies the Hybrid Compute resource's unique SMBIOS ID. Changing this forces a new resource to be created.
ArcVirtualMachineUuid pulumi.StringOutput `pulumi:"arcVirtualMachineUuid"`
// Specifies a description for this Storage Mover Agent.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the name which should be used for this Storage Mover Agent. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the ID of the Storage Mover that this Agent should be connected to. Changing this forces a new resource to be created.
StorageMoverId pulumi.StringOutput `pulumi:"storageMoverId"`
}
// NewMoverAgent registers a new resource with the given unique name, arguments, and options.
func NewMoverAgent(ctx *pulumi.Context,
name string, args *MoverAgentArgs, opts ...pulumi.ResourceOption) (*MoverAgent, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ArcVirtualMachineId == nil {
return nil, errors.New("invalid value for required argument 'ArcVirtualMachineId'")
}
if args.ArcVirtualMachineUuid == nil {
return nil, errors.New("invalid value for required argument 'ArcVirtualMachineUuid'")
}
if args.StorageMoverId == nil {
return nil, errors.New("invalid value for required argument 'StorageMoverId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource MoverAgent
err := ctx.RegisterResource("azure:storage/moverAgent:MoverAgent", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMoverAgent gets an existing MoverAgent resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetMoverAgent(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MoverAgentState, opts ...pulumi.ResourceOption) (*MoverAgent, error) {
var resource MoverAgent
err := ctx.ReadResource("azure:storage/moverAgent:MoverAgent", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MoverAgent resources.
type moverAgentState struct {
// Specifies the fully qualified ID of the Hybrid Compute resource for the Storage Mover Agent. Changing this forces a new resource to be created.
ArcVirtualMachineId *string `pulumi:"arcVirtualMachineId"`
// Specifies the Hybrid Compute resource's unique SMBIOS ID. Changing this forces a new resource to be created.
ArcVirtualMachineUuid *string `pulumi:"arcVirtualMachineUuid"`
// Specifies a description for this Storage Mover Agent.
Description *string `pulumi:"description"`
// Specifies the name which should be used for this Storage Mover Agent. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the Storage Mover that this Agent should be connected to. Changing this forces a new resource to be created.
StorageMoverId *string `pulumi:"storageMoverId"`
}
type MoverAgentState struct {
// Specifies the fully qualified ID of the Hybrid Compute resource for the Storage Mover Agent. Changing this forces a new resource to be created.
ArcVirtualMachineId pulumi.StringPtrInput
// Specifies the Hybrid Compute resource's unique SMBIOS ID. Changing this forces a new resource to be created.
ArcVirtualMachineUuid pulumi.StringPtrInput
// Specifies a description for this Storage Mover Agent.
Description pulumi.StringPtrInput
// Specifies the name which should be used for this Storage Mover Agent. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the Storage Mover that this Agent should be connected to. Changing this forces a new resource to be created.
StorageMoverId pulumi.StringPtrInput
}
func (MoverAgentState) ElementType() reflect.Type {
return reflect.TypeOf((*moverAgentState)(nil)).Elem()
}
type moverAgentArgs struct {
// Specifies the fully qualified ID of the Hybrid Compute resource for the Storage Mover Agent. Changing this forces a new resource to be created.
ArcVirtualMachineId string `pulumi:"arcVirtualMachineId"`
// Specifies the Hybrid Compute resource's unique SMBIOS ID. Changing this forces a new resource to be created.
ArcVirtualMachineUuid string `pulumi:"arcVirtualMachineUuid"`
// Specifies a description for this Storage Mover Agent.
Description *string `pulumi:"description"`
// Specifies the name which should be used for this Storage Mover Agent. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the Storage Mover that this Agent should be connected to. Changing this forces a new resource to be created.
StorageMoverId string `pulumi:"storageMoverId"`
}
// The set of arguments for constructing a MoverAgent resource.
type MoverAgentArgs struct {
// Specifies the fully qualified ID of the Hybrid Compute resource for the Storage Mover Agent. Changing this forces a new resource to be created.
ArcVirtualMachineId pulumi.StringInput
// Specifies the Hybrid Compute resource's unique SMBIOS ID. Changing this forces a new resource to be created.
ArcVirtualMachineUuid pulumi.StringInput
// Specifies a description for this Storage Mover Agent.
Description pulumi.StringPtrInput
// Specifies the name which should be used for this Storage Mover Agent. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the Storage Mover that this Agent should be connected to. Changing this forces a new resource to be created.
StorageMoverId pulumi.StringInput
}
func (MoverAgentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*moverAgentArgs)(nil)).Elem()
}
type MoverAgentInput interface {
pulumi.Input
ToMoverAgentOutput() MoverAgentOutput
ToMoverAgentOutputWithContext(ctx context.Context) MoverAgentOutput
}
func (*MoverAgent) ElementType() reflect.Type {
return reflect.TypeOf((**MoverAgent)(nil)).Elem()
}
func (i *MoverAgent) ToMoverAgentOutput() MoverAgentOutput {
return i.ToMoverAgentOutputWithContext(context.Background())
}
func (i *MoverAgent) ToMoverAgentOutputWithContext(ctx context.Context) MoverAgentOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverAgentOutput)
}
// MoverAgentArrayInput is an input type that accepts MoverAgentArray and MoverAgentArrayOutput values.
// You can construct a concrete instance of `MoverAgentArrayInput` via:
//
// MoverAgentArray{ MoverAgentArgs{...} }
type MoverAgentArrayInput interface {
pulumi.Input
ToMoverAgentArrayOutput() MoverAgentArrayOutput
ToMoverAgentArrayOutputWithContext(context.Context) MoverAgentArrayOutput
}
type MoverAgentArray []MoverAgentInput
func (MoverAgentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MoverAgent)(nil)).Elem()
}
func (i MoverAgentArray) ToMoverAgentArrayOutput() MoverAgentArrayOutput {
return i.ToMoverAgentArrayOutputWithContext(context.Background())
}
func (i MoverAgentArray) ToMoverAgentArrayOutputWithContext(ctx context.Context) MoverAgentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverAgentArrayOutput)
}
// MoverAgentMapInput is an input type that accepts MoverAgentMap and MoverAgentMapOutput values.
// You can construct a concrete instance of `MoverAgentMapInput` via:
//
// MoverAgentMap{ "key": MoverAgentArgs{...} }
type MoverAgentMapInput interface {
pulumi.Input
ToMoverAgentMapOutput() MoverAgentMapOutput
ToMoverAgentMapOutputWithContext(context.Context) MoverAgentMapOutput
}
type MoverAgentMap map[string]MoverAgentInput
func (MoverAgentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MoverAgent)(nil)).Elem()
}
func (i MoverAgentMap) ToMoverAgentMapOutput() MoverAgentMapOutput {
return i.ToMoverAgentMapOutputWithContext(context.Background())
}
func (i MoverAgentMap) ToMoverAgentMapOutputWithContext(ctx context.Context) MoverAgentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverAgentMapOutput)
}
type MoverAgentOutput struct{ *pulumi.OutputState }
func (MoverAgentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MoverAgent)(nil)).Elem()
}
func (o MoverAgentOutput) ToMoverAgentOutput() MoverAgentOutput {
return o
}
func (o MoverAgentOutput) ToMoverAgentOutputWithContext(ctx context.Context) MoverAgentOutput {
return o
}
// Specifies the fully qualified ID of the Hybrid Compute resource for the Storage Mover Agent. Changing this forces a new resource to be created.
func (o MoverAgentOutput) ArcVirtualMachineId() pulumi.StringOutput {
return o.ApplyT(func(v *MoverAgent) pulumi.StringOutput { return v.ArcVirtualMachineId }).(pulumi.StringOutput)
}
// Specifies the Hybrid Compute resource's unique SMBIOS ID. Changing this forces a new resource to be created.
func (o MoverAgentOutput) ArcVirtualMachineUuid() pulumi.StringOutput {
return o.ApplyT(func(v *MoverAgent) pulumi.StringOutput { return v.ArcVirtualMachineUuid }).(pulumi.StringOutput)
}
// Specifies a description for this Storage Mover Agent.
func (o MoverAgentOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MoverAgent) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the name which should be used for this Storage Mover Agent. Changing this forces a new resource to be created.
func (o MoverAgentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *MoverAgent) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the ID of the Storage Mover that this Agent should be connected to. Changing this forces a new resource to be created.
func (o MoverAgentOutput) StorageMoverId() pulumi.StringOutput {
return o.ApplyT(func(v *MoverAgent) pulumi.StringOutput { return v.StorageMoverId }).(pulumi.StringOutput)
}
type MoverAgentArrayOutput struct{ *pulumi.OutputState }
func (MoverAgentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MoverAgent)(nil)).Elem()
}
func (o MoverAgentArrayOutput) ToMoverAgentArrayOutput() MoverAgentArrayOutput {
return o
}
func (o MoverAgentArrayOutput) ToMoverAgentArrayOutputWithContext(ctx context.Context) MoverAgentArrayOutput {
return o
}
func (o MoverAgentArrayOutput) Index(i pulumi.IntInput) MoverAgentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MoverAgent {
return vs[0].([]*MoverAgent)[vs[1].(int)]
}).(MoverAgentOutput)
}
type MoverAgentMapOutput struct{ *pulumi.OutputState }
func (MoverAgentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MoverAgent)(nil)).Elem()
}
func (o MoverAgentMapOutput) ToMoverAgentMapOutput() MoverAgentMapOutput {
return o
}
func (o MoverAgentMapOutput) ToMoverAgentMapOutputWithContext(ctx context.Context) MoverAgentMapOutput {
return o
}
func (o MoverAgentMapOutput) MapIndex(k pulumi.StringInput) MoverAgentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MoverAgent {
return vs[0].(map[string]*MoverAgent)[vs[1].(string)]
}).(MoverAgentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MoverAgentInput)(nil)).Elem(), &MoverAgent{})
pulumi.RegisterInputType(reflect.TypeOf((*MoverAgentArrayInput)(nil)).Elem(), MoverAgentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MoverAgentMapInput)(nil)).Elem(), MoverAgentMap{})
pulumi.RegisterOutputType(MoverAgentOutput{})
pulumi.RegisterOutputType(MoverAgentArrayOutput{})
pulumi.RegisterOutputType(MoverAgentMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/moverProject.go | sdk/go/azure/storage/moverProject.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Storage Mover Project.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/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
// }
// exampleMover, err := storage.NewMover(ctx, "example", &storage.MoverArgs{
// Name: pulumi.String("example-ssm"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// _, err = storage.NewMoverProject(ctx, "example", &storage.MoverProjectArgs{
// Name: pulumi.String("example-sp"),
// StorageMoverId: exampleMover.ID(),
// Description: pulumi.String("Example Project 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.StorageMover` - 2023-03-01
//
// ## Import
//
// Storage Mover Project can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/moverProject:MoverProject example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.StorageMover/storageMovers/storageMover1/projects/project1
// ```
type MoverProject struct {
pulumi.CustomResourceState
// Specifies a description for this Storage Mover Project.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Specifies the name which should be used for this Storage Mover Project. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the ID of the storage mover for this Storage Mover Project. Changing this forces a new resource to be created.
StorageMoverId pulumi.StringOutput `pulumi:"storageMoverId"`
}
// NewMoverProject registers a new resource with the given unique name, arguments, and options.
func NewMoverProject(ctx *pulumi.Context,
name string, args *MoverProjectArgs, opts ...pulumi.ResourceOption) (*MoverProject, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.StorageMoverId == nil {
return nil, errors.New("invalid value for required argument 'StorageMoverId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource MoverProject
err := ctx.RegisterResource("azure:storage/moverProject:MoverProject", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetMoverProject gets an existing MoverProject resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetMoverProject(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *MoverProjectState, opts ...pulumi.ResourceOption) (*MoverProject, error) {
var resource MoverProject
err := ctx.ReadResource("azure:storage/moverProject:MoverProject", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering MoverProject resources.
type moverProjectState struct {
// Specifies a description for this Storage Mover Project.
Description *string `pulumi:"description"`
// Specifies the name which should be used for this Storage Mover Project. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the storage mover for this Storage Mover Project. Changing this forces a new resource to be created.
StorageMoverId *string `pulumi:"storageMoverId"`
}
type MoverProjectState struct {
// Specifies a description for this Storage Mover Project.
Description pulumi.StringPtrInput
// Specifies the name which should be used for this Storage Mover Project. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the storage mover for this Storage Mover Project. Changing this forces a new resource to be created.
StorageMoverId pulumi.StringPtrInput
}
func (MoverProjectState) ElementType() reflect.Type {
return reflect.TypeOf((*moverProjectState)(nil)).Elem()
}
type moverProjectArgs struct {
// Specifies a description for this Storage Mover Project.
Description *string `pulumi:"description"`
// Specifies the name which should be used for this Storage Mover Project. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the ID of the storage mover for this Storage Mover Project. Changing this forces a new resource to be created.
StorageMoverId string `pulumi:"storageMoverId"`
}
// The set of arguments for constructing a MoverProject resource.
type MoverProjectArgs struct {
// Specifies a description for this Storage Mover Project.
Description pulumi.StringPtrInput
// Specifies the name which should be used for this Storage Mover Project. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the ID of the storage mover for this Storage Mover Project. Changing this forces a new resource to be created.
StorageMoverId pulumi.StringInput
}
func (MoverProjectArgs) ElementType() reflect.Type {
return reflect.TypeOf((*moverProjectArgs)(nil)).Elem()
}
type MoverProjectInput interface {
pulumi.Input
ToMoverProjectOutput() MoverProjectOutput
ToMoverProjectOutputWithContext(ctx context.Context) MoverProjectOutput
}
func (*MoverProject) ElementType() reflect.Type {
return reflect.TypeOf((**MoverProject)(nil)).Elem()
}
func (i *MoverProject) ToMoverProjectOutput() MoverProjectOutput {
return i.ToMoverProjectOutputWithContext(context.Background())
}
func (i *MoverProject) ToMoverProjectOutputWithContext(ctx context.Context) MoverProjectOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverProjectOutput)
}
// MoverProjectArrayInput is an input type that accepts MoverProjectArray and MoverProjectArrayOutput values.
// You can construct a concrete instance of `MoverProjectArrayInput` via:
//
// MoverProjectArray{ MoverProjectArgs{...} }
type MoverProjectArrayInput interface {
pulumi.Input
ToMoverProjectArrayOutput() MoverProjectArrayOutput
ToMoverProjectArrayOutputWithContext(context.Context) MoverProjectArrayOutput
}
type MoverProjectArray []MoverProjectInput
func (MoverProjectArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MoverProject)(nil)).Elem()
}
func (i MoverProjectArray) ToMoverProjectArrayOutput() MoverProjectArrayOutput {
return i.ToMoverProjectArrayOutputWithContext(context.Background())
}
func (i MoverProjectArray) ToMoverProjectArrayOutputWithContext(ctx context.Context) MoverProjectArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverProjectArrayOutput)
}
// MoverProjectMapInput is an input type that accepts MoverProjectMap and MoverProjectMapOutput values.
// You can construct a concrete instance of `MoverProjectMapInput` via:
//
// MoverProjectMap{ "key": MoverProjectArgs{...} }
type MoverProjectMapInput interface {
pulumi.Input
ToMoverProjectMapOutput() MoverProjectMapOutput
ToMoverProjectMapOutputWithContext(context.Context) MoverProjectMapOutput
}
type MoverProjectMap map[string]MoverProjectInput
func (MoverProjectMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MoverProject)(nil)).Elem()
}
func (i MoverProjectMap) ToMoverProjectMapOutput() MoverProjectMapOutput {
return i.ToMoverProjectMapOutputWithContext(context.Background())
}
func (i MoverProjectMap) ToMoverProjectMapOutputWithContext(ctx context.Context) MoverProjectMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(MoverProjectMapOutput)
}
type MoverProjectOutput struct{ *pulumi.OutputState }
func (MoverProjectOutput) ElementType() reflect.Type {
return reflect.TypeOf((**MoverProject)(nil)).Elem()
}
func (o MoverProjectOutput) ToMoverProjectOutput() MoverProjectOutput {
return o
}
func (o MoverProjectOutput) ToMoverProjectOutputWithContext(ctx context.Context) MoverProjectOutput {
return o
}
// Specifies a description for this Storage Mover Project.
func (o MoverProjectOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *MoverProject) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Specifies the name which should be used for this Storage Mover Project. Changing this forces a new resource to be created.
func (o MoverProjectOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *MoverProject) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the ID of the storage mover for this Storage Mover Project. Changing this forces a new resource to be created.
func (o MoverProjectOutput) StorageMoverId() pulumi.StringOutput {
return o.ApplyT(func(v *MoverProject) pulumi.StringOutput { return v.StorageMoverId }).(pulumi.StringOutput)
}
type MoverProjectArrayOutput struct{ *pulumi.OutputState }
func (MoverProjectArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*MoverProject)(nil)).Elem()
}
func (o MoverProjectArrayOutput) ToMoverProjectArrayOutput() MoverProjectArrayOutput {
return o
}
func (o MoverProjectArrayOutput) ToMoverProjectArrayOutputWithContext(ctx context.Context) MoverProjectArrayOutput {
return o
}
func (o MoverProjectArrayOutput) Index(i pulumi.IntInput) MoverProjectOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MoverProject {
return vs[0].([]*MoverProject)[vs[1].(int)]
}).(MoverProjectOutput)
}
type MoverProjectMapOutput struct{ *pulumi.OutputState }
func (MoverProjectMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*MoverProject)(nil)).Elem()
}
func (o MoverProjectMapOutput) ToMoverProjectMapOutput() MoverProjectMapOutput {
return o
}
func (o MoverProjectMapOutput) ToMoverProjectMapOutputWithContext(ctx context.Context) MoverProjectMapOutput {
return o
}
func (o MoverProjectMapOutput) MapIndex(k pulumi.StringInput) MoverProjectOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MoverProject {
return vs[0].(map[string]*MoverProject)[vs[1].(string)]
}).(MoverProjectOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*MoverProjectInput)(nil)).Elem(), &MoverProject{})
pulumi.RegisterInputType(reflect.TypeOf((*MoverProjectArrayInput)(nil)).Elem(), MoverProjectArray{})
pulumi.RegisterInputType(reflect.TypeOf((*MoverProjectMapInput)(nil)).Elem(), MoverProjectMap{})
pulumi.RegisterOutputType(MoverProjectOutput{})
pulumi.RegisterOutputType(MoverProjectArrayOutput{})
pulumi.RegisterOutputType(MoverProjectMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/account.go | sdk/go/azure/storage/account.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
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 Storage Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/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 = storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("storageaccountname"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("staging"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### With Network Rules
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("virtnetname"),
// 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("subnetname"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// ServiceEndpoints: pulumi.StringArray{
// pulumi.String("Microsoft.Sql"),
// pulumi.String("Microsoft.Storage"),
// },
// })
// if err != nil {
// return err
// }
// _, err = storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("storageaccountname"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// NetworkRules: &storage.AccountNetworkRulesTypeArgs{
// DefaultAction: pulumi.String("Deny"),
// IpRules: pulumi.StringArray{
// pulumi.String("100.0.0.1"),
// },
// VirtualNetworkSubnetIds: pulumi.StringArray{
// exampleSubnet.ID(),
// },
// },
// Tags: pulumi.StringMap{
// "environment": pulumi.String("staging"),
// },
// })
// 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.Storage` - 2023-05-01
//
// ## Import
//
// Storage Accounts can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/account:Account storageAcc1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount
// ```
type Account struct {
pulumi.CustomResourceState
// Defines the access tier for `BlobStorage`, `FileStorage` and `StorageV2` accounts. Valid options are `Hot`, `Cool`, `Cold` and `Premium`. Defaults to `Hot`.
AccessTier pulumi.StringOutput `pulumi:"accessTier"`
// Defines the Kind of account. Valid options are `BlobStorage`, `BlockBlobStorage`, `FileStorage`, `Storage` and `StorageV2`. Defaults to `StorageV2`.
//
// > **Note:** Changing the `accountKind` value from `Storage` to `StorageV2` will not trigger a force new on the storage account, it will only upgrade the existing storage account from `Storage` to `StorageV2` keeping the existing storage account in place.
AccountKind pulumi.StringPtrOutput `pulumi:"accountKind"`
// Defines the type of replication to use for this storage account. Valid options are `LRS`, `GRS`, `RAGRS`, `ZRS`, `GZRS` and `RAGZRS`. Changing this forces a new resource to be created when types `LRS`, `GRS` and `RAGRS` are changed to `ZRS`, `GZRS` or `RAGZRS` and vice versa.
AccountReplicationType pulumi.StringOutput `pulumi:"accountReplicationType"`
// Defines the Tier to use for this storage account. Valid options are `Standard` and `Premium`. For `BlockBlobStorage` and `FileStorage` accounts only `Premium` is valid. Changing this forces a new resource to be created.
//
// > **Note:** Blobs with a tier of `Premium` are of account kind `StorageV2`.
AccountTier pulumi.StringOutput `pulumi:"accountTier"`
// Allow or disallow nested items within this Account to opt into being public. Defaults to `true`.
//
// > **Note:** At this time `allowNestedItemsToBePublic` is only supported in the Public Cloud, China Cloud, and US Government Cloud.
AllowNestedItemsToBePublic pulumi.BoolPtrOutput `pulumi:"allowNestedItemsToBePublic"`
// Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. Possible values are `AAD` and `PrivateLink`.
AllowedCopyScope pulumi.StringPtrOutput `pulumi:"allowedCopyScope"`
// A `azureFilesAuthentication` block as defined below.
AzureFilesAuthentication AccountAzureFilesAuthenticationPtrOutput `pulumi:"azureFilesAuthentication"`
// A `blobProperties` block as defined below.
BlobProperties AccountBlobPropertiesOutput `pulumi:"blobProperties"`
// Should cross Tenant replication be enabled? Defaults to `false`.
CrossTenantReplicationEnabled pulumi.BoolPtrOutput `pulumi:"crossTenantReplicationEnabled"`
// A `customDomain` block as documented below.
CustomDomain AccountCustomDomainPtrOutput `pulumi:"customDomain"`
// A `customerManagedKey` block as documented below.
//
// > **Note:** It's possible to define a Customer Managed Key both within either the `customerManagedKey` block or by using the `storage.CustomerManagedKey` resource. However, it's not possible to use both methods to manage a Customer Managed Key for a Storage Account, since these will conflict. When using the `storage.CustomerManagedKey` resource, you will need to use `ignoreChanges` on the `customerManagedKey` block.
CustomerManagedKey AccountCustomerManagedKeyPtrOutput `pulumi:"customerManagedKey"`
// Default to Azure Active Directory authorization in the Azure portal when accessing the Storage Account. The default value is `false`
DefaultToOauthAuthentication pulumi.BoolPtrOutput `pulumi:"defaultToOauthAuthentication"`
// Specifies which DNS endpoint type to use. Possible values are `Standard` and `AzureDnsZone`. Defaults to `Standard`. Changing this forces a new resource to be created.
//
// > **Note:** Azure DNS zone support requires `PartitionedDns` feature to be enabled. To enable this feature for your subscription, use the following command: `az feature register --namespace "Microsoft.Storage" --name "PartitionedDns"`.
DnsEndpointType pulumi.StringPtrOutput `pulumi:"dnsEndpointType"`
// Specifies the Edge Zone within the Azure Region where this Storage Account should exist. Changing this forces a new Storage Account to be created.
EdgeZone pulumi.StringPtrOutput `pulumi:"edgeZone"`
// Boolean flag which forces HTTPS if enabled, see [here](https://docs.microsoft.com/azure/storage/storage-require-secure-transfer/) for more information. Defaults to `true`.
HttpsTrafficOnlyEnabled pulumi.BoolPtrOutput `pulumi:"httpsTrafficOnlyEnabled"`
// An `identity` block as defined below.
Identity AccountIdentityPtrOutput `pulumi:"identity"`
// An `immutabilityPolicy` block as defined below. Changing this forces a new resource to be created.
ImmutabilityPolicy AccountImmutabilityPolicyPtrOutput `pulumi:"immutabilityPolicy"`
// Is infrastructure encryption enabled? Changing this forces a new resource to be created. Defaults to `false`.
//
// > **Note:** This can only be `true` when `accountKind` is `StorageV2` or when `accountTier` is `Premium` *and* `accountKind` is one of `BlockBlobStorage` or `FileStorage`.
InfrastructureEncryptionEnabled pulumi.BoolPtrOutput `pulumi:"infrastructureEncryptionEnabled"`
// Is Hierarchical Namespace enabled? This can be used with Azure Data Lake Storage Gen 2 ([see here for more information](https://docs.microsoft.com/azure/storage/blobs/data-lake-storage-quickstart-create-account/)). Changing this forces a new resource to be created.
//
// > **Note:** This can only be `true` when `accountTier` is `Standard` or when `accountTier` is `Premium` *and* `accountKind` is `BlockBlobStorage`
IsHnsEnabled pulumi.BoolPtrOutput `pulumi:"isHnsEnabled"`
// Are Large File Shares Enabled? Defaults to `false`.
//
// > **Note:** Large File Shares are enabled by default when using an `accountKind` of `FileStorage`.
LargeFileShareEnabled pulumi.BoolOutput `pulumi:"largeFileShareEnabled"`
// Is Local User Enabled? Defaults to `true`.
LocalUserEnabled pulumi.BoolPtrOutput `pulumi:"localUserEnabled"`
// 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 the storage account. Possible values are `TLS1_0`, `TLS1_1`, `TLS1_2` and `TLS1_3`. Defaults to `TLS1_2` for new storage accounts.
//
// > **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.
//
// > **Note:** At this time `minTlsVersion` is only supported in the Public Cloud, China Cloud, and US Government Cloud.
MinTlsVersion pulumi.StringPtrOutput `pulumi:"minTlsVersion"`
// Specifies the name of the storage account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created. This must be unique across the entire Azure service, not just within the resource group.
Name pulumi.StringOutput `pulumi:"name"`
// A `networkRules` block as documented below.
NetworkRules AccountNetworkRulesTypeOutput `pulumi:"networkRules"`
// Is NFSv3 protocol enabled? Changing this forces a new resource to be created. Defaults to `false`.
//
// > **Note:** This can only be `true` when `accountTier` is `Standard` and `accountKind` is `StorageV2`, or `accountTier` is `Premium` and `accountKind` is `BlockBlobStorage`. Additionally, the `isHnsEnabled` is `true` and `accountReplicationType` must be `LRS` or `RAGRS`.
Nfsv3Enabled pulumi.BoolPtrOutput `pulumi:"nfsv3Enabled"`
// The primary access key for the storage account.
PrimaryAccessKey pulumi.StringOutput `pulumi:"primaryAccessKey"`
// The connection string associated with the primary blob location.
PrimaryBlobConnectionString pulumi.StringOutput `pulumi:"primaryBlobConnectionString"`
// The endpoint URL for blob storage in the primary location.
PrimaryBlobEndpoint pulumi.StringOutput `pulumi:"primaryBlobEndpoint"`
// The hostname with port if applicable for blob storage in the primary location.
PrimaryBlobHost pulumi.StringOutput `pulumi:"primaryBlobHost"`
// The internet routing endpoint URL for blob storage in the primary location.
PrimaryBlobInternetEndpoint pulumi.StringOutput `pulumi:"primaryBlobInternetEndpoint"`
// The internet routing hostname with port if applicable for blob storage in the primary location.
PrimaryBlobInternetHost pulumi.StringOutput `pulumi:"primaryBlobInternetHost"`
// The microsoft routing endpoint URL for blob storage in the primary location.
PrimaryBlobMicrosoftEndpoint pulumi.StringOutput `pulumi:"primaryBlobMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for blob storage in the primary location.
PrimaryBlobMicrosoftHost pulumi.StringOutput `pulumi:"primaryBlobMicrosoftHost"`
// The connection string associated with the primary location.
PrimaryConnectionString pulumi.StringOutput `pulumi:"primaryConnectionString"`
// The endpoint URL for DFS storage in the primary location.
PrimaryDfsEndpoint pulumi.StringOutput `pulumi:"primaryDfsEndpoint"`
// The hostname with port if applicable for DFS storage in the primary location.
PrimaryDfsHost pulumi.StringOutput `pulumi:"primaryDfsHost"`
// The internet routing endpoint URL for DFS storage in the primary location.
PrimaryDfsInternetEndpoint pulumi.StringOutput `pulumi:"primaryDfsInternetEndpoint"`
// The internet routing hostname with port if applicable for DFS storage in the primary location.
PrimaryDfsInternetHost pulumi.StringOutput `pulumi:"primaryDfsInternetHost"`
// The microsoft routing endpoint URL for DFS storage in the primary location.
PrimaryDfsMicrosoftEndpoint pulumi.StringOutput `pulumi:"primaryDfsMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for DFS storage in the primary location.
PrimaryDfsMicrosoftHost pulumi.StringOutput `pulumi:"primaryDfsMicrosoftHost"`
// The endpoint URL for file storage in the primary location.
PrimaryFileEndpoint pulumi.StringOutput `pulumi:"primaryFileEndpoint"`
// The hostname with port if applicable for file storage in the primary location.
PrimaryFileHost pulumi.StringOutput `pulumi:"primaryFileHost"`
// The internet routing endpoint URL for file storage in the primary location.
PrimaryFileInternetEndpoint pulumi.StringOutput `pulumi:"primaryFileInternetEndpoint"`
// The internet routing hostname with port if applicable for file storage in the primary location.
PrimaryFileInternetHost pulumi.StringOutput `pulumi:"primaryFileInternetHost"`
// The microsoft routing endpoint URL for file storage in the primary location.
PrimaryFileMicrosoftEndpoint pulumi.StringOutput `pulumi:"primaryFileMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for file storage in the primary location.
PrimaryFileMicrosoftHost pulumi.StringOutput `pulumi:"primaryFileMicrosoftHost"`
// The primary location of the storage account.
PrimaryLocation pulumi.StringOutput `pulumi:"primaryLocation"`
// The endpoint URL for queue storage in the primary location.
PrimaryQueueEndpoint pulumi.StringOutput `pulumi:"primaryQueueEndpoint"`
// The hostname with port if applicable for queue storage in the primary location.
PrimaryQueueHost pulumi.StringOutput `pulumi:"primaryQueueHost"`
// The microsoft routing endpoint URL for queue storage in the primary location.
PrimaryQueueMicrosoftEndpoint pulumi.StringOutput `pulumi:"primaryQueueMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for queue storage in the primary location.
PrimaryQueueMicrosoftHost pulumi.StringOutput `pulumi:"primaryQueueMicrosoftHost"`
// The endpoint URL for table storage in the primary location.
PrimaryTableEndpoint pulumi.StringOutput `pulumi:"primaryTableEndpoint"`
// The hostname with port if applicable for table storage in the primary location.
PrimaryTableHost pulumi.StringOutput `pulumi:"primaryTableHost"`
// The microsoft routing endpoint URL for table storage in the primary location.
PrimaryTableMicrosoftEndpoint pulumi.StringOutput `pulumi:"primaryTableMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for table storage in the primary location.
PrimaryTableMicrosoftHost pulumi.StringOutput `pulumi:"primaryTableMicrosoftHost"`
// The endpoint URL for web storage in the primary location.
PrimaryWebEndpoint pulumi.StringOutput `pulumi:"primaryWebEndpoint"`
// The hostname with port if applicable for web storage in the primary location.
PrimaryWebHost pulumi.StringOutput `pulumi:"primaryWebHost"`
// The internet routing endpoint URL for web storage in the primary location.
PrimaryWebInternetEndpoint pulumi.StringOutput `pulumi:"primaryWebInternetEndpoint"`
// The internet routing hostname with port if applicable for web storage in the primary location.
PrimaryWebInternetHost pulumi.StringOutput `pulumi:"primaryWebInternetHost"`
// The microsoft routing endpoint URL for web storage in the primary location.
PrimaryWebMicrosoftEndpoint pulumi.StringOutput `pulumi:"primaryWebMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for web storage in the primary location.
PrimaryWebMicrosoftHost pulumi.StringOutput `pulumi:"primaryWebMicrosoftHost"`
// Specifies the version of the **provisioned** billing model (e.g. when `accountKind = "FileStorage"` for Storage File). Possible value is `V2`. Changing this forces a new resource to be created.
ProvisionedBillingModelVersion pulumi.StringPtrOutput `pulumi:"provisionedBillingModelVersion"`
// Whether the public network access is enabled? Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The encryption type of the queue service. Possible values are `Service` and `Account`. Changing this forces a new resource to be created. Default value is `Service`.
QueueEncryptionKeyType pulumi.StringPtrOutput `pulumi:"queueEncryptionKeyType"`
// A `queueProperties` block as defined below.
//
// > **Note:** `queueProperties` can only be configured when `accountTier` is set to `Standard` and `accountKind` is set to either `Storage` or `StorageV2`.
//
// Deprecated: this block has been deprecated and superseded by the `storage.AccountQueueProperties` resource and will be removed in v5.0 of the AzureRM provider
QueueProperties AccountQueuePropertiesTypeOutput `pulumi:"queueProperties"`
// The name of the resource group in which to create the storage account. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A `routing` block as defined below.
Routing AccountRoutingOutput `pulumi:"routing"`
// A `sasPolicy` block as defined below.
SasPolicy AccountSasPolicyPtrOutput `pulumi:"sasPolicy"`
// The secondary access key for the storage account.
SecondaryAccessKey pulumi.StringOutput `pulumi:"secondaryAccessKey"`
// The connection string associated with the secondary blob location.
SecondaryBlobConnectionString pulumi.StringOutput `pulumi:"secondaryBlobConnectionString"`
// The endpoint URL for blob storage in the secondary location.
SecondaryBlobEndpoint pulumi.StringOutput `pulumi:"secondaryBlobEndpoint"`
// The hostname with port if applicable for blob storage in the secondary location.
SecondaryBlobHost pulumi.StringOutput `pulumi:"secondaryBlobHost"`
// The internet routing endpoint URL for blob storage in the secondary location.
SecondaryBlobInternetEndpoint pulumi.StringOutput `pulumi:"secondaryBlobInternetEndpoint"`
// The internet routing hostname with port if applicable for blob storage in the secondary location.
SecondaryBlobInternetHost pulumi.StringOutput `pulumi:"secondaryBlobInternetHost"`
// The microsoft routing endpoint URL for blob storage in the secondary location.
SecondaryBlobMicrosoftEndpoint pulumi.StringOutput `pulumi:"secondaryBlobMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for blob storage in the secondary location.
SecondaryBlobMicrosoftHost pulumi.StringOutput `pulumi:"secondaryBlobMicrosoftHost"`
// The connection string associated with the secondary location.
SecondaryConnectionString pulumi.StringOutput `pulumi:"secondaryConnectionString"`
// The endpoint URL for DFS storage in the secondary location.
SecondaryDfsEndpoint pulumi.StringOutput `pulumi:"secondaryDfsEndpoint"`
// The hostname with port if applicable for DFS storage in the secondary location.
SecondaryDfsHost pulumi.StringOutput `pulumi:"secondaryDfsHost"`
// The internet routing endpoint URL for DFS storage in the secondary location.
SecondaryDfsInternetEndpoint pulumi.StringOutput `pulumi:"secondaryDfsInternetEndpoint"`
// The internet routing hostname with port if applicable for DFS storage in the secondary location.
SecondaryDfsInternetHost pulumi.StringOutput `pulumi:"secondaryDfsInternetHost"`
// The microsoft routing endpoint URL for DFS storage in the secondary location.
SecondaryDfsMicrosoftEndpoint pulumi.StringOutput `pulumi:"secondaryDfsMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for DFS storage in the secondary location.
SecondaryDfsMicrosoftHost pulumi.StringOutput `pulumi:"secondaryDfsMicrosoftHost"`
// The endpoint URL for file storage in the secondary location.
SecondaryFileEndpoint pulumi.StringOutput `pulumi:"secondaryFileEndpoint"`
// The hostname with port if applicable for file storage in the secondary location.
SecondaryFileHost pulumi.StringOutput `pulumi:"secondaryFileHost"`
// The internet routing endpoint URL for file storage in the secondary location.
SecondaryFileInternetEndpoint pulumi.StringOutput `pulumi:"secondaryFileInternetEndpoint"`
// The internet routing hostname with port if applicable for file storage in the secondary location.
SecondaryFileInternetHost pulumi.StringOutput `pulumi:"secondaryFileInternetHost"`
// The microsoft routing endpoint URL for file storage in the secondary location.
SecondaryFileMicrosoftEndpoint pulumi.StringOutput `pulumi:"secondaryFileMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for file storage in the secondary location.
SecondaryFileMicrosoftHost pulumi.StringOutput `pulumi:"secondaryFileMicrosoftHost"`
// The secondary location of the storage account.
SecondaryLocation pulumi.StringOutput `pulumi:"secondaryLocation"`
// The endpoint URL for queue storage in the secondary location.
SecondaryQueueEndpoint pulumi.StringOutput `pulumi:"secondaryQueueEndpoint"`
// The hostname with port if applicable for queue storage in the secondary location.
SecondaryQueueHost pulumi.StringOutput `pulumi:"secondaryQueueHost"`
// The microsoft routing endpoint URL for queue storage in the secondary location.
SecondaryQueueMicrosoftEndpoint pulumi.StringOutput `pulumi:"secondaryQueueMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for queue storage in the secondary location.
SecondaryQueueMicrosoftHost pulumi.StringOutput `pulumi:"secondaryQueueMicrosoftHost"`
// The endpoint URL for table storage in the secondary location.
SecondaryTableEndpoint pulumi.StringOutput `pulumi:"secondaryTableEndpoint"`
// The hostname with port if applicable for table storage in the secondary location.
SecondaryTableHost pulumi.StringOutput `pulumi:"secondaryTableHost"`
// The microsoft routing endpoint URL for table storage in the secondary location.
SecondaryTableMicrosoftEndpoint pulumi.StringOutput `pulumi:"secondaryTableMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for table storage in the secondary location.
SecondaryTableMicrosoftHost pulumi.StringOutput `pulumi:"secondaryTableMicrosoftHost"`
// The endpoint URL for web storage in the secondary location.
SecondaryWebEndpoint pulumi.StringOutput `pulumi:"secondaryWebEndpoint"`
// The hostname with port if applicable for web storage in the secondary location.
SecondaryWebHost pulumi.StringOutput `pulumi:"secondaryWebHost"`
// The internet routing endpoint URL for web storage in the secondary location.
SecondaryWebInternetEndpoint pulumi.StringOutput `pulumi:"secondaryWebInternetEndpoint"`
// The internet routing hostname with port if applicable for web storage in the secondary location.
SecondaryWebInternetHost pulumi.StringOutput `pulumi:"secondaryWebInternetHost"`
// The microsoft routing endpoint URL for web storage in the secondary location.
SecondaryWebMicrosoftEndpoint pulumi.StringOutput `pulumi:"secondaryWebMicrosoftEndpoint"`
// The microsoft routing hostname with port if applicable for web storage in the secondary location.
SecondaryWebMicrosoftHost pulumi.StringOutput `pulumi:"secondaryWebMicrosoftHost"`
// Boolean, enable SFTP for the storage account
//
// > **Note:** SFTP support requires `isHnsEnabled` set to `true`. [More information on SFTP support can be found here](https://learn.microsoft.com/azure/storage/blobs/secure-file-transfer-protocol-support). Defaults to `false`
SftpEnabled pulumi.BoolPtrOutput `pulumi:"sftpEnabled"`
// A `shareProperties` block as defined below.
//
// > **Note:** `shareProperties` can only be configured when either `accountTier` is `Standard` and `accountKind` is either `Storage` or `StorageV2` - or when `accountTier` is `Premium` and `accountKind` is `FileStorage`.
ShareProperties AccountSharePropertiesOutput `pulumi:"shareProperties"`
SharedAccessKeyEnabled pulumi.BoolPtrOutput `pulumi:"sharedAccessKeyEnabled"`
// A `staticWebsite` block as defined below.
//
// > **Note:** `staticWebsite` can only be set when the `accountKind` is set to `StorageV2` or `BlockBlobStorage`.
//
// > **Note:** If `staticWebsite` is specified, the service will automatically create a `storage.Container` named `$web`.
//
// Deprecated: this block has been deprecated and superseded by the `storage.AccountStaticWebsite` resource and will be removed in v5.0 of the AzureRM provider
StaticWebsite AccountStaticWebsiteTypeOutput `pulumi:"staticWebsite"`
// The encryption type of the table service. Possible values are `Service` and `Account`. Changing this forces a new resource to be created. Default value is `Service`.
//
// > **Note:** `queueEncryptionKeyType` and `tableEncryptionKeyType` cannot be set to `Account` when `accountKind` is set `Storage`
TableEncryptionKeyType pulumi.StringPtrOutput `pulumi:"tableEncryptionKeyType"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewAccount registers a new resource with the given unique name, arguments, and options.
func NewAccount(ctx *pulumi.Context,
name string, args *AccountArgs, opts ...pulumi.ResourceOption) (*Account, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AccountReplicationType == nil {
return nil, errors.New("invalid value for required argument 'AccountReplicationType'")
}
if args.AccountTier == nil {
return nil, errors.New("invalid value for required argument 'AccountTier'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"primaryAccessKey",
"primaryBlobConnectionString",
"primaryConnectionString",
"secondaryAccessKey",
"secondaryBlobConnectionString",
"secondaryConnectionString",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Account
err := ctx.RegisterResource("azure:storage/account:Account", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAccount gets an existing Account resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAccount(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AccountState, opts ...pulumi.ResourceOption) (*Account, error) {
var resource Account
err := ctx.ReadResource("azure:storage/account:Account", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Account resources.
type accountState struct {
// Defines the access tier for `BlobStorage`, `FileStorage` and `StorageV2` accounts. Valid options are `Hot`, `Cool`, `Cold` and `Premium`. Defaults to `Hot`.
AccessTier *string `pulumi:"accessTier"`
// Defines the Kind of account. Valid options are `BlobStorage`, `BlockBlobStorage`, `FileStorage`, `Storage` and `StorageV2`. Defaults to `StorageV2`.
//
// > **Note:** Changing the `accountKind` value from `Storage` to `StorageV2` will not trigger a force new on the storage account, it will only upgrade the existing storage account from `Storage` to `StorageV2` keeping the existing storage account in place.
AccountKind *string `pulumi:"accountKind"`
// Defines the type of replication to use for this storage account. Valid options are `LRS`, `GRS`, `RAGRS`, `ZRS`, `GZRS` and `RAGZRS`. Changing this forces a new resource to be created when types `LRS`, `GRS` and `RAGRS` are changed to `ZRS`, `GZRS` or `RAGZRS` and vice versa.
AccountReplicationType *string `pulumi:"accountReplicationType"`
// Defines the Tier to use for this storage account. Valid options are `Standard` and `Premium`. For `BlockBlobStorage` and `FileStorage` accounts only `Premium` is valid. Changing this forces a new resource to be created.
//
// > **Note:** Blobs with a tier of `Premium` are of account kind `StorageV2`.
AccountTier *string `pulumi:"accountTier"`
// Allow or disallow nested items within this Account to opt into being public. Defaults to `true`.
//
// > **Note:** At this time `allowNestedItemsToBePublic` is only supported in the Public Cloud, China Cloud, and US Government Cloud.
AllowNestedItemsToBePublic *bool `pulumi:"allowNestedItemsToBePublic"`
// Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. Possible values are `AAD` and `PrivateLink`.
AllowedCopyScope *string `pulumi:"allowedCopyScope"`
// A `azureFilesAuthentication` block as defined below.
AzureFilesAuthentication *AccountAzureFilesAuthentication `pulumi:"azureFilesAuthentication"`
// A `blobProperties` block as defined below.
BlobProperties *AccountBlobProperties `pulumi:"blobProperties"`
// Should cross Tenant replication be enabled? Defaults to `false`.
CrossTenantReplicationEnabled *bool `pulumi:"crossTenantReplicationEnabled"`
// A `customDomain` block as documented below.
CustomDomain *AccountCustomDomain `pulumi:"customDomain"`
// A `customerManagedKey` block as documented below.
//
// > **Note:** It's possible to define a Customer Managed Key both within either the `customerManagedKey` block or by using the `storage.CustomerManagedKey` resource. However, it's not possible to use both methods to manage a Customer Managed Key for a Storage Account, since these will conflict. When using the `storage.CustomerManagedKey` resource, you will need to use `ignoreChanges` on the `customerManagedKey` block.
CustomerManagedKey *AccountCustomerManagedKey `pulumi:"customerManagedKey"`
// Default to Azure Active Directory authorization in the Azure portal when accessing the Storage Account. The default value is `false`
DefaultToOauthAuthentication *bool `pulumi:"defaultToOauthAuthentication"`
// Specifies which DNS endpoint type to use. Possible values are `Standard` and `AzureDnsZone`. Defaults to `Standard`. Changing this forces a new resource to be created.
//
// > **Note:** Azure DNS zone support requires `PartitionedDns` feature to be enabled. To enable this feature for your subscription, use the following command: `az feature register --namespace "Microsoft.Storage" --name "PartitionedDns"`.
DnsEndpointType *string `pulumi:"dnsEndpointType"`
// Specifies the Edge Zone within the Azure Region where this Storage Account should exist. Changing this forces a new Storage Account to be created.
EdgeZone *string `pulumi:"edgeZone"`
// Boolean flag which forces HTTPS if enabled, see [here](https://docs.microsoft.com/azure/storage/storage-require-secure-transfer/) for more information. Defaults to `true`.
HttpsTrafficOnlyEnabled *bool `pulumi:"httpsTrafficOnlyEnabled"`
// An `identity` block as defined below.
Identity *AccountIdentity `pulumi:"identity"`
// An `immutabilityPolicy` block as defined below. Changing this forces a new resource to be created.
ImmutabilityPolicy *AccountImmutabilityPolicy `pulumi:"immutabilityPolicy"`
| 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/storage/accountStaticWebsite.go | sdk/go/azure/storage/accountStaticWebsite.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the Static Website of an Azure Storage Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
// Name: pulumi.String("storageaccountname"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("GRS"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("staging"),
// },
// })
// if err != nil {
// return err
// }
// _, err = storage.NewAccountStaticWebsite(ctx, "example", &storage.AccountStaticWebsiteArgs{
// StorageAccountId: exampleAccount.ID(),
// Error404Document: pulumi.String("custom_not_found.html"),
// IndexDocument: pulumi.String("custom_index.html"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Storage Account Static Websites can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/accountStaticWebsite:AccountStaticWebsite mysite /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount
// ```
type AccountStaticWebsite struct {
pulumi.CustomResourceState
// The absolute path to a custom webpage that should be used when a request is made which does not correspond to an existing file.
Error404Document pulumi.StringPtrOutput `pulumi:"error404Document"`
// The webpage that Azure Storage serves for requests to the root of a website or any subfolder. For example, index.html.
IndexDocument pulumi.StringPtrOutput `pulumi:"indexDocument"`
// The ID of the Storage Account to set Static Website on. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
}
// NewAccountStaticWebsite registers a new resource with the given unique name, arguments, and options.
func NewAccountStaticWebsite(ctx *pulumi.Context,
name string, args *AccountStaticWebsiteArgs, opts ...pulumi.ResourceOption) (*AccountStaticWebsite, 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 AccountStaticWebsite
err := ctx.RegisterResource("azure:storage/accountStaticWebsite:AccountStaticWebsite", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAccountStaticWebsite gets an existing AccountStaticWebsite resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAccountStaticWebsite(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AccountStaticWebsiteState, opts ...pulumi.ResourceOption) (*AccountStaticWebsite, error) {
var resource AccountStaticWebsite
err := ctx.ReadResource("azure:storage/accountStaticWebsite:AccountStaticWebsite", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AccountStaticWebsite resources.
type accountStaticWebsiteState struct {
// The absolute path to a custom webpage that should be used when a request is made which does not correspond to an existing file.
Error404Document *string `pulumi:"error404Document"`
// The webpage that Azure Storage serves for requests to the root of a website or any subfolder. For example, index.html.
IndexDocument *string `pulumi:"indexDocument"`
// The ID of the Storage Account to set Static Website on. Changing this forces a new resource to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
}
type AccountStaticWebsiteState struct {
// The absolute path to a custom webpage that should be used when a request is made which does not correspond to an existing file.
Error404Document pulumi.StringPtrInput
// The webpage that Azure Storage serves for requests to the root of a website or any subfolder. For example, index.html.
IndexDocument pulumi.StringPtrInput
// The ID of the Storage Account to set Static Website on. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringPtrInput
}
func (AccountStaticWebsiteState) ElementType() reflect.Type {
return reflect.TypeOf((*accountStaticWebsiteState)(nil)).Elem()
}
type accountStaticWebsiteArgs struct {
// The absolute path to a custom webpage that should be used when a request is made which does not correspond to an existing file.
Error404Document *string `pulumi:"error404Document"`
// The webpage that Azure Storage serves for requests to the root of a website or any subfolder. For example, index.html.
IndexDocument *string `pulumi:"indexDocument"`
// The ID of the Storage Account to set Static Website on. Changing this forces a new resource to be created.
StorageAccountId string `pulumi:"storageAccountId"`
}
// The set of arguments for constructing a AccountStaticWebsite resource.
type AccountStaticWebsiteArgs struct {
// The absolute path to a custom webpage that should be used when a request is made which does not correspond to an existing file.
Error404Document pulumi.StringPtrInput
// The webpage that Azure Storage serves for requests to the root of a website or any subfolder. For example, index.html.
IndexDocument pulumi.StringPtrInput
// The ID of the Storage Account to set Static Website on. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringInput
}
func (AccountStaticWebsiteArgs) ElementType() reflect.Type {
return reflect.TypeOf((*accountStaticWebsiteArgs)(nil)).Elem()
}
type AccountStaticWebsiteInput interface {
pulumi.Input
ToAccountStaticWebsiteOutput() AccountStaticWebsiteOutput
ToAccountStaticWebsiteOutputWithContext(ctx context.Context) AccountStaticWebsiteOutput
}
func (*AccountStaticWebsite) ElementType() reflect.Type {
return reflect.TypeOf((**AccountStaticWebsite)(nil)).Elem()
}
func (i *AccountStaticWebsite) ToAccountStaticWebsiteOutput() AccountStaticWebsiteOutput {
return i.ToAccountStaticWebsiteOutputWithContext(context.Background())
}
func (i *AccountStaticWebsite) ToAccountStaticWebsiteOutputWithContext(ctx context.Context) AccountStaticWebsiteOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountStaticWebsiteOutput)
}
// AccountStaticWebsiteArrayInput is an input type that accepts AccountStaticWebsiteArray and AccountStaticWebsiteArrayOutput values.
// You can construct a concrete instance of `AccountStaticWebsiteArrayInput` via:
//
// AccountStaticWebsiteArray{ AccountStaticWebsiteArgs{...} }
type AccountStaticWebsiteArrayInput interface {
pulumi.Input
ToAccountStaticWebsiteArrayOutput() AccountStaticWebsiteArrayOutput
ToAccountStaticWebsiteArrayOutputWithContext(context.Context) AccountStaticWebsiteArrayOutput
}
type AccountStaticWebsiteArray []AccountStaticWebsiteInput
func (AccountStaticWebsiteArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountStaticWebsite)(nil)).Elem()
}
func (i AccountStaticWebsiteArray) ToAccountStaticWebsiteArrayOutput() AccountStaticWebsiteArrayOutput {
return i.ToAccountStaticWebsiteArrayOutputWithContext(context.Background())
}
func (i AccountStaticWebsiteArray) ToAccountStaticWebsiteArrayOutputWithContext(ctx context.Context) AccountStaticWebsiteArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountStaticWebsiteArrayOutput)
}
// AccountStaticWebsiteMapInput is an input type that accepts AccountStaticWebsiteMap and AccountStaticWebsiteMapOutput values.
// You can construct a concrete instance of `AccountStaticWebsiteMapInput` via:
//
// AccountStaticWebsiteMap{ "key": AccountStaticWebsiteArgs{...} }
type AccountStaticWebsiteMapInput interface {
pulumi.Input
ToAccountStaticWebsiteMapOutput() AccountStaticWebsiteMapOutput
ToAccountStaticWebsiteMapOutputWithContext(context.Context) AccountStaticWebsiteMapOutput
}
type AccountStaticWebsiteMap map[string]AccountStaticWebsiteInput
func (AccountStaticWebsiteMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountStaticWebsite)(nil)).Elem()
}
func (i AccountStaticWebsiteMap) ToAccountStaticWebsiteMapOutput() AccountStaticWebsiteMapOutput {
return i.ToAccountStaticWebsiteMapOutputWithContext(context.Background())
}
func (i AccountStaticWebsiteMap) ToAccountStaticWebsiteMapOutputWithContext(ctx context.Context) AccountStaticWebsiteMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountStaticWebsiteMapOutput)
}
type AccountStaticWebsiteOutput struct{ *pulumi.OutputState }
func (AccountStaticWebsiteOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountStaticWebsite)(nil)).Elem()
}
func (o AccountStaticWebsiteOutput) ToAccountStaticWebsiteOutput() AccountStaticWebsiteOutput {
return o
}
func (o AccountStaticWebsiteOutput) ToAccountStaticWebsiteOutputWithContext(ctx context.Context) AccountStaticWebsiteOutput {
return o
}
// The absolute path to a custom webpage that should be used when a request is made which does not correspond to an existing file.
func (o AccountStaticWebsiteOutput) Error404Document() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountStaticWebsite) pulumi.StringPtrOutput { return v.Error404Document }).(pulumi.StringPtrOutput)
}
// The webpage that Azure Storage serves for requests to the root of a website or any subfolder. For example, index.html.
func (o AccountStaticWebsiteOutput) IndexDocument() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccountStaticWebsite) pulumi.StringPtrOutput { return v.IndexDocument }).(pulumi.StringPtrOutput)
}
// The ID of the Storage Account to set Static Website on. Changing this forces a new resource to be created.
func (o AccountStaticWebsiteOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *AccountStaticWebsite) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
type AccountStaticWebsiteArrayOutput struct{ *pulumi.OutputState }
func (AccountStaticWebsiteArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountStaticWebsite)(nil)).Elem()
}
func (o AccountStaticWebsiteArrayOutput) ToAccountStaticWebsiteArrayOutput() AccountStaticWebsiteArrayOutput {
return o
}
func (o AccountStaticWebsiteArrayOutput) ToAccountStaticWebsiteArrayOutputWithContext(ctx context.Context) AccountStaticWebsiteArrayOutput {
return o
}
func (o AccountStaticWebsiteArrayOutput) Index(i pulumi.IntInput) AccountStaticWebsiteOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AccountStaticWebsite {
return vs[0].([]*AccountStaticWebsite)[vs[1].(int)]
}).(AccountStaticWebsiteOutput)
}
type AccountStaticWebsiteMapOutput struct{ *pulumi.OutputState }
func (AccountStaticWebsiteMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountStaticWebsite)(nil)).Elem()
}
func (o AccountStaticWebsiteMapOutput) ToAccountStaticWebsiteMapOutput() AccountStaticWebsiteMapOutput {
return o
}
func (o AccountStaticWebsiteMapOutput) ToAccountStaticWebsiteMapOutputWithContext(ctx context.Context) AccountStaticWebsiteMapOutput {
return o
}
func (o AccountStaticWebsiteMapOutput) MapIndex(k pulumi.StringInput) AccountStaticWebsiteOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AccountStaticWebsite {
return vs[0].(map[string]*AccountStaticWebsite)[vs[1].(string)]
}).(AccountStaticWebsiteOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccountStaticWebsiteInput)(nil)).Elem(), &AccountStaticWebsite{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountStaticWebsiteArrayInput)(nil)).Elem(), AccountStaticWebsiteArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountStaticWebsiteMapInput)(nil)).Elem(), AccountStaticWebsiteMap{})
pulumi.RegisterOutputType(AccountStaticWebsiteOutput{})
pulumi.RegisterOutputType(AccountStaticWebsiteArrayOutput{})
pulumi.RegisterOutputType(AccountStaticWebsiteMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/getTableEntity.go | sdk/go/azure/storage/getTableEntity.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
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 Storage Table Entity.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "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 {
// _, err := storage.LookupTableEntity(ctx, &storage.LookupTableEntityArgs{
// StorageTableId: exampleAzurermStorageTable.Id,
// PartitionKey: "example-partition-key",
// RowKey: "example-row-key",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupTableEntity(ctx *pulumi.Context, args *LookupTableEntityArgs, opts ...pulumi.InvokeOption) (*LookupTableEntityResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupTableEntityResult
err := ctx.Invoke("azure:storage/getTableEntity:getTableEntity", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getTableEntity.
type LookupTableEntityArgs struct {
// The key for the partition where the entity will be retrieved.
PartitionKey string `pulumi:"partitionKey"`
// The key for the row where the entity will be retrieved.
RowKey string `pulumi:"rowKey"`
// The Storage Table ID where the entity exists.
StorageTableId string `pulumi:"storageTableId"`
}
// A collection of values returned by getTableEntity.
type LookupTableEntityResult struct {
// A map of key/value pairs that describe the entity to be stored in the storage table.
Entity map[string]string `pulumi:"entity"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
PartitionKey string `pulumi:"partitionKey"`
RowKey string `pulumi:"rowKey"`
StorageTableId string `pulumi:"storageTableId"`
}
func LookupTableEntityOutput(ctx *pulumi.Context, args LookupTableEntityOutputArgs, opts ...pulumi.InvokeOption) LookupTableEntityResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupTableEntityResultOutput, error) {
args := v.(LookupTableEntityArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:storage/getTableEntity:getTableEntity", args, LookupTableEntityResultOutput{}, options).(LookupTableEntityResultOutput), nil
}).(LookupTableEntityResultOutput)
}
// A collection of arguments for invoking getTableEntity.
type LookupTableEntityOutputArgs struct {
// The key for the partition where the entity will be retrieved.
PartitionKey pulumi.StringInput `pulumi:"partitionKey"`
// The key for the row where the entity will be retrieved.
RowKey pulumi.StringInput `pulumi:"rowKey"`
// The Storage Table ID where the entity exists.
StorageTableId pulumi.StringInput `pulumi:"storageTableId"`
}
func (LookupTableEntityOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTableEntityArgs)(nil)).Elem()
}
// A collection of values returned by getTableEntity.
type LookupTableEntityResultOutput struct{ *pulumi.OutputState }
func (LookupTableEntityResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTableEntityResult)(nil)).Elem()
}
func (o LookupTableEntityResultOutput) ToLookupTableEntityResultOutput() LookupTableEntityResultOutput {
return o
}
func (o LookupTableEntityResultOutput) ToLookupTableEntityResultOutputWithContext(ctx context.Context) LookupTableEntityResultOutput {
return o
}
// A map of key/value pairs that describe the entity to be stored in the storage table.
func (o LookupTableEntityResultOutput) Entity() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupTableEntityResult) map[string]string { return v.Entity }).(pulumi.StringMapOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupTableEntityResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupTableEntityResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupTableEntityResultOutput) PartitionKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupTableEntityResult) string { return v.PartitionKey }).(pulumi.StringOutput)
}
func (o LookupTableEntityResultOutput) RowKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupTableEntityResult) string { return v.RowKey }).(pulumi.StringOutput)
}
func (o LookupTableEntityResultOutput) StorageTableId() pulumi.StringOutput {
return o.ApplyT(func(v LookupTableEntityResult) string { return v.StorageTableId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupTableEntityResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/blob.go | sdk/go/azure/storage/blob.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Blob within a Storage Container.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/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("examplestoracc"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
// Name: pulumi.String("content"),
// StorageAccountId: exampleAccount.ID(),
// ContainerAccessType: pulumi.String("private"),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewBlob(ctx, "example", &storage.BlobArgs{
// Name: pulumi.String("my-awesome-content.zip"),
// StorageAccountName: exampleAccount.Name,
// StorageContainerName: exampleContainer.Name,
// Type: pulumi.String("Block"),
// Source: pulumi.NewFileAsset("some-local-file.zip"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Storage Blob's can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/blob:Blob blob1 https://example.blob.core.windows.net/container/blob.vhd
// ```
type Blob struct {
pulumi.CustomResourceState
// The access tier of the storage blob. Possible values are `Archive`, `Cool` and `Hot`.
AccessTier pulumi.StringOutput `pulumi:"accessTier"`
// Controls the [cache control header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) content of the response when blob is requested .
CacheControl pulumi.StringPtrOutput `pulumi:"cacheControl"`
// The MD5 sum of the blob contents. Cannot be defined if `sourceUri` is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.
ContentMd5 pulumi.StringPtrOutput `pulumi:"contentMd5"`
// The content type of the storage blob. Cannot be defined if `sourceUri` is defined. Defaults to `application/octet-stream`.
ContentType pulumi.StringPtrOutput `pulumi:"contentType"`
// The encryption scope to use for this blob.
EncryptionScope pulumi.StringPtrOutput `pulumi:"encryptionScope"`
// A map of custom blob metadata.
Metadata pulumi.StringMapOutput `pulumi:"metadata"`
// The name of the storage blob. Must be unique within the storage container the blob is located. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The number of workers per CPU core to run for concurrent uploads. Defaults to `8`. Changing this forces a new resource to be created.
//
// > **NOTE:** `parallelism` is only applicable for Page blobs - support for [Block Blobs is blocked on the upstream issue](https://github.com/jackofallops/giovanni/issues/15).
Parallelism pulumi.IntPtrOutput `pulumi:"parallelism"`
// Used only for `page` blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to `0`. Changing this forces a new resource to be created.
//
// > **Note:** `size` is required if `sourceUri` is not set.
Size pulumi.IntPtrOutput `pulumi:"size"`
// An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if `sourceContent` or `sourceUri` is specified. Changing this forces a new resource to be created.
Source pulumi.AssetOrArchiveOutput `pulumi:"source"`
// The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if `source` or `sourceUri` is specified. Changing this forces a new resource to be created.
SourceContent pulumi.StringPtrOutput `pulumi:"sourceContent"`
// The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if `source` or `sourceContent` is specified.
SourceUri pulumi.StringPtrOutput `pulumi:"sourceUri"`
// Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.
StorageAccountName pulumi.StringOutput `pulumi:"storageAccountName"`
// The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
StorageContainerName pulumi.StringOutput `pulumi:"storageContainerName"`
// The type of the storage blob to be created. Possible values are `Append`, `Block` or `Page`. Changing this forces a new resource to be created.
Type pulumi.StringOutput `pulumi:"type"`
// The URL of the blob
Url pulumi.StringOutput `pulumi:"url"`
}
// NewBlob registers a new resource with the given unique name, arguments, and options.
func NewBlob(ctx *pulumi.Context,
name string, args *BlobArgs, opts ...pulumi.ResourceOption) (*Blob, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.StorageAccountName == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountName'")
}
if args.StorageContainerName == nil {
return nil, errors.New("invalid value for required argument 'StorageContainerName'")
}
if args.Type == nil {
return nil, errors.New("invalid value for required argument 'Type'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Blob
err := ctx.RegisterResource("azure:storage/blob:Blob", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetBlob gets an existing Blob resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetBlob(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *BlobState, opts ...pulumi.ResourceOption) (*Blob, error) {
var resource Blob
err := ctx.ReadResource("azure:storage/blob:Blob", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Blob resources.
type blobState struct {
// The access tier of the storage blob. Possible values are `Archive`, `Cool` and `Hot`.
AccessTier *string `pulumi:"accessTier"`
// Controls the [cache control header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) content of the response when blob is requested .
CacheControl *string `pulumi:"cacheControl"`
// The MD5 sum of the blob contents. Cannot be defined if `sourceUri` is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.
ContentMd5 *string `pulumi:"contentMd5"`
// The content type of the storage blob. Cannot be defined if `sourceUri` is defined. Defaults to `application/octet-stream`.
ContentType *string `pulumi:"contentType"`
// The encryption scope to use for this blob.
EncryptionScope *string `pulumi:"encryptionScope"`
// A map of custom blob metadata.
Metadata map[string]string `pulumi:"metadata"`
// The name of the storage blob. Must be unique within the storage container the blob is located. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The number of workers per CPU core to run for concurrent uploads. Defaults to `8`. Changing this forces a new resource to be created.
//
// > **NOTE:** `parallelism` is only applicable for Page blobs - support for [Block Blobs is blocked on the upstream issue](https://github.com/jackofallops/giovanni/issues/15).
Parallelism *int `pulumi:"parallelism"`
// Used only for `page` blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to `0`. Changing this forces a new resource to be created.
//
// > **Note:** `size` is required if `sourceUri` is not set.
Size *int `pulumi:"size"`
// An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if `sourceContent` or `sourceUri` is specified. Changing this forces a new resource to be created.
Source pulumi.AssetOrArchive `pulumi:"source"`
// The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if `source` or `sourceUri` is specified. Changing this forces a new resource to be created.
SourceContent *string `pulumi:"sourceContent"`
// The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if `source` or `sourceContent` is specified.
SourceUri *string `pulumi:"sourceUri"`
// Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.
StorageAccountName *string `pulumi:"storageAccountName"`
// The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
StorageContainerName *string `pulumi:"storageContainerName"`
// The type of the storage blob to be created. Possible values are `Append`, `Block` or `Page`. Changing this forces a new resource to be created.
Type *string `pulumi:"type"`
// The URL of the blob
Url *string `pulumi:"url"`
}
type BlobState struct {
// The access tier of the storage blob. Possible values are `Archive`, `Cool` and `Hot`.
AccessTier pulumi.StringPtrInput
// Controls the [cache control header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) content of the response when blob is requested .
CacheControl pulumi.StringPtrInput
// The MD5 sum of the blob contents. Cannot be defined if `sourceUri` is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.
ContentMd5 pulumi.StringPtrInput
// The content type of the storage blob. Cannot be defined if `sourceUri` is defined. Defaults to `application/octet-stream`.
ContentType pulumi.StringPtrInput
// The encryption scope to use for this blob.
EncryptionScope pulumi.StringPtrInput
// A map of custom blob metadata.
Metadata pulumi.StringMapInput
// The name of the storage blob. Must be unique within the storage container the blob is located. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The number of workers per CPU core to run for concurrent uploads. Defaults to `8`. Changing this forces a new resource to be created.
//
// > **NOTE:** `parallelism` is only applicable for Page blobs - support for [Block Blobs is blocked on the upstream issue](https://github.com/jackofallops/giovanni/issues/15).
Parallelism pulumi.IntPtrInput
// Used only for `page` blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to `0`. Changing this forces a new resource to be created.
//
// > **Note:** `size` is required if `sourceUri` is not set.
Size pulumi.IntPtrInput
// An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if `sourceContent` or `sourceUri` is specified. Changing this forces a new resource to be created.
Source pulumi.AssetOrArchiveInput
// The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if `source` or `sourceUri` is specified. Changing this forces a new resource to be created.
SourceContent pulumi.StringPtrInput
// The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if `source` or `sourceContent` is specified.
SourceUri pulumi.StringPtrInput
// Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.
StorageAccountName pulumi.StringPtrInput
// The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
StorageContainerName pulumi.StringPtrInput
// The type of the storage blob to be created. Possible values are `Append`, `Block` or `Page`. Changing this forces a new resource to be created.
Type pulumi.StringPtrInput
// The URL of the blob
Url pulumi.StringPtrInput
}
func (BlobState) ElementType() reflect.Type {
return reflect.TypeOf((*blobState)(nil)).Elem()
}
type blobArgs struct {
// The access tier of the storage blob. Possible values are `Archive`, `Cool` and `Hot`.
AccessTier *string `pulumi:"accessTier"`
// Controls the [cache control header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) content of the response when blob is requested .
CacheControl *string `pulumi:"cacheControl"`
// The MD5 sum of the blob contents. Cannot be defined if `sourceUri` is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.
ContentMd5 *string `pulumi:"contentMd5"`
// The content type of the storage blob. Cannot be defined if `sourceUri` is defined. Defaults to `application/octet-stream`.
ContentType *string `pulumi:"contentType"`
// The encryption scope to use for this blob.
EncryptionScope *string `pulumi:"encryptionScope"`
// A map of custom blob metadata.
Metadata map[string]string `pulumi:"metadata"`
// The name of the storage blob. Must be unique within the storage container the blob is located. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The number of workers per CPU core to run for concurrent uploads. Defaults to `8`. Changing this forces a new resource to be created.
//
// > **NOTE:** `parallelism` is only applicable for Page blobs - support for [Block Blobs is blocked on the upstream issue](https://github.com/jackofallops/giovanni/issues/15).
Parallelism *int `pulumi:"parallelism"`
// Used only for `page` blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to `0`. Changing this forces a new resource to be created.
//
// > **Note:** `size` is required if `sourceUri` is not set.
Size *int `pulumi:"size"`
// An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if `sourceContent` or `sourceUri` is specified. Changing this forces a new resource to be created.
Source pulumi.AssetOrArchive `pulumi:"source"`
// The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if `source` or `sourceUri` is specified. Changing this forces a new resource to be created.
SourceContent *string `pulumi:"sourceContent"`
// The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if `source` or `sourceContent` is specified.
SourceUri *string `pulumi:"sourceUri"`
// Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.
StorageAccountName string `pulumi:"storageAccountName"`
// The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
StorageContainerName string `pulumi:"storageContainerName"`
// The type of the storage blob to be created. Possible values are `Append`, `Block` or `Page`. Changing this forces a new resource to be created.
Type string `pulumi:"type"`
}
// The set of arguments for constructing a Blob resource.
type BlobArgs struct {
// The access tier of the storage blob. Possible values are `Archive`, `Cool` and `Hot`.
AccessTier pulumi.StringPtrInput
// Controls the [cache control header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) content of the response when blob is requested .
CacheControl pulumi.StringPtrInput
// The MD5 sum of the blob contents. Cannot be defined if `sourceUri` is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.
ContentMd5 pulumi.StringPtrInput
// The content type of the storage blob. Cannot be defined if `sourceUri` is defined. Defaults to `application/octet-stream`.
ContentType pulumi.StringPtrInput
// The encryption scope to use for this blob.
EncryptionScope pulumi.StringPtrInput
// A map of custom blob metadata.
Metadata pulumi.StringMapInput
// The name of the storage blob. Must be unique within the storage container the blob is located. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The number of workers per CPU core to run for concurrent uploads. Defaults to `8`. Changing this forces a new resource to be created.
//
// > **NOTE:** `parallelism` is only applicable for Page blobs - support for [Block Blobs is blocked on the upstream issue](https://github.com/jackofallops/giovanni/issues/15).
Parallelism pulumi.IntPtrInput
// Used only for `page` blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to `0`. Changing this forces a new resource to be created.
//
// > **Note:** `size` is required if `sourceUri` is not set.
Size pulumi.IntPtrInput
// An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if `sourceContent` or `sourceUri` is specified. Changing this forces a new resource to be created.
Source pulumi.AssetOrArchiveInput
// The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if `source` or `sourceUri` is specified. Changing this forces a new resource to be created.
SourceContent pulumi.StringPtrInput
// The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if `source` or `sourceContent` is specified.
SourceUri pulumi.StringPtrInput
// Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.
StorageAccountName pulumi.StringInput
// The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
StorageContainerName pulumi.StringInput
// The type of the storage blob to be created. Possible values are `Append`, `Block` or `Page`. Changing this forces a new resource to be created.
Type pulumi.StringInput
}
func (BlobArgs) ElementType() reflect.Type {
return reflect.TypeOf((*blobArgs)(nil)).Elem()
}
type BlobInput interface {
pulumi.Input
ToBlobOutput() BlobOutput
ToBlobOutputWithContext(ctx context.Context) BlobOutput
}
func (*Blob) ElementType() reflect.Type {
return reflect.TypeOf((**Blob)(nil)).Elem()
}
func (i *Blob) ToBlobOutput() BlobOutput {
return i.ToBlobOutputWithContext(context.Background())
}
func (i *Blob) ToBlobOutputWithContext(ctx context.Context) BlobOutput {
return pulumi.ToOutputWithContext(ctx, i).(BlobOutput)
}
// BlobArrayInput is an input type that accepts BlobArray and BlobArrayOutput values.
// You can construct a concrete instance of `BlobArrayInput` via:
//
// BlobArray{ BlobArgs{...} }
type BlobArrayInput interface {
pulumi.Input
ToBlobArrayOutput() BlobArrayOutput
ToBlobArrayOutputWithContext(context.Context) BlobArrayOutput
}
type BlobArray []BlobInput
func (BlobArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Blob)(nil)).Elem()
}
func (i BlobArray) ToBlobArrayOutput() BlobArrayOutput {
return i.ToBlobArrayOutputWithContext(context.Background())
}
func (i BlobArray) ToBlobArrayOutputWithContext(ctx context.Context) BlobArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(BlobArrayOutput)
}
// BlobMapInput is an input type that accepts BlobMap and BlobMapOutput values.
// You can construct a concrete instance of `BlobMapInput` via:
//
// BlobMap{ "key": BlobArgs{...} }
type BlobMapInput interface {
pulumi.Input
ToBlobMapOutput() BlobMapOutput
ToBlobMapOutputWithContext(context.Context) BlobMapOutput
}
type BlobMap map[string]BlobInput
func (BlobMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Blob)(nil)).Elem()
}
func (i BlobMap) ToBlobMapOutput() BlobMapOutput {
return i.ToBlobMapOutputWithContext(context.Background())
}
func (i BlobMap) ToBlobMapOutputWithContext(ctx context.Context) BlobMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(BlobMapOutput)
}
type BlobOutput struct{ *pulumi.OutputState }
func (BlobOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Blob)(nil)).Elem()
}
func (o BlobOutput) ToBlobOutput() BlobOutput {
return o
}
func (o BlobOutput) ToBlobOutputWithContext(ctx context.Context) BlobOutput {
return o
}
// The access tier of the storage blob. Possible values are `Archive`, `Cool` and `Hot`.
func (o BlobOutput) AccessTier() pulumi.StringOutput {
return o.ApplyT(func(v *Blob) pulumi.StringOutput { return v.AccessTier }).(pulumi.StringOutput)
}
// Controls the [cache control header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) content of the response when blob is requested .
func (o BlobOutput) CacheControl() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Blob) pulumi.StringPtrOutput { return v.CacheControl }).(pulumi.StringPtrOutput)
}
// The MD5 sum of the blob contents. Cannot be defined if `sourceUri` is defined, or if blob type is Append or Page. Changing this forces a new resource to be created.
func (o BlobOutput) ContentMd5() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Blob) pulumi.StringPtrOutput { return v.ContentMd5 }).(pulumi.StringPtrOutput)
}
// The content type of the storage blob. Cannot be defined if `sourceUri` is defined. Defaults to `application/octet-stream`.
func (o BlobOutput) ContentType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Blob) pulumi.StringPtrOutput { return v.ContentType }).(pulumi.StringPtrOutput)
}
// The encryption scope to use for this blob.
func (o BlobOutput) EncryptionScope() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Blob) pulumi.StringPtrOutput { return v.EncryptionScope }).(pulumi.StringPtrOutput)
}
// A map of custom blob metadata.
func (o BlobOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v *Blob) pulumi.StringMapOutput { return v.Metadata }).(pulumi.StringMapOutput)
}
// The name of the storage blob. Must be unique within the storage container the blob is located. Changing this forces a new resource to be created.
func (o BlobOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Blob) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The number of workers per CPU core to run for concurrent uploads. Defaults to `8`. Changing this forces a new resource to be created.
//
// > **NOTE:** `parallelism` is only applicable for Page blobs - support for [Block Blobs is blocked on the upstream issue](https://github.com/jackofallops/giovanni/issues/15).
func (o BlobOutput) Parallelism() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Blob) pulumi.IntPtrOutput { return v.Parallelism }).(pulumi.IntPtrOutput)
}
// Used only for `page` blobs to specify the size in bytes of the blob to be created. Must be a multiple of 512. Defaults to `0`. Changing this forces a new resource to be created.
//
// > **Note:** `size` is required if `sourceUri` is not set.
func (o BlobOutput) Size() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Blob) pulumi.IntPtrOutput { return v.Size }).(pulumi.IntPtrOutput)
}
// An absolute path to a file on the local system. This field cannot be specified for Append blobs and cannot be specified if `sourceContent` or `sourceUri` is specified. Changing this forces a new resource to be created.
func (o BlobOutput) Source() pulumi.AssetOrArchiveOutput {
return o.ApplyT(func(v *Blob) pulumi.AssetOrArchiveOutput { return v.Source }).(pulumi.AssetOrArchiveOutput)
}
// The content for this blob which should be defined inline. This field can only be specified for Block blobs and cannot be specified if `source` or `sourceUri` is specified. Changing this forces a new resource to be created.
func (o BlobOutput) SourceContent() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Blob) pulumi.StringPtrOutput { return v.SourceContent }).(pulumi.StringPtrOutput)
}
// The URI of an existing blob, or a file in the Azure File service, to use as the source contents for the blob to be created. Changing this forces a new resource to be created. This field cannot be specified for Append blobs and cannot be specified if `source` or `sourceContent` is specified.
func (o BlobOutput) SourceUri() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Blob) pulumi.StringPtrOutput { return v.SourceUri }).(pulumi.StringPtrOutput)
}
// Specifies the storage account in which to create the storage container. Changing this forces a new resource to be created.
func (o BlobOutput) StorageAccountName() pulumi.StringOutput {
return o.ApplyT(func(v *Blob) pulumi.StringOutput { return v.StorageAccountName }).(pulumi.StringOutput)
}
// The name of the storage container in which this blob should be created. Changing this forces a new resource to be created.
func (o BlobOutput) StorageContainerName() pulumi.StringOutput {
return o.ApplyT(func(v *Blob) pulumi.StringOutput { return v.StorageContainerName }).(pulumi.StringOutput)
}
// The type of the storage blob to be created. Possible values are `Append`, `Block` or `Page`. Changing this forces a new resource to be created.
func (o BlobOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *Blob) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
// The URL of the blob
func (o BlobOutput) Url() pulumi.StringOutput {
return o.ApplyT(func(v *Blob) pulumi.StringOutput { return v.Url }).(pulumi.StringOutput)
}
type BlobArrayOutput struct{ *pulumi.OutputState }
func (BlobArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Blob)(nil)).Elem()
}
func (o BlobArrayOutput) ToBlobArrayOutput() BlobArrayOutput {
return o
}
func (o BlobArrayOutput) ToBlobArrayOutputWithContext(ctx context.Context) BlobArrayOutput {
return o
}
func (o BlobArrayOutput) Index(i pulumi.IntInput) BlobOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Blob {
return vs[0].([]*Blob)[vs[1].(int)]
}).(BlobOutput)
}
type BlobMapOutput struct{ *pulumi.OutputState }
func (BlobMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Blob)(nil)).Elem()
}
func (o BlobMapOutput) ToBlobMapOutput() BlobMapOutput {
return o
}
func (o BlobMapOutput) ToBlobMapOutputWithContext(ctx context.Context) BlobMapOutput {
return o
}
func (o BlobMapOutput) MapIndex(k pulumi.StringInput) BlobOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Blob {
return vs[0].(map[string]*Blob)[vs[1].(string)]
}).(BlobOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*BlobInput)(nil)).Elem(), &Blob{})
pulumi.RegisterInputType(reflect.TypeOf((*BlobArrayInput)(nil)).Elem(), BlobArray{})
pulumi.RegisterInputType(reflect.TypeOf((*BlobMapInput)(nil)).Elem(), BlobMap{})
pulumi.RegisterOutputType(BlobOutput{})
pulumi.RegisterOutputType(BlobArrayOutput{})
pulumi.RegisterOutputType(BlobMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/accountNetworkRules.go | sdk/go/azure/storage/accountNetworkRules.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package storage
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages network rules inside of a Azure Storage Account.
//
// > **Note:** Network Rules can be defined either directly on the `storage.Account` resource, or using the `storage.AccountNetworkRules` resource - but the two cannot be used together. Spurious changes will occur if both are used against the same Storage Account.
//
// > **Note:** Only one `storage.AccountNetworkRules` can be tied to an `storage.Account`. Spurious changes will occur if more than `storage.AccountNetworkRules` is tied to the same `storage.Account`.
//
// > **Note:** Deleting this resource updates the storage account back to the default values it had when the storage account was created.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-vnet"),
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("example-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.2.0/24"),
// },
// ServiceEndpoints: pulumi.StringArray{
// pulumi.String("Microsoft.Storage"),
// },
// })
// 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"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("staging"),
// },
// })
// if err != nil {
// return err
// }
// _, err = storage.NewAccountNetworkRules(ctx, "example", &storage.AccountNetworkRulesArgs{
// StorageAccountId: exampleAccount.ID(),
// DefaultAction: pulumi.String("Allow"),
// IpRules: pulumi.StringArray{
// pulumi.String("127.0.0.1"),
// },
// VirtualNetworkSubnetIds: pulumi.StringArray{
// exampleSubnet.ID(),
// },
// Bypasses: pulumi.StringArray{
// pulumi.String("Metrics"),
// },
// })
// 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.Storage` - 2023-05-01
//
// ## Import
//
// Storage Account Network Rules can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:storage/accountNetworkRules:AccountNetworkRules storageAcc1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount
// ```
type AccountNetworkRules struct {
pulumi.CustomResourceState
// Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of `Logging`, `Metrics`, `AzureServices`, or `None`. Defaults to `["AzureServices"]`.
//
// > **Note:** User has to explicitly set `bypass` to empty slice (`[]`) to remove it.
Bypasses pulumi.StringArrayOutput `pulumi:"bypasses"`
// Specifies the default action of allow or deny when no other rules match. Valid options are `Deny` or `Allow`.
DefaultAction pulumi.StringOutput `pulumi:"defaultAction"`
// List of public IP or IP ranges in CIDR Format. Only IPv4 addresses are allowed. Private IP address ranges (as defined in [RFC 1918](https://tools.ietf.org/html/rfc1918#section-3)) are not allowed.
//
// > **Note:** Small address ranges using "/31" or "/32" prefix sizes are not supported. These ranges should be configured using individual IP address rules without prefix specified.
//
// > **Note:** IP network rules have no effect on requests originating from the same Azure region as the storage account. Use Virtual network rules to allow same-region requests. Services deployed in the same region as the storage account use private Azure IP addresses for communication. Thus, you cannot restrict access to specific Azure services based on their public outbound IP address range.
//
// > **Note:** User has to explicitly set `ipRules` to empty slice (`[]`) to remove it.
IpRules pulumi.StringArrayOutput `pulumi:"ipRules"`
// One or more `privateLinkAccess` block as defined below.
PrivateLinkAccessRules AccountNetworkRulesPrivateLinkAccessRuleArrayOutput `pulumi:"privateLinkAccessRules"`
// Specifies the ID of the storage account. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringOutput `pulumi:"storageAccountId"`
// A list of virtual network subnet ids to secure the storage account.
//
// > **Note:** User has to explicitly set `virtualNetworkSubnetIds` to empty slice (`[]`) to remove it.
VirtualNetworkSubnetIds pulumi.StringArrayOutput `pulumi:"virtualNetworkSubnetIds"`
}
// NewAccountNetworkRules registers a new resource with the given unique name, arguments, and options.
func NewAccountNetworkRules(ctx *pulumi.Context,
name string, args *AccountNetworkRulesArgs, opts ...pulumi.ResourceOption) (*AccountNetworkRules, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DefaultAction == nil {
return nil, errors.New("invalid value for required argument 'DefaultAction'")
}
if args.StorageAccountId == nil {
return nil, errors.New("invalid value for required argument 'StorageAccountId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AccountNetworkRules
err := ctx.RegisterResource("azure:storage/accountNetworkRules:AccountNetworkRules", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAccountNetworkRules gets an existing AccountNetworkRules resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetAccountNetworkRules(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AccountNetworkRulesState, opts ...pulumi.ResourceOption) (*AccountNetworkRules, error) {
var resource AccountNetworkRules
err := ctx.ReadResource("azure:storage/accountNetworkRules:AccountNetworkRules", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AccountNetworkRules resources.
type accountNetworkRulesState struct {
// Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of `Logging`, `Metrics`, `AzureServices`, or `None`. Defaults to `["AzureServices"]`.
//
// > **Note:** User has to explicitly set `bypass` to empty slice (`[]`) to remove it.
Bypasses []string `pulumi:"bypasses"`
// Specifies the default action of allow or deny when no other rules match. Valid options are `Deny` or `Allow`.
DefaultAction *string `pulumi:"defaultAction"`
// List of public IP or IP ranges in CIDR Format. Only IPv4 addresses are allowed. Private IP address ranges (as defined in [RFC 1918](https://tools.ietf.org/html/rfc1918#section-3)) are not allowed.
//
// > **Note:** Small address ranges using "/31" or "/32" prefix sizes are not supported. These ranges should be configured using individual IP address rules without prefix specified.
//
// > **Note:** IP network rules have no effect on requests originating from the same Azure region as the storage account. Use Virtual network rules to allow same-region requests. Services deployed in the same region as the storage account use private Azure IP addresses for communication. Thus, you cannot restrict access to specific Azure services based on their public outbound IP address range.
//
// > **Note:** User has to explicitly set `ipRules` to empty slice (`[]`) to remove it.
IpRules []string `pulumi:"ipRules"`
// One or more `privateLinkAccess` block as defined below.
PrivateLinkAccessRules []AccountNetworkRulesPrivateLinkAccessRule `pulumi:"privateLinkAccessRules"`
// Specifies the ID of the storage account. Changing this forces a new resource to be created.
StorageAccountId *string `pulumi:"storageAccountId"`
// A list of virtual network subnet ids to secure the storage account.
//
// > **Note:** User has to explicitly set `virtualNetworkSubnetIds` to empty slice (`[]`) to remove it.
VirtualNetworkSubnetIds []string `pulumi:"virtualNetworkSubnetIds"`
}
type AccountNetworkRulesState struct {
// Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of `Logging`, `Metrics`, `AzureServices`, or `None`. Defaults to `["AzureServices"]`.
//
// > **Note:** User has to explicitly set `bypass` to empty slice (`[]`) to remove it.
Bypasses pulumi.StringArrayInput
// Specifies the default action of allow or deny when no other rules match. Valid options are `Deny` or `Allow`.
DefaultAction pulumi.StringPtrInput
// List of public IP or IP ranges in CIDR Format. Only IPv4 addresses are allowed. Private IP address ranges (as defined in [RFC 1918](https://tools.ietf.org/html/rfc1918#section-3)) are not allowed.
//
// > **Note:** Small address ranges using "/31" or "/32" prefix sizes are not supported. These ranges should be configured using individual IP address rules without prefix specified.
//
// > **Note:** IP network rules have no effect on requests originating from the same Azure region as the storage account. Use Virtual network rules to allow same-region requests. Services deployed in the same region as the storage account use private Azure IP addresses for communication. Thus, you cannot restrict access to specific Azure services based on their public outbound IP address range.
//
// > **Note:** User has to explicitly set `ipRules` to empty slice (`[]`) to remove it.
IpRules pulumi.StringArrayInput
// One or more `privateLinkAccess` block as defined below.
PrivateLinkAccessRules AccountNetworkRulesPrivateLinkAccessRuleArrayInput
// Specifies the ID of the storage account. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringPtrInput
// A list of virtual network subnet ids to secure the storage account.
//
// > **Note:** User has to explicitly set `virtualNetworkSubnetIds` to empty slice (`[]`) to remove it.
VirtualNetworkSubnetIds pulumi.StringArrayInput
}
func (AccountNetworkRulesState) ElementType() reflect.Type {
return reflect.TypeOf((*accountNetworkRulesState)(nil)).Elem()
}
type accountNetworkRulesArgs struct {
// Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of `Logging`, `Metrics`, `AzureServices`, or `None`. Defaults to `["AzureServices"]`.
//
// > **Note:** User has to explicitly set `bypass` to empty slice (`[]`) to remove it.
Bypasses []string `pulumi:"bypasses"`
// Specifies the default action of allow or deny when no other rules match. Valid options are `Deny` or `Allow`.
DefaultAction string `pulumi:"defaultAction"`
// List of public IP or IP ranges in CIDR Format. Only IPv4 addresses are allowed. Private IP address ranges (as defined in [RFC 1918](https://tools.ietf.org/html/rfc1918#section-3)) are not allowed.
//
// > **Note:** Small address ranges using "/31" or "/32" prefix sizes are not supported. These ranges should be configured using individual IP address rules without prefix specified.
//
// > **Note:** IP network rules have no effect on requests originating from the same Azure region as the storage account. Use Virtual network rules to allow same-region requests. Services deployed in the same region as the storage account use private Azure IP addresses for communication. Thus, you cannot restrict access to specific Azure services based on their public outbound IP address range.
//
// > **Note:** User has to explicitly set `ipRules` to empty slice (`[]`) to remove it.
IpRules []string `pulumi:"ipRules"`
// One or more `privateLinkAccess` block as defined below.
PrivateLinkAccessRules []AccountNetworkRulesPrivateLinkAccessRule `pulumi:"privateLinkAccessRules"`
// Specifies the ID of the storage account. Changing this forces a new resource to be created.
StorageAccountId string `pulumi:"storageAccountId"`
// A list of virtual network subnet ids to secure the storage account.
//
// > **Note:** User has to explicitly set `virtualNetworkSubnetIds` to empty slice (`[]`) to remove it.
VirtualNetworkSubnetIds []string `pulumi:"virtualNetworkSubnetIds"`
}
// The set of arguments for constructing a AccountNetworkRules resource.
type AccountNetworkRulesArgs struct {
// Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of `Logging`, `Metrics`, `AzureServices`, or `None`. Defaults to `["AzureServices"]`.
//
// > **Note:** User has to explicitly set `bypass` to empty slice (`[]`) to remove it.
Bypasses pulumi.StringArrayInput
// Specifies the default action of allow or deny when no other rules match. Valid options are `Deny` or `Allow`.
DefaultAction pulumi.StringInput
// List of public IP or IP ranges in CIDR Format. Only IPv4 addresses are allowed. Private IP address ranges (as defined in [RFC 1918](https://tools.ietf.org/html/rfc1918#section-3)) are not allowed.
//
// > **Note:** Small address ranges using "/31" or "/32" prefix sizes are not supported. These ranges should be configured using individual IP address rules without prefix specified.
//
// > **Note:** IP network rules have no effect on requests originating from the same Azure region as the storage account. Use Virtual network rules to allow same-region requests. Services deployed in the same region as the storage account use private Azure IP addresses for communication. Thus, you cannot restrict access to specific Azure services based on their public outbound IP address range.
//
// > **Note:** User has to explicitly set `ipRules` to empty slice (`[]`) to remove it.
IpRules pulumi.StringArrayInput
// One or more `privateLinkAccess` block as defined below.
PrivateLinkAccessRules AccountNetworkRulesPrivateLinkAccessRuleArrayInput
// Specifies the ID of the storage account. Changing this forces a new resource to be created.
StorageAccountId pulumi.StringInput
// A list of virtual network subnet ids to secure the storage account.
//
// > **Note:** User has to explicitly set `virtualNetworkSubnetIds` to empty slice (`[]`) to remove it.
VirtualNetworkSubnetIds pulumi.StringArrayInput
}
func (AccountNetworkRulesArgs) ElementType() reflect.Type {
return reflect.TypeOf((*accountNetworkRulesArgs)(nil)).Elem()
}
type AccountNetworkRulesInput interface {
pulumi.Input
ToAccountNetworkRulesOutput() AccountNetworkRulesOutput
ToAccountNetworkRulesOutputWithContext(ctx context.Context) AccountNetworkRulesOutput
}
func (*AccountNetworkRules) ElementType() reflect.Type {
return reflect.TypeOf((**AccountNetworkRules)(nil)).Elem()
}
func (i *AccountNetworkRules) ToAccountNetworkRulesOutput() AccountNetworkRulesOutput {
return i.ToAccountNetworkRulesOutputWithContext(context.Background())
}
func (i *AccountNetworkRules) ToAccountNetworkRulesOutputWithContext(ctx context.Context) AccountNetworkRulesOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountNetworkRulesOutput)
}
// AccountNetworkRulesArrayInput is an input type that accepts AccountNetworkRulesArray and AccountNetworkRulesArrayOutput values.
// You can construct a concrete instance of `AccountNetworkRulesArrayInput` via:
//
// AccountNetworkRulesArray{ AccountNetworkRulesArgs{...} }
type AccountNetworkRulesArrayInput interface {
pulumi.Input
ToAccountNetworkRulesArrayOutput() AccountNetworkRulesArrayOutput
ToAccountNetworkRulesArrayOutputWithContext(context.Context) AccountNetworkRulesArrayOutput
}
type AccountNetworkRulesArray []AccountNetworkRulesInput
func (AccountNetworkRulesArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountNetworkRules)(nil)).Elem()
}
func (i AccountNetworkRulesArray) ToAccountNetworkRulesArrayOutput() AccountNetworkRulesArrayOutput {
return i.ToAccountNetworkRulesArrayOutputWithContext(context.Background())
}
func (i AccountNetworkRulesArray) ToAccountNetworkRulesArrayOutputWithContext(ctx context.Context) AccountNetworkRulesArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountNetworkRulesArrayOutput)
}
// AccountNetworkRulesMapInput is an input type that accepts AccountNetworkRulesMap and AccountNetworkRulesMapOutput values.
// You can construct a concrete instance of `AccountNetworkRulesMapInput` via:
//
// AccountNetworkRulesMap{ "key": AccountNetworkRulesArgs{...} }
type AccountNetworkRulesMapInput interface {
pulumi.Input
ToAccountNetworkRulesMapOutput() AccountNetworkRulesMapOutput
ToAccountNetworkRulesMapOutputWithContext(context.Context) AccountNetworkRulesMapOutput
}
type AccountNetworkRulesMap map[string]AccountNetworkRulesInput
func (AccountNetworkRulesMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountNetworkRules)(nil)).Elem()
}
func (i AccountNetworkRulesMap) ToAccountNetworkRulesMapOutput() AccountNetworkRulesMapOutput {
return i.ToAccountNetworkRulesMapOutputWithContext(context.Background())
}
func (i AccountNetworkRulesMap) ToAccountNetworkRulesMapOutputWithContext(ctx context.Context) AccountNetworkRulesMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountNetworkRulesMapOutput)
}
type AccountNetworkRulesOutput struct{ *pulumi.OutputState }
func (AccountNetworkRulesOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountNetworkRules)(nil)).Elem()
}
func (o AccountNetworkRulesOutput) ToAccountNetworkRulesOutput() AccountNetworkRulesOutput {
return o
}
func (o AccountNetworkRulesOutput) ToAccountNetworkRulesOutputWithContext(ctx context.Context) AccountNetworkRulesOutput {
return o
}
// Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of `Logging`, `Metrics`, `AzureServices`, or `None`. Defaults to `["AzureServices"]`.
//
// > **Note:** User has to explicitly set `bypass` to empty slice (`[]`) to remove it.
func (o AccountNetworkRulesOutput) Bypasses() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AccountNetworkRules) pulumi.StringArrayOutput { return v.Bypasses }).(pulumi.StringArrayOutput)
}
// Specifies the default action of allow or deny when no other rules match. Valid options are `Deny` or `Allow`.
func (o AccountNetworkRulesOutput) DefaultAction() pulumi.StringOutput {
return o.ApplyT(func(v *AccountNetworkRules) pulumi.StringOutput { return v.DefaultAction }).(pulumi.StringOutput)
}
// List of public IP or IP ranges in CIDR Format. Only IPv4 addresses are allowed. Private IP address ranges (as defined in [RFC 1918](https://tools.ietf.org/html/rfc1918#section-3)) are not allowed.
//
// > **Note:** Small address ranges using "/31" or "/32" prefix sizes are not supported. These ranges should be configured using individual IP address rules without prefix specified.
//
// > **Note:** IP network rules have no effect on requests originating from the same Azure region as the storage account. Use Virtual network rules to allow same-region requests. Services deployed in the same region as the storage account use private Azure IP addresses for communication. Thus, you cannot restrict access to specific Azure services based on their public outbound IP address range.
//
// > **Note:** User has to explicitly set `ipRules` to empty slice (`[]`) to remove it.
func (o AccountNetworkRulesOutput) IpRules() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AccountNetworkRules) pulumi.StringArrayOutput { return v.IpRules }).(pulumi.StringArrayOutput)
}
// One or more `privateLinkAccess` block as defined below.
func (o AccountNetworkRulesOutput) PrivateLinkAccessRules() AccountNetworkRulesPrivateLinkAccessRuleArrayOutput {
return o.ApplyT(func(v *AccountNetworkRules) AccountNetworkRulesPrivateLinkAccessRuleArrayOutput {
return v.PrivateLinkAccessRules
}).(AccountNetworkRulesPrivateLinkAccessRuleArrayOutput)
}
// Specifies the ID of the storage account. Changing this forces a new resource to be created.
func (o AccountNetworkRulesOutput) StorageAccountId() pulumi.StringOutput {
return o.ApplyT(func(v *AccountNetworkRules) pulumi.StringOutput { return v.StorageAccountId }).(pulumi.StringOutput)
}
// A list of virtual network subnet ids to secure the storage account.
//
// > **Note:** User has to explicitly set `virtualNetworkSubnetIds` to empty slice (`[]`) to remove it.
func (o AccountNetworkRulesOutput) VirtualNetworkSubnetIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AccountNetworkRules) pulumi.StringArrayOutput { return v.VirtualNetworkSubnetIds }).(pulumi.StringArrayOutput)
}
type AccountNetworkRulesArrayOutput struct{ *pulumi.OutputState }
func (AccountNetworkRulesArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountNetworkRules)(nil)).Elem()
}
func (o AccountNetworkRulesArrayOutput) ToAccountNetworkRulesArrayOutput() AccountNetworkRulesArrayOutput {
return o
}
func (o AccountNetworkRulesArrayOutput) ToAccountNetworkRulesArrayOutputWithContext(ctx context.Context) AccountNetworkRulesArrayOutput {
return o
}
func (o AccountNetworkRulesArrayOutput) Index(i pulumi.IntInput) AccountNetworkRulesOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AccountNetworkRules {
return vs[0].([]*AccountNetworkRules)[vs[1].(int)]
}).(AccountNetworkRulesOutput)
}
type AccountNetworkRulesMapOutput struct{ *pulumi.OutputState }
func (AccountNetworkRulesMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountNetworkRules)(nil)).Elem()
}
func (o AccountNetworkRulesMapOutput) ToAccountNetworkRulesMapOutput() AccountNetworkRulesMapOutput {
return o
}
func (o AccountNetworkRulesMapOutput) ToAccountNetworkRulesMapOutputWithContext(ctx context.Context) AccountNetworkRulesMapOutput {
return o
}
func (o AccountNetworkRulesMapOutput) MapIndex(k pulumi.StringInput) AccountNetworkRulesOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AccountNetworkRules {
return vs[0].(map[string]*AccountNetworkRules)[vs[1].(string)]
}).(AccountNetworkRulesOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccountNetworkRulesInput)(nil)).Elem(), &AccountNetworkRules{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountNetworkRulesArrayInput)(nil)).Elem(), AccountNetworkRulesArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountNetworkRulesMapInput)(nil)).Elem(), AccountNetworkRulesMap{})
pulumi.RegisterOutputType(AccountNetworkRulesOutput{})
pulumi.RegisterOutputType(AccountNetworkRulesArrayOutput{})
pulumi.RegisterOutputType(AccountNetworkRulesMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/storage/queue.go | sdk/go/azure/storage/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 storage
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Queue within an Azure Storage Account.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
// "github.com/pulumi/pulumi/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("examplestorageacc"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AccountTier: pulumi.String("Standard"),
// AccountReplicationType: pulumi.String("LRS"),
// })
// if err != nil {
// return err
// }
// _, err = storage.NewQueue(ctx, "example", &storage.QueueArgs{
// Name: pulumi.String("mysamplequeue"),
// StorageAccountName: exampleAccount.Name,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Storage` - 2023-05-01
//
// ## Import
//
// Storage Queue's can be imported using the `resource id`, e.g.
//
// If `storage_account_name` is used:
//
// ```sh
// $ pulumi import azure:storage/queue:Queue queue1 https://example.queue.core.windows.net/queue1
// ```
//
// If `storage_account_id` is used:
//
// ```sh
// $ pulumi import azure:storage/queue:Queue queue1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/queueServices/default/queues/queue1
// ```
type Queue struct {
pulumi.CustomResourceState
// A mapping of MetaData which should be assigned to this Storage Queue.
Metadata pulumi.StringMapOutput `pulumi:"metadata"`
// The name of the Queue which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The Resource Manager ID of this Storage Queue.
//
// Deprecated: the `resourceManagerId` property has been deprecated in favour of `id` and will be removed in version 5.0 of the Provider.
ResourceManagerId pulumi.StringOutput `pulumi:"resourceManagerId"`
// The name of the Storage Account where the Storage Queue should be created.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId pulumi.StringPtrOutput `pulumi:"storageAccountId"`
// The name of the Storage Account where the Storage Queue should be created. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
StorageAccountName pulumi.StringPtrOutput `pulumi:"storageAccountName"`
// The data plane URL of the Storage Queue in the format of `<storage queue endpoint>/<queue name>`. E.g. `https://example.queue.core.windows.net/queue1`.
Url pulumi.StringOutput `pulumi:"url"`
}
// 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 {
args = &QueueArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Queue
err := ctx.RegisterResource("azure:storage/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:storage/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 {
// A mapping of MetaData which should be assigned to this Storage Queue.
Metadata map[string]string `pulumi:"metadata"`
// The name of the Queue which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The Resource Manager ID of this Storage Queue.
//
// Deprecated: the `resourceManagerId` property has been deprecated in favour of `id` and will be removed in version 5.0 of the Provider.
ResourceManagerId *string `pulumi:"resourceManagerId"`
// The name of the Storage Account where the Storage Queue should be created.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId *string `pulumi:"storageAccountId"`
// The name of the Storage Account where the Storage Queue should be created. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
StorageAccountName *string `pulumi:"storageAccountName"`
// The data plane URL of the Storage Queue in the format of `<storage queue endpoint>/<queue name>`. E.g. `https://example.queue.core.windows.net/queue1`.
Url *string `pulumi:"url"`
}
type QueueState struct {
// A mapping of MetaData which should be assigned to this Storage Queue.
Metadata pulumi.StringMapInput
// The name of the Queue which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The Resource Manager ID of this Storage Queue.
//
// Deprecated: the `resourceManagerId` property has been deprecated in favour of `id` and will be removed in version 5.0 of the Provider.
ResourceManagerId pulumi.StringPtrInput
// The name of the Storage Account where the Storage Queue should be created.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId pulumi.StringPtrInput
// The name of the Storage Account where the Storage Queue should be created. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
StorageAccountName pulumi.StringPtrInput
// The data plane URL of the Storage Queue in the format of `<storage queue endpoint>/<queue name>`. E.g. `https://example.queue.core.windows.net/queue1`.
Url pulumi.StringPtrInput
}
func (QueueState) ElementType() reflect.Type {
return reflect.TypeOf((*queueState)(nil)).Elem()
}
type queueArgs struct {
// A mapping of MetaData which should be assigned to this Storage Queue.
Metadata map[string]string `pulumi:"metadata"`
// The name of the Queue which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Storage Account where the Storage Queue should be created.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId *string `pulumi:"storageAccountId"`
// The name of the Storage Account where the Storage Queue should be created. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
StorageAccountName *string `pulumi:"storageAccountName"`
}
// The set of arguments for constructing a Queue resource.
type QueueArgs struct {
// A mapping of MetaData which should be assigned to this Storage Queue.
Metadata pulumi.StringMapInput
// The name of the Queue which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Storage Account where the Storage Queue should be created.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
StorageAccountId pulumi.StringPtrInput
// The name of the Storage Account where the Storage Queue should be created. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
StorageAccountName 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
}
// A mapping of MetaData which should be assigned to this Storage Queue.
func (o QueueOutput) Metadata() pulumi.StringMapOutput {
return o.ApplyT(func(v *Queue) pulumi.StringMapOutput { return v.Metadata }).(pulumi.StringMapOutput)
}
// The name of the Queue which should be created within the Storage Account. Must be unique within the storage account the queue is located. Changing this forces a new resource to be created.
func (o QueueOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Queue) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The Resource Manager ID of this Storage Queue.
//
// Deprecated: the `resourceManagerId` property has been deprecated in favour of `id` and will be removed in version 5.0 of the Provider.
func (o QueueOutput) ResourceManagerId() pulumi.StringOutput {
return o.ApplyT(func(v *Queue) pulumi.StringOutput { return v.ResourceManagerId }).(pulumi.StringOutput)
}
// The name of the Storage Account where the Storage Queue should be created.
//
// > **Note:** One of `storageAccountName` or `storageAccountId` must be specified. When specifying `storageAccountId` the resource will use the Resource Manager API, rather than the Data Plane API.
func (o QueueOutput) StorageAccountId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.StringPtrOutput { return v.StorageAccountId }).(pulumi.StringPtrOutput)
}
// The name of the Storage Account where the Storage Queue should be created. This property is deprecated in favour of `storageAccountId`.
//
// > **Note:** Migrating from the deprecated `storageAccountName` to `storageAccountId` is supported without recreation. Any other change to either property will result in the resource being recreated.
//
// Deprecated: the `storageAccountName` property has been deprecated in favour of `storageAccountId` and will be removed in version 5.0 of the Provider.
func (o QueueOutput) StorageAccountName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Queue) pulumi.StringPtrOutput { return v.StorageAccountName }).(pulumi.StringPtrOutput)
}
// The data plane URL of the Storage Queue in the format of `<storage queue endpoint>/<queue name>`. E.g. `https://example.queue.core.windows.net/queue1`.
func (o QueueOutput) Url() pulumi.StringOutput {
return o.ApplyT(func(v *Queue) pulumi.StringOutput { return v.Url }).(pulumi.StringOutput)
}
type QueueArrayOutput struct{ *pulumi.OutputState }
func (QueueArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Queue)(nil)).Elem()
}
func (o QueueArrayOutput) ToQueueArrayOutput() QueueArrayOutput {
return o
}
func (o QueueArrayOutput) ToQueueArrayOutputWithContext(ctx context.Context) QueueArrayOutput {
return o
}
func (o QueueArrayOutput) Index(i pulumi.IntInput) QueueOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Queue {
return vs[0].([]*Queue)[vs[1].(int)]
}).(QueueOutput)
}
type QueueMapOutput struct{ *pulumi.OutputState }
func (QueueMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Queue)(nil)).Elem()
}
func (o QueueMapOutput) ToQueueMapOutput() QueueMapOutput {
return o
}
func (o QueueMapOutput) ToQueueMapOutputWithContext(ctx context.Context) QueueMapOutput {
return o
}
func (o QueueMapOutput) MapIndex(k pulumi.StringInput) QueueOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Queue {
return vs[0].(map[string]*Queue)[vs[1].(string)]
}).(QueueOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*QueueInput)(nil)).Elem(), &Queue{})
pulumi.RegisterInputType(reflect.TypeOf((*QueueArrayInput)(nil)).Elem(), QueueArray{})
pulumi.RegisterInputType(reflect.TypeOf((*QueueMapInput)(nil)).Elem(), QueueMap{})
pulumi.RegisterOutputType(QueueOutput{})
pulumi.RegisterOutputType(QueueArrayOutput{})
pulumi.RegisterOutputType(QueueMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/desktopvirtualization/getWorkspace.go | sdk/go/azure/desktopvirtualization/getWorkspace.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package desktopvirtualization
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 Virtual Desktop Workspace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/desktopvirtualization"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := desktopvirtualization.LookupWorkspace(ctx, &desktopvirtualization.LookupWorkspaceArgs{
// Name: "existing",
// ResourceGroupName: "existing",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.DesktopVirtualization` - 2024-04-03
func LookupWorkspace(ctx *pulumi.Context, args *LookupWorkspaceArgs, opts ...pulumi.InvokeOption) (*LookupWorkspaceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupWorkspaceResult
err := ctx.Invoke("azure:desktopvirtualization/getWorkspace:getWorkspace", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getWorkspace.
type LookupWorkspaceArgs struct {
// The name of this Virtual Desktop Workspace to retrieve.
Name string `pulumi:"name"`
// The name of the Resource Group where the Virtual Desktop Workspace exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getWorkspace.
type LookupWorkspaceResult struct {
// The description for the Virtual Desktop Workspace.
Description string `pulumi:"description"`
// The friendly name for the Virtual Desktop Workspace.
FriendlyName string `pulumi:"friendlyName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure Region where the Virtual Desktop Workspace exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
// Is public network access enabled?
PublicNetworkAccessEnabled bool `pulumi:"publicNetworkAccessEnabled"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the Virtual Desktop Workspace.
Tags map[string]string `pulumi:"tags"`
}
func LookupWorkspaceOutput(ctx *pulumi.Context, args LookupWorkspaceOutputArgs, opts ...pulumi.InvokeOption) LookupWorkspaceResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupWorkspaceResultOutput, error) {
args := v.(LookupWorkspaceArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:desktopvirtualization/getWorkspace:getWorkspace", args, LookupWorkspaceResultOutput{}, options).(LookupWorkspaceResultOutput), nil
}).(LookupWorkspaceResultOutput)
}
// A collection of arguments for invoking getWorkspace.
type LookupWorkspaceOutputArgs struct {
// The name of this Virtual Desktop Workspace to retrieve.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Virtual Desktop Workspace exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupWorkspaceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupWorkspaceArgs)(nil)).Elem()
}
// A collection of values returned by getWorkspace.
type LookupWorkspaceResultOutput struct{ *pulumi.OutputState }
func (LookupWorkspaceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupWorkspaceResult)(nil)).Elem()
}
func (o LookupWorkspaceResultOutput) ToLookupWorkspaceResultOutput() LookupWorkspaceResultOutput {
return o
}
func (o LookupWorkspaceResultOutput) ToLookupWorkspaceResultOutputWithContext(ctx context.Context) LookupWorkspaceResultOutput {
return o
}
// The description for the Virtual Desktop Workspace.
func (o LookupWorkspaceResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Description }).(pulumi.StringOutput)
}
// The friendly name for the Virtual Desktop Workspace.
func (o LookupWorkspaceResultOutput) FriendlyName() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceResult) string { return v.FriendlyName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupWorkspaceResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Azure Region where the Virtual Desktop Workspace exists.
func (o LookupWorkspaceResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupWorkspaceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceResult) string { return v.Name }).(pulumi.StringOutput)
}
// Is public network access enabled?
func (o LookupWorkspaceResultOutput) PublicNetworkAccessEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v LookupWorkspaceResult) bool { return v.PublicNetworkAccessEnabled }).(pulumi.BoolOutput)
}
func (o LookupWorkspaceResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupWorkspaceResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the Virtual Desktop Workspace.
func (o LookupWorkspaceResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupWorkspaceResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
func init() {
pulumi.RegisterOutputType(LookupWorkspaceResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/desktopvirtualization/getApplicationGroup.go | sdk/go/azure/desktopvirtualization/getApplicationGroup.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package desktopvirtualization
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to access information about an existing Application Group.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/desktopvirtualization"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := desktopvirtualization.LookupApplicationGroup(ctx, &desktopvirtualization.LookupApplicationGroupArgs{
// Name: "existing",
// ResourceGroupName: "existing",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", example.Id)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.DesktopVirtualization` - 2024-04-03
func LookupApplicationGroup(ctx *pulumi.Context, args *LookupApplicationGroupArgs, opts ...pulumi.InvokeOption) (*LookupApplicationGroupResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupApplicationGroupResult
err := ctx.Invoke("azure:desktopvirtualization/getApplicationGroup:getApplicationGroup", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getApplicationGroup.
type LookupApplicationGroupArgs struct {
// The name of this Application Group.
Name string `pulumi:"name"`
// The name of the Resource Group where the Application Group exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getApplicationGroup.
type LookupApplicationGroupResult struct {
// The description of the Application Group.
Description string `pulumi:"description"`
// The friendly name of the Application Group.
FriendlyName string `pulumi:"friendlyName"`
// The Virtual Desktop Host Pool ID the Application Group is associated to.
HostPoolId string `pulumi:"hostPoolId"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The Azure Region where the Application Group exists.
Location string `pulumi:"location"`
Name string `pulumi:"name"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags assigned to the Application Group.
Tags map[string]string `pulumi:"tags"`
// The type of Application Group (`RemoteApp` or `Desktop`).
Type string `pulumi:"type"`
// The Virtual Desktop Workspace ID the Application Group is associated to.
WorkspaceId string `pulumi:"workspaceId"`
}
func LookupApplicationGroupOutput(ctx *pulumi.Context, args LookupApplicationGroupOutputArgs, opts ...pulumi.InvokeOption) LookupApplicationGroupResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupApplicationGroupResultOutput, error) {
args := v.(LookupApplicationGroupArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:desktopvirtualization/getApplicationGroup:getApplicationGroup", args, LookupApplicationGroupResultOutput{}, options).(LookupApplicationGroupResultOutput), nil
}).(LookupApplicationGroupResultOutput)
}
// A collection of arguments for invoking getApplicationGroup.
type LookupApplicationGroupOutputArgs struct {
// The name of this Application Group.
Name pulumi.StringInput `pulumi:"name"`
// The name of the Resource Group where the Application Group exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupApplicationGroupOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupApplicationGroupArgs)(nil)).Elem()
}
// A collection of values returned by getApplicationGroup.
type LookupApplicationGroupResultOutput struct{ *pulumi.OutputState }
func (LookupApplicationGroupResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupApplicationGroupResult)(nil)).Elem()
}
func (o LookupApplicationGroupResultOutput) ToLookupApplicationGroupResultOutput() LookupApplicationGroupResultOutput {
return o
}
func (o LookupApplicationGroupResultOutput) ToLookupApplicationGroupResultOutputWithContext(ctx context.Context) LookupApplicationGroupResultOutput {
return o
}
// The description of the Application Group.
func (o LookupApplicationGroupResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationGroupResult) string { return v.Description }).(pulumi.StringOutput)
}
// The friendly name of the Application Group.
func (o LookupApplicationGroupResultOutput) FriendlyName() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationGroupResult) string { return v.FriendlyName }).(pulumi.StringOutput)
}
// The Virtual Desktop Host Pool ID the Application Group is associated to.
func (o LookupApplicationGroupResultOutput) HostPoolId() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationGroupResult) string { return v.HostPoolId }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupApplicationGroupResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationGroupResult) string { return v.Id }).(pulumi.StringOutput)
}
// The Azure Region where the Application Group exists.
func (o LookupApplicationGroupResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationGroupResult) string { return v.Location }).(pulumi.StringOutput)
}
func (o LookupApplicationGroupResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationGroupResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupApplicationGroupResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationGroupResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags assigned to the Application Group.
func (o LookupApplicationGroupResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupApplicationGroupResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The type of Application Group (`RemoteApp` or `Desktop`).
func (o LookupApplicationGroupResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationGroupResult) string { return v.Type }).(pulumi.StringOutput)
}
// The Virtual Desktop Workspace ID the Application Group is associated to.
func (o LookupApplicationGroupResultOutput) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupApplicationGroupResult) string { return v.WorkspaceId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupApplicationGroupResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/desktopvirtualization/init.go | sdk/go/azure/desktopvirtualization/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 desktopvirtualization
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:desktopvirtualization/application:Application":
r = &Application{}
case "azure:desktopvirtualization/applicationGroup:ApplicationGroup":
r = &ApplicationGroup{}
case "azure:desktopvirtualization/getHostPoolRegistrationInfo:getHostPoolRegistrationInfo":
r = &GetHostPoolRegistrationInfo{}
case "azure:desktopvirtualization/hostPool:HostPool":
r = &HostPool{}
case "azure:desktopvirtualization/scalingPlan:ScalingPlan":
r = &ScalingPlan{}
case "azure:desktopvirtualization/scalingPlanHostPoolAssociation:ScalingPlanHostPoolAssociation":
r = &ScalingPlanHostPoolAssociation{}
case "azure:desktopvirtualization/workspace:Workspace":
r = &Workspace{}
case "azure:desktopvirtualization/workspaceApplicationGroupAssociation:WorkspaceApplicationGroupAssociation":
r = &WorkspaceApplicationGroupAssociation{}
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",
"desktopvirtualization/application",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"desktopvirtualization/applicationGroup",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"desktopvirtualization/getHostPoolRegistrationInfo",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"desktopvirtualization/hostPool",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"desktopvirtualization/scalingPlan",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"desktopvirtualization/scalingPlanHostPoolAssociation",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"desktopvirtualization/workspace",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"desktopvirtualization/workspaceApplicationGroupAssociation",
&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/desktopvirtualization/workspaceApplicationGroupAssociation.go | sdk/go/azure/desktopvirtualization/workspaceApplicationGroupAssociation.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package desktopvirtualization
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Virtual Desktop Workspace Application Group Association.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/desktopvirtualization"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("rg-example-virtualdesktop"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// pooledbreadthfirst, err := desktopvirtualization.NewHostPool(ctx, "pooledbreadthfirst", &desktopvirtualization.HostPoolArgs{
// Name: pulumi.String("pooledbreadthfirst"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Type: pulumi.String("Pooled"),
// LoadBalancerType: pulumi.String("BreadthFirst"),
// })
// if err != nil {
// return err
// }
// remoteapp, err := desktopvirtualization.NewApplicationGroup(ctx, "remoteapp", &desktopvirtualization.ApplicationGroupArgs{
// Name: pulumi.String("remoteapp"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Type: pulumi.String("RemoteApp"),
// HostPoolId: pooledbreadthfirst.ID(),
// })
// if err != nil {
// return err
// }
// workspace, err := desktopvirtualization.NewWorkspace(ctx, "workspace", &desktopvirtualization.WorkspaceArgs{
// Name: pulumi.String("workspace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// _, err = desktopvirtualization.NewWorkspaceApplicationGroupAssociation(ctx, "workspaceremoteapp", &desktopvirtualization.WorkspaceApplicationGroupAssociationArgs{
// WorkspaceId: workspace.ID(),
// ApplicationGroupId: remoteapp.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.DesktopVirtualization` - 2024-04-03
//
// ## Import
//
// Associations between Virtual Desktop Workspaces and Virtual Desktop Application Groups can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:desktopvirtualization/workspaceApplicationGroupAssociation:WorkspaceApplicationGroupAssociation association1 "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/workspaces/myworkspace|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/myapplicationgroup"
// ```
type WorkspaceApplicationGroupAssociation struct {
pulumi.CustomResourceState
// The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
ApplicationGroupId pulumi.StringOutput `pulumi:"applicationGroupId"`
// The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
WorkspaceId pulumi.StringOutput `pulumi:"workspaceId"`
}
// NewWorkspaceApplicationGroupAssociation registers a new resource with the given unique name, arguments, and options.
func NewWorkspaceApplicationGroupAssociation(ctx *pulumi.Context,
name string, args *WorkspaceApplicationGroupAssociationArgs, opts ...pulumi.ResourceOption) (*WorkspaceApplicationGroupAssociation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApplicationGroupId == nil {
return nil, errors.New("invalid value for required argument 'ApplicationGroupId'")
}
if args.WorkspaceId == nil {
return nil, errors.New("invalid value for required argument 'WorkspaceId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource WorkspaceApplicationGroupAssociation
err := ctx.RegisterResource("azure:desktopvirtualization/workspaceApplicationGroupAssociation:WorkspaceApplicationGroupAssociation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetWorkspaceApplicationGroupAssociation gets an existing WorkspaceApplicationGroupAssociation resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetWorkspaceApplicationGroupAssociation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *WorkspaceApplicationGroupAssociationState, opts ...pulumi.ResourceOption) (*WorkspaceApplicationGroupAssociation, error) {
var resource WorkspaceApplicationGroupAssociation
err := ctx.ReadResource("azure:desktopvirtualization/workspaceApplicationGroupAssociation:WorkspaceApplicationGroupAssociation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering WorkspaceApplicationGroupAssociation resources.
type workspaceApplicationGroupAssociationState struct {
// The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
ApplicationGroupId *string `pulumi:"applicationGroupId"`
// The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
WorkspaceId *string `pulumi:"workspaceId"`
}
type WorkspaceApplicationGroupAssociationState struct {
// The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
ApplicationGroupId pulumi.StringPtrInput
// The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
WorkspaceId pulumi.StringPtrInput
}
func (WorkspaceApplicationGroupAssociationState) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceApplicationGroupAssociationState)(nil)).Elem()
}
type workspaceApplicationGroupAssociationArgs struct {
// The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
ApplicationGroupId string `pulumi:"applicationGroupId"`
// The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
WorkspaceId string `pulumi:"workspaceId"`
}
// The set of arguments for constructing a WorkspaceApplicationGroupAssociation resource.
type WorkspaceApplicationGroupAssociationArgs struct {
// The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
ApplicationGroupId pulumi.StringInput
// The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
WorkspaceId pulumi.StringInput
}
func (WorkspaceApplicationGroupAssociationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceApplicationGroupAssociationArgs)(nil)).Elem()
}
type WorkspaceApplicationGroupAssociationInput interface {
pulumi.Input
ToWorkspaceApplicationGroupAssociationOutput() WorkspaceApplicationGroupAssociationOutput
ToWorkspaceApplicationGroupAssociationOutputWithContext(ctx context.Context) WorkspaceApplicationGroupAssociationOutput
}
func (*WorkspaceApplicationGroupAssociation) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceApplicationGroupAssociation)(nil)).Elem()
}
func (i *WorkspaceApplicationGroupAssociation) ToWorkspaceApplicationGroupAssociationOutput() WorkspaceApplicationGroupAssociationOutput {
return i.ToWorkspaceApplicationGroupAssociationOutputWithContext(context.Background())
}
func (i *WorkspaceApplicationGroupAssociation) ToWorkspaceApplicationGroupAssociationOutputWithContext(ctx context.Context) WorkspaceApplicationGroupAssociationOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceApplicationGroupAssociationOutput)
}
// WorkspaceApplicationGroupAssociationArrayInput is an input type that accepts WorkspaceApplicationGroupAssociationArray and WorkspaceApplicationGroupAssociationArrayOutput values.
// You can construct a concrete instance of `WorkspaceApplicationGroupAssociationArrayInput` via:
//
// WorkspaceApplicationGroupAssociationArray{ WorkspaceApplicationGroupAssociationArgs{...} }
type WorkspaceApplicationGroupAssociationArrayInput interface {
pulumi.Input
ToWorkspaceApplicationGroupAssociationArrayOutput() WorkspaceApplicationGroupAssociationArrayOutput
ToWorkspaceApplicationGroupAssociationArrayOutputWithContext(context.Context) WorkspaceApplicationGroupAssociationArrayOutput
}
type WorkspaceApplicationGroupAssociationArray []WorkspaceApplicationGroupAssociationInput
func (WorkspaceApplicationGroupAssociationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceApplicationGroupAssociation)(nil)).Elem()
}
func (i WorkspaceApplicationGroupAssociationArray) ToWorkspaceApplicationGroupAssociationArrayOutput() WorkspaceApplicationGroupAssociationArrayOutput {
return i.ToWorkspaceApplicationGroupAssociationArrayOutputWithContext(context.Background())
}
func (i WorkspaceApplicationGroupAssociationArray) ToWorkspaceApplicationGroupAssociationArrayOutputWithContext(ctx context.Context) WorkspaceApplicationGroupAssociationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceApplicationGroupAssociationArrayOutput)
}
// WorkspaceApplicationGroupAssociationMapInput is an input type that accepts WorkspaceApplicationGroupAssociationMap and WorkspaceApplicationGroupAssociationMapOutput values.
// You can construct a concrete instance of `WorkspaceApplicationGroupAssociationMapInput` via:
//
// WorkspaceApplicationGroupAssociationMap{ "key": WorkspaceApplicationGroupAssociationArgs{...} }
type WorkspaceApplicationGroupAssociationMapInput interface {
pulumi.Input
ToWorkspaceApplicationGroupAssociationMapOutput() WorkspaceApplicationGroupAssociationMapOutput
ToWorkspaceApplicationGroupAssociationMapOutputWithContext(context.Context) WorkspaceApplicationGroupAssociationMapOutput
}
type WorkspaceApplicationGroupAssociationMap map[string]WorkspaceApplicationGroupAssociationInput
func (WorkspaceApplicationGroupAssociationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceApplicationGroupAssociation)(nil)).Elem()
}
func (i WorkspaceApplicationGroupAssociationMap) ToWorkspaceApplicationGroupAssociationMapOutput() WorkspaceApplicationGroupAssociationMapOutput {
return i.ToWorkspaceApplicationGroupAssociationMapOutputWithContext(context.Background())
}
func (i WorkspaceApplicationGroupAssociationMap) ToWorkspaceApplicationGroupAssociationMapOutputWithContext(ctx context.Context) WorkspaceApplicationGroupAssociationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(WorkspaceApplicationGroupAssociationMapOutput)
}
type WorkspaceApplicationGroupAssociationOutput struct{ *pulumi.OutputState }
func (WorkspaceApplicationGroupAssociationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**WorkspaceApplicationGroupAssociation)(nil)).Elem()
}
func (o WorkspaceApplicationGroupAssociationOutput) ToWorkspaceApplicationGroupAssociationOutput() WorkspaceApplicationGroupAssociationOutput {
return o
}
func (o WorkspaceApplicationGroupAssociationOutput) ToWorkspaceApplicationGroupAssociationOutputWithContext(ctx context.Context) WorkspaceApplicationGroupAssociationOutput {
return o
}
// The resource ID for the Virtual Desktop Application Group. Changing this forces a new resource to be created.
func (o WorkspaceApplicationGroupAssociationOutput) ApplicationGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceApplicationGroupAssociation) pulumi.StringOutput { return v.ApplicationGroupId }).(pulumi.StringOutput)
}
// The resource ID for the Virtual Desktop Workspace. Changing this forces a new resource to be created.
func (o WorkspaceApplicationGroupAssociationOutput) WorkspaceId() pulumi.StringOutput {
return o.ApplyT(func(v *WorkspaceApplicationGroupAssociation) pulumi.StringOutput { return v.WorkspaceId }).(pulumi.StringOutput)
}
type WorkspaceApplicationGroupAssociationArrayOutput struct{ *pulumi.OutputState }
func (WorkspaceApplicationGroupAssociationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*WorkspaceApplicationGroupAssociation)(nil)).Elem()
}
func (o WorkspaceApplicationGroupAssociationArrayOutput) ToWorkspaceApplicationGroupAssociationArrayOutput() WorkspaceApplicationGroupAssociationArrayOutput {
return o
}
func (o WorkspaceApplicationGroupAssociationArrayOutput) ToWorkspaceApplicationGroupAssociationArrayOutputWithContext(ctx context.Context) WorkspaceApplicationGroupAssociationArrayOutput {
return o
}
func (o WorkspaceApplicationGroupAssociationArrayOutput) Index(i pulumi.IntInput) WorkspaceApplicationGroupAssociationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *WorkspaceApplicationGroupAssociation {
return vs[0].([]*WorkspaceApplicationGroupAssociation)[vs[1].(int)]
}).(WorkspaceApplicationGroupAssociationOutput)
}
type WorkspaceApplicationGroupAssociationMapOutput struct{ *pulumi.OutputState }
func (WorkspaceApplicationGroupAssociationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*WorkspaceApplicationGroupAssociation)(nil)).Elem()
}
func (o WorkspaceApplicationGroupAssociationMapOutput) ToWorkspaceApplicationGroupAssociationMapOutput() WorkspaceApplicationGroupAssociationMapOutput {
return o
}
func (o WorkspaceApplicationGroupAssociationMapOutput) ToWorkspaceApplicationGroupAssociationMapOutputWithContext(ctx context.Context) WorkspaceApplicationGroupAssociationMapOutput {
return o
}
func (o WorkspaceApplicationGroupAssociationMapOutput) MapIndex(k pulumi.StringInput) WorkspaceApplicationGroupAssociationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *WorkspaceApplicationGroupAssociation {
return vs[0].(map[string]*WorkspaceApplicationGroupAssociation)[vs[1].(string)]
}).(WorkspaceApplicationGroupAssociationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceApplicationGroupAssociationInput)(nil)).Elem(), &WorkspaceApplicationGroupAssociation{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceApplicationGroupAssociationArrayInput)(nil)).Elem(), WorkspaceApplicationGroupAssociationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceApplicationGroupAssociationMapInput)(nil)).Elem(), WorkspaceApplicationGroupAssociationMap{})
pulumi.RegisterOutputType(WorkspaceApplicationGroupAssociationOutput{})
pulumi.RegisterOutputType(WorkspaceApplicationGroupAssociationArrayOutput{})
pulumi.RegisterOutputType(WorkspaceApplicationGroupAssociationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/desktopvirtualization/pulumiTypes.go | sdk/go/azure/desktopvirtualization/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 desktopvirtualization
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 HostPoolScheduledAgentUpdates struct {
// Enables or disables scheduled updates of the AVD agent components (RDAgent, Geneva Monitoring agent, and side-by-side stack) on session hosts. If this is enabled then up to two `schedule` blocks must be defined. Default is `false`.
//
// > **Note:** if `enabled` is set to `true` then at least one and a maximum of two `schedule` blocks must be provided.
Enabled *bool `pulumi:"enabled"`
// A `schedule` block as defined below. A maximum of two blocks can be added.
Schedules []HostPoolScheduledAgentUpdatesSchedule `pulumi:"schedules"`
// Specifies the time zone in which the agent update schedule will apply, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). If `useSessionHostTimezone` is enabled then it will override this setting. Default is `UTC`
Timezone *string `pulumi:"timezone"`
// Specifies whether scheduled agent updates should be applied based on the timezone of the affected session host. If configured then this setting overrides `timezone`. Default is `false`.
UseSessionHostTimezone *bool `pulumi:"useSessionHostTimezone"`
}
// HostPoolScheduledAgentUpdatesInput is an input type that accepts HostPoolScheduledAgentUpdatesArgs and HostPoolScheduledAgentUpdatesOutput values.
// You can construct a concrete instance of `HostPoolScheduledAgentUpdatesInput` via:
//
// HostPoolScheduledAgentUpdatesArgs{...}
type HostPoolScheduledAgentUpdatesInput interface {
pulumi.Input
ToHostPoolScheduledAgentUpdatesOutput() HostPoolScheduledAgentUpdatesOutput
ToHostPoolScheduledAgentUpdatesOutputWithContext(context.Context) HostPoolScheduledAgentUpdatesOutput
}
type HostPoolScheduledAgentUpdatesArgs struct {
// Enables or disables scheduled updates of the AVD agent components (RDAgent, Geneva Monitoring agent, and side-by-side stack) on session hosts. If this is enabled then up to two `schedule` blocks must be defined. Default is `false`.
//
// > **Note:** if `enabled` is set to `true` then at least one and a maximum of two `schedule` blocks must be provided.
Enabled pulumi.BoolPtrInput `pulumi:"enabled"`
// A `schedule` block as defined below. A maximum of two blocks can be added.
Schedules HostPoolScheduledAgentUpdatesScheduleArrayInput `pulumi:"schedules"`
// Specifies the time zone in which the agent update schedule will apply, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). If `useSessionHostTimezone` is enabled then it will override this setting. Default is `UTC`
Timezone pulumi.StringPtrInput `pulumi:"timezone"`
// Specifies whether scheduled agent updates should be applied based on the timezone of the affected session host. If configured then this setting overrides `timezone`. Default is `false`.
UseSessionHostTimezone pulumi.BoolPtrInput `pulumi:"useSessionHostTimezone"`
}
func (HostPoolScheduledAgentUpdatesArgs) ElementType() reflect.Type {
return reflect.TypeOf((*HostPoolScheduledAgentUpdates)(nil)).Elem()
}
func (i HostPoolScheduledAgentUpdatesArgs) ToHostPoolScheduledAgentUpdatesOutput() HostPoolScheduledAgentUpdatesOutput {
return i.ToHostPoolScheduledAgentUpdatesOutputWithContext(context.Background())
}
func (i HostPoolScheduledAgentUpdatesArgs) ToHostPoolScheduledAgentUpdatesOutputWithContext(ctx context.Context) HostPoolScheduledAgentUpdatesOutput {
return pulumi.ToOutputWithContext(ctx, i).(HostPoolScheduledAgentUpdatesOutput)
}
func (i HostPoolScheduledAgentUpdatesArgs) ToHostPoolScheduledAgentUpdatesPtrOutput() HostPoolScheduledAgentUpdatesPtrOutput {
return i.ToHostPoolScheduledAgentUpdatesPtrOutputWithContext(context.Background())
}
func (i HostPoolScheduledAgentUpdatesArgs) ToHostPoolScheduledAgentUpdatesPtrOutputWithContext(ctx context.Context) HostPoolScheduledAgentUpdatesPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(HostPoolScheduledAgentUpdatesOutput).ToHostPoolScheduledAgentUpdatesPtrOutputWithContext(ctx)
}
// HostPoolScheduledAgentUpdatesPtrInput is an input type that accepts HostPoolScheduledAgentUpdatesArgs, HostPoolScheduledAgentUpdatesPtr and HostPoolScheduledAgentUpdatesPtrOutput values.
// You can construct a concrete instance of `HostPoolScheduledAgentUpdatesPtrInput` via:
//
// HostPoolScheduledAgentUpdatesArgs{...}
//
// or:
//
// nil
type HostPoolScheduledAgentUpdatesPtrInput interface {
pulumi.Input
ToHostPoolScheduledAgentUpdatesPtrOutput() HostPoolScheduledAgentUpdatesPtrOutput
ToHostPoolScheduledAgentUpdatesPtrOutputWithContext(context.Context) HostPoolScheduledAgentUpdatesPtrOutput
}
type hostPoolScheduledAgentUpdatesPtrType HostPoolScheduledAgentUpdatesArgs
func HostPoolScheduledAgentUpdatesPtr(v *HostPoolScheduledAgentUpdatesArgs) HostPoolScheduledAgentUpdatesPtrInput {
return (*hostPoolScheduledAgentUpdatesPtrType)(v)
}
func (*hostPoolScheduledAgentUpdatesPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**HostPoolScheduledAgentUpdates)(nil)).Elem()
}
func (i *hostPoolScheduledAgentUpdatesPtrType) ToHostPoolScheduledAgentUpdatesPtrOutput() HostPoolScheduledAgentUpdatesPtrOutput {
return i.ToHostPoolScheduledAgentUpdatesPtrOutputWithContext(context.Background())
}
func (i *hostPoolScheduledAgentUpdatesPtrType) ToHostPoolScheduledAgentUpdatesPtrOutputWithContext(ctx context.Context) HostPoolScheduledAgentUpdatesPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(HostPoolScheduledAgentUpdatesPtrOutput)
}
type HostPoolScheduledAgentUpdatesOutput struct{ *pulumi.OutputState }
func (HostPoolScheduledAgentUpdatesOutput) ElementType() reflect.Type {
return reflect.TypeOf((*HostPoolScheduledAgentUpdates)(nil)).Elem()
}
func (o HostPoolScheduledAgentUpdatesOutput) ToHostPoolScheduledAgentUpdatesOutput() HostPoolScheduledAgentUpdatesOutput {
return o
}
func (o HostPoolScheduledAgentUpdatesOutput) ToHostPoolScheduledAgentUpdatesOutputWithContext(ctx context.Context) HostPoolScheduledAgentUpdatesOutput {
return o
}
func (o HostPoolScheduledAgentUpdatesOutput) ToHostPoolScheduledAgentUpdatesPtrOutput() HostPoolScheduledAgentUpdatesPtrOutput {
return o.ToHostPoolScheduledAgentUpdatesPtrOutputWithContext(context.Background())
}
func (o HostPoolScheduledAgentUpdatesOutput) ToHostPoolScheduledAgentUpdatesPtrOutputWithContext(ctx context.Context) HostPoolScheduledAgentUpdatesPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v HostPoolScheduledAgentUpdates) *HostPoolScheduledAgentUpdates {
return &v
}).(HostPoolScheduledAgentUpdatesPtrOutput)
}
// Enables or disables scheduled updates of the AVD agent components (RDAgent, Geneva Monitoring agent, and side-by-side stack) on session hosts. If this is enabled then up to two `schedule` blocks must be defined. Default is `false`.
//
// > **Note:** if `enabled` is set to `true` then at least one and a maximum of two `schedule` blocks must be provided.
func (o HostPoolScheduledAgentUpdatesOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v HostPoolScheduledAgentUpdates) *bool { return v.Enabled }).(pulumi.BoolPtrOutput)
}
// A `schedule` block as defined below. A maximum of two blocks can be added.
func (o HostPoolScheduledAgentUpdatesOutput) Schedules() HostPoolScheduledAgentUpdatesScheduleArrayOutput {
return o.ApplyT(func(v HostPoolScheduledAgentUpdates) []HostPoolScheduledAgentUpdatesSchedule { return v.Schedules }).(HostPoolScheduledAgentUpdatesScheduleArrayOutput)
}
// Specifies the time zone in which the agent update schedule will apply, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). If `useSessionHostTimezone` is enabled then it will override this setting. Default is `UTC`
func (o HostPoolScheduledAgentUpdatesOutput) Timezone() pulumi.StringPtrOutput {
return o.ApplyT(func(v HostPoolScheduledAgentUpdates) *string { return v.Timezone }).(pulumi.StringPtrOutput)
}
// Specifies whether scheduled agent updates should be applied based on the timezone of the affected session host. If configured then this setting overrides `timezone`. Default is `false`.
func (o HostPoolScheduledAgentUpdatesOutput) UseSessionHostTimezone() pulumi.BoolPtrOutput {
return o.ApplyT(func(v HostPoolScheduledAgentUpdates) *bool { return v.UseSessionHostTimezone }).(pulumi.BoolPtrOutput)
}
type HostPoolScheduledAgentUpdatesPtrOutput struct{ *pulumi.OutputState }
func (HostPoolScheduledAgentUpdatesPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**HostPoolScheduledAgentUpdates)(nil)).Elem()
}
func (o HostPoolScheduledAgentUpdatesPtrOutput) ToHostPoolScheduledAgentUpdatesPtrOutput() HostPoolScheduledAgentUpdatesPtrOutput {
return o
}
func (o HostPoolScheduledAgentUpdatesPtrOutput) ToHostPoolScheduledAgentUpdatesPtrOutputWithContext(ctx context.Context) HostPoolScheduledAgentUpdatesPtrOutput {
return o
}
func (o HostPoolScheduledAgentUpdatesPtrOutput) Elem() HostPoolScheduledAgentUpdatesOutput {
return o.ApplyT(func(v *HostPoolScheduledAgentUpdates) HostPoolScheduledAgentUpdates {
if v != nil {
return *v
}
var ret HostPoolScheduledAgentUpdates
return ret
}).(HostPoolScheduledAgentUpdatesOutput)
}
// Enables or disables scheduled updates of the AVD agent components (RDAgent, Geneva Monitoring agent, and side-by-side stack) on session hosts. If this is enabled then up to two `schedule` blocks must be defined. Default is `false`.
//
// > **Note:** if `enabled` is set to `true` then at least one and a maximum of two `schedule` blocks must be provided.
func (o HostPoolScheduledAgentUpdatesPtrOutput) Enabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *HostPoolScheduledAgentUpdates) *bool {
if v == nil {
return nil
}
return v.Enabled
}).(pulumi.BoolPtrOutput)
}
// A `schedule` block as defined below. A maximum of two blocks can be added.
func (o HostPoolScheduledAgentUpdatesPtrOutput) Schedules() HostPoolScheduledAgentUpdatesScheduleArrayOutput {
return o.ApplyT(func(v *HostPoolScheduledAgentUpdates) []HostPoolScheduledAgentUpdatesSchedule {
if v == nil {
return nil
}
return v.Schedules
}).(HostPoolScheduledAgentUpdatesScheduleArrayOutput)
}
// Specifies the time zone in which the agent update schedule will apply, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). If `useSessionHostTimezone` is enabled then it will override this setting. Default is `UTC`
func (o HostPoolScheduledAgentUpdatesPtrOutput) Timezone() pulumi.StringPtrOutput {
return o.ApplyT(func(v *HostPoolScheduledAgentUpdates) *string {
if v == nil {
return nil
}
return v.Timezone
}).(pulumi.StringPtrOutput)
}
// Specifies whether scheduled agent updates should be applied based on the timezone of the affected session host. If configured then this setting overrides `timezone`. Default is `false`.
func (o HostPoolScheduledAgentUpdatesPtrOutput) UseSessionHostTimezone() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *HostPoolScheduledAgentUpdates) *bool {
if v == nil {
return nil
}
return v.UseSessionHostTimezone
}).(pulumi.BoolPtrOutput)
}
type HostPoolScheduledAgentUpdatesSchedule struct {
// The day of the week on which agent updates should be performed. Possible values are `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, and `Sunday`
DayOfWeek string `pulumi:"dayOfWeek"`
// The hour of day the update window should start. The update is a 2 hour period following the hour provided. The value should be provided as a number between 0 and 23, with 0 being midnight and 23 being 11pm. A leading zero should not be used.
HourOfDay int `pulumi:"hourOfDay"`
}
// HostPoolScheduledAgentUpdatesScheduleInput is an input type that accepts HostPoolScheduledAgentUpdatesScheduleArgs and HostPoolScheduledAgentUpdatesScheduleOutput values.
// You can construct a concrete instance of `HostPoolScheduledAgentUpdatesScheduleInput` via:
//
// HostPoolScheduledAgentUpdatesScheduleArgs{...}
type HostPoolScheduledAgentUpdatesScheduleInput interface {
pulumi.Input
ToHostPoolScheduledAgentUpdatesScheduleOutput() HostPoolScheduledAgentUpdatesScheduleOutput
ToHostPoolScheduledAgentUpdatesScheduleOutputWithContext(context.Context) HostPoolScheduledAgentUpdatesScheduleOutput
}
type HostPoolScheduledAgentUpdatesScheduleArgs struct {
// The day of the week on which agent updates should be performed. Possible values are `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, and `Sunday`
DayOfWeek pulumi.StringInput `pulumi:"dayOfWeek"`
// The hour of day the update window should start. The update is a 2 hour period following the hour provided. The value should be provided as a number between 0 and 23, with 0 being midnight and 23 being 11pm. A leading zero should not be used.
HourOfDay pulumi.IntInput `pulumi:"hourOfDay"`
}
func (HostPoolScheduledAgentUpdatesScheduleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*HostPoolScheduledAgentUpdatesSchedule)(nil)).Elem()
}
func (i HostPoolScheduledAgentUpdatesScheduleArgs) ToHostPoolScheduledAgentUpdatesScheduleOutput() HostPoolScheduledAgentUpdatesScheduleOutput {
return i.ToHostPoolScheduledAgentUpdatesScheduleOutputWithContext(context.Background())
}
func (i HostPoolScheduledAgentUpdatesScheduleArgs) ToHostPoolScheduledAgentUpdatesScheduleOutputWithContext(ctx context.Context) HostPoolScheduledAgentUpdatesScheduleOutput {
return pulumi.ToOutputWithContext(ctx, i).(HostPoolScheduledAgentUpdatesScheduleOutput)
}
// HostPoolScheduledAgentUpdatesScheduleArrayInput is an input type that accepts HostPoolScheduledAgentUpdatesScheduleArray and HostPoolScheduledAgentUpdatesScheduleArrayOutput values.
// You can construct a concrete instance of `HostPoolScheduledAgentUpdatesScheduleArrayInput` via:
//
// HostPoolScheduledAgentUpdatesScheduleArray{ HostPoolScheduledAgentUpdatesScheduleArgs{...} }
type HostPoolScheduledAgentUpdatesScheduleArrayInput interface {
pulumi.Input
ToHostPoolScheduledAgentUpdatesScheduleArrayOutput() HostPoolScheduledAgentUpdatesScheduleArrayOutput
ToHostPoolScheduledAgentUpdatesScheduleArrayOutputWithContext(context.Context) HostPoolScheduledAgentUpdatesScheduleArrayOutput
}
type HostPoolScheduledAgentUpdatesScheduleArray []HostPoolScheduledAgentUpdatesScheduleInput
func (HostPoolScheduledAgentUpdatesScheduleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]HostPoolScheduledAgentUpdatesSchedule)(nil)).Elem()
}
func (i HostPoolScheduledAgentUpdatesScheduleArray) ToHostPoolScheduledAgentUpdatesScheduleArrayOutput() HostPoolScheduledAgentUpdatesScheduleArrayOutput {
return i.ToHostPoolScheduledAgentUpdatesScheduleArrayOutputWithContext(context.Background())
}
func (i HostPoolScheduledAgentUpdatesScheduleArray) ToHostPoolScheduledAgentUpdatesScheduleArrayOutputWithContext(ctx context.Context) HostPoolScheduledAgentUpdatesScheduleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(HostPoolScheduledAgentUpdatesScheduleArrayOutput)
}
type HostPoolScheduledAgentUpdatesScheduleOutput struct{ *pulumi.OutputState }
func (HostPoolScheduledAgentUpdatesScheduleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*HostPoolScheduledAgentUpdatesSchedule)(nil)).Elem()
}
func (o HostPoolScheduledAgentUpdatesScheduleOutput) ToHostPoolScheduledAgentUpdatesScheduleOutput() HostPoolScheduledAgentUpdatesScheduleOutput {
return o
}
func (o HostPoolScheduledAgentUpdatesScheduleOutput) ToHostPoolScheduledAgentUpdatesScheduleOutputWithContext(ctx context.Context) HostPoolScheduledAgentUpdatesScheduleOutput {
return o
}
// The day of the week on which agent updates should be performed. Possible values are `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, and `Sunday`
func (o HostPoolScheduledAgentUpdatesScheduleOutput) DayOfWeek() pulumi.StringOutput {
return o.ApplyT(func(v HostPoolScheduledAgentUpdatesSchedule) string { return v.DayOfWeek }).(pulumi.StringOutput)
}
// The hour of day the update window should start. The update is a 2 hour period following the hour provided. The value should be provided as a number between 0 and 23, with 0 being midnight and 23 being 11pm. A leading zero should not be used.
func (o HostPoolScheduledAgentUpdatesScheduleOutput) HourOfDay() pulumi.IntOutput {
return o.ApplyT(func(v HostPoolScheduledAgentUpdatesSchedule) int { return v.HourOfDay }).(pulumi.IntOutput)
}
type HostPoolScheduledAgentUpdatesScheduleArrayOutput struct{ *pulumi.OutputState }
func (HostPoolScheduledAgentUpdatesScheduleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]HostPoolScheduledAgentUpdatesSchedule)(nil)).Elem()
}
func (o HostPoolScheduledAgentUpdatesScheduleArrayOutput) ToHostPoolScheduledAgentUpdatesScheduleArrayOutput() HostPoolScheduledAgentUpdatesScheduleArrayOutput {
return o
}
func (o HostPoolScheduledAgentUpdatesScheduleArrayOutput) ToHostPoolScheduledAgentUpdatesScheduleArrayOutputWithContext(ctx context.Context) HostPoolScheduledAgentUpdatesScheduleArrayOutput {
return o
}
func (o HostPoolScheduledAgentUpdatesScheduleArrayOutput) Index(i pulumi.IntInput) HostPoolScheduledAgentUpdatesScheduleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) HostPoolScheduledAgentUpdatesSchedule {
return vs[0].([]HostPoolScheduledAgentUpdatesSchedule)[vs[1].(int)]
}).(HostPoolScheduledAgentUpdatesScheduleOutput)
}
type ScalingPlanHostPool struct {
// The ID of the HostPool to assign the Scaling Plan to.
HostpoolId string `pulumi:"hostpoolId"`
// Specifies if the scaling plan is enabled or disabled for the HostPool.
ScalingPlanEnabled bool `pulumi:"scalingPlanEnabled"`
}
// ScalingPlanHostPoolInput is an input type that accepts ScalingPlanHostPoolArgs and ScalingPlanHostPoolOutput values.
// You can construct a concrete instance of `ScalingPlanHostPoolInput` via:
//
// ScalingPlanHostPoolArgs{...}
type ScalingPlanHostPoolInput interface {
pulumi.Input
ToScalingPlanHostPoolOutput() ScalingPlanHostPoolOutput
ToScalingPlanHostPoolOutputWithContext(context.Context) ScalingPlanHostPoolOutput
}
type ScalingPlanHostPoolArgs struct {
// The ID of the HostPool to assign the Scaling Plan to.
HostpoolId pulumi.StringInput `pulumi:"hostpoolId"`
// Specifies if the scaling plan is enabled or disabled for the HostPool.
ScalingPlanEnabled pulumi.BoolInput `pulumi:"scalingPlanEnabled"`
}
func (ScalingPlanHostPoolArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ScalingPlanHostPool)(nil)).Elem()
}
func (i ScalingPlanHostPoolArgs) ToScalingPlanHostPoolOutput() ScalingPlanHostPoolOutput {
return i.ToScalingPlanHostPoolOutputWithContext(context.Background())
}
func (i ScalingPlanHostPoolArgs) ToScalingPlanHostPoolOutputWithContext(ctx context.Context) ScalingPlanHostPoolOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScalingPlanHostPoolOutput)
}
// ScalingPlanHostPoolArrayInput is an input type that accepts ScalingPlanHostPoolArray and ScalingPlanHostPoolArrayOutput values.
// You can construct a concrete instance of `ScalingPlanHostPoolArrayInput` via:
//
// ScalingPlanHostPoolArray{ ScalingPlanHostPoolArgs{...} }
type ScalingPlanHostPoolArrayInput interface {
pulumi.Input
ToScalingPlanHostPoolArrayOutput() ScalingPlanHostPoolArrayOutput
ToScalingPlanHostPoolArrayOutputWithContext(context.Context) ScalingPlanHostPoolArrayOutput
}
type ScalingPlanHostPoolArray []ScalingPlanHostPoolInput
func (ScalingPlanHostPoolArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ScalingPlanHostPool)(nil)).Elem()
}
func (i ScalingPlanHostPoolArray) ToScalingPlanHostPoolArrayOutput() ScalingPlanHostPoolArrayOutput {
return i.ToScalingPlanHostPoolArrayOutputWithContext(context.Background())
}
func (i ScalingPlanHostPoolArray) ToScalingPlanHostPoolArrayOutputWithContext(ctx context.Context) ScalingPlanHostPoolArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScalingPlanHostPoolArrayOutput)
}
type ScalingPlanHostPoolOutput struct{ *pulumi.OutputState }
func (ScalingPlanHostPoolOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ScalingPlanHostPool)(nil)).Elem()
}
func (o ScalingPlanHostPoolOutput) ToScalingPlanHostPoolOutput() ScalingPlanHostPoolOutput {
return o
}
func (o ScalingPlanHostPoolOutput) ToScalingPlanHostPoolOutputWithContext(ctx context.Context) ScalingPlanHostPoolOutput {
return o
}
// The ID of the HostPool to assign the Scaling Plan to.
func (o ScalingPlanHostPoolOutput) HostpoolId() pulumi.StringOutput {
return o.ApplyT(func(v ScalingPlanHostPool) string { return v.HostpoolId }).(pulumi.StringOutput)
}
// Specifies if the scaling plan is enabled or disabled for the HostPool.
func (o ScalingPlanHostPoolOutput) ScalingPlanEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v ScalingPlanHostPool) bool { return v.ScalingPlanEnabled }).(pulumi.BoolOutput)
}
type ScalingPlanHostPoolArrayOutput struct{ *pulumi.OutputState }
func (ScalingPlanHostPoolArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ScalingPlanHostPool)(nil)).Elem()
}
func (o ScalingPlanHostPoolArrayOutput) ToScalingPlanHostPoolArrayOutput() ScalingPlanHostPoolArrayOutput {
return o
}
func (o ScalingPlanHostPoolArrayOutput) ToScalingPlanHostPoolArrayOutputWithContext(ctx context.Context) ScalingPlanHostPoolArrayOutput {
return o
}
func (o ScalingPlanHostPoolArrayOutput) Index(i pulumi.IntInput) ScalingPlanHostPoolOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ScalingPlanHostPool {
return vs[0].([]ScalingPlanHostPool)[vs[1].(int)]
}).(ScalingPlanHostPoolOutput)
}
type ScalingPlanSchedule struct {
// A list of Days of the Week on which this schedule will be used. Possible values are `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, and `Sunday`
DaysOfWeeks []string `pulumi:"daysOfWeeks"`
// The name of the schedule.
Name string `pulumi:"name"`
// The load Balancing Algorithm to use during Off-Peak Hours. Possible values are `DepthFirst` and `BreadthFirst`.
OffPeakLoadBalancingAlgorithm string `pulumi:"offPeakLoadBalancingAlgorithm"`
// The time at which Off-Peak scaling will begin. This is also the end-time for the Ramp-Down period. The time must be specified in "HH:MM" format.
OffPeakStartTime string `pulumi:"offPeakStartTime"`
// The load Balancing Algorithm to use during Peak Hours. Possible values are `DepthFirst` and `BreadthFirst`.
PeakLoadBalancingAlgorithm string `pulumi:"peakLoadBalancingAlgorithm"`
// The time at which Peak scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.
PeakStartTime string `pulumi:"peakStartTime"`
// This is the value in percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-down and off-peak hours. For example, if capacity threshold is specified as 60% and your total host pool capacity is 100 sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of 60 sessions.
RampDownCapacityThresholdPercent int `pulumi:"rampDownCapacityThresholdPercent"`
// Whether users will be forced to log-off session hosts once the `rampDownWaitTimeMinutes` value has been exceeded during the Ramp-Down period. Possible values are `true` and `false`.
RampDownForceLogoffUsers bool `pulumi:"rampDownForceLogoffUsers"`
// The load Balancing Algorithm to use during the Ramp-Down period. Possible values are `DepthFirst` and `BreadthFirst`.
RampDownLoadBalancingAlgorithm string `pulumi:"rampDownLoadBalancingAlgorithm"`
// The minimum percentage of session host virtual machines that you would like to get to for ramp-down and off-peak hours. For example, if Minimum percentage of hosts is specified as 10% and total number of session hosts in your host pool is 10, autoscale will ensure a minimum of 1 session host is available to take user connections.
RampDownMinimumHostsPercent int `pulumi:"rampDownMinimumHostsPercent"`
// The notification message to send to users during Ramp-Down period when they are required to log-off.
RampDownNotificationMessage string `pulumi:"rampDownNotificationMessage"`
// The time at which Ramp-Down scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.
RampDownStartTime string `pulumi:"rampDownStartTime"`
// Controls Session Host shutdown behaviour during Ramp-Down period. Session Hosts can either be shutdown when all sessions on the Session Host have ended, or when there are no Active sessions left on the Session Host. Possible values are `ZeroSessions` and `ZeroActiveSessions`.
RampDownStopHostsWhen string `pulumi:"rampDownStopHostsWhen"`
// The number of minutes during Ramp-Down period that autoscale will wait after setting the session host VMs to drain mode, notifying any currently signed in users to save their work before forcing the users to logoff. Once all user sessions on the session host VM have been logged off, Autoscale will shut down the VM.
RampDownWaitTimeMinutes int `pulumi:"rampDownWaitTimeMinutes"`
// This is the value of percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-up and peak hours. For example, if capacity threshold is specified as `60%` and your total host pool capacity is `100` sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of `60` sessions.
RampUpCapacityThresholdPercent *int `pulumi:"rampUpCapacityThresholdPercent"`
// The load Balancing Algorithm to use during the Ramp-Up period. Possible values are `DepthFirst` and `BreadthFirst`.
RampUpLoadBalancingAlgorithm string `pulumi:"rampUpLoadBalancingAlgorithm"`
// Specifies the minimum percentage of session host virtual machines to start during ramp-up for peak hours. For example, if Minimum percentage of hosts is specified as `10%` and total number of session hosts in your host pool is `10`, autoscale will ensure a minimum of `1` session host is available to take user connections.
RampUpMinimumHostsPercent *int `pulumi:"rampUpMinimumHostsPercent"`
// The time at which Ramp-Up scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.
RampUpStartTime string `pulumi:"rampUpStartTime"`
}
// ScalingPlanScheduleInput is an input type that accepts ScalingPlanScheduleArgs and ScalingPlanScheduleOutput values.
// You can construct a concrete instance of `ScalingPlanScheduleInput` via:
//
// ScalingPlanScheduleArgs{...}
type ScalingPlanScheduleInput interface {
pulumi.Input
ToScalingPlanScheduleOutput() ScalingPlanScheduleOutput
ToScalingPlanScheduleOutputWithContext(context.Context) ScalingPlanScheduleOutput
}
type ScalingPlanScheduleArgs struct {
// A list of Days of the Week on which this schedule will be used. Possible values are `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, and `Sunday`
DaysOfWeeks pulumi.StringArrayInput `pulumi:"daysOfWeeks"`
// The name of the schedule.
Name pulumi.StringInput `pulumi:"name"`
// The load Balancing Algorithm to use during Off-Peak Hours. Possible values are `DepthFirst` and `BreadthFirst`.
OffPeakLoadBalancingAlgorithm pulumi.StringInput `pulumi:"offPeakLoadBalancingAlgorithm"`
// The time at which Off-Peak scaling will begin. This is also the end-time for the Ramp-Down period. The time must be specified in "HH:MM" format.
OffPeakStartTime pulumi.StringInput `pulumi:"offPeakStartTime"`
// The load Balancing Algorithm to use during Peak Hours. Possible values are `DepthFirst` and `BreadthFirst`.
PeakLoadBalancingAlgorithm pulumi.StringInput `pulumi:"peakLoadBalancingAlgorithm"`
// The time at which Peak scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.
PeakStartTime pulumi.StringInput `pulumi:"peakStartTime"`
// This is the value in percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-down and off-peak hours. For example, if capacity threshold is specified as 60% and your total host pool capacity is 100 sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of 60 sessions.
RampDownCapacityThresholdPercent pulumi.IntInput `pulumi:"rampDownCapacityThresholdPercent"`
// Whether users will be forced to log-off session hosts once the `rampDownWaitTimeMinutes` value has been exceeded during the Ramp-Down period. Possible values are `true` and `false`.
RampDownForceLogoffUsers pulumi.BoolInput `pulumi:"rampDownForceLogoffUsers"`
// The load Balancing Algorithm to use during the Ramp-Down period. Possible values are `DepthFirst` and `BreadthFirst`.
RampDownLoadBalancingAlgorithm pulumi.StringInput `pulumi:"rampDownLoadBalancingAlgorithm"`
// The minimum percentage of session host virtual machines that you would like to get to for ramp-down and off-peak hours. For example, if Minimum percentage of hosts is specified as 10% and total number of session hosts in your host pool is 10, autoscale will ensure a minimum of 1 session host is available to take user connections.
RampDownMinimumHostsPercent pulumi.IntInput `pulumi:"rampDownMinimumHostsPercent"`
// The notification message to send to users during Ramp-Down period when they are required to log-off.
RampDownNotificationMessage pulumi.StringInput `pulumi:"rampDownNotificationMessage"`
// The time at which Ramp-Down scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.
RampDownStartTime pulumi.StringInput `pulumi:"rampDownStartTime"`
// Controls Session Host shutdown behaviour during Ramp-Down period. Session Hosts can either be shutdown when all sessions on the Session Host have ended, or when there are no Active sessions left on the Session Host. Possible values are `ZeroSessions` and `ZeroActiveSessions`.
RampDownStopHostsWhen pulumi.StringInput `pulumi:"rampDownStopHostsWhen"`
// The number of minutes during Ramp-Down period that autoscale will wait after setting the session host VMs to drain mode, notifying any currently signed in users to save their work before forcing the users to logoff. Once all user sessions on the session host VM have been logged off, Autoscale will shut down the VM.
RampDownWaitTimeMinutes pulumi.IntInput `pulumi:"rampDownWaitTimeMinutes"`
// This is the value of percentage of used host pool capacity that will be considered to evaluate whether to turn on/off virtual machines during the ramp-up and peak hours. For example, if capacity threshold is specified as `60%` and your total host pool capacity is `100` sessions, autoscale will turn on additional session hosts once the host pool exceeds a load of `60` sessions.
RampUpCapacityThresholdPercent pulumi.IntPtrInput `pulumi:"rampUpCapacityThresholdPercent"`
// The load Balancing Algorithm to use during the Ramp-Up period. Possible values are `DepthFirst` and `BreadthFirst`.
RampUpLoadBalancingAlgorithm pulumi.StringInput `pulumi:"rampUpLoadBalancingAlgorithm"`
// Specifies the minimum percentage of session host virtual machines to start during ramp-up for peak hours. For example, if Minimum percentage of hosts is specified as `10%` and total number of session hosts in your host pool is `10`, autoscale will ensure a minimum of `1` session host is available to take user connections.
RampUpMinimumHostsPercent pulumi.IntPtrInput `pulumi:"rampUpMinimumHostsPercent"`
// The time at which Ramp-Up scaling will begin. This is also the end-time for the Ramp-Up period. The time must be specified in "HH:MM" format.
RampUpStartTime pulumi.StringInput `pulumi:"rampUpStartTime"`
}
func (ScalingPlanScheduleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ScalingPlanSchedule)(nil)).Elem()
}
func (i ScalingPlanScheduleArgs) ToScalingPlanScheduleOutput() ScalingPlanScheduleOutput {
return i.ToScalingPlanScheduleOutputWithContext(context.Background())
}
func (i ScalingPlanScheduleArgs) ToScalingPlanScheduleOutputWithContext(ctx context.Context) ScalingPlanScheduleOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScalingPlanScheduleOutput)
}
| 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/desktopvirtualization/applicationGroup.go | sdk/go/azure/desktopvirtualization/applicationGroup.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package desktopvirtualization
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Virtual Desktop Application Group.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/desktopvirtualization"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("rg-example-virtualdesktop"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// pooledbreadthfirst, err := desktopvirtualization.NewHostPool(ctx, "pooledbreadthfirst", &desktopvirtualization.HostPoolArgs{
// Name: pulumi.String("pooledbreadthfirst"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Type: pulumi.String("Pooled"),
// LoadBalancerType: pulumi.String("BreadthFirst"),
// })
// if err != nil {
// return err
// }
// personalautomatic, err := desktopvirtualization.NewHostPool(ctx, "personalautomatic", &desktopvirtualization.HostPoolArgs{
// Name: pulumi.String("personalautomatic"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Type: pulumi.String("Personal"),
// PersonalDesktopAssignmentType: pulumi.String("Automatic"),
// LoadBalancerType: pulumi.String("BreadthFirst"),
// })
// if err != nil {
// return err
// }
// _, err = desktopvirtualization.NewApplicationGroup(ctx, "remoteapp", &desktopvirtualization.ApplicationGroupArgs{
// Name: pulumi.String("acctag"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Type: pulumi.String("RemoteApp"),
// HostPoolId: pooledbreadthfirst.ID(),
// FriendlyName: pulumi.String("TestAppGroup"),
// Description: pulumi.String("Acceptance Test: An application group"),
// })
// if err != nil {
// return err
// }
// _, err = desktopvirtualization.NewApplicationGroup(ctx, "desktopapp", &desktopvirtualization.ApplicationGroupArgs{
// Name: pulumi.String("appgroupdesktop"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Type: pulumi.String("Desktop"),
// HostPoolId: personalautomatic.ID(),
// FriendlyName: pulumi.String("TestAppGroup"),
// Description: pulumi.String("Acceptance Test: An application group"),
// })
// 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.DesktopVirtualization` - 2024-04-03
//
// ## Import
//
// Virtual Desktop Application Groups can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:desktopvirtualization/applicationGroup:ApplicationGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/myapplicationgroup
// ```
type ApplicationGroup struct {
pulumi.CustomResourceState
// Option to set the display name for the default sessionDesktop desktop when `type` is set to `Desktop`. A value here is mandatory for connections to the desktop using the Windows 365 portal. Without it the connection will hang at 'Loading Client'.
DefaultDesktopDisplayName pulumi.StringPtrOutput `pulumi:"defaultDesktopDisplayName"`
// Option to set a description for the Virtual Desktop Application Group.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Option to set a friendly name for the Virtual Desktop Application Group.
FriendlyName pulumi.StringPtrOutput `pulumi:"friendlyName"`
// Resource ID for a Virtual Desktop Host Pool to associate with the Virtual Desktop Application Group. Changing the name forces a new resource to be created.
HostPoolId pulumi.StringOutput `pulumi:"hostPoolId"`
// The location/region where the Virtual Desktop Application Group is located. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the Virtual Desktop Application Group. Changing the name forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the resource group in which to create the Virtual Desktop Application Group. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Type of Virtual Desktop Application Group. Valid options are `RemoteApp` or `Desktop` application groups. Changing this forces a new resource to be created.
Type pulumi.StringOutput `pulumi:"type"`
}
// NewApplicationGroup registers a new resource with the given unique name, arguments, and options.
func NewApplicationGroup(ctx *pulumi.Context,
name string, args *ApplicationGroupArgs, opts ...pulumi.ResourceOption) (*ApplicationGroup, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.HostPoolId == nil {
return nil, errors.New("invalid value for required argument 'HostPoolId'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Type == nil {
return nil, errors.New("invalid value for required argument 'Type'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ApplicationGroup
err := ctx.RegisterResource("azure:desktopvirtualization/applicationGroup:ApplicationGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApplicationGroup gets an existing ApplicationGroup resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetApplicationGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApplicationGroupState, opts ...pulumi.ResourceOption) (*ApplicationGroup, error) {
var resource ApplicationGroup
err := ctx.ReadResource("azure:desktopvirtualization/applicationGroup:ApplicationGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ApplicationGroup resources.
type applicationGroupState struct {
// Option to set the display name for the default sessionDesktop desktop when `type` is set to `Desktop`. A value here is mandatory for connections to the desktop using the Windows 365 portal. Without it the connection will hang at 'Loading Client'.
DefaultDesktopDisplayName *string `pulumi:"defaultDesktopDisplayName"`
// Option to set a description for the Virtual Desktop Application Group.
Description *string `pulumi:"description"`
// Option to set a friendly name for the Virtual Desktop Application Group.
FriendlyName *string `pulumi:"friendlyName"`
// Resource ID for a Virtual Desktop Host Pool to associate with the Virtual Desktop Application Group. Changing the name forces a new resource to be created.
HostPoolId *string `pulumi:"hostPoolId"`
// The location/region where the Virtual Desktop Application Group is located. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Virtual Desktop Application Group. Changing the name forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the Virtual Desktop Application Group. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// Type of Virtual Desktop Application Group. Valid options are `RemoteApp` or `Desktop` application groups. Changing this forces a new resource to be created.
Type *string `pulumi:"type"`
}
type ApplicationGroupState struct {
// Option to set the display name for the default sessionDesktop desktop when `type` is set to `Desktop`. A value here is mandatory for connections to the desktop using the Windows 365 portal. Without it the connection will hang at 'Loading Client'.
DefaultDesktopDisplayName pulumi.StringPtrInput
// Option to set a description for the Virtual Desktop Application Group.
Description pulumi.StringPtrInput
// Option to set a friendly name for the Virtual Desktop Application Group.
FriendlyName pulumi.StringPtrInput
// Resource ID for a Virtual Desktop Host Pool to associate with the Virtual Desktop Application Group. Changing the name forces a new resource to be created.
HostPoolId pulumi.StringPtrInput
// The location/region where the Virtual Desktop Application Group is located. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Virtual Desktop Application Group. Changing the name forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the Virtual Desktop Application Group. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// Type of Virtual Desktop Application Group. Valid options are `RemoteApp` or `Desktop` application groups. Changing this forces a new resource to be created.
Type pulumi.StringPtrInput
}
func (ApplicationGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*applicationGroupState)(nil)).Elem()
}
type applicationGroupArgs struct {
// Option to set the display name for the default sessionDesktop desktop when `type` is set to `Desktop`. A value here is mandatory for connections to the desktop using the Windows 365 portal. Without it the connection will hang at 'Loading Client'.
DefaultDesktopDisplayName *string `pulumi:"defaultDesktopDisplayName"`
// Option to set a description for the Virtual Desktop Application Group.
Description *string `pulumi:"description"`
// Option to set a friendly name for the Virtual Desktop Application Group.
FriendlyName *string `pulumi:"friendlyName"`
// Resource ID for a Virtual Desktop Host Pool to associate with the Virtual Desktop Application Group. Changing the name forces a new resource to be created.
HostPoolId string `pulumi:"hostPoolId"`
// The location/region where the Virtual Desktop Application Group is located. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Virtual Desktop Application Group. Changing the name forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the resource group in which to create the Virtual Desktop Application Group. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// Type of Virtual Desktop Application Group. Valid options are `RemoteApp` or `Desktop` application groups. Changing this forces a new resource to be created.
Type string `pulumi:"type"`
}
// The set of arguments for constructing a ApplicationGroup resource.
type ApplicationGroupArgs struct {
// Option to set the display name for the default sessionDesktop desktop when `type` is set to `Desktop`. A value here is mandatory for connections to the desktop using the Windows 365 portal. Without it the connection will hang at 'Loading Client'.
DefaultDesktopDisplayName pulumi.StringPtrInput
// Option to set a description for the Virtual Desktop Application Group.
Description pulumi.StringPtrInput
// Option to set a friendly name for the Virtual Desktop Application Group.
FriendlyName pulumi.StringPtrInput
// Resource ID for a Virtual Desktop Host Pool to associate with the Virtual Desktop Application Group. Changing the name forces a new resource to be created.
HostPoolId pulumi.StringInput
// The location/region where the Virtual Desktop Application Group is located. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Virtual Desktop Application Group. Changing the name forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the resource group in which to create the Virtual Desktop Application Group. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// Type of Virtual Desktop Application Group. Valid options are `RemoteApp` or `Desktop` application groups. Changing this forces a new resource to be created.
Type pulumi.StringInput
}
func (ApplicationGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*applicationGroupArgs)(nil)).Elem()
}
type ApplicationGroupInput interface {
pulumi.Input
ToApplicationGroupOutput() ApplicationGroupOutput
ToApplicationGroupOutputWithContext(ctx context.Context) ApplicationGroupOutput
}
func (*ApplicationGroup) ElementType() reflect.Type {
return reflect.TypeOf((**ApplicationGroup)(nil)).Elem()
}
func (i *ApplicationGroup) ToApplicationGroupOutput() ApplicationGroupOutput {
return i.ToApplicationGroupOutputWithContext(context.Background())
}
func (i *ApplicationGroup) ToApplicationGroupOutputWithContext(ctx context.Context) ApplicationGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationGroupOutput)
}
// ApplicationGroupArrayInput is an input type that accepts ApplicationGroupArray and ApplicationGroupArrayOutput values.
// You can construct a concrete instance of `ApplicationGroupArrayInput` via:
//
// ApplicationGroupArray{ ApplicationGroupArgs{...} }
type ApplicationGroupArrayInput interface {
pulumi.Input
ToApplicationGroupArrayOutput() ApplicationGroupArrayOutput
ToApplicationGroupArrayOutputWithContext(context.Context) ApplicationGroupArrayOutput
}
type ApplicationGroupArray []ApplicationGroupInput
func (ApplicationGroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApplicationGroup)(nil)).Elem()
}
func (i ApplicationGroupArray) ToApplicationGroupArrayOutput() ApplicationGroupArrayOutput {
return i.ToApplicationGroupArrayOutputWithContext(context.Background())
}
func (i ApplicationGroupArray) ToApplicationGroupArrayOutputWithContext(ctx context.Context) ApplicationGroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationGroupArrayOutput)
}
// ApplicationGroupMapInput is an input type that accepts ApplicationGroupMap and ApplicationGroupMapOutput values.
// You can construct a concrete instance of `ApplicationGroupMapInput` via:
//
// ApplicationGroupMap{ "key": ApplicationGroupArgs{...} }
type ApplicationGroupMapInput interface {
pulumi.Input
ToApplicationGroupMapOutput() ApplicationGroupMapOutput
ToApplicationGroupMapOutputWithContext(context.Context) ApplicationGroupMapOutput
}
type ApplicationGroupMap map[string]ApplicationGroupInput
func (ApplicationGroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApplicationGroup)(nil)).Elem()
}
func (i ApplicationGroupMap) ToApplicationGroupMapOutput() ApplicationGroupMapOutput {
return i.ToApplicationGroupMapOutputWithContext(context.Background())
}
func (i ApplicationGroupMap) ToApplicationGroupMapOutputWithContext(ctx context.Context) ApplicationGroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationGroupMapOutput)
}
type ApplicationGroupOutput struct{ *pulumi.OutputState }
func (ApplicationGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApplicationGroup)(nil)).Elem()
}
func (o ApplicationGroupOutput) ToApplicationGroupOutput() ApplicationGroupOutput {
return o
}
func (o ApplicationGroupOutput) ToApplicationGroupOutputWithContext(ctx context.Context) ApplicationGroupOutput {
return o
}
// Option to set the display name for the default sessionDesktop desktop when `type` is set to `Desktop`. A value here is mandatory for connections to the desktop using the Windows 365 portal. Without it the connection will hang at 'Loading Client'.
func (o ApplicationGroupOutput) DefaultDesktopDisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApplicationGroup) pulumi.StringPtrOutput { return v.DefaultDesktopDisplayName }).(pulumi.StringPtrOutput)
}
// Option to set a description for the Virtual Desktop Application Group.
func (o ApplicationGroupOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApplicationGroup) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Option to set a friendly name for the Virtual Desktop Application Group.
func (o ApplicationGroupOutput) FriendlyName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApplicationGroup) pulumi.StringPtrOutput { return v.FriendlyName }).(pulumi.StringPtrOutput)
}
// Resource ID for a Virtual Desktop Host Pool to associate with the Virtual Desktop Application Group. Changing the name forces a new resource to be created.
func (o ApplicationGroupOutput) HostPoolId() pulumi.StringOutput {
return o.ApplyT(func(v *ApplicationGroup) pulumi.StringOutput { return v.HostPoolId }).(pulumi.StringOutput)
}
// The location/region where the Virtual Desktop Application Group is located. Changing this forces a new resource to be created.
func (o ApplicationGroupOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ApplicationGroup) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the Virtual Desktop Application Group. Changing the name forces a new resource to be created.
func (o ApplicationGroupOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ApplicationGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the resource group in which to create the Virtual Desktop Application Group. Changing this forces a new resource to be created.
func (o ApplicationGroupOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ApplicationGroup) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o ApplicationGroupOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ApplicationGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// Type of Virtual Desktop Application Group. Valid options are `RemoteApp` or `Desktop` application groups. Changing this forces a new resource to be created.
func (o ApplicationGroupOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *ApplicationGroup) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
type ApplicationGroupArrayOutput struct{ *pulumi.OutputState }
func (ApplicationGroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApplicationGroup)(nil)).Elem()
}
func (o ApplicationGroupArrayOutput) ToApplicationGroupArrayOutput() ApplicationGroupArrayOutput {
return o
}
func (o ApplicationGroupArrayOutput) ToApplicationGroupArrayOutputWithContext(ctx context.Context) ApplicationGroupArrayOutput {
return o
}
func (o ApplicationGroupArrayOutput) Index(i pulumi.IntInput) ApplicationGroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApplicationGroup {
return vs[0].([]*ApplicationGroup)[vs[1].(int)]
}).(ApplicationGroupOutput)
}
type ApplicationGroupMapOutput struct{ *pulumi.OutputState }
func (ApplicationGroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApplicationGroup)(nil)).Elem()
}
func (o ApplicationGroupMapOutput) ToApplicationGroupMapOutput() ApplicationGroupMapOutput {
return o
}
func (o ApplicationGroupMapOutput) ToApplicationGroupMapOutputWithContext(ctx context.Context) ApplicationGroupMapOutput {
return o
}
func (o ApplicationGroupMapOutput) MapIndex(k pulumi.StringInput) ApplicationGroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApplicationGroup {
return vs[0].(map[string]*ApplicationGroup)[vs[1].(string)]
}).(ApplicationGroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationGroupInput)(nil)).Elem(), &ApplicationGroup{})
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationGroupArrayInput)(nil)).Elem(), ApplicationGroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationGroupMapInput)(nil)).Elem(), ApplicationGroupMap{})
pulumi.RegisterOutputType(ApplicationGroupOutput{})
pulumi.RegisterOutputType(ApplicationGroupArrayOutput{})
pulumi.RegisterOutputType(ApplicationGroupMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/desktopvirtualization/hostPool.go | sdk/go/azure/desktopvirtualization/hostPool.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package desktopvirtualization
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Virtual Desktop Host Pool.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/desktopvirtualization"
// "github.com/pulumi/pulumi/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 = desktopvirtualization.NewHostPool(ctx, "example", &desktopvirtualization.HostPoolArgs{
// Location: example.Location,
// ResourceGroupName: example.Name,
// Name: pulumi.String("pooleddepthfirst"),
// FriendlyName: pulumi.String("pooleddepthfirst"),
// ValidateEnvironment: pulumi.Bool(true),
// StartVmOnConnect: pulumi.Bool(true),
// CustomRdpProperties: pulumi.String("audiocapturemode:i:1;audiomode:i:0;"),
// Description: pulumi.String("Acceptance Test: A pooled host pool - pooleddepthfirst"),
// Type: pulumi.String("Pooled"),
// MaximumSessionsAllowed: pulumi.Int(50),
// LoadBalancerType: pulumi.String("DepthFirst"),
// ScheduledAgentUpdates: &desktopvirtualization.HostPoolScheduledAgentUpdatesArgs{
// Enabled: pulumi.Bool(true),
// Schedules: desktopvirtualization.HostPoolScheduledAgentUpdatesScheduleArray{
// &desktopvirtualization.HostPoolScheduledAgentUpdatesScheduleArgs{
// DayOfWeek: pulumi.String("Saturday"),
// HourOfDay: pulumi.Int(2),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DesktopVirtualization` - 2024-04-03
//
// ## Import
//
// Virtual Desktop Host Pools can be imported using the `resource id`, e.g.
//
// text
//
// ```sh
// $ pulumi import azure:desktopvirtualization/hostPool:HostPool example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/hostPools/myhostpool
// ```
type HostPool struct {
pulumi.CustomResourceState
// A valid custom RDP properties string for the Virtual Desktop Host Pool, available properties can be [found in this article](https://docs.microsoft.com/windows-server/remote/remote-desktop-services/clients/rdp-files).
CustomRdpProperties pulumi.StringPtrOutput `pulumi:"customRdpProperties"`
// A description for the Virtual Desktop Host Pool.
Description pulumi.StringPtrOutput `pulumi:"description"`
// A friendly name for the Virtual Desktop Host Pool.
FriendlyName pulumi.StringPtrOutput `pulumi:"friendlyName"`
// `BreadthFirst` load balancing distributes new user sessions across all available session hosts in the host pool. Possible values are `BreadthFirst`, `DepthFirst` and `Persistent`.
// `DepthFirst` load balancing distributes new user sessions to an available session host with the highest number of connections but has not reached its maximum session limit threshold.
// `Persistent` should be used if the host pool type is `Personal`
LoadBalancerType pulumi.StringOutput `pulumi:"loadBalancerType"`
// The location/region where the Virtual Desktop Host Pool is located. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// A valid integer value from 0 to 999999 for the maximum number of users that have concurrent sessions on a session host.
// Should only be set if the `type` of your Virtual Desktop Host Pool is `Pooled`.
MaximumSessionsAllowed pulumi.IntPtrOutput `pulumi:"maximumSessionsAllowed"`
// The name of the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// `Automatic` assignment – The service will select an available host and assign it to an user. Possible values are `Automatic` and `Direct`. `Direct` Assignment – Admin selects a specific host to assign to an user. Changing this forces a new resource to be created.
//
// > **Note:** `personalDesktopAssignmentType` is required if the `type` of your Virtual Desktop Host Pool is `Personal`
PersonalDesktopAssignmentType pulumi.StringPtrOutput `pulumi:"personalDesktopAssignmentType"`
// Option to specify the preferred Application Group type for the Virtual Desktop Host Pool. Valid options are `None`, `Desktop` or `RailApplications`. Default is `Desktop`.
PreferredAppGroupType pulumi.StringPtrOutput `pulumi:"preferredAppGroupType"`
// Whether public network access is allowed for the Virtual Desktop Host Pool. Possible values are `Enabled`, `Disabled`, `EnabledForClientsOnly` and `EnabledForSessionHostsOnly`. Defaults to `Enabled`.
PublicNetworkAccess pulumi.StringPtrOutput `pulumi:"publicNetworkAccess"`
// The name of the resource group in which to create the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A `scheduledAgentUpdates` block as defined below. This enables control of when Agent Updates will be applied to Session Hosts.
ScheduledAgentUpdates HostPoolScheduledAgentUpdatesPtrOutput `pulumi:"scheduledAgentUpdates"`
// Enables or disables the Start VM on Connection Feature. Defaults to `false`.
StartVmOnConnect pulumi.BoolPtrOutput `pulumi:"startVmOnConnect"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The type of the Virtual Desktop Host Pool. Valid options are `Personal` or `Pooled`. Changing the type forces a new resource to be created.
Type pulumi.StringOutput `pulumi:"type"`
// Allows you to test service changes before they are deployed to production. Defaults to `false`.
ValidateEnvironment pulumi.BoolPtrOutput `pulumi:"validateEnvironment"`
// A VM template for session hosts configuration within hostpool. This is a JSON string.
VmTemplate pulumi.StringPtrOutput `pulumi:"vmTemplate"`
}
// NewHostPool registers a new resource with the given unique name, arguments, and options.
func NewHostPool(ctx *pulumi.Context,
name string, args *HostPoolArgs, opts ...pulumi.ResourceOption) (*HostPool, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.LoadBalancerType == nil {
return nil, errors.New("invalid value for required argument 'LoadBalancerType'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.Type == nil {
return nil, errors.New("invalid value for required argument 'Type'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource HostPool
err := ctx.RegisterResource("azure:desktopvirtualization/hostPool:HostPool", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetHostPool gets an existing HostPool resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetHostPool(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *HostPoolState, opts ...pulumi.ResourceOption) (*HostPool, error) {
var resource HostPool
err := ctx.ReadResource("azure:desktopvirtualization/hostPool:HostPool", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering HostPool resources.
type hostPoolState struct {
// A valid custom RDP properties string for the Virtual Desktop Host Pool, available properties can be [found in this article](https://docs.microsoft.com/windows-server/remote/remote-desktop-services/clients/rdp-files).
CustomRdpProperties *string `pulumi:"customRdpProperties"`
// A description for the Virtual Desktop Host Pool.
Description *string `pulumi:"description"`
// A friendly name for the Virtual Desktop Host Pool.
FriendlyName *string `pulumi:"friendlyName"`
// `BreadthFirst` load balancing distributes new user sessions across all available session hosts in the host pool. Possible values are `BreadthFirst`, `DepthFirst` and `Persistent`.
// `DepthFirst` load balancing distributes new user sessions to an available session host with the highest number of connections but has not reached its maximum session limit threshold.
// `Persistent` should be used if the host pool type is `Personal`
LoadBalancerType *string `pulumi:"loadBalancerType"`
// The location/region where the Virtual Desktop Host Pool is located. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// A valid integer value from 0 to 999999 for the maximum number of users that have concurrent sessions on a session host.
// Should only be set if the `type` of your Virtual Desktop Host Pool is `Pooled`.
MaximumSessionsAllowed *int `pulumi:"maximumSessionsAllowed"`
// The name of the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// `Automatic` assignment – The service will select an available host and assign it to an user. Possible values are `Automatic` and `Direct`. `Direct` Assignment – Admin selects a specific host to assign to an user. Changing this forces a new resource to be created.
//
// > **Note:** `personalDesktopAssignmentType` is required if the `type` of your Virtual Desktop Host Pool is `Personal`
PersonalDesktopAssignmentType *string `pulumi:"personalDesktopAssignmentType"`
// Option to specify the preferred Application Group type for the Virtual Desktop Host Pool. Valid options are `None`, `Desktop` or `RailApplications`. Default is `Desktop`.
PreferredAppGroupType *string `pulumi:"preferredAppGroupType"`
// Whether public network access is allowed for the Virtual Desktop Host Pool. Possible values are `Enabled`, `Disabled`, `EnabledForClientsOnly` and `EnabledForSessionHostsOnly`. Defaults to `Enabled`.
PublicNetworkAccess *string `pulumi:"publicNetworkAccess"`
// The name of the resource group in which to create the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A `scheduledAgentUpdates` block as defined below. This enables control of when Agent Updates will be applied to Session Hosts.
ScheduledAgentUpdates *HostPoolScheduledAgentUpdates `pulumi:"scheduledAgentUpdates"`
// Enables or disables the Start VM on Connection Feature. Defaults to `false`.
StartVmOnConnect *bool `pulumi:"startVmOnConnect"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The type of the Virtual Desktop Host Pool. Valid options are `Personal` or `Pooled`. Changing the type forces a new resource to be created.
Type *string `pulumi:"type"`
// Allows you to test service changes before they are deployed to production. Defaults to `false`.
ValidateEnvironment *bool `pulumi:"validateEnvironment"`
// A VM template for session hosts configuration within hostpool. This is a JSON string.
VmTemplate *string `pulumi:"vmTemplate"`
}
type HostPoolState struct {
// A valid custom RDP properties string for the Virtual Desktop Host Pool, available properties can be [found in this article](https://docs.microsoft.com/windows-server/remote/remote-desktop-services/clients/rdp-files).
CustomRdpProperties pulumi.StringPtrInput
// A description for the Virtual Desktop Host Pool.
Description pulumi.StringPtrInput
// A friendly name for the Virtual Desktop Host Pool.
FriendlyName pulumi.StringPtrInput
// `BreadthFirst` load balancing distributes new user sessions across all available session hosts in the host pool. Possible values are `BreadthFirst`, `DepthFirst` and `Persistent`.
// `DepthFirst` load balancing distributes new user sessions to an available session host with the highest number of connections but has not reached its maximum session limit threshold.
// `Persistent` should be used if the host pool type is `Personal`
LoadBalancerType pulumi.StringPtrInput
// The location/region where the Virtual Desktop Host Pool is located. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// A valid integer value from 0 to 999999 for the maximum number of users that have concurrent sessions on a session host.
// Should only be set if the `type` of your Virtual Desktop Host Pool is `Pooled`.
MaximumSessionsAllowed pulumi.IntPtrInput
// The name of the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// `Automatic` assignment – The service will select an available host and assign it to an user. Possible values are `Automatic` and `Direct`. `Direct` Assignment – Admin selects a specific host to assign to an user. Changing this forces a new resource to be created.
//
// > **Note:** `personalDesktopAssignmentType` is required if the `type` of your Virtual Desktop Host Pool is `Personal`
PersonalDesktopAssignmentType pulumi.StringPtrInput
// Option to specify the preferred Application Group type for the Virtual Desktop Host Pool. Valid options are `None`, `Desktop` or `RailApplications`. Default is `Desktop`.
PreferredAppGroupType pulumi.StringPtrInput
// Whether public network access is allowed for the Virtual Desktop Host Pool. Possible values are `Enabled`, `Disabled`, `EnabledForClientsOnly` and `EnabledForSessionHostsOnly`. Defaults to `Enabled`.
PublicNetworkAccess pulumi.StringPtrInput
// The name of the resource group in which to create the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A `scheduledAgentUpdates` block as defined below. This enables control of when Agent Updates will be applied to Session Hosts.
ScheduledAgentUpdates HostPoolScheduledAgentUpdatesPtrInput
// Enables or disables the Start VM on Connection Feature. Defaults to `false`.
StartVmOnConnect pulumi.BoolPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The type of the Virtual Desktop Host Pool. Valid options are `Personal` or `Pooled`. Changing the type forces a new resource to be created.
Type pulumi.StringPtrInput
// Allows you to test service changes before they are deployed to production. Defaults to `false`.
ValidateEnvironment pulumi.BoolPtrInput
// A VM template for session hosts configuration within hostpool. This is a JSON string.
VmTemplate pulumi.StringPtrInput
}
func (HostPoolState) ElementType() reflect.Type {
return reflect.TypeOf((*hostPoolState)(nil)).Elem()
}
type hostPoolArgs struct {
// A valid custom RDP properties string for the Virtual Desktop Host Pool, available properties can be [found in this article](https://docs.microsoft.com/windows-server/remote/remote-desktop-services/clients/rdp-files).
CustomRdpProperties *string `pulumi:"customRdpProperties"`
// A description for the Virtual Desktop Host Pool.
Description *string `pulumi:"description"`
// A friendly name for the Virtual Desktop Host Pool.
FriendlyName *string `pulumi:"friendlyName"`
// `BreadthFirst` load balancing distributes new user sessions across all available session hosts in the host pool. Possible values are `BreadthFirst`, `DepthFirst` and `Persistent`.
// `DepthFirst` load balancing distributes new user sessions to an available session host with the highest number of connections but has not reached its maximum session limit threshold.
// `Persistent` should be used if the host pool type is `Personal`
LoadBalancerType string `pulumi:"loadBalancerType"`
// The location/region where the Virtual Desktop Host Pool is located. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// A valid integer value from 0 to 999999 for the maximum number of users that have concurrent sessions on a session host.
// Should only be set if the `type` of your Virtual Desktop Host Pool is `Pooled`.
MaximumSessionsAllowed *int `pulumi:"maximumSessionsAllowed"`
// The name of the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// `Automatic` assignment – The service will select an available host and assign it to an user. Possible values are `Automatic` and `Direct`. `Direct` Assignment – Admin selects a specific host to assign to an user. Changing this forces a new resource to be created.
//
// > **Note:** `personalDesktopAssignmentType` is required if the `type` of your Virtual Desktop Host Pool is `Personal`
PersonalDesktopAssignmentType *string `pulumi:"personalDesktopAssignmentType"`
// Option to specify the preferred Application Group type for the Virtual Desktop Host Pool. Valid options are `None`, `Desktop` or `RailApplications`. Default is `Desktop`.
PreferredAppGroupType *string `pulumi:"preferredAppGroupType"`
// Whether public network access is allowed for the Virtual Desktop Host Pool. Possible values are `Enabled`, `Disabled`, `EnabledForClientsOnly` and `EnabledForSessionHostsOnly`. Defaults to `Enabled`.
PublicNetworkAccess *string `pulumi:"publicNetworkAccess"`
// The name of the resource group in which to create the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `scheduledAgentUpdates` block as defined below. This enables control of when Agent Updates will be applied to Session Hosts.
ScheduledAgentUpdates *HostPoolScheduledAgentUpdates `pulumi:"scheduledAgentUpdates"`
// Enables or disables the Start VM on Connection Feature. Defaults to `false`.
StartVmOnConnect *bool `pulumi:"startVmOnConnect"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The type of the Virtual Desktop Host Pool. Valid options are `Personal` or `Pooled`. Changing the type forces a new resource to be created.
Type string `pulumi:"type"`
// Allows you to test service changes before they are deployed to production. Defaults to `false`.
ValidateEnvironment *bool `pulumi:"validateEnvironment"`
// A VM template for session hosts configuration within hostpool. This is a JSON string.
VmTemplate *string `pulumi:"vmTemplate"`
}
// The set of arguments for constructing a HostPool resource.
type HostPoolArgs struct {
// A valid custom RDP properties string for the Virtual Desktop Host Pool, available properties can be [found in this article](https://docs.microsoft.com/windows-server/remote/remote-desktop-services/clients/rdp-files).
CustomRdpProperties pulumi.StringPtrInput
// A description for the Virtual Desktop Host Pool.
Description pulumi.StringPtrInput
// A friendly name for the Virtual Desktop Host Pool.
FriendlyName pulumi.StringPtrInput
// `BreadthFirst` load balancing distributes new user sessions across all available session hosts in the host pool. Possible values are `BreadthFirst`, `DepthFirst` and `Persistent`.
// `DepthFirst` load balancing distributes new user sessions to an available session host with the highest number of connections but has not reached its maximum session limit threshold.
// `Persistent` should be used if the host pool type is `Personal`
LoadBalancerType pulumi.StringInput
// The location/region where the Virtual Desktop Host Pool is located. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// A valid integer value from 0 to 999999 for the maximum number of users that have concurrent sessions on a session host.
// Should only be set if the `type` of your Virtual Desktop Host Pool is `Pooled`.
MaximumSessionsAllowed pulumi.IntPtrInput
// The name of the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// `Automatic` assignment – The service will select an available host and assign it to an user. Possible values are `Automatic` and `Direct`. `Direct` Assignment – Admin selects a specific host to assign to an user. Changing this forces a new resource to be created.
//
// > **Note:** `personalDesktopAssignmentType` is required if the `type` of your Virtual Desktop Host Pool is `Personal`
PersonalDesktopAssignmentType pulumi.StringPtrInput
// Option to specify the preferred Application Group type for the Virtual Desktop Host Pool. Valid options are `None`, `Desktop` or `RailApplications`. Default is `Desktop`.
PreferredAppGroupType pulumi.StringPtrInput
// Whether public network access is allowed for the Virtual Desktop Host Pool. Possible values are `Enabled`, `Disabled`, `EnabledForClientsOnly` and `EnabledForSessionHostsOnly`. Defaults to `Enabled`.
PublicNetworkAccess pulumi.StringPtrInput
// The name of the resource group in which to create the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A `scheduledAgentUpdates` block as defined below. This enables control of when Agent Updates will be applied to Session Hosts.
ScheduledAgentUpdates HostPoolScheduledAgentUpdatesPtrInput
// Enables or disables the Start VM on Connection Feature. Defaults to `false`.
StartVmOnConnect pulumi.BoolPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// The type of the Virtual Desktop Host Pool. Valid options are `Personal` or `Pooled`. Changing the type forces a new resource to be created.
Type pulumi.StringInput
// Allows you to test service changes before they are deployed to production. Defaults to `false`.
ValidateEnvironment pulumi.BoolPtrInput
// A VM template for session hosts configuration within hostpool. This is a JSON string.
VmTemplate pulumi.StringPtrInput
}
func (HostPoolArgs) ElementType() reflect.Type {
return reflect.TypeOf((*hostPoolArgs)(nil)).Elem()
}
type HostPoolInput interface {
pulumi.Input
ToHostPoolOutput() HostPoolOutput
ToHostPoolOutputWithContext(ctx context.Context) HostPoolOutput
}
func (*HostPool) ElementType() reflect.Type {
return reflect.TypeOf((**HostPool)(nil)).Elem()
}
func (i *HostPool) ToHostPoolOutput() HostPoolOutput {
return i.ToHostPoolOutputWithContext(context.Background())
}
func (i *HostPool) ToHostPoolOutputWithContext(ctx context.Context) HostPoolOutput {
return pulumi.ToOutputWithContext(ctx, i).(HostPoolOutput)
}
// HostPoolArrayInput is an input type that accepts HostPoolArray and HostPoolArrayOutput values.
// You can construct a concrete instance of `HostPoolArrayInput` via:
//
// HostPoolArray{ HostPoolArgs{...} }
type HostPoolArrayInput interface {
pulumi.Input
ToHostPoolArrayOutput() HostPoolArrayOutput
ToHostPoolArrayOutputWithContext(context.Context) HostPoolArrayOutput
}
type HostPoolArray []HostPoolInput
func (HostPoolArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*HostPool)(nil)).Elem()
}
func (i HostPoolArray) ToHostPoolArrayOutput() HostPoolArrayOutput {
return i.ToHostPoolArrayOutputWithContext(context.Background())
}
func (i HostPoolArray) ToHostPoolArrayOutputWithContext(ctx context.Context) HostPoolArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(HostPoolArrayOutput)
}
// HostPoolMapInput is an input type that accepts HostPoolMap and HostPoolMapOutput values.
// You can construct a concrete instance of `HostPoolMapInput` via:
//
// HostPoolMap{ "key": HostPoolArgs{...} }
type HostPoolMapInput interface {
pulumi.Input
ToHostPoolMapOutput() HostPoolMapOutput
ToHostPoolMapOutputWithContext(context.Context) HostPoolMapOutput
}
type HostPoolMap map[string]HostPoolInput
func (HostPoolMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*HostPool)(nil)).Elem()
}
func (i HostPoolMap) ToHostPoolMapOutput() HostPoolMapOutput {
return i.ToHostPoolMapOutputWithContext(context.Background())
}
func (i HostPoolMap) ToHostPoolMapOutputWithContext(ctx context.Context) HostPoolMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(HostPoolMapOutput)
}
type HostPoolOutput struct{ *pulumi.OutputState }
func (HostPoolOutput) ElementType() reflect.Type {
return reflect.TypeOf((**HostPool)(nil)).Elem()
}
func (o HostPoolOutput) ToHostPoolOutput() HostPoolOutput {
return o
}
func (o HostPoolOutput) ToHostPoolOutputWithContext(ctx context.Context) HostPoolOutput {
return o
}
// A valid custom RDP properties string for the Virtual Desktop Host Pool, available properties can be [found in this article](https://docs.microsoft.com/windows-server/remote/remote-desktop-services/clients/rdp-files).
func (o HostPoolOutput) CustomRdpProperties() pulumi.StringPtrOutput {
return o.ApplyT(func(v *HostPool) pulumi.StringPtrOutput { return v.CustomRdpProperties }).(pulumi.StringPtrOutput)
}
// A description for the Virtual Desktop Host Pool.
func (o HostPoolOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *HostPool) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// A friendly name for the Virtual Desktop Host Pool.
func (o HostPoolOutput) FriendlyName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *HostPool) pulumi.StringPtrOutput { return v.FriendlyName }).(pulumi.StringPtrOutput)
}
// `BreadthFirst` load balancing distributes new user sessions across all available session hosts in the host pool. Possible values are `BreadthFirst`, `DepthFirst` and `Persistent`.
// `DepthFirst` load balancing distributes new user sessions to an available session host with the highest number of connections but has not reached its maximum session limit threshold.
// `Persistent` should be used if the host pool type is `Personal`
func (o HostPoolOutput) LoadBalancerType() pulumi.StringOutput {
return o.ApplyT(func(v *HostPool) pulumi.StringOutput { return v.LoadBalancerType }).(pulumi.StringOutput)
}
// The location/region where the Virtual Desktop Host Pool is located. Changing this forces a new resource to be created.
func (o HostPoolOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *HostPool) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// A valid integer value from 0 to 999999 for the maximum number of users that have concurrent sessions on a session host.
// Should only be set if the `type` of your Virtual Desktop Host Pool is `Pooled`.
func (o HostPoolOutput) MaximumSessionsAllowed() pulumi.IntPtrOutput {
return o.ApplyT(func(v *HostPool) pulumi.IntPtrOutput { return v.MaximumSessionsAllowed }).(pulumi.IntPtrOutput)
}
// The name of the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
func (o HostPoolOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *HostPool) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// `Automatic` assignment – The service will select an available host and assign it to an user. Possible values are `Automatic` and `Direct`. `Direct` Assignment – Admin selects a specific host to assign to an user. Changing this forces a new resource to be created.
//
// > **Note:** `personalDesktopAssignmentType` is required if the `type` of your Virtual Desktop Host Pool is `Personal`
func (o HostPoolOutput) PersonalDesktopAssignmentType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *HostPool) pulumi.StringPtrOutput { return v.PersonalDesktopAssignmentType }).(pulumi.StringPtrOutput)
}
// Option to specify the preferred Application Group type for the Virtual Desktop Host Pool. Valid options are `None`, `Desktop` or `RailApplications`. Default is `Desktop`.
func (o HostPoolOutput) PreferredAppGroupType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *HostPool) pulumi.StringPtrOutput { return v.PreferredAppGroupType }).(pulumi.StringPtrOutput)
}
// Whether public network access is allowed for the Virtual Desktop Host Pool. Possible values are `Enabled`, `Disabled`, `EnabledForClientsOnly` and `EnabledForSessionHostsOnly`. Defaults to `Enabled`.
func (o HostPoolOutput) PublicNetworkAccess() pulumi.StringPtrOutput {
return o.ApplyT(func(v *HostPool) pulumi.StringPtrOutput { return v.PublicNetworkAccess }).(pulumi.StringPtrOutput)
}
// The name of the resource group in which to create the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
func (o HostPoolOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *HostPool) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A `scheduledAgentUpdates` block as defined below. This enables control of when Agent Updates will be applied to Session Hosts.
func (o HostPoolOutput) ScheduledAgentUpdates() HostPoolScheduledAgentUpdatesPtrOutput {
return o.ApplyT(func(v *HostPool) HostPoolScheduledAgentUpdatesPtrOutput { return v.ScheduledAgentUpdates }).(HostPoolScheduledAgentUpdatesPtrOutput)
}
// Enables or disables the Start VM on Connection Feature. Defaults to `false`.
func (o HostPoolOutput) StartVmOnConnect() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *HostPool) pulumi.BoolPtrOutput { return v.StartVmOnConnect }).(pulumi.BoolPtrOutput)
}
// A mapping of tags to assign to the resource.
func (o HostPoolOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *HostPool) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The type of the Virtual Desktop Host Pool. Valid options are `Personal` or `Pooled`. Changing the type forces a new resource to be created.
func (o HostPoolOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *HostPool) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
// Allows you to test service changes before they are deployed to production. Defaults to `false`.
func (o HostPoolOutput) ValidateEnvironment() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *HostPool) pulumi.BoolPtrOutput { return v.ValidateEnvironment }).(pulumi.BoolPtrOutput)
}
// A VM template for session hosts configuration within hostpool. This is a JSON string.
func (o HostPoolOutput) VmTemplate() pulumi.StringPtrOutput {
return o.ApplyT(func(v *HostPool) pulumi.StringPtrOutput { return v.VmTemplate }).(pulumi.StringPtrOutput)
}
type HostPoolArrayOutput struct{ *pulumi.OutputState }
func (HostPoolArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*HostPool)(nil)).Elem()
}
func (o HostPoolArrayOutput) ToHostPoolArrayOutput() HostPoolArrayOutput {
return o
}
func (o HostPoolArrayOutput) ToHostPoolArrayOutputWithContext(ctx context.Context) HostPoolArrayOutput {
return o
}
func (o HostPoolArrayOutput) Index(i pulumi.IntInput) HostPoolOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *HostPool {
return vs[0].([]*HostPool)[vs[1].(int)]
}).(HostPoolOutput)
}
type HostPoolMapOutput struct{ *pulumi.OutputState }
func (HostPoolMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*HostPool)(nil)).Elem()
}
func (o HostPoolMapOutput) ToHostPoolMapOutput() HostPoolMapOutput {
return o
}
func (o HostPoolMapOutput) ToHostPoolMapOutputWithContext(ctx context.Context) HostPoolMapOutput {
return o
}
func (o HostPoolMapOutput) MapIndex(k pulumi.StringInput) HostPoolOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *HostPool {
return vs[0].(map[string]*HostPool)[vs[1].(string)]
}).(HostPoolOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*HostPoolInput)(nil)).Elem(), &HostPool{})
pulumi.RegisterInputType(reflect.TypeOf((*HostPoolArrayInput)(nil)).Elem(), HostPoolArray{})
pulumi.RegisterInputType(reflect.TypeOf((*HostPoolMapInput)(nil)).Elem(), HostPoolMap{})
pulumi.RegisterOutputType(HostPoolOutput{})
pulumi.RegisterOutputType(HostPoolArrayOutput{})
pulumi.RegisterOutputType(HostPoolMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/desktopvirtualization/scalingPlanHostPoolAssociation.go | sdk/go/azure/desktopvirtualization/scalingPlanHostPoolAssociation.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package desktopvirtualization
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Virtual Desktop Scaling Plan Host Pool Association.
//
// ## Import
//
// Associations between Virtual Desktop Scaling Plans and Virtual Desktop Host Pools can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:desktopvirtualization/scalingPlanHostPoolAssociation:ScalingPlanHostPoolAssociation example "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/plan1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/hostPools/myhostpool"
// ```
type ScalingPlanHostPoolAssociation struct {
pulumi.CustomResourceState
// Should the Scaling Plan be enabled on this Host Pool.
Enabled pulumi.BoolOutput `pulumi:"enabled"`
// The resource ID for the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
HostPoolId pulumi.StringOutput `pulumi:"hostPoolId"`
// The resource ID for the Virtual Desktop Scaling Plan. Changing this forces a new resource to be created.
ScalingPlanId pulumi.StringOutput `pulumi:"scalingPlanId"`
}
// NewScalingPlanHostPoolAssociation registers a new resource with the given unique name, arguments, and options.
func NewScalingPlanHostPoolAssociation(ctx *pulumi.Context,
name string, args *ScalingPlanHostPoolAssociationArgs, opts ...pulumi.ResourceOption) (*ScalingPlanHostPoolAssociation, 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.HostPoolId == nil {
return nil, errors.New("invalid value for required argument 'HostPoolId'")
}
if args.ScalingPlanId == nil {
return nil, errors.New("invalid value for required argument 'ScalingPlanId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ScalingPlanHostPoolAssociation
err := ctx.RegisterResource("azure:desktopvirtualization/scalingPlanHostPoolAssociation:ScalingPlanHostPoolAssociation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetScalingPlanHostPoolAssociation gets an existing ScalingPlanHostPoolAssociation resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetScalingPlanHostPoolAssociation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ScalingPlanHostPoolAssociationState, opts ...pulumi.ResourceOption) (*ScalingPlanHostPoolAssociation, error) {
var resource ScalingPlanHostPoolAssociation
err := ctx.ReadResource("azure:desktopvirtualization/scalingPlanHostPoolAssociation:ScalingPlanHostPoolAssociation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ScalingPlanHostPoolAssociation resources.
type scalingPlanHostPoolAssociationState struct {
// Should the Scaling Plan be enabled on this Host Pool.
Enabled *bool `pulumi:"enabled"`
// The resource ID for the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
HostPoolId *string `pulumi:"hostPoolId"`
// The resource ID for the Virtual Desktop Scaling Plan. Changing this forces a new resource to be created.
ScalingPlanId *string `pulumi:"scalingPlanId"`
}
type ScalingPlanHostPoolAssociationState struct {
// Should the Scaling Plan be enabled on this Host Pool.
Enabled pulumi.BoolPtrInput
// The resource ID for the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
HostPoolId pulumi.StringPtrInput
// The resource ID for the Virtual Desktop Scaling Plan. Changing this forces a new resource to be created.
ScalingPlanId pulumi.StringPtrInput
}
func (ScalingPlanHostPoolAssociationState) ElementType() reflect.Type {
return reflect.TypeOf((*scalingPlanHostPoolAssociationState)(nil)).Elem()
}
type scalingPlanHostPoolAssociationArgs struct {
// Should the Scaling Plan be enabled on this Host Pool.
Enabled bool `pulumi:"enabled"`
// The resource ID for the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
HostPoolId string `pulumi:"hostPoolId"`
// The resource ID for the Virtual Desktop Scaling Plan. Changing this forces a new resource to be created.
ScalingPlanId string `pulumi:"scalingPlanId"`
}
// The set of arguments for constructing a ScalingPlanHostPoolAssociation resource.
type ScalingPlanHostPoolAssociationArgs struct {
// Should the Scaling Plan be enabled on this Host Pool.
Enabled pulumi.BoolInput
// The resource ID for the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
HostPoolId pulumi.StringInput
// The resource ID for the Virtual Desktop Scaling Plan. Changing this forces a new resource to be created.
ScalingPlanId pulumi.StringInput
}
func (ScalingPlanHostPoolAssociationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*scalingPlanHostPoolAssociationArgs)(nil)).Elem()
}
type ScalingPlanHostPoolAssociationInput interface {
pulumi.Input
ToScalingPlanHostPoolAssociationOutput() ScalingPlanHostPoolAssociationOutput
ToScalingPlanHostPoolAssociationOutputWithContext(ctx context.Context) ScalingPlanHostPoolAssociationOutput
}
func (*ScalingPlanHostPoolAssociation) ElementType() reflect.Type {
return reflect.TypeOf((**ScalingPlanHostPoolAssociation)(nil)).Elem()
}
func (i *ScalingPlanHostPoolAssociation) ToScalingPlanHostPoolAssociationOutput() ScalingPlanHostPoolAssociationOutput {
return i.ToScalingPlanHostPoolAssociationOutputWithContext(context.Background())
}
func (i *ScalingPlanHostPoolAssociation) ToScalingPlanHostPoolAssociationOutputWithContext(ctx context.Context) ScalingPlanHostPoolAssociationOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScalingPlanHostPoolAssociationOutput)
}
// ScalingPlanHostPoolAssociationArrayInput is an input type that accepts ScalingPlanHostPoolAssociationArray and ScalingPlanHostPoolAssociationArrayOutput values.
// You can construct a concrete instance of `ScalingPlanHostPoolAssociationArrayInput` via:
//
// ScalingPlanHostPoolAssociationArray{ ScalingPlanHostPoolAssociationArgs{...} }
type ScalingPlanHostPoolAssociationArrayInput interface {
pulumi.Input
ToScalingPlanHostPoolAssociationArrayOutput() ScalingPlanHostPoolAssociationArrayOutput
ToScalingPlanHostPoolAssociationArrayOutputWithContext(context.Context) ScalingPlanHostPoolAssociationArrayOutput
}
type ScalingPlanHostPoolAssociationArray []ScalingPlanHostPoolAssociationInput
func (ScalingPlanHostPoolAssociationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ScalingPlanHostPoolAssociation)(nil)).Elem()
}
func (i ScalingPlanHostPoolAssociationArray) ToScalingPlanHostPoolAssociationArrayOutput() ScalingPlanHostPoolAssociationArrayOutput {
return i.ToScalingPlanHostPoolAssociationArrayOutputWithContext(context.Background())
}
func (i ScalingPlanHostPoolAssociationArray) ToScalingPlanHostPoolAssociationArrayOutputWithContext(ctx context.Context) ScalingPlanHostPoolAssociationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScalingPlanHostPoolAssociationArrayOutput)
}
// ScalingPlanHostPoolAssociationMapInput is an input type that accepts ScalingPlanHostPoolAssociationMap and ScalingPlanHostPoolAssociationMapOutput values.
// You can construct a concrete instance of `ScalingPlanHostPoolAssociationMapInput` via:
//
// ScalingPlanHostPoolAssociationMap{ "key": ScalingPlanHostPoolAssociationArgs{...} }
type ScalingPlanHostPoolAssociationMapInput interface {
pulumi.Input
ToScalingPlanHostPoolAssociationMapOutput() ScalingPlanHostPoolAssociationMapOutput
ToScalingPlanHostPoolAssociationMapOutputWithContext(context.Context) ScalingPlanHostPoolAssociationMapOutput
}
type ScalingPlanHostPoolAssociationMap map[string]ScalingPlanHostPoolAssociationInput
func (ScalingPlanHostPoolAssociationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ScalingPlanHostPoolAssociation)(nil)).Elem()
}
func (i ScalingPlanHostPoolAssociationMap) ToScalingPlanHostPoolAssociationMapOutput() ScalingPlanHostPoolAssociationMapOutput {
return i.ToScalingPlanHostPoolAssociationMapOutputWithContext(context.Background())
}
func (i ScalingPlanHostPoolAssociationMap) ToScalingPlanHostPoolAssociationMapOutputWithContext(ctx context.Context) ScalingPlanHostPoolAssociationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScalingPlanHostPoolAssociationMapOutput)
}
type ScalingPlanHostPoolAssociationOutput struct{ *pulumi.OutputState }
func (ScalingPlanHostPoolAssociationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ScalingPlanHostPoolAssociation)(nil)).Elem()
}
func (o ScalingPlanHostPoolAssociationOutput) ToScalingPlanHostPoolAssociationOutput() ScalingPlanHostPoolAssociationOutput {
return o
}
func (o ScalingPlanHostPoolAssociationOutput) ToScalingPlanHostPoolAssociationOutputWithContext(ctx context.Context) ScalingPlanHostPoolAssociationOutput {
return o
}
// Should the Scaling Plan be enabled on this Host Pool.
func (o ScalingPlanHostPoolAssociationOutput) Enabled() pulumi.BoolOutput {
return o.ApplyT(func(v *ScalingPlanHostPoolAssociation) pulumi.BoolOutput { return v.Enabled }).(pulumi.BoolOutput)
}
// The resource ID for the Virtual Desktop Host Pool. Changing this forces a new resource to be created.
func (o ScalingPlanHostPoolAssociationOutput) HostPoolId() pulumi.StringOutput {
return o.ApplyT(func(v *ScalingPlanHostPoolAssociation) pulumi.StringOutput { return v.HostPoolId }).(pulumi.StringOutput)
}
// The resource ID for the Virtual Desktop Scaling Plan. Changing this forces a new resource to be created.
func (o ScalingPlanHostPoolAssociationOutput) ScalingPlanId() pulumi.StringOutput {
return o.ApplyT(func(v *ScalingPlanHostPoolAssociation) pulumi.StringOutput { return v.ScalingPlanId }).(pulumi.StringOutput)
}
type ScalingPlanHostPoolAssociationArrayOutput struct{ *pulumi.OutputState }
func (ScalingPlanHostPoolAssociationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ScalingPlanHostPoolAssociation)(nil)).Elem()
}
func (o ScalingPlanHostPoolAssociationArrayOutput) ToScalingPlanHostPoolAssociationArrayOutput() ScalingPlanHostPoolAssociationArrayOutput {
return o
}
func (o ScalingPlanHostPoolAssociationArrayOutput) ToScalingPlanHostPoolAssociationArrayOutputWithContext(ctx context.Context) ScalingPlanHostPoolAssociationArrayOutput {
return o
}
func (o ScalingPlanHostPoolAssociationArrayOutput) Index(i pulumi.IntInput) ScalingPlanHostPoolAssociationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ScalingPlanHostPoolAssociation {
return vs[0].([]*ScalingPlanHostPoolAssociation)[vs[1].(int)]
}).(ScalingPlanHostPoolAssociationOutput)
}
type ScalingPlanHostPoolAssociationMapOutput struct{ *pulumi.OutputState }
func (ScalingPlanHostPoolAssociationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ScalingPlanHostPoolAssociation)(nil)).Elem()
}
func (o ScalingPlanHostPoolAssociationMapOutput) ToScalingPlanHostPoolAssociationMapOutput() ScalingPlanHostPoolAssociationMapOutput {
return o
}
func (o ScalingPlanHostPoolAssociationMapOutput) ToScalingPlanHostPoolAssociationMapOutputWithContext(ctx context.Context) ScalingPlanHostPoolAssociationMapOutput {
return o
}
func (o ScalingPlanHostPoolAssociationMapOutput) MapIndex(k pulumi.StringInput) ScalingPlanHostPoolAssociationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ScalingPlanHostPoolAssociation {
return vs[0].(map[string]*ScalingPlanHostPoolAssociation)[vs[1].(string)]
}).(ScalingPlanHostPoolAssociationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ScalingPlanHostPoolAssociationInput)(nil)).Elem(), &ScalingPlanHostPoolAssociation{})
pulumi.RegisterInputType(reflect.TypeOf((*ScalingPlanHostPoolAssociationArrayInput)(nil)).Elem(), ScalingPlanHostPoolAssociationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ScalingPlanHostPoolAssociationMapInput)(nil)).Elem(), ScalingPlanHostPoolAssociationMap{})
pulumi.RegisterOutputType(ScalingPlanHostPoolAssociationOutput{})
pulumi.RegisterOutputType(ScalingPlanHostPoolAssociationArrayOutput{})
pulumi.RegisterOutputType(ScalingPlanHostPoolAssociationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/desktopvirtualization/scalingPlan.go | sdk/go/azure/desktopvirtualization/scalingPlan.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package desktopvirtualization
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Virtual Desktop Scaling Plan.
//
// ## Disclaimers
//
// > **Note:** Scaling Plans are currently in preview and are only supported in a limited number of regions. Both the Scaling Plan and any referenced Host Pools must be deployed in a supported region. [Autoscale (preview) for Azure Virtual Desktop host pools](https://docs.microsoft.com/azure/virtual-desktop/autoscale-scaling-plan).
//
// > **Note:** Scaling Plans require specific permissions to be granted to the Windows Virtual Desktop application before a 'host_pool' can be configured. [Required Permissions for Scaling Plans](https://docs.microsoft.com/azure/virtual-desktop/autoscale-scaling-plan#create-a-custom-rbac-role).
//
// ## Import
//
// Virtual Desktop Scaling Plans can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:desktopvirtualization/scalingPlan:ScalingPlan example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DesktopVirtualization/scalingPlans/plan1
// ```
type ScalingPlan struct {
pulumi.CustomResourceState
// A description of the Scaling Plan.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The name of the tag associated with the VMs you want to exclude from autoscaling.
ExclusionTag pulumi.StringPtrOutput `pulumi:"exclusionTag"`
// Friendly name of the Scaling Plan.
FriendlyName pulumi.StringPtrOutput `pulumi:"friendlyName"`
// One or more `hostPool` blocks as defined below.
HostPools ScalingPlanHostPoolArrayOutput `pulumi:"hostPools"`
// The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// One or more `schedule` blocks as defined below.
Schedules ScalingPlanScheduleArrayOutput `pulumi:"schedules"`
// A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .
Tags pulumi.StringMapOutput `pulumi:"tags"`
// Specifies the Time Zone which should be used by the Scaling Plan for time based events, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).
TimeZone pulumi.StringOutput `pulumi:"timeZone"`
}
// NewScalingPlan registers a new resource with the given unique name, arguments, and options.
func NewScalingPlan(ctx *pulumi.Context,
name string, args *ScalingPlanArgs, opts ...pulumi.ResourceOption) (*ScalingPlan, 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.Schedules == nil {
return nil, errors.New("invalid value for required argument 'Schedules'")
}
if args.TimeZone == nil {
return nil, errors.New("invalid value for required argument 'TimeZone'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ScalingPlan
err := ctx.RegisterResource("azure:desktopvirtualization/scalingPlan:ScalingPlan", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetScalingPlan gets an existing ScalingPlan resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetScalingPlan(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ScalingPlanState, opts ...pulumi.ResourceOption) (*ScalingPlan, error) {
var resource ScalingPlan
err := ctx.ReadResource("azure:desktopvirtualization/scalingPlan:ScalingPlan", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ScalingPlan resources.
type scalingPlanState struct {
// A description of the Scaling Plan.
Description *string `pulumi:"description"`
// The name of the tag associated with the VMs you want to exclude from autoscaling.
ExclusionTag *string `pulumi:"exclusionTag"`
// Friendly name of the Scaling Plan.
FriendlyName *string `pulumi:"friendlyName"`
// One or more `hostPool` blocks as defined below.
HostPools []ScalingPlanHostPool `pulumi:"hostPools"`
// The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// One or more `schedule` blocks as defined below.
Schedules []ScalingPlanSchedule `pulumi:"schedules"`
// A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .
Tags map[string]string `pulumi:"tags"`
// Specifies the Time Zone which should be used by the Scaling Plan for time based events, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).
TimeZone *string `pulumi:"timeZone"`
}
type ScalingPlanState struct {
// A description of the Scaling Plan.
Description pulumi.StringPtrInput
// The name of the tag associated with the VMs you want to exclude from autoscaling.
ExclusionTag pulumi.StringPtrInput
// Friendly name of the Scaling Plan.
FriendlyName pulumi.StringPtrInput
// One or more `hostPool` blocks as defined below.
HostPools ScalingPlanHostPoolArrayInput
// The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
ResourceGroupName pulumi.StringPtrInput
// One or more `schedule` blocks as defined below.
Schedules ScalingPlanScheduleArrayInput
// A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .
Tags pulumi.StringMapInput
// Specifies the Time Zone which should be used by the Scaling Plan for time based events, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).
TimeZone pulumi.StringPtrInput
}
func (ScalingPlanState) ElementType() reflect.Type {
return reflect.TypeOf((*scalingPlanState)(nil)).Elem()
}
type scalingPlanArgs struct {
// A description of the Scaling Plan.
Description *string `pulumi:"description"`
// The name of the tag associated with the VMs you want to exclude from autoscaling.
ExclusionTag *string `pulumi:"exclusionTag"`
// Friendly name of the Scaling Plan.
FriendlyName *string `pulumi:"friendlyName"`
// One or more `hostPool` blocks as defined below.
HostPools []ScalingPlanHostPool `pulumi:"hostPools"`
// The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
Location *string `pulumi:"location"`
// The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// One or more `schedule` blocks as defined below.
Schedules []ScalingPlanSchedule `pulumi:"schedules"`
// A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .
Tags map[string]string `pulumi:"tags"`
// Specifies the Time Zone which should be used by the Scaling Plan for time based events, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).
TimeZone string `pulumi:"timeZone"`
}
// The set of arguments for constructing a ScalingPlan resource.
type ScalingPlanArgs struct {
// A description of the Scaling Plan.
Description pulumi.StringPtrInput
// The name of the tag associated with the VMs you want to exclude from autoscaling.
ExclusionTag pulumi.StringPtrInput
// Friendly name of the Scaling Plan.
FriendlyName pulumi.StringPtrInput
// One or more `hostPool` blocks as defined below.
HostPools ScalingPlanHostPoolArrayInput
// The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
Location pulumi.StringPtrInput
// The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
ResourceGroupName pulumi.StringInput
// One or more `schedule` blocks as defined below.
Schedules ScalingPlanScheduleArrayInput
// A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .
Tags pulumi.StringMapInput
// Specifies the Time Zone which should be used by the Scaling Plan for time based events, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).
TimeZone pulumi.StringInput
}
func (ScalingPlanArgs) ElementType() reflect.Type {
return reflect.TypeOf((*scalingPlanArgs)(nil)).Elem()
}
type ScalingPlanInput interface {
pulumi.Input
ToScalingPlanOutput() ScalingPlanOutput
ToScalingPlanOutputWithContext(ctx context.Context) ScalingPlanOutput
}
func (*ScalingPlan) ElementType() reflect.Type {
return reflect.TypeOf((**ScalingPlan)(nil)).Elem()
}
func (i *ScalingPlan) ToScalingPlanOutput() ScalingPlanOutput {
return i.ToScalingPlanOutputWithContext(context.Background())
}
func (i *ScalingPlan) ToScalingPlanOutputWithContext(ctx context.Context) ScalingPlanOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScalingPlanOutput)
}
// ScalingPlanArrayInput is an input type that accepts ScalingPlanArray and ScalingPlanArrayOutput values.
// You can construct a concrete instance of `ScalingPlanArrayInput` via:
//
// ScalingPlanArray{ ScalingPlanArgs{...} }
type ScalingPlanArrayInput interface {
pulumi.Input
ToScalingPlanArrayOutput() ScalingPlanArrayOutput
ToScalingPlanArrayOutputWithContext(context.Context) ScalingPlanArrayOutput
}
type ScalingPlanArray []ScalingPlanInput
func (ScalingPlanArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ScalingPlan)(nil)).Elem()
}
func (i ScalingPlanArray) ToScalingPlanArrayOutput() ScalingPlanArrayOutput {
return i.ToScalingPlanArrayOutputWithContext(context.Background())
}
func (i ScalingPlanArray) ToScalingPlanArrayOutputWithContext(ctx context.Context) ScalingPlanArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScalingPlanArrayOutput)
}
// ScalingPlanMapInput is an input type that accepts ScalingPlanMap and ScalingPlanMapOutput values.
// You can construct a concrete instance of `ScalingPlanMapInput` via:
//
// ScalingPlanMap{ "key": ScalingPlanArgs{...} }
type ScalingPlanMapInput interface {
pulumi.Input
ToScalingPlanMapOutput() ScalingPlanMapOutput
ToScalingPlanMapOutputWithContext(context.Context) ScalingPlanMapOutput
}
type ScalingPlanMap map[string]ScalingPlanInput
func (ScalingPlanMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ScalingPlan)(nil)).Elem()
}
func (i ScalingPlanMap) ToScalingPlanMapOutput() ScalingPlanMapOutput {
return i.ToScalingPlanMapOutputWithContext(context.Background())
}
func (i ScalingPlanMap) ToScalingPlanMapOutputWithContext(ctx context.Context) ScalingPlanMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScalingPlanMapOutput)
}
type ScalingPlanOutput struct{ *pulumi.OutputState }
func (ScalingPlanOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ScalingPlan)(nil)).Elem()
}
func (o ScalingPlanOutput) ToScalingPlanOutput() ScalingPlanOutput {
return o
}
func (o ScalingPlanOutput) ToScalingPlanOutputWithContext(ctx context.Context) ScalingPlanOutput {
return o
}
// A description of the Scaling Plan.
func (o ScalingPlanOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ScalingPlan) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The name of the tag associated with the VMs you want to exclude from autoscaling.
func (o ScalingPlanOutput) ExclusionTag() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ScalingPlan) pulumi.StringPtrOutput { return v.ExclusionTag }).(pulumi.StringPtrOutput)
}
// Friendly name of the Scaling Plan.
func (o ScalingPlanOutput) FriendlyName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ScalingPlan) pulumi.StringPtrOutput { return v.FriendlyName }).(pulumi.StringPtrOutput)
}
// One or more `hostPool` blocks as defined below.
func (o ScalingPlanOutput) HostPools() ScalingPlanHostPoolArrayOutput {
return o.ApplyT(func(v *ScalingPlan) ScalingPlanHostPoolArrayOutput { return v.HostPools }).(ScalingPlanHostPoolArrayOutput)
}
// The Azure Region where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
func (o ScalingPlanOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *ScalingPlan) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name which should be used for this Virtual Desktop Scaling Plan . Changing this forces a new Virtual Desktop Scaling Plan to be created.
func (o ScalingPlanOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ScalingPlan) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The name of the Resource Group where the Virtual Desktop Scaling Plan should exist. Changing this forces a new Virtual Desktop Scaling Plan to be created.
func (o ScalingPlanOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *ScalingPlan) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// One or more `schedule` blocks as defined below.
func (o ScalingPlanOutput) Schedules() ScalingPlanScheduleArrayOutput {
return o.ApplyT(func(v *ScalingPlan) ScalingPlanScheduleArrayOutput { return v.Schedules }).(ScalingPlanScheduleArrayOutput)
}
// A mapping of tags which should be assigned to the Virtual Desktop Scaling Plan .
func (o ScalingPlanOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *ScalingPlan) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// Specifies the Time Zone which should be used by the Scaling Plan for time based events, [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/).
func (o ScalingPlanOutput) TimeZone() pulumi.StringOutput {
return o.ApplyT(func(v *ScalingPlan) pulumi.StringOutput { return v.TimeZone }).(pulumi.StringOutput)
}
type ScalingPlanArrayOutput struct{ *pulumi.OutputState }
func (ScalingPlanArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ScalingPlan)(nil)).Elem()
}
func (o ScalingPlanArrayOutput) ToScalingPlanArrayOutput() ScalingPlanArrayOutput {
return o
}
func (o ScalingPlanArrayOutput) ToScalingPlanArrayOutputWithContext(ctx context.Context) ScalingPlanArrayOutput {
return o
}
func (o ScalingPlanArrayOutput) Index(i pulumi.IntInput) ScalingPlanOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ScalingPlan {
return vs[0].([]*ScalingPlan)[vs[1].(int)]
}).(ScalingPlanOutput)
}
type ScalingPlanMapOutput struct{ *pulumi.OutputState }
func (ScalingPlanMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ScalingPlan)(nil)).Elem()
}
func (o ScalingPlanMapOutput) ToScalingPlanMapOutput() ScalingPlanMapOutput {
return o
}
func (o ScalingPlanMapOutput) ToScalingPlanMapOutputWithContext(ctx context.Context) ScalingPlanMapOutput {
return o
}
func (o ScalingPlanMapOutput) MapIndex(k pulumi.StringInput) ScalingPlanOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ScalingPlan {
return vs[0].(map[string]*ScalingPlan)[vs[1].(string)]
}).(ScalingPlanOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ScalingPlanInput)(nil)).Elem(), &ScalingPlan{})
pulumi.RegisterInputType(reflect.TypeOf((*ScalingPlanArrayInput)(nil)).Elem(), ScalingPlanArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ScalingPlanMapInput)(nil)).Elem(), ScalingPlanMap{})
pulumi.RegisterOutputType(ScalingPlanOutput{})
pulumi.RegisterOutputType(ScalingPlanArrayOutput{})
pulumi.RegisterOutputType(ScalingPlanMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/desktopvirtualization/application.go | sdk/go/azure/desktopvirtualization/application.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package desktopvirtualization
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Virtual Desktop Application.
//
// ## 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/desktopvirtualization"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("rg-example-virtualdesktop"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// pooledbreadthfirst, err := desktopvirtualization.NewHostPool(ctx, "pooledbreadthfirst", &desktopvirtualization.HostPoolArgs{
// Name: pulumi.String("pooledbreadthfirst"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Type: pulumi.String("Pooled"),
// LoadBalancerType: pulumi.String("BreadthFirst"),
// })
// if err != nil {
// return err
// }
// _, err = desktopvirtualization.NewHostPool(ctx, "personalautomatic", &desktopvirtualization.HostPoolArgs{
// Name: pulumi.String("personalautomatic"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Type: pulumi.String("Personal"),
// PersonalDesktopAssignmentType: pulumi.String("Automatic"),
// LoadBalancerType: pulumi.String("BreadthFirst"),
// })
// if err != nil {
// return err
// }
// remoteapp, err := desktopvirtualization.NewApplicationGroup(ctx, "remoteapp", &desktopvirtualization.ApplicationGroupArgs{
// Name: pulumi.String("acctag"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Type: pulumi.String("RemoteApp"),
// HostPoolId: pooledbreadthfirst.ID(),
// FriendlyName: pulumi.String("TestAppGroup"),
// Description: pulumi.String("Acceptance Test: An application group"),
// })
// if err != nil {
// return err
// }
// _, err = desktopvirtualization.NewApplication(ctx, "chrome", &desktopvirtualization.ApplicationArgs{
// Name: pulumi.String("googlechrome"),
// ApplicationGroupId: remoteapp.ID(),
// FriendlyName: pulumi.String("Google Chrome"),
// Description: pulumi.String("Chromium based web browser"),
// Path: pulumi.String("C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"),
// CommandLineArgumentPolicy: pulumi.String("DoNotAllow"),
// CommandLineArguments: pulumi.String("--incognito"),
// ShowInPortal: pulumi.Bool(false),
// IconPath: pulumi.String("C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"),
// IconIndex: pulumi.Int(0),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.DesktopVirtualization` - 2024-04-03
//
// ## Import
//
// Virtual Desktop Application can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:desktopvirtualization/application:Application example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/applicationGroups/myapplicationgroup/applications/myapplication
// ```
type Application struct {
pulumi.CustomResourceState
// Resource ID for a Virtual Desktop Application Group to associate with the Virtual Desktop Application. Changing this forces a new resource to be created.
ApplicationGroupId pulumi.StringOutput `pulumi:"applicationGroupId"`
// Specifies whether this published application can be launched with command line arguments provided by the client, command line arguments specified at publish time, or no command line arguments at all. Possible values include: `DoNotAllow`, `Allow`, `Require`.
CommandLineArgumentPolicy pulumi.StringOutput `pulumi:"commandLineArgumentPolicy"`
// Command Line Arguments for Virtual Desktop Application.
CommandLineArguments pulumi.StringPtrOutput `pulumi:"commandLineArguments"`
// Option to set a description for the Virtual Desktop Application.
Description pulumi.StringPtrOutput `pulumi:"description"`
// Option to set a friendly name for the Virtual Desktop Application.
FriendlyName pulumi.StringOutput `pulumi:"friendlyName"`
// The index of the icon you wish to use.
IconIndex pulumi.IntPtrOutput `pulumi:"iconIndex"`
// Specifies the path for an icon which will be used for this Virtual Desktop Application.
IconPath pulumi.StringOutput `pulumi:"iconPath"`
// The name of the Virtual Desktop Application. Changing the name forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The file path location of the app on the Virtual Desktop OS.
Path pulumi.StringOutput `pulumi:"path"`
// Specifies whether to show the RemoteApp program in the RD Web Access server.
ShowInPortal pulumi.BoolPtrOutput `pulumi:"showInPortal"`
}
// NewApplication registers a new resource with the given unique name, arguments, and options.
func NewApplication(ctx *pulumi.Context,
name string, args *ApplicationArgs, opts ...pulumi.ResourceOption) (*Application, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ApplicationGroupId == nil {
return nil, errors.New("invalid value for required argument 'ApplicationGroupId'")
}
if args.CommandLineArgumentPolicy == nil {
return nil, errors.New("invalid value for required argument 'CommandLineArgumentPolicy'")
}
if args.Path == nil {
return nil, errors.New("invalid value for required argument 'Path'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Application
err := ctx.RegisterResource("azure:desktopvirtualization/application:Application", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApplication gets an existing Application resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetApplication(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApplicationState, opts ...pulumi.ResourceOption) (*Application, error) {
var resource Application
err := ctx.ReadResource("azure:desktopvirtualization/application:Application", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Application resources.
type applicationState struct {
// Resource ID for a Virtual Desktop Application Group to associate with the Virtual Desktop Application. Changing this forces a new resource to be created.
ApplicationGroupId *string `pulumi:"applicationGroupId"`
// Specifies whether this published application can be launched with command line arguments provided by the client, command line arguments specified at publish time, or no command line arguments at all. Possible values include: `DoNotAllow`, `Allow`, `Require`.
CommandLineArgumentPolicy *string `pulumi:"commandLineArgumentPolicy"`
// Command Line Arguments for Virtual Desktop Application.
CommandLineArguments *string `pulumi:"commandLineArguments"`
// Option to set a description for the Virtual Desktop Application.
Description *string `pulumi:"description"`
// Option to set a friendly name for the Virtual Desktop Application.
FriendlyName *string `pulumi:"friendlyName"`
// The index of the icon you wish to use.
IconIndex *int `pulumi:"iconIndex"`
// Specifies the path for an icon which will be used for this Virtual Desktop Application.
IconPath *string `pulumi:"iconPath"`
// The name of the Virtual Desktop Application. Changing the name forces a new resource to be created.
Name *string `pulumi:"name"`
// The file path location of the app on the Virtual Desktop OS.
Path *string `pulumi:"path"`
// Specifies whether to show the RemoteApp program in the RD Web Access server.
ShowInPortal *bool `pulumi:"showInPortal"`
}
type ApplicationState struct {
// Resource ID for a Virtual Desktop Application Group to associate with the Virtual Desktop Application. Changing this forces a new resource to be created.
ApplicationGroupId pulumi.StringPtrInput
// Specifies whether this published application can be launched with command line arguments provided by the client, command line arguments specified at publish time, or no command line arguments at all. Possible values include: `DoNotAllow`, `Allow`, `Require`.
CommandLineArgumentPolicy pulumi.StringPtrInput
// Command Line Arguments for Virtual Desktop Application.
CommandLineArguments pulumi.StringPtrInput
// Option to set a description for the Virtual Desktop Application.
Description pulumi.StringPtrInput
// Option to set a friendly name for the Virtual Desktop Application.
FriendlyName pulumi.StringPtrInput
// The index of the icon you wish to use.
IconIndex pulumi.IntPtrInput
// Specifies the path for an icon which will be used for this Virtual Desktop Application.
IconPath pulumi.StringPtrInput
// The name of the Virtual Desktop Application. Changing the name forces a new resource to be created.
Name pulumi.StringPtrInput
// The file path location of the app on the Virtual Desktop OS.
Path pulumi.StringPtrInput
// Specifies whether to show the RemoteApp program in the RD Web Access server.
ShowInPortal pulumi.BoolPtrInput
}
func (ApplicationState) ElementType() reflect.Type {
return reflect.TypeOf((*applicationState)(nil)).Elem()
}
type applicationArgs struct {
// Resource ID for a Virtual Desktop Application Group to associate with the Virtual Desktop Application. Changing this forces a new resource to be created.
ApplicationGroupId string `pulumi:"applicationGroupId"`
// Specifies whether this published application can be launched with command line arguments provided by the client, command line arguments specified at publish time, or no command line arguments at all. Possible values include: `DoNotAllow`, `Allow`, `Require`.
CommandLineArgumentPolicy string `pulumi:"commandLineArgumentPolicy"`
// Command Line Arguments for Virtual Desktop Application.
CommandLineArguments *string `pulumi:"commandLineArguments"`
// Option to set a description for the Virtual Desktop Application.
Description *string `pulumi:"description"`
// Option to set a friendly name for the Virtual Desktop Application.
FriendlyName *string `pulumi:"friendlyName"`
// The index of the icon you wish to use.
IconIndex *int `pulumi:"iconIndex"`
// Specifies the path for an icon which will be used for this Virtual Desktop Application.
IconPath *string `pulumi:"iconPath"`
// The name of the Virtual Desktop Application. Changing the name forces a new resource to be created.
Name *string `pulumi:"name"`
// The file path location of the app on the Virtual Desktop OS.
Path string `pulumi:"path"`
// Specifies whether to show the RemoteApp program in the RD Web Access server.
ShowInPortal *bool `pulumi:"showInPortal"`
}
// The set of arguments for constructing a Application resource.
type ApplicationArgs struct {
// Resource ID for a Virtual Desktop Application Group to associate with the Virtual Desktop Application. Changing this forces a new resource to be created.
ApplicationGroupId pulumi.StringInput
// Specifies whether this published application can be launched with command line arguments provided by the client, command line arguments specified at publish time, or no command line arguments at all. Possible values include: `DoNotAllow`, `Allow`, `Require`.
CommandLineArgumentPolicy pulumi.StringInput
// Command Line Arguments for Virtual Desktop Application.
CommandLineArguments pulumi.StringPtrInput
// Option to set a description for the Virtual Desktop Application.
Description pulumi.StringPtrInput
// Option to set a friendly name for the Virtual Desktop Application.
FriendlyName pulumi.StringPtrInput
// The index of the icon you wish to use.
IconIndex pulumi.IntPtrInput
// Specifies the path for an icon which will be used for this Virtual Desktop Application.
IconPath pulumi.StringPtrInput
// The name of the Virtual Desktop Application. Changing the name forces a new resource to be created.
Name pulumi.StringPtrInput
// The file path location of the app on the Virtual Desktop OS.
Path pulumi.StringInput
// Specifies whether to show the RemoteApp program in the RD Web Access server.
ShowInPortal pulumi.BoolPtrInput
}
func (ApplicationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*applicationArgs)(nil)).Elem()
}
type ApplicationInput interface {
pulumi.Input
ToApplicationOutput() ApplicationOutput
ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput
}
func (*Application) ElementType() reflect.Type {
return reflect.TypeOf((**Application)(nil)).Elem()
}
func (i *Application) ToApplicationOutput() ApplicationOutput {
return i.ToApplicationOutputWithContext(context.Background())
}
func (i *Application) ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationOutput)
}
// ApplicationArrayInput is an input type that accepts ApplicationArray and ApplicationArrayOutput values.
// You can construct a concrete instance of `ApplicationArrayInput` via:
//
// ApplicationArray{ ApplicationArgs{...} }
type ApplicationArrayInput interface {
pulumi.Input
ToApplicationArrayOutput() ApplicationArrayOutput
ToApplicationArrayOutputWithContext(context.Context) ApplicationArrayOutput
}
type ApplicationArray []ApplicationInput
func (ApplicationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Application)(nil)).Elem()
}
func (i ApplicationArray) ToApplicationArrayOutput() ApplicationArrayOutput {
return i.ToApplicationArrayOutputWithContext(context.Background())
}
func (i ApplicationArray) ToApplicationArrayOutputWithContext(ctx context.Context) ApplicationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationArrayOutput)
}
// ApplicationMapInput is an input type that accepts ApplicationMap and ApplicationMapOutput values.
// You can construct a concrete instance of `ApplicationMapInput` via:
//
// ApplicationMap{ "key": ApplicationArgs{...} }
type ApplicationMapInput interface {
pulumi.Input
ToApplicationMapOutput() ApplicationMapOutput
ToApplicationMapOutputWithContext(context.Context) ApplicationMapOutput
}
type ApplicationMap map[string]ApplicationInput
func (ApplicationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Application)(nil)).Elem()
}
func (i ApplicationMap) ToApplicationMapOutput() ApplicationMapOutput {
return i.ToApplicationMapOutputWithContext(context.Background())
}
func (i ApplicationMap) ToApplicationMapOutputWithContext(ctx context.Context) ApplicationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationMapOutput)
}
type ApplicationOutput struct{ *pulumi.OutputState }
func (ApplicationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Application)(nil)).Elem()
}
func (o ApplicationOutput) ToApplicationOutput() ApplicationOutput {
return o
}
func (o ApplicationOutput) ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput {
return o
}
// Resource ID for a Virtual Desktop Application Group to associate with the Virtual Desktop Application. Changing this forces a new resource to be created.
func (o ApplicationOutput) ApplicationGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.ApplicationGroupId }).(pulumi.StringOutput)
}
// Specifies whether this published application can be launched with command line arguments provided by the client, command line arguments specified at publish time, or no command line arguments at all. Possible values include: `DoNotAllow`, `Allow`, `Require`.
func (o ApplicationOutput) CommandLineArgumentPolicy() pulumi.StringOutput {
return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.CommandLineArgumentPolicy }).(pulumi.StringOutput)
}
// Command Line Arguments for Virtual Desktop Application.
func (o ApplicationOutput) CommandLineArguments() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Application) pulumi.StringPtrOutput { return v.CommandLineArguments }).(pulumi.StringPtrOutput)
}
// Option to set a description for the Virtual Desktop Application.
func (o ApplicationOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Application) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// Option to set a friendly name for the Virtual Desktop Application.
func (o ApplicationOutput) FriendlyName() pulumi.StringOutput {
return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.FriendlyName }).(pulumi.StringOutput)
}
// The index of the icon you wish to use.
func (o ApplicationOutput) IconIndex() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Application) pulumi.IntPtrOutput { return v.IconIndex }).(pulumi.IntPtrOutput)
}
// Specifies the path for an icon which will be used for this Virtual Desktop Application.
func (o ApplicationOutput) IconPath() pulumi.StringOutput {
return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.IconPath }).(pulumi.StringOutput)
}
// The name of the Virtual Desktop Application. Changing the name forces a new resource to be created.
func (o ApplicationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The file path location of the app on the Virtual Desktop OS.
func (o ApplicationOutput) Path() pulumi.StringOutput {
return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.Path }).(pulumi.StringOutput)
}
// Specifies whether to show the RemoteApp program in the RD Web Access server.
func (o ApplicationOutput) ShowInPortal() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Application) pulumi.BoolPtrOutput { return v.ShowInPortal }).(pulumi.BoolPtrOutput)
}
type ApplicationArrayOutput struct{ *pulumi.OutputState }
func (ApplicationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Application)(nil)).Elem()
}
func (o ApplicationArrayOutput) ToApplicationArrayOutput() ApplicationArrayOutput {
return o
}
func (o ApplicationArrayOutput) ToApplicationArrayOutputWithContext(ctx context.Context) ApplicationArrayOutput {
return o
}
func (o ApplicationArrayOutput) Index(i pulumi.IntInput) ApplicationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Application {
return vs[0].([]*Application)[vs[1].(int)]
}).(ApplicationOutput)
}
type ApplicationMapOutput struct{ *pulumi.OutputState }
func (ApplicationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Application)(nil)).Elem()
}
func (o ApplicationMapOutput) ToApplicationMapOutput() ApplicationMapOutput {
return o
}
func (o ApplicationMapOutput) ToApplicationMapOutputWithContext(ctx context.Context) ApplicationMapOutput {
return o
}
func (o ApplicationMapOutput) MapIndex(k pulumi.StringInput) ApplicationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Application {
return vs[0].(map[string]*Application)[vs[1].(string)]
}).(ApplicationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationInput)(nil)).Elem(), &Application{})
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationArrayInput)(nil)).Elem(), ApplicationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationMapInput)(nil)).Elem(), ApplicationMap{})
pulumi.RegisterOutputType(ApplicationOutput{})
pulumi.RegisterOutputType(ApplicationArrayOutput{})
pulumi.RegisterOutputType(ApplicationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/desktopvirtualization/getHostPool.go | sdk/go/azure/desktopvirtualization/getHostPool.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package desktopvirtualization
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 Virtual Desktop Host Pool.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/desktopvirtualization"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := desktopvirtualization.LookupHostPool(ctx, &desktopvirtualization.LookupHostPoolArgs{
// Name: "example-pool",
// ResourceGroupName: "example-resources",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.DesktopVirtualization` - 2024-04-03
func LookupHostPool(ctx *pulumi.Context, args *LookupHostPoolArgs, opts ...pulumi.InvokeOption) (*LookupHostPoolResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupHostPoolResult
err := ctx.Invoke("azure:desktopvirtualization/getHostPool:getHostPool", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getHostPool.
type LookupHostPoolArgs struct {
// The name of the Virtual Desktop Host Pool to retrieve.
Name string `pulumi:"name"`
// The name of the resource group where the Virtual Desktop Host Pool exists.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// A collection of values returned by getHostPool.
type LookupHostPoolResult struct {
// The custom RDP properties string for the Virtual Desktop Host Pool.
CustomRdpProperties string `pulumi:"customRdpProperties"`
// The description for the Virtual Desktop Host Pool.
Description string `pulumi:"description"`
// The friendly name for the Virtual Desktop Host Pool.
FriendlyName string `pulumi:"friendlyName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The type of load balancing performed by the Host Pool
LoadBalancerType string `pulumi:"loadBalancerType"`
// The location/region where the Virtual Desktop Host Pool is located.
Location string `pulumi:"location"`
// The maximum number of users that can have concurrent sessions on a session host.
MaximumSessionsAllowed int `pulumi:"maximumSessionsAllowed"`
Name string `pulumi:"name"`
// The type of personal desktop assignment in use by the Host Pool
PersonalDesktopAssignmentType string `pulumi:"personalDesktopAssignmentType"`
// The preferred Application Group type for the Virtual Desktop Host Pool.
PreferredAppGroupType string `pulumi:"preferredAppGroupType"`
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `scheduledAgentUpdates` block as defined below.
ScheduledAgentUpdates []GetHostPoolScheduledAgentUpdate `pulumi:"scheduledAgentUpdates"`
// Returns `true` if the Start VM on Connection Feature is enabled.
StartVmOnConnect bool `pulumi:"startVmOnConnect"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// The type of the Virtual Desktop Host Pool.
Type string `pulumi:"type"`
// Returns `true` if the Host Pool is in Validation mode.
ValidateEnvironment bool `pulumi:"validateEnvironment"`
}
func LookupHostPoolOutput(ctx *pulumi.Context, args LookupHostPoolOutputArgs, opts ...pulumi.InvokeOption) LookupHostPoolResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupHostPoolResultOutput, error) {
args := v.(LookupHostPoolArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:desktopvirtualization/getHostPool:getHostPool", args, LookupHostPoolResultOutput{}, options).(LookupHostPoolResultOutput), nil
}).(LookupHostPoolResultOutput)
}
// A collection of arguments for invoking getHostPool.
type LookupHostPoolOutputArgs struct {
// The name of the Virtual Desktop Host Pool to retrieve.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group where the Virtual Desktop Host Pool exists.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupHostPoolOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupHostPoolArgs)(nil)).Elem()
}
// A collection of values returned by getHostPool.
type LookupHostPoolResultOutput struct{ *pulumi.OutputState }
func (LookupHostPoolResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupHostPoolResult)(nil)).Elem()
}
func (o LookupHostPoolResultOutput) ToLookupHostPoolResultOutput() LookupHostPoolResultOutput {
return o
}
func (o LookupHostPoolResultOutput) ToLookupHostPoolResultOutputWithContext(ctx context.Context) LookupHostPoolResultOutput {
return o
}
// The custom RDP properties string for the Virtual Desktop Host Pool.
func (o LookupHostPoolResultOutput) CustomRdpProperties() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostPoolResult) string { return v.CustomRdpProperties }).(pulumi.StringOutput)
}
// The description for the Virtual Desktop Host Pool.
func (o LookupHostPoolResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostPoolResult) string { return v.Description }).(pulumi.StringOutput)
}
// The friendly name for the Virtual Desktop Host Pool.
func (o LookupHostPoolResultOutput) FriendlyName() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostPoolResult) string { return v.FriendlyName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupHostPoolResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostPoolResult) string { return v.Id }).(pulumi.StringOutput)
}
// The type of load balancing performed by the Host Pool
func (o LookupHostPoolResultOutput) LoadBalancerType() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostPoolResult) string { return v.LoadBalancerType }).(pulumi.StringOutput)
}
// The location/region where the Virtual Desktop Host Pool is located.
func (o LookupHostPoolResultOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostPoolResult) string { return v.Location }).(pulumi.StringOutput)
}
// The maximum number of users that can have concurrent sessions on a session host.
func (o LookupHostPoolResultOutput) MaximumSessionsAllowed() pulumi.IntOutput {
return o.ApplyT(func(v LookupHostPoolResult) int { return v.MaximumSessionsAllowed }).(pulumi.IntOutput)
}
func (o LookupHostPoolResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostPoolResult) string { return v.Name }).(pulumi.StringOutput)
}
// The type of personal desktop assignment in use by the Host Pool
func (o LookupHostPoolResultOutput) PersonalDesktopAssignmentType() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostPoolResult) string { return v.PersonalDesktopAssignmentType }).(pulumi.StringOutput)
}
// The preferred Application Group type for the Virtual Desktop Host Pool.
func (o LookupHostPoolResultOutput) PreferredAppGroupType() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostPoolResult) string { return v.PreferredAppGroupType }).(pulumi.StringOutput)
}
func (o LookupHostPoolResultOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostPoolResult) string { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A `scheduledAgentUpdates` block as defined below.
func (o LookupHostPoolResultOutput) ScheduledAgentUpdates() GetHostPoolScheduledAgentUpdateArrayOutput {
return o.ApplyT(func(v LookupHostPoolResult) []GetHostPoolScheduledAgentUpdate { return v.ScheduledAgentUpdates }).(GetHostPoolScheduledAgentUpdateArrayOutput)
}
// Returns `true` if the Start VM on Connection Feature is enabled.
func (o LookupHostPoolResultOutput) StartVmOnConnect() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostPoolResult) bool { return v.StartVmOnConnect }).(pulumi.BoolOutput)
}
// A mapping of tags to assign to the resource.
func (o LookupHostPoolResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupHostPoolResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The type of the Virtual Desktop Host Pool.
func (o LookupHostPoolResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupHostPoolResult) string { return v.Type }).(pulumi.StringOutput)
}
// Returns `true` if the Host Pool is in Validation mode.
func (o LookupHostPoolResultOutput) ValidateEnvironment() pulumi.BoolOutput {
return o.ApplyT(func(v LookupHostPoolResult) bool { return v.ValidateEnvironment }).(pulumi.BoolOutput)
}
func init() {
pulumi.RegisterOutputType(LookupHostPoolResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/desktopvirtualization/workspace.go | sdk/go/azure/desktopvirtualization/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 desktopvirtualization
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Virtual Desktop Workspace.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/desktopvirtualization"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("rg-example-virtualdesktop"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = desktopvirtualization.NewWorkspace(ctx, "workspace", &desktopvirtualization.WorkspaceArgs{
// Name: pulumi.String("workspace"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// FriendlyName: pulumi.String("FriendlyName"),
// Description: pulumi.String("A description of my workspace"),
// })
// 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.DesktopVirtualization` - 2024-04-03
//
// ## Import
//
// Virtual Desktop Workspaces can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:desktopvirtualization/workspace:Workspace example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup1/providers/Microsoft.DesktopVirtualization/workspaces/myworkspace
// ```
type Workspace struct {
pulumi.CustomResourceState
// A description for the Virtual Desktop Workspace.
Description pulumi.StringPtrOutput `pulumi:"description"`
// A friendly name for the Virtual Desktop Workspace.
FriendlyName pulumi.StringPtrOutput `pulumi:"friendlyName"`
// The location/region where the Virtual Desktop Workspace is located. Changing the location/region forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The name of the Virtual Desktop Workspace. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Whether public network access is allowed for this Virtual Desktop Workspace. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the Virtual Desktop Workspace. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
}
// NewWorkspace registers a new resource with the given unique name, arguments, and options.
func NewWorkspace(ctx *pulumi.Context,
name string, args *WorkspaceArgs, opts ...pulumi.ResourceOption) (*Workspace, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Workspace
err := ctx.RegisterResource("azure:desktopvirtualization/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:desktopvirtualization/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 {
// A description for the Virtual Desktop Workspace.
Description *string `pulumi:"description"`
// A friendly name for the Virtual Desktop Workspace.
FriendlyName *string `pulumi:"friendlyName"`
// The location/region where the Virtual Desktop Workspace is located. Changing the location/region forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Virtual Desktop Workspace. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether public network access is allowed for this Virtual Desktop Workspace. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the Virtual Desktop Workspace. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
}
type WorkspaceState struct {
// A description for the Virtual Desktop Workspace.
Description pulumi.StringPtrInput
// A friendly name for the Virtual Desktop Workspace.
FriendlyName pulumi.StringPtrInput
// The location/region where the Virtual Desktop Workspace is located. Changing the location/region forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Virtual Desktop Workspace. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether public network access is allowed for this Virtual Desktop Workspace. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to create the Virtual Desktop Workspace. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
}
func (WorkspaceState) ElementType() reflect.Type {
return reflect.TypeOf((*workspaceState)(nil)).Elem()
}
type workspaceArgs struct {
// A description for the Virtual Desktop Workspace.
Description *string `pulumi:"description"`
// A friendly name for the Virtual Desktop Workspace.
FriendlyName *string `pulumi:"friendlyName"`
// The location/region where the Virtual Desktop Workspace is located. Changing the location/region forces a new resource to be created.
Location *string `pulumi:"location"`
// The name of the Virtual Desktop Workspace. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether public network access is allowed for this Virtual Desktop Workspace. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group in which to create the Virtual Desktop Workspace. 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 Workspace resource.
type WorkspaceArgs struct {
// A description for the Virtual Desktop Workspace.
Description pulumi.StringPtrInput
// A friendly name for the Virtual Desktop Workspace.
FriendlyName pulumi.StringPtrInput
// The location/region where the Virtual Desktop Workspace is located. Changing the location/region forces a new resource to be created.
Location pulumi.StringPtrInput
// The name of the Virtual Desktop Workspace. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether public network access is allowed for this Virtual Desktop Workspace. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group in which to create the Virtual Desktop Workspace. 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 (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
}
// A description for the Virtual Desktop Workspace.
func (o WorkspaceOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Workspace) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// A friendly name for the Virtual Desktop Workspace.
func (o WorkspaceOutput) FriendlyName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Workspace) pulumi.StringPtrOutput { return v.FriendlyName }).(pulumi.StringPtrOutput)
}
// The location/region where the Virtual Desktop Workspace is located. Changing the location/region forces a new resource to be created.
func (o WorkspaceOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The name of the Virtual Desktop Workspace. Changing this forces a new resource to be created.
func (o WorkspaceOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Whether public network access is allowed for this Virtual Desktop Workspace. Defaults to `true`.
func (o WorkspaceOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Workspace) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the resource group in which to create the Virtual Desktop Workspace. Changing this forces a new resource to be created.
func (o WorkspaceOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Workspace) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o WorkspaceOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Workspace) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
type WorkspaceArrayOutput struct{ *pulumi.OutputState }
func (WorkspaceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Workspace)(nil)).Elem()
}
func (o WorkspaceArrayOutput) ToWorkspaceArrayOutput() WorkspaceArrayOutput {
return o
}
func (o WorkspaceArrayOutput) ToWorkspaceArrayOutputWithContext(ctx context.Context) WorkspaceArrayOutput {
return o
}
func (o WorkspaceArrayOutput) Index(i pulumi.IntInput) WorkspaceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Workspace {
return vs[0].([]*Workspace)[vs[1].(int)]
}).(WorkspaceOutput)
}
type WorkspaceMapOutput struct{ *pulumi.OutputState }
func (WorkspaceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Workspace)(nil)).Elem()
}
func (o WorkspaceMapOutput) ToWorkspaceMapOutput() WorkspaceMapOutput {
return o
}
func (o WorkspaceMapOutput) ToWorkspaceMapOutputWithContext(ctx context.Context) WorkspaceMapOutput {
return o
}
func (o WorkspaceMapOutput) MapIndex(k pulumi.StringInput) WorkspaceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Workspace {
return vs[0].(map[string]*Workspace)[vs[1].(string)]
}).(WorkspaceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceInput)(nil)).Elem(), &Workspace{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceArrayInput)(nil)).Elem(), WorkspaceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*WorkspaceMapInput)(nil)).Elem(), WorkspaceMap{})
pulumi.RegisterOutputType(WorkspaceOutput{})
pulumi.RegisterOutputType(WorkspaceArrayOutput{})
pulumi.RegisterOutputType(WorkspaceMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/desktopvirtualization/getHostPoolRegistrationInfo.go | sdk/go/azure/desktopvirtualization/getHostPoolRegistrationInfo.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package desktopvirtualization
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages the Registration Info for a Virtual Desktop Host Pool.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/desktopvirtualization"
// "github.com/pulumi/pulumi/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-hostpool"),
// Location: pulumi.String("westeurope"),
// })
// if err != nil {
// return err
// }
// exampleHostPool, err := desktopvirtualization.NewHostPool(ctx, "example", &desktopvirtualization.HostPoolArgs{
// Name: pulumi.String("example-HP"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// Type: pulumi.String("Pooled"),
// ValidateEnvironment: pulumi.Bool(true),
// LoadBalancerType: pulumi.String("BreadthFirst"),
// })
// if err != nil {
// return err
// }
// _, err = desktopvirtualization.NewGetHostPoolRegistrationInfo(ctx, "example", &desktopvirtualization.GetHostPoolRegistrationInfoArgs{
// HostpoolId: exampleHostPool.ID(),
// ExpirationDate: pulumi.String("2022-01-01T23:40:52Z"),
// })
// 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.DesktopVirtualization` - 2024-04-03
//
// ## Import
//
// AVD Registration Infos can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:desktopvirtualization/getHostPoolRegistrationInfo:getHostPoolRegistrationInfo example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.DesktopVirtualization/hostPools/pool1/registrationInfo/default
// ```
type GetHostPoolRegistrationInfo struct {
pulumi.CustomResourceState
// A valid `RFC3339Time` for the expiration of the token..
ExpirationDate pulumi.StringOutput `pulumi:"expirationDate"`
// The ID of the Virtual Desktop Host Pool to link the Registration Info to. Changing this forces a new Registration Info resource to be created. Only a single virtualDesktopHostPoolRegistrationInfo resource should be associated with a given hostpool. Assigning multiple resources will produce inconsistent results.
HostpoolId pulumi.StringOutput `pulumi:"hostpoolId"`
// The registration token generated by the Virtual Desktop Host Pool for registration of session hosts.
Token pulumi.StringOutput `pulumi:"token"`
}
// NewGetHostPoolRegistrationInfo registers a new resource with the given unique name, arguments, and options.
func NewGetHostPoolRegistrationInfo(ctx *pulumi.Context,
name string, args *GetHostPoolRegistrationInfoArgs, opts ...pulumi.ResourceOption) (*GetHostPoolRegistrationInfo, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ExpirationDate == nil {
return nil, errors.New("invalid value for required argument 'ExpirationDate'")
}
if args.HostpoolId == nil {
return nil, errors.New("invalid value for required argument 'HostpoolId'")
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"token",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource GetHostPoolRegistrationInfo
err := ctx.RegisterResource("azure:desktopvirtualization/getHostPoolRegistrationInfo:getHostPoolRegistrationInfo", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGetHostPoolRegistrationInfo gets an existing GetHostPoolRegistrationInfo resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetGetHostPoolRegistrationInfo(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GetHostPoolRegistrationInfoState, opts ...pulumi.ResourceOption) (*GetHostPoolRegistrationInfo, error) {
var resource GetHostPoolRegistrationInfo
err := ctx.ReadResource("azure:desktopvirtualization/getHostPoolRegistrationInfo:getHostPoolRegistrationInfo", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering GetHostPoolRegistrationInfo resources.
type getHostPoolRegistrationInfoState struct {
// A valid `RFC3339Time` for the expiration of the token..
ExpirationDate *string `pulumi:"expirationDate"`
// The ID of the Virtual Desktop Host Pool to link the Registration Info to. Changing this forces a new Registration Info resource to be created. Only a single virtualDesktopHostPoolRegistrationInfo resource should be associated with a given hostpool. Assigning multiple resources will produce inconsistent results.
HostpoolId *string `pulumi:"hostpoolId"`
// The registration token generated by the Virtual Desktop Host Pool for registration of session hosts.
Token *string `pulumi:"token"`
}
type GetHostPoolRegistrationInfoState struct {
// A valid `RFC3339Time` for the expiration of the token..
ExpirationDate pulumi.StringPtrInput
// The ID of the Virtual Desktop Host Pool to link the Registration Info to. Changing this forces a new Registration Info resource to be created. Only a single virtualDesktopHostPoolRegistrationInfo resource should be associated with a given hostpool. Assigning multiple resources will produce inconsistent results.
HostpoolId pulumi.StringPtrInput
// The registration token generated by the Virtual Desktop Host Pool for registration of session hosts.
Token pulumi.StringPtrInput
}
func (GetHostPoolRegistrationInfoState) ElementType() reflect.Type {
return reflect.TypeOf((*getHostPoolRegistrationInfoState)(nil)).Elem()
}
type getHostPoolRegistrationInfoArgs struct {
// A valid `RFC3339Time` for the expiration of the token..
ExpirationDate string `pulumi:"expirationDate"`
// The ID of the Virtual Desktop Host Pool to link the Registration Info to. Changing this forces a new Registration Info resource to be created. Only a single virtualDesktopHostPoolRegistrationInfo resource should be associated with a given hostpool. Assigning multiple resources will produce inconsistent results.
HostpoolId string `pulumi:"hostpoolId"`
}
// The set of arguments for constructing a GetHostPoolRegistrationInfo resource.
type GetHostPoolRegistrationInfoArgs struct {
// A valid `RFC3339Time` for the expiration of the token..
ExpirationDate pulumi.StringInput
// The ID of the Virtual Desktop Host Pool to link the Registration Info to. Changing this forces a new Registration Info resource to be created. Only a single virtualDesktopHostPoolRegistrationInfo resource should be associated with a given hostpool. Assigning multiple resources will produce inconsistent results.
HostpoolId pulumi.StringInput
}
func (GetHostPoolRegistrationInfoArgs) ElementType() reflect.Type {
return reflect.TypeOf((*getHostPoolRegistrationInfoArgs)(nil)).Elem()
}
type GetHostPoolRegistrationInfoInput interface {
pulumi.Input
ToGetHostPoolRegistrationInfoOutput() GetHostPoolRegistrationInfoOutput
ToGetHostPoolRegistrationInfoOutputWithContext(ctx context.Context) GetHostPoolRegistrationInfoOutput
}
func (*GetHostPoolRegistrationInfo) ElementType() reflect.Type {
return reflect.TypeOf((**GetHostPoolRegistrationInfo)(nil)).Elem()
}
func (i *GetHostPoolRegistrationInfo) ToGetHostPoolRegistrationInfoOutput() GetHostPoolRegistrationInfoOutput {
return i.ToGetHostPoolRegistrationInfoOutputWithContext(context.Background())
}
func (i *GetHostPoolRegistrationInfo) ToGetHostPoolRegistrationInfoOutputWithContext(ctx context.Context) GetHostPoolRegistrationInfoOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetHostPoolRegistrationInfoOutput)
}
// GetHostPoolRegistrationInfoArrayInput is an input type that accepts GetHostPoolRegistrationInfoArray and GetHostPoolRegistrationInfoArrayOutput values.
// You can construct a concrete instance of `GetHostPoolRegistrationInfoArrayInput` via:
//
// GetHostPoolRegistrationInfoArray{ GetHostPoolRegistrationInfoArgs{...} }
type GetHostPoolRegistrationInfoArrayInput interface {
pulumi.Input
ToGetHostPoolRegistrationInfoArrayOutput() GetHostPoolRegistrationInfoArrayOutput
ToGetHostPoolRegistrationInfoArrayOutputWithContext(context.Context) GetHostPoolRegistrationInfoArrayOutput
}
type GetHostPoolRegistrationInfoArray []GetHostPoolRegistrationInfoInput
func (GetHostPoolRegistrationInfoArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GetHostPoolRegistrationInfo)(nil)).Elem()
}
func (i GetHostPoolRegistrationInfoArray) ToGetHostPoolRegistrationInfoArrayOutput() GetHostPoolRegistrationInfoArrayOutput {
return i.ToGetHostPoolRegistrationInfoArrayOutputWithContext(context.Background())
}
func (i GetHostPoolRegistrationInfoArray) ToGetHostPoolRegistrationInfoArrayOutputWithContext(ctx context.Context) GetHostPoolRegistrationInfoArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetHostPoolRegistrationInfoArrayOutput)
}
// GetHostPoolRegistrationInfoMapInput is an input type that accepts GetHostPoolRegistrationInfoMap and GetHostPoolRegistrationInfoMapOutput values.
// You can construct a concrete instance of `GetHostPoolRegistrationInfoMapInput` via:
//
// GetHostPoolRegistrationInfoMap{ "key": GetHostPoolRegistrationInfoArgs{...} }
type GetHostPoolRegistrationInfoMapInput interface {
pulumi.Input
ToGetHostPoolRegistrationInfoMapOutput() GetHostPoolRegistrationInfoMapOutput
ToGetHostPoolRegistrationInfoMapOutputWithContext(context.Context) GetHostPoolRegistrationInfoMapOutput
}
type GetHostPoolRegistrationInfoMap map[string]GetHostPoolRegistrationInfoInput
func (GetHostPoolRegistrationInfoMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GetHostPoolRegistrationInfo)(nil)).Elem()
}
func (i GetHostPoolRegistrationInfoMap) ToGetHostPoolRegistrationInfoMapOutput() GetHostPoolRegistrationInfoMapOutput {
return i.ToGetHostPoolRegistrationInfoMapOutputWithContext(context.Background())
}
func (i GetHostPoolRegistrationInfoMap) ToGetHostPoolRegistrationInfoMapOutputWithContext(ctx context.Context) GetHostPoolRegistrationInfoMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(GetHostPoolRegistrationInfoMapOutput)
}
type GetHostPoolRegistrationInfoOutput struct{ *pulumi.OutputState }
func (GetHostPoolRegistrationInfoOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GetHostPoolRegistrationInfo)(nil)).Elem()
}
func (o GetHostPoolRegistrationInfoOutput) ToGetHostPoolRegistrationInfoOutput() GetHostPoolRegistrationInfoOutput {
return o
}
func (o GetHostPoolRegistrationInfoOutput) ToGetHostPoolRegistrationInfoOutputWithContext(ctx context.Context) GetHostPoolRegistrationInfoOutput {
return o
}
// A valid `RFC3339Time` for the expiration of the token..
func (o GetHostPoolRegistrationInfoOutput) ExpirationDate() pulumi.StringOutput {
return o.ApplyT(func(v *GetHostPoolRegistrationInfo) pulumi.StringOutput { return v.ExpirationDate }).(pulumi.StringOutput)
}
// The ID of the Virtual Desktop Host Pool to link the Registration Info to. Changing this forces a new Registration Info resource to be created. Only a single virtualDesktopHostPoolRegistrationInfo resource should be associated with a given hostpool. Assigning multiple resources will produce inconsistent results.
func (o GetHostPoolRegistrationInfoOutput) HostpoolId() pulumi.StringOutput {
return o.ApplyT(func(v *GetHostPoolRegistrationInfo) pulumi.StringOutput { return v.HostpoolId }).(pulumi.StringOutput)
}
// The registration token generated by the Virtual Desktop Host Pool for registration of session hosts.
func (o GetHostPoolRegistrationInfoOutput) Token() pulumi.StringOutput {
return o.ApplyT(func(v *GetHostPoolRegistrationInfo) pulumi.StringOutput { return v.Token }).(pulumi.StringOutput)
}
type GetHostPoolRegistrationInfoArrayOutput struct{ *pulumi.OutputState }
func (GetHostPoolRegistrationInfoArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GetHostPoolRegistrationInfo)(nil)).Elem()
}
func (o GetHostPoolRegistrationInfoArrayOutput) ToGetHostPoolRegistrationInfoArrayOutput() GetHostPoolRegistrationInfoArrayOutput {
return o
}
func (o GetHostPoolRegistrationInfoArrayOutput) ToGetHostPoolRegistrationInfoArrayOutputWithContext(ctx context.Context) GetHostPoolRegistrationInfoArrayOutput {
return o
}
func (o GetHostPoolRegistrationInfoArrayOutput) Index(i pulumi.IntInput) GetHostPoolRegistrationInfoOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GetHostPoolRegistrationInfo {
return vs[0].([]*GetHostPoolRegistrationInfo)[vs[1].(int)]
}).(GetHostPoolRegistrationInfoOutput)
}
type GetHostPoolRegistrationInfoMapOutput struct{ *pulumi.OutputState }
func (GetHostPoolRegistrationInfoMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GetHostPoolRegistrationInfo)(nil)).Elem()
}
func (o GetHostPoolRegistrationInfoMapOutput) ToGetHostPoolRegistrationInfoMapOutput() GetHostPoolRegistrationInfoMapOutput {
return o
}
func (o GetHostPoolRegistrationInfoMapOutput) ToGetHostPoolRegistrationInfoMapOutputWithContext(ctx context.Context) GetHostPoolRegistrationInfoMapOutput {
return o
}
func (o GetHostPoolRegistrationInfoMapOutput) MapIndex(k pulumi.StringInput) GetHostPoolRegistrationInfoOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GetHostPoolRegistrationInfo {
return vs[0].(map[string]*GetHostPoolRegistrationInfo)[vs[1].(string)]
}).(GetHostPoolRegistrationInfoOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GetHostPoolRegistrationInfoInput)(nil)).Elem(), &GetHostPoolRegistrationInfo{})
pulumi.RegisterInputType(reflect.TypeOf((*GetHostPoolRegistrationInfoArrayInput)(nil)).Elem(), GetHostPoolRegistrationInfoArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GetHostPoolRegistrationInfoMapInput)(nil)).Elem(), GetHostPoolRegistrationInfoMap{})
pulumi.RegisterOutputType(GetHostPoolRegistrationInfoOutput{})
pulumi.RegisterOutputType(GetHostPoolRegistrationInfoArrayOutput{})
pulumi.RegisterOutputType(GetHostPoolRegistrationInfoMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/qumulo/init.go | sdk/go/azure/qumulo/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 qumulo
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:qumulo/fileSystem:FileSystem":
r = &FileSystem{}
default:
return nil, fmt.Errorf("unknown resource type: %s", typ)
}
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
return
}
func init() {
version, err := internal.PkgVersion()
if err != nil {
version = semver.Version{Major: 1}
}
pulumi.RegisterResourceModule(
"azure",
"qumulo/fileSystem",
&module{version},
)
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/qumulo/fileSystem.go | sdk/go/azure/qumulo/fileSystem.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package qumulo
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 Native Qumulo Scalable File System.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/qumulo"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
// Name: pulumi.String("example-vnet"),
// AddressSpaces: pulumi.StringArray{
// pulumi.String("10.0.0.0/16"),
// },
// Location: example.Location,
// ResourceGroupName: example.Name,
// })
// if err != nil {
// return err
// }
// exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
// Name: pulumi.String("example-subnet"),
// ResourceGroupName: example.Name,
// VirtualNetworkName: exampleVirtualNetwork.Name,
// AddressPrefixes: pulumi.StringArray{
// pulumi.String("10.0.1.0/24"),
// },
// Delegations: network.SubnetDelegationArray{
// &network.SubnetDelegationArgs{
// Name: pulumi.String("delegation"),
// ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
// Actions: pulumi.StringArray{
// pulumi.String("Microsoft.Network/virtualNetworks/subnets/join/action"),
// },
// Name: pulumi.String("Qumulo.Storage/fileSystems"),
// },
// },
// },
// })
// if err != nil {
// return err
// }
// _, err = qumulo.NewFileSystem(ctx, "example", &qumulo.FileSystemArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// AdminPassword: pulumi.String(")^X#ZX#JRyIY}t9"),
// AvailabilityZone: "1",
// DelegatedSubnetId: exampleSubnet.ID(),
// StorageSku: pulumi.String("Standard"),
// Email: pulumi.String("test@test.com"),
// Tags: pulumi.StringMap{
// "environment": pulumi.String("test"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Qumulo.Storage` - 2024-06-19
//
// ## Import
//
// An existing File System can be imported into Pulumi using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:qumulo/fileSystem:FileSystem example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Qumulo.Storage/fileSystems/example
// ```
type FileSystem struct {
pulumi.CustomResourceState
// The initial administrator password of the Azure Native Qumulo Scalable File System. Changing this forces a new resource to be created.
AdminPassword pulumi.StringOutput `pulumi:"adminPassword"`
// The email address used for the Azure Native Qumulo Scalable File System. Changing this forces a new resource to be created.
Email pulumi.StringOutput `pulumi:"email"`
// The Azure Region where the Azure Native Qumulo Scalable File System should exist. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of this Azure Native Qumulo Scalable File System resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the marketplace offer ID. Defaults to `qumulo-saas-mpp`. Changing this forces a new resource to be created.
OfferId pulumi.StringPtrOutput `pulumi:"offerId"`
// Specifies the marketplace plan ID. Defaults to `azure-native-qumulo-v3`. Changing this forces a new resource to be created.
PlanId pulumi.StringPtrOutput `pulumi:"planId"`
// Specifies the marketplace publisher ID. Defaults to `qumulo1584033880660`. Changing this forces a new resource to be created.
PublisherId pulumi.StringPtrOutput `pulumi:"publisherId"`
// Specifies the name of the Resource Group within which this Azure Native Qumulo Scalable File System should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// The storage Sku. Possible values are `Cold_LRS`, `Hot_LRS` and `Hot_ZRS`. Changing this forces a new resource to be created.
StorageSku pulumi.StringOutput `pulumi:"storageSku"`
// The delegated subnet ID for Vnet injection. Changing this forces a new resource to be created.
SubnetId pulumi.StringOutput `pulumi:"subnetId"`
// A mapping of tags which should be assigned to the File System.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The Availability Zone in which the Azure Native Qumulo Scalable File system is located. Changing this forces a new resource to be created.
Zone pulumi.StringOutput `pulumi:"zone"`
}
// NewFileSystem registers a new resource with the given unique name, arguments, and options.
func NewFileSystem(ctx *pulumi.Context,
name string, args *FileSystemArgs, opts ...pulumi.ResourceOption) (*FileSystem, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AdminPassword == nil {
return nil, errors.New("invalid value for required argument 'AdminPassword'")
}
if args.Email == nil {
return nil, errors.New("invalid value for required argument 'Email'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.StorageSku == nil {
return nil, errors.New("invalid value for required argument 'StorageSku'")
}
if args.SubnetId == nil {
return nil, errors.New("invalid value for required argument 'SubnetId'")
}
if args.Zone == nil {
return nil, errors.New("invalid value for required argument 'Zone'")
}
if args.AdminPassword != nil {
args.AdminPassword = pulumi.ToSecret(args.AdminPassword).(pulumi.StringInput)
}
secrets := pulumi.AdditionalSecretOutputs([]string{
"adminPassword",
})
opts = append(opts, secrets)
opts = internal.PkgResourceDefaultOpts(opts)
var resource FileSystem
err := ctx.RegisterResource("azure:qumulo/fileSystem:FileSystem", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetFileSystem gets an existing FileSystem resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetFileSystem(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *FileSystemState, opts ...pulumi.ResourceOption) (*FileSystem, error) {
var resource FileSystem
err := ctx.ReadResource("azure:qumulo/fileSystem:FileSystem", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering FileSystem resources.
type fileSystemState struct {
// The initial administrator password of the Azure Native Qumulo Scalable File System. Changing this forces a new resource to be created.
AdminPassword *string `pulumi:"adminPassword"`
// The email address used for the Azure Native Qumulo Scalable File System. Changing this forces a new resource to be created.
Email *string `pulumi:"email"`
// The Azure Region where the Azure Native Qumulo Scalable File System should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of this Azure Native Qumulo Scalable File System resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the marketplace offer ID. Defaults to `qumulo-saas-mpp`. Changing this forces a new resource to be created.
OfferId *string `pulumi:"offerId"`
// Specifies the marketplace plan ID. Defaults to `azure-native-qumulo-v3`. Changing this forces a new resource to be created.
PlanId *string `pulumi:"planId"`
// Specifies the marketplace publisher ID. Defaults to `qumulo1584033880660`. Changing this forces a new resource to be created.
PublisherId *string `pulumi:"publisherId"`
// Specifies the name of the Resource Group within which this Azure Native Qumulo Scalable File System should exist. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// The storage Sku. Possible values are `Cold_LRS`, `Hot_LRS` and `Hot_ZRS`. Changing this forces a new resource to be created.
StorageSku *string `pulumi:"storageSku"`
// The delegated subnet ID for Vnet injection. Changing this forces a new resource to be created.
SubnetId *string `pulumi:"subnetId"`
// A mapping of tags which should be assigned to the File System.
Tags map[string]string `pulumi:"tags"`
// The Availability Zone in which the Azure Native Qumulo Scalable File system is located. Changing this forces a new resource to be created.
Zone *string `pulumi:"zone"`
}
type FileSystemState struct {
// The initial administrator password of the Azure Native Qumulo Scalable File System. Changing this forces a new resource to be created.
AdminPassword pulumi.StringPtrInput
// The email address used for the Azure Native Qumulo Scalable File System. Changing this forces a new resource to be created.
Email pulumi.StringPtrInput
// The Azure Region where the Azure Native Qumulo Scalable File System should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of this Azure Native Qumulo Scalable File System resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the marketplace offer ID. Defaults to `qumulo-saas-mpp`. Changing this forces a new resource to be created.
OfferId pulumi.StringPtrInput
// Specifies the marketplace plan ID. Defaults to `azure-native-qumulo-v3`. Changing this forces a new resource to be created.
PlanId pulumi.StringPtrInput
// Specifies the marketplace publisher ID. Defaults to `qumulo1584033880660`. Changing this forces a new resource to be created.
PublisherId pulumi.StringPtrInput
// Specifies the name of the Resource Group within which this Azure Native Qumulo Scalable File System should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// The storage Sku. Possible values are `Cold_LRS`, `Hot_LRS` and `Hot_ZRS`. Changing this forces a new resource to be created.
StorageSku pulumi.StringPtrInput
// The delegated subnet ID for Vnet injection. Changing this forces a new resource to be created.
SubnetId pulumi.StringPtrInput
// A mapping of tags which should be assigned to the File System.
Tags pulumi.StringMapInput
// The Availability Zone in which the Azure Native Qumulo Scalable File system is located. Changing this forces a new resource to be created.
Zone pulumi.StringPtrInput
}
func (FileSystemState) ElementType() reflect.Type {
return reflect.TypeOf((*fileSystemState)(nil)).Elem()
}
type fileSystemArgs struct {
// The initial administrator password of the Azure Native Qumulo Scalable File System. Changing this forces a new resource to be created.
AdminPassword string `pulumi:"adminPassword"`
// The email address used for the Azure Native Qumulo Scalable File System. Changing this forces a new resource to be created.
Email string `pulumi:"email"`
// The Azure Region where the Azure Native Qumulo Scalable File System should exist. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of this Azure Native Qumulo Scalable File System resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies the marketplace offer ID. Defaults to `qumulo-saas-mpp`. Changing this forces a new resource to be created.
OfferId *string `pulumi:"offerId"`
// Specifies the marketplace plan ID. Defaults to `azure-native-qumulo-v3`. Changing this forces a new resource to be created.
PlanId *string `pulumi:"planId"`
// Specifies the marketplace publisher ID. Defaults to `qumulo1584033880660`. Changing this forces a new resource to be created.
PublisherId *string `pulumi:"publisherId"`
// Specifies the name of the Resource Group within which this Azure Native Qumulo Scalable File System should exist. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The storage Sku. Possible values are `Cold_LRS`, `Hot_LRS` and `Hot_ZRS`. Changing this forces a new resource to be created.
StorageSku string `pulumi:"storageSku"`
// The delegated subnet ID for Vnet injection. Changing this forces a new resource to be created.
SubnetId string `pulumi:"subnetId"`
// A mapping of tags which should be assigned to the File System.
Tags map[string]string `pulumi:"tags"`
// The Availability Zone in which the Azure Native Qumulo Scalable File system is located. Changing this forces a new resource to be created.
Zone string `pulumi:"zone"`
}
// The set of arguments for constructing a FileSystem resource.
type FileSystemArgs struct {
// The initial administrator password of the Azure Native Qumulo Scalable File System. Changing this forces a new resource to be created.
AdminPassword pulumi.StringInput
// The email address used for the Azure Native Qumulo Scalable File System. Changing this forces a new resource to be created.
Email pulumi.StringInput
// The Azure Region where the Azure Native Qumulo Scalable File System should exist. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of this Azure Native Qumulo Scalable File System resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies the marketplace offer ID. Defaults to `qumulo-saas-mpp`. Changing this forces a new resource to be created.
OfferId pulumi.StringPtrInput
// Specifies the marketplace plan ID. Defaults to `azure-native-qumulo-v3`. Changing this forces a new resource to be created.
PlanId pulumi.StringPtrInput
// Specifies the marketplace publisher ID. Defaults to `qumulo1584033880660`. Changing this forces a new resource to be created.
PublisherId pulumi.StringPtrInput
// Specifies the name of the Resource Group within which this Azure Native Qumulo Scalable File System should exist. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// The storage Sku. Possible values are `Cold_LRS`, `Hot_LRS` and `Hot_ZRS`. Changing this forces a new resource to be created.
StorageSku pulumi.StringInput
// The delegated subnet ID for Vnet injection. Changing this forces a new resource to be created.
SubnetId pulumi.StringInput
// A mapping of tags which should be assigned to the File System.
Tags pulumi.StringMapInput
// The Availability Zone in which the Azure Native Qumulo Scalable File system is located. Changing this forces a new resource to be created.
Zone pulumi.StringInput
}
func (FileSystemArgs) ElementType() reflect.Type {
return reflect.TypeOf((*fileSystemArgs)(nil)).Elem()
}
type FileSystemInput interface {
pulumi.Input
ToFileSystemOutput() FileSystemOutput
ToFileSystemOutputWithContext(ctx context.Context) FileSystemOutput
}
func (*FileSystem) ElementType() reflect.Type {
return reflect.TypeOf((**FileSystem)(nil)).Elem()
}
func (i *FileSystem) ToFileSystemOutput() FileSystemOutput {
return i.ToFileSystemOutputWithContext(context.Background())
}
func (i *FileSystem) ToFileSystemOutputWithContext(ctx context.Context) FileSystemOutput {
return pulumi.ToOutputWithContext(ctx, i).(FileSystemOutput)
}
// FileSystemArrayInput is an input type that accepts FileSystemArray and FileSystemArrayOutput values.
// You can construct a concrete instance of `FileSystemArrayInput` via:
//
// FileSystemArray{ FileSystemArgs{...} }
type FileSystemArrayInput interface {
pulumi.Input
ToFileSystemArrayOutput() FileSystemArrayOutput
ToFileSystemArrayOutputWithContext(context.Context) FileSystemArrayOutput
}
type FileSystemArray []FileSystemInput
func (FileSystemArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*FileSystem)(nil)).Elem()
}
func (i FileSystemArray) ToFileSystemArrayOutput() FileSystemArrayOutput {
return i.ToFileSystemArrayOutputWithContext(context.Background())
}
func (i FileSystemArray) ToFileSystemArrayOutputWithContext(ctx context.Context) FileSystemArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(FileSystemArrayOutput)
}
// FileSystemMapInput is an input type that accepts FileSystemMap and FileSystemMapOutput values.
// You can construct a concrete instance of `FileSystemMapInput` via:
//
// FileSystemMap{ "key": FileSystemArgs{...} }
type FileSystemMapInput interface {
pulumi.Input
ToFileSystemMapOutput() FileSystemMapOutput
ToFileSystemMapOutputWithContext(context.Context) FileSystemMapOutput
}
type FileSystemMap map[string]FileSystemInput
func (FileSystemMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*FileSystem)(nil)).Elem()
}
func (i FileSystemMap) ToFileSystemMapOutput() FileSystemMapOutput {
return i.ToFileSystemMapOutputWithContext(context.Background())
}
func (i FileSystemMap) ToFileSystemMapOutputWithContext(ctx context.Context) FileSystemMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(FileSystemMapOutput)
}
type FileSystemOutput struct{ *pulumi.OutputState }
func (FileSystemOutput) ElementType() reflect.Type {
return reflect.TypeOf((**FileSystem)(nil)).Elem()
}
func (o FileSystemOutput) ToFileSystemOutput() FileSystemOutput {
return o
}
func (o FileSystemOutput) ToFileSystemOutputWithContext(ctx context.Context) FileSystemOutput {
return o
}
// The initial administrator password of the Azure Native Qumulo Scalable File System. Changing this forces a new resource to be created.
func (o FileSystemOutput) AdminPassword() pulumi.StringOutput {
return o.ApplyT(func(v *FileSystem) pulumi.StringOutput { return v.AdminPassword }).(pulumi.StringOutput)
}
// The email address used for the Azure Native Qumulo Scalable File System. Changing this forces a new resource to be created.
func (o FileSystemOutput) Email() pulumi.StringOutput {
return o.ApplyT(func(v *FileSystem) pulumi.StringOutput { return v.Email }).(pulumi.StringOutput)
}
// The Azure Region where the Azure Native Qumulo Scalable File System should exist. Changing this forces a new resource to be created.
func (o FileSystemOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *FileSystem) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of this Azure Native Qumulo Scalable File System resource. Changing this forces a new resource to be created.
func (o FileSystemOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *FileSystem) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the marketplace offer ID. Defaults to `qumulo-saas-mpp`. Changing this forces a new resource to be created.
func (o FileSystemOutput) OfferId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *FileSystem) pulumi.StringPtrOutput { return v.OfferId }).(pulumi.StringPtrOutput)
}
// Specifies the marketplace plan ID. Defaults to `azure-native-qumulo-v3`. Changing this forces a new resource to be created.
func (o FileSystemOutput) PlanId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *FileSystem) pulumi.StringPtrOutput { return v.PlanId }).(pulumi.StringPtrOutput)
}
// Specifies the marketplace publisher ID. Defaults to `qumulo1584033880660`. Changing this forces a new resource to be created.
func (o FileSystemOutput) PublisherId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *FileSystem) pulumi.StringPtrOutput { return v.PublisherId }).(pulumi.StringPtrOutput)
}
// Specifies the name of the Resource Group within which this Azure Native Qumulo Scalable File System should exist. Changing this forces a new resource to be created.
func (o FileSystemOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *FileSystem) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// The storage Sku. Possible values are `Cold_LRS`, `Hot_LRS` and `Hot_ZRS`. Changing this forces a new resource to be created.
func (o FileSystemOutput) StorageSku() pulumi.StringOutput {
return o.ApplyT(func(v *FileSystem) pulumi.StringOutput { return v.StorageSku }).(pulumi.StringOutput)
}
// The delegated subnet ID for Vnet injection. Changing this forces a new resource to be created.
func (o FileSystemOutput) SubnetId() pulumi.StringOutput {
return o.ApplyT(func(v *FileSystem) pulumi.StringOutput { return v.SubnetId }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the File System.
func (o FileSystemOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *FileSystem) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The Availability Zone in which the Azure Native Qumulo Scalable File system is located. Changing this forces a new resource to be created.
func (o FileSystemOutput) Zone() pulumi.StringOutput {
return o.ApplyT(func(v *FileSystem) pulumi.StringOutput { return v.Zone }).(pulumi.StringOutput)
}
type FileSystemArrayOutput struct{ *pulumi.OutputState }
func (FileSystemArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*FileSystem)(nil)).Elem()
}
func (o FileSystemArrayOutput) ToFileSystemArrayOutput() FileSystemArrayOutput {
return o
}
func (o FileSystemArrayOutput) ToFileSystemArrayOutputWithContext(ctx context.Context) FileSystemArrayOutput {
return o
}
func (o FileSystemArrayOutput) Index(i pulumi.IntInput) FileSystemOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FileSystem {
return vs[0].([]*FileSystem)[vs[1].(int)]
}).(FileSystemOutput)
}
type FileSystemMapOutput struct{ *pulumi.OutputState }
func (FileSystemMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*FileSystem)(nil)).Elem()
}
func (o FileSystemMapOutput) ToFileSystemMapOutput() FileSystemMapOutput {
return o
}
func (o FileSystemMapOutput) ToFileSystemMapOutputWithContext(ctx context.Context) FileSystemMapOutput {
return o
}
func (o FileSystemMapOutput) MapIndex(k pulumi.StringInput) FileSystemOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FileSystem {
return vs[0].(map[string]*FileSystem)[vs[1].(string)]
}).(FileSystemOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*FileSystemInput)(nil)).Elem(), &FileSystem{})
pulumi.RegisterInputType(reflect.TypeOf((*FileSystemArrayInput)(nil)).Elem(), FileSystemArray{})
pulumi.RegisterInputType(reflect.TypeOf((*FileSystemMapInput)(nil)).Elem(), FileSystemMap{})
pulumi.RegisterOutputType(FileSystemOutput{})
pulumi.RegisterOutputType(FileSystemArrayOutput{})
pulumi.RegisterOutputType(FileSystemMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/management/init.go | sdk/go/azure/management/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 management
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:management/group:Group":
r = &Group{}
case "azure:management/groupPolicyAssignment:GroupPolicyAssignment":
r = &GroupPolicyAssignment{}
case "azure:management/groupPolicyExemption:GroupPolicyExemption":
r = &GroupPolicyExemption{}
case "azure:management/groupPolicyRemediation:GroupPolicyRemediation":
r = &GroupPolicyRemediation{}
case "azure:management/groupPolicySetDefinition:GroupPolicySetDefinition":
r = &GroupPolicySetDefinition{}
case "azure:management/groupSubscriptionAssociation:GroupSubscriptionAssociation":
r = &GroupSubscriptionAssociation{}
case "azure:management/groupTemplateDeployment:GroupTemplateDeployment":
r = &GroupTemplateDeployment{}
case "azure:management/lock:Lock":
r = &Lock{}
case "azure:management/privateLink:PrivateLink":
r = &PrivateLink{}
case "azure:management/privateLinkAssociation:PrivateLinkAssociation":
r = &PrivateLinkAssociation{}
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",
"management/group",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"management/groupPolicyAssignment",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"management/groupPolicyExemption",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"management/groupPolicyRemediation",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"management/groupPolicySetDefinition",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"management/groupSubscriptionAssociation",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"management/groupTemplateDeployment",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"management/lock",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"management/privateLink",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"management/privateLinkAssociation",
&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/management/pulumiTypes.go | sdk/go/azure/management/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 management
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 GroupPolicyAssignmentIdentity struct {
// A list of User Managed Identity IDs which should be assigned to the Policy Definition.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
IdentityIds []string `pulumi:"identityIds"`
// The Principal ID of the Policy Assignment for this Management Group.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID of the Policy Assignment for this Management Group.
TenantId *string `pulumi:"tenantId"`
// The Type of Managed Identity which should be added to this Policy Definition. Possible values are `SystemAssigned` and `UserAssigned`.
Type string `pulumi:"type"`
}
// GroupPolicyAssignmentIdentityInput is an input type that accepts GroupPolicyAssignmentIdentityArgs and GroupPolicyAssignmentIdentityOutput values.
// You can construct a concrete instance of `GroupPolicyAssignmentIdentityInput` via:
//
// GroupPolicyAssignmentIdentityArgs{...}
type GroupPolicyAssignmentIdentityInput interface {
pulumi.Input
ToGroupPolicyAssignmentIdentityOutput() GroupPolicyAssignmentIdentityOutput
ToGroupPolicyAssignmentIdentityOutputWithContext(context.Context) GroupPolicyAssignmentIdentityOutput
}
type GroupPolicyAssignmentIdentityArgs struct {
// A list of User Managed Identity IDs which should be assigned to the Policy Definition.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
IdentityIds pulumi.StringArrayInput `pulumi:"identityIds"`
// The Principal ID of the Policy Assignment for this Management Group.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID of the Policy Assignment for this Management Group.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// The Type of Managed Identity which should be added to this Policy Definition. Possible values are `SystemAssigned` and `UserAssigned`.
Type pulumi.StringInput `pulumi:"type"`
}
func (GroupPolicyAssignmentIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GroupPolicyAssignmentIdentity)(nil)).Elem()
}
func (i GroupPolicyAssignmentIdentityArgs) ToGroupPolicyAssignmentIdentityOutput() GroupPolicyAssignmentIdentityOutput {
return i.ToGroupPolicyAssignmentIdentityOutputWithContext(context.Background())
}
func (i GroupPolicyAssignmentIdentityArgs) ToGroupPolicyAssignmentIdentityOutputWithContext(ctx context.Context) GroupPolicyAssignmentIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyAssignmentIdentityOutput)
}
func (i GroupPolicyAssignmentIdentityArgs) ToGroupPolicyAssignmentIdentityPtrOutput() GroupPolicyAssignmentIdentityPtrOutput {
return i.ToGroupPolicyAssignmentIdentityPtrOutputWithContext(context.Background())
}
func (i GroupPolicyAssignmentIdentityArgs) ToGroupPolicyAssignmentIdentityPtrOutputWithContext(ctx context.Context) GroupPolicyAssignmentIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyAssignmentIdentityOutput).ToGroupPolicyAssignmentIdentityPtrOutputWithContext(ctx)
}
// GroupPolicyAssignmentIdentityPtrInput is an input type that accepts GroupPolicyAssignmentIdentityArgs, GroupPolicyAssignmentIdentityPtr and GroupPolicyAssignmentIdentityPtrOutput values.
// You can construct a concrete instance of `GroupPolicyAssignmentIdentityPtrInput` via:
//
// GroupPolicyAssignmentIdentityArgs{...}
//
// or:
//
// nil
type GroupPolicyAssignmentIdentityPtrInput interface {
pulumi.Input
ToGroupPolicyAssignmentIdentityPtrOutput() GroupPolicyAssignmentIdentityPtrOutput
ToGroupPolicyAssignmentIdentityPtrOutputWithContext(context.Context) GroupPolicyAssignmentIdentityPtrOutput
}
type groupPolicyAssignmentIdentityPtrType GroupPolicyAssignmentIdentityArgs
func GroupPolicyAssignmentIdentityPtr(v *GroupPolicyAssignmentIdentityArgs) GroupPolicyAssignmentIdentityPtrInput {
return (*groupPolicyAssignmentIdentityPtrType)(v)
}
func (*groupPolicyAssignmentIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**GroupPolicyAssignmentIdentity)(nil)).Elem()
}
func (i *groupPolicyAssignmentIdentityPtrType) ToGroupPolicyAssignmentIdentityPtrOutput() GroupPolicyAssignmentIdentityPtrOutput {
return i.ToGroupPolicyAssignmentIdentityPtrOutputWithContext(context.Background())
}
func (i *groupPolicyAssignmentIdentityPtrType) ToGroupPolicyAssignmentIdentityPtrOutputWithContext(ctx context.Context) GroupPolicyAssignmentIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyAssignmentIdentityPtrOutput)
}
type GroupPolicyAssignmentIdentityOutput struct{ *pulumi.OutputState }
func (GroupPolicyAssignmentIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GroupPolicyAssignmentIdentity)(nil)).Elem()
}
func (o GroupPolicyAssignmentIdentityOutput) ToGroupPolicyAssignmentIdentityOutput() GroupPolicyAssignmentIdentityOutput {
return o
}
func (o GroupPolicyAssignmentIdentityOutput) ToGroupPolicyAssignmentIdentityOutputWithContext(ctx context.Context) GroupPolicyAssignmentIdentityOutput {
return o
}
func (o GroupPolicyAssignmentIdentityOutput) ToGroupPolicyAssignmentIdentityPtrOutput() GroupPolicyAssignmentIdentityPtrOutput {
return o.ToGroupPolicyAssignmentIdentityPtrOutputWithContext(context.Background())
}
func (o GroupPolicyAssignmentIdentityOutput) ToGroupPolicyAssignmentIdentityPtrOutputWithContext(ctx context.Context) GroupPolicyAssignmentIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v GroupPolicyAssignmentIdentity) *GroupPolicyAssignmentIdentity {
return &v
}).(GroupPolicyAssignmentIdentityPtrOutput)
}
// A list of User Managed Identity IDs which should be assigned to the Policy Definition.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
func (o GroupPolicyAssignmentIdentityOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v GroupPolicyAssignmentIdentity) []string { return v.IdentityIds }).(pulumi.StringArrayOutput)
}
// The Principal ID of the Policy Assignment for this Management Group.
func (o GroupPolicyAssignmentIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GroupPolicyAssignmentIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID of the Policy Assignment for this Management Group.
func (o GroupPolicyAssignmentIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GroupPolicyAssignmentIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// The Type of Managed Identity which should be added to this Policy Definition. Possible values are `SystemAssigned` and `UserAssigned`.
func (o GroupPolicyAssignmentIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v GroupPolicyAssignmentIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type GroupPolicyAssignmentIdentityPtrOutput struct{ *pulumi.OutputState }
func (GroupPolicyAssignmentIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GroupPolicyAssignmentIdentity)(nil)).Elem()
}
func (o GroupPolicyAssignmentIdentityPtrOutput) ToGroupPolicyAssignmentIdentityPtrOutput() GroupPolicyAssignmentIdentityPtrOutput {
return o
}
func (o GroupPolicyAssignmentIdentityPtrOutput) ToGroupPolicyAssignmentIdentityPtrOutputWithContext(ctx context.Context) GroupPolicyAssignmentIdentityPtrOutput {
return o
}
func (o GroupPolicyAssignmentIdentityPtrOutput) Elem() GroupPolicyAssignmentIdentityOutput {
return o.ApplyT(func(v *GroupPolicyAssignmentIdentity) GroupPolicyAssignmentIdentity {
if v != nil {
return *v
}
var ret GroupPolicyAssignmentIdentity
return ret
}).(GroupPolicyAssignmentIdentityOutput)
}
// A list of User Managed Identity IDs which should be assigned to the Policy Definition.
//
// > **Note:** This is required when `type` is set to `UserAssigned`.
func (o GroupPolicyAssignmentIdentityPtrOutput) IdentityIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *GroupPolicyAssignmentIdentity) []string {
if v == nil {
return nil
}
return v.IdentityIds
}).(pulumi.StringArrayOutput)
}
// The Principal ID of the Policy Assignment for this Management Group.
func (o GroupPolicyAssignmentIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GroupPolicyAssignmentIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID of the Policy Assignment for this Management Group.
func (o GroupPolicyAssignmentIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GroupPolicyAssignmentIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// The Type of Managed Identity which should be added to this Policy Definition. Possible values are `SystemAssigned` and `UserAssigned`.
func (o GroupPolicyAssignmentIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GroupPolicyAssignmentIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type GroupPolicyAssignmentNonComplianceMessage struct {
// The non-compliance message text. When assigning policy sets (initiatives), unless `policyDefinitionReferenceId` is specified then this message will be the default for all policies.
Content string `pulumi:"content"`
// When assigning policy sets (initiatives), this is the ID of the policy definition that the non-compliance message applies to.
PolicyDefinitionReferenceId *string `pulumi:"policyDefinitionReferenceId"`
}
// GroupPolicyAssignmentNonComplianceMessageInput is an input type that accepts GroupPolicyAssignmentNonComplianceMessageArgs and GroupPolicyAssignmentNonComplianceMessageOutput values.
// You can construct a concrete instance of `GroupPolicyAssignmentNonComplianceMessageInput` via:
//
// GroupPolicyAssignmentNonComplianceMessageArgs{...}
type GroupPolicyAssignmentNonComplianceMessageInput interface {
pulumi.Input
ToGroupPolicyAssignmentNonComplianceMessageOutput() GroupPolicyAssignmentNonComplianceMessageOutput
ToGroupPolicyAssignmentNonComplianceMessageOutputWithContext(context.Context) GroupPolicyAssignmentNonComplianceMessageOutput
}
type GroupPolicyAssignmentNonComplianceMessageArgs struct {
// The non-compliance message text. When assigning policy sets (initiatives), unless `policyDefinitionReferenceId` is specified then this message will be the default for all policies.
Content pulumi.StringInput `pulumi:"content"`
// When assigning policy sets (initiatives), this is the ID of the policy definition that the non-compliance message applies to.
PolicyDefinitionReferenceId pulumi.StringPtrInput `pulumi:"policyDefinitionReferenceId"`
}
func (GroupPolicyAssignmentNonComplianceMessageArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GroupPolicyAssignmentNonComplianceMessage)(nil)).Elem()
}
func (i GroupPolicyAssignmentNonComplianceMessageArgs) ToGroupPolicyAssignmentNonComplianceMessageOutput() GroupPolicyAssignmentNonComplianceMessageOutput {
return i.ToGroupPolicyAssignmentNonComplianceMessageOutputWithContext(context.Background())
}
func (i GroupPolicyAssignmentNonComplianceMessageArgs) ToGroupPolicyAssignmentNonComplianceMessageOutputWithContext(ctx context.Context) GroupPolicyAssignmentNonComplianceMessageOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyAssignmentNonComplianceMessageOutput)
}
// GroupPolicyAssignmentNonComplianceMessageArrayInput is an input type that accepts GroupPolicyAssignmentNonComplianceMessageArray and GroupPolicyAssignmentNonComplianceMessageArrayOutput values.
// You can construct a concrete instance of `GroupPolicyAssignmentNonComplianceMessageArrayInput` via:
//
// GroupPolicyAssignmentNonComplianceMessageArray{ GroupPolicyAssignmentNonComplianceMessageArgs{...} }
type GroupPolicyAssignmentNonComplianceMessageArrayInput interface {
pulumi.Input
ToGroupPolicyAssignmentNonComplianceMessageArrayOutput() GroupPolicyAssignmentNonComplianceMessageArrayOutput
ToGroupPolicyAssignmentNonComplianceMessageArrayOutputWithContext(context.Context) GroupPolicyAssignmentNonComplianceMessageArrayOutput
}
type GroupPolicyAssignmentNonComplianceMessageArray []GroupPolicyAssignmentNonComplianceMessageInput
func (GroupPolicyAssignmentNonComplianceMessageArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GroupPolicyAssignmentNonComplianceMessage)(nil)).Elem()
}
func (i GroupPolicyAssignmentNonComplianceMessageArray) ToGroupPolicyAssignmentNonComplianceMessageArrayOutput() GroupPolicyAssignmentNonComplianceMessageArrayOutput {
return i.ToGroupPolicyAssignmentNonComplianceMessageArrayOutputWithContext(context.Background())
}
func (i GroupPolicyAssignmentNonComplianceMessageArray) ToGroupPolicyAssignmentNonComplianceMessageArrayOutputWithContext(ctx context.Context) GroupPolicyAssignmentNonComplianceMessageArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyAssignmentNonComplianceMessageArrayOutput)
}
type GroupPolicyAssignmentNonComplianceMessageOutput struct{ *pulumi.OutputState }
func (GroupPolicyAssignmentNonComplianceMessageOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GroupPolicyAssignmentNonComplianceMessage)(nil)).Elem()
}
func (o GroupPolicyAssignmentNonComplianceMessageOutput) ToGroupPolicyAssignmentNonComplianceMessageOutput() GroupPolicyAssignmentNonComplianceMessageOutput {
return o
}
func (o GroupPolicyAssignmentNonComplianceMessageOutput) ToGroupPolicyAssignmentNonComplianceMessageOutputWithContext(ctx context.Context) GroupPolicyAssignmentNonComplianceMessageOutput {
return o
}
// The non-compliance message text. When assigning policy sets (initiatives), unless `policyDefinitionReferenceId` is specified then this message will be the default for all policies.
func (o GroupPolicyAssignmentNonComplianceMessageOutput) Content() pulumi.StringOutput {
return o.ApplyT(func(v GroupPolicyAssignmentNonComplianceMessage) string { return v.Content }).(pulumi.StringOutput)
}
// When assigning policy sets (initiatives), this is the ID of the policy definition that the non-compliance message applies to.
func (o GroupPolicyAssignmentNonComplianceMessageOutput) PolicyDefinitionReferenceId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GroupPolicyAssignmentNonComplianceMessage) *string { return v.PolicyDefinitionReferenceId }).(pulumi.StringPtrOutput)
}
type GroupPolicyAssignmentNonComplianceMessageArrayOutput struct{ *pulumi.OutputState }
func (GroupPolicyAssignmentNonComplianceMessageArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GroupPolicyAssignmentNonComplianceMessage)(nil)).Elem()
}
func (o GroupPolicyAssignmentNonComplianceMessageArrayOutput) ToGroupPolicyAssignmentNonComplianceMessageArrayOutput() GroupPolicyAssignmentNonComplianceMessageArrayOutput {
return o
}
func (o GroupPolicyAssignmentNonComplianceMessageArrayOutput) ToGroupPolicyAssignmentNonComplianceMessageArrayOutputWithContext(ctx context.Context) GroupPolicyAssignmentNonComplianceMessageArrayOutput {
return o
}
func (o GroupPolicyAssignmentNonComplianceMessageArrayOutput) Index(i pulumi.IntInput) GroupPolicyAssignmentNonComplianceMessageOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GroupPolicyAssignmentNonComplianceMessage {
return vs[0].([]GroupPolicyAssignmentNonComplianceMessage)[vs[1].(int)]
}).(GroupPolicyAssignmentNonComplianceMessageOutput)
}
type GroupPolicyAssignmentOverride struct {
// One or more `overrideSelector` block as defined below.
Selectors []GroupPolicyAssignmentOverrideSelector `pulumi:"selectors"`
// Specifies the value to override the policy property. Possible values for `policyEffect` override listed [policy effects](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effects).
Value string `pulumi:"value"`
}
// GroupPolicyAssignmentOverrideInput is an input type that accepts GroupPolicyAssignmentOverrideArgs and GroupPolicyAssignmentOverrideOutput values.
// You can construct a concrete instance of `GroupPolicyAssignmentOverrideInput` via:
//
// GroupPolicyAssignmentOverrideArgs{...}
type GroupPolicyAssignmentOverrideInput interface {
pulumi.Input
ToGroupPolicyAssignmentOverrideOutput() GroupPolicyAssignmentOverrideOutput
ToGroupPolicyAssignmentOverrideOutputWithContext(context.Context) GroupPolicyAssignmentOverrideOutput
}
type GroupPolicyAssignmentOverrideArgs struct {
// One or more `overrideSelector` block as defined below.
Selectors GroupPolicyAssignmentOverrideSelectorArrayInput `pulumi:"selectors"`
// Specifies the value to override the policy property. Possible values for `policyEffect` override listed [policy effects](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effects).
Value pulumi.StringInput `pulumi:"value"`
}
func (GroupPolicyAssignmentOverrideArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GroupPolicyAssignmentOverride)(nil)).Elem()
}
func (i GroupPolicyAssignmentOverrideArgs) ToGroupPolicyAssignmentOverrideOutput() GroupPolicyAssignmentOverrideOutput {
return i.ToGroupPolicyAssignmentOverrideOutputWithContext(context.Background())
}
func (i GroupPolicyAssignmentOverrideArgs) ToGroupPolicyAssignmentOverrideOutputWithContext(ctx context.Context) GroupPolicyAssignmentOverrideOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyAssignmentOverrideOutput)
}
// GroupPolicyAssignmentOverrideArrayInput is an input type that accepts GroupPolicyAssignmentOverrideArray and GroupPolicyAssignmentOverrideArrayOutput values.
// You can construct a concrete instance of `GroupPolicyAssignmentOverrideArrayInput` via:
//
// GroupPolicyAssignmentOverrideArray{ GroupPolicyAssignmentOverrideArgs{...} }
type GroupPolicyAssignmentOverrideArrayInput interface {
pulumi.Input
ToGroupPolicyAssignmentOverrideArrayOutput() GroupPolicyAssignmentOverrideArrayOutput
ToGroupPolicyAssignmentOverrideArrayOutputWithContext(context.Context) GroupPolicyAssignmentOverrideArrayOutput
}
type GroupPolicyAssignmentOverrideArray []GroupPolicyAssignmentOverrideInput
func (GroupPolicyAssignmentOverrideArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GroupPolicyAssignmentOverride)(nil)).Elem()
}
func (i GroupPolicyAssignmentOverrideArray) ToGroupPolicyAssignmentOverrideArrayOutput() GroupPolicyAssignmentOverrideArrayOutput {
return i.ToGroupPolicyAssignmentOverrideArrayOutputWithContext(context.Background())
}
func (i GroupPolicyAssignmentOverrideArray) ToGroupPolicyAssignmentOverrideArrayOutputWithContext(ctx context.Context) GroupPolicyAssignmentOverrideArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyAssignmentOverrideArrayOutput)
}
type GroupPolicyAssignmentOverrideOutput struct{ *pulumi.OutputState }
func (GroupPolicyAssignmentOverrideOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GroupPolicyAssignmentOverride)(nil)).Elem()
}
func (o GroupPolicyAssignmentOverrideOutput) ToGroupPolicyAssignmentOverrideOutput() GroupPolicyAssignmentOverrideOutput {
return o
}
func (o GroupPolicyAssignmentOverrideOutput) ToGroupPolicyAssignmentOverrideOutputWithContext(ctx context.Context) GroupPolicyAssignmentOverrideOutput {
return o
}
// One or more `overrideSelector` block as defined below.
func (o GroupPolicyAssignmentOverrideOutput) Selectors() GroupPolicyAssignmentOverrideSelectorArrayOutput {
return o.ApplyT(func(v GroupPolicyAssignmentOverride) []GroupPolicyAssignmentOverrideSelector { return v.Selectors }).(GroupPolicyAssignmentOverrideSelectorArrayOutput)
}
// Specifies the value to override the policy property. Possible values for `policyEffect` override listed [policy effects](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/effects).
func (o GroupPolicyAssignmentOverrideOutput) Value() pulumi.StringOutput {
return o.ApplyT(func(v GroupPolicyAssignmentOverride) string { return v.Value }).(pulumi.StringOutput)
}
type GroupPolicyAssignmentOverrideArrayOutput struct{ *pulumi.OutputState }
func (GroupPolicyAssignmentOverrideArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GroupPolicyAssignmentOverride)(nil)).Elem()
}
func (o GroupPolicyAssignmentOverrideArrayOutput) ToGroupPolicyAssignmentOverrideArrayOutput() GroupPolicyAssignmentOverrideArrayOutput {
return o
}
func (o GroupPolicyAssignmentOverrideArrayOutput) ToGroupPolicyAssignmentOverrideArrayOutputWithContext(ctx context.Context) GroupPolicyAssignmentOverrideArrayOutput {
return o
}
func (o GroupPolicyAssignmentOverrideArrayOutput) Index(i pulumi.IntInput) GroupPolicyAssignmentOverrideOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GroupPolicyAssignmentOverride {
return vs[0].([]GroupPolicyAssignmentOverride)[vs[1].(int)]
}).(GroupPolicyAssignmentOverrideOutput)
}
type GroupPolicyAssignmentOverrideSelector struct {
Ins []string `pulumi:"ins"`
Kind *string `pulumi:"kind"`
NotIns []string `pulumi:"notIns"`
}
// GroupPolicyAssignmentOverrideSelectorInput is an input type that accepts GroupPolicyAssignmentOverrideSelectorArgs and GroupPolicyAssignmentOverrideSelectorOutput values.
// You can construct a concrete instance of `GroupPolicyAssignmentOverrideSelectorInput` via:
//
// GroupPolicyAssignmentOverrideSelectorArgs{...}
type GroupPolicyAssignmentOverrideSelectorInput interface {
pulumi.Input
ToGroupPolicyAssignmentOverrideSelectorOutput() GroupPolicyAssignmentOverrideSelectorOutput
ToGroupPolicyAssignmentOverrideSelectorOutputWithContext(context.Context) GroupPolicyAssignmentOverrideSelectorOutput
}
type GroupPolicyAssignmentOverrideSelectorArgs struct {
Ins pulumi.StringArrayInput `pulumi:"ins"`
Kind pulumi.StringPtrInput `pulumi:"kind"`
NotIns pulumi.StringArrayInput `pulumi:"notIns"`
}
func (GroupPolicyAssignmentOverrideSelectorArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GroupPolicyAssignmentOverrideSelector)(nil)).Elem()
}
func (i GroupPolicyAssignmentOverrideSelectorArgs) ToGroupPolicyAssignmentOverrideSelectorOutput() GroupPolicyAssignmentOverrideSelectorOutput {
return i.ToGroupPolicyAssignmentOverrideSelectorOutputWithContext(context.Background())
}
func (i GroupPolicyAssignmentOverrideSelectorArgs) ToGroupPolicyAssignmentOverrideSelectorOutputWithContext(ctx context.Context) GroupPolicyAssignmentOverrideSelectorOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyAssignmentOverrideSelectorOutput)
}
// GroupPolicyAssignmentOverrideSelectorArrayInput is an input type that accepts GroupPolicyAssignmentOverrideSelectorArray and GroupPolicyAssignmentOverrideSelectorArrayOutput values.
// You can construct a concrete instance of `GroupPolicyAssignmentOverrideSelectorArrayInput` via:
//
// GroupPolicyAssignmentOverrideSelectorArray{ GroupPolicyAssignmentOverrideSelectorArgs{...} }
type GroupPolicyAssignmentOverrideSelectorArrayInput interface {
pulumi.Input
ToGroupPolicyAssignmentOverrideSelectorArrayOutput() GroupPolicyAssignmentOverrideSelectorArrayOutput
ToGroupPolicyAssignmentOverrideSelectorArrayOutputWithContext(context.Context) GroupPolicyAssignmentOverrideSelectorArrayOutput
}
type GroupPolicyAssignmentOverrideSelectorArray []GroupPolicyAssignmentOverrideSelectorInput
func (GroupPolicyAssignmentOverrideSelectorArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GroupPolicyAssignmentOverrideSelector)(nil)).Elem()
}
func (i GroupPolicyAssignmentOverrideSelectorArray) ToGroupPolicyAssignmentOverrideSelectorArrayOutput() GroupPolicyAssignmentOverrideSelectorArrayOutput {
return i.ToGroupPolicyAssignmentOverrideSelectorArrayOutputWithContext(context.Background())
}
func (i GroupPolicyAssignmentOverrideSelectorArray) ToGroupPolicyAssignmentOverrideSelectorArrayOutputWithContext(ctx context.Context) GroupPolicyAssignmentOverrideSelectorArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyAssignmentOverrideSelectorArrayOutput)
}
type GroupPolicyAssignmentOverrideSelectorOutput struct{ *pulumi.OutputState }
func (GroupPolicyAssignmentOverrideSelectorOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GroupPolicyAssignmentOverrideSelector)(nil)).Elem()
}
func (o GroupPolicyAssignmentOverrideSelectorOutput) ToGroupPolicyAssignmentOverrideSelectorOutput() GroupPolicyAssignmentOverrideSelectorOutput {
return o
}
func (o GroupPolicyAssignmentOverrideSelectorOutput) ToGroupPolicyAssignmentOverrideSelectorOutputWithContext(ctx context.Context) GroupPolicyAssignmentOverrideSelectorOutput {
return o
}
func (o GroupPolicyAssignmentOverrideSelectorOutput) Ins() pulumi.StringArrayOutput {
return o.ApplyT(func(v GroupPolicyAssignmentOverrideSelector) []string { return v.Ins }).(pulumi.StringArrayOutput)
}
func (o GroupPolicyAssignmentOverrideSelectorOutput) Kind() pulumi.StringPtrOutput {
return o.ApplyT(func(v GroupPolicyAssignmentOverrideSelector) *string { return v.Kind }).(pulumi.StringPtrOutput)
}
func (o GroupPolicyAssignmentOverrideSelectorOutput) NotIns() pulumi.StringArrayOutput {
return o.ApplyT(func(v GroupPolicyAssignmentOverrideSelector) []string { return v.NotIns }).(pulumi.StringArrayOutput)
}
type GroupPolicyAssignmentOverrideSelectorArrayOutput struct{ *pulumi.OutputState }
func (GroupPolicyAssignmentOverrideSelectorArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GroupPolicyAssignmentOverrideSelector)(nil)).Elem()
}
func (o GroupPolicyAssignmentOverrideSelectorArrayOutput) ToGroupPolicyAssignmentOverrideSelectorArrayOutput() GroupPolicyAssignmentOverrideSelectorArrayOutput {
return o
}
func (o GroupPolicyAssignmentOverrideSelectorArrayOutput) ToGroupPolicyAssignmentOverrideSelectorArrayOutputWithContext(ctx context.Context) GroupPolicyAssignmentOverrideSelectorArrayOutput {
return o
}
func (o GroupPolicyAssignmentOverrideSelectorArrayOutput) Index(i pulumi.IntInput) GroupPolicyAssignmentOverrideSelectorOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GroupPolicyAssignmentOverrideSelector {
return vs[0].([]GroupPolicyAssignmentOverrideSelector)[vs[1].(int)]
}).(GroupPolicyAssignmentOverrideSelectorOutput)
}
type GroupPolicyAssignmentResourceSelector struct {
// Specifies a name for the resource selector.
Name *string `pulumi:"name"`
// One or more `resourceSelector` block as defined below.
Selectors []GroupPolicyAssignmentResourceSelectorSelector `pulumi:"selectors"`
}
// GroupPolicyAssignmentResourceSelectorInput is an input type that accepts GroupPolicyAssignmentResourceSelectorArgs and GroupPolicyAssignmentResourceSelectorOutput values.
// You can construct a concrete instance of `GroupPolicyAssignmentResourceSelectorInput` via:
//
// GroupPolicyAssignmentResourceSelectorArgs{...}
type GroupPolicyAssignmentResourceSelectorInput interface {
pulumi.Input
ToGroupPolicyAssignmentResourceSelectorOutput() GroupPolicyAssignmentResourceSelectorOutput
ToGroupPolicyAssignmentResourceSelectorOutputWithContext(context.Context) GroupPolicyAssignmentResourceSelectorOutput
}
type GroupPolicyAssignmentResourceSelectorArgs struct {
// Specifies a name for the resource selector.
Name pulumi.StringPtrInput `pulumi:"name"`
// One or more `resourceSelector` block as defined below.
Selectors GroupPolicyAssignmentResourceSelectorSelectorArrayInput `pulumi:"selectors"`
}
func (GroupPolicyAssignmentResourceSelectorArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GroupPolicyAssignmentResourceSelector)(nil)).Elem()
}
func (i GroupPolicyAssignmentResourceSelectorArgs) ToGroupPolicyAssignmentResourceSelectorOutput() GroupPolicyAssignmentResourceSelectorOutput {
return i.ToGroupPolicyAssignmentResourceSelectorOutputWithContext(context.Background())
}
func (i GroupPolicyAssignmentResourceSelectorArgs) ToGroupPolicyAssignmentResourceSelectorOutputWithContext(ctx context.Context) GroupPolicyAssignmentResourceSelectorOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyAssignmentResourceSelectorOutput)
}
// GroupPolicyAssignmentResourceSelectorArrayInput is an input type that accepts GroupPolicyAssignmentResourceSelectorArray and GroupPolicyAssignmentResourceSelectorArrayOutput values.
// You can construct a concrete instance of `GroupPolicyAssignmentResourceSelectorArrayInput` via:
//
// GroupPolicyAssignmentResourceSelectorArray{ GroupPolicyAssignmentResourceSelectorArgs{...} }
type GroupPolicyAssignmentResourceSelectorArrayInput interface {
pulumi.Input
ToGroupPolicyAssignmentResourceSelectorArrayOutput() GroupPolicyAssignmentResourceSelectorArrayOutput
ToGroupPolicyAssignmentResourceSelectorArrayOutputWithContext(context.Context) GroupPolicyAssignmentResourceSelectorArrayOutput
}
type GroupPolicyAssignmentResourceSelectorArray []GroupPolicyAssignmentResourceSelectorInput
func (GroupPolicyAssignmentResourceSelectorArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]GroupPolicyAssignmentResourceSelector)(nil)).Elem()
}
func (i GroupPolicyAssignmentResourceSelectorArray) ToGroupPolicyAssignmentResourceSelectorArrayOutput() GroupPolicyAssignmentResourceSelectorArrayOutput {
return i.ToGroupPolicyAssignmentResourceSelectorArrayOutputWithContext(context.Background())
}
func (i GroupPolicyAssignmentResourceSelectorArray) ToGroupPolicyAssignmentResourceSelectorArrayOutputWithContext(ctx context.Context) GroupPolicyAssignmentResourceSelectorArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyAssignmentResourceSelectorArrayOutput)
}
type GroupPolicyAssignmentResourceSelectorOutput struct{ *pulumi.OutputState }
func (GroupPolicyAssignmentResourceSelectorOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GroupPolicyAssignmentResourceSelector)(nil)).Elem()
}
func (o GroupPolicyAssignmentResourceSelectorOutput) ToGroupPolicyAssignmentResourceSelectorOutput() GroupPolicyAssignmentResourceSelectorOutput {
return o
}
func (o GroupPolicyAssignmentResourceSelectorOutput) ToGroupPolicyAssignmentResourceSelectorOutputWithContext(ctx context.Context) GroupPolicyAssignmentResourceSelectorOutput {
return o
}
// Specifies a name for the resource selector.
func (o GroupPolicyAssignmentResourceSelectorOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v GroupPolicyAssignmentResourceSelector) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// One or more `resourceSelector` block as defined below.
func (o GroupPolicyAssignmentResourceSelectorOutput) Selectors() GroupPolicyAssignmentResourceSelectorSelectorArrayOutput {
return o.ApplyT(func(v GroupPolicyAssignmentResourceSelector) []GroupPolicyAssignmentResourceSelectorSelector {
return v.Selectors
}).(GroupPolicyAssignmentResourceSelectorSelectorArrayOutput)
}
type GroupPolicyAssignmentResourceSelectorArrayOutput struct{ *pulumi.OutputState }
func (GroupPolicyAssignmentResourceSelectorArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]GroupPolicyAssignmentResourceSelector)(nil)).Elem()
}
func (o GroupPolicyAssignmentResourceSelectorArrayOutput) ToGroupPolicyAssignmentResourceSelectorArrayOutput() GroupPolicyAssignmentResourceSelectorArrayOutput {
return o
}
func (o GroupPolicyAssignmentResourceSelectorArrayOutput) ToGroupPolicyAssignmentResourceSelectorArrayOutputWithContext(ctx context.Context) GroupPolicyAssignmentResourceSelectorArrayOutput {
return o
}
func (o GroupPolicyAssignmentResourceSelectorArrayOutput) Index(i pulumi.IntInput) GroupPolicyAssignmentResourceSelectorOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) GroupPolicyAssignmentResourceSelector {
return vs[0].([]GroupPolicyAssignmentResourceSelector)[vs[1].(int)]
}).(GroupPolicyAssignmentResourceSelectorOutput)
}
type GroupPolicyAssignmentResourceSelectorSelector struct {
Ins []string `pulumi:"ins"`
Kind string `pulumi:"kind"`
NotIns []string `pulumi:"notIns"`
}
// GroupPolicyAssignmentResourceSelectorSelectorInput is an input type that accepts GroupPolicyAssignmentResourceSelectorSelectorArgs and GroupPolicyAssignmentResourceSelectorSelectorOutput values.
// You can construct a concrete instance of `GroupPolicyAssignmentResourceSelectorSelectorInput` via:
//
// GroupPolicyAssignmentResourceSelectorSelectorArgs{...}
type GroupPolicyAssignmentResourceSelectorSelectorInput interface {
pulumi.Input
ToGroupPolicyAssignmentResourceSelectorSelectorOutput() GroupPolicyAssignmentResourceSelectorSelectorOutput
| 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/management/groupPolicyRemediation.go | sdk/go/azure/management/groupPolicyRemediation.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package management
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 Management Group Policy Remediation.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "encoding/json"
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleGroup, err := management.NewGroup(ctx, "example", &management.GroupArgs{
// DisplayName: pulumi.String("Example Management Group"),
// })
// if err != nil {
// return err
// }
// example, err := policy.GetPolicyDefintion(ctx, &policy.GetPolicyDefintionArgs{
// DisplayName: pulumi.StringRef("Allowed locations"),
// }, nil)
// if err != nil {
// return err
// }
// tmpJSON0, err := json.Marshal(map[string]interface{}{
// "listOfAllowedLocations": map[string]interface{}{
// "value": []string{
// "East US",
// },
// },
// })
// if err != nil {
// return err
// }
// json0 := string(tmpJSON0)
// exampleGroupPolicyAssignment, err := management.NewGroupPolicyAssignment(ctx, "example", &management.GroupPolicyAssignmentArgs{
// Name: pulumi.String("exampleAssignment"),
// ManagementGroupId: exampleGroup.ID(),
// PolicyDefinitionId: pulumi.String(example.Id),
// Parameters: pulumi.String(json0),
// })
// if err != nil {
// return err
// }
// _, err = management.NewGroupPolicyRemediation(ctx, "example", &management.GroupPolicyRemediationArgs{
// Name: pulumi.String("example"),
// ManagementGroupId: exampleGroup.ID(),
// PolicyAssignmentId: exampleGroupPolicyAssignment.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.Management` - 2021-10-01
//
// ## Import
//
// Policy Remediations can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:management/groupPolicyRemediation:GroupPolicyRemediation example /providers/Microsoft.Management/managementGroups/my-mgmt-group-id/providers/Microsoft.PolicyInsights/remediations/remediation1
// ```
type GroupPolicyRemediation struct {
pulumi.CustomResourceState
// The percentage failure threshold. Possible values range between `0.0` and `1.0`. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold.
FailurePercentage pulumi.Float64PtrOutput `pulumi:"failurePercentage"`
// A list of the resource locations that will be remediated.
LocationFilters pulumi.StringArrayOutput `pulumi:"locationFilters"`
// The Management Group ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
ManagementGroupId pulumi.StringOutput `pulumi:"managementGroupId"`
// The name of the Policy Remediation. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used.
ParallelDeployments pulumi.IntPtrOutput `pulumi:"parallelDeployments"`
// The ID of the Policy Assignment that should be remediated.
PolicyAssignmentId pulumi.StringOutput `pulumi:"policyAssignmentId"`
// The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.
PolicyDefinitionReferenceId pulumi.StringPtrOutput `pulumi:"policyDefinitionReferenceId"`
// Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
ResourceCount pulumi.IntPtrOutput `pulumi:"resourceCount"`
}
// NewGroupPolicyRemediation registers a new resource with the given unique name, arguments, and options.
func NewGroupPolicyRemediation(ctx *pulumi.Context,
name string, args *GroupPolicyRemediationArgs, opts ...pulumi.ResourceOption) (*GroupPolicyRemediation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ManagementGroupId == nil {
return nil, errors.New("invalid value for required argument 'ManagementGroupId'")
}
if args.PolicyAssignmentId == nil {
return nil, errors.New("invalid value for required argument 'PolicyAssignmentId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource GroupPolicyRemediation
err := ctx.RegisterResource("azure:management/groupPolicyRemediation:GroupPolicyRemediation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGroupPolicyRemediation gets an existing GroupPolicyRemediation resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetGroupPolicyRemediation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GroupPolicyRemediationState, opts ...pulumi.ResourceOption) (*GroupPolicyRemediation, error) {
var resource GroupPolicyRemediation
err := ctx.ReadResource("azure:management/groupPolicyRemediation:GroupPolicyRemediation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering GroupPolicyRemediation resources.
type groupPolicyRemediationState struct {
// The percentage failure threshold. Possible values range between `0.0` and `1.0`. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold.
FailurePercentage *float64 `pulumi:"failurePercentage"`
// A list of the resource locations that will be remediated.
LocationFilters []string `pulumi:"locationFilters"`
// The Management Group ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
ManagementGroupId *string `pulumi:"managementGroupId"`
// The name of the Policy Remediation. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used.
ParallelDeployments *int `pulumi:"parallelDeployments"`
// The ID of the Policy Assignment that should be remediated.
PolicyAssignmentId *string `pulumi:"policyAssignmentId"`
// The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.
PolicyDefinitionReferenceId *string `pulumi:"policyDefinitionReferenceId"`
// Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
ResourceCount *int `pulumi:"resourceCount"`
}
type GroupPolicyRemediationState struct {
// The percentage failure threshold. Possible values range between `0.0` and `1.0`. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold.
FailurePercentage pulumi.Float64PtrInput
// A list of the resource locations that will be remediated.
LocationFilters pulumi.StringArrayInput
// The Management Group ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
ManagementGroupId pulumi.StringPtrInput
// The name of the Policy Remediation. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used.
ParallelDeployments pulumi.IntPtrInput
// The ID of the Policy Assignment that should be remediated.
PolicyAssignmentId pulumi.StringPtrInput
// The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.
PolicyDefinitionReferenceId pulumi.StringPtrInput
// Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
ResourceCount pulumi.IntPtrInput
}
func (GroupPolicyRemediationState) ElementType() reflect.Type {
return reflect.TypeOf((*groupPolicyRemediationState)(nil)).Elem()
}
type groupPolicyRemediationArgs struct {
// The percentage failure threshold. Possible values range between `0.0` and `1.0`. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold.
FailurePercentage *float64 `pulumi:"failurePercentage"`
// A list of the resource locations that will be remediated.
LocationFilters []string `pulumi:"locationFilters"`
// The Management Group ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
ManagementGroupId string `pulumi:"managementGroupId"`
// The name of the Policy Remediation. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used.
ParallelDeployments *int `pulumi:"parallelDeployments"`
// The ID of the Policy Assignment that should be remediated.
PolicyAssignmentId string `pulumi:"policyAssignmentId"`
// The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.
PolicyDefinitionReferenceId *string `pulumi:"policyDefinitionReferenceId"`
// Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
ResourceCount *int `pulumi:"resourceCount"`
}
// The set of arguments for constructing a GroupPolicyRemediation resource.
type GroupPolicyRemediationArgs struct {
// The percentage failure threshold. Possible values range between `0.0` and `1.0`. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold.
FailurePercentage pulumi.Float64PtrInput
// A list of the resource locations that will be remediated.
LocationFilters pulumi.StringArrayInput
// The Management Group ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
ManagementGroupId pulumi.StringInput
// The name of the Policy Remediation. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used.
ParallelDeployments pulumi.IntPtrInput
// The ID of the Policy Assignment that should be remediated.
PolicyAssignmentId pulumi.StringInput
// The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.
PolicyDefinitionReferenceId pulumi.StringPtrInput
// Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
ResourceCount pulumi.IntPtrInput
}
func (GroupPolicyRemediationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*groupPolicyRemediationArgs)(nil)).Elem()
}
type GroupPolicyRemediationInput interface {
pulumi.Input
ToGroupPolicyRemediationOutput() GroupPolicyRemediationOutput
ToGroupPolicyRemediationOutputWithContext(ctx context.Context) GroupPolicyRemediationOutput
}
func (*GroupPolicyRemediation) ElementType() reflect.Type {
return reflect.TypeOf((**GroupPolicyRemediation)(nil)).Elem()
}
func (i *GroupPolicyRemediation) ToGroupPolicyRemediationOutput() GroupPolicyRemediationOutput {
return i.ToGroupPolicyRemediationOutputWithContext(context.Background())
}
func (i *GroupPolicyRemediation) ToGroupPolicyRemediationOutputWithContext(ctx context.Context) GroupPolicyRemediationOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyRemediationOutput)
}
// GroupPolicyRemediationArrayInput is an input type that accepts GroupPolicyRemediationArray and GroupPolicyRemediationArrayOutput values.
// You can construct a concrete instance of `GroupPolicyRemediationArrayInput` via:
//
// GroupPolicyRemediationArray{ GroupPolicyRemediationArgs{...} }
type GroupPolicyRemediationArrayInput interface {
pulumi.Input
ToGroupPolicyRemediationArrayOutput() GroupPolicyRemediationArrayOutput
ToGroupPolicyRemediationArrayOutputWithContext(context.Context) GroupPolicyRemediationArrayOutput
}
type GroupPolicyRemediationArray []GroupPolicyRemediationInput
func (GroupPolicyRemediationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GroupPolicyRemediation)(nil)).Elem()
}
func (i GroupPolicyRemediationArray) ToGroupPolicyRemediationArrayOutput() GroupPolicyRemediationArrayOutput {
return i.ToGroupPolicyRemediationArrayOutputWithContext(context.Background())
}
func (i GroupPolicyRemediationArray) ToGroupPolicyRemediationArrayOutputWithContext(ctx context.Context) GroupPolicyRemediationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyRemediationArrayOutput)
}
// GroupPolicyRemediationMapInput is an input type that accepts GroupPolicyRemediationMap and GroupPolicyRemediationMapOutput values.
// You can construct a concrete instance of `GroupPolicyRemediationMapInput` via:
//
// GroupPolicyRemediationMap{ "key": GroupPolicyRemediationArgs{...} }
type GroupPolicyRemediationMapInput interface {
pulumi.Input
ToGroupPolicyRemediationMapOutput() GroupPolicyRemediationMapOutput
ToGroupPolicyRemediationMapOutputWithContext(context.Context) GroupPolicyRemediationMapOutput
}
type GroupPolicyRemediationMap map[string]GroupPolicyRemediationInput
func (GroupPolicyRemediationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GroupPolicyRemediation)(nil)).Elem()
}
func (i GroupPolicyRemediationMap) ToGroupPolicyRemediationMapOutput() GroupPolicyRemediationMapOutput {
return i.ToGroupPolicyRemediationMapOutputWithContext(context.Background())
}
func (i GroupPolicyRemediationMap) ToGroupPolicyRemediationMapOutputWithContext(ctx context.Context) GroupPolicyRemediationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyRemediationMapOutput)
}
type GroupPolicyRemediationOutput struct{ *pulumi.OutputState }
func (GroupPolicyRemediationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GroupPolicyRemediation)(nil)).Elem()
}
func (o GroupPolicyRemediationOutput) ToGroupPolicyRemediationOutput() GroupPolicyRemediationOutput {
return o
}
func (o GroupPolicyRemediationOutput) ToGroupPolicyRemediationOutputWithContext(ctx context.Context) GroupPolicyRemediationOutput {
return o
}
// The percentage failure threshold. Possible values range between `0.0` and `1.0`. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold.
func (o GroupPolicyRemediationOutput) FailurePercentage() pulumi.Float64PtrOutput {
return o.ApplyT(func(v *GroupPolicyRemediation) pulumi.Float64PtrOutput { return v.FailurePercentage }).(pulumi.Float64PtrOutput)
}
// A list of the resource locations that will be remediated.
func (o GroupPolicyRemediationOutput) LocationFilters() pulumi.StringArrayOutput {
return o.ApplyT(func(v *GroupPolicyRemediation) pulumi.StringArrayOutput { return v.LocationFilters }).(pulumi.StringArrayOutput)
}
// The Management Group ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
func (o GroupPolicyRemediationOutput) ManagementGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicyRemediation) pulumi.StringOutput { return v.ManagementGroupId }).(pulumi.StringOutput)
}
// The name of the Policy Remediation. Changing this forces a new resource to be created.
func (o GroupPolicyRemediationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicyRemediation) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used.
func (o GroupPolicyRemediationOutput) ParallelDeployments() pulumi.IntPtrOutput {
return o.ApplyT(func(v *GroupPolicyRemediation) pulumi.IntPtrOutput { return v.ParallelDeployments }).(pulumi.IntPtrOutput)
}
// The ID of the Policy Assignment that should be remediated.
func (o GroupPolicyRemediationOutput) PolicyAssignmentId() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicyRemediation) pulumi.StringOutput { return v.PolicyAssignmentId }).(pulumi.StringOutput)
}
// The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.
func (o GroupPolicyRemediationOutput) PolicyDefinitionReferenceId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GroupPolicyRemediation) pulumi.StringPtrOutput { return v.PolicyDefinitionReferenceId }).(pulumi.StringPtrOutput)
}
// Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
func (o GroupPolicyRemediationOutput) ResourceCount() pulumi.IntPtrOutput {
return o.ApplyT(func(v *GroupPolicyRemediation) pulumi.IntPtrOutput { return v.ResourceCount }).(pulumi.IntPtrOutput)
}
type GroupPolicyRemediationArrayOutput struct{ *pulumi.OutputState }
func (GroupPolicyRemediationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GroupPolicyRemediation)(nil)).Elem()
}
func (o GroupPolicyRemediationArrayOutput) ToGroupPolicyRemediationArrayOutput() GroupPolicyRemediationArrayOutput {
return o
}
func (o GroupPolicyRemediationArrayOutput) ToGroupPolicyRemediationArrayOutputWithContext(ctx context.Context) GroupPolicyRemediationArrayOutput {
return o
}
func (o GroupPolicyRemediationArrayOutput) Index(i pulumi.IntInput) GroupPolicyRemediationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GroupPolicyRemediation {
return vs[0].([]*GroupPolicyRemediation)[vs[1].(int)]
}).(GroupPolicyRemediationOutput)
}
type GroupPolicyRemediationMapOutput struct{ *pulumi.OutputState }
func (GroupPolicyRemediationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GroupPolicyRemediation)(nil)).Elem()
}
func (o GroupPolicyRemediationMapOutput) ToGroupPolicyRemediationMapOutput() GroupPolicyRemediationMapOutput {
return o
}
func (o GroupPolicyRemediationMapOutput) ToGroupPolicyRemediationMapOutputWithContext(ctx context.Context) GroupPolicyRemediationMapOutput {
return o
}
func (o GroupPolicyRemediationMapOutput) MapIndex(k pulumi.StringInput) GroupPolicyRemediationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GroupPolicyRemediation {
return vs[0].(map[string]*GroupPolicyRemediation)[vs[1].(string)]
}).(GroupPolicyRemediationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GroupPolicyRemediationInput)(nil)).Elem(), &GroupPolicyRemediation{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupPolicyRemediationArrayInput)(nil)).Elem(), GroupPolicyRemediationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupPolicyRemediationMapInput)(nil)).Elem(), GroupPolicyRemediationMap{})
pulumi.RegisterOutputType(GroupPolicyRemediationOutput{})
pulumi.RegisterOutputType(GroupPolicyRemediationArrayOutput{})
pulumi.RegisterOutputType(GroupPolicyRemediationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/management/group.go | sdk/go/azure/management/group.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package management
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Management Group.
//
// !> **Note:** Configuring `subscriptionIds` is not supported when using the `management.GroupSubscriptionAssociation` resource, results will be unpredictable.
//
// ## 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/management"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil)
// if err != nil {
// return err
// }
// exampleParent, err := management.NewGroup(ctx, "example_parent", &management.GroupArgs{
// DisplayName: pulumi.String("ParentGroup"),
// SubscriptionIds: pulumi.StringArray{
// pulumi.String(current.SubscriptionId),
// },
// })
// if err != nil {
// return err
// }
// _, err = management.NewGroup(ctx, "example_child", &management.GroupArgs{
// DisplayName: pulumi.String("ChildGroup"),
// ParentManagementGroupId: exampleParent.ID(),
// SubscriptionIds: pulumi.StringArray{
// pulumi.String(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.Management` - 2020-05-01
//
// ## Import
//
// Management Groups can be imported using the `management group resource id`, e.g.
//
// ```sh
// $ pulumi import azure:management/group:Group example /providers/Microsoft.Management/managementGroups/group1
// ```
type Group struct {
pulumi.CustomResourceState
// A friendly name for this Management Group. If not specified, this will be the same as the `name`.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Parent Management Group.
ParentManagementGroupId pulumi.StringOutput `pulumi:"parentManagementGroupId"`
// A list of Subscription GUIDs which should be assigned to the Management Group.
//
// > **Note:** To clear all Subscriptions from the Management Group set `subscriptionIds` to an empty list
SubscriptionIds pulumi.StringArrayOutput `pulumi:"subscriptionIds"`
// The Management Group ID with the Tenant ID prefix.
TenantScopedId pulumi.StringOutput `pulumi:"tenantScopedId"`
}
// NewGroup registers a new resource with the given unique name, arguments, and options.
func NewGroup(ctx *pulumi.Context,
name string, args *GroupArgs, opts ...pulumi.ResourceOption) (*Group, error) {
if args == nil {
args = &GroupArgs{}
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:managementgroups/managementGroup:ManagementGroup"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Group
err := ctx.RegisterResource("azure:management/group:Group", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGroup gets an existing Group resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GroupState, opts ...pulumi.ResourceOption) (*Group, error) {
var resource Group
err := ctx.ReadResource("azure:management/group:Group", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Group resources.
type groupState struct {
// A friendly name for this Management Group. If not specified, this will be the same as the `name`.
DisplayName *string `pulumi:"displayName"`
// The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Parent Management Group.
ParentManagementGroupId *string `pulumi:"parentManagementGroupId"`
// A list of Subscription GUIDs which should be assigned to the Management Group.
//
// > **Note:** To clear all Subscriptions from the Management Group set `subscriptionIds` to an empty list
SubscriptionIds []string `pulumi:"subscriptionIds"`
// The Management Group ID with the Tenant ID prefix.
TenantScopedId *string `pulumi:"tenantScopedId"`
}
type GroupState struct {
// A friendly name for this Management Group. If not specified, this will be the same as the `name`.
DisplayName pulumi.StringPtrInput
// The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Parent Management Group.
ParentManagementGroupId pulumi.StringPtrInput
// A list of Subscription GUIDs which should be assigned to the Management Group.
//
// > **Note:** To clear all Subscriptions from the Management Group set `subscriptionIds` to an empty list
SubscriptionIds pulumi.StringArrayInput
// The Management Group ID with the Tenant ID prefix.
TenantScopedId pulumi.StringPtrInput
}
func (GroupState) ElementType() reflect.Type {
return reflect.TypeOf((*groupState)(nil)).Elem()
}
type groupArgs struct {
// A friendly name for this Management Group. If not specified, this will be the same as the `name`.
DisplayName *string `pulumi:"displayName"`
// The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Parent Management Group.
ParentManagementGroupId *string `pulumi:"parentManagementGroupId"`
// A list of Subscription GUIDs which should be assigned to the Management Group.
//
// > **Note:** To clear all Subscriptions from the Management Group set `subscriptionIds` to an empty list
SubscriptionIds []string `pulumi:"subscriptionIds"`
}
// The set of arguments for constructing a Group resource.
type GroupArgs struct {
// A friendly name for this Management Group. If not specified, this will be the same as the `name`.
DisplayName pulumi.StringPtrInput
// The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Parent Management Group.
ParentManagementGroupId pulumi.StringPtrInput
// A list of Subscription GUIDs which should be assigned to the Management Group.
//
// > **Note:** To clear all Subscriptions from the Management Group set `subscriptionIds` to an empty list
SubscriptionIds pulumi.StringArrayInput
}
func (GroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*groupArgs)(nil)).Elem()
}
type GroupInput interface {
pulumi.Input
ToGroupOutput() GroupOutput
ToGroupOutputWithContext(ctx context.Context) GroupOutput
}
func (*Group) ElementType() reflect.Type {
return reflect.TypeOf((**Group)(nil)).Elem()
}
func (i *Group) ToGroupOutput() GroupOutput {
return i.ToGroupOutputWithContext(context.Background())
}
func (i *Group) ToGroupOutputWithContext(ctx context.Context) GroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupOutput)
}
// GroupArrayInput is an input type that accepts GroupArray and GroupArrayOutput values.
// You can construct a concrete instance of `GroupArrayInput` via:
//
// GroupArray{ GroupArgs{...} }
type GroupArrayInput interface {
pulumi.Input
ToGroupArrayOutput() GroupArrayOutput
ToGroupArrayOutputWithContext(context.Context) GroupArrayOutput
}
type GroupArray []GroupInput
func (GroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Group)(nil)).Elem()
}
func (i GroupArray) ToGroupArrayOutput() GroupArrayOutput {
return i.ToGroupArrayOutputWithContext(context.Background())
}
func (i GroupArray) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupArrayOutput)
}
// GroupMapInput is an input type that accepts GroupMap and GroupMapOutput values.
// You can construct a concrete instance of `GroupMapInput` via:
//
// GroupMap{ "key": GroupArgs{...} }
type GroupMapInput interface {
pulumi.Input
ToGroupMapOutput() GroupMapOutput
ToGroupMapOutputWithContext(context.Context) GroupMapOutput
}
type GroupMap map[string]GroupInput
func (GroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Group)(nil)).Elem()
}
func (i GroupMap) ToGroupMapOutput() GroupMapOutput {
return i.ToGroupMapOutputWithContext(context.Background())
}
func (i GroupMap) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupMapOutput)
}
type GroupOutput struct{ *pulumi.OutputState }
func (GroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Group)(nil)).Elem()
}
func (o GroupOutput) ToGroupOutput() GroupOutput {
return o
}
func (o GroupOutput) ToGroupOutputWithContext(ctx context.Context) GroupOutput {
return o
}
// A friendly name for this Management Group. If not specified, this will be the same as the `name`.
func (o GroupOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
func (o GroupOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Parent Management Group.
func (o GroupOutput) ParentManagementGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.ParentManagementGroupId }).(pulumi.StringOutput)
}
// A list of Subscription GUIDs which should be assigned to the Management Group.
//
// > **Note:** To clear all Subscriptions from the Management Group set `subscriptionIds` to an empty list
func (o GroupOutput) SubscriptionIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Group) pulumi.StringArrayOutput { return v.SubscriptionIds }).(pulumi.StringArrayOutput)
}
// The Management Group ID with the Tenant ID prefix.
func (o GroupOutput) TenantScopedId() pulumi.StringOutput {
return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.TenantScopedId }).(pulumi.StringOutput)
}
type GroupArrayOutput struct{ *pulumi.OutputState }
func (GroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Group)(nil)).Elem()
}
func (o GroupArrayOutput) ToGroupArrayOutput() GroupArrayOutput {
return o
}
func (o GroupArrayOutput) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput {
return o
}
func (o GroupArrayOutput) Index(i pulumi.IntInput) GroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Group {
return vs[0].([]*Group)[vs[1].(int)]
}).(GroupOutput)
}
type GroupMapOutput struct{ *pulumi.OutputState }
func (GroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Group)(nil)).Elem()
}
func (o GroupMapOutput) ToGroupMapOutput() GroupMapOutput {
return o
}
func (o GroupMapOutput) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput {
return o
}
func (o GroupMapOutput) MapIndex(k pulumi.StringInput) GroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Group {
return vs[0].(map[string]*Group)[vs[1].(string)]
}).(GroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GroupInput)(nil)).Elem(), &Group{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupArrayInput)(nil)).Elem(), GroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupMapInput)(nil)).Elem(), GroupMap{})
pulumi.RegisterOutputType(GroupOutput{})
pulumi.RegisterOutputType(GroupArrayOutput{})
pulumi.RegisterOutputType(GroupMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/management/getGroupTemplateDeployment.go | sdk/go/azure/management/getGroupTemplateDeployment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package management
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 Management Group Template Deployment.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management"
// "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 := management.LookupGroupTemplateDeployment(ctx, &management.LookupGroupTemplateDeploymentArgs{
// Name: "existing",
// ManagementGroupId: "00000000-0000-0000-000000000000",
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("id", example.Id)
// ctx.Export("exampleOutput", pulumi.Any(std.Jsondecode(ctx, &std.JsondecodeArgs{
// Input: example.OutputContent,
// }, nil).Result.ExampleOutput.Value))
// return nil
// })
// }
//
// ```
func LookupGroupTemplateDeployment(ctx *pulumi.Context, args *LookupGroupTemplateDeploymentArgs, opts ...pulumi.InvokeOption) (*LookupGroupTemplateDeploymentResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupGroupTemplateDeploymentResult
err := ctx.Invoke("azure:management/getGroupTemplateDeployment:getGroupTemplateDeployment", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getGroupTemplateDeployment.
type LookupGroupTemplateDeploymentArgs struct {
// The ID of the Management Group to which this template was applied.
ManagementGroupId string `pulumi:"managementGroupId"`
// The name of this Management Group Template Deployment.
Name string `pulumi:"name"`
}
// A collection of values returned by getGroupTemplateDeployment.
type LookupGroupTemplateDeploymentResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
ManagementGroupId string `pulumi:"managementGroupId"`
Name string `pulumi:"name"`
// The JSON Content of the Outputs of the ARM Template Deployment.
OutputContent string `pulumi:"outputContent"`
}
func LookupGroupTemplateDeploymentOutput(ctx *pulumi.Context, args LookupGroupTemplateDeploymentOutputArgs, opts ...pulumi.InvokeOption) LookupGroupTemplateDeploymentResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupGroupTemplateDeploymentResultOutput, error) {
args := v.(LookupGroupTemplateDeploymentArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:management/getGroupTemplateDeployment:getGroupTemplateDeployment", args, LookupGroupTemplateDeploymentResultOutput{}, options).(LookupGroupTemplateDeploymentResultOutput), nil
}).(LookupGroupTemplateDeploymentResultOutput)
}
// A collection of arguments for invoking getGroupTemplateDeployment.
type LookupGroupTemplateDeploymentOutputArgs struct {
// The ID of the Management Group to which this template was applied.
ManagementGroupId pulumi.StringInput `pulumi:"managementGroupId"`
// The name of this Management Group Template Deployment.
Name pulumi.StringInput `pulumi:"name"`
}
func (LookupGroupTemplateDeploymentOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupGroupTemplateDeploymentArgs)(nil)).Elem()
}
// A collection of values returned by getGroupTemplateDeployment.
type LookupGroupTemplateDeploymentResultOutput struct{ *pulumi.OutputState }
func (LookupGroupTemplateDeploymentResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupGroupTemplateDeploymentResult)(nil)).Elem()
}
func (o LookupGroupTemplateDeploymentResultOutput) ToLookupGroupTemplateDeploymentResultOutput() LookupGroupTemplateDeploymentResultOutput {
return o
}
func (o LookupGroupTemplateDeploymentResultOutput) ToLookupGroupTemplateDeploymentResultOutputWithContext(ctx context.Context) LookupGroupTemplateDeploymentResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupGroupTemplateDeploymentResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupTemplateDeploymentResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupGroupTemplateDeploymentResultOutput) ManagementGroupId() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupTemplateDeploymentResult) string { return v.ManagementGroupId }).(pulumi.StringOutput)
}
func (o LookupGroupTemplateDeploymentResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupTemplateDeploymentResult) string { return v.Name }).(pulumi.StringOutput)
}
// The JSON Content of the Outputs of the ARM Template Deployment.
func (o LookupGroupTemplateDeploymentResultOutput) OutputContent() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupTemplateDeploymentResult) string { return v.OutputContent }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupGroupTemplateDeploymentResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/management/lock.go | sdk/go/azure/management/lock.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package management
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Management Lock which is scoped to a Subscription, Resource Group or Resource.
//
// ## Example Usage
//
// ### Subscription Level Lock)
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil)
// if err != nil {
// return err
// }
// _, err = management.NewLock(ctx, "subscription-level", &management.LockArgs{
// Name: pulumi.String("subscription-level"),
// Scope: pulumi.String(current.Id),
// LockLevel: pulumi.String("CanNotDelete"),
// Notes: pulumi.String("Items can't be deleted in this subscription!"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### Resource Group Level Lock)
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("locked-resource-group"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = management.NewLock(ctx, "resource-group-level", &management.LockArgs{
// Name: pulumi.String("resource-group-level"),
// Scope: example.ID(),
// LockLevel: pulumi.String("ReadOnly"),
// Notes: pulumi.String("This Resource Group is Read-Only"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ### Resource Level Lock)
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("locked-resource-group"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
// Name: pulumi.String("locked-publicip"),
// Location: example.Location,
// ResourceGroupName: example.Name,
// AllocationMethod: pulumi.String("Static"),
// IdleTimeoutInMinutes: pulumi.Int(30),
// })
// if err != nil {
// return err
// }
// _, err = management.NewLock(ctx, "public-ip", &management.LockArgs{
// Name: pulumi.String("resource-ip"),
// Scope: examplePublicIp.ID(),
// LockLevel: pulumi.String("CanNotDelete"),
// Notes: pulumi.String("Locked because it's needed by a third-party"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Authorization` - 2020-05-01
//
// ## Import
//
// Management Locks can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:management/lock:Lock lock1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Authorization/locks/lock1
// ```
type Lock struct {
pulumi.CustomResourceState
// Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created.
//
// > **Note:** `CanNotDelete` means authorized users are able to read and modify the resources, but not delete. `ReadOnly` means authorized users can only read from a resource, but they can't modify or delete it.
LockLevel pulumi.StringOutput `pulumi:"lockLevel"`
// Specifies the name of the Management Lock. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
Notes pulumi.StringPtrOutput `pulumi:"notes"`
// Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.
Scope pulumi.StringOutput `pulumi:"scope"`
}
// NewLock registers a new resource with the given unique name, arguments, and options.
func NewLock(ctx *pulumi.Context,
name string, args *LockArgs, opts ...pulumi.ResourceOption) (*Lock, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.LockLevel == nil {
return nil, errors.New("invalid value for required argument 'LockLevel'")
}
if args.Scope == nil {
return nil, errors.New("invalid value for required argument 'Scope'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure:managementresource/manangementLock:ManangementLock"),
},
})
opts = append(opts, aliases)
opts = internal.PkgResourceDefaultOpts(opts)
var resource Lock
err := ctx.RegisterResource("azure:management/lock:Lock", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLock gets an existing Lock resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetLock(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LockState, opts ...pulumi.ResourceOption) (*Lock, error) {
var resource Lock
err := ctx.ReadResource("azure:management/lock:Lock", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Lock resources.
type lockState struct {
// Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created.
//
// > **Note:** `CanNotDelete` means authorized users are able to read and modify the resources, but not delete. `ReadOnly` means authorized users can only read from a resource, but they can't modify or delete it.
LockLevel *string `pulumi:"lockLevel"`
// Specifies the name of the Management Lock. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
Notes *string `pulumi:"notes"`
// Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.
Scope *string `pulumi:"scope"`
}
type LockState struct {
// Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created.
//
// > **Note:** `CanNotDelete` means authorized users are able to read and modify the resources, but not delete. `ReadOnly` means authorized users can only read from a resource, but they can't modify or delete it.
LockLevel pulumi.StringPtrInput
// Specifies the name of the Management Lock. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
Notes pulumi.StringPtrInput
// Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.
Scope pulumi.StringPtrInput
}
func (LockState) ElementType() reflect.Type {
return reflect.TypeOf((*lockState)(nil)).Elem()
}
type lockArgs struct {
// Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created.
//
// > **Note:** `CanNotDelete` means authorized users are able to read and modify the resources, but not delete. `ReadOnly` means authorized users can only read from a resource, but they can't modify or delete it.
LockLevel string `pulumi:"lockLevel"`
// Specifies the name of the Management Lock. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
Notes *string `pulumi:"notes"`
// Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.
Scope string `pulumi:"scope"`
}
// The set of arguments for constructing a Lock resource.
type LockArgs struct {
// Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created.
//
// > **Note:** `CanNotDelete` means authorized users are able to read and modify the resources, but not delete. `ReadOnly` means authorized users can only read from a resource, but they can't modify or delete it.
LockLevel pulumi.StringInput
// Specifies the name of the Management Lock. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
Notes pulumi.StringPtrInput
// Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.
Scope pulumi.StringInput
}
func (LockArgs) ElementType() reflect.Type {
return reflect.TypeOf((*lockArgs)(nil)).Elem()
}
type LockInput interface {
pulumi.Input
ToLockOutput() LockOutput
ToLockOutputWithContext(ctx context.Context) LockOutput
}
func (*Lock) ElementType() reflect.Type {
return reflect.TypeOf((**Lock)(nil)).Elem()
}
func (i *Lock) ToLockOutput() LockOutput {
return i.ToLockOutputWithContext(context.Background())
}
func (i *Lock) ToLockOutputWithContext(ctx context.Context) LockOutput {
return pulumi.ToOutputWithContext(ctx, i).(LockOutput)
}
// LockArrayInput is an input type that accepts LockArray and LockArrayOutput values.
// You can construct a concrete instance of `LockArrayInput` via:
//
// LockArray{ LockArgs{...} }
type LockArrayInput interface {
pulumi.Input
ToLockArrayOutput() LockArrayOutput
ToLockArrayOutputWithContext(context.Context) LockArrayOutput
}
type LockArray []LockInput
func (LockArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Lock)(nil)).Elem()
}
func (i LockArray) ToLockArrayOutput() LockArrayOutput {
return i.ToLockArrayOutputWithContext(context.Background())
}
func (i LockArray) ToLockArrayOutputWithContext(ctx context.Context) LockArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LockArrayOutput)
}
// LockMapInput is an input type that accepts LockMap and LockMapOutput values.
// You can construct a concrete instance of `LockMapInput` via:
//
// LockMap{ "key": LockArgs{...} }
type LockMapInput interface {
pulumi.Input
ToLockMapOutput() LockMapOutput
ToLockMapOutputWithContext(context.Context) LockMapOutput
}
type LockMap map[string]LockInput
func (LockMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Lock)(nil)).Elem()
}
func (i LockMap) ToLockMapOutput() LockMapOutput {
return i.ToLockMapOutputWithContext(context.Background())
}
func (i LockMap) ToLockMapOutputWithContext(ctx context.Context) LockMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LockMapOutput)
}
type LockOutput struct{ *pulumi.OutputState }
func (LockOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Lock)(nil)).Elem()
}
func (o LockOutput) ToLockOutput() LockOutput {
return o
}
func (o LockOutput) ToLockOutputWithContext(ctx context.Context) LockOutput {
return o
}
// Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created.
//
// > **Note:** `CanNotDelete` means authorized users are able to read and modify the resources, but not delete. `ReadOnly` means authorized users can only read from a resource, but they can't modify or delete it.
func (o LockOutput) LockLevel() pulumi.StringOutput {
return o.ApplyT(func(v *Lock) pulumi.StringOutput { return v.LockLevel }).(pulumi.StringOutput)
}
// Specifies the name of the Management Lock. Changing this forces a new resource to be created.
func (o LockOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Lock) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
func (o LockOutput) Notes() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Lock) pulumi.StringPtrOutput { return v.Notes }).(pulumi.StringPtrOutput)
}
// Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.
func (o LockOutput) Scope() pulumi.StringOutput {
return o.ApplyT(func(v *Lock) pulumi.StringOutput { return v.Scope }).(pulumi.StringOutput)
}
type LockArrayOutput struct{ *pulumi.OutputState }
func (LockArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Lock)(nil)).Elem()
}
func (o LockArrayOutput) ToLockArrayOutput() LockArrayOutput {
return o
}
func (o LockArrayOutput) ToLockArrayOutputWithContext(ctx context.Context) LockArrayOutput {
return o
}
func (o LockArrayOutput) Index(i pulumi.IntInput) LockOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Lock {
return vs[0].([]*Lock)[vs[1].(int)]
}).(LockOutput)
}
type LockMapOutput struct{ *pulumi.OutputState }
func (LockMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Lock)(nil)).Elem()
}
func (o LockMapOutput) ToLockMapOutput() LockMapOutput {
return o
}
func (o LockMapOutput) ToLockMapOutputWithContext(ctx context.Context) LockMapOutput {
return o
}
func (o LockMapOutput) MapIndex(k pulumi.StringInput) LockOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Lock {
return vs[0].(map[string]*Lock)[vs[1].(string)]
}).(LockOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LockInput)(nil)).Elem(), &Lock{})
pulumi.RegisterInputType(reflect.TypeOf((*LockArrayInput)(nil)).Elem(), LockArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LockMapInput)(nil)).Elem(), LockMap{})
pulumi.RegisterOutputType(LockOutput{})
pulumi.RegisterOutputType(LockArrayOutput{})
pulumi.RegisterOutputType(LockMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/management/groupTemplateDeployment.go | sdk/go/azure/management/groupTemplateDeployment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package management
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Template Deployment at a Management Group Scope.
//
// > **Note:** Deleting a Deployment at the Management Group Scope will not delete any resources created by the deployment.
//
// > **Note:** Deployments to a Management Group are always Incrementally applied. Existing resources that are not part of the template will not be removed.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := management.LookupGroup(ctx, &management.LookupGroupArgs{
// Name: pulumi.StringRef("00000000-0000-0000-0000-000000000000"),
// }, nil)
// if err != nil {
// return err
// }
// _, err = management.NewGroupTemplateDeployment(ctx, "example", &management.GroupTemplateDeploymentArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// ManagementGroupId: pulumi.String(example.Id),
// TemplateContent: pulumi.String(`{
// \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#\",
// \"contentVersion\": \"1.0.0.0\",
// \"parameters\": {
// \"policyAssignmentName\": {
// \"type\": \"string\",
// \"defaultValue\": \"[guid(parameters('policyDefinitionID'), resourceGroup().name)]\",
// \"metadata\": {
// \"description\": \"Specifies the name of the policy assignment, can be used defined or an idempotent name as the defaultValue provides.\"
// }
// },
// \"policyDefinitionID\": {
// \"type\": \"string\",
// \"metadata\": {
// \"description\": \"Specifies the ID of the policy definition or policy set definition being assigned.\"
// }
// }
// },
// \"resources\": [
// {
// \"type\": \"Microsoft.Authorization/policyAssignments\",
// \"name\": \"[parameters('policyAssignmentName')]\",
// \"apiVersion\": \"2019-09-01\",
// \"properties\": {
// \"scope\": \"[subscriptionResourceId('Microsoft.Resources/resourceGroups', resourceGroup().name)]\",
// \"policyDefinitionId\": \"[parameters('policyDefinitionID')]\"
// }
// }
// ]
// }
//
// `),
//
// ParametersContent: pulumi.String(`{
// \"$schema\": \"https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#\",
// \"contentVersion\": \"1.0.0.0\",
// \"parameters\": {
// \"policyDefinitionID\": {
// \"value\": \"/providers/Microsoft.Authorization/policyDefinitions/0a914e76-4921-4c19-b460-a2d36003525a\"
// }
// }
// }
//
// `),
//
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management"
// "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 := management.LookupGroup(ctx, &management.LookupGroupArgs{
// Name: pulumi.StringRef("00000000-0000-0000-0000-000000000000"),
// }, nil)
// if err != nil {
// return err
// }
// invokeFile, err := std.File(ctx, &std.FileArgs{
// Input: "templates/example-deploy-template.json",
// }, nil)
// if err != nil {
// return err
// }
// invokeFile1, err := std.File(ctx, &std.FileArgs{
// Input: "templates/example-deploy-params.json",
// }, nil)
// if err != nil {
// return err
// }
// _, err = management.NewGroupTemplateDeployment(ctx, "example", &management.GroupTemplateDeploymentArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// ManagementGroupId: pulumi.String(example.Id),
// TemplateContent: pulumi.String(invokeFile.Result),
// ParametersContent: pulumi.String(invokeFile1.Result),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := management.LookupGroup(ctx, &management.LookupGroupArgs{
// Name: pulumi.StringRef("00000000-0000-0000-0000-000000000000"),
// }, nil)
// if err != nil {
// return err
// }
// exampleGetTemplateSpecVersion, err := core.GetTemplateSpecVersion(ctx, &core.GetTemplateSpecVersionArgs{
// Name: "exampleTemplateForManagementGroup",
// ResourceGroupName: "exampleResourceGroup",
// Version: "v1.0.9",
// }, nil)
// if err != nil {
// return err
// }
// _, err = management.NewGroupTemplateDeployment(ctx, "example", &management.GroupTemplateDeploymentArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// ManagementGroupId: pulumi.String(example.Id),
// TemplateSpecVersionId: pulumi.String(exampleGetTemplateSpecVersion.Id),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Management Group Template Deployments can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:management/groupTemplateDeployment:GroupTemplateDeployment example /providers/Microsoft.Management/managementGroups/my-management-group-id/providers/Microsoft.Resources/deployments/deploy1
// ```
type GroupTemplateDeployment struct {
pulumi.CustomResourceState
// The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
DebugLevel pulumi.StringPtrOutput `pulumi:"debugLevel"`
// The Azure Region where the Template should exist. Changing this forces a new Template to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
ManagementGroupId pulumi.StringOutput `pulumi:"managementGroupId"`
// The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The JSON Content of the Outputs of the ARM Template Deployment.
OutputContent pulumi.StringOutput `pulumi:"outputContent"`
// The contents of the ARM Template parameters file - containing a JSON list of parameters.
ParametersContent pulumi.StringOutput `pulumi:"parametersContent"`
// A mapping of tags which should be assigned to the Template.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`.
TemplateContent pulumi.StringOutput `pulumi:"templateContent"`
// The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`.
TemplateSpecVersionId pulumi.StringPtrOutput `pulumi:"templateSpecVersionId"`
}
// NewGroupTemplateDeployment registers a new resource with the given unique name, arguments, and options.
func NewGroupTemplateDeployment(ctx *pulumi.Context,
name string, args *GroupTemplateDeploymentArgs, opts ...pulumi.ResourceOption) (*GroupTemplateDeployment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ManagementGroupId == nil {
return nil, errors.New("invalid value for required argument 'ManagementGroupId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource GroupTemplateDeployment
err := ctx.RegisterResource("azure:management/groupTemplateDeployment:GroupTemplateDeployment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGroupTemplateDeployment gets an existing GroupTemplateDeployment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetGroupTemplateDeployment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GroupTemplateDeploymentState, opts ...pulumi.ResourceOption) (*GroupTemplateDeployment, error) {
var resource GroupTemplateDeployment
err := ctx.ReadResource("azure:management/groupTemplateDeployment:GroupTemplateDeployment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering GroupTemplateDeployment resources.
type groupTemplateDeploymentState struct {
// The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
DebugLevel *string `pulumi:"debugLevel"`
// The Azure Region where the Template should exist. Changing this forces a new Template to be created.
Location *string `pulumi:"location"`
// The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
ManagementGroupId *string `pulumi:"managementGroupId"`
// The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
Name *string `pulumi:"name"`
// The JSON Content of the Outputs of the ARM Template Deployment.
OutputContent *string `pulumi:"outputContent"`
// The contents of the ARM Template parameters file - containing a JSON list of parameters.
ParametersContent *string `pulumi:"parametersContent"`
// A mapping of tags which should be assigned to the Template.
Tags map[string]string `pulumi:"tags"`
// The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`.
TemplateContent *string `pulumi:"templateContent"`
// The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`.
TemplateSpecVersionId *string `pulumi:"templateSpecVersionId"`
}
type GroupTemplateDeploymentState struct {
// The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
DebugLevel pulumi.StringPtrInput
// The Azure Region where the Template should exist. Changing this forces a new Template to be created.
Location pulumi.StringPtrInput
// The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
ManagementGroupId pulumi.StringPtrInput
// The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
Name pulumi.StringPtrInput
// The JSON Content of the Outputs of the ARM Template Deployment.
OutputContent pulumi.StringPtrInput
// The contents of the ARM Template parameters file - containing a JSON list of parameters.
ParametersContent pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Template.
Tags pulumi.StringMapInput
// The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`.
TemplateContent pulumi.StringPtrInput
// The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`.
TemplateSpecVersionId pulumi.StringPtrInput
}
func (GroupTemplateDeploymentState) ElementType() reflect.Type {
return reflect.TypeOf((*groupTemplateDeploymentState)(nil)).Elem()
}
type groupTemplateDeploymentArgs struct {
// The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
DebugLevel *string `pulumi:"debugLevel"`
// The Azure Region where the Template should exist. Changing this forces a new Template to be created.
Location *string `pulumi:"location"`
// The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
ManagementGroupId string `pulumi:"managementGroupId"`
// The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
Name *string `pulumi:"name"`
// The contents of the ARM Template parameters file - containing a JSON list of parameters.
ParametersContent *string `pulumi:"parametersContent"`
// A mapping of tags which should be assigned to the Template.
Tags map[string]string `pulumi:"tags"`
// The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`.
TemplateContent *string `pulumi:"templateContent"`
// The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`.
TemplateSpecVersionId *string `pulumi:"templateSpecVersionId"`
}
// The set of arguments for constructing a GroupTemplateDeployment resource.
type GroupTemplateDeploymentArgs struct {
// The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
DebugLevel pulumi.StringPtrInput
// The Azure Region where the Template should exist. Changing this forces a new Template to be created.
Location pulumi.StringPtrInput
// The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
ManagementGroupId pulumi.StringInput
// The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
Name pulumi.StringPtrInput
// The contents of the ARM Template parameters file - containing a JSON list of parameters.
ParametersContent pulumi.StringPtrInput
// A mapping of tags which should be assigned to the Template.
Tags pulumi.StringMapInput
// The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`.
TemplateContent pulumi.StringPtrInput
// The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`.
TemplateSpecVersionId pulumi.StringPtrInput
}
func (GroupTemplateDeploymentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*groupTemplateDeploymentArgs)(nil)).Elem()
}
type GroupTemplateDeploymentInput interface {
pulumi.Input
ToGroupTemplateDeploymentOutput() GroupTemplateDeploymentOutput
ToGroupTemplateDeploymentOutputWithContext(ctx context.Context) GroupTemplateDeploymentOutput
}
func (*GroupTemplateDeployment) ElementType() reflect.Type {
return reflect.TypeOf((**GroupTemplateDeployment)(nil)).Elem()
}
func (i *GroupTemplateDeployment) ToGroupTemplateDeploymentOutput() GroupTemplateDeploymentOutput {
return i.ToGroupTemplateDeploymentOutputWithContext(context.Background())
}
func (i *GroupTemplateDeployment) ToGroupTemplateDeploymentOutputWithContext(ctx context.Context) GroupTemplateDeploymentOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupTemplateDeploymentOutput)
}
// GroupTemplateDeploymentArrayInput is an input type that accepts GroupTemplateDeploymentArray and GroupTemplateDeploymentArrayOutput values.
// You can construct a concrete instance of `GroupTemplateDeploymentArrayInput` via:
//
// GroupTemplateDeploymentArray{ GroupTemplateDeploymentArgs{...} }
type GroupTemplateDeploymentArrayInput interface {
pulumi.Input
ToGroupTemplateDeploymentArrayOutput() GroupTemplateDeploymentArrayOutput
ToGroupTemplateDeploymentArrayOutputWithContext(context.Context) GroupTemplateDeploymentArrayOutput
}
type GroupTemplateDeploymentArray []GroupTemplateDeploymentInput
func (GroupTemplateDeploymentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GroupTemplateDeployment)(nil)).Elem()
}
func (i GroupTemplateDeploymentArray) ToGroupTemplateDeploymentArrayOutput() GroupTemplateDeploymentArrayOutput {
return i.ToGroupTemplateDeploymentArrayOutputWithContext(context.Background())
}
func (i GroupTemplateDeploymentArray) ToGroupTemplateDeploymentArrayOutputWithContext(ctx context.Context) GroupTemplateDeploymentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupTemplateDeploymentArrayOutput)
}
// GroupTemplateDeploymentMapInput is an input type that accepts GroupTemplateDeploymentMap and GroupTemplateDeploymentMapOutput values.
// You can construct a concrete instance of `GroupTemplateDeploymentMapInput` via:
//
// GroupTemplateDeploymentMap{ "key": GroupTemplateDeploymentArgs{...} }
type GroupTemplateDeploymentMapInput interface {
pulumi.Input
ToGroupTemplateDeploymentMapOutput() GroupTemplateDeploymentMapOutput
ToGroupTemplateDeploymentMapOutputWithContext(context.Context) GroupTemplateDeploymentMapOutput
}
type GroupTemplateDeploymentMap map[string]GroupTemplateDeploymentInput
func (GroupTemplateDeploymentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GroupTemplateDeployment)(nil)).Elem()
}
func (i GroupTemplateDeploymentMap) ToGroupTemplateDeploymentMapOutput() GroupTemplateDeploymentMapOutput {
return i.ToGroupTemplateDeploymentMapOutputWithContext(context.Background())
}
func (i GroupTemplateDeploymentMap) ToGroupTemplateDeploymentMapOutputWithContext(ctx context.Context) GroupTemplateDeploymentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupTemplateDeploymentMapOutput)
}
type GroupTemplateDeploymentOutput struct{ *pulumi.OutputState }
func (GroupTemplateDeploymentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GroupTemplateDeployment)(nil)).Elem()
}
func (o GroupTemplateDeploymentOutput) ToGroupTemplateDeploymentOutput() GroupTemplateDeploymentOutput {
return o
}
func (o GroupTemplateDeploymentOutput) ToGroupTemplateDeploymentOutputWithContext(ctx context.Context) GroupTemplateDeploymentOutput {
return o
}
// The Debug Level which should be used for this Resource Group Template Deployment. Possible values are `none`, `requestContent`, `responseContent` and `requestContent, responseContent`.
func (o GroupTemplateDeploymentOutput) DebugLevel() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GroupTemplateDeployment) pulumi.StringPtrOutput { return v.DebugLevel }).(pulumi.StringPtrOutput)
}
// The Azure Region where the Template should exist. Changing this forces a new Template to be created.
func (o GroupTemplateDeploymentOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *GroupTemplateDeployment) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The ID of the Management Group to apply the Deployment Template to. Changing this forces a new resource to be created.
func (o GroupTemplateDeploymentOutput) ManagementGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *GroupTemplateDeployment) pulumi.StringOutput { return v.ManagementGroupId }).(pulumi.StringOutput)
}
// The name which should be used for this Template Deployment. Changing this forces a new Template Deployment to be created.
func (o GroupTemplateDeploymentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *GroupTemplateDeployment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The JSON Content of the Outputs of the ARM Template Deployment.
func (o GroupTemplateDeploymentOutput) OutputContent() pulumi.StringOutput {
return o.ApplyT(func(v *GroupTemplateDeployment) pulumi.StringOutput { return v.OutputContent }).(pulumi.StringOutput)
}
// The contents of the ARM Template parameters file - containing a JSON list of parameters.
func (o GroupTemplateDeploymentOutput) ParametersContent() pulumi.StringOutput {
return o.ApplyT(func(v *GroupTemplateDeployment) pulumi.StringOutput { return v.ParametersContent }).(pulumi.StringOutput)
}
// A mapping of tags which should be assigned to the Template.
func (o GroupTemplateDeploymentOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *GroupTemplateDeployment) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// The contents of the ARM Template which should be deployed into this Resource Group. Cannot be specified with `templateSpecVersionId`.
func (o GroupTemplateDeploymentOutput) TemplateContent() pulumi.StringOutput {
return o.ApplyT(func(v *GroupTemplateDeployment) pulumi.StringOutput { return v.TemplateContent }).(pulumi.StringOutput)
}
// The ID of the Template Spec Version to deploy. Cannot be specified with `templateContent`.
func (o GroupTemplateDeploymentOutput) TemplateSpecVersionId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GroupTemplateDeployment) pulumi.StringPtrOutput { return v.TemplateSpecVersionId }).(pulumi.StringPtrOutput)
}
type GroupTemplateDeploymentArrayOutput struct{ *pulumi.OutputState }
func (GroupTemplateDeploymentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GroupTemplateDeployment)(nil)).Elem()
}
func (o GroupTemplateDeploymentArrayOutput) ToGroupTemplateDeploymentArrayOutput() GroupTemplateDeploymentArrayOutput {
return o
}
func (o GroupTemplateDeploymentArrayOutput) ToGroupTemplateDeploymentArrayOutputWithContext(ctx context.Context) GroupTemplateDeploymentArrayOutput {
return o
}
func (o GroupTemplateDeploymentArrayOutput) Index(i pulumi.IntInput) GroupTemplateDeploymentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GroupTemplateDeployment {
return vs[0].([]*GroupTemplateDeployment)[vs[1].(int)]
}).(GroupTemplateDeploymentOutput)
}
type GroupTemplateDeploymentMapOutput struct{ *pulumi.OutputState }
func (GroupTemplateDeploymentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GroupTemplateDeployment)(nil)).Elem()
}
func (o GroupTemplateDeploymentMapOutput) ToGroupTemplateDeploymentMapOutput() GroupTemplateDeploymentMapOutput {
return o
}
func (o GroupTemplateDeploymentMapOutput) ToGroupTemplateDeploymentMapOutputWithContext(ctx context.Context) GroupTemplateDeploymentMapOutput {
return o
}
func (o GroupTemplateDeploymentMapOutput) MapIndex(k pulumi.StringInput) GroupTemplateDeploymentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GroupTemplateDeployment {
return vs[0].(map[string]*GroupTemplateDeployment)[vs[1].(string)]
}).(GroupTemplateDeploymentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GroupTemplateDeploymentInput)(nil)).Elem(), &GroupTemplateDeployment{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupTemplateDeploymentArrayInput)(nil)).Elem(), GroupTemplateDeploymentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupTemplateDeploymentMapInput)(nil)).Elem(), GroupTemplateDeploymentMap{})
pulumi.RegisterOutputType(GroupTemplateDeploymentOutput{})
pulumi.RegisterOutputType(GroupTemplateDeploymentArrayOutput{})
pulumi.RegisterOutputType(GroupTemplateDeploymentMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/management/getGroup.go | sdk/go/azure/management/getGroup.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package management
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 Management Group.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := management.LookupGroup(ctx, &management.LookupGroupArgs{
// Name: pulumi.StringRef("00000000-0000-0000-0000-000000000000"),
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("displayName", example.DisplayName)
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This data source uses the following Azure API Providers:
//
// * `Microsoft.Management` - 2020-05-01
func LookupGroup(ctx *pulumi.Context, args *LookupGroupArgs, opts ...pulumi.InvokeOption) (*LookupGroupResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupGroupResult
err := ctx.Invoke("azure:management/getGroup:getGroup", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getGroup.
type LookupGroupArgs struct {
// Specifies the display name of this Management Group.
//
// > **NOTE** Whilst multiple management groups may share the same display name, when filtering, the provider expects a single management group to be found with this name.
DisplayName *string `pulumi:"displayName"`
// Specifies the name or UUID of this Management Group.
Name *string `pulumi:"name"`
}
// A collection of values returned by getGroup.
type LookupGroupResult struct {
// A list of Management Group IDs which directly or indirectly belong to this Management Group.
AllManagementGroupIds []string `pulumi:"allManagementGroupIds"`
// A list of Subscription IDs which are assigned to this Management Group or its children Management Groups.
AllSubscriptionIds []string `pulumi:"allSubscriptionIds"`
DisplayName string `pulumi:"displayName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A list of Management Group IDs which directly belong to this Management Group.
ManagementGroupIds []string `pulumi:"managementGroupIds"`
Name string `pulumi:"name"`
// The ID of any Parent Management Group.
ParentManagementGroupId string `pulumi:"parentManagementGroupId"`
// A list of Subscription IDs which are directly assigned to this Management Group.
SubscriptionIds []string `pulumi:"subscriptionIds"`
// The Management Group ID with the Tenant ID prefix.
TenantScopedId string `pulumi:"tenantScopedId"`
}
func LookupGroupOutput(ctx *pulumi.Context, args LookupGroupOutputArgs, opts ...pulumi.InvokeOption) LookupGroupResultOutput {
return pulumi.ToOutputWithContext(ctx.Context(), args).
ApplyT(func(v interface{}) (LookupGroupResultOutput, error) {
args := v.(LookupGroupArgs)
options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)}
return ctx.InvokeOutput("azure:management/getGroup:getGroup", args, LookupGroupResultOutput{}, options).(LookupGroupResultOutput), nil
}).(LookupGroupResultOutput)
}
// A collection of arguments for invoking getGroup.
type LookupGroupOutputArgs struct {
// Specifies the display name of this Management Group.
//
// > **NOTE** Whilst multiple management groups may share the same display name, when filtering, the provider expects a single management group to be found with this name.
DisplayName pulumi.StringPtrInput `pulumi:"displayName"`
// Specifies the name or UUID of this Management Group.
Name pulumi.StringPtrInput `pulumi:"name"`
}
func (LookupGroupOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupGroupArgs)(nil)).Elem()
}
// A collection of values returned by getGroup.
type LookupGroupResultOutput struct{ *pulumi.OutputState }
func (LookupGroupResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupGroupResult)(nil)).Elem()
}
func (o LookupGroupResultOutput) ToLookupGroupResultOutput() LookupGroupResultOutput {
return o
}
func (o LookupGroupResultOutput) ToLookupGroupResultOutputWithContext(ctx context.Context) LookupGroupResultOutput {
return o
}
// A list of Management Group IDs which directly or indirectly belong to this Management Group.
func (o LookupGroupResultOutput) AllManagementGroupIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupGroupResult) []string { return v.AllManagementGroupIds }).(pulumi.StringArrayOutput)
}
// A list of Subscription IDs which are assigned to this Management Group or its children Management Groups.
func (o LookupGroupResultOutput) AllSubscriptionIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupGroupResult) []string { return v.AllSubscriptionIds }).(pulumi.StringArrayOutput)
}
func (o LookupGroupResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupGroupResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupResult) string { return v.Id }).(pulumi.StringOutput)
}
// A list of Management Group IDs which directly belong to this Management Group.
func (o LookupGroupResultOutput) ManagementGroupIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupGroupResult) []string { return v.ManagementGroupIds }).(pulumi.StringArrayOutput)
}
func (o LookupGroupResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupResult) string { return v.Name }).(pulumi.StringOutput)
}
// The ID of any Parent Management Group.
func (o LookupGroupResultOutput) ParentManagementGroupId() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupResult) string { return v.ParentManagementGroupId }).(pulumi.StringOutput)
}
// A list of Subscription IDs which are directly assigned to this Management Group.
func (o LookupGroupResultOutput) SubscriptionIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupGroupResult) []string { return v.SubscriptionIds }).(pulumi.StringArrayOutput)
}
// The Management Group ID with the Tenant ID prefix.
func (o LookupGroupResultOutput) TenantScopedId() pulumi.StringOutput {
return o.ApplyT(func(v LookupGroupResult) string { return v.TenantScopedId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupGroupResultOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/management/groupPolicyExemption.go | sdk/go/azure/management/groupPolicyExemption.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package management
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Management Group Policy Exemption.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleGroup, err := management.NewGroup(ctx, "example", &management.GroupArgs{
// DisplayName: pulumi.String("Example MgmtGroup"),
// })
// if err != nil {
// return err
// }
// example, err := policy.LookupPolicySetDefinition(ctx, &policy.LookupPolicySetDefinitionArgs{
// DisplayName: pulumi.StringRef("Audit machines with insecure password security settings"),
// }, nil)
// if err != nil {
// return err
// }
// exampleGroupPolicyAssignment, err := management.NewGroupPolicyAssignment(ctx, "example", &management.GroupPolicyAssignmentArgs{
// Name: pulumi.String("assignment1"),
// ManagementGroupId: exampleGroup.ID(),
// PolicyDefinitionId: pulumi.String(example.Id),
// Location: pulumi.String("westus"),
// Identity: &management.GroupPolicyAssignmentIdentityArgs{
// Type: pulumi.String("SystemAssigned"),
// },
// })
// if err != nil {
// return err
// }
// _, err = management.NewGroupPolicyExemption(ctx, "example", &management.GroupPolicyExemptionArgs{
// Name: pulumi.String("exemption1"),
// ManagementGroupId: exampleGroup.ID(),
// PolicyAssignmentId: exampleGroupPolicyAssignment.ID(),
// ExemptionCategory: pulumi.String("Mitigated"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Policy Exemptions can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:management/groupPolicyExemption:GroupPolicyExemption exemption1 /providers/Microsoft.Management/managementGroups/group1/providers/Microsoft.Authorization/policyExemptions/exemption1
// ```
type GroupPolicyExemption struct {
pulumi.CustomResourceState
// A description to use for this Policy Exemption.
Description pulumi.StringPtrOutput `pulumi:"description"`
// A friendly display name to use for this Policy Exemption.
DisplayName pulumi.StringPtrOutput `pulumi:"displayName"`
// The category of this policy exemption. Possible values are `Waiver` and `Mitigated`.
ExemptionCategory pulumi.StringOutput `pulumi:"exemptionCategory"`
// The expiration date and time in UTC ISO 8601 format of this policy exemption.
ExpiresOn pulumi.StringPtrOutput `pulumi:"expiresOn"`
// The Management Group ID where the Policy Exemption should be applied. Changing this forces a new resource to be created.
ManagementGroupId pulumi.StringOutput `pulumi:"managementGroupId"`
// The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption.
Metadata pulumi.StringOutput `pulumi:"metadata"`
// The name of the Policy Exemption. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the Policy Assignment to be exempted at the specified Scope.
PolicyAssignmentId pulumi.StringOutput `pulumi:"policyAssignmentId"`
// The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.
PolicyDefinitionReferenceIds pulumi.StringArrayOutput `pulumi:"policyDefinitionReferenceIds"`
}
// NewGroupPolicyExemption registers a new resource with the given unique name, arguments, and options.
func NewGroupPolicyExemption(ctx *pulumi.Context,
name string, args *GroupPolicyExemptionArgs, opts ...pulumi.ResourceOption) (*GroupPolicyExemption, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ExemptionCategory == nil {
return nil, errors.New("invalid value for required argument 'ExemptionCategory'")
}
if args.ManagementGroupId == nil {
return nil, errors.New("invalid value for required argument 'ManagementGroupId'")
}
if args.PolicyAssignmentId == nil {
return nil, errors.New("invalid value for required argument 'PolicyAssignmentId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource GroupPolicyExemption
err := ctx.RegisterResource("azure:management/groupPolicyExemption:GroupPolicyExemption", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGroupPolicyExemption gets an existing GroupPolicyExemption resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetGroupPolicyExemption(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GroupPolicyExemptionState, opts ...pulumi.ResourceOption) (*GroupPolicyExemption, error) {
var resource GroupPolicyExemption
err := ctx.ReadResource("azure:management/groupPolicyExemption:GroupPolicyExemption", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering GroupPolicyExemption resources.
type groupPolicyExemptionState struct {
// A description to use for this Policy Exemption.
Description *string `pulumi:"description"`
// A friendly display name to use for this Policy Exemption.
DisplayName *string `pulumi:"displayName"`
// The category of this policy exemption. Possible values are `Waiver` and `Mitigated`.
ExemptionCategory *string `pulumi:"exemptionCategory"`
// The expiration date and time in UTC ISO 8601 format of this policy exemption.
ExpiresOn *string `pulumi:"expiresOn"`
// The Management Group ID where the Policy Exemption should be applied. Changing this forces a new resource to be created.
ManagementGroupId *string `pulumi:"managementGroupId"`
// The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption.
Metadata *string `pulumi:"metadata"`
// The name of the Policy Exemption. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Policy Assignment to be exempted at the specified Scope.
PolicyAssignmentId *string `pulumi:"policyAssignmentId"`
// The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.
PolicyDefinitionReferenceIds []string `pulumi:"policyDefinitionReferenceIds"`
}
type GroupPolicyExemptionState struct {
// A description to use for this Policy Exemption.
Description pulumi.StringPtrInput
// A friendly display name to use for this Policy Exemption.
DisplayName pulumi.StringPtrInput
// The category of this policy exemption. Possible values are `Waiver` and `Mitigated`.
ExemptionCategory pulumi.StringPtrInput
// The expiration date and time in UTC ISO 8601 format of this policy exemption.
ExpiresOn pulumi.StringPtrInput
// The Management Group ID where the Policy Exemption should be applied. Changing this forces a new resource to be created.
ManagementGroupId pulumi.StringPtrInput
// The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption.
Metadata pulumi.StringPtrInput
// The name of the Policy Exemption. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Policy Assignment to be exempted at the specified Scope.
PolicyAssignmentId pulumi.StringPtrInput
// The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.
PolicyDefinitionReferenceIds pulumi.StringArrayInput
}
func (GroupPolicyExemptionState) ElementType() reflect.Type {
return reflect.TypeOf((*groupPolicyExemptionState)(nil)).Elem()
}
type groupPolicyExemptionArgs struct {
// A description to use for this Policy Exemption.
Description *string `pulumi:"description"`
// A friendly display name to use for this Policy Exemption.
DisplayName *string `pulumi:"displayName"`
// The category of this policy exemption. Possible values are `Waiver` and `Mitigated`.
ExemptionCategory string `pulumi:"exemptionCategory"`
// The expiration date and time in UTC ISO 8601 format of this policy exemption.
ExpiresOn *string `pulumi:"expiresOn"`
// The Management Group ID where the Policy Exemption should be applied. Changing this forces a new resource to be created.
ManagementGroupId string `pulumi:"managementGroupId"`
// The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption.
Metadata *string `pulumi:"metadata"`
// The name of the Policy Exemption. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The ID of the Policy Assignment to be exempted at the specified Scope.
PolicyAssignmentId string `pulumi:"policyAssignmentId"`
// The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.
PolicyDefinitionReferenceIds []string `pulumi:"policyDefinitionReferenceIds"`
}
// The set of arguments for constructing a GroupPolicyExemption resource.
type GroupPolicyExemptionArgs struct {
// A description to use for this Policy Exemption.
Description pulumi.StringPtrInput
// A friendly display name to use for this Policy Exemption.
DisplayName pulumi.StringPtrInput
// The category of this policy exemption. Possible values are `Waiver` and `Mitigated`.
ExemptionCategory pulumi.StringInput
// The expiration date and time in UTC ISO 8601 format of this policy exemption.
ExpiresOn pulumi.StringPtrInput
// The Management Group ID where the Policy Exemption should be applied. Changing this forces a new resource to be created.
ManagementGroupId pulumi.StringInput
// The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption.
Metadata pulumi.StringPtrInput
// The name of the Policy Exemption. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The ID of the Policy Assignment to be exempted at the specified Scope.
PolicyAssignmentId pulumi.StringInput
// The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.
PolicyDefinitionReferenceIds pulumi.StringArrayInput
}
func (GroupPolicyExemptionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*groupPolicyExemptionArgs)(nil)).Elem()
}
type GroupPolicyExemptionInput interface {
pulumi.Input
ToGroupPolicyExemptionOutput() GroupPolicyExemptionOutput
ToGroupPolicyExemptionOutputWithContext(ctx context.Context) GroupPolicyExemptionOutput
}
func (*GroupPolicyExemption) ElementType() reflect.Type {
return reflect.TypeOf((**GroupPolicyExemption)(nil)).Elem()
}
func (i *GroupPolicyExemption) ToGroupPolicyExemptionOutput() GroupPolicyExemptionOutput {
return i.ToGroupPolicyExemptionOutputWithContext(context.Background())
}
func (i *GroupPolicyExemption) ToGroupPolicyExemptionOutputWithContext(ctx context.Context) GroupPolicyExemptionOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyExemptionOutput)
}
// GroupPolicyExemptionArrayInput is an input type that accepts GroupPolicyExemptionArray and GroupPolicyExemptionArrayOutput values.
// You can construct a concrete instance of `GroupPolicyExemptionArrayInput` via:
//
// GroupPolicyExemptionArray{ GroupPolicyExemptionArgs{...} }
type GroupPolicyExemptionArrayInput interface {
pulumi.Input
ToGroupPolicyExemptionArrayOutput() GroupPolicyExemptionArrayOutput
ToGroupPolicyExemptionArrayOutputWithContext(context.Context) GroupPolicyExemptionArrayOutput
}
type GroupPolicyExemptionArray []GroupPolicyExemptionInput
func (GroupPolicyExemptionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GroupPolicyExemption)(nil)).Elem()
}
func (i GroupPolicyExemptionArray) ToGroupPolicyExemptionArrayOutput() GroupPolicyExemptionArrayOutput {
return i.ToGroupPolicyExemptionArrayOutputWithContext(context.Background())
}
func (i GroupPolicyExemptionArray) ToGroupPolicyExemptionArrayOutputWithContext(ctx context.Context) GroupPolicyExemptionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyExemptionArrayOutput)
}
// GroupPolicyExemptionMapInput is an input type that accepts GroupPolicyExemptionMap and GroupPolicyExemptionMapOutput values.
// You can construct a concrete instance of `GroupPolicyExemptionMapInput` via:
//
// GroupPolicyExemptionMap{ "key": GroupPolicyExemptionArgs{...} }
type GroupPolicyExemptionMapInput interface {
pulumi.Input
ToGroupPolicyExemptionMapOutput() GroupPolicyExemptionMapOutput
ToGroupPolicyExemptionMapOutputWithContext(context.Context) GroupPolicyExemptionMapOutput
}
type GroupPolicyExemptionMap map[string]GroupPolicyExemptionInput
func (GroupPolicyExemptionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GroupPolicyExemption)(nil)).Elem()
}
func (i GroupPolicyExemptionMap) ToGroupPolicyExemptionMapOutput() GroupPolicyExemptionMapOutput {
return i.ToGroupPolicyExemptionMapOutputWithContext(context.Background())
}
func (i GroupPolicyExemptionMap) ToGroupPolicyExemptionMapOutputWithContext(ctx context.Context) GroupPolicyExemptionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyExemptionMapOutput)
}
type GroupPolicyExemptionOutput struct{ *pulumi.OutputState }
func (GroupPolicyExemptionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GroupPolicyExemption)(nil)).Elem()
}
func (o GroupPolicyExemptionOutput) ToGroupPolicyExemptionOutput() GroupPolicyExemptionOutput {
return o
}
func (o GroupPolicyExemptionOutput) ToGroupPolicyExemptionOutputWithContext(ctx context.Context) GroupPolicyExemptionOutput {
return o
}
// A description to use for this Policy Exemption.
func (o GroupPolicyExemptionOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GroupPolicyExemption) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// A friendly display name to use for this Policy Exemption.
func (o GroupPolicyExemptionOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GroupPolicyExemption) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput)
}
// The category of this policy exemption. Possible values are `Waiver` and `Mitigated`.
func (o GroupPolicyExemptionOutput) ExemptionCategory() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicyExemption) pulumi.StringOutput { return v.ExemptionCategory }).(pulumi.StringOutput)
}
// The expiration date and time in UTC ISO 8601 format of this policy exemption.
func (o GroupPolicyExemptionOutput) ExpiresOn() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GroupPolicyExemption) pulumi.StringPtrOutput { return v.ExpiresOn }).(pulumi.StringPtrOutput)
}
// The Management Group ID where the Policy Exemption should be applied. Changing this forces a new resource to be created.
func (o GroupPolicyExemptionOutput) ManagementGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicyExemption) pulumi.StringOutput { return v.ManagementGroupId }).(pulumi.StringOutput)
}
// The metadata for this policy exemption. This is a JSON string representing additional metadata that should be stored with the policy exemption.
func (o GroupPolicyExemptionOutput) Metadata() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicyExemption) pulumi.StringOutput { return v.Metadata }).(pulumi.StringOutput)
}
// The name of the Policy Exemption. Changing this forces a new resource to be created.
func (o GroupPolicyExemptionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicyExemption) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the Policy Assignment to be exempted at the specified Scope.
func (o GroupPolicyExemptionOutput) PolicyAssignmentId() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicyExemption) pulumi.StringOutput { return v.PolicyAssignmentId }).(pulumi.StringOutput)
}
// The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.
func (o GroupPolicyExemptionOutput) PolicyDefinitionReferenceIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v *GroupPolicyExemption) pulumi.StringArrayOutput { return v.PolicyDefinitionReferenceIds }).(pulumi.StringArrayOutput)
}
type GroupPolicyExemptionArrayOutput struct{ *pulumi.OutputState }
func (GroupPolicyExemptionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GroupPolicyExemption)(nil)).Elem()
}
func (o GroupPolicyExemptionArrayOutput) ToGroupPolicyExemptionArrayOutput() GroupPolicyExemptionArrayOutput {
return o
}
func (o GroupPolicyExemptionArrayOutput) ToGroupPolicyExemptionArrayOutputWithContext(ctx context.Context) GroupPolicyExemptionArrayOutput {
return o
}
func (o GroupPolicyExemptionArrayOutput) Index(i pulumi.IntInput) GroupPolicyExemptionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GroupPolicyExemption {
return vs[0].([]*GroupPolicyExemption)[vs[1].(int)]
}).(GroupPolicyExemptionOutput)
}
type GroupPolicyExemptionMapOutput struct{ *pulumi.OutputState }
func (GroupPolicyExemptionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GroupPolicyExemption)(nil)).Elem()
}
func (o GroupPolicyExemptionMapOutput) ToGroupPolicyExemptionMapOutput() GroupPolicyExemptionMapOutput {
return o
}
func (o GroupPolicyExemptionMapOutput) ToGroupPolicyExemptionMapOutputWithContext(ctx context.Context) GroupPolicyExemptionMapOutput {
return o
}
func (o GroupPolicyExemptionMapOutput) MapIndex(k pulumi.StringInput) GroupPolicyExemptionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GroupPolicyExemption {
return vs[0].(map[string]*GroupPolicyExemption)[vs[1].(string)]
}).(GroupPolicyExemptionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GroupPolicyExemptionInput)(nil)).Elem(), &GroupPolicyExemption{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupPolicyExemptionArrayInput)(nil)).Elem(), GroupPolicyExemptionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupPolicyExemptionMapInput)(nil)).Elem(), GroupPolicyExemptionMap{})
pulumi.RegisterOutputType(GroupPolicyExemptionOutput{})
pulumi.RegisterOutputType(GroupPolicyExemptionArrayOutput{})
pulumi.RegisterOutputType(GroupPolicyExemptionMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/management/groupPolicySetDefinition.go | sdk/go/azure/management/groupPolicySetDefinition.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package management
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Policy Set Definition for a Management Group.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := management.NewGroup(ctx, "example", &management.GroupArgs{
// DisplayName: pulumi.String("Example"),
// })
// if err != nil {
// return err
// }
// _, err = management.NewGroupPolicySetDefinition(ctx, "example", &management.GroupPolicySetDefinitionArgs{
// Name: pulumi.String("example"),
// PolicyType: pulumi.String("Custom"),
// DisplayName: pulumi.String("Example"),
// ManagementGroupId: example.ID(),
// Parameters: pulumi.String(` {
// \"allowedLocations\": {
// \"type\": \"Array\",
// \"metadata\": {
// \"description\": \"The list of allowed locations for resources.\",
// \"displayName\": \"Allowed locations\",
// \"strongType\": \"location\"
// }
// }
// }
//
// `),
//
// PolicyDefinitionReferences: management.GroupPolicySetDefinitionPolicyDefinitionReferenceArray{
// &management.GroupPolicySetDefinitionPolicyDefinitionReferenceArgs{
// Version: pulumi.String("1.0.*"),
// PolicyDefinitionId: pulumi.String("/providers/Microsoft.Authorization/policyDefinitions/e765b5de-1225-4ba3-bd56-1ac6695af988"),
// ParameterValues: pulumi.String(" {\n \\\"listOfAllowedLocations\\\": {\\\"value\\\": \\\"[parameters('allowedLocations')]\\\"}\n }\n"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Management` - 2025-01-01
//
// ## Import
//
// Policy Set Definitions can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:management/groupPolicySetDefinition:GroupPolicySetDefinition example /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/policySetDefinitions/policySetDefinitionName
// ```
type GroupPolicySetDefinition struct {
pulumi.CustomResourceState
// The description of this Policy Set Definition.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The display name of this Policy Set Definition.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The ID of the Management Group where this Policy Set Definition should be created. Changing this forces a new Policy Set Definition to be created.
ManagementGroupId pulumi.StringOutput `pulumi:"managementGroupId"`
// The metadata for the Policy Set Definition in JSON format.
Metadata pulumi.StringOutput `pulumi:"metadata"`
// The name which should be used for this Policy Set Definition. Changing this forces a new Policy Set Definition to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The parameters for the Policy Set Definition in JSON format. Reducing the number of parameters forces a new resource to be created.
Parameters pulumi.StringPtrOutput `pulumi:"parameters"`
// One or more `policyDefinitionGroup` blocks as defined below.
PolicyDefinitionGroups GroupPolicySetDefinitionPolicyDefinitionGroupArrayOutput `pulumi:"policyDefinitionGroups"`
// One or more `policyDefinitionReference` blocks as defined below.
PolicyDefinitionReferences GroupPolicySetDefinitionPolicyDefinitionReferenceArrayOutput `pulumi:"policyDefinitionReferences"`
// The Policy Set Definition type. Possible values are `BuiltIn`, `Custom`, `NotSpecified`, and `Static`. Changing this forces a new Policy Set Definition to be created.
PolicyType pulumi.StringOutput `pulumi:"policyType"`
}
// NewGroupPolicySetDefinition registers a new resource with the given unique name, arguments, and options.
func NewGroupPolicySetDefinition(ctx *pulumi.Context,
name string, args *GroupPolicySetDefinitionArgs, opts ...pulumi.ResourceOption) (*GroupPolicySetDefinition, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.ManagementGroupId == nil {
return nil, errors.New("invalid value for required argument 'ManagementGroupId'")
}
if args.PolicyDefinitionReferences == nil {
return nil, errors.New("invalid value for required argument 'PolicyDefinitionReferences'")
}
if args.PolicyType == nil {
return nil, errors.New("invalid value for required argument 'PolicyType'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource GroupPolicySetDefinition
err := ctx.RegisterResource("azure:management/groupPolicySetDefinition:GroupPolicySetDefinition", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGroupPolicySetDefinition gets an existing GroupPolicySetDefinition resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetGroupPolicySetDefinition(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GroupPolicySetDefinitionState, opts ...pulumi.ResourceOption) (*GroupPolicySetDefinition, error) {
var resource GroupPolicySetDefinition
err := ctx.ReadResource("azure:management/groupPolicySetDefinition:GroupPolicySetDefinition", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering GroupPolicySetDefinition resources.
type groupPolicySetDefinitionState struct {
// The description of this Policy Set Definition.
Description *string `pulumi:"description"`
// The display name of this Policy Set Definition.
DisplayName *string `pulumi:"displayName"`
// The ID of the Management Group where this Policy Set Definition should be created. Changing this forces a new Policy Set Definition to be created.
ManagementGroupId *string `pulumi:"managementGroupId"`
// The metadata for the Policy Set Definition in JSON format.
Metadata *string `pulumi:"metadata"`
// The name which should be used for this Policy Set Definition. Changing this forces a new Policy Set Definition to be created.
Name *string `pulumi:"name"`
// The parameters for the Policy Set Definition in JSON format. Reducing the number of parameters forces a new resource to be created.
Parameters *string `pulumi:"parameters"`
// One or more `policyDefinitionGroup` blocks as defined below.
PolicyDefinitionGroups []GroupPolicySetDefinitionPolicyDefinitionGroup `pulumi:"policyDefinitionGroups"`
// One or more `policyDefinitionReference` blocks as defined below.
PolicyDefinitionReferences []GroupPolicySetDefinitionPolicyDefinitionReference `pulumi:"policyDefinitionReferences"`
// The Policy Set Definition type. Possible values are `BuiltIn`, `Custom`, `NotSpecified`, and `Static`. Changing this forces a new Policy Set Definition to be created.
PolicyType *string `pulumi:"policyType"`
}
type GroupPolicySetDefinitionState struct {
// The description of this Policy Set Definition.
Description pulumi.StringPtrInput
// The display name of this Policy Set Definition.
DisplayName pulumi.StringPtrInput
// The ID of the Management Group where this Policy Set Definition should be created. Changing this forces a new Policy Set Definition to be created.
ManagementGroupId pulumi.StringPtrInput
// The metadata for the Policy Set Definition in JSON format.
Metadata pulumi.StringPtrInput
// The name which should be used for this Policy Set Definition. Changing this forces a new Policy Set Definition to be created.
Name pulumi.StringPtrInput
// The parameters for the Policy Set Definition in JSON format. Reducing the number of parameters forces a new resource to be created.
Parameters pulumi.StringPtrInput
// One or more `policyDefinitionGroup` blocks as defined below.
PolicyDefinitionGroups GroupPolicySetDefinitionPolicyDefinitionGroupArrayInput
// One or more `policyDefinitionReference` blocks as defined below.
PolicyDefinitionReferences GroupPolicySetDefinitionPolicyDefinitionReferenceArrayInput
// The Policy Set Definition type. Possible values are `BuiltIn`, `Custom`, `NotSpecified`, and `Static`. Changing this forces a new Policy Set Definition to be created.
PolicyType pulumi.StringPtrInput
}
func (GroupPolicySetDefinitionState) ElementType() reflect.Type {
return reflect.TypeOf((*groupPolicySetDefinitionState)(nil)).Elem()
}
type groupPolicySetDefinitionArgs struct {
// The description of this Policy Set Definition.
Description *string `pulumi:"description"`
// The display name of this Policy Set Definition.
DisplayName string `pulumi:"displayName"`
// The ID of the Management Group where this Policy Set Definition should be created. Changing this forces a new Policy Set Definition to be created.
ManagementGroupId string `pulumi:"managementGroupId"`
// The metadata for the Policy Set Definition in JSON format.
Metadata *string `pulumi:"metadata"`
// The name which should be used for this Policy Set Definition. Changing this forces a new Policy Set Definition to be created.
Name *string `pulumi:"name"`
// The parameters for the Policy Set Definition in JSON format. Reducing the number of parameters forces a new resource to be created.
Parameters *string `pulumi:"parameters"`
// One or more `policyDefinitionGroup` blocks as defined below.
PolicyDefinitionGroups []GroupPolicySetDefinitionPolicyDefinitionGroup `pulumi:"policyDefinitionGroups"`
// One or more `policyDefinitionReference` blocks as defined below.
PolicyDefinitionReferences []GroupPolicySetDefinitionPolicyDefinitionReference `pulumi:"policyDefinitionReferences"`
// The Policy Set Definition type. Possible values are `BuiltIn`, `Custom`, `NotSpecified`, and `Static`. Changing this forces a new Policy Set Definition to be created.
PolicyType string `pulumi:"policyType"`
}
// The set of arguments for constructing a GroupPolicySetDefinition resource.
type GroupPolicySetDefinitionArgs struct {
// The description of this Policy Set Definition.
Description pulumi.StringPtrInput
// The display name of this Policy Set Definition.
DisplayName pulumi.StringInput
// The ID of the Management Group where this Policy Set Definition should be created. Changing this forces a new Policy Set Definition to be created.
ManagementGroupId pulumi.StringInput
// The metadata for the Policy Set Definition in JSON format.
Metadata pulumi.StringPtrInput
// The name which should be used for this Policy Set Definition. Changing this forces a new Policy Set Definition to be created.
Name pulumi.StringPtrInput
// The parameters for the Policy Set Definition in JSON format. Reducing the number of parameters forces a new resource to be created.
Parameters pulumi.StringPtrInput
// One or more `policyDefinitionGroup` blocks as defined below.
PolicyDefinitionGroups GroupPolicySetDefinitionPolicyDefinitionGroupArrayInput
// One or more `policyDefinitionReference` blocks as defined below.
PolicyDefinitionReferences GroupPolicySetDefinitionPolicyDefinitionReferenceArrayInput
// The Policy Set Definition type. Possible values are `BuiltIn`, `Custom`, `NotSpecified`, and `Static`. Changing this forces a new Policy Set Definition to be created.
PolicyType pulumi.StringInput
}
func (GroupPolicySetDefinitionArgs) ElementType() reflect.Type {
return reflect.TypeOf((*groupPolicySetDefinitionArgs)(nil)).Elem()
}
type GroupPolicySetDefinitionInput interface {
pulumi.Input
ToGroupPolicySetDefinitionOutput() GroupPolicySetDefinitionOutput
ToGroupPolicySetDefinitionOutputWithContext(ctx context.Context) GroupPolicySetDefinitionOutput
}
func (*GroupPolicySetDefinition) ElementType() reflect.Type {
return reflect.TypeOf((**GroupPolicySetDefinition)(nil)).Elem()
}
func (i *GroupPolicySetDefinition) ToGroupPolicySetDefinitionOutput() GroupPolicySetDefinitionOutput {
return i.ToGroupPolicySetDefinitionOutputWithContext(context.Background())
}
func (i *GroupPolicySetDefinition) ToGroupPolicySetDefinitionOutputWithContext(ctx context.Context) GroupPolicySetDefinitionOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicySetDefinitionOutput)
}
// GroupPolicySetDefinitionArrayInput is an input type that accepts GroupPolicySetDefinitionArray and GroupPolicySetDefinitionArrayOutput values.
// You can construct a concrete instance of `GroupPolicySetDefinitionArrayInput` via:
//
// GroupPolicySetDefinitionArray{ GroupPolicySetDefinitionArgs{...} }
type GroupPolicySetDefinitionArrayInput interface {
pulumi.Input
ToGroupPolicySetDefinitionArrayOutput() GroupPolicySetDefinitionArrayOutput
ToGroupPolicySetDefinitionArrayOutputWithContext(context.Context) GroupPolicySetDefinitionArrayOutput
}
type GroupPolicySetDefinitionArray []GroupPolicySetDefinitionInput
func (GroupPolicySetDefinitionArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GroupPolicySetDefinition)(nil)).Elem()
}
func (i GroupPolicySetDefinitionArray) ToGroupPolicySetDefinitionArrayOutput() GroupPolicySetDefinitionArrayOutput {
return i.ToGroupPolicySetDefinitionArrayOutputWithContext(context.Background())
}
func (i GroupPolicySetDefinitionArray) ToGroupPolicySetDefinitionArrayOutputWithContext(ctx context.Context) GroupPolicySetDefinitionArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicySetDefinitionArrayOutput)
}
// GroupPolicySetDefinitionMapInput is an input type that accepts GroupPolicySetDefinitionMap and GroupPolicySetDefinitionMapOutput values.
// You can construct a concrete instance of `GroupPolicySetDefinitionMapInput` via:
//
// GroupPolicySetDefinitionMap{ "key": GroupPolicySetDefinitionArgs{...} }
type GroupPolicySetDefinitionMapInput interface {
pulumi.Input
ToGroupPolicySetDefinitionMapOutput() GroupPolicySetDefinitionMapOutput
ToGroupPolicySetDefinitionMapOutputWithContext(context.Context) GroupPolicySetDefinitionMapOutput
}
type GroupPolicySetDefinitionMap map[string]GroupPolicySetDefinitionInput
func (GroupPolicySetDefinitionMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GroupPolicySetDefinition)(nil)).Elem()
}
func (i GroupPolicySetDefinitionMap) ToGroupPolicySetDefinitionMapOutput() GroupPolicySetDefinitionMapOutput {
return i.ToGroupPolicySetDefinitionMapOutputWithContext(context.Background())
}
func (i GroupPolicySetDefinitionMap) ToGroupPolicySetDefinitionMapOutputWithContext(ctx context.Context) GroupPolicySetDefinitionMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicySetDefinitionMapOutput)
}
type GroupPolicySetDefinitionOutput struct{ *pulumi.OutputState }
func (GroupPolicySetDefinitionOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GroupPolicySetDefinition)(nil)).Elem()
}
func (o GroupPolicySetDefinitionOutput) ToGroupPolicySetDefinitionOutput() GroupPolicySetDefinitionOutput {
return o
}
func (o GroupPolicySetDefinitionOutput) ToGroupPolicySetDefinitionOutputWithContext(ctx context.Context) GroupPolicySetDefinitionOutput {
return o
}
// The description of this Policy Set Definition.
func (o GroupPolicySetDefinitionOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GroupPolicySetDefinition) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The display name of this Policy Set Definition.
func (o GroupPolicySetDefinitionOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicySetDefinition) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The ID of the Management Group where this Policy Set Definition should be created. Changing this forces a new Policy Set Definition to be created.
func (o GroupPolicySetDefinitionOutput) ManagementGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicySetDefinition) pulumi.StringOutput { return v.ManagementGroupId }).(pulumi.StringOutput)
}
// The metadata for the Policy Set Definition in JSON format.
func (o GroupPolicySetDefinitionOutput) Metadata() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicySetDefinition) pulumi.StringOutput { return v.Metadata }).(pulumi.StringOutput)
}
// The name which should be used for this Policy Set Definition. Changing this forces a new Policy Set Definition to be created.
func (o GroupPolicySetDefinitionOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicySetDefinition) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The parameters for the Policy Set Definition in JSON format. Reducing the number of parameters forces a new resource to be created.
func (o GroupPolicySetDefinitionOutput) Parameters() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GroupPolicySetDefinition) pulumi.StringPtrOutput { return v.Parameters }).(pulumi.StringPtrOutput)
}
// One or more `policyDefinitionGroup` blocks as defined below.
func (o GroupPolicySetDefinitionOutput) PolicyDefinitionGroups() GroupPolicySetDefinitionPolicyDefinitionGroupArrayOutput {
return o.ApplyT(func(v *GroupPolicySetDefinition) GroupPolicySetDefinitionPolicyDefinitionGroupArrayOutput {
return v.PolicyDefinitionGroups
}).(GroupPolicySetDefinitionPolicyDefinitionGroupArrayOutput)
}
// One or more `policyDefinitionReference` blocks as defined below.
func (o GroupPolicySetDefinitionOutput) PolicyDefinitionReferences() GroupPolicySetDefinitionPolicyDefinitionReferenceArrayOutput {
return o.ApplyT(func(v *GroupPolicySetDefinition) GroupPolicySetDefinitionPolicyDefinitionReferenceArrayOutput {
return v.PolicyDefinitionReferences
}).(GroupPolicySetDefinitionPolicyDefinitionReferenceArrayOutput)
}
// The Policy Set Definition type. Possible values are `BuiltIn`, `Custom`, `NotSpecified`, and `Static`. Changing this forces a new Policy Set Definition to be created.
func (o GroupPolicySetDefinitionOutput) PolicyType() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicySetDefinition) pulumi.StringOutput { return v.PolicyType }).(pulumi.StringOutput)
}
type GroupPolicySetDefinitionArrayOutput struct{ *pulumi.OutputState }
func (GroupPolicySetDefinitionArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GroupPolicySetDefinition)(nil)).Elem()
}
func (o GroupPolicySetDefinitionArrayOutput) ToGroupPolicySetDefinitionArrayOutput() GroupPolicySetDefinitionArrayOutput {
return o
}
func (o GroupPolicySetDefinitionArrayOutput) ToGroupPolicySetDefinitionArrayOutputWithContext(ctx context.Context) GroupPolicySetDefinitionArrayOutput {
return o
}
func (o GroupPolicySetDefinitionArrayOutput) Index(i pulumi.IntInput) GroupPolicySetDefinitionOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GroupPolicySetDefinition {
return vs[0].([]*GroupPolicySetDefinition)[vs[1].(int)]
}).(GroupPolicySetDefinitionOutput)
}
type GroupPolicySetDefinitionMapOutput struct{ *pulumi.OutputState }
func (GroupPolicySetDefinitionMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GroupPolicySetDefinition)(nil)).Elem()
}
func (o GroupPolicySetDefinitionMapOutput) ToGroupPolicySetDefinitionMapOutput() GroupPolicySetDefinitionMapOutput {
return o
}
func (o GroupPolicySetDefinitionMapOutput) ToGroupPolicySetDefinitionMapOutputWithContext(ctx context.Context) GroupPolicySetDefinitionMapOutput {
return o
}
func (o GroupPolicySetDefinitionMapOutput) MapIndex(k pulumi.StringInput) GroupPolicySetDefinitionOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GroupPolicySetDefinition {
return vs[0].(map[string]*GroupPolicySetDefinition)[vs[1].(string)]
}).(GroupPolicySetDefinitionOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GroupPolicySetDefinitionInput)(nil)).Elem(), &GroupPolicySetDefinition{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupPolicySetDefinitionArrayInput)(nil)).Elem(), GroupPolicySetDefinitionArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupPolicySetDefinitionMapInput)(nil)).Elem(), GroupPolicySetDefinitionMap{})
pulumi.RegisterOutputType(GroupPolicySetDefinitionOutput{})
pulumi.RegisterOutputType(GroupPolicySetDefinitionArrayOutput{})
pulumi.RegisterOutputType(GroupPolicySetDefinitionMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/management/privateLinkAssociation.go | sdk/go/azure/management/privateLinkAssociation.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package management
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Resource Management Private Link Association.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management"
// "github.com/pulumi/pulumi-random/sdk/v4/go/random"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
// if err != nil {
// return err
// }
// _, err = management.LookupGroup(ctx, &management.LookupGroupArgs{
// Name: pulumi.StringRef(example.TenantId),
// }, nil)
// if err != nil {
// return err
// }
// exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// examplePrivateLink, err := management.NewPrivateLink(ctx, "example", &management.PrivateLinkArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: exampleResourceGroup.Name,
// Location: exampleResourceGroup.Location,
// })
// if err != nil {
// return err
// }
// exampleUuid, err := random.NewUuid(ctx, "example", nil)
// if err != nil {
// return err
// }
// _, err = management.NewPrivateLinkAssociation(ctx, "example", &management.PrivateLinkAssociationArgs{
// Name: exampleUuid.Result,
// ManagementGroupId: pulumi.Any(exampleAzurermManagementGroup.Id),
// ResourceManagementPrivateLinkId: examplePrivateLink.ID(),
// PublicNetworkAccessEnabled: 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.Management` - 2020-05-01
//
// ## Import
//
// An existing Private Link Association can be imported into Pulumi using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:management/privateLinkAssociation:PrivateLinkAssociation example /providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/privateLinkAssociations/00000000-0000-0000-0000-000000000000
// ```
type PrivateLinkAssociation struct {
pulumi.CustomResourceState
// Specifies the Management Group ID within which this Private Link Association should exist. Changing this forces a new Private Link Association to be created.
//
// > **Note:** For now, `managementGroupId` must be the ID of [Root Management Group](https://learn.microsoft.com/en-us/azure/governance/management-groups/overview#root-management-group-for-each-directory).
ManagementGroupId pulumi.StringOutput `pulumi:"managementGroupId"`
// Specifies the name of this Private Link Association, which should be a UUID. If `name` is not provided, a UUID will be generated, you should use the `ignoreChanges` attribute to ignore changes to this field. Changing this forces a new Private Link Association to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Whether public network access is allowed. Changing this forces a new Private Link Association to be created.
PublicNetworkAccessEnabled pulumi.BoolOutput `pulumi:"publicNetworkAccessEnabled"`
// The Resource ID of Resource Management Private Link. Changing this forces a new Private Link Association to be created.
ResourceManagementPrivateLinkId pulumi.StringOutput `pulumi:"resourceManagementPrivateLinkId"`
// The Tenant ID.
TenantId pulumi.StringOutput `pulumi:"tenantId"`
}
// NewPrivateLinkAssociation registers a new resource with the given unique name, arguments, and options.
func NewPrivateLinkAssociation(ctx *pulumi.Context,
name string, args *PrivateLinkAssociationArgs, opts ...pulumi.ResourceOption) (*PrivateLinkAssociation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ManagementGroupId == nil {
return nil, errors.New("invalid value for required argument 'ManagementGroupId'")
}
if args.PublicNetworkAccessEnabled == nil {
return nil, errors.New("invalid value for required argument 'PublicNetworkAccessEnabled'")
}
if args.ResourceManagementPrivateLinkId == nil {
return nil, errors.New("invalid value for required argument 'ResourceManagementPrivateLinkId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource PrivateLinkAssociation
err := ctx.RegisterResource("azure:management/privateLinkAssociation:PrivateLinkAssociation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPrivateLinkAssociation gets an existing PrivateLinkAssociation resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetPrivateLinkAssociation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PrivateLinkAssociationState, opts ...pulumi.ResourceOption) (*PrivateLinkAssociation, error) {
var resource PrivateLinkAssociation
err := ctx.ReadResource("azure:management/privateLinkAssociation:PrivateLinkAssociation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering PrivateLinkAssociation resources.
type privateLinkAssociationState struct {
// Specifies the Management Group ID within which this Private Link Association should exist. Changing this forces a new Private Link Association to be created.
//
// > **Note:** For now, `managementGroupId` must be the ID of [Root Management Group](https://learn.microsoft.com/en-us/azure/governance/management-groups/overview#root-management-group-for-each-directory).
ManagementGroupId *string `pulumi:"managementGroupId"`
// Specifies the name of this Private Link Association, which should be a UUID. If `name` is not provided, a UUID will be generated, you should use the `ignoreChanges` attribute to ignore changes to this field. Changing this forces a new Private Link Association to be created.
Name *string `pulumi:"name"`
// Whether public network access is allowed. Changing this forces a new Private Link Association to be created.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The Resource ID of Resource Management Private Link. Changing this forces a new Private Link Association to be created.
ResourceManagementPrivateLinkId *string `pulumi:"resourceManagementPrivateLinkId"`
// The Tenant ID.
TenantId *string `pulumi:"tenantId"`
}
type PrivateLinkAssociationState struct {
// Specifies the Management Group ID within which this Private Link Association should exist. Changing this forces a new Private Link Association to be created.
//
// > **Note:** For now, `managementGroupId` must be the ID of [Root Management Group](https://learn.microsoft.com/en-us/azure/governance/management-groups/overview#root-management-group-for-each-directory).
ManagementGroupId pulumi.StringPtrInput
// Specifies the name of this Private Link Association, which should be a UUID. If `name` is not provided, a UUID will be generated, you should use the `ignoreChanges` attribute to ignore changes to this field. Changing this forces a new Private Link Association to be created.
Name pulumi.StringPtrInput
// Whether public network access is allowed. Changing this forces a new Private Link Association to be created.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The Resource ID of Resource Management Private Link. Changing this forces a new Private Link Association to be created.
ResourceManagementPrivateLinkId pulumi.StringPtrInput
// The Tenant ID.
TenantId pulumi.StringPtrInput
}
func (PrivateLinkAssociationState) ElementType() reflect.Type {
return reflect.TypeOf((*privateLinkAssociationState)(nil)).Elem()
}
type privateLinkAssociationArgs struct {
// Specifies the Management Group ID within which this Private Link Association should exist. Changing this forces a new Private Link Association to be created.
//
// > **Note:** For now, `managementGroupId` must be the ID of [Root Management Group](https://learn.microsoft.com/en-us/azure/governance/management-groups/overview#root-management-group-for-each-directory).
ManagementGroupId string `pulumi:"managementGroupId"`
// Specifies the name of this Private Link Association, which should be a UUID. If `name` is not provided, a UUID will be generated, you should use the `ignoreChanges` attribute to ignore changes to this field. Changing this forces a new Private Link Association to be created.
Name *string `pulumi:"name"`
// Whether public network access is allowed. Changing this forces a new Private Link Association to be created.
PublicNetworkAccessEnabled bool `pulumi:"publicNetworkAccessEnabled"`
// The Resource ID of Resource Management Private Link. Changing this forces a new Private Link Association to be created.
ResourceManagementPrivateLinkId string `pulumi:"resourceManagementPrivateLinkId"`
}
// The set of arguments for constructing a PrivateLinkAssociation resource.
type PrivateLinkAssociationArgs struct {
// Specifies the Management Group ID within which this Private Link Association should exist. Changing this forces a new Private Link Association to be created.
//
// > **Note:** For now, `managementGroupId` must be the ID of [Root Management Group](https://learn.microsoft.com/en-us/azure/governance/management-groups/overview#root-management-group-for-each-directory).
ManagementGroupId pulumi.StringInput
// Specifies the name of this Private Link Association, which should be a UUID. If `name` is not provided, a UUID will be generated, you should use the `ignoreChanges` attribute to ignore changes to this field. Changing this forces a new Private Link Association to be created.
Name pulumi.StringPtrInput
// Whether public network access is allowed. Changing this forces a new Private Link Association to be created.
PublicNetworkAccessEnabled pulumi.BoolInput
// The Resource ID of Resource Management Private Link. Changing this forces a new Private Link Association to be created.
ResourceManagementPrivateLinkId pulumi.StringInput
}
func (PrivateLinkAssociationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*privateLinkAssociationArgs)(nil)).Elem()
}
type PrivateLinkAssociationInput interface {
pulumi.Input
ToPrivateLinkAssociationOutput() PrivateLinkAssociationOutput
ToPrivateLinkAssociationOutputWithContext(ctx context.Context) PrivateLinkAssociationOutput
}
func (*PrivateLinkAssociation) ElementType() reflect.Type {
return reflect.TypeOf((**PrivateLinkAssociation)(nil)).Elem()
}
func (i *PrivateLinkAssociation) ToPrivateLinkAssociationOutput() PrivateLinkAssociationOutput {
return i.ToPrivateLinkAssociationOutputWithContext(context.Background())
}
func (i *PrivateLinkAssociation) ToPrivateLinkAssociationOutputWithContext(ctx context.Context) PrivateLinkAssociationOutput {
return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkAssociationOutput)
}
// PrivateLinkAssociationArrayInput is an input type that accepts PrivateLinkAssociationArray and PrivateLinkAssociationArrayOutput values.
// You can construct a concrete instance of `PrivateLinkAssociationArrayInput` via:
//
// PrivateLinkAssociationArray{ PrivateLinkAssociationArgs{...} }
type PrivateLinkAssociationArrayInput interface {
pulumi.Input
ToPrivateLinkAssociationArrayOutput() PrivateLinkAssociationArrayOutput
ToPrivateLinkAssociationArrayOutputWithContext(context.Context) PrivateLinkAssociationArrayOutput
}
type PrivateLinkAssociationArray []PrivateLinkAssociationInput
func (PrivateLinkAssociationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PrivateLinkAssociation)(nil)).Elem()
}
func (i PrivateLinkAssociationArray) ToPrivateLinkAssociationArrayOutput() PrivateLinkAssociationArrayOutput {
return i.ToPrivateLinkAssociationArrayOutputWithContext(context.Background())
}
func (i PrivateLinkAssociationArray) ToPrivateLinkAssociationArrayOutputWithContext(ctx context.Context) PrivateLinkAssociationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkAssociationArrayOutput)
}
// PrivateLinkAssociationMapInput is an input type that accepts PrivateLinkAssociationMap and PrivateLinkAssociationMapOutput values.
// You can construct a concrete instance of `PrivateLinkAssociationMapInput` via:
//
// PrivateLinkAssociationMap{ "key": PrivateLinkAssociationArgs{...} }
type PrivateLinkAssociationMapInput interface {
pulumi.Input
ToPrivateLinkAssociationMapOutput() PrivateLinkAssociationMapOutput
ToPrivateLinkAssociationMapOutputWithContext(context.Context) PrivateLinkAssociationMapOutput
}
type PrivateLinkAssociationMap map[string]PrivateLinkAssociationInput
func (PrivateLinkAssociationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PrivateLinkAssociation)(nil)).Elem()
}
func (i PrivateLinkAssociationMap) ToPrivateLinkAssociationMapOutput() PrivateLinkAssociationMapOutput {
return i.ToPrivateLinkAssociationMapOutputWithContext(context.Background())
}
func (i PrivateLinkAssociationMap) ToPrivateLinkAssociationMapOutputWithContext(ctx context.Context) PrivateLinkAssociationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkAssociationMapOutput)
}
type PrivateLinkAssociationOutput struct{ *pulumi.OutputState }
func (PrivateLinkAssociationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**PrivateLinkAssociation)(nil)).Elem()
}
func (o PrivateLinkAssociationOutput) ToPrivateLinkAssociationOutput() PrivateLinkAssociationOutput {
return o
}
func (o PrivateLinkAssociationOutput) ToPrivateLinkAssociationOutputWithContext(ctx context.Context) PrivateLinkAssociationOutput {
return o
}
// Specifies the Management Group ID within which this Private Link Association should exist. Changing this forces a new Private Link Association to be created.
//
// > **Note:** For now, `managementGroupId` must be the ID of [Root Management Group](https://learn.microsoft.com/en-us/azure/governance/management-groups/overview#root-management-group-for-each-directory).
func (o PrivateLinkAssociationOutput) ManagementGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *PrivateLinkAssociation) pulumi.StringOutput { return v.ManagementGroupId }).(pulumi.StringOutput)
}
// Specifies the name of this Private Link Association, which should be a UUID. If `name` is not provided, a UUID will be generated, you should use the `ignoreChanges` attribute to ignore changes to this field. Changing this forces a new Private Link Association to be created.
func (o PrivateLinkAssociationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *PrivateLinkAssociation) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Whether public network access is allowed. Changing this forces a new Private Link Association to be created.
func (o PrivateLinkAssociationOutput) PublicNetworkAccessEnabled() pulumi.BoolOutput {
return o.ApplyT(func(v *PrivateLinkAssociation) pulumi.BoolOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolOutput)
}
// The Resource ID of Resource Management Private Link. Changing this forces a new Private Link Association to be created.
func (o PrivateLinkAssociationOutput) ResourceManagementPrivateLinkId() pulumi.StringOutput {
return o.ApplyT(func(v *PrivateLinkAssociation) pulumi.StringOutput { return v.ResourceManagementPrivateLinkId }).(pulumi.StringOutput)
}
// The Tenant ID.
func (o PrivateLinkAssociationOutput) TenantId() pulumi.StringOutput {
return o.ApplyT(func(v *PrivateLinkAssociation) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput)
}
type PrivateLinkAssociationArrayOutput struct{ *pulumi.OutputState }
func (PrivateLinkAssociationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PrivateLinkAssociation)(nil)).Elem()
}
func (o PrivateLinkAssociationArrayOutput) ToPrivateLinkAssociationArrayOutput() PrivateLinkAssociationArrayOutput {
return o
}
func (o PrivateLinkAssociationArrayOutput) ToPrivateLinkAssociationArrayOutputWithContext(ctx context.Context) PrivateLinkAssociationArrayOutput {
return o
}
func (o PrivateLinkAssociationArrayOutput) Index(i pulumi.IntInput) PrivateLinkAssociationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PrivateLinkAssociation {
return vs[0].([]*PrivateLinkAssociation)[vs[1].(int)]
}).(PrivateLinkAssociationOutput)
}
type PrivateLinkAssociationMapOutput struct{ *pulumi.OutputState }
func (PrivateLinkAssociationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PrivateLinkAssociation)(nil)).Elem()
}
func (o PrivateLinkAssociationMapOutput) ToPrivateLinkAssociationMapOutput() PrivateLinkAssociationMapOutput {
return o
}
func (o PrivateLinkAssociationMapOutput) ToPrivateLinkAssociationMapOutputWithContext(ctx context.Context) PrivateLinkAssociationMapOutput {
return o
}
func (o PrivateLinkAssociationMapOutput) MapIndex(k pulumi.StringInput) PrivateLinkAssociationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PrivateLinkAssociation {
return vs[0].(map[string]*PrivateLinkAssociation)[vs[1].(string)]
}).(PrivateLinkAssociationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkAssociationInput)(nil)).Elem(), &PrivateLinkAssociation{})
pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkAssociationArrayInput)(nil)).Elem(), PrivateLinkAssociationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkAssociationMapInput)(nil)).Elem(), PrivateLinkAssociationMap{})
pulumi.RegisterOutputType(PrivateLinkAssociationOutput{})
pulumi.RegisterOutputType(PrivateLinkAssociationArrayOutput{})
pulumi.RegisterOutputType(PrivateLinkAssociationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/management/groupPolicyAssignment.go | sdk/go/azure/management/groupPolicyAssignment.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package management
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Policy Assignment to a Management Group.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := management.NewGroup(ctx, "example", &management.GroupArgs{
// DisplayName: pulumi.String("Some Management Group"),
// })
// if err != nil {
// return err
// }
// exampleDefinition, err := policy.NewDefinition(ctx, "example", &policy.DefinitionArgs{
// Name: pulumi.String("only-deploy-in-westeurope"),
// PolicyType: pulumi.String("Custom"),
// Mode: pulumi.String("All"),
// DisplayName: pulumi.String("my-policy-definition"),
// ManagementGroupId: example.ID(),
// PolicyRule: pulumi.String(` {
// "if": {
// "not": {
// "field": "location",
// "equals": "westeurope"
// }
// },
// "then": {
// "effect": "Deny"
// }
// }
//
// `),
//
// })
// if err != nil {
// return err
// }
// _, err = management.NewGroupPolicyAssignment(ctx, "example", &management.GroupPolicyAssignmentArgs{
// Name: pulumi.String("example-policy"),
// PolicyDefinitionId: exampleDefinition.ID(),
// ManagementGroupId: example.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.Authorization` - 2022-06-01
//
// ## Import
//
// Management Group Policy Assignments can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:management/groupPolicyAssignment:GroupPolicyAssignment example /providers/Microsoft.Management/managementGroups/group1/providers/Microsoft.Authorization/policyAssignments/assignment1
// ```
type GroupPolicyAssignment struct {
pulumi.CustomResourceState
// A description which should be used for this Policy Assignment.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The Display Name for this Policy Assignment.
DisplayName pulumi.StringPtrOutput `pulumi:"displayName"`
// Specifies if this Policy should be enforced or not? Defaults to `true`.
Enforce pulumi.BoolPtrOutput `pulumi:"enforce"`
// An `identity` block as defined below.
//
// > **Note:** The `location` field must also be specified when `identity` is specified.
Identity GroupPolicyAssignmentIdentityPtrOutput `pulumi:"identity"`
// The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created.
Location pulumi.StringOutput `pulumi:"location"`
// The ID of the Management Group. Changing this forces a new Policy Assignment to be created.
ManagementGroupId pulumi.StringOutput `pulumi:"managementGroupId"`
// A JSON mapping of any Metadata for this Policy.
Metadata pulumi.StringOutput `pulumi:"metadata"`
// The name which should be used for this Policy Assignment. Cannot exceed 24 characters in length. Changing this forces a new Policy Assignment to be created.
Name pulumi.StringOutput `pulumi:"name"`
// One or more `nonComplianceMessage` blocks as defined below.
NonComplianceMessages GroupPolicyAssignmentNonComplianceMessageArrayOutput `pulumi:"nonComplianceMessages"`
// Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy.
NotScopes pulumi.StringArrayOutput `pulumi:"notScopes"`
// One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure)
Overrides GroupPolicyAssignmentOverrideArrayOutput `pulumi:"overrides"`
// A JSON mapping of any Parameters for this Policy.
Parameters pulumi.StringPtrOutput `pulumi:"parameters"`
// The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created.
PolicyDefinitionId pulumi.StringOutput `pulumi:"policyDefinitionId"`
// One or more `resourceSelectors` blocks as defined below to filter polices by resource properties.
ResourceSelectors GroupPolicyAssignmentResourceSelectorArrayOutput `pulumi:"resourceSelectors"`
}
// NewGroupPolicyAssignment registers a new resource with the given unique name, arguments, and options.
func NewGroupPolicyAssignment(ctx *pulumi.Context,
name string, args *GroupPolicyAssignmentArgs, opts ...pulumi.ResourceOption) (*GroupPolicyAssignment, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ManagementGroupId == nil {
return nil, errors.New("invalid value for required argument 'ManagementGroupId'")
}
if args.PolicyDefinitionId == nil {
return nil, errors.New("invalid value for required argument 'PolicyDefinitionId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource GroupPolicyAssignment
err := ctx.RegisterResource("azure:management/groupPolicyAssignment:GroupPolicyAssignment", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGroupPolicyAssignment gets an existing GroupPolicyAssignment resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetGroupPolicyAssignment(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GroupPolicyAssignmentState, opts ...pulumi.ResourceOption) (*GroupPolicyAssignment, error) {
var resource GroupPolicyAssignment
err := ctx.ReadResource("azure:management/groupPolicyAssignment:GroupPolicyAssignment", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering GroupPolicyAssignment resources.
type groupPolicyAssignmentState struct {
// A description which should be used for this Policy Assignment.
Description *string `pulumi:"description"`
// The Display Name for this Policy Assignment.
DisplayName *string `pulumi:"displayName"`
// Specifies if this Policy should be enforced or not? Defaults to `true`.
Enforce *bool `pulumi:"enforce"`
// An `identity` block as defined below.
//
// > **Note:** The `location` field must also be specified when `identity` is specified.
Identity *GroupPolicyAssignmentIdentity `pulumi:"identity"`
// The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created.
Location *string `pulumi:"location"`
// The ID of the Management Group. Changing this forces a new Policy Assignment to be created.
ManagementGroupId *string `pulumi:"managementGroupId"`
// A JSON mapping of any Metadata for this Policy.
Metadata *string `pulumi:"metadata"`
// The name which should be used for this Policy Assignment. Cannot exceed 24 characters in length. Changing this forces a new Policy Assignment to be created.
Name *string `pulumi:"name"`
// One or more `nonComplianceMessage` blocks as defined below.
NonComplianceMessages []GroupPolicyAssignmentNonComplianceMessage `pulumi:"nonComplianceMessages"`
// Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy.
NotScopes []string `pulumi:"notScopes"`
// One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure)
Overrides []GroupPolicyAssignmentOverride `pulumi:"overrides"`
// A JSON mapping of any Parameters for this Policy.
Parameters *string `pulumi:"parameters"`
// The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created.
PolicyDefinitionId *string `pulumi:"policyDefinitionId"`
// One or more `resourceSelectors` blocks as defined below to filter polices by resource properties.
ResourceSelectors []GroupPolicyAssignmentResourceSelector `pulumi:"resourceSelectors"`
}
type GroupPolicyAssignmentState struct {
// A description which should be used for this Policy Assignment.
Description pulumi.StringPtrInput
// The Display Name for this Policy Assignment.
DisplayName pulumi.StringPtrInput
// Specifies if this Policy should be enforced or not? Defaults to `true`.
Enforce pulumi.BoolPtrInput
// An `identity` block as defined below.
//
// > **Note:** The `location` field must also be specified when `identity` is specified.
Identity GroupPolicyAssignmentIdentityPtrInput
// The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created.
Location pulumi.StringPtrInput
// The ID of the Management Group. Changing this forces a new Policy Assignment to be created.
ManagementGroupId pulumi.StringPtrInput
// A JSON mapping of any Metadata for this Policy.
Metadata pulumi.StringPtrInput
// The name which should be used for this Policy Assignment. Cannot exceed 24 characters in length. Changing this forces a new Policy Assignment to be created.
Name pulumi.StringPtrInput
// One or more `nonComplianceMessage` blocks as defined below.
NonComplianceMessages GroupPolicyAssignmentNonComplianceMessageArrayInput
// Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy.
NotScopes pulumi.StringArrayInput
// One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure)
Overrides GroupPolicyAssignmentOverrideArrayInput
// A JSON mapping of any Parameters for this Policy.
Parameters pulumi.StringPtrInput
// The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created.
PolicyDefinitionId pulumi.StringPtrInput
// One or more `resourceSelectors` blocks as defined below to filter polices by resource properties.
ResourceSelectors GroupPolicyAssignmentResourceSelectorArrayInput
}
func (GroupPolicyAssignmentState) ElementType() reflect.Type {
return reflect.TypeOf((*groupPolicyAssignmentState)(nil)).Elem()
}
type groupPolicyAssignmentArgs struct {
// A description which should be used for this Policy Assignment.
Description *string `pulumi:"description"`
// The Display Name for this Policy Assignment.
DisplayName *string `pulumi:"displayName"`
// Specifies if this Policy should be enforced or not? Defaults to `true`.
Enforce *bool `pulumi:"enforce"`
// An `identity` block as defined below.
//
// > **Note:** The `location` field must also be specified when `identity` is specified.
Identity *GroupPolicyAssignmentIdentity `pulumi:"identity"`
// The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created.
Location *string `pulumi:"location"`
// The ID of the Management Group. Changing this forces a new Policy Assignment to be created.
ManagementGroupId string `pulumi:"managementGroupId"`
// A JSON mapping of any Metadata for this Policy.
Metadata *string `pulumi:"metadata"`
// The name which should be used for this Policy Assignment. Cannot exceed 24 characters in length. Changing this forces a new Policy Assignment to be created.
Name *string `pulumi:"name"`
// One or more `nonComplianceMessage` blocks as defined below.
NonComplianceMessages []GroupPolicyAssignmentNonComplianceMessage `pulumi:"nonComplianceMessages"`
// Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy.
NotScopes []string `pulumi:"notScopes"`
// One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure)
Overrides []GroupPolicyAssignmentOverride `pulumi:"overrides"`
// A JSON mapping of any Parameters for this Policy.
Parameters *string `pulumi:"parameters"`
// The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created.
PolicyDefinitionId string `pulumi:"policyDefinitionId"`
// One or more `resourceSelectors` blocks as defined below to filter polices by resource properties.
ResourceSelectors []GroupPolicyAssignmentResourceSelector `pulumi:"resourceSelectors"`
}
// The set of arguments for constructing a GroupPolicyAssignment resource.
type GroupPolicyAssignmentArgs struct {
// A description which should be used for this Policy Assignment.
Description pulumi.StringPtrInput
// The Display Name for this Policy Assignment.
DisplayName pulumi.StringPtrInput
// Specifies if this Policy should be enforced or not? Defaults to `true`.
Enforce pulumi.BoolPtrInput
// An `identity` block as defined below.
//
// > **Note:** The `location` field must also be specified when `identity` is specified.
Identity GroupPolicyAssignmentIdentityPtrInput
// The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created.
Location pulumi.StringPtrInput
// The ID of the Management Group. Changing this forces a new Policy Assignment to be created.
ManagementGroupId pulumi.StringInput
// A JSON mapping of any Metadata for this Policy.
Metadata pulumi.StringPtrInput
// The name which should be used for this Policy Assignment. Cannot exceed 24 characters in length. Changing this forces a new Policy Assignment to be created.
Name pulumi.StringPtrInput
// One or more `nonComplianceMessage` blocks as defined below.
NonComplianceMessages GroupPolicyAssignmentNonComplianceMessageArrayInput
// Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy.
NotScopes pulumi.StringArrayInput
// One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure)
Overrides GroupPolicyAssignmentOverrideArrayInput
// A JSON mapping of any Parameters for this Policy.
Parameters pulumi.StringPtrInput
// The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created.
PolicyDefinitionId pulumi.StringInput
// One or more `resourceSelectors` blocks as defined below to filter polices by resource properties.
ResourceSelectors GroupPolicyAssignmentResourceSelectorArrayInput
}
func (GroupPolicyAssignmentArgs) ElementType() reflect.Type {
return reflect.TypeOf((*groupPolicyAssignmentArgs)(nil)).Elem()
}
type GroupPolicyAssignmentInput interface {
pulumi.Input
ToGroupPolicyAssignmentOutput() GroupPolicyAssignmentOutput
ToGroupPolicyAssignmentOutputWithContext(ctx context.Context) GroupPolicyAssignmentOutput
}
func (*GroupPolicyAssignment) ElementType() reflect.Type {
return reflect.TypeOf((**GroupPolicyAssignment)(nil)).Elem()
}
func (i *GroupPolicyAssignment) ToGroupPolicyAssignmentOutput() GroupPolicyAssignmentOutput {
return i.ToGroupPolicyAssignmentOutputWithContext(context.Background())
}
func (i *GroupPolicyAssignment) ToGroupPolicyAssignmentOutputWithContext(ctx context.Context) GroupPolicyAssignmentOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyAssignmentOutput)
}
// GroupPolicyAssignmentArrayInput is an input type that accepts GroupPolicyAssignmentArray and GroupPolicyAssignmentArrayOutput values.
// You can construct a concrete instance of `GroupPolicyAssignmentArrayInput` via:
//
// GroupPolicyAssignmentArray{ GroupPolicyAssignmentArgs{...} }
type GroupPolicyAssignmentArrayInput interface {
pulumi.Input
ToGroupPolicyAssignmentArrayOutput() GroupPolicyAssignmentArrayOutput
ToGroupPolicyAssignmentArrayOutputWithContext(context.Context) GroupPolicyAssignmentArrayOutput
}
type GroupPolicyAssignmentArray []GroupPolicyAssignmentInput
func (GroupPolicyAssignmentArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GroupPolicyAssignment)(nil)).Elem()
}
func (i GroupPolicyAssignmentArray) ToGroupPolicyAssignmentArrayOutput() GroupPolicyAssignmentArrayOutput {
return i.ToGroupPolicyAssignmentArrayOutputWithContext(context.Background())
}
func (i GroupPolicyAssignmentArray) ToGroupPolicyAssignmentArrayOutputWithContext(ctx context.Context) GroupPolicyAssignmentArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyAssignmentArrayOutput)
}
// GroupPolicyAssignmentMapInput is an input type that accepts GroupPolicyAssignmentMap and GroupPolicyAssignmentMapOutput values.
// You can construct a concrete instance of `GroupPolicyAssignmentMapInput` via:
//
// GroupPolicyAssignmentMap{ "key": GroupPolicyAssignmentArgs{...} }
type GroupPolicyAssignmentMapInput interface {
pulumi.Input
ToGroupPolicyAssignmentMapOutput() GroupPolicyAssignmentMapOutput
ToGroupPolicyAssignmentMapOutputWithContext(context.Context) GroupPolicyAssignmentMapOutput
}
type GroupPolicyAssignmentMap map[string]GroupPolicyAssignmentInput
func (GroupPolicyAssignmentMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GroupPolicyAssignment)(nil)).Elem()
}
func (i GroupPolicyAssignmentMap) ToGroupPolicyAssignmentMapOutput() GroupPolicyAssignmentMapOutput {
return i.ToGroupPolicyAssignmentMapOutputWithContext(context.Background())
}
func (i GroupPolicyAssignmentMap) ToGroupPolicyAssignmentMapOutputWithContext(ctx context.Context) GroupPolicyAssignmentMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupPolicyAssignmentMapOutput)
}
type GroupPolicyAssignmentOutput struct{ *pulumi.OutputState }
func (GroupPolicyAssignmentOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GroupPolicyAssignment)(nil)).Elem()
}
func (o GroupPolicyAssignmentOutput) ToGroupPolicyAssignmentOutput() GroupPolicyAssignmentOutput {
return o
}
func (o GroupPolicyAssignmentOutput) ToGroupPolicyAssignmentOutputWithContext(ctx context.Context) GroupPolicyAssignmentOutput {
return o
}
// A description which should be used for this Policy Assignment.
func (o GroupPolicyAssignmentOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GroupPolicyAssignment) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The Display Name for this Policy Assignment.
func (o GroupPolicyAssignmentOutput) DisplayName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GroupPolicyAssignment) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput)
}
// Specifies if this Policy should be enforced or not? Defaults to `true`.
func (o GroupPolicyAssignmentOutput) Enforce() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *GroupPolicyAssignment) pulumi.BoolPtrOutput { return v.Enforce }).(pulumi.BoolPtrOutput)
}
// An `identity` block as defined below.
//
// > **Note:** The `location` field must also be specified when `identity` is specified.
func (o GroupPolicyAssignmentOutput) Identity() GroupPolicyAssignmentIdentityPtrOutput {
return o.ApplyT(func(v *GroupPolicyAssignment) GroupPolicyAssignmentIdentityPtrOutput { return v.Identity }).(GroupPolicyAssignmentIdentityPtrOutput)
}
// The Azure Region where the Policy Assignment should exist. Changing this forces a new Policy Assignment to be created.
func (o GroupPolicyAssignmentOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicyAssignment) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// The ID of the Management Group. Changing this forces a new Policy Assignment to be created.
func (o GroupPolicyAssignmentOutput) ManagementGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicyAssignment) pulumi.StringOutput { return v.ManagementGroupId }).(pulumi.StringOutput)
}
// A JSON mapping of any Metadata for this Policy.
func (o GroupPolicyAssignmentOutput) Metadata() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicyAssignment) pulumi.StringOutput { return v.Metadata }).(pulumi.StringOutput)
}
// The name which should be used for this Policy Assignment. Cannot exceed 24 characters in length. Changing this forces a new Policy Assignment to be created.
func (o GroupPolicyAssignmentOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicyAssignment) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// One or more `nonComplianceMessage` blocks as defined below.
func (o GroupPolicyAssignmentOutput) NonComplianceMessages() GroupPolicyAssignmentNonComplianceMessageArrayOutput {
return o.ApplyT(func(v *GroupPolicyAssignment) GroupPolicyAssignmentNonComplianceMessageArrayOutput {
return v.NonComplianceMessages
}).(GroupPolicyAssignmentNonComplianceMessageArrayOutput)
}
// Specifies a list of Resource Scopes (for example a Subscription, or a Resource Group) within this Management Group which are excluded from this Policy.
func (o GroupPolicyAssignmentOutput) NotScopes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *GroupPolicyAssignment) pulumi.StringArrayOutput { return v.NotScopes }).(pulumi.StringArrayOutput)
}
// One or more `overrides` blocks as defined below. More detail about `overrides` and `resourceSelectors` see [policy assignment structure](https://learn.microsoft.com/en-us/azure/governance/policy/concepts/assignment-structure)
func (o GroupPolicyAssignmentOutput) Overrides() GroupPolicyAssignmentOverrideArrayOutput {
return o.ApplyT(func(v *GroupPolicyAssignment) GroupPolicyAssignmentOverrideArrayOutput { return v.Overrides }).(GroupPolicyAssignmentOverrideArrayOutput)
}
// A JSON mapping of any Parameters for this Policy.
func (o GroupPolicyAssignmentOutput) Parameters() pulumi.StringPtrOutput {
return o.ApplyT(func(v *GroupPolicyAssignment) pulumi.StringPtrOutput { return v.Parameters }).(pulumi.StringPtrOutput)
}
// The ID of the Policy Definition or Policy Definition Set. Changing this forces a new Policy Assignment to be created.
func (o GroupPolicyAssignmentOutput) PolicyDefinitionId() pulumi.StringOutput {
return o.ApplyT(func(v *GroupPolicyAssignment) pulumi.StringOutput { return v.PolicyDefinitionId }).(pulumi.StringOutput)
}
// One or more `resourceSelectors` blocks as defined below to filter polices by resource properties.
func (o GroupPolicyAssignmentOutput) ResourceSelectors() GroupPolicyAssignmentResourceSelectorArrayOutput {
return o.ApplyT(func(v *GroupPolicyAssignment) GroupPolicyAssignmentResourceSelectorArrayOutput {
return v.ResourceSelectors
}).(GroupPolicyAssignmentResourceSelectorArrayOutput)
}
type GroupPolicyAssignmentArrayOutput struct{ *pulumi.OutputState }
func (GroupPolicyAssignmentArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GroupPolicyAssignment)(nil)).Elem()
}
func (o GroupPolicyAssignmentArrayOutput) ToGroupPolicyAssignmentArrayOutput() GroupPolicyAssignmentArrayOutput {
return o
}
func (o GroupPolicyAssignmentArrayOutput) ToGroupPolicyAssignmentArrayOutputWithContext(ctx context.Context) GroupPolicyAssignmentArrayOutput {
return o
}
func (o GroupPolicyAssignmentArrayOutput) Index(i pulumi.IntInput) GroupPolicyAssignmentOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GroupPolicyAssignment {
return vs[0].([]*GroupPolicyAssignment)[vs[1].(int)]
}).(GroupPolicyAssignmentOutput)
}
type GroupPolicyAssignmentMapOutput struct{ *pulumi.OutputState }
func (GroupPolicyAssignmentMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GroupPolicyAssignment)(nil)).Elem()
}
func (o GroupPolicyAssignmentMapOutput) ToGroupPolicyAssignmentMapOutput() GroupPolicyAssignmentMapOutput {
return o
}
func (o GroupPolicyAssignmentMapOutput) ToGroupPolicyAssignmentMapOutputWithContext(ctx context.Context) GroupPolicyAssignmentMapOutput {
return o
}
func (o GroupPolicyAssignmentMapOutput) MapIndex(k pulumi.StringInput) GroupPolicyAssignmentOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GroupPolicyAssignment {
return vs[0].(map[string]*GroupPolicyAssignment)[vs[1].(string)]
}).(GroupPolicyAssignmentOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GroupPolicyAssignmentInput)(nil)).Elem(), &GroupPolicyAssignment{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupPolicyAssignmentArrayInput)(nil)).Elem(), GroupPolicyAssignmentArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupPolicyAssignmentMapInput)(nil)).Elem(), GroupPolicyAssignmentMap{})
pulumi.RegisterOutputType(GroupPolicyAssignmentOutput{})
pulumi.RegisterOutputType(GroupPolicyAssignmentArrayOutput{})
pulumi.RegisterOutputType(GroupPolicyAssignmentMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/management/groupSubscriptionAssociation.go | sdk/go/azure/management/groupSubscriptionAssociation.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package management
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Management Group Subscription Association.
//
// !> **Note:** When using this resource, configuring `subscriptionIds` on the `management.Group` resource is not supported.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/management"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := management.LookupGroup(ctx, &management.LookupGroupArgs{
// Name: pulumi.StringRef("exampleManagementGroup"),
// }, nil)
// if err != nil {
// return err
// }
// exampleGetSubscription, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{
// SubscriptionId: pulumi.StringRef("12345678-1234-1234-1234-123456789012"),
// }, nil)
// if err != nil {
// return err
// }
// _, err = management.NewGroupSubscriptionAssociation(ctx, "example", &management.GroupSubscriptionAssociationArgs{
// ManagementGroupId: pulumi.String(example.Id),
// SubscriptionId: pulumi.String(exampleGetSubscription.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.Management` - 2020-05-01
//
// ## Import
//
// Managements can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:management/groupSubscriptionAssociation:GroupSubscriptionAssociation example /providers/Microsoft.Management/managementGroups/MyManagementGroup/subscriptions/12345678-1234-1234-1234-123456789012
// ```
type GroupSubscriptionAssociation struct {
pulumi.CustomResourceState
// The ID of the Management Group to associate the Subscription with. Changing this forces a new Management to be created.
ManagementGroupId pulumi.StringOutput `pulumi:"managementGroupId"`
// The ID of the Subscription to be associated with the Management Group. Changing this forces a new Management to be created.
SubscriptionId pulumi.StringOutput `pulumi:"subscriptionId"`
}
// NewGroupSubscriptionAssociation registers a new resource with the given unique name, arguments, and options.
func NewGroupSubscriptionAssociation(ctx *pulumi.Context,
name string, args *GroupSubscriptionAssociationArgs, opts ...pulumi.ResourceOption) (*GroupSubscriptionAssociation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ManagementGroupId == nil {
return nil, errors.New("invalid value for required argument 'ManagementGroupId'")
}
if args.SubscriptionId == nil {
return nil, errors.New("invalid value for required argument 'SubscriptionId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource GroupSubscriptionAssociation
err := ctx.RegisterResource("azure:management/groupSubscriptionAssociation:GroupSubscriptionAssociation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetGroupSubscriptionAssociation gets an existing GroupSubscriptionAssociation resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetGroupSubscriptionAssociation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *GroupSubscriptionAssociationState, opts ...pulumi.ResourceOption) (*GroupSubscriptionAssociation, error) {
var resource GroupSubscriptionAssociation
err := ctx.ReadResource("azure:management/groupSubscriptionAssociation:GroupSubscriptionAssociation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering GroupSubscriptionAssociation resources.
type groupSubscriptionAssociationState struct {
// The ID of the Management Group to associate the Subscription with. Changing this forces a new Management to be created.
ManagementGroupId *string `pulumi:"managementGroupId"`
// The ID of the Subscription to be associated with the Management Group. Changing this forces a new Management to be created.
SubscriptionId *string `pulumi:"subscriptionId"`
}
type GroupSubscriptionAssociationState struct {
// The ID of the Management Group to associate the Subscription with. Changing this forces a new Management to be created.
ManagementGroupId pulumi.StringPtrInput
// The ID of the Subscription to be associated with the Management Group. Changing this forces a new Management to be created.
SubscriptionId pulumi.StringPtrInput
}
func (GroupSubscriptionAssociationState) ElementType() reflect.Type {
return reflect.TypeOf((*groupSubscriptionAssociationState)(nil)).Elem()
}
type groupSubscriptionAssociationArgs struct {
// The ID of the Management Group to associate the Subscription with. Changing this forces a new Management to be created.
ManagementGroupId string `pulumi:"managementGroupId"`
// The ID of the Subscription to be associated with the Management Group. Changing this forces a new Management to be created.
SubscriptionId string `pulumi:"subscriptionId"`
}
// The set of arguments for constructing a GroupSubscriptionAssociation resource.
type GroupSubscriptionAssociationArgs struct {
// The ID of the Management Group to associate the Subscription with. Changing this forces a new Management to be created.
ManagementGroupId pulumi.StringInput
// The ID of the Subscription to be associated with the Management Group. Changing this forces a new Management to be created.
SubscriptionId pulumi.StringInput
}
func (GroupSubscriptionAssociationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*groupSubscriptionAssociationArgs)(nil)).Elem()
}
type GroupSubscriptionAssociationInput interface {
pulumi.Input
ToGroupSubscriptionAssociationOutput() GroupSubscriptionAssociationOutput
ToGroupSubscriptionAssociationOutputWithContext(ctx context.Context) GroupSubscriptionAssociationOutput
}
func (*GroupSubscriptionAssociation) ElementType() reflect.Type {
return reflect.TypeOf((**GroupSubscriptionAssociation)(nil)).Elem()
}
func (i *GroupSubscriptionAssociation) ToGroupSubscriptionAssociationOutput() GroupSubscriptionAssociationOutput {
return i.ToGroupSubscriptionAssociationOutputWithContext(context.Background())
}
func (i *GroupSubscriptionAssociation) ToGroupSubscriptionAssociationOutputWithContext(ctx context.Context) GroupSubscriptionAssociationOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupSubscriptionAssociationOutput)
}
// GroupSubscriptionAssociationArrayInput is an input type that accepts GroupSubscriptionAssociationArray and GroupSubscriptionAssociationArrayOutput values.
// You can construct a concrete instance of `GroupSubscriptionAssociationArrayInput` via:
//
// GroupSubscriptionAssociationArray{ GroupSubscriptionAssociationArgs{...} }
type GroupSubscriptionAssociationArrayInput interface {
pulumi.Input
ToGroupSubscriptionAssociationArrayOutput() GroupSubscriptionAssociationArrayOutput
ToGroupSubscriptionAssociationArrayOutputWithContext(context.Context) GroupSubscriptionAssociationArrayOutput
}
type GroupSubscriptionAssociationArray []GroupSubscriptionAssociationInput
func (GroupSubscriptionAssociationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GroupSubscriptionAssociation)(nil)).Elem()
}
func (i GroupSubscriptionAssociationArray) ToGroupSubscriptionAssociationArrayOutput() GroupSubscriptionAssociationArrayOutput {
return i.ToGroupSubscriptionAssociationArrayOutputWithContext(context.Background())
}
func (i GroupSubscriptionAssociationArray) ToGroupSubscriptionAssociationArrayOutputWithContext(ctx context.Context) GroupSubscriptionAssociationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupSubscriptionAssociationArrayOutput)
}
// GroupSubscriptionAssociationMapInput is an input type that accepts GroupSubscriptionAssociationMap and GroupSubscriptionAssociationMapOutput values.
// You can construct a concrete instance of `GroupSubscriptionAssociationMapInput` via:
//
// GroupSubscriptionAssociationMap{ "key": GroupSubscriptionAssociationArgs{...} }
type GroupSubscriptionAssociationMapInput interface {
pulumi.Input
ToGroupSubscriptionAssociationMapOutput() GroupSubscriptionAssociationMapOutput
ToGroupSubscriptionAssociationMapOutputWithContext(context.Context) GroupSubscriptionAssociationMapOutput
}
type GroupSubscriptionAssociationMap map[string]GroupSubscriptionAssociationInput
func (GroupSubscriptionAssociationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GroupSubscriptionAssociation)(nil)).Elem()
}
func (i GroupSubscriptionAssociationMap) ToGroupSubscriptionAssociationMapOutput() GroupSubscriptionAssociationMapOutput {
return i.ToGroupSubscriptionAssociationMapOutputWithContext(context.Background())
}
func (i GroupSubscriptionAssociationMap) ToGroupSubscriptionAssociationMapOutputWithContext(ctx context.Context) GroupSubscriptionAssociationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(GroupSubscriptionAssociationMapOutput)
}
type GroupSubscriptionAssociationOutput struct{ *pulumi.OutputState }
func (GroupSubscriptionAssociationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**GroupSubscriptionAssociation)(nil)).Elem()
}
func (o GroupSubscriptionAssociationOutput) ToGroupSubscriptionAssociationOutput() GroupSubscriptionAssociationOutput {
return o
}
func (o GroupSubscriptionAssociationOutput) ToGroupSubscriptionAssociationOutputWithContext(ctx context.Context) GroupSubscriptionAssociationOutput {
return o
}
// The ID of the Management Group to associate the Subscription with. Changing this forces a new Management to be created.
func (o GroupSubscriptionAssociationOutput) ManagementGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *GroupSubscriptionAssociation) pulumi.StringOutput { return v.ManagementGroupId }).(pulumi.StringOutput)
}
// The ID of the Subscription to be associated with the Management Group. Changing this forces a new Management to be created.
func (o GroupSubscriptionAssociationOutput) SubscriptionId() pulumi.StringOutput {
return o.ApplyT(func(v *GroupSubscriptionAssociation) pulumi.StringOutput { return v.SubscriptionId }).(pulumi.StringOutput)
}
type GroupSubscriptionAssociationArrayOutput struct{ *pulumi.OutputState }
func (GroupSubscriptionAssociationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*GroupSubscriptionAssociation)(nil)).Elem()
}
func (o GroupSubscriptionAssociationArrayOutput) ToGroupSubscriptionAssociationArrayOutput() GroupSubscriptionAssociationArrayOutput {
return o
}
func (o GroupSubscriptionAssociationArrayOutput) ToGroupSubscriptionAssociationArrayOutputWithContext(ctx context.Context) GroupSubscriptionAssociationArrayOutput {
return o
}
func (o GroupSubscriptionAssociationArrayOutput) Index(i pulumi.IntInput) GroupSubscriptionAssociationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GroupSubscriptionAssociation {
return vs[0].([]*GroupSubscriptionAssociation)[vs[1].(int)]
}).(GroupSubscriptionAssociationOutput)
}
type GroupSubscriptionAssociationMapOutput struct{ *pulumi.OutputState }
func (GroupSubscriptionAssociationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*GroupSubscriptionAssociation)(nil)).Elem()
}
func (o GroupSubscriptionAssociationMapOutput) ToGroupSubscriptionAssociationMapOutput() GroupSubscriptionAssociationMapOutput {
return o
}
func (o GroupSubscriptionAssociationMapOutput) ToGroupSubscriptionAssociationMapOutputWithContext(ctx context.Context) GroupSubscriptionAssociationMapOutput {
return o
}
func (o GroupSubscriptionAssociationMapOutput) MapIndex(k pulumi.StringInput) GroupSubscriptionAssociationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GroupSubscriptionAssociation {
return vs[0].(map[string]*GroupSubscriptionAssociation)[vs[1].(string)]
}).(GroupSubscriptionAssociationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*GroupSubscriptionAssociationInput)(nil)).Elem(), &GroupSubscriptionAssociation{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupSubscriptionAssociationArrayInput)(nil)).Elem(), GroupSubscriptionAssociationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*GroupSubscriptionAssociationMapInput)(nil)).Elem(), GroupSubscriptionAssociationMap{})
pulumi.RegisterOutputType(GroupSubscriptionAssociationOutput{})
pulumi.RegisterOutputType(GroupSubscriptionAssociationArrayOutput{})
pulumi.RegisterOutputType(GroupSubscriptionAssociationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/management/privateLink.go | sdk/go/azure/management/privateLink.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package management
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages a Resource Management Private Link to restrict access for managing resources in the tenant.
//
// ## 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/management"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
// Name: pulumi.String("example-resources"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = management.NewPrivateLink(ctx, "example", &management.PrivateLinkArgs{
// Name: pulumi.String("example"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.Authorization` - 2020-05-01
//
// ## Import
//
// An existing Resource Management Private Link can be imported into Pulumi using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:management/privateLink:PrivateLink example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Authorization/resourceManagementPrivateLinks/link1
// ```
type PrivateLink struct {
pulumi.CustomResourceState
// The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewPrivateLink registers a new resource with the given unique name, arguments, and options.
func NewPrivateLink(ctx *pulumi.Context,
name string, args *PrivateLinkArgs, opts ...pulumi.ResourceOption) (*PrivateLink, 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 PrivateLink
err := ctx.RegisterResource("azure:management/privateLink:PrivateLink", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPrivateLink gets an existing PrivateLink resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetPrivateLink(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PrivateLinkState, opts ...pulumi.ResourceOption) (*PrivateLink, error) {
var resource PrivateLink
err := ctx.ReadResource("azure:management/privateLink:PrivateLink", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering PrivateLink resources.
type privateLinkState struct {
// The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
Location *string `pulumi:"location"`
// Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type PrivateLinkState struct {
// The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
Location pulumi.StringPtrInput
// Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (PrivateLinkState) ElementType() reflect.Type {
return reflect.TypeOf((*privateLinkState)(nil)).Elem()
}
type privateLinkArgs struct {
// The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
Location *string `pulumi:"location"`
// Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
Name *string `pulumi:"name"`
// Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a PrivateLink resource.
type PrivateLinkArgs struct {
// The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
Location pulumi.StringPtrInput
// Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
Name pulumi.StringPtrInput
// Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
ResourceGroupName pulumi.StringInput
}
func (PrivateLinkArgs) ElementType() reflect.Type {
return reflect.TypeOf((*privateLinkArgs)(nil)).Elem()
}
type PrivateLinkInput interface {
pulumi.Input
ToPrivateLinkOutput() PrivateLinkOutput
ToPrivateLinkOutputWithContext(ctx context.Context) PrivateLinkOutput
}
func (*PrivateLink) ElementType() reflect.Type {
return reflect.TypeOf((**PrivateLink)(nil)).Elem()
}
func (i *PrivateLink) ToPrivateLinkOutput() PrivateLinkOutput {
return i.ToPrivateLinkOutputWithContext(context.Background())
}
func (i *PrivateLink) ToPrivateLinkOutputWithContext(ctx context.Context) PrivateLinkOutput {
return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkOutput)
}
// PrivateLinkArrayInput is an input type that accepts PrivateLinkArray and PrivateLinkArrayOutput values.
// You can construct a concrete instance of `PrivateLinkArrayInput` via:
//
// PrivateLinkArray{ PrivateLinkArgs{...} }
type PrivateLinkArrayInput interface {
pulumi.Input
ToPrivateLinkArrayOutput() PrivateLinkArrayOutput
ToPrivateLinkArrayOutputWithContext(context.Context) PrivateLinkArrayOutput
}
type PrivateLinkArray []PrivateLinkInput
func (PrivateLinkArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PrivateLink)(nil)).Elem()
}
func (i PrivateLinkArray) ToPrivateLinkArrayOutput() PrivateLinkArrayOutput {
return i.ToPrivateLinkArrayOutputWithContext(context.Background())
}
func (i PrivateLinkArray) ToPrivateLinkArrayOutputWithContext(ctx context.Context) PrivateLinkArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkArrayOutput)
}
// PrivateLinkMapInput is an input type that accepts PrivateLinkMap and PrivateLinkMapOutput values.
// You can construct a concrete instance of `PrivateLinkMapInput` via:
//
// PrivateLinkMap{ "key": PrivateLinkArgs{...} }
type PrivateLinkMapInput interface {
pulumi.Input
ToPrivateLinkMapOutput() PrivateLinkMapOutput
ToPrivateLinkMapOutputWithContext(context.Context) PrivateLinkMapOutput
}
type PrivateLinkMap map[string]PrivateLinkInput
func (PrivateLinkMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PrivateLink)(nil)).Elem()
}
func (i PrivateLinkMap) ToPrivateLinkMapOutput() PrivateLinkMapOutput {
return i.ToPrivateLinkMapOutputWithContext(context.Background())
}
func (i PrivateLinkMap) ToPrivateLinkMapOutputWithContext(ctx context.Context) PrivateLinkMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(PrivateLinkMapOutput)
}
type PrivateLinkOutput struct{ *pulumi.OutputState }
func (PrivateLinkOutput) ElementType() reflect.Type {
return reflect.TypeOf((**PrivateLink)(nil)).Elem()
}
func (o PrivateLinkOutput) ToPrivateLinkOutput() PrivateLinkOutput {
return o
}
func (o PrivateLinkOutput) ToPrivateLinkOutputWithContext(ctx context.Context) PrivateLinkOutput {
return o
}
// The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
func (o PrivateLinkOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *PrivateLink) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
func (o PrivateLinkOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *PrivateLink) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
func (o PrivateLinkOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *PrivateLink) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
type PrivateLinkArrayOutput struct{ *pulumi.OutputState }
func (PrivateLinkArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PrivateLink)(nil)).Elem()
}
func (o PrivateLinkArrayOutput) ToPrivateLinkArrayOutput() PrivateLinkArrayOutput {
return o
}
func (o PrivateLinkArrayOutput) ToPrivateLinkArrayOutputWithContext(ctx context.Context) PrivateLinkArrayOutput {
return o
}
func (o PrivateLinkArrayOutput) Index(i pulumi.IntInput) PrivateLinkOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PrivateLink {
return vs[0].([]*PrivateLink)[vs[1].(int)]
}).(PrivateLinkOutput)
}
type PrivateLinkMapOutput struct{ *pulumi.OutputState }
func (PrivateLinkMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PrivateLink)(nil)).Elem()
}
func (o PrivateLinkMapOutput) ToPrivateLinkMapOutput() PrivateLinkMapOutput {
return o
}
func (o PrivateLinkMapOutput) ToPrivateLinkMapOutputWithContext(ctx context.Context) PrivateLinkMapOutput {
return o
}
func (o PrivateLinkMapOutput) MapIndex(k pulumi.StringInput) PrivateLinkOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PrivateLink {
return vs[0].(map[string]*PrivateLink)[vs[1].(string)]
}).(PrivateLinkOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkInput)(nil)).Elem(), &PrivateLink{})
pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkArrayInput)(nil)).Elem(), PrivateLinkArray{})
pulumi.RegisterInputType(reflect.TypeOf((*PrivateLinkMapInput)(nil)).Elem(), PrivateLinkMap{})
pulumi.RegisterOutputType(PrivateLinkOutput{})
pulumi.RegisterOutputType(PrivateLinkArrayOutput{})
pulumi.RegisterOutputType(PrivateLinkMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/iotcentral/init.go | sdk/go/azure/iotcentral/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 iotcentral
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:iotcentral/application:Application":
r = &Application{}
case "azure:iotcentral/applicationNetworkRuleSet:ApplicationNetworkRuleSet":
r = &ApplicationNetworkRuleSet{}
case "azure:iotcentral/organization:Organization":
r = &Organization{}
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",
"iotcentral/application",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"iotcentral/applicationNetworkRuleSet",
&module{version},
)
pulumi.RegisterResourceModule(
"azure",
"iotcentral/organization",
&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/iotcentral/pulumiTypes.go | sdk/go/azure/iotcentral/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 iotcentral
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 ApplicationIdentity struct {
// The Principal ID associated with this Managed Service Identity.
PrincipalId *string `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId *string `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this IoT Central Application. The only possible value is `SystemAssigned`.
Type string `pulumi:"type"`
}
// ApplicationIdentityInput is an input type that accepts ApplicationIdentityArgs and ApplicationIdentityOutput values.
// You can construct a concrete instance of `ApplicationIdentityInput` via:
//
// ApplicationIdentityArgs{...}
type ApplicationIdentityInput interface {
pulumi.Input
ToApplicationIdentityOutput() ApplicationIdentityOutput
ToApplicationIdentityOutputWithContext(context.Context) ApplicationIdentityOutput
}
type ApplicationIdentityArgs struct {
// The Principal ID associated with this Managed Service Identity.
PrincipalId pulumi.StringPtrInput `pulumi:"principalId"`
// The Tenant ID associated with this Managed Service Identity.
TenantId pulumi.StringPtrInput `pulumi:"tenantId"`
// Specifies the type of Managed Service Identity that should be configured on this IoT Central Application. The only possible value is `SystemAssigned`.
Type pulumi.StringInput `pulumi:"type"`
}
func (ApplicationIdentityArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ApplicationIdentity)(nil)).Elem()
}
func (i ApplicationIdentityArgs) ToApplicationIdentityOutput() ApplicationIdentityOutput {
return i.ToApplicationIdentityOutputWithContext(context.Background())
}
func (i ApplicationIdentityArgs) ToApplicationIdentityOutputWithContext(ctx context.Context) ApplicationIdentityOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationIdentityOutput)
}
func (i ApplicationIdentityArgs) ToApplicationIdentityPtrOutput() ApplicationIdentityPtrOutput {
return i.ToApplicationIdentityPtrOutputWithContext(context.Background())
}
func (i ApplicationIdentityArgs) ToApplicationIdentityPtrOutputWithContext(ctx context.Context) ApplicationIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationIdentityOutput).ToApplicationIdentityPtrOutputWithContext(ctx)
}
// ApplicationIdentityPtrInput is an input type that accepts ApplicationIdentityArgs, ApplicationIdentityPtr and ApplicationIdentityPtrOutput values.
// You can construct a concrete instance of `ApplicationIdentityPtrInput` via:
//
// ApplicationIdentityArgs{...}
//
// or:
//
// nil
type ApplicationIdentityPtrInput interface {
pulumi.Input
ToApplicationIdentityPtrOutput() ApplicationIdentityPtrOutput
ToApplicationIdentityPtrOutputWithContext(context.Context) ApplicationIdentityPtrOutput
}
type applicationIdentityPtrType ApplicationIdentityArgs
func ApplicationIdentityPtr(v *ApplicationIdentityArgs) ApplicationIdentityPtrInput {
return (*applicationIdentityPtrType)(v)
}
func (*applicationIdentityPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ApplicationIdentity)(nil)).Elem()
}
func (i *applicationIdentityPtrType) ToApplicationIdentityPtrOutput() ApplicationIdentityPtrOutput {
return i.ToApplicationIdentityPtrOutputWithContext(context.Background())
}
func (i *applicationIdentityPtrType) ToApplicationIdentityPtrOutputWithContext(ctx context.Context) ApplicationIdentityPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationIdentityPtrOutput)
}
type ApplicationIdentityOutput struct{ *pulumi.OutputState }
func (ApplicationIdentityOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ApplicationIdentity)(nil)).Elem()
}
func (o ApplicationIdentityOutput) ToApplicationIdentityOutput() ApplicationIdentityOutput {
return o
}
func (o ApplicationIdentityOutput) ToApplicationIdentityOutputWithContext(ctx context.Context) ApplicationIdentityOutput {
return o
}
func (o ApplicationIdentityOutput) ToApplicationIdentityPtrOutput() ApplicationIdentityPtrOutput {
return o.ToApplicationIdentityPtrOutputWithContext(context.Background())
}
func (o ApplicationIdentityOutput) ToApplicationIdentityPtrOutputWithContext(ctx context.Context) ApplicationIdentityPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v ApplicationIdentity) *ApplicationIdentity {
return &v
}).(ApplicationIdentityPtrOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o ApplicationIdentityOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ApplicationIdentity) *string { return v.PrincipalId }).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o ApplicationIdentityOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v ApplicationIdentity) *string { return v.TenantId }).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this IoT Central Application. The only possible value is `SystemAssigned`.
func (o ApplicationIdentityOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v ApplicationIdentity) string { return v.Type }).(pulumi.StringOutput)
}
type ApplicationIdentityPtrOutput struct{ *pulumi.OutputState }
func (ApplicationIdentityPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApplicationIdentity)(nil)).Elem()
}
func (o ApplicationIdentityPtrOutput) ToApplicationIdentityPtrOutput() ApplicationIdentityPtrOutput {
return o
}
func (o ApplicationIdentityPtrOutput) ToApplicationIdentityPtrOutputWithContext(ctx context.Context) ApplicationIdentityPtrOutput {
return o
}
func (o ApplicationIdentityPtrOutput) Elem() ApplicationIdentityOutput {
return o.ApplyT(func(v *ApplicationIdentity) ApplicationIdentity {
if v != nil {
return *v
}
var ret ApplicationIdentity
return ret
}).(ApplicationIdentityOutput)
}
// The Principal ID associated with this Managed Service Identity.
func (o ApplicationIdentityPtrOutput) PrincipalId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApplicationIdentity) *string {
if v == nil {
return nil
}
return v.PrincipalId
}).(pulumi.StringPtrOutput)
}
// The Tenant ID associated with this Managed Service Identity.
func (o ApplicationIdentityPtrOutput) TenantId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApplicationIdentity) *string {
if v == nil {
return nil
}
return v.TenantId
}).(pulumi.StringPtrOutput)
}
// Specifies the type of Managed Service Identity that should be configured on this IoT Central Application. The only possible value is `SystemAssigned`.
func (o ApplicationIdentityPtrOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApplicationIdentity) *string {
if v == nil {
return nil
}
return &v.Type
}).(pulumi.StringPtrOutput)
}
type ApplicationNetworkRuleSetIpRule struct {
// The IP address range in CIDR notation for the IP Rule.
IpMask string `pulumi:"ipMask"`
// The name of the IP Rule
Name string `pulumi:"name"`
}
// ApplicationNetworkRuleSetIpRuleInput is an input type that accepts ApplicationNetworkRuleSetIpRuleArgs and ApplicationNetworkRuleSetIpRuleOutput values.
// You can construct a concrete instance of `ApplicationNetworkRuleSetIpRuleInput` via:
//
// ApplicationNetworkRuleSetIpRuleArgs{...}
type ApplicationNetworkRuleSetIpRuleInput interface {
pulumi.Input
ToApplicationNetworkRuleSetIpRuleOutput() ApplicationNetworkRuleSetIpRuleOutput
ToApplicationNetworkRuleSetIpRuleOutputWithContext(context.Context) ApplicationNetworkRuleSetIpRuleOutput
}
type ApplicationNetworkRuleSetIpRuleArgs struct {
// The IP address range in CIDR notation for the IP Rule.
IpMask pulumi.StringInput `pulumi:"ipMask"`
// The name of the IP Rule
Name pulumi.StringInput `pulumi:"name"`
}
func (ApplicationNetworkRuleSetIpRuleArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ApplicationNetworkRuleSetIpRule)(nil)).Elem()
}
func (i ApplicationNetworkRuleSetIpRuleArgs) ToApplicationNetworkRuleSetIpRuleOutput() ApplicationNetworkRuleSetIpRuleOutput {
return i.ToApplicationNetworkRuleSetIpRuleOutputWithContext(context.Background())
}
func (i ApplicationNetworkRuleSetIpRuleArgs) ToApplicationNetworkRuleSetIpRuleOutputWithContext(ctx context.Context) ApplicationNetworkRuleSetIpRuleOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationNetworkRuleSetIpRuleOutput)
}
// ApplicationNetworkRuleSetIpRuleArrayInput is an input type that accepts ApplicationNetworkRuleSetIpRuleArray and ApplicationNetworkRuleSetIpRuleArrayOutput values.
// You can construct a concrete instance of `ApplicationNetworkRuleSetIpRuleArrayInput` via:
//
// ApplicationNetworkRuleSetIpRuleArray{ ApplicationNetworkRuleSetIpRuleArgs{...} }
type ApplicationNetworkRuleSetIpRuleArrayInput interface {
pulumi.Input
ToApplicationNetworkRuleSetIpRuleArrayOutput() ApplicationNetworkRuleSetIpRuleArrayOutput
ToApplicationNetworkRuleSetIpRuleArrayOutputWithContext(context.Context) ApplicationNetworkRuleSetIpRuleArrayOutput
}
type ApplicationNetworkRuleSetIpRuleArray []ApplicationNetworkRuleSetIpRuleInput
func (ApplicationNetworkRuleSetIpRuleArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]ApplicationNetworkRuleSetIpRule)(nil)).Elem()
}
func (i ApplicationNetworkRuleSetIpRuleArray) ToApplicationNetworkRuleSetIpRuleArrayOutput() ApplicationNetworkRuleSetIpRuleArrayOutput {
return i.ToApplicationNetworkRuleSetIpRuleArrayOutputWithContext(context.Background())
}
func (i ApplicationNetworkRuleSetIpRuleArray) ToApplicationNetworkRuleSetIpRuleArrayOutputWithContext(ctx context.Context) ApplicationNetworkRuleSetIpRuleArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationNetworkRuleSetIpRuleArrayOutput)
}
type ApplicationNetworkRuleSetIpRuleOutput struct{ *pulumi.OutputState }
func (ApplicationNetworkRuleSetIpRuleOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ApplicationNetworkRuleSetIpRule)(nil)).Elem()
}
func (o ApplicationNetworkRuleSetIpRuleOutput) ToApplicationNetworkRuleSetIpRuleOutput() ApplicationNetworkRuleSetIpRuleOutput {
return o
}
func (o ApplicationNetworkRuleSetIpRuleOutput) ToApplicationNetworkRuleSetIpRuleOutputWithContext(ctx context.Context) ApplicationNetworkRuleSetIpRuleOutput {
return o
}
// The IP address range in CIDR notation for the IP Rule.
func (o ApplicationNetworkRuleSetIpRuleOutput) IpMask() pulumi.StringOutput {
return o.ApplyT(func(v ApplicationNetworkRuleSetIpRule) string { return v.IpMask }).(pulumi.StringOutput)
}
// The name of the IP Rule
func (o ApplicationNetworkRuleSetIpRuleOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v ApplicationNetworkRuleSetIpRule) string { return v.Name }).(pulumi.StringOutput)
}
type ApplicationNetworkRuleSetIpRuleArrayOutput struct{ *pulumi.OutputState }
func (ApplicationNetworkRuleSetIpRuleArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ApplicationNetworkRuleSetIpRule)(nil)).Elem()
}
func (o ApplicationNetworkRuleSetIpRuleArrayOutput) ToApplicationNetworkRuleSetIpRuleArrayOutput() ApplicationNetworkRuleSetIpRuleArrayOutput {
return o
}
func (o ApplicationNetworkRuleSetIpRuleArrayOutput) ToApplicationNetworkRuleSetIpRuleArrayOutputWithContext(ctx context.Context) ApplicationNetworkRuleSetIpRuleArrayOutput {
return o
}
func (o ApplicationNetworkRuleSetIpRuleArrayOutput) Index(i pulumi.IntInput) ApplicationNetworkRuleSetIpRuleOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ApplicationNetworkRuleSetIpRule {
return vs[0].([]ApplicationNetworkRuleSetIpRule)[vs[1].(int)]
}).(ApplicationNetworkRuleSetIpRuleOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationIdentityInput)(nil)).Elem(), ApplicationIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationIdentityPtrInput)(nil)).Elem(), ApplicationIdentityArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationNetworkRuleSetIpRuleInput)(nil)).Elem(), ApplicationNetworkRuleSetIpRuleArgs{})
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationNetworkRuleSetIpRuleArrayInput)(nil)).Elem(), ApplicationNetworkRuleSetIpRuleArray{})
pulumi.RegisterOutputType(ApplicationIdentityOutput{})
pulumi.RegisterOutputType(ApplicationIdentityPtrOutput{})
pulumi.RegisterOutputType(ApplicationNetworkRuleSetIpRuleOutput{})
pulumi.RegisterOutputType(ApplicationNetworkRuleSetIpRuleArrayOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/iotcentral/organization.go | sdk/go/azure/iotcentral/organization.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package iotcentral
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an IoT Central Organization
//
// ## 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/iotcentral"
// "github.com/pulumi/pulumi/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"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleApplication, err := iotcentral.NewApplication(ctx, "example", &iotcentral.ApplicationArgs{
// Name: pulumi.String("example-iotcentral-app"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SubDomain: pulumi.String("example-iotcentral-app-subdomain"),
// DisplayName: pulumi.String("example-iotcentral-app-display-name"),
// Sku: pulumi.String("ST1"),
// Template: pulumi.String("iotc-default@1.0.0"),
// Tags: pulumi.StringMap{
// "Foo": pulumi.String("Bar"),
// },
// })
// if err != nil {
// return err
// }
// exampleParent, err := iotcentral.NewOrganization(ctx, "example_parent", &iotcentral.OrganizationArgs{
// IotcentralApplicationId: exampleApplication.ID(),
// OrganizationId: pulumi.String("example-parent-organization-id"),
// DisplayName: pulumi.String("Org example parent"),
// })
// if err != nil {
// return err
// }
// _, err = iotcentral.NewOrganization(ctx, "example", &iotcentral.OrganizationArgs{
// IotcentralApplicationId: exampleApplication.ID(),
// OrganizationId: pulumi.String("example-child-organization-id"),
// DisplayName: pulumi.String("Org example"),
// ParentOrganizationId: exampleParent.OrganizationId,
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// The IoT Central Organization can be imported using the `id`, e.g.
//
// ```sh
// $ pulumi import azure:iotcentral/organization:Organization example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.IoTCentral/iotApps/example/organizations/example
// ```
type Organization struct {
pulumi.CustomResourceState
// Custom `displayName` for the organization.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The application `id`. Changing this forces a new resource to be created.
IotcentralApplicationId pulumi.StringOutput `pulumi:"iotcentralApplicationId"`
// The ID of the organization. Changing this forces a new resource to be created.
OrganizationId pulumi.StringOutput `pulumi:"organizationId"`
// The `organizationId` of the parent organization. Changing this forces a new resource to be created.
ParentOrganizationId pulumi.StringPtrOutput `pulumi:"parentOrganizationId"`
}
// NewOrganization registers a new resource with the given unique name, arguments, and options.
func NewOrganization(ctx *pulumi.Context,
name string, args *OrganizationArgs, opts ...pulumi.ResourceOption) (*Organization, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DisplayName == nil {
return nil, errors.New("invalid value for required argument 'DisplayName'")
}
if args.IotcentralApplicationId == nil {
return nil, errors.New("invalid value for required argument 'IotcentralApplicationId'")
}
if args.OrganizationId == nil {
return nil, errors.New("invalid value for required argument 'OrganizationId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Organization
err := ctx.RegisterResource("azure:iotcentral/organization:Organization", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetOrganization gets an existing Organization resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetOrganization(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *OrganizationState, opts ...pulumi.ResourceOption) (*Organization, error) {
var resource Organization
err := ctx.ReadResource("azure:iotcentral/organization:Organization", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Organization resources.
type organizationState struct {
// Custom `displayName` for the organization.
DisplayName *string `pulumi:"displayName"`
// The application `id`. Changing this forces a new resource to be created.
IotcentralApplicationId *string `pulumi:"iotcentralApplicationId"`
// The ID of the organization. Changing this forces a new resource to be created.
OrganizationId *string `pulumi:"organizationId"`
// The `organizationId` of the parent organization. Changing this forces a new resource to be created.
ParentOrganizationId *string `pulumi:"parentOrganizationId"`
}
type OrganizationState struct {
// Custom `displayName` for the organization.
DisplayName pulumi.StringPtrInput
// The application `id`. Changing this forces a new resource to be created.
IotcentralApplicationId pulumi.StringPtrInput
// The ID of the organization. Changing this forces a new resource to be created.
OrganizationId pulumi.StringPtrInput
// The `organizationId` of the parent organization. Changing this forces a new resource to be created.
ParentOrganizationId pulumi.StringPtrInput
}
func (OrganizationState) ElementType() reflect.Type {
return reflect.TypeOf((*organizationState)(nil)).Elem()
}
type organizationArgs struct {
// Custom `displayName` for the organization.
DisplayName string `pulumi:"displayName"`
// The application `id`. Changing this forces a new resource to be created.
IotcentralApplicationId string `pulumi:"iotcentralApplicationId"`
// The ID of the organization. Changing this forces a new resource to be created.
OrganizationId string `pulumi:"organizationId"`
// The `organizationId` of the parent organization. Changing this forces a new resource to be created.
ParentOrganizationId *string `pulumi:"parentOrganizationId"`
}
// The set of arguments for constructing a Organization resource.
type OrganizationArgs struct {
// Custom `displayName` for the organization.
DisplayName pulumi.StringInput
// The application `id`. Changing this forces a new resource to be created.
IotcentralApplicationId pulumi.StringInput
// The ID of the organization. Changing this forces a new resource to be created.
OrganizationId pulumi.StringInput
// The `organizationId` of the parent organization. Changing this forces a new resource to be created.
ParentOrganizationId pulumi.StringPtrInput
}
func (OrganizationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*organizationArgs)(nil)).Elem()
}
type OrganizationInput interface {
pulumi.Input
ToOrganizationOutput() OrganizationOutput
ToOrganizationOutputWithContext(ctx context.Context) OrganizationOutput
}
func (*Organization) ElementType() reflect.Type {
return reflect.TypeOf((**Organization)(nil)).Elem()
}
func (i *Organization) ToOrganizationOutput() OrganizationOutput {
return i.ToOrganizationOutputWithContext(context.Background())
}
func (i *Organization) ToOrganizationOutputWithContext(ctx context.Context) OrganizationOutput {
return pulumi.ToOutputWithContext(ctx, i).(OrganizationOutput)
}
// OrganizationArrayInput is an input type that accepts OrganizationArray and OrganizationArrayOutput values.
// You can construct a concrete instance of `OrganizationArrayInput` via:
//
// OrganizationArray{ OrganizationArgs{...} }
type OrganizationArrayInput interface {
pulumi.Input
ToOrganizationArrayOutput() OrganizationArrayOutput
ToOrganizationArrayOutputWithContext(context.Context) OrganizationArrayOutput
}
type OrganizationArray []OrganizationInput
func (OrganizationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Organization)(nil)).Elem()
}
func (i OrganizationArray) ToOrganizationArrayOutput() OrganizationArrayOutput {
return i.ToOrganizationArrayOutputWithContext(context.Background())
}
func (i OrganizationArray) ToOrganizationArrayOutputWithContext(ctx context.Context) OrganizationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(OrganizationArrayOutput)
}
// OrganizationMapInput is an input type that accepts OrganizationMap and OrganizationMapOutput values.
// You can construct a concrete instance of `OrganizationMapInput` via:
//
// OrganizationMap{ "key": OrganizationArgs{...} }
type OrganizationMapInput interface {
pulumi.Input
ToOrganizationMapOutput() OrganizationMapOutput
ToOrganizationMapOutputWithContext(context.Context) OrganizationMapOutput
}
type OrganizationMap map[string]OrganizationInput
func (OrganizationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Organization)(nil)).Elem()
}
func (i OrganizationMap) ToOrganizationMapOutput() OrganizationMapOutput {
return i.ToOrganizationMapOutputWithContext(context.Background())
}
func (i OrganizationMap) ToOrganizationMapOutputWithContext(ctx context.Context) OrganizationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(OrganizationMapOutput)
}
type OrganizationOutput struct{ *pulumi.OutputState }
func (OrganizationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Organization)(nil)).Elem()
}
func (o OrganizationOutput) ToOrganizationOutput() OrganizationOutput {
return o
}
func (o OrganizationOutput) ToOrganizationOutputWithContext(ctx context.Context) OrganizationOutput {
return o
}
// Custom `displayName` for the organization.
func (o OrganizationOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *Organization) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// The application `id`. Changing this forces a new resource to be created.
func (o OrganizationOutput) IotcentralApplicationId() pulumi.StringOutput {
return o.ApplyT(func(v *Organization) pulumi.StringOutput { return v.IotcentralApplicationId }).(pulumi.StringOutput)
}
// The ID of the organization. Changing this forces a new resource to be created.
func (o OrganizationOutput) OrganizationId() pulumi.StringOutput {
return o.ApplyT(func(v *Organization) pulumi.StringOutput { return v.OrganizationId }).(pulumi.StringOutput)
}
// The `organizationId` of the parent organization. Changing this forces a new resource to be created.
func (o OrganizationOutput) ParentOrganizationId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Organization) pulumi.StringPtrOutput { return v.ParentOrganizationId }).(pulumi.StringPtrOutput)
}
type OrganizationArrayOutput struct{ *pulumi.OutputState }
func (OrganizationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Organization)(nil)).Elem()
}
func (o OrganizationArrayOutput) ToOrganizationArrayOutput() OrganizationArrayOutput {
return o
}
func (o OrganizationArrayOutput) ToOrganizationArrayOutputWithContext(ctx context.Context) OrganizationArrayOutput {
return o
}
func (o OrganizationArrayOutput) Index(i pulumi.IntInput) OrganizationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Organization {
return vs[0].([]*Organization)[vs[1].(int)]
}).(OrganizationOutput)
}
type OrganizationMapOutput struct{ *pulumi.OutputState }
func (OrganizationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Organization)(nil)).Elem()
}
func (o OrganizationMapOutput) ToOrganizationMapOutput() OrganizationMapOutput {
return o
}
func (o OrganizationMapOutput) ToOrganizationMapOutputWithContext(ctx context.Context) OrganizationMapOutput {
return o
}
func (o OrganizationMapOutput) MapIndex(k pulumi.StringInput) OrganizationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Organization {
return vs[0].(map[string]*Organization)[vs[1].(string)]
}).(OrganizationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*OrganizationInput)(nil)).Elem(), &Organization{})
pulumi.RegisterInputType(reflect.TypeOf((*OrganizationArrayInput)(nil)).Elem(), OrganizationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*OrganizationMapInput)(nil)).Elem(), OrganizationMap{})
pulumi.RegisterOutputType(OrganizationOutput{})
pulumi.RegisterOutputType(OrganizationArrayOutput{})
pulumi.RegisterOutputType(OrganizationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/iotcentral/application.go | sdk/go/azure/iotcentral/application.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package iotcentral
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an IoT Central Application
//
// ## 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/iotcentral"
// "github.com/pulumi/pulumi/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"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// _, err = iotcentral.NewApplication(ctx, "example", &iotcentral.ApplicationArgs{
// Name: pulumi.String("example-iotcentral-app"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SubDomain: pulumi.String("example-iotcentral-app-subdomain"),
// DisplayName: pulumi.String("example-iotcentral-app-display-name"),
// Sku: pulumi.String("ST1"),
// Template: pulumi.String("iotc-default@1.0.0"),
// Tags: pulumi.StringMap{
// "Foo": pulumi.String("Bar"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.IoTCentral` - 2021-11-01-preview
//
// ## Import
//
// The IoT Central Application can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:iotcentral/application:Application example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.IoTCentral/iotApps/app1
// ```
type Application struct {
pulumi.CustomResourceState
// A `displayName` name. Custom display name for the IoT Central application. Default is resource name.
//
// > **Note:** Due to a bug in the provider, the default value of `displayName` of a newly created IoT Central App will be the Resource Group Name, it will be fixed and use resource name in 4.0. For an existing IoT Central App, this could be fixed by specifying the `displayName` explicitly.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// An `identity` block as defined below.
Identity ApplicationIdentityPtrOutput `pulumi:"identity"`
// Specifies the supported Azure location where the resource has to be create. Changing this forces a new resource to be created.
Location pulumi.StringOutput `pulumi:"location"`
// Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// Whether public network access is allowed for the IoT Central Application. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrOutput `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
// A `sku` name. Possible values is `ST0`, `ST1`, `ST2`, Default value is `ST1`
Sku pulumi.StringPtrOutput `pulumi:"sku"`
// A `subDomain` name. Subdomain for the IoT Central URL. Each application must have a unique subdomain.
SubDomain pulumi.StringOutput `pulumi:"subDomain"`
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A `template` name. IoT Central application template name. Defaults to `iotc-pnp-preview@1.0.0`. Changing this forces a new resource to be created.
Template pulumi.StringPtrOutput `pulumi:"template"`
}
// NewApplication registers a new resource with the given unique name, arguments, and options.
func NewApplication(ctx *pulumi.Context,
name string, args *ApplicationArgs, opts ...pulumi.ResourceOption) (*Application, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.SubDomain == nil {
return nil, errors.New("invalid value for required argument 'SubDomain'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Application
err := ctx.RegisterResource("azure:iotcentral/application:Application", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApplication gets an existing Application resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetApplication(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApplicationState, opts ...pulumi.ResourceOption) (*Application, error) {
var resource Application
err := ctx.ReadResource("azure:iotcentral/application:Application", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Application resources.
type applicationState struct {
// A `displayName` name. Custom display name for the IoT Central application. Default is resource name.
//
// > **Note:** Due to a bug in the provider, the default value of `displayName` of a newly created IoT Central App will be the Resource Group Name, it will be fixed and use resource name in 4.0. For an existing IoT Central App, this could be fixed by specifying the `displayName` explicitly.
DisplayName *string `pulumi:"displayName"`
// An `identity` block as defined below.
Identity *ApplicationIdentity `pulumi:"identity"`
// Specifies the supported Azure location where the resource has to be create. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether public network access is allowed for the IoT Central Application. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
// A `sku` name. Possible values is `ST0`, `ST1`, `ST2`, Default value is `ST1`
Sku *string `pulumi:"sku"`
// A `subDomain` name. Subdomain for the IoT Central URL. Each application must have a unique subdomain.
SubDomain *string `pulumi:"subDomain"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// A `template` name. IoT Central application template name. Defaults to `iotc-pnp-preview@1.0.0`. Changing this forces a new resource to be created.
Template *string `pulumi:"template"`
}
type ApplicationState struct {
// A `displayName` name. Custom display name for the IoT Central application. Default is resource name.
//
// > **Note:** Due to a bug in the provider, the default value of `displayName` of a newly created IoT Central App will be the Resource Group Name, it will be fixed and use resource name in 4.0. For an existing IoT Central App, this could be fixed by specifying the `displayName` explicitly.
DisplayName pulumi.StringPtrInput
// An `identity` block as defined below.
Identity ApplicationIdentityPtrInput
// Specifies the supported Azure location where the resource has to be create. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether public network access is allowed for the IoT Central Application. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
// A `sku` name. Possible values is `ST0`, `ST1`, `ST2`, Default value is `ST1`
Sku pulumi.StringPtrInput
// A `subDomain` name. Subdomain for the IoT Central URL. Each application must have a unique subdomain.
SubDomain pulumi.StringPtrInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// A `template` name. IoT Central application template name. Defaults to `iotc-pnp-preview@1.0.0`. Changing this forces a new resource to be created.
Template pulumi.StringPtrInput
}
func (ApplicationState) ElementType() reflect.Type {
return reflect.TypeOf((*applicationState)(nil)).Elem()
}
type applicationArgs struct {
// A `displayName` name. Custom display name for the IoT Central application. Default is resource name.
//
// > **Note:** Due to a bug in the provider, the default value of `displayName` of a newly created IoT Central App will be the Resource Group Name, it will be fixed and use resource name in 4.0. For an existing IoT Central App, this could be fixed by specifying the `displayName` explicitly.
DisplayName *string `pulumi:"displayName"`
// An `identity` block as defined below.
Identity *ApplicationIdentity `pulumi:"identity"`
// Specifies the supported Azure location where the resource has to be create. Changing this forces a new resource to be created.
Location *string `pulumi:"location"`
// Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// Whether public network access is allowed for the IoT Central Application. Defaults to `true`.
PublicNetworkAccessEnabled *bool `pulumi:"publicNetworkAccessEnabled"`
// The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
// A `sku` name. Possible values is `ST0`, `ST1`, `ST2`, Default value is `ST1`
Sku *string `pulumi:"sku"`
// A `subDomain` name. Subdomain for the IoT Central URL. Each application must have a unique subdomain.
SubDomain string `pulumi:"subDomain"`
// A mapping of tags to assign to the resource.
Tags map[string]string `pulumi:"tags"`
// A `template` name. IoT Central application template name. Defaults to `iotc-pnp-preview@1.0.0`. Changing this forces a new resource to be created.
Template *string `pulumi:"template"`
}
// The set of arguments for constructing a Application resource.
type ApplicationArgs struct {
// A `displayName` name. Custom display name for the IoT Central application. Default is resource name.
//
// > **Note:** Due to a bug in the provider, the default value of `displayName` of a newly created IoT Central App will be the Resource Group Name, it will be fixed and use resource name in 4.0. For an existing IoT Central App, this could be fixed by specifying the `displayName` explicitly.
DisplayName pulumi.StringPtrInput
// An `identity` block as defined below.
Identity ApplicationIdentityPtrInput
// Specifies the supported Azure location where the resource has to be create. Changing this forces a new resource to be created.
Location pulumi.StringPtrInput
// Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// Whether public network access is allowed for the IoT Central Application. Defaults to `true`.
PublicNetworkAccessEnabled pulumi.BoolPtrInput
// The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
// A `sku` name. Possible values is `ST0`, `ST1`, `ST2`, Default value is `ST1`
Sku pulumi.StringPtrInput
// A `subDomain` name. Subdomain for the IoT Central URL. Each application must have a unique subdomain.
SubDomain pulumi.StringInput
// A mapping of tags to assign to the resource.
Tags pulumi.StringMapInput
// A `template` name. IoT Central application template name. Defaults to `iotc-pnp-preview@1.0.0`. Changing this forces a new resource to be created.
Template pulumi.StringPtrInput
}
func (ApplicationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*applicationArgs)(nil)).Elem()
}
type ApplicationInput interface {
pulumi.Input
ToApplicationOutput() ApplicationOutput
ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput
}
func (*Application) ElementType() reflect.Type {
return reflect.TypeOf((**Application)(nil)).Elem()
}
func (i *Application) ToApplicationOutput() ApplicationOutput {
return i.ToApplicationOutputWithContext(context.Background())
}
func (i *Application) ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationOutput)
}
// ApplicationArrayInput is an input type that accepts ApplicationArray and ApplicationArrayOutput values.
// You can construct a concrete instance of `ApplicationArrayInput` via:
//
// ApplicationArray{ ApplicationArgs{...} }
type ApplicationArrayInput interface {
pulumi.Input
ToApplicationArrayOutput() ApplicationArrayOutput
ToApplicationArrayOutputWithContext(context.Context) ApplicationArrayOutput
}
type ApplicationArray []ApplicationInput
func (ApplicationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Application)(nil)).Elem()
}
func (i ApplicationArray) ToApplicationArrayOutput() ApplicationArrayOutput {
return i.ToApplicationArrayOutputWithContext(context.Background())
}
func (i ApplicationArray) ToApplicationArrayOutputWithContext(ctx context.Context) ApplicationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationArrayOutput)
}
// ApplicationMapInput is an input type that accepts ApplicationMap and ApplicationMapOutput values.
// You can construct a concrete instance of `ApplicationMapInput` via:
//
// ApplicationMap{ "key": ApplicationArgs{...} }
type ApplicationMapInput interface {
pulumi.Input
ToApplicationMapOutput() ApplicationMapOutput
ToApplicationMapOutputWithContext(context.Context) ApplicationMapOutput
}
type ApplicationMap map[string]ApplicationInput
func (ApplicationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Application)(nil)).Elem()
}
func (i ApplicationMap) ToApplicationMapOutput() ApplicationMapOutput {
return i.ToApplicationMapOutputWithContext(context.Background())
}
func (i ApplicationMap) ToApplicationMapOutputWithContext(ctx context.Context) ApplicationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationMapOutput)
}
type ApplicationOutput struct{ *pulumi.OutputState }
func (ApplicationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Application)(nil)).Elem()
}
func (o ApplicationOutput) ToApplicationOutput() ApplicationOutput {
return o
}
func (o ApplicationOutput) ToApplicationOutputWithContext(ctx context.Context) ApplicationOutput {
return o
}
// A `displayName` name. Custom display name for the IoT Central application. Default is resource name.
//
// > **Note:** Due to a bug in the provider, the default value of `displayName` of a newly created IoT Central App will be the Resource Group Name, it will be fixed and use resource name in 4.0. For an existing IoT Central App, this could be fixed by specifying the `displayName` explicitly.
func (o ApplicationOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.DisplayName }).(pulumi.StringOutput)
}
// An `identity` block as defined below.
func (o ApplicationOutput) Identity() ApplicationIdentityPtrOutput {
return o.ApplyT(func(v *Application) ApplicationIdentityPtrOutput { return v.Identity }).(ApplicationIdentityPtrOutput)
}
// Specifies the supported Azure location where the resource has to be create. Changing this forces a new resource to be created.
func (o ApplicationOutput) Location() pulumi.StringOutput {
return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.Location }).(pulumi.StringOutput)
}
// Specifies the name of the IotHub resource. Changing this forces a new resource to be created.
func (o ApplicationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// Whether public network access is allowed for the IoT Central Application. Defaults to `true`.
func (o ApplicationOutput) PublicNetworkAccessEnabled() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *Application) pulumi.BoolPtrOutput { return v.PublicNetworkAccessEnabled }).(pulumi.BoolPtrOutput)
}
// The name of the resource group under which the IotHub resource has to be created. Changing this forces a new resource to be created.
func (o ApplicationOutput) ResourceGroupName() pulumi.StringOutput {
return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.ResourceGroupName }).(pulumi.StringOutput)
}
// A `sku` name. Possible values is `ST0`, `ST1`, `ST2`, Default value is `ST1`
func (o ApplicationOutput) Sku() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Application) pulumi.StringPtrOutput { return v.Sku }).(pulumi.StringPtrOutput)
}
// A `subDomain` name. Subdomain for the IoT Central URL. Each application must have a unique subdomain.
func (o ApplicationOutput) SubDomain() pulumi.StringOutput {
return o.ApplyT(func(v *Application) pulumi.StringOutput { return v.SubDomain }).(pulumi.StringOutput)
}
// A mapping of tags to assign to the resource.
func (o ApplicationOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v *Application) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
}
// A `template` name. IoT Central application template name. Defaults to `iotc-pnp-preview@1.0.0`. Changing this forces a new resource to be created.
func (o ApplicationOutput) Template() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Application) pulumi.StringPtrOutput { return v.Template }).(pulumi.StringPtrOutput)
}
type ApplicationArrayOutput struct{ *pulumi.OutputState }
func (ApplicationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Application)(nil)).Elem()
}
func (o ApplicationArrayOutput) ToApplicationArrayOutput() ApplicationArrayOutput {
return o
}
func (o ApplicationArrayOutput) ToApplicationArrayOutputWithContext(ctx context.Context) ApplicationArrayOutput {
return o
}
func (o ApplicationArrayOutput) Index(i pulumi.IntInput) ApplicationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Application {
return vs[0].([]*Application)[vs[1].(int)]
}).(ApplicationOutput)
}
type ApplicationMapOutput struct{ *pulumi.OutputState }
func (ApplicationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Application)(nil)).Elem()
}
func (o ApplicationMapOutput) ToApplicationMapOutput() ApplicationMapOutput {
return o
}
func (o ApplicationMapOutput) ToApplicationMapOutputWithContext(ctx context.Context) ApplicationMapOutput {
return o
}
func (o ApplicationMapOutput) MapIndex(k pulumi.StringInput) ApplicationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Application {
return vs[0].(map[string]*Application)[vs[1].(string)]
}).(ApplicationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationInput)(nil)).Elem(), &Application{})
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationArrayInput)(nil)).Elem(), ApplicationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationMapInput)(nil)).Elem(), ApplicationMap{})
pulumi.RegisterOutputType(ApplicationOutput{})
pulumi.RegisterOutputType(ApplicationArrayOutput{})
pulumi.RegisterOutputType(ApplicationMapOutput{})
}
| go | Apache-2.0 | b66e1472775a89cca43f5050fef806854a7c3fa3 | 2026-01-07T09:44:27.619514Z | false |
pulumi/pulumi-azure | https://github.com/pulumi/pulumi-azure/blob/b66e1472775a89cca43f5050fef806854a7c3fa3/sdk/go/azure/iotcentral/applicationNetworkRuleSet.go | sdk/go/azure/iotcentral/applicationNetworkRuleSet.go | // Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package iotcentral
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Manages an IoT Central Application Network Rule Set.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
// "github.com/pulumi/pulumi-azure/sdk/v6/go/azure/iotcentral"
// "github.com/pulumi/pulumi/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"),
// Location: pulumi.String("West Europe"),
// })
// if err != nil {
// return err
// }
// exampleApplication, err := iotcentral.NewApplication(ctx, "example", &iotcentral.ApplicationArgs{
// Name: pulumi.String("example-iotcentral-app"),
// ResourceGroupName: example.Name,
// Location: example.Location,
// SubDomain: pulumi.String("example-iotcentral-app-subdomain"),
// DisplayName: pulumi.String("example-iotcentral-app-display-name"),
// Sku: pulumi.String("ST1"),
// Tags: pulumi.StringMap{
// "Foo": pulumi.String("Bar"),
// },
// })
// if err != nil {
// return err
// }
// _, err = iotcentral.NewApplicationNetworkRuleSet(ctx, "example", &iotcentral.ApplicationNetworkRuleSetArgs{
// IotcentralApplicationId: exampleApplication.ID(),
// IpRules: iotcentral.ApplicationNetworkRuleSetIpRuleArray{
// &iotcentral.ApplicationNetworkRuleSetIpRuleArgs{
// Name: pulumi.String("rule1"),
// IpMask: pulumi.String("10.0.1.0/24"),
// },
// &iotcentral.ApplicationNetworkRuleSetIpRuleArgs{
// Name: pulumi.String("rule2"),
// IpMask: pulumi.String("10.1.1.0/24"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## API Providers
//
// <!-- This section is generated, changes will be overwritten -->
// This resource uses the following Azure API Providers:
//
// * `Microsoft.IoTCentral` - 2021-11-01-preview
//
// ## Import
//
// IoT Central Application Network Rule Sets can be imported using the `resource id`, e.g.
//
// ```sh
// $ pulumi import azure:iotcentral/applicationNetworkRuleSet:ApplicationNetworkRuleSet example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.IoTCentral/iotApps/app1
// ```
type ApplicationNetworkRuleSet struct {
pulumi.CustomResourceState
// Whether these IP Rules apply for device connectivity to IoT Hub and Device Provisioning Service associated with this IoT Central Application. Possible values are `true`, `false`. Defaults to `true`
ApplyToDevice pulumi.BoolPtrOutput `pulumi:"applyToDevice"`
// Specifies the default action for the IoT Central Application Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Deny`.
DefaultAction pulumi.StringPtrOutput `pulumi:"defaultAction"`
// The ID of the IoT Central Application. Changing this forces a new resource to be created.
IotcentralApplicationId pulumi.StringOutput `pulumi:"iotcentralApplicationId"`
// One or more `ipRule` blocks as defined below.
IpRules ApplicationNetworkRuleSetIpRuleArrayOutput `pulumi:"ipRules"`
}
// NewApplicationNetworkRuleSet registers a new resource with the given unique name, arguments, and options.
func NewApplicationNetworkRuleSet(ctx *pulumi.Context,
name string, args *ApplicationNetworkRuleSetArgs, opts ...pulumi.ResourceOption) (*ApplicationNetworkRuleSet, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.IotcentralApplicationId == nil {
return nil, errors.New("invalid value for required argument 'IotcentralApplicationId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ApplicationNetworkRuleSet
err := ctx.RegisterResource("azure:iotcentral/applicationNetworkRuleSet:ApplicationNetworkRuleSet", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApplicationNetworkRuleSet gets an existing ApplicationNetworkRuleSet resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetApplicationNetworkRuleSet(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApplicationNetworkRuleSetState, opts ...pulumi.ResourceOption) (*ApplicationNetworkRuleSet, error) {
var resource ApplicationNetworkRuleSet
err := ctx.ReadResource("azure:iotcentral/applicationNetworkRuleSet:ApplicationNetworkRuleSet", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ApplicationNetworkRuleSet resources.
type applicationNetworkRuleSetState struct {
// Whether these IP Rules apply for device connectivity to IoT Hub and Device Provisioning Service associated with this IoT Central Application. Possible values are `true`, `false`. Defaults to `true`
ApplyToDevice *bool `pulumi:"applyToDevice"`
// Specifies the default action for the IoT Central Application Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Deny`.
DefaultAction *string `pulumi:"defaultAction"`
// The ID of the IoT Central Application. Changing this forces a new resource to be created.
IotcentralApplicationId *string `pulumi:"iotcentralApplicationId"`
// One or more `ipRule` blocks as defined below.
IpRules []ApplicationNetworkRuleSetIpRule `pulumi:"ipRules"`
}
type ApplicationNetworkRuleSetState struct {
// Whether these IP Rules apply for device connectivity to IoT Hub and Device Provisioning Service associated with this IoT Central Application. Possible values are `true`, `false`. Defaults to `true`
ApplyToDevice pulumi.BoolPtrInput
// Specifies the default action for the IoT Central Application Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Deny`.
DefaultAction pulumi.StringPtrInput
// The ID of the IoT Central Application. Changing this forces a new resource to be created.
IotcentralApplicationId pulumi.StringPtrInput
// One or more `ipRule` blocks as defined below.
IpRules ApplicationNetworkRuleSetIpRuleArrayInput
}
func (ApplicationNetworkRuleSetState) ElementType() reflect.Type {
return reflect.TypeOf((*applicationNetworkRuleSetState)(nil)).Elem()
}
type applicationNetworkRuleSetArgs struct {
// Whether these IP Rules apply for device connectivity to IoT Hub and Device Provisioning Service associated with this IoT Central Application. Possible values are `true`, `false`. Defaults to `true`
ApplyToDevice *bool `pulumi:"applyToDevice"`
// Specifies the default action for the IoT Central Application Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Deny`.
DefaultAction *string `pulumi:"defaultAction"`
// The ID of the IoT Central Application. Changing this forces a new resource to be created.
IotcentralApplicationId string `pulumi:"iotcentralApplicationId"`
// One or more `ipRule` blocks as defined below.
IpRules []ApplicationNetworkRuleSetIpRule `pulumi:"ipRules"`
}
// The set of arguments for constructing a ApplicationNetworkRuleSet resource.
type ApplicationNetworkRuleSetArgs struct {
// Whether these IP Rules apply for device connectivity to IoT Hub and Device Provisioning Service associated with this IoT Central Application. Possible values are `true`, `false`. Defaults to `true`
ApplyToDevice pulumi.BoolPtrInput
// Specifies the default action for the IoT Central Application Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Deny`.
DefaultAction pulumi.StringPtrInput
// The ID of the IoT Central Application. Changing this forces a new resource to be created.
IotcentralApplicationId pulumi.StringInput
// One or more `ipRule` blocks as defined below.
IpRules ApplicationNetworkRuleSetIpRuleArrayInput
}
func (ApplicationNetworkRuleSetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*applicationNetworkRuleSetArgs)(nil)).Elem()
}
type ApplicationNetworkRuleSetInput interface {
pulumi.Input
ToApplicationNetworkRuleSetOutput() ApplicationNetworkRuleSetOutput
ToApplicationNetworkRuleSetOutputWithContext(ctx context.Context) ApplicationNetworkRuleSetOutput
}
func (*ApplicationNetworkRuleSet) ElementType() reflect.Type {
return reflect.TypeOf((**ApplicationNetworkRuleSet)(nil)).Elem()
}
func (i *ApplicationNetworkRuleSet) ToApplicationNetworkRuleSetOutput() ApplicationNetworkRuleSetOutput {
return i.ToApplicationNetworkRuleSetOutputWithContext(context.Background())
}
func (i *ApplicationNetworkRuleSet) ToApplicationNetworkRuleSetOutputWithContext(ctx context.Context) ApplicationNetworkRuleSetOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationNetworkRuleSetOutput)
}
// ApplicationNetworkRuleSetArrayInput is an input type that accepts ApplicationNetworkRuleSetArray and ApplicationNetworkRuleSetArrayOutput values.
// You can construct a concrete instance of `ApplicationNetworkRuleSetArrayInput` via:
//
// ApplicationNetworkRuleSetArray{ ApplicationNetworkRuleSetArgs{...} }
type ApplicationNetworkRuleSetArrayInput interface {
pulumi.Input
ToApplicationNetworkRuleSetArrayOutput() ApplicationNetworkRuleSetArrayOutput
ToApplicationNetworkRuleSetArrayOutputWithContext(context.Context) ApplicationNetworkRuleSetArrayOutput
}
type ApplicationNetworkRuleSetArray []ApplicationNetworkRuleSetInput
func (ApplicationNetworkRuleSetArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApplicationNetworkRuleSet)(nil)).Elem()
}
func (i ApplicationNetworkRuleSetArray) ToApplicationNetworkRuleSetArrayOutput() ApplicationNetworkRuleSetArrayOutput {
return i.ToApplicationNetworkRuleSetArrayOutputWithContext(context.Background())
}
func (i ApplicationNetworkRuleSetArray) ToApplicationNetworkRuleSetArrayOutputWithContext(ctx context.Context) ApplicationNetworkRuleSetArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationNetworkRuleSetArrayOutput)
}
// ApplicationNetworkRuleSetMapInput is an input type that accepts ApplicationNetworkRuleSetMap and ApplicationNetworkRuleSetMapOutput values.
// You can construct a concrete instance of `ApplicationNetworkRuleSetMapInput` via:
//
// ApplicationNetworkRuleSetMap{ "key": ApplicationNetworkRuleSetArgs{...} }
type ApplicationNetworkRuleSetMapInput interface {
pulumi.Input
ToApplicationNetworkRuleSetMapOutput() ApplicationNetworkRuleSetMapOutput
ToApplicationNetworkRuleSetMapOutputWithContext(context.Context) ApplicationNetworkRuleSetMapOutput
}
type ApplicationNetworkRuleSetMap map[string]ApplicationNetworkRuleSetInput
func (ApplicationNetworkRuleSetMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApplicationNetworkRuleSet)(nil)).Elem()
}
func (i ApplicationNetworkRuleSetMap) ToApplicationNetworkRuleSetMapOutput() ApplicationNetworkRuleSetMapOutput {
return i.ToApplicationNetworkRuleSetMapOutputWithContext(context.Background())
}
func (i ApplicationNetworkRuleSetMap) ToApplicationNetworkRuleSetMapOutputWithContext(ctx context.Context) ApplicationNetworkRuleSetMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApplicationNetworkRuleSetMapOutput)
}
type ApplicationNetworkRuleSetOutput struct{ *pulumi.OutputState }
func (ApplicationNetworkRuleSetOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ApplicationNetworkRuleSet)(nil)).Elem()
}
func (o ApplicationNetworkRuleSetOutput) ToApplicationNetworkRuleSetOutput() ApplicationNetworkRuleSetOutput {
return o
}
func (o ApplicationNetworkRuleSetOutput) ToApplicationNetworkRuleSetOutputWithContext(ctx context.Context) ApplicationNetworkRuleSetOutput {
return o
}
// Whether these IP Rules apply for device connectivity to IoT Hub and Device Provisioning Service associated with this IoT Central Application. Possible values are `true`, `false`. Defaults to `true`
func (o ApplicationNetworkRuleSetOutput) ApplyToDevice() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *ApplicationNetworkRuleSet) pulumi.BoolPtrOutput { return v.ApplyToDevice }).(pulumi.BoolPtrOutput)
}
// Specifies the default action for the IoT Central Application Network Rule Set. Possible values are `Allow` and `Deny`. Defaults to `Deny`.
func (o ApplicationNetworkRuleSetOutput) DefaultAction() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ApplicationNetworkRuleSet) pulumi.StringPtrOutput { return v.DefaultAction }).(pulumi.StringPtrOutput)
}
// The ID of the IoT Central Application. Changing this forces a new resource to be created.
func (o ApplicationNetworkRuleSetOutput) IotcentralApplicationId() pulumi.StringOutput {
return o.ApplyT(func(v *ApplicationNetworkRuleSet) pulumi.StringOutput { return v.IotcentralApplicationId }).(pulumi.StringOutput)
}
// One or more `ipRule` blocks as defined below.
func (o ApplicationNetworkRuleSetOutput) IpRules() ApplicationNetworkRuleSetIpRuleArrayOutput {
return o.ApplyT(func(v *ApplicationNetworkRuleSet) ApplicationNetworkRuleSetIpRuleArrayOutput { return v.IpRules }).(ApplicationNetworkRuleSetIpRuleArrayOutput)
}
type ApplicationNetworkRuleSetArrayOutput struct{ *pulumi.OutputState }
func (ApplicationNetworkRuleSetArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ApplicationNetworkRuleSet)(nil)).Elem()
}
func (o ApplicationNetworkRuleSetArrayOutput) ToApplicationNetworkRuleSetArrayOutput() ApplicationNetworkRuleSetArrayOutput {
return o
}
func (o ApplicationNetworkRuleSetArrayOutput) ToApplicationNetworkRuleSetArrayOutputWithContext(ctx context.Context) ApplicationNetworkRuleSetArrayOutput {
return o
}
func (o ApplicationNetworkRuleSetArrayOutput) Index(i pulumi.IntInput) ApplicationNetworkRuleSetOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApplicationNetworkRuleSet {
return vs[0].([]*ApplicationNetworkRuleSet)[vs[1].(int)]
}).(ApplicationNetworkRuleSetOutput)
}
type ApplicationNetworkRuleSetMapOutput struct{ *pulumi.OutputState }
func (ApplicationNetworkRuleSetMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ApplicationNetworkRuleSet)(nil)).Elem()
}
func (o ApplicationNetworkRuleSetMapOutput) ToApplicationNetworkRuleSetMapOutput() ApplicationNetworkRuleSetMapOutput {
return o
}
func (o ApplicationNetworkRuleSetMapOutput) ToApplicationNetworkRuleSetMapOutputWithContext(ctx context.Context) ApplicationNetworkRuleSetMapOutput {
return o
}
func (o ApplicationNetworkRuleSetMapOutput) MapIndex(k pulumi.StringInput) ApplicationNetworkRuleSetOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApplicationNetworkRuleSet {
return vs[0].(map[string]*ApplicationNetworkRuleSet)[vs[1].(string)]
}).(ApplicationNetworkRuleSetOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationNetworkRuleSetInput)(nil)).Elem(), &ApplicationNetworkRuleSet{})
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationNetworkRuleSetArrayInput)(nil)).Elem(), ApplicationNetworkRuleSetArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ApplicationNetworkRuleSetMapInput)(nil)).Elem(), ApplicationNetworkRuleSetMap{})
pulumi.RegisterOutputType(ApplicationNetworkRuleSetOutput{})
pulumi.RegisterOutputType(ApplicationNetworkRuleSetArrayOutput{})
pulumi.RegisterOutputType(ApplicationNetworkRuleSetMapOutput{})
}
| 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.